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] [day] [month] [year] [list]
Message-ID: <CA+CK2bC1ZsT3cuAMDAAUonys3BUxbb2JdnZXs1Ps3NbYZt5W2Q@mail.gmail.com>
Date: Tue, 6 Aug 2024 13:59:54 -0400
From: Pasha Tatashin <pasha.tatashin@...een.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Alison Schofield <alison.schofield@...el.com>, Sourav Panda <souravpanda@...gle.com>, corbet@....net, 
	gregkh@...uxfoundation.org, rafael@...nel.org, akpm@...ux-foundation.org, 
	mike.kravetz@...cle.com, muchun.song@...ux.dev, rppt@...nel.org, 
	david@...hat.com, rdunlap@...radead.org, chenlinxuan@...ontech.com, 
	yang.yang29@....com.cn, tomas.mudrunka@...il.com, bhelgaas@...gle.com, 
	ivan@...udflare.com, yosryahmed@...gle.com, hannes@...xchg.org, 
	shakeelb@...gle.com, kirill.shutemov@...ux.intel.com, 
	wangkefeng.wang@...wei.com, adobriyan@...il.com, vbabka@...e.cz, 
	Liam.Howlett@...cle.com, surenb@...gle.com, linux-kernel@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, linux-doc@...r.kernel.org, linux-mm@...ck.org, 
	willy@...radead.org, weixugc@...gle.com, David Rientjes <rientjes@...gle.com>, 
	nvdimm@...ts.linux.dev, linux-cxl@...r.kernel.org, yi.zhang@...hat.com
Subject: Re: [PATCH v13] mm: report per-page metadata information

On Mon, Aug 5, 2024 at 7:06 PM Dan Williams <dan.j.williams@...el.com> wrote:
>
> Pasha Tatashin wrote:
> [..]
> > Thank you for the heads up. Can you please attach a full config file,
> > also was anyone able to reproduce this problem in qemu with emulated
> > nvdimm?
>
> Yes, I can reproduce the crash just by trying to reconfigure the mode of
> a pmem namespace:
>
> # ndctl create-namespace -m raw -f -e namespace0.0
>
> ...where namespace0.0 results from:
>
>     memmap=4G!4G
>
> ...passed on the kernel command line.
>
> Kernel config here:
>
> https://gist.github.com/djbw/143705077103d43a735c179395d4f69a

Excellent, I was able to reproduce this problem.

The problem appear to be caused by this code:

Calling page_pgdat() in depopulate_section_memmap():

static void depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages,
                struct vmem_altmap *altmap)
{
        unsigned long start = (unsigned long) pfn_to_page(pfn);
        unsigned long end = start + nr_pages * sizeof(struct page);

        mod_node_page_state(page_pgdat(pfn_to_page(pfn)), NR_MEMMAP,
<<<< We cannot do it.
                            -1L * (DIV_ROUND_UP(end - start, PAGE_SIZE)));
        vmemmap_free(start, end, altmap);
}

The page_pgdat() returns NULL starting from:
pageunmap_range()
    remove_pfn_range_from_zone() <- page is removed from the zone.

Pasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ