[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200428191659.795115188@infradead.org>
Date: Tue, 28 Apr 2020 21:11:08 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: jpoimboe@...hat.com, alexandre.chartre@...cle.com
Cc: linux-kernel@...r.kernel.org, jthierry@...hat.com,
tglx@...utronix.de, x86@...nel.org, mbenes@...e.cz,
peterz@...radead.org
Subject: [PATCH v2 07/14] objtool: Make handle_insn_ops() unconditional
Now that every instruction has a list of stack_ops; we can trivially
distinquish those instructions that do not have stack_ops, their list
is empty.
This means we can now call handle_insn_ops() unconditionally.
Suggested-by: Julien Thierry <jthierry@...hat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
tools/objtool/check.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2247,6 +2247,9 @@ static int validate_branch(struct objtoo
return 0;
}
+ if (handle_insn_ops(insn, &state))
+ return 1;
+
switch (insn->type) {
case INSN_RETURN:
@@ -2306,9 +2309,6 @@ static int validate_branch(struct objtoo
break;
case INSN_EXCEPTION_RETURN:
- if (handle_insn_ops(insn, &state))
- return 1;
-
/*
* This handles x86's sync_core() case, where we use an
* IRET to self. All 'normal' IRET instructions are in
@@ -2328,8 +2328,6 @@ static int validate_branch(struct objtoo
return 0;
case INSN_STACK:
- if (handle_insn_ops(insn, &state))
- return 1;
break;
case INSN_STAC:
Powered by blists - more mailing lists