Subject: Re: [PATCH] tools: bpf_dbg: register misuse

From: Daniel Borkmann <[email-masked]>
Date: Mon, 28 Apr 2014 10:49:08 +0200

On 04/25/2014 11:23 PM, Brendan Hickey wrote:
> From: Brendan Hickey <[email-masked]>
> Date: Fri, 25 Apr 2014 17:22:52 -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.
>
> Signed-off-by: Brendan Hickey <[email-masked]>

Sorry for the late reply as I'm on vacations currently.

Patch looks good to me, but it looks like it got whitespace
corrupted by your email client. Please submit this against
'net' in subject line. Otherwise when this is fixed, feel
free to add my ack:

Acked-by: Daniel Borkmann <[email-masked]>

Thanks, Brendan!

> ---
>   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;
>