mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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
This commit is contained in:
committed by
Peter Zijlstra
parent
87335b61a2
commit
dc36d55d4e
@@ -244,6 +244,7 @@ EXPORT_SYMBOL_GPL(crypto_remove_spawns);
|
||||
|
||||
static void crypto_alg_finish_registration(struct crypto_alg *alg,
|
||||
struct list_head *algs_to_put)
|
||||
__must_hold(&crypto_alg_sem)
|
||||
{
|
||||
struct crypto_alg *q;
|
||||
|
||||
@@ -299,6 +300,7 @@ static struct crypto_larval *crypto_alloc_test_larval(struct crypto_alg *alg)
|
||||
|
||||
static struct crypto_larval *
|
||||
__crypto_register_alg(struct crypto_alg *alg, struct list_head *algs_to_put)
|
||||
__must_hold(&crypto_alg_sem)
|
||||
{
|
||||
struct crypto_alg *q;
|
||||
struct crypto_larval *larval;
|
||||
|
||||
Reference in New Issue
Block a user