From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 413773164A9 for ; Fri, 26 Jun 2026 04:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782447004; cv=none; b=W1kFke9JTmn7nYJ4VO0iGMTV9Jho/D8DnQHkgFLjhITXk/8QLxvDWo/v2BepeCDOwEEBu1hAG+oBJC95gYwi/ulOUJEpdTWykC8D267yH13zljeJL5//PXPGORz3pn6AcxYDWPP+p6i/dY7B8F7HRC4cjp0AGD+CMJ1GgcTBL0g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782447004; c=relaxed/simple; bh=SpHSZj0Ie9PxHEQt8oq6IEyx1BGJwCxxpYw55kH+XHo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Z0y1FwcqXTYY0cf5nbX8esQ3RpGe9aP8DS43hXPAjL66IFtfORzwVounufTi2HUqk9hS5KDaRxml10h5LuZIS3RTRS37U2oIdW0Gllexqx2WGg7CAVQJEG8qxaRQoltIqobUbhxdXa2cXmMNZuoUV07hdEwgVJsztmseVk0sdfw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=sfpK7nGw; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="sfpK7nGw" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E9BF228C7; Thu, 25 Jun 2026 21:09:57 -0700 (PDT) Received: from [10.164.148.34] (MacBook-Pro.blr.arm.com [10.164.148.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E7E163FAF5; Thu, 25 Jun 2026 21:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782447002; bh=SpHSZj0Ie9PxHEQt8oq6IEyx1BGJwCxxpYw55kH+XHo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sfpK7nGwqkPkcur6fGaPSDbMmnwqt421AW/1JpY5wKA9mVVaay6yqy2BHH6fBrJUU 0zE3vzqv5nOm3H5wn7UVnDZTY2oCF8gpb1NhhOkBDhDES35oT7GKocOTIYih2WVNeA lxNdKs+UzECOSWnJsqAI2pfHdgw9HGvT4qI4L6GU= Message-ID: <24c8b1af-73e2-4c32-8e68-fc230dbcb25c@arm.com> Date: Fri, 26 Jun 2026 09:39:49 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/5] Fix incorrect access of hugetlb pte entries To: Zi Yan , muchun.song@linux.dev, osalvador@suse.de, akpm@linux-foundation.org, ljs@kernel.org, david@kernel.org, liam@infradead.org Cc: 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, rcampbell@nvidia.com, apopple@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, mel@csn.ul.ie, nao.horiguchi@gmail.com, ak@linux.intel.com, j-nomura@ce.jp.nec.com, pfalcato@suse.de, dave.hansen@intel.com, tglx@kernel.org, jpoimboe@kernel.org, ryan.roberts@arm.com, anshuman.khandual@arm.com References: <20260625112955.3254283-1-dev.jain@arm.com> Content-Language: en-US From: Dev Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/06/26 7:29 pm, Zi Yan wrote: > On Thu Jun 25, 2026 at 7:29 AM EDT, Dev Jain wrote: >> There are various places which use ptep_get() to get the pte entry >> corresponding to a hugetlb folio. Some arches have special handling > > I think it is better to mention s390 as a concrete example. Sure. In case there is no v2, requesting Andrew to change "Some arches have special handling" to "Some arches like s390 have special handling". > >> to compute the pteval, so they provide huge_ptep_get(). Use this >> helper consistently. >> >> Dev Jain (5): >> mm/rmap: use huge_ptep_get() in try_to_unmap_one() >> mm/rmap: use huge_ptep_get() in try_to_migrate_one() >> mm/migrate: use huge_ptep_get() in remove_migration_pte() >> mm/page_vma_mapped: use huge_ptep_get() for hugetlb >> mm/mprotect: use huge_ptep_get() for hugetlb >> >> include/linux/hugetlb.h | 3 +++ >> mm/migrate.c | 6 +++++- >> mm/mprotect.c | 8 +++++++- >> mm/page_vma_mapped.c | 8 +++++++- >> mm/rmap.c | 32 ++++++++++++++++++++------------ >> 5 files changed, 42 insertions(+), 15 deletions(-) > > > >