diff options
author | Anay Wadhera <awadhera@berkeley.edu> | 2021-05-20 21:56:22 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:49:43 +0300 |
commit | d93445ad89b2a11be7f6cad950c1e62a164c5c36 (patch) | |
tree | e30f971c55b2f8011fc5bee373dfc35dc6b9bf51 /arch/x86/net/bpf_jit_comp.c | |
parent | 23e6e6ae2fe1086a796e42ba907c17181daac9d0 (diff) |
Revert "bpf: fix bpf_tail_call() x64 JIT"
This reverts commit 361fb0481247bea4da3eb122e685c8b72ef7c8a9.
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'arch/x86/net/bpf_jit_comp.c')
-rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 82f8cd0a3af9..7f89c29e6646 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -280,9 +280,9 @@ static void emit_bpf_tail_call(u8 **pprog) /* if (index >= array->map.max_entries) * goto out; */ - EMIT2(0x89, 0xD2); /* mov edx, edx */ - EMIT3(0x39, 0x56, /* cmp dword ptr [rsi + 16], edx */ + EMIT4(0x48, 0x8B, 0x46, /* mov rax, qword ptr [rsi + 16] */ offsetof(struct bpf_array, map.max_entries)); + EMIT3(0x48, 0x39, 0xD0); #define OFFSET1 (41 + RETPOLINE_RAX_BPF_JIT_SIZE) /* number of bytes to jump */ EMIT2(X86_JBE, OFFSET1); /* jbe out */ label1 = cnt; |