kernel_samsung_a53x/arch/arm64
Daniel Micay df64e52e41 arm64: determine stack entropy based on mmap entropy
Stack mapping entropy is currently hard-wired to 11 bits of entropy on
32-bit and 18 bits of entropy on 64-bit. The stack itself gains an extra
8 bits of entropy from lower bit randomization within 16 byte alignment
constraints. The argument block could have all lower bits randomized but
it currently only gets the mapping randomization.

Rather than hard-wiring values this switches to using the mmap entropy
configuration like the mmap base and executable base, resulting in a
range of 8 to 16 bits on 32-bit and 18 to 24 bits on 64-bit (with 4k
pages and 3 level page tables) depending on kernel configuration and
overridable via the sysctl entries.

It's worth noting that since these kernel configuration options default
to the minimum supported entropy value, the entropy on 32-bit will drop
from 11 to 8 bits for builds using the defaults. However, following the
configuration seems like the right thing to do regardless. At the very
least, changing the defaults for COMPAT (32-bit processes on 64-bit)
should be considered due to the larger address space compared to real
32-bit.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:16:49 +01:00
..
boot ARM64: dts/s5e8825: make GPU lean more towards 702 MHz 2024-11-24 19:21:47 +01:00
configs defconfig: s5e8825-a53xxx: Readded 2024-11-24 19:52:41 +00:00
crypto Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
include arm64: determine stack entropy based on mmap entropy 2024-11-30 02:16:49 +01:00
kernel Revert "arm64: cpufeature: Fix the visibility of compat hwcaps" 2024-11-24 00:23:54 +01:00
kvm KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 2024-11-23 23:20:50 +01:00
lib arm64: Align __arch_clear_user() to 16 bytes as per upstream 2024-11-19 17:54:00 +01:00
mm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kbuild Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer 2024-11-18 11:43:21 +01:00
Kconfig.debug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.platforms Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile arm64: Force position-independent veneers 2024-11-23 23:22:00 +01:00
Makefile.postlink Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00