Skip to content
This repository was archived by the owner on Jul 3, 2018. It is now read-only.

Commit fbdcb3b

Browse files
Russell KingTheStrix
authored andcommitted
BACKPORT: ARM: wire up getrandom syscall
Clean cherry pick of eb64525. Add the new getrandom syscall for ARM. Signed-off-by: Russell King <[email protected]> Bug: http://b/29621447 Change-Id: I6d50b57f3a61fbf9102c69103b9a5b7ebf239860 (cherry picked from commit eb64525)
1 parent c99adfc commit fbdcb3b

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

arch/arm/include/asm/unistd.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,17 @@
1515

1616
#include <uapi/asm/unistd.h>
1717

18-
#define __NR_syscalls (384)
18+
/*
19+
* This may need to be greater than __NR_last_syscall+1 in order to
20+
* account for the padding in the syscall table
21+
*/
22+
#define __NR_syscalls (388)
23+
24+
/*
25+
* *NOTE*: This is a ghost syscall private to the kernel. Only the
26+
* __kuser_cmpxchg code in entry-armv.S should be aware of its
27+
* existence. Don't ever use this from user code.
28+
*/
1929
#define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)
2030

2131
#define __ARCH_WANT_STAT64

arch/arm/include/uapi/asm/unistd.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,15 +408,9 @@
408408
#define __NR_finit_module (__NR_SYSCALL_BASE+379)
409409
#define __NR_sched_setattr (__NR_SYSCALL_BASE+380)
410410
#define __NR_sched_getattr (__NR_SYSCALL_BASE+381)
411-
/* Reserve for later
412411
#define __NR_renameat2 (__NR_SYSCALL_BASE+382)
413-
*/
414412
#define __NR_seccomp (__NR_SYSCALL_BASE+383)
415-
416-
/*
417-
* This may need to be greater than __NR_last_syscall+1 in order to
418-
* account for the padding in the syscall table
419-
*/
413+
#define __NR_getrandom (__NR_SYSCALL_BASE+384)
420414

421415
/*
422416
* The following SWIs are ARM private.

arch/arm/kernel/calls.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@
391391
CALL(sys_finit_module)
392392
/* 380 */ CALL(sys_sched_setattr)
393393
CALL(sys_sched_getattr)
394-
CALL(sys_ni_syscall) /* reserved sys_renameat2 */
394+
CALL(sys_renameat2)
395395
CALL(sys_seccomp)
396-
396+
CALL(sys_getrandom)
397397
#ifndef syscalls_counted
398398
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
399399
#define syscalls_counted

0 commit comments

Comments
 (0)