From: castet.matthieu@free.fr
To: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>, Lin Ming <ming.m.lin@intel.com>,
Matthieu Castet <castet.matthieu@free.fr>,
Siarhei Liakh <sliakh.lkml@gmail.com>,
Xuxian Jiang <jiang@cs.ncsu.edu>,
Arjan van de Ven <arjan@infradead.org>,
Andi Kleen <andi@firstfloor.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: -tip tree resume fail, bisect to 5bd5a45(x86: Add NX protection for kernel data)
Date: Mon, 22 Nov 2010 11:29:04 +0100 [thread overview]
Message-ID: <1290421744.4cea45f0614d4@imp.free.fr> (raw)
In-Reply-To: <20101122092003.GA21836@basil.fritz.box>
Hi Andi,
Quoting Andi Kleen <andi@firstfloor.org>:
> On Mon, Nov 22, 2010 at 09:07:10AM +0100, Ingo Molnar wrote:
> > > ---[ High Kernel Mapping ]---
> > > ....
> > > 0xffffffff81a00000-0xffffffff81c00000 2M ro PSE GLB
> NX pmd
> > > 0xffffffff81c00000-0xffffffff81d91000 1604K ro GLB
> NX pte
> > > 0xffffffff81d91000-0xffffffff81e00000 444K ro GLB
> NX pte
> > > 0xffffffff81e00000-0xffffffff82000000 2M RW PSE GLB
> NX pmd
> > > 0xffffffff82000000-0xffffffff8200c000 48K RW GLB
> NX pte
> > > 0xffffffff8200c000-0xffffffff82100000 976K RW GLB
> NX pte
> > > 0xffffffff82100000-0xffffffff82200000 1M RW GLB
> NX pte
> > > .....
> > >
> > > The only difference is 0xffffffff81e00000(end) to
> 0xffffffff82200000(kernel_end) is set to NX.
> > >
> > > I guess this range code is used by resume wakeup code. So setting it to
> NX causes problem.
> > >
> > > Any idea?
> >
> > Yeah, the resume area is a trampoline, it needs to be executable.
>
> Also it looks like most of the kernel linker supplied data is now not
> 2MB mapped anymore? That will surely cost TLB entries.
>
Any idea where it comes from ?
The mapping is still not 2MB mapped without the commit.
The patch only add
+#if defined(CONFIG_DEBUG_RODATA)
+ /* .text should occupy whole number of pages */
+ . = ALIGN(PAGE_SIZE);
+#endif
X64_ALIGN_DEBUG_RODATA_BEGIN
RO_DATA(PAGE_SIZE)
X64_ALIGN_DEBUG_RODATA_END
But X64_ALIGN_DEBUG_RODATA_BEGIN is aligned on 2M, so it shouldn't change
nothing on x64 ?
Matthieu
next prev parent reply other threads:[~2010-11-22 10:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 7:23 -tip tree resume fail, bisect to 5bd5a45(x86: Add NX protection for kernel data) Lin Ming
2010-11-22 8:07 ` Ingo Molnar
2010-11-22 9:20 ` Andi Kleen
2010-11-22 10:29 ` castet.matthieu [this message]
2010-11-22 10:47 ` Andi Kleen
2010-11-22 13:03 ` Peter Zijlstra
2010-11-22 16:29 ` castet.matthieu
2010-11-22 16:35 ` Peter Zijlstra
2010-11-22 16:42 ` Andi Kleen
2010-11-23 22:55 ` mat
2010-11-26 17:31 ` mat
2010-11-26 23:39 ` Lin Ming
2010-11-30 5:00 ` Lin Ming
2010-11-30 11:27 ` Peter Zijlstra
2010-12-01 0:15 ` Lin Ming
2011-01-23 19:06 ` matthieu castet
2011-01-24 22:22 ` matthieu castet
2011-01-25 12:36 ` Lin Ming
2011-03-09 23:16 ` matthieu castet
2011-03-10 2:39 ` Lin Ming
2010-12-24 17:26 ` matthieu castet
2010-12-27 2:10 ` Lin Ming
2011-01-05 18:58 ` matthieu castet
2010-11-22 13:42 ` [tip:x86/security] x86: Resume trampoline must be executable tip-bot for Lin Ming
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=1290421744.4cea45f0614d4@imp.free.fr \
--to=castet.matthieu@free.fr \
--cc=andi@firstfloor.org \
--cc=arjan@infradead.org \
--cc=jiang@cs.ncsu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=sliakh.lkml@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox