Commit e5744fe9 authored by Brendan Hickey's avatar Brendan Hickey Committed by David S. Miller

bpf_dbg: fix wrong register usage

The AND instruction is erroneously using the X register instead
of the K register.
Signed-off-by: default avatarBrendan Hickey <bhickey@google.com>
Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f114890c
......@@ -820,7 +820,7 @@ static void bpf_single_step(struct bpf_regs *r, struct sock_filter *f,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment