Skip to contentSkip to conversation

Linux 5.7.14

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Aug 7, 2020 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.7.14 kernel.

All users of the 5.7 kernel series must upgrade.

The updated 5.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.7.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Makefile                              |    2 
 arch/arm/include/asm/percpu.h         |    2 
 arch/arm64/include/asm/archrandom.h   |    1 
 arch/arm64/include/asm/pointer_auth.h |    8 +++
 arch/arm64/kernel/kaslr.c             |    2 
 drivers/char/random.c                 |    1 
 include/linux/prandom.h               |   78 ++++++++++++++++++++++++++++++++++
 include/linux/random.h                |   63 +--------------------------
 kernel/time/timer.c                   |    8 +++
 lib/random32.c                        |    2 
 10 files changed, 103 insertions(+), 64 deletions(-)

Greg Kroah-Hartman (1):

      Linux 5.7.14

Grygorii Strashko (1):
ARM: percpu.h: fix build error

Linus Torvalds (3):
random32: remove net_rand_state from the latent entropy gcc plugin
random32: move the pseudo-random 32-bit definitions to prandom.h
random: random.h should include archrandom.h, not the other way around

Marc Zyngier (1):
arm64: Workaround circular dependency in pointer_auth.h

Willy Tarreau (2):
random32: update the net random state on interrupt and activity
random: fix circular include dependency on arm64 after addition of percpu.h

author maintainer
#1 lore raw
Makefile +1 -1
index b77b4332a41a..70942a6541d8 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 7
-SUBLEVEL = 13
+SUBLEVEL = 14
 EXTRAVERSION =
 NAME = Kleptomaniac Octopus
 
arch/arm/include/asm/percpu.h +2 -0
index f44f448537f2..1a3eedbac4a2 100644
@@ -5,6 +5,8 @@
 #ifndef _ASM_ARM_PERCPU_H_
 #define _ASM_ARM_PERCPU_H_
 
+#include <asm/thread_info.h>
+
 /*
  * Same as asm-generic/percpu.h, except that we store the per cpu offset
  * in the TPIDRPRW. TPIDRPRW only exists on V6K and V7
arch/arm64/include/asm/archrandom.h +0 -1
index fc1594a0710e..44209f6146aa 100644
@@ -6,7 +6,6 @@
 
 #include <linux/bug.h>
 #include <linux/kernel.h>
-#include <linux/random.h>
 #include <asm/cpufeature.h>
 
 static inline bool __arm64_rndr(unsigned long *v)
arch/arm64/include/asm/pointer_auth.h +7 -1
index c6b4f0603024..be7f853738e6 100644
@@ -3,7 +3,6 @@
 #define __ASM_POINTER_AUTH_H
 
 #include <linux/bitops.h>
-#include <linux/random.h>
 
 #include <asm/cpufeature.h>
 #include <asm/memory.h>
@@ -34,6 +33,13 @@ struct ptrauth_keys_kernel {
 	struct ptrauth_key apia;
 };
 
+/*
+ * Only include random.h once ptrauth_keys_* structures are defined
+ * to avoid yet another circular include hell (random.h * ends up
+ * including asm/smp.h, which requires ptrauth_keys_kernel).
+ */
+#include <linux/random.h>
+
 static inline void ptrauth_keys_init_user(struct ptrauth_keys_user *keys)
 {
 	if (system_supports_address_auth()) {
arch/arm64/kernel/kaslr.c +1 -1
index 91a83104c6e8..e2101440c314 100644
@@ -10,8 +10,8 @@
 #include <linux/mm_types.h>
 #include <linux/sched.h>
 #include <linux/types.h>
+#include <linux/random.h>
 
-#include <asm/archrandom.h>
 #include <asm/cacheflush.h>
 #include <asm/fixmap.h>
 #include <asm/kernel-pgtable.h>
drivers/char/random.c +1 -0
index 0d10e31fd342..344a57ebb35e 100644
@@ -1277,6 +1277,7 @@ void add_interrupt_randomness(int irq, int irq_flags)
 
 	fast_mix(fast_pool);
 	add_interrupt_bench(cycles);
+	this_cpu_add(net_rand_state.s1, fast_pool->pool[cycles & 3]);
 
 	if (unlikely(crng_init == 0)) {
 		if ((fast_pool->count >= 64) &&
include/linux/prandom.h new file +78 -0

78 lines not on this page · raw message

include/linux/random.h +4 -59

75 lines not on this page · raw message

kernel/time/timer.c +8 -0
index 03c9fc395ab1..721d5af8cfc7 100644
@@ -43,6 +43,7 @@
 #include <linux/sched/debug.h>
 #include <linux/slab.h>
 #include <linux/compat.h>
+#include <linux/random.h>
 
 #include <linux/uaccess.h>
 #include <asm/unistd.h>
@@ -1743,6 +1744,13 @@ void update_process_times(int user_tick)
 	scheduler_tick();
 	if (IS_ENABLED(CONFIG_POSIX_TIMERS))
 		run_posix_cpu_timers();
+
+	/* The current CPU might make use of net randoms without receiving IRQs
+	 * to renew them often enough. Let's update the net_rand_state from a
+	 * non-constant value that's not affine to the number of calls to make
+	 * sure it's updated when there's some activity (we don't care in idle).
+	 */
+	this_cpu_add(net_rand_state.s1, rol32(jiffies, 24) + user_tick);
 }
 
 /**
lib/random32.c +1 -1
index 763b920a6206..3d749abb9e80 100644
@@ -48,7 +48,7 @@ static inline void prandom_state_selftest(void)
 }
 #endif
 
-static DEFINE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy;
+DEFINE_PER_CPU(struct rnd_state, net_rand_state);
 
 /**
  *	prandom_u32_state - seeded pseudo-random number generator.