-
Notifications
You must be signed in to change notification settings - Fork 105
[Deepin-Kernel-SIG] [linux 6.12-y] bpf: a temporary supplement fix for bpf_lsm_mmap_file null access #1408
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
Conversation
fix patch before might not work until pahole support BTF weak symbol override. Signed-off-by: xulang <xulang@uniontech.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideTemporarily relaxes BTF-based nullability checking for the first argument of the bpf_lsm_mmap_file hook by forcing its context pointer to be treated as maybe-null during BPF verification, working around missing BTF weak symbol override support in pahole. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @lax-fly. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: opsiff The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Pull request overview
This PR adds a temporary workaround to prevent null pointer access when handling the first parameter of the bpf_lsm_mmap_file hook in the BPF verifier. The fix manually marks this parameter as potentially null until pahole gains support for BTF weak symbol override, at which point this workaround should be removed.
Key Changes:
- Added explicit null-safety check for
bpf_lsm_mmap_file's first parameter in BPF context access validation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| info->reg_type |= PTR_MAYBE_NULL; | ||
|
|
||
| /* a temporary workaround for bpf_lsm_mmap_file null pointer access, | ||
| * urgly but effective, should be removed while BTF weak symbol is |
Copilot
AI
Jan 6, 2026
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.
Spelling error in comment: "urgly" should be "ugly".
| * urgly but effective, should be removed while BTF weak symbol is | |
| * ugly but effective, should be removed while BTF weak symbol is |
fix patch before(check url below for details) might not work until pahole support BTF weak symbol override.
This commit is a temporary workaround, ugly but effective, and should be remove in the future when pahole is updated
fix patch before:
patch1: #1392
patch2: #1393
Summary by Sourcery
Bug Fixes: