mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 15:59:33 +07:00
2abaad4eb5
The hwsp_cacheline pointer from i915_request is very, very flimsy. The i915_request.timeline (and the hwsp_cacheline) are lost upon retiring (after an RCU grace). Therefore we need to confirm that once we have the right pointer for the cacheline, it is not in the process of being retired and disposed of before we attempt to acquire a reference to the cacheline. <3>[ 547.208237] BUG: KASAN: use-after-free in active_debug_hint+0x6a/0x70 [i915] <3>[ 547.208366] Read of size 8 at addr ffff88822a0d2710 by task gem_exec_parall/2536 <4>[ 547.208547] CPU: 3 PID: 2536 Comm: gem_exec_parall Tainted: G U 5.7.0-rc2-ged7a286b5d02d-kasan_117+ #1 <4>[ 547.208556] Hardware name: Dell Inc. XPS 13 9350/, BIOS 1.4.12 11/30/2016 <4>[ 547.208564] Call Trace: <4>[ 547.208579] dump_stack+0x96/0xdb <4>[ 547.208707] ? active_debug_hint+0x6a/0x70 [i915] <4>[ 547.208719] print_address_description.constprop.6+0x16/0x310 <4>[ 547.208841] ? active_debug_hint+0x6a/0x70 [i915] <4>[ 547.208963] ? active_debug_hint+0x6a/0x70 [i915] <4>[ 547.208975] __kasan_report+0x137/0x190 <4>[ 547.209106] ? active_debug_hint+0x6a/0x70 [i915] <4>[ 547.209127] kasan_report+0x32/0x50 <4>[ 547.209257] ? i915_gemfs_fini+0x40/0x40 [i915] <4>[ 547.209376] active_debug_hint+0x6a/0x70 [i915] <4>[ 547.209389] debug_print_object+0xa7/0x220 <4>[ 547.209405] ? lockdep_hardirqs_on+0x348/0x5f0 <4>[ 547.209426] debug_object_assert_init+0x297/0x430 <4>[ 547.209449] ? debug_object_free+0x360/0x360 <4>[ 547.209472] ? lock_acquire+0x1ac/0x8a0 <4>[ 547.209592] ? intel_timeline_read_hwsp+0x4f/0x840 [i915] <4>[ 547.209737] ? i915_active_acquire_if_busy+0x66/0x120 [i915] <4>[ 547.209861] i915_active_acquire_if_busy+0x66/0x120 [i915] <4>[ 547.209990] ? __live_alloc.isra.15+0xc0/0xc0 [i915] <4>[ 547.210005] ? rcu_read_lock_sched_held+0xd0/0xd0 <4>[ 547.210017] ? print_usage_bug+0x580/0x580 <4>[ 547.210153] intel_timeline_read_hwsp+0xbc/0x840 [i915] <4>[ 547.210284] __emit_semaphore_wait+0xd5/0x480 [i915] <4>[ 547.210415] ? i915_fence_get_timeline_name+0x110/0x110 [i915] <4>[ 547.210428] ? lockdep_hardirqs_on+0x348/0x5f0 <4>[ 547.210442] ? _raw_spin_unlock_irq+0x2a/0x40 <4>[ 547.210567] ? __await_execution.constprop.51+0x2e0/0x570 [i915] <4>[ 547.210706] i915_request_await_dma_fence+0x8f7/0xc70 [i915] Fixes: |
||
---|---|---|
.. | ||
display | ||
gem | ||
gt | ||
gvt | ||
oa | ||
selftests | ||
.gitignore | ||
i915_active_types.h | ||
i915_active.c | ||
i915_active.h | ||
i915_buddy.c | ||
i915_buddy.h | ||
i915_cmd_parser.c | ||
i915_debugfs_params.c | ||
i915_debugfs_params.h | ||
i915_debugfs.c | ||
i915_debugfs.h | ||
i915_drv.c | ||
i915_drv.h | ||
i915_fixed.h | ||
i915_gem_evict.c | ||
i915_gem_fence_reg.c | ||
i915_gem_fence_reg.h | ||
i915_gem_gtt.c | ||
i915_gem_gtt.h | ||
i915_gem.c | ||
i915_gem.h | ||
i915_getparam.c | ||
i915_globals.c | ||
i915_globals.h | ||
i915_gpu_error.c | ||
i915_gpu_error.h | ||
i915_ioc32.c | ||
i915_ioc32.h | ||
i915_irq.c | ||
i915_irq.h | ||
i915_memcpy.c | ||
i915_memcpy.h | ||
i915_mm.c | ||
i915_params.c | ||
i915_params.h | ||
i915_pci.c | ||
i915_perf_types.h | ||
i915_perf.c | ||
i915_perf.h | ||
i915_pmu.c | ||
i915_pmu.h | ||
i915_priolist_types.h | ||
i915_pvinfo.h | ||
i915_query.c | ||
i915_query.h | ||
i915_reg.h | ||
i915_request.c | ||
i915_request.h | ||
i915_scatterlist.c | ||
i915_scatterlist.h | ||
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 | ||
i915_sw_fence.h | ||
i915_switcheroo.c | ||
i915_switcheroo.h | ||
i915_syncmap.c | ||
i915_syncmap.h | ||
i915_sysfs.c | ||
i915_sysfs.h | ||
i915_trace_points.c | ||
i915_trace.h | ||
i915_user_extensions.c | ||
i915_user_extensions.h | ||
i915_utils.c | ||
i915_utils.h | ||
i915_vgpu.c | ||
i915_vgpu.h | ||
i915_vma_types.h | ||
i915_vma.c | ||
i915_vma.h | ||
intel_device_info.c | ||
intel_device_info.h | ||
intel_dram.c | ||
intel_dram.h | ||
intel_gvt.c | ||
intel_gvt.h | ||
intel_memory_region.c | ||
intel_memory_region.h | ||
intel_pch.c | ||
intel_pch.h | ||
intel_pm.c | ||
intel_pm.h | ||
intel_region_lmem.c | ||
intel_region_lmem.h | ||
intel_runtime_pm.c | ||
intel_runtime_pm.h | ||
intel_sideband.c | ||
intel_sideband.h | ||
intel_uncore.c | ||
intel_uncore.h | ||
intel_wakeref.c | ||
intel_wakeref.h | ||
intel_wopcm.c | ||
intel_wopcm.h | ||
Kconfig | ||
Kconfig.debug | ||
Kconfig.profile | ||
Kconfig.unstable | ||
Makefile | ||
vlv_suspend.c | ||
vlv_suspend.h |