On Tue, 2009-11-17 at 18:55 -0600, Nathan Lynch wrote:

> +int eclone(int (*fn)(void *), void *fn_arg, int clone_flags_low,
> +        struct clone_args *clone_args, pid_t *pids)
> +{
> +     struct clone_args my_args;
> +     unsigned long child_sp;
> +     int newpid;
> +
> +     if (clone_args->child_stack)
> +             child_sp = clone_args->child_stack +
> +                     clone_args->child_stack_size - 1;

Should be
                child_sp = (clone_args->child_stack +
                        clone_args->child_stack_size - 1) & ~0xf;

Otherwise the child starts with an unaligned sp, causing accesses
outside of the stack region.


_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to