diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2018-02-28 07:19:21 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-15 10:54:38 +0100 |
commit | a617f2e36d674c60d5983297f4e2d218bd25c272 (patch) | |
tree | a326177197335a9a2ac922dfac50ec396c1d86fc /tools | |
parent | c3b9f72606ac4fda901ac6ee9040952e854422fb (diff) | |
download | linux-stable-a617f2e36d674c60d5983297f4e2d218bd25c272.tar.gz linux-stable-a617f2e36d674c60d5983297f4e2d218bd25c272.tar.bz2 linux-stable-a617f2e36d674c60d5983297f4e2d218bd25c272.zip |
objtool: Fix another switch table detection issue
commit 1402fd8ed7e5bda1b3e7613b70780b0db392d1e6 upstream.
Continue the switch table detection whack-a-mole. Add a check to
distinguish KASAN data reads from switch data reads. The switch jump
tables in .rodata have relocations associated with them.
This fixes the following warning:
crypto/asymmetric_keys/x509_cert_parser.o: warning: objtool: x509_note_pkey_algo()+0xa4: sibling call from callable instruction with modified stack frame
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/d7c8853022ad47d158cb81e953a40469fc08a95e.1519784382.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objtool/check.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 9a9d3a102523..4cf4c800bb55 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -924,7 +924,11 @@ static struct rela *find_switch_table(struct objtool_file *file, if (find_symbol_containing(file->rodata, text_rela->addend)) continue; - return find_rela_by_dest(file->rodata, text_rela->addend); + rodata_rela = find_rela_by_dest(file->rodata, text_rela->addend); + if (!rodata_rela) + continue; + + return rodata_rela; } return NULL; |