Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAW1S1 CVE: CVE-2024-49861
--------------------------------
enum bpf_type_flag and bpf_arg_type are used only in kernel let's fix this kabi breakage by adding KABI_BROKEN_INSERT_ENUM and KABI_BROKEN_INSERT_ENUM macro.
Fixes: 96976a741cd9 ("[Backport] bpf: Fix helper writes to read-only maps") Signed-off-by: Xiaomeng Zhang zhangxiaomeng13@huawei.com --- include/linux/bpf.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 69b3e3c9b7c6..8cf37887068f 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -726,6 +726,9 @@ enum bpf_arg_type { ARG_ANYTHING, /* any (initialized) argument is ok */ ARG_PTR_TO_SPIN_LOCK, /* pointer to bpf_spin_lock */ ARG_PTR_TO_SOCK_COMMON, /* pointer to sock_common */ + /* Fix kabi by removing broken enum as bpf_arg_type is used only in kernel */ + KABI_BROKEN_REMOVE_ENUM(ARG_PTR_TO_INT) + KABI_BROKEN_REMOVE_ENUM(ARG_PTR_TO_LONG) ARG_PTR_TO_SOCKET, /* pointer to bpf_sock (fullsock) */ ARG_PTR_TO_BTF_ID, /* pointer to in-kernel struct */ ARG_PTR_TO_RINGBUF_MEM, /* pointer to dynamically reserved ringbuf memory */