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: <csqlc5ajszg6bybykeezkpcfqlx7nv5ochikrgttzrhqqjaxjv@y2hwbmqu4qfr>
Date: Mon, 1 Sep 2025 14:15:51 +0100
From: Kiryl Shutsemau <kas@...nel.org>
To: David Hildenbrand <david@...hat.com>
Cc: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org, 
	willy@...radead.org, hughd@...gle.com, ziy@...dia.com, baolin.wang@...ux.alibaba.com, 
	lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, npache@...hat.com, ryan.roberts@....com, 
	baohua@...nel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: Enable khugepaged to operate on non-writable VMAs

On Mon, Sep 01, 2025 at 10:32:34AM +0200, David Hildenbrand wrote:
> 
> > > @@ -676,9 +676,7 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma,
> > >   			writable = true;
> > >   	}
> > > -	if (unlikely(!writable)) {
> > > -		result = SCAN_PAGE_RO;
> > > -	} else if (unlikely(cc->is_khugepaged && !referenced)) {
> > > +	if (unlikely(cc->is_khugepaged && !referenced)) {
> > >   		result = SCAN_LACK_REFERENCED_PAGE;
> > >   	} else {
> > >   		result = SCAN_SUCCEED;
> > > @@ -1421,9 +1419,7 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,
> > >   		     mmu_notifier_test_young(vma->vm_mm, _address)))
> > >   			referenced++;
> > >   	}
> > > -	if (!writable) {
> > > -		result = SCAN_PAGE_RO;
> > > -	} else if (cc->is_khugepaged &&
> > > +	if (cc->is_khugepaged &&
> > 
> > The only practical use of the writable is gone. The only other usage is
> > tracing which can be dropped to as it is not actionable anymore.
> > 
> > Could you drop writable? Maybe as a separate commit.
> 
> I think we should just do it in the same patch.

Change in trace_mm_collapse_huge_page_isolate() interface doesn't belong
to the same patch in my view.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ