[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6511355.kQJsTdtLzf@tachyon.chronox.de>
Date: Tue, 19 May 2015 07:58:25 +0200
From: Stephan Mueller <smueller@...onox.de>
To: Theodore Ts'o <tytso@....edu>,
Herbert Xu <herbert@...dor.apana.org.au>
Cc: pebolle@...cali.nl, andreas.steffen@...ongswan.org,
sandyinchina@...il.com, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org
Subject: Re: [PATCH v6 1/5] random: Blocking API for accessing nonblocking_pool
Am Montag, 18. Mai 2015, 11:02:34 schrieb Theodore Ts'o:
Hi Theodore, Herbert,
>
> The simplest thing to do is to put a refcount on inside the DRBG
> handle structure. The caller instantiates the DRBG handle, and
> invokes the the DRBG. The DRBG, since it is kicking off an
> asynchronous operation, increments the refcount.
That is a good idea. After experimenting with the refcount, I see that kernel
crypto API release function of crypto_destroy_tfm unconditionally destroys the
crypto handle by freeing it.
So, if a caller releases the DRBG handle, the DRBG code cannot prevent the
destruction of its context with a refcount.
Herbert, do you have any ideas?
--
Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists