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 447DDC43334 for ; Mon, 25 Jul 2022 12:17:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233955AbiGYMRP (ORCPT ); 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> 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