[kernel] r22246 - in dists/wheezy-security/linux/debian: . patches patches/bugfix/x86

Ben Hutchings benh at moszumanska.debian.org
Mon Jan 12 02:43:01 UTC 2015


Author: benh
Date: Mon Jan 12 02:43:01 2015
New Revision: 22246

Log:
[x86] cpu, amd: Add workaround for family 16h, erratum 793 (CVE-2013-6885)

Added:
   dists/wheezy-security/linux/debian/patches/bugfix/x86/x86-cpu-amd-add-workaround-for-family-16h-erratum-79.patch
Modified:
   dists/wheezy-security/linux/debian/changelog
   dists/wheezy-security/linux/debian/patches/series

Modified: dists/wheezy-security/linux/debian/changelog
==============================================================================
--- dists/wheezy-security/linux/debian/changelog	Sun Jan 11 22:16:58 2015	(r22245)
+++ dists/wheezy-security/linux/debian/changelog	Mon Jan 12 02:43:01 2015	(r22246)
@@ -4,6 +4,7 @@
     (Closes: #774436)
     - Revert "x86, mm: Set NX across entire PMD at boot"
     - Revert "x86, 64bit, mm: Mark data/bss/brk to nx"
+  * [x86] cpu, amd: Add workaround for family 16h, erratum 793 (CVE-2013-6885)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sun, 11 Jan 2015 00:33:09 +0000
 

Added: dists/wheezy-security/linux/debian/patches/bugfix/x86/x86-cpu-amd-add-workaround-for-family-16h-erratum-79.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/wheezy-security/linux/debian/patches/bugfix/x86/x86-cpu-amd-add-workaround-for-family-16h-erratum-79.patch	Mon Jan 12 02:43:01 2015	(r22246)
@@ -0,0 +1,77 @@
+From: Borislav Petkov <bp at suse.de>
+Date: Wed, 15 Jan 2014 00:07:11 +0100
+Subject: x86, cpu, amd: Add workaround for family 16h, erratum 793
+Origin: https://git.kernel.org/linus/3b56496865f9f7d9bcb2f93b44c63f274f08e3b6
+
+This adds the workaround for erratum 793 as a precaution in case not
+every BIOS implements it.  This addresses CVE-2013-6885.
+
+Erratum text:
+
+[Revision Guide for AMD Family 16h Models 00h-0Fh Processors,
+document 51810 Rev. 3.04 November 2013]
+
+793 Specific Combination of Writes to Write Combined Memory Types and
+Locked Instructions May Cause Core Hang
+
+Description
+
+Under a highly specific and detailed set of internal timing
+conditions, a locked instruction may trigger a timing sequence whereby
+the write to a write combined memory type is not flushed, causing the
+locked instruction to stall indefinitely.
+
+Potential Effect on System
+
+Processor core hang.
+
+Suggested Workaround
+
+BIOS should set MSR
+C001_1020[15] = 1b.
+
+Fix Planned
+
+No fix planned
+
+[ hpa: updated description, fixed typo in MSR name ]
+
+Signed-off-by: Borislav Petkov <bp at suse.de>
+Link: http://lkml.kernel.org/r/20140114230711.GS29865@pd.tnic
+Tested-by: Aravind Gopalakrishnan <aravind.gopalakrishnan at amd.com>
+Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
+[bwh: Backported to 3.2: adjust filename]
+---
+ arch/x86/include/asm/msr-index.h |  1 +
+ arch/x86/kernel/cpu/amd.c             | 10 ++++++++++
+ 2 files changed, 11 insertions(+)
+
+--- a/arch/x86/include/asm/msr-index.h
++++ b/arch/x86/include/asm/msr-index.h
+@@ -123,6 +123,7 @@
+ #define MSR_AMD64_PATCH_LOADER		0xc0010020
+ #define MSR_AMD64_OSVW_ID_LENGTH	0xc0010140
+ #define MSR_AMD64_OSVW_STATUS		0xc0010141
++#define MSR_AMD64_LS_CFG		0xc0011020
+ #define MSR_AMD64_DC_CFG		0xc0011022
+ #define MSR_AMD64_IBSFETCHCTL		0xc0011030
+ #define MSR_AMD64_IBSFETCHLINAD		0xc0011031
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -469,6 +469,16 @@ static void __cpuinit early_init_amd(str
+ 			set_cpu_cap(c, X86_FEATURE_EXTD_APICID);
+ 	}
+ #endif
++
++	/* F16h erratum 793, CVE-2013-6885 */
++	if (c->x86 == 0x16 && c->x86_model <= 0xf) {
++		u64 val;
++
++		rdmsrl(MSR_AMD64_LS_CFG, val);
++		if (!(val & BIT(15)))
++			wrmsrl(MSR_AMD64_LS_CFG, val | BIT(15));
++	}
++
+ }
+ 
+ static void __cpuinit init_amd(struct cpuinfo_x86 *c)

Modified: dists/wheezy-security/linux/debian/patches/series
==============================================================================
--- dists/wheezy-security/linux/debian/patches/series	Sun Jan 11 22:16:58 2015	(r22245)
+++ dists/wheezy-security/linux/debian/patches/series	Mon Jan 12 02:43:01 2015	(r22246)
@@ -1148,3 +1148,4 @@
 bugfix/all/isofs-fix-infinite-looping-over-ce-entries.patch
 bugfix/x86/revert-x86-mm-set-nx-across-entire-pmd-at-boot.patch
 bugfix/x86/revert-x86-64bit-mm-mark-data-bss-brk-to-nx.patch
+bugfix/x86/x86-cpu-amd-add-workaround-for-family-16h-erratum-79.patch



More information about the Kernel-svn-changes mailing list