-
Notifications
You must be signed in to change notification settings - Fork 105
[Deepin-Kernel-SIG] [linux 6.6-y] bpf: a temporary fix for bpf_lsm_mmap_file null access #1435
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6092,6 +6092,13 @@ bool btf_ctx_access(int off, int size, enum bpf_access_type type, | |
| if (prog_arg_maybe_null(prog, btf, &args[arg])) | ||
| info->reg_type |= PTR_MAYBE_NULL; | ||
|
|
||
| /* a temporary workaround for bpf_lsm_mmap_file null pointer access, | ||
| * ugly but effective, should be removed while BTF weak symbol is | ||
| * supported by pahole | ||
| */ | ||
| if (!strcmp(tname, "bpf_lsm_mmap_file") && arg == 0) | ||
|
||
| info->reg_type |= PTR_MAYBE_NULL; | ||
|
|
||
| if (tgt_prog) { | ||
| enum bpf_prog_type tgt_type; | ||
|
|
||
|
|
||
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.
Corrected spelling of 'while' to 'when' in the context of future action. The phrase should read "should be removed when BTF weak symbol is supported" rather than "should be removed while BTF weak symbol is supported".