diff options
| author | Arvind Yadav <arvind.yadav@intel.com> | 2026-03-26 18:38:31 +0530 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2026-03-26 19:59:45 -0700 |
| commit | 4f44961eab8474a47de419113e1d46095f9b44e0 (patch) | |
| tree | 70cb96874c302a8cc8f7ff503ed47e0310aed58f /tools/perf/scripts/python/stackcollapse.py | |
| parent | 9a16fdf5dca53326a4234826ce97727d53511aa2 (diff) | |
drm/xe/vm: Prevent binding of purged buffer objects
Add purge checking to vma_lock_and_validate() to block new mapping
operations on purged BOs while allowing cleanup operations to proceed.
Purged BOs have their backing pages freed by the kernel. New
mapping operations (MAP, PREFETCH, REMAP) must be rejected with
-EINVAL to prevent GPU access to invalid memory. Cleanup
operations (UNMAP) must be allowed so applications can release
resources after detecting purge via the retained field.
REMAP operations require mixed handling - reject new prev/next
VMAs if the BO is purged, but allow the unmap portion to proceed
for cleanup.
The check_purged flag in struct xe_vma_lock_and_validate_flags
distinguishes between these cases: true for new mappings (must reject),
false for cleanup (allow).
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Arvind Yadav <arvind.yadav@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260326130843.3545241-6-arvind.yadav@intel.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
