* [PATCH] s390/xor: Fix xor_xc_2() inline assembly constraints
@ 2026-02-27 9:21 Heiko Carstens
2026-02-27 18:56 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: Heiko Carstens @ 2026-02-27 9:21 UTC (permalink / raw)
To: Alexander Gordeev, Sven Schnelle, Vasily Gorbik,
Christian Borntraeger, Christoph Hellwig
Cc: linux-kernel, linux-s390
The inline assembly constraints for xor_xc_2() are incorrect. "bytes",
"p1", and "p2" are input operands, while all three of them are modified
within the inline assembly. Given that the function consists only of this
inline assembly it seems unlikely that this may cause any problems, however
fix this in any case.
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
arch/s390/lib/xor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/lib/xor.c b/arch/s390/lib/xor.c
index 1721b73b7803..d703c44d5fd6 100644
--- a/arch/s390/lib/xor.c
+++ b/arch/s390/lib/xor.c
@@ -28,8 +28,8 @@ static void xor_xc_2(unsigned long bytes, unsigned long * __restrict p1,
" j 3f\n"
"2: xc 0(1,%1),0(%2)\n"
"3:"
- : : "d" (bytes), "a" (p1), "a" (p2)
- : "0", "cc", "memory");
+ : "+d" (bytes), "+a" (p1), "+a" (p2)
+ : : "0", "cc", "memory");
}
static void xor_xc_3(unsigned long bytes, unsigned long * __restrict p1,
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] s390/xor: Fix xor_xc_2() inline assembly constraints
2026-02-27 9:21 [PATCH] s390/xor: Fix xor_xc_2() inline assembly constraints Heiko Carstens
@ 2026-02-27 18:56 ` Heiko Carstens
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2026-02-27 18:56 UTC (permalink / raw)
To: Heiko Carstens
Cc: Alexander Gordeev, Sven Schnelle, Vasily Gorbik,
Christian Borntraeger, Christoph Hellwig, linux-kernel,
linux-s390
On Fri, Feb 27, 2026 at 10:21:07AM +0100, Heiko Carstens wrote:
> The inline assembly constraints for xor_xc_2() are incorrect. "bytes",
> "p1", and "p2" are input operands, while all three of them are modified
> within the inline assembly. Given that the function consists only of this
> inline assembly it seems unlikely that this may cause any problems, however
> fix this in any case.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
> arch/s390/lib/xor.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Ignore this patch. While looking at xor.c again I realized that all
inline assembly constraints are incorrect. Will send an updated
version next week.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-27 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 9:21 [PATCH] s390/xor: Fix xor_xc_2() inline assembly constraints Heiko Carstens
2026-02-27 18:56 ` Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox