提交 e5744fe9 编写于 作者: B Brendan Hickey 提交者: 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: NBrendan Hickey <bhickey@google.com>
Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册