summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/cookie.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-10-09 20:44:02 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2022-11-18 02:18:02 +0100
commit552f41b0b2b0d280cb79b5726db0ae883e9c5aec (patch)
treeb883b2b30d131474ec4cadc246355154ee06f274 /drivers/net/wireguard/cookie.c
parent4d105fa0c8e33832c7d38db16ad296a48be864e6 (diff)
downloadwireguard-linux-trimmed-552f41b0b2b0d280cb79b5726db0ae883e9c5aec.tar.gz
wireguard-linux-trimmed-552f41b0b2b0d280cb79b5726db0ae883e9c5aec.zip
treewide: use get_random_u32_inclusive() when possible
These cases were done with this Coccinelle: @@ expression H; expression L; @@ - (get_random_u32_below(H) + L) + get_random_u32_inclusive(L, H + L - 1) @@ expression H; expression L; expression E; @@ get_random_u32_inclusive(L, H - + E - - E ) @@ expression H; expression L; expression E; @@ get_random_u32_inclusive(L, H - - E - + E ) @@ expression H; expression L; expression E; expression F; @@ get_random_u32_inclusive(L, H - - E + F - + E ) @@ expression H; expression L; expression E; expression F; @@ get_random_u32_inclusive(L, H - + E + F - - E ) And then subsequently cleaned up by hand, with several automatic cases rejected if it didn't make sense contextually. Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> # for infiniband Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/net/wireguard/cookie.c')
0 files changed, 0 insertions, 0 deletions