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:   Thu, 9 Feb 2017 14:20:26 +1000
From:   Nicholas Piggin <npiggin@...il.com>
To:     Hugh Dickins <hughd@...gle.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Wu Fengguang <fengguang.wu@...el.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: fix KPF_SWAPCACHE

On Tue, 7 Feb 2017 11:11:16 -0800 (PST)
Hugh Dickins <hughd@...gle.com> wrote:

> 4.10-rc1 commit 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache,
> valid when PageSwapBacked") aliased PG_swapcache to PG_owner_priv_1:
> so /proc/kpageflags' KPF_SWAPCACHE should now be synthesized, instead
> of being shown on unrelated pages which have PG_owner_priv_1 set.
> 
> Signed-off-by: Hugh Dickins <hughd@...gle.com>

Thanks Hugh, this seems fine to me. We want this for 4.10, no?

Fixes: 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked")
Reviewed-by: Nicholas Piggin <npiggin@...il.com>

> ---
> 
>  fs/proc/page.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 4.10-rc7/fs/proc/page.c	2016-12-25 18:40:50.618454962 -0800
> +++ linux/fs/proc/page.c	2017-02-07 10:28:51.019640392 -0800
> @@ -173,7 +173,8 @@ u64 stable_page_flags(struct page *page)
>  	u |= kpf_copy_bit(k, KPF_ACTIVE,	PG_active);
>  	u |= kpf_copy_bit(k, KPF_RECLAIM,	PG_reclaim);
>  
> -	u |= kpf_copy_bit(k, KPF_SWAPCACHE,	PG_swapcache);
> +	if (PageSwapCache(page))
> +		u |= 1 << KPF_SWAPCACHE;
>  	u |= kpf_copy_bit(k, KPF_SWAPBACKED,	PG_swapbacked);
>  
>  	u |= kpf_copy_bit(k, KPF_UNEVICTABLE,	PG_unevictable);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ