1
0
Fork 0
alistair23-linux/drivers/gpu/drm/vmwgfx
Thomas Hellstrom fd56746775 drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3
With the new validation code, a malicious user-space app could
potentially submit command streams with enough buffer-object and resource
references in them to have the resulting allocated validion nodes and
relocations make the kernel run out of GFP_KERNEL memory.

Protect from this by having the validation code reserve TTM graphics
memory when allocating.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
---
v2: Removed leftover debug printouts
2018-12-13 13:04:25 +01:00
..
device_include Merge tag 'vmwgfx-next-4.19-3' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:13:39 +10:00
Kconfig drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
Makefile drm/vmwgfx: Add a validation module v2 2018-09-27 15:21:35 +02:00
ttm_lock.c drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
ttm_lock.h drm/ttm, drm/vmwgfx: Move the lock- and object functionality to the vmwgfx driver 2018-09-27 15:19:20 +02:00
ttm_object.c drm/vmwgfx: Look up objects without taking a reference 2018-09-27 16:14:48 +02:00
ttm_object.h drm/vmwgfx: Look up objects without taking a reference 2018-09-27 16:14:48 +02:00
vmwgfx_binding.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_binding.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_blit.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_bo.c drm/vmwgfx: Look up user buffer objects without taking a reference 2018-09-28 08:57:07 +02:00
vmwgfx_cmdbuf.c drm/vmwgfx: Replace unconditional mutex unlocked warnings with lockdep counterpart 2018-09-27 15:21:37 +02:00
vmwgfx_cmdbuf_res.c drm/vmwgfx: Don't refcount command-buffer managed resource lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_context.c drm/vmwgfx: Don't refcount cotable lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_cotable.c drm/vmwgfx: Remove the resource avail field 2018-09-27 15:21:37 +02:00
vmwgfx_drv.c drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00
vmwgfx_drv.h drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00
vmwgfx_execbuf.c drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00
vmwgfx_fb.c drm/vmwgfx: Move buffer object related code to vmwgfx_bo.c 2018-07-03 20:33:46 +02:00
vmwgfx_fence.c drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
vmwgfx_fence.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_fifo.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_gmr.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_gmrid_manager.c Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax 2018-08-26 11:48:42 -07:00
vmwgfx_ioctl.c Merge tag 'vmwgfx-next-4.19-3' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:13:39 +10:00
vmwgfx_irq.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_kms.c Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-10-04 10:19:33 +10:00
vmwgfx_kms.h drm/vmwgfx: Use new validation interface for the modesetting code v2 2018-09-27 15:21:36 +02:00
vmwgfx_ldu.c drm-misc-next for 4.19: 2018-07-20 10:46:49 +10:00
vmwgfx_marker.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_mob.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_msg.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_msg.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_overlay.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_prime.c drm/ttm, drm/vmwgfx: Move the lock- and object functionality to the vmwgfx driver 2018-09-27 15:19:20 +02:00
vmwgfx_reg.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_resource.c drm/vmwgfx: Make user resource lookups reference-free during validation 2018-09-28 08:57:09 +02:00
vmwgfx_resource_priv.h drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
vmwgfx_scrn.c drm/vmwgfx: Use new validation interface for the modesetting code v2 2018-09-27 15:21:36 +02:00
vmwgfx_shader.c drm/vmwgfx: Don't refcount cotable lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_simple_resource.c drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
vmwgfx_so.c drm/vmwgfx: Don't refcount cotable lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_so.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_stdu.c Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-10-04 10:19:33 +10:00
vmwgfx_surface.c Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-10-04 10:19:33 +10:00
vmwgfx_ttm_buffer.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_ttm_glue.c drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00
vmwgfx_va.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_validation.c drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00
vmwgfx_validation.h drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00