summaryrefslogtreecommitdiffstats
path: root/tools/objtool
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2019-03-18 14:33:07 +0100
committerIngo Molnar <mingo@kernel.org>2019-04-03 09:39:46 +0200
commitff05ab2305aaeb21a3002ae95a17e176c198b71b (patch)
treec65ef588d4ec4bc4a590a07a69a394c2c4a046c5 /tools/objtool
parentb69656fa7ea2f75e47d7bd5b9430359fa46488af (diff)
downloadlinux-ff05ab2305aaeb21a3002ae95a17e176c198b71b.tar.gz
linux-ff05ab2305aaeb21a3002ae95a17e176c198b71b.tar.bz2
linux-ff05ab2305aaeb21a3002ae95a17e176c198b71b.zip
x86/nospec, objtool: Introduce ANNOTATE_IGNORE_ALTERNATIVE
To facillitate other usage of ignoring alternatives; rename ANNOTATE_NOSPEC_IGNORE to ANNOTATE_IGNORE_ALTERNATIVE. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool')
-rw-r--r--tools/objtool/check.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 5dde107083c6..110ea3d84772 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -457,13 +457,13 @@ static void add_ignores(struct objtool_file *file)
* But it at least allows objtool to understand the control flow *around* the
* retpoline.
*/
-static int add_nospec_ignores(struct objtool_file *file)
+static int add_ignore_alternatives(struct objtool_file *file)
{
struct section *sec;
struct rela *rela;
struct instruction *insn;
- sec = find_section_by_name(file->elf, ".rela.discard.nospec");
+ sec = find_section_by_name(file->elf, ".rela.discard.ignore_alts");
if (!sec)
return 0;
@@ -475,7 +475,7 @@ static int add_nospec_ignores(struct objtool_file *file)
insn = find_insn(file, rela->sym->sec, rela->addend);
if (!insn) {
- WARN("bad .discard.nospec entry");
+ WARN("bad .discard.ignore_alts entry");
return -1;
}
@@ -1239,7 +1239,7 @@ static int decode_sections(struct objtool_file *file)
add_ignores(file);
- ret = add_nospec_ignores(file);
+ ret = add_ignore_alternatives(file);
if (ret)
return ret;