From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C6C2C433EF for ; Thu, 16 Jun 2022 01:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350182AbiFPBu1 (ORCPT ); Wed, 15 Jun 2022 21:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350122AbiFPBuS (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.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC840580F4 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=1655344217; 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=jMvgI0vwYwJZqmZk5ChEEZ6iHe7CEXkLNaxZXBNZrPMnZ5zr4QU7NEC6uC6b/ppIyCkd7X vcyPYEwEGVsig9Y9eXKDBK+WLYIjjg2dBOtq2zE+smQFqSy8E49VFOU8pZrSz1SqLuBBaN 1FtndXpAN+civPuSV/GCnaABgwRNLto= 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-116-KEVSJ_1tOu2wm1ALhwrjMw-1; Wed, 15 Jun 2022 21:50:15 -0400 X-MC-Unique: KEVSJ_1tOu2wm1ALhwrjMw-1 Received: by mail-pg1-f198.google.com with SMTP id s205-20020a632cd6000000b003fdb97e6951so7347791pgs.7 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=rAWq2NIOXGdf2S9EVuKb/hpdk4uWWpLydUYssDj/EegKrpJAadijwFNnD1KJ7FKGo1 rFpP3ghi5TTaLFBg9aUzv2o/hR4lddNhyQgnVQWL64jgnI3ps/fZstIm3DuJ+okKRH8O T1g2/qljYSIUVjNJp/2ZuMwHUxkkGV9YVliUlhS14CGrYgVsBm3rzQY/qwwNYXvSXtoR W9OK0Y6gGyNpYLCgA8r2lgKHkBvCTOtHe0KOmb7j0zhab9lirXWWbidVeM07YDmDtVdI MGpRGbzuyDC28rWH63isoXPobByywrandAUx61VTtS8hrxgNm5cUd9qB3x0ZpGMgB0A1 P/VQ== X-Gm-Message-State: AJIora9kHHIoYou48ElcFK7wHdSoHOJs7aYQXQhKsDg4GdV4WEJplKFY W5RmOxeETFr7QFZ1IEDXPGgTTH7YSlMhnjJRxb1d5cbPWStLKzzFP+VT9C5X1HXPx9ciqGtTpLy MIURIVcT5x9yRX9iYZuI= X-Received: by 2002:a63:1e1d:0:b0:401:a251:767e with SMTP id e29-20020a631e1d000000b00401a251767emr2357336pge.26.1655344214526; Wed, 15 Jun 2022 18:50:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sEarbrrVxjiXB2Z4yglIOjHVgXmEDqqN6H9xo+0t/vhcHtsIxwYcmDDYcM0diomczP0LPViQ== 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> Precedence: bulk List-ID: X-Mailing-List: keyrings@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5CA7C433EF for ; Thu, 16 Jun 2022 01:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y4+KTjuDnXlzb4oddrWJpybBAXGcm9mB25G/KiXZi/4=; b=hmk5HOf7IRdHG+p/9jVyEv/7nD iRZckIShWZtKtPeKg/bG3FavwZs/LLxuxI2fjcrgf6UjGgr1hbt9kymL56YMK1XZn/RSIfTIy/HP7 CZOeJY7RSGAShJzyLbFCHXvzarc4yPutOkZ7IZuIvaN3Ao7Y39QRSQPZJg4vCGYKX4A3lHHYYoZ/o NCTq5ZHmcYWqldO/1Hb/j3D8KYHRzHUT/VnebDIYBP4FKdPUYXUZ0KH049/N3pPixvRWB7Rxrh9B2 StjYdpZICkMsiM8dSImXvUX4TjNOBpJcioFkiQs0TAzVxIq2v4VH3yWSG8hpwpGsLNhLmNSax1ouA Y2ndljAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1eeb-00HRp4-Q8; Thu, 16 Jun 2022 01:50:37 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1eeJ-00HRh8-Mm for kexec@lists.infradead.org; Thu, 16 Jun 2022 01:50:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655344218; 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=KYlM+mZEb0CuzIF1s6N6ZJ4SpeJBjb7iwjGbkDs7Cf1MM0oG0g8j9lTsf+klLDxOHfbXze frvzMTI2Kqj05i9kHMAs+6KbtJVQ6erqXkP6S0pyR1pzTmZCFTFr3DEqcq/sW1NNyScNHa EhTcmXxqaHDpcTIa0PSyLa7y4qUvXKA= 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-339-tAi4_T39NeK6KEZPxLHBNw-1; Wed, 15 Jun 2022 21:50:15 -0400 X-MC-Unique: tAi4_T39NeK6KEZPxLHBNw-1 Received: by mail-pg1-f198.google.com with SMTP id h190-20020a636cc7000000b003fd5d5452cfso7336721pgc.8 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=yqZfjuTJDP5yohRXxNlva6nXmRYqkQzYGmTtoHttQ/00U4d3hQ7f7smJtZcpfWNGfR 57DDO29iMSOJYSkfDI/6dGNg2hmCQ7MwiVZfAaTAwujzQW413+/abZRceRE3My+SrDSB p98nfANT6QqT0wes6/Ab/5hGFzhHVRxjwucPwQwBZ0YdkrALTrKmgjp0wHT++VNoKSVQ awRTJOckSe2dnr1uUuuZ13vAQtiYbyzNtq9ltFUO+T5iECYljXJJZhMBKGsc4TUGQ+cd Lqx8uCsDXH2QShEYEcAl4hEDwsuoN/my6R4kOUUqXEhaXMVGZww5FbS/eCchZiAJO370 Pj4w== X-Gm-Message-State: AJIora979zaN4xL+a3c17JWQ1BT05IqnSiEmj780RE6VlmRAWv6EXzxV c3nWBs2AVvkx5UmDwu5ygbklEgHP9a2wiXhOYYPgA2VXwE1A1O4MXKve43K2pdQZD1DS8jSmnd3 SRRTNolxUf4tAIBjQC4Pi X-Received: by 2002:a63:1e1d:0:b0:401:a251:767e with SMTP id e29-20020a631e1d000000b00401a251767emr2357348pge.26.1655344214529; Wed, 15 Jun 2022 18:50:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sEarbrrVxjiXB2Z4yglIOjHVgXmEDqqN6H9xo+0t/vhcHtsIxwYcmDDYcM0diomczP0LPViQ== 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 In-Reply-To: <20220519171134.GN163591@kunlun.suse.cz> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=coxu@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_185020_769434_3469083E X-CRM114-Status: GOOD ( 18.55 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.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 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2856C433EF for ; Thu, 16 Jun 2022 01:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i040evYDz9/kCLGIMmJR3Y32Ct7pNT7sNVmbHJk0gUg=; b=eOqLubSyt+K3R6VZvVd3HZnS+9 r6x7FdoGvuGcN7YmqIJ3+ljaXo2VOMUewjws77PiGk82iXmlMEkvG+JfpyHVjT9WH8ZlrwteC0sHS kJoHGYfuvNB69dbyaGo7Q5kqYEsbspNIXPsc0K7eLhEknnyQYFygo3EJusYaB3fV1aJQOMaCxzswM Uj0qTvPrjfVkj91a6yP3INpzabZMK2NipRYZYHdj/PCmAH1Skdr9PHi0tyeOmLkvm1SdmbmE+QFVU TEeN/DCLBbiYgNxTX8bwRBRdA4auS2G7PB+d7TkJvO11hNqh857JlLjwxdiPdPHdhxE/NnMinDklx NE2ZGBjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1eeT-00HRku-1F; Thu, 16 Jun 2022 01:50:29 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1eeI-00HRgV-68 for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2022 01:50:19 +0000 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-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-339-zDZ-2FyFNnSvT5QIIvJ19A-1; Wed, 15 Jun 2022 21:50:15 -0400 X-MC-Unique: zDZ-2FyFNnSvT5QIIvJ19A-1 Received: by mail-pg1-f200.google.com with SMTP id y63-20020a638a42000000b003fd47b6f280so7332659pgd.12 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=zUNIJ4m8X4aUu2DT4aWaVohvvziKXRtMvoLivABxei292Nj6tgZGVLijljhZal+ol+ +NQx1w/iyNm7t5E9+liTxfVvBYd2DYK5dhOPhBsWItQx6HfMZ4kGQPCB/GRmdY1bZp0N w6SWnKcEL7wn7SJW6LNwN/fdtccjnJiVfmNcRmqsFQANjzhDPltsWrVRxWtsL8bMpg9r urCgRH/0wZeLfLvGH1YSuys0ewaOkRwYDROibzcKIGYB8eZl0kZ0BtPaCH1YjfD1faz0 eSgMJ46+zDxR2mMZFNsRez2zC81ZOrueQfx+Lz4D2IGmF7MyCOlZ+oAZkNJiHhcFBj2j hGhg== X-Gm-Message-State: AJIora+b2ZGSZHG2dBWDYEuELBHvZj1KYA/P4USwFEa/UlefETxsO1oV 7ZI+n6tUQS+Yt1ObLj1pUzgpkV635DziAg1UffP054aXqByocIR6V01L/3tiZ72kDbIYNRhNqiB fojSWfwq0/Xw+h6MbwkIUDN+CXtFHoj29FSU= X-Received: by 2002:a63:1e1d:0:b0:401:a251:767e with SMTP id e29-20020a631e1d000000b00401a251767emr2357351pge.26.1655344214530; Wed, 15 Jun 2022 18:50:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sEarbrrVxjiXB2Z4yglIOjHVgXmEDqqN6H9xo+0t/vhcHtsIxwYcmDDYcM0diomczP0LPViQ== 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 In-Reply-To: <20220519171134.GN163591@kunlun.suse.cz> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=coxu@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_185018_339375_A69B6A69 X-CRM114-Status: GOOD ( 19.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel