linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: munroesj@us.ibm.com
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	David Miller <davem@davemloft.net>,
	drepper@redhat.com, ralf@linux-mips.org,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@teksavvy.com, torvalds@linux-foundation.org
Subject: Re: 64-syscall args on 32-bit vs syscall()
Date: Wed, 17 Mar 2010 11:31:14 +1100	[thread overview]
Message-ID: <1268785874.2335.137.camel@pasglop> (raw)
In-Reply-To: <1268776570.19726.98.camel@spokane1.rchland.ibm.com>

On Tue, 2010-03-16 at 16:56 -0500, Steven Munroe wrote:
> On Tue, 2010-03-16 at 07:35 +1100, Benjamin Herrenschmidt wrote:
> > On Mon, 2010-03-15 at 12:41 -0700, H. Peter Anvin wrote:
> > > I don't see why syscall() can't change the type for its first argument
> > > -- it seems to be exactly what symbol versioning is for.
> > > 
> > > Doesn't change the fact that it is fundamentally broken, of course. 
> > 
> > No need to change the type of the first arg and go for symbol
> > versionning if you do something like I proposed earlier, there will be
> > no conflict between syscall() and __syscall() and both variants can
> > exist.
> > 
> One concern is the new syscall and the kernel have to match and mixing
> will not work. your proposal seems to impact all syscalls not just the
> one called via syscall API. These syscalls get generated inline which
> makes static linking very dangerous ...
> 
> So I think you do need both symbol versioning and kernel feature stubs
> (like xstat). That gets to be a lot of work

What do you mean ? My proposal is purely a change to the syscall()
function, nothing else. No kernel change, no ABI change, no change to
the way glibc normally calls syscalls internally, etc... just the
exported syscall() function to shift its arguments in order to avoid
losing register pair alignment.

And the change would still be compatible with existing userland code who
manually splits the 64-bit arguments to avoid the problem on power.

IE. Unless I've missed something, this would be a 100% backward
compatible change that simply make a whole class of syscall() use work
that didn't before on power (but did on x86), such as the one I hit in
hdparm for example.

Cheers,
Ben.

  reply	other threads:[~2010-03-17  0:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15  4:48 64-syscall args on 32-bit vs syscall() Benjamin Herrenschmidt
2010-03-15  4:48 ` Benjamin Herrenschmidt
2010-03-15  5:06 ` David Miller
2010-03-15  5:18   ` Benjamin Herrenschmidt
2010-03-15  5:54     ` David Miller
2010-03-15 20:22       ` Benjamin Herrenschmidt
2010-03-15 13:44     ` Ralf Baechle
2010-03-15 15:13       ` H. Peter Anvin
2010-03-15 16:00         ` Ulrich Drepper
2010-03-15 19:00           ` David Miller
2010-03-15 19:41             ` H. Peter Anvin
2010-03-15 20:35               ` Benjamin Herrenschmidt
2010-03-15 20:41                 ` H. Peter Anvin
2010-03-16 21:56                 ` Steven Munroe
2010-03-17  0:31                   ` Benjamin Herrenschmidt [this message]
2010-03-17  0:31                     ` Benjamin Herrenschmidt
2010-03-17  5:52                     ` Ulrich Drepper
2010-03-17  8:56                       ` Benjamin Herrenschmidt
2010-03-17  9:14                         ` Ulrich Drepper
2010-03-17 10:13                           ` Benjamin Herrenschmidt
2010-03-17  9:18                         ` Jamie Lokier
2010-03-17 10:18                           ` Benjamin Herrenschmidt
2010-03-17 18:30                         ` H. Peter Anvin
2010-03-17 20:35                           ` Benjamin Herrenschmidt
2010-03-17 20:53                             ` H. Peter Anvin
2010-03-17 22:58                               ` Benjamin Herrenschmidt
2010-03-17 22:58                                 ` Benjamin Herrenschmidt
2010-03-18 16:08                                 ` Steven Munroe
2010-03-18 16:21                                   ` Andreas Schwab
2010-03-18 16:21                                     ` Andreas Schwab
2010-03-18 17:03                                     ` Steven Munroe
2010-03-18 21:18                                       ` Benjamin Herrenschmidt
2010-03-19  1:22                                         ` Jamie Lokier
2010-03-15 20:27       ` Benjamin Herrenschmidt
2010-03-15 15:03 ` Steven Munroe
2010-03-15 20:32   ` Benjamin Herrenschmidt
2010-03-15 15:04 ` Jamie Lokier
2010-03-15 20:33   ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1268785874.2335.137.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=drepper@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kernel@teksavvy.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=munroesj@us.ibm.com \
    --cc=ralf@linux-mips.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).