exception of the Nova driver that may require them with
an old version of libdrm.
Signed-off-by: Peter Antoine
---
drivers/gpu/drm/drm_context.c | 48 +++
drivers/gpu/drm/drm_drv.c | 13 ++
drivers/gpu/drm/drm_lock.c| 8
7c510133d93dd6f15ca040733ba7b2891ed61fd1
Author: Daniel Vetter
This should now turn off the context feature.
Issue: VIZ-5485
Signed-off-by: Peter Antoine
---
drivers/gpu/drm/drm_context.c | 36
drivers/gpu/drm/drm_drv.c | 12 +++-
2 files
As these functions are only used by one driver and there are security holes
in these functions. Make the functions optional.
Issue: VIZ-5485
Signed-off-by: Peter Antoine
---
drivers/gpu/drm/drm_lock.c| 6 ++
drivers/gpu/drm/i915/i915_dma.c | 3 +++
drivers/gpu/drm
DRM_LOCK_CONT bits are not part of the context id this allows
operations on the DRM_KERNEL_CONTEXT.
Issue: VIZ-5485
Signed-off-by: Peter Antoine
---
drivers/gpu/drm/drm_context.c | 6 +++---
drivers/gpu/drm/drm_lock.c| 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers
This patch fixes an unsafe deference in the DRM_IOCTL_NEW_CTX. If the
ioctl is called before the lock is created or after it has been destroyed.
The code will deference a NULL pointer. This ioctl is a root ioctl so
exploitation is limited.
Issue: VIZ-5485
Signed-off-by: Peter Antoine
This patch fixes a possible kernel crash when drm_unlock (DRM_IOCTL_UNLOCK)
is called by a application that has not had a lock created by it. This
crash can be caused by any application from all users.
Issue: VIZ-5485
Signed-off-by: Peter Antoine
---
drivers/gpu/drm/drm_lock.c | 8
1
i-g-t test that goes with this patchset, but that test SHOULD NOT
be run before the kernel is patches as the test will crash the driver and/or
make the kernel panic.
Peter.
Peter Antoine (5):
drm: Kernel Crash in drm_unlock
drm: Fixes unsafe deference in locks.
drm: Possible lock priority
crashes:
drm: Kernel Crash in drm_unlock
drm: Fixes unsafe deference in locks.
Issue: VIZ-5485
Signed-off-by: Peter Antoine
---
lib/ioctl_wrappers.c | 19 +
lib/ioctl_wrappers.h | 1 +
tests/Makefile.sources | 1 +
tests/drm_hw_lock.c| 207