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: Fri, 16 Feb 2024 21:51:31 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	akpm@...ux-foundation.org, apopple@...dia.com
Subject: Re: [PATCH v2 2/6] mm/migrate_device: further convert
 migrate_device_unmap()  to folios

On Fri, Feb 16, 2024 at 01:13:16PM -0800, Sidhartha Kumar wrote:
> migrate_device_unmap() already has a folio, we can use the folio
> versions of is_zone_device_page() and putback_lru_page.
> -		if (page_mapped(page) ||
> -		    !migrate_vma_check_page(page, fault_page)) {
> -			if (!is_zone_device_page(page)) {
> -				get_page(page);
> -				putback_lru_page(page);
> +		if (folio_mapped(folio) ||
> +		    !migrate_vma_check_page(&folio->page, fault_page)) {
> +			if (!folio_is_zone_device(folio)) {
> +				folio_get(folio);
> +				folio_putback_lru(folio);

page_mapped() is not the same thing as folio_mapped(page_folio(page)).
please include some argumentation about why this is a correct
transformation to make.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ