l4-hurd
[Top][All Lists]
Advanced

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

Re: Kernel Interface Page Dumping Server


From: Espen Skoglund
Subject: Re: Kernel Interface Page Dumping Server
Date: Wed, 7 May 2003 14:41:40 +0200

[Marcus Brinkmann]
> I allow any of the three pointer parameters to l4_kernel_interface
> to be 0, so you can select which of api_version, api_flags and
> kernel_id you really want.  If you do this using a constant, gcc
> will eliminate the dead code and the resulting assembler is really
> crisp and lean.

Since the compiler can inline the functions and detect that certain
words (local variables) are assigned to but then ignored, the compiler
should also be able to eliminate these assignments.  The result should
be the same, and we avoid cluttering the code witch special checks.

Your solution is also semantically incorrect.  It might very well
happen that an application supplies a pointer to a word at addres zero
(although I admit that this is pretty unlikely :-).

> Hmm, this is interesting.  I was thinking about having it in the
> glibc startup function.  Having them set up in ld.so directly is
> even better.  It sounds just a tiny bit hackish though.  If you
> define the KIP address system wide for all tasks, you could also
> avoid the need for such a fixup and compile the addresses statically
> into the program.

Compiling it statically into the program is inflexible.  If the KIP is
located at a high address it effectively prevents small spaces from
ever being used.  If it is located at a low address it might have
other consequences that we can not yet foresee.  The only way to allow
for complete future flexibility is to allocate the KIP dynamically.

An example of such inflexibility is the way that Linux is redefining
its syscall ABI making it more alike our KIP scheme.  [BTW, take what
I say here with a grain of salt since I didn't really look closely
into the new ABI.  Does anyone have a link?]  Basically, a syscall
gateway is located at some fixed high address.  This creates problems
both if you want to support this new ABI in L4Linux (this gateway page
is within the kernel) or if you are going to support techniques
similar to small spaces (either in native Linux or in L4Linux).

        eSk





reply via email to

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