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: <YcMO3qm9UDcPZjCT@dhcp22.suse.cz>
Date:   Wed, 22 Dec 2021 12:41:18 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Alexey Makhalov <amakhalov@...are.com>
Cc:     Dennis Zhou <dennis@...nel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Oscar Salvador <osalvador@...e.de>, Tejun Heo <tj@...nel.org>,
        Christoph Lameter <cl@...ux.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v3] mm: fix panic in __alloc_pages

On Tue 21-12-21 20:23:34, Alexey Makhalov wrote:
> 
> 
> > On Dec 21, 2021, at 1:46 AM, Michal Hocko <mhocko@...e.com> wrote:
> > 
> > On Tue 21-12-21 05:46:16, Alexey Makhalov wrote:
> >> Hi Michal,
> >> 
> >> The patchset looks good to me. I didn’t find any issues during the testing.
> > 
> > Thanks a lot. Can I add your Tested-by: tag?
> Sure, thanks.

Thanks I will add those then.
 
> >> I have one concern regarding dmesg output. Do you think this messaging is
> >> valid if possible node is not yet present?
> >> Or is it only the issue for virtual machines?
> >> 
> >>  Node XX uninitialized by the platform. Please report with boot dmesg.
> >>  Initmem setup node XX [mem 0x0000000000000000-0x0000000000000000]
> > 
> > AFAIU the Initmem part of the output is what concerns you, right? Yeah,
> First line actually, this sentence “Please report with boot dmesg.”. But
> there is nothing to fix, at least for VMs.

I am still not sure because at least x86 aims at handling that at the
platform code. David has given us a way to trigger this from kvm/qemu so
I will play with that. I can certainly change the wording but this whole
thing was meant to do a fixup after the arch specific code has initialized
everything.

> > that really is more cryptic than necessary. Does this look any better?
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index 34743dcd2d66..7e18a924be7e 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -7618,9 +7618,14 @@ static void __init free_area_init_node(int nid)
> > 	pgdat->node_start_pfn = start_pfn;
> > 	pgdat->per_cpu_nodestats = NULL;
> > 
> > -	pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid,
> > -		(u64)start_pfn << PAGE_SHIFT,
> > -		end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0);
> > +	if (start_pfn != end_pfn) {
> > +		pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid,
> > +			(u64)start_pfn << PAGE_SHIFT,
> > +			end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0);
> > +	} else {
> > +		pr_info("Initmem setup node %d as memoryless\n", nid);
> > +	}
> > +
> > 	calculate_node_totalpages(pgdat, start_pfn, end_pfn);
> > 
> > 	alloc_node_mem_map(pgdat);
> Second line looks much better.

OK, I will fold that in. I think it is more descriptive as well.
> 
> Thank you,
> —Alexey
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ