Commit 82f312e8de for openssl.org
commit 82f312e8de598d1d72da20d4c4a8906531134949
Author: Ingo Franzki <ifranzki@linux.ibm.com>
Date: Mon Jun 22 11:53:31 2026 +0200
s390x: Display 'cex_min_bits' and 'nocex' as part of CPUINFO
Command 'openssl version -c' as well as other commands (e.g. 'openssl speed')
display the CPU information. For s390x, this includes the OPENSSL_s390xcap
settings that are currently in place.
Also display the 'cex_min_bits:<bits>' and 'nocex' settings there.
The 'cex_min_bits' setting is always displayed, showing the default value if
it was not explicitly specified via the OPENSSL_s390xcap environment variable.
The 'nocex' setting is only displayed when it was explicitly set via the
OPENSSL_s390xcap environment variable, or if offloading is disabled because
no crypto adapters are available or the file descriptor has been closed
by other means.
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Fri Oct 23 15:20:46 2026
(Merged from https://github.com/openssl/openssl/pull/31630)
diff --git a/crypto/info.c b/crypto/info.c
index 588374f780..b9fca5de84 100644
--- a/crypto/info.c
+++ b/crypto/info.c
@@ -118,7 +118,9 @@ DEFINE_RUN_ONCE_STATIC(init_info_strings)
"prno:0x%llx:0x%llx:"
"kma:0x%llx:0x%llx:"
"pcc:0x%llx:0x%llx:"
- "kdsa:0x%llx:0x%llx",
+ "kdsa:0x%llx:0x%llx:"
+ "cex_min_bits:%u"
+ "%s",
OPENSSL_s390xcap_P.stfle[0], OPENSSL_s390xcap_P.stfle[1],
OPENSSL_s390xcap_P.stfle[2], OPENSSL_s390xcap_P.stfle[3],
OPENSSL_s390xcap_P.kimd[0], OPENSSL_s390xcap_P.kimd[1],
@@ -132,7 +134,13 @@ DEFINE_RUN_ONCE_STATIC(init_info_strings)
OPENSSL_s390xcap_P.prno[0], OPENSSL_s390xcap_P.prno[1],
OPENSSL_s390xcap_P.kma[0], OPENSSL_s390xcap_P.kma[1],
OPENSSL_s390xcap_P.pcc[0], OPENSSL_s390xcap_P.pcc[1],
- OPENSSL_s390xcap_P.kdsa[0], OPENSSL_s390xcap_P.kdsa[1]);
+ OPENSSL_s390xcap_P.kdsa[0], OPENSSL_s390xcap_P.kdsa[1],
+#ifdef S390X_MOD_EXP
+ OPENSSL_s390xcex_min_bits,
+ (OPENSSL_s390xcex == -1 || OPENSSL_s390xcex_nodev) ? ":nocex" : "");
+#else
+ 0, "");
+#endif
if ((env = getenv("OPENSSL_s390xcap")) != NULL)
cpu_info_append(" env:%s", env);
#elif defined(__riscv)