| b86f7c9f | 25-Sep-2024 |
Ran Xiaokai <[email protected]> |
kcsan: Remove redundant call of kallsyms_lookup_name()
There is no need to repeatedly call kallsyms_lookup_name, we can reuse the return value of this function.
Signed-off-by: Ran Xiaokai <ran.xiao
kcsan: Remove redundant call of kallsyms_lookup_name()
There is no need to repeatedly call kallsyms_lookup_name, we can reuse the return value of this function.
Signed-off-by: Ran Xiaokai <[email protected]> Signed-off-by: Marco Elver <[email protected]>
show more ...
|
| e8a533cb | 10-Oct-2022 |
Jason A. Donenfeld <[email protected]> |
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
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 <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> # for infiniband Signed-off-by: Jason A. Donenfeld <[email protected]>
show more ...
|