Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
On Thu, Apr 26, 2007 at 09:37:52AM -0700, Jason Thorpe wrote:
>
> On Apr 26, 2007, at 9:27 AM, David Laight wrote:
>
> >Note: that if namei() is being called during execve processing, the
> >emulation
> >root name isn't available and "/emul/???" is used.
>
> This seems wrong ... the emulation root of the new process should be
> inherited from the parent until the emulation actually changes. So,
> if we know the root, why don't we know the root name?
The 'problem' is that the anticipated emulation root of the new program
has to be used to locate its elf interpreter (etc), but the emulation
information for the current process cannot be changed until we can
guarantee that the execve call will suceed.
(It is even possible that this is done before any other lwp's are
forced to exit.)
I could (and might) arrange that emul_find_interpreter() [1] pass the
revelant into into namei(), but there isn't an obvious place.
I chose to save the vnode for the emulation root in order to save having
to look it up on every namei call. It would still need to be saved for
the duration of the operation because of the requirement to convert
back from the emulation root to the real root.
David
[1] It does get used to locate other stuff in teh context of the new
program as well.
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index