| summaryrefslogtreecommitdiff |
| author | Jiri Slaby <jslaby@suse.cz> | 2013-05-22 16:20:05 (GMT) |
|---|---|---|
| committer | Jiri Slaby <jslaby@suse.cz> | 2013-05-22 16:20:05 (GMT) |
| commit | 06ad9d8ab5218e40510a7afe900a3afd22f0376f (patch) (side-by-side diff) | |
| tree | ca2038c8cd45e1c0427eff9169ff8644d9d45ccf | |
| parent | 95052aa4144545b375e6878b2753e9077f10b04d (diff) | |
x86: Fix bit corruption at CPU resume time.stable
| -rw-r--r-- | patches.kernel.org/x86-Fix-bit-corruption-at-CPU-resume-time.patch | 42 | ||||
| -rw-r--r-- | series.conf | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.kernel.org/x86-Fix-bit-corruption-at-CPU-resume-time.patch b/patches.kernel.org/x86-Fix-bit-corruption-at-CPU-resume-time.patch new file mode 100644 index 0000000..ec0295b --- a/dev/null +++ b/patches.kernel.org/x86-Fix-bit-corruption-at-CPU-resume-time.patch @@ -0,0 +1,42 @@ +From: Linus Torvalds <torvalds@linux-foundation.org> +Date: Mon, 20 May 2013 11:36:03 -0700 +Subject: x86: Fix bit corruption at CPU resume time +Git-commit: 5e427ec2d066b48a5c27b3a5a3315f7e4e729077 +Patch-mainline: v3.10-rc2 and queued for 3.9.4 + +In commit 78d77df71510 ("x86-64, init: Do not set NX bits on non-NX +capable hardware") we added the early_pmd_flags that gets the NX bit set +when a CPU supports NX. However, the new variable was marked __initdata, +because the main _use_ of this is in an __init routine. + +However, the bit setting happens from secondary_startup_64(), which is +called not only at bootup, but on every secondary CPU start. Including +resuming from STR and at CPU hotplug time. So the value cannot be +__initdata. + +Reported-bisected-and-tested-by: Michal Hocko <mhocko@suse.cz> +Cc: stable@vger.kernel.org # v3.9 +Acked-by: Peter Anvin <hpa@linux.intel.com> +Cc: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Jiri Slaby <jslaby@suse.cz> +--- + arch/x86/kernel/head64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c +index dab95a8..55b6761 100644 +--- a/arch/x86/kernel/head64.c ++++ b/arch/x86/kernel/head64.c +@@ -34,7 +34,7 @@ + extern pgd_t early_level4_pgt[PTRS_PER_PGD]; + extern pmd_t early_dynamic_pgts[EARLY_DYNAMIC_PAGE_TABLES][PTRS_PER_PMD]; + static unsigned int __initdata next_early_pgt = 2; +-pmdval_t __initdata early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX); ++pmdval_t early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX); + + /* Wipe all early page tables except for the kernel symbol map */ + static void __init reset_early_page_tables(void) +-- +1.8.2.3 + diff --git a/series.conf b/series.conf index 1bcc2bb..1d915de 100644 --- a/series.conf +++ b/series.conf @@ -30,6 +30,7 @@ patches.kernel.org/patch-3.9.1 patches.kernel.org/patch-3.9.1-2 patches.kernel.org/patch-3.9.2-3 + patches.kernel.org/x86-Fix-bit-corruption-at-CPU-resume-time.patch ######################################################## # Build fixes that apply to the vanilla kernel too. |