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>] [day] [month] [year] [list]
Message-ID: <bcc3284acf144b0a8c4f175a2f56b3d5@inspur.com>
Date: Tue, 1 Apr 2025 00:48:43 +0000
From: Simon Wang (王传国) <wangchuanguo@...pur.com>
To: Oscar Salvador <osalvador@...e.de>
CC: Matthew Wilcox <willy@...radead.org>, "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>, "mhiramat@...nel.org" <mhiramat@...nel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: migrate: restore the nmask after successfully
 allocating on the  target node


> >
> > > On Wed, Mar 26, 2025 at 11:12:18AM +0800, wangchuanguo wrote:
> > > > If memory is successfully allocated on the target node and the
> > > > function directly returns without value restore for nmask,
> > > > non-first migration operations in migrate_pages() by again label
> > > > may ignore the nmask settings, thereby allowing new memory
> > > > allocations for migration on any node.
> > >
> > > I have no opinion on whether this is the right thing to do or not,
> > > but if it is
> > >
> >
> > I don't think so. When memory allocation fails on the target node, there is
> already a recovery operation for the nmask value below. Therefore, the nmask
> value should only be restored when memory allocation is successfully
> completed on the target node.
> 
> But that is not what the code is doing, is it? With the changes applied I mean.
> You are restoring mtc->nmask in case you managed to allocate for
> __GFP_THISNODE and after you clear the flag, so we might as well do it just
> once at the beginning after calling alloc_migration_target for the first time.
> 
> 
> --
> Oscar Salvador
> SUSE Labs
Yes, you're right. My apologies—I overlooked a line of code earlier.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ