]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: Enable context analysis
authorMarco Elver <elver@google.com>
Fri, 19 Dec 2025 15:40:24 +0000 (16:40 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 5 Jan 2026 15:43:36 +0000 (16:43 +0100)
commitdc36d55d4e7259ff0f91a154744125ccc2228171
tree58b1ff6d120adf795e405027de8ce770233ade9a
parent87335b61a23bd10e4aec132bd3a48a009d406973
crypto: Enable context analysis

Enable context analysis for crypto subsystem.

This demonstrates a larger conversion to use Clang's context
analysis. The benefit is additional static checking of locking rules,
along with better documentation.

Note the use of the __acquire_ret macro how to define an API where a
function returns a pointer to an object (struct scomp_scratch) with a
lock held. Additionally, the analysis only resolves aliases where the
analysis unambiguously sees that a variable was not reassigned after
initialization, requiring minor code changes.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251219154418.3592607-36-elver@google.com
crypto/Makefile
crypto/acompress.c
crypto/algapi.c
crypto/api.c
crypto/crypto_engine.c
crypto/drbg.c
crypto/internal.h
crypto/proc.c
crypto/scompress.c
include/crypto/internal/acompress.h
include/crypto/internal/engine.h