build(glibc): check the reserved prefix landed, rather than assume it - #523
Merged
Conversation
The prefix is a decision about the ARTIFACT, so the build now checks the artifact (R4). Without it, a `--prefix` that silently failed to take -- or a future edit that reverts it -- yields a loader whose default library search path is a real directory on the build machine, with nothing anywhere saying so. That is not hypothetical. It is exactly how the old prefix survived across several releases: the value was wrong, every build succeeded, and the only symptom was a payload that leaked the builder's home layout. Two checks, both on the built loader: it carries the reserved prefix, and it carries no path from this machine's $HOME.
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.
Follow-up to #522, which landed AD-11's reserved prefix
(`/nonexistent/xlings-use-rpath-not-default-search`) but merged before this
check was pushed.
`--prefix` is a decision about the artifact — it is compiled into ld.so as
its default library search path and into glibc's own binaries as their INTERP —
so the build now checks the artifact (R4).
Without it, a `--prefix` that silently failed to take, or a future edit that
reverts it, yields a loader whose default search path is a real directory on the
build machine, with nothing anywhere saying so.
That is not hypothetical: it is exactly how the old prefix survived across
several releases. The value was wrong, every build succeeded, and the only
symptom was a payload leaking the builder's home layout — which is what #522's
relocation code existed to scrub back out, badly.
Two checks on the built loader: