Thread (11 messages) 11 messages, 6 authors, 2023-10-06

Re: [PATCH v2] arch: Reserve map_shadow_stack() syscall number for all architectures

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2023-09-15 03:24:09
Also in: linux-alpha, linux-arch, linux-m68k, linux-mips, linux-perf-users, linux-s390, linux-sh, linuxppc-dev, lkml, sparclinux

Sohil Mehta [off-list ref] writes:
commit c35559f94ebc ("x86/shstk: Introduce map_shadow_stack syscall")
recently added support for map_shadow_stack() but it is limited to x86
only for now. There is a possibility that other architectures (namely,
arm64 and RISC-V), that are implementing equivalent support for shadow
stacks, might need to add support for it.

Independent of that, reserving arch-specific syscall numbers in the
syscall tables of all architectures is good practice and would help
avoid future conflicts. map_shadow_stack() is marked as a conditional
syscall in sys_ni.c. Adding it to the syscall tables of other
architectures is harmless and would return ENOSYS when exercised.

Note, map_shadow_stack() was assigned #453 during the merge process
since #452 was taken by fchmodat2().

For Powerpc, map it to sys_ni_syscall() as is the norm for Powerpc
syscall tables.
Mapping it to sys_map_shadow_stack() would work fine, but I'm happy with
sys_ni_syscall as I don't see powerpc implementing map_shadow_stack()
any time soon.

Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help