Commit 888fa4ed34 for openssl.org
commit 888fa4ed34b478cb4c39eef0281b9c5e7e223227
Author: Julian Zhu <julian.oerv@isrc.iscas.ac.cn>
Date: Sun Nov 8 00:11:33 2026 +0800
RISC-V: Include V in the vector capability check
The vector capability check covers bits 15 through 23, but V itself
occupies bit 14.
Extend the checked range to include V itself so that both V and its
dependent extensions require the V bit in AT_HWCAP.
Signed-off-by: Julian Zhu <julian.oerv@isrc.iscas.ac.cn>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Mounir Idrassi <mounir.idrassi@idrix.fr>
Merge-date: Mon Nov 23 17:28:09 2026
Merged-from: https://github.com/openssl/openssl/pull/33597
diff --git a/include/arch/riscv_arch.h b/include/arch/riscv_arch.h
index b83d3b62c6..0bbfc0671c 100644
--- a/include/arch/riscv_arch.h
+++ b/include/arch/riscv_arch.h
@@ -26,7 +26,7 @@
#include <asm/hwcap.h>
extern unsigned int OPENSSL_riscv_hwcap_P;
#define VECTOR_CAPABLE (OPENSSL_riscv_hwcap_P & COMPAT_HWCAP_ISA_V)
-#define ZVX_MIN 15
+#define ZVX_MIN 14
#define ZVX_MAX 23
#define IS_IN_DEPEND_VECTOR(offset) ((ZVX_MIN <= offset) && (offset <= ZVX_MAX))
#endif