Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2685558imi; Mon, 25 Jul 2022 05:36:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1voyNJN3ee2izIm09bD2PC7vls7fT9vWotANWv96ErKmOilCZ8MJrf8KTv5vRWVua9JNuKx X-Received: by 2002:a05:6402:278c:b0:43a:91cb:c43a with SMTP id b12-20020a056402278c00b0043a91cbc43amr13030667ede.188.1658752618953; Mon, 25 Jul 2022 05:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658752618; cv=none; d=google.com; s=arc-20160816; b=BgUh3e0gshD5oek0a90jmo3i4Z/wjlEiIR8j9zoU6FKwzjUOEtoDA8w4m6Z55mRU2g /PnZdAIFzS6Gyr85QWl/UbOE0vJgE19wBFLMOziRy0l9lWhKxNZH6+jpTJLx3Zebdj+N ch935bb3hH0Yunehv9ZP/3eS3ovgGetFusy20VAMhCHowZuQWaILVfpdPtbVsCoXrNvQ m2Jie9SmPO/1hmqBk46l6F1ds6MkhixTvM4IutI2hCjAEGi6LJoswcUS94uOaqhjBZgH BfX4Eo6U3zNQQGcK49rOm1V62NNUCQMOBxm24fWbjrfWqYNtitAVoVXYxqdSrHlh2imU XY9g== 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=bK/YvwfROKSRDyXQJn91Dl18uO1oeV6IpFanZCzkJ48=; b=OMClEmbAoWoJQ3aqZO5DYO7MWsunn+noLIPh3quMwtzdWf/Yn0jOj/OP+gMMzFEjnE 7lFIiAa5hJ/RDrgeoWOLTmAbNe2y8gwZXCKjMkFkCrcptxSJ9wJoCXHQlUGhgCv9S9tI fqxNT4dALPu01v4B5Nmoyxs9aq+S8IWRVh8VMGU9wNgnHcj4aokWAwufwve6d6xX9zN0 aAcPjJbAz9CYjRAyb7GYrc6RXGpXwNM0tGTtskoFOmy6aJDOPz1avu3KrYDmXASOyO/L d5OYl6PfE8+iNp7csxLXtZHpxnFZx+S3fWoFPMgFE+yyn4hj/TNBQC0U1O0Lqwiq8Ajs ynvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Pf51o4q1; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ee42-20020a056402292a00b0043a9c5ac052si11721779edb.375.2022.07.25.05.36.27; Mon, 25 Jul 2022 05:36:58 -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=@zx2c4.com header.s=20210105 header.b=Pf51o4q1; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233653AbiGYMRP (ORCPT + 99 others); Mon, 25 Jul 2022 08:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231722AbiGYMRO (ORCPT ); Mon, 25 Jul 2022 08:17:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE34E082 for ; Mon, 25 Jul 2022 05:17:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 094DB610A1 for ; Mon, 25 Jul 2022 12:17:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20A6CC385A2 for ; Mon, 25 Jul 2022 12:17:11 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Pf51o4q1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1658751430; 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=bK/YvwfROKSRDyXQJn91Dl18uO1oeV6IpFanZCzkJ48=; b=Pf51o4q1Uh/iiftNQePhKqqoEJ9ESfx4bX+X5oRmsSYN+R6LLEzw95S2mVEyjHgsJjTDE+ N9F3aslHjTXCpKxibGBe6bpVLkFHt5owDlSx+jChDey9mZSC7hYc1o4KOPkN83L7MjI+I8 /ebPnafUEwFMhft6PwjycP/03CFMqiU= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8a9d6e25 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 25 Jul 2022 12:17:10 +0000 (UTC) Date: Mon, 25 Jul 2022 14:15:00 +0200 From: "Jason A. Donenfeld" To: Albert Huang Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Eric Biederman , Masahiro Yamada , Michal Marek , Nick Desaulniers , "Kirill A. Shutemov" , Brijesh Singh , Michael Roth , Nathan Chancellor , Kuppuswamy Sathyanarayanan , Ard Biesheuvel , Peter Zijlstra , Sean Christopherson , Joerg Roedel , Mark Rutland , Kees Cook , linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 2/4] kexec: add CONFING_KEXEC_PURGATORY_SKIP_SIG Message-ID: References: <20220725083904.56552-1-huangjie.albert@bytedance.com> <20220725083904.56552-3-huangjie.albert@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220725083904.56552-3-huangjie.albert@bytedance.com> X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Hi Albert, On Mon, Jul 25, 2022 at 04:38:54PM +0800, Albert Huang wrote: > +config KEXEC_PURGATORY_SKIP_SIG > + bool "skip kexec purgatory signature verification" > + depends on ARCH_HAS_KEXEC_PURGATORY > + help > + this options makes the kexec purgatory do not signature verification > + which would get hundreds of milliseconds saved during kexec boot. If we can > + confirm that the data of each segment loaded by kexec will not change we may > + enable this option > + Some grammar nits here, but actually, wouldn't it be better to make this depend on some other signature things instead? Like if the parent kernel actually did a big signature computation, then maybe the purgatory step is needed, but if it didn't bother, then maybe you can skip it. This way, you don't need a compile-time option that might change some aspect of signature verification people might otherwise be relying on. Jason