From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABBB03AF65A; Tue, 24 Mar 2026 06:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774333389; cv=none; b=KJO5VgI+evnbviSxGEoukndMP0AAInPdR7VXgW9DpnBtZO85WN3l64cnT8MK78ELB3exiYGOWkpoNJDhp9vi1i/k2Z1Q8Vo+hTfgydgOaa7aySp/i2u0YNTfX7b/HOHLDbcI0l/Xtieq2JSZYMr7shlZ/YHsF2BP4QSkle+y8Hk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774333389; c=relaxed/simple; bh=BonflUDoxa9Vif6kaTe/UCbVEYjZil2vrjq6waM85IA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ITaHsl97988t5Jy9j0VuN6CfziAKklJ9XgIgB6fqXdc6G9Ptg4GzFMF+Vli/j1QnKp23WXVCrbIaCGK10g2HU03AsUCo5qgUmZQoUSi7zpVWvX5qUPXB+2255QCUA4dbOt3I43y0Nlzh/VwwUxOnLo/6bN7oYGEyZPoElWTidPc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=lst.de; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=3ClmzK81; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="3ClmzK81" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=7WrAq85hb5EzAI0QdwS9kx5aUTvTK9+Z0/VmDcCQjL8=; b=3ClmzK815mG5LP/9u3eiWQjQG/ B51vhls/JePeeU/5jdzpNF+da/Zxj+0wCssyURb2rQXGehRtPa0Z46EzyiQAg/4ndB6yjB7dYJqG0 NOH4Bkwah311k8+hDW8Nw2MRH77+a5QJqgZ9weeTiZWPCuSKTURTtLnV7pACgkzKgTsmCNe8dQPZ2 kbIo/t8/fVx1DZQWwywRHFhUIIV6maMwUE39h6jXCKGa71ZVA2NujBQbUEajAUj8sta2VtuyC1hca d21VqDCjqEPHBkro9cumv4H2Wq/2KAEWb6etYixOjIeePtKccwc1XBfxhpxbimK4i8P6IDcO29t+8 9t3r27qA==; Received: from 2a02-8389-2341-5b80-d601-7564-c2e0-491c.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:d601:7564:c2e0:491c] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4v9z-00000000ghi-2n5s; Tue, 24 Mar 2026 06:22:40 +0000 From: Christoph Hellwig To: Andrew Morton Cc: Richard Henderson , Matt Turner , Magnus Lindholm , Russell King , Catalin Marinas , Will Deacon , Ard Biesheuvel , Huacai Chen , WANG Xuerui , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Andreas Larsson , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Herbert Xu , Dan Williams , Chris Mason , David Sterba , Arnd Bergmann , Song Liu , Yu Kuai , Li Nan , "Theodore Ts'o" , "Jason A. Donenfeld" , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-crypto@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-arch@vger.kernel.org, linux-raid@vger.kernel.org Subject: [PATCH 01/26] xor: assert that xor_blocks is not from preemptible user context Date: Tue, 24 Mar 2026 07:21:37 +0100 Message-ID: <20260324062211.3216301-2-hch@lst.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260324062211.3216301-1-hch@lst.de> References: <20260324062211.3216301-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 --- crypto/xor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/xor.c b/crypto/xor.c index f39621a57bb3..676d7401af43 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; + lockdep_assert_preemption_enabled(); + p1 = (unsigned long *) srcs[0]; if (src_count == 1) { active_template->do_2(bytes, dest, p1); -- 2.47.3