Commit 145fa884 authored by Tengda Wu's avatar Tengda Wu
Browse files

bpf: Fix kabi breakage in struct bpf_func_state

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYPJF


CVE: CVE-2024-47703

--------------------------------

After backport commit b7105bb87cfd ("bpf: enforce exact retval range
on subprog/callback exit"), struct `tnum` was replaced to struct
`bpf_retval_range`, which reduced 8 bytes and result in a kabi breakage.

Fix this breakage by KABI_REPLACE.

Fixes: b7105bb87cfd ("bpf: enforce exact retval range on subprog/callback exit")
Signed-off-by: default avatarTengda Wu <wutengda2@huawei.com>
parent 628d938d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -314,7 +314,8 @@ struct bpf_func_state {
	 */
	u32 async_entry_cnt;
	bool in_callback_fn;
	struct bpf_retval_range callback_ret_range;
	KABI_REPLACE(struct tnum callback_ret_range,
		     struct bpf_retval_range callback_ret_range)
	bool in_async_callback_fn;
	/* For callback calling functions that limit number of possible
	 * callback executions (e.g. bpf_loop) keeps track of current