kernel_samsung_a53x/arch/arm64/include/asm
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
..
vdso Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acenv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi.h Revert "arm64: acpi: Move get_cpu_for_acpi_id() to a header" 2024-11-24 00:23:36 +01:00
alternative-macros.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
alternative.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arch_gicv3.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arch_timer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
archrandom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm-cci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm_dsu_pmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-bug.h arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY 2024-11-19 12:27:09 +01:00
asm-offsets.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-prototypes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-uaccess.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm_pointer_auth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
assembler.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atomic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atomic_ll_sc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atomic_lse.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
barrier.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bitops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bitrev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
boot.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
brk-imm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cache.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cacheflush.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
checksum.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clocksource.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cmpxchg.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
compat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
compiler.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpucaps.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpufeature.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpuidle.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cputype.h Revert "arm64: Add Cortex-715 CPU part definition" 2024-11-24 00:23:00 +01:00
current.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
daifflags.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dcc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug-monitors.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma-mapping-noalias.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
el2_setup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elf.h arm64: determine stack entropy based on mmap entropy 2024-11-30 02:16:49 +01:00
esr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exception.h arm64: allow kprobes on EL0 handlers 2024-11-08 11:26:02 +01:00
exec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
extable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fixmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpsimd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpsimdmacros.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
futex.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hardirq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugetlb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw_breakpoint.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwcap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hyp_image.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hypervisor.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
image.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
insn.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq_work.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irqflags.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jump_label.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kasan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kbuild Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kernel-pgtable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kexec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kfence.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kprobes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_arm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_asm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_emulate.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_host.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_hyp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_pgtable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_ptrauth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_ras.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
linkage.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lse.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
memory.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mman.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu_context.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmzone.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module.lds.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mte-def.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mte-kasan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mte.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neon-intrinsics.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
neon.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
numa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
page-def.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
page.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
paravirt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
percpu.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
perf_event.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgalloc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable-hwdef.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable-prot.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable-types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pgtable.h arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify 2024-11-18 12:11:57 +01:00
pointer_auth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
preempt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
probes.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc-fns.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
processor.h arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
ptdump.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptrace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvclock-abi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rwonce.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdei.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seccomp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sections.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
shmparam.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signal32.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
simd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smp_plat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sparsemem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectre.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spinlock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spinlock_types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stack_pointer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stackprotector.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stacktrace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stage2_pgtable.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
string.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
suspend.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sync_bitops.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall_wrapper.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysreg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
system_misc.h arm64: die(): pass 'err' as long 2024-11-08 11:25:59 +01:00
thread_info.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timex.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlbflush.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
topology.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traps.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uaccess.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unistd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unistd32.h syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-11-19 14:19:34 +01:00
uprobes.h arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning 2024-11-23 23:22:02 +01:00
vdso.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vectors.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vermagic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmalloc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmap_stack.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
word-at-a-time.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xor.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00