On 3/6/26 23:37, [email protected] wrote: >> Fix it by changing sizeof(info) to >> offsetofend(struct bpf_prog_info, attach_btf_id). >> >> Fixes: b79c9fc9551b ("bpf: implement BPF_PROG_QUERY for BPF_LSM_CGROUP") > > Is this the right commit for the Fixes: tag? > > The change avoids the trailing padding that exists because struct > bpf_prog_info has 4 bytes of padding at its end, so sizeof(info) (232) > differs from offsetofend(struct bpf_prog_info, attach_btf_id) (228). > > That trailing padding first appeared when __u32 verified_insns was > appended after the last __u64 member (recursion_misses). Before that, > the struct ended on an 8-byte-aligned member and had no trailing > padding. > > b79c9fc9551b only appended two further __u32 fields (attach_btf_obj_id, > attach_btf_id), while the 4-byte trailing padding already existed and > was unchanged. > > Would this be more accurate? > > Fixes: aba64c7da983 ("bpf: Add verified_insns to bpf_prog_info and fdinfo") > > Agreed.
Will update the Fixes tag in the next revision. Thanks, Leon

