On Thu, Mar 03, 2022 at 06:16:58PM +0000, Christophe Leroy wrote: > Well .... The idea at the first place was to get rid of the #ifdef > CONFIG_KGDB_KDB in modules. > > Here you propose it the other way round. Why not, in that case that > would mean a dedicated file in kernel/module/ as part of the series > https://patchwork.kernel.org/project/linux-modules/list/?series=618917&state=* With the series you can of course move it to a new kernel/module/kdb.c. But I don't have a tree with the series applied at hand and just want to show how kdb_lsmod can live outside of kernel/debug easily.