linux-stable/drivers/bus/mhi/host
Jason A. Donenfeld e8a533cbeb 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>
2022-11-18 02:18:02 +01:00
..
Kconfig
Makefile
boot.c bus: mhi: host: Bail on writing register fields if read fails 2022-04-23 18:57:32 +05:30
debugfs.c bus: mhi: Make mhi_state_str[] array static inline and move to common.h 2022-03-18 14:02:55 +01:00
init.c bus: mhi: host: Move IRQ allocation to controller registration phase 2022-06-24 12:54:19 +05:30
internal.h treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
main.c bus: mhi: host: Fix up null pointer access in mhi_irq_handler 2022-08-29 22:33:46 +05:30
pci_generic.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
pm.c bus: mhi: host: Move IRQ allocation to controller registration phase 2022-06-24 12:54:19 +05:30