lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+Z8YJL3zEz1n1ayhSWQRRSxiL__97RciQOWhLGT2VjjdqT0Lg@mail.gmail.com>
Date:	Fri, 25 Apr 2014 17:23:38 -0400
From:	Brendan Hickey <bhickey@...gle.com>
To:	Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Daniel Borkmann <dborkman@...hat.com>
Subject: Re: [PATCH] tools: bpf_dbg: register misuse

From: Brendan Hickey <bhickey@...gle.com>
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 <bhickey@...gle.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 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;
-- 
1.9.1.423.g4596e3a

On Fri, Apr 25, 2014 at 5:15 PM, Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
> On Fri, Apr 25, 2014 at 1:52 PM, Brendan Hickey <bhickey@...gle.com> wrote:
>> Hi,
>>
>> I noticed a mistaken use of the X register instead of the K register
>> in bpf_dbg. Enclosed is a fix.
>
> Nice catch!
> Please add your signed-off-by.
>
>> Brendan
>>
>>
>> From: Brendan Hickey <bhickey@...gle.com>
>> Date: Fri, 25 Apr 2014 15:54:13 -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.
>> ---
>>  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;
>>
>>
>> --
>> 1.9.1.423.g4596e3a
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ