[Devel] Re: [patch 1/2][RFC] add socketat syscall

Eric W. Biederman ebiederm at xmission.com
Fri Oct 31 18:30:45 PDT 2008


Daniel Lezcano <dlezcano at fr.ibm.com> writes:

> This patch adds the socketat syscall which allows to specify in
> which network namespace we want to create a socket. The network
> namespace destination is referred by a socket fd previously opened
> in the destination network namespace.

Looks good and very simple.

I have a small update to my proposal for an ABI, that should be easier
to deploy if the ABI gods can't find fault with it.

#define SOCK_FDNS	0x100000  /* Some good non-conflicting number */
And then reuse extend socket to read one more argument when it is passed.

So.
asmlinkage long sys_socket(int domain, int type, int protocol);
becomes:
asmlinkage long sys_socket(int domain, int type, int protocol, int fd);
when SOCK_FDNS is set in type.

I believe the calling conventions in the kernel already pass 4 arguments
so we just need to read and act on the forth.  That should be easier than
allocating an extra syscall number on every architecture.

Eric
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list