Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1308b23a-d7c0-449e-becd-53c42114661e@app.fastmail.com>
Date: Fri, 21 Jun 2024 08:28:40 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "LEROY Christophe" <christophe.leroy2@...soprasteria.com>,
 "Helge Deller" <deller@....de>, "Arnd Bergmann" <arnd@...nel.org>,
 Linux-Arch <linux-arch@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "Rich Felker" <dalias@...c.org>, "Andreas Larsson" <andreas@...sler.com>,
 guoren <guoren@...nel.org>,
 "Christophe Leroy" <christophe.leroy@...roup.eu>,
 "H. Peter Anvin" <hpa@...or.com>,
 "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
 "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
 "linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
 "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
 "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>,
 "Heiko Carstens" <hca@...ux.ibm.com>,
 "musl@...ts.openwall.com" <musl@...ts.openwall.com>,
 "Nicholas Piggin" <npiggin@...il.com>,
 "Alexander Viro" <viro@...iv.linux.org.uk>,
 "John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>,
 "LTP List" <ltp@...ts.linux.it>, "Brian Cain" <bcain@...cinc.com>,
 "Christian Brauner" <brauner@...nel.org>,
 "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
 "Xi Ruoyao" <libc-alpha@...rceware.org>,
 "linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
 "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
 "Adhemerval Zanella Netto" <adhemerval.zanella@...aro.org>,
 "linux-hexagon@...r.kernel.org" <linux-hexagon@...r.kernel.org>,
 "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
 "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
 "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH 07/15] parisc: use generic sys_fanotify_mark implementation

On Fri, Jun 21, 2024, at 07:26, LEROY Christophe wrote:
> Le 20/06/2024 à 23:21, Helge Deller a écrit :
>> [Vous ne recevez pas souvent de courriers de deller@....de. Découvrez
>> pourquoi ceci est important à
>> https://aka.ms/LearnAboutSenderIdentification ]
>>
>> On 6/20/24 18:23, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@...db.de>
>>>
>>> The sys_fanotify_mark() syscall on parisc uses the reverse word order
>>> for the two halves of the 64-bit argument compared to all syscalls on
>>> all 32-bit architectures. As far as I can tell, the problem is that
>>> the function arguments on parisc are sorted backwards (26, 25, 24, 23,
>>> ...) compared to everyone else,
>>
>> r26 is arg0, r25 is arg1, and so on.
>> I'm not sure I would call this "sorted backwards".
>> I think the reason is simply that hppa is the only 32-bit big-endian
>> arch left...
>
> powerpc/32 is big-endian: r3 is arg0, r4 is arg1, ... r10 is arg7.

Right, I'm pretty sure the ordering is the same on arm, mips,
s390, m68k, openrisc, sh and sparc when running 32-bit big-endian
code.

It's more likely to be related to the upward growing stack.
I checked the gcc sources and found that out of the 50 supported
architectures, ARGS_GROW_DOWNWARD is set on everything except
for gcn, stormy16 and  32-bit parisc. The other two are
little-endian though. STACK_GROWS_DOWNWARD in turn is set on
everything other than parisc (both 32-bit and 64-bit).

      Arnd

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.