lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c2a11f4-27ac-1389-23a6-5f5bcf1c5048@kernel.org>
Date: Tue, 25 Nov 2025 02:26:42 -0700 (MST)
From: Paul Walmsley <pjw@...nel.org>
To: Chunyan Zhang <zhangchunyan@...as.ac.cn>
cc: Paul Walmsley <paul.walmsley@...ive.com>, 
    Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, 
    Alexandre Ghiti <alex@...ti.fr>, Charlie Jenkins <charlie@...osinc.com>, 
    Song Liu <song@...nel.org>, Yu Kuai <yukuai3@...wei.com>, 
    linux-riscv@...ts.infradead.org, linux-raid@...r.kernel.org, 
    linux-kernel@...r.kernel.org, Chunyan Zhang <zhang.lyra@...il.com>
Subject: Re: [PATCH V3 3/5] raid6: riscv: Prevent compiler with vector support
 to build already vectorized code

Hi,

On Fri, 18 Jul 2025, Chunyan Zhang wrote:

> To avoid the inline assembly code to break what the compiler could have
> vectorized, this code must be built without compiler support for vector.
> 
> Signed-off-by: Chunyan Zhang <zhangchunyan@...as.ac.cn>

This one has been queued with a somewhat modified commit message to 
reflect what I thought the intention is.  But I might be wrong.  Can you 
check it, please?

thanks,


- Paul

From: Chunyan Zhang <zhangchunyan@...as.ac.cn>
Date: Mon, 17 Nov 2025 21:19:24 -0700

raid6: riscv: Prevent compiler from breaking inline vector assembly code

To prevent the compiler from breaking the inline vector assembly code,
this code must be built without compiler support for vector.

Signed-off-by: Chunyan Zhang <zhangchunyan@...as.ac.cn>
Link: https://patch.msgid.link/20250718072711.3865118-4-zhangchunyan@iscas.ac.cn
[pjw@...nel.org: cleaned up commit message]
Signed-off-by: Paul Walmsley <pjw@...nel.org>
---
 lib/raid6/rvv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/raid6/rvv.c b/lib/raid6/rvv.c
index 89da5fc247aa..015f3ee4da25 100644
--- a/lib/raid6/rvv.c
+++ b/lib/raid6/rvv.c
@@ -20,6 +20,10 @@ static int rvv_has_vector(void)
 	return has_vector();
 }
 
+#ifdef __riscv_vector
+#error "This code must be built without compiler support for vector"
+#endif
+
 static void raid6_rvv1_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs)
 {
 	u8 **dptr = (u8 **)ptrs;
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ