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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 07 Nov 2013 07:23:10 -0600
From:	Rob Herring <robherring2@...il.com>
To:	Borislav Petkov <bp@...en8.de>
CC:	linux-kernel@...r.kernel.org,
	Rob Herring <rob.herring@...xeda.com>,
	Doug Thompson <dougthompson@...ssion.com>,
	Robert Richter <rric@...nel.org>, linux-edac@...r.kernel.org
Subject: Re: [PATCH] edac, highbank: remove dependency on ARCH_HIGHBANK

On 11/07/2013 06:27 AM, Borislav Petkov wrote:
> On Wed, Nov 06, 2013 at 11:17:41AM -0600, Rob Herring wrote:
>> Using some interface which is arch specific and should not be used in a
>> driver.
> 
> Well, sorry, but this is not something which justifies enabling building
> of compilation units on arches for which they don't apply. Rather, this
> should be caught during review.
> 
> I find it highly unfair to waste cycles building stuff on an arch for
> which the drivers aren't meant for. And it doesn't make any sense anyway
> - I'd like all*config to get finished at some point soonish and not
> build the whole world.
> 
> And, btw, highbank triggers the following on AMD64:
> 
>   CC [M]  drivers/edac/edac_pci.o
>   CC [M]  drivers/edac/highbank_mc_edac.o
>   CC [M]  drivers/edac/highbank_l2_edac.o
> drivers/edac/highbank_mc_edac.c: In function ‘highbank_mc_probe’:
> drivers/edac/highbank_mc_edac.c:210:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>   dimm->nr_pages = (~0UL >> PAGE_SHIFT) + 1;
>   ^

See, we are benefiting already. I already found this thanks to the 0-day
builder (which doesn't build arm64). This is a 64-bit vs. 32-bit bug and
I need this driver enabled for arm64, so this needs to be fixed.

> which is clearly a bug since ->nr_pages becomes 0.
> 
> BUT(!), this bug doesn't make any sense on x86 since highbank won't load
> there and yours is a 32-bit arm. (it'll probably make some sense on
> arm64 assuming the native long type is 8 bytes there).
> 
> And people would start reporting those bugs and we're going to start
> asking on which arch are you compiling just to realize that a bug like
> that doesn't make any sense on an N/A arch.
> 
> Oh, and then other edac drivers would simply fail building:
> 
>   CC [M]  drivers/edac/octeon_edac-pc.o
> drivers/edac/octeon_edac-pc.c:21:29: fatal error: asm/octeon/cvmx.h: No such file or directory
>  #include <asm/octeon/cvmx.h>
>                              ^
> compilation terminated.
> make[1]: *** [drivers/edac/octeon_edac-pc.o] Error 1
> 
> simply because x86/include doesn't have that header.

Exactly the mess of arch or mach headers in drivers I referred to.

> So let's not waste any more time with this topic. I think there are a
> numerous other ways for achieving build coverage which make *way* *more*
> sense than this.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ