Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ This bug was initially created as a clone of Bug #1830280 +++
Split out from discussions in this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1778762#c23
The high level here is "synchronize with the current state of Fedora" for how entropy (/dev/random) works. The two bigger recent changes in Linux are the builtin kernel jitter entropy (covered by the above bug) as well as CONFIG_RANDOM_TRUST_CPU (this bug).
Modern AWS instance types have hardware with RDRAND, but there's still no hypervisor entropy (unlike GCP which offers virtio-rng).
Booting a m5d.4xlarge instance for example, firstboot has:
[ 19.887867] random: crng init done
That's quite slow; now obviously there are projects like rng-tools that try to address this but the problem is that particularly for CoreOS, we do a whole lot inside the initial ramdisk, so any userspace solution like rng-tools basically needs to be nearly the first process started - we want to support things like dm-crypt for the root filesystem.
And not to mention a lot of parts of the kernel want entropy even before userspace is launched.
Whereas instead if I do:
# rpm-ostree kargs --append=random.trust_cpu=on
# systemctl reboot
I see the same thing we have with FCOS:
[ 0.001000] random: crng done (trusting CPU's manufacturer)
i.e. basically immediately after kernel boot we aren't going to block on strong entropy.
Now, we *could* enable this kernel argument just for RHCOS but I'd want to see an argument for why we don't have it enabled by default across the board (like Fedora has).
Looks like the CONFIG_RANDOM_TRUST_CPU settings got lost in the RHEL9 kernel, but are set in the RHEL8 and Fedora kernels, thus we might want to enable this in RHEL9 kernels again:
$ grep -r CONFIG_RANDOM_TRUST_CPU redhat/
redhat/configs/common/generic/CONFIG_RANDOM_TRUST_CPU:# CONFIG_RANDOM_TRUST_CPU is not set
redhat/configs/fedora/generic/powerpc/CONFIG_RANDOM_TRUST_CPU:CONFIG_RANDOM_TRUST_CPU=y
redhat/configs/fedora/generic/s390x/CONFIG_RANDOM_TRUST_CPU:CONFIG_RANDOM_TRUST_CPU=y
redhat/configs/fedora/generic/x86/CONFIG_RANDOM_TRUST_CPU:CONFIG_RANDOM_TRUST_CPU=y
RHEL-8 configs are:
config-4.18.0-326.el8.ppc64le:CONFIG_RANDOM_TRUST_CPU=y
config-4.18.0-326.el8.s390x:CONFIG_RANDOM_TRUST_CPU=y
config-4.18.0-326.el8.x86_64:CONFIG_RANDOM_TRUST_CPU=y
make the same for the RHEL9.
the change has actually appeared in the 5.14.0-0.rc4.35.el9 version
of C9S and RHEL9 kernels, this bz is ready for tests:
c9s: kernel-core-5.14.0-0.rc4.35.el9.x86_64.rpm
$ grep TRUST_CPU lib/modules/5.14.0-0.rc4.35.el9.x86_64/config
CONFIG_RANDOM_TRUST_CPU=y
rhel9: kernel-core-5.14.0-0.rc4.35.el9.x86_64.rpm
$ grep -e TRUST_CPU -e RHEL lib/modules/5.14.0-0.rc4.35.el9.x86_64/config
CONFIG_RANDOM_TRUST_CPU=y
CONFIG_RHEL_DIFFERENCES=y