From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Laurent Georget"
<laurent-AyimVQWTEHzsq35pWSNszA@public.gmane.org>,
"Nikos Mavrogiannopoulos"
<nmav-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Carl Winbäck" <c@tunnel53.net>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Stephan Mueller
<smueller-T9tCv8IpfcWELgA04lAiVw@public.gmane.org>,
George Spelvin <linux-gpGsJRJZ3PBBDgjK7y7TUQ@public.gmane.org>,
Theodore T'so <tytso-3s7WtUTddSA@public.gmane.org>,
mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org,
ibobrik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
matt-6J8q6J5oQjkQrrorzV6ljw@public.gmane.org,
luke-g3IQT7+C+D7QXOPxS62xeg@public.gmane.org,
on2014nm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [patch] getrandom.2, random.4: Consolidate and improve discussion on usage of randomness
Date: Thu, 10 Nov 2016 19:16:05 +0100 [thread overview]
Message-ID: <02c2fa67-ce72-010b-e1ac-ae52c1bc6cf2@gmail.com> (raw)
In-Reply-To: <66494ef9-80d1-e437-252a-4a15e1f497db-AyimVQWTEHzsq35pWSNszA@public.gmane.org>
Nikos, Laurent,
On 11/10/2016 04:10 PM, Laurent Georget wrote:
>
>
> Le 10/11/2016 à 15:35, Nikos Mavrogiannopoulos a écrit :
>> On Thu, 2016-11-10 at 15:23 +0100, Michael Kerrisk (man-pages) wrote:
>>> [was: Re: Status for bug 71211? [random(4): clarify utility and
>>> volume]]
>>>
>>> Hello Nikos,
>>>
>>> On 11/10/2016 09:42 AM, Nikos Mavrogiannopoulos wrote:
>>>>
>>>> On Wed, 2016-11-09 at 16:27 +0100, Michael Kerrisk (man-pages)
>>>> wrote:
>>>>>
>>>>> Nikos,
>>>>>
>>>>> This was an earlier mail from Laurent Georget. I bring
>>>>> you into this thread in case there's any of Laurent's comments
>>>>> that may be helpful as inspiration for your patch.
>>>>>
>>>>> See also https://bugzilla.kernel.org/show_bug.cgi?id=71211
>>>>
>>>> I think that's a nice comment. The text referred to applies to old
>>>> kernels not new ones (especially not after the recent rewrite), and
>>>> I
>>>> think it documents and opinion rather than a fact. I am inclined to
>>>> simply drop the referred paragraph. Any better suggestions?
>>>
>>> Dropping the paragraph appears too strong too me. Surely we want
>>> to maintain a recommendation not to consume too much data from
>>> /dev/urandom?
>>
>> Stephan Mueller or Ted should be able to provide more info for the new
>> code. I think in the new versions of /dev/urandom the amount consumed
>> shouldn't cause issues or affect other users.
>>
>> However, I agree that overall, that this is a low level interface and
>> it should be treated as such. I.e., I'd expect applications to use
>> their crypto libraries' interfaces rather than getrandom directly. The
>> reason is not only about being slow, but about having to take care
>> about EINTR, short reads, quirks such as for early boot, etc [0].
>
> I agree. For non-cryptographic uses, it's always better to use a userspace
> random-number generator such as the generators provided by the standard
> library of Java, Python, etc. or by OpenSSL. For cryptographic purposes,
> check what available libraries have first, and if needs be, getrandom is
> fine for all reasonable usesand avoid the hassle of opening and closing
> /dev/urandom.
>
> The warning about the limits of /dev/urandom proposed in the other patch
> (about short reads and EINTR) seems sufficient to me. It's also already
> written that up to 256 bytes is always fine, more than 32MB at once is
> impossible. I don't think we need to stress out anything else.
So, I must admit that after your respective mails, I'm still not
clear. Do you think I should keep this patch, change it, or
discard it?
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-11-10 18:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-26 20:20 Status for bug 71211? [random(4): clarify utility and volume] Carl Winbäck
[not found] ` <CACsCw1MM+eH2zpSajyaT42jHPzrjuxcWpxPA7qqVTBR=uzaLYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-27 16:34 ` Laurent Georget
[not found] ` <55B65DAC.6010906-AyimVQWTEHzsq35pWSNszA@public.gmane.org>
2016-11-09 15:27 ` Michael Kerrisk (man-pages)
[not found] ` <2fc34759-5d2b-4192-9611-b499e23efdf8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-10 8:42 ` Nikos Mavrogiannopoulos
[not found] ` <1478767372.2642.15.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-10 14:23 ` [patch] getrandom.2, random.4: Consolidate and improve discussion on usage of randomness Michael Kerrisk (man-pages)
[not found] ` <fa60e32a-1364-d0be-245f-d8ead6d04713-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-10 14:35 ` Nikos Mavrogiannopoulos
[not found] ` <1478788558.3579.47.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-10 15:10 ` Laurent Georget
[not found] ` <66494ef9-80d1-e437-252a-4a15e1f497db-AyimVQWTEHzsq35pWSNszA@public.gmane.org>
2016-11-10 18:16 ` Michael Kerrisk (man-pages) [this message]
[not found] ` <02c2fa67-ce72-010b-e1ac-ae52c1bc6cf2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-11 7:41 ` Nikos Mavrogiannopoulos
[not found] ` <1478850099.2484.7.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-11 10:47 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgb=OEvtRNJaDLO8e3_UaVC-zCQJq8GV1c9fU416RqhLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-11 11:01 ` Laurent Georget
[not found] ` <48e730fc-4eeb-189e-92b4-eaa2720d3eda-vbcOdlJ0SulGWvitb5QawA@public.gmane.org>
2016-11-11 12:08 ` Laurent Georget
[not found] ` <c542ad59-869f-ea9e-c2a4-cf077182cf0c-AyimVQWTEHzsq35pWSNszA@public.gmane.org>
2016-11-11 17:02 ` Nikos Mavrogiannopoulos
[not found] ` <1478883732.21107.3.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-11 17:35 ` Laurent Georget
[not found] ` <8f750f37-cb7d-50aa-1915-1e78e3996a04-vbcOdlJ0SulGWvitb5QawA@public.gmane.org>
2016-11-11 21:32 ` Michael Kerrisk (man-pages)
2016-11-11 21:31 ` Michael Kerrisk (man-pages)
2016-11-11 15:52 ` Michael Kerrisk (man-pages)
2016-11-10 11:59 ` Status for bug 71211? [random(4): clarify utility and volume] Michael Kerrisk (man-pages)
2016-11-10 12:07 ` Michael Kerrisk (man-pages)
2015-07-28 6:45 ` Laurent Georget
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=02c2fa67-ce72-010b-e1ac-ae52c1bc6cf2@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=c@tunnel53.net \
--cc=ibobrik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=laurent-AyimVQWTEHzsq35pWSNszA@public.gmane.org \
--cc=linux-gpGsJRJZ3PBBDgjK7y7TUQ@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luke-g3IQT7+C+D7QXOPxS62xeg@public.gmane.org \
--cc=matt-6J8q6J5oQjkQrrorzV6ljw@public.gmane.org \
--cc=mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org \
--cc=nmav-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=on2014nm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=smueller-T9tCv8IpfcWELgA04lAiVw@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.