Skip to content

Don't whitelist OA registers unconditionally

Ashutosh Dixit intel-xe 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 4 repliesIn review
  2. v29 patches 9 repliesSuperseded
  3. v19 patches 22 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9drm/xe/rtp: Add RING_FORCE_TO_NONPRIV_DENY to OA whitelistsdrivers/gpu/drm/xe/xe_reg_whitelist.c+5 -30 replies
2/9drm/xe/rtp: Maintain OA whitelists separatelydrivers/gpu/drm/xe/xe_gt_debugfs.c drivers/gpu/drm/xe/xe_hw_engine.c drivers/gpu/drm/xe/xe_hw_engine_types.h +1 more+18 -10 replies
3/9drm/xe/rtp: Keep track of non-OA nonpriv slotsdrivers/gpu/drm/xe/xe_reg_whitelist.c+5 -20 replies
4/9drm/xe/rtp: Generalize whitelist_apply_to_hwedrivers/gpu/drm/xe/xe_reg_whitelist.c+6 -50 replies
5/9drm/xe/rtp: Save OA nonpriv registers to register save/restore listsdrivers/gpu/drm/xe/xe_reg_whitelist.c+12 -00 replies
6/9drm/xe/rtp: Toggle 'deny' bit to (de-)whitelist OA regsdrivers/gpu/drm/xe/xe_reg_whitelist.c+15 -00 replies
7/9drm/xe/rtp: (De-)whitelist OA registers for all hwe's for a gtdrivers/gpu/drm/xe/xe_reg_whitelist.c drivers/gpu/drm/xe/xe_reg_whitelist.h+35 -10 replies
8/9drm/xe/oa: (De-)whitelist OA registers on OA stream open/releasedrivers/gpu/drm/xe/xe_oa.c+7 -00 replies
9/9drm/xe/rtp: Ensure locking/ref counting for OA whitelistsdrivers/gpu/drm/xe/xe_oa_types.h drivers/gpu/drm/xe/xe_reg_whitelist.c+12 -00 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchUmesh Nerlige Ramappa
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] Don't whitelist OA registers unconditionally

Whitelisting OA registers unconditionally is a security violation. In this series we resolve this issue as follows:

* Set the 'deny' bit (bit 30) for all OA registers, ensuring OA registers are not whitelisted by default after probe/reset/restart
* Reset the 'deny' bit when an OA stream is opened and certain conditions are met, whitelisting OA registers only for the duration when OA streams are open for a gt
* Set the 'deny' bit again, when OA streams are closed
* To manage this scheme, separate out OA whitelists from non-OA whitelists (into separate save-restore lists)

v2: Address code review from Umesh. Patches changed in v2 have changelog
appended to commit message
v3: Minor change to Patch 3

Ashutosh Dixit (9):
drm/xe/rtp: Add RING_FORCE_TO_NONPRIV_DENY to OA whitelists drm/xe/rtp: Maintain OA whitelists separately
drm/xe/rtp: Keep track of non-OA nonpriv slots drm/xe/rtp: Generalize whitelist_apply_to_hwe
drm/xe/rtp: Save OA nonpriv registers to register save/restore lists drm/xe/rtp: Toggle 'deny' bit to (de-)whitelist OA regs drm/xe/rtp: (De-)whitelist OA registers for all hwe's for a gt drm/xe/oa: (De-)whitelist OA registers on OA stream open/release drm/xe/rtp: Ensure locking/ref counting for OA whitelists

 drivers/gpu/drm/xe/xe_gt_debugfs.c      |  4 +-
 drivers/gpu/drm/xe/xe_hw_engine.c       |  2 +
 drivers/gpu/drm/xe/xe_hw_engine_types.h |  8 +++
 drivers/gpu/drm/xe/xe_oa.c              |  7 ++
 drivers/gpu/drm/xe/xe_oa_types.h        |  3 +
 drivers/gpu/drm/xe/xe_reg_whitelist.c   | 93 ++++++++++++++++++++++---
 drivers/gpu/drm/xe/xe_reg_whitelist.h   |  4 ++
 7 files changed, 112 insertions(+), 9 deletions(-)
Signature · 1 line
2.54.0