-
Notifications
You must be signed in to change notification settings - Fork 337
Fix addend handling and other cleanups for s390 #1269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
With '--debug', most of the xtrace output shows the reading of the .config and Module.symvers files, which isn't very useful and floods the rest of the xtrace output. Temporarily disable xtrace before reading the files. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
These functions are only called locally, convert them to static. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Several functions expect to take a ".rela" section as an argument. Make such cases more clear by renaming "sec" -> "relasec". Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Several functions have a boolean semantic, but don't actually return bool, which is confusing. Fix that. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
It doesn't make sense to disassemble a data section. That just happened to work by accident. PC-relative offsets only need adjusting when associated with an instruction. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
…syms() Add support for R_X86_64_NONE. With an upstream kernel, it's quite rare, only used for a few jump labels. With older kernels it was used for fentry hooks. Either way, it should be treated like a PC-relative relocation. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Error out if an unsupported rela is encountered. This is more robust than just ignoring it. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
rela_insn() only cares about the base section. Convert it to take a non-rela section as its argument instead of a relasec. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Error out if the insn can't be found. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Split out the addend offset math into a separate function so it can be used elsewhere. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This issue was only seen in in a text section. Explicitly check for that. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Empty (zero-length) symbols are possible, allow kpatch_replace_sections_syms() to work on them. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
…bols These sections don't have symbols. Don't even try to replace references to them with symbols. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Contributor
|
Hi @jpoimboe , Check out the internal automated integration test failure emails, there are various complaints like these: |
Member
Author
|
Going to squash in this change to fix the integration failures: |
If a section reference can't be converted to a symbol reference, error out to try to prevent unexpected behavior later on. There are a few sections for which a symbol is optional: .rodata and string literal sections. Don't warn about those. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
The current string extraction is broken for non-section symbols. Fix that. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Use rela_target_offset() to make the relocation bounds checking more precise. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Otherwise it fails the unit tests on an s390 host. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Member
Author
|
v2:
|
joe-lawrence
approved these changes
May 18, 2022
Merged
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.
Several improvements for issues discovered in the review for #1203 .Mostly related to addend handling, but also some other cleanups and an endianness fix.