[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2931045.EGfWxfUOa7@tauon>
Date:	Mon, 18 May 2015 15:26:13 +0200
From:	Stephan Mueller <smueller@...onox.de>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	pebolle@...cali.nl, andreas.steffen@...ongswan.org, tytso@....edu,
	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, 15:07:10 schrieb Stephan Mueller:
Hi Herbert,
>>
>>You can simplify this further and get rid of buf/nbytes.  All
>>we need to know is whether the pool is ready.  Everything else
>>can come from private.
>
>So, the async function is now just a notification of the caller. Sounds good
>with me.
>
I am just running into an interesting problem with a missing cancel operation: 
a caller instantiates a DRBG handle and invokes the seeding operation. The 
nonblocking_pool is not initialized. Therefore, the callback is put onto the 
list for being processed later.
Now, the caller releases the DRBG handle *before* the callback is triggered.
The callback is triggered with a pointer that is invalid, but the pointer is 
non-NULL. Therefore, I am not sure how to validate the pointer in the callback 
function.
I would think that there is no other way than to add a cancel API call that 
allows removing a list entry from the wait list.
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