From f424dd780ad509f31f513f98840c31bb312c4e3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Maciej=20=C5=BBenczykowski?= Date: Wed, 29 Jan 2020 06:45:56 -0800 Subject: [PATCH] ANDROID: fix bpf jit + cfi interactions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit change from: https://android-review.googlesource.com/c/kernel/common/+/1126406 ANDROID: bpf: validate bpf_func when BPF_JIT is enabled with CFI was incorrectly reverted in: https://android-review.googlesource.com/c/kernel/common/+/1184358 UPSTREAM: bpf: multi program support for cgroup+bpf Test: builds Bug: 121213201 Bug: 138317270 Signed-off-by: Maciej Żenczykowski Change-Id: I2b238de61340e58eb71aaa6cf6b59945a8740a08 --- include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filter.h b/include/linux/filter.h index 5a5786240006..f33f80ee9dc6 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -536,7 +536,7 @@ static inline void bpf_jit_set_header_magic(struct bpf_binary_header *hdr) } #endif -#define BPF_PROG_RUN(filter, ctx) (*(filter)->bpf_func)(ctx, (filter)->insnsi) +#define BPF_PROG_RUN(filter, ctx) bpf_call_func(filter, ctx) #define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN -- 2.20.1