* FUTEX_CMP_REQUEUE and 6-argument syscall
@ 2004-06-03 18:02 Pete Zaitcev
2004-06-03 18:13 ` Ralf Baechle
2004-06-04 0:33 ` Paul Mackerras
0 siblings, 2 replies; 6+ messages in thread
From: Pete Zaitcev @ 2004-06-03 18:02 UTC (permalink / raw)
To: schwidefsky; +Cc: linux-arch, zaitcev, akpm, jakub
Hi, Martin,
the following changeset adds an extra argument for sys_futex:
http://linux.bkbits.net:8080/linux-2.5/gnupatch@40bca55f9uSk3jznb3RD7ltnQvJKbA
So, now we have a syscall with 6 arguments. Do you have any suggestions
how to handle it on s390? The main decision would be if we stick to
the C calling convention and put a pointer to the list into %r7, or
if we just put the argument into %r7 (thus precluding syscalls with
7 arguments for sure, but saving a get_user somewhere). After that
we need to change arch/s390/kernel/entry.S:trace_svc, and the 31 bit
compat wrapper.
I'm curious if any other architecture was caught out by this.
-- Pete
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FUTEX_CMP_REQUEUE and 6-argument syscall
2004-06-03 18:02 FUTEX_CMP_REQUEUE and 6-argument syscall Pete Zaitcev
@ 2004-06-03 18:13 ` Ralf Baechle
2004-06-03 21:26 ` David S. Miller
2004-06-04 0:33 ` Paul Mackerras
1 sibling, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2004-06-03 18:13 UTC (permalink / raw)
To: Pete Zaitcev; +Cc: schwidefsky, linux-arch, akpm, jakub
On Thu, Jun 03, 2004 at 11:02:21AM -0700, Pete Zaitcev wrote:
> So, now we have a syscall with 6 arguments. Do you have any suggestions
> how to handle it on s390? The main decision would be if we stick to
> the C calling convention and put a pointer to the list into %r7, or
> if we just put the argument into %r7 (thus precluding syscalls with
> 7 arguments for sure, but saving a get_user somewhere). After that
> we need to change arch/s390/kernel/entry.S:trace_svc, and the 31 bit
> compat wrapper.
>
> I'm curious if any other architecture was caught out by this.
6 is the limit on o32 MIPS where we pass 4 arguments in registers and two
on the stack but it would be easy to extend that. On 64-bit kernels we
only use upto 8 register arguments but no stack arguments ever so I hope
we don't exceed that limit ever ...
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FUTEX_CMP_REQUEUE and 6-argument syscall
2004-06-03 18:13 ` Ralf Baechle
@ 2004-06-03 21:26 ` David S. Miller
2004-06-03 23:27 ` Pete Zaitcev
0 siblings, 1 reply; 6+ messages in thread
From: David S. Miller @ 2004-06-03 21:26 UTC (permalink / raw)
To: Ralf Baechle; +Cc: zaitcev, schwidefsky, linux-arch, akpm, jakub
On Thu, 3 Jun 2004 20:13:45 +0200
Ralf Baechle <ralf@linux-mips.org> wrote:
> > I'm curious if any other architecture was caught out by this.
>
> 6 is the limit on o32 MIPS where we pass 4 arguments in registers and two
> on the stack but it would be easy to extend that. On 64-bit kernels we
> only use upto 8 register arguments but no stack arguments ever so I hope
> we don't exceed that limit ever ...
6 is the limit on Sparc/Sparc64 as well, registers %o0 - %o5 carry
arguments.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FUTEX_CMP_REQUEUE and 6-argument syscall
2004-06-03 21:26 ` David S. Miller
@ 2004-06-03 23:27 ` Pete Zaitcev
0 siblings, 0 replies; 6+ messages in thread
From: Pete Zaitcev @ 2004-06-03 23:27 UTC (permalink / raw)
To: David S. Miller; +Cc: ralf, schwidefsky, linux-arch, akpm, jakub, zaitcev
On Thu, 3 Jun 2004 14:26:30 -0700
"David S. Miller" <davem@redhat.com> wrote:
> > 6 is the limit on o32 MIPS where we pass 4 arguments in registers and two
> > on the stack but it would be easy to extend that. On 64-bit kernels we
> > only use upto 8 register arguments but no stack arguments ever so I hope
> > we don't exceed that limit ever ...
>
> 6 is the limit on Sparc/Sparc64 as well, registers %o0 - %o5 carry
> arguments.
It seems that bumping the limit just to 6 would bring s390 in line
with sparcs, this is why I even considered using %r7 to pass the
argument itself instead of a pointer to stack. It's such a bother
to have things in memory.
-- Pete
P.S. Ralf, et. al.: do not forget to keep me on the cc: list, please.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FUTEX_CMP_REQUEUE and 6-argument syscall
2004-06-03 18:02 FUTEX_CMP_REQUEUE and 6-argument syscall Pete Zaitcev
2004-06-03 18:13 ` Ralf Baechle
@ 2004-06-04 0:33 ` Paul Mackerras
2004-06-04 7:44 ` Russell King
1 sibling, 1 reply; 6+ messages in thread
From: Paul Mackerras @ 2004-06-04 0:33 UTC (permalink / raw)
To: Pete Zaitcev; +Cc: schwidefsky, linux-arch, akpm, jakub
Pete Zaitcev writes:
> I'm curious if any other architecture was caught out by this.
Six is currently the limit on ppc and ppc64. It would be possible to
increase it to 7 fairly easily or 8 with a bit more trouble. Beyond
that we would start getting arguments on the stack.
Paul.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FUTEX_CMP_REQUEUE and 6-argument syscall
2004-06-04 0:33 ` Paul Mackerras
@ 2004-06-04 7:44 ` Russell King
0 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2004-06-04 7:44 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Pete Zaitcev, schwidefsky, linux-arch, akpm, jakub
On Fri, Jun 04, 2004 at 10:33:44AM +1000, Paul Mackerras wrote:
> Pete Zaitcev writes:
>
> > I'm curious if any other architecture was caught out by this.
>
> Six is currently the limit on ppc and ppc64. It would be possible to
> increase it to 7 fairly easily or 8 with a bit more trouble. Beyond
> that we would start getting arguments on the stack.
Six is also the current limit on ARM, and we have the possibility
to go to 7 with some more stack mangling. However, 8 is more
problematical - I suspect at that point we'll be in the arguments
on user stack territory.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-04 7:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-03 18:02 FUTEX_CMP_REQUEUE and 6-argument syscall Pete Zaitcev
2004-06-03 18:13 ` Ralf Baechle
2004-06-03 21:26 ` David S. Miller
2004-06-03 23:27 ` Pete Zaitcev
2004-06-04 0:33 ` Paul Mackerras
2004-06-04 7:44 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox