Skip to contentSkip to conversation

bpf_dbg: fix wrong register usage

PATCH Applied Daniel Borkmann 2 participants 2 messages Apr 30, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf_dbg: fix wrong register usage

From: Brendan Hickey <[email protected]>

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

---
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(-)
tools/net/bpf_dbg.c +1 -1
index bb31813..9a287be 100644
@@ -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;
Signature · 1 line
1.7.11.7