On Thu, Mar 28, 2024 at 9:46 PM Deepak Gupta debug@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@rivosinc.com
rebase with a30f0ca0fa31cdb2ac3d24b7b5be9e3ae75f4175
hmm.. Note to self: Missed removing this lingering commit message. Will remove it in the next version.