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: <8d1ba12d-9993-1822-38e4-422a46108fec@redhat.com>
Date:   Wed, 14 Aug 2019 16:28:21 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Arun KS <arunks@...eaurora.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Oscar Salvador <osalvador@...e.de>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        Dan Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH v1 2/4] mm/memory_hotplug: Handle unaligned start and
 nr_pages in online_pages_blocks()

On 14.08.19 16:17, David Hildenbrand wrote:
> On 14.08.19 16:08, Michal Hocko wrote:
>> On Fri 09-08-19 14:56:59, David Hildenbrand wrote:
>>> Take care of nr_pages not being a power of two and start not being
>>> properly aligned. Essentially, what walk_system_ram_range() could provide
>>> to us. get_order() will round-up in case it's not a power of two.
>>>
>>> This should only apply to memory blocks that contain strange memory
>>> resources (especially with holes), not to ordinary DIMMs.
>>
>> I would really like to see an example of such setup before making the
>> code hard to read. Because I am not really sure something like that
>> exists at all.
> 
> I don't have a real-live example at hand (founds this while exploring
> the code), however, the linked commit changed it without stating why it
> would be safe to do so.

So, while I agree that "not a power of two" is rare, are you sure we
will only have holes that are aligned to 4MB (especially on x86)?

-- 

Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ