linux/drivers/accel/ivpu
Kees Cook 5e6a1c803f accel/ivpu: Annotate struct ivpu_job 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 ivpu_job.

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

Cc: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Cc: Oded Gabbay <ogabbay@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Tom Rix <trix@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: llvm@lists.linux.dev
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://lore.kernel.org/r/20230922175416.work.272-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2023-09-28 16:39:08 -07:00
..
ivpu_debugfs.c accel/ivpu: Add fw_name file to debugfs 2023-07-07 09:33:28 +02:00
ivpu_debugfs.h accel/ivpu: Initial debugfs support 2023-07-07 09:33:13 +02:00
ivpu_drv.c accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
ivpu_drv.h accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
ivpu_fw_log.c accel/ivpu: Add firmware tracing support 2023-07-07 09:33:20 +02:00
ivpu_fw_log.h accel/ivpu: Add firmware tracing support 2023-07-07 09:33:20 +02:00
ivpu_fw.c accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
ivpu_fw.h accel/ivpu: Print firmware name and version 2023-07-07 09:33:26 +02:00
ivpu_gem.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
ivpu_gem.h
ivpu_hw_37xx_reg.h accel/ivpu: Use generation based function and registers names 2023-08-09 13:42:16 +02:00
ivpu_hw_37xx.c accel/ivpu: Refactor memory ranges logic 2023-08-09 13:52:15 +02:00
ivpu_hw_40xx_reg.h accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
ivpu_hw_40xx.c accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
ivpu_hw_reg_io.h
ivpu_hw.h accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
ivpu_ipc.c accel/ivpu: Do not use mutex_lock_interruptible 2023-06-08 08:15:46 +02:00
ivpu_ipc.h accel/ivpu: Fix IPC buffer header status field value 2023-03-24 10:52:20 +01:00
ivpu_job.c Merge drm/drm-next into drm-misc-next 2023-06-19 16:33:14 +02:00
ivpu_job.h accel/ivpu: Annotate struct ivpu_job with __counted_by 2023-09-28 16:39:08 -07:00
ivpu_jsm_msg.c accel/ivpu: refactor deprecated strncpy 2023-08-25 11:09:40 +02:00
ivpu_jsm_msg.h
ivpu_mmu_context.c accel/ivpu: Refactor memory ranges logic 2023-08-09 13:52:15 +02:00
ivpu_mmu_context.h accel/ivpu: Rename and cleanup MMU600 page tables 2023-06-08 07:53:51 +02:00
ivpu_mmu.c accel/ivpu: Use generation based function and registers names 2023-08-09 13:42:16 +02:00
ivpu_mmu.h
ivpu_pm.c accel/ivpu: Add debugfs files for testing device reset 2023-07-07 09:33:23 +02:00
ivpu_pm.h accel/ivpu: Add debugfs files for testing device reset 2023-07-07 09:33:23 +02:00
Kconfig accel/ivpu: ivpu_ipc needs GENERIC_ALLOCATOR 2023-06-06 14:19:53 +02:00
Makefile accel/ivpu: Add initial support for VPU 4 2023-08-09 13:55:21 +02:00
TODO
vpu_boot_api.h
vpu_jsm_api.h