Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp638890ybx; Thu, 7 Nov 2019 00:07:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyggDc+hR/6K30vhRUOqfM7sbio2YKB3O9TkkehOJ1v4CR0AmIVUZnSbMo/TRAE+Sz97byV X-Received: by 2002:a17:906:b7c6:: with SMTP id fy6mr1772296ejb.90.1573114049169; Thu, 07 Nov 2019 00:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573114049; cv=none; d=google.com; s=arc-20160816; b=ZffLe1qC0EUfyeaBBaoOq+XpFihcRUaHikNEeMKOfXl4wB7Y1Z5rUqcNbakikJQX4a 4S+Rnc8U+ORrZkbJ51DlmkHFqS2L1ZEZlvEd07fC9mHkgL9Xz/RnOjeF4uI1lGnXJY/1 0mnkgRPZhnIXFCf0iZg9locG4ln5MzChHcA41RtUfnr4e4xYJONojO3j7smoybyGxeRr NocrTc5FpAdk23WHdyNzJPCqOufyJK/T2Up1TPuIgFX8EMkeZVcM85lTm2B27dhBsrDz qvT7wFAXPVXFFv764bzmMd4O2lXVpdZDl/HBMwjmxPMlHseVbriSKZaKt28fVA/OLCBK HlzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=CFGzwjtb/VkJS/uAhDa3DxmxPueVzFKGsHG5v47TWc4=; b=yMCDbxIEuNf6hRX9N5Fj+CGLPMjSwlbt4flbRaBX6mJloMEmnsQydT+cGA+fS5mpg3 jQxeSi3fRJ2CZ4A5sz/vWJdDXFIu0ba7s7DdL2Caw95R7ntGXBQpxvS4Ic1fa9xh7riK MElyHYRTmGs/RcLxrV/xXv286vupd4vdnx9zqgw6W3czgVPMwc/cZl8Vy6SrgYdkS7dP xg92FfrKi9d9FO48up/znDddlDlAHTaOmoDFCF4OdhH5I6Xi+9r5Z9a4pUKccbBTSzF5 xXtjEiUu5Muf6XYAGFibcfH2nJAkQg6waZjS8jeeyGM3+h4oDY+W9yJpjwL/H/OmmTfv u7Fw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si179921ejc.266.2019.11.07.00.07.06; Thu, 07 Nov 2019 00:07:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727580AbfKGIDT (ORCPT + 99 others); Thu, 7 Nov 2019 03:03:19 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5740 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726734AbfKGIDS (ORCPT ); Thu, 7 Nov 2019 03:03:18 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6EEA48D711EBFC8BF3D0; Thu, 7 Nov 2019 16:03:16 +0800 (CST) Received: from [127.0.0.1] (10.57.64.164) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Thu, 7 Nov 2019 16:03:07 +0800 Subject: Re: [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform To: Ard Biesheuvel CC: Ingo Molnar , Will Deacon , "Kate Stewart" , Thomas Gleixner , Steve Capper , linux-efi , Linux Kernel Mailing List , Linuxarm , , Xinwei Kong References: <20191105082924.289-1-kong.kongxinwei@hisilicon.com> From: kongxinwei Message-ID: <9ffbc8d5-cd95-1978-c5df-eedd4fe2b850@hisilicon.com> Date: Thu, 7 Nov 2019 16:03:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.57.64.164] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/6 22:59, Ard Biesheuvel wrote: > On Wed, 6 Nov 2019 at 15:56, Ard Biesheuvel wrote: >> >> On Tue, 5 Nov 2019 at 09:29, Xinwei Kong wrote: >>> >>> this patch gets tpm eventlog information such as device boot status,event guid >>> and so on, which will be from bios stage. it use "efi_retrieve_tpm2_eventlog" >>> functions to get it for ARM64 platorm. >>> >>> Signed-off-by: Xinwei Kong >>> Signed-off-by: Zou Cao >>> --- >>> drivers/firmware/efi/libstub/arm-stub.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c >>> index c382a48..37c8f81 100644 >>> --- a/drivers/firmware/efi/libstub/arm-stub.c >>> +++ b/drivers/firmware/efi/libstub/arm-stub.c >>> @@ -139,6 +139,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table, >>> if (status != EFI_SUCCESS) >>> goto fail; >>> >>> + efi_retrieve_tpm2_eventlog(sys_table); >>> + >> >> This function allocates memory, so calling it should be deferred until >> after we relocate the kernel, to prevent these allocations from using >> up space that we'd rather use for the kernel. >> >> Does it work for you if we move this call further down, right before >> the call to efi_enable_reset_attack_mitigation()? Please confirm. >> ok,I will confirm it and send V2 version patch : > > Also, your S-o-b chain is incorrect. If Zou Cao provided you with the > patch, please credit her/him as the author (using git --reset-author) > and move your S-o-b last. If Zou Cao was a co-author [which seems > unlikely for a single line patch], use Co-developed-by+Signed-off-by. > In any case, the S-o-b of the person sending out the patch via email > should come last. > I will deal it. > . >