linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] hardening: Enable i386 FORTIFY_SOURCE on Clang 16+
@ 2025-03-08  4:29 Kees Cook
  2025-03-08  4:29 ` [PATCH v2 1/2] x86/build: Remove -ffreestanding on i386 with GCC Kees Cook
  2025-03-08  4:29 ` [PATCH v2 2/2] hardening: Enable i386 FORTIFY_SOURCE on Clang 16+ Kees Cook
  0 siblings, 2 replies; 7+ messages in thread
From: Kees Cook @ 2025-03-08  4:29 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Kees Cook, Nick Desaulniers, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Gustavo A. R. Silva,
	Paul Moore, James Morris, Serge E. Hallyn, Nick Desaulniers,
	Bill Wendling, Justin Stitt, linux-kernel, x86, linux-hardening,
	linux-security-module, llvm

Hi,

This drops -ffreestanding for i386 unconditionally for GCC, and on
Clang version 16 and later. FORTIFY_SOURCE depends on the libcall
optimizations made without -ffreestanding on Clang. On GCC, there is no
expected differences. With that done, it's possible to gain Clang
FORTIFY_SOURCE coverage on i386 again, though only for Clang 16+.

-Kees


 v1: https://lore.kernel.org/lkml/20250303214929.work.499-kees@kernel.org/
 v2: drop -ffreestanding (Nathan)

Kees Cook (2):
  x86/build: Remove -ffreestanding on i386 with GCC
  hardening: Enable i386 FORTIFY_SOURCE on Clang 16+

 arch/x86/Makefile          | 2 ++
 security/Kconfig.hardening | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-03-08 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-08  4:29 [PATCH v2 0/2] hardening: Enable i386 FORTIFY_SOURCE on Clang 16+ Kees Cook
2025-03-08  4:29 ` [PATCH v2 1/2] x86/build: Remove -ffreestanding on i386 with GCC Kees Cook
2025-03-08  8:26   ` Ingo Molnar
2025-03-08  9:17   ` Nathan Chancellor
2025-03-08 17:23     ` Kees Cook
2025-03-08  4:29 ` [PATCH v2 2/2] hardening: Enable i386 FORTIFY_SOURCE on Clang 16+ Kees Cook
2025-03-08  9:19   ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).