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: <2oqithhbrzugwdyucy44ehcl3oumly65oml2ozi5x5cbuj3pxp@empgh6q3buzy>
Date: Fri, 17 Jan 2025 12:54:42 +1100
From: Alistair Popple <apopple@...dia.com>
To: Dan Williams <dan.j.williams@...el.com>, a@...ebian.thelocal
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org, 
	alison.schofield@...el.com, lina@...hilina.net, zhang.lyra@...il.com, 
	gerald.schaefer@...ux.ibm.com, vishal.l.verma@...el.com, dave.jiang@...el.com, 
	logang@...tatee.com, bhelgaas@...gle.com, jack@...e.cz, jgg@...pe.ca, 
	catalin.marinas@....com, will@...nel.org, mpe@...erman.id.au, npiggin@...il.com, 
	dave.hansen@...ux.intel.com, ira.weiny@...el.com, willy@...radead.org, djwong@...nel.org, 
	tytso@....edu, linmiaohe@...wei.com, david@...hat.com, peterx@...hat.com, 
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org, nvdimm@...ts.linux.dev, 
	linux-cxl@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, 
	linux-xfs@...r.kernel.org, jhubbard@...dia.com, hch@....de, david@...morbit.com, 
	chenhuacai@...nel.org, kernel@...0n.name, loongarch@...ts.linux.dev
Subject: Re: [PATCH v6 20/26] mm/mlock: Skip ZONE_DEVICE PMDs during mlock

On Mon, Jan 13, 2025 at 06:42:46PM -0800, Dan Williams wrote:
> Alistair Popple wrote:
> > At present mlock skips ptes mapping ZONE_DEVICE pages. A future change
> > to remove pmd_devmap will allow pmd_trans_huge_lock() to return
> > ZONE_DEVICE folios so make sure we continue to skip those.
> > 
> > Signed-off-by: Alistair Popple <apopple@...dia.com>
> > Acked-by: David Hildenbrand <david@...hat.com>
> 
> This looks like a fix in that mlock_pte_range() *does* call mlock_folio() 
> when pmd_trans_huge_lock() returns a non-NULL @ptl.
> 
> So it is not in preparation for a future change it is making the pte and
> pmd cases behave the same to drop mlock requests.
> 
> The code change looks good, but do add a Fixes tag and reword the
> changelog a bit before adding:

Yeah, that changelog is a bit whacked. In fact it's not a fix - because
mlock_fixup() (the only caller) already filters dax VMAs. So this is really
about fixing a possible future bug when we start having PMDs for other types of
ZONE_DEVICE pages (ie. private, coherent, etc).

So probably I should just roll this into "mm: Allow compound zone device pages".

> Reviewed-by: Dan Williams <dan.j.williams@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ