diff options
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r-- | kernel/bpf/syscall.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 7af0dcc5d755..821f9e807de5 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c | |||
@@ -617,6 +617,14 @@ static void fixup_bpf_calls(struct bpf_prog *prog) | |||
617 | if (insn->imm == BPF_FUNC_xdp_adjust_head) | 617 | if (insn->imm == BPF_FUNC_xdp_adjust_head) |
618 | prog->xdp_adjust_head = 1; | 618 | prog->xdp_adjust_head = 1; |
619 | if (insn->imm == BPF_FUNC_tail_call) { | 619 | if (insn->imm == BPF_FUNC_tail_call) { |
620 | /* If we tail call into other programs, we | ||
621 | * cannot make any assumptions since they | ||
622 | * can be replaced dynamically during runtime | ||
623 | * in the program array. | ||
624 | */ | ||
625 | prog->cb_access = 1; | ||
626 | prog->xdp_adjust_head = 1; | ||
627 | |||
620 | /* mark bpf_tail_call as different opcode | 628 | /* mark bpf_tail_call as different opcode |
621 | * to avoid conditional branch in | 629 | * to avoid conditional branch in |
622 | * interpeter for every normal call | 630 | * interpeter for every normal call |