From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jessica Yu <jeyu@kernel.org>
Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org
Subject: Re: [PATCH] module: exclude SHN_UNDEF symbols from kallsyms api
Date: Tue, 5 Jun 2018 08:57:01 -0500 [thread overview]
Message-ID: <20180605135701.hfoxr5tkz7svmwkn@treble> (raw)
In-Reply-To: <20180605084223.20556-1-jeyu@kernel.org>
On Tue, Jun 05, 2018 at 10:42:23AM +0200, Jessica Yu wrote:
> Livepatch modules are special in that we preserve their entire symbol
> tables in order to be able to apply relocations after module load. The
> unwanted side effect of this is that undefined (SHN_UNDEF) symbols of
> livepatch modules are accessible via the kallsyms api and this can
> confuse symbol resolution in livepatch (klp_find_object_symbol()) and
> cause subtle bugs in livepatch.
>
> Have the module kallsyms api skip over SHN_UNDEF symbols. These symbols
> are usually not available for normal modules anyway as we cut down their
> symbol tables to just the core (non-undefined) symbols, so this should
> really just affect livepatch modules. Note that this patch doesn't
> affect the display of undefined symbols in /proc/kallsyms.
>
> Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
> Tested-by: Josh Poimboeuf <jpoimboe@redhat.com>
> Signed-off-by: Jessica Yu <jeyu@kernel.org>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
next prev parent reply other threads:[~2018-06-05 13:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 8:42 [PATCH] module: exclude SHN_UNDEF symbols from kallsyms api Jessica Yu
2018-06-05 13:57 ` Josh Poimboeuf [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-02 17:32 /proc/kallsyms shows undefined symbols for livepatch modules Josh Poimboeuf
2018-06-04 8:05 ` Jessica Yu
2018-06-04 9:54 ` Jessica Yu
2018-06-04 13:01 ` [PATCH] module: exclude SHN_UNDEF symbols from kallsyms api Jessica Yu
2018-06-04 13:16 ` Josh Poimboeuf
2018-06-04 14:05 ` Jessica Yu
2018-06-04 14:54 ` Josh Poimboeuf
2018-06-04 22:56 ` Josh Poimboeuf
2018-06-04 23:02 ` Josh Poimboeuf
2018-06-05 7:39 ` Jessica Yu
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=20180605135701.hfoxr5tkz7svmwkn@treble \
--to=jpoimboe@redhat.com \
--cc=jeyu@kernel.org \
--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).