-
Notifications
You must be signed in to change notification settings - Fork 105
[Deepin-Kernel-SIG] [linux 6.6-y] [Upstream] objtool: Ignore dangling jump table entries #681
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
[Deepin-Kernel-SIG] [linux 6.6-y] [Upstream] objtool: Ignore dangling jump table entries #681
Conversation
This reverts commit 8a69697. It has a small context change need to be handle. Signed-off-by: Wentao Guan <[email protected]>
[ Upstream commit 3724062 ] Clang sometimes leaves dangling unused jump table entries which point to the end of the function. Ignore them. Closes: https://lore.kernel.org/20250113235835.vqgvb7cdspksy5dn@jpoimboe Reported-by: Klaus Kusche <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/ee25c0b7e80113e950bd1d4c208b671d35774ff4.1736891751.git.jpoimboe@kernel.org Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 5b1c485) Conflicts: tools/objtool/check.c [Handle 765ecc2:("objtool: Handle various symbol types of rodata")] Signed-off-by: Wentao Guan <[email protected]>
Reviewer's Guide by SourceryThis pull request addresses an issue where Clang sometimes creates dangling, unused jump table entries that point to the end of a function. The change modifies the objtool to ignore these entries, preventing false positives during code analysis. Updated class diagram for objtool checkclassDiagram
class objtool_file {
}
class instruction {
}
class reloc {
sym
}
class symbol {
sec
}
class section {
}
class func {
sec
offset
len
}
objtool_file -- instruction : contains
instruction -- reloc : uses
reloc -- symbol : refers to
symbol -- section : belongs to
func -- section : belongs to
note for reloc "reloc_addend(reloc) is replaced by offset"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin pr auto review关键摘要:
是否建议立即修改:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @opsiff - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment explaining why
offsetis used instead ofreloc_addend(reloc).
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Revert "objtool: Ignore dangling jump table entries"
This reverts commit 8a69697.
It has a small context change need to be handle.
Reapply: objtool: Ignore dangling jump table entries
[ Upstream commit 3724062 ]
Clang sometimes leaves dangling unused jump table entries which point to
the end of the function. Ignore them.
Closes: https://lore.kernel.org/20250113235835.vqgvb7cdspksy5dn@jpoimboe
Reported-by: Klaus Kusche [email protected]
Signed-off-by: Josh Poimboeuf [email protected]
Signed-off-by: Peter Zijlstra (Intel) [email protected]
Link: https://lkml.kernel.org/r/ee25c0b7e80113e950bd1d4c208b671d35774ff4.1736891751.git.jpoimboe@kernel.org
Signed-off-by: Sasha Levin [email protected]
(cherry picked from commit 5b1c485)
Conflicts:
tools/objtool/check.c
[Handle 765ecc2:("objtool: Handle various symbol types of rodata")]
Signed-off-by: Wentao Guan [email protected]
Summary by Sourcery
Bug Fixes: