All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: Wire up userfaultfd and mlock2 syscalls
@ 2015-08-07 13:34 Thierry Reding
  2015-08-07 13:34 ` [PATCH 1/2] ARM: Wire up userfaultfd syscall Thierry Reding
  2015-08-07 13:34 ` [PATCH 2/2] ARM: Wire up mlock2 syscall Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Thierry Reding @ 2015-08-07 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thierry Reding <treding@nvidia.com>

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(-)

-- 
2.4.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] ARM: Wire up userfaultfd syscall
  2015-08-07 13:34 [PATCH 0/2] ARM: Wire up userfaultfd and mlock2 syscalls Thierry Reding
@ 2015-08-07 13:34 ` Thierry Reding
  2015-08-07 13:34 ` [PATCH 2/2] ARM: Wire up mlock2 syscall Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2015-08-07 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thierry Reding <treding@nvidia.com>

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 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(-)

diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 32640c431a08..7cba573c2cc9 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -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
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 0c3f5a0dafd3..ca96eca3453c 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -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.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 05745eb838c5..84c405670ff0 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -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
-- 
2.4.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ARM: Wire up mlock2 syscall
  2015-08-07 13:34 [PATCH 0/2] ARM: Wire up userfaultfd and mlock2 syscalls Thierry Reding
  2015-08-07 13:34 ` [PATCH 1/2] ARM: Wire up userfaultfd syscall Thierry Reding
@ 2015-08-07 13:34 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2015-08-07 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

From: Thierry Reding <treding@nvidia.com>

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm/include/uapi/asm/unistd.h | 1 +
 arch/arm/kernel/calls.S            | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index ca96eca3453c..977831f49576 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -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.
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 84c405670ff0..e9705ba5a1ff 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -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
-- 
2.4.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-07 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 13:34 [PATCH 0/2] ARM: Wire up userfaultfd and mlock2 syscalls Thierry Reding
2015-08-07 13:34 ` [PATCH 1/2] ARM: Wire up userfaultfd syscall Thierry Reding
2015-08-07 13:34 ` [PATCH 2/2] ARM: Wire up mlock2 syscall Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.