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] [day] [month] [year] [list]
Date:   Wed, 15 Feb 2017 16:20:23 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     "Maciej W. Rozycki" <macro@...ux-mips.org>,
        Matt Turner <mattst88@...il.com>
Cc:     James Bottomley <James.Bottomley@...senpartnership.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Helge Deller <deller@....de>,
        LKML <linux-kernel@...r.kernel.org>,
        "linux-parisc\@vger.kernel.org" <linux-parisc@...r.kernel.org>,
        Michael Kerrisk <mtk.manpages@...glemail.com>,
        linux-api@...r.kernel.org
Subject: Re: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures

"Maciej W. Rozycki" <macro@...ux-mips.org> writes:

> On Sun, 5 Feb 2017, Matt Turner wrote:
>
>> > I don't think it is other than for PPC.  If you're not variable endian
>> > (which is only PPC to date), then you should know a priori what endian
>> > you are from the #defines in userspace.
>> 
>> MIPS as well, but it seems strange to require the kernel to tell you
>> your endianness, when you can easily determine it yourself. Unless
>> there's something about this I don't understand.
>
>  Many MIPS processors do have a reverse-endian control bit, which allows a 
> user process to execute in the endianness opposite to the endianness the 
> kernel runs in.  The feature has been around since 1991 and the R4000 CPU, 
> however support is unlikely to be ever added to the MIPS/Linux port, due 
> to the complexity required for byte-swapping all the data structures 
> passed in memory between the kernel and the userland.  Does the PPC/Linux 
> port actually implement this swapping?

No. Userspace can change endian, but it has to cope with the kernel
being in the original endian.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ