Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3869571rdb; Thu, 14 Sep 2023 05:26:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFp/lA75ZOEMW6emz2ozTCV90v5yIVll7oGwhlObkPdW7UcJ/b3Mvr6k11TeBnAySIwgvP X-Received: by 2002:a05:6358:9494:b0:127:f2fb:d103 with SMTP id i20-20020a056358949400b00127f2fbd103mr6895215rwb.16.1694694384748; Thu, 14 Sep 2023 05:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694694384; cv=none; d=google.com; s=arc-20160816; b=ie/usYISDqDUeEHs7nNl3FQJAI0TThTsF46QXhwDb/ycGMTtgcDhcdnDFyqulf2u3+ odq9Gly354QRmSLdurJbifvRVRq/21aiyB/BZx3b4qfaQ3bJI/u/0pddq9EOvV4KQpov YXaQctALMWXWoPijqZZkhK5JuS/BWPMXjIDK/zyAcpOtY7kCyVFIt2k6KSs7YL99Exha QrhqLQC3vSlAcI0otuuPymgu4+If8+nr5ZCdhJ3vgJb/2TXr1LH7zb1Mz3Agdog2qQXK OTa5vIESAGKb+3mbtFqdTGmFNLLzTQ2L0VC8DaxLhgDmupvcFgEy50ESlcSKf/0XPY1Z NEMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=uwlERtgcIl0boGXES+0Lt7l/GYtqRgkvwlIpXYuTrm8=; fh=x+D95cQF1dMy5eM3d5XRfkqvNakV6pQPKYyJKC8cgBU=; b=oYw8WdievSoJ+dH5HE25/vk/WywYQnl2PonaV/jGNGFdhiJC/65CqdY1hK+n9lMyts yWxvppCHZwF1wCN36C5RXmvez+1RBIhlJ0V9+4Ocu84M/VKRiQDbFZNjo8ylgZI+a7Bs xp9jdcHUP6bj/IQ0Ophi/HJA8stX9X79e267TRg8vv7QHgvuk1XP+0P1wO3BFgVqxOY0 QiQ45o9g/mFkPU0Qyw3BIWhQhCmjTauEGst54z3Ikf1dhTuM8ughXz4OENW8gBPigaNV lFl7zA6SKFHpkSSioz+qeu0omRCWJk4s3Blj5Gf/wisJsIC5DRkNr+G2sVXmMSbXNIpT D5eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YMGgoK0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id m186-20020a6326c3000000b0056da0ae25desi1397101pgm.246.2023.09.14.05.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 05:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YMGgoK0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D3A188366EF7; Thu, 14 Sep 2023 05:26:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236701AbjINM0U (ORCPT + 99 others); Thu, 14 Sep 2023 08:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233171AbjINM0T (ORCPT ); Thu, 14 Sep 2023 08:26:19 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0C81FC8; Thu, 14 Sep 2023 05:26:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A3A2C433C8; Thu, 14 Sep 2023 12:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694694375; bh=uwlERtgcIl0boGXES+0Lt7l/GYtqRgkvwlIpXYuTrm8=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=YMGgoK0vFJEZoIZLtjMUT/xcAi3HPriqpw9cgkjwNFEh6vBAofPrJ8v0/yo0uOC7i XWHuPDy/xbSvaK8C6WgylQQPRgD11XSQZOPvPV2nyKDynKecvnmcmvICbUgC0GSl0b olHpjVrfOBE+v/pzfg6/Fpt/BDA2ydU1f2W6xVJYWNrEhFYN+N8SluW9NSyfFRJ4hw WdL+XNAlkrdZWstCts+UpCRGFritbMLgy3VClfw5T7vB1QsUN/VefDbGATVrz3dAfT fNb3B4xndSvJUymSfj8S/H4Se7SG+Jxtq46MQqTUsm3QitAbhVnl4NYIwGpPEIHCCA Ul/gVfgqDt2nA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 14 Sep 2023 15:26:10 +0300 Message-Id: Cc: "Jan Hendrik Farr" , , , , , , , , , , , Subject: Re: [PATCH v2 0/2] x86/kexec: UKI Support From: "Jarkko Sakkinen" To: "Lennart Poettering" , "Philipp Rudo" X-Mailer: aerc 0.14.0 References: <20230911052535.335770-1-kernel@jfarr.cc> <20230913160045.40d377f9@rotkaeppchen> In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 05:26:22 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 groat.vger.email On Thu Sep 14, 2023 at 12:32 PM EEST, Lennart Poettering wrote: > On Mi, 13.09.23 16:00, Philipp Rudo (prudo@redhat.com) wrote: > > > For example there are two definitions for the UKI which contradict each= other. > > The dedicated one [1] you have cited earlier and the one in the BLS for= type #2 > > entries [2]. In [1] the .linux and .initrd sections are mandatory and t= he > > .osrel and .cmdline sections are optional while in [2] it is the other = way > > round. Which definition should the kernel follow? > > > > Furthermore, I absolutely don't understand how the spec should be read.= All > > the spec does is defining some file formats. There is no word about whi= ch > > component in the boot chain is supposed to handle them and what exactly= this > > component is supposed to do with it. But that is crucial if we want to = add UKI > > support for kexec as the kexec systemcall will replace the stub. So we = need to > > know what tasks the stub is supposed to perform. Currently this is only= some > > implementation detail of the systemd-stub [3] that can change any momen= t and I > > strongly oppose to base any uapi on it. > > > > In the end the only benefit this series brings is to extend the signatu= re > > checking on the whole UKI except of just the kernel image. Everything e= lse can > > also be done in user space. Compared to the problems described above th= is is a > > very small gain for me. > > > > Until the spec got fixed I don't see a chance to add UKI support for ke= xec. > > So that spec is initially just a generalization of what > systemd-stub/systemd-boot/ukify does. The descrepancies between the > cited specs mostly come from the that generalization. If you want to > enumerate kernels and order them the ".osrel" stuff for example is > necessary, hence the boot loader spec really wants it. If you don't > care about the boot loader spec though and just want to register the > kernel UKI PE directly in BootXXX efi vars for example, then there's > no need to include .osrel. That all said we should certainly make the > two specs align better, and clarify the situation. Suggestions/patches > more than welcome. > > Ultimately, I think a spec written as description with a single > implementation in mind (i.e. systemd) is a generally a bad spec. Hence > if kexec in the Linux kernel wants to add support for it, that'd be > great but I'd see that as an opportunity to adjust the spec to the > needs of the Linux kernel in this area, so that it reflects well more > than just one backend implementation. > > Hence, seeing the spec as set in stone and as inherently low quality > is the wrong way to see it I am sure. Instead, the goal here is to > adjust the spec to make it work really nicely for *both* systemd and > the kernel. Bringing better backing story [1] would also help the spec. Immeditaly when there's some reflection surface, also the possible faults it the spec become more apparent. Also this makes spec refinement less boring, which can be boring and tedious if you write it isolated by yourself or in a small group :-) I need to check if I could with some effort extend my current testing environment for UKI [2]. Need to study this better at some point. > Lennart > > -- > Lennart Poettering, Berlin [1] https://social.kernel.org/notice/AZklKOsIYBZXDL9Bya [2] https://github.com/jarkkojs/buildroot-tpmdd/compare/master...linux-6.5.= y BR, JKarkko