diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 788a20b4bd98..8edeb5f2028a 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3991,7 +3991,10 @@ static int validate_retpoline(struct objtool_file *file) warnings++; } - return warnings; + /* RETPOLINE is an optional security safety feature, make it + * fatal to ensure no new code is introduced that fails + * RETPOLINE */ + return -warnings; } static bool is_kasan_insn(struct instruction *insn)