Skip to contentSkip to conversation

linux-next: build failure after merge of the akpm tree

PATCH Stephen Rothwell 1 participant 1 message Apr 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the akpm tree, today's linux-next build (x86_64 allmodconfig) failed like this:

arch/x86/kernel/kprobes/opt.c: In function 'arch_prepare_optimized_kprobe':
arch/x86/kernel/kprobes/opt.c:357:2: error: implicit declaration of function 'set_memory_rw' [-Werror=implicit-function-declaration]
set_memory_rw((unsigned long)buf & PAGE_MASK, 1);
^
arch/x86/kernel/kprobes/opt.c:380:2: error: implicit declaration of function 'set_memory_ro' [-Werror=implicit-function-declaration]
set_memory_ro((unsigned long)buf & PAGE_MASK, 1);
^
arch/x86/kernel/kprobes/core.c: In function 'arch_copy_kprobe':
arch/x86/kernel/kprobes/core.c:424:2: error: implicit declaration of function 'set_memory_rw' [-Werror=implicit-function-declaration]
set_memory_rw((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
^
arch/x86/kernel/kprobes/core.c:437:2: error: implicit declaration of function 'set_memory_ro' [-Werror=implicit-function-declaration]
set_memory_ro((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
^

Probably caused by commit

f276e80d1e7b ("treewide: decouple cacheflush.h and set_memory.h")

interacting with commit

d0381c81c2f7 ("kprobes/x86: Set kprobes pages read-only")

from the tip tree.

I applied this merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Tue, 18 Apr 2017 17:59:09 +1000
Subject: [PATCH] kprobes/x86: merge fix for set_memory.h decoupling

---
 arch/x86/kernel/kprobes/core.c | 1 +
 arch/x86/kernel/kprobes/opt.c  | 1 +
 2 files changed, 2 insertions(+)
arch/x86/kernel/kprobes/core.c +1 -0
index 19e1f2a6d7b0..5b2bbfbb3712 100644
@@ -61,6 +61,7 @@
 #include <asm/alternative.h>
 #include <asm/insn.h>
 #include <asm/debugreg.h>
+#include <asm/set_memory.h>
 
 #include "common.h"
 
arch/x86/kernel/kprobes/opt.c +1 -0
index 9aadff3d0902..901c640d152f 100644
@@ -37,6 +37,7 @@
 #include <asm/alternative.h>
 #include <asm/insn.h>
 #include <asm/debugreg.h>
+#include <asm/set_memory.h>
 
 #include "common.h"
 
Signature · 5 lines
2.11.0

-- 
Cheers,
Stephen Rothwell