lkml.org 
[lkml]   [2022]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT pull] locking/urgent for 5.19-rc3
On Sun, Jun 19, 2022 at 11:38 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> This was initially my concern too, which I expressed to Sebastian, but
> he made the point that this area here is rather "special". Actually,
> randomness isn't really required here.

That wasn't really my point.

My point was that there are a lot of uses of prandom_u32() and friends
in random places. Just grepping for it, there's lots of different
drivers that use it. Who knows what locking they have.

Clearly nobody *thought* about it. This one issue is purely about RT
correctness, but how about all the uses that just want a pseudo-random
number and may have performance issues, or may be calling things so
much that a lock is just bad.

The thing is, that prandom code used to be FAST. Not just "no locks",
but also "fairly simple siphash round because its a PSEUDO random
thing and shouldn't be anything more".

The whole "make it use the same randomness" may just have been a huge
and fundamental mistake.

We've seen one actual outright bug because of it already. That was
easy to fix by avoiding the new thing that now was a mistake. What
about all the other uses with lock bouncing or whatever subtler issues
that aren't pointed out by outright correctness tests?

Linus

\
 
 \ /
  Last update: 2022-06-19 22:07    [W:1.645 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site