From: tip-bot for Josh Poimboeuf <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: arnd@arndb.de, mingo@kernel.org, bp@alien8.de,
linux-kernel@vger.kernel.org, hpa@zytor.com,
torvalds@linux-foundation.org, brgerst@gmail.com,
dvlasenk@redhat.com, jpoimboe@redhat.com, tglx@linutronix.de,
luto@kernel.org, peterz@infradead.org
Subject: [tip:x86/asm] objtool: Fix validate_branch() return codes
Date: Fri, 11 Aug 2017 05:13:32 -0700 [thread overview]
Message-ID: <tip-12b25729a194198e3c4289adaddc4115b10b094e@git.kernel.org> (raw)
In-Reply-To: <d86671cfde823b50477cd2f6f548dfe54871e24d.1502401017.git.jpoimboe@redhat.com>
Commit-ID: 12b25729a194198e3c4289adaddc4115b10b094e
Gitweb: http://git.kernel.org/tip/12b25729a194198e3c4289adaddc4115b10b094e
Author: Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Thu, 10 Aug 2017 16:37:25 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 11 Aug 2017 14:06:14 +0200
objtool: Fix validate_branch() return codes
The validate_branch() function should never return a negative value.
Errors are treated as warnings so that even if something goes wrong,
objtool does its best to generate ORC data for the rest of the file.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0")
Link: http://lkml.kernel.org/r/d86671cfde823b50477cd2f6f548dfe54871e24d.1502401017.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/objtool/check.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 4f0c4ae..5814e90 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1524,7 +1524,7 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
if (insn->alt_group && list_empty(&insn->alts)) {
WARN_FUNC("don't know how to handle branch to middle of alternative instruction group",
sec, insn->offset);
- return -1;
+ return 1;
}
while (1) {
@@ -1543,7 +1543,7 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
if (func && insn->ignore) {
WARN_FUNC("BUG: why am I validating an ignored function?",
sec, insn->offset);
- return -1;
+ return 1;
}
if (insn->visited) {
@@ -1681,7 +1681,7 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
case INSN_STACK:
if (update_insn_state(insn, &state))
- return -1;
+ return 1;
break;
prev parent reply other threads:[~2017-08-11 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 21:37 [PATCH 1/2] " Josh Poimboeuf
2017-08-10 21:37 ` [PATCH 2/2] objtool: Track DRAP separately from callee-saved registers Josh Poimboeuf
2017-08-11 12:13 ` [tip:x86/asm] " tip-bot for Josh Poimboeuf
2017-08-11 16:22 ` Andy Lutomirski
2017-08-11 16:26 ` Linus Torvalds
2017-08-11 16:57 ` Josh Poimboeuf
2017-08-11 17:17 ` hpa
2017-08-11 12:13 ` tip-bot for Josh Poimboeuf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-12b25729a194198e3c4289adaddc4115b10b094e@git.kernel.org \
--to=tipbot@zytor.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome