lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YufkZU9kGkHHUhAK@linutronix.de>
Date:   Mon, 1 Aug 2022 16:34:13 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] random: use raw spinlocks for use on RT

On 2022-08-01 16:25:31 [+0200], Jason A. Donenfeld wrote:
> After handling several bug reports using various creative solutions,
> it's becoming clear that random bytes are actually a useful thing to
> happen from any ordinary context, including when interruptsare off.
> Actually, that's been long recognized, which is why the RNG uses
> spinlocks rather than mutexes. But on RT, those spinlocks are getting
> converted back into sleeping locks.
> 
> This clearly is causing more problems than it might hypothetically
> solve. Additionally, the locks in random.c are generally for fixed
> durations doing CPU-bound operations -- no waiting for hardware or I/O
> or the like. So this shouldn't result in a real harm to latency.
> 
> Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
> Sebastian - I won't move forward with this without your Ack, obviously.
> What do you think of this general approach? -Jason

I would need to do worst-case measurements and I've been looking at this
just before writting the other email and there was a local_lock_t
somewhere which needs also change…

So I have everything ready for 5.20 (6.0) ready without the RT patch and
then this vsprintf issues comes along…
From that point of view I would prefer to either init it upfront in a
way that works for everyone/ loose the first %p since it is probably a
minor inconvenience if nobody complains - instead swapping all locks.
We managed without this for kasan and lockdep which are both not used in
a production environment.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ