2023-07-04 02:40:19

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the mm tree

Hi all,

After merging the origin tree, today's linux-next build (arm64 defconfig)
failed like this:

arch/arm64/mm/fault.c: In function 'do_page_fault':
arch/arm64/mm/fault.c:624:9: error: 'vma' undeclared (first use in this function); did you mean 'vmap'?
624 | vma = lock_mm_and_find_vma(mm, addr, regs);
| ^~~:
| vmap

Caused by commit

ae870a68b5d1 ("arm64/mm: Convert to using lock_mm_and_find_vma()")

interacting with commit

1e72a0774792 ("mm: disable CONFIG_PER_VMA_LOCK by default until its fixed")

from the mm tree.

I applied the following for today (but have no idea if it is correct).

From: Stephen Rothwell <[email protected]>
Date: Tue, 4 Jul 2023 12:14:37 +1000
Subject: [PATCH] fix up for "arm64/mm: Convert to using lock_mm_and_find_vma()"

Signed-off-by: Stephen Rothwell <[email protected]>
---
arch/arm64/mm/fault.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 9d78ff78b0e3..b8c80f7b8a5f 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -536,9 +536,7 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
unsigned long vm_flags;
unsigned int mm_flags = FAULT_FLAG_DEFAULT;
unsigned long addr = untagged_addr(far);
-#ifdef CONFIG_PER_VMA_LOCK
struct vm_area_struct *vma;
-#endif

if (kprobe_page_fault(regs, esr))
return 0;
--
2.39.2

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (495.00 B)
OpenPGP digital signature

2023-07-04 03:16:23

by Linus Torvalds

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the mm tree

On Mon, 3 Jul 2023 at 19:23, Stephen Rothwell <[email protected]> wrote:
>
> After merging the origin tree, today's linux-next build (arm64 defconfig)
> failed like this:
>
> arch/arm64/mm/fault.c: In function 'do_page_fault':

Yup, SeongJae Park sent me the same report, and it just made it to
top-of-tree as commit 24be4d0b46bb ("arch/arm64/mm/fault: Fix
undeclared variable error in do_page_fault()")

This was actually an architecture I test myself, but I think UP ends
up turning off CONFIG_PER_VMA_LOCK.

I do wonder how much point there is to have a non-SMP build of
architectures like x86-64 and arm64 at all...

But I guess people still run them in qemu.

Linus

2023-07-04 06:22:02

by Suren Baghdasaryan

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the mm tree

On Tue, Jul 4, 2023 at 2:33 AM Linus Torvalds
<[email protected]> wrote:
>
> On Mon, 3 Jul 2023 at 19:23, Stephen Rothwell <[email protected]> wrote:
> >
> > After merging the origin tree, today's linux-next build (arm64 defconfig)
> > failed like this:
> >
> > arch/arm64/mm/fault.c: In function 'do_page_fault':
>
> Yup, SeongJae Park sent me the same report, and it just made it to
> top-of-tree as commit 24be4d0b46bb ("arch/arm64/mm/fault: Fix
> undeclared variable error in do_page_fault()")

Thanks for fixing that! I hope to turn CONFIG_PER_VMA_LOCK back on soon.

>
> This was actually an architecture I test myself, but I think UP ends
> up turning off CONFIG_PER_VMA_LOCK.

Yes, CONFIG_PER_VMA_LOCK depends on SMP.

>
> I do wonder how much point there is to have a non-SMP build of
> architectures like x86-64 and arm64 at all...
>
> But I guess people still run them in qemu.
>
> Linus