aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJason A. Donenfeld <[email protected]>2022-10-05 17:23:53 +0200
committerJason A. Donenfeld <[email protected]>2022-10-11 17:42:58 -0600
commitf743f16c548b1a2633e8b6034058d6475d7f26a3 (patch)
treec163930a1808d49fcb6bdcb897f88e3a7f8dc62e /tools
parent7e3cf0843fe505491baa05e355e83e6997e089dd (diff)
treewide: use get_random_{u8,u16}() when possible, part 2
Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value, simply use the get_random_{u8,u16}() functions, which are faster than wasting the additional bytes from a 32-bit value. This was done by hand, identifying all of the places where one of the random integer functions was used in a non-32-bit context. Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Yury Norov <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Acked-by: Heiko Carstens <[email protected]> # for s390 Signed-off-by: Jason A. Donenfeld <[email protected]>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions