]> git.itanic.dy.fi Git - linux-stable/commit
random: add 8-bit and 16-bit batches
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 28 Sep 2022 16:47:30 +0000 (18:47 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 29 Sep 2022 19:37:27 +0000 (21:37 +0200)
commit585cd5fe9f7378601b1d4915ad6e9088333b5e5e
treedc9ebd5ca10e1341b6ec92bb75bdd0f9e9576485
parent37608ba315a2b1b548aa5b1064e5559e029cb016
random: add 8-bit and 16-bit batches

There are numerous places in the kernel that would be sped up by having
smaller batches. Currently those callsites do `get_random_u32() & 0xff`
or similar. Since these are pretty spread out, and will require patches
to multiple different trees, let's get ahead of the curve and lay the
foundation for `get_random_u8()` and `get_random_u16()`, so that it's
then possible to start submitting conversion patches leisurely.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c
include/linux/random.h