From patchwork Thu Nov 7 15:10:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 178811 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1169836ilf; Thu, 7 Nov 2019 07:11:09 -0800 (PST) X-Google-Smtp-Source: APXvYqy8Mg9k8VH2iqne36kbdUVaVipjYFS3saBhaWH9wambysHorK8BR+CC/DF+v/5ZK7JL95Bl X-Received: by 2002:a17:906:1dc4:: with SMTP id v4mr3485287ejh.248.1573139468976; Thu, 07 Nov 2019 07:11:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573139468; cv=none; d=google.com; s=arc-20160816; b=eGddOdfrdYhR2WJwMlRrPTmJ/n3aNsRcYPqOGLrqorE3hTRwJgqClKF8zS/1alToAl PHUZVJBeA5Op0JK6IF5sodIrCdeYkZup4NoXFMM12tzsfG27H1F7MKXPZgcxD5Z8FgOb hncIYsQtU8ZY/2owlcWz5BAOU+oktPIC2nUnGjjBN9uEhoe9NbECLFxeyDY8pqghnOG6 IYYVR3OPmAlOTzzHEEvnFBfk1pK8aEEF8lYJIjuk8cRiLwwbJL7ytORPSLtpv7Lr9/fo EAqJRUyKsf7o3taOMTbWyH3XHLwIrPXsWy9WWsv5jjzagDDxfu4shOt583A+oip0Hvjp gkcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=XuXO/H4OXhVtOjKf9qiuo0ExgkM5/N1tAw03rq8sIPo=; b=ayOOmJtKvg4DPR7zQKTzY7DZfRZE+g0czhINYE1Rzf1pTBijVjSMNAco+3U61U6qb3 HefoXW41RyuobXp6HjyIXmDFN/10D23YbzaoS7otI0LF2p0yMB/pxrBGFOxZDJBS+rz+ 5bbkm2LHWT2xhR0UEMXZoJrPHr/k60Il1XWknyIS0wXQPAnIghktsugDrUk91dvtoFz3 By2YxU2NkW/NOo7UhElzfUgSOkg5tz87pW/vVzUcbHXB5w5gVex+TaLMaaOg3GZn+9QH RiZkDlqy/pDBlh+fMi5xWaPYQbSsKgUnONXyKGYVy6CcU03PcOXSc5B00rBlv9yj+Btz hnMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MARGOLWP; 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 y11si1668431edd.182.2019.11.07.07.11.08; Thu, 07 Nov 2019 07:11:08 -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=MARGOLWP; 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 S2389438AbfKGPLH (ORCPT + 26 others); Thu, 7 Nov 2019 10:11:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:35098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388215AbfKGPLF (ORCPT ); Thu, 7 Nov 2019 10:11:05 -0500 Received: from e123331-lin.home (lfbn-mar-1-643-104.w90-118.abo.wanadoo.fr [90.118.215.104]) (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 5051221D7F; Thu, 7 Nov 2019 15:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573139465; bh=ShhuQJKj95tf70E5sIDo1oCgv9TkTuvFMWJ3C79oc+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MARGOLWPTetCeNDq3mfDxXWifCDClaIzR9qEWhG4uCsHWtXuAz7X4MAYJllkjwUD1 kvkjlTmcLbmn90XZ+QTy+yy1X5tP6b7GKBdTOW1n65bnWY1mL3LK7ExQR55gHhUxwI 86cPvbcK3zmrw3ayaTCbpJmEsSyLyiLtZh4irQgE= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , Ard Biesheuvel , linux-kernel@vger.kernel.org, Dominik Brodowski , Xinwei Kong , Zou Cao Subject: [PATCH 4/4] efi: libstub/tpm: enable tpm eventlog function for ARM platforms Date: Thu, 7 Nov 2019 16:10:36 +0100 Message-Id: <20191107151036.5586-5-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107151036.5586-1-ardb@kernel.org> References: <20191107151036.5586-1-ardb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xinwei Kong Wire up the existing code for ARM that loads the TPM event log into OS accessible buffers while running the EFI stub so that the kernel proper can access it at runtime. Tested-by: Zou Cao Signed-off-by: Xinwei Kong Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/arm-stub.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index c382a48c6678..817237ce2420 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -189,6 +189,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table, goto fail_free_cmdline; } + efi_retrieve_tpm2_eventlog(sys_table); + /* Ask the firmware to clear memory on unclean shutdown */ efi_enable_reset_attack_mitigation(sys_table);