From c4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7 Mon Sep 17 00:00:00 2001 From: Martin Borg Date: Fri, 23 Mar 2018 14:01:03 +0100 Subject: boot_time_opt: update host boot time optimization patches for 4.14 The new patches are based on: https://github.com/clearlinux-pkgs/linux-lts commit 5595fe425a52af6734235a1a953b6b03210060ec Signed-off-by: Martin Borg Signed-off-by: Adrian Dudau --- .../0118-give-rdrand-some-credit.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 patches/boot_time_opt/0118-give-rdrand-some-credit.patch (limited to 'patches/boot_time_opt/0118-give-rdrand-some-credit.patch') diff --git a/patches/boot_time_opt/0118-give-rdrand-some-credit.patch b/patches/boot_time_opt/0118-give-rdrand-some-credit.patch new file mode 100644 index 0000000..a7abd53 --- /dev/null +++ b/patches/boot_time_opt/0118-give-rdrand-some-credit.patch @@ -0,0 +1,30 @@ +From 7b90a7bba60360a4585cf317b092e266e6a81e76 Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Fri, 29 Jul 2016 19:10:52 +0000 +Subject: [PATCH 118/126] give rdrand some credit + +try to credit rdrand/rdseed with some entropy + +In VMs but even modern hardware, we're super starved for entropy, and while we can +and do wear a tin foil hat, it's very hard to argue that +rdrand and rdtsc add zero entropy. +--- + drivers/char/random.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/char/random.c b/drivers/char/random.c +index 8ad92707e45f..1729d2e733e5 100644 +--- a/drivers/char/random.c ++++ b/drivers/char/random.c +@@ -1666,6 +1666,8 @@ static void init_std_data(struct entropy_store *r) + if (!arch_get_random_seed_long(&rv) && + !arch_get_random_long(&rv)) + rv = random_get_entropy(); ++ else ++ credit_entropy_bits(r, 1); + mix_pool_bytes(r, &rv, sizeof(rv)); + } + mix_pool_bytes(r, utsname(), sizeof(*(utsname()))); +-- +2.15.0 + -- cgit v1.2.3-54-g00ecf