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 424FF45040C for ; Fri, 31 Jul 2026 18:11:28 +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=1785521494; cv=none; b=h9V+ENGOjxsXkqaCwQ2xTZLL5uNxPs5Lf2WxRPCIr95CD+v9emDoJBNM57f3YfazI2eLmVU1Y7cPVL7pfS8bHNXhxvqTo9lne+wd1/Hh9yoli2vZTC+atR4w3MyAqVstRt8uPmzwepZbRAjYVBsgjabrk6Z9lgRjZvnmRBwPNi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785521494; c=relaxed/simple; bh=gM7Vv/TjXA7JqZfW2/mukI/FmHE1nmj/5TJ5GVFozkE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g3JNVEzAPR5BbK7MKrHZ1qzcz4dVt9HXqa9zQIqPItkWa9fEXA0BEf3lC61xGG/Wp5+1d2FYPPEuuhTetIPgHYslhNt7/RMbYPM0Yp12+s/1l+5u8m3N96J/5bgqt+U1iwBbT16YTGAx/72HQxb883Bz4/goeROPQ3xEhj8vmVY= 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=NpNsu0N7; 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="NpNsu0N7" 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-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description; bh=qgKGyimHWHWrS7GKqRrXGIY74zPdoBJNUqsWVCUzh6o=; b=NpNsu0N7Nk2pB2+SdDRWLmEnhq d3V0f55YufscXQEl5pXVlXrTfe6VEv5enoXClU+UvZLUheXpGmD0icDh6+RDW+6brJmY0ykZN491y A1xHIWBiR1s1YFIYbocN/mYdIbECKTcNF0K/c4B7iVtFc3dauPPx6tHdq6bXLAK6kA1TlIljgzzkK ok49T3dq8jmWghghVW4C7/rKanX1I8nIEW4Qtj5xQXKPOzthngAqG9SnnflegVRWO1cyR+3NKVDXd u5H1EXCl1XIlFPTevZbJOftj4jCor++oYXF+qJLTcNlVhI2a1hSQKp/sYypSR7HMx8S5fOEvdcA5U qVi2hIlA==; 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 1wprhK-00AD5R-2f; Fri, 31 Jul 2026 18:11:07 +0000 Date: Fri, 31 Jul 2026 11:11:01 -0700 From: Breno Leitao To: Pratyush Yadav Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Baoquan He , Pasha Tatashin , Miaohe Lin , Naoya Horiguchi , 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 Subject: Re: [PATCH v2] kexec: keep the next kernel off hardware-poisoned pages Message-ID: References: <20260730-kexec_posioned-v2-1-f92d18551f64@debian.org> <2vxzecgj6od4.fsf@kernel.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2vxzecgj6od4.fsf@kernel.org> X-Debian-User: leitao On Fri, Jul 31, 2026 at 07:49:27PM +0200, Pratyush Yadav wrote: > > + * return phys_addr_t, thus this "extra" parameter, instead of returning > > + * the hit. > > + */ > > +bool range_contains_hwpoison(phys_addr_t start, unsigned long size, > > + phys_addr_t *poison) > > Perhaps > > phys_addr_t range_last_hwpoison(phys_addr_t start, unsigned long size) ? > > And if no poisoned page lands here then a default of 0 or ~0UL? That was my initial preference, but hypothetically phys_addr_t 0 could be a poisoned page. I hadn't considered ~0UL as a sentinel — that should work and is a good suggestion. let me prototype. Thanks for the review. --breno