From d3ae3ea75073c53ed5f3a4418e76383436bb0f58 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 20 Jul 2024 12:29:37 +0100 Subject: gentoo auto-resync : 20:07:2024 - 12:29:37 --- dev-libs/openssl/Manifest | 3 +- dev-libs/openssl/files/openssl-3.3.1-riscv.patch | 96 ++++++++++++++++++++++++ dev-libs/openssl/openssl-3.3.1.ebuild | 4 +- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 dev-libs/openssl/files/openssl-3.3.1-riscv.patch (limited to 'dev-libs/openssl') diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest index 74a4c821cabb..f776346fe402 100644 --- a/dev-libs/openssl/Manifest +++ b/dev-libs/openssl/Manifest @@ -10,6 +10,7 @@ AUX openssl-3.2.1-CVE-2024-2511.patch 5166 BLAKE2B 22ebed2ada20ee5c65d489677d270 AUX openssl-3.2.1-p11-segfault.patch 2275 BLAKE2B d47816615ece0d015be0a307db950cee1217a522570040a48b9a9a7f7a23927f73ba5633718937c07c90c9a49564e9acc00de239d156cf8632b473afcdba8705 SHA512 9ab62a72036f8fbae34e844e6b17ab3482259de24918279230c2e5daa373de8ee59bd17942c2f4b2dcf06b1bf31796dc539324055e1cded099f6d8630bc13fff AUX openssl-3.2.1-riscv.patch 3713 BLAKE2B 427a35e30768116b7d65f442c4b2b5ddf6cc7387dc69ec7311345336a59bb86984b45e5572bab67fecf159580b2321aec35db9c6306b74c2d76db51479d910b8 SHA512 e80a244e9674cbd250244aab16501ea5ab6a03efb44ea744ac109063dda003cc638d0eb6da4630f1c1d7eeabbbc14530b21e3c74608ac961141133b09f4795af AUX openssl-3.2.1-s390x.patch 1169 BLAKE2B ae115074de657f450813b329f3f52d19993734b753411be72b2793df8163402c54bb690d7e41ee7598ae500176eb4f57e108021dcfcbcfef81d9135f5ce41e3e SHA512 6c66c9387a13f772e24dbd794b79dc8fdd8fd81186e3d33c917bd45a6c4841a29e5e28643597e1e105b154c30d7b5814fe154895312241b7f793dc352913095c +AUX openssl-3.3.1-riscv.patch 4413 BLAKE2B bf58837c05023bb34edaf6387a5d1f32b6216791643958e972d634d387031461780c34b9209b399f479d908a40ca3b593ea18b1fa80414802bfcdb80db21e1e7 SHA512 b46f2576be603007f767cb7350e3ec74e0ef0832bcc18e50f7b67010e673a6cdcd7099e99d85d53c6693af6b64260e5a92a9aa3f02be1d626421ab7ff73c6f6b DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659 DIST openssl-1.0.2t-bindist-1.0.tar.xz 13872 BLAKE2B b2aade96a6e0ca6209a39e205b1c838de945903fcf959c62cc29ddcd1a0cb360fc5db234df86860a6a4c096f5ecc237611e4c2946b986a5500c24ba93c208ef4 SHA512 a48a7efb9b973b865bcc5009d450b428ed6b4b95e4cefe70c51056e47392c8a7bec58215168d8b07712419dc74646c2bd2fd23bcfbba2031376e292249a6b1b6 DIST openssl-1.0.2u.tar.gz 5355412 BLAKE2B b2ff2a10e5851af5aca4093422a9a072c794e87b997263826c1c35910c040f695fac63decac5856cb49399ed03d410f97701d9fd4e1ebfbcacd8f3a74ce8bf57 SHA512 c455bb309e20e2c2d47fdc5619c734d107d5c8c38c1409903ce979acc120b0d5fa0312917c0aa0d630e402d092a703d4249643f36078e8528a3cafc9dac6ab32 @@ -40,5 +41,5 @@ EBUILD openssl-3.1.6.ebuild 8534 BLAKE2B b0d0b4c64ad7b025272ac54150ef9ea18e6ab97 EBUILD openssl-3.2.1-r2.ebuild 9377 BLAKE2B d8a1bd16284002ec39c926bbe9da25c371e2b54f668146d68f72e8f210e1e0073c1bbeb243f9e24ae970023c207906141e7232e925be718ca244e71dc2f604e9 SHA512 9c6f800d565a7c615ce77e04501b0d9f78c4047465242b9bd6f2c64dc0e0b68a6ff0f3effbf70aba0fe0339455d40095609b4a0df33b07e5afbc7543fe9aef58 EBUILD openssl-3.2.2.ebuild 9179 BLAKE2B c58b822d2c7a0c0f9b2eb985171472818d6719f2f4f7a87ce33f3cbc5d10decd98588357f7dfe64ec49f1b5e220cb26d334a6cd9e88bc35b3f9584f53c961974 SHA512 8dc73f143cad88806c3a3ae23e20ce88f45e24f8a862aabbb28f38f2be9342df188575ea6cf3530f854c7fdf39bc336a3da3c7983166e6825d838abb58c8e2c2 EBUILD openssl-3.3.0.ebuild 9232 BLAKE2B 26a1b881b02d355802ff020f2d8797b74d7db61426f0254a30937112ba52988317cf9b58155c1d8fb7a662679d78cca80f484ce72fd66684590f85b2da07af67 SHA512 ecb11de2fa82c33911ab3c9500f942524b4831e7318d7cebacc14218f3b08cc379808ec64086475d2151fe7d5981fc775cd47a71ca0aba8a09c03df52e413413 -EBUILD openssl-3.3.1.ebuild 9094 BLAKE2B a2ee84f53932fddbd018c3a6c57cbae5124951d9c47f320809ec916a47396a945c9f4b324b0f9a21554bbff990d557169c948db39138d82423f64e48debc7e2b SHA512 3632abdf334f04a9045cc5929525720fabed83ae85d8b1825877aae4484dc75b5d9ef3fc297413cb864be310197a0916bbcb5d19ff1e6a6eb6eeaef67d0c3d21 +EBUILD openssl-3.3.1.ebuild 9185 BLAKE2B 7fb4e9e92c8cee1ffb972340511f91dd0d59e9bd08e30b4e467cad81e28998618d7b0c1970e510f2b9c56a5d36cef0f6513137033c128909bc01d595b3e53523 SHA512 7d3820c8a7d1b041edd9e913a7741d2664cddb475b7c87b5789532c060cdaac276ca35ed2523808d600c127c4553a134abf8e09acc7c6c82695e1260872baead MISC metadata.xml 1674 BLAKE2B 2195a6538e1b4ec953c707460988f153e40abe7495fd761403c9a54b44ecb7cb5c69ac37ac7d4d18bc0086cf9b4accaaac19926fe5b2ac4b2c547ce1c9e08a6d SHA512 d4eda999c1027f9d8102c59275665f5b01d234c4a7636755a6d3c64b9aad2a657d14256b1527d9b7067cb653458b058db7f5bb20873e48927291092d9ccdd1c6 diff --git a/dev-libs/openssl/files/openssl-3.3.1-riscv.patch b/dev-libs/openssl/files/openssl-3.3.1-riscv.patch new file mode 100644 index 000000000000..90cad6d92a00 --- /dev/null +++ b/dev-libs/openssl/files/openssl-3.3.1-riscv.patch @@ -0,0 +1,96 @@ +# https://bugs.gentoo.org/936311 +# Taken from https://github.com/openssl/openssl/pull/24486 + +From b1dd4a8005cf172053d986c0dd85fd104f005307 Mon Sep 17 00:00:00 2001 +From: Hongren Zheng +Date: Fri, 24 May 2024 14:12:47 +0800 +Subject: [PATCH] riscv: Fix cpuid_obj asm checks for sm4/sm3 + +Similar to #22881 / #23752 +--- + crypto/sm3/sm3_local.h | 2 +- + include/crypto/sm4_platform.h | 2 +- + providers/implementations/ciphers/cipher_sm4_ccm_hw.c | 2 +- + providers/implementations/ciphers/cipher_sm4_gcm_hw.c | 2 +- + providers/implementations/ciphers/cipher_sm4_hw.c | 2 +- + providers/implementations/ciphers/cipher_sm4_xts_hw.c | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/crypto/sm3/sm3_local.h b/crypto/sm3/sm3_local.h +index d2845f9678967..a467cc98eb13e 100644 +--- a/crypto/sm3/sm3_local.h ++++ b/crypto/sm3/sm3_local.h +@@ -39,7 +39,7 @@ + # define HWSM3_CAPABLE (OPENSSL_armcap_P & ARMV8_SM3) + void ossl_hwsm3_block_data_order(SM3_CTX *c, const void *p, size_t num); + # endif +-# if defined(__riscv) && __riscv_xlen == 64 ++# if defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64 + # include "crypto/riscv_arch.h" + # define HWSM3_CAPABLE 1 + void ossl_hwsm3_block_data_order(SM3_CTX *c, const void *p, size_t num); +diff --git a/include/crypto/sm4_platform.h b/include/crypto/sm4_platform.h +index 928dc17ff0838..4d70d291450a1 100644 +--- a/include/crypto/sm4_platform.h ++++ b/include/crypto/sm4_platform.h +@@ -38,7 +38,7 @@ static inline int vpsm4_ex_capable(void) + # define HWSM4_cbc_encrypt sm4_v8_cbc_encrypt + # define HWSM4_ecb_encrypt sm4_v8_ecb_encrypt + # define HWSM4_ctr32_encrypt_blocks sm4_v8_ctr32_encrypt_blocks +-# elif defined(__riscv) && __riscv_xlen == 64 ++# elif defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64 + /* RV64 support */ + # include "riscv_arch.h" + /* Zvksed extension (vector crypto SM4). */ +diff --git a/providers/implementations/ciphers/cipher_sm4_ccm_hw.c b/providers/implementations/ciphers/cipher_sm4_ccm_hw.c +index 34f0e751e007d..293bb69d64272 100644 +--- a/providers/implementations/ciphers/cipher_sm4_ccm_hw.c ++++ b/providers/implementations/ciphers/cipher_sm4_ccm_hw.c +@@ -59,7 +59,7 @@ static const PROV_CCM_HW ccm_sm4 = { + ossl_ccm_generic_gettag + }; + +-#if defined(__riscv) && __riscv_xlen == 64 ++#if defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64 + # include "cipher_sm4_ccm_hw_rv64i.inc" + #else + const PROV_CCM_HW *ossl_prov_sm4_hw_ccm(size_t keybits) +diff --git a/providers/implementations/ciphers/cipher_sm4_gcm_hw.c b/providers/implementations/ciphers/cipher_sm4_gcm_hw.c +index 06ca450782ff2..e3b4e9f588807 100644 +--- a/providers/implementations/ciphers/cipher_sm4_gcm_hw.c ++++ b/providers/implementations/ciphers/cipher_sm4_gcm_hw.c +@@ -89,7 +89,7 @@ static const PROV_GCM_HW sm4_gcm = { + ossl_gcm_one_shot + }; + +-#if defined(__riscv) && __riscv_xlen == 64 ++#if defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64 + # include "cipher_sm4_gcm_hw_rv64i.inc" + #else + const PROV_GCM_HW *ossl_prov_sm4_hw_gcm(size_t keybits) +diff --git a/providers/implementations/ciphers/cipher_sm4_hw.c b/providers/implementations/ciphers/cipher_sm4_hw.c +index c4f2f97cccd8d..70dc66ffae233 100644 +--- a/providers/implementations/ciphers/cipher_sm4_hw.c ++++ b/providers/implementations/ciphers/cipher_sm4_hw.c +@@ -134,7 +134,7 @@ const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_##mode(size_t keybits) \ + return &sm4_##mode; \ + } + +-#if defined(__riscv) && __riscv_xlen == 64 ++#if defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64 + # include "cipher_sm4_hw_rv64i.inc" + #else + /* The generic case */ +diff --git a/providers/implementations/ciphers/cipher_sm4_xts_hw.c b/providers/implementations/ciphers/cipher_sm4_xts_hw.c +index 6cf58e851f5d4..423598317d217 100644 +--- a/providers/implementations/ciphers/cipher_sm4_xts_hw.c ++++ b/providers/implementations/ciphers/cipher_sm4_xts_hw.c +@@ -89,7 +89,7 @@ static const PROV_CIPHER_HW sm4_generic_xts = { + cipher_hw_sm4_xts_copyctx + }; + +-#if defined(__riscv) && __riscv_xlen == 64 ++#if defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64 + # include "cipher_sm4_xts_hw_rv64i.inc" + #else + const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_xts(size_t keybits) diff --git a/dev-libs/openssl/openssl-3.3.1.ebuild b/dev-libs/openssl/openssl-3.3.1.ebuild index 57742961b14a..d348842d29b0 100644 --- a/dev-libs/openssl/openssl-3.3.1.ebuild +++ b/dev-libs/openssl/openssl-3.3.1.ebuild @@ -23,7 +23,7 @@ else " if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then - KEYWORDS="~amd64" + KEYWORDS="~amd64 ~mips ~sparc ~x86" fi fi @@ -57,6 +57,8 @@ MULTILIB_WRAPPED_HEADERS=( ) PATCHES=( + # bug 936311, drop on next version bump + "${FILESDIR}"/${P}-riscv.patch ) pkg_setup() { -- cgit v1.2.3