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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250501-default-const-init-clang-v1-0-3d2c6c185dbb@kernel.org>
Date: Thu, 01 May 2025 16:00:20 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>, 
 Masahiro Yamada <masahiroy@...nel.org>
Cc: Nicolas Schier <nicolas.schier@...ux.dev>, 
 Andrew Morton <akpm@...ux-foundation.org>, 
 Nick Desaulniers <nick.desaulniers+lkml@...il.com>, 
 Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>, 
 Linus Torvalds <torvalds@...ux-foundation.org>, 
 linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org, 
 llvm@...ts.linux.dev, patches@...ts.linux.dev, stable@...r.kernel.org, 
 Linux Kernel Functional Testing <lkft@...aro.org>, 
 Marcus Seyfarth <m.seyfarth@...il.com>, 
 Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH 0/2] Deal with clang's -Wdefault-const-init-unsafe

A new on by default warning in clang aims to flag cases where a const
variable or field is not initialized and has no default value (i.e., not
static or thread local). The field version of the warning triggers in
several places within the kernel that are not problematic so it is
disabled in the first patch. The variable version of the warning only
triggers in one place, the typecheck() macro, so I opted to silence it
in that one place to keep it enabled until it can be proved to be
problematic enough to disable it.

---
Nathan Chancellor (2):
      kbuild: Disable -Wdefault-const-init-field-unsafe
      include/linux/typecheck.h: Zero initialize dummy variables

 include/linux/typecheck.h  | 4 ++--
 scripts/Makefile.extrawarn | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)
---
base-commit: ebd297a2affadb6f6f4d2e5d975c1eda18ac762d
change-id: 20250430-default-const-init-clang-b6e21b8d03b6

Best regards,
-- 
Nathan Chancellor <nathan@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ