Skip to content

Commit

Permalink
random32: remove net_rand_state from the latent entropy gcc plugin
Browse files Browse the repository at this point in the history
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 f227e3e ("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 <[email protected]>
Cc: Emese Revfy <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Willy Tarreau <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Jul 30, 2020
1 parent d3590eb commit 83bdc72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,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);
Expand Down
2 changes: 1 addition & 1 deletion lib/random32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 83bdc72

Please sign in to comment.