linux/drivers/gpu
Jani Nikula 2e43ae7dd7 drm/i915/gvt: fix unterminated-string-initialization warning
Initializing const char opregion_signature[16] = OPREGION_SIGNATURE
(which is "IntelGraphicsMem") drops the NUL termination of the
string. This is intentional, but the compiler doesn't know this.

Switch to initializing header->signature directly from the string
litaral, with sizeof destination rather than source. We don't treat the
signature as a string other than for initialization; it's really just a
blob of binary data.

Add a static assert for good measure to cross-check the sizes.

Reported-by: Kees Cook <kees@kernel.org>
Closes: https://lore.kernel.org/r/20250310222355.work.417-kees@kernel.org
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13934
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Tested-by: Damian Tometzki <damian@riscv-rocks.de>
Cc: stable@vger.kernel.org
Reviewed-by: Zhenyu Wang <zhenyuw.linux@gmail.com>
Link: https://lore.kernel.org/r/20250327124739.2609656-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 4f82074690)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-04-07 11:00:08 +03:00
..
drm drm/i915/gvt: fix unterminated-string-initialization warning 2025-04-07 11:00:08 +03:00
host1x drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
ipu-v3 gpu: ipu-v3 ipu-cpmem: Remove unused functions 2025-03-01 11:29:03 +02:00
nova-core Driver core updates for 6.15-rc1 2025-04-01 11:02:03 -07:00
trace
vga
Makefile gpu: nova-core: add initial driver stub 2025-03-09 19:24:27 +01:00