arch: Reserve map_shadow_stack() syscall number for all architectures
commit c35559f9 ("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. For Alpha, map_shadow_stack() takes up #563 as Alpha still diverges from the common syscall numbering system in the other architectures. Link: https://lore.kernel.org/lkml/20230515212255.GA562920@debug.ba.rivosinc.com/ Link: https://lore.kernel.org/lkml/b402b80b-a7c6-4ef0-b977-c0f5f582b78a@sirena.org.uk/ Signed-off-by:Sohil Mehta <sohil.mehta@intel.com> Reviewed-by:
Rick Edgecombe <rick.p.edgecombe@intel.com> Reviewed-by:
Arnd Bergmann <arnd@arndb.de> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Acked-by:
Catalin Marinas <catalin.marinas@arm.com> Acked-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
Showing
- arch/alpha/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/alpha/kernel/syscalls/syscall.tbl
- arch/arm/tools/syscall.tbl 1 addition, 0 deletionsarch/arm/tools/syscall.tbl
- arch/arm64/include/asm/unistd.h 1 addition, 1 deletionarch/arm64/include/asm/unistd.h
- arch/arm64/include/asm/unistd32.h 2 additions, 0 deletionsarch/arm64/include/asm/unistd32.h
- arch/m68k/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/m68k/kernel/syscalls/syscall.tbl
- arch/microblaze/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/microblaze/kernel/syscalls/syscall.tbl
- arch/mips/kernel/syscalls/syscall_n32.tbl 1 addition, 0 deletionsarch/mips/kernel/syscalls/syscall_n32.tbl
- arch/mips/kernel/syscalls/syscall_n64.tbl 1 addition, 0 deletionsarch/mips/kernel/syscalls/syscall_n64.tbl
- arch/mips/kernel/syscalls/syscall_o32.tbl 1 addition, 0 deletionsarch/mips/kernel/syscalls/syscall_o32.tbl
- arch/parisc/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/parisc/kernel/syscalls/syscall.tbl
- arch/powerpc/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/powerpc/kernel/syscalls/syscall.tbl
- arch/s390/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/s390/kernel/syscalls/syscall.tbl
- arch/sh/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/sh/kernel/syscalls/syscall.tbl
- arch/sparc/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/sparc/kernel/syscalls/syscall.tbl
- arch/x86/entry/syscalls/syscall_32.tbl 1 addition, 0 deletionsarch/x86/entry/syscalls/syscall_32.tbl
- arch/xtensa/kernel/syscalls/syscall.tbl 1 addition, 0 deletionsarch/xtensa/kernel/syscalls/syscall.tbl
- include/uapi/asm-generic/unistd.h 4 additions, 1 deletioninclude/uapi/asm-generic/unistd.h
Please register or sign in to comment