[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210519192211.GI21560@worktop.programming.kicks-ass.net>
Date: Wed, 19 May 2021 21:22:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>, lkft-triage@...ts.linaro.org,
Andrew Morton <akpm@...ux-foundation.org>,
Ira Weiny <ira.weiny@...el.com>,
Oliver Sang <oliver.sang@...el.com>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
x86@...nel.org, Kalesh Singh <kaleshsingh@...gle.com>
Subject: Re: BUG: unable to handle page fault for address - EIP:
__kmap_local_page_prot
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)
{
Powered by blists - more mailing lists