diff options
Diffstat (limited to 'arch/x86/net/bpf_jit_comp.c')
-rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 579a8fd74be0..be2e7a2b10d7 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c | |||
@@ -269,7 +269,7 @@ static void emit_bpf_tail_call(u8 **pprog) | |||
269 | EMIT4(0x48, 0x8B, 0x46, /* mov rax, qword ptr [rsi + 16] */ | 269 | EMIT4(0x48, 0x8B, 0x46, /* mov rax, qword ptr [rsi + 16] */ |
270 | offsetof(struct bpf_array, map.max_entries)); | 270 | offsetof(struct bpf_array, map.max_entries)); |
271 | EMIT3(0x48, 0x39, 0xD0); /* cmp rax, rdx */ | 271 | EMIT3(0x48, 0x39, 0xD0); /* cmp rax, rdx */ |
272 | #define OFFSET1 44 /* number of bytes to jump */ | 272 | #define OFFSET1 47 /* number of bytes to jump */ |
273 | EMIT2(X86_JBE, OFFSET1); /* jbe out */ | 273 | EMIT2(X86_JBE, OFFSET1); /* jbe out */ |
274 | label1 = cnt; | 274 | label1 = cnt; |
275 | 275 | ||
@@ -278,15 +278,15 @@ static void emit_bpf_tail_call(u8 **pprog) | |||
278 | */ | 278 | */ |
279 | EMIT2_off32(0x8B, 0x85, -STACKSIZE + 36); /* mov eax, dword ptr [rbp - 516] */ | 279 | EMIT2_off32(0x8B, 0x85, -STACKSIZE + 36); /* mov eax, dword ptr [rbp - 516] */ |
280 | EMIT3(0x83, 0xF8, MAX_TAIL_CALL_CNT); /* cmp eax, MAX_TAIL_CALL_CNT */ | 280 | EMIT3(0x83, 0xF8, MAX_TAIL_CALL_CNT); /* cmp eax, MAX_TAIL_CALL_CNT */ |
281 | #define OFFSET2 33 | 281 | #define OFFSET2 36 |
282 | EMIT2(X86_JA, OFFSET2); /* ja out */ | 282 | EMIT2(X86_JA, OFFSET2); /* ja out */ |
283 | label2 = cnt; | 283 | label2 = cnt; |
284 | EMIT3(0x83, 0xC0, 0x01); /* add eax, 1 */ | 284 | EMIT3(0x83, 0xC0, 0x01); /* add eax, 1 */ |
285 | EMIT2_off32(0x89, 0x85, -STACKSIZE + 36); /* mov dword ptr [rbp - 516], eax */ | 285 | EMIT2_off32(0x89, 0x85, -STACKSIZE + 36); /* mov dword ptr [rbp - 516], eax */ |
286 | 286 | ||
287 | /* prog = array->prog[index]; */ | 287 | /* prog = array->prog[index]; */ |
288 | EMIT4(0x48, 0x8D, 0x44, 0xD6); /* lea rax, [rsi + rdx * 8 + 0x50] */ | 288 | EMIT4_off32(0x48, 0x8D, 0x84, 0xD6, /* lea rax, [rsi + rdx * 8 + offsetof(...)] */ |
289 | EMIT1(offsetof(struct bpf_array, prog)); | 289 | offsetof(struct bpf_array, prog)); |
290 | EMIT3(0x48, 0x8B, 0x00); /* mov rax, qword ptr [rax] */ | 290 | EMIT3(0x48, 0x8B, 0x00); /* mov rax, qword ptr [rax] */ |
291 | 291 | ||
292 | /* if (prog == NULL) | 292 | /* if (prog == NULL) |