[PATCH v2 1/5] treewide: use prandom_u32_max() when possible
Jan Kara
jack at suse.cz
Thu Oct 6 16:24:43 UTC 2022
On Thu 06-10-22 07:25:06, Jason A. Donenfeld wrote:
> Rather than incurring a division or requesting too many random bytes for
> the given range, use the prandom_u32_max() function, which only takes
> the minimum required bytes from the RNG and avoids divisions.
>
> Reviewed-by: Kees Cook <keescook at chromium.org>
> Reviewed-by: KP Singh <kpsingh at kernel.org>
> Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder at linbit.com>
> Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
Feel free to add:
Reviewed-by: Jan Kara <jack at suse.cz>
for the ext2, ext4, and lib/sbitmap.c bits.
Honza
--
Jan Kara <jack at suse.com>
SUSE Labs, CR
More information about the dri-devel
mailing list