android_kernel_motorola_sm6225/include
Jason A. Donenfeld 419800cf98 random: make random_get_entropy() return an unsigned long
commit b0c3e796f24b588b862b61ce235d3c9417dc8983 upstream.

Some implementations were returning type `unsigned long`, while others
that fell back to get_cycles() were implicitly returning a `cycles_t` or
an untyped constant int literal. That makes for weird and confusing
code, and basically all code in the kernel already handled it like it
was an `unsigned long`. I recently tried to handle it as the largest
type it could be, a `cycles_t`, but doing so doesn't really help with
much.

Instead let's just make random_get_entropy() return an unsigned long all
the time. This also matches the commonly used `arch_get_random_long()`
function, so now RDRAND and RDTSC return the same sized integer, which
means one can fallback to the other more gracefully.

Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Theodore Ts'o <tytso@mit.edu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:09 +02:00
..
acpi ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions 2022-01-27 09:04:27 +01:00
asm-generic hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-01 09:27:43 +01:00
clocksource
crypto random: replace custom notifier chain with standard one 2022-06-25 11:49:08 +02:00
drm drm: fix EDID struct for old ARM OABI format 2022-06-14 16:59:18 +02:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:21:26 +01:00
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
kvm KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:47:59 +02:00
linux random: make random_get_entropy() return an unsigned long 2022-06-25 11:49:09 +02:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-13 08:51:34 +01:00
media media: subdev: disallow ioctl for saa6588/davinci 2021-07-20 16:16:05 +02:00
memory
misc
net ipv6: fix locking issues with loops over idev->addr_list 2022-06-14 16:59:14 +02:00
pcmcia
ras
rdma RDMA/netlink: Add __maybe_unused to static inline in C file 2021-11-26 11:36:24 +01:00
scsi scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() 2022-06-14 16:59:24 +02:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:45:25 +02:00
sound ALSA: jack: Access input_dev under mutex 2022-06-14 16:59:15 +02:00
target scsi: target: Fix ordered tag handling 2021-11-26 11:36:20 +01:00
trace random: remove unused tracepoints 2022-06-25 11:49:05 +02:00
uapi random: ignore GRND_RANDOM in getentropy(2) 2022-06-25 11:48:59 +02:00
video udlfb: introduce a rendering mutex 2019-05-25 18:23:30 +02:00
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 10:15:13 +01:00