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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZTrFSeG16WCoak2C@casper.infradead.org>
Date:   Thu, 26 Oct 2023 21:00:09 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Gregory Price <gourry.memverge@...il.com>
Cc:     linux-mm@...ck.org, akpm@...ux-foundation.org, david@...hat.com,
        vbabka@...e.cz, naoya.horiguchi@...ux.dev,
        linux-kernel@...r.kernel.org,
        Gregory Price <gregory.price@...verge.com>
Subject: Re: [PATCH] kpageflags: respect folio head-page flag placement

On Wed, Oct 25, 2023 at 04:12:37PM -0400, Gregory Price wrote:
> +++ b/fs/proc/page.c
> @@ -188,20 +188,31 @@ u64 stable_page_flags(struct page *page)
>  		u |= 1 << KPF_SLAB;
>  
>  	u |= kpf_copy_bit(k, KPF_ERROR,		PG_error);
> -	u |= kpf_copy_bit(k, KPF_DIRTY,		PG_dirty);
> +
> +	if (PageDirty(page))
> +		u |= 1 << KPF_DIRTY;

This is not the way to do it.

At the beginning of the function, add:

	struct folio *folio = page_folio(page);

Then use folio_test_XXX istead of PageXXX().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ