diff options
author | David S. Miller <davem@davemloft.net> | 2017-04-20 10:35:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-20 10:35:33 -0400 |
commit | 7b9f6da175f9387ebfc202f35e0d39514899ab19 (patch) | |
tree | a884c05aaeff40d8f80831549cccc820dcdd0f4f /kernel/bpf/verifier.c | |
parent | 9868879f293c599ce13b584c5bd8800312970781 (diff) | |
parent | 1debdc8f9ebd07daf140e417b3841596911e0066 (diff) | |
download | lwn-7b9f6da175f9387ebfc202f35e0d39514899ab19.tar.gz lwn-7b9f6da175f9387ebfc202f35e0d39514899ab19.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
A function in kernel/bpf/syscall.c which got a bug fix in 'net'
was moved to kernel/bpf/verifier.c in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r-- | kernel/bpf/verifier.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 62e1e447ded9..ca15cf2b85bb 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -3349,6 +3349,14 @@ static int fixup_bpf_calls(struct bpf_verifier_env *env) if (insn->imm == BPF_FUNC_xdp_adjust_head) prog->xdp_adjust_head = 1; if (insn->imm == BPF_FUNC_tail_call) { + /* If we tail call into other programs, we + * cannot make any assumptions since they can + * be replaced dynamically during runtime in + * the program array. + */ + prog->cb_access = 1; + prog->xdp_adjust_head = 1; + /* mark bpf_tail_call as different opcode to avoid * conditional branch in the interpeter for every normal * call and to prevent accidental JITing by JIT compiler |