UBUNTU: SAUCE: objtool: make objtool SLS validation fatal when building with CONFIG_SLS=y

BugLink: https://bugs.launchpad.net/bugs/2046440

Make objtool SLS validation fatal when building with CONFIG_SLS=y,
currently it is a build.log warning only.

This is a standalone patch, such that if regressions are identified
(with any config or toolchain configuration) it can be reverted until
relevant identified code is fixed up or otherwise
ignored/silecned/marked as safe.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Link: https://lore.kernel.org/all/20231213134303.2302285-3-dimitri.ledkov@canonical.com/
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
Dimitri John Ledkov
2023-12-13 12:34:12 +00:00
committed by Paolo Pisati
parent ab1f721f5d
commit 640a8fa0d2
+3 -1
View File
@@ -4500,7 +4500,9 @@ static int validate_sls(struct objtool_file *file)
}
}
return warnings;
/* SLS is an optional security safety feature, make it fatal
* to ensure no new code is introduced that fails SLS */
return -warnings;
}
static bool ignore_noreturn_call(struct instruction *insn)