[PATCH v2 11/27] riscv mmu: teach pte_mkwrite to manufacture shadow stack PTEs

Deepak Gupta debug at rivosinc.com
Thu Mar 28 22:15:40 PDT 2024


On Thu, Mar 28, 2024 at 9:46 PM Deepak Gupta <debug at rivosinc.com> wrote:
>
> pte_mkwrite creates PTEs with WRITE encodings for underlying arch. Underlying
> arch can have two types of writeable mappings. One that can be written using
> regular store instructions. Another one that can only be written using specialized
> store instructions (like shadow stack stores). pte_mkwrite can select write PTE
> encoding based on VMA range.
>
> On riscv, presence of only VM_WRITE in vma->vm_flags means it's a shadow stack.
>
> Signed-off-by: Deepak Gupta <debug at rivosinc.com>
>
> rebase with a30f0ca0fa31cdb2ac3d24b7b5be9e3ae75f4175
>
hmm.. Note to self:
Missed removing this lingering commit message. Will remove it in the
next version.



More information about the linux-riscv mailing list