fix 16KB RELRO release validation - #568
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
WalkthroughThe change adds a Python validator for native ELF layouts in AAR files, runs it during releases, and updates linker comments, dependency examples, compatibility guidance, and changelog entries for version 3.2.0. ChangesAAR ELF validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow
participant Validator as validate_aar_elf.py
participant Readelf
ReleaseWorkflow->>Validator: Validate packaged AAR files
Validator->>Readelf: Inspect native ELF headers
Readelf-->>Validator: Return PT_LOAD and GNU_RELRO layouts
Validator-->>ReleaseWorkflow: Return success or exit code 1
ReleaseWorkflow->>ReleaseWorkflow: Continue publishing only after validation
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
the 3.1.2 16KB variants are incompatible with some 4KB-page-size devices
in 3.1.2 did not disable the linker-default RELRO layout
PT_LOADalignment and verifies thatevery 4KB-rounded
PT_GNU_RELROrange remains inside mappedPT_LOADpagesbefore checksums and publication
Root cause
The published
3.1.2-16k-minarm64libCGEExt.sowas linked by LLD 17. Itswritable
PT_LOADmaps only through0xa000on a 4KB-page-size device, whilePT_GNU_RELROis rounded through0xc000. Android's linker therefore callsmprotect()across unmapped pages and reportsENOMEMascan't enable GNU RELRO protection ... Out of memory.The 3.2.0 artifacts use NDK r27c / LLD 18 and contain
.relro_padding, so theassociated writable
PT_LOADcovers the full RELRO range.Refs #562.
Validation
16k-min
arm64
libCGEExt.sorange0x9000-0xc000release.ymlparses successfully as YAMLgit diff --checkpassesSummary by CodeRabbit
Bug Fixes
dlopenfailures on some 4KB-page-size devices.Documentation