Re: linux-next: build failure after merge of the kvm tree

From: Stephen Rothwell
Date: Thu Apr 11 2024 - 23:35:30 EST


Hi all,

On Fri, 12 Apr 2024 13:34:07 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> After merging the kvm tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> kernel/events/uprobes.c: In function '__replace_page':
> kernel/events/uprobes.c:160:35: error: storage size of 'range' isn't known
> 160 | struct mmu_notifier_range range;
> | ^~~~~
> kernel/events/uprobes.c:162:9: error: implicit declaration of function 'mmu_notifier_range_init' [-Werror=implicit-function-declaration]
> 162 | mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm, addr,
> | ^~~~~~~~~~~~~~~~~~~~~~~
> kernel/events/uprobes.c:162:41: error: 'MMU_NOTIFY_CLEAR' undeclared (first use in this function)
> 162 | mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm, addr,
> | ^~~~~~~~~~~~~~~~
> kernel/events/uprobes.c:162:41: note: each undeclared identifier is reported only once for each function it appears in
> kernel/events/uprobes.c:175:9: error: implicit declaration of function 'mmu_notifier_invalidate_range_start' [-Werror=implicit-function-declaration]
> 175 | mmu_notifier_invalidate_range_start(&range);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kernel/events/uprobes.c:208:9: error: implicit declaration of function 'mmu_notifier_invalidate_range_end' [-Werror=implicit-function-declaration]
> 208 | mmu_notifier_invalidate_range_end(&range);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kernel/events/uprobes.c:160:35: warning: unused variable 'range' [-Wunused-variable]
> 160 | struct mmu_notifier_range range;
> | ^~~~~
> cc1: some warnings being treated as errors
>
> Caused by commit
>
> b06d4c260e93 ("mm: replace set_pte_at_notify() with just set_pte_at()")
>
> I have applied the following patial revert for today.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 12 Apr 2024 13:27:20 +1000
Subject: [PATCH] fix up for "mm: replace set_pte_at_notify() with just
set_pte_at()"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
kernel/events/uprobes.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index f4523b95c945..1215bc299390 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -18,6 +18,7 @@
#include <linux/sched/coredump.h>
#include <linux/export.h>
#include <linux/rmap.h> /* anon_vma_prepare */
+#include <linux/mmu_notifier.h>
#include <linux/swap.h> /* folio_free_swap */
#include <linux/ptrace.h> /* user_enable_single_step */
#include <linux/kdebug.h> /* notifier mechanism */
--
2.43.0

--
Cheers,
Stephen Rothwell

Attachment: pgpuplHHf6QxI.pgp
Description: OpenPGP digital signature