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>] [day] [month] [year] [list]
Date:   Wed, 11 Jan 2017 23:58:30 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     David Binderman <dcb314@...mail.com>,
        Mauro Carvalho Chehab <mchehab@....samsung.com>
Cc:     "mchehab@...nel.org" <mchehab@...nel.org>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: edac/i7300_edac.c:307: strange macro ?

On Wed, Jan 11, 2017 at 04:48:51PM +0000, David Binderman wrote:
> Hello there,
> 
> drivers/edac/i7300_edac.c:307:32: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]

Are you adding some other -W-switches to the kernel Makefile?

:-)

> Source code is
> 
>   #define IS_SECOND_CH(v)   ((v) * (1 << 17))

Looks like a bug to me. According to the chipset doc, bit 17 in REDMEMB
is the locator bit for CS[3:2] which probably means the second channel
but multiplying the full register value with 131072 looks wrong.

> Maybe better code
> 
>   #define IS_SECOND_CH(v)   ((v) & (1 << 17))

Yap.

Mauro, what's up?

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ