Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp9067ioo; Fri, 20 May 2022 12:26:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6h1uXZgDV+O82ae0mKIp1xFq9KOCv1R/Vfr6fsHH71RfLKfTQz0yzFqmFWFvLkDaeUp5Y X-Received: by 2002:a17:907:3fa4:b0:6fe:b83b:d667 with SMTP id hr36-20020a1709073fa400b006feb83bd667mr1409329ejc.481.1653074814714; Fri, 20 May 2022 12:26:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653074814; cv=none; d=google.com; s=arc-20160816; b=YHQmv8tw3AJLnq5x9zBjNzEbvz1H17bZjleHOpKouem0eucghASK7s2PHGhTa4zZ1i omXSCM1Lxi4vKwckIoHFVq0UimsUx/GHmqgrG8/VPru+bflmGOxApqLoZeWHgRMr0wPE 42+08LuqSvMMUldTYor6AArarJM3AQJgQOQGS+tVxGWDLA0OXRuB4TT1iXSJHdYCMgNI XZOjdGwBr832pZLLe+RXouPp8kA0nq1rMBkuLFaDtPhAc/yAvtVB88Qq9pBp0Oj2Rw+O AaxwywhDx/mPan1vMPq7VXQOka9aObSfDqWvJe/5zy48iMqya3XvGSBFmqcS3WgDebov I40Q== 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=8QmPbRB1QFxv/pF4z1RFQhVilnkWaoFyXeE0F38Hzf4=; b=R5VD/07KHF/6jLi7JvLRJSQQus4lo0nwgJtXWqiWepnFNlmv46qcZ4pYIPzcgM8eIZ V0/QMKNxnImW50VTIGoIuV7AiySF3EhYpUwtCX/a3r1LQ3Q82EusUT/ZyGT7u9vpkEk0 bnKU2hteDvw3ASz/nZqqHUMmDQItab0zu5lwf0X7xVDDuEVNDCYYQFYpu7CUhQPAzD8t Ln26fpxEoUZvFwmE3kRQvKxKt9JJvk5cqWziCFX1ihBeZuRHHk4zUvrEuru+VKe3gUT/ PLcpItKmN033TEdF0PRpVsvs4HNg5r/0zVge1L07P6EvFEwG0RDztl2s2WHqHN9YMVd2 Mxnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AH9e5RLD; 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 hp8-20020a1709073e0800b006e8793c1c88si10650544ejc.238.2022.05.20.12.26.26; Fri, 20 May 2022 12:26:54 -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=AH9e5RLD; 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 S239562AbiESOWa (ORCPT + 99 others); Thu, 19 May 2022 10:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239484AbiESOW1 (ORCPT ); Thu, 19 May 2022 10:22:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E7BEF73795 for ; Thu, 19 May 2022 07:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652970146; 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=8QmPbRB1QFxv/pF4z1RFQhVilnkWaoFyXeE0F38Hzf4=; b=AH9e5RLDqdWOZA2961jTtLnIoOOtqxXTlYkuDIOwwzcUzAzLeoLVq/D3HbstO8BB3F2k2X +UlSILuJcPkBAYtq1RGfgdvvnnS+1wGHxonDw4aeyz9HtbaeFBw53WJU8MPI1/MKDbsgSc gttQQ7Ky/U8YXz2jNSj1lq3AStE8ymw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-yprCcXR-NICTCUXaCRUCMQ-1; Thu, 19 May 2022 10:22:21 -0400 X-MC-Unique: yprCcXR-NICTCUXaCRUCMQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5157F397968A; Thu, 19 May 2022 14:22:20 +0000 (UTC) Received: from localhost (ovpn-13-136.pek2.redhat.com [10.72.13.136]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CFF21121314; Thu, 19 May 2022 14:22:19 +0000 (UTC) Date: Thu, 19 May 2022 22:22:15 +0800 From: Baoquan He To: Mimi Zohar , Coiby Xu Cc: Heiko Carstens , akpm@linux-foundation.org, kexec@lists.infradead.org, keyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michal Suchanek , Dave Young , Will Deacon , "Eric W . Biederman" , Chun-Yi Lee , stable@vger.kernel.org, Philipp Rudo , linux-security-module@vger.kernel.org, Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Martin Schwidefsky , "open list:S390" , open list , linux-integrity , Jarkko Sakkinen Subject: Re: [PATCH v8 4/4] kexec, KEYS, s390: Make use of built-in and secondary keyring for signature verification Message-ID: References: <20220512070123.29486-1-coxu@redhat.com> <20220512070123.29486-5-coxu@redhat.com> <20220519003902.GE156677@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-3.3 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=unavailable 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 05/19/22 at 07:56am, Mimi Zohar wrote: > [Cc'ing Jarkko, linux-integrity] > > On Thu, 2022-05-19 at 08:39 +0800, Baoquan He wrote: > > On 05/18/22 at 01:29pm, Heiko Carstens wrote: > > > On Thu, May 12, 2022 at 03:01:23PM +0800, Coiby Xu wrote: > > > > From: Michal Suchanek > > > > > > > > commit e23a8020ce4e ("s390/kexec_file: Signature verification prototype") > > > > adds support for KEXEC_SIG verification with keys from platform keyring > > > > but the built-in keys and secondary keyring are not used. > > > > > > > > Add support for the built-in keys and secondary keyring as x86 does. > > > > > > > > Fixes: e23a8020ce4e ("s390/kexec_file: Signature verification prototype") > > > > Cc: stable@vger.kernel.org > > > > Cc: Philipp Rudo > > > > Cc: kexec@lists.infradead.org > > > > Cc: keyrings@vger.kernel.org > > > > Cc: linux-security-module@vger.kernel.org > > > > Signed-off-by: Michal Suchanek > > > > Reviewed-by: "Lee, Chun-Yi" > > > > Acked-by: Baoquan He > > > > Signed-off-by: Coiby Xu > > > > --- > > > > arch/s390/kernel/machine_kexec_file.c | 18 +++++++++++++----- > > > > 1 file changed, 13 insertions(+), 5 deletions(-) > > > > > > As far as I can tell this doesn't have any dependency to the other > > > patches in this series, so should I pick this up for the s390 tree, or > > > how will this go upstream? > > > > Thanks, Heiko. > > > > I want to ask Mimi if this can be taken into KEYS-ENCRYPTED tree. > > Otherwise I will ask Andrew to help pick this whole series. > > > > Surely, this patch 4 can be taken into s390 seperately since it's > > independent, both looks good. > > KEYS-ENCRYTPED is a type of key, unrelated to using the .platform, > .builtin, .machine, or .secondary keyrings. One of the main reasons > for this patch set is to use the new ".machine" keyring, which, if > enabled, is linked to the "secondary" keyring. However, the only > reference to the ".machine" keyring is in the cover letter, not any of > the patch descriptions. Since this is the basis for the system's > integrity, this seems like a pretty big omission. > > From patch 2/4: > "The code in bzImage64_verify_sig makes use of system keyrings > including > .buitin_trusted_keys, .secondary_trusted_keys and .platform keyring to > verify signed kernel image as PE file..." > > From patch 3/4: > "This patch allows to verify arm64 kernel image signature using not > only > .builtin_trusted_keys but also .platform and .secondary_trusted_keys > keyring." > > From patch 4/4: > "... with keys from platform keyring but the built-in keys and > secondary keyring are not used." > > This patch set could probably go through KEYS/KEYRINGS_INTEGRITY, but > it's kind of late to be asking. Has it been in linux-next? Should I > assume this patch set has been fully tested or can we get some "tags"? Right, it should be KEYS/KEYRINGS_INTEGRITY related, I made mistaken. Now it got two ACKs from Michal and me. Michal met the same issue on arm64 and posted another series of patches, finally Coiby integrated Michal's patch and his to make this patchset. That would be great if this can get reviewing from experts on key/keyring. Surely, Coiby need update the patch log to add the '.machine' keyring into patch logs as you pointed out. IIRC, Coiby has tested it on x86_64/arm64, not sure if he took test on s390. No, this hasn't been in linux-next.