Re: [PATCH v5 04/23] mm/ksw: add build system support
From: Jinchao Wang
Date: Wed Sep 24 2025 - 22:05:46 EST
On Wed, Sep 24, 2025 at 10:06:10AM -0700, Randy Dunlap wrote:
>
>
> On 9/24/25 4:50 AM, Jinchao Wang wrote:
> > Add Kconfig and Makefile infrastructure.
> >
> > The implementation is located under `mm/kstackwatch/`.
> >
> > Signed-off-by: Jinchao Wang <wangjinchao600@xxxxxxxxx>
> > ---
> > mm/Kconfig.debug | 8 ++++++++
> > mm/Makefile | 1 +
> > mm/kstackwatch/Makefile | 2 ++
> > mm/kstackwatch/kernel.c | 23 +++++++++++++++++++++++
> > mm/kstackwatch/kstackwatch.h | 5 +++++
> > mm/kstackwatch/stack.c | 1 +
> > mm/kstackwatch/watch.c | 1 +
> > 7 files changed, 41 insertions(+)
> > create mode 100644 mm/kstackwatch/Makefile
> > create mode 100644 mm/kstackwatch/kernel.c
> > create mode 100644 mm/kstackwatch/kstackwatch.h
> > create mode 100644 mm/kstackwatch/stack.c
> > create mode 100644 mm/kstackwatch/watch.c
> >
> > diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> > index 32b65073d0cc..89be351c0be5 100644
> > --- a/mm/Kconfig.debug
> > +++ b/mm/Kconfig.debug
> > @@ -309,3 +309,11 @@ config PER_VMA_LOCK_STATS
> > overhead in the page fault path.
> >
> > If in doubt, say N.
> > +
> > +config KSTACK_WATCH
> > + bool "Kernel Stack Watch"
> > + depends on HAVE_HW_BREAKPOINT && KPROBES && FPROBE && STACKTRACE
> > + help
> > + A lightweight real-time debugging tool to detect stack corrupting.
>
> corruption.
Thanks, will fix in next version.
>
> > +
> > + If unsure, say N.
>
>
> --
> ~Randy
>
--
Jinchao