mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rohieb@rohieb.name>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Python 3.5 and the use of getrandom() system call
Date: Sat, 19 Nov 2016 02:23:29 +0100	[thread overview]
Message-ID: <283bbede-a186-1f2d-6909-e662c159e22e@rohieb.name> (raw)
In-Reply-To: <20161118171557.GA2369@archie.localdomain>


[-- Attachment #1.1.1: Type: text/plain, Size: 930 bytes --]

On 18.11.2016 18:15, Clemens Gruber wrote:
> It's probably a bad idea to just patch python for every PTXdist user.
> Not everybody is willing to trade security for faster start times.

Judging from Python-3.5.0/Python/random.c:118, it will use the
getrandom() syscall with flags=0, and according to the getrandom(2) man
page, this will read from /dev/urandom, and also block if the
nonblocking entropy pool is not initialized yet. (The man page also
mentions explicitly that the random bytes returned by it can be used for
cryptographic purposes, for all else, see Filippo Valsordas talk at 32c3
[0] ;-)) So, even if it does not solve the original problem (long boot
times), I see nothing wrong with doing this for every user.

[0]: https://www.youtube.com/watch?v=Q8JAlZ-HJQI

> Besides, not having enough entropy will lead to other problems as well.

Oh, could you please elaborate on that? :-)

 - Roland


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2016-11-19  1:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 13:21 David Jander
2016-11-18 17:15 ` Clemens Gruber
2016-11-19  1:23   ` Roland Hieber [this message]
2016-11-21  7:24   ` David Jander
2016-11-29  8:56 ` Alexander Dahl
2016-11-29  9:33   ` Michael Olbrich
2016-11-29 13:14   ` Clemens Gruber
2016-11-29 13:41     ` Alexander Dahl

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=283bbede-a186-1f2d-6909-e662c159e22e@rohieb.name \
    --to=rohieb@rohieb.name \
    --cc=ptxdist@pengutronix.de \
    /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