mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
UPSTREAM: ANDROID: bpf: disable CFI for 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: I61dc7ce8a549145a79b7e69c646888578e0641ba Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
8389423ec7
commit
a20358ba24
1 changed files with 2 additions and 2 deletions
|
|
@ -512,7 +512,7 @@ struct bpf_dispatcher {
|
|||
u32 image_off;
|
||||
};
|
||||
|
||||
static __always_inline unsigned int bpf_dispatcher_nopfunc(
|
||||
static __always_inline __nocfi unsigned int bpf_dispatcher_nopfunc(
|
||||
const void *ctx,
|
||||
const struct bpf_insn *insnsi,
|
||||
unsigned int (*bpf_func)(const void *,
|
||||
|
|
@ -535,7 +535,7 @@ void bpf_trampoline_put(struct bpf_trampoline *tr);
|
|||
}
|
||||
|
||||
#define DEFINE_BPF_DISPATCHER(name) \
|
||||
noinline unsigned int name##func( \
|
||||
noinline __nocfi unsigned int name##func( \
|
||||
const void *ctx, \
|
||||
const struct bpf_insn *insnsi, \
|
||||
unsigned int (*bpf_func)(const void *, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue