From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 9F5DB38B7AC for ; Thu, 9 Apr 2026 10:13:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775729637; cv=none; b=t7oAg0nJDw0NebEPi5b69JJXlDjooS72zgt1ZNTzgx6DqfWVUPAjqlTM6a68AMz36rXVDAkbU0F5uuU6om+7Q8bzqJcHN/oC/+Sh2gXB9RJqJWROt3IWa7UwZwK+iSNUCKvEeIyW0U4VveF2Z+r30grzG3GJBLJQjnRNniJZWK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775729637; c=relaxed/simple; bh=s+0ZAKRD5/y6JnmCpQ78pxulc0w9aiTaHiqaAI9/CN0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RgiiaofMUkLcujhBx8UL02wGCqJglfoF6isDQvLO/UD5yeaFP7b1421z5o/kyfu/xhhC7QEPXMa0SNDfWnWm76GH1qqBkhYlaF9msKuCVgl+XOQ+RGZMxJZR1paEXBC3rT86AJX2SKBQH5uJBaoDq5pL5/xCUMjLIDKwFRGvWMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=Os4bzlJi; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="Os4bzlJi" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FzWgWPTYOUXksm2yrkcRcT+jT0HPJKIhnfcAUSbpY+U=; b=Os4bzlJi9bj/d529D/CNPg2+mG 57BpudCqnG69DUWP3fHaIAFLnOgZi0lzTjI/xDZf1ptRBTLOHX4krCZjLPuKjaKRQIC/Mrq4pLT68 KB1dXUJDOYIswsUI51ySf+3kG1IaQuUe4F+mGKI0YunJQt76F/+xqpuC6ewFl9hwGnbXVQ62ceTWE vUkwxjaU5gX9mfD7gC8eVnjYubM5nz7NfokII2vTefdvU3ehednwVYgbwn3ATc0MH4DHuWZMEvVT0 8eF71tXDvzj7ZTfjtnZcYugLaKQ3aV8KiQabvi4Hwo/O7GeopnRZNn5AKZU2z6Z9+PuhAtbqFdx/U 5HHciUHg==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wAmOT-0097x9-2S; Thu, 09 Apr 2026 10:13:50 +0000 Date: Thu, 9 Apr 2026 03:13:43 -0700 From: Breno Leitao To: akpm@linux-foundation.org, mclapinski@google.com Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org, usamaarif642@gmail.com, SeongJae Park , kernel-team@meta.com, Alexander Graf , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , puranjay@kernel.org, asml.silence@gmail.com Subject: Re: [PATCH v8 5/6] kho: kexec-metadata: track previous kernel chain Message-ID: References: <20260309-kho-v8-0-c3abcf4ac750@debian.org> <20260309-kho-v8-5-c3abcf4ac750@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260309-kho-v8-5-c3abcf4ac750@debian.org> X-Debian-User: leitao Hello Andrew, On Mon, Mar 09, 2026 at 06:41:48AM -0700, Breno Leitao wrote: > diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c > index 1f22705d5d246..7bac80e9a29a4 100644 > --- a/kernel/liveupdate/kexec_handover.c > +++ b/kernel/liveupdate/kexec_handover.c > @@ -1441,6 +1512,10 @@ static __init int kho_init(void) > if (err) > goto err_free_fdt; > > + err = kho_kexec_metadata_init(fdt); > + if (err) > + goto err_free_fdt; > + > for (int i = 0; i < kho_scratch_cnt; i++) { > unsigned long base_pfn = PHYS_PFN(kho_scratch[i].addr); > unsigned long count = kho_scratch[i].size >> PAGE_SHIFT; I discovered an issue while testing this code on the current linux-next: the kho_kexec_metadata_init() call is now unreachable due to recent changes. My original patch was based on commit 5c9e55fecf93658 ("Add linux-next specific files for 20260312"), which included commit d7176a010afce8 ("kho: fix deferred init of kho scratch"). However, that commit has since been rebased/reworked in linux-next, and the code flow has changed. I'll send a follow-up patch to correct the placement. For reference, the intended code structure should be: static __init int kho_init(void) { .... err = kho_out_fdt_setup(); if (err) goto err_free_fdt; err = kho_kexec_metadata_init(fdt); if (err) goto err_free_fdt; Currently in linux-next, it looks like: err = kho_out_fdt_setup(); if (err) goto err_free_fdt; if (fdt) { | kho_in_debugfs_init(&kho_in.dbg, fdt); | -> This code was moved by d7176a010afce8, but, not anymore return 0; | } | err = kho_kexec_metadata_init(fdt); | -> This code is now unreachable if (err) goto err_free_fdt; I will send the fix for it soon, and we can carry on the discussion there. Thanks, --breno