Discussion:
[openssl.org #3550] patch
Haruhiko Nakasu via RT
2014-10-01 07:08:17 UTC
Permalink
Hello.

This is the ppccap.c's patch for Mac OS X with PowerPC G3.
OpenSSL with PowerPC G3 is working fine. But always clash without OPENSSL_ppccap=0.

So I made patch.

Thanks for Your jobs.

-----------------------------------------------------------------------------------
diff -urNd openssl-1.0.1i.orig/crypto/ppccap.c openssl-1.0.1i/crypto/ppccap.c
--- openssl-1.0.1i.orig/crypto/ppccap.c 2014-08-07 06:10:56.000000000 +0900
+++ openssl-1.0.1i/crypto/ppccap.c 2014-09-30 20:20:05.000000000 +0900
@@ -84,6 +84,10 @@

OPENSSL_ppccap_P = 0;

+#if (defined(__APPLE__) && !defined(__ALTIVEC__))
+ return;
+#endif
+
#if defined(_AIX)
if (sizeof(size_t)==4
# if defined(_SC_AIX_KERNEL_BITMODE)

-----------------------------------------------------------------------------------



===========================
Haruhiko Nakasu
***@nifty.com
http://www.asahi-net.or.jp/~mn5h-nks/

______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-***@openssl.org
Automated List Manager ***@openssl.org
Andy Polyakov via RT
2014-10-01 12:42:38 UTC
Permalink
Hi,
Post by Haruhiko Nakasu via RT
This is the ppccap.c's patch for Mac OS X with PowerPC G3.
OpenSSL with PowerPC G3 is working fine. But always clash without OPENSSL_ppccap=0.
If by crash you mean http://www.openssl.org/support/faq.html#PROG17,
i.e. you suffer from it when debugging, then answer is deal with it.
E.g. by setting the environment variable when debugging. Otherwise you
shouldn't notice it, because the exception is handled. But in either
case suggested patch wouldn't not qualify as solution. Note that with
the compiler flags used to build OpenSSL on MacOS X for PPC __ALTIVEC__
is *not* defined. This means that proposed patch would disable the probe
and consequently Altivec code even on Altivec-capable processors.
Altivec works without __ALTIVEC__ defined at compile time, because all
Altivec code resides in assembly modules. Well, "modules" is not really
correct, because there is only one for the moment, the
Vector-Permutation AES.

Anyway, if there is problem besides when debugging, then describe it. If
solution is indeed required, then sysctl should be the way to go about
fixing it.
Post by Haruhiko Nakasu via RT
-----------------------------------------------------------------------------------
diff -urNd openssl-1.0.1i.orig/crypto/ppccap.c openssl-1.0.1i/crypto/ppccap.c
--- openssl-1.0.1i.orig/crypto/ppccap.c 2014-08-07 06:10:56.000000000 +0900
+++ openssl-1.0.1i/crypto/ppccap.c 2014-09-30 20:20:05.000000000 +0900
@@ -84,6 +84,10 @@
OPENSSL_ppccap_P = 0;
+#if (defined(__APPLE__) && !defined(__ALTIVEC__))
+ return;
+#endif
+
#if defined(_AIX)
if (sizeof(size_t)==4
# if defined(_SC_AIX_KERNEL_BITMODE)
-----------------------------------------------------------------------------------
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-***@openssl.org
Automated List Manager ***@openssl.org
Loading...