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] [day] [month] [year] [list]
Message-ID: <2024030444-unfreeze-crystal-1ccf@gregkh>
Date: Mon, 4 Mar 2024 11:48:55 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Charan Teja Kalla <quic_charante@...cinc.com>
Cc: Zi Yan <ziy@...dia.com>, David Hildenbrand <david@...hat.com>,
	Matthew Wilcox <willy@...radead.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>,
	Huang Ying <ying.huang@...el.com>,
	Naoya Horiguchi <naoya.horiguchi@...ux.dev>
Subject: Re: [PATCH] mm/huge_memory: fix swap entry values of tail pages of
 THP

On Wed, Feb 28, 2024 at 09:06:19PM +0530, Charan Teja Kalla wrote:
> Thanks David/Zi Yan,
> 
> On 2/27/2024 9:45 PM, Zi Yan wrote:
> > So likely we'd have to fix the stable kernels:
> > 
> > 4.19
> > 5.4
> > 5.10
> > 5.15
> > 6.1
> > 
> > That's a lot of pre-folio code. A backport of my series likely won't really make any sense.
> 
> So, I assume this is a consensus to have stable-only fix for this issue.
> 
> > 
> > For v6.1, the fix would like below?
> > 
> > diff --git a/mm/migrate.c b/mm/migrate.c
> > index c93dd6a31c31..c5968021fde0 100644
> > --- a/mm/migrate.c
> > +++ b/mm/migrate.c
> > @@ -423,8 +423,12 @@ int folio_migrate_mapping(struct address_space *mapping,
> >         if (folio_test_swapbacked(folio)) {
> >                 __folio_set_swapbacked(newfolio);
> >                 if (folio_test_swapcache(folio)) {
> > +                       int i;
> > +
> >                         folio_set_swapcache(newfolio);
> > -                       newfolio->private = folio_get_private(folio);
> > +                       for (i = 0; i < nr; i++)
> > +                               set_page_private(folio_page(newfolio, i),
> > +                                       page_private(folio_page(folio, i)));
> >                 }
> >                 entries = nr;
> >         } else {
> 
> Similar to this is what we had tested[1] internally and observed no issues.
> 
> Can this be taken to 6.1, please?

Someone needs to submit it properly and get it reviewed by the relevent
maintainers.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ