lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <A38D1505C1E78C469FFA71861BDE11B32177A109@satlexdag05.amd.com>
Date:	Fri, 6 Dec 2013 15:27:53 +0000
From:	"Naru, Kim" <Kim.Naru@....com>
To:	Borislav Petkov <bp@...en8.de>, X86 ML <x86@...nel.org>
CC:	LKML <linux-kernel@...r.kernel.org>, Borislav Petkov <bp@...e.de>,
	Thomas Renninger <trenn@...e.de>
Subject: RE: [PATCH 0/4] x86, microcode, AMD: Fix early loading

Boris,
I will take a look at it.

--kim

-----Original Message-----
From: Borislav Petkov [mailto:bp@...en8.de] 
Sent: Thursday, December 05, 2013 3:32 PM
To: X86 ML
Cc: LKML; Borislav Petkov; Naru, Kim; Thomas Renninger
Subject: [PATCH 0/4] x86, microcode, AMD: Fix early loading

From: Borislav Petkov <bp@...e.de>

A couple of openSUSE bugzillas made me look at the early ucode loading on AMD.

The problem is, we're doing memory allocation too early with IRQs disabled and we really want to avoid that. Also, 32-bit has other problems like calling rd/wrmsr*/cpuid functions at their virtual addresses while paging is not enabled yet. Bah.

So, fix that by *always* using the initrd image handed in from the bootloader and cache the ucode patches only late, right before the initrd is jettisoned. This avoids the allocation issue completely. While at it, take care of the 32-bit issues too.

Testing on 32-bit and 64-bit passes here.

@Kim: I'd appreciate it if you guys ran those patches too, by creating an early ucode initrd as it is described in Documentation/x86/early-microcode.txt.

Thanks.

Borislav Petkov (4):
  x86, ramdisk: Export relocated ramdisk VA
  x86, microcode: Share native MSR accessing variants
  x86, microcode, AMD: Fix early ucode loading
  x86, microcode: Move to a proper location

 arch/x86/include/asm/microcode.h                   |  15 ++
 arch/x86/include/asm/microcode_amd.h               |   7 +-
 arch/x86/include/asm/setup.h                       |   3 +-
 arch/x86/kernel/Makefile                           |   9 -
 arch/x86/kernel/cpu/Makefile                       |   1 +
 arch/x86/kernel/cpu/microcode/Makefile             |  11 +
 .../{microcode_amd.c => cpu/microcode/amd.c}       |  13 +-
 .../microcode/amd_early.c}                         | 239 ++++++++++++++-------
 .../{microcode_core.c => cpu/microcode/core.c}     |   0
 .../microcode/core_early.c}                        |   0
 .../{microcode_intel.c => cpu/microcode/intel.c}   |   0
 .../microcode/intel_early.c}                       |  10 -
 .../microcode/intel_lib.c}                         |   0
 arch/x86/kernel/setup.c                            |  19 +-
 14 files changed, 209 insertions(+), 118 deletions(-)  create mode 100644 arch/x86/kernel/cpu/microcode/Makefile
 rename arch/x86/kernel/{microcode_amd.c => cpu/microcode/amd.c} (96%)  rename arch/x86/kernel/{microcode_amd_early.c => cpu/microcode/amd_early.c} (55%)  rename arch/x86/kernel/{microcode_core.c => cpu/microcode/core.c} (100%)  rename arch/x86/kernel/{microcode_core_early.c => cpu/microcode/core_early.c} (100%)  rename arch/x86/kernel/{microcode_intel.c => cpu/microcode/intel.c} (100%)  rename arch/x86/kernel/{microcode_intel_early.c => cpu/microcode/intel_early.c} (98%)  rename arch/x86/kernel/{microcode_intel_lib.c => cpu/microcode/intel_lib.c} (100%)

--
1.8.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ