projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50fe7eb
)
bpf, x86_32: Fix logic error in BPF_LDX zero-extension
author
Wang YanQing
<udknight@gmail.com>
Thu, 23 Apr 2020 05:06:37 +0000
(13:06 +0800)
committer
Alexei Starovoitov
<ast@kernel.org>
Sat, 25 Apr 2020 00:23:01 +0000
(17:23 -0700)
When verifier_zext is true, we don't need to emit code
for zero-extension.
Fixes:
836256bf5f37
("x32: bpf: eliminate zero extension code-gen")
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link:
https://lore.kernel.org/bpf/20200423050637.GA4029@udknight
arch/x86/net/bpf_jit_comp32.c
patch
|
blob
|
history
diff --git
a/arch/x86/net/bpf_jit_comp32.c
b/arch/x86/net/bpf_jit_comp32.c
index
ba7d9cc
..
66cd150
100644
(file)
--- a/
arch/x86/net/bpf_jit_comp32.c
+++ b/
arch/x86/net/bpf_jit_comp32.c
@@
-1847,7
+1847,7
@@
static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
case BPF_B:
case BPF_H:
case BPF_W:
- if (
!
bpf_prog->aux->verifier_zext)
+ if (bpf_prog->aux->verifier_zext)
break;
if (dstk) {
EMIT3(0xC7, add_1reg(0x40, IA32_EBP),