Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3773486rdb; Thu, 14 Sep 2023 02:03:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwjDSwfYpPaXMPjx+gMf6MzHUH8RP/H3Ouutu82zbuSg+wiIQ7tsX5g9LMFHOj1vi6P2my X-Received: by 2002:a05:6808:140d:b0:3a7:a14:ba07 with SMTP id w13-20020a056808140d00b003a70a14ba07mr5778934oiv.7.1694682193505; Thu, 14 Sep 2023 02:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694682193; cv=none; d=google.com; s=arc-20160816; b=UW692S29Bkm10AH/WcMCZNn/m/YB0hYJByxsrt+fCi5VVcjshqlE3vyDYwuBnV/hOJ U709wxTqbobUaV6wrP6ti2K6jrx43A1hE6wPFvGSETDVkyzdcTqB7U1ONT9DZA+GOGx2 K4QEIE8A6lWQTENuhNBtBmCtOWNsRznhviRYDgzVlbZr3LT4Eoz4l4cj0SCbTDy1azqe Bv22f+o8+uIH4FqvObR8Csd8r6qAwFtCVY/7Y9VEEoDxNEdCDH6kj1hEJqVwJ6qtYDhL S3ZVHjGgmPijYik3ofsX/eQRas3a6zZlqh8DVFpsJU+SWmoZ2F0+WbNqhq/wed647eiz vd7A== 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; bh=aCx1+lIinsb7D7a7E4yK4FqQQtDmUEIjnXxWnBWSWZE=; fh=gr0ErjME2KHfiIWvEb2IXtyreOeLt7WVMe+oy0cuZe0=; b=k2YOswPlIwvCmsAuRKsuavwTpNBA3ZS6UjkUWQcb7h2+/e475zjRB1ws4Els9UG4fN qNc9xoHlZ8C3vPvib2SaerwmFxE35CAfPuVG5B7Umgr069iWJKkGyTBfww1XVnSh+9ds DVp+JsbGUDBZ6Yi5sOLhxXXHOmFf88dZI6CzQQiJ6WX8Jt6wKKqzjPLnJx3ZTPKzRZ2D J9gOHPv8fwOMzged2qAnF+cQGkbfponSY4DdozW8wjWW+1V/jUTkvKnu6+e5BlNl0aGv D2JKp3Y83KQT6NIxI2giwrz+UaOxrB3pdOtgu9dJ60snbWNkiLeL5vtUQeXx03fjlt1B mrog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y190-20020a638ac7000000b0056a55e0ccddsi1061281pgd.48.2023.09.14.02.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 02:03:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7F4BF81DFD5E; Thu, 14 Sep 2023 01:57:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236454AbjINI5D (ORCPT + 99 others); Thu, 14 Sep 2023 04:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236116AbjINI46 (ORCPT ); Thu, 14 Sep 2023 04:56:58 -0400 X-Greylist: delayed 475 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 14 Sep 2023 01:56:53 PDT Received: from gardel.0pointer.net (gardel.0pointer.net [85.214.157.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8331BEF; Thu, 14 Sep 2023 01:56:53 -0700 (PDT) Received: from gardel-login.0pointer.net (gardel-mail [IPv6:2a01:238:43ed:c300:10c3:bcf3:3266:da74]) by gardel.0pointer.net (Postfix) with ESMTP id 5DD2AE801F5; Thu, 14 Sep 2023 10:48:56 +0200 (CEST) Received: by gardel-login.0pointer.net (Postfix, from userid 1000) id 0FC7C160258; Thu, 14 Sep 2023 10:48:55 +0200 (CEST) Date: Thu, 14 Sep 2023 10:48:55 +0200 From: Lennart Poettering To: Jan Hendrik Farr Cc: Jarkko Sakkinen , linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org, tglx@linutronix.de, dhowells@redhat.com, vgoyal@redhat.com, keyrings@vger.kernel.org, akpm@linux-foundation.org, Baoquan He , bhelgaas@google.com, Luca Boccassi Subject: Re: [PATCH 0/1] x86/kexec: UKI support Message-ID: References: <20230909161851.223627-1-kernel@jfarr.cc> <1d974586-1bf7-42e8-9dae-e5e41a3dbc9f@app.fastmail.com> <9580df76-c143-4077-8a39-b1fcc0ed37bd@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9580df76-c143-4077-8a39-b1fcc0ed37bd@app.fastmail.com> 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 (agentk.vger.email [0.0.0.0]); Thu, 14 Sep 2023 01:57:20 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 agentk.vger.email On Di, 12.09.23 17:32, Jan Hendrik Farr (kernel@jfarr.cc) wrote: > >> The format itself is rather simple. It's just a PE file (as required > >> by the UEFI spec) that contains a small stub application in the .text, > >> .data, etc sections that is responsible for invoking the contained > >> kernel and initrd with the contained cmdline. The kernel image is > >> placed into a .kernel section, the initrd into a .initrd section, and > >> the cmdline into a .cmdline section in the PE executable. > > > > How does this interact with the existing EFI stub support in > > linux? > > It doesn't. During normal boot of a UKI the stub in it is used > (systemd-stub, see: > https://www.freedesktop.org/software/systemd/man/systemd-stub.html). The > kernel's own EFI stub will still be in the binary inside the .linux > section but not used. That's not true actually, if the inner kernel supports the EFI stub then systemd-stub actually defers to that for kernel execution. It's more portable that way, since the kernel then deals with the differences in the boot protocol on different architectures. Lennart -- Lennart Poettering, Berlin