From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796126904; b=hQftWiIDLc6RnSUq1IvlQSmCPgpT72JdfvBSAnR3+jS+coIJnA5kvZguiq3jjEDZaGYr 2uwob3eBTBFskRefMqSp1yChHXOPyNeMM1Ij10XQMEsOG1ByUI/HtG0ll4JexNuVw+wXy TMh+NwgdpBfRwY/1WtfAapCniiw2LIgBREA2+1uXENRgfHLXJGQ2uM8f5HdxKiue2W3l2 QNHJs00PcmC7xmtYzZyuo5MD5c8reT82bRpd4h4naIMWQ4L+cnUbLlISylsBCcUGdsyID X3FPFp4PydVQkoBjqFsL2lEwp5RYUV3ZQb8D4JQvbi5TeLeUZ3DD+GNAo8tFVmgLWOg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126904; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Content-Type:Mime-Version:Subject:From: In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References: To:X-Mailer; bh=zy+4PjrXvRTqWIqMEZPOsz7oh/L2kVsxrKmhHT+L2FA=; b=OHMWyExq6b+K5YhINeqE8eB5edAfliodNe2YHlN4dVxeiygkL1tiJ6jgk38S4Qye9Tdf sTMyVwLPO6E3XIL71DFtVfP9hBISSN6elEwZN8Y2LgcKJGJSIrsRQvs70N6ft1Hyv9quD jJFWngU0soxu5LPytqdybpfWYzeWtXhO0Nueu0mnpmVmgY8k2PEy4n1d1W3sasqrbv/tQ DX6v4XetPEGnpbf97+CJwqKOfg/RGnuTaCLDU12iSuBvG1Ve2Vx0L6BwskudNvf3da2wi M05b7GrG6eFq1MPWDmXbl4tZaeQa8b2Zcys4M5Yp1XIZKIHon16F7XYecu5ZN6fJf2Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Tpv5ZSfT; arc=none smtp.remote-ip=91.218.175.50 Received: from mta0.migadu.com (out-50.mta0.migadu.com [91.218.175.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32B16606A325 for ; Tue, 1 Dec 2026 12:08:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 32B16606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Tpv5ZSfT X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=zy+4PjrXvRTqWIqMEZPOsz7oh/L2kVsxrKmhHT+L2FA=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796126901; v=1; x=1796731701; b=Tpv5ZSfTQYfVgumL4fropECrh1I8TvKIPvG83eytKXHvuYrpgccq9Pnjr4+TMFBjQxN2Sn4P TRFoMBRoPOgPLc1zfT71wbUeiVpY2JpFYwhZarTrixAV68pTRgt8yeLTBsot3J4POSMcbokXaPV 1yzpb/2aPy44S8EGtqPR3vNo= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 4524d661c07dba2b; Tue, 01 Dec 2026 12:08:20 +0000 X-Mizu-Trace-ID: 4524d661c07dba2b X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset=us-ascii X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\)) Subject: Re: [PATCH 07/21] hugetlbfs: don't zero poisoned pages in a hole punch From: Muchun Song In-Reply-To: <20261125-hugetlb_fixes_2-v1-7-db27fd2f71a8@kernel.org> Date: Tue, 1 Dec 2026 20:07:46 +0800 Cc: Muchun Song , Oscar Salvador , Andrew Morton , Jinmeng Zhou , Hongfu Li , Andrea Arcangeli , Mike Kravetz , Naoya Horiguchi , Hugh Dickins , Baolin Wang , Dave Airlie , Vivek Kasireddy , Gerd Hoffmann , Mike Rapoport , Mel Gorman , Dave McCracken , Andy Whitcroft , Adam Litke , Lorenzo Stoakes , Rik van Riel , "Liam R. Howlett" , Vlastimil Babka , Harry Yoo , Jann Horn , Lance Yang , James Houghton , Yang Shi , Suren Baghdasaryan , Shakeel Butt , Pedro Falcato , Gregory Price , Zi Yan , Joshua Hahn , Rakie Kim , Ying Huang , Matthew Brost , Byungchul Park , Alistair Popple , Wanpeng Li , Andi Kleen , Kenneth W Chen , Hugh Dickins , Michal Hocko , David Rientjes , Joern Engel , Jonathan Corbet , Shuah Khan , Randy Dunlap , Michal Hocko , "Aneesh Kumar K.V" , KAMEZAWA Hiroyuki , "Kirill A. Shutemov" , Sasha Levin , Guillaume Morin , Wanpeng Li , linux-mm@kvack.org, Jason Gunthorpe , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , linux-doc@vger.kernel.org, stable@vger.kernel.org, Chris Mason Content-Transfer-Encoding: quoted-printable Message-Id: <97F45CC1-8AAC-44F6-8EB2-33BA4822FF20@linux.dev> References: <20261125-hugetlb_fixes_2-v1-0-db27fd2f71a8@kernel.org> <20261125-hugetlb_fixes_2-v1-7-db27fd2f71a8@kernel.org> To: "David Hildenbrand (Arm)" X-Mailer: Apple Mail (2.3901.200.71.1.16) > On Nov 26, 2026, at 06:33, David Hildenbrand (Arm) = wrote: >=20 > Since commit 8625147cafaa ("hugetlbfs: don't delete error page from > pagecache"), a poisoned hugetlb folio stays in the page cache, and we > must not access its poisoned pages. >=20 > However, hugetlbfs_zero_partial_page() zeroes the partial folio of an > unaligned hole punch without checking for poison, which can cause > issues like machine-checks. >=20 > Let's fix it by simply not zeroing poisoned folios. We don't really = care > about their content: the folio can no longer be mapped, and read() = only > returns data up to the first poisoned page. >=20 > Only zeroing the pages that are not poisoned would need more thought, = as > we cannot reliably identify the poisoned pages; that is future work. >=20 > Note that a folio that gets poisoned concurrently, after we checked = it, > can still be zeroed, and sync'ing with memory failure handling is also > left as future work. >=20 > This has low urgency, as it requires a hole punch on a poisoned folio. >=20 > Fixes: 8625147cafaa ("hugetlbfs: don't delete error page from = pagecache") > Cc: > Reported-by: Chris Mason > Signed-off-by: David Hildenbrand (Arm) Reviewed-by: Muchun Song (ByteDance) Thanks.