linux-imx/drivers/gpu/drm/i915
Nikita Zhandarovich 86238603c8 drm/i915/guc: prevent a possible int overflow in wq offsets
[ Upstream commit d3d37f7468 ]

It may be possible for the sum of the values derived from
i915_ggtt_offset() and __get_parent_scratch_offset()/
i915_ggtt_offset() to go over the u32 limit before being assigned
to wq offsets of u64 type.

Mitigate these issues by expanding one of the right operands
to u64 to avoid any overflow issues just in case.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: c2aa552ff0 ("drm/i915/guc: Add multi-lrc context registration")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Link: https://patchwork.freedesktop.org/patch/msgid/20240725155925.14707-1-n.zhandarovich@fintech.ru
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(cherry picked from commit 1f1c1bd56620b80ae407c5790743e17caad69cec)
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-18 19:24:10 +02:00
..
display drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll() 2024-08-11 12:47:26 +02:00
gem drm/i915/gem: Adjust vma offset for framebuffer mmap offset 2024-08-14 13:58:53 +02:00
gt drm/i915/guc: prevent a possible int overflow in wq offsets 2024-09-18 19:24:10 +02:00
gvt i915: make inject_virtual_interrupt() void 2024-06-12 11:12:22 +02:00
pxp drm/i915: Make i915_coherent_map_type GT-centric 2023-08-10 14:14:11 +02:00
selftests drm/i915/selftests: Fix engine reset count storage for multi-tile 2023-12-20 17:01:54 +01:00
soc drm/i915/jsl: s/JSL/JASPERLAKE for platform/subplatform defines 2023-08-07 15:37:06 -07:00
.gitignore
i915_active_types.h
i915_active.c drm/i915: Fix premature release of request's reusable memory 2023-08-01 10:56:34 +01:00
i915_active.h drm/i915/active: fix kernel-doc for function parameters 2023-05-04 12:11:56 +03:00
i915_cmd_parser.c
i915_cmd_parser.h
i915_config.c
i915_config.h
i915_debugfs_params.c
i915_debugfs_params.h
i915_debugfs.c drm/i915: Replace several IS_METEORLAKE with proper IP version checks 2024-04-10 16:35:45 +02:00
i915_debugfs.h
i915_deps.c
i915_deps.h
i915_driver.c drm/i915: do not clean GT table on error path 2023-12-03 07:33:03 +01:00
i915_driver.h
i915_drm_client.c drm/i915: Use the fdinfo helper 2023-06-06 10:01:06 +01:00
i915_drm_client.h drm/i915: make i915_drm_client_fdinfo() reference conditional again 2023-06-20 08:54:43 +01:00
i915_drv.h drm/i915: Eliminate IS_MTL_GRAPHICS_STEP 2024-04-10 16:35:45 +02:00
i915_file_private.h drm/i915: Use i915 instead of dev_priv insied the file_priv structure 2023-03-23 01:53:44 +01:00
i915_fixed.h
i915_gem_evict.c
i915_gem_evict.h
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem_ww.c
i915_gem_ww.h
i915_gem.c drm/i915: Register engines early to avoid type confusion 2023-10-04 09:00:34 -04:00
i915_gem.h
i915_getparam.c drm/i915/mtl/huc: Use the media gt for the HuC getparam 2023-06-05 09:53:51 -07:00
i915_getparam.h
i915_gpu_error.c Merge tag 'drm-intel-gt-next-2023-08-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-08-07 13:49:25 +10:00
i915_gpu_error.h drm/i915: Use internal class when counting engine resets 2023-12-20 17:01:54 +01:00
i915_hwmon.c drm/i915/hwmon: Get rid of devm 2024-06-16 13:47:30 +02:00
i915_hwmon.h drm/i915/guc: Disable PL1 power limit when loading GuC firmware 2023-04-26 18:02:40 -04:00
i915_ioc32.c
i915_ioc32.h
i915_ioctl.c
i915_ioctl.h
i915_iosf_mbi.h
i915_irq.c drm/i915/irq: move all PCH irq postinstall calls to display code 2023-08-10 15:14:58 +03:00
i915_irq.h drm/i915/irq: split out display irq handling 2023-05-16 10:31:27 +03:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c
i915_mm.h
i915_module.c
i915_params.c drm/i915: Add i915.enable_sagv modparam 2023-03-25 00:16:36 +02:00
i915_params.h drm/i915: Add i915.enable_sagv modparam 2023-03-25 00:16:36 +02:00
i915_pci.c Revert "drm/i915: use localized __diag_ignore_all() instead of per file" 2023-07-17 13:39:04 +01:00
i915_pci.h
i915_perf_oa_regs.h drm/i915/mtl: Implement Wa_14019141245 2023-04-26 15:56:46 -07:00
i915_perf_types.h i915/perf: Drop the aging_tail logic in perf OA 2023-06-07 12:54:59 -07:00
i915_perf.c i915/perf: Remove code to update PWR_CLK_STATE for gen12 2024-08-11 12:47:20 +02:00
i915_perf.h drm/i915/perf: Pass i915 object to perf revision helper 2023-03-24 08:50:16 -07:00
i915_pmu.c drm/i915/pmu: Check if pmu is closed before stopping event 2023-10-25 08:44:30 -04:00
i915_pmu.h drm/i915: rename I915_PMU_MAX_GTS to I915_PMU_MAX_GT 2023-06-06 09:23:47 -07:00
i915_priolist_types.h
i915_pvinfo.h
i915_query.c
i915_query.h
i915_reg_defs.h drm/i915: Add 16bit register/mask operators 2023-05-19 10:02:34 -07:00
i915_reg.h Merge tag 'drm-intel-gt-next-2023-08-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-08-07 13:49:25 +10:00
i915_request.c drm/i915: mark requests for GuC virtual engines to avoid use-after-free 2023-08-30 11:32:48 -04:00
i915_request.h drm/i915/request: drop kernel-doc 2023-05-04 12:11:29 +03:00
i915_scatterlist.c Merge tag 'drm-intel-gt-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-04-06 14:21:00 +02:00
i915_scatterlist.h drm/i915/scatterlist: fix kernel-doc 2023-05-05 11:28:43 +03:00
i915_scheduler_types.h
i915_scheduler.c
i915_scheduler.h
i915_selftest.h
i915_suspend.c
i915_suspend.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_sw_fence.c drm/i915/fence: Mark debug_fence_free() with __maybe_unused 2024-09-12 11:11:44 +02:00
i915_sw_fence.h
i915_switcheroo.c
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915: remove unnecessary intel_pm.h includes 2023-03-06 18:26:30 +02:00
i915_sysfs.h
i915_tasklet.h
i915_trace_points.c
i915_trace.h drm/i915: use direct alias for i915 in requests 2023-07-24 17:24:35 +02:00
i915_ttm_buddy_manager.c drm/i915/ttm: remove the virtualized start hack 2023-02-24 11:39:15 +00:00
i915_ttm_buddy_manager.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c
i915_utils.h drm/i915/utils: drop kernel-doc from __wait_for() 2023-05-04 12:11:21 +03:00
i915_vgpu.c
i915_vgpu.h
i915_vma_resource.c
i915_vma_resource.h drm/i915/vma: fix struct i915_vma_bindinfo kernel-doc 2023-05-05 11:28:09 +03:00
i915_vma_types.h drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_vma.c drm/i915/vma: Fix UAF on destroy against retire race 2024-04-27 17:11:30 +02:00
i915_vma.h drm/i915/fbc: Moved fence related code away from intel_fbc 2023-08-07 08:28:28 +03:00
intel_clock_gating.c drm/i915/dg2: Drop pre-production GT workarounds 2024-04-10 16:35:44 +02:00
intel_clock_gating.h drm/i915: rename intel_pm.[ch] to intel_clock_gating.[ch] 2023-04-05 19:54:13 +03:00
intel_device_info.c drm/i915: make device info a const pointer to rodata 2023-06-29 16:28:14 +03:00
intel_device_info.h drm/i915: move display device and runtime info to struct intel_display 2023-06-29 16:28:14 +03:00
intel_gvt_mmio_table.c drm/i915/psr: split out PSR regs to a separate file 2023-04-04 10:05:38 +03:00
intel_gvt.c
intel_gvt.h
intel_mchbar_regs.h
intel_memory_region.c
intel_memory_region.h
intel_pci_config.h
intel_pcode.c
intel_pcode.h
intel_region_ttm.c drm/i915/intel_region_ttm: Provide missing description for 'offset' param 2023-04-03 17:48:39 +03:00
intel_region_ttm.h
intel_runtime_pm.c drm/i915: use pointer to i915 instead of rpm in wakeref 2023-06-10 06:32:58 +03:00
intel_runtime_pm.h drm/i915: Remove i915_drm_suspend_mode 2023-06-02 20:25:00 +03:00
intel_sbi.c
intel_sbi.h
intel_step.c drm/i915/adls: s/ADLS_RPLS/RAPTORLAKE_S in platform and subplatform defines 2023-08-07 15:37:13 -07:00
intel_step.h
intel_uncore.c drm/i915/uncore: fix race around i915->params.mmio_debug 2023-08-01 19:39:17 +03:00
intel_uncore.h drm/i915/uncore: add intel_uncore_regs() helper 2023-07-04 17:12:48 +03:00
intel_wakeref.c drm/i915: add a dedicated workqueue inside drm_i915_private 2023-06-10 06:33:11 +03:00
intel_wakeref.h drm/i915: use pointer to i915 instead of rpm in wakeref 2023-06-10 06:32:58 +03:00
Kconfig fbdev: Use _IOMEM_ infix for I/O-memory helpers 2023-07-31 20:06:52 +02:00
Kconfig.debug drm/i915/guc: Track all sent actions to GuC 2023-05-30 15:18:21 -07:00
Kconfig.profile
Makefile drm/i915/gt: Enable only one CCS for compute workload 2024-04-10 16:36:06 +02:00
TODO.txt
vlv_sideband_reg.h
vlv_sideband.c
vlv_sideband.h
vlv_suspend.c drm/i915: rename intel_pm.[ch] to intel_clock_gating.[ch] 2023-04-05 19:54:13 +03:00
vlv_suspend.h