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: <CAHmME9pQ4vp0jHpOyQXHRbJ-xQKYapQUsWPrLouK=dMO56y1zA@mail.gmail.com>
Date:   Mon, 20 Dec 2021 16:07:28 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     "Theodore Ts'o" <tytso@....edu>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH RESEND] random: use correct memory barriers for crng_node_pool

Hi Eric,

This patch seems fine to me, and I'll apply it in a few days after
sitting on the list for comments, but:

> Note: READ_ONCE() could be used instead of smp_load_acquire(), but it is
> harder to verify that it is correct, so I'd prefer not to use it here.
> (https://lore.kernel.org/lkml/20200916233042.51634-1-ebiggers@kernel.org/T/#u),
> and though it's a correct fix, it was derailed by a debate about whether
> it's safe to use READ_ONCE() instead of smp_load_acquire() or not.

But holy smokes... I chuckled at your, "please explain in English." :)

Paul - if you'd like to look at this patch and confirm that this
specific patch and usage is fine to be changed into READ_ONCE()
instead of smp_load_acquire(), please pipe up here. And I really do
mean this specific patch and usage, not to be confused with any other
usage elsewhere in the kernel or question about general things, which
doubtlessly involve larger discussions like the one Eric linked to
above. If you're certain this patch here is READ_ONCE()able, I'd
appreciate your saying so with a simple, "it is safe; go for it",
since I'd definitely like the optimization if it's safe. If I don't
hear from you, I'll apply this as-is from Eric, as I'd rather be safe
than sorry.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ