Subject: Re: [PATCH] alternative to sys_indirect, part 1

From: Ulrich Drepper <[email-masked]>
Date: Thu, 24 Apr 2008 07:18:43 -0700

Alan Cox wrote:
> Given we will never have 2^32 socket types, and in a sense this is part
> of the type why not just use
> 
> 	socket(PF_INET, SOCK_STREAM|SOCK_CLOEXEC, ...)
> 
> that would be far far cleaner, no new syscalls on the socket side at all.

You have a strange sense of "clean" I must say.

I don't think this is a viable approach because it is not about the
range.  People can and do select arbitrary values for those types.
Until a value is officially recognized and registered it is in fact best
to choose a (possibly large) random value to not conflict with anything
else.  Who can guarantee that whatever bit is chosen for SOCK_CLOEXEC
isn't already used by someone?

Add to this that it's not a complete solution (no such hack possible for
accept) and I think using a new interface is cleaner(tm).

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖