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 90359CCA473 for ; Thu, 16 Jun 2022 01:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350420AbiFPBuZ (ORCPT ); Wed, 15 Jun 2022 21:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350246AbiFPBuS (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 19C3C580F7 for ; Wed, 15 Jun 2022 18:50:18 -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-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-120-zAK7ZzKGMDqnJCTM5YCYWA-1; Wed, 15 Jun 2022 21:50:15 -0400 X-MC-Unique: zAK7ZzKGMDqnJCTM5YCYWA-1 Received: by mail-pg1-f199.google.com with SMTP id 15-20020a63020f000000b003fca9ebc5cbso7328812pgc.22 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=Qvm+BNjTrmqZ7x9GBbEXuds25Umj5ory3tezwemBYdQH4tE2wRDHutJuAsTfq+X6yS s/ZPAYBnoyJ13fypWLNTLhi4a6rUj0TBZOnm+bCHXPtdDslLOI+cef+1PnqrKijuqmwa EzXAb88FdmhC2HKdE1hyiFnhP/Nw2nzCA9IevDw6KIkXByHMkWZefIm8dYSWuows/dP4 auy4AfGE44r21khtSNBUyte93cz1lKXJnFJHNYs1ig0C4v0BYyZkbxcXw4RPO3iN6NtE RJGf8AReSNKAW3BGJKfiogHBU//wj02hxFVdnKB3lcNL68GP8mfc5pz/XHirCEeyNVM7 aQlQ== X-Gm-Message-State: AJIora9yPsS7wgkFQcMOzNwtXxtvTWCDzMCifhKvEloQv30T4BRwPQUY jog5JbmalhMcZKxGZsra/RbeD6WjUcs8nKUNVD3ZzXNnjpCgkGDj5UudoM5FJ/IwL8zejrQuPQ8 2ZMaic2zs4GvdK5G55kCWqA== X-Received: by 2002:a63:1e1d:0:b0:401:a251:767e with SMTP id e29-20020a631e1d000000b00401a251767emr2357354pge.26.1655344214531; 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: linux-s390@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