6
0
forked from pool/boringssl
Files
boringssl/0003-enable-s390x-builds.patch

72 lines
2.6 KiB
Diff
Raw Permalink Normal View History

From 47c30871e5c56a2d6578fedd89e52b10e5580558 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Wed, 4 Dec 2019 08:19:54 +0100
Subject: [PATCH 3/4] enable s390x builds
similar to the aarch64 patch, covering
- recognition of architecture
- adapting memory alignment
---
Accepting request 809901 from home:mrostecki:branches:security:tls - Remove patch for enabling shared linking - it was enabled upstream. * 0001-add-soversion-option.patch - Add boringssl-source subpackage. - Update to version 20200122: * Define EVP compatibility constants for X448 and Ed448. * Allow shared libraries in the external CMake build. * Add a few little-endian functions to CBS/CBB. * Move iOS asm tricks up in external CMake build. * Try again to deal with expensive tests. * Restore ARM CPU variation tests on builders. * Remove SSL_CTX_set_rsa_pss_rsae_certs_enabled. * Work around another NULL/0 C language bug. * Use the MAYBE/DISABLED pattern in RSATest.BlindingCacheConcurrency. * Switch an #if-0-gated test to DISABLED_Foo. * Proxy: send whole SSL records through the handshaker. * Disable Wycheproof primality test cases on non-x86 (too slow) * test_state.cc: serialize the test clock. * Output after every Wycheproof primality test. * Maybe fix generated-CMake build on Android and iOS. * Detect the NDK path from CMAKE_TOOLCHAIN_FILE. * Tell Go to build for GOOS=android when running on Android. * Reland bitsliced aes_nohw implementation. * Add bssl client option to load a hashed directory of cacerts. * No-op change to run the new NO_SSE2 builders. * Clarify that we perform the point-on-curve check. * Reduce size of BlindingCacheConcurrency test under TSAN. * Compare vpaes/bsaes conversions against a reference implementation. * Enable the SSE2 Poly1305 implementation on clang-cl. OBS-URL: https://build.opensuse.org/request/show/809901 OBS-URL: https://build.opensuse.org/package/show/security:tls/boringssl?expand=0&rev=30
2020-05-28 10:24:38 +00:00
CMakeLists.txt | 2 ++
src/crypto/cipher_extra/aead_test.cc | 2 ++
src/crypto/poly1305/poly1305_test.cc | 9 +++++++--
src/include/openssl/base.h | 3 +++
4 files changed, 14 insertions(+), 2 deletions(-)
Index: boringssl-20200122/CMakeLists.txt
Accepting request 809901 from home:mrostecki:branches:security:tls - Remove patch for enabling shared linking - it was enabled upstream. * 0001-add-soversion-option.patch - Add boringssl-source subpackage. - Update to version 20200122: * Define EVP compatibility constants for X448 and Ed448. * Allow shared libraries in the external CMake build. * Add a few little-endian functions to CBS/CBB. * Move iOS asm tricks up in external CMake build. * Try again to deal with expensive tests. * Restore ARM CPU variation tests on builders. * Remove SSL_CTX_set_rsa_pss_rsae_certs_enabled. * Work around another NULL/0 C language bug. * Use the MAYBE/DISABLED pattern in RSATest.BlindingCacheConcurrency. * Switch an #if-0-gated test to DISABLED_Foo. * Proxy: send whole SSL records through the handshaker. * Disable Wycheproof primality test cases on non-x86 (too slow) * test_state.cc: serialize the test clock. * Output after every Wycheproof primality test. * Maybe fix generated-CMake build on Android and iOS. * Detect the NDK path from CMAKE_TOOLCHAIN_FILE. * Tell Go to build for GOOS=android when running on Android. * Reland bitsliced aes_nohw implementation. * Add bssl client option to load a hashed directory of cacerts. * No-op change to run the new NO_SSE2 builders. * Clarify that we perform the point-on-curve check. * Reduce size of BlindingCacheConcurrency test under TSAN. * Compare vpaes/bsaes conversions against a reference implementation. * Enable the SSE2 Poly1305 implementation on clang-cl. OBS-URL: https://build.opensuse.org/request/show/809901 OBS-URL: https://build.opensuse.org/package/show/security:tls/boringssl?expand=0&rev=30
2020-05-28 10:24:38 +00:00
===================================================================
--- boringssl-20200122.orig/CMakeLists.txt
+++ boringssl-20200122/CMakeLists.txt
@@ -93,6 +93,8 @@ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUA
set(ARCH "generic")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
set(ARCH "ppc64le")
+elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "s390x")
+ set(ARCH "s390x")
else()
message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
Index: boringssl-20200122/src/crypto/cipher_extra/aead_test.cc
Accepting request 809901 from home:mrostecki:branches:security:tls - Remove patch for enabling shared linking - it was enabled upstream. * 0001-add-soversion-option.patch - Add boringssl-source subpackage. - Update to version 20200122: * Define EVP compatibility constants for X448 and Ed448. * Allow shared libraries in the external CMake build. * Add a few little-endian functions to CBS/CBB. * Move iOS asm tricks up in external CMake build. * Try again to deal with expensive tests. * Restore ARM CPU variation tests on builders. * Remove SSL_CTX_set_rsa_pss_rsae_certs_enabled. * Work around another NULL/0 C language bug. * Use the MAYBE/DISABLED pattern in RSATest.BlindingCacheConcurrency. * Switch an #if-0-gated test to DISABLED_Foo. * Proxy: send whole SSL records through the handshaker. * Disable Wycheproof primality test cases on non-x86 (too slow) * test_state.cc: serialize the test clock. * Output after every Wycheproof primality test. * Maybe fix generated-CMake build on Android and iOS. * Detect the NDK path from CMAKE_TOOLCHAIN_FILE. * Tell Go to build for GOOS=android when running on Android. * Reland bitsliced aes_nohw implementation. * Add bssl client option to load a hashed directory of cacerts. * No-op change to run the new NO_SSE2 builders. * Clarify that we perform the point-on-curve check. * Reduce size of BlindingCacheConcurrency test under TSAN. * Compare vpaes/bsaes conversions against a reference implementation. * Enable the SSE2 Poly1305 implementation on clang-cl. OBS-URL: https://build.opensuse.org/request/show/809901 OBS-URL: https://build.opensuse.org/package/show/security:tls/boringssl?expand=0&rev=30
2020-05-28 10:24:38 +00:00
===================================================================
--- boringssl-20200122.orig/src/crypto/cipher_extra/aead_test.cc
+++ boringssl-20200122/src/crypto/cipher_extra/aead_test.cc
@@ -31,6 +31,8 @@
#if defined(OPENSSL_AARCH64)
#define ALIGN_BYTES 16
+#elif defined(OPENSSL_S390X)
+#define ALIGN_BYTES 8
#else
#define ALIGN_BYTES 64
#endif
Index: boringssl-20200122/src/crypto/poly1305/poly1305_test.cc
Accepting request 809901 from home:mrostecki:branches:security:tls - Remove patch for enabling shared linking - it was enabled upstream. * 0001-add-soversion-option.patch - Add boringssl-source subpackage. - Update to version 20200122: * Define EVP compatibility constants for X448 and Ed448. * Allow shared libraries in the external CMake build. * Add a few little-endian functions to CBS/CBB. * Move iOS asm tricks up in external CMake build. * Try again to deal with expensive tests. * Restore ARM CPU variation tests on builders. * Remove SSL_CTX_set_rsa_pss_rsae_certs_enabled. * Work around another NULL/0 C language bug. * Use the MAYBE/DISABLED pattern in RSATest.BlindingCacheConcurrency. * Switch an #if-0-gated test to DISABLED_Foo. * Proxy: send whole SSL records through the handshaker. * Disable Wycheproof primality test cases on non-x86 (too slow) * test_state.cc: serialize the test clock. * Output after every Wycheproof primality test. * Maybe fix generated-CMake build on Android and iOS. * Detect the NDK path from CMAKE_TOOLCHAIN_FILE. * Tell Go to build for GOOS=android when running on Android. * Reland bitsliced aes_nohw implementation. * Add bssl client option to load a hashed directory of cacerts. * No-op change to run the new NO_SSE2 builders. * Clarify that we perform the point-on-curve check. * Reduce size of BlindingCacheConcurrency test under TSAN. * Compare vpaes/bsaes conversions against a reference implementation. * Enable the SSE2 Poly1305 implementation on clang-cl. OBS-URL: https://build.opensuse.org/request/show/809901 OBS-URL: https://build.opensuse.org/package/show/security:tls/boringssl?expand=0&rev=30
2020-05-28 10:24:38 +00:00
===================================================================
--- boringssl-20200122.orig/src/crypto/poly1305/poly1305_test.cc
+++ boringssl-20200122/src/crypto/poly1305/poly1305_test.cc
@@ -25,6 +25,11 @@
#include "../test/file_test.h"
#include "../test/test_util.h"
+#if defined(OPENSSL_S390X)
+#define ALIGN_BYTES 8
+#else
+#define ALIGN_BYTES 16
+#endif
static void TestSIMD(unsigned excess, const std::vector<uint8_t> &key,
const std::vector<uint8_t> &in,
Index: boringssl-20200122/src/include/openssl/base.h
Accepting request 809901 from home:mrostecki:branches:security:tls - Remove patch for enabling shared linking - it was enabled upstream. * 0001-add-soversion-option.patch - Add boringssl-source subpackage. - Update to version 20200122: * Define EVP compatibility constants for X448 and Ed448. * Allow shared libraries in the external CMake build. * Add a few little-endian functions to CBS/CBB. * Move iOS asm tricks up in external CMake build. * Try again to deal with expensive tests. * Restore ARM CPU variation tests on builders. * Remove SSL_CTX_set_rsa_pss_rsae_certs_enabled. * Work around another NULL/0 C language bug. * Use the MAYBE/DISABLED pattern in RSATest.BlindingCacheConcurrency. * Switch an #if-0-gated test to DISABLED_Foo. * Proxy: send whole SSL records through the handshaker. * Disable Wycheproof primality test cases on non-x86 (too slow) * test_state.cc: serialize the test clock. * Output after every Wycheproof primality test. * Maybe fix generated-CMake build on Android and iOS. * Detect the NDK path from CMAKE_TOOLCHAIN_FILE. * Tell Go to build for GOOS=android when running on Android. * Reland bitsliced aes_nohw implementation. * Add bssl client option to load a hashed directory of cacerts. * No-op change to run the new NO_SSE2 builders. * Clarify that we perform the point-on-curve check. * Reduce size of BlindingCacheConcurrency test under TSAN. * Compare vpaes/bsaes conversions against a reference implementation. * Enable the SSE2 Poly1305 implementation on clang-cl. OBS-URL: https://build.opensuse.org/request/show/809901 OBS-URL: https://build.opensuse.org/package/show/security:tls/boringssl?expand=0&rev=30
2020-05-28 10:24:38 +00:00
===================================================================
--- boringssl-20200122.orig/src/include/openssl/base.h
+++ boringssl-20200122/src/include/openssl/base.h
@@ -99,6 +99,9 @@ extern "C" {
#elif (defined(__PPC64__) || defined(__powerpc64__)) && defined(_LITTLE_ENDIAN)
#define OPENSSL_64_BIT
#define OPENSSL_PPC64LE
+#elif defined(__S390X__) || defined(__s390x__)
+#define OPENSSL_64_BIT
+#define OPENSSL_S390X
#elif defined(__mips__) && !defined(__LP64__)
#define OPENSSL_32_BIT
#define OPENSSL_MIPS