Skip to content

Commit

Permalink
bpf: use bitfields for simple per-subprog bool flags
Browse files Browse the repository at this point in the history
We have a bunch of bool flags for each subprog. Instead of wasting bytes
for them, use bitfields instead.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231204233931.49758-5-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
anakryiko authored and Alexei Starovoitov committed Dec 12, 2023
1 parent 1a1ad78 commit 406a6fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/linux/bpf_verifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,12 @@ struct bpf_subprog_info {
u32 start; /* insn idx of function entry point */
u32 linfo_idx; /* The idx to the main_prog->aux->linfo */
u16 stack_depth; /* max. stack depth used by this function */
bool has_tail_call;
bool tail_call_reachable;
bool has_ld_abs;
bool is_cb;
bool is_async_cb;
bool is_exception_cb;
bool has_tail_call: 1;
bool tail_call_reachable: 1;
bool has_ld_abs: 1;
bool is_cb: 1;
bool is_async_cb: 1;
bool is_exception_cb: 1;
};

struct bpf_verifier_env;
Expand Down

0 comments on commit 406a6fa

Please sign in to comment.