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, 1 Nov 2017 21:20:18 +0900
From:   Stafford Horne <shorne@...il.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] openrisc: pass endianness info to sparse

+CC List

On Wed, Nov 01, 2017 at 05:34:29AM +0100, Luc Van Oostenryck wrote:
> On Wed, Nov 1, 2017 at 3:00 AM, Stafford Horne <shorne@...il.com> wrote:
> > On Tue, Oct 31, 2017 at 06:22:05PM +0100, Luc Van Oostenryck wrote:
> >> openrisc is big-endian only but sparse assumes the same endianness
> >> as the building machine.
> >> This is problematic for code which expect __BYTE_ORDER__ being
> >> correctly predefined by the compiler which sparse can then
> >> pre-process differently from what gcc would, depending on the
> >> building machine endianness.
> >>
> >> Fix this by letting sparse know about the architecture endianness.
> >
> > Thank You,
> >
> > I have applied this.  I haven't really used sparse before, but it looks great.
> 
> Just use 'make C=1' or 'make C=2' when compiling the kernel.
> For endianness problems, sparse is invaluable as it does things no
> others tools can.

Right, I tried it out and it works well.  Now I have a new tool to add to my
workflow, and it looks like a few bugs to fix as well.

> > Do you think openrisc needs to set other arguments like __BIG_ENDIAN__ as other
> > architectures do?
> 
> If you use a recent version of sparse (the version 0.5.1 released in August),
> which I strongly advise, you don't need to as sparse then understand
> -mbig-endian
> and then define __BIG_ENDIAN__ internally, like GCC do.
> But with older version of sparse, yes, it would also be needed as well
> as __BYTE_ORDER__.

I do have 0.5.1 so I should be good.

-Stafford

Powered by blists - more mailing lists