linux-stable/net/bluetooth
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
..
bnep
cmtp
hidp Bluetooth: move from strlcpy with unused retval to strscpy 2022-08-25 16:26:18 -07:00
rfcomm Driver core changes for 6.1-rc1 2022-10-07 17:04:10 -07:00
6lowpan.c
Kconfig Bluetooth: Add initial implementation of CIS connections 2022-07-22 17:13:22 -07:00
Makefile Bluetooth: Add BTPROTO_ISO socket type 2022-07-22 17:13:39 -07:00
a2mp.c
a2mp.h
af_bluetooth.c Bluetooth: Add BTPROTO_ISO socket type 2022-07-22 17:13:39 -07:00
amp.c
amp.h
aosp.c Bluetooth: Fix null pointer deref on unexpected status event 2022-08-08 17:04:37 -07:00
aosp.h
ecdh_helper.c
ecdh_helper.h
eir.c Bluetooth: Add initial implementation of BIS connections 2022-07-22 17:13:56 -07:00
eir.h Bluetooth: Add initial implementation of BIS connections 2022-07-22 17:13:56 -07:00
hci_codec.c
hci_codec.h
hci_conn.c Bluetooth: hci_conn: Fix not restoring ISO buffer count on disconnect 2022-11-02 14:16:09 -07:00
hci_core.c Bluetooth: Prevent double register of suspend 2022-09-28 12:16:10 -07:00
hci_debugfs.c Bluetooth: hci_debugfs: Fix not checking conn->debugfs 2022-09-21 15:01:21 -07:00
hci_debugfs.h
hci_event.c Bluetooth: hci_event: Make sure ISO events don't affect non-ISO connections 2022-09-21 15:04:45 -07:00
hci_request.c Bluetooth: Move hci_abort_conn to hci_conn.c 2022-08-31 15:45:56 -07:00
hci_request.h Bluetooth: Move hci_abort_conn to hci_conn.c 2022-08-31 15:45:56 -07:00
hci_sock.c Bluetooth: Prevent double register of suspend 2022-09-28 12:16:10 -07:00
hci_sync.c Bluetooth: hci_sync: Fix not indicating power state 2022-09-30 17:32:12 -07:00
hci_sysfs.c Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times 2022-09-21 15:00:54 -07:00
iso.c Bluetooth: hci_conn: Fix CIS connection dst_type handling 2022-11-02 14:15:33 -07:00
l2cap_core.c Bluetooth: L2CAP: Fix attempting to access uninitialized memory 2022-11-02 16:37:00 -07:00
l2cap_sock.c
leds.c
leds.h
lib.c Bluetooth: Add bt_status 2022-07-21 17:15:31 -07:00
mgmt.c treewide: use get_random_u32_inclusive() when possible 2022-11-18 02:18:02 +01:00
mgmt_config.c
mgmt_config.h
mgmt_util.c Bluetooth: Implement support for Mesh 2022-09-06 13:18:24 -07:00
mgmt_util.h Bluetooth: Implement support for Mesh 2022-09-06 13:18:24 -07:00
msft.c Bluetooth: Fix null pointer deref on unexpected status event 2022-08-08 17:04:37 -07:00
msft.h Bluetooth: hci_sync: Refactor remove Adv Monitor 2022-07-21 17:14:55 -07:00
sco.c Bluetooth: HCI: Add HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN quirk 2022-05-13 13:05:48 +02:00
selftest.c
selftest.h
smp.c
smp.h