Re: [PATCH 0/7] crypto: switch to static calls for CRC-T10DIF
flat view
From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-01-11 20:57:55
On Mon, Jan 11, 2021 at 07:36:20PM +0100, Ard Biesheuvel wrote:
On Mon, 11 Jan 2021 at 18:27, Ard Biesheuvel [off-list ref] wrote:quoted
On Mon, 11 Jan 2021 at 17:52, Ard Biesheuvel [off-list ref] wrote:
quoted
quoted
Special request to Peter to take a look at patch #2, and in particular, whether synchronize_rcu_tasks() is sufficient to ensure that a module providing the target of a static call can be unloaded safely.It seems I may have managed to confuse myself slightly here: without an upper bound on the size of the input of the crc_t10dif() routine, I suppose we can never assume that all its callers have finished.Replying to self again - apologies. I think this is actually correct after all: synchronize_rcu_tasks() guarantees that all tasks have passed through a 'safe state', i.e., voluntary schedule(), return to userland, etc, which guarantees that no task could be executing the old static call target after synchronize_rcu_tasks() returns.
Right, I think it should work. My initial question was why you'd want to support the unreg at all. AFAICT these implementations are tiny, why bother having them as a module, or if you insist having them as a module, why allowing removal?