From: Jessica Yu <jeyu@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
open list <linux-kernel@vger.kernel.org>,
live-patching@vger.kernel.org
Subject: Re: [PATCH 2/7] modules: mark find_symbol static
Date: Wed, 29 Jul 2020 18:13:18 +0200 [thread overview]
Message-ID: <20200729161318.GA30898@linux-8ccs> (raw)
In-Reply-To: <20200729062711.13016-3-hch@lst.de>
+++ Christoph Hellwig [29/07/20 08:27 +0200]:
>find_symbol is only used in module.c.
>
>Signed-off-by: Christoph Hellwig <hch@lst.de>
CCing the livepatching ML, as this may or may not impact its users.
AFAIK, the out-of-tree kpatch module had used find_symbol() in the
past, I am not sure what its current status is. I suspect all of its
functionality has been migrated to upstream livepatch already.
>---
> include/linux/module.h | 11 -----------
> kernel/module.c | 3 +--
> 2 files changed, 1 insertion(+), 13 deletions(-)
>
>diff --git a/include/linux/module.h b/include/linux/module.h
>index f1fdbeef2153a8..90bdc362be3681 100644
>--- a/include/linux/module.h
>+++ b/include/linux/module.h
>@@ -590,17 +590,6 @@ struct symsearch {
> bool unused;
> };
>
>-/*
>- * Search for an exported symbol by name.
>- *
>- * Must be called with module_mutex held or preemption disabled.
>- */
>-const struct kernel_symbol *find_symbol(const char *name,
>- struct module **owner,
>- const s32 **crc,
>- bool gplok,
>- bool warn);
>-
> /*
> * Walk the exported symbol table
> *
>diff --git a/kernel/module.c b/kernel/module.c
>index 17d64dae756c80..84da96a6d8241c 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -585,7 +585,7 @@ static bool find_exported_symbol_in_section(const struct symsearch *syms,
>
> /* Find an exported symbol and return it, along with, (optional) crc and
> * (optional) module which owns it. Needs preempt disabled or module_mutex. */
>-const struct kernel_symbol *find_symbol(const char *name,
>+static const struct kernel_symbol *find_symbol(const char *name,
> struct module **owner,
> const s32 **crc,
> bool gplok,
>@@ -608,7 +608,6 @@ const struct kernel_symbol *find_symbol(const char *name,
> pr_debug("Failed to find symbol %s\n", name);
> return NULL;
> }
>-EXPORT_SYMBOL_GPL(find_symbol);
>
> /*
> * Search for module by name: must hold module_mutex (or preempt disabled
>--
>2.27.0
>
next parent reply other threads:[~2020-07-29 16:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200729062711.13016-1-hch@lst.de>
[not found] ` <20200729062711.13016-3-hch@lst.de>
2020-07-29 16:13 ` Jessica Yu [this message]
2020-07-29 16:24 ` [PATCH 2/7] modules: mark find_symbol static Greg Kroah-Hartman
2020-07-29 17:06 ` Christoph Hellwig
2020-07-29 17:25 ` Joe Lawrence
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=20200729161318.GA30898@linux-8ccs \
--to=jeyu@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
/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).