From nobody Mon Feb 9 21:38:12 2026 Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 224E133E361 for ; Fri, 14 Nov 2025 15:54:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763135655; cv=none; b=IHnB6ZzeyN2ZffP+QBEPNgMV9ZtPpw/9fuIHqBjwT4S21gxkGWXSnCrDcAozroSOJIJ3fazlhocVvsWd0iNcwX3DC6jeTRCrUo1LF3n4EWPedyZqlRFlPXOi+xgvZh7ezp1mXNt3nef1LngciQZQdGpi+ST22lfOvv6Pt1+TlOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763135655; c=relaxed/simple; bh=08XpEG1Z1yZnpPGQkHDn9IqKAaN39aqRJTCdn+HQoAQ=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UE6QGAGBjngyJ7b/SwvpNf5QwPRmxMXqGMrC+aITChyL48uqJz/Nbqqvc8lV9FggJpzH7Bh4rVcHoHjzXAOnuSwRfiUgPuQQiZvdkLIkSOd4iyM3N2dyzrxTwxJoqiicyvvFtAOnDQqiLdRjR1Ziyr8Yk0EmAyoiocrZehlmerM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=WjK/KBQS; arc=none smtp.client-ip=209.85.128.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="WjK/KBQS" Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-78802ac22abso22154017b3.3 for ; Fri, 14 Nov 2025 07:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1763135653; x=1763740453; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jWYmoe6n/rjfMRyVwGOHWBt0L0ANxnxo2HoEY+1LNsc=; b=WjK/KBQSuSn3GE6VHshzLNpCh1z3DYeOoCDjZ2yj2HImKVlKQbrLYalOo9+jt38IJJ ZmUZ2xJVxYNg3yyf92IjFwxG3GTUi1IFtyGUHlaWEgKWHthGJpE5NNOhDq1U9vCDRv6O SdBlA0hDBYX7K8Grekm+uLENinZUFx9AqetJpg80eVreTA2hnVPWJ4ftDxKomwZGIc9f E9RXpXPruNb5HPpnYUagW53k9zrcECDC+EVq0fphcHffV32K5r/FKff7bqXG8PikywSH l52A28d5Yy9LkBKySx2GtXzpKV5LFpZjBwsaduAgL8gS6IEQkACc+rqafcW7qtuNG1e6 I6Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763135653; x=1763740453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jWYmoe6n/rjfMRyVwGOHWBt0L0ANxnxo2HoEY+1LNsc=; b=T6UBan5YbcUZRbi18C8hTs/yW5Kdk+dpBbbAN6Q0rOh2WzJLViSCbUcboWQbWcC1cg JIyezOhN/xbxqlRjof6hSkbaRgOxPwYTpAzHyGUbqj+IDrtGehyMyV096iP2MnJYMlRw OxipqZLdg8VCfHAhpRg5whOugDlIk24ihfV2W3hgyYXqtjTF5H0DxGEXjvAEySr6Zx0k HB50Y6bt2xu6qoBZe2wPN3fllKctgPLIJBRTq3D1C57uSTTD2ivfY1XjXHz3BXSVZOHf WQod1TjPxHtUTNALNrvX8gq0kcq2AoOU0s1L5C0Vt5fVUG+Nj4cbmtRge8oYQ2QUWuE+ qNTg== X-Forwarded-Encrypted: i=1; AJvYcCXmbzBVyYuJmy1MeM5vuH/cD3LQ2nxLVL9CIni635xummuSiIDOldUBXgaj3jYjp++dT/CehrAZHd5ta+A=@vger.kernel.org X-Gm-Message-State: AOJu0Yyn8q8X7MBoHuzbTb8PJ1Ne7lIoObX5lO/cRLILwGJjTmnGwohS IFVKJ6Sg02sY+gxs4bTd+VyXH6MERfMmZp6KZPKwBOMVv7ASX6werlxgX3hN9tDgTPM= X-Gm-Gg: ASbGncvVmsQmasjPKBBKEbvPhai4Ik96Wa21qhjzJ1HSuivV/jwjOKzK8Yzxv+WkSgq ztQhLA24zFhHU3nCP9gjrXH7CrKdbuszk/mdYbub8ZTSq/uX/P8QPvximLW2UUC/NpXA8/gIiLG OE196mVpxAEoqQdwxfAXx3sdgaEj4t2yHvsy3N6n29K2LXoYNZnac4zCskA/9gx/hjnS0RE9ez1 4UUk65BEU54NgTTMxFTabbnHxFqDIFlC1mgpZAmWDie9lLMBqTQ7Hj4wA5V5xBxKzxv+KYULRVs iwbDJc1fiEBMc/SOM+cc5DsvN/xyer9op7UL0O9W+evX8mm+DVTLzq7mdPEU58WVCn48DKjsiaD OaU4xCSz0R6D2jUs4TAaoENNZCQ+iSvAAqk/KKQmRYuaihWjZOC9H+LaQSUXAY7uSbux1DsgmLU vvTqKx9XJFPVxbrSOVsPfFyjM6Ja5OIkveH838XN/K2FqaDqmiFdMKlGTBQTq73Z4D1Pec X-Google-Smtp-Source: AGHT+IGJaOAJGksp5OzW6VIWGJ2oj2MfQScBcshD9izy6AP7xHUYC50lOdqdoRgMNZveVGy2Y0wOug== X-Received: by 2002:a05:690c:c047:b0:784:8994:297c with SMTP id 00721157ae682-78929e49844mr28762387b3.24.1763135653040; Fri, 14 Nov 2025 07:54:13 -0800 (PST) Received: from soleen.c.googlers.com.com (182.221.85.34.bc.googleusercontent.com. [34.85.221.182]) by smtp.gmail.com with ESMTPSA id 00721157ae682-78822125317sm16468577b3.37.2025.11.14.07.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 07:54:12 -0800 (PST) From: Pasha Tatashin To: akpm@linux-foundation.org, bhe@redhat.com, pasha.tatashin@soleen.com, rppt@kernel.org, jasonmiu@google.com, arnd@arndb.de, coxu@redhat.com, dave@vasilevsky.ca, ebiggers@google.com, graf@amazon.com, kees@kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org Subject: [PATCH v1 10/13] kho: Allow kexec load before KHO finalization Date: Fri, 14 Nov 2025 10:53:55 -0500 Message-ID: <20251114155358.2884014-11-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.52.0.rc1.455.g30608eb744-goog In-Reply-To: <20251114155358.2884014-1-pasha.tatashin@soleen.com> References: <20251114155358.2884014-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently, kho_fill_kimage() checks kho_out.finalized and returns early if KHO is not yet finalized. This enforces a strict ordering where userspace must finalize KHO *before* loading the kexec image. This is restrictive, as standard workflows often involve loading the target kernel early in the lifecycle and finalizing the state (FDT) only immediately before the reboot. Since the KHO FDT resides at a physical address allocated during boot (kho_init), its location is stable. We can attach this stable address to the kimage regardless of whether the content has been finalized yet. Relax the check to only require kho_enable, allowing kexec_file_load to proceed at any time. Signed-off-by: Pasha Tatashin Reviewed-by: Pratyush Yadav --- kernel/liveupdate/kexec_handover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_h= andover.c index 822da961d4c9..27ef20565a5f 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -1467,7 +1467,7 @@ int kho_fill_kimage(struct kimage *image) int err =3D 0; struct kexec_buf scratch; =20 - if (!kho_out.finalized) + if (!kho_enable) return 0; =20 image->kho.fdt =3D virt_to_phys(kho_out.fdt); --=20 2.52.0.rc1.455.g30608eb744-goog