Repository navigation
feat(user): run precompiled Debian arm64 dynamic bash on Milo - #276
Merged
marcobuschini merged 1 commit intoDec 4, 2026
Merged
marcobuschini merged 1 commit into
marcobuschini merged 1 commit into
Conversation
- Add scripts/setup_debian_bash.sh and Makefile setup-debian-bash target (initrds/debian-bash.cpio) packaging unmodified Debian Bookworm arm64 dynamic bash with ld-linux-aarch64.so.1, libc.so.6, libtinfo.so.6, and /bin/test_milo - Support PT_INTERP dynamic linker loading and Linux AArch64 x0=0 entry ABI in kernel/shell/shell.cpp - Preserve EL0 FP/SIMD state (q0..q31, fpcr, fpsr) across traps/context switches in AArch64CpuContext and compile EL1 kernel/DDK code with -mgeneral-regs-only - Round non-zero sys_mmap and sys_munmap lengths up to page_size per Linux ABI (required by glibc ld.so) - Map a dedicated W^X-compliant R+X sigreturn trampoline page at user_stack_top when SA_RESTORER is omitted (with refcount-clean teardown in AddressSpace::destroy) - Add SYS_GETTIMEOFDAY (169) and SYS_SET_ROBUST_LIST (99) syscall handlers plus debug diagnostics for ENOSYS/mmap failures - Add host regression tests for unaligned mmap/munmap rounding and the W^X sigreturn trampoline page, and update EL0 user_mm_suite Closes #263
3 tasks
marcobuschini
deleted the
263-issue-run-a-precompiled-aarch64-linux-bash-binary-on-milo
branch
December 4, 2026 15:21
3 of 28 tasks
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.
Commitizen Summary
featuserWhat Changed
arm64bashPackaging (scripts/setup_debian_bash.sh,Makefile):setup-debian-bashtarget producinginitrds/debian-bash.cpiocontaining unmodified Debian Bookwormarm64dynamically linked/bin/bash(5.2.15),/lib/ld-linux-aarch64.so.1,/lib/aarch64-linux-gnu/libc.so.6,/lib/aarch64-linux-gnu/libtinfo.so.6, minimal/etc/{passwd,group}, and/bin/test_milo+ base EL0 payloads.kernel/shell/shell.cpp):launch_initrd_shell()to parsePT_INTERP, resolve and load the dynamic interpreter via VFS +load_elf_interpreter(), populateAT_BASE, and enter EL0 with Linux AArch64x0 = 0(rtld_fini) ABI.arch/aarch64-linux-gnu/{arch.mk,boot.s,cpu_context.hpp,cpu.cpp},drivers/ddk.mk,kernel/hal/cpu.hpp):-mgeneral-regs-onlyto kernel and DDK compiler flags so EL1 never clobbers EL0 NEON/SIMD registers (fixing glibc SIMDmemsetcorruption oflibc.so.6.bssacross page faults).HAL::CpuContext/AArch64CpuContext(816 bytes) andboot.strap entry/exit macros to save/restoreq0..q31,fpcr, andfpsracross traps and context switches.mmap/munmapLength Rounding (kernel/syscalls/MemorySyscalls.cpp,arch/aarch64-linux-gnu/user_test.s):sys_mmapandsys_munmaplengths up topage_sizeper Linux ABI (required by glibcld-linux-aarch64.so.1when mappinglibtinfo.so.6).rt_sigreturnTrampoline Page (kernel/process/Signal.cpp,kernel/mm/AddressSpace.cpp):User | Read | Execute, non-writable) trampoline page atuser_stack_topon demand whenSA_RESTORERis omitted (glibc AArch64 default), fixingSIGCHLDreturn UXN faults while preserving strictW^X, with refcount-clean teardown inAddressSpace::destroy().kernel/syscalls/{TimeSyscalls.cpp,SyscallInternal.hpp,SyscallDispatcher.cpp}):SYS_GETTIMEOFDAY(169) andSYS_SET_ROBUST_LIST(99) plus debug logging for unhandled syscalls andmmap/munmap/mprotecterrors.tests/host/{distro_abi_test.cpp,process_subsystem_test.cpp}):sys_mmap/sys_munmaprounding/overflow and W^Xrt_sigreturntrampoline page permissions, reuse, and zero-leak teardown.Breaking Changes
None
Verification & Quality Gates
make format && make clean-tests && make -j"$(nproc)" all && make -j"$(nproc)" qualitypasses with zero warnings, 0 formatting violations, and 0clang-tidyissuesmake setup-debian-bashbuildsinitrds/debian-bash.cpiocleanlyINITRD=initrds/debian-bash.cpio:milo> test allpasses259/259(failed=0)milo> bashreaches interactivemilo-bash#prompt (5.2.15(1)-release); verified env vars, subshells, pipes, command substitution, redirections,/bin/bash -c, and/bin/test_milo(passed=14 skipped=0 failed=0,exit 0)Checklist