Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1364122imm; Fri, 29 Jun 2018 17:05:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIHjKNIOtlZBMdu5poB7VuRWKkiYEaUA61Z61+Qp96C81OIU5p9/VNg79Nya/a/Dfwupei3 X-Received: by 2002:a17:902:5ac3:: with SMTP id g3-v6mr16682021plm.90.1530317116645; Fri, 29 Jun 2018 17:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530317116; cv=none; d=google.com; s=arc-20160816; b=rLoXJ/gzLZHetFnAJFEY6sCtyiUCMHTGh4l4ZjhsPcCgYYjqCuw66aHCCq3XoaAihR JOwEgnhFsiVRzHsLUSUZDGgTmuMZOt0wA/dwc8sG5xZwld5IN3K6dBalignJScQU/Kym YWr25mw7ZSVkxVFj4b2SbtB2yhz4sYD4lbwkWXYxkLMDDSSM6Qk7AAON2fPwkxXeK1Q5 KR5uon9KM3cHRnKM9Y4b3SXUl6SZivaUoP22EVCOdvxZizdu+S9JhaS5Ev3+Lnsx3Srs bSPEFn/HqnFD/uXFjqEJRrGUJxHTQsZsglklyvctmjJBVJEIcExWV3f2fybPp4DTNYlE QJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=OGSlN+qX5Kufyj48i3qEIjpPixV+WFdwxxqcrVwezDA=; b=0oYNSbRb3aklHoMR8I28j4cA1jHmWYty9XRoVt+XdhULHcm5Hu3Vw6FGtfXgGHdNsc pnB68ByWPH/15NGgkx6eck0T1XHc3XImgRFvf0BUlXIC4cpdCb5xsBmfx37/E25eXLty RGECrJRsLroVXnQNfsdL00WpqOfeNbYLVkRqW8KLwoyURYCerQBFU6LMdp0ruO5aBIKI o4OPnJ2zh70615idfoyjCte5APDgwxmq9hjoMjmkMxvlgBv7+9GjmxsOOSMzf0vek+ut V7t70Fu2Fo0/X3TxlAYy/natzryraOiz4yQ00L35fXk+WnPdbQ+q5Zi/BroFeWk65Ktl i+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EG7p425C; 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 e128-v6si7272102pfg.35.2018.06.29.17.05.02; Fri, 29 Jun 2018 17:05:16 -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=pass header.i=@linux-foundation.org header.s=google header.b=EG7p425C; 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 S1030381AbeF2VCA (ORCPT + 99 others); Fri, 29 Jun 2018 17:02:00 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:39742 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936446AbeF2VB5 (ORCPT ); Fri, 29 Jun 2018 17:01:57 -0400 Received: by mail-it0-f65.google.com with SMTP id p185-v6so4662314itp.4 for ; Fri, 29 Jun 2018 14:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OGSlN+qX5Kufyj48i3qEIjpPixV+WFdwxxqcrVwezDA=; b=EG7p425CFWWF2fOgjmh6FrJgJEerpUDV411bZ+eIzPuL56f6pW+aUD+dZPQdYb13b0 tHE8Mx0IgGJm8k2RABgkBtXZa9opDa3LlZbKHC7TgXWC2i/Pic07IP05KgGrvzsIkaLp Awmq/gE21EGKN6n1qPfn2Pf6PUN1WxuBkPQxA= 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; bh=OGSlN+qX5Kufyj48i3qEIjpPixV+WFdwxxqcrVwezDA=; b=AO/57Vf2AC1o+kPgfpjodNek8I3thKi7coaTE/LhdQ+SH6XOVjKXtjcYCgUA8GF6rp 6CjsSWevwoI5FPPsNp1l3yJH0UV5Exqnt9d9NZj5rzTU9YFuNVTnfnxHG9lL4tgniypa 5vCoolGWiMUNB2ItLBjy0HK6Fp1wG2kx4QMUAlDDfmL903xW/LlIUdcebCZNI+r5p1Sk c/QVbe0ShimPtvA66ndfOYqLQWzGLlLKAbKg4KK4+sKCLDhwOokQWShBUjVWiTiRqqAa 8eNaEXwZqg9kLiRNM/5bevKj6j/lAz2YbdJLg6jwjzWJKF4gSkQ5AU80FjRB0YUWdWSk cPMQ== X-Gm-Message-State: APt69E32XYFUjS0WTKvJxtLjyI48+YeqFIPYDLXBiO/+tYvNHUq2175q L7wk9aHw29XyhD90rga5B/cXzInQ5incnuKLNkI= X-Received: by 2002:a02:1bdc:: with SMTP id 89-v6mr13369452jas.72.1530306117131; Fri, 29 Jun 2018 14:01:57 -0700 (PDT) MIME-Version: 1.0 References: <99169786-61dd-b19c-ac81-84bcd0a67de4@lwfinger.net> In-Reply-To: <99169786-61dd-b19c-ac81-84bcd0a67de4@lwfinger.net> From: Linus Torvalds Date: Fri, 29 Jun 2018 14:01:46 -0700 Message-ID: Subject: Re: [Update] Regression in 4.18 - 32-bit PowerPC crashes on boot - bisected to commit 1d40a5ea01d5 To: Larry Finger 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Linus