[an error occurred while processing this directive]
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: Fri, 22 Dec 2023 16:13:42 +0800
From: Oliver Sang <oliver.sang@...el.com>
To: David Hildenbrand <david@...hat.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, Matthew Wilcox
	<willy@...radead.org>, <oe-lkp@...ts.linux.dev>, <lkp@...el.com>, "Linux
 Memory Management List" <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
	<oliver.sang@...el.com>
Subject: Re: [linux-next:master] [mm] bbcbf2a3f0: kernel_BUG_at_mm/memory.c

hi, David,

On Thu, Dec 21, 2023 at 11:07:21PM +0100, David Hildenbrand wrote:
> On 21.12.23 22:58, Andrew Morton wrote:
> > On Thu, 21 Dec 2023 12:32:04 +0100 David Hildenbrand <david@...hat.com> wrote:
> > 
> > > On 21.12.23 12:23, Oliver Sang wrote:
> > > > hi, Andrew Morton,
> > > > 
> > > > On Wed, Dec 20, 2023 at 02:11:35PM -0800, Andrew Morton wrote:
> > > > > On Tue, 19 Dec 2023 23:46:50 +0800 kernel test robot <oliver.sang@...el.com> wrote:
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > kernel test robot noticed "kernel_BUG_at_mm/memory.c" on:
> > > > > > 
> > > > > > commit: bbcbf2a3f05f74f9d268eab57abbdce6a65a94ad ("mm: convert ksm_might_need_to_copy() to work on folios")
> > > > > 
> > > > > I assume this is a bisection result, so it's quite repeatable?
> > > > 
> > > > yes, we bisect to this commit, it's quite repeatable:
> > > > 
> > > > ddd06bb63d9793ce bbcbf2a3f05f74f9d268eab57ab
> > > > ---------------- ---------------------------
> > > >          fail:runs  %reproduction    fail:runs
> > > >              |             |             |
> > > >              :6          100%           6:6     dmesg.Kernel_panic-not_syncing:Fatal_exception
> > > >              :6          100%           6:6     dmesg.RIP:do_swap_page
> > > >              :6          100%           6:6     dmesg.invalid_opcode:#[##]
> > > >              :6          100%           6:6     dmesg.kernel_BUG_at_mm/memory.c
> > > > 
> > > > 
> > > 
> > > Can you try with the snipped I sent? Please let me know if you need a
> > > full patch for testing purposes.
> > 
> > I think a full patch would be better, please.
> > 

we cannot reproduce the issue reported previously after applying below patch.
Thanks

> 
> From b82e309096abde6c0f24bba50a281e8d3855c132 Mon Sep 17 00:00:00 2001
> From: David Hildenbrand <david@...hat.com>
> Date: Thu, 21 Dec 2023 23:04:30 +0100
> Subject: [PATCH] Fixup: mm: convert ksm_might_need_to_copy() to work on folios
> 
> We must only adjust the page if the folio changed. Otherwise, if we
> had a large folio in the swapcache and the folio didn't change, we'd
> suddenly change the page to-be-mapped.
> 
> Reported-by: kernel test robot <oliver.sang@...el.com>
> Closes: https://lore.kernel.org/oe-lkp/202312192319.fa8f5709-oliver.sang@intel.com
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
>  mm/memory.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/memory.c b/mm/memory.c
> index 149f779910fd5..2f9668d357f5c 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3952,7 +3952,8 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
>  			folio = swapcache;
>  			goto out_page;
>  		}
> -		page = folio_page(folio, 0);
> +		if (folio != swapcache)
> +			page = folio_page(folio, 0);
>  		/*
>  		 * If we want to map a page that's in the swapcache writable, we
> -- 
> 2.43.0
> 
> 
> -- 
> Cheers,
> 
> David / dhildenb
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ