Skip to contentSkip to conversation

KVM: arm64:Use #include <linux/kprobes.h> instead of <asm/kprobes.h>

PATCH In review [email protected] 2 participants 2 messages Jul 14, 2023 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 KVM: arm64:Use #include <linux/kprobes.h> instead of <asm/kprobes.h>

Since <asm/kprobes.h> is a kernel-proprietary header file, it should not be included by user-space programs.
And <linux/kprobes.h> is a public header file, which provides some functions for registering
and unregistering probes

---
 arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/vhe/sysreg-sr.c +1 -1
index b35a178e7e0d..072471df8b1b 100644
@@ -9,7 +9,7 @@
 #include <linux/compiler.h>
 #include <linux/kvm_host.h>
 
-#include <asm/kprobes.h>
+#include <linux/kprobes.h>
 #include <asm/kvm_asm.h>
 #include <asm/kvm_emulate.h>
 #include <asm/kvm_hyp.h>
maintainer
#2 lore raw
Quoted 3 lines · On Fri, 14 Jul 2023 05:57:42 +0100, [email protected] wrote:

Since <asm/kprobes.h> is a kernel-proprietary header file, it should not be included by user-space programs.

There is no userspace involved here.

Quoted 3 lines

And <linux/kprobes.h> is a public header file,
which provides some functions for registering
and unregistering probes

How is that relevant? Have you checked *why* we're including this file?

Quoted 12 lines
---
 arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/vhe/sysreg-sr.c +0 -0
index b35a178e7e0d..072471df8b1b 100644

arch/arm64/kvm/hyp/vhe/sysreg-sr.c line 12

Quoted 5 lines
arch/arm64/kvm/hyp/vhe/sysreg-sr.c +1 -1
@@ -9,7 +9,7 @@
 #include <linux/compiler.h>
 #include <linux/kvm_host.h>
 
-#include <asm/kprobes.h>
+#include <linux/kprobes.h>

And this is at the wrong thing to do.

arch/arm64/kvm/hyp/vhe/sysreg-sr.c line 15

Quoted 4 lines
arch/arm64/kvm/hyp/vhe/sysreg-sr.c +0 -0
 #include <asm/kvm_asm.h>
 #include <asm/kvm_emulate.h>
 #include <asm/kvm_hyp.h>

I'd rather you *stop* sending these patches. There is no justification for them, and you keep doing the wrong thing.

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.