[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5374D662.8090002@zytor.com>
Date: Thu, 15 May 2014 07:59:46 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
Darren Hart <dvhart@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, Jakub Jelinek <jakub@...hat.com>
CC: "linux-man@...r.kernel.org" <linux-man@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
Davidlohr Bueso <davidlohr.bueso@...com>,
Arnd Bergmann <arnd@...db.de>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
Linux API <linux-api@...r.kernel.org>,
"Carlos O'Donell" <carlos@...hat.com>
Subject: Re: futex(2) man page update help request
On 05/15/2014 06:46 AM, Michael Kerrisk (man-pages) wrote:
>
> People have a number of times noted that there are problems
> with syscall(), but I'm not knowledgeable on the details.
> I'd happily take a patch to the man page (which, for historical
> reasons, is actually syscall(2)) that explains the the problems
> (and ideally notes those platforms where there are no problems).
>
It has to do with how ABIs deal with doublewidth arguments.
There is a reason why Linux syscall ABIs generally have a 1:1 mapping
with the user space ABIs, and why the system call argument is passed not
in the first argument but in a different place (usually a separately
clobbered register, e.g. %eax on x86-64).
On some platforms, doublewidth registers have to be aligned in register
pairs. On some other platforms, enough arguments mean some will be
passed in memory, where they are forced to be aligned, or they are not
allowed to straddle the register-memory boundary. All of this means
that padding words might be introduced, and they will be introduced in
the wrong place because of the additional argument introduced at the
beginning of the argument sequence.
On the other hand, the old SYSCALL user-space macros just plain didn't
handle doubleword arguments.
-hpa
--
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