linux-stable/arch/mips
Linus Torvalds f1947d7c8a Random number generator fixes for Linux 6.1-rc1.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEq5lC5tSkz8NBJiCnSfxwEqXeA64FAmNHYD0ACgkQSfxwEqXe
 A655AA//dJK0PdRghqrKQsl18GOCffV5TUw5i1VbJQbI9d8anfxNjVUQiNGZi4et
 qUwZ8OqVXxYx1Z1UDgUE39PjEDSG9/cCvOpMUWqN20/+6955WlNZjwA7Fk6zjvlM
 R30fz5CIJns9RFvGT4SwKqbVLXIMvfg/wDENUN+8sxt36+VD2gGol7J2JJdngEhM
 lW+zqzi0ABqYy5so4TU2kixpKmpC08rqFvQbD1GPid+50+JsOiIqftDErt9Eg1Mg
 MqYivoFCvbAlxxxRh3+UHBd7ZpJLtp1UFEOl2Rf00OXO+ZclLCAQAsTczucIWK9M
 8LCZjb7d4lPJv9RpXFAl3R1xvfc+Uy2ga5KeXvufZtc5G3aMUKPuIU7k28ZyblVS
 XXsXEYhjTSd0tgi3d0JlValrIreSuj0z2QGT5pVcC9utuAqAqRIlosiPmgPlzXjr
 Us4jXaUhOIPKI+Musv/fqrxsTQziT0jgVA3Njlt4cuAGm/EeUbLUkMWwKXjZLTsv
 vDsBhEQFmyZqxWu4pYo534VX2mQWTaKRV1SUVVhQEHm57b00EAiZohoOvweB09SR
 4KiJapikoopmW4oAUFotUXUL1PM6yi+MXguTuc1SEYuLz/tCFtK8DJVwNpfnWZpE
 lZKvXyJnHq2Sgod/hEZq58PMvT6aNzTzSg7YzZy+VabxQGOO5mc=
 =M+mV
 -----END PGP SIGNATURE-----

Merge tag 'random-6.1-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random

Pull more random number generator updates from Jason Donenfeld:
 "This time with some large scale treewide cleanups.

  The intent of this pull is to clean up the way callers fetch random
  integers. The current rules for doing this right are:

   - If you want a secure or an insecure random u64, use get_random_u64()

   - If you want a secure or an insecure random u32, use get_random_u32()

     The old function prandom_u32() has been deprecated for a while
     now and is just a wrapper around get_random_u32(). Same for
     get_random_int().

   - If you want a secure or an insecure random u16, use get_random_u16()

   - If you want a secure or an insecure random u8, use get_random_u8()

   - If you want secure or insecure random bytes, use get_random_bytes().

     The old function prandom_bytes() has been deprecated for a while
     now and has long been a wrapper around get_random_bytes()

   - If you want a non-uniform random u32, u16, or u8 bounded by a
     certain open interval maximum, use prandom_u32_max()

     I say "non-uniform", because it doesn't do any rejection sampling
     or divisions. Hence, it stays within the prandom_*() namespace, not
     the get_random_*() namespace.

     I'm currently investigating a "uniform" function for 6.2. We'll see
     what comes of that.

  By applying these rules uniformly, we get several benefits:

   - By using prandom_u32_max() with an upper-bound that the compiler
     can prove at compile-time is ≤65536 or ≤256, internally
     get_random_u16() or get_random_u8() is used, which wastes fewer
     batched random bytes, and hence has higher throughput.

   - By using prandom_u32_max() instead of %, when the upper-bound is
     not a constant, division is still avoided, because
     prandom_u32_max() uses a faster multiplication-based trick instead.

   - By using get_random_u16() or get_random_u8() in cases where the
     return value is intended to indeed be a u16 or a u8, we waste fewer
     batched random bytes, and hence have higher throughput.

  This series was originally done by hand while I was on an airplane
  without Internet. Later, Kees and I worked on retroactively figuring
  out what could be done with Coccinelle and what had to be done
  manually, and then we split things up based on that.

  So while this touches a lot of files, the actual amount of code that's
  hand fiddled is comfortably small"

* tag 'random-6.1-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
  prandom: remove unused functions
  treewide: use get_random_bytes() when possible
  treewide: use get_random_u32() when possible
  treewide: use get_random_{u8,u16}() when possible, part 2
  treewide: use get_random_{u8,u16}() when possible, part 1
  treewide: use prandom_u32_max() when possible, part 2
  treewide: use prandom_u32_max() when possible, part 1
2022-10-16 15:27:07 -07:00
..
alchemy MIPS: Alchemy: devboards: Remove duplicate 'the' in two places. 2022-07-05 11:11:36 +02:00
ar7 mips: ar7: convert to CONFIG_COMMON_CLK 2021-06-08 17:00:09 +02:00
ath25 MIPS: ath25: Constify static irq_domain_ops 2022-02-22 09:39:03 +01:00
ath79 MIPS: ath79: Remove one of the identical args in early_printk 2022-07-08 15:13:26 +02:00
bcm47xx MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-09-19 16:46:01 +02:00
bcm63xx linux-watchdog 5.17-rc1 tag 2022-01-17 08:07:57 +02:00
bmips MIPS: BMIPS: Utilize cfe_die() for invalid DTB 2022-07-17 14:53:07 +02:00
boot Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
cavium-octeon mips: cavium: convert to DEFINE_SHOW_ATTRIBUTE 2022-09-19 16:39:47 +02:00
cobalt
configs - hfs and hfsplus kmap API modernization from Fabio Francesco 2022-10-12 11:00:22 -07:00
crypto crypto: Kconfig - simplify cipher entries 2022-08-26 18:50:43 +08:00
dec MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
fw MIPS: CFE: Add cfe_die() 2022-07-17 14:52:47 +02:00
generic arch: mips: generic: Add missing of_node_put() in board-ranchu.c 2022-06-21 17:04:30 +02:00
include - hfs and hfsplus kmap API modernization from Fabio Francesco 2022-10-12 11:00:22 -07:00
ingenic MIPS: Kconfig: ingenic: Ensure MACH_INGENIC_GENERIC selects all SoCs 2021-06-01 11:44:47 +02:00
jazz MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
kernel treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
kvm KVM: remove KVM_REQ_UNHALT 2022-09-26 12:37:21 -04:00
lantiq - mainly cleanups 2022-10-03 09:31:55 -07:00
lib MIPS: Simplify __bswapdi2() and __bswapsi2() 2022-09-30 16:50:00 +02:00
loongson2ef MIPS: Loongson2ef: remove orphan sbx00_acpi_init() declaration 2022-09-19 16:34:31 +02:00
loongson32 MIPS: Loongson32: Fix PHY-mode being left unspecified 2022-09-19 16:31:32 +02:00
loongson64 MIPS: Loongson64: Fix section mismatch warning 2022-07-05 11:20:52 +02:00
math-emu MIPS: Fix comment typo 2022-09-12 15:33:24 +02:00
mm added support for Netgear WNR3500L v2 2022-08-06 16:47:19 -07:00
mti-malta mips: mti-malta: Fix refcount leak in malta-time.c 2022-06-21 17:04:30 +02:00
n64
net bpf, mips: No need to use min() to get MAX_TAIL_CALL_CNT 2022-08-29 15:38:14 +02:00
pci MIPS: pci: lantiq: switch to using gpiod API 2022-10-01 18:07:51 +02:00
pic32 MIPS: move from strlcpy with unused retval to strscpy 2022-09-12 15:34:04 +02:00
power
ralink mips: ralink: convert to DEFINE_SHOW_ATTRIBUTE 2022-09-19 16:40:39 +02:00
rb532 MIPS: rb532: move GPIOD definition into C-files 2022-03-30 20:26:26 +02:00
sgi-ip22 mips: sgi-ip22: Drop redundant check from .remove() 2022-07-05 11:10:17 +02:00
sgi-ip27 MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create() 2022-09-19 16:33:27 +02:00
sgi-ip30 MIPS: SGI-IP30: Fix platform-device leak in bridge_platform_create() 2022-09-19 16:32:54 +02:00
sgi-ip32 MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
sibyte MIPS: remove orphan sb1250_time_init() declaration 2022-09-24 11:46:58 +02:00
sni MIPS: sni: Fix the build 2021-10-18 18:09:54 +02:00
tools MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
txx9 MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
vdso mips: Enable KCSAN 2022-02-07 18:31:57 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kbuild.platforms MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
Kconfig - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00
Makefile.postlink