From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 AE578125AA for ; Sat, 4 Jul 2026 02:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783133136; cv=none; b=RQsb4/yfoY2+pqo8pvxctTQhKp+jqSLUX0APsvlAANNPV028C/2ylBSnDpiI3QgYxjrw7KnlJ7lTU+sH0E31qD9uMSM5E5lfLLdEf3PcNFJLH4GP0C+MFts1bPrNam4MzcmNtDc3oThUiqstYII2Kox4FKtI+twHzaSr9r8TD2g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783133136; c=relaxed/simple; bh=WqonFV7bjnqVXMcdhLtm8/HTIUbK1zFVwxuknNkA4QU=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=BCgHp74iQF8fqobpBFM6mzWq55XbRu7yNzmL7suXz3I5b3aGvEXaEtWIOlWignfhnKExAgge0DtzVSRahMJLNc/D0qKcBapTDfnaLZsG2PwoXHahtvFD07w4PDKLtUOh7OZP1Mc6P2SaDyLQZ/ZF2cx5b1JxywuggH9H3dgVPoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=mswa1nkq; arc=none smtp.client-ip=91.218.175.182 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) header.d=linux.dev header.i=@linux.dev header.b="mswa1nkq" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783133132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WqonFV7bjnqVXMcdhLtm8/HTIUbK1zFVwxuknNkA4QU=; b=mswa1nkqFQ9QtW9ww/AdCHgZCDLOSfbp5ZssYIQod1f/1WXquwt1AqR9FlNcbAM/qByYWC WDeKoy6TZu+m5xdVk3qMyxSAIX//ii+S0Ykra0/6NZBU3aK0O9n0LuIUzYcARqr7E/+b1Y xBXBaea+LO3bZ0it+TyRYp/BD2E/NAc= Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH v3 2/6] mm/rmap: use huge_ptep_get() in try_to_unmap_one() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20260703114202.365553-3-dev.jain@arm.com> Date: Sat, 4 Jul 2026 10:44:39 +0800 Cc: osalvador@suse.de, akpm@linux-foundation.org, ljs@kernel.org, david@kernel.org, liam@infradead.org, riel@surriel.com, vbabka@kernel.org, harry@kernel.org, jannh@google.com, lance.yang@linux.dev, kas@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, apopple@nvidia.com, rcampbell@nvidia.com, ziy@nvidia.com, matthew.brost@intel.com, joshua.hahnjy@gmail.com, rakie.kim@sk.com, byungchul@sk.com, gourry@gourry.net, ying.huang@linux.alibaba.com, ak@linux.intel.com, nao.horiguchi@gmail.com, mel@csn.ul.ie, j-nomura@ce.jp.nec.com, pfalcato@suse.de, tglx@kernel.org, dave.hansen@intel.com, jpoimboe@kernel.org, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, ryan.roberts@arm.com, anshuman.khandual@arm.com, stable@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20260703114202.365553-1-dev.jain@arm.com> <20260703114202.365553-3-dev.jain@arm.com> To: Dev Jain X-Migadu-Flow: FLOW_OUT > On Jul 3, 2026, at 19:41, Dev Jain wrote: >=20 > try_to_unmap_one() handles hugetlb folios when memory failure needs > to replace a poisoned hugetlb mapping with a hwpoison entry. In that > case page_vma_mapped_walk() returns the pte pointer to the hugetlb = folio > in pvmw.pte, but the code reads it with ptep_get(). >=20 > On arches which provide their own huge_ptep_get() to dereference a = huge > pte pointer, accessing via ptep_get() would cause pte_pfn(), = pte_present() > etc to misbehave. >=20 > It is not clear whether this has a trivially visible effect to = userspace. >=20 > Just use huge_ptep_get() for dereferencing a huge pte pointer. >=20 > Fixes: c7ab0d2fdc84 ("mm: convert try_to_unmap_one() to use = page_vma_mapped_walk()") > Cc: stable@vger.kernel.org > Reported-by: David Hildenbrand > Signed-off-by: Dev Jain Reviewed-by: Muchun Song Thanks.