public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Siarhei Liakh <sliakh.lkml@gmail•com>
To: Suresh Siddha <suresh.b.siddha@intel•com>
Cc: "linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"linux-security-module@vger•kernel.org"
	<linux-security-module@vger•kernel.org>,
	"linux-next@vger•kernel.org" <linux-next@vger•kernel.org>,
	Arjan van de Ven <arjan@infradead•org>,
	James Morris <jmorris@namei•org>,
	Andrew Morton <akpm@linux-foundation•org>, Andi Kleen <ak@muc•de>,
	Thomas Gleixner <tglx@linutronix•de>,
	"H. Peter Anvin" <hpa@zytor•com>, Ingo Molnar <mingo@elte•hu>,
	Rusty Russell <rusty@rustcorp•com.au>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	Dave Jones <davej@redhat•com>
Subject: Re: [PATCH 1/4] [tip:x86/mm] Correcting improper large page preservation
Date: Tue, 6 Apr 2010 10:51:44 -0400	[thread overview]
Message-ID: <g2g817ecb6f1004060751s1fd3d42bqc19b5c36b33c3c13@mail.gmail.com> (raw)
In-Reply-To: <1270277000.2686.20.camel@sbs-t61>

On Sat, Apr 3, 2010 at 2:43 AM, Suresh Siddha <suresh.b.siddha@intel•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-security-module" in
the body of a message to majordomo@vger•kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-04-06 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01  1:59 [PATCH 1/4] [tip:x86/mm] Correcting improper large page preservation Siarhei Liakh
2010-04-03  6:43 ` Suresh Siddha
2010-04-06 14:51   ` Siarhei Liakh [this message]
2010-05-05 18:14     ` Siarhei Liakh
     [not found]     ` <g2s817ecb6f1005051114kfbf4f33dwf473e0a30e00d614@mail.gmail.com>
2010-05-06  6:19       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=g2g817ecb6f1004060751s1fd3d42bqc19b5c36b33c3c13@mail.gmail.com \
    --to=sliakh.lkml@gmail$(echo .)com \
    --cc=ak@muc$(echo .)de \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=arjan@infradead$(echo .)org \
    --cc=davej@redhat$(echo .)com \
    --cc=hpa@zytor$(echo .)com \
    --cc=jmorris@namei$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=linux-security-module@vger$(echo .)kernel.org \
    --cc=mingo@elte$(echo .)hu \
    --cc=rusty@rustcorp$(echo .)com.au \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=suresh.b.siddha@intel$(echo .)com \
    --cc=tglx@linutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox