Skip to content
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

bpf: for local types prefer sizeof() #173

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GPL/Events/Helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ static void ebpf_cred_info__fill(struct ebpf_cred_info *ci, const struct task_st

dest.val = 0;
cap = &cred->cap_permitted;
bpf_core_read(&dest, bpf_core_type_size(struct new_kernel_cap_struct), cap);
bpf_core_read(&dest, sizeof(struct new_kernel_cap_struct), cap);
ci->cap_permitted = dest.val;

dest.val = 0;
cap = &cred->cap_effective;
bpf_core_read(&dest, bpf_core_type_size(struct new_kernel_cap_struct), cap);
bpf_core_read(&dest, sizeof(struct new_kernel_cap_struct), cap);
ci->cap_effective = dest.val;
}
}
Expand Down
Loading