fix(config): disable COMPAT_BRK so randomize_va_space defaults to 2#7
Merged
Conversation
CONFIG_COMPAT_BRK=y makes the kernel boot with randomize_va_space=1 (brk/heap not randomized). FEX's x86-64 JIT allocator relies on full ASLR to place its managed VA region; under randomize_va_space=1 it fails with "Failed to map VMA region" and linux/amd64 containers crash. The kernel OrbStack ships disables COMPAT_BRK (randomize_va_space=2) and runs FEX cleanly; matching that here fixes amd64 emulation. No other kernel change (VA width, SVE/SME) is needed.
There was a problem hiding this comment.
Pull request overview
Disables CONFIG_COMPAT_BRK in the ArcBox arm64 kernel config so the kernel boots with kernel.randomize_va_space=2 (full ASLR), addressing non-deterministic amd64 emulation failures (e.g., FEX-Emu under docker run --platform linux/amd64) caused by heap/brk not being randomized under the default =1 behavior.
Changes:
- Disable
CONFIG_COMPAT_BRKin the arm64 kernel config to allow full ASLR (randomize_va_space=2) by default.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AprilNEA
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CONFIG_COMPAT_BRK=y(the kernel default) forceskernel.randomize_va_space=1at boot — mmap/stack/vDSO are randomized but brk/heap is not. FEX-Emu's
x86-64 allocator can't lay out its virtual address space under
=1and failsnon-deterministically with
Failed to map VMA region, sodocker run --platform linux/amd64crashes (SIGSEGV).Fix
Disable
COMPAT_BRKso the kernel boots withrandomize_va_space=2(fullASLR), matching what OrbStack and standard distros ship. One line.
Validation
Built on 6.12.11 arm64. With this kernel, FEX runs amd64 deterministically:
Before: ~0/10 (
Failed to map VMA region/ SIGSEGV). Isolated by togglingrandomize_va_spaceat runtime —1fails,2works — on both the 52-bit(LPA2) and a 48-bit kernel, so VA width and page size were red herrings; this is
the sole fix.