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)
This commit is contained in:
Russell King 2014-08-08 10:56:34 +01:00 committed by Luca Stefani
parent 69266e198c
commit 0ee2a9b66a
3 changed files with 14 additions and 10 deletions

View file

@ -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 (388)
/*
* *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

View file

@ -408,15 +408,9 @@
#define __NR_finit_module (__NR_SYSCALL_BASE+379)
#define __NR_sched_setattr (__NR_SYSCALL_BASE+380)
#define __NR_sched_getattr (__NR_SYSCALL_BASE+381)
/* Reserve for later
#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.

View file

@ -391,9 +391,9 @@
CALL(sys_finit_module)
/* 380 */ CALL(sys_sched_setattr)
CALL(sys_sched_getattr)
CALL(sys_ni_syscall) /* reserved sys_renameat2 */
CALL(sys_renameat2)
CALL(sys_seccomp)
CALL(sys_getrandom)
#ifndef syscalls_counted
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
#define syscalls_counted