summaryrefslogtreecommitdiff
path: root/include/linux/can/dev
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2026-02-23 17:45:31 +0000
committerWill Deacon <will@kernel.org>2026-02-25 19:53:58 +0000
commit47a8aad135ac1aed04b7b0c0a8157fd208075827 (patch)
tree7f4145ead93b69aeaf87d1da79217ac98f1c25d5 /include/linux/can/dev
parent8a85b3131225a8c8143ba2ae29c0eef8c1f9117f (diff)
arm64: gcs: Honour mprotect(PROT_NONE) on shadow stack mappings
vm_get_page_prot() short-circuits the protection_map[] lookup for a VM_SHADOW_STACK mapping since it uses a different PIE index from the typical read/write/exec permissions. However, the side effect is that it also ignores mprotect(PROT_NONE) by creating an accessible PTE. Special-case the !(vm_flags & VM_ACCESS_FLAGS) flags to use the protection_map[VM_NONE] permissions instead. No GCS attributes are required for an inaccessible PTE. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Fixes: 6497b66ba694 ("arm64/mm: Map pages for guarded control stack") Cc: stable@vger.kernel.org Cc: Mark Brown <broonie@kernel.org> Cc: Will Deacon <will@kernel.org> Cc: David Hildenbrand <david@kernel.org> Reviewed-by: David Hildenbrand (Arm) <david@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'include/linux/can/dev')
0 files changed, 0 insertions, 0 deletions