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] [day] [month] [year] [list]
Message-ID: <YzQyEFMNCcDmJMdX@linutronix.de>
Date:   Wed, 28 Sep 2022 13:37:52 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org,
        Sultan Alsawaf <sultan@...neltoast.com>
Subject: Re: [PATCH] random: avoid reading two cache lines on irq randomness

On 2022-09-23 20:28:49 [+0200], Jason A. Donenfeld wrote:
> In order to avoid reading and dirtying two cache lines on every IRQ, move
> the work_struct to the bottom of the fast_pool struct. add_interrupt_
> randomness() always touches .pool and .count, which are currently split,
> because .mix pushes everything down. Instead, move .mix to the bottom,
> so that .pool and .count are always in the first cache line, since the
> .mix is only accessed when the pool is full.
> 
> Fixes: 58340f8e952b ("random: defer fast pool mixing to worker")
> Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Cc: Sultan Alsawaf <sultan@...neltoast.com>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>

Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

Yup, makes sense.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ