2008-02-11 09:59:09

by Cédric Le Goater

[permalink] [raw]
Subject: [patch 0/3] clone64() and unshare64() syscalls

yet another try to extend the clone flags and probably not the last !

This patchset adds 2 new syscalls :

long sys_clone64(unsigned long flags_high, unsigned long flags_low,
unsigned long newsp);

long sys_unshare64(unsigned long flags_high, unsigned long flags_low);

The current version of clone64() does not support CLONE_PARENT_SETTID and
CLONE_CHILD_CLEARTID because we would exceed the 6 registers limit of some
arches. It's possible to get around this limitation but we might not
need it as we already have clone()

This is work in progress but already includes support for x86, x86_64,
x86_64(32), ppc64, ppc64(32), s390x, s390x(31).

ia64 already supports 64bits clone flags through the clone2() syscall.
should we harmonize the name to clone2 ?


Please see the changelog below.

C.


2008-02-12 17:28:59

by Serge E. Hallyn

[permalink] [raw]
Subject: Re: [patch 0/3] clone64() and unshare64() syscalls

Quoting [email protected] ([email protected]):
> yet another try to extend the clone flags and probably not the last !
>
> This patchset adds 2 new syscalls :
>
> long sys_clone64(unsigned long flags_high, unsigned long flags_low,
> unsigned long newsp);
>
> long sys_unshare64(unsigned long flags_high, unsigned long flags_low);
>
> The current version of clone64() does not support CLONE_PARENT_SETTID and
> CLONE_CHILD_CLEARTID because we would exceed the 6 registers limit of some
> arches. It's possible to get around this limitation but we might not
> need it as we already have clone()
>
> This is work in progress but already includes support for x86, x86_64,
> x86_64(32), ppc64, ppc64(32), s390x, s390x(31).
>
> ia64 already supports 64bits clone flags through the clone2() syscall.
> should we harmonize the name to clone2 ?
>
>
> Please see the changelog below.

Tested unshare64 with a new namespace using the first clone_hi bit, no
problems here (on a kvm-qemu image).

-serge