Thread (10 messages) 10 messages, 6 authors, 2016-06-24

Regarding getrandom syscall

From: Avantika Rawat <hidden>
Date: 2016-06-24 14:44:31

Hi All,

Thanks for the help

I was getting SYS_getrandom not defined compilation error as it is not
defined in my c libraries. Also now i am able to call getrandom
through syscall with proper syscall number which is arch dependent.
syscall (6314, buf, l , o);

On Wed, Jun 22, 2016 at 10:41 PM, Markus B?hme
[off-list ref] wrote:
On 06/22/2016 04:58 PM, Avantika Rawat wrote:
quoted
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 [off-list ref]
 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 [off-list ref]
 Date:   Wed Nov 20 12:28:06 2013 -0800


Regards,
Markus


-- 
Regards,
Avantika Rawat
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help