* [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
@ 2005-03-05 19:00 blaisorblade
2005-03-09 17:24 ` Andi Kleen
0 siblings, 1 reply; 5+ messages in thread
From: blaisorblade @ 2005-03-05 19:00 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, blaisorblade, ak
CC: Andi Kleen <ak@suse.de>
I think it should be there, please check better.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
linux-2.6.11-paolo/arch/x86_64/kernel/sys_x86_64.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/x86_64/kernel/sys_x86_64.c~x86-64-asmlinkage-forgot arch/x86_64/kernel/sys_x86_64.c
--- linux-2.6.11/arch/x86_64/kernel/sys_x86_64.c~x86-64-asmlinkage-forgot 2005-03-05 19:58:38.339212568 +0100
+++ linux-2.6.11-paolo/arch/x86_64/kernel/sys_x86_64.c 2005-03-05 19:58:51.062278368 +0100
@@ -38,7 +38,7 @@ asmlinkage long sys_pipe(int __user *fil
return error;
}
-long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags,
+asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long off)
{
long error;
_
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
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
0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2005-03-09 17:24 UTC (permalink / raw)
To: blaisorblade; +Cc: linux-kernel, ak
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.
-Andi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
2005-03-09 17:24 ` Andi Kleen
@ 2005-03-09 18:24 ` Blaisorblade
2005-03-09 19:34 ` Andi Kleen
0 siblings, 1 reply; 5+ messages in thread
From: Blaisorblade @ 2005-03-09 18:24 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel, ak
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).
And for i386 asmlinkage acquired significance only recently.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
2005-03-09 18:24 ` Blaisorblade
@ 2005-03-09 19:34 ` Andi Kleen
2005-03-09 19:40 ` Blaisorblade
0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2005-03-09 19:34 UTC (permalink / raw)
To: Blaisorblade; +Cc: linux-kernel, ak
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/1] x86-64: forgot asmlinkage on sys_mmap
2005-03-09 19:34 ` Andi Kleen
@ 2005-03-09 19:40 ` Blaisorblade
0 siblings, 0 replies; 5+ messages in thread
From: Blaisorblade @ 2005-03-09 19:40 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-09 19:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2005-03-09 19:40 ` Blaisorblade
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.