kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: markus.boehme@mailbox.org (Markus Böhme)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Regarding getrandom syscall
Date: Wed, 22 Jun 2016 19:11:14 +0200	[thread overview]
Message-ID: <576AC6B2.20605@mailbox.org> (raw)
In-Reply-To: <CAPusuxQsu0w1ufJQwWYqXEZ8-BVsYqEm7DSOog9StzGUa+d=ag@mail.gmail.com>

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@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@linuxfoundation.org>
 Date:   Wed Nov 20 12:28:06 2013 -0800


Regards,
Markus

  parent reply	other threads:[~2016-06-22 17:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18 12:02 Regarding getrandom syscall Avantika Rawat
2016-06-18 13:30 ` Anoop
2016-06-18 13:42   ` Sayutin Dmitry
2016-06-21 13:41     ` Avantika Rawat
2016-06-21 19:10       ` Manuel Pégourié-Gonnard
2016-06-22 14:58         ` Avantika Rawat
2016-06-22 16:15           ` Navin P.S
2016-06-22 16:40             ` Avantika Rawat
2016-06-22 17:11           ` Markus Böhme [this message]
2016-06-24 14:44             ` Avantika Rawat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=576AC6B2.20605@mailbox.org \
    --to=markus.boehme@mailbox.org \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).