All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: matthieu castet <castet.matthieu@free.fr>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, Lin Ming <ming.m.lin@intel.com>,
	Andi Kleen <andi@firstfloor.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] x86 : Add NX protection for kernel data on 64 bit
Date: Mon, 14 Mar 2011 16:04:44 -0700	[thread overview]
Message-ID: <4D7E9F0C.2010504@zytor.com> (raw)
In-Reply-To: <4D7D0ED6.2050504@free.fr>

On 03/13/2011 11:37 AM, matthieu castet wrote:
> Cpu hotplug code read data in head_64.S (phys_base) before enabling NX, so when
> we enable NX on data, an triple fault happen because a reserved bit is set.
> It was fixed by allocating dedicated page table for ident mapping in trampoline.
> Now data can be protected by NX.
> 
> The Low kernel Mapping is also set to NX.
> 
> Finaly we preserve large page mapping by applying nx in free_init_pages only 
> when we switch to NX mode

The right way to do this is to have initial_page_table and keep it
around, just as we already do on 32 bits... yet another thing that can
be merged instead of coming up with a separate solution.

	-hpa

      reply	other threads:[~2011-03-14 23:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-13 18:37 [PATCH] x86 : Add NX protection for kernel data on 64 bit matthieu castet
2011-03-14 23:04 ` H. Peter Anvin [this message]

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=4D7E9F0C.2010504@zytor.com \
    --to=hpa@zytor.com \
    --cc=andi@firstfloor.org \
    --cc=castet.matthieu@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.