From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753375AbcGYORP (ORCPT ); Mon, 25 Jul 2016 10:17:15 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:32993 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753360AbcGYOQp (ORCPT ); Mon, 25 Jul 2016 10:16:45 -0400 From: Nicolai Stange To: Borislav Petkov Cc: Nicolai Stange , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arch/x86/kernel/cpu/microcode/intel: don't store initrd's start References: <20160724150549.2833-1-nicstange@gmail.com> <20160725070648.GB24576@nazgul.tnic> <87bn1m5auo.fsf@gmail.com> <20160725123643.GE4901@nazgul.tnic> <871t2hkh4w.fsf@gmail.com> <20160725134453.GB18535@nazgul.tnic> Date: Mon, 25 Jul 2016 16:16:41 +0200 In-Reply-To: <20160725134453.GB18535@nazgul.tnic> (Borislav Petkov's message of "Mon, 25 Jul 2016 15:44:53 +0200") Message-ID: <87shuxiz06.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Borislav Petkov writes: > On Mon, Jul 25, 2016 at 02:59:43PM +0200, Nicolai Stange wrote: >> Applied on top of next-20160722 and it boots > > Does it apply the microcode too? Or your box doesn't need microcode? [ 0.000000] microcode: microcode updated early to revision 0x20, date = 2016-03-16 [ 2.929972] microcode: sig=0x306c3, pf=0x10, revision=0x20 Is this a "yes"? /proc/cpuinfo shows a "microcode" value of 0x20 for all logical cores at least. >> Doesn't this break the builtin-ucode case (!blobs.valid) where >> blobs.start is supposed to be zero? > > Good point. > > Well, it shouldn't because in the builtin case start should simply > contain the ASLR offset the physmem mapping was moved to and this offset > is exactly where the builtin images should be... Let me poke at it to > see whether I'm seeing things correctly. Hmm. From what I've seen, I've concluded that the builtin images' addresses are __va ones (assuming x86_64). I might be wrong though. Another point: does PAGE_OFFSET_BASE exist on ARCH=i386? And a third one, more of a sidenote: I've seen a comment somewhere that blobs.start is set to 0 in the builtin case. However, I was unable to find this initialization in the original code. This very last point would have been fixed by my patch as a sideeffect. I just forgot about this remark. Thanks, Nicolai