Thread (4 messages) 4 messages, 3 authors, 2014-04-28

Re: [PATCH] tools: bpf_dbg: register misuse

From: Alexei Starovoitov <hidden>
Date: 2014-04-25 21:15:19

On Fri, Apr 25, 2014 at 1:52 PM, Brendan Hickey [off-list ref] wrote:
Hi,

I noticed a mistaken use of the X register instead of the K register
in bpf_dbg. Enclosed is a fix.
Nice catch!
Please add your signed-off-by.
quoted hunk ↗ jump to hunk
Brendan


From: Brendan Hickey <redacted>
Date: Fri, 25 Apr 2014 15:54:13 -0400
Subject: [PATCH] bpf_dbg: Fix erroneous register use for AND

The AND instruction is erroneously using the X register instead of the K
register.
---
 tools/net/bpf_dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
index 65dc757..5e54848 100644
--- a/tools/net/bpf_dbg.c
+++ b/tools/net/bpf_dbg.c
@@ -823,7 +823,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;


--
1.9.1.423.g4596e3a
--
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help