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: <Z9F8JYitsY9viNg4@casper.infradead.org>
Date: Wed, 12 Mar 2025 12:20:53 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Liu Ye <liuye@...inos.cn>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/debug: Fix minor issues in mm

On Wed, Mar 12, 2025 at 11:23:44AM +0800, Liu Ye wrote:
> - Simplify compound page judgment conditions.

> @@ -132,15 +132,15 @@ static void __dump_page(const struct page *page)
>  again:
>  	memcpy(&precise, page, sizeof(*page));
>  	head = precise.compound_head;
> -	if ((head & 1) == 0) {
> +	if (head & 1) {
> +		foliop = (struct folio *)(head - 1);
> +		idx = folio_page_idx(foliop, page);
> +	} else {
>  		foliop = (struct folio *)&precise;
>  		idx = 0;
>  		if (!folio_test_large(foliop))
>  			goto dump;
>  		foliop = (struct folio *)page;
> -	} else {
> -		foliop = (struct folio *)(head - 1);
> -		idx = folio_page_idx(foliop, page);
>  	}
>  
>  	if (idx < MAX_FOLIO_NR_PAGES) {

How is this "simpler"?  It seems like churn for the sake of churn.
NACK.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ