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: <20180201143333.GD1770@localhost.localdomain>
Date:   Thu, 1 Feb 2018 22:33:33 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Dave Hansen <dave.hansen@...ux.intel.com>
Cc:     "Kirill A. Shutemov" <kirill@...temov.name>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, kirill.shutemov@...ux.intel.com,
        mhocko@...e.com, tglx@...utronix.de, douly.fnst@...fujitsu.com
Subject: Re: [PATCH 2/2] mm/sparse.c: Add nr_present_sections to change the
 mem_map allocation

On 02/01/18 at 06:23am, Dave Hansen wrote:
> On 02/01/2018 06:19 AM, Baoquan He wrote:
> > 
> > I suppose these functions changed here are only called during system
> > bootup, namely in paging_init(). Hot-add memory goes in a different
> > path, __add_section() -> sparse_add_one_section(), different called
> > functions.
> 
> But does this keep those sections that were not present on boot from
> being added later?

I think it won't. As you can see, the referred functions are only called
during init stage. If anyone try to use any of them for later hot-add memory,
that will cause problem, lucky there isn't. And this is only used to
store the allocated usemap and mem_map for each present section on boot.
After that, the usemap_map and map_map pointer array will be freed, they
are temporary here. I forget mentioning this in patch log, sorry for bringing
confusion.

void __init sparse_memory_present_with_active_regions(int nid)
void __init memory_present(int nid, unsigned long start, unsigned long end)
void __init sparse_init(void) 
static void __init alloc_usemap_and_memmap(...)
static void __init sparse_early_usemaps_alloc_node(...)
static void __init sparse_early_mem_maps_alloc_node(...)
void __init sparse_mem_maps_populate_node(...)
void __init sparse_mem_maps_populate_node(...)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ