From: Matthew Auld <matthew.auld@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-xe@lists.freedesktop.org
Cc: Oak Zeng <oak.zeng@intel.com>, stable@vger.kernel.org
Subject: Re: [PATCH v2 3/3] drm/xe/userptr: Unmap userptrs in the mmu notifier
Date: Tue, 4 Mar 2025 16:53:24 +0000 [thread overview]
Message-ID: <ac71f5fd-b207-4ceb-8b3e-b794d11a7ea5@intel.com> (raw)
In-Reply-To: <20250304113758.67889-4-thomas.hellstrom@linux.intel.com>
On 04/03/2025 11:37, Thomas Hellström wrote:
> If userptr pages are freed after a call to the xe mmu notifier,
> the device will not be blocked out from theoretically accessing
> these pages unless they are also unmapped from the iommu, and
> this violates some aspects of the iommu-imposed security.
>
> Ensure that userptrs are unmapped in the mmu notifier to
> mitigate this. A naive attempt would try to free the sg table, but
> the sg table itself may be accessed by a concurrent bind
> operation, so settle for unly unmapping.
only
>
> Fixes: 81e058a3e7fd ("drm/xe: Introduce helper to populate userptr")
> Cc: Oak Zeng <oak.zeng@intel.com>
> Cc: <stable@vger.kernel.org> # v6.10+
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
next prev parent reply other threads:[~2025-03-04 16:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 11:37 [PATCH v2 0/3] drm/xe: Userptr invalid page access fixes Thomas Hellström
2025-03-04 11:37 ` [PATCH v2 1/3] drm/xe/hmm: Style- and include fixes Thomas Hellström
2025-03-04 12:21 ` Jani Nikula
2025-03-04 15:16 ` Matthew Auld
2025-03-04 11:37 ` [PATCH v2 2/3] drm/xe/hmm: Don't dereference struct page pointers without notifier lock Thomas Hellström
2025-03-04 15:16 ` Matthew Auld
2025-03-04 15:37 ` Thomas Hellström
2025-03-04 11:37 ` [PATCH v2 3/3] drm/xe/userptr: Unmap userptrs in the mmu notifier Thomas Hellström
2025-03-04 16:53 ` Matthew Auld [this message]
2025-03-04 13:48 ` ✗ CI.Patch_applied: failure for drm/xe: Userptr invalid page access fixes (rev2) 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=ac71f5fd-b207-4ceb-8b3e-b794d11a7ea5@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=oak.zeng@intel.com \
--cc=stable@vger.kernel.org \
--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