RE: only kernel can access copy_area ?

Bob <[email protected]> Tue, 14 Oct 2008 17:13:01 +0800
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
Thank you Raphael. It's so clearly! It seems easy and simple. But I couldn't understand it before. 
I think i need introspection and think more. 
---Best regardsBo Liu> Date: Tue, 14 Oct 2008 10:29:35 +0200> From: [email protected]> To: [email protected]> CC: [email protected]> Subject: Re: only kernel can access copy_area ?> > On 2008-10-14 at 00:33, lion wrote:> > > > Still uncleanly about that...> > About the copy_area's implemention.> > > > > About the copy_area,> > The copy area is a temporary mapping of a part of B's address space (the> destination of the string transfer) into the kernel region in order to> make B's memory accessible while A's address space is active (otherwise> there would be no name, i.e., virtual address in A's address space, to> access that memory).> In principle, both A and B could access the mapping area: it is not protected> by means of page protections (the page is user accessible due to its page> table
  entry being copied from B and the page being user accessible there) nor> by means of segmentation (on x86, due to L4 not using segments for protection> at all except with small spaces).> > But: The copy area is unmapped> (a) before A returns to user mode after the IPC and/or> (b) at the next thread switch (whichever occurs first),> so neither A nor B (nor any other thread at user level) has a chance of> actually accessing B's memory by means of the copy area.> > Now back to answering your questions:> > > when A sends a message to B, only kernel A and user B can access > > > the copy_area. But user A can not. Is these correct ? And why ?> That's not correct. Theoretically, user A, user B, kernel A, and kernel B> can access the copy area, but due to kernel guarantees as to which thread> a
 ctually runs, only kernel A gets the chance to do so.> The `why' should have been answered above.> > > > In my opinion, the page table of A's copy_area is copyed from B which> > > is user accessiable.> > > So,user A can access the copy_area. Is that right?> Again: Yes, but only in theory as user A never runs while the mapping exists.> > Hoping that helped to clear things up a bit,> Raphael> 
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE