diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-08-08 10:56:34 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-07-07 22:32:50 +0200 |
| commit | 6de88912a0c50f023ac435e7171b81981baab28e (patch) | |
| tree | 42d141deed0d43708be3cfea3f53e418364b1a1d | |
| parent | 09158c4b40bb58b4297c1cf81ca612a14cbfc569 (diff) | |
BACKPORT: ARM: wire up getrandom syscall Clean cherry pick of eb6452537b280652eee66801ec97cc369e27e5d8.
Add the new getrandom syscall for ARM.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Bug: http://b/29621447
Change-Id: I6d50b57f3a61fbf9102c69103b9a5b7ebf239860
(cherry picked from commit eb6452537b280652eee66801ec97cc369e27e5d8)
| -rw-r--r-- | arch/arm/include/asm/unistd.h | 12 | ||||
| -rw-r--r-- | arch/arm/include/uapi/asm/unistd.h | 6 | ||||
| -rw-r--r-- | arch/arm/kernel/calls.S | 1 |
3 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 43876245f..0b7f01234 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -15,7 +15,17 @@ #include <uapi/asm/unistd.h> -#define __NR_syscalls (384) +/* + * 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 (385) + +/* + * *NOTE*: This is a ghost syscall private to the kernel. Only the + * __kuser_cmpxchg code in entry-armv.S should be aware of its + * existence. Don't ever use this from user code. + */ #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) #define __ARCH_WANT_STAT64 diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h index 17407c92c..df8467f31 100644 --- a/arch/arm/include/uapi/asm/unistd.h +++ b/arch/arm/include/uapi/asm/unistd.h @@ -412,11 +412,7 @@ #define __NR_renameat2 (__NR_SYSCALL_BASE+382) */ #define __NR_seccomp (__NR_SYSCALL_BASE+383) - -/* - * This may need to be greater than __NR_last_syscall+1 in order to - * account for the padding in the syscall table - */ +#define __NR_getrandom (__NR_SYSCALL_BASE+384) /* * The following SWIs are ARM private. diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 725f84492..3aec9455a 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -393,6 +393,7 @@ CALL(sys_ni_syscall) /* reserved sys_sched_getattr */ CALL(sys_ni_syscall) /* reserved sys_renameat2 */ CALL(sys_seccomp) + CALL(sys_getrandom) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
