summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0120-give-rdrand-some-credit.patch
diff options
context:
space:
mode:
authorMartin Borg <martin.borg@enea.com>2018-03-23 14:01:03 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2018-03-26 09:57:31 +0200
commitc4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7 (patch)
treee46d5f9bceca1947817b7739d366aa44faea9be1 /patches/boot_time_opt/0120-give-rdrand-some-credit.patch
parentdfc8946f58bbf4aa3a345c4fb5d5895502936edd (diff)
downloadenea-kernel-cache-c4bd5f6e084a6ced2c7a2f76798d0a34947ffeb7.tar.gz
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 <martin.borg@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'patches/boot_time_opt/0120-give-rdrand-some-credit.patch')
-rw-r--r--patches/boot_time_opt/0120-give-rdrand-some-credit.patch30
1 files changed, 0 insertions, 30 deletions
diff --git a/patches/boot_time_opt/0120-give-rdrand-some-credit.patch b/patches/boot_time_opt/0120-give-rdrand-some-credit.patch
deleted file mode 100644
index 4b1669c..0000000
--- a/patches/boot_time_opt/0120-give-rdrand-some-credit.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From 5cc978db25b2c92707f68b15098ac39901fb5aac Mon Sep 17 00:00:00 2001
2From: Arjan van de Ven <arjan@linux.intel.com>
3Date: Fri, 29 Jul 2016 19:10:52 +0000
4Subject: [PATCH 120/124] give rdrand some credit
5
6try to credit rdrand/rdseed with some entropy
7
8In VMs but even modern hardware, we're super starved for entropy, and while we can
9and do wear a tin foil hat, it's very hard to argue that
10rdrand and rdtsc add zero entropy.
11---
12 drivers/char/random.c | 2 ++
13 1 file changed, 2 insertions(+)
14
15diff --git a/drivers/char/random.c b/drivers/char/random.c
16index d6876d506220..fca09af81b2c 100644
17--- a/drivers/char/random.c
18+++ b/drivers/char/random.c
19@@ -1638,6 +1638,8 @@ static void init_std_data(struct entropy_store *r)
20 if (!arch_get_random_seed_long(&rv) &&
21 !arch_get_random_long(&rv))
22 rv = random_get_entropy();
23+ else
24+ credit_entropy_bits(r, 1);
25 mix_pool_bytes(r, &rv, sizeof(rv));
26 }
27 mix_pool_bytes(r, utsname(), sizeof(*(utsname())));
28--
292.11.1
30