Patch "objtool: Fix error handling for STD/CLD warnings" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    objtool: Fix error handling for STD/CLD warnings

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     objtool-fix-error-handling-for-std-cld-warnings.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7f5cf9f406b7ba26699f246f3344b9e5d0263b68
Author: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Date:   Thu Jan 21 15:29:17 2021 -0600

    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@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/dc70f2adbc72f09526f7cab5b6feb8bf7f6c5ad4.1611263461.git.jpoimboe@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 1b7e748170e54..1cff21aef0730 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux