From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E8BAF38F933 for ; Fri, 17 Apr 2026 13:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776433025; cv=none; b=PBMzER7TqthN8f+2IVHN7pRiiwjBcbg+0IC59VUE3WMSnltCwxYEWXFDjIo3K9qtOya1Qow4OaS0wrxSQCwCyyfS16KQKQ2rHfDQnpAvF6NW4lNMnPzDsFjINtBTKifZOzaObr9S+l0qE4LEvMKDftWzoYpWNKogU2PK42DZlgc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776433025; c=relaxed/simple; bh=bLtdG6vevXUfno77DQCP6rd4j5CNBbChyvGTd2cZBb8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RxcYbg/kPH5EmuYd6vzIG7h8mrBzLgYFw2/3LZTbvn/Gn7aJ4+teLAg2Ilcx0M35t9sNZTlKhKaI8XDs5KHhd1gmniVrWc/LzH3uaR2ypwTM+G8TE2IoCnVyHBMzzvWqAmNlIZ/VVOzicTaieuBOzJXT8MKPb+BAhrswesPA3kc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WWtBNl6z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WWtBNl6z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D23ABC19425; Fri, 17 Apr 2026 13:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776433024; bh=bLtdG6vevXUfno77DQCP6rd4j5CNBbChyvGTd2cZBb8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WWtBNl6zz4PCRKe1EfzhRc1ltfJAaguYJh2j5+vbHMsP15TfqYUbyrHVChpj2mPYh tzHjLWzKf4qGmLe0DVlJW5GcP15g3vMPXOr5acwCXIMrh9L23yxr26Bq5MYA5qM9/u rP5Ks+3mdYPDOu8HO2McAJr/sgHCToiFxYjQZG5pOQt4Qt7sx/efo5WY59wYunlxZz VSGgEWw3O0HPKZScaeVBH04hyIH086BbOn8e5oEXdxkX7DNbKcuqRJ+7tNVrfDbTCi 3cG/PUGAlH79glm0ieLvc/xjmTj5MsGnc/QL+MpHJghvdzNfRmbyNymvB6596Dcmzy PMQ1GPO1obFlw== Message-ID: Date: Fri, 17 Apr 2026 15:36:59 +0200 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] mm: prepare anon_vma before swapin rmap Content-Language: en-US To: Matthew Wilcox , "David Hildenbrand (Arm)" Cc: ZhengYuan Huang , akpm@linux-foundation.org, ljs@kernel.org, Liam.Howlett@oracle.com, rppt@kernel.org, surenb@google.com, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, baijiaju1990@gmail.com, r33s3n6@gmail.com, zzzccc427@gmail.com References: <20260417011606.1089985-1-gality369@gmail.com> <66f67e51-819b-4c60-9f61-170db32362a2@kernel.org> From: "Vlastimil Babka (SUSE)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/17/26 15:03, Matthew Wilcox wrote: > On Fri, Apr 17, 2026 at 01:57:59PM +0200, David Hildenbrand (Arm) wrote: >> On 4/17/26 12:53, David Hildenbrand (Arm) wrote: >> > On 4/17/26 03:16, ZhengYuan Huang wrote: >> >> [BUG] >> >> madvise(MADV_HWPOISON) can fault a swap entry back in through >> >> get_user_pages_fast() and hit: > ... >> >> I can reproduce this issue deterministically on v6.18, but I have not >> >> been able to reproduce it with the same setup on next-20260415. >> >> Just speculating, we had >> >> commit 3b617fd3d317bf9dd7e2c233e56eafef05734c9d >> Author: Lorenzo Stoakes >> Date: Mon Jan 5 20:11:49 2026 +0000 >> >> mm/vma: enforce VMA fork limit on unfaulted,faulted mremap merge too >> >> Go into v6.19. >> >> Maybe there was a scenario where we could have lost vma->anon_vma during >> a merge, resulting in a swapped page in an anon_vma. >> >> If this cannot be reproduced on 6.19+,there is nothing to worry about. > > ... except that 6.18 is LTS so we need a fix for that kernel version. It's there: https://kernel.dance/#3b617fd3d317bf9dd7e2c233e56eafef05734c9d > And maybe 6.12 as well (a373baed5a9d went into 6.9, so no need to > go further back than that) Not there (yet?) but it was tagged stable.