Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1029503iog; Wed, 15 Jun 2022 18:52:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vW9L+S4wyE0NGvREJ0MR8trwDZwYdvRLf5lWK6Scsdaozf8GVtve0HZ1IQcF9ihIQMREix X-Received: by 2002:a05:6a00:23c2:b0:51b:c431:65bf with SMTP id g2-20020a056a0023c200b0051bc43165bfmr2518392pfc.20.1655344354738; Wed, 15 Jun 2022 18:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655344354; cv=none; d=google.com; s=arc-20160816; b=fe2dvVEmnUy08GsT9OdsxJVjYgWXVtkSJ4vXWq3Y01SliLd8n+JN2vCuUklzA3zVBa +Oc05+97MgCwdcAY0MHVSMi/F8vDTOjSvrYBxNdJh9GqaQrETt4fMORf3U8/mz2FYg2D LYkq9VIW5MaI0VTm6UOCKREmkvugSa1IN9nTNnVtGBtrilo4epPHIYzoyWwYWR4JoDvJ GX9C8m6D0UuEwOVSzyJ1rF8z7Qm2hU04/urdhdUt8qPh2WGXSSAHeQw7FB0m70945oOJ f2B6a8Dp4l/xkB8DkTbhMQZZ42aNnmAemDArHmNZQIQu2g63jLMhlEwlinFdXh0UXKqO SbCQ== 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=Mfnj3kbt/mcFDC8cZyL7mlTMEbSGwlIrcY0mmV2SXko=; b=0rIo8eyB7qLhL8N/x1iWjmOK0mJOzTsJKvCrRQwv485ycM91/rykWGLFixYp2asH6X eHqkpNlHV64AbeG9S56k1aWIbakXx0MXDdYaYBtaFdczzmDk9/B5eft/wXrsTXZcJZwP u5MbCjX1ZHe5Mvz8D8D8y0T2HKjfHNcRHJqKR8cBLgoukyJ/qpP2oRa/BhBmCakC4F9d +vM8APoOssPitMVDNfMsrzwoE2YaJZYXcj6G73Xhj2ZQkLctLGAM5dBUAeNP841pvMRY eigegvoChNNPZIKCV5OfNU0sMO3wkKNQjma0BAAPQUfs/qbv/lIO9iF4kLz33qt2C0kp LodA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OX4zT2Hu; 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 b4-20020a170902d50400b00168fbb6678csi924626plg.621.2022.06.15.18.52.21; Wed, 15 Jun 2022 18:52:34 -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=OX4zT2Hu; 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 S1350686AbiFPBug (ORCPT + 99 others); Wed, 15 Jun 2022 21:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349950AbiFPBuS (ORCPT ); Wed, 15 Jun 2022 21:50:18 -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 BE9F1580D5 for ; Wed, 15 Jun 2022 18:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655344216; 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=Mfnj3kbt/mcFDC8cZyL7mlTMEbSGwlIrcY0mmV2SXko=; b=OX4zT2HuN9E+iW/XfQd9sPvcgw2HUPtTcSZk6xjX8vtxt0RHLxRnTlNu3I7wYb/kOk9+Gb Do2fwcHgvbLIDREIUGxAvt3Ort+n0MXBfKK7zYTxRD0Rp6tqPKWQsp7tx2qmWnE5RVfE/g GJF2yCD39CdAiBSbO8IhwDJt/BIfZw0= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-303-rYwB9WjhPzKQDIOawgGkjw-1; Wed, 15 Jun 2022 21:50:15 -0400 X-MC-Unique: rYwB9WjhPzKQDIOawgGkjw-1 Received: by mail-pg1-f198.google.com with SMTP id 37-20020a630a25000000b003fdcbe1ffc8so7345737pgk.11 for ; Wed, 15 Jun 2022 18:50:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Mfnj3kbt/mcFDC8cZyL7mlTMEbSGwlIrcY0mmV2SXko=; b=Zn8JmL2VggyrueCMTUnCRzaEdusH1cOIPon7j8TzwWGDUdmm/sVddvJaZOmjiD5A71 Ibvohif5gvWKngxiBgiWv4pkzbZlx/d1ulMKNLfQcwi2ZVb5tnwS9zlFxKqIuL9ogws4 AxDwgvONGo96s3N9MMU8rjoefGtZmdjY50E/jbM5Df/5j3fTtl1Ok11AQfB/A3E8xfN9 01s+O3g8FV9jXXxzycjnEMgsfzRqNErZGFeoI55mq3wiwgMVF2cm1tGwmhHXaboXLB6R 3a5uviCGwpeUF+r1/cQrqaVE7lIFTlIH75vUMY9lfOQTXis0o2jgcs4NaTpxrChr0odx gRJg== X-Gm-Message-State: AJIora9ZmFA/0s+6U6fMrBM2QqX7o0Fz7pSLR69fzWVSKbXfXBPEEiPw 6Uke4YMmb1kMK/7gym3cLEgSBbkaYesXlT5o3xGJE+yce/1leb4DZMjmx7vZWSHdiyBSDyL0Kwm uzcbDTadjBFRHMyb5OmM8SLn4 X-Received: by 2002:a63:1e1d:0:b0:401:a251:767e with SMTP id e29-20020a631e1d000000b00401a251767emr2357339pge.26.1655344214527; Wed, 15 Jun 2022 18:50:14 -0700 (PDT) X-Received: by 2002:a63:1e1d:0:b0:401:a251:767e with SMTP id e29-20020a631e1d000000b00401a251767emr2357317pge.26.1655344214223; Wed, 15 Jun 2022 18:50:14 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id k16-20020a17090aaa1000b001e3351cb7fbsm2464671pjq.28.2022.06.15.18.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 18:50:13 -0700 (PDT) Date: Thu, 16 Jun 2022 09:46:50 +0800 From: Coiby Xu To: Mimi Zohar Cc: Baoquan He , Michal =?utf-8?B?U3VjaMOhbmVr?= , Heiko Carstens , akpm@linux-foundation.org, kexec@lists.infradead.org, keyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 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: <20220616014650.wd6saed72breqeyb@Rk> References: <20220512070123.29486-1-coxu@redhat.com> <20220512070123.29486-5-coxu@redhat.com> <20220519003902.GE156677@MiWiFi-R3L-srv> <20220519171134.GN163591@kunlun.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20220519171134.GN163591@kunlun.suse.cz> 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_NONE, 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 Hi Mimi, >> > >> > 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"? >> [...] >> >> 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. For arm64, recently I did a new round of test and the patches works as expected, 1. Build 5.19.0-rc2 2. generate keys and add them to .secondary_trusted_keys, MOK, UEFI db; 3. sign different kernel images with different keys including keys from .builtin_trusted_key, .secondary_trusted_keys keyring, UEFI db key and MOK key 4. Without lockdown, all kernel images can be kexec'ed; with lockdown enabled, only the kernel image signed by the key from .builtin_trusted_key can be kexec'ed Then I build a new kernel with the patches applied and confirm all kernel images can be kexec'ed. > >I used the s390 code on powerpc and there it did not work because the >built-in key was needed to verify the kernel. > >I did not really run this on s390, only ported the fix I needed on >powerpc back to s390. For 390, I commented out the code that skips signature verification when secure boot is not enabled since I couldn't find a machine that supports secure boot and confirm before applying the patch, kernel images signed by keys from .builtin_trusted_key, .secondary_trusted_keys couldn't be kexec'ed when lockdown is enabled; after applying the patch, those kernel images could be kexec'ed. > >Thanks > >Michal > -- Best regards, Coiby