From 2198beff5945d559b0e8e619a261af046dc07cdd Mon Sep 17 00:00:00 2001 From: XMRig Date: Sat, 6 Jun 2020 15:09:41 +0700 Subject: [PATCH 01/12] v6.0.1-beta --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 66a945e5..f215f5e6 100644 --- a/src/version.h +++ b/src/version.h @@ -28,7 +28,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "6.0.1-evo" +#define APP_VERSION "6.0.1-beta" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" From 3f237ae3480d5e7fb4ce31248fd21e379c6aac4e Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 7 Jun 2020 15:13:46 +0700 Subject: [PATCH 02/12] v6.2.0-evo --- src/version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/version.h b/src/version.h index f215f5e6..ec613960 100644 --- a/src/version.h +++ b/src/version.h @@ -28,15 +28,15 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "6.0.1-beta" +#define APP_VERSION "6.2.0-evo" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" #define APP_KIND "miner" #define APP_VER_MAJOR 6 -#define APP_VER_MINOR 0 -#define APP_VER_PATCH 1 +#define APP_VER_MINOR 2 +#define APP_VER_PATCH 0 #ifdef _MSC_VER # if (_MSC_VER >= 1920) From 0bfe501dacc873479d6d6be2d6dc98a2bef8e642 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 7 Jun 2020 15:22:05 +0700 Subject: [PATCH 03/12] Add "cn/conceal" alias for hashvault.pro pool. --- src/base/crypto/Algorithm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/crypto/Algorithm.cpp b/src/base/crypto/Algorithm.cpp index 91c31d60..e71ca168 100644 --- a/src/base/crypto/Algorithm.cpp +++ b/src/base/crypto/Algorithm.cpp @@ -128,6 +128,7 @@ static AlgoName const algorithm_names[] = { { "kawpow/rvn", nullptr, Algorithm::KAWPOW_RVN }, # endif { "cryptonight/ccx", "cn/ccx", Algorithm::CN_CCX }, + { "cryptonight/conceal", "cn/conceal", Algorithm::CN_CCX }, }; From a28bddcbdf842148887a55bb0fec45ed8bb28482 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Sun, 7 Jun 2020 13:41:39 +0100 Subject: [PATCH 04/12] Stop linker from making stack executable Add .note.GNU-stack section to end of AstroBWT ASM. Signed-off-by: Matt Smith --- src/crypto/astrobwt/sha3_256_avx2.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crypto/astrobwt/sha3_256_avx2.S b/src/crypto/astrobwt/sha3_256_avx2.S index 16dba72f..f1d4e3ee 100644 --- a/src/crypto/astrobwt/sha3_256_avx2.S +++ b/src/crypto/astrobwt/sha3_256_avx2.S @@ -51,3 +51,7 @@ KeccakF1600_AVX2_ASM: lea r10,[rip+rndc] #include "sha3_256_keccakf1600_avx2.inc" + +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif From 75c57f7563b974060088a868bdde1f70fc6dcf82 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sun, 7 Jun 2020 16:23:17 +0200 Subject: [PATCH 05/12] Fixed GCC 10.1 issues - Fixed uninitialized `state->x` warning - Fixed broken code with `-O3` or `-Ofast` --- src/crypto/cn/c_jh.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/crypto/cn/c_jh.c b/src/crypto/cn/c_jh.c index 728f3bbe..9e4e7efd 100644 --- a/src/crypto/cn/c_jh.c +++ b/src/crypto/cn/c_jh.c @@ -213,16 +213,17 @@ static void E8(hashState *state) /*The compression function F8 */ static void F8(hashState *state) { - uint64 i; + uint64_t* x = (uint64_t*)state->x; + const uint64_t* buf = (uint64*)state->buffer; /*xor the 512-bit message with the fist half of the 1024-bit hash state*/ - for (i = 0; i < 8; i++) state->x[i >> 1][i & 1] ^= ((uint64*)state->buffer)[i]; + for (int i = 0; i < 8; ++i) x[i] ^= buf[i]; /*the bijective function E8 */ E8(state); /*xor the 512-bit message with the second half of the 1024-bit hash state*/ - for (i = 0; i < 8; i++) state->x[(8+i) >> 1][(8+i) & 1] ^= ((uint64*)state->buffer)[i]; + for (int i = 0; i < 8; ++i) x[i + 8] ^= buf[i]; } /*before hashing a message, initialize the hash state as H0 */ @@ -240,6 +241,7 @@ static HashReturn Init(hashState *state, int hashbitlen) case 224: memcpy(state->x,JH224_H0,128); break; case 256: memcpy(state->x,JH256_H0,128); break; case 384: memcpy(state->x,JH384_H0,128); break; + default: case 512: memcpy(state->x,JH512_H0,128); break; } From d30bf207e9f038600055fad82c12b01cfabe0575 Mon Sep 17 00:00:00 2001 From: xmrig Date: Mon, 8 Jun 2020 02:00:22 +0700 Subject: [PATCH 06/12] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d7e6f6..6e503a6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v5.11.3 +- [#1718](https://github.com/xmrig/xmrig/pull/1718) Fixed, linker on Linux was marking entire executable as having an executable stack. +- [#1720](https://github.com/xmrig/xmrig/pull/1720) Fixed broken CryptoNight algorithms family with gcc 10.1. + # v5.11.2 - [#1664](https://github.com/xmrig/xmrig/pull/1664) Improved JSON config error reporting. - [#1668](https://github.com/xmrig/xmrig/pull/1668) Optimized RandomX dataset initialization. From 7ec14f249d5f022a93ac41ce2fdcf2743ed0251d Mon Sep 17 00:00:00 2001 From: xmrig Date: Mon, 8 Jun 2020 02:12:01 +0700 Subject: [PATCH 07/12] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ff2d83..26355c66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v6.2.0-beta +- [#1717](https://github.com/xmrig/xmrig/pull/1717) Added new algorithm `cn/ccx` for Conceal. +- [#1718](https://github.com/xmrig/xmrig/pull/1718) Fixed, linker on Linux was marking entire executable as having an executable stack. +- [#1720](https://github.com/xmrig/xmrig/pull/1720) Fixed broken CryptoNight algorithms family with gcc 10.1. + # v6.0.1-beta - [#1708](https://github.com/xmrig/xmrig/issues/1708) Added `title` option. - [#1711](https://github.com/xmrig/xmrig/pull/1711) [cuda] Print errors from KawPow DAG initialization. From 12728649ff2590bc0406f0e4d57481655e6d4e6d Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 9 Jun 2020 00:16:33 +0700 Subject: [PATCH 08/12] v5.11.3 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index ce5ee4db..c98b99c3 100644 --- a/src/version.h +++ b/src/version.h @@ -28,7 +28,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "5.11.3-dev" +#define APP_VERSION "5.11.3" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" From 11ed37ea63df5ceb95a632cdd350690af02c1558 Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 9 Jun 2020 00:18:22 +0700 Subject: [PATCH 09/12] v6.2.0-beta --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index ec613960..8c0ba74b 100644 --- a/src/version.h +++ b/src/version.h @@ -28,7 +28,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "6.2.0-evo" +#define APP_VERSION "6.2.0-beta" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" From 8c979d3bc7bc67346a061862b028c1cafd7db707 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Tue, 9 Jun 2020 13:53:14 +0200 Subject: [PATCH 10/12] Disabled AVX-512F for Argon2 See #1722 --- src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c b/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c index f9df1b87..282c2f41 100644 --- a/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c +++ b/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c @@ -309,7 +309,10 @@ void xmrig_ar2_fill_segment_avx512f(const argon2_instance_t *instance, argon2_po } extern int cpu_flags_has_avx512f(void); -int xmrig_ar2_check_avx512f(void) { return cpu_flags_has_avx512f(); } + +// Argon2 AVX-512F implementation is broken +// TODO: enable it back when it's fixed +int xmrig_ar2_check_avx512f(void) { return 0 /*cpu_flags_has_avx512f()*/; } #else From 2d2f3d4eb20d04893c2f1a2af5a3c5b1179f005e Mon Sep 17 00:00:00 2001 From: SChernykh Date: Tue, 9 Jun 2020 17:47:23 +0200 Subject: [PATCH 11/12] Fixed detection of AVX2/AVX512 --- .../argon2/arch/x86_64/lib/argon2-avx512f.c | 5 +---- src/backend/cpu/platform/BasicCpuInfo.cpp | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c b/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c index 282c2f41..f9df1b87 100644 --- a/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c +++ b/src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c @@ -309,10 +309,7 @@ void xmrig_ar2_fill_segment_avx512f(const argon2_instance_t *instance, argon2_po } extern int cpu_flags_has_avx512f(void); - -// Argon2 AVX-512F implementation is broken -// TODO: enable it back when it's fixed -int xmrig_ar2_check_avx512f(void) { return 0 /*cpu_flags_has_avx512f()*/; } +int xmrig_ar2_check_avx512f(void) { return cpu_flags_has_avx512f(); } #else diff --git a/src/backend/cpu/platform/BasicCpuInfo.cpp b/src/backend/cpu/platform/BasicCpuInfo.cpp index eb042980..bf152851 100644 --- a/src/backend/cpu/platform/BasicCpuInfo.cpp +++ b/src/backend/cpu/platform/BasicCpuInfo.cpp @@ -119,10 +119,24 @@ static inline int32_t get_masked(int32_t val, int32_t h, int32_t l) } +static inline uint64_t xgetbv() +{ +#ifdef _MSC_VER + return _xgetbv(_XCR_XFEATURE_ENABLED_MASK); +#else + uint32_t eax_reg = 0; + uint32_t edx_reg = 0; + __asm__ __volatile__("xgetbv": "=a"(eax_reg), "=d"(edx_reg) : "c"(0) : "cc"); + return (static_cast(edx_reg) << 32) | eax_reg; +#endif +} + +static inline bool has_xcr_avx2() { return (xgetbv() & 0x06) == 0x06; } +static inline bool has_xcr_avx512() { return (xgetbv() & 0xE6) == 0xE6; } static inline bool has_osxsave() { return has_feature(PROCESSOR_INFO, ECX_Reg, 1 << 27); } static inline bool has_aes_ni() { return has_feature(PROCESSOR_INFO, ECX_Reg, 1 << 25); } -static inline bool has_avx2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 5) && has_osxsave(); } -static inline bool has_avx512f() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 16) && has_osxsave(); } +static inline bool has_avx2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 5) && has_osxsave() && has_xcr_avx2(); } +static inline bool has_avx512f() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 16) && has_osxsave() && has_xcr_avx512(); } static inline bool has_bmi2() { return has_feature(EXTENDED_FEATURES, EBX_Reg, 1 << 8); } static inline bool has_pdpe1gb() { return has_feature(PROCESSOR_EXT_INFO, EDX_Reg, 1 << 26); } static inline bool has_sse2() { return has_feature(PROCESSOR_INFO, EDX_Reg, 1 << 26); } From e4779ab6ca1c250020edc1446a8e90634630bbe9 Mon Sep 17 00:00:00 2001 From: XMRig Date: Wed, 10 Jun 2020 00:55:15 +0700 Subject: [PATCH 12/12] v5.11.4-dev --- src/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/version.h b/src/version.h index c98b99c3..82b1f416 100644 --- a/src/version.h +++ b/src/version.h @@ -28,7 +28,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "5.11.3" +#define APP_VERSION "5.11.4-dev" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" @@ -36,7 +36,7 @@ #define APP_VER_MAJOR 5 #define APP_VER_MINOR 11 -#define APP_VER_PATCH 3 +#define APP_VER_PATCH 4 #ifdef _MSC_VER # if (_MSC_VER >= 1920)