* [PATCH] bpf, x86_32: Fix logic error in BPF_LDX zero-extension
@ 2020-04-23 5:06 Wang YanQing
2020-04-25 0:25 ` Alexei Starovoitov
0 siblings, 1 reply; 2+ messages in thread
From: Wang YanQing @ 2020-04-23 5:06 UTC (permalink / raw)
To: daniel; +Cc: ast, davem, jiong.wang, kuznet, tglx, netdev, bpf, linux-kernel
When verifier_zext is true, we don't need to emit code
for zero-extension.
Fixes: 836256bf ("x32: bpf: eliminate zero extension code-gen")
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
arch/x86/net/bpf_jit_comp32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
index 4d2a7a764602..ed34dd16ebc5 100644
--- 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),
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bpf, x86_32: Fix logic error in BPF_LDX zero-extension
2020-04-23 5:06 [PATCH] bpf, x86_32: Fix logic error in BPF_LDX zero-extension Wang YanQing
@ 2020-04-25 0:25 ` Alexei Starovoitov
0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2020-04-25 0:25 UTC (permalink / raw)
To: Wang YanQing, Daniel Borkmann, Alexei Starovoitov,
David S. Miller, Jiong Wang, Alexey Kuznetsov, Thomas Gleixner,
Network Development, bpf, LKML
On Wed, Apr 22, 2020 at 10:18 PM Wang YanQing <udknight@gmail.com> wrote:
>
> When verifier_zext is true, we don't need to emit code
> for zero-extension.
>
> Fixes: 836256bf ("x32: bpf: eliminate zero extension code-gen")
>
> Signed-off-by: Wang YanQing <udknight@gmail.com>
Applied.
Please make sure fixes tag looks like this:
Fixes: 836256bf5f37 ("x32: bpf: eliminate zero extension code-gen")
all 12 digits.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-25 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 5:06 [PATCH] bpf, x86_32: Fix logic error in BPF_LDX zero-extension Wang YanQing
2020-04-25 0:25 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).