diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2021-01-21 15:29:17 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-04 10:26:30 +0100 |
commit | 9d20f53167e6708e8d3f51000e0c88b38f4f7d26 (patch) | |
tree | 6bd2f3e9429fba4c03790d0db8a60ffa25d70ad4 /tools | |
parent | auxdisplay: ht16k33: Fix refresh rate handling (diff) | |
download | wireguard-linux-9d20f53167e6708e8d3f51000e0c88b38f4f7d26.tar.xz wireguard-linux-9d20f53167e6708e8d3f51000e0c88b38f4f7d26.zip |
objtool: Fix error handling for STD/CLD warnings
[ Upstream commit 6f567c9300a5ebd7b18c26dda1c8d6ffbdd0debd ]
Actually return an error (and display a backtrace, if requested) for
directional bit warnings.
Fixes: 2f0f9e9ad7b3 ("objtool: Add Direction Flag validation")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/dc70f2adbc72f09526f7cab5b6feb8bf7f6c5ad4.1611263461.git.jpoimboe@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objtool/check.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 1b7e748170e5..1cff21aef073 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2192,15 +2192,19 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, break; case INSN_STD: - if (state.df) + if (state.df) { WARN_FUNC("recursive STD", sec, insn->offset); + return 1; + } state.df = true; break; case INSN_CLD: - if (!state.df && func) + if (!state.df && func) { WARN_FUNC("redundant CLD", sec, insn->offset); + return 1; + } state.df = false; break; |