diff mbox

[net] bpf_dbg: fix wrong register usage

Message ID 1398846278-1053-1-git-send-email-dborkman@redhat.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Daniel Borkmann April 30, 2014, 8:24 a.m. UTC
From: Brendan Hickey <bhickey@google.com>

The AND instruction is erroneously using the X register instead
of the K register.

Signed-off-by: Brendan Hickey <bhickey@google.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
 Resending correctly for Brendan. (I'm back from vaction on 11th
 of May, so I don't have much Internet access, I didn't want to
 get this one lost in meantime though.)

 tools/net/bpf_dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller April 30, 2014, 8:16 p.m. UTC | #1
From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 30 Apr 2014 10:24:38 +0200

> From: Brendan Hickey <bhickey@google.com>
> 
> The AND instruction is erroneously using the X register instead
> of the K register.
> 
> Signed-off-by: Brendan Hickey <bhickey@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
index bb31813..9a287be 100644
--- a/tools/net/bpf_dbg.c
+++ b/tools/net/bpf_dbg.c
@@ -820,7 +820,7 @@  do_div:
 		r->A &= r->X;
 		break;
 	case BPF_ALU_AND | BPF_K:
-		r->A &= r->X;
+		r->A &= K;
 		break;
 	case BPF_ALU_OR | BPF_X:
 		r->A |= r->X;