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] [day] [month] [year] [list]
Message-ID: <CAPcyv4g=4FbYfcJdPnHdnHvHzZ8yUGqKBPU1vsxPYwELkvB=Qw@mail.gmail.com>
Date:   Wed, 14 Sep 2016 15:53:48 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     "Raslan, KarimAllah" <karahmed@...zon.de>
Cc:     Michal Hocko <mhocko@...nel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Vlastimil Babka <vbabka@...e.cz>,
        Johannes Weiner <hannes@...xchg.org>,
        Yaowei Bai <baiyaowei@...s.chinamobile.com>,
        Joe Perches <joe@...ches.com>, Tejun Heo <tj@...nel.org>,
        "Liguori, Anthony" <aliguori@...zon.com>,
        "Schoenherr, Jan H." <jschoenh@...zon.de>
Subject: Re: [PATCH] sparse: Track the boundaries of memory sections for
 accurate checks

On Wed, Sep 14, 2016 at 3:11 PM, Raslan, KarimAllah <karahmed@...zon.de> wrote:
>
> Ahmed, Karim Allah
> karahmed@...zon.de
>
>
>
>> On Sep 15, 2016, at 12:05 AM, Dan Williams <dan.j.williams@...el.com> wrote:
>>
>> On Wed, Sep 14, 2016 at 2:40 PM, Raslan, KarimAllah <karahmed@...zon.de> wrote:
>>>
>>>
>>> On 6/20/16, 10:23 AM, "Michal Hocko" <mhocko@...nel.org> wrote:
>>>
>>>    On Sat 18-06-16 12:11:19, KarimAllah Ahmed wrote:
>>>> When sparse memory model is used an array of memory sections is created to
>>>> track each block of contiguous physical pages. Each element of this array
>>>> contains PAGES_PER_SECTION pages. During the creation of this array the actual
>>>> boundaries of the memory block is lost, so the whole block is either considered
>>>> as present or not.
>>>>
>>>> pfn_valid() in the sparse memory configuration checks which memory sections the
>>>> pfn belongs to then checks whether it's present or not. This yields sub-optimal
>>>> results when the available memory doesn't cover the whole memory section,
>>>> because pfn_valid will return 'true' even for the unavailable pfns at the
>>>> boundaries of the memory section.
>>>
>>>    Please be more verbose of _why_ the patch is needed. Why those
>>>    "sub-optimal results" matter?
>>>
>>> Does this make sense to you ?
>>
>> [ channeling my inner akpm ]
>>
>> What's the user visible effect of this change?  What code is getting
>> tripped up by pfn_valid() being imprecise, and why is changing
>> pfn_valid() the preferred fix?
>
> I did expand the commit message in v2 of this patch to answer these questions:
>
> https://patchwork.kernel.org/patch/9190737/
>

Ah, ok that gives more information about how it is "potentially"
problematic, so I assume you are hitting those problems in practice?
That way the patch can be marked for -stable if this is a problem
others are likely to run into in older kernels.  When pfn_valid()
fails does /proc/iomem show that address "System RAM"?  If not then we
could alternatively convert these problematic usages to use
region_intersects().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ