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: <20171110193258.qv6dbokqpjrrq3yb@mwanda>
Date:   Fri, 10 Nov 2017 22:32:59 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Marcus Wolf <marcus.wolf@...rthome-wolf.de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: staging: pi433: Possible bug in rf69.c

On Fri, Nov 10, 2017 at 06:23:32PM +0100, Marcus Wolf wrote:
> Hi everybody!
> 
> Just comparing the master of Gregs statging of pi433 with my local SVN
> to review all changes, that were done the last monthes.
> 
> I am not sure, but maybe we imported a bug in rf69.c lines 378 and
> following:
> 
> Gregs repo:
> 	case automatic:	 return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) & ~MASK_LNA_GAIN) & LNA_GAIN_AUTO) );
> my repo:
> 	case automatic:	 return WRITE_REG(REG_LNA, ( (READ_REG(REG_LNA) & ~MASK_LNA_GAIN) | LNA_GAIN_AUTO) );

I edited the lines for clarity.  The difference is that your repo does
a bitwise OR "| LNA_GAIN_AUTO" and the kernel.org code does a bitwise
"& LNA_GAIN_AUTO".

The kernel repo hasn't changed since you sent us the driver in commit
874bcba65f9a ('staging: pi433: New driver').  I agree that & doesn't
seem to make sense and I'm disapointed that it doesn't cause a Smatch
warning.

But LNA_GAIN_AUTO is zero so maybe | BIT(LNA_GAIN_AUTO) was intended
instead of | LNA_GAIN_AUTO.  I don't know...  No one on this list knows
the answer probably.  :/

regards,
dan caprenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ