projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a1ad78
)
bpf: use bitfields for simple per-subprog bool flags
author
Andrii Nakryiko
<andrii@kernel.org>
Mon, 4 Dec 2023 23:39:22 +0000
(15:39 -0800)
committer
Alexei Starovoitov
<ast@kernel.org>
Tue, 12 Dec 2023 03:23:37 +0000
(19:23 -0800)
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>
include/linux/bpf_verifier.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/bpf_verifier.h
b/include/linux/bpf_verifier.h
index 314b679fb4940307e123a2bfba5da55120079958..c2819a6579a520545dac64f60177e4249c139258 100644
(file)
--- a/
include/linux/bpf_verifier.h
+++ b/
include/linux/bpf_verifier.h
@@
-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;