mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
Date: Wed, 9 Mar 2005 20:40:22 +0100	[thread overview]
Message-ID: <200503092040.22780.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20050309193454.GB17918@muc.de>

On Wednesday 09 March 2005 20:34, Andi Kleen wrote:
> 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.
Ok, thanks for the info, I hope it's applied anyway.
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


      reply	other threads:[~2005-03-09 19:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-05 19:00 blaisorblade
2005-03-09 17:24 ` Andi Kleen
2005-03-09 18:24   ` Blaisorblade
2005-03-09 19:34     ` Andi Kleen
2005-03-09 19:40       ` Blaisorblade [this message]

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=200503092040.22780.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=ak@muc.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®