[PATCH v2 0/3] kbuild: Use -fzero-init-padding-bits=all

From: Kees Cook
Date: Mon Jan 27 2025 - 14:11:25 EST


Hi,

This fixes the union initialization regression introduced by GCC 15,
and improves explicit padding initialization for structs.

I can take this via the hardening tree if that's easiest.

-Kees

v2: Add updated stackinit KUnit tests, improve change log, add Reviewed-By
v1: https://lore.kernel.org/lkml/20250121003646.work.168-kees@xxxxxxxxxx/

Kees Cook (3):
stackinit: Add old-style zero-init syntax to struct tests
stackinit: Add union initialization to selftests
kbuild: Use -fzero-init-padding-bits=all

lib/stackinit_kunit.c | 106 +++++++++++++++++++++++++++++++++++++
scripts/Makefile.extrawarn | 3 ++
2 files changed, 109 insertions(+)

--
2.34.1