diff options
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r-- | kernel/bpf/core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index f45827e205d3..b4f1cb0c5ac7 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c | |||
@@ -1162,12 +1162,12 @@ out: | |||
1162 | LD_ABS_W: /* BPF_R0 = ntohl(*(u32 *) (skb->data + imm32)) */ | 1162 | LD_ABS_W: /* BPF_R0 = ntohl(*(u32 *) (skb->data + imm32)) */ |
1163 | off = IMM; | 1163 | off = IMM; |
1164 | load_word: | 1164 | load_word: |
1165 | /* BPF_LD + BPD_ABS and BPF_LD + BPF_IND insns are | 1165 | /* BPF_LD + BPD_ABS and BPF_LD + BPF_IND insns are only |
1166 | * only appearing in the programs where ctx == | 1166 | * appearing in the programs where ctx == skb |
1167 | * skb. All programs keep 'ctx' in regs[BPF_REG_CTX] | 1167 | * (see may_access_skb() in the verifier). All programs |
1168 | * == BPF_R6, bpf_convert_filter() saves it in BPF_R6, | 1168 | * keep 'ctx' in regs[BPF_REG_CTX] == BPF_R6, |
1169 | * internal BPF verifier will check that BPF_R6 == | 1169 | * bpf_convert_filter() saves it in BPF_R6, internal BPF |
1170 | * ctx. | 1170 | * verifier will check that BPF_R6 == ctx. |
1171 | * | 1171 | * |
1172 | * BPF_ABS and BPF_IND are wrappers of function calls, | 1172 | * BPF_ABS and BPF_IND are wrappers of function calls, |
1173 | * so they scratch BPF_R1-BPF_R5 registers, preserve | 1173 | * so they scratch BPF_R1-BPF_R5 registers, preserve |