Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4174330iog; Tue, 28 Jun 2022 10:27:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1veiMxhGzRf7wheWCNKUFIduPyti4PoA9FEDutI6Cr/1nYK9hq6dQvUNmxMB3DsmcmJ4VbE X-Received: by 2002:a17:907:2d2a:b0:726:3527:60ac with SMTP id gs42-20020a1709072d2a00b00726352760acmr18414959ejc.661.1656437231262; Tue, 28 Jun 2022 10:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656437231; cv=none; d=google.com; s=arc-20160816; b=SdDyQgtAPnxyvbd0T3O6hsZDYNtWAtotLbz5EiZ/fd9BopRXKoDabPZgeFb9O3vG8i IL6S7sZCzWu8z95tvmNHYo9o7v1lZH9ooFbPoGrpALjT90HWL2RquM8Rhpi3es9x9C5x tt2PqOPJVEykLgUexBN8icOC6MSaJEw9BT9bcCZKvQ5dHkTRJUZipUP3lWiUAc5dtqbD R6QhbZT0iAt7aYEe9OofJf3DZBSha4Go951VqcAC8mzdjiwgOzc/XKuCdZnUPXWjBwcr GWUS6UfKZR6i/quLpxdOGRbpWepFJ98xlRQHfcc6PnU32LlkJVE/aXaS5S107Mv8twPq PAJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=m4j3y3RvkIM6SWeHtONEy1ljKBPfeHeA0FSrfKMn9qs=; b=x2ON/SQpTVM1RzFGK3yASIOyAP4NrGxBs5lHGhrXP1ZFxqnVB9rosQyv8ivnLeq9uv sVcWmLh8z3cu5bvcBlrhtTGoiCqV5xxYQ6RLeWgah9q74Od1dJbAEiitvvZLNa11kWcI IPrW2SRSG2YriHW3fVjfBY+MU9PZhTZGj5vzfUJmtLkTF/UWVs3YoVjGHNuFZKiGjG9S gJi+J+/qrqno6aFmSbCDtWzTq33UWVebvh8im1Jk9sj0sSfXVMm7p4qHdGxz0M5U/XWR TOqUbaHKhotBKspe9HzNDuQkXIkS4I2xhMJkVFOHksGpHmGV1TmLP+F9S3CH05k5V4/r QzOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qG1qnycd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr5-20020a1709073f8500b006fe10d6262bsi18144752ejc.500.2022.06.28.10.26.42; Tue, 28 Jun 2022 10:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qG1qnycd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232916AbiF1RZ2 (ORCPT + 99 others); Tue, 28 Jun 2022 13:25:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231738AbiF1RZ1 (ORCPT ); Tue, 28 Jun 2022 13:25:27 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A8539821; Tue, 28 Jun 2022 10:25:25 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25SH86e2016204; Tue, 28 Jun 2022 17:25:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=m4j3y3RvkIM6SWeHtONEy1ljKBPfeHeA0FSrfKMn9qs=; b=qG1qnycdUJJg71tCbFND6rP86rIil8j2PsHZFDbyZ8o+W943G/lE28lH8dW/PNV9k5G4 DHwuvG+dRZVoTu2WQKkq9549yZCg20G2hFWUJ4yocqecMdDa27z9dHQV8Ai2HlYguCVI VLErP6tHcCJIIie1QvmsG6qO9zhjg/Xjj2D0Gf6dxSJ5nZRT75ntNuGW9YxFzixTRSqW DyRnjZTpZl34dnRScCaqKiec+eVf9TLI9xdWMR0Yqw7Qzik6BDHVkMyBO4Uk6li/O1Tn 05SAhXqdbtNf7hqrHEbB7Vz64UiI4RULlEoVDYcL4ttZAZE+nVWGtQA51qgsZ4gh3YrU HQ== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3h05sd0huq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Jun 2022 17:25:16 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25SHLBC9021275; Tue, 28 Jun 2022 17:25:15 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04wdc.us.ibm.com with ESMTP id 3gwt09pxyg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Jun 2022 17:25:15 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25SHPEOd33489318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Jun 2022 17:25:14 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64E64BE04F; Tue, 28 Jun 2022 17:25:14 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C91D2BE054; Tue, 28 Jun 2022 17:25:13 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 28 Jun 2022 17:25:13 +0000 (GMT) Message-ID: <4dec36a6-e4be-196c-1af7-3d84c964394f@linux.ibm.com> Date: Tue, 28 Jun 2022 13:25:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v3 0/3] tpm: Preserve TPM measurement log across kexec (ppc64) Content-Language: en-US To: kexec@lists.infradead.org, devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: nayna@linux.ibm.com, nasastry@in.ibm.com, mpe@ellerman.id.au References: <20220628165820.883222-1-stefanb@linux.ibm.com> From: Stefan Berger In-Reply-To: <20220628165820.883222-1-stefanb@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: UPxcaoS2IWgnZEiR4HPlabB68h_GKNcO X-Proofpoint-GUID: UPxcaoS2IWgnZEiR4HPlabB68h_GKNcO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-28_10,2022-06-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 mlxlogscore=662 adultscore=0 malwarescore=0 clxscore=1015 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206280068 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/28/22 12:58, Stefan Berger wrote: > The of-tree subsystem does not currently preserve the IBM vTPM 1.2 and > vTPM 2.0 measurement logs across a kexec on ppc64. This series fixes this > for the kexec_file_load() syscall using the flattened device tree (fdt) to > carry the measurement log's buffer across kexec. > > Stefan > v3: - Moved TPM Open Firmware related function to drivers/char/tpm/eventlog/tpm_of.c v2: - rearranged patches - fixed compilation issues for x86 > Stefan Berger (3): > tpm: of: Make of-tree specific function commonly available > of: kexec: Refactor IMA buffer related functions to make them reusable > tpm/kexec: Duplicate TPM measurement log in of-tree for kexec > > drivers/char/Makefile | 1 + > drivers/char/tpm/Makefile | 1 + > drivers/char/tpm/eventlog/of.c | 31 +-- > drivers/char/tpm/eventlog/tpm_of.c | 27 +++ > drivers/of/kexec.c | 293 +++++++++++++++++++++++++---- > include/linux/kexec.h | 6 + > include/linux/of.h | 8 +- > include/linux/tpm.h | 5 + > kernel/kexec_file.c | 6 + > 9 files changed, 315 insertions(+), 63 deletions(-) > create mode 100644 drivers/char/tpm/eventlog/tpm_of.c >