diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2018-02-28 08:19:21 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-02-28 10:03:19 -0500 |
commit | 1402fd8ed7e5bda1b3e7613b70780b0db392d1e6 (patch) | |
tree | e5521eb2fcbe4cad6a2a7d0c5906cdb2461a7f09 /tools | |
parent | 71c208dd54ab971036d83ff6d9837bae4976e623 (diff) |
objtool: Fix another switch table detection issue
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
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 472e64e95891..46c1d239cc1b 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c | |||
@@ -925,7 +925,11 @@ static struct rela *find_switch_table(struct objtool_file *file, | |||
925 | if (find_symbol_containing(file->rodata, text_rela->addend)) | 925 | if (find_symbol_containing(file->rodata, text_rela->addend)) |
926 | continue; | 926 | continue; |
927 | 927 | ||
928 | return find_rela_by_dest(file->rodata, text_rela->addend); | 928 | rodata_rela = find_rela_by_dest(file->rodata, text_rela->addend); |
929 | if (!rodata_rela) | ||
930 | continue; | ||
931 | |||
932 | return rodata_rela; | ||
929 | } | 933 | } |
930 | 934 | ||
931 | return NULL; | 935 | return NULL; |