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: <fee289c8-fa8f-d9d6-be33-fdd20c71cbca@suse.cz>
Date:   Wed, 27 Jun 2018 12:47:39 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        JianKang Chen <chenjiankang1@...wei.com>,
        Mel Gorman <mgorman@...e.de>,
        Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, xieyisheng1@...wei.com,
        guohanjun@...wei.com, wangkefeng.wang@...wei.com,
        Huaisheng Ye <yehs2007@...il.com>,
        Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] mm: drop VM_BUG_ON from __get_free_pages

On 06/27/2018 09:54 AM, Michal Hocko wrote:
> On Wed 27-06-18 09:50:01, Vlastimil Babka wrote:
>> On 06/27/2018 09:34 AM, Michal Hocko wrote:
>>> On Tue 26-06-18 10:04:16, Andrew Morton wrote:
>>>
>>> And as I've argued before the code would be wrong regardless. We would
>>> leak the memory or worse touch somebody's else kmap without knowing
>>> that.  So we have a choice between a mem leak, data corruption k or a
>>> silent fixup. I would prefer the last option. And blowing up on a BUG
>>> is not much better on something that is easily fixable. I am not really
>>> convinced that & ~__GFP_HIGHMEM is something to lose sleep over.
>>
>> Maybe put the fixup into a "#ifdef CONFIG_HIGHMEM" block and then modern
>> systems won't care? In that case it could even be if (WARN_ON_ONCE(...))
>> so future cases with wrong expectations would become known.
> 
> Yes that could be done as well. Or maybe we can make __GFP_HIGHMEM 0 for
> !HIGHMEM systems. Does something really rely on it being non-zero?

I guess gfp_zone() would have to be checked, dunno about the rewrite of
GFP_ZONE_TABLE (CCing people).
In general checks like "if (flags & __GFP_HIGHMEM)" would become false,
which probably should not be a problem, unless something expect the flag
to be there and errors out if it isn't.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ