Re: [PATCH 1/1] implement s390 clone_with_pids syscall

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

 



Quoting Nathan Lynch (nathanl@xxxxxxxxxxxxxx):
> 
> > +	parent_tid_ptr = (int *)kca.parent_tid_ptr;
> > +	child_tid_ptr =  (int *)kca.child_tid_ptr;
> > +
> > +	stack_size = (unsigned long)kca.child_stack_size;
> > +	child_stack = (unsigned long)kca.child_stack_base;
> > +	if (child_stack)
> > +		child_stack += stack_size;
> 
> Should this calculation not be of the form:
> child_stack = arch_dependent_alignment(child_stack + stack_size - 1)
> ?
> 
> Is overflow a concern?
> 
> Same questions apply to the x86 version.

Hmm...  if the stack isn't valid, the task will just segfault, so
it's not dangerous for the kernel, right?  Note that for instance
arch/s390/kernel/process.c:SYS_clone() doesn't check the validity
of the new stack pointer passed in either.

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux