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 35E1A283CAF for ; Wed, 29 Jul 2026 10:17:52 +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=1785320273; cv=none; b=Y7m1PID3cBFxEtoEtLZVT+bjoO03qcDnG+ZGLnOPz7J3jx4UAMvUGOn3lDWMLM64EOL67DR2gGmdJyFsnz7nJMm96ZwC9ZrMIhtD1eILBU7TDaQ3VxuPUdzIpwAzP4XCfAiE0ADJsSXylw1M9Dk6n0gMJkjBLxE64/jd9n+Q0kM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785320273; c=relaxed/simple; bh=SwnqZpSSrADj+8uBilN4PZuYII5tGddz9M9DpurTQtw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=owGhXM1AWy1XxmrWvQSWt90mmcvW/catI0jc5wx1f2SHpMPbEz+MeDpEcBXbxXQ4dPuIDdFwALFTjVPougSYMvb+UGWmOrGmBRqgz2IBzF8Bfyxk/KSJP4rtv8MMs44CwDD92a7mZBE/vj1AMqfagQEFLfa4m1mhFdO7gFFpVxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=Z6ePZNkp; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass 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="Z6ePZNkp" 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=4zFAPc+21MITv4dd8ElNkkULP/O/tRrJgt9WcudjgGI=; b=Z6ePZNkpTROPEHa8pGFfMtqFxK eSOION+l8gFyYqMBw9nHA1xm4vq0Cz7xUpPyRa9afGxlLDBnvcsW0GQjTqeYVDHCQkDAjg2xGG6QI yfsxRYTyO/DuD9whEFTxX8FgN4ScH4mpD++Y/jcF04k2aiaFLruOO12wCbR1LTBGhcbz+rr8EVO4M nt98u9Jlq+cNZlpXqEnOH/I1pK+uutwvoX2VMKyrZ/SbiIEcJiCEaLPkM5k1hINZzIeh6/fw8Fhfz 7KXask+L9LjalX+pBDnUzV/fg9XX0jG03MsKHPDNu5p9YFCd3yRd7UOlgzEjL2c/cgRB8rtVUjlqp ncqY0D0Q==; 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 1wp1M1-008NdZ-0X; Wed, 29 Jul 2026 10:17:37 +0000 Date: Wed, 29 Jul 2026 03:17:31 -0700 From: Breno Leitao To: Miaohe Lin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, rmikey@meta.com, riel@surriel.com, kernel-team@meta.com, Kiryl Shutsemau , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Baoquan He , Pasha Tatashin , Pratyush Yadav , Naoya Horiguchi Subject: Re: [PATCH] kexec: keep the next kernel off hardware-poisoned pages Message-ID: References: <20260728-kexec_posioned-v1-1-160c81d180fe@debian.org> <16c18549-c9a1-ba55-91b8-52d9368ebbc0@huawei.com> 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: <16c18549-c9a1-ba55-91b8-52d9368ebbc0@huawei.com> X-Debian-User: leitao On Wed, Jul 29, 2026 at 05:33:17PM +0800, Miaohe Lin wrote: > > + if (pfn_valid(pfn) && PageHWPoison(pfn_to_page(pfn))) > > Should we use pfn_to_online_page here? I doubt we might meet the same problem > in [1] if pfn_to_page is used here. Good catch, thanks -- yes. An offlined but not removed block is still pfn_valid() while its struct page is uninitialized, so PageHWPoison() on it hits VM_BUG_ON_PAGE(PagePoisoned(page)), the same failure as commit d613f53c83ec ("mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory") fixes. I'll switch to pfn_to_online_page() in v2: for (pfn = PHYS_PFN(start); pfn <= end_pfn; pfn++) { struct page *page = pfn_to_online_page(pfn); if (page && PageHWPoison(page)) return true; } Thanks for the review. --breno