[PATCH v3 00/35] Compiler-Based Capability- and Locking-Analysis
Bart Van Assche
bvanassche at acm.org
Fri Sep 19 17:20:37 UTC 2025
On 9/19/25 7:08 AM, Christoph Hellwig wrote:
> 3) Wrappers that take multiple locks conditionally
>
> We have helpers that take different locks in the same object based on the
> arguments like xfs_ilock() or those that take the same lock and a variable
> number of objects like xfs_dqlockn based on input and sorting. The
> first are just historic and we might want to kill them, but the
> sorting of objects to acquire locks in order thing is a pattern in
> various places including the VFS, so we'll need some way to annotate it.
Hi Christoph,
As you probably remember some time ago I took a look myself at adding
locking annotations to kernel code. I ended up annotating multiple XFS
functions with NO_THREAD_SAFETY_ANALYSIS. Maybe the locking patterns in
XFS are too complex for compile-time analysis? See also the XFS changes
in
https://lore.kernel.org/lkml/20250206175114.1974171-33-bvanassche@acm.org/.
Thanks,
Bart.
More information about the Linux-security-module-archive
mailing list