Skip to content

Commit

Permalink
bpf: for local types prefer sizeof() (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasberlin authored Sep 13, 2023
1 parent c8f96f3 commit b984e85
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit b984e85

Please sign in to comment.