From: Aaron Tomlin <atomlin@redhat.com>
To: mcgrof@kernel.org, christophe.leroy@csgroup.eu
Cc: cl@linux.com, pmladek@suse.com, mbenes@suse.cz,
akpm@linux-foundation.org, jeyu@kernel.org,
linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org,
void@manifault.com, atomlin@atomlin.com, allen.lkml@gmail.com,
joe@perches.com, msuchanek@suse.de, oleksandr@natalenko.name
Subject: [PATCH v8 12/13] module: Move kdb_modules list out of core code
Date: Tue, 22 Feb 2022 14:13:02 +0000 [thread overview]
Message-ID: <20220222141303.1392190-13-atomlin@redhat.com> (raw)
In-Reply-To: <20220222141303.1392190-1-atomlin@redhat.com>
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(-)
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
--
2.34.1
next prev parent reply other threads:[~2022-02-22 14:14 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 14:12 [PATCH v8 00/13] module: core code clean up Aaron Tomlin
2022-02-22 14:12 ` [PATCH v8 01/13] module: Move all into module/ Aaron Tomlin
2022-02-22 17:58 ` Christophe Leroy
2022-02-22 20:00 ` Allen
2022-02-22 14:12 ` [PATCH v8 02/13] module: Simple refactor in preparation for split Aaron Tomlin
2022-02-22 17:58 ` Christophe Leroy
2022-02-22 14:12 ` [PATCH v8 03/13] module: Make internal.h and decompress.c more compliant Aaron Tomlin
2022-02-22 14:12 ` [PATCH v8 04/13] module: Move livepatch support to a separate file Aaron Tomlin
2022-02-22 17:58 ` Christophe Leroy
2022-02-25 9:34 ` Petr Mladek
2022-02-25 10:33 ` Aaron Tomlin
2022-02-25 16:49 ` Christophe Leroy
2022-02-28 10:56 ` Petr Mladek
2022-02-28 11:46 ` Christophe Leroy
2022-02-28 13:05 ` Petr Mladek
2022-02-22 14:12 ` [PATCH v8 05/13] module: Move latched RB-tree " Aaron Tomlin
2022-02-22 17:58 ` Christophe Leroy
2022-02-22 14:12 ` [PATCH v8 06/13] module: Move strict rwx " Aaron Tomlin
2022-02-22 17:59 ` Christophe Leroy
2022-02-22 14:12 ` [PATCH v8 07/13] module: Move extra signature support out of core code Aaron Tomlin
2022-02-22 17:59 ` Christophe Leroy
2022-02-22 14:12 ` [PATCH v8 08/13] module: Move kmemleak support to a separate file Aaron Tomlin
2022-02-22 17:59 ` Christophe Leroy
2022-02-22 14:12 ` [PATCH v8 09/13] module: Move kallsyms support into " Aaron Tomlin
2022-02-22 17:59 ` Christophe Leroy
2022-02-25 9:15 ` Petr Mladek
2022-02-25 9:27 ` Christophe Leroy
2022-02-25 10:15 ` Petr Mladek
2022-02-25 10:27 ` Aaron Tomlin
2022-02-25 12:21 ` Aaron Tomlin
2022-02-25 12:57 ` Christophe Leroy
2022-02-26 20:27 ` Luis Chamberlain
2022-02-28 9:02 ` Christophe Leroy
2022-02-28 9:31 ` Aaron Tomlin
2022-02-28 9:33 ` Christophe Leroy
2022-02-22 14:13 ` [PATCH v8 10/13] module: Move procfs " Aaron Tomlin
2022-02-22 17:59 ` Christophe Leroy
2022-02-22 14:13 ` [PATCH v8 11/13] module: Move sysfs " Aaron Tomlin
2022-02-22 17:59 ` Christophe Leroy
2022-02-22 14:13 ` Aaron Tomlin [this message]
2022-02-22 18:05 ` [PATCH v8 12/13] module: Move kdb_modules list out of core code Christophe Leroy
2022-02-22 14:13 ` [PATCH v8 13/13] module: Move version support into a separate file Aaron Tomlin
2022-02-22 18:06 ` Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222141303.1392190-13-atomlin@redhat.com \
--to=atomlin@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=allen.lkml@gmail.com \
--cc=atomlin@atomlin.com \
--cc=christophe.leroy@csgroup.eu \
--cc=cl@linux.com \
--cc=jeyu@kernel.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mcgrof@kernel.org \
--cc=msuchanek@suse.de \
--cc=oleksandr@natalenko.name \
--cc=pmladek@suse.com \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).