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 BF64A3BB44 for ; Sun, 11 Jan 2026 00:28:44 +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=1768091324; cv=none; b=nguwizCtcUzGBaDKSThfLQeUn/m7xNhG4XEgSu+RAQeYNoy23OmaDTNkIc0iqT5tFh8E03AKbaHxlERTZ3EBhlmXs6oWrVCrRoXjsZaRh+eXT0Ljbxf7mynJEmay0iZFlFhiQObGZYYc2+Es5HDvyX4WLFUTuvzaitXGxncIhfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768091324; c=relaxed/simple; bh=MOScAOAfndrqdtTOZduWfCA2cVTB83JchOtZuxyo5fM=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=rgOfgzIaK+BoMf/mu9IYZrCrGLm6XK1/HG4RqKZxaZIauBL34wyrUEd+Kw74bXj0dG01z3maMY85+P3lo7Lb+yjuD2v7gc/SgzX0o9GXQ+3PWC9Rp3W5R4Luq8uDWYVLWSzEu6hiQWsD2dC1r2owFCyfwfFAtnCuAkeKqngNd/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=CpjTXcE3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="CpjTXcE3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E054DC4CEF1; Sun, 11 Jan 2026 00:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1768091324; bh=MOScAOAfndrqdtTOZduWfCA2cVTB83JchOtZuxyo5fM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CpjTXcE3G/BfnjwGI+AlE5LJjHCT5gEInJ20H9uD2UP8SpQN+3xUghnmNVsLAyGJ0 GwbhCaddbPfDXRJIyQepD15l4iKgpc7/e1+jJJdbDQqhC8n/n4a7YEym3hVFQfm4lJ vDrZYulVe+w1R/BuAaxiGCeCLDJgGOESbBkytWns= Date: Sat, 10 Jan 2026 16:28:43 -0800 From: Andrew Morton To: ranxiaokai627@163.com Cc: graf@amazon.com, rppt@kernel.org, pasha.tatashin@soleen.com, pratyush@kernel.org, surenb@google.com, kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ran.xiaokai@zte.com.cn Subject: Re: [PATCH] kho: init alloc tags when restoring pages from reserved memory Message-Id: <20260110162843.ecd8e731bdc281f4cd8e4764@linux-foundation.org> In-Reply-To: <20260109104251.157767-1-ranxiaokai627@163.com> References: <20260109104251.157767-1-ranxiaokai627@163.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 9 Jan 2026 10:42:51 +0000 ranxiaokai627@163.com wrote: > From: Ran Xiaokai > > Memblock pages (including reserved memory) should have their allocation > tags initialized to CODETAG_EMPTY via clear_page_tag_ref() before being > released to the page allocator. When kho restores pages through > kho_restore_page(), missing this call causes mismatched > allocation/deallocation tracking and warning message: > alloc_tag was not set. > > Add missing clear_page_tag_ref() annotation in kho_restore_page() to > fix this. Great, thanks. It would be helpful to quote that warning message in the patch changelog, please. > --- a/kernel/liveupdate/kexec_handover.c > +++ b/kernel/liveupdate/kexec_handover.c > @@ -268,6 +268,7 @@ static struct page *kho_restore_page(phys_addr_t phys, bool is_folio) > else > kho_init_pages(page, nr_pages); > > + clear_page_tag_ref(page); > adjust_managed_page_count(page, nr_pages); > return page; > } Warning splats are pretty bad and it's desirable to fix this in previous kernel versions. To do that it's best for us to identify which kernel version(s) should be patched, via a Fixes: tag in the changelog. >From a quick look, it appears that Pratyush's 12b9a2c05d1b ("kho: initialize tail pages for higher order folios properly") is a suitable anchor, what do people think? Meanwhile I'll queue this up for some testing while awaiting maintainer feedback.