Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package leancrypto for openSUSE:Factory checked in at 2025-12-09 12:45:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/leancrypto (Old) and /work/SRC/openSUSE:Factory/.leancrypto.new.1939 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "leancrypto" Tue Dec 9 12:45:52 2025 rev:8 rq:1321597 version:1.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/leancrypto/leancrypto.changes 2025-11-07 18:20:24.602275458 +0100 +++ /work/SRC/openSUSE:Factory/.leancrypto.new.1939/leancrypto.changes 2025-12-09 12:47:36.188967958 +0100 @@ -1,0 +2,7 @@ +Wed Dec 3 09:19:47 UTC 2025 - Angel Yankov <[email protected]> + +- Fix bsc#1254370, bsc#1253654 - AVX detection is wrong on older intel CPUs + * Add leancrypto_avx_detect1.patch + * Add leancrypto_avx_detect2.patch + +------------------------------------------------------------------- New: ---- leancrypto_avx_detect1.patch leancrypto_avx_detect2.patch ----------(New B)---------- New:- Fix bsc#1254370, bsc#1253654 - AVX detection is wrong on older intel CPUs * Add leancrypto_avx_detect1.patch * Add leancrypto_avx_detect2.patch New: * Add leancrypto_avx_detect1.patch * Add leancrypto_avx_detect2.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ leancrypto.spec ++++++ --- /var/tmp/diff_new_pack.XSTAc4/_old 2025-12-09 12:47:42.449232539 +0100 +++ /var/tmp/diff_new_pack.XSTAc4/_new 2025-12-09 12:47:42.469233385 +0100 @@ -44,6 +44,10 @@ Source3: baselibs.conf # PATCH-FIX-UPSTREAM - https://github.com/smuellerDD/leancrypto/commit/fe9751f2b Patch1: fe9751f2.patch +# PATCH-FIX-UPSTREAM https://github.com/smuellerDD/leancrypto/commit/38bb12a185b2d3aa4ff3656d743b33b3ae25bac7 +# bsc#1253654, bsc#1254370 - fix AVX detection in older intel CPUs +Patch2: leancrypto_avx_detect1.patch +Patch3: leancrypto_avx_detect2.patch BuildRequires: clang BuildRequires: meson %if %{with kmp} ++++++ leancrypto_avx_detect1.patch ++++++ commit 38bb12a185b2d3aa4ff3656d743b33b3ae25bac7 Author: Stephan Mueller <[email protected]> Date: Tue Nov 25 22:40:25 2025 +0100 AVX2/512: properly detect support Intel defines a specific check approach to detect AVX2/512 support. This fixes when booting Linux with noxsave where AVX2/512 is not available. Reported-by: Alexander Sosedkin Signed-off-by: Stephan Mueller <[email protected]> Index: leancrypto-1.6.0/internal/src/cpufeatures_x86.c =================================================================== --- leancrypto-1.6.0.orig/internal/src/cpufeatures_x86.c +++ leancrypto-1.6.0/internal/src/cpufeatures_x86.c @@ -37,12 +37,22 @@ /* Leaf 1 */ #define LC_INTEL_AESNI_ECX (1 << 25) #define LC_INTEL_AVX_ECX (1 << 28) +#define LC_INTEL_FMA_ECX (1 << 12) +#define LC_INTEL_MOVBE_ECX (1 << 22) +#define LC_INTEL_OSXSAVE (1 << 27) +#define LC_INTEL_AVX_PREREQ1 \ + (LC_INTEL_FMA_ECX | LC_INTEL_MOVBE_ECX | LC_INTEL_OSXSAVE) /* Leaf 7, subleaf 0 of CPUID */ #define LC_INTEL_AVX2_EBX (1 << 5) +#define LC_INTEL_BMI1_EBX (1 << 3) +#define LC_INTEL_BMI2_EBX (1 << 8) +#define LC_INTEL_AVX2_PREREQ2 \ + (LC_INTEL_AVX2_EBX | LC_INTEL_BMI1_EBX | LC_INTEL_BMI2_EBX) #define LC_INTEL_AVX512F_EBX (1 << 16) #define LC_INTEL_VPCLMUL_ECX (1 << 10) #define LC_INTEL_PCLMUL_ECX (1 << 1) #define LC_INTEL_SHANI_EBX (1 << 29) +#define LC_INTEL_SHANI_EBX (1 << 29) #define LC_INTEL_SHANI512_EAX (1 << 0) /* This is required by aes_aesni_x86_64.S */ @@ -111,11 +121,30 @@ LC_INTERFACE_FUNCTION(enum lc_cpu_featur /* read advanced features eax = 7, ecx = 0 */ cpuid_eax_ecx(7, 0, eax, ebx, ecx, edx); - if (ebx & LC_INTEL_AVX2_EBX) - feat |= LC_CPU_FEATURE_INTEL_AVX2; - if (ebx & LC_INTEL_AVX512F_EBX) - feat |= LC_CPU_FEATURE_INTEL_AVX512; + /* + * Check AVX2 support according to Intel document "How to detect New + * Instruction support in the 4th generation Intel® Core™ processor + * family" + */ + if ((x86_64_cpuid[2] & LC_INTEL_AVX_PREREQ1) == LC_INTEL_AVX_PREREQ1) { + uint32_t xcr0; + +#if defined(_MSC_VER) && !defined(__clang__) + xcr0 = _xgetbv(0); +#else + __asm__ ("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx"); +#endif + /* Check if xmm and ymm state are enabled in XCR0. */ + if ((xcr0 & 6) == 6) { + if ((ebx & LC_INTEL_AVX2_PREREQ2) == + LC_INTEL_AVX2_PREREQ2) + feat |= LC_CPU_FEATURE_INTEL_AVX2; + + if (ebx & LC_INTEL_AVX512F_EBX) + feat |= LC_CPU_FEATURE_INTEL_AVX512; + } + } if (ecx & LC_INTEL_VPCLMUL_ECX) feat |= LC_CPU_FEATURE_INTEL_VPCLMUL; ++++++ leancrypto_avx_detect2.patch ++++++ commit 70ffec99fc4463c1a639b5c63941352728a182d9 Author: Stephan Mueller <[email protected]> Date: Thu Nov 27 23:39:10 2025 +0100 Report GF accelerations separately Signed-off-by: Stephan Mueller <[email protected]> Index: leancrypto-1.6.0/internal/src/status.c =================================================================== --- leancrypto-1.6.0.orig/internal/src/status.c +++ leancrypto-1.6.0/internal/src/status.c @@ -144,6 +144,7 @@ LC_INTERFACE_FUNCTION(int, lc_status, ch #ifdef LC_CURVE448 " Curve448: %s\n" #endif + " GF: %s%s\n" , fips140_mode_enabled() ? "yes" : "no" @@ -306,6 +307,13 @@ LC_INTERFACE_FUNCTION(int, lc_status, ch "AVX2" : "" #endif /* LC_CURVE448 */ + + /* GF */ + , + (lc_cpu_feature_available() & LC_CPU_FEATURE_INTEL_PCLMUL) ? + "PCLMULQDQ " : "", + (lc_cpu_feature_available() & LC_CPU_FEATURE_INTEL_VPCLMUL) ? + "VPCLMULQDQ " : "" ); #ifdef __clang__
