OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] An attempt to have an unlimitedly extendable sys_clone
Re: [PATCH] An attempt to have an unlimitedly extendable sys_clone [message #26116 is a reply to message #26085] Tue, 15 January 2008 17:54 Go to previous messageGo to previous message
Dave Hansen is currently offline  Dave Hansen
Messages: 240
Registered: October 2005
Senior Member
On Tue, 2008-01-15 at 15:50 +0300, Pavel Emelyanov wrote:
> +static struct long_clone_arg *get_long_clone_arg(int __user
> *child_tidptr)
> +{
> +       int size;
> +       struct long_clone_arg *carg;
> +
> +       if (get_user(size, child_tidptr))
> +               return ERR_PTR(-EFAULT);
> +
> +       if (size > sizeof(struct long_clone_arg))
> +               return ERR_PTR(-EINVAL); 

This little bit means that any newer app (with a large
long_clone_arg->size) trying to run on an older kernel (with a smaller
struct) would simply fail to run clone().  Perhaps it shouldn't be _so_
generic as to allow anything in the struct and should stick to bits.
That way, we can actually go look to see whether there are any _unknown_
bits set just like we do now with clone flags.

The more I think about this, the more nervous I get about it.  It is
really neat, but has a bit of the stink of ioctl()s on it.  I'd
personally rather see a new system call.

But, this seems like a good Linus question.  Want to keep us on cc, but
run it by him (and the rest of LKML)?

-- Dave

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: A consideration on memory controller.
Next Topic: [patch 00/10] mount ownership and unprivileged mount syscall (v7)
Goto Forum:
  


Current Time: Fri Aug 29 08:00:36 GMT 2025

Total time taken to generate the page: 0.05788 seconds