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: <6e659d5b-c3f1-bd72-a3af-235d6bc55b0b@redhat.com>
Date:   Fri, 16 Apr 2021 12:51:31 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...nel.org>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 4/8] mm,memory_hotplug: Allocate memmap from the added
 memory range

On 16.04.21 12:37, Oscar Salvador wrote:
> On Fri, Apr 16, 2021 at 12:33:34PM +0200, David Hildenbrand wrote:
>> IIRC, we have to add the zero shadow first, before touching the memory. This
>> is also what mm/memremap.c does.
>>
>> In mhp_deinit_memmap_on_memory(), you already remove in the proper
>> (reversed) order :)
> 
> But looking at online_pages(), we do it after the
> move_pfn_range_to_zone(), right? AFAIK (I might be well wrong here),
> memory_notify() will eventually call kasan_add_zero_shadow? So that
> comes after the move_pfn_range_to_zone? Or is my understanding
> incorrect?

The thing is: move_pfn_range_to_zone() in case of ordinary 
online_pages() won't touch the pages but only the memmap. The memmap has 
a proper kasan shadow already. Pages won't be touched before exposing 
them to the page allocator via generic_online_pages().

This is different in this case :)

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ