Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp531766iog; Thu, 30 Jun 2022 05:40:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vO6NFBaXzIPcq5kQ3BeTDB2UIDlfk4ajY3RRZop9DQnFpHS1e0ZQMn3AC1vqEy7PdV0j2z X-Received: by 2002:a17:90a:68cf:b0:1ee:db09:739b with SMTP id q15-20020a17090a68cf00b001eedb09739bmr9889571pjj.179.1656592802816; Thu, 30 Jun 2022 05:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656592802; cv=none; d=google.com; s=arc-20160816; b=zo7mrWeZWwEn0IvIegKxRwM0pI+NXqChg6CHLQkRljRb1kuzPBsQwYWKi949jk8Pju A9Fq9rZHIBydtDlr0XndpBV6cjjFtdnDTrm7nqLg1dJP5d3K3pfDUi94vmIYyhTt8jT2 kKwOcFX+saLU+SWcS5Uhdrd8miPBtdfkyGIYCwVcXJpWNklB2twPL3bnZpwQwwWRgu1t cBhQMh5y/nxa6D7VjVqTTyrUIHHb1xCaQvLHYsSVfkZsR6l8dI2KgNCbfv/wrUnQmwWd phPRLCsEWA2E36Hp4xB/EWQ/mmAFrJuFwEXjY8HzBW3os6ptIa7VK58ZN/2tXyr3qQRB W4dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=y0ICbooO6ZnULmmiPkLxDZXQ7SEBVCNNquvW2a/RDpw=; b=tAF/luAductep1HX3/2nVp+MSJzv7hfd2rAJvU0n2lUtHac6wKkH7MhVpgnLo3oaMe ZJdYw3tQYnOG9UQ7IuggdxpWCgw1gVfmxui/mZypTRW/caKjuBBKNL5OUMLWRVjpdl1R 7+w3cjhLHB1X9vrUmnPGLLUhgf9GNwZHndkQX8UdCpTKc0AZuk5Zpg/5ON98dcmHVhck P+vJyqvoDR2At7iYkrKMRDbxUMgWwJPv+E5hHY1TOdByGrXifLTQHFQk7FccwOBJKVKf qLMG+Tl12R8rXmM9Js8SG3sYPUOZoq5ECnKrn3z8VtnVFQvqTfWuB7mcCtT+cm71dtIc Svfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dJyNjeYF; 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 f8-20020a636a08000000b0041169866094si8066146pgc.646.2022.06.30.05.39.49; Thu, 30 Jun 2022 05:40:02 -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=dJyNjeYF; 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 S234885AbiF3Lyy (ORCPT + 99 others); Thu, 30 Jun 2022 07:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234637AbiF3Lyx (ORCPT ); Thu, 30 Jun 2022 07:54:53 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22AF851B05; Thu, 30 Jun 2022 04:54:52 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25UAd4ae023725; Thu, 30 Jun 2022 11:54:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=y0ICbooO6ZnULmmiPkLxDZXQ7SEBVCNNquvW2a/RDpw=; b=dJyNjeYFHQBePCnbyOvglEPZBuD1cOI1+ciEJcPfWvdb4kX5SzEpg4ICiSja5aTYR3QB O8AZ5bdYEFwM5M7Trm6Ed9ugAmg/Cozvc8hTHEVY5BeG+wJLXzBv76Z1GgcnPJ24EyEd ksNL2FhDxEX/iQn0Q2XOzsGlmUd3d3vN2JhGayE1t14fpcqWmmvRJtOgL8k57obEd/Ya hBHbI+ihbG6XmtAcQOZiI+bLO7kYDT7W8RdL7qeWEuZWQ8jUo5loaTVc6C16tBC+Hj4W SKiUI+BkySrTMO5NehBsRwI55hcAAtyQkZ4+NkNG0h+sGPfbOg/sQBNh6BlUoyqKnX2U 4A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3h19qnjj0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jun 2022 11:54:13 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 25UBaJu4017926; Thu, 30 Jun 2022 11:54:13 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3h19qnjj06-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jun 2022 11:54:13 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25UBoo2w015598; Thu, 30 Jun 2022 11:54:11 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 3gwt0901uf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jun 2022 11:54:10 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25UBs8t921823828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Jun 2022 11:54:08 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D5434C040; Thu, 30 Jun 2022 11:54:08 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EBBC44C044; Thu, 30 Jun 2022 11:54:04 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com (unknown [9.211.82.30]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 30 Jun 2022 11:54:04 +0000 (GMT) Message-ID: Subject: Re: [PATCH v7] x86/kexec: Carry forward IMA measurement log on kexec From: Mimi Zohar To: Jonathan McDowell , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" , "H. Peter Anvin" , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , Baoquan He Cc: "linux-kernel@vger.kernel.org" , "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "kexec@lists.infradead.org" Date: Thu, 30 Jun 2022 07:54:02 -0400 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Gdetm-DrlqQvFJcIwmEVVE3eweFCrF-u X-Proofpoint-ORIG-GUID: NnhuNQTy9jYivibx86zBkACLu3kppZxv Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 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-30_07,2022-06-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 spamscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206300045 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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 Thu, 2022-06-30 at 08:36 +0000, Jonathan McDowell wrote: > On kexec file load, the Integrity Measurement Architecture (IMA) > subsystem may verify the IMA signature of the kernel and initramfs, and > measure it. The command line parameters passed to the kernel in the > kexec call may also be measured by IMA. > > A remote attestation service can verify a TPM quote based on the TPM > event log, the IMA measurement list and the TPM PCR data. This can > be achieved only if the IMA measurement log is carried over from the > current kernel to the next kernel across the kexec call. > > PowerPC and ARM64 both achieve this using device tree with a > "linux,ima-kexec-buffer" node. x86 platforms generally don't make use of > device tree, so use the setup_data mechanism to pass the IMA buffer to > the new kernel. > > (Mimi, Baoquan, I haven't included your reviewed-bys because this has > changed the section annotations to __init and Boris reasonably enough > wants to make sure IMA folk are happy before taking this update.) FYI, comments like this should be added before the patch changelog (after the '---' separator). > > Signed-off-by: Jonathan McDowell > Link: https://lore.kernel.org/r/YmKyvlF3my1yWTvK@noodles-fedora-PC23Y6EG Reviewed-by: Mimi Zohar # IMA function definitions