[linux-yocto] [PATCH 14/26] bpf_dbg: fix wrong register usage

zhe.he at windriver.com zhe.he at windriver.com
Thu Aug 28 22:25:29 PDT 2014


From: Brendan Hickey <bhickey at google.com>

commit e5744fe9d262d11131916d04ea79ea539fe296c0 upstream

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

Signed-off-by: Brendan Hickey <bhickey at google.com>
Signed-off-by: Daniel Borkmann <dborkman at redhat.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: He Zhe <zhe.he at windriver.com>
---
 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 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;
-- 
1.9.1



More information about the linux-yocto mailing list