linux/arch/x86
Kees Cook ef40d28f17 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-20 11:34:46 -07:00
..
boot Miscellaneous fixes: 2024-05-19 11:42:29 -07:00
coco x86/cc: Add cc_platform_set/_clear() helpers 2024-04-04 10:40:27 +02:00
configs hardening: Enable KCFI and some other options 2024-05-01 12:38:14 -07:00
crypto crypto: x86/aes-xts - switch to new Intel CPU model defines 2024-05-22 11:10:48 +02:00
entry mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
events perf/x86/intel: Add missing MODULE_DESCRIPTION() lines 2024-05-31 11:41:15 +02:00
hyperv x86/platform changes for v6.10: 2024-05-13 19:29:08 -07:00
ia32
include randomize_kstack: Remove non-functional per-arch entropy filtering 2024-06-20 11:34:46 -07:00
kernel x86/alternatives: Make FineIBT mode Kconfig selectable 2024-06-19 12:41:08 -07:00
kvm tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
lib Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
math-emu x86/math-emu: Fix function cast warnings 2024-04-08 16:06:22 +02:00
mm The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-02 12:06:25 -07:00
pci pci-v6.10-changes 2024-05-21 10:09:28 -07:00
platform x86/platform/olpc-xo1-sci: Convert to platform remove callback returning void 2024-04-10 14:59:31 +02:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools Changes: 2024-05-19 11:32:42 -07:00
um This pull request contains the following changes for UML: 2024-05-25 13:17:48 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt x86/cleanups changes for v6.10: 2024-05-13 18:21:24 -07:00
xen xen: branch for v6.10-rc1 2024-05-24 10:24:49 -07:00
.gitignore
Kbuild x86/build: Use obj-y to descend into arch/x86/virt/ 2024-03-30 10:41:49 +01:00
Kconfig x86/alternatives: Make FineIBT mode Kconfig selectable 2024-06-19 12:41:08 -07:00
Kconfig.assembler x86: add kconfig symbols for assembler VAES and VPCLMULQDQ support 2024-04-05 15:46:33 +08:00
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-09 16:28:19 +01:00
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-05-20 11:37:23 +02:00
Makefile - A series ("kbuild: enable more warnings by default") from Arnd 2024-05-22 18:59:29 -07:00
Makefile_32.cpu
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00
Makefile.um