l4-hurd
[Top][All Lists]
Advanced

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

Re: startup code


From: Marcus Brinkmann
Subject: Re: startup code
Date: Sun, 19 Oct 2003 01:26:57 +0200
User-agent: Mutt/1.5.4i

On Sun, Oct 19, 2003 at 01:16:44AM +0200, Johan Rydberg wrote:
> : The information needs to be passed.  In fact, it can be on the stack as
> : function arguments.
> 
> Do you mean the bootstrap information, the same that was passed to the
> startup code?  I refered to the information collected by the initial
> pager.  The new pager installed by the application must get use that
> information, so that it will not bring in data twice into memory.

There is a lot more data than just memory.  For example, capabilities like
auth caps.  The startup code must fulfill the receiving end of the cap
movement protocol _before_ passing execution to the started program (because
in the suid case, the filesystem expects it to do that, so the cap
reference containers can be destroyed by the filesystem before returning to
the caller).

> This could be done by letting the new pager send a "shutdown" message to
> the initial pager, which will reply will were the new pager can find
> the information and after that simply kill itself since it is no longer
> needed.

That's a minor detail.
 
> Of course the other information has to be passed aswell.  That could
> be done on the stack, or in a register.  I prefer the latter case,
> since then we can use the normal SVR4 ABI for passing arguments on
> the stack (where the actual data is located is deteremined by the
> parent, but it will probably live at the top of the initial stack.)

Well, when I say stack, I probably really just mean the normal C function ABI.

> : I suggest to develop the protocol as if the bootstrap case doesn't exist.
> : We can always tweak it later to fit the bootstrap case as a special case,
> : too.  For example, information that does not make sense at bootstrap can be
> : set to 0 or flags can indicate the presence of certain fields.
> 
> The only special thing that is needed for the bootstrap case is mentioned
> below: that the data is already in the container. 

There are many more special cases.  Initial capabilities like auth caps are
not there.  Etc.
 
> Another issue is that the task-server is not yet alive, but that
> has nothing to do with getting the program into memory (except it
> has to find a way to spawn the initial pager thread.)

No, of course not.  I am just being complete here, because we talk about the
startup code in general.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    address@hidden
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
address@hidden
http://www.marcus-brinkmann.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]