Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Josh Poimboeuf and committed by
Thomas Gleixner
1402fd8e 71c208dd

+5 -1
+5 -1
tools/objtool/check.c
··· 925 if (find_symbol_containing(file->rodata, text_rela->addend)) 926 continue; 927 928 - return find_rela_by_dest(file->rodata, text_rela->addend); 929 } 930 931 return NULL;
··· 925 if (find_symbol_containing(file->rodata, text_rela->addend)) 926 continue; 927 928 + rodata_rela = find_rela_by_dest(file->rodata, text_rela->addend); 929 + if (!rodata_rela) 930 + continue; 931 + 932 + return rodata_rela; 933 } 934 935 return NULL;