| Message ID | 20260327061704.3707577-2-hch@lst.de (mailing list archive) |
|---|---|
| State | Handled Elsewhere |
| Headers | show |
| Series | [01/28] xor: assert that xor_blocks is not call from interrupt context | expand |
Hello: This series was applied to riscv/linux.git (fixes) by Andrew Morton <akpm@linux-foundation.org>: On Fri, 27 Mar 2026 07:16:33 +0100 you wrote: > Most of the optimized xor_blocks versions require FPU/vector registers, > which generally are not supported in interrupt context. > > Both callers already are in user context, so enforce this at the highest > level. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > [...] Here is the summary with links: - [01/28] xor: assert that xor_blocks is not call from interrupt context https://git.kernel.org/riscv/c/d8593b8f9354 - [02/28] arm/xor: remove in_interrupt() handling https://git.kernel.org/riscv/c/b7ca705758b9 - [03/28] arm64/xor: fix conflicting attributes for xor_block_template https://git.kernel.org/riscv/c/675a0dd596e7 - [04/28] um/xor: cleanup xor.h https://git.kernel.org/riscv/c/3ea16a98518a - [05/28] xor: move to lib/raid/ https://git.kernel.org/riscv/c/9e229025e247 - [06/28] xor: small cleanups https://git.kernel.org/riscv/c/7c6e6b2b48e8 - [07/28] xor: cleanup registration and probing https://git.kernel.org/riscv/c/0471415f3fd6 - [08/28] xor: split xor.h https://git.kernel.org/riscv/c/54e20be48fd4 - [09/28] xor: remove macro abuse for XOR implementation registrations https://git.kernel.org/riscv/c/35ebc4de1059 - [10/28] xor: move generic implementations out of asm-generic/xor.h https://git.kernel.org/riscv/c/c46928fdcfa0 - [11/28] alpha: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/503793b1340e - [12/28] arm: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/0d64a24ec0c0 - [13/28] arm64: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/3786f2ad0095 - [14/28] loongarch: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/033bee3e4963 - [15/28] powerpc: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/3f276cece4dd - [16/28] riscv: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/5265d55b2146 - [17/28] sparc: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/7f96362396ee - [18/28] s390: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/95c104cc5571 - [19/28] x86: move the XOR code to lib/raid/ https://git.kernel.org/riscv/c/77fd47e57a09 - [20/28] xor: avoid indirect calls for arm64-optimized ops https://git.kernel.org/riscv/c/352ebd066b62 - [21/28] xor: make xor.ko self-contained in lib/raid/ https://git.kernel.org/riscv/c/e20043b4765c - [22/28] xor: add a better public API (no matching commit) - [23/28] xor: add a better public API (no matching commit) - [24/28] async_xor: use xor_gen https://git.kernel.org/riscv/c/7c12c32b9f73 - [25/28] btrfs: use xor_gen https://git.kernel.org/riscv/c/0f629e7283ad - [26/28] xor: pass the entire operation to the low-level ops https://git.kernel.org/riscv/c/80dcf0a7832a - [27/28] xor: use static_call for xor_gen https://git.kernel.org/riscv/c/a21921dd02d3 - [28/28] xor: add a kunit test case https://git.kernel.org/riscv/c/af53e85ef797 You are awesome, thank you!
diff --git a/crypto/xor.c b/crypto/xor.c index f39621a57bb3..df530ddc9f06 100644 --- a/crypto/xor.c +++ b/crypto/xor.c @@ -28,6 +28,8 @@ xor_blocks(unsigned int src_count, unsigned int bytes, void *dest, void **srcs) { unsigned long *p1, *p2, *p3, *p4; + WARN_ON_ONCE(!in_task() || irqs_disabled() || softirq_count()); + p1 = (unsigned long *) srcs[0]; if (src_count == 1) { active_template->do_2(bytes, dest, p1);
Most of the optimized xor_blocks versions require FPU/vector registers, which generally are not supported in interrupt context. Both callers already are in user context, so enforce this at the highest level. Signed-off-by: Christoph Hellwig <hch@lst.de> --- crypto/xor.c | 2 ++ 1 file changed, 2 insertions(+)