[PATCH v10 0/1] drm/xe: make CTX_TIMESTAMP TOCTOU-safe and handle sentinels
Gajendra Uttamchand <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <[email protected]> |
Fix timestamp handling for Xe LRC contexts to avoid races and false
timeout detection. This patch documents and centralises the
CONTEXT_ACTIVE sentinel and makes MMIO reads of CTX_TIMESTAMP TOCTOU-
safe by verifying the LRC-stored timestamp before and after the MMIO
read.
Fixes: d243ef6a39c6 ("drm/xe/lrc: Refactor xe_lrc_timestamp to simplify logic")
v2:
Dropped the redundant second patch (Matt Brost)
v3:
Added the Fixes tag for the original commit (Umesh Nerlige)
v4:
Added Reviewed-by for the original commit (Umesh Nerlige)
Added Acked-by for the original commit (Matt Brost)
v5:
Fix incorrect 'From:' username in commit header (Kamil)"
v6:
Fix AI review comments from sashiko.dev
- Fix torn read of CTX_TIMESTAMP from LRC
- Fix ABA race on engine migration in context timestamp read
v7:
Fix review comments (Vivi Rodrigo)
- Added Assisted-by coding assistant used
- Removed extra comments
Added ldw check additionally to avoid torn read (sashiko.dev)
v8:
Fix git am merge issue with v7 patch series
v9:
Fix AI review comments from sashiko.dev
v10:
Dropped other patches and kept only TOCTOU Patch (Umesh Nerlige)
Updated commit message to include closes (Umesh Nerlige)
Simplified comments in code (Gajendra Uttamchand)
Gajendra Uttamchand (1):
drm/xe/lrc: document sentinel and make CTX_TIMESTAMP read TOCTOU-safe
drivers/gpu/drm/xe/xe_lrc.c | 22 ++++++++++++++--------
drivers/gpu/drm/xe/xe_lrc.h | 7 +++++++
2 files changed, 21 insertions(+), 8 deletions(-)
--
2.43.0