From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 650A933E374 for ; Fri, 14 Nov 2025 17:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763141438; cv=none; b=Lu9miGMBSWDTECUsZQ1nH373LHB+kTdcnpXcyWqhUq36wTgenrfu3P4tH2ppmJsDkBtvTlQTqzaE5K9le4ymQbUoOmkxt0B0nIck+qpMDg86T2kO3fDoS8IGwwFBp2B8afXb7WyGe+/bDFd7idK9V7wbyuU9yy2tMEQwZ8Ohn6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763141438; c=relaxed/simple; bh=9zJM61pEY/RyS31C8d8lddjHkoR9XcjIF+H2kqS6aoM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rW1+AifmT3EGZtxcTDWgP276ecR0TuqUaoxPK7dOHLxLxrFrLMTpAYH/a6MV5AX88zPH2yKv5fcouA1KhiHuj9FvxjTDcIvA/rZDn/E2VeCbsmKwE5IGE/0u6yFJNvKa6TkuYBNl2bKqeUaEKaYOog2FWMfOJfWVa3QptZsJtEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M+xmio9Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M+xmio9Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A7BFC4CEF5; Fri, 14 Nov 2025 17:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763141437; bh=9zJM61pEY/RyS31C8d8lddjHkoR9XcjIF+H2kqS6aoM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=M+xmio9ZvLQQd4tOIMuM4bh1qihQHHKp/4ETopDOztabprihCxZChC5JczUq9nZ0B 23AFwn+qdcRhKQoXL3AWMaov3UlhBZxA1dX/ebuVXm1GPp6tyZye54Ipa/PPO57vqO PCU4ziQPWSL3HRcXdMSoGku5ChEqCo5PQWfGEJCBbZdyZkd8tEKy1MK8CMayC3IS7b neffwZhHhYqjnU8m16l2qfyuzmI7m1DY1px4/WxeYUd3MTKdYPussKaSgptgnzd733 1R9IjHosNiWp2eYcV/lJsKN/gzvxg5Y4KJOdPE+aXmX7aomi2u0Pbf9qeD9VRyNGzC PT3BN+diQgj+w== From: Pratyush Yadav To: Pasha Tatashin Cc: akpm@linux-foundation.org, bhe@redhat.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: Re: [PATCH v1 10/13] kho: Allow kexec load before KHO finalization In-Reply-To: <20251114155358.2884014-11-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Fri, 14 Nov 2025 10:53:55 -0500") References: <20251114155358.2884014-1-pasha.tatashin@soleen.com> <20251114155358.2884014-11-pasha.tatashin@soleen.com> Date: Fri, 14 Nov 2025 18:30:34 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Nov 14 2025, Pasha Tatashin wrote: > 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 [...] -- Regards, Pratyush Yadav