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: <20210913121233.GD56674@shbuild999.sh.intel.com>
Date:   Mon, 13 Sep 2021 20:12:33 +0800
From:   Feng Tang <feng.tang@...el.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        David Rientjes <rientjes@...gle.com>,
        Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
        cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/page_alloc: detect allocation forbidden by cpuset
 and bail out early

On Mon, Sep 13, 2021 at 01:45:51PM +0200, Michal Hocko wrote:
> On Mon 13-09-21 19:34:23, Feng Tang wrote:
> > On Mon, Sep 13, 2021 at 11:15:54AM +0200, Michal Hocko wrote:
> [...] 
> > > > +/* Whether the 'nodes' are all movable nodes */
> > > > +static inline bool movable_only_nodes(nodemask_t *nodes)
> > > > +{
> > > > +	struct zonelist *zonelist;
> > > > +	struct zoneref *z;
> > > > +
> > > > +	zonelist = &(first_online_pgdat())->node_zonelists[ZONELIST_FALLBACK];
> > > 
> > > This will work but it just begs a question why you haven't chosen a node
> > > from the given nodemask. So I believe it would be easier to read if you
> > > did
> > > 	zonelist = NODE_DATA(first_node(nodes))->node_zonelists[ZONELIST_FALLBACK]
> > 
> > This was also my first try to get the 'zonelist', but from the
> > update_nodemask(), the nodemask could be NULL.
> 
> I guess you meant to say s@...L@...ty@
> While this complicates things a bit it is nothing really hard to work
> around. You simply check for nodes_empty() and return false because such
> a nodemask cannot by definition be movable only.

Yes, a nodes_empty() check can solve it, thanks,

- Feng

> -- 
> Michal Hocko
> SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ