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: <OFE5212A1C.B62E8E51-ONC125772F.00371EE7-C125772F.0038EEC8@transmode.se>
Date:	Wed, 26 May 2010 12:21:51 +0200
From:	Joakim Tjernlund <joakim.tjernlund@...nsmode.se>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-next@...r.kernel.org,
	Linus <torvalds@...ux-foundation.org>
Subject: Re: linux-next: build warning in Linus'tree

Stephen Rothwell <sfr@...b.auug.org.au> wrote on 2010/05/26 09:14:24:
>
> Hi Andrew, Joakim,
>
> On Tue, 25 May 2010 23:41:16 -0700 Andrew Morton <akpm@...ux-foundation.org> wrote:
> >
> > On Wed, 26 May 2010 08:29:45 +0200 Joakim Tjernlund
> <joakim.tjernlund@...nsmode.se> wrote:
> >
> > > Stephen Rothwell <sfr@...b.auug.org.au> wrote on 2010/05/26 06:09:00:
> > > >
> > > > On Tue, 25 May 2010 18:20:40 -0700 Andrew Morton <akpm@...ux-
> foundation.org> wrote:
> > > > >
> > > > > hmpf.  Does this fix?
> > > >
> > > > No.
> > > >
> > > > The problem is that __LITTLE_ENDIAN is only defined in
> > > > linux/byteorder/little_endian.h which is only included by little endian
> > > > architectures ...
> > >
> > > Ah, not sure how to fix this ATM. Perhaps best to revert
> > >    crc32: use __BYTE_ORDER macro for endian detection
> > > for now.
> >
> > yup.
>
> We also need to revert b3b77c8caef1750ebeea1054e39e358550ea9f55 ("endian:
> #define __BYTE_ORDER") in order to get rid of the other warning I pointed out:
>
> In file included from fs/jfs/jfs_types.h:33,
>                  from fs/jfs/jfs_incore.h:26,
>                  from fs/jfs/file.c:22:
> fs/jfs/endian24.h:36:101: warning: "__LITTLE_ENDIAN" is not defined
>
> I get this warning on powerpc builds for most of the files in fs/jfs ...

endian24.h has:
#if (defined(__KERNEL__) && defined(__LITTLE_ENDIAN)) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN))
That won't work for BE CPU's. Perhaps something like this will?
#if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN)

The kernel borrows __LITTLE_ENDIAN/__BIG_ENDIAN from user space but does not impl. the
full semantics that user space has. Adding full user space semantics isn't easy as it clashes with
current use of __LITTLE_ENDIAN/__BIG_ENDIAN.

If my suggestion above works, then one could start transforming current uses of __BYTE_ORDER,
into similar constructs and once all are done, #define both __LITTLE_ENDIAN/__BIG_ENDIAN and
move back to #if __BYTE_ORDER == __LITTLE_ENDIAN

 Jocke

--
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