Repository navigation
Release v1.0.6: clear feasible Linux ABI, APK and bionic technical debt - #7
Merged
Merged
Conversation
- Expand emulated syscalls 46 -> 57, partial 4 -> 8, unsupported 30 -> 15 - Add mremap/madvise, guest cwd/chdir, flock, memfd, getdents64, ppoll/poll, FIONREAD ioctl, personality, arch_prctl bookkeeping, affinity, set_robust_list, wait4 and exit - Decode DEFLATE dynamic-Huffman blocks for real APK manifests - Build a real argv/envp/auxv initial stack and derive AT_PHDR from PT_LOAD - Add focused tests; 80/80 host tests pass, ASan/UBSan clean - Bump version to 1.0.6 and update docs/CHANGELOG Co-authored-by: openhands <openhands@all-hands.dev>
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.
This PR was created by an AI agent (OpenHands) on behalf of the repository owner.
What changed and why
v1.0.6 pays down the technical debt that could be implemented honestly without pretending hard platform blockers do not exist. The Linux ABI matrix moves from 46 emulated / 4 partial / 30 unsupported to 57 / 8 / 15, and the two known placeholder implementations (APK DEFLATE and bionic initial stack) now do real work.
AT_PHDR=0x400000AT_PHDRfromPT_LOADchdirLinux ABI additions
New emulated syscalls:
madvise,chdir,personality,sched_setaffinity,sched_getaffinity,set_robust_list,wait4,exit,flock,getdents64,memfd_create.New partial syscalls, with restrictions documented in the syscall table:
mremap— in-place shrink andMREMAP_MAYMOVEgrow;MREMAP_FIXED/DONTUNMAPrefused.arch_prctl— FS/GS values recorded per context; no real TLS base switch.ioctl—FIONREADonly; other requests returnENOTTY.ppoll— readiness polling over guest fds; signal-mask argument ignored.Supporting work:
open,stat,access,mkdir,unlink,readlink, andunlinkatresolve consistently.getdents64) with./..,O_DIRECTORYenforcement, and EOF.flockwith shared/exclusive/LOCK_NB, per-path ownership, dup/open-file-description semantics, and release on last close.memfd_createwith flag validation and full read/write/seek/fstat behavior.poll/ppollreadiness andPOLLNVALreporting.FIONREADfor file, stream, pipe, and memfd descriptors.APK inspection
The DEFLATE decoder now builds canonical Huffman trees for code-length, literal/length, and distance alphabets. This decodes
BTYPE=2blocks that zlib emits for realAndroidManifest.xmlentries. Truncated and oversubscribed streams fail cleanly.Bionic loader
setup_initial_stacknow lays out argc, argv/envp pointers into actual string bytes, NULL terminators, and auxv.AT_PHDRis derived from thePT_LOADsegment coveringe_phoffrather than hardcoding0x400000.Version and docs
1.0.6insrc/version.handCMakeLists.txt.Verification
ctest --test-dir build --output-on-failure: 80/80 pass../build/ps5droid_tests: 80/80 pass../build/ps5droid-host --version:ps5droid-host 1.0.6 (backend: posix).New coverage lives in
tests/test_compat_debt.cpp, plus dynamic-Huffman DEFLATE and dynamic-AXML APK tests intests/test_binder_and_apk.cppand a real-stack bionic test intests/test_bionic_and_fd.cpp.Remaining hard blockers
The 15 unsupported syscalls stay honestly marked
-ENOSYS: process creation (clone/fork/vfork/execve), sockets, signals, andinotify_init1. These need platform facilities Orbis payloads do not expose, so this PR does not fake them.@aarvsn can click here to continue refining the PR