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 <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b070d804c16b12a416ddc630c4440ea85f5531b
This commit is contained in:
Greg Kroah-Hartman 2020-01-31 08:14:13 +01:00 • committed by basamaryan
commit b442f6dd7e
No known key found for this signature in database
GPG key ID: 210D5384FB2A5885

View file

@ -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 *, \