linux/arch/arm64
Kees Cook 6db1208bf9 randomize_kstack: Remove non-functional per-arch entropy filtering
An unintended consequence of commit 9c573cd313 ("randomize_kstack:
Improve entropy diffusion") was that the per-architecture entropy size
filtering reduced how many bits were being added to the mix, rather than
how many bits were being used during the offsetting. All architectures
fell back to the existing default of 0x3FF (10 bits), which will consume
at most 1KiB of stack space. It seems that this is working just fine,
so let's avoid the confusion and update everything to use the default.

The prior intent of the per-architecture limits were:

  arm64: capped at 0x1FF (9 bits), 5 bits effective
  powerpc: uncapped (10 bits), 6 or 7 bits effective
  riscv: uncapped (10 bits), 6 bits effective
  x86: capped at 0xFF (8 bits), 5 (x86_64) or 6 (ia32) bits effective
  s390: capped at 0xFF (8 bits), undocumented effective entropy

Current discussion has led to just dropping the original per-architecture
filters. The additional entropy appears to be safe for arm64, x86,
and s390. Quoting Arnd, "There is no point pretending that 15.75KB is
somehow safe to use while 15.00KB is not."

Co-developed-by: Yuntao Liu <liuyuntao12@huawei.com>
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
Fixes: 9c573cd313 ("randomize_kstack: Improve entropy diffusion")
Link: https://lore.kernel.org/r/20240617133721.377540-1-liuyuntao12@huawei.com
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390
Link: https://lore.kernel.org/r/20240619214711.work.953-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2024-06-28 08:54:56 -07:00
..
boot TTY/Serial changes for 6.10-rc1 2024-05-22 11:53:02 -07:00
configs USB / Thunderbolt changes for 6.10-rc1 2024-05-22 11:40:09 -07:00
crypto crypto: arm64/aes-ce - Simplify round key load sequence 2024-04-26 17:26:09 +08:00
hyperv x86/hyperv: Use Hyper-V entropy to seed guest random number generator 2024-03-18 22:01:52 +00:00
include Jeff Xu's implementation of the mseal() syscall. 2024-05-24 12:47:28 -07:00
kernel randomize_kstack: Remove non-functional per-arch entropy filtering 2024-06-28 08:54:56 -07:00
kvm Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
lib arm64: crypto: use CC_FLAGS_FPU for NEON CFLAGS 2024-05-19 14:36:18 -07:00
mm The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
net Modules changes for v6.10-rc1 2024-05-15 14:05:08 -07:00
tools arm64: errata: Add workaround for Arm errata 3194386 and 3312417 2024-05-10 12:21:57 +01:00
xen
Kbuild
Kconfig arm64 fixes for -rc1 2024-05-23 12:09:22 -07:00
Kconfig.debug
Kconfig.platforms Updates for the interrupt subsystem: 2024-05-14 09:47:14 -07:00
Makefile arm64: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:18 -07:00