mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/17] Treewide: enforce static storage for object initializers
@ 2026-09-15  3:03 Yury Norov
  2026-09-15  3:03 ` [PATCH 01/17] locking/mutex: assert static storage for DEFINE_MUTEX() Yury Norov
                   ` (17 more replies)
  0 siblings, 18 replies; 38+ messages in thread
From: Yury Norov @ 2026-09-15  3:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Yury Norov, Jason A. Donenfeld, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthew Wilcox,
	Peter Zijlstra, Ingo Molnar, Will Deacon, Boqun Feng,
	Waiman Long, Dennis Zhou, Tejun Heo, Christoph Lameter,
	Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
	Joel Fernandes, Josh Triplett, Uladzislau Rezki, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Zqiang, Onur Özkan,
	Kees Cook, Joel Granados, Anna-Maria Behnsen, Thomas Gleixner,
	Juri Lelli, Vincent Guittot, Dietmar Eggemann, Ben Segall,
	Mel Gorman, Valentin Schneider, K Prateek Nayak, Mike Rapoport,
	Liam R. Howlett, Lorenzo Stoakes, Vlastimil Babka, Jann Horn,
	Pedro Falcato, Michael S. Tsirkin, Jason Wang, Xuan Zhuo,
	Eugenio Pérez, Sebastian Andrzej Siewior, Clark Williams,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	linuxppc-dev, linux-kernel, wireguard, netdev, linux-fsdevel,
	linux-mm, rcu, virtualization, linux-rt-devel, llvm, Yury Norov

On top of [1].

Declaration macros that statically initialize embedded locks require static
storage when lockdep is enabled. Automatic objects must use runtime
initialization so lockdep receives a persistent class key.

For automatic local objects, lockdep cannot use the lock address as a persistent
class key and reports "INFO: trying to register non-static key" before disabling
itself.

Series [1] introduces an ASSERT_STATIC_STORAGE() macro to enforce static
duration of an object, and applies it for DEFINE_IDA() and DEFINE_MTREE().

This series applies the same mechanism for the other structures of that
sort found by Codex.

Link: https://lore.kernel.org/all/20260911221444.1523311-1-ynorov@nvidia.com/ [1]

--

[1] also describes the preferred route(s) for the material. According to
Andrew's (and mine) preferences, sending everything together in the hope
that the relevant maintainers would ack the corresponding patches or
simply take them in their trees.

Yury Norov (17):
  locking/mutex: assert static storage for DEFINE_MUTEX()
  locking/rtmutex: assert static storage for DEFINE_RT_MUTEX()
  locking/rwsem: assert static storage for semaphore definitions
  locking/semaphore: assert static storage for DEFINE_SEMAPHORE()
  locking/seqlock: assert static storage for DEFINE_SEQLOCK()
  sched: assert static storage for wait queue and completion
    declarations
  xarray: assert static storage for DEFINE_XARRAY_FLAGS()
  idr: enforce the static-storage contract of DEFINE_IDR()
  radix-tree: require static storage for RADIX_TREE()
  klist: assert static storage for DEFINE_KLIST()
  workqueue: assert static storage for work declarations
  timers: assert static storage for DEFINE_TIMER()
  kthread: assert static storage for delayed work declarations
  ratelimit: assert static storage for DEFINE_RATELIMIT_STATE()
  notifier: assert static storage for locking notifier heads
  rcu: assert static storage for RCU sync and SRCU definitions
  sysctl: assert static storage for DEFINE_CTL_TABLE_POLL()

 drivers/macintosh/ams/ams-pmu.c              |  4 +--
 drivers/net/wireguard/selftest/allowedips.c  |  4 +--
 include/linux/completion.h                   | 10 +++++--
 include/linux/idr.h                          |  4 ++-
 include/linux/klist.h                        |  4 ++-
 include/linux/kthread.h                      |  4 ++-
 include/linux/mutex.h                        |  7 +++--
 include/linux/notifier.h                     | 13 ++++++---
 include/linux/percpu-rwsem.h                 |  4 ++-
 include/linux/radix-tree.h                   |  4 ++-
 include/linux/ratelimit_types.h              |  4 ++-
 include/linux/rcu_sync.h                     |  4 ++-
 include/linux/rtmutex.h                      |  3 +-
 include/linux/rwsem.h                        |  7 +++--
 include/linux/semaphore.h                    |  4 ++-
 include/linux/seqlock.h                      |  3 +-
 include/linux/srcutiny.h                     |  4 ++-
 include/linux/srcutree.h                     |  7 +++--
 include/linux/swait.h                        |  6 ++--
 include/linux/sysctl.h                       |  4 ++-
 include/linux/timer.h                        |  4 ++-
 include/linux/wait.h                         |  7 +++--
 include/linux/workqueue.h                    | 10 +++++--
 include/linux/xarray.h                       |  3 +-
 tools/testing/memblock/linux/mutex.h         |  8 ++++--
 tools/testing/radix-tree/benchmark.c         |  4 ++-
 tools/testing/radix-tree/idr-test.c          | 29 ++++++++++++++------
 tools/testing/radix-tree/iteration_check_2.c |  4 ++-
 tools/testing/radix-tree/main.c              | 16 ++++++++---
 tools/testing/radix-tree/regression3.c       |  4 ++-
 tools/testing/radix-tree/tag_check.c         | 28 ++++++++++++++-----
 tools/testing/vma/include/dup.h              |  5 +++-
 tools/virtio/linux/compiler.h                |  9 ++++++
 tools/virtio/linux/ratelimit.h               |  6 +++-
 34 files changed, 176 insertions(+), 65 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-09-15  9:24 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15  3:03 [PATCH 00/17] Treewide: enforce static storage for object initializers Yury Norov
2026-09-15  3:03 ` [PATCH 01/17] locking/mutex: assert static storage for DEFINE_MUTEX() Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  8:23   ` Peter Zijlstra
2026-09-15  3:03 ` [PATCH 02/17] locking/rtmutex: assert static storage for DEFINE_RT_MUTEX() Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:03 ` [PATCH 03/17] locking/rwsem: assert static storage for semaphore definitions Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:03 ` [PATCH 04/17] locking/semaphore: assert static storage for DEFINE_SEMAPHORE() Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:03 ` [PATCH 05/17] locking/seqlock: assert static storage for DEFINE_SEQLOCK() Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 06/17] sched: assert static storage for wait queue and completion declarations Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 07/17] xarray: assert static storage for DEFINE_XARRAY_FLAGS() Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 08/17] idr: enforce the static-storage contract of DEFINE_IDR() Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 09/17] radix-tree: require static storage for RADIX_TREE() Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 10/17] klist: assert static storage for DEFINE_KLIST() Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 11/17] workqueue: assert static storage for work declarations Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 12/17] timers: assert static storage for DEFINE_TIMER() Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 13/17] kthread: assert static storage for delayed work declarations Yury Norov
2026-09-15  3:25   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 14/17] ratelimit: assert static storage for DEFINE_RATELIMIT_STATE() Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 15/17] notifier: assert static storage for locking notifier heads Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 16/17] rcu: assert static storage for RCU sync and SRCU definitions Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  3:13 ` [PATCH 17/17] sysctl: assert static storage for DEFINE_CTL_TABLE_POLL() Yury Norov
2026-09-15  3:26   ` sashiko-bot
2026-09-15  6:14 ` [PATCH 00/17] Treewide: enforce static storage for object initializers Andrew Morton
2026-09-15  9:24   ` David Laight

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®