Skip to content

Commit a49f4f8

Browse files
l0kodJames Morris
authored andcommitted
arch: Wire up Landlock syscalls
Wire up the following system calls for all architectures: * landlock_create_ruleset(2) * landlock_add_rule(2) * landlock_restrict_self(2) Cc: Arnd Bergmann <[email protected]> Cc: James Morris <[email protected]> Cc: Jann Horn <[email protected]> Cc: Kees Cook <[email protected]> Cc: Serge E. Hallyn <[email protected]> Signed-off-by: Mickaël Salaün <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: James Morris <[email protected]>
1 parent 83e804f commit a49f4f8

File tree

19 files changed

+62
-2
lines changed

19 files changed

+62
-2
lines changed

arch/alpha/kernel/syscalls/syscall.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,6 @@
482482
550 common process_madvise sys_process_madvise
483483
551 common epoll_pwait2 sys_epoll_pwait2
484484
552 common mount_setattr sys_mount_setattr
485+
554 common landlock_create_ruleset sys_landlock_create_ruleset
486+
555 common landlock_add_rule sys_landlock_add_rule
487+
556 common landlock_restrict_self sys_landlock_restrict_self

arch/arm/tools/syscall.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,6 @@
456456
440 common process_madvise sys_process_madvise
457457
441 common epoll_pwait2 sys_epoll_pwait2
458458
442 common mount_setattr sys_mount_setattr
459+
444 common landlock_create_ruleset sys_landlock_create_ruleset
460+
445 common landlock_add_rule sys_landlock_add_rule
461+
446 common landlock_restrict_self sys_landlock_restrict_self

arch/arm64/include/asm/unistd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
3939
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
4040

41-
#define __NR_compat_syscalls 443
41+
#define __NR_compat_syscalls 447
4242
#endif
4343

4444
#define __ARCH_WANT_SYS_CLONE

arch/arm64/include/asm/unistd32.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,12 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise)
893893
__SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2)
894894
#define __NR_mount_setattr 442
895895
__SYSCALL(__NR_mount_setattr, sys_mount_setattr)
896+
#define __NR_landlock_create_ruleset 444
897+
__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
898+
#define __NR_landlock_add_rule 445
899+
__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
900+
#define __NR_landlock_restrict_self 446
901+
__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
896902

897903
/*
898904
* Please add new compat syscalls above this comment and update

arch/ia64/kernel/syscalls/syscall.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,3 +363,6 @@
363363
440 common process_madvise sys_process_madvise
364364
441 common epoll_pwait2 sys_epoll_pwait2
365365
442 common mount_setattr sys_mount_setattr
366+
444 common landlock_create_ruleset sys_landlock_create_ruleset
367+
445 common landlock_add_rule sys_landlock_add_rule
368+
446 common landlock_restrict_self sys_landlock_restrict_self

arch/m68k/kernel/syscalls/syscall.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,3 +442,6 @@
442442
440 common process_madvise sys_process_madvise
443443
441 common epoll_pwait2 sys_epoll_pwait2
444444
442 common mount_setattr sys_mount_setattr
445+
444 common landlock_create_ruleset sys_landlock_create_ruleset
446+
445 common landlock_add_rule sys_landlock_add_rule
447+
446 common landlock_restrict_self sys_landlock_restrict_self

arch/microblaze/kernel/syscalls/syscall.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,3 +448,6 @@
448448
440 common process_madvise sys_process_madvise
449449
441 common epoll_pwait2 sys_epoll_pwait2
450450
442 common mount_setattr sys_mount_setattr
451+
444 common landlock_create_ruleset sys_landlock_create_ruleset
452+
445 common landlock_add_rule sys_landlock_add_rule
453+
446 common landlock_restrict_self sys_landlock_restrict_self

arch/mips/kernel/syscalls/syscall_n32.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,3 +381,6 @@
381381
440 n32 process_madvise sys_process_madvise
382382
441 n32 epoll_pwait2 compat_sys_epoll_pwait2
383383
442 n32 mount_setattr sys_mount_setattr
384+
444 n32 landlock_create_ruleset sys_landlock_create_ruleset
385+
445 n32 landlock_add_rule sys_landlock_add_rule
386+
446 n32 landlock_restrict_self sys_landlock_restrict_self

arch/mips/kernel/syscalls/syscall_n64.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,6 @@
357357
440 n64 process_madvise sys_process_madvise
358358
441 n64 epoll_pwait2 sys_epoll_pwait2
359359
442 n64 mount_setattr sys_mount_setattr
360+
444 n64 landlock_create_ruleset sys_landlock_create_ruleset
361+
445 n64 landlock_add_rule sys_landlock_add_rule
362+
446 n64 landlock_restrict_self sys_landlock_restrict_self

arch/mips/kernel/syscalls/syscall_o32.tbl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,6 @@
430430
440 o32 process_madvise sys_process_madvise
431431
441 o32 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2
432432
442 o32 mount_setattr sys_mount_setattr
433+
444 o32 landlock_create_ruleset sys_landlock_create_ruleset
434+
445 o32 landlock_add_rule sys_landlock_add_rule
435+
446 o32 landlock_restrict_self sys_landlock_restrict_self

0 commit comments

Comments
 (0)