tmp_suning_uos_patched/arch
Jason A. Donenfeld fdca775081 arm: use fallback for random_get_entropy() instead of zero
commit ff8a8f59c99f6a7c656387addc4d9f2247d75077 upstream.

In the event that random_get_entropy() can't access a cycle counter or
similar, falling back to returning 0 is really not the best we can do.
Instead, at least calling random_get_entropy_fallback() would be
preferable, because that always needs to return _something_, even
falling back to jiffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-30 09:33:41 +02:00
..
alpha alpha: define get_cycles macro for arch-override 2022-05-30 09:33:40 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:53:55 +02:00
arm arm: use fallback for random_get_entropy() instead of zero 2022-05-30 09:33:41 +02:00
arm64 arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs 2022-05-25 09:18:01 +02:00
c6x
csky uaccess: fix type mismatch warnings from access_ok() 2022-04-08 14:40:35 +02:00
h8300
hexagon hexagon: clean up timer-regs.h 2021-11-26 10:39:19 +01:00
ia64 ia64: define get_cycles macro for arch-override 2022-05-30 09:33:40 +02:00
m68k m68k: use fallback for random_get_entropy() instead of zero 2022-05-30 09:33:41 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 14:40:08 +02:00
mips mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-30 09:33:41 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 09:57:10 +02:00
nios2 uaccess: fix type mismatch warnings from access_ok() 2022-04-08 14:40:35 +02:00
openrisc openrisc: Add clone3 ABI wrapper 2022-01-27 10:54:06 +01:00
parisc parisc: define get_cycles macro for arch-override 2022-05-30 09:33:40 +02:00
powerpc powerpc: define get_cycles macro for arch-override 2022-05-30 09:33:41 +02:00
riscv riscv: use fallback for random_get_entropy() instead of zero 2022-05-30 09:33:41 +02:00
s390 s390: define get_cycles macro for arch-override 2022-05-30 09:33:40 +02:00
sh sh: define __BIG_ENDIAN for math-emu 2021-11-26 10:39:12 +01:00
sparc uaccess: fix type mismatch warnings from access_ok() 2022-04-08 14:40:35 +02:00
um um: Fix uml_mconsole stop/go 2022-04-08 14:40:44 +02:00
x86 random: remove unused irq_flags argument from add_interrupt_randomness() 2022-05-30 09:33:27 +02:00
xtensa xtensa: fix a7 clobbering in coprocessor context load/store 2022-04-27 13:53:55 +02:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 14:04:32 +01:00