Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1176636imk; Sun, 3 Jul 2022 19:40:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTqJeRMu5L0RVBCA4LeSH8kxL48mPOZ9d9ZogUOQPnJohySPsJYaraPenEjU2F2TUG8MMR X-Received: by 2002:a05:6402:2548:b0:437:62de:668 with SMTP id l8-20020a056402254800b0043762de0668mr35747455edb.143.1656902437757; Sun, 03 Jul 2022 19:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656902437; cv=none; d=google.com; s=arc-20160816; b=YOdeCiEGXan21gUEblYaOV10QQ8/skR8EVTS1lb2s5VjKmSDNehpl4iS6+BcmbY8FI SqjYA6aK6GSmWqCedgdHRffaNo6vdleCqWKCzvJOKqVzrrFkKP21G5jO5GR63d0JWDCE 3+x5b1YQRpKiPX/Vn0kcpMGacZrv7hs9WXXw7eA4YD7KitkoBVCLRL6VimuAkVQF0DGi RDm1Rjs61KIoDHiI5nom3YlilfozPRy4Ud2LC7XaGH91J424hAk/BOyiCMMr0UqBj94g FJmfHSAKuWXp5QhK6u2g6p666m9heTbRYaIS+bpbnSRkgZCGqlGUnM3eonL0ddTbYLLV LzWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=f1FJ6cqRuF8dBXv9KcZczCA6imIHUu41nOlrwT+WJ0s=; b=H2jBAFqOWHRwVZCWT+XyaYAcn77BstMmvdJ23Ion/dm99Ezx+KRDvixscKfbPHCVH9 iVPe9hYVbn/2+YNZ7UIWSNTupFG1hWd6sP1keQKX4DRkpNbKCVvUSC6aZU8AIrGU10p4 k5v/9EDSUX6qWqeAEbGRli8c8D5viE0ibXOhZIBh0ohfnZPjODwmRZ9AscHs5YLvuwr1 qoOMiikLAdJkBBcPbYMsktJPDEWu1dzDUybR9E03QJhkabi0pbv5g30NH85TxZYJ2H/w mCLXCKYHau6R2d2asNvyv90xm9kaIv2DW+sS8LAGs09qzUKybn4NWbRNxNaBvKNOfV/y ZUYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DumGiiXW; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a05640235c200b0043581fb3d83si15141586edc.279.2022.07.03.19.40.13; Sun, 03 Jul 2022 19:40:37 -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=@redhat.com header.s=mimecast20190719 header.b=DumGiiXW; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232204AbiGDCg3 (ORCPT + 99 others); Sun, 3 Jul 2022 22:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbiGDCg1 (ORCPT ); Sun, 3 Jul 2022 22:36:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3E8846561 for ; Sun, 3 Jul 2022 19:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656902186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=f1FJ6cqRuF8dBXv9KcZczCA6imIHUu41nOlrwT+WJ0s=; b=DumGiiXWuHxiJcxBICHtVo03K4sSvRrpuyOriDgaCVT32x/EMopRbGwa0tfEG0l2CbVzoY ktOCNzIXFoHstInzQcCKde8RORhTuzuLahbl2BuTdMJfariG1Afe58zvMfdzCUhx2m+/ZS SAVvv0j4U1XJNvR3uQ1DMfYpL9+LrCg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-513-FYcXjujqMAeLRZl34AbSJQ-1; Sun, 03 Jul 2022 22:36:22 -0400 X-MC-Unique: FYcXjujqMAeLRZl34AbSJQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1A3B485A581; Mon, 4 Jul 2022 02:36:22 +0000 (UTC) Received: from localhost (ovpn-13-121.pek2.redhat.com [10.72.13.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5646C1415308; Mon, 4 Jul 2022 02:36:19 +0000 (UTC) Date: Mon, 4 Jul 2022 10:36:16 +0800 From: Baoquan He To: Jonathan McDowell Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "x86@kernel.org" , "H. Peter Anvin" , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , "linux-kernel@vger.kernel.org" , "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "kexec@lists.infradead.org" Subject: Re: [PATCH v7] x86/kexec: Carry forward IMA measurement log on kexec Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,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 06/30/22 at 08:36am, 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.) > > Signed-off-by: Jonathan McDowell > Link: https://lore.kernel.org/r/YmKyvlF3my1yWTvK@noodles-fedora-PC23Y6EG LGTM, Reviewed-by: Baoquan He