summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2026-10-14 21:01:48 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-10-16 02:15:18 +0000
commita3923834d155ce7c3f630d891564791eeba8bb26 (patch)
treeac0382d88d58eaa62d454091b9663b06ebd4eb20 /scripts/Makefile.thinlto
parent257d4bce6a75eb68c8786ce6761f4773e3bf078c (diff)
bpf: Pack bpf_insn_aux_data flags into bit fields
struct bpf_insn_aux_data spreads its flags over eleven bools, a u8 of three bit fields and a u32 group with 25 of its 32 bits spare. Put them all in u64 bit fields, alu_state with them, which fit in the 32 bits beside seen, so orig_idx starts the next word. The structure goes from 216 bytes to 200, and stays there when a later patch adds a u32, which takes a hole further down. alu_state was a u8, but it only ever holds BPF_ALU_* flags, the highest of which is BPF_ALU_IMMEDIATE (1U << 4), so it gets five bits. With eight, the flags would take 34 bits, more than fit beside seen, so they would start a word of their own, and the later u32 would grow the structure to 208 bytes. A new BPF_ALU_* flag has to widen it. No functional change. Suggested-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions