lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 14 Feb 2024 14:18:08 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Charan Teja Kalla <quic_charante@...cinc.com>
Cc: David Hildenbrand <david@...hat.com>, gregkh@...uxfoundation.org,
	akpm@...ux-foundation.org, vbabka@...e.cz, dhowells@...hat.com,
	surenb@...gle.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	# see patch description <stable@...r.kernel.org>
Subject: Re: [PATCH] mm/huge_memory: fix swap entry values of tail pages of
 THP

On Wed, Feb 14, 2024 at 12:04:10PM +0530, Charan Teja Kalla wrote:
> > 1) Is it broken in 5.15? Did you actually try to reproduce or is this
> >    just a guess?
> > 
> 
> We didn't run the tests with THP enabled on 5.15, __so we didn't
> encounter this issue__ on older to 6.1 kernels.
> 
> I mentioned that issue exists is based on my understanding after code
> walk through. To be specific, I just looked to the
> migrate_pages()->..->migrate_page_move_mapping() &
> __split_huge_page_tail() where the ->private field of thp sub-pages is
> not filled with swap entry. If it could have set, I think these are the
> only places where it would have done, per my understanding. CMIW.

I think you have a misunderstanding.  David's patch cfeed8ffe55b (part
of 6.6) _stopped_ us using the tail ->private entries.  So in 6.1, these
tail pages should already have page->private set, and I don't understand
what you're fixing.

> > 2) How did you come up with 417013e0d18 ("mm/migrate: Add
> >    folio_migrate_mapping()")
> OOPS, I mean it is Fixes: 3417013e0d18 ("mm/migrate: Add
> folio_migrate_mapping()").
> 
> My understanding is that it a miss in folio_migrate_mapping() where the
> sub-pages should've the ->private set. But this is just a
> reimplementation of migrate_page_move_mapping()(where also the issue
> exists, tmk).
> 
> commit 3417013e0d183be9b42d794082eec0ec1c5b5f15
> Author: Matthew Wilcox (Oracle) <willy@...radead.org>
> Date:   Fri May 7 07:28:40 2021 -0400
> 
>     mm/migrate: Add folio_migrate_mapping()
> 
>     Reimplement migrate_page_move_mapping() as a wrapper around
>     folio_migrate_mapping().  Saves 193 bytes of kernel text.
> 
> Thanks.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ