Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74671
| References | <7xlhrrkf6h.fsf@ruckus.brouhaha.com> |
|---|---|
| Date | 2014-07-18 04:44 +1000 |
| Subject | Re: patch request for os.urandom() |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11948.1405622692.18130.python-list@python.org> (permalink) |
On Fri, Jul 18, 2014 at 4:34 AM, Paul Rubin <no.email@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
patch request for os.urandom() Paul Rubin <no.email@nospam.invalid> - 2014-07-17 11:34 -0700 Re: patch request for os.urandom() Chris Angelico <rosuav@gmail.com> - 2014-07-18 04:44 +1000 Re: patch request for os.urandom() Ned Deily <nad@acm.org> - 2014-07-17 12:37 -0700 Re: patch request for os.urandom() Sturla Molden <sturla.molden@gmail.com> - 2014-07-17 21:54 +0200 Re: patch request for os.urandom() Christian Heimes <christian@python.org> - 2014-07-17 22:12 +0200
csiph-web