Skip to content

Commit

Permalink
riscv: Wire up memfd_secret in UAPI header
Browse files Browse the repository at this point in the history
Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2a
("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: 7bb7f2a ("arch, mm: wire up memfd_secret system call where relevant")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
Tobias Klauser authored and Palmer Dabbelt committed Jun 2, 2022
1 parent 2273272 commit 02d88b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion arch/riscv/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

#define __ARCH_WANT_SYS_CLONE
#define __ARCH_WANT_MEMFD_SECRET

#ifdef CONFIG_COMPAT
#define __ARCH_WANT_COMPAT_TRUNCATE64
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif /* __LP64__ */

#define __ARCH_WANT_SYS_CLONE3
#define __ARCH_WANT_MEMFD_SECRET

#include <asm-generic/unistd.h>

Expand Down

0 comments on commit 02d88b4

Please sign in to comment.