Re: [PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-10 Thread Thomas Gleixner
nd_rodata + PAGE_SIZE - 1) >= __start_rodata && (__start_rodata - PAGE_SIZE) < __end_rodata Which evaluates to true. So we write protect one page before the RO section and one page after the RO section. How does this fix the incorrectness exactly ? The next patch [PATCH] [3

Re: [PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-10 Thread Andi Kleen
Thomas Gleixner <[EMAIL PROTECTED]> writes: > 2) I care about RO as much as I care about the NX correctness. That's > the same logic and the same problem. If we have overlapping regions, > then we need to split large pages. Otherwise both protections are > useless to a certain degree. That's laud

Re: [PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-09 Thread Thomas Gleixner
On Sat, 9 Feb 2008, Andi Kleen wrote: > On Saturday 09 February 2008 16:38:35 Thomas Gleixner wrote: > > On Fri, 8 Feb 2008, Andi Kleen wrote: > > > > > > > > Only force RO in the advisory protection checks when all pages in the > > > range are RO. Previously it would trigger when any page in th

Re: [PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-09 Thread Andi Kleen
On Saturday 09 February 2008 16:38:35 Thomas Gleixner wrote: > On Fri, 8 Feb 2008, Andi Kleen wrote: > > > > > Only force RO in the advisory protection checks when all pages in the > > range are RO. Previously it would trigger when any page in the range > > was ro. > > > > I believe this will m

Re: [PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-09 Thread Thomas Gleixner
On Fri, 8 Feb 2008, Andi Kleen wrote: > > Only force RO in the advisory protection checks when all pages in the > range are RO. Previously it would trigger when any page in the range > was ro. > > I believe this will make try_preserve_large_page much safer to use. It might be quite useful to k

[PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-08 Thread Andi Kleen
Only force RO in the advisory protection checks when all pages in the range are RO. Previously it would trigger when any page in the range was ro. I believe this will make try_preserve_large_page much safer to use. Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> --- arch/x86/mm/pageattr.c | 1

[PATCH] [3/5] CPA: Make advised protection check truly advisory

2008-02-08 Thread Andi Kleen
Only force RO in the advisory protection checks when all pages in the range are RO. Previously it would trigger when any page in the range was ro. I believe this will make try_preserve_large_page much safer to use. Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> --- arch/x86/mm/pageattr.c |