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]
Date:   Tue, 27 Jun 2023 00:13:16 +0000
From:   "Yajun Deng" <yajun.deng@...ux.dev>
To:     "Mike Rapoport" <rppt@...nel.org>
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memblock: Introduce memblock_reserve_node()

June 26, 2023 2:21 PM, "Mike Rapoport" <rppt@...nel.org> wrote:

> On Sun, Jun 25, 2023 at 07:39:10AM +0000, Yajun Deng wrote:
> 
>> June 25, 2023 1:08 PM, "Mike Rapoport" <rppt@...nel.org> wrote:
>> 
>> On Sat, Jun 24, 2023 at 10:46:22AM +0800, Yajun Deng wrote:
>> 
>> It only returns address now in memblock_find_in_range_node(), we can add a
>> parameter pointing to integer for node id of the range, which can be used
>> to pass the node id to the new reserve region.
>> 
>> Introduce memblock_reserve_node() so that the node id can be passed to
>> the reserve region in memblock_alloc_range_nid().
>> 
>> Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
>> 
>> What problem does this patch solve?
>> 
>> If we set nid and flags in memblock_alloc_range_nid(), we may not need
>> memblock_set_node() in memmap_init_reserved_pages().
> 
> When memblock_reserve() is called before NUMA setup, the node ids are still
> unset in memblock.memory, so very early reservations will be missed and we
> still have to update node ids in memblock.reserved later.

Even so, we still need to pass the 'flags' to the new reserve region.
choose_memblock_flags() may return MEMBLOCK_MIRROR in memblock_alloc_range_nid(),
memblock_reserve() couldn't pass this flag in this case.


>> I tested this patch and delete memblock_set_node() in memmap_init_reserved_pages().
>> It works fine. I did not delete memblock_set_node() in this patch just in case.
> 
> --
> Sincerely yours,
> Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ