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: <ec53bd13-42ce-46d5-a1b8-c4157663b60d@lucifer.local>
Date: Mon, 10 Nov 2025 19:53:38 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: "Garg, Shivank" <shivankg@....com>
Cc: Zi Yan <ziy@...dia.com>, Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        "Liam R . Howlett" <Liam.Howlett@...cle.com>,
        Nico Pache <npache@...hat.com>, Ryan Roberts <ryan.roberts@....com>,
        Dev Jain <dev.jain@....com>, Barry Song <baohua@...nel.org>,
        Lance Yang <lance.yang@...ux.dev>,
        Steven Rostedt <rostedt@...dmis.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Zach O'Keefe <zokeefe@...gle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        Branden Moore <Branden.Moore@....com>
Subject: Re: [PATCH 1/2] mm/khugepaged: do synchronous writeback for
 MADV_COLLAPSE

On Mon, Nov 10, 2025 at 07:48:33PM +0000, Lorenzo Stoakes wrote:
> On Tue, Nov 11, 2025 at 01:10:03AM +0530, Garg, Shivank wrote:
> > I bisected the crash on mm-unstable
> >
> > b14d61d8fe442b1cc2d7591cf040a6dcd7fe2dd8 is the first bad commit
> > commit b14d61d8fe442b1cc2d7591cf040a6dcd7fe2dd8
> > Author: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> > Date:   Sat Nov 8 17:08:18 2025 +0000
> >
> >     mm: eliminate is_swap_pte() when softleaf_from_pte() suffices
> >
> >     In cases where we can simply utilise the fact that softleaf_from_pte()
> >     treats present entries as if they were none entries and thus eliminate
> >     spurious uses of is_swap_pte(), do so.
> >
> >     No functional change intended.
>
> Ah fun :)
>
> Thanks, this is very likely a bug that I am about to fix in the series that
> was reported on review.
>
> Could you try the attached fix-patch please?
>
> Note that this might not apply against mm-unstable, in which case replace
> 'softleaf' with 'leafent' :) as there was a rename in v2.
>
> Cheers, Lorenzo
>
> ----8<----
> From ab4d93d299f0a0ca3f1fa5e75b2ac646695b632e Mon Sep 17 00:00:00 2001
> From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Date: Mon, 10 Nov 2025 19:46:55 +0000
> Subject: [PATCH] fixup
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> ---
>  include/linux/leafops.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/leafops.h b/include/linux/leafops.h
> index a464a7e08c76..325cc87c3363 100644
> --- a/include/linux/leafops.h
> +++ b/include/linux/leafops.h
> @@ -56,7 +56,7 @@ static inline softleaf_t softleaf_from_pte(pte_t pte)
>  {
>  	softleaf_t arch_entry;
>
> -	if (pte_present(pte))
> +	if (pte_present(pte) || pte_none())

Sorry that should be pte_none(pte)... obviously!

It's late here :)

>  		return softleaf_mk_none();
>
>  	pte = pte_swp_clear_flags(pte);
> @@ -95,7 +95,7 @@ static inline softleaf_t softleaf_from_pmd(pmd_t pmd)
>  {
>  	softleaf_t arch_entry;
>
> -	if (pmd_present(pmd))
> +	if (pmd_present(pmd) || pmd_none(pmd))
>  		return softleaf_mk_none();
>
>  	if (pmd_swp_soft_dirty(pmd))
> --
> 2.51.0
>
> Thanks, Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ