✗ CI.checkpatch: warning for drm/xe: make CTX_TIME STAMP TOCTOU-safe and handle sentinels
Patchwork <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <178634921858.33188.9123983800007099709@61270ab9df2a> |
== Series Details == Series: drm/xe: make CTX_TIMESTAMP TOCTOU-safe and handle sentinels URL : https://patchwork.freedesktop.org/series/171909/ State : warning == Summary == + KERNEL=/kernel + git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'... warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/ + git -C mt rev-list -n1 origin/master 061140b9bc586ae7f40abc1249c97e1cc72d1b9d + cd /kernel + git config --global --add safe.directory /kernel + git log -n1 commit 2cfa5cbe637bd134f760adc9e9e4250ab1b1550e Author: Gajendra Uttamchand <[email protected]> Date: Mon Aug 10 07:18:14 2026 +0000 drm/xe/lrc: document sentinel and make CTX_TIMESTAMP read TOCTOU-safe Problem: CTX_TIMESTAMP MMIO reads could be stale if a context switched out between check and read; LRC stores a sentinel while a context starts that must not be treated as a real timestamp. Fix: Check the LRC-stored sentinel before and after the MMIO read; return the LRC value if the context switched out to avoid TOCTOU. Fixes: d243ef6a39c6 ("drm/xe/lrc: Refactor xe_lrc_timestamp to simplify logic") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7956 Note: Keep XE_LRC_CTX_TIMESTAMP_ACTIVE in xe_lrc.h as the canonical sentinel. Assisted-by: GitHub-Copilot:claude-sonnet-5 Signed-off-by: Gajendra Uttamchand <[email protected]> Reviewed-by: Umesh Nerlige Ramappa <[email protected]> Acked-by: Matthew Brost <[email protected]> + /mt/dim checkpatch 9c14709d79cf144f0990551a124af7615bdd97be drm-intel 2cfa5cbe637b drm/xe/lrc: document sentinel and make CTX_TIMESTAMP read TOCTOU-safe -:14: WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12+ chars of sha1> ("<title line>")' - ie: 'Fixes: d243ef6a39c6 ("drm/xe/lrc: Refactor xe_lrc_timestamp to simplify logic")' #14: Fixes: d243ef6a39c6 ("drm/xe/lrc: Refactor xe_lrc_timestamp to simplify total: 0 errors, 1 warnings, 0 checks, 55 lines checked