RE: gate page oops

From: Jason Baron <jbaron_at_redhat.com>
Date: 2005-04-27 03:10:06
On Fri, 22 Apr 2005, Luck, Tony wrote:

> >While working on the RHEL 4 kernel (based on 2.6.9), i encountered a BUG() 
> >in mm/memory.c:get_user_pages() at the line: BUG_ON(pte_none(*pte));
> >
> >Seems like in_gate_area() returns true, but there is no pte to map the 
> >page. That is, the in_gate_area() covers a larger range than what is 
> >actually mapped. 
> >
> >I'm not sure if this is a problem in 2.6.11, as i didn't get a 
> >chance to build and test a kernel based on 2.6.11. 
> 
> It looks like there is some muddle of usage of PAGE_SIZE
> and PERCPU_PAGESIZE here (in the kernel code, not just in
> you patch).  Perhaps left over from when the percpu area
> was located at the start of region 5??
> 
> The gate page only needs to be PAGE_SIZE ... doesn't it?
> 

I'm not really sure...i was hoping somebody on the list would know :) If 
you look at setup_gate(), it establishes two gate pages, the comment says:

* Map the gate page twice: once read-only to export the ELF headers etc. and once
* execute-only page to enable privilege-promotion via "epc":

So the patch i proposed was intended to allow user access to these two 
regions. Currently, that isn't being done properly, leading to an oops.

-Jason
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Apr 26 13:10:53 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:37 EST