mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Add __require_explicit_initialization and its first user
@ 2026-10-14 22:58 Kees Cook
  2026-10-14 22:58 ` [PATCH 1/2] Compiler Attributes: Add __require_explicit_initialization macro Kees Cook
  2026-10-14 22:58 ` [PATCH 2/2] seq_file: Require explicit initialization of struct seq_operations Kees Cook
  0 siblings, 2 replies; 11+ messages in thread
From: Kees Cook @ 2026-10-14 22:58 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Kees Cook, Greg Kroah-Hartman, Nathan Chancellor, Bill Wendling,
	Justin Stitt, Jonathan Corbet, Andy Whitcroft, Joe Perches,
	Mauro Carvalho Chehab, Christian König, Ian Rogers,
	Nick Desaulniers, Christian Brauner, Jan Kara, Al Viro, llvm,
	linux-doc, linux-fsdevel, linux-kernel, linux-hardening

Hi!

As discussed in Ian's kobj_type::release series[1], this takes its first
patch (to add __require_explicit_initialization), with Miguel's requested
comment tweak (the attribute needs Clang 20 or later), along with a first
user that needs no fix-ups first: seq_file's seq_operations callbacks,
which are called without a NULL check. This will make the attribute
available in v7.4-rc1, while the kobj_type fixes continue separately.

The annotation adds no warnings anywhere in the tree today that I could
find across allmodconfig builds:

  Clang 24.0.0git: x86_64, arm64, i386, arm, riscv, s390, loongarch, powerpc.
  GCC 16.2.0: x86_64, arm64, i386, arm, riscv, s390, m68k, mips, parisc,
	      sparc, loongarch, xtensa, arc, and openrisc.

Thanks!

-Kees

[1] https://lore.kernel.org/all/20261013223946.1836757-1-irogers@google.com/

Ian Rogers (1):
  Compiler Attributes: Add __require_explicit_initialization macro

Kees Cook (1):
  seq_file: Require explicit initialization of struct seq_operations

 scripts/checkpatch.pl                 |  1 +
 Documentation/conf.py                 |  1 +
 include/linux/compiler_attributes.h   | 12 ++++++++++++
 include/linux/seq_file.h              | 13 +++++++++----
 tools/lib/python/kdoc/xforms_lists.py |  1 +
 5 files changed, 24 insertions(+), 4 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-15  8:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 22:58 [PATCH 0/2] Add __require_explicit_initialization and its first user Kees Cook
2026-10-14 22:58 ` [PATCH 1/2] Compiler Attributes: Add __require_explicit_initialization macro Kees Cook
2026-10-14 23:44   ` Nathan Chancellor
2026-10-15  5:18   ` Greg Kroah-Hartman
2026-10-14 22:58 ` [PATCH 2/2] seq_file: Require explicit initialization of struct seq_operations Kees Cook
2026-10-15  5:21   ` Greg KH
2026-10-15  5:46     ` Miguel Ojeda
2026-10-15  5:57       ` Kees Cook
2026-10-15  7:11         ` Greg KH
2026-10-15  7:47           ` Miguel Ojeda
2026-10-15  8:47             ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®