Repository navigation
Perf CI: compare executable bases modulo the largest segment alignment - #131889
Merged
Merged
Conversation
With ASLR disabled, the kernel loads a PIE executable at a fixed address rounded down to the largest `p_align` of its `PT_LOAD` segments. When a change raises that alignment in only one of the two binaries, the reference and the candidate get different bases even though both servers were started correctly with `setarch -R`, and `check_executable_base.py` fails the whole `Performance Comparison` job. This happens in #131685: the `llvm-project` bump puts the XRay handler pointers on their own 64 KiB pages, so its binary has a writable segment aligned to `0x10000` where master's has `0x1000`, and the bases are `0x555555550000` and `0x555555554000`. Such a pull request could never pass the check, so `Mergeable Check` stayed red. The check exists to notice a launcher that does not disable ASLR. Compare the bases after rounding them down to the largest segment alignment of all the binaries (read from the program headers of `/proc/<pid>/exe`): a random base still differs from the fixed one in the bits above any segment alignment, so a server started with ASLR enabled is still detected. Checked locally with two PIE binaries linked with `-z max-page-size=4096`, one of them with a 64 KiB aligned global: the old check fails on the pair started with `setarch -R`, the new one passes, and both fail when either process is started with ASLR enabled. Related: #131685 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Workflow [PR], commit [9e68024] Summary: ✅
AI ReviewSummaryThe PR normalizes executable bases using the largest ELF Final Verdict✅ Approve |
Algunenano
approved these changes
Nov 16, 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.
check_executable_base.py(added in 1c046eb) fails thePerformance Comparisonjob when the reference and the candidate server have different executable bases, to notice a launcher that forgot to disable ASLR. But with ASLR disabled the kernel rounds the fixed base down to the largestp_alignof the binary'sPT_LOADsegments, so a change that raises that alignment in only one binary makes the bases differ even when both servers are started correctly. Such a PR can never pass the check, and itsMergeable Checkstays red.This happens in #131685: the
llvm-projectbump puts the XRay handler pointers on their own 64 KiB pages, so the last writable segment is aligned to0x10000(master:0x1000), and the bases are0x555555550000vs0x555555554000.The check now compares the bases after rounding them down to the largest segment alignment of all the binaries, read from the program headers of
/proc/<pid>/exe. A random (ASLR) base still differs from the fixed one above any segment alignment, so a launcher withoutsetarch -Ris still detected. Verified locally with two PIE binaries linked with-z max-page-size=4096, one with a 64 KiB aligned global: the old check fails on thesetarch -Rpair, the new one passes; both fail when either process runs with ASLR enabled. The parsed alignment of a realclickhousebinary matchesreadelf -l.Related: #131685
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131889]
Version info
26.11.1.2435-master(included in26.11and later)