* why doesn't x86_32 have the accept4() syscall?
@ 2012-01-09 21:26 Tony Luck
2012-01-09 21:36 ` David Miller
2012-01-12 0:33 ` Michael Cree
0 siblings, 2 replies; 6+ messages in thread
From: Tony Luck @ 2012-01-09 21:26 UTC (permalink / raw)
To: linux-arch
I've been using the warnings from scripts/checksyscalls.sh to let me know
when some new system calls are added, so I can add them to ia64. But
it was recently brought to my attention that I didn't have accept4(). I missed
it because I didn't see a warning, which was because this script just compares
against the 32-bit x86 list.
A casual grep shows that:
alpha, arm, microblaze, mips, parisc, powerpc, sh and sparc
managed to add accept4 without getting the "warning syscall
.... not implemented". But other architectures may need to add
it (including 32-bit x86).
-Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why doesn't x86_32 have the accept4() syscall?
2012-01-09 21:26 why doesn't x86_32 have the accept4() syscall? Tony Luck
@ 2012-01-09 21:36 ` David Miller
2012-01-10 16:03 ` Jamie Lokier
2012-01-12 0:33 ` Michael Cree
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2012-01-09 21:36 UTC (permalink / raw)
To: tony.luck; +Cc: linux-arch
Because accept4() has been provided via the sys_socketcall() indirect
operation, for this socket system call and several others the native
direct syscalls were never added to the x86 32-bit table and probably
never will be.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why doesn't x86_32 have the accept4() syscall?
2012-01-09 21:36 ` David Miller
@ 2012-01-10 16:03 ` Jamie Lokier
2012-01-10 17:00 ` Geert Uytterhoeven
2012-01-10 20:07 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Jamie Lokier @ 2012-01-10 16:03 UTC (permalink / raw)
To: David Miller; +Cc: tony.luck, linux-arch
David Miller wrote:
> Because accept4() has been provided via the sys_socketcall() indirect
> operation, for this socket system call and several others the native
> direct syscalls were never added to the x86 32-bit table and probably
> never will be.
Hi David,
Is there any reason why it was added via sys_socketcall() - isn't that
just a waste of a few cycles and kernel size, compared with a direct
pointer in the syscall table?
I see sendmmsg() and recvmmsg() got proper syscall slots on x86
32-bit, and are in sys_socketcall() as well, which seems a bit pointless.
Thanks,
-- Jamie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why doesn't x86_32 have the accept4() syscall?
2012-01-10 16:03 ` Jamie Lokier
@ 2012-01-10 17:00 ` Geert Uytterhoeven
2012-01-10 20:07 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2012-01-10 17:00 UTC (permalink / raw)
To: Jamie Lokier; +Cc: David Miller, tony.luck, linux-arch
On Tue, Jan 10, 2012 at 17:03, Jamie Lokier <jamie@shareable.org> wrote:
> David Miller wrote:
>> Because accept4() has been provided via the sys_socketcall() indirect
>> operation, for this socket system call and several others the native
>> direct syscalls were never added to the x86 32-bit table and probably
>> never will be.
>
> Hi David,
>
> Is there any reason why it was added via sys_socketcall() - isn't that
> just a waste of a few cycles and kernel size, compared with a direct
> pointer in the syscall table?
>
> I see sendmmsg() and recvmmsg() got proper syscall slots on x86
> 32-bit, and are in sys_socketcall() as well, which seems a bit pointless.
IIRC, PPC is trying to deprecate sys_socketcall(), and recently added separate
syscalls for all socket calls.
Whether other architectures should follow suit is indeed a good question...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why doesn't x86_32 have the accept4() syscall?
2012-01-10 16:03 ` Jamie Lokier
2012-01-10 17:00 ` Geert Uytterhoeven
@ 2012-01-10 20:07 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2012-01-10 20:07 UTC (permalink / raw)
To: jamie; +Cc: tony.luck, linux-arch
From: Jamie Lokier <jamie@shareable.org>
Date: Tue, 10 Jan 2012 16:03:17 +0000
> Is there any reason why it was added via sys_socketcall() - isn't that
> just a waste of a few cycles and kernel size, compared with a direct
> pointer in the syscall table?
Looks like an oversight, but one for which I don't think is worth
correcting.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why doesn't x86_32 have the accept4() syscall?
2012-01-09 21:26 why doesn't x86_32 have the accept4() syscall? Tony Luck
2012-01-09 21:36 ` David Miller
@ 2012-01-12 0:33 ` Michael Cree
1 sibling, 0 replies; 6+ messages in thread
From: Michael Cree @ 2012-01-12 0:33 UTC (permalink / raw)
To: Tony Luck; +Cc: linux-arch
On 10/01/12 10:26, Tony Luck wrote:
> I've been using the warnings from scripts/checksyscalls.sh to let me know
> when some new system calls are added, so I can add them to ia64. But
> it was recently brought to my attention that I didn't have accept4(). I missed
> it because I didn't see a warning, which was because this script just compares
> against the 32-bit x86 list.
>
> A casual grep shows that:
> alpha, arm, microblaze, mips, parisc, powerpc, sh and sparc
> managed to add accept4 without getting the "warning syscall
> .... not implemented"
A search of the git log would reveal that on Alpha we only very recently
added accept4 because we had also missed it! We were badly bit by the
latest udev needing accept4.
The question that I think would be more pertinent is: How do we know
that we have implemented all relevant syscalls when the checksyscalls.sh
script is not a sufficient check?
Cheers
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-12 0:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 21:26 why doesn't x86_32 have the accept4() syscall? Tony Luck
2012-01-09 21:36 ` David Miller
2012-01-10 16:03 ` Jamie Lokier
2012-01-10 17:00 ` Geert Uytterhoeven
2012-01-10 20:07 ` David Miller
2012-01-12 0:33 ` Michael Cree
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).