diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2022-08-18 23:39:27 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-08-19 10:05:42 +0200 |
commit | e27e5bea956ce4d3eb15112de5fa5a3b77c2f488 (patch) | |
tree | 3eabfad0e98bac95b5ec1a39d81f9f134ff18a80 /tools/objtool/check.c | |
parent | KVM: Rename mmu_notifier_* to mmu_invalidate_* (diff) | |
download | linux-e27e5bea956ce4d3eb15112de5fa5a3b77c2f488.tar.xz linux-e27e5bea956ce4d3eb15112de5fa5a3b77c2f488.zip |
x86/ibt, objtool: Add IBT_NOSEAL()
Add a macro which prevents a function from getting sealed if there are
no compile-time references to it.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Message-Id: <20220818213927.e44fmxkoq4yj6ybn@treble>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r-- | tools/objtool/check.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 0cec74da7ffe..91678252a9b6 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -4096,7 +4096,8 @@ static int validate_ibt(struct objtool_file *file) * These sections can reference text addresses, but not with * the intent to indirect branch to them. */ - if (!strncmp(sec->name, ".discard", 8) || + if ((!strncmp(sec->name, ".discard", 8) && + strcmp(sec->name, ".discard.ibt_endbr_noseal")) || !strncmp(sec->name, ".debug", 6) || !strcmp(sec->name, ".altinstructions") || !strcmp(sec->name, ".ibt_endbr_seal") || |