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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B094ACA0EF5 for ; Tue, 19 Aug 2025 01:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UM+lYf01AicvqurdDG2Jr1YwEDdRKP6fs9j6fHwup1A=; b=zJbQj7nCw7G/B840i8qjbulF8O EOs7n5KmLWY5fEZvEdhJHVOt1sPinvruBCWRadoNaTS853hp6S004BAeRL94FPc9xkgmP1RgqZfXv B+SK+PZjpy+Et/+12blNQKPHRN5L1SIB7busD1pcabRHtqqE98e8UifChwIanDACuOouUVYtbzQVc Qo7HNfw7KbSCuxTZAegUZl8hxIsN5DW6lUxQqenFtIiWwaT1yqQK5Buvb4FW2Dc1XWIriu8wWoXBH KK67RbeG58BNpN9FXcDoy56K5hDPCYgpA7SaoTyjqLKAGJpYXseXWHZ2eR+L6UMhAls4paNyvl7Yy hLL4BKtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uoBAt-0000000960f-2Mfk; Tue, 19 Aug 2025 01:30:07 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uoB8C-000000095SS-2fSX for linux-arm-kernel@lists.infradead.org; Tue, 19 Aug 2025 01:27:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755566839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UM+lYf01AicvqurdDG2Jr1YwEDdRKP6fs9j6fHwup1A=; b=J+HzxW5uOlynEHFB64ZlrGwSxdQf0QawKi4taCfXlXhtOCXuJ6p6v00Sqv3gMBfeK0bB2/ R2JMzhRuWnzauoCzXj80viwFhVzZjy0uCBwaJ8swrU19Ctk54MzT+ipwp/zuipB7UoZ990 vZce0dHwnf0RG+6ztuJhsXejPY7Lyr0= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-2CIwWAB6OYKEEW0ssTjPDg-1; Mon, 18 Aug 2025 21:27:15 -0400 X-MC-Unique: 2CIwWAB6OYKEEW0ssTjPDg-1 X-Mimecast-MFC-AGG-ID: 2CIwWAB6OYKEEW0ssTjPDg_1755566832 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C37CD19373D8; Tue, 19 Aug 2025 01:27:12 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.36]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1EF81180028A; Tue, 19 Aug 2025 01:27:00 +0000 (UTC) From: Pingfan Liu To: linux-arm-kernel@lists.infradead.org Cc: Pingfan Liu , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , Jeremy Linton , Catalin Marinas , Will Deacon , Ard Biesheuvel , Simon Horman , Gerd Hoffmann , Vitaly Kuznetsov , Philipp Rudo , Viktor Malik , Jan Hendrik Farr , Baoquan He , Dave Young , Andrew Morton , kexec@lists.infradead.org, bpf@vger.kernel.org, systemd-devel@lists.freedesktop.org Subject: [PATCHv5 10/12] arm64/kexec: Add PE image format support Date: Tue, 19 Aug 2025 09:24:26 +0800 Message-ID: <20250819012428.6217-11-piliu@redhat.com> In-Reply-To: <20250819012428.6217-1-piliu@redhat.com> References: <20250819012428.6217-1-piliu@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250818_182720_773247_A5D6090E X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now everything is ready for kexec PE image parser. Select it on arm64 for zboot and UKI image support. Signed-off-by: Pingfan Liu Acked-by: Catalin Marinas Cc: Will Deacon To: linux-arm-kernel@lists.infradead.org --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/kexec.h | 1 + arch/arm64/kernel/machine_kexec_file.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e9bbfacc35a64..97d9595a5ee86 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1608,6 +1608,7 @@ config ARCH_SELECTS_KEXEC_FILE def_bool y depends on KEXEC_FILE select HAVE_IMA_KEXEC if IMA + select KEXEC_PE_IMAGE config ARCH_SUPPORTS_KEXEC_SIG def_bool y diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h index 4d9cc7a76d9ca..d50796bd2f1e6 100644 --- a/arch/arm64/include/asm/kexec.h +++ b/arch/arm64/include/asm/kexec.h @@ -120,6 +120,7 @@ struct kimage_arch { #ifdef CONFIG_KEXEC_FILE extern const struct kexec_file_ops kexec_image_ops; +extern const struct kexec_file_ops kexec_pe_image_ops; int arch_kimage_file_post_load_cleanup(struct kimage *image); #define arch_kimage_file_post_load_cleanup arch_kimage_file_post_load_cleanup diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c index af1ca875c52ce..7c544c385a9ab 100644 --- a/arch/arm64/kernel/machine_kexec_file.c +++ b/arch/arm64/kernel/machine_kexec_file.c @@ -24,6 +24,9 @@ const struct kexec_file_ops * const kexec_file_loaders[] = { &kexec_image_ops, +#ifdef CONFIG_KEXEC_PE_IMAGE + &kexec_pe_image_ops, +#endif NULL }; -- 2.49.0