mirror-linux/drivers/gpu/drm/i915
Joonas Lahtinen a13edf9b92 drm/i915/gem: Drop check for changed VM in EXECBUF
Since the introduction of d4433c7600 ("drm/i915/gem: Use the proto-context
to handle create parameters (v5)") it has not been possible for VM to change
after context creation so the check will never fail.

Sima's analysis:

  This check was added in f7ce8639f6 ("drm/i915/gem: Split the context's
  obj:vma lut into its own mutex") but without any hint in the commit
  message as to why. In another hunk of that commit there's a hint though in
  __eb_add_lut:

          /* user racing with ctx set-vm */

  This would mean that this bug was introduced in e0695db729 ("drm/i915:
  Create/destroy VM (ppGTT) for use with contexts"), which allowed to change
  the gem_ctx->vm at runtime, opening up the race that was partially fixed
  in the earlier referenced commit about a year later.

  But it cannot be exploited anymore in anything remotely recent because
  with the introduction of proto-contexts we've made gem_ctx->vm invariant
  again, exactly to preemptively close all these potential issues.
  Specifically d4433c7600 ("drm/i915/gem: Use the proto-context to handle
  create parameters (v5)") is the vm specific part of the proto-context
  work.

v3:
- Include Sima's analysis and WARN_ON_ONCE

v4:
- Focus only on latest mainline codebase

References: https://lore.kernel.org/all/20260324151741.29338-1-sosohero200@gmail.com/
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Linus Torvalds <torvalds@linuxfoundation.org>
Cc: Simona Vetter <simona.vetter@ffwll.ch>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://patch.msgid.link/20260409053111.8914-1-joonas.lahtinen@linux.intel.com
(cherry picked from commit f6d4afc9ec6a0bc326151b35a7a3369369180079)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2026-04-09 12:57:15 +03:00
..
display drm/i915/psr: Do not use pipe_src as borders for SU area 2026-04-07 10:41:44 +03:00
gem drm/i915/gem: Drop check for changed VM in EXECBUF 2026-04-09 12:57:15 +03:00
gt drm/i915/gt: fix refcount underflow in intel_engine_park_heartbeat 2026-04-08 14:31:16 +03:00
gvt Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pxp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selftests Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
.gitignore
Kconfig
Kconfig.debug drm/i915: Fix selecting CONFIG_DRM_KUNIT_TEST in debug builds 2025-07-25 11:41:55 +03:00
Kconfig.profile
Makefile drm for 7.0-rc1 2026-02-11 12:55:44 -08:00
TODO.txt
i915_active.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_active.h drm/i915: Remove deadcode 2024-12-30 01:31:31 +01:00
i915_active_types.h
i915_cmd_parser.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
i915_cmd_parser.h
i915_config.c drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_config.h drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_debugfs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_debugfs.h
i915_debugfs_params.c drm/i915: use drm->debugfs_root for creating debugfs files 2025-08-07 11:30:26 +03:00
i915_debugfs_params.h
i915_deps.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_deps.h
i915_display_pc8.c drm/i915/pc8: Add parent interface for PC8 forcewake tricks 2025-12-19 21:28:48 +02:00
i915_display_pc8.h drm/i915/pc8: Add parent interface for PC8 forcewake tricks 2025-12-19 21:28:48 +02:00
i915_driver.c drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
i915_driver.h drm/{i915, xe}/display: pass parent interface to display probe 2025-11-03 11:55:19 +02:00
i915_drm_client.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_drm_client.h
i915_drv.h Beyond Display related: 2025-12-27 16:27:04 +10:00
i915_edram.c drm/i915/edram: extract i915_edram.[ch] for edram detection 2025-11-21 12:11:14 +02:00
i915_edram.h drm/i915/edram: extract i915_edram.[ch] for edram detection 2025-11-21 12:11:14 +02:00
i915_file_private.h
i915_freq.c drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
i915_freq.h drm/i915: split out i915_freq.[ch] 2025-11-21 12:11:49 +02:00
i915_gem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_gem.h drm/i915: move GEM_QUIRK_PIN_SWIZZLED_PAGES to i915_gem.h 2025-06-27 08:15:32 +02:00
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_getparam.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_getparam.h
i915_gmch.c drm/i915/gmch: split out i915_gmch.[ch] from soc 2025-11-21 12:12:32 +02:00
i915_gmch.h drm/i915/gmch: split out i915_gmch.[ch] from soc 2025-11-21 12:12:32 +02:00
i915_gpu_error.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_gpu_error.h drm/i915/guc: Include the GuC registers in the error state 2025-09-11 11:28:02 -07:00
i915_gtt_view_types.h drm/i915: split out i915_gtt_view_types.h from i915_vma_types.h 2025-03-03 13:44:53 +02:00
i915_hdcp_gsc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_hdcp_gsc.h drm/{i915,xe}/hdcp: use parent interface for HDCP GSC calls 2025-11-28 10:44:51 +02:00
i915_hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_hwmon.h
i915_initial_plane.c drm/i915: drop dependency on struct intel_display from i915 initial plane 2025-12-22 15:09:23 +02:00
i915_initial_plane.h drm/{i915, xe}: move initial plane calls to parent interface 2025-12-22 15:09:22 +02:00
i915_ioc32.c
i915_ioc32.h
i915_ioctl.c
i915_ioctl.h
i915_iosf_mbi.h x86/platform/iosf_mbi: Remove unused iosf_mbi_unregister_pmic_bus_access_notifier() 2025-04-01 20:31:39 +02:00
i915_irq.c drm/{i915,xe}/display: move irq calls to parent interface 2025-11-19 19:33:43 +02:00
i915_irq.h drm/{i915,xe}/display: move irq calls to parent interface 2025-11-19 19:33:43 +02:00
i915_jiffies.h drm/i915: split out separate files for jiffies timeout and wait helpers 2025-10-31 13:08:48 +02:00
i915_list_util.h drm/i915: split out i915_list_util.h 2025-09-12 11:08:45 +03:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c drm/i915: track_pfn() -> "pfnmap tracking" 2025-05-22 14:55:37 -07:00
i915_mm.h
i915_mmio_range.c drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
i915_mmio_range.h drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
i915_module.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_panic.c drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
i915_panic.h drm/{i915, xe}/panic: move panic handling to parent interface 2025-12-12 15:17:58 +02:00
i915_params.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_params.h drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_pci.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_pci.h
i915_perf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_perf.h
i915_perf_oa_regs.h
i915_perf_types.h
i915_pmu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_pmu.h Merge tag 'drm-intel-gt-next-2025-02-26' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-03-13 07:54:41 +10:00
i915_priolist_types.h
i915_ptr_util.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_pvinfo.h
i915_query.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_query.h
i915_reg.h drm/i915/dram: Add field ecc_impacting_de_bw 2025-11-06 18:23:18 -03:00
i915_reg_defs.h drm/i915/reg_defs: Add REG_FIELD_MAX wrapper for FIELD_MAX() 2025-09-25 18:38:19 +05:30
i915_request.c drm/i915: drop i915 param from i915_fence{, _context}_timeout() 2025-12-30 21:41:15 +02:00
i915_request.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_scatterlist.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_scatterlist.h
i915_scheduler.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_scheduler.h
i915_scheduler_types.h
i915_selftest.h kernel.h: drop STACK_MAGIC macro 2026-01-31 16:16:04 -08:00
i915_sw_fence.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
i915_sw_fence.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_switcheroo.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_switcheroo.h
i915_syncmap.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_syncmap.h
i915_sysfs.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_sysfs.h
i915_tasklet.h
i915_timer_util.c drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_timer_util.h drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_trace.h
i915_trace_points.c
i915_ttm_buddy_manager.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_ttm_buddy_manager.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: switch to use kernel standard error injection 2025-12-18 11:59:20 +02:00
i915_utils.h drm/i915/utils: drop unnecessary ifdefs 2025-12-30 21:41:17 +02:00
i915_vgpu.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
i915_vgpu.h
i915_vma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i915_vma.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_vma_resource.c
i915_vma_resource.h
i915_vma_types.h drm/i915: split out i915_gtt_view_types.h from i915_vma_types.h 2025-03-03 13:44:53 +02:00
i915_wait_util.h drm/i915: Order OP vs. timeout correctly in __wait_for() 2026-03-23 09:06:40 +02:00
intel_clock_gating.c drm/i915: use struct drm_device for clock gating funcs 2025-11-25 16:32:10 +02:00
intel_clock_gating.h drm/i915: use struct drm_device for clock gating funcs 2025-11-25 16:32:10 +02:00
intel_cpu_info.c
intel_cpu_info.h
intel_device_info.c
intel_device_info.h
intel_gvt.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
intel_gvt.h
intel_gvt_mmio_table.c drm/i915/gvt: sort and group include directives 2026-01-02 12:17:24 +02:00
intel_mchbar_regs.h drm/i915/dram: Fix ICL DIMM_S decoding 2025-11-19 18:55:57 +02:00
intel_memory_region.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_memory_region.h drm/i915: Fix format string truncation warning 2025-12-09 15:53:12 +02:00
intel_pci_config.h
intel_pcode.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_pcode.h drm/i915/pcode: add struct drm_device based interface 2025-06-23 21:45:16 +03:00
intel_region_ttm.c drm/ttm: Replace multiple booleans with flags in device init 2025-10-31 09:14:35 +00:00
intel_region_ttm.h
intel_runtime_pm.c drm/i915/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
intel_runtime_pm.h drm/i915/display: Runtime pm wrappers for display parent interface 2025-11-03 11:55:21 +02:00
intel_step.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
intel_step.h
intel_uncore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_uncore.h drm/i915: move and rename reg_in_range_table 2025-10-16 15:20:56 -04:00
intel_uncore_trace.c
intel_uncore_trace.h
intel_wakeref.c drm/i915/wakeref: clean up INTEL_WAKEREF_PUT_* flag macros 2025-12-16 14:04:22 +02:00
intel_wakeref.h drm/i915/wakeref: clean up INTEL_WAKEREF_PUT_* flag macros 2025-12-16 14:04:22 +02:00
vlv_iosf_sb.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
vlv_iosf_sb.h drm/i915: rename VLV IOSF SB ports parameter to unit_mask 2025-05-13 10:26:45 +03:00
vlv_iosf_sb_reg.h drm/i915: rename vlv_sideband*.[ch] to vlv_iosf_sb*.[ch] 2025-05-13 10:26:44 +03:00
vlv_suspend.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vlv_suspend.h