Re: vfork test case.

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

 



> I disagree with you.
> 
> What about this scenario:
> * Parent call vfork, saves rp in -20(%sp) (parents frame)
> * Parent suspends upon entry to vfork syscall
> * Child returns from vfork syscall
> * Child restores rp from -20(%sp) (parents frame)
> * Child calls close which saves rp in -20(%sp) (parents frame)
> * Child calls execve
> * Parent resumes, restores rp from -20(%sp) and incorrectly returns to
> just after the call to close.
> 
> At this point if the parent restores rp from the parents frame it will
> get the rp the child's call to close saved.

You are right.

> 
> The only way to get around this is to *ensure* the kernel
> saves/restores r2 across the syscall.
> 
> I see no other way around it.

It looks as if r2 is saved for both parent and child.

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