Re: [PATCH] LoongArch: Select HAVE_DEBUG_KMEMLEAK to support kmemleak

From: Huacai Chen
Date: Tue May 09 2023 - 03:35:37 EST


On Tue, May 9, 2023 at 3:13 PM Youling Tang <tangyouling@xxxxxxxxxxx> wrote:
>
> Hi, Tiezhu
>
> On 05/09/2023 02:49 PM, Tiezhu Yang wrote:
> > We can see that DEBUG_KMEMLEAK depends on HAVE_DEBUG_KMEMLEAK after
> > commit b69ec42b1b19 ("Kconfig: clean up the long arch list for the
> > DEBUG_KMEMLEAK config option"), just select HAVE_DEBUG_KMEMLEAK to
> > support kmemleak on LoongArch.
> >
> > Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
> > ---
> >
> > This is based on 6.4-rc1
> >
> > arch/loongarch/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> > index d38b066..1e64edd 100644
> > --- a/arch/loongarch/Kconfig
> > +++ b/arch/loongarch/Kconfig
> > @@ -90,6 +90,7 @@ config LOONGARCH
> > select HAVE_ASM_MODVERSIONS
> > select HAVE_CONTEXT_TRACKING_USER
> > select HAVE_C_RECORDMCOUNT
> > + select HAVE_DEBUG_KMEMLEAK
> > select HAVE_DEBUG_STACKOVERFLOW
> > select HAVE_DMA_CONTIGUOUS
> > select HAVE_DYNAMIC_FTRACE
> >
>
> At the same time, you need to modify the loongarch in arch-support.txt
> to ok.
Agree, Tiezhu can send a new version.

>
> BTW, we can submit a separate patch to modify the features already
> supported by LoongArch.
>
> The following features are already supported in LoongArch.
I think Youling can send this patch.

Huacai
>
> diff --git
> a/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
> b/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
> index bcc29d3aba9a..38a0a54b79f5 100644
> --- a/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
> +++ b/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
> @@ -13,7 +13,7 @@
> | csky: | ok |
> | hexagon: | TODO |
> | ia64: | TODO |
> - | loongarch: | TODO |
> + | loongarch: | ok |
> | m68k: | TODO |
> | microblaze: | TODO |
> | mips: | TODO |
> diff --git a/Documentation/features/debug/kprobes/arch-support.txt
> b/Documentation/features/debug/kprobes/arch-support.txt
> index 8a77d62a42c5..aad83b57587a 100644
> --- a/Documentation/features/debug/kprobes/arch-support.txt
> +++ b/Documentation/features/debug/kprobes/arch-support.txt
> @@ -13,7 +13,7 @@
> | csky: | ok |
> | hexagon: | TODO |
> | ia64: | ok |
> - | loongarch: | TODO |
> + | loongarch: | ok |
> | m68k: | TODO |
> | microblaze: | TODO |
> | mips: | ok |
> diff --git a/Documentation/features/debug/kretprobes/arch-support.txt
> b/Documentation/features/debug/kretprobes/arch-support.txt
> index cf4723c5ac55..61380010a4a7 100644
> --- a/Documentation/features/debug/kretprobes/arch-support.txt
> +++ b/Documentation/features/debug/kretprobes/arch-support.txt
> @@ -13,7 +13,7 @@
> | csky: | ok |
> | hexagon: | TODO |
> | ia64: | ok |
> - | loongarch: | TODO |
> + | loongarch: | ok |
> | m68k: | TODO |
> | microblaze: | TODO |
> | mips: | ok |
> diff --git
> a/Documentation/features/debug/stackprotector/arch-support.txt
> b/Documentation/features/debug/stackprotector/arch-support.txt
> index 71cd4ba18f7d..4c64c5d596f7 100644
> --- a/Documentation/features/debug/stackprotector/arch-support.txt
> +++ b/Documentation/features/debug/stackprotector/arch-support.txt
> @@ -13,7 +13,7 @@
> | csky: | ok |
> | hexagon: | TODO |
> | ia64: | TODO |
> - | loongarch: | TODO |
> + | loongarch: | ok |
> | m68k: | TODO |
> | microblaze: | TODO |
> | mips: | ok |
>
> Thanks,
> Youling.
>