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: <1330672071.19557.105.camel@satguru>
Date:	Fri, 02 Mar 2012 08:07:51 +0100
From:	Jonas Bonn <jonas@...thpole.se>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Richard Weinberger <richard@....at>, linux@...ts.openrisc.net,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: OpenRISC: Module loader broken

On Fri, 2012-03-02 at 07:49 +0100, Geert Uytterhoeven wrote:
> On Fri, Mar 2, 2012 at 07:11, Jonas Bonn <jonas@...thpole.se> wrote:
> So OpenRISC is big endian, which matches
> arch/openrisc/include/asm/byteorder.h:#include <linux/byteorder/big_endian.h>
> 
> However, there are some remainings of little endian support:
> arch/openrisc/include/asm/unaligned.h:#if defined(__LITTLE_ENDIAN)
> arch/openrisc/include/asm/unaligned.h:#elif defined(__BIG_ENDIAN)
> arch/openrisc/include/asm/unaligned.h:# error need to define endianess

Technically OpenRISC can be either big or little endian, but there is no
publically available little-endian implementation... yet.  There's a
proprietary little-endian implementation, but they're not running Linux.
Anyway, that's the reason for starting to cater for both endianesses.

> 
> > Since 'location' points at the 32-bit instruction in question, that cast
> > is supposed to be saying:  'move 16 bit value into low 16 bits of
> > instruction'.
> 
> It may be more readable and safer (w.r.t. changing endianness) to do
> 32-bit loads and stores and explicitly modify the 16 LSB.

Agreed.  It's probably a bit too clever that way it's written now.

/Jonas

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ