linux/arch/parisc/kernel
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
..
syscalls parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode 2022-08-01 18:43:24 +02:00
vdso32 parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
vdso64 parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
alternative.c parisc: Reduce kernel size by packing alternative tables 2022-10-11 12:01:24 +02:00
asm-offsets.c parisc: Fix vDSO signal breakage on 32-bit kernel 2022-07-02 18:36:58 +02:00
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
cache.c parisc: remove mmap linked list from cache handling 2022-09-26 19:46:19 -07:00
compat_audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
drivers.c parisc: Fix device names in /proc/iomem 2022-08-01 18:43:23 +02:00
entry.S parisc: Fix userspace graphics card breakage due to pgtable special bit 2022-10-14 10:45:12 +02:00
firmware.c parisc: Add PDC locking functions for rendezvous code 2022-03-29 21:37:12 +02:00
ftrace.c Tracing updates for 5.16: 2021-11-01 20:05:19 -07:00
hardware.c parisc: Clean up names in hardware database 2022-08-01 18:43:23 +02:00
head.S parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines 2022-08-22 11:09:17 +02:00
hpmc.S parisc: Re-use toc_stack as hpmc_stack 2022-01-11 11:57:37 +01:00
inventory.c parisc: Add qemu fw_cfg interface 2020-10-15 08:10:37 +02:00
irq.c asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kexec_file.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kexec.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kgdb.c parisc: Add kgdb io_module to read chars via PDC 2022-01-07 01:29:22 +01:00
kprobes.c parisc: Fix typos in comments 2022-05-08 20:01:12 +02:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
module.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pa7300lc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pacache.S parisc: Optimize tmpalias function calls 2022-05-23 13:44:25 +02:00
parisc_ksyms.c parisc: Drop strnlen_user() in favour of generic version 2021-09-09 12:44:30 +02:00
patch.c parisc: Fix patch code locking and flushing 2022-05-17 21:52:59 +02:00
pci-dma.c parisc: Do not initialise statics to 0 2022-08-01 18:43:23 +02:00
pci.c parisc: Drop comments which are already in pci.h 2019-09-05 16:41:11 +02:00
pdc_chassis.c kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
pdc_cons.c parisc: Convert PDC console to an early console 2022-10-11 12:01:24 +02:00
pdt.c parisc: Make use of the helper macro kthread_run() 2021-11-01 07:36:01 +01:00
perf_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
perf_images.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
perf.c parisc/perf: open access for CAP_PERFMON privileged process 2020-04-16 12:19:08 -03:00
process.c Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
processor.c parisc: fix a crash with multicore scheduler 2022-06-03 09:54:01 +02:00
ptrace.c ptrace: Create ptrace_report_syscall_{entry,exit} in ptrace.h 2022-03-10 13:35:08 -06:00
real2.S parisc: Fix and improve kernel stack unwinding 2018-08-13 09:54:17 +02:00
relocate_kernel.S parisc: add kexec syscall support 2019-09-08 15:37:04 +02:00
setup.c parisc: Convert PDC console to an early console 2022-10-11 12:01:24 +02:00
signal32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
signal32.h parisc: Add vDSO support 2022-03-11 19:49:30 +01:00
signal.c ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
smp.c profile: setup_profiling_timer() is moslty not implemented 2022-07-29 18:12:36 -07:00
stacktrace.c parisc: Fix implicit declaration of function '__kernel_text_address' 2021-11-13 22:10:56 +01:00
sys_parisc32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sys_parisc.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
syscall.S parisc: Add lws_atomic_xchg and lws_atomic_store syscalls 2022-01-07 01:29:21 +01:00
time.c parisc: Mark cr16 clock unstable on all SMP machines 2022-05-08 20:01:12 +02:00
toc_asm.S parisc: Enable TOC (transfer of contents) feature unconditionally 2022-01-11 11:57:37 +01:00
toc.c parisc: Fix missing prototype for 'toc_intr' warning in toc.c 2022-01-20 20:39:19 +01:00
topology.c parisc: fix a crash with multicore scheduler 2022-06-03 09:54:01 +02:00
traps.c parisc: Convert PDC console to an early console 2022-10-11 12:01:24 +02:00
unaligned.c parisc: Fix exception handler for fldw and fstw instructions 2022-08-21 08:43:09 +02:00
unwind.c parisc: Move thread_info into task struct 2021-11-01 07:35:59 +01:00
vdso.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
vmlinux.lds.S Revert "parisc: Fix backtrace to always include init funtion names" 2021-11-22 07:37:31 +01:00