diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index c5bedc82bc1c540bf466c4d2e64f8663a974536d..bf38f5e8196c1bfc307405eff2b11a91059738d9 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -453,7 +453,11 @@ static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn) if (unlikely(!prog)) goto out; - ARG1 = BPF_R1; + /* ARG1 at this point is guaranteed to point to CTX from + * the verifier side due to the fact that the tail call is + * handeled like a helper, that is, bpf_tail_call_proto, + * where arg1_type is ARG_PTR_TO_CTX. + */ insn = prog->insnsi; goto select_insn; out: