Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1584044lkv; Wed, 19 May 2021 13:22:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiXPOqgItKx4DaRNKmLLJzephxD9LxKXSC/qoT8F6y2GJZqao+7RLrAI/ITajrZyZ+z8as X-Received: by 2002:a92:c74b:: with SMTP id y11mr1039363ilp.302.1621455721977; Wed, 19 May 2021 13:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455721; cv=none; d=google.com; s=arc-20160816; b=jlPdvqyhGhQwkCM09N8PzxAtKg5HayE5J1IOnXO61DDZXIJohcKLRwcJgYk2iXrL6M OlnT6L/Xk0NyyAXqzFWiIRPKY++fBXXaik/7+gktwWNXe2iGD9w6bayuAFAztEu5WG93 7XlOaHNxy91Rz+muvOyzzmDjhMS3lBgXoWLKj8LQBftNPOOMwwOEHMXvNlU3YSBHnVqG yJE1mb1Mp6rZEpjOSSwOVLJqatfZHRR66Mi9D2uhdzIpJAuI6RFs3bOtG0P2TWku39Jd 5fF+Pc8N+RwAUlDdz3khI/nfF/lvhrksfFXDa7MhK9CnVnQtb/cN6K8cnWJL3WWjTM09 o/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Hw79MrKuovD7etPKwxzs9sDx+CJQK+CgTkP8HwPx4jo=; b=KoCGsTtKOyM5P8KZTxr3PE5njfUQmKflHNqjsw+vo2fqXLkTuIrnAEJJOGAXJaP+3g USOTR14g2cjwOv9BaFcbrf601DVBlytazt9SGMvaONn4r0WtjPd42Ld06hcBj3wnHeQN btztm6K6a/TGFU8aHz7t+abFSuOY55kYPaW8Kty0MymABe6wBkmeVftYsLjJ5Ix2jJd8 ZOOkoeIyLcT7gVI/ZQw6kRKLE26wEbJ7vJUm7IxgrEYvTqGR4BI03LhTimvxF3s6LX5H 41Xip9fkQswViFtV1nvOyJpmu2rTLMnghcjHYlLMHIrFDg40Cw2MinDQfQC3kv+cfhjL 8Mfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gg8YOoUc; 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 t14si298187iol.93.2021.05.19.13.21.49; Wed, 19 May 2021 13:22:01 -0700 (PDT) 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=@infradead.org header.s=casper.20170209 header.b=gg8YOoUc; 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 S231880AbhEST1Q (ORCPT + 99 others); Wed, 19 May 2021 15:27:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbhEST1O (ORCPT ); Wed, 19 May 2021 15:27:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15464C06175F for ; Wed, 19 May 2021 12:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Hw79MrKuovD7etPKwxzs9sDx+CJQK+CgTkP8HwPx4jo=; b=gg8YOoUchA1EbgsIQc5qffZdB7 U3rtnd3YK2ELo192kBIdiMwVeCqJwV5jVa+NeGuaSMyND1g2DjRWI1vamjIzcckmq8MOJJXrW67Jb a31ktgfc8GD6fnY6pHIv0SmwX+sJ37JpJXtncI9A+GxxiggSFfmdNkmmYTBLh5PqHJnBamGZz6Jfo L8ia5mE8p27KIsGcakEeeXKuT2WJw9c58jG2VM63kJkXvy0EaLEF7TUvB2+XeCNiRSpd0+gCNfM/7 90RlLta/wXcuk1fCjdxqrpo8mG9Ui1Pskfkc/u8S24pv04C+ESi2PCY2zHoYkZe+rz+AjjvXAPIrm hesmdzsw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1ljRlk-00FEmP-PH; Wed, 19 May 2021 19:22:48 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id CB19D986465; Wed, 19 May 2021 21:22:11 +0200 (CEST) Date: Wed, 19 May 2021 21:22:11 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: Naresh Kamboju , LKML , linux-mm , lkft-triage@lists.linaro.org, Andrew Morton , Ira Weiny , Oliver Sang , Chaitanya Kulkarni , x86@kernel.org, Kalesh Singh Subject: Re: BUG: unable to handle page fault for address - EIP: __kmap_local_page_prot Message-ID: <20210519192211.GI21560@worktop.programming.kicks-ass.net> References: <87mtsqd0c1.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mtsqd0c1.ffs@nanos.tec.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 08:50:54PM +0200, Thomas Gleixner wrote: > On Wed, May 19 2021 at 20:38, Naresh Kamboju wrote: > > While running LTP mm test suite on i386 kernel the following warning and BUG > > reported on linux next 5.13.0-rc2-next-20210519. > > > > The warning is not regression, We have been noticing these warnings often on > > i386 > > Noticing? Did you report them? > > > but kernel BUG: looks to be a new crash. > > It's just the consequence of the problem which is pointed out by the > warning. Fix below. Maybe something like so as well? --- mm/mremap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mm/mremap.c b/mm/mremap.c index 47c255b60150..477a908bdb6b 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -210,6 +210,10 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, } #ifdef CONFIG_HAVE_MOVE_PMD +#if CONFIG_PGTABLE_LEVELS < 2 +#error "Can't very well move non-existant pgtable levels" +#endif + static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, pmd_t *old_pmd, pmd_t *new_pmd) { @@ -277,6 +281,10 @@ static inline bool move_normal_pmd(struct vm_area_struct *vma, #endif #ifdef CONFIG_HAVE_MOVE_PUD +#if CONFIG_PGTABLE_LEVELS < 3 +#error "Can't very well move non-existant pgtable levels" +#endif + static bool move_normal_pud(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, pud_t *old_pud, pud_t *new_pud) {