Thread (25 messages) 25 messages, 7 authors, 2021-01-20

Re: [PATCH v14 09/10] arch, mm: wire up memfd_secret system call were relevant

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2020-12-03 23:40:18
Also in: linux-arch, linux-arm-kernel, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml, nvdimm

On Thu,  3 Dec 2020 08:29:48 +0200 Mike Rapoport [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Mike Rapoport <redacted>

Wire up memfd_secret system call on architectures that define
ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86.

...
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -861,9 +861,13 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2)
 __SYSCALL(__NR_process_madvise, sys_process_madvise)
 #define __NR_watch_mount 441
 __SYSCALL(__NR_watch_mount, sys_watch_mount)
+#ifdef __ARCH_WANT_MEMFD_SECRET
+#define __NR_memfd_secret 442
+__SYSCALL(__NR_memfd_secret, sys_memfd_secret)
+#endif
Why do we add the ifdef?  Can't we simply define the syscall on all
architectures and let sys_ni do its thing?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help