From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 835BCFD8FC9 for ; Thu, 26 Feb 2026 15:11:52 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fMFKy5sP0z2yLF; Fri, 27 Feb 2026 02:11:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2607:7c80:54:3::133" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772118710; cv=none; b=Q8fb4NRc9MnibCADcPm7Lax4gx91oIiV+wLQfF1UByA/ir4+psCSeMHTI2KVghwSkWBbCEVZgEOACNPS/7uNCFgDu8fHSZuZ2dHQXiinzEa1EsVdidLChEyKoPESejtZp3Z+Tp+UVQbHYu7bftf61VbFFznO9Lek98+nmqK4M2QpxTW9g2sWnTy7eez9oB9RB4hEw90QvjgNKW/j+iiM3ewMjvEXdEpJ6wIsXvFsWKK+MXZ52+ElMFuH+0crbvYwmqkFSMlhTpwmS0+lRk6D4E2yqBCM5GRS7qjmsRheapLN8D72o9Bvgclo+lJGfORbbBO4qGQrt/kEe3wPkcB2dQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1772118710; c=relaxed/relaxed; bh=FL7hvoLUY2bMRMbRRlVqvQioL9cWbtICIXJOfzPCsUY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XHxxMzINEBl61h2wSlZreS4cUGe8HB9XFVb9i/s+AUxlDNtShcCtrqDD4rNA0/rTCBU6Rp/58VOMsbaykHmEFXSO7o1ddc1hagDQmTiBCxbY6b9DKrHoa5mr3zf17iBpkgyHq5dIij5NggDFqJa0WEnMOfArxhaE3xuN0DKCtqiVNP5FGdWL3qOA3DGkzN0ItkX4nljxEob7SVrjJltYBKjen/EmsQ2g7v+1gQ6GXKEEWxJ+AdFVLA4A1NuLqNWea/UF7UEGfKl3eyJaEqNE3oRWvZ1n6MU3Exs3HMP1DVxLfXcLz2K1zrb2Q3YQZwuH/u4metpxLCf9+5Ahak4Qbw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=lst.de; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XHbUM+ZF; dkim-atps=neutral; spf=none (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=batv+c5cab09b19de097b6dd3+8222+infradead.org+hch@bombadil.srs.infradead.org; receiver=lists.ozlabs.org) smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=lst.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XHbUM+ZF; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=bombadil.srs.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=batv+c5cab09b19de097b6dd3+8222+infradead.org+hch@bombadil.srs.infradead.org; receiver=lists.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fMFKs2nbrz2yFd for ; Fri, 27 Feb 2026 02:11:44 +1100 (AEDT) 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=FL7hvoLUY2bMRMbRRlVqvQioL9cWbtICIXJOfzPCsUY=; b=XHbUM+ZF+eSP9evvU2lA+aZ1n3 oz9Ng/VTFMX+nIIw8M9JfeIbbm/2EAGZ1foNiPO3rtUPgy84qdU4C7ALpzMghcKlS95XJhtfKcObZ eeFwy3AFprG1+qG+QK0PIBGjEfeem7EvlPDk+zHeUhI1+7EF0IPebPg2GYmD4xerBWnUrLcAkdu9H /h8OSjql+qMzW8g+6thcycmaSQfviqz2Ri8qZHzFsfQF7sQw3TwibkFR1SzYW2fXgx/ilethOTI1A /G3wb0GF3L+x3N/Jf8Cpz/jE8ElaXqGDVufZG4psAPNN2O6qnihnpFs5RGBiEcy7ODOCl5qyYgr1y 8l7lootg==; Received: from [4.28.11.157] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vvd1B-00000006Pxy-2BGc; Thu, 26 Feb 2026 15:11:09 +0000 From: Christoph Hellwig To: Andrew Morton Cc: Richard Henderson , Matt Turner , Magnus Lindholm , Russell King , Catalin Marinas , Will Deacon , 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 , 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/25] xor: assert that xor_blocks is not called from interrupt context Date: Thu, 26 Feb 2026 07:10:13 -0800 Message-ID: <20260226151106.144735-2-hch@lst.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260226151106.144735-1-hch@lst.de> References: <20260226151106.144735-1-hch@lst.de> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list 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..864f3604e867 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_interrupt()); + p1 = (unsigned long *) srcs[0]; if (src_count == 1) { active_template->do_2(bytes, dest, p1); -- 2.47.3