Thread (11 messages) 11 messages, 3 authors, 2022-10-06

Re: [PATCH v2 1/5] treewide: use prandom_u32_max() when possible

From: Jan Kara <jack@suse.cz>
Date: 2022-10-06 16:25:00
Also in: dri-devel, kernel-janitors, linux-block, linux-crypto, linux-doc, linux-fsdevel, linux-media, linux-mm, linux-mmc, linux-nvme, linux-patches, linux-rdma, linux-usb, linux-wireless, lkml

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 <redacted>
Reviewed-by: KP Singh <kpsingh@kernel.org>
Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

for the ext2, ext4, and lib/sbitmap.c bits.

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help