Skip to content

drm/xe: PAT index validation for CPU_ADDR_MIRROR and madvise

Jia Yao intel-xe stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest0 of 2 patches 0 repliesNew

Changes since v5 from the cover letter

- Added an additional Fixes tag to correctly reference the root cause patch enabling the problematic PAT behavior.

Patches in v5 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchMatthew AuldMichal MrozekJosé Roberto de Souza
SeriesR-b R-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/2] drm/xe: PAT index validation for CPU_ADDR_MIRROR and madvise

This series strengthens PAT index validation to reject unsafe configurations for CPU cached memory, preventing cases where the GPU may bypass CPU caches and observe stale or sensitive data.

Patch 1 enforces PAT validation for the madvise ioctl path, ensuring XE_COH_NONE cannot be used on CPU cached buffers, including CPU address mirror and userptr-backed memory.

Patch 2 applies the same validation to vm_bind, treating DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR the same as MAP_USERPTR with respect to permissible PAT indices.

Both patches close a security gap affecting CPU cached memory access when incoherent PAT values are used.

Changes since v5:
- Added an additional Fixes tag to correctly reference the root cause patch enabling the problematic PAT behavior.

Fixes ada7486c5668 ("drm/xe: Implement madvise ioctl for xe")
Fixes e1fbc4f18d5b ("drm/xe/uapi: support pat_index selection with vm_bind")
Cc Shuicheng Lin <[email protected]>
Cc Mathew Alwin <[email protected]>
Cc Michal Mrozek <[email protected]>
Cc Matthew Brost <[email protected]>
Cc Matthew Auld <[email protected]>

Jia Yao (2):
drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in
madvise
drm/xe: Reject coh_none PAT index for CPU_ADDR_MIRROR

 drivers/gpu/drm/xe/xe_vm.c         |  2 +-
 drivers/gpu/drm/xe/xe_vm_madvise.c | 45 ++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0