Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3939533ybv; Tue, 25 Feb 2020 10:03:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwh9ghFdMb9vNs9m2hItCqrHLq/96nYnjskw2WHfc90UAMwpd/s6PN44R9u9eaLQSyDw1ws X-Received: by 2002:aca:d68a:: with SMTP id n132mr162993oig.40.1582653796216; Tue, 25 Feb 2020 10:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582653796; cv=none; d=google.com; s=arc-20160816; b=SlM1PF+KJ375cimHQo7qDwMUs6l18nFw86QDnpf94Vu9G1GyLIVbG0xAndDRFBN9qp Lq7J7b7EHI22HNUvpHXbtl8GhYd3zqTsHY3XKn4WiTE7/Rr3wwmvktXa1dWChNY7zI7h fIGNCyXdq/0gn+eO888mljAYY3ZyowNRXOBZf7Djjy6Z1qSV8+1LT5xGDqCaQyNibFpM qS1Fwf0URh6VKh9QxrdRSG90+aFr8jOzaFhXrKJ7R1ekBo383+MvSCzNV9+Ht3f6TGXq ba6HZv0jva7k1GrRyhfAI7R50oUW4dQnaiVGQ8MTQFV5meNDotwqK8NYuSkVwihMuh1f XMSA== 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=8l0eoAYYcBRoHwROSiVnO66BRU4U7ydiCaaDVUeCrH8=; b=SCt2BZ+kTxrfeYAC1vcToF34EBfZT3RIseR6dHw6RPzE4I9LUm2AzoFjlxl9jWffEp sPBXdbTxPMhqw8BU8LMTjciWbZ9hbzski93BeVrOSb0i4M9qbgC30gY6X0wJ5qFIlp6u iyU31GnqWQpDHKyqsjp1Vwp0juicZ0wvqEOoxVNkQJ24Rvs75HXYy/+Ip/L5YRP08ZeV EfNSFfM7rxavF5FwWkNW1HZu1GWSFwU2LeMC3dBUc6Byw3OdU3mCm8/nT/WUaH/TCIm2 dEcOOBCfOrPLV4L4427lPa8RYle3okRssBSEdSpRoiINaDvmp+rsGMNL4eclTyjb9EiE UNBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XvibRSSo; 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 s15si7166257oih.252.2020.02.25.10.03.04; Tue, 25 Feb 2020 10:03:16 -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=XvibRSSo; 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 S1730378AbgBYR6c (ORCPT + 99 others); Tue, 25 Feb 2020 12:58:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:42596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730582AbgBYR6c (ORCPT ); Tue, 25 Feb 2020 12:58:32 -0500 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 F048024672 for ; Tue, 25 Feb 2020 17:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582653511; bh=Sva3j0zxk8ZOvePoBklb1lV/d69k6BLltGcoL8zx+i8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XvibRSSoNRmYfm+qIPIN7nGGePEDaM41FlNmAuDbFkQjS98jnypCTx3K7+hk1vN2/ M/lQCP9nHUXhPsxFFSSFNpzmY/5oXAOoWByYfG7uXgQ6bYNEqrMDvD9uDvFaTSYfzq f+9pjizLNvqqgFV8yly2QYf2270oA547XfqE0UTY= Received: by mail-wm1-f53.google.com with SMTP id a6so115068wme.2 for ; Tue, 25 Feb 2020 09:58:30 -0800 (PST) X-Gm-Message-State: APjAAAXMjfXq3+Hb/hHHN3tbITbEGeuma56JREscXyz/qnZJd0GsevwB 1Al3P1IKmP3/QVC0TYFUlj1xztk50RLhQe4iKDbmWg== X-Received: by 2002:a7b:c4cc:: with SMTP id g12mr477751wmk.68.1582653509278; Tue, 25 Feb 2020 09:58:29 -0800 (PST) MIME-Version: 1.0 References: <261ea8108c6290e95962be2638bd204f90787c1c.1582652466.git.thomas.lendacky@amd.com> <9e16fed9-4399-5c78-cbfb-6be75c295f31@amd.com> In-Reply-To: <9e16fed9-4399-5c78-cbfb-6be75c295f31@amd.com> From: Ard Biesheuvel Date: Tue, 25 Feb 2020 18:58:18 +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 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. 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.