From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
Cc: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] getrandom.2: treatment of interrupts
Date: Sun, 16 Nov 2014 16:55:58 +0100 [thread overview]
Message-ID: <CAKgNAkgVUeekKZjyTsjWgkXfv_u72T_ms7qofSJ_omqhfExfCw@mail.gmail.com> (raw)
In-Reply-To: <1415722798-4894-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
Hi Heinrich,
On Tue, Nov 11, 2014 at 5:19 PM, Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> wrote:
> || pick 0ef180e getrandom.2: Add a sentence to clarify the default behavior...
> || pick 62342ef getrandom.2: Reword GRND_NONBLOCK description
> || pick 0c90d3d getrandom.2: Reword GRND_RANDOM description
> These patches look ok.
>
> || FIXME is the following paragraph correct?
> Paragraph is correct. FIXME removed.
>
> The appended patch removed two FIXMEs.
> The description of the treatment of interrupts is updated.
>
> || FIXME Here, I think there needs to be an opening paragraph ...
> The description of the treatment of interupts has been reworked.
> FIXME removed.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
> ---
> man2/getrandom.2 | 21 ++++++++-------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/man2/getrandom.2 b/man2/getrandom.2
> index 59ebbe0..5bf57b7 100644
> --- a/man2/getrandom.2
> +++ b/man2/getrandom.2
> @@ -55,7 +55,6 @@ Therefore
> should not be used for Monte Carlo simulations or other
> programs/algorithms which are doing probabilistic sampling.
>
> -.\" FIXME is the following paragraph correct?
> By default,
> .BR getrandom ()
> draws entropy from the
> @@ -157,10 +156,14 @@ was introduced in version 3.17 of the Linux kernel.
> This system call is Linux-specific.
> .SH NOTES
> .SS Interruption by a signal handler
> -.\" FIXME Here, I think there needs to be an opening paragraph that describes
> -.\" the cases where getrandom() can block. This should cover the cases with
> -.\" GRND_RANDOM and without GRND_RANDOM. Reading the existing page, I am
> -.\" still not completely confident that I know what the cases are.
> +If a blocking call is interrupted by a signal
> +when reading from
> +.I /dev/random
> +.RB ( GRND_RANDOM
> +is set),
> +.B EINTR
> +will be returned.
> +.PP
What I was meaning with my FIXME was: please describe the various
cases where getrandom() can block, both with GRND_RANDOM and without
GRND_RANDOM. As I read the man page, I am not sure that I understand
which the cases are.
Thanks,
Michael
> The reaction of
> .BR getrandom ()
> in case of an interruption of a blocking call by a signal
> @@ -182,14 +185,6 @@ will not return
> .BR EINTR .
> Instead, it will return all of the bytes that have been requested.
> .PP
> -When reading from
> -.I /dev/random
> -.RB ( GRND_RANDOM
> -is set)
> -these guarantees do
> -.I not
> -apply.
> -.PP
> Calling
> .BR getrandom ()
> to read
> --
> 2.1.1
>
--
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:[~2014-11-16 15:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-13 13:15 [PATCH 1/1] getrandom(2) : new man page Heinrich Schuchardt
[not found] ` <1410614156-16175-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-09-29 15:22 ` Michael Kerrisk (man-pages)
[not found] ` <5429791D.6080903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-29 15:52 ` Theodore Ts'o
2014-09-30 0:38 ` Aw: " Heinrich Schuchardt
2014-09-30 9:22 ` Michael Kerrisk (man-pages)
[not found] ` <542A7645.8070802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-03 0:13 ` [PATCH 0/3] getrandom.2: new manpage Heinrich Schuchardt
[not found] ` <1412295197-8100-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-10-03 0:15 ` [PATCH 1/3] " Heinrich Schuchardt
[not found] ` <1412295313-8198-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-10-06 18:13 ` Michael Kerrisk (man-pages)
2014-10-28 11:37 ` Michael Kerrisk (man-pages)
2014-10-28 19:51 ` Michael Kerrisk (man-pages)
2014-11-11 11:44 ` Michael Kerrisk (man-pages)
2014-11-11 16:19 ` [PATCH] getrandom.2: treatment of interrupts Heinrich Schuchardt
[not found] ` <1415722798-4894-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-11-16 15:55 ` Michael Kerrisk (man-pages) [this message]
[not found] ` <CAKgNAkgVUeekKZjyTsjWgkXfv_u72T_ms7qofSJ_omqhfExfCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-22 11:28 ` Heinrich Schuchardt
2015-01-10 13:23 ` [PATCH 1/3] getrandom.2: new manpage Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkiQUXFZ82jDNqEPxpBmdkKOg03uQXg=iEuUNzg0rvgkZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-22 18:30 ` [PATCH 1/1] getrandom.2: mention bug concerning treatment of interrupts Heinrich Schuchardt
[not found] ` <1421951410-6420-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2015-01-22 19:58 ` Michael Kerrisk (man-pages)
2015-01-22 19:30 ` [PATCH 1/1] getrandom.2: rework paragraphs marked with FIXME Heinrich Schuchardt
[not found] ` <1421955046-8296-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2015-01-23 6:01 ` Michael Kerrisk (man-pages)
2014-10-03 0:15 ` [PATCH 2/3] random.3: SEE ALSO getrandom.2 Heinrich Schuchardt
[not found] ` <1412295324-8241-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-10-28 14:37 ` Michael Kerrisk (man-pages)
2014-10-03 0:15 ` [PATCH 3/3] random.4: " Heinrich Schuchardt
[not found] ` <1412295335-8287-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-10-28 14:38 ` Michael Kerrisk (man-pages)
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=CAKgNAkgVUeekKZjyTsjWgkXfv_u72T_ms7qofSJ_omqhfExfCw@mail.gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.org \
--cc=xypron.glpk-Mmb7MZpHnFY@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 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).