@@ -478,3 +478,7 @@
547 common openat2 sys_openat2
548 common pidfd_getfd sys_pidfd_getfd
549 common faccessat2 sys_faccessat2
+554 common landlock_get_features sys_landlock_get_features
+555 common landlock_create_ruleset sys_landlock_create_ruleset
+556 common landlock_add_rule sys_landlock_add_rule
+557 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -452,3 +452,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -38,7 +38,7 @@
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
-#define __NR_compat_syscalls 440
+#define __NR_compat_syscalls 448
#endif
#define __ARCH_WANT_SYS_CLONE
@@ -885,6 +885,14 @@ __SYSCALL(__NR_openat2, sys_openat2)
__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
#define __NR_faccessat2 439
__SYSCALL(__NR_faccessat2, sys_faccessat2)
+#define __NR_landlock_get_features 444
+__SYSCALL(__NR_landlock_get_features, sys_landlock_get_features)
+#define __NR_landlock_create_ruleset 445
+__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
+#define __NR_landlock_add_rule 446
+__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
+#define __NR_landlock_enforce_ruleset 447
+__SYSCALL(__NR_landlock_enforce_ruleset, sys_landloc_enforce_rulesetk)
/*
* Please add new compat syscalls above this comment and update
@@ -359,3 +359,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -438,3 +438,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -444,3 +444,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -377,3 +377,7 @@
437 n32 openat2 sys_openat2
438 n32 pidfd_getfd sys_pidfd_getfd
439 n32 faccessat2 sys_faccessat2
+444 n32 landlock_get_features sys_landlock_get_features
+445 n32 landlock_create_ruleset sys_landlock_create_ruleset
+446 n32 landlock_add_rule sys_landlock_add_rule
+447 n32 landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -353,3 +353,7 @@
437 n64 openat2 sys_openat2
438 n64 pidfd_getfd sys_pidfd_getfd
439 n64 faccessat2 sys_faccessat2
+444 n64 landlock_get_features sys_landlock_get_features
+445 n64 landlock_create_ruleset sys_landlock_create_ruleset
+446 n64 landlock_add_rule sys_landlock_add_rule
+447 n64 landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -426,3 +426,7 @@
437 o32 openat2 sys_openat2
438 o32 pidfd_getfd sys_pidfd_getfd
439 o32 faccessat2 sys_faccessat2
+444 o32 landlock_get_features sys_landlock_get_features
+445 o32 landlock_create_ruleset sys_landlock_create_ruleset
+446 o32 landlock_add_rule sys_landlock_add_rule
+447 o32 landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -436,3 +436,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -528,3 +528,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -441,3 +441,7 @@
437 common openat2 sys_openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -441,3 +441,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -484,3 +484,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -443,3 +443,7 @@
437 i386 openat2 sys_openat2
438 i386 pidfd_getfd sys_pidfd_getfd
439 i386 faccessat2 sys_faccessat2
+444 i386 landlock_get_features sys_landlock_get_features
+445 i386 landlock_create_ruleset sys_landlock_create_ruleset
+446 i386 landlock_add_rule sys_landlock_add_rule
+447 i386 landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -360,6 +360,10 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
#
# x32-specific system call numbers start at 512 to avoid cache impact
@@ -409,3 +409,7 @@
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+444 common landlock_get_features sys_landlock_get_features
+445 common landlock_create_ruleset sys_landlock_create_ruleset
+446 common landlock_add_rule sys_landlock_add_rule
+447 common landlock_enforce_ruleset sys_landlock_enforce_ruleset
@@ -857,9 +857,17 @@ __SYSCALL(__NR_openat2, sys_openat2)
__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
#define __NR_faccessat2 439
__SYSCALL(__NR_faccessat2, sys_faccessat2)
+#define __NR_landlock_get_features 444
+__SYSCALL(__NR_landlock_get_features, sys_landlock_get_features)
+#define __NR_landlock_create_ruleset 445
+__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
+#define __NR_landlock_add_rule 446
+__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
+#define __NR_landlock_enforce_ruleset 447
+__SYSCALL(__NR_landlock_enforce_ruleset, sys_landloc_enforce_rulesetk)
#undef __NR_syscalls
-#define __NR_syscalls 440
+#define __NR_syscalls 448
/*
* 32 bit systems traditionally used different
Wire up the following system calls for all architectures: * landlock_get_features(2) * landlock_create_ruleset(2) * landlock_add_rule(2) * landlock_enforce_ruleset(2) Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Arnd Bergmann <arnd@arndb.de> Cc: James Morris <jmorris@namei.org> Cc: Jann Horn <jannh@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Serge E. Hallyn <serge@hallyn.com> --- Changes since v19: * Increase syscall numbers by 4 to leave space for new ones (in linux-next): watch_mount(2), watch_sb(2), fsinfo(2) and process_madvise(2) (requested by Arnd Bergmann). * Replace the previous multiplexor landlock(2) with 4 syscalls: landlock_get_features(2), landlock_create_ruleset(2), landlock_add_rule(2) and landlock_enforce_ruleset(2). Changes since v18: * Increase the syscall number because of the new faccessat2(2). Changes since v14: * Add all architectures. Changes since v13: * New implementation. --- arch/alpha/kernel/syscalls/syscall.tbl | 4 ++++ arch/arm/tools/syscall.tbl | 4 ++++ arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 8 ++++++++ arch/ia64/kernel/syscalls/syscall.tbl | 4 ++++ arch/m68k/kernel/syscalls/syscall.tbl | 4 ++++ arch/microblaze/kernel/syscalls/syscall.tbl | 4 ++++ arch/mips/kernel/syscalls/syscall_n32.tbl | 4 ++++ arch/mips/kernel/syscalls/syscall_n64.tbl | 4 ++++ arch/mips/kernel/syscalls/syscall_o32.tbl | 4 ++++ arch/parisc/kernel/syscalls/syscall.tbl | 4 ++++ arch/powerpc/kernel/syscalls/syscall.tbl | 4 ++++ arch/s390/kernel/syscalls/syscall.tbl | 4 ++++ arch/sh/kernel/syscalls/syscall.tbl | 4 ++++ arch/sparc/kernel/syscalls/syscall.tbl | 4 ++++ arch/x86/entry/syscalls/syscall_32.tbl | 4 ++++ arch/x86/entry/syscalls/syscall_64.tbl | 4 ++++ arch/xtensa/kernel/syscalls/syscall.tbl | 4 ++++ include/uapi/asm-generic/unistd.h | 10 +++++++++- 19 files changed, 82 insertions(+), 2 deletions(-)