From 5c58ec52d436b3a313bdfef899768be1ce68a881 Mon Sep 17 00:00:00 2001 From: Yufen Yu Date: Thu, 17 Jun 2021 20:48:38 +0800 Subject: [PATCH] bpf: move new add member to the end of the struct bpf_prog_aux hulk inclusion category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- Move new member to the end of the struct bpf_prog_aux to avoid potential kabi problem. Fixes: 6a9e078136ef ("bpf: fix kabi for struct bpf_prog_aux and struct bpf_raw_event_map") Signed-off-by: Yufen Yu Reviewed-by: Hou Tao Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- include/linux/bpf.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 9c44bc89011a..c40fa25cf2ca 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -286,10 +286,6 @@ struct bpf_prog_aux { atomic_t refcnt; u32 used_map_cnt; u32 max_ctx_offset; - /* not protected by KABI, safe to extend in the middle */ -#ifndef __GENKSYMS__ - u32 max_tp_access; -#endif u32 stack_depth; u32 id; u32 func_cnt; @@ -313,6 +309,10 @@ struct bpf_prog_aux { struct work_struct work; struct rcu_head rcu; }; + /* not protected by KABI, safe to extend in the middle */ +#ifndef __GENKSYMS__ + u32 max_tp_access; +#endif }; struct bpf_array { -- GitLab