ARM: Wire up userfaultfd and mlock2 syscalls
cover ARM: Wire up userfaultfd and mlock2 syscalls
From: Thierry Reding <[email protected]>
These are two fairly trivial patches to wire up the userfaultfd and mlock2 syscalls on 32-bit ARM. I've verified that these work by running the userfaultfd and mlock2-tests tests from tools/testing/selftests/vm/ and they give good results. Note that mlock2-tests doesn't work without additional fixups in linux-next needed to remove VM flags clashes.
I suppose this would have to wait until both of the above syscalls have actually been merged, but I figured I'd post them anyway since I already did the work and verified that they work.
Thierry
Thierry Reding (2):
ARM: Wire up userfaultfd syscall
ARM: Wire up mlock2 syscall
arch/arm/include/asm/unistd.h | 2 +- arch/arm/include/uapi/asm/unistd.h | 2 ++ arch/arm/kernel/calls.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.4.5
PATCH 1/2 ARM: Wire up userfaultfd syscall
From: Thierry Reding <[email protected]>
--- arch/arm/include/asm/unistd.h | 2 +- arch/arm/include/uapi/asm/unistd.h | 1 + arch/arm/kernel/calls.S | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
arch/arm/include/asm/unistd.h +1 -1
@@ -19,7 +19,7 @@* This may need to be greater than __NR_last_syscall+1 in order to * account for the padding in the syscall table */ -#define __NR_syscalls (388) +#define __NR_syscalls (392)/* * *NOTE*: This is a ghost syscall private to the kernel. Only the
arch/arm/include/uapi/asm/unistd.h +1 -0
@@ -414,6 +414,7 @@#define __NR_memfd_create (__NR_SYSCALL_BASE+385)#define __NR_bpf (__NR_SYSCALL_BASE+386)#define __NR_execveat (__NR_SYSCALL_BASE+387) +#define __NR_userfaultfd (__NR_SYSCALL_BASE+388)/* * The following SWIs are ARM private.
arch/arm/kernel/calls.S +1 -0
@@ -397,6 +397,7 @@ /* 385 */ CALL(sys_memfd_create) CALL(sys_bpf) CALL(sys_execveat) + CALL(sys_userfaultfd) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted
Signature · 1 line
2.4.5
PATCH 2/2 ARM: Wire up mlock2 syscall
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
--- arch/arm/include/uapi/asm/unistd.h | 1 + arch/arm/kernel/calls.S | 1 + 2 files changed, 2 insertions(+)
arch/arm/include/uapi/asm/unistd.h +1 -0
@@ -415,6 +415,7 @@#define __NR_bpf (__NR_SYSCALL_BASE+386)#define __NR_execveat (__NR_SYSCALL_BASE+387)#define __NR_userfaultfd (__NR_SYSCALL_BASE+388) +#define __NR_mlock2 (__NR_SYSCALL_BASE+389)/* * The following SWIs are ARM private.
arch/arm/kernel/calls.S +1 -0
@@ -398,6 +398,7 @@ CALL(sys_bpf) CALL(sys_execveat) CALL(sys_userfaultfd) + CALL(sys_mlock2) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted
Signature · 1 line
2.4.5