TencentOS-kernel/drivers/gpu/drm
Takashi Iwai c62cdea5fe drm/i915: Fix invalid access to ACPI _DSM objects
commit b6a37a93c9ac3900987c79b726d0bb3699d8db4e upstream.

intel_dsm_platform_mux_info() tries to parse the ACPI package data
from _DSM for the debug information, but it assumes the fixed format
without checking what values are stored in the elements actually.
When an unexpected value is returned from BIOS, it may lead to GPF or
NULL dereference, as reported recently.

Add the checks of the contents in the returned values and skip the
values for invalid cases.

v1->v2: Check the info contents before dereferencing, too

BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=1184074
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210402082317.871-1-tiwai@suse.de
(cherry picked from commit 337d7a1621c7f02af867229990ac67c97da1b53a)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-20 16:06:55 +08:00
..
amd drm/amdgpu: check alignment on CPU page for bo map 2021-05-20 16:06:50 +08:00
arc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arm drm/arm: fix unintentional integer overflow on left shift 2021-03-16 16:33:29 +08:00
armada Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
aspeed drm/aspeed: Fix Kconfig warning & subsequent build errors 2021-03-16 16:42:35 +08:00
ast Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
atmel-hlcdc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
bochs drm/drm_fb_helper: fix fbdev with sparc64 2021-03-16 16:33:06 +08:00
bridge drm/bridge/synopsys: dsi: add support for non-continuous HS clock 2021-03-16 16:39:45 +08:00
cirrus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
etnaviv drm/etnaviv: fix TS cache flushing on GPUs with BLT engine 2021-03-16 16:35:21 +08:00
exynos drm/exynos: dsi: Remove bridge node reference in error handling path in probe function 2021-03-16 16:37:18 +08:00
fsl-dcu Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
gma500 gma500: clean up error handling in init 2021-04-12 12:52:17 +08:00
hisilicon drm/hisilicon: Fix use-after-free 2021-04-12 12:52:47 +08:00
i2c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
i810 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
i915 drm/i915: Fix invalid access to ACPI _DSM objects 2021-05-20 16:06:55 +08:00
imx drm/imx: imx-ldb: Disable both channels for split mode in enc->disable() 2021-03-16 16:34:10 +08:00
ingenic drm/ingenic: Fix incorrect assumption about plane->index 2021-03-16 16:34:57 +08:00
lib Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
lima Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mcde drm/mcde: Fix handling of platform_get_irq() error 2021-03-16 16:42:35 +08:00
mediatek drm/mediatek: avoid dereferencing a null hdmi_phy on an error message 2021-03-16 16:43:07 +08:00
meson drm: meson_drv add shutdown function 2021-04-12 12:53:00 +08:00
mga Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mgag200 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
msm drm/msm: Ratelimit invalid-fence message 2021-05-20 16:06:53 +08:00
mxsfb drm: mxsfb: check framebuffer pitch 2021-03-16 16:38:39 +08:00
nouveau drm/nouveau/kms: handle mDP connectors 2021-04-12 12:52:34 +08:00
omapdrm drm/omap: dmm_tiler: fix return error code in omap_dmm_probe() 2021-03-16 16:42:47 +08:00
panel drm: panel: Fix bpc for OrtusTech COM43H4M85ULC panel 2021-03-16 16:38:35 +08:00
panfrost drm/panfrost: Fix a deadlock between the shrinker and madvise path 2021-03-16 16:40:30 +08:00
pl111 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
qxl qxl: Fix uninitialised struct field head.surface_id 2021-04-12 12:53:01 +08:00
r128 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
radeon PCI: Use ioremap(), not phys_to_virt() for platform ROM 2021-03-16 16:37:08 +08:00
rcar-du drm: rcar-du: Fix build error 2021-03-16 16:31:11 +08:00
rockchip drm/bridge: analogix_dp: Split bind() into probe() and real bind() 2021-03-16 16:27:24 +08:00
savage Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
scheduler drm/sched: Cancel and flush all outstanding jobs before finish. 2021-04-12 12:52:34 +08:00
selftests Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
shmobile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sis Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sti Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
stm drm/stm: repair runtime power management 2021-03-16 16:33:33 +08:00
sun4i drm/sun4i: tcon: fix inverted DCLK polarity 2021-04-12 12:52:19 +08:00
tdfx Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tegra drm/tegra: sor: Disable clocks on error in tegra_sor_init() 2021-03-16 16:42:29 +08:00
tilcdc drm/tilcdc: fix leak & null ref in panel_connector_get_modes 2021-03-16 16:33:19 +08:00
tiny Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ttm drm/ttm: fix eviction valuable range check. 2021-03-16 16:40:12 +08:00
tve200 drm/tve200: Fix handling of platform_get_irq() error 2021-03-16 16:42:35 +08:00
udl Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
v3d Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vboxvideo Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vc4 drm/vc4: hvs: Fix buffer overflow with the dlist handling 2021-04-12 12:52:03 +08:00
vgem drm/vgem: Replace opencoded version of drm_gem_dumb_map_offset() 2021-03-16 16:34:25 +08:00
via Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virtio drm/virtio: use kvmalloc for large allocations 2021-04-12 12:52:45 +08:00
vkms drm/vkms: fix xrgb on compute crc 2021-03-16 16:38:30 +08:00
vmwgfx drm/vmwgfx: Fix two list_for_each loop exit tests 2021-03-16 16:34:20 +08:00
xen drm/xen-front: Fix misused IS_ERR_OR_NULL checks 2021-03-16 16:34:56 +08:00
zte Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig drm/radeon: fix AGP dependency 2021-04-12 12:53:24 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ati_pcigart.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_agpsupport.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_atomic.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_atomic_helper.c drm/atomic: put state on error path 2021-04-12 12:51:33 +08:00
drm_atomic_state_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_atomic_uapi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_auth.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_blend.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_bridge.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_bufs.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_cache.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_client.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_client_modeset.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_color_mgmt.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_connector.c drm/connector: notify userspace on hotplug after register complete 2021-03-16 16:30:42 +08:00
drm_context.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_crtc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_crtc_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_crtc_helper_internal.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_crtc_internal.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_damage_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_debugfs.c drm/debugfs: fix plain echo to connector "force" attribute 2021-03-16 16:33:23 +08:00
drm_debugfs_crc.c drm/crc-debugfs: Fix memleak in crc_control_write 2021-03-16 16:38:35 +08:00
drm_dma.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_dp_aux_dev.c drm/dp_aux_dev: check aux_dev before use in drm_dp_aux_dev_get_by_minor() 2021-03-16 16:43:37 +08:00
drm_dp_cec.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_dp_dual_mode_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_dp_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_dp_mst_topology.c drm: fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi 2021-03-16 16:34:23 +08:00
drm_drv.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_dsc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_dumb_buffers.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_edid.c drm/edid: Add Oculus Rift S to non-desktop list 2021-03-16 16:28:47 +08:00
drm_edid_load.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_encoder.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_encoder_slave.c drm: encoder_slave: fix refcouting error for modules 2021-03-16 16:30:39 +08:00
drm_fb_cma_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_fb_helper.c drm/fb-helper: Add missed unlocks in setcmap_legacy() 2021-04-12 12:52:17 +08:00
drm_file.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_flip_work.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_format_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_fourcc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_framebuffer.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_gem.c drm/gem: Fix a leak in drm_gem_objects_lookup() 2021-03-16 16:33:27 +08:00
drm_gem_cma_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_gem_framebuffer_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_gem_shmem_helper.c drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff 2021-04-12 12:53:00 +08:00
drm_gem_vram_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_hashtab.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_hdcp.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_internal.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_ioc32.c drm/compat: Clear bounce structures 2021-04-12 12:53:00 +08:00
drm_ioctl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_irq.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_kms_helper_common.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_lease.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_legacy.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_legacy_misc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_lock.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_memory.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_mipi_dbi.c drm/dbi: Fix SPI Type 1 (9-bit) transfer 2021-03-16 16:32:48 +08:00
drm_mipi_dsi.c drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline 2021-03-16 16:33:31 +08:00
drm_mm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_mode_config.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_mode_object.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_modes.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_modeset_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_modeset_lock.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_of.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_panel.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_panel_orientation_quirks.c drm: Added orientation quirk for ASUS tablet model T103HAF 2021-03-16 16:34:23 +08:00
drm_pci.c drm: Remove PageReserved manipulation from drm_pci_alloc 2021-03-16 16:26:13 +08:00
drm_plane.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_plane_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_prime.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_print.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_probe_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_property.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_rect.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_scatter.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_scdc_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_self_refresh_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_simple_kms_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_syncobj.c drm/syncobj: Fix use-after-free 2021-04-12 12:51:33 +08:00
drm_sysfs.c drm/connector: notify userspace on hotplug after register complete 2021-03-16 16:30:42 +08:00
drm_trace.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_trace_points.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_vblank.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_vm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_vma_manager.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_vram_helper_common.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_vram_mm_helper.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drm_writeback.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00