mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jessica Yu <jeyu@kernel.org>
Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org
Subject: /proc/kallsyms shows undefined symbols for livepatch modules
Date: Sat, 2 Jun 2018 12:32:33 -0500	[thread overview]
Message-ID: <20180602173209.merjb4o5a3wsdnbh@treble> (raw)

Hi Jessica,

I found a bug:

  [root@f25 ~]# modprobe livepatch-sample
  [root@f25 ~]# grep ' u ' /proc/kallsyms
  ffffffff81161080 u klp_enable_patch	[livepatch_sample]
  ffffffff81a01800 u __fentry__	[livepatch_sample]
  ffffffff81161250 u klp_unregister_patch	[livepatch_sample]
  ffffffff81161870 u klp_register_patch	[livepatch_sample]
  ffffffff8131f0b0 u seq_printf	[livepatch_sample]

Notice that livepatch modules' undefined symbols are showing up in
/proc/kallsyms.  This can confuse klp_find_object_symbol() which can
cause subtle bugs in livepatch.

I stared at the module kallsyms code for a bit, but I don't see the bug.
Maybe it has something to do with how we save the symbol table in
copy_module_elf().  Any ideas?

-- 
Josh

             reply	other threads:[~2018-06-02 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-02 17:32 Josh Poimboeuf [this message]
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=20180602173209.merjb4o5a3wsdnbh@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

all inboxes | Powered by JetHome®