linux-stable/drivers/net
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
..
appletalk
arcnet
bonding treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
caif
can can: rcar_canfd: Add missing ECC error checks for channels 2-7 2022-11-07 14:00:27 +01:00
dsa net: dsa: Fix possible memory leaks in dsa_loop_init() 2022-10-28 10:32:59 +01:00
ethernet treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
fddi
fjes
hamradio hamradio: fix issue of dev reference count leakage in bpq_device_event() 2022-11-07 09:32:28 +00:00
hippi
hyperv net: hv_netvsc: Fix a warning triggered by memcpy in rndis_filter 2022-10-15 11:09:53 +01:00
ieee802154
ipa net: ipa: don't configure IDLE_INDICATION on v3.1 2022-10-25 19:49:13 -07:00
ipvlan
mctp
mdio net: mdiobus: search for PSE nodes by parsing PHY nodes. 2022-10-03 17:33:57 -07:00
netdevsim netdevsim: remove dir in nsim_dev_debugfs_init() when creating ports dir failed 2022-10-27 10:47:29 -07:00
pcs
phy treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
plip
ppp
pse-pd net: pse-pd: PSE_REGULATOR should depend on REGULATOR 2022-10-05 20:32:28 -07:00
slip
team treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
usb TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
vmxnet3
vxlan
wan net: lapbether: fix issue of invalid opcode in lapbeth_open() 2022-11-08 12:47:36 +01:00
wireguard treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
wireless treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
wwan net: wwan: iosm: fix kernel test robot reported errors 2022-11-09 14:00:25 +00:00
xen-netback
Kconfig - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
LICENSE.SRC
Makefile net: add framework to support Ethernet PSE and PDs devices 2022-10-03 17:33:56 -07:00
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c macsec: clear encryption keys from the stack after setting up offload 2022-11-04 10:43:56 +00:00
macvlan.c net: macvlan: fix memory leaks of macvlan_common_newlink 2022-11-10 15:59:06 +01:00
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c net: tun: call napi_schedule_prep() to ensure we own a napi 2022-11-08 17:41:11 -08:00
veth.c
virtio_net.c virtio: fixes, features 2022-10-10 14:02:53 -07:00
vrf.c
vsockmon.c
xen-netfront.c