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

On Fri 20-07-18 14:34:21, David Hildenbrand wrote:
> The reserved bit once was used to hinder pages from getting swapped. While
> this still works,

Does it? There is no single PageReserved check in the reclaim path. I
have no idea when we stopped checking but it must be loooong ago.

> the semantics are a little bit stronger nowadays: The
> page should never be touched by anybody in the system except by the owner.
> The original comment already gave a hint about that.
> 
> So especially, these pages should also not be dumped by dumping tools.
> Let's make that more clear by updating the comment.
> 
> This will be useful especially in the future in virtual environments where
> pages marked with the reserved bit might no longer be accessible.
> 
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> Cc: Matthew Wilcox <mawilcox@...rosoft.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: David Hildenbrand <david@...hat.com>
> Cc: Huang Ying <ying.huang@...el.com>
> Cc: Pavel Tatashin <pasha.tatashin@...cle.com>
> Cc: Miles Chen <miles.chen@...iatek.com>
> Cc: Dave Young <dyoung@...hat.com>
> Cc: Baoquan He <bhe@...hat.com>
> Cc: "Marc-André Lureau" <marcandre.lureau@...hat.com>
> Cc: Petr Tesarik <ptesarik@...e.cz>
> Signed-off-by: David Hildenbrand <david@...hat.com>

Anyway
Acked-by: Michal Hocko <mhocko@...e.com>

for this change
> ---
>  include/linux/page-flags.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> index 901943e4754b..ba81e11a868c 100644
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -17,8 +17,8 @@
>  /*
>   * Various page->flags bits:
>   *
> - * PG_reserved is set for special pages, which can never be swapped out. Some
> - * of them might not even exist...
> + * PG_reserved is set for special pages, which should never be touched (read/
> + * write) by anybody except their owner. Some of them might not even exist.
>   *
>   * The PG_private bitflag is set on pagecache pages if they contain filesystem
>   * specific data (which is normally at page->private). It can be used by
> -- 
> 2.17.1
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ