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]
Date:   Mon, 30 Jul 2018 10:17:16 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Michal Hocko <mhocko@...nel.org>, Vlastimil Babka <vbabka@...e.cz>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Baoquan He <bhe@...hat.com>, Dave Young <dyoung@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hari Bathini <hbathini@...ux.vnet.ibm.com>,
        Huang Ying <ying.huang@...el.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Marc-André Lureau <marcandre.lureau@...hat.com>,
        Matthew Wilcox <mawilcox@...rosoft.com>,
        Miles Chen <miles.chen@...iatek.com>,
        Pavel Tatashin <pasha.tatashin@...cle.com>,
        Petr Tesarik <ptesarik@...e.cz>
Subject: Re: [PATCH v1 0/2] mm/kdump: exclude reserved pages in dumps

On 26.07.2018 21:50, Andrew Morton wrote:
> On Thu, 26 Jul 2018 10:45:54 +0200 David Hildenbrand <david@...hat.com> wrote:
> 
>>> Does each user of PG_balloon check for PG_reserved? If this is the case
>>> then yes this would be OK.
>>>
>>
>> I can only spot one user of PageBalloon() at all (fs/proc/page.c) ,
>> which makes me wonder if this bit is actually still relevant. I think
>> the last "real" user was removed with
>>
>> commit b1123ea6d3b3da25af5c8a9d843bd07ab63213f4
>> Author: Minchan Kim <minchan@...nel.org>
>> Date:   Tue Jul 26 15:23:09 2016 -0700
>>
>>     mm: balloon: use general non-lru movable page feature
>>
>>     Now, VM has a feature to migrate non-lru movable pages so balloon
>>     doesn't need custom migration hooks in migrate.c and compaction.c.
>>
>>
>> The only user of PG_balloon in general is
>> "include/linux/balloon_compaction.h", used effectively only by
>> virtio_balloon.
>>
>> All such pages are allocated via balloon_page_alloc() and never set
>> reserved.
>>
>> So to me it looks like PG_balloon could be easily reused, especially to
>> also exclude virtio-balloon pages from dumps.
> 
> Agree.  Maintaining a thingy for page-types.c which hardly anyone uses
> (surely) isn't sufficient justification for consuming a page flag.  We
> should check with the virtio developers first, but this does seem to be
> begging to be reclaimed.

Okay, I'll be looking into reusing this flag to mark pages as
fake/logical offline (e.g. "PG_offline"), so it can be used by

- memory onlining/offlining code ("page is offline" e.g. PG_reserved &&
  PG_offline)
- balloon drivers ("page is logically offline" e.g. !PG_reserved &&
  PG_offline)

In dump tools, we can then skip reading these pages ("page not used by
the system, might contain stale data or might not even be accessible").

Can you drop these two patches for now? I'll try to rework patch nr 1 to
more closely match what PG_reserved actually means. Patch nr 2 might no
longer be necessary if we agree on something like PG_offline.

-- 

Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ