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]
Message-ID: <Zc2OVIEVe87WCruV@casper.infradead.org>
Date: Thu, 15 Feb 2024 04:08:52 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Alistair Popple <apopple@...dia.com>
Cc: Sidhartha Kumar <sidhartha.kumar@...cle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH 1/2] mm/migrate_device: further convert
 migrate_device_unmap() to folios

On Thu, Feb 15, 2024 at 09:38:42AM +1100, Alistair Popple wrote:
> > +++ b/mm/migrate_device.c
> > @@ -377,33 +377,33 @@ static unsigned long migrate_device_unmap(unsigned long *src_pfns,
> >  			continue;
> >  		}
> >  
> > +		folio = page_folio(page);
> 
> Instead of open coding the migrate pfn to folio conversion I think we
> should define a migrate_pfn_to_folio() and get rid of the intermediate
> local variable. This would also allow a minor clean up to the final for
> loop in migrate_device_unmap().

I think we should stop passing pfns into migrate_device_unmap().
Passing an array of folios would make more sense to every function
involved, afaict.  Maybe I overlooked something ...

Also, have you had any thoughts on whether device memory is a type of
folio like anon/file memory, or is it its own type?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ