[PATCH] drm: Turn off Legacy Context Functions

2015-06-10 Thread Peter Antoine
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

[PATCH 5/5] drm: Make Legacy Context access functions optional.

2015-04-23 Thread Peter Antoine
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

[PATCH 4/5] drm: Make HW_LOCK access functions optional.

2015-04-23 Thread Peter Antoine
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

[PATCH 3/5] drm: Possible lock priority escalation.

2015-04-23 Thread Peter Antoine
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

[PATCH 2/5] drm: Fixes unsafe deference in locks.

2015-04-23 Thread Peter Antoine
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

[PATCH 1/5] drm: Kernel Crash in drm_unlock

2015-04-23 Thread 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

[PATCH 0/5] HW_LOCK Security Patches

2015-04-23 Thread Peter Antoine
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

[PATCH i-g-t] tests/drm_hw_lock: Tests for hw_lock fixes.

2015-04-23 Thread Peter Antoine
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