Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Arjan van de Ven
On Wed, 23 Jan 2008 17:54:01 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > > But ok given that it's already merged I'll shut up now since it's too > late. I asked you before to cut the unjustified sarcasm; all I can do is ask again. -- If you want to reach me at my work email, use [EMAIL

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Andi Kleen
> Yes internally that uses c-p-a, but there's more code there, including a set > of boundary conditions etc. You mean the ro boundary to the rest of the kernel and the rest of the kernel mappings on i386? It doesn't seem to check for any of those. > And for the page table to work, cr0 needs

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Arjan van de Ven
On Wed, 23 Jan 2008 16:27:28 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > > > What it does is check if the rodata marking was succesful. > > The only difference I see is that you check that the TLB flush works, > but for that it looks awfully incomplete. you think one level too small. It

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Andi Kleen
> What it does is check if the rodata marking was succesful. The only difference I see is that you check that the TLB flush works, but for that it looks awfully incomplete. In particular if you really wanted to test the TLB you would need to do the access test on all online CPUs. Otherwise you

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Arjan van de Ven
On 23 Jan 2008 10:09:58 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > Arjan van de Ven <[EMAIL PROTECTED]> writes: > > > This patch adds a test module for the DEBUG_RODATA config > > option to make sure change_page_attr() did indeed make > > "const" data read only. > > The only that this does

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Andi Kleen
Arjan van de Ven <[EMAIL PROTECTED]> writes: > This patch adds a test module for the DEBUG_RODATA config > option to make sure change_page_attr() did indeed make > "const" data read only. The only that this does that is not done pretty much equivalently by pageattr-test.c (it just checks G

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Andi Kleen
Arjan van de Ven [EMAIL PROTECTED] writes: This patch adds a test module for the DEBUG_RODATA config option to make sure change_page_attr() did indeed make const data read only. The only that this does that is not done pretty much equivalently by pageattr-test.c (it just checks G instead of

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Arjan van de Ven
On 23 Jan 2008 10:09:58 +0100 Andi Kleen [EMAIL PROTECTED] wrote: Arjan van de Ven [EMAIL PROTECTED] writes: This patch adds a test module for the DEBUG_RODATA config option to make sure change_page_attr() did indeed make const data read only. The only that this does that is not done

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Andi Kleen
What it does is check if the rodata marking was succesful. The only difference I see is that you check that the TLB flush works, but for that it looks awfully incomplete. In particular if you really wanted to test the TLB you would need to do the access test on all online CPUs. Otherwise you

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Arjan van de Ven
On Wed, 23 Jan 2008 16:27:28 +0100 Andi Kleen [EMAIL PROTECTED] wrote: What it does is check if the rodata marking was succesful. The only difference I see is that you check that the TLB flush works, but for that it looks awfully incomplete. you think one level too small. It tests if

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Andi Kleen
Yes internally that uses c-p-a, but there's more code there, including a set of boundary conditions etc. You mean the ro boundary to the rest of the kernel and the rest of the kernel mappings on i386? It doesn't seem to check for any of those. And for the page table to work, cr0 needs to

Re: [patch] x86: test case for the RODATA config option

2008-01-23 Thread Arjan van de Ven
On Wed, 23 Jan 2008 17:54:01 +0100 Andi Kleen [EMAIL PROTECTED] wrote: But ok given that it's already merged I'll shut up now since it's too late. I asked you before to cut the unjustified sarcasm; all I can do is ask again. -- If you want to reach me at my work email, use [EMAIL

Re: [patch] x86: test case for the RODATA config option

2008-01-22 Thread Arjan van de Ven
On Wed, 23 Jan 2008 12:11:41 +1100 Nick Piggin <[EMAIL PROTECTED]> wrote: > > #ifdef CONFIG_DEBUG_RODATA > > > > +const int rodata_test_data = 5; > > I guess this should match the 32-bit case, and be zero instead of > 5? actually it should have been 5 for both (well any non-zero number) > >

Re: [patch] x86: test case for the RODATA config option

2008-01-22 Thread Nick Piggin
On Wednesday 23 January 2008 09:44, Arjan van de Ven wrote: > From: Arjan van de Ven <[EMAIL PROTECTED]> > Subject: x86: test case for the RODATA config option > > This patch adds a test module for the DEBUG_RODATA config > option to make sure change_page_attr() did indeed mak

Re: [patch] x86: test case for the RODATA config option

2008-01-22 Thread Ingo Molnar
cool! could you perhaps also do an add-on: > + /* test 1: read the value */ > + /* test 2: write to the variable; this should fault */ > + /* test 3: check the value hasn't changed */ test 4: make it writable again test 5: make it NX -> check that it's not

[patch] x86: test case for the RODATA config option

2008-01-22 Thread Arjan van de Ven
From: Arjan van de Ven <[EMAIL PROTECTED]> Subject: x86: test case for the RODATA config option This patch adds a test module for the DEBUG_RODATA config option to make sure change_page_attr() did indeed make "const" data read only. This testcase both tests the DEBUG_ROD

[patch] x86: test case for the RODATA config option

2008-01-22 Thread Arjan van de Ven
From: Arjan van de Ven [EMAIL PROTECTED] Subject: x86: test case for the RODATA config option This patch adds a test module for the DEBUG_RODATA config option to make sure change_page_attr() did indeed make const data read only. This testcase both tests the DEBUG_RODATA code as well

Re: [patch] x86: test case for the RODATA config option

2008-01-22 Thread Ingo Molnar
cool! could you perhaps also do an add-on: + /* test 1: read the value */ + /* test 2: write to the variable; this should fault */ + /* test 3: check the value hasn't changed */ test 4: make it writable again test 5: make it NX - check that it's not

Re: [patch] x86: test case for the RODATA config option

2008-01-22 Thread Nick Piggin
On Wednesday 23 January 2008 09:44, Arjan van de Ven wrote: From: Arjan van de Ven [EMAIL PROTECTED] Subject: x86: test case for the RODATA config option This patch adds a test module for the DEBUG_RODATA config option to make sure change_page_attr() did indeed make const data read only

Re: [patch] x86: test case for the RODATA config option

2008-01-22 Thread Arjan van de Ven
On Wed, 23 Jan 2008 12:11:41 +1100 Nick Piggin [EMAIL PROTECTED] wrote: #ifdef CONFIG_DEBUG_RODATA +const int rodata_test_data = 5; I guess this should match the 32-bit case, and be zero instead of 5? actually it should have been 5 for both (well any non-zero number) Can you