random number generator fixes for 5.17-rc1
Hi Linus,
Please pull the following fixes, intended for 5.17-rc1:
1) Some Kconfig changes resulted in BIG_KEYS being unselectable, which Justin sent a patch to fix.
2) Geert pointed out that moving to BLAKE2s bloated vmlinux on little machines, like m68k, so we now compensate for this.
3) Numerous style and house cleaning fixes, meant to have a cleaner base for future changes.
Thanks,
Jason
The following changes since commit fe81ba137ebcc7f236780996a0b375732c07e85c:
Merge tag 'ata-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata (2022-01-18 10:14:49 +0200)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git random-5.17-rc1-for-linus
for you to fetch changes up to a254a0e4093fce8c832414a83940736067eed515:
random: simplify arithmetic function flow in account() (2022-01-18 13:03:56 +0100)
----------------------------------------------------------------
Jason A. Donenfeld (14):
lib/crypto: blake2s: move hmac construction into wireguard lib/crypto: sha1: re-roll loops to reduce code size
random: cleanup poolinfo abstraction
random: cleanup integer types
random: remove incomplete last_data logic
random: remove unused extract_entropy() reserved argument
random: rather than entropy_store abstraction, use global
random: remove unused OUTPUT_POOL constants
random: de-duplicate INPUT_POOL constants
random: prepend remaining pool constants with POOL_
random: cleanup fractional entropy shift constants
random: access input_pool_data directly rather than through pointer
random: selectively clang-format where it makes sense
random: simplify arithmetic function flow in account()
Justin M. Forbes (1):
lib/crypto: add prompts back to crypto libraries
Schspa Shi (1):
random: fix typo in comments
crypto/Kconfig | 2 - drivers/char/random.c | 627 ++++++++++++++++++------------------------ drivers/net/wireguard/noise.c | 45 ++- include/crypto/blake2s.h | 3 - include/trace/events/random.h | 56 ++-- lib/Kconfig | 2 + lib/crypto/Kconfig | 17 +- lib/crypto/blake2s-selftest.c | 31 --- lib/crypto/blake2s.c | 37 --- lib/sha1.c | 95 +------ 10 files changed, 352 insertions(+), 563 deletions(-)
Quoted 3 lines · Jason A. Donenfeld
1) Some
Kconfigchanges resulted inBIG_KEYSbeing unselectable, which Justin sent a patch to fix.
Ugh. I think the old "don't ask" model was the correct one, and BIG_KEYS is probably broken (ie it should just select whatever crypto it wants, not depend on people having selected it).
But I've taken this.
On a tangential note - looking at the resulting config file, I do note that 'CRYPTO_LIB_POLY1305_RSIZE' should probably depend on CRYPTO_LIB_POLY1305, because right now that sily thing gets set whether POLY1305 is enabled or not.
That was true before too, of course - not related to this pull except in the "this caused me to look at the end result" sense.
Linus
Hey Linus,
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Jason A. Donenfeld
1) Some
Kconfigchanges resulted inBIG_KEYSbeing unselectable, which Justin sent a patch to fix.Ugh. I think the old "don't ask" model was the correct one, and
BIG_KEYSis probably broken (ie it should just select whatever crypto it wants, not depend on people having selected it).
Yea, I agree entirely there. Fixing that was my first inclination, until I was told to just fix what I broke directly and leave future changes to Herbert's tree. In general, the lib/crypto stuff is terribly broken, an unholy mix of cross dependencies between the cryptoapi and the library code, with little clean separation between things. My zinc "rewrite" project aimed to fix this all, but alas. So with everything still held together with bubblegum and scotch tape, we're still seeing the fallout from the cruft in various ways, this being one of them. This morning it looks like another thing has been unearthed, regarding an interaction between a subtle Clang CFI bug and weak symbols, so unless the compiler people tell me, "oh, let us just fix that in our experimental CFI implementation", which they may well might, I may be sending you another patch at some point. Hopefully for 5.18, we can make some headway for actually fixing some of this stuff up the proper way.
Quoted 7 lines
On a tangential note - looking at the resulting config file, I do note that '
CRYPTO_LIB_POLY1305_RSIZE' should probably depend onCRYPTO_LIB_POLY1305, because right now that sily thing gets set whether POLY1305 is enabled or not.That was true before too, of course - not related to this pull except in the "this caused me to look at the end result" sense.
Noted, thanks.
Jason
The pull request you sent on Tue, 18 Jan 2022 17:49:06 +0100:
The pull request you sent on Tue, 18 Jan 2022 17:49:06 +0100:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git random-5.17-rc1-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0ed905975612ea67224af26fd6bfbac965b6d029
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html