mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
UPSTREAM: ANDROID: bpf: disable CFI in dispatcher functions
BPF dispatcher functions are patched at runtime to perform direct instead of indirect calls. Disable CFI for the dispatcher functions to avoid conflicts. Bug: 145210207 Change-Id: Iea72f5a9fe09dd5adbb90b0174945707f42594b0 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
a9571b7d83
commit
6e2d16f407
1 changed files with 2 additions and 2 deletions
|
|
@ -635,7 +635,7 @@ struct bpf_dispatcher {
|
|||
struct bpf_ksym ksym;
|
||||
};
|
||||
|
||||
static __always_inline unsigned int bpf_dispatcher_nop_func(
|
||||
static __always_inline __nocfi unsigned int bpf_dispatcher_nop_func(
|
||||
const void *ctx,
|
||||
const struct bpf_insn *insnsi,
|
||||
unsigned int (*bpf_func)(const void *,
|
||||
|
|
@ -663,7 +663,7 @@ void bpf_trampoline_put(struct bpf_trampoline *tr);
|
|||
}
|
||||
|
||||
#define DEFINE_BPF_DISPATCHER(name) \
|
||||
noinline unsigned int bpf_dispatcher_##name##_func( \
|
||||
noinline __nocfi unsigned int bpf_dispatcher_##name##_func( \
|
||||
const void *ctx, \
|
||||
const struct bpf_insn *insnsi, \
|
||||
unsigned int (*bpf_func)(const void *, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue