Skip to contentSkip to conversation

random number generator fixes for 5.18-rc1

GIT PULL Merged Jason A. Donenfeld 3 participants 4 messages Mar 31, 2022

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull 5 small patches for 5.18-rc1:

- If a hardware random number generator passes a sufficiently large chunk of entropy to random.c during early boot, we now skip the "fast_init" business and let it initialize the RNG. This makes CONFIG_RANDOM_TRUST_BOOTLOADER=y actually useful.

- We already have the command line random.trust_cpu=0/1 option for RDRAND, which let distros enable CONFIG_RANDOM_TRUST_CPU=y while placating concerns of more paranoid users. Now we add random.trust_bootloader=0/1 so that distros can similarly enable CONFIG_RANDOM_TRUST_BOOTLOADER=y.

- Re-add a comment that got removed by accident in the recent revert.

- Add the spec-compliant ACPI CID for vmgenid, which Microsoft added to the vmgenid spec at Ard's request during earlier review.

- Restore build-time randomness via the latent entropy plugin, which was lost when we transitioned to using a hash function.

Thanks,
Jason

PS: I noticed that for my previous pull request, in your merge commit, you replaced my numbered list with a bulleted list, and even went through the trouble of adjusting the irregular spacing caused by numbers >9. Impressed by this wild attention to detail, and imagining you clickity-clacking away in uemacs, I'll stick to hyphen-bullets now.

The following changes since commit 34af78c4e616c359ed428d79fe4758a35d2c5473:

Merge tag 'iommu-updates-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu (2022-03-24 19:48:57 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-5.18-rc1-for-linus

for you to fetch changes up to 1754abb3e7583c570666fa1e1ee5b317e88c89a0:

random: mix build-time latent entropy into pool at init (2022-03-31 16:43:27 -0400)

----------------------------------------------------------------
Random number generator fixes for Linux 5.18-rc1.

----------------------------------------------------------------
Jason A. Donenfeld (4):
random: skip fast_init if hwrng provides large chunk of entropy
random: treat bootloader trust toggle the same way as cpu trust toggle
random: re-add removed comment about get_random_{u32,u64} reseeding
random: mix build-time latent entropy into pool at init

Michael Kelley (1):
virt: vmgenid: recognize new CID added by Hyper-V

 Documentation/admin-guide/kernel-parameters.txt |  6 ++++++
 drivers/char/Kconfig                            |  3 ++-
 drivers/char/random.c                           | 22 +++++++++++++++++-----
 drivers/virt/vmgenid.c                          |  1 +
 4 files changed, 26 insertions(+), 6 deletions(-)
#1 lore raw
Quoted 6 lines · Jason A. Donenfeld

PS: I noticed that for my previous pull request, in your merge commit, you replaced my numbered list with a bulleted list, and even went through the trouble of adjusting the irregular spacing caused by numbers >9. Impressed by this wild attention to detail, and imagining you clickity-clacking away in uemacs, I'll stick to hyphen-bullets now.

Heh. I just care fairly deeply about commit messages in general, and my own in particular.

As a result, I try to make my merge messages be *somewhat* consistent in layout, and with N different people sending my pull requests in usually N+4 different formats, it means that I am very used to just reformatting things so that *most* of my merges tend to follow one of a few standard templates.

The standard templates I tend to aim for are

(a) just regular quoted human-legible prose

(b) bullet lists (sometimes with multiple levels of indentation)

(c) a combination of the above: a human-readable introduction
followed by a bullet list.

(d) Headers (eg "New drivers:", or "Fixes" vs "New code") with bullet lists

and if it's some other format I usually try to make it conform to one of the above.

Along with just fixing typos and grammar as I find them.

And to make it even more exciting, sometimes part of it comes from the pull request email, and another part from the signed tag.

But yeah, it does make it easier if the pull request already comes in one of the normal formats. Then I generally just need to reflow things for the common indentation.

But I do this _so_ much that I mostly don't even think about it any more. I basically do it while reading the explanation. So while it _has_ happened that I've complained about formatting, it must be pretty egregious for me to really react.

Much more commonly I complain about people just not describing their pull request well enough, not about some "you don't conform to the usual formatting".

Linus

#2 lore raw
Quoted 2 lines · Linus Torvalds

The standard templates I tend to aim for are

Note the "tend". No guarantees. The numbered lists do exist, and do still get through.

For example, Davem used to always do them all the time for networking pulls, so that actually used to happen more often. Now Jakub uses the "Headers with bullet lists" format, so it's fallen out of use somewhat.

Linus

merge bot Merged
#3 lore raw
In reply to Jason A. Donenfeld
The pull request you sent on Thu, 31 Mar 2022 17:23:52 -0400:

The pull request you sent on Thu, 31 Mar 2022 17:23:52 -0400:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-5.18-rc1-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/478f74a3d8085076dfcb481aa9361b808a6aae94

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html