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: <20180831204543.GA3885@techadventures.net>
Date:   Fri, 31 Aug 2018 22:45:43 +0200
From:   Oscar Salvador <osalvador@...hadventures.net>
To:     Pasha Tatashin <Pavel.Tatashin@...rosoft.com>
Cc:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "mhocko@...e.com" <mhocko@...e.com>,
        "vbabka@...e.cz" <vbabka@...e.cz>,
        "sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
        "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Oscar Salvador <osalvador@...e.de>
Subject: Re: [PATCH] mm/page_alloc: Clean up check_for_memory

On Fri, Aug 31, 2018 at 02:04:59PM +0000, Pasha Tatashin wrote:
> Are you saying the code that is in mainline is broken? Because we set
> node_set_state(nid, N_NORMAL_MEMORY); even on node with N_HIGH_MEMORY:
> 
> 6826			if (N_NORMAL_MEMORY != N_HIGH_MEMORY &&
> 6827			    zone_type <= ZONE_NORMAL)
> 6828				node_set_state(nid, N_NORMAL_MEMORY);

Yes, and that is fine. Although the curent code is subtle for the reasons
I expplained in the changelog.
What I am saying is that the code you suggested would not work
because your code either sets N_NORMAL_MEMORY or N_HIGH_MEMORY and then
breaks the loop.

That is wrong because when we are on a CONFIG_HIGHMEM system,
it can happen that we have a node with both types, so we have to set
both types of memory.

N_HIGH_MEMORY, and N_NORMAL_MEMORY if the zone is <= ZONE_NORMAL.

Thanks
-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ