linux-stable/drivers/bus
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
..
fsl-mc bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove() 2022-06-10 15:53:12 +02:00
mhi treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
Kconfig bus: add driver for initializing the SSC bus on (some) qcom SoCs 2022-04-19 13:03:57 -05:00
Makefile bus: add driver for initializing the SSC bus on (some) qcom SoCs 2022-04-19 13:03:57 -05:00
arm-cci.c
arm-integrator-lm.c bus: arm-integrator-lm: Add of_node_put() before return statement 2021-01-15 17:53:05 +01:00
brcmstb_gisb.c bus: brcmstb_gisb: Remove the suppress_bind_attrs attribute of the driver 2022-04-26 09:12:45 -07:00
bt1-apb.c bus: bt1-apb: Don't print error on -EPROBE_DEFER 2022-06-14 12:21:44 +02:00
bt1-axi.c bus: bt1-axi: Don't print error on -EPROBE_DEFER 2022-06-14 12:21:44 +02:00
da8xx-mstpri.c
hisi_lpc.c bus: hisi_lpc: Use platform_device_register_full() 2022-09-08 02:27:29 +00:00
imx-weim.c bus: imx-weim: make symbol 'weim_of_notifier' static 2022-04-11 16:04:53 +08:00
intel-ixp4xx-eb.c bus: ixp4xx: return on error in ixp4xx_exp_probe() 2021-08-12 22:34:13 +02:00
mips_cdmm.c mips: cdmm: Fix refcount leak in mips_cdmm_phys_base 2022-03-14 15:01:51 +01:00
moxtet.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
mvebu-mbus.c bus: mvebu-mbus: use DEFINE_SHOW_ATTRIBUTE to simplify mvebu_{sdram/devs}_debug 2022-09-24 14:59:26 +02:00
omap-ocp2scp.c
omap_l3_noc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
omap_l3_noc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
omap_l3_smx.c
omap_l3_smx.h
qcom-ebi2.c bus: qcom-ebi2: Fix incorrect documentation for '{slow,fast}_cfg' 2021-05-26 21:19:23 -05:00
qcom-ssc-block-bus.c bus: add driver for initializing the SSC bus on (some) qcom SoCs 2022-04-19 13:03:57 -05:00
simple-pm-bus.c drivers: bus: simple-pm-bus: Add support for probing simple bus only devices 2021-10-05 17:47:15 +02:00
sun50i-de2.c bus: sun50i-de2: Adjust printing error message 2021-10-13 14:48:48 +02:00
sunxi-rsb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
tegra-aconnect.c
tegra-gmi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
ti-pwmss.c
ti-sysc.c Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
ts-nbus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
uniphier-system-bus.c
vexpress-config.c bus: vexpress-config: Support building as module 2020-05-13 12:42:46 -05:00