Re: [PATCH 4/9] user-cr: ppc32 eclone wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux