Add the BranchSealedPair permission if PROT_CAP_INVOKE is passed, as per the PCuABI specification.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- arch/arm64/include/asm/user_ptr.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/arch/arm64/include/asm/user_ptr.h b/arch/arm64/include/asm/user_ptr.h index 8e75f3e8b980..47e1eab2a420 100644 --- a/arch/arm64/include/asm/user_ptr.h +++ b/arch/arm64/include/asm/user_ptr.h @@ -25,6 +25,9 @@ user_ptr_perms_t arch_user_ptr_owning_perms_from_prot(int prot, unsigned long vm perms |= ARM_CAP_PERMISSION_EXECUTIVE; }
+ if (prot & PROT_CAP_INVOKE) + perms |= ARM_CAP_PERMISSION_BRANCH_SEALED_PAIR; + return perms; } #define arch_user_ptr_owning_perms_from_prot arch_user_ptr_owning_perms_from_prot