linux/drivers/gpu/drm/virtio
Kees Cook 25765dde57 drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct virtio_gpu_object_array.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: David Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230922173216.3823169-7-keescook@chromium.org
2023-10-05 11:30:50 +02:00
..
Kconfig drm/virtio: Add option to disable KMS support 2023-03-03 23:29:54 +03:00
Makefile drm/virtio: Refactor and optimize job submission code path 2023-06-03 04:50:40 +03:00
virtgpu_debugfs.c drm: Convert open-coded yes/no strings to yesno() 2022-02-07 13:04:25 -08:00
virtgpu_display.c drm/virtio: Add option to disable KMS support 2023-03-03 23:29:54 +03:00
virtgpu_drv.c drm/virtio: Support sync objects 2023-08-01 01:41:04 +03:00
virtgpu_drv.h drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by 2023-10-05 11:30:50 +02:00
virtgpu_fence.c drm/virtio: implement context init: add virtio_gpu_fence_event 2021-09-29 09:22:31 +02:00
virtgpu_gem.c drm/virtio: Unlock reservations on dma_resv_reserve_fences() error 2022-07-19 14:40:58 +02:00
virtgpu_ioctl.c drm/virtio: Refactor and optimize job submission code path 2023-06-03 04:50:40 +03:00
virtgpu_kms.c drm/virtio: Fix handling CONFIG_DRM_VIRTIO_GPU_KMS option 2023-03-06 20:32:17 +03:00
virtgpu_object.c drm/virtio: Fix memory leak in virtio_gpu_object_create() 2023-01-02 17:42:25 +03:00
virtgpu_plane.c drm/virtio: Enable fb damage clips property for the primary plane 2023-03-13 18:22:24 +01:00
virtgpu_prime.c drm/virtio: simplify the return expression 2022-06-09 07:30:13 +02:00
virtgpu_submit.c drm/virtio: Support sync objects 2023-08-01 01:41:04 +03:00
virtgpu_trace.h drm/virtio: Spiff out cmd queue/response traces 2023-01-02 17:51:27 +03:00
virtgpu_trace_points.c
virtgpu_vq.c Linux 6.3-rc4 2023-03-29 16:00:23 +02:00
virtgpu_vram.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00