Regarding getrandom syscall
Markus Böhme
markus.boehme at mailbox.org
Wed Jun 22 13:11:14 EDT 2016
On 06/22/2016 04:58 PM, Avantika Rawat wrote:
> Thanks for the link but i am getting "Function not implemented" error.
> I have added a custom syscall in kernel for testing, getting similar
> error for that also. I am working on 3.10.20 Kernel and MIPS
> architecture. Pasting the kernel changes done to spport getrandom
> syscall in 3.10.20 kernel. Can someone please help me here that what
> needs to be done.
If you're on MIPS, x86 code and syscall numbers won't help you. In this
case the proper syscall numbers are defined in
arch/mips/include/uapi/asm/unistd.h.
Additionally, note that your kernel version does not seem to implement
the getrandom syscall for MIPS:
$ git blame arch/mips/include/uapi/asm/unistd.h | grep getrandom
42944521 (Ralf Baechle 2014-08-26 03:03:40 +0200 376) #define
__NR_getrandom (__NR_Linux + 353)
42944521 (Ralf Baechle 2014-08-26 03:03:40 +0200 716) #define
__NR_getrandom (__NR_Linux + 313)
42944521 (Ralf Baechle 2014-08-26 03:03:40 +0200 1060) #define
__NR_getrandom (__NR_Linux + 317)
$ git show 42944521 | head -n 5
commit 42944521af97a3b25516f15f3149aec3779656dc
Author: Ralf Baechle <ralf at linux-mips.org>
Date: Tue Aug 26 03:03:40 2014 +0200
MIPS: Wire up new syscalls getrandom and memfd_create.
$ git show v3.10.20 | head -n 3
tag v3.10.20
Tagger: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Date: Wed Nov 20 12:28:06 2013 -0800
Regards,
Markus
More information about the Kernelnewbies
mailing list