aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/objtool/builtin.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-03-10 18:57:41 +0100
committerIngo Molnar <mingo@kernel.org>2020-04-22 10:53:50 +0200
commitc4a33939a7eb396acbb05569e57eebe4374cc57c (patch)
treef170960b466f002fbe394ddb5665cb6f538ebb74 /tools/objtool/builtin.h
parentobjtool: Fix !CFI insn_state propagation (diff)
downloadwireguard-linux-c4a33939a7eb396acbb05569e57eebe4374cc57c.tar.xz
wireguard-linux-c4a33939a7eb396acbb05569e57eebe4374cc57c.zip
objtool: Implement noinstr validation
Validate that any call out of .noinstr.text is in between instr_begin() and instr_end() annotations. This annotation is useful to ensure correct behaviour wrt tracing sensitive code like entry/exit and idle code. When we run code in a sensitive context we want a guarantee no unknown code is ran. Since this validation relies on knowing the section of call destination symbols, we must run it on vmlinux.o instead of on individual object files. Add two options: -d/--duplicate "duplicate validation for vmlinux" -l/--vmlinux "vmlinux.o validation" Where the latter auto-detects when objname ends with "vmlinux.o" and the former will force all validations, also those already done on !vmlinux object files. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200416115119.106268040@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool/builtin.h')
-rw-r--r--tools/objtool/builtin.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/builtin.h b/tools/objtool/builtin.h
index 0b907902ee79..85c979caa367 100644
--- a/tools/objtool/builtin.h
+++ b/tools/objtool/builtin.h
@@ -8,7 +8,7 @@
#include <subcmd/parse-options.h>
extern const struct option check_options[];
-extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats;
+extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux;
extern int cmd_check(int argc, const char **argv);
extern int cmd_orc(int argc, const char **argv);