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: <Z3_R2qWcvWxm6T83@casper.infradead.org>
Date: Thu, 9 Jan 2025 13:40:42 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Liu Shixin <liushixin2@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Chengming Zhou <chengming.zhou@...ux.dev>,
	Kefeng Wang <wangkefeng.wang@...wei.com>,
	Nanyong Sun <sunnanyong@...wei.com>,
	Muchun Song <muchun.song@...ux.dev>,
	Qi Zheng <zhengqi.arch@...edance.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Yang Shi <yang@...amperecomputing.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: khugepaged: fix call hpage_collapse_scan_file() for
 anonymous vma

On Thu, Jan 09, 2025 at 03:00:59PM +0800, Liu Shixin wrote:
> Add vma_is_anonymous() check to make such vma be processed by
> hpage_collapse_scan_pmd().

Wouldn't it be better to replace the vm_file check with
vma_is_anonymous()?  ie:

> -			if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file) {
> +			if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file &&
> +			    !vma_is_anonymous(vma)) {

+			if (IS_ENABLED(CONFIG_SHMEM) &&
+			    !vma_is_anonymous(vma)) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ