Re: [PATCH v10 22/40] arm64/mm: Implement map_shadow_stack()

2024-08-21 Thread Catalin Marinas
On Thu, Aug 01, 2024 at 01:06:49PM +0100, Mark Brown wrote: > +SYSCALL_DEFINE3(map_shadow_stack, unsigned long, addr, unsigned long, size, > unsigned int, flags) > +{ > + unsigned long alloc_size; > + unsigned long __user *cap_ptr; > + unsigned long cap_val; > + int ret = 0; > +

[PATCH v10 22/40] arm64/mm: Implement map_shadow_stack()

2024-08-01 Thread Mark Brown
As discussed extensively in the changelog for the addition of this syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the existing mmap() and madvise() syscalls do not map entirely well onto the security requirements for guarded control stacks since they lead to windows where memory i