Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581064 > unrolled thread

Re: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures

Started byMichael Ellerman <mpe@ellerman.id.au>
First post2017-02-15 06:30 +0100
Last post2017-02-15 06:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures Michael Ellerman <mpe@ellerman.id.au> - 2017-02-15 06:30 +0100

#1581064 — Re: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-02-15 06:30 +0100
SubjectRe: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures
Message-ID<tb0k9-3UE-7@gated-at.bofh.it>
"Maciej W. Rozycki" <macro@linux-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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web