acrn-kernel/fs/ext2
Jason A. Donenfeld 8b3ccbc1f1 treewide: use prandom_u32_max() when possible, part 2
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. This was
done by hand, covering things that coccinelle could not do on its own.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz> # for ext2, ext4, and sbitmap
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-10-11 17:42:58 -06:00
..
Kconfig ext2: use iomap_fiemap to implement ->fiemap 2021-07-27 11:00:32 +02:00
Makefile
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
acl.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
balloc.c ext2: replace bh_submit_read() helper with bh_read() 2022-09-11 20:26:08 -07:00
dir.c ext2: Use a folio in ext2_get_page() 2022-08-02 12:34:03 -04:00
ext2.h ext2: remove nobh support 2022-08-02 12:34:04 -04:00
file.c ext2: Convert to using invalidate_lock 2021-07-13 14:29:00 +02:00
ialloc.c treewide: use prandom_u32_max() when possible, part 2 2022-10-11 17:42:58 -06:00
inode.c Folio changes for 6.0 2022-08-03 10:35:43 -07:00
ioctl.c ext2: convert to fileattr 2021-04-12 15:04:29 +02:00
namei.c vfs: open inside ->tmpfile() 2022-09-24 07:00:00 +02:00
super.c ext2: Use kvmalloc() for group descriptor array 2022-09-26 14:59:52 +02:00
symlink.c
xattr.c ext2: avoid deleting xattr block that is being reused 2022-08-02 23:56:25 -04:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c