From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E904DC433E0 for ; Wed, 27 Jan 2021 13:16:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 26FFD207A0 for ; Wed, 27 Jan 2021 13:16:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26FFD207A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 352656B0005; Wed, 27 Jan 2021 08:16:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 302156B0006; Wed, 27 Jan 2021 08:16:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C8D86B0007; Wed, 27 Jan 2021 08:16:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 048B76B0005 for ; Wed, 27 Jan 2021 08:16:06 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BDD728249980 for ; Wed, 27 Jan 2021 13:16:06 +0000 (UTC) X-FDA: 77751603132.21.copy39_0c0be2c27597 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 7534818037BF0 for ; Wed, 27 Jan 2021 13:16:06 +0000 (UTC) X-HE-Tag: copy39_0c0be2c27597 X-Filterd-Recvd-Size: 7789 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 Jan 2021 13:16:05 +0000 (UTC) Received: by mail-pf1-f180.google.com with SMTP id t29so1155763pfg.11 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=jYMQsImHsAy7ck6t+dOnfpo0gfMuTzYFj/5fnWzueyA1SASve1UIenRPk2h8gwSecy zDxtLOhLTPixHDLPj3pVeP/wUw93ewUjQZK0Pqb2v/hjSoC3bcsbEeWE1MGnNWHzqhur HhIJMtMjrJ+WlMMjZGNmIiaoSZfVDr8jMIIoHw38booUhl5UtSuRqI+haA43KgO4rVWL EluWD5t3iU34b0bwwFo1vjrI6I6OvbNDqMefbxZOhHlpFObxqNUU7KYIDiHnZ4U5mqbs VddV/6Sl8kRKChRChzAfF3Mp8d0lGWy+Nzu8aaiVT3eFkc/qOWCHHiO9fKnNJ/glyghg 0oSQ== X-Gm-Message-State: AOAM532deoXPnW1na+Ade9FqaIJWAai/tWSoEZFvEpbpRTgN/EwmFjfc 0nFP3+lRTVcJfDP1XZfLIere4NL4TXzWO1F8sjqFzA== X-Google-Smtp-Source: ABdhPJzLgqy2yMNKTlIe79dYdP9ecnMteA4MDflLyeovzM4jbZpkmJFwt1g4uezdFbuSpxNAMHAIKXSsLxKu0DvXJ3I= 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.