| Store | Cart

Re: patch request for os.urandom()

From: Chris Angelico <ros...@gmail.com>
Fri, 18 Jul 2014 04:44:43 +1000
On Fri, Jul 18, 2014 at 4:34 AM, Paul Rubin <no.e...@nospam.invalid> wrote:
> Could os.urandom() be patched to use the new Linux getrandom() system> call on systems where it is available?  Further info:>> http://lists.openwall.net/linux-kernel/2014/07/17/235

Uhm... does that even exist in kernel trunk yet? That's pretty
amazingly new. I would guess Python doesn't want to start using
something like that until it's *at least* appeared in a released
kernel; although of course you're welcome to run a patched Python on a
patched Linux to make use of this.

Trouble with that seems to be that it's reducing code paths from two
to... two. Instead of having a seldom-used code path for the fall-back
when there's no fd available, you instead have an alternate code path
for the fall-back when getrandom() doesn't exist. But if the Linux
guys decide to implement this, then you can take it to python-dev with
"This is supported by Linux 3.x.y" (or probably "Linux 3.x"), and
preferably a patch that includes something in ./configure to probe for
availability. Patches speak louder than words :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Recent Messages in this Thread
Paul Rubin Jul 17, 2014 06:34 pm
Chris Angelico Jul 17, 2014 06:44 pm
Ned Deily Jul 17, 2014 07:37 pm
Sturla Molden Jul 17, 2014 07:54 pm
Christian Heimes Jul 17, 2014 08:12 pm
Messages in this thread