From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: jolsa@kernel.org, mhiramat@kernel.org, cgzones@googlemail.com,
brauner@kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: deconflicting new syscall numbers for 6.11
Date: Thu, 4 Jul 2024 20:46:20 +0200 [thread overview]
Message-ID: <Zobt_M91PEnVobML@zx2c4.com> (raw)
In-Reply-To: <CAHk-=wgqD9h0Eb-n94ZEuK9SugnkczXvX497X=OdACVEhsw5xQ@mail.gmail.com>
Hi Linus,
On Thu, Jul 04, 2024 at 11:35:12AM -0700, Linus Torvalds wrote:
> On Thu, 4 Jul 2024 at 11:18, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > See what my argument is? I suspect _strongly_ that this is all
> > completely over-engineered based on theoretical grounds that aren't
> > actually practical grounds.
>
> I also have a separate suggestion: I'm more than happy to do something
> *MUCH SIMPLER*.
>
> If people want just generation counts, we can give them generation
I addressed this in the cover letter:
| How do we rectify this? By putting a safe implementation of getrandom()
| in the vDSO, which has access to whatever information a
| particular iteration of random.c is using to make its decisions. I use
| that careful language of "particular iteration of random.c", because the
| set of things that a vDSO getrandom() implementation might need for making
| decisions as good as the kernel's will likely change over time. This
| isn't just a matter of exporting certain *data* to userspace. We're not
| going to commit to a "data API" where the various heuristics used are
| exposed, locking in how the kernel works for decades to come, and then
| leave it to various userspaces to roll something on top and shoot
| themselves in the foot and have all sorts of complexity disasters.
| Rather, vDSO getrandom() is supposed to be the *same exact algorithm*
| that runs in the kernel, except it's been hoisted into userspace as
| much as possible. And so vDSO getrandom() and kernel getrandom() will
| always mirror each other hermetically.
random.c has a long history of exposing lots of particulars that we've
had to stub out. Enough of that. It's far better to have a function (not
a piece of data!) that uses the *exact same algorithm* and hence has the
exact same guarantees as random.c, and the kernel can keep those in
sync.
Jason
next prev parent reply other threads:[~2024-07-04 18:46 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 17:10 deconflicting new syscall numbers for 6.11 Jason A. Donenfeld
2024-07-04 17:21 ` Linus Torvalds
2024-07-04 17:33 ` Linus Torvalds
2024-07-04 17:47 ` Linus Torvalds
2024-07-04 17:51 ` Jason A. Donenfeld
2024-07-04 17:46 ` Jason A. Donenfeld
2024-07-04 17:55 ` Linus Torvalds
2024-07-04 18:04 ` Jason A. Donenfeld
2024-07-04 18:18 ` Linus Torvalds
2024-07-04 18:35 ` Linus Torvalds
2024-07-04 18:46 ` Jason A. Donenfeld [this message]
2024-07-04 18:52 ` Linus Torvalds
2024-07-04 18:57 ` Jason A. Donenfeld
2024-07-04 19:19 ` Linus Torvalds
2024-07-04 21:07 ` Linus Torvalds
2024-07-04 21:44 ` Arnd Bergmann
2024-07-04 22:07 ` Linus Torvalds
2024-07-05 8:32 ` Arnd Bergmann
2024-07-05 16:59 ` Linus Torvalds
2024-07-05 16:18 ` Jason A. Donenfeld
2024-07-05 17:39 ` Linus Torvalds
2024-07-05 17:53 ` Jason A. Donenfeld
2024-07-05 18:08 ` Linus Torvalds
2024-07-05 18:56 ` Jason A. Donenfeld
2024-07-05 19:21 ` Linus Torvalds
2024-07-05 19:46 ` Linus Torvalds
2024-07-06 0:11 ` Jason A. Donenfeld
2024-07-06 2:10 ` Jason A. Donenfeld
2024-07-06 2:56 ` Linus Torvalds
2024-07-06 23:26 ` Jason A. Donenfeld
2024-07-07 16:56 ` Russell Haley
2024-07-04 18:36 ` Jason A. Donenfeld
2024-07-04 18:44 ` Willy Tarreau
2024-07-05 7:01 ` Matthias Urlichs
2024-07-06 1:14 ` Mathieu Desnoyers
2024-07-06 10:01 ` Florian Weimer
2024-07-06 14:34 ` Zack Weinberg
2024-07-06 15:30 ` Florian Weimer
2024-07-07 20:57 ` Adhemerval Zanella Netto
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=Zobt_M91PEnVobML@zx2c4.com \
--to=jason@zx2c4.com \
--cc=arnd@arndb.de \
--cc=brauner@kernel.org \
--cc=cgzones@googlemail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=torvalds@linux-foundation.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.