aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorJani Nikula <[email protected]>2025-03-27 12:47:39 +0000
committerJani Nikula <[email protected]>2025-04-07 08:00:08 +0000
commit2e43ae7dd71cd9bb0d1bce1d3306bf77523feb81 (patch)
treeab30ef8daa76df76628ebea733c6e1904710c371 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentdrm/i915: Disable RPG during live selftest (diff)
downloadkernel-2e43ae7dd71cd9bb0d1bce1d3306bf77523feb81.tar.gz
kernel-2e43ae7dd71cd9bb0d1bce1d3306bf77523feb81.zip
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 <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13934 Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Damian Tometzki <[email protected]> Cc: [email protected] Reviewed-by: Zhenyu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jani Nikula <[email protected]> (cherry picked from commit 4f8207469094bd04aad952258ceb9ff4c77b6bfa) Signed-off-by: Jani Nikula <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions