[PATCH 2/2] objtool: Ignore unwind hints for ignored functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
- Subject: [PATCH 2/2] objtool: Ignore unwind hints for ignored functions
- From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
- Date: Sat, 10 Jul 2021 12:25:14 -0700
- Cc: Ingo Molnar <mingo@xxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, X86 ML <x86@xxxxxxxxxx>, Daniel Xu <dxu@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, kuba@xxxxxxxxxx, mingo@xxxxxxxxxx, ast@xxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, kernel-team@xxxxxx, yhs@xxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Abhishek Sagar <sagar.abhishek@xxxxxxxxx>, Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
- In-reply-to: <20210710190143.lrcsyal2ggubv43v@treble>
- References: <162399992186.506599.8457763707951687195.stgit@devnote2> <162399996966.506599.810050095040575221.stgit@devnote2> <YOK8pzp8B2V+1EaU@gmail.com> <20210710003140.8e561ad33d42f9ac78de6a15@kernel.org> <20210710104104.3a270168811ac38420093276@kernel.org> <20210710190143.lrcsyal2ggubv43v@treble>
If a function is ignored, also ignore its hints. This is useful for the
case where the function ignore is conditional on frame pointers, e.g.
STACK_FRAME_NON_STANDARD_FP().
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e5947fbb9e7a..67cbdcfcabae 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2909,7 +2909,7 @@ static int validate_unwind_hints(struct objtool_file *file, struct section *sec)
}
while (&insn->list != &file->insn_list && (!sec || insn->sec == sec)) {
- if (insn->hint && !insn->visited) {
+ if (insn->hint && !insn->visited && !insn->ignore) {
ret = validate_branch(file, insn->func, insn, state);
if (ret && backtrace)
BT_FUNC("<=== (hint)", insn);
--
2.31.1
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]