Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
89df92298b
!33 修复当AVX2指令启用后,编译出现的错误(警告)
From: @chenxi-mao 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-06-28 02:31:14 +00:00
Chenxi Mao
f206415294 Fix build error if AVX2 enabled
Below build error found if AVX2 enabled:

[   17s] lib/alg-yescrypt-opt.c:517:33: error: conversion to 'long long unsigned int' from 'long long int' may change the sign of the result [-Werror=sign-conversion]
[   17s]   517 |  uint32_t lo = x = EXTRACT64(X) & Smask2reg; \

Cherry pick upstream patches to fix this error.

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2023-06-09 15:31:44 +08:00
Chenxi Mao
84b46c9c65 Try to fix build error
Change-Id: Ic7c2f53f0ef651c57ab46ed6cfa9c19d4f68f13f
2023-06-09 15:19:54 +08:00
openeuler-ci-bot
50c0fd8a3c
!29 [sync] PR-28: 添加sw架构
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2022-11-08 12:13:24 +00:00
wzx
a6b43aa6e9 Add sw64 architecture
Signed-off-by: wzx <wuzx1226@qq.com>
(cherry picked from commit c4486ff15dd744f3b2e271c00c1ce20993c5a066)
2022-11-03 14:18:49 +08:00
openeuler-ci-bot
70f51359cb
!26 【openEuler-22.03-LTS-Next】use the macro make_build instead of make
From: @yixiangzhike 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2022-10-19 09:19:29 +00:00
yixiangzhike
9e931b3ce6 use the macro make_build instead of make
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
2022-10-19 15:03:16 +08:00
openeuler-ci-bot
de8054684d !13 新增支持SM3加密算法
Merge pull request !13 from houmingyong/openEuler-22.03-LTS-Next
2021-12-21 10:46:18 +00:00
houmingyong
8e4c26d265 add sm3 crypt support 2021-12-21 17:14:17 +08:00
openeuler-ci-bot
18d023d9f1 !11 【openEuler-22.03-LTS-Next】Update to 4.4.26
Merge pull request !11 from yixiangzhike/openEuler-22.03-LTS-Next
2021-12-14 11:49:04 +00:00
yixiangzhike
def2066c3d Update to 4.4.26 2021-12-04 11:53:13 +08:00
7 changed files with 1387 additions and 3 deletions

1284
add-sm3-crypt-support.patch Normal file

File diff suppressed because it is too large Load Diff

23
libxcrypt-4.4.26-sw.patch Executable file
View File

@ -0,0 +1,23 @@
diff -uNar libxcrypt-4.4.26.org/lib/crypt-bcrypt.c libxcrypt-4.4.26.sw/lib/crypt-bcrypt.c
--- libxcrypt-4.4.26.org/lib/crypt-bcrypt.c 2022-02-15 12:55:07.000000000 +0000
+++ libxcrypt-4.4.26.sw/lib/crypt-bcrypt.c 2022-02-15 12:55:49.510000000 +0000
@@ -52,7 +52,7 @@
#if INCLUDE_bcrypt || INCLUDE_bcrypt_a || INCLUDE_bcrypt_x || INCLUDE_bcrypt_y
#if defined(__i386__) || defined(__x86_64__) || \
- defined(__alpha__) || defined(__hppa__)
+ defined(__alpha__) || defined(__hppa__) || defined(__sw_64__)
#define BF_SCALE 1
#else
#define BF_SCALE 0
diff -uNar libxcrypt-4.4.26.org/lib/libcrypt.minver libxcrypt-4.4.26.sw/lib/libcrypt.minver
--- libxcrypt-4.4.26.org/lib/libcrypt.minver 2022-02-15 12:55:07.000000000 +0000
+++ libxcrypt-4.4.26.sw/lib/libcrypt.minver 2022-02-15 14:16:36.550000000 +0000
@@ -76,6 +76,7 @@
GLIBC_2.2.5 linux.*gnu x86_64 defined __x86_64__ && ULONG_MAX != UINT_MAX /* 64 */
GLIBC_2.2 linux.*gnu s390x
GLIBC_2.0 linux.*gnu alpha
+GLIBC_2.0 linux.*gnu sw_64
GLIBC_2.0 linux.*gnu e2k
GLIBC_2.0 linux.*gnu hppa
GLIBC_2.0 linux.*gnu i[3-9]86

View File

@ -1,15 +1,27 @@
%ifarch sw_64
%define libdir /lib
%else
%define libdir /lib64
%endif
Name: libxcrypt
Version: 4.4.17
Release: 1
Version: 4.4.26
Release: 5
Summary: Extended crypt library for DES, MD5, Blowfish and others
License: LGPLv2+ and BSD and Public Domain
URL: https://github.com/besser82/%{name}
Source0: https://github.com/besser82/%{name}/archive/v%{version}.tar.gz
Patch9000: add-sm3-crypt-support.patch
Patch9001: libxcrypt-4.4.26-sw.patch
Patch9002: upstream-Fix-warning-about-truncating-conversion.patch
Patch9003: upstream-Fix-warning-about-signed-unsigned-conversion.patch
BuildRequires: autoconf libtool fipscheck
BuildRequires: perl >= 5.14.0
Obsoletes: %{name}-common < %{version}-%{release}
Provides: %{name}-common%{?_isa} = %{version}-%{release} %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-common = %{version}-%{release}
Provides: %{name}-sm3 = %{version}-%{release}
%description
libxcrypt is a modern library for one-way hashing of passwords.
@ -69,7 +81,7 @@ autoreconf -fiv
%{_bindir}/find %{buildroot} -name '*.la' -print -delete
%check
make check
%make_build check
%post -p /sbin/ldconfig
@ -96,6 +108,21 @@ make check
%changelog
* Fri Jun 9 2023 Chenxi Mao<chenxi.mao@suse.com> - 4.4.26-5
- Cherry pick upstream patches to fix build errors if avx2 enabled.
* Fri Oct 21 2022 wuzx<wuzx1226@qq.com> - 4.4.26-4
- add sw64 patch
* Wed Oct 19 2022 yixiangzhike <yixiangzhike007@163.com> - 4.4.26-3
- use the macro make_build instead of make to support multitasking in check
* Thu Dec 16 2021 houmingyong<houmingyong@huawei.com> - 4.4.26-2
- add sm3 crypt support
* Sat Dec 4 2021 yixiangzhike <yixiangzhike007@163.com> - 4.4.26-1
- update to 4.4.26
* Thu Jan 21 2021 wangchen <wangchen137@huawei.com> - 4.4.17-1
- update to 4.4.17

View File

@ -0,0 +1,25 @@
From 17cf4ce8af5a2a1af4c0f52260019cbae01835b8 Mon Sep 17 00:00:00 2001
From: Moinak Bhattacharyya <moinakb001@gmail.com>
Date: Tue, 8 Nov 2022 04:37:13 -0600
Subject: [PATCH 1/1] Fix warning about signed->unsigned conversion
---
lib/alg-yescrypt-opt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/alg-yescrypt-opt.c b/lib/alg-yescrypt-opt.c
index dacc73b..a33c6e4 100644
--- a/lib/alg-yescrypt-opt.c
+++ b/lib/alg-yescrypt-opt.c
@@ -514,7 +514,7 @@ static volatile uint64_t Smask2var = Smask2;
#define PWXFORM_SIMD(X) { \
uint64_t x; \
FORCE_REGALLOC_1 \
- uint32_t lo = (uint32_t)(x = EXTRACT64(X) & Smask2reg); \
+ uint32_t lo = (uint32_t)(x = ((uint64_t)EXTRACT64(X)) & Smask2reg); \
FORCE_REGALLOC_2 \
uint32_t hi = x >> 32; \
X = _mm_mul_epu32(HI32(X), X); \
--
2.33.0

View File

@ -0,0 +1,25 @@
From 239664bf18fc2bc093d8dbaa1fb0a0307651897f Mon Sep 17 00:00:00 2001
From: Moinak Bhattacharyya <moinakb001@gmail.com>
Date: Mon, 7 Nov 2022 03:40:23 -0600
Subject: [PATCH 1/1] Fix warning about truncating conversion
---
lib/alg-yescrypt-opt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/alg-yescrypt-opt.c b/lib/alg-yescrypt-opt.c
index 60a6ccd..dacc73b 100644
--- a/lib/alg-yescrypt-opt.c
+++ b/lib/alg-yescrypt-opt.c
@@ -514,7 +514,7 @@ static volatile uint64_t Smask2var = Smask2;
#define PWXFORM_SIMD(X) { \
uint64_t x; \
FORCE_REGALLOC_1 \
- uint32_t lo = x = EXTRACT64(X) & Smask2reg; \
+ uint32_t lo = (uint32_t)(x = EXTRACT64(X) & Smask2reg); \
FORCE_REGALLOC_2 \
uint32_t hi = x >> 32; \
X = _mm_mul_epu32(HI32(X), X); \
--
2.33.0

Binary file not shown.

BIN
v4.4.26.tar.gz Normal file

Binary file not shown.