[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4C856161.5040806@free.fr>
Date: Mon, 06 Sep 2010 23:47:13 +0200
From: matthieu castet <castet.matthieu@...e.fr>
To: linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-next@...r.kernel.org
CC: 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>,
Siarhei Liakh <sliakh.lkml@...il.com>
Subject: [PATCH 1/3 V2] [tip:x86/mm] Correcting improper large page preservation
This patch fixes a bug in try_preserve_large_page() which may result
in improper large page preservation and improper application of page
attributes to the memory area outside of the original change request.
More specifically, the problem manifests itself when set_memory_*() is
called for several pages at the beginning of the large page and
try_preserve_large_page() erroneously concludes that the change can be
applied to whole large page.
The fix consists of 3 parts:
1. addition of "required" protection attributes in
static_protections(), so .data and .bss can be guaranteed to stay "RW"
2. static_protections() is now called for every small page within
large page to determine compatibility of new protection attributes
(instead of just small pages within the requested range).
3. large page can be preserved only if attribute change is
large-page-aligned and covers whole large page.
V1: try_preserve_large_page() patch for Linux 2.6.34-rc2
V2: replaced pfn check with address check for kernel rw-data
Signed-off-by: Siarhei Liakh <sliakh.lkml@...il.com>
Signed-off-by: Xuxian Jiang <jiang@...ncsu.edu>
Reviewed-by: Suresh Siddha <suresh.b.siddha@...el.com>
View attachment "x86_page_preservation_fix.diff" of type "text/x-diff" (3445 bytes)
Powered by blists - more mailing lists