[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <g2g817ecb6f1004060751s1fd3d42bqc19b5c36b33c3c13@mail.gmail.com>
Date: Tue, 6 Apr 2010 10:51:44 -0400
From: Siarhei Liakh <sliakh.lkml@...il.com>
To: Suresh Siddha <suresh.b.siddha@...el.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
Arjan van de Ven <arjan@...radead.org>,
James Morris <jmorris@...ei.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <ak@....de>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
Rusty Russell <rusty@...tcorp.com.au>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Dave Jones <davej@...hat.com>
Subject: Re: [PATCH 1/4] [tip:x86/mm] Correcting improper large page
preservation
On Sat, Apr 3, 2010 at 2:43 AM, Suresh Siddha <suresh.b.siddha@...el.com> wrote:
> On Wed, 2010-03-31 at 18:59 -0700, Siarhei Liakh wrote:
>> + /*
>> + * .data and .bss should always be writable.
>> + */
>> + if ((within(pfn, __pa((unsigned long)_sdata) >> PAGE_SHIFT,
>> + __pa((unsigned long)_edata) >> PAGE_SHIFT)) ||
>> + (within(pfn, __pa((unsigned long)__bss_start) >> PAGE_SHIFT,
>> + __pa((unsigned long)__bss_stop) >> PAGE_SHIFT))) {
>> + pgprot_val(required) |= _PAGE_RW;
>> + }
>
> I have reviewed this patch and the only comment I have is:
>
> On 64bit kernels, kernel text/data mapping and kernel identity mappings
> are different virtual addresses mapping to same pfn ranges. For the
> data/bss pages, does it help (in identifying certain data corruptions
> more easily) in making the kernel identity mapping to be set to
> read-only and enforce the need of RW only for the kernel data mappings.
>
> Or is there some obscure code that uses something like
> __va(__pa(data_symbol)) and writes to it?
>
> If not, we can remove the __pa() constructs above and use the addr for
> comparisons.
Done.
Patch V2 have been posted.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists