diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-29 19:11:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-07 09:38:41 +0200 |
commit | 8dacd74f7987c1e744e988cb12fd18ab1aa2d6e0 (patch) | |
tree | 44759b9fe30c57543e1dec3395efaf138f1bd5d7 | |
parent | 8de9a00bf997a62df8a2a1ba3d0d8eb73f55b463 (diff) |
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 <sfr@canb.auug.org.au>
Cc: Emese Revfy <re.emese@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/linux/random.h | 2 | ||||
-rw-r--r-- | lib/random32.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index 5fcb0c42a8b9..02e7e797b19a 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -117,7 +117,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 bab8adfd7014..6e2c48ab8072 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -48,7 +48,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. |