Subject: Re: cleanup the RAID5 XOR library v3

From: Christoph Hellwig <[email-masked]>
Date: Thu, 26 Mar 2026 06:18:37 +0100

On Wed, Mar 25, 2026 at 12:39:54PM -0700, Eric Biggers wrote:
> This generally looks good, but yes, please check the comments from
> https://sashiko.dev/#/patchset/[email-masked], as
> Andrew mentioned.

Yes, I've looked into them and fixed the, the current version in the
git branch already has the changes.

> looks real as well, though I haven't tested it.  If preemption is indeed
> not the right thing to check, then I guess (following up from
> https://lore.kernel.org/linux-crypto/20260303195517.GC2846@sol/) it
> would need to be something like:
> 
>     WARN_ON_ONCE(!in_task() || irqs_disabled() || softirq_count() != 0);
> 
> Ugly, but we're running out of options.

So far I've just reverted back to the in_interrupted() check we had
before.  I can switch to the above, though.

> (This sort of thing is why the functions in lib/crypto/ and lib/crc/ are
> just supported in all contexts instead.  If FPU/vector/SIMD registers
> cannot be used in the current context, then a scalar fallback is used.)

We could do this fairly easily, but I'm not sure it is a good idea.
The callers of these routines are extremely limited, so we'd have to
add code for this which will then only be used by the new extensive
test code we'd have to add for it.