From: Linus Torvalds Date: Thu, 30 Jul 2020 02:11:00 +0000 (-0700) Subject: random32: remove net_rand_state from the latent entropy gcc plugin X-Git-Tag: v4.9.233~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ce7dd3f42f45ea2900fe18a6ff78cfc4a69e6a4;p=platform%2Fkernel%2Flinux-amlogic.git random32: remove net_rand_state from the latent entropy gcc plugin commit 83bdc7275e6206f560d247be856bceba3e1ed8f2 upstream. It turns out that the plugin right now ends up being really unhappy about the change from 'static' to 'extern' storage that happened in commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity"). This is probably a trivial fix for the latent_entropy plugin, but for now, just remove net_rand_state from the list of things the plugin worries about. Reported-by: Stephen Rothwell Cc: Emese Revfy Cc: Kees Cook Cc: Willy Tarreau Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/random.h b/include/linux/random.h index 4b8ed93..30972a9 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -56,7 +56,7 @@ struct rnd_state { __u32 s1, s2, s3, s4; }; -DECLARE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy; +DECLARE_PER_CPU(struct rnd_state, net_rand_state); u32 prandom_u32_state(struct rnd_state *state); void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); diff --git a/lib/random32.c b/lib/random32.c index f1eb3dc..889dab4 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -47,7 +47,7 @@ static inline void prandom_state_selftest(void) } #endif -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.