aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/core.c2
-rw-r--r--kernel/bpf/syscall.c2
-rw-r--r--kernel/bpf/verifier.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index bdcc9f4ba767..83e0d153b0b4 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1143,7 +1143,7 @@ struct bpf_prog * __weak bpf_int_jit_compile(struct bpf_prog *prog)
1143 return prog; 1143 return prog;
1144} 1144}
1145 1145
1146bool __weak bpf_helper_changes_skb_data(void *func) 1146bool __weak bpf_helper_changes_pkt_data(void *func)
1147{ 1147{
1148 return false; 1148 return false;
1149} 1149}
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 88f609f1c0c3..4819ec9d95f6 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -579,6 +579,8 @@ static void fixup_bpf_calls(struct bpf_prog *prog)
579 prog->dst_needed = 1; 579 prog->dst_needed = 1;
580 if (insn->imm == BPF_FUNC_get_prandom_u32) 580 if (insn->imm == BPF_FUNC_get_prandom_u32)
581 bpf_user_rnd_init_once(); 581 bpf_user_rnd_init_once();
582 if (insn->imm == BPF_FUNC_xdp_adjust_head)
583 prog->xdp_adjust_head = 1;
582 if (insn->imm == BPF_FUNC_tail_call) { 584 if (insn->imm == BPF_FUNC_tail_call) {
583 /* mark bpf_tail_call as different opcode 585 /* mark bpf_tail_call as different opcode
584 * to avoid conditional branch in 586 * to avoid conditional branch in
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 5b14f85f45c6..d28f9a3380a9 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1216,7 +1216,7 @@ static int check_call(struct bpf_verifier_env *env, int func_id)
1216 return -EINVAL; 1216 return -EINVAL;
1217 } 1217 }
1218 1218
1219 changes_data = bpf_helper_changes_skb_data(fn->func); 1219 changes_data = bpf_helper_changes_pkt_data(fn->func);
1220 1220
1221 memset(&meta, 0, sizeof(meta)); 1221 memset(&meta, 0, sizeof(meta));
1222 meta.pkt_access = fn->pkt_access; 1222 meta.pkt_access = fn->pkt_access;