In PCuABI, specifically on Morello, initial executable/interpreter reservations and corresponding capabilities should have the BranchSealedPair permission. Pass PROT_CAP_INVOKE for that purpose.
This is a no-op on other ABIs / architectures.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e52b6adb14b9..c7490ece875a 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -887,7 +887,7 @@ static inline int make_prot(u32 p_flags, struct arch_elf_state *arch_state, if (p_flags & PF_X) prot |= PROT_EXEC;
- prot |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC); + prot |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC) | PROT_CAP_INVOKE;
return arch_elf_adjust_prot(prot, arch_state, has_interp, is_interp); }