Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp586944pxb; Wed, 27 Jan 2021 15:58:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8RBWBULrrS6CBduMkbV8PoY/SdtOM+Y6XVdQ7jnCBSddxzM0clVDZaYrxIOG4IR608JK0 X-Received: by 2002:aa7:dace:: with SMTP id x14mr11304613eds.300.1611791882218; Wed, 27 Jan 2021 15:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611791882; cv=none; d=google.com; s=arc-20160816; b=Nm6+4chbgR/WSckwL9OlhssuEbQWioarIeUt2nBKmR3nT3/ovHEmR14l6KX46fu7xj mHBlOhp3lHjcEGpH6MGRLCXy2IuDvIT2M9UQTKbbhpB4hwwQWQvzhxfgDROmDZIUF+c5 nAVE8hT3nwmS7TE52/iu8fsEAUGIen3b6gF9SLhFzrnECBOSinyudgnpbDWQSKAVsbA1 JmmYXOk1TUmnhReeJ1genNz1wchMqiiVFE3vpEbr9gYfVaNF7XDApHQjaS7UXY8YSe+3 FTPqusY83ko/gFcTEjY4b5xTIBQH4uhqhl9Wf/h6a2vPChMg3r/DIsTyFjqs/2wc1nMN 5M7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=391pCHS4EGbiAr5AejYZ6osmDLj6EdhSwcDvRToN/qs=; b=uCRN4mDjEbNEswEC5pL8x6IecJL7h53shQysVDVXvRFAtaf49OlqSlKgVEHcbEEc/5 jQKjcFVYEZOhcK+mDu0/b5xAX20fR/OPfBnWizdWUBwVBXmGS3liw+vLnOJGl35xYl4l /7phk7fQMO8TWabD0fyyBJqJQGp78dG7Cv9zydQ6GbB2BzCWdX9iI5T7nPiRt4biKY/o dun+kf2KR/z5UFjbRG3+RDGx3xvnvB9tTtr/xDliKvod4Mc7duXRojBsb/oOpWZMDRfm wcuWw2qanOSOgPfFhObjf9Wo9RXocHy5eFDJMXK96xftMgJ35l3yUCTVuKx+OQBGRYne qs9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=GGCcaELT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si1727195edh.496.2021.01.27.15.57.37; Wed, 27 Jan 2021 15:58:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=GGCcaELT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234379AbhA0NRS (ORCPT + 99 others); Wed, 27 Jan 2021 08:17:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238117AbhA0NQp (ORCPT ); Wed, 27 Jan 2021 08:16:45 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B1E6C061574 for ; Wed, 27 Jan 2021 05:16:05 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id j12so1156002pfj.12 for ; Wed, 27 Jan 2021 05:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=391pCHS4EGbiAr5AejYZ6osmDLj6EdhSwcDvRToN/qs=; b=GGCcaELTAwMNoE0IgGE2gzo1Gg4zeEZyZoJ4GN9kXHA81gH38mHWtk9s5yWz74Z3HH XukSycg2R7I6EBXChp197zD7vmN5rNGz7R221R3kM/cFvoyIimHj2VqlG2Z0+sHupdqY yW1Qz0uUMV/DG7VVy25Ks4N4n+l6wsqge/wHp1as+HvWpKSxHwO6qwDDK7wATtYLST9r G00Y8sXaAKxrynA7xYLLRnH9OIFKF3NrdFFY7H64/cVRM6gm3YnuC9+jHqtZ1ZJzVe+Y pgJmkQ3fbgCiWZP2weYvF/Ml5z+/iAZ3+qeUUzxc0PaEh4mkSSI74QcpGOw5h2mdKo30 aU2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=391pCHS4EGbiAr5AejYZ6osmDLj6EdhSwcDvRToN/qs=; b=kQM0fTq2//Xi6r3J0XBV84GJ06XKiFI1x/DKngTSkXIIfcFj0dstiu9Bk5wyXYQxtM 8VPZhfaHRCkRBJTV6gEaYu/Olzyfs4CaK0Mex0ixIMmT59SIuQpJizUi+0076iiSPSyt u+v7k3MU1v21DvQtvUuNco6SBkBA8QrOTAyjkeMF1a3qABYRzTGTjXpcHzGuoiYZmH9y OpyJ2dxKYH5KQv0nTmgWOjzkEjhtJ+A7u+63afqbBP7l+B64Fpw/HXAcmXcEgXT7r2Jt TDFTq8Bi/bMzTRintcdwBlc9yXEv7ocwUrUN59vJwEoEZVx4gmRnCTaBND4E+cCChtsy VmMw== X-Gm-Message-State: AOAM530QqSTrkOjTakQGQy9DbDbtx96Vj5OmIjLKFqbgZKcExNPHJXKk QoB8QuZvKfD+rK1GdjHRXgO4mSBafZudRvtxb+lrww== X-Received: by 2002:a65:418b:: with SMTP id a11mr11118378pgq.231.1611753364610; Wed, 27 Jan 2021 05:16:04 -0800 (PST) MIME-Version: 1.0 References: <20210127100454.GK196782@linux.ibm.com> <20210127111858.GA273567@linux.ibm.com> In-Reply-To: From: =?UTF-8?Q?=C5=81ukasz_Majczak?= Date: Wed, 27 Jan 2021 14:15:53 +0100 Message-ID: Subject: Re: PROBLEM: Crash after mm: fix initialization of struct page for holes in memory layout To: Mike Rapoport Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Rados=C5=82aw_Biernacki?= , Marcin Wojtas , Alex Levin , Guenter Roeck , Jesse Barnes , Chris Wilson , "Sarvela, Tomi P" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, I have started bisecting your patch and I have figured out that there might be something wrong with clamping - with comments out these lines it started to work. The full log (with logs from below patch) can be found here: https://gist.github.com/semihalf-majczak-lukasz/3cecbab0ddc59a6c3ce11ddc296= 45725 it's fresh - I haven't analyze it yet, just sharing with hope it will help. diff --git a/mm/page_alloc.c b/mm/page_alloc.c index eed54ce26ad1..9f4468c413a1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7093,9 +7093,11 @@ static u64 __init init_unavailable_range(unsigned long spfn, unsigned long epfn, zone_spfn =3D arch_zone_lowest_possible_pfn[zone]; zone_epfn =3D arch_zone_highest_possible_pfn[zone]; - spfn =3D clamp(spfn, zone_spfn, zone_epfn); - epfn =3D clamp(epfn, zone_spfn, zone_epfn); - + //spfn =3D clamp(spfn, zone_spfn, zone_epfn); + //epfn =3D clamp(epfn, zone_spfn, zone_epfn); + pr_info("LMA DBG: zone_spfn: %llx, zone_epfn %llx\n", zone_spfn, zone_epfn); + pr_info("LMA DBG: spfn: %llx, epfn %llx\n", spfn, epfn); + pr_info("LMA DBG: clamp_spfn: %llx, clamp_epfn %llx\n", clamp(spfn, zone_spfn, zone_epfn), clamp(epfn, zone_spfn, zone_epfn)); for (pfn =3D spfn; pfn < epfn; pfn++) { if (!pfn_valid(ALIGN_DOWN(pfn, pageblock_nr_pages))) { pfn =3D ALIGN_DOWN(pfn, pageblock_nr_pages) Best regards, Lukasz =C5=9Br., 27 sty 2021 o 13:15 =C5=81ukasz Majczak napisa= =C5=82(a): > > Unfortunately nothing :( my current kernel command line contains: > console=3DttyS0,115200n8 debug earlyprintk=3Dserial loglevel=3D7 > > I was thinking about using earlycon, but it seems to be blocked. > (I think the lack of earlycon might be related to Chromebook HW > security design. There is an EC controller which is a part of AP -> > serial chain as kernel messages are considered sensitive from a > security standpoint.) > > Best regards, > Lukasz > > =C5=9Br., 27 sty 2021 o 12:19 Mike Rapoport napisa= =C5=82(a): > > > > On Wed, Jan 27, 2021 at 11:08:17AM +0100, =C5=81ukasz Majczak wrote: > > > Hi Mike, > > > > > > Actually I have a serial console attached (via servo device), but > > > there is no output :( and also the reboot/crash is very fast/immediat= e > > > after power on. > > > > If you boot with earlyprintk=3Dserial are there any messages? > > > > > Best regards > > > Lukasz > > > > > > =C5=9Br., 27 sty 2021 o 11:05 Mike Rapoport napi= sa=C5=82(a): > > > > > > > > Hi Lukasz, > > > > > > > > On Wed, Jan 27, 2021 at 10:22:29AM +0100, =C5=81ukasz Majczak wrote= : > > > > > Crash after mm: fix initialization of struct page for holes in me= mory layout > > > > > > > > > > Hi, > > > > > I was trying to run v5.11-rc5 on my Samsung Chromebook Pro (Carol= ine), > > > > > but I've noticed it has crashed - unfortunately it seems to happe= n at > > > > > a very early stage - No output to the console nor to the screen, = so I > > > > > have started a bisect (between 5.11-rc4 - which works just find -= and > > > > > 5.11-rc5), > > > > > bisect results points to: > > > > > > > > > > d3921cb8be29 mm: fix initialization of struct page for holes in m= emory layout > > > > > > > > > > Reproduction is just to build and load the kernel. > > > > > > > > > > If it will help any how I am attaching: > > > > > - /proc/cpuinfo (from healthy system): > > > > > https://gist.github.com/semihalf-majczak-lukasz/3517867bf39f07377= c1a785b64a97066 > > > > > - my .config file (for a broken system): > > > > > https://gist.github.com/semihalf-majczak-lukasz/584b329f1bf3e43b5= 3efe8e18b5da33c > > > > > > > > > > If there is anything I could add/do/test to help fix this please = let me know. > > > > > > > > Chris Wilson also reported boot failures on several Chromebooks: > > > > > > > > https://lore.kernel.org/lkml/161160687463.28991.354987542182281928@= build.alporthouse.com > > > > > > > > I presume serial console is not an option, so if you could boot wit= h > > > > earlyprintk=3Dvga and see if there is anything useful printed on th= e screen > > > > it would be really helpful. > > > > > > > > > Best regards > > > > > Lukasz > > > > > > > > -- > > > > Sincerely yours, > > > > Mike. > > > > -- > > Sincerely yours, > > Mike.