]> git.baikalelectronics.ru Git - kernel.git/commitdiff
riscv: Wire up memfd_secret in UAPI header
authorTobias Klauser <tklauser@distanz.ch>
Thu, 5 May 2022 08:18:15 +0000 (10:18 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 2 Jun 2022 04:46:36 +0000 (21:46 -0700)
Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2ac24a0
("arch, mm: wire up memfd_secret system call where relevant") to
<uapi/asm/unistd.h> so __NR_memfd_secret is defined when including
<unistd.h> in userspace.

This allows the memfd_secret selftest to pass on riscv.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/r/20220505081815.22808-1-tklauser@distanz.ch
Fixes: 7bb7f2ac24a0 ("arch, mm: wire up memfd_secret system call where relevant")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/unistd.h
arch/riscv/include/uapi/asm/unistd.h

index 5ddac412b5782505f3d766d474b4c39d8f12f5ce..221630bdbd0778a664710783d0489a74e7b490ea 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #define __ARCH_WANT_SYS_CLONE
-#define __ARCH_WANT_MEMFD_SECRET
 
 #ifdef CONFIG_COMPAT
 #define __ARCH_WANT_COMPAT_TRUNCATE64
index c9e50eed14aad7e183b4442b48df49a9e1af4b8e..73d7cdd2ec49b94184621a7a4e35340b34a7cf99 100644 (file)
@@ -21,6 +21,7 @@
 #endif /* __LP64__ */
 
 #define __ARCH_WANT_SYS_CLONE3
+#define __ARCH_WANT_MEMFD_SECRET
 
 #include <asm-generic/unistd.h>