Commit a49f4f81 authored by Mickaël Salaün's avatar Mickaël Salaün Committed by James Morris
Browse files

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 <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>
Signed-off-by: default avatarMickaël Salaün <mic@linux.microsoft.com>
Link: https://lore.kernel.org/r/20210422154123.13086-10-mic@digikod.net


Signed-off-by: default avatarJames Morris <jamorris@linux.microsoft.com>
parent 83e804f0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -482,3 +482,6 @@
550	common	process_madvise			sys_process_madvise
551	common	epoll_pwait2			sys_epoll_pwait2
552	common	mount_setattr			sys_mount_setattr
554	common	landlock_create_ruleset		sys_landlock_create_ruleset
555	common	landlock_add_rule		sys_landlock_add_rule
556	common	landlock_restrict_self		sys_landlock_restrict_self
+3 −0
Original line number Diff line number Diff line
@@ -456,3 +456,6 @@
440	common	process_madvise			sys_process_madvise
441	common	epoll_pwait2			sys_epoll_pwait2
442	common	mount_setattr			sys_mount_setattr
444	common	landlock_create_ruleset		sys_landlock_create_ruleset
445	common	landlock_add_rule		sys_landlock_add_rule
446	common	landlock_restrict_self		sys_landlock_restrict_self
+1 −1
Original line number Diff line number Diff line
@@ -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		443
#define __NR_compat_syscalls		447
#endif

#define __ARCH_WANT_SYS_CLONE
+6 −0
Original line number Diff line number Diff line
@@ -893,6 +893,12 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise)
__SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2)
#define __NR_mount_setattr 442
__SYSCALL(__NR_mount_setattr, sys_mount_setattr)
#define __NR_landlock_create_ruleset 444
__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
#define __NR_landlock_add_rule 445
__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
#define __NR_landlock_restrict_self 446
__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)

/*
 * Please add new compat syscalls above this comment and update
+3 −0
Original line number Diff line number Diff line
@@ -363,3 +363,6 @@
440	common	process_madvise			sys_process_madvise
441	common	epoll_pwait2			sys_epoll_pwait2
442	common	mount_setattr			sys_mount_setattr
444	common	landlock_create_ruleset		sys_landlock_create_ruleset
445	common	landlock_add_rule		sys_landlock_add_rule
446	common	landlock_restrict_self		sys_landlock_restrict_self
Loading