linux/drivers/gpu/drm
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
..
adp drm: adp: Fix NULL vs IS_ERR() check in adp_plane_new() 2025-03-14 09:42:11 -04:00
amd A set of final cleanups for the timer subsystem: 2025-04-06 08:35:37 -07:00
arm Merge drm/drm-next into drm-misc-next 2025-02-18 07:43:43 +01:00
armada
aspeed drm/aspeed: move to devm_platform_ioremap_resource() usage 2025-02-26 15:27:06 +01:00
ast drm/ast: cursor: Move implementation to separate source file 2025-02-20 08:38:34 +01:00
atmel-hlcdc
bridge A set of final cleanups for the timer subsystem: 2025-04-06 08:35:37 -07:00
ci drm/ci: update expectation files 2025-02-05 10:10:51 -03:00
clients printk: Rename console_start to console_resume 2025-03-11 12:51:21 +01:00
display drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
etnaviv drm/sched: Use struct for drm_sched_init() params 2025-02-12 11:59:52 +01:00
exynos treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
fsl-dcu
gma500 drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
gud treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hisilicon drm/hisilicon/hibmc: select CONFIG_DRM_DISPLAY_DP_HELPER 2025-02-09 03:56:34 +02:00
hyperv drm/hyperv: Fix address space leak when Hyper-V DRM device is removed 2025-03-09 23:46:56 +00:00
i915 drm/i915/gvt: fix unterminated-string-initialization warning 2025-04-07 11:00:08 +03:00
imagination Linux 6.14-rc6 2025-03-12 09:43:12 +10:00
imx
ingenic drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
kmb
lib
lima Driver core updates for 6.15-rc1 2025-04-01 11:02:03 -07:00
logicvc
loongson drm/atomic: Let drivers decide which planes to async flip 2025-02-14 00:54:29 +02:00
mcde
mediatek treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
meson drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
mgag200 drm/mgag200: Added support for the new device G200eH5 2025-02-11 10:53:53 +01:00
msm treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mxsfb
nouveau - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
omapdrm treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
panel drm/panel: fix Visionox RM692E5 dependencies 2025-03-05 19:52:02 +01:00
panfrost drm/sched: Use struct for drm_sched_init() params 2025-02-12 11:59:52 +01:00
panthor drm/panthor: Clean up FW version information display 2025-03-05 14:15:04 +00:00
pl111
qxl
radeon drm/radeon/uvd: Replace nested max() with single max3() 2025-03-19 15:51:40 -04:00
renesas drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
rockchip drm/rockchip: lvds: lower log severity for missing pinctrl settings 2025-03-04 16:59:58 +01:00
scheduler drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
solomon
sprd
sti
stm drm/stm: move to devm_platform_ioremap_resource() usage 2025-02-26 15:27:07 +01:00
sun4i
tegra drm/atomic: Let drivers decide which planes to async flip 2025-02-14 00:54:29 +02:00
tests drm/format-helper: Add conversion from XRGB8888 to BGR888 2025-03-03 16:13:33 +01:00
tidss
tilcdc
tiny Short summary of fixes pull: 2025-03-24 17:52:28 +10:00
ttm drm/ttm: Add helpers for shrinking 2025-03-05 17:08:59 +01:00
tve200
udl
v3d drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
vboxvideo drm/vboxvideo: Remove unused hgsmi_cursor_position 2025-02-28 09:05:10 +01:00
vc4 treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
vgem treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
virtio drm/virtio: Add drm_panic support 2025-02-09 20:36:51 +03:00
vkms drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
vmwgfx These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
xe A set of final cleanups for the timer subsystem: 2025-04-06 08:35:37 -07:00
xen
xlnx drm/bridge: Pass full state to atomic_disable 2025-02-19 16:59:12 +01:00
drm_atomic_helper.c drm/atomic-helper: Add a note in drm_atomic_helper_reset_crtc() kernel-doc 2025-02-21 10:57:21 +01:00
drm_atomic_state_helper.c
drm_atomic_uapi.c drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
drm_atomic.c
drm_auth.c
drm_blend.c
drm_bridge.c drm/bridge: Change parameter name of drm_atomic_bridge_chain_enable() 2025-02-19 16:59:20 +01:00
drm_buddy.c
drm_cache.c
drm_client_event.c drm/client: Send pending hotplug events after resume 2025-03-05 21:48:49 +01:00
drm_client_modeset.c
drm_client.c
drm_color_mgmt.c
drm_connector.c drm/atomic: Filter out redundant DPMS calls 2025-03-10 18:18:37 +02:00
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c
drm_damage_helper.c drm/damage-helper: add const qualifier in drm_atomic_helper_damage_merged() 2025-03-03 14:45:40 +02:00
drm_debugfs_crc.c
drm_debugfs.c drm/debugfs: fix printk format for bridge index 2025-02-17 14:17:53 +01:00
drm_displayid_internal.h
drm_displayid.c
drm_draw_internal.h
drm_draw.c drm/draw: include missing headers 2025-03-01 21:00:22 +01:00
drm_drv.c drm: Introduce device wedged event 2025-02-13 12:15:43 -05:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c
drm_eld.c
drm_encoder.c
drm_exec.c
drm_fb_dma_helper.c drm/fb-dma-helper: Test for imported buffers with drm_gem_is_imported() 2025-03-06 08:59:17 +01:00
drm_fb_helper.c drm/fb-helper: Remove struct drm_fb_helper.fb_probe 2025-03-05 21:48:50 +01:00
drm_fbdev_dma.c drm/fbdev-dma: Add shadow buffering for deferred I/O 2025-02-27 09:37:55 +01:00
drm_fbdev_shmem.c
drm_fbdev_ttm.c
drm_file.c drm/file: Add fdinfo helper for printing regions with prefix 2025-02-07 15:23:36 +01:00
drm_flip_work.c
drm_format_helper.c drm/format-helper: Add conversion from XRGB8888 to BGR888 2025-03-03 16:13:33 +01:00
drm_fourcc.c
drm_framebuffer.c
drm_gem_atomic_helper.c
drm_gem_dma_helper.c drm/gem-dma: Use dma_buf from GEM object instance 2025-03-06 08:59:01 +01:00
drm_gem_framebuffer_helper.c drm/gem-framebuffer: Use dma_buf from GEM object instance 2025-03-06 08:59:14 +01:00
drm_gem_shmem_helper.c drm/gem-shmem: Use dma_buf from GEM object instance 2025-03-06 08:59:07 +01:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_gem.c drm/gem: Test for imported GEM buffers with helper 2025-03-06 08:58:27 +01:00
drm_gpusvm.c - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
drm_gpuvm.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_kms_helper_common.c
drm_lease.c
drm_managed.c
drm_mipi_dbi.c drm/mipi-dbi: Test for imported buffers with drm_gem_is_imported() 2025-03-06 08:59:20 +01:00
drm_mipi_dsi.c drm/mipi-dsi: stop passing non struct drm_device to drm_err() and friends 2025-03-04 17:00:24 +02:00
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c drm: of: drm_of_find_panel_or_bridge: move misplaced comment 2025-02-17 14:17:55 +01:00
drm_panel_backlight_quirks.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for OneXPlayer Mini (Intel) 2025-02-17 09:19:07 +01:00
drm_panel.c drm/bridge: panel: forbid initializing a panel with unknown connector type 2025-02-17 14:17:59 +01:00
drm_panic_qr.rs Rust changes for v6.15 2025-03-30 17:03:26 -07:00
drm_panic.c Rust changes for v6.15 2025-03-30 17:03:26 -07:00
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c drm/prime: Use dma_buf from GEM object instance 2025-03-06 08:59:36 +01:00
drm_print.c
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c
drm_sysfs.c drm/sysfs: Constify 'struct bin_attribute' 2025-02-21 09:20:31 +01:00
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
drm_vma_manager.c
drm_writeback.c drm: writeback: Fix kernel doc name 2025-02-20 15:02:09 +01:00
Kconfig drm for 6.15-rc1 2025-03-28 17:44:52 -07:00
Makefile UAPI Changes: 2025-03-11 10:26:17 +10:00