lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231213134303.2302285-4-dimitri.ledkov@canonical.com>
Date:   Wed, 13 Dec 2023 13:43:02 +0000
From:   Dimitri John Ledkov <dimitri.ledkov@...onical.com>
To:     jpoimboe@...nel.org, peterz@...radead.org
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] objtool: make objtool RETPOLINE validation fatal when building with CONFIG_RETPOLINE=y

Make objtool RETPOLINE validation fatal when building with
CONFIG_RETPOLINE=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@...onical.com>
---
 tools/objtool/check.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 9709f037f1..c21258e109 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)
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ