From b442f6dd7ea26edcb6686b5b6514a9a6f1d53dea Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 31 Jan 2020 08:14:13 +0100 Subject: [PATCH] BACKPORT: Revert "ANDROID: bpf: disable CFI for dispatcher functions" This reverts commit cedd91c6f4c46fe002ec1a33139620321a62a399. It conflicts with the BPF merge and will have to be added back later "by hand". Cc: Sami Tolvanen Signed-off-by: Greg Kroah-Hartman Change-Id: I9b070d804c16b12a416ddc630c4440ea85f5531b --- include/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 9504a16ec49c..c4325c76dc3d 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -558,7 +558,7 @@ struct bpf_dispatcher { struct bpf_ksym ksym; }; -static __always_inline __nocfi unsigned int bpf_dispatcher_nop_func( +static __always_inline unsigned int bpf_dispatcher_nop_func( const void *ctx, const struct bpf_insn *insnsi, unsigned int (*bpf_func)(const void *, @@ -585,7 +585,7 @@ void bpf_trampoline_put(struct bpf_trampoline *tr); } #define DEFINE_BPF_DISPATCHER(name) \ - noinline __nocfi unsigned int bpf_dispatcher_##name##_func( \ + noinline unsigned int bpf_dispatcher_##name##_func( \ const void *ctx, \ const struct bpf_insn *insnsi, \ unsigned int (*bpf_func)(const void *, \