Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3949859ybv; Tue, 25 Feb 2020 10:13:33 -0800 (PST) X-Google-Smtp-Source: APXvYqw+M78Ht+gGa9MhEOUXTuKY8kNbflLmaPNiVorPv77e2GiAMus/O0agWfOh2V9bVHJP5Oj1 X-Received: by 2002:a9d:768b:: with SMTP id j11mr30267157otl.278.1582654412907; Tue, 25 Feb 2020 10:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582654412; cv=none; d=google.com; s=arc-20160816; b=nT7f7hId2bj6So7JCiY2an9iKHyrr/bX6Nx8zxeNoafcoVzbCTRYNwk3Hqu9ZSydeC jziF72+wPoyLkFqrCGN5HlyyEST0p2lEuLONs5zh57aI8qvO+thJdZxnX5sYkp5X6aFm +pqr1966pusGGzbahLMD7DcWjQ5xOcwp+ACTL+4OVTXiAa7xbZDQ1KW24TWvmUSznZxk Q/Ly9RTj2ttMp4h6TAaJ4jwvDB0szCdi7DTRU15JU4kKWskgRHkKyKpqTb/HwvtVIXY3 TNTGrdYdbNil6KhKOGi6YGtKaXTFp7aXrJ0V+REGU7OzMXTLwlh6DtqHNp/H79KCDs5X +6Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UMVJjnGx1rEGWbrq3GAmIieKUGMf/q+L/MZ32nBaHe0=; b=I2xsRI42zE6JHkYfV9jmTV0s9e32hS+km/Dc3a9VTlRuAeZ36vYvFFfKHOwVFUvyW1 aBEa7KHf6+Wl3/JIPo1VsbIAHHZsOESXkv26vr7KkHi6+Z2un7HVUh05Ebj4XhnDTA5V 22SiOeYU2kFrwqJsv8YfAor7LU8vd/JcQLQpmIzPY7ugQnNEWiFwRXm+QuevGZ6dzIRH xMhHEOXDr74BiJGeQiVitikLQgvPaO2Hdulra41OwCO4eDrzpPARvj//jRxE29m+rM3t O5Ld9U58sI9eN43Btmn4sZKWRNPfISpkGJFqmdyr04XPEuzLrTG5VeZUsVFq8XweHuuu qA2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fMui7mI7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si8700968otr.304.2020.02.25.10.13.19; Tue, 25 Feb 2020 10:13:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fMui7mI7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731140AbgBYSMg (ORCPT + 99 others); Tue, 25 Feb 2020 13:12:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:56778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728367AbgBYSMg (ORCPT ); Tue, 25 Feb 2020 13:12:36 -0500 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78C7322464 for ; Tue, 25 Feb 2020 18:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582654355; bh=mXWUiZJkPmr1lE8uFH0V3qybqZfjUw3HgXua5XVN2cU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fMui7mI7qIyRMi4ekKiacJt4rF4HFT4WpEGnJTtw/GxytaWxH2e3qhX//Bj86Cp9X UNk4hH5PPZhW0gD9n4rbF+CK6lcM2vdrzkiYo4A+Hhv+Cso7V2PX925fbRajyv6FWn aVrwy653xgbTgqvTKzFjfBe3eMZJDac6HNoPKVFM= Received: by mail-wr1-f41.google.com with SMTP id z15so7570568wrl.1 for ; Tue, 25 Feb 2020 10:12:35 -0800 (PST) X-Gm-Message-State: APjAAAUgKOfOpE5PaNW2ns8gqbulg/ztoOp6xdxdqlHX0ovncK/nUqR3 O389tbeHutKwA2ypqQYCbW01Ka8wxjbCud/Vg2Cy+Q== X-Received: by 2002:a05:6000:110b:: with SMTP id z11mr417950wrw.252.1582654353845; Tue, 25 Feb 2020 10:12:33 -0800 (PST) MIME-Version: 1.0 References: <261ea8108c6290e95962be2638bd204f90787c1c.1582652466.git.thomas.lendacky@amd.com> <9e16fed9-4399-5c78-cbfb-6be75c295f31@amd.com> <96417897-8bf0-e60c-6285-7286673ecd01@amd.com> In-Reply-To: <96417897-8bf0-e60c-6285-7286673ecd01@amd.com> From: Ard Biesheuvel Date: Tue, 25 Feb 2020 19:12:22 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] x86/efi: Add additional efi tables for unencrypted mapping checks To: Tom Lendacky Cc: Linux Kernel Mailing List , "the arch/x86 maintainers" , linux-efi , platform-driver-x86@vger.kernel.org, Darren Hart , Andy Shevchenko , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Feb 2020 at 19:10, Tom Lendacky wrote: > > On 2/25/20 11:58 AM, Ard Biesheuvel wrote: > > On Tue, 25 Feb 2020 at 18:54, Tom Lendacky wrote: > >> > >> On 2/25/20 11:45 AM, Ard Biesheuvel wrote: > >>> On Tue, 25 Feb 2020 at 18:41, Tom Lendacky wrote: > >>>> > >>>> When booting with SME active, EFI tables must be mapped unencrypted since > >>>> they were built by UEFI in unencrypted memory. Update the list of tables > >>>> to be checked during early_memremap() processing to account for new EFI > >>>> tables. > >>>> > >>>> This fixes a bug where an EFI TPM log table has been created by UEFI, but > >>>> it lives in memory that has been marked as usable rather than reserved. > >>>> > >>>> Signed-off-by: Tom Lendacky > >>>> > >>>> --- > >>>> Changes since v1: > >>>> - Re-spun against EFI tree > >>> > >>> Which one? Surely not the one in the link I included? > >> > >> I did a git clone of > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git > >> > >> and checked out branch next. Not sure what I missed... > >> > > > > Weird. Do you see commit 5d288dbd88606d8f215c7138b10649115d79cadd on > > that branch? It removes rng_seed from struct efi, hence my request to > > rebase your patch. > > I had just assumed you wanted a cleaner version and didn't realize that > rng_seed was removed from struct efi. My bad for not building. > > > > > IMO, best is to simply drop the 'static' from rng_seed, rename it to > > efi_rng_seed, and drop an extern declaration in linux/efi.h so it is > > accessible from your code. I'm reluctant to put it back in struct efi. > > Ok, I'll re-work the patch. > OK Btw if you want the TPM part of the fix to go to -stable, better to split them in two (and I'll put a cc:stable on the tpm one)