From: Andi Kleen <ak@muc.de>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: linux-kernel@vger.kernel.org, ak@suse.de
Subject: Re: [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
Date: 9 Mar 2005 20:34:54 +0100
Date: Wed, 9 Mar 2005 20:34:54 +0100 [thread overview]
Message-ID: <20050309193454.GB17918@muc.de> (raw)
In-Reply-To: <200503091924.00518.blaisorblade@yahoo.it>
On Wed, Mar 09, 2005 at 07:24:00PM +0100, Blaisorblade wrote:
> On Wednesday 09 March 2005 18:24, Andi Kleen wrote:
> > blaisorblade@yahoo.it writes:
> > > CC: Andi Kleen <ak@suse.de>
> > >
> > > I think it should be there, please check better.
> >
> > It doesn't matter. asmlinkage is a nop on x86-64.
>
> Yes, otherwise nothing would work on x86-64 with mmap broken, but for
> cleanness and for the case this change it should be there (otherwise why
> asmlinkage is used in the rest of the file).
Only because it was cut'n'pasted from i386 originally.
>
> And for i386 asmlinkage acquired significance only recently.
Actually it doesn't neither on i386. That's because entry.S happens to put the
arguments both into registers and the stack in the right order, so both
register and stack argument calling conventions work.
But it is slightly safer to have it. When you use the stack arguments
the C code is allowed to modify it, and when the system call is restarted
later you could see garbage. In practice that's not a big issue because
only very few system calls are restartable.
ptrace also could see corrupted state, but that's in general a non issue.
-Andi
next prev parent reply other threads:[~2005-03-09 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-05 19:00 [patch 1/1] x86-64: forgot asmlinkage on sys_mmap blaisorblade
2005-03-09 17:24 ` Andi Kleen
2005-03-09 18:24 ` Blaisorblade
2005-03-09 19:34 ` Andi Kleen [this message]
2005-03-09 19:40 ` Blaisorblade
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=20050309193454.GB17918@muc.de \
--to=ak@muc.de \
--cc=ak@suse.de \
--cc=blaisorblade@yahoo.it \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.