From: sashiko-bot@kernel.org
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/xe: Flush LSC untyped L1 dataport cache after rcs/ccs batches
Date: Thu, 03 Sep 2026 11:50:38 +0000 [thread overview]
Message-ID: <20260903115039.0D4331F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903114552.48634-1-thomas.hellstrom@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unmitigated cross-process information leak via L1 dataport cache on MTL platforms.
--
commit 9a1c38c27d115c29ae7f3e8c47d4fe8e892e8d64
Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drm/xe: Flush LSC untyped L1 dataport cache after rcs/ccs batches
This commit introduces an explicit flush of the LSC untyped L1 dataport cache
via PIPE_CONTROL in emit_render_cache_flush() for Xe2 and later platforms. It
addresses an issue where the L1 dataport cache was not reliably coupled to the
HDC Pipeline Flush starting from MTL. By explicitly setting this bit on
GRAPHICS_VERx100(xe) >= 2000, it aims to prevent stale data leaks when memory
is reclaimed.
Link: https://gitlab.freedesktop.org/mesa/mesa/-/commit/7c2ff46a4fc3e537573ac9503057e0cd29b6fff3
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/8909
> diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
> index 39a670e91ba72..08b4a4283e96a 100644
> --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
[ ... ]
> @@ -220,6 +221,16 @@ static int emit_render_cache_flush(struct xe_sched_job *job, u32 *dw, int i)
> LRC_PPHWSP_FLUSH_INVAL_SCRATCH_ADDR, 0);
>
> flags0 = PIPE_CONTROL0_HDC_PIPELINE_FLUSH;
> + /*
> + * Prior to MTL, HDC Pipeline Flush reliably also flushes the LSC
> + * untyped L1 dataport cache, provided HDC_CHICKEN0 is programmed
> + * correctly. Starting with MTL that coupling no longer holds
> + * regardless of how HDC_CHICKEN0 is programmed, but explicitly
> + * requesting the flush via PIPE_CONTROL is itself only reliable
> + * from Xe2 onward, so only gate it in on Xe2+.
> + */
> + if (GRAPHICS_VERx100(xe) >= 2000)
> + flags0 |= PIPE_CONTROL0_UNTYPED_DATAPORT_CACHE_FLUSH;
[Severity: High]
This isn't a bug introduced by this patch, but does this condition leave
MTL platforms vulnerable to a cross-process information leak?
Since GRAPHICS_VERx100(xe) < 2000 for MTL platforms, they will not receive
the L1 dataport cache flush here. If the command streamer (CS) flush is
unreliable on MTL, does this mean sensitive data can still be read from the L1
cache by another process after memory is reclaimed or evicted?
If the PIPE_CONTROL method cannot be relied on for MTL, is an alternative
mitigation strategy, such as dummy shaders or MMIO-based flushes, needed to
fully resolve the vulnerability on those platforms?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260903114552.48634-1-thomas.hellstrom@linux.intel.com?part=1
next prev parent reply other threads:[~2026-09-03 11:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 11:45 [PATCH v2] drm/xe: Flush LSC untyped L1 dataport cache after rcs/ccs batches Thomas Hellström
2026-09-03 11:50 ` sashiko-bot [this message]
2026-09-03 11:59 ` Thomas Hellström
2026-09-03 11:52 ` ✗ CI.checkpatch: warning for drm/xe: Flush LSC untyped L1 dataport cache after rcs/ccs batches (rev2) Patchwork
2026-09-03 11:54 ` ✓ CI.KUnit: success " Patchwork
2026-09-03 12:32 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-03 23:30 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903115039.0D4331F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox