Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1475644imm; Fri, 29 Jun 2018 20:12:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcIG9kNnlDjtjG8hE9sfV1nWpQNPTn//YFiDxOeb8kNC7ZoauJvVVoqiScR5+H9+ZYnVWrE X-Received: by 2002:a65:4344:: with SMTP id k4-v6mr3323730pgq.409.1530328323487; Fri, 29 Jun 2018 20:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530328323; cv=none; d=google.com; s=arc-20160816; b=MFhW4kOwuXhOXNhk8WmjuPw+pT8ams9Xy35J81/gsIvJD6YY5yKGzgfD6v5eHhX0jH XwAjmTFXtsaQ2t0qHyEsc9RxIop1Vf/DLpvmgGfDnyjExWpJa7bSrJqcPb4bCmrQCa47 N/O1ddE3JlVJGaZu1lhuGrciBvA0asP7quJFRnKcQolRie7ehezE5anlXEghB626NuCW OcAjZtkQ1YTPl3IrbUlY4UEP7XM+cN6OQT6vAH41KJ+U1erOR5V4+/hPPYlU8MZybND3 QlSEfccQgSqUy7bNnZDOa+DXwwVB7bnluGmz+zcoqrCo8bKGzBtbFWniYTralF/Y+MSR P9tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:dkim-signature :arc-authentication-results; bh=BXhAU5oFwCqKyf49nwqDkKNVQZonXOg4Y/SELWyvXzE=; b=TyS4ob/6uehCpNONhOjeAJAll4vQffmFj0KT1OIniK4L9ib79zWtlhVaO79oPwNDqY QvukQIMTB1Qu7kAxosE67cZPr5rV7JELnicYihOLzUQCirPZg6UsQM9AiBWcwrwYmk9/ 1uq1coxyGSDvCTrXLX311kJEgCuCZ0TlhQo32myc7ZELwK40KdwGMZyIVZUjDCtsQx1E mq+BNACbnxqXTUczX11jU4ASszKAMxG49rfZ0GcGuuSRUfoUe/4+U7wKdfa6gsPraRnn XpvJaI7b9NHvAEZfoarIhqej9Xx3daYO7NPx8cFOHwBVKCfSeX+oIowA0FY5yUqyYObg aA5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=n9DipE4C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si10878668pfa.113.2018.06.29.20.11.49; Fri, 29 Jun 2018 20:12:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=n9DipE4C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965564AbeF3CiX (ORCPT + 99 others); Fri, 29 Jun 2018 22:38:23 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:39063 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965153AbeF3CiK (ORCPT ); Fri, 29 Jun 2018 22:38:10 -0400 Received: by mail-ot0-f194.google.com with SMTP id l15-v6so11913365oth.6 for ; Fri, 29 Jun 2018 19:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BXhAU5oFwCqKyf49nwqDkKNVQZonXOg4Y/SELWyvXzE=; b=n9DipE4CCr5OkM2Y2F666mzCAfvUBdAPtgWWiaPSfHtaQxImY0muVNdphuvpylKHZR mcmAZXdy8/mFgCr8xlN33LH4Mpikz+TQFZVZsuG15oDKjl8oY5SK1e+qD35BTQbWu+mW aFMmUJ4xx31p2gi+i7CvyTjCzzO6H58OFp/k8ak52tZWg0ETwh+srb0IQ7y1cvyq5y3z RH839UOTPE+BMwcEVNp/JESsCuD6LeiEYJj4R19IGZh/uU+zS3SPRzNxWDX3En/tnm0X Gvl2n/0K8EyT4+AcrZ8dat6sXsCnoEX3WiuqVE9Nf82MciFvE/PNmnRSxn7QioTQOryM of6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BXhAU5oFwCqKyf49nwqDkKNVQZonXOg4Y/SELWyvXzE=; b=tLDPKpU2TA7+vXqL2Ppg3Wnyd6MIGABPzOiRkSa53fRcDPXkgZ+NZwsBVPR6NScX8F NJIoSn++YQwu7/EUm0ZHJxsq/ubuZAuOOrQDAgbrwngePLwOzUdr8VzNeqcpTetO42Aj KseugzJF4gMBOPWEKYjyR9OT96puPjVyAd9l6HtK6qJbjLwjns+7jlKN5+gBLN/FIGGF hak7IL0uWVXxHRkR5p/wjyI6lT1bxPeW8IISmwOnuMI1X5Nikv860WmT2v3s1sV6VFKn qcBpTSt+dquYxNVuJayvqqRMoOd41dTR5Kztk7ymh+aWHH4CUmYoUXJLilNW8MSdQX3E TkiA== X-Gm-Message-State: APt69E3Dr696yu5k5ZxCu2HZV8E2zCab9QWOKZ1NpMiuTz782wXqA2/+ nbrLHrDp+7FisUtay6MDmQe+Pw== X-Received: by 2002:a9d:5c0c:: with SMTP id o12-v6mr9471089otk.83.1530326289758; Fri, 29 Jun 2018 19:38:09 -0700 (PDT) Received: from [192.168.1.107] (cpe-24-31-253-228.kc.res.rr.com. [24.31.253.228]) by smtp.gmail.com with ESMTPSA id 91-v6sm5569494otr.74.2018.06.29.19.38.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 19:38:09 -0700 (PDT) From: Denise Finger X-Google-Original-From: Denise Finger Subject: Re: [Update] Regression in 4.18 - 32-bit PowerPC crashes on boot - bisected to commit 1d40a5ea01d5 To: Linus Torvalds Cc: Matthew Wilcox , "Kirill A. Shutemov" , Vlastimil Babka , Christoph Lameter , Dave Hansen , Jerome Glisse , Lai Jiangshan , Martin Schwidefsky , Pekka Enberg , Randy Dunlap , Andrey Ryabinin , Andrew Morton , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , ppc-dev , Linux Kernel Mailing List References: <99169786-61dd-b19c-ac81-84bcd0a67de4@lwfinger.net> Message-ID: Date: Fri, 29 Jun 2018 21:38:07 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/29/2018 04:01 PM, Linus Torvalds wrote: > On Fri, Jun 29, 2018 at 1:42 PM Larry Finger wrote: >> >> I have more information regarding this BUG. Line 700 of page-flags.h is the >> macro PAGE_TYPE_OPS(Table, table). For further debugging, I manually expanded >> the macro, and found that the bug line is VM_BUG_ON_PAGE(!PageTable(page), page) >> in routine __ClearPageTable(), which is called from pgtable_page_dtor() in >> include/linux/mm.h. I also added a printk call to PageTable() that logs >> page->page_type. The routine was called twice. The first had page_type of >> 0xfffffbff, which would have been expected for a . The second call had >> 0xffffffff, which led to the BUG. > > So it looks to me like the tear-down of the page tables first found a > page that is indeed a page table, and cleared the page table bit > (well, it set it - the bits are reversed). > > Then it took an exception (that "interrupt: 700") and that causes > do_exit() again, and it tries to free the same page table - and now > it's no longer marked as a page table, because it already went through > the __ClearPageTable() dance once. > > So on the second path through, it catches that "the bit already said > it wasn't a page table" and does the BUG. > > But the real question is what the problem was the *first* time around. > I assume that has scrolled off the screen? This part: > > _exception_pkey+0x58/0x128 > ret_from_except_full+0x0/0x4 > --- interrupt: 700 at free_pgd_range+0x19c/0x30c > LR = free_pgd_range+0x19c/0x30c > free_pgtables+0xa/0xb > exit_mnap+0xf4/0x16c > mmput+0x64/0xf0 > > Does reverting that commit 1d40a5ea01d5 make everything work for you? > Because if so, judging by the deafening silence on this so far, I > think that's what we should do. > > That said, can some ppc person who knows the 32-bit ppc code and maybe > knows what that "interrupt: 700" means talk about that oddity in the > trace, please? The deafening silence may be due to my having an old Microsoft address for Matthew Wilcox in my first posting. He should now have received the BUG report, and he may have some suggestions. Yes, reverting commit 1d40a5ea01d5 does permit the box to boot. Kirill's patch also works, which seems like a better solution. If any other architecture bugs on boot, at least we will know where to look. :) @Kirill: You may add a Reported-by: and Tested-by: Larry Finger to the patch. Thanks for the help, Larry