diff mbox series

[v8,12/13] module: Move kdb_modules list out of core code

Message ID 20220222141303.1392190-13-atomlin@redhat.com (mailing list archive)
State Superseded
Headers show
Series module: core code clean up | expand

Commit Message

Aaron Tomlin Feb. 22, 2022, 2:13 p.m. UTC
No functional change.

This patch migrates kdb_modules list to core kdb code
since the list of added/or loaded modules is no longer
private.

Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
---
 kernel/debug/kdb/kdb_main.c    | 5 +++++
 kernel/debug/kdb/kdb_private.h | 4 ----
 kernel/module/main.c           | 4 ----
 3 files changed, 5 insertions(+), 8 deletions(-)

Comments

Christophe Leroy Feb. 22, 2022, 6:05 p.m. UTC | #1
+ Daniel and Jason.

The full series is available at 
https://patchwork.kernel.org/project/linux-modules/list/?series=616741&state=*

Le 22/02/2022 à 15:13, Aaron Tomlin a écrit :
> No functional change.
> 
> This patch migrates kdb_modules list to core kdb code
> since the list of added/or loaded modules is no longer
> private.
> 
> Signed-off-by: Aaron Tomlin <atomlin@redhat.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   kernel/debug/kdb/kdb_main.c    | 5 +++++
>   kernel/debug/kdb/kdb_private.h | 4 ----

This patch (and the cover letter) should be copied to KDB maintainers 
and KDB list

You can use the following command to findout who they are:

[chleroy@PO20335 linux-powerpc]$ ./scripts/get_maintainer.pl -f 
kernel/debug/kdb/kdb_main.c
Jason Wessel <jason.wessel@windriver.com> (maintainer:KGDB / KDB 
/debug_core)
Daniel Thompson <daniel.thompson@linaro.org> (maintainer:KGDB / KDB 
/debug_core,commit_signer:11/14=79%)
Douglas Anderson <dianders@chromium.org> (reviewer:KGDB / KDB 
/debug_core,commit_signer:8/14=57%)
kgdb-bugreport@lists.sourceforge.net (open list:KGDB / KDB /debug_core)
linux-kernel@vger.kernel.org (open list)


>   kernel/module/main.c           | 4 ----
>   3 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
> index 0852a537dad4..5369bf45c5d4 100644
> --- a/kernel/debug/kdb/kdb_main.c
> +++ b/kernel/debug/kdb/kdb_main.c
> @@ -59,6 +59,11 @@ EXPORT_SYMBOL(kdb_grepping_flag);
>   int kdb_grep_leading;
>   int kdb_grep_trailing;
>   
> +#ifdef CONFIG_MODULES
> +extern struct list_head modules;
> +static struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
> +#endif /* CONFIG_MODULES */
> +
>   /*
>    * Kernel debugger state flags
>    */
> diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h
> index 0d2f9feea0a4..1f8c519a5f81 100644
> --- a/kernel/debug/kdb/kdb_private.h
> +++ b/kernel/debug/kdb/kdb_private.h
> @@ -226,10 +226,6 @@ extern void kdb_kbd_cleanup_state(void);
>   #define kdb_kbd_cleanup_state()
>   #endif /* ! CONFIG_KDB_KEYBOARD */
>   
> -#ifdef CONFIG_MODULES
> -extern struct list_head *kdb_modules;
> -#endif /* CONFIG_MODULES */
> -
>   extern char kdb_prompt_str[];
>   
>   #define	KDB_WORD_SIZE	((int)sizeof(unsigned long))
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index b8a59b5c3e3a..bcc4f7a82649 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -108,10 +108,6 @@ static void mod_update_bounds(struct module *mod)
>   		__mod_update_bounds(mod->init_layout.base, mod->init_layout.size);
>   }
>   
> -#ifdef CONFIG_KGDB_KDB
> -struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
> -#endif /* CONFIG_KGDB_KDB */
> -
>   static void module_assert_mutex_or_preempt(void)
>   {
>   #ifdef CONFIG_LOCKDEP
diff mbox series

Patch

diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 0852a537dad4..5369bf45c5d4 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -59,6 +59,11 @@  EXPORT_SYMBOL(kdb_grepping_flag);
 int kdb_grep_leading;
 int kdb_grep_trailing;
 
+#ifdef CONFIG_MODULES
+extern struct list_head modules;
+static struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
+#endif /* CONFIG_MODULES */
+
 /*
  * Kernel debugger state flags
  */
diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h
index 0d2f9feea0a4..1f8c519a5f81 100644
--- a/kernel/debug/kdb/kdb_private.h
+++ b/kernel/debug/kdb/kdb_private.h
@@ -226,10 +226,6 @@  extern void kdb_kbd_cleanup_state(void);
 #define kdb_kbd_cleanup_state()
 #endif /* ! CONFIG_KDB_KEYBOARD */
 
-#ifdef CONFIG_MODULES
-extern struct list_head *kdb_modules;
-#endif /* CONFIG_MODULES */
-
 extern char kdb_prompt_str[];
 
 #define	KDB_WORD_SIZE	((int)sizeof(unsigned long))
diff --git a/kernel/module/main.c b/kernel/module/main.c
index b8a59b5c3e3a..bcc4f7a82649 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -108,10 +108,6 @@  static void mod_update_bounds(struct module *mod)
 		__mod_update_bounds(mod->init_layout.base, mod->init_layout.size);
 }
 
-#ifdef CONFIG_KGDB_KDB
-struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
-#endif /* CONFIG_KGDB_KDB */
-
 static void module_assert_mutex_or_preempt(void)
 {
 #ifdef CONFIG_LOCKDEP