hulk inclusion category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/20408 -------------------------------- Fix kabi breakage in struct bpf_prog_aux. Add KABI_FILL_HOLE for tramp_linked, as there has 2 byte hole for it. struct bpf_prog_aux { atomic64_t refcnt; /* 0 8 */ u32 used_map_cnt; /* 8 4 */ u32 used_btf_cnt; /* 12 4 */ u32 max_ctx_offset; /* 16 4 */ u32 max_pkt_offset; /* 20 4 */ u32 max_tp_access; /* 24 4 */ u32 stack_depth; /* 28 4 */ u32 id; /* 32 4 */ u32 func_cnt; /* 36 4 */ u32 func_idx; /* 40 4 */ u32 attach_btf_id; /* 44 4 */ u32 ctx_arg_info_size; /* 48 4 */ u32 max_rdonly_access; /* 52 4 */ u32 max_rdwr_access; /* 56 4 */ bool is_extended; /* 60 1 */ bool changes_pkt_data; /* 61 1 */ /* XXX 2 bytes hole, try to pack */ /* --- cacheline 1 boundary (64 bytes) --- */ struct btf * attach_btf; /* 64 8 */ const struct bpf_ctx_arg_aux * ctx_arg_info; /* 72 8 */ struct mutex dst_mutex; /* 80 144 */ /* --- cacheline 3 boundary (192 bytes) was 32 bytes ago --- */ struct bpf_prog * dst_prog; /* 224 8 */ struct bpf_trampoline * dst_trampoline; /* 232 8 */ Fixes: c7ac135a792c ("bpf: Wait for an RCU tasks grace period before freeing trampoline progs") Signed-off-by: Pu Lehui <pulehui@huawei.com> --- include/linux/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index e6271a2656d2..b9f187d02d4e 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1551,6 +1551,7 @@ struct bpf_prog_aux { u32 max_rdwr_access; KABI_FILL_HOLE(bool is_extended) /* true if extended by freplace program */ KABI_FILL_HOLE(bool changes_pkt_data) + KABI_FILL_HOLE(bool tramp_linked) /* true if it was ever linked to a trampoline */ struct btf *attach_btf; const struct bpf_ctx_arg_aux *ctx_arg_info; struct mutex dst_mutex; /* protects dst_* pointers below, *after* prog becomes visible */ @@ -1562,7 +1563,6 @@ struct bpf_prog_aux { bool dev_bound; /* Program is bound to the netdev. */ bool offload_requested; /* Program is bound and offloaded to the netdev. */ bool attach_btf_trace; /* true if attaching to BTF-enabled raw tp */ - bool tramp_linked; /* true if it was ever linked to a trampoline */ bool func_proto_unreliable; KABI_DEPRECATE(bool, sleepable) bool tail_call_reachable; -- 2.34.1