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

From: Marc Zyngier
Date: Fri Jul 14 2023 - 04:01:07 EST


On Fri, 14 Jul 2023 05:57:42 +0100,
chenqingyun001@xxxxxxxxxx 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.

> 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?

>
> Signed-off-by: Qingyun Chen <chenqingyun001@xxxxxxxxxx>
> ---
> arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
> b/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
> index b35a178e7e0d..072471df8b1b 100644
> --- a/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
> +++ b/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
> @@ -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.

> #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.

--
Without deviation from the norm, progress is not possible.