linux/drivers/accel/ivpu
Dawid Osuchowski 95bf070f32 accel/ivpu: Limit firmware log name prints to field size
The name in struct vpu_tracing_buffer_header is a fixed-size array
populated by the NPU firmware. It is expected to be NUL-terminated,
but nothing on the host side enforces this, so printing it with an
unbounded string conversion would read past the field if the
terminator is ever missing and expose adjacent bytes of the shared
tracing BO through dmesg and the debugfs FW log output.

Print at most as many characters as the name field holds, so the output
never runs past it even if the string is not NUL-terminated.

Cc: stable@vger.kernel.org
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260827102339.281799-1-dawid.osuchowski@linux.intel.com?part=2
Fixes: d4e4257afa ("accel/ivpu: Add firmware tracing support")
Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://patch.msgid.link/20260901125749.404338-4-dawid.osuchowski@linux.intel.com
2026-09-07 08:08:36 +02:00
..
ivpu_coredump.c accel/ivpu: Add coredump support 2024-10-11 12:44:38 +02:00
ivpu_coredump.h accel/ivpu: Add coredump support 2024-10-11 12:44:38 +02:00
ivpu_debugfs.c accel/ivpu: prevent uninitialized data bug in debugfs 2026-05-26 08:04:07 +02:00
ivpu_debugfs.h accel/ivpu: Compile ivpu_debugfs.c conditionally 2023-09-27 13:11:51 +02:00
ivpu_drv.c accel/ivpu: Drop IRQF_ONESHOT to allow IPC IRQ threading on PREEMPT_RT 2026-06-17 11:34:40 +02:00
ivpu_drv.h accel/ivpu: Use threaded IRQ for IPC callback processing 2026-06-15 08:38:13 +02:00
ivpu_fw_log.c accel/ivpu: Limit firmware log name prints to field size 2026-09-07 08:08:36 +02:00
ivpu_fw_log.h accel/ivpu: Add coredump support 2024-10-11 12:44:38 +02:00
ivpu_fw.c accel/ivpu: Remove unnecessary min_t()/max_t() usage 2026-07-17 10:16:08 +02:00
ivpu_fw.h accel/ivpu: Implement warm boot flow for NPU6 and unify boot handling 2026-01-08 11:49:37 +01:00
ivpu_gem_userptr.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ivpu_gem.c accel/ivpu: Apply minor code style cleanups to align with kernel style 2026-03-11 13:31:08 +01:00
ivpu_gem.h accel/ivpu: Validate full buffer range in ivpu_to_cpu_addr 2026-09-07 08:08:34 +02:00
ivpu_hw_37xx_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_40xx_reg.h accel/ivpu: Remove boot params address setting via MMIO register 2026-03-10 13:34:31 +01:00
ivpu_hw_btrs_lnl_reg.h accel/ivpu: Wait for CDYN de-assertion during power down sequence 2025-10-30 16:58:20 +01:00
ivpu_hw_btrs_mtl_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_btrs.c accel/ivpu: Fix wrong register read in LNL failure diagnostics 2026-07-13 10:29:08 +02:00
ivpu_hw_btrs.h accel/ivpu: Add support for limiting NPU frequency 2026-04-29 09:41:59 +02:00
ivpu_hw_ip.c accel/ivpu: Fix swapped register names in pwr_island_drive functions 2026-04-23 10:00:35 +02:00
ivpu_hw_ip.h accel/ivpu: Implement warm boot flow for NPU6 and unify boot handling 2026-01-08 11:49:37 +01:00
ivpu_hw_reg_io.h accel/ivpu: Add support for hardware fault injection 2025-02-03 10:39:45 +01:00
ivpu_hw.c accel/ivpu: Use threaded IRQ for IPC callback processing 2026-06-15 08:38:13 +02:00
ivpu_hw.h accel/ivpu: Add support for limiting NPU frequency 2026-04-29 09:41:59 +02:00
ivpu_ipc.c accel/ivpu: Validate full buffer range in ivpu_to_cpu_addr 2026-09-07 08:08:34 +02:00
ivpu_ipc.h accel/ivpu: use kmem_cache for IPC rx_msg allocations 2026-06-15 08:38:54 +02:00
ivpu_job.c Merge drm/drm-next into drm-misc-next 2026-06-30 10:16:00 +02:00
ivpu_job.h accel/ivpu: Use threaded IRQ for IPC callback processing 2026-06-15 08:38:13 +02:00
ivpu_jsm_msg.c accel/ivpu: Remove disable_d0i3_msg workaround 2026-05-28 07:53:02 +02:00
ivpu_jsm_msg.h accel/ivpu: Add support for limiting NPU frequency 2026-04-29 09:41:59 +02:00
ivpu_mmu_context.c accel/ivpu: Remove unnecessary min_t()/max_t() usage 2026-07-17 10:16:08 +02:00
ivpu_mmu_context.h accel/ivpu: Validate scatter-gather size against buffer size 2025-12-16 08:10:19 +01:00
ivpu_mmu.c accel/ivpu: Perform engine reset instead of device recovery on TDR 2026-03-20 08:03:11 +01:00
ivpu_mmu.h accel/ivpu: Move parts of MMU event IRQ handling to thread handler 2025-01-09 09:35:44 +01:00
ivpu_ms.c accel/ivpu: Add buffer overflow check in MS get_info_ioctl 2026-06-02 07:47:50 +02:00
ivpu_ms.h accel/ivpu: Add NPU profiling support 2024-05-15 07:42:23 +02:00
ivpu_pm.c accel/ivpu: Trigger recovery on TDR with OS scheduling 2026-04-02 21:29:01 +02:00
ivpu_pm.h accel/ivpu: Perform engine reset instead of device recovery on TDR 2026-03-20 08:03:11 +01:00
ivpu_sysfs.c accel/ivpu: Add support for limiting NPU frequency 2026-04-29 09:41:59 +02:00
ivpu_sysfs.h accel/ivpu: Share NPU busy time in sysfs 2024-05-15 07:42:29 +02:00
ivpu_trace_points.c accel/ivpu: Add tracing for IPC/PM/JOB 2024-10-11 12:44:39 +02:00
ivpu_trace.h accel/ivpu: Add tracing for IPC/PM/JOB 2024-10-11 12:44:39 +02:00
Kconfig accel/ivpu: Add debug Kconfig option 2024-10-30 10:23:49 +01:00
Makefile accel/ivpu: Add support for userptr buffer objects 2025-10-30 08:52:51 +01:00
vpu_boot_api.h accel/ivpu: Remove disable_d0i3_msg workaround 2026-05-28 07:53:02 +02:00
vpu_jsm_api.h accel/ivpu: Add support for limiting NPU frequency 2026-04-29 09:41:59 +02:00