Re: [PATCH] mm/hmm: reject shadow-stack mappings
From: Jason Gunthorpe
Date: Fri Nov 13 2026 - 15:28:11 EST
On Fri, Nov 13, 2026 at 02:55:36PM -0500, Gregory Price (Meta) wrote:
> HMM can grant ordinary device write access to a userspace shadow stack.
> On x86, pte_write() is true for a shadow-stack PTE, so a populated page
> can be returned with HMM_PFN_WRITE without taking a CPU write fault.
I'm not sure I understand this? The pte is writable but you don't want
only DMA to write to it?
Is there something special on x86 that makes the shadow stack pte
non-writable by the CPU?
A few more words here would help
Regardless, this seems reasonable to me, there is no use case to
write to the shadow stack..
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason