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: <fa2bb08a-42cc-c0cc-31c0-39d6e14f6f92@intel.com>
Date:   Mon, 9 Apr 2018 09:02:31 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Baoquan He <bhe@...hat.com>
Cc:     linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
        pagupta@...hat.com, linux-mm@...ck.org,
        kirill.shutemov@...ux.intel.com
Subject: Re: [PATCH v3 2/4] mm/sparsemem: Defer the ms->section_mem_map
 clearing

On 04/07/2018 11:50 PM, Baoquan He wrote:
>> Should the " = 0" instead be clearing SECTION_MARKED_PRESENT or
>> something?  That would make it easier to match the code up with the code
>> that it is effectively undoing.
> 
> Not sure if I understand your question correctly. From memory_present(),
> information encoded into ms->section_mem_map including numa node,
> SECTION_IS_ONLINE and SECTION_MARKED_PRESENT. Not sure if it's OK to only
> clear SECTION_MARKED_PRESENT.  People may wrongly check SECTION_IS_ONLINE
> and do something on this memory section?

What is mean is that, instead of:

	
	ms->section_mem_map = 0;

we could literally do:

	ms->section_mem_map &= ~SECTION_MARKED_PRESENT;

That does the same thing in practice, but makes the _intent_ much more
clear.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ