summaryrefslogtreecommitdiff
path: root/tools/objtool/builtin-check.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-10-27 12:28:13 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-11-01 15:44:10 +0300
commit9a479f766be1dd777e12e3e57b6ee4c3028a40a5 (patch)
tree5906547109c045bc9b590755b9c1ecd1218769e2 /tools/objtool/builtin-check.c
parentb341b20d648bb7e9a3307c33163e7399f0913e66 (diff)
downloadlinux-9a479f766be1dd777e12e3e57b6ee4c3028a40a5.tar.xz
objtool: Add --cfi to generate the .cfi_sites section
Add the location of all __cfi_##name symbols (as generated by kCFI) to a section such that we might re-write things at kernel boot. Notably; boot time re-hashing and FineIBT are the intended use of this. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20221027092842.568039454@infradead.org
Diffstat (limited to 'tools/objtool/builtin-check.c')
-rw-r--r--tools/objtool/builtin-check.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index 95fcecee60ce..868e3e363786 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -80,6 +80,7 @@ const struct option check_options[] = {
OPT_BOOLEAN('s', "stackval", &opts.stackval, "validate frame pointer rules"),
OPT_BOOLEAN('t', "static-call", &opts.static_call, "annotate static calls"),
OPT_BOOLEAN('u', "uaccess", &opts.uaccess, "validate uaccess rules for SMAP"),
+ OPT_BOOLEAN(0 , "cfi", &opts.cfi, "annotate kernel control flow integrity (kCFI) function preambles"),
OPT_CALLBACK_OPTARG(0, "dump", NULL, NULL, "orc", "dump metadata", parse_dump),
OPT_GROUP("Options:"),