Re: parisc: Use of align_frame provides stack frame.

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

 



On Wed, 31 Mar 2010, Carlos O'Donell wrote:

> I'm still at a loss to explain how the kernel prevents a process,
> which has just called execve, from returning to the callers memory
> range.
> 
> My suspicion is this:
> * Parent calls vfork()
> * Child calls execve(), which uses start_thread to setup pt_regs.
> * Child returns from execve() via syscall_exit and does *not* restore
> space registers from pt_regs.
> * Child returns to parent's memory space and starts clobbering things.
> * Timer tick goes off and switch_to fixes child's space registers and
> PC values and child executes correctly.
> * Parent continues executing with some minor corruption.
> 
> The window exists between the child's return and the next tick, during
> that time the child runs free corrupting the parent.

I'm thinking we might have the same problem with fork (i.e., child
sometimes starts with wrong space registers depending on timer tick
timing).

What timer frequency are you using?  I've been using 250 Hz.  If your
theory is correct, I think the problem should be worse at 100 Hz.

Dave
-- 
J. David Anglin                                  dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux