]> www.infradead.org Git - users/dwmw2/linux.git/commit
objtool: Support asm jump tables
authorJosh Poimboeuf <jpoimboe@redhat.com>
Wed, 24 Feb 2021 16:29:14 +0000 (10:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jul 2022 09:26:18 +0000 (11:26 +0200)
commitf3fe1b141d2cd956ca59d142ef3b5f5cf4e5149c
tree72721e8be4217f698f28d902d22185fe366e332f
parent0b2c8bf4983bdefbb69337c7d68cbe7c2d47a61a
objtool: Support asm jump tables

commit 99033461e685b48549ec77608b4bda75ddf772ce upstream.

Objtool detection of asm jump tables would normally just work, except
for the fact that asm retpolines use alternatives.  Objtool thinks the
alternative code path (a jump to the retpoline) is a sibling call.

Don't treat alternative indirect branches as sibling calls when the
original instruction has a jump table.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Link: https://lore.kernel.org/r/460cf4dc675d64e1124146562cabd2c05aa322e8.1614182415.git.jpoimboe@redhat.com
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/objtool/check.c