objtool: Fix overlapping alternatives
authorPeter Zijlstra <peterz@infradead.org>
Wed, 8 Feb 2023 17:18:03 +0000 (18:18 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 23 Feb 2023 08:21:33 +0000 (09:21 +0100)
commita706bb08c81ac878982e41d4b6abcc42258bd39e
treea0e12ccd90ce655c86630394477c4f81b53187d9
parentc6f5dc28fb3d736fa8d7f7d31e0664a9c772c299
objtool: Fix overlapping alternatives

Things like ALTERNATIVE_{2,3}() generate multiple alternatives on the
same place, objtool would override the first orig_alt_group with the
second (or third), failing to check the CFI among all the different
variants.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build only
Tested-by: Thomas Weißschuh <linux@weissschuh.net> # compile and run
Link: https://lore.kernel.org/r/20230208172245.711471461@infradead.org
tools/objtool/check.c