Re: [PATCH v5 07/36] lockdep: Annotate lockdep assertions for context analysis
Bart Van Assche <[email protected]> Fri, 19 Dec 2025 14:28:48 -0700
| Newsgroups | org.kernel.vger.linux-sparse,dev.linux.lists.llvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-doc,org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel,org.kernel.vger.linux-security-module,org.kernel.vger.linux-wireless,org.kernel.vger.rcu,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 12/19/25 2:16 PM, Marco Elver wrote: > It's basically an escape hatch to defer to dynamic analysis where the > limits of the static analysis are reached. That's not how lockdep_assert_held() is used in the kernel. This macro is more often than not used to document assumptions that can be verified at compile time. This patch seems like a step in the wrong direction to me because it *suppresses* compile time analysis compile-time analysis is useful. I think that this patch either should be dropped or that the __assume() annotations should be changed into __must_hold() annotations. Bart.