diff options
| author | Michael Ellerman <mpe@kernel.org> | 2026-10-29 23:07:12 +1100 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-11-04 02:05:20 -0700 |
| commit | 0d0c6a49d80669176f721403916df0b1e32afeef (patch) | |
| tree | 1b8b925a8ec0cbe03f4d0f366e6dff5743d287ef /scripts/Makefile.thinlto | |
| parent | 807b09be9c8f234ce758bcf43101f34e0a036b83 (diff) | |
riscv: defconfig: Disable COMPAT_BRK
COMPAT_BRK defaults to y, which disables brk (heap) randomisation by
default (ie. randomize_va_space=1 by default) for compatibility with
"ancient" binaries, in particular libc5 based binaries.
libc5 predates RISC-V, so there can't be any libc5 binaries for RISC-V.
COMPAT_BRK was introduced in 2008, commit 32a932332c8b
("brk randomization: introduce CONFIG_COMPAT_BRK"). But even then the
only non-libc5 binaries mentioned as being broken were ~5 year old
versions of emacs (see commit c1d171a00294 ("x86: randomize brk")).
Distro kernels for riscv64 also disable it, including Debian, Fedora,
openSUSE and Ubuntu. So even if there were riscv binaries out there
that rely on it, no mainstream distro would support them.
Most other architectures already disable COMPAT_BRK in their primary
defconfigs, including arm64, x86_64, powerpc, s390, loongarch and
sparc64, as do the riscv nommu defconfigs. It is also disabled in
kernel/configs/hardening.config.
So disable COMPAT_BRK in the riscv defconfig so that brk is randomised
by default, matching distro and other arch configs.
Signed-off-by: Michael Ellerman <mpe@kernel.org>
Link: https://patch.msgid.link/20261029-compat-brk-v1-1-5b2cf86eb453@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
