* [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
@ 2020-07-13 17:07 Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:09 ` [gentoo-dev] [PATCH 1/4] CPU_FLAGS_X86: add " Francisco Blas Izquierdo Riera (klondike)
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:07 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1.1: Type: text/plain, Size: 779 bytes --]
Hi!
We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
Affected packages:
dev-haskell/cryptonite
dev-libs/json-c
The following set of patches:
1 Add the cpu_flags_x86_rdrand use flag to the USE_EXPAND variable.
2 and 3 Make affected packages use the new USE flag
4 Provides detection on cpuid2cpuflags
Patches 1 to 3 are available as a pull request at: https://github.com/gentoo/gentoo/pull/16686
Patch 4 is available as a pull request at: https://github.com/mgorny/cpuid2cpuflags/pull/16
(Using GitHub mostly to make following the patches easier, keep the discussion here)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-dev] [PATCH 1/4] CPU_FLAGS_X86: add 'rdrand' flag
2020-07-13 17:07 [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:09 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:11 ` [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
` (3 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:09 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]
Introduce 'rdrand' flag that corresponds to RDRAND instruction.
This currently has two users.
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
---
profiles/desc/cpu_flags_x86.desc | 1 +
1 file changed, 1 insertion(+)
diff --git a/profiles/desc/cpu_flags_x86.desc b/profiles/desc/cpu_flags_x86.desc
index 156b677e5a4..5c8a9bceaee 100644
--- a/profiles/desc/cpu_flags_x86.desc
+++ b/profiles/desc/cpu_flags_x86.desc
@@ -21,6 +21,7 @@ mmxext - Use the Extended MMX instruction set (a subset of SSE) ([mmxext] or [ss
padlock - Use VIA padlock instructions ([phe] in cpuinfo)
pclmul - Use Carry-less Multiplication instructions ([pclmulqdq] in cpuinfo)
popcnt - Enable popcnt instruction support ([abm] or [popcnt] in cpuinfo)
+rdrand - Use the RDRAND instruction for generating random numbers
sha - Use the SHA-NI instruction set
sse - Use the SSE instruction set
sse2 - Use the SSE2 instruction set
--
2.26.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand
2020-07-13 17:07 [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:09 ` [gentoo-dev] [PATCH 1/4] CPU_FLAGS_X86: add " Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:11 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:16 ` Sergei Trofimovich
2020-07-13 17:27 ` [gentoo-dev] [PATCHv2 " Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:13 ` [gentoo-dev] [PATCH 3/4] dev-libs/json-c: " Francisco Blas Izquierdo Riera (klondike)
` (2 subsequent siblings)
4 siblings, 2 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:11 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1.1: Type: text/plain, Size: 2626 bytes --]
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
---
dev-haskell/cryptonite/cryptonite-0.21.ebuild | 4 ++--
dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild | 2 +-
dev-haskell/cryptonite/metadata.xml | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dev-haskell/cryptonite/cryptonite-0.21.ebuild b/dev-haskell/cryptonite/cryptonite-0.21.ebuild
index 531dfe8cfb7..c3497dae415 100644
--- a/dev-haskell/cryptonite/cryptonite-0.21.ebuild
+++ b/dev-haskell/cryptonite/cryptonite-0.21.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="cpu-flags-x86-rdrand cpu_flags_x86_aes cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 +integer-gmp"
+IUSE="cpu_flags_x86_rdrand cpu_flags_x86_aes cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 +integer-gmp"
RDEPEND=">=dev-haskell/memory-0.8:=[profile?]
>=dev-lang/ghc-7.4.1:=
diff --git a/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild b/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
index 8d097bb5cfa..3cdbcf44b91 100644
--- a/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
+++ b/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
-IUSE="+cpu-flags-x86-rdrand +cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp"
+IUSE="+cpu_flags_x86_rdrand +cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp"
RDEPEND=">=dev-haskell/basement-0.0.6:=[profile?]
>=dev-haskell/memory-0.14.18:=[profile?]
diff --git a/dev-haskell/cryptonite/metadata.xml b/dev-haskell/cryptonite/metadata.xml
index c845b334ecd..8e02ebe625c 100644
--- a/dev-haskell/cryptonite/metadata.xml
+++ b/dev-haskell/cryptonite/metadata.xml
@@ -29,7 +29,6 @@
Evaluate the security related to your requirements before using.
</longdescription>
<use>
- <flag name="cpu-flags-x86-rdrand">allow compilation with RDRAND on system and architecture that supports it</flag>
<flag name="integer-gmp">Whether or not to use GMP for some functions</flag>
</use>
<upstream>
--
2.26.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [gentoo-dev] [PATCH 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand
2020-07-13 17:07 [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:09 ` [gentoo-dev] [PATCH 1/4] CPU_FLAGS_X86: add " Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:11 ` [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:13 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:15 ` [gentoo-dev] Re: [PATCH 4/4] x86: Add support for 'rdrand' Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:29 ` [gentoo-dev] [PATCHv2 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:23 ` [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Michał Górny
2020-07-13 17:33 ` [gentoo-dev] " Francisco Blas Izquierdo Riera (klondike)
4 siblings, 2 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:13 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1.1: Type: text/plain, Size: 2113 bytes --]
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
---
dev-libs/json-c/json-c-0.14-r3.ebuild | 2 +-
dev-libs/json-c/json-c-9999.ebuild | 2 +-
dev-libs/json-c/metadata.xml | 3 ---
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dev-libs/json-c/json-c-0.14-r3.ebuild b/dev-libs/json-c/json-c-0.14-r3.ebuild
index 0d4ff648a36..2c666f39db9 100644
--- a/dev-libs/json-c/json-c-0.14-r3.ebuild
+++ b/dev-libs/json-c/json-c-0.14-r3.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/5"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="cpu-flags-x86-rdrand doc static-libs threads"
+IUSE="cpu_flags_x86_rdrand doc static-libs threads"
PATCHES=(
"${FILESDIR}/${PN}-0.14-cmake-static-libs.patch"
diff --git a/dev-libs/json-c/json-c-9999.ebuild b/dev-libs/json-c/json-c-9999.ebuild
index 51583e0b0ad..317e7f77329 100644
--- a/dev-libs/json-c/json-c-9999.ebuild
+++ b/dev-libs/json-c/json-c-9999.ebuild
@@ -12,7 +12,7 @@ EGIT_REPO_URI="https://github.com/json-c/json-c.git"
LICENSE="MIT"
SLOT="0/5"
-IUSE="cpu-flags-x86-rdrand doc static-libs threads"
+IUSE="cpu_flags_x86_rdrand doc static-libs threads"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/json-c/config.h
diff --git a/dev-libs/json-c/metadata.xml b/dev-libs/json-c/metadata.xml
index 4165aa7d278..ca10c6aa7ae 100644
--- a/dev-libs/json-c/metadata.xml
+++ b/dev-libs/json-c/metadata.xml
@@ -13,9 +13,6 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
- <use>
- <flag name="cpu-flags-x86-rdrand">Enable RDRAND Hardware RNG Hash Seed</flag>
- </use>
<longdescription lang="en">
"A JSON implementation in C" is probably the better description, and then
"JSON-C implements a reference counting object model that allows you to
--
2.26.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [gentoo-dev] Re: [PATCH 4/4] x86: Add support for 'rdrand'
2020-07-13 17:13 ` [gentoo-dev] [PATCH 3/4] dev-libs/json-c: " Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:15 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:29 ` [gentoo-dev] [PATCHv2 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
1 sibling, 0 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:15 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1.1: Type: text/plain, Size: 2661 bytes --]
Notice that this is for cpuflags2cpuid
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
---
src/x86.c | 1 +
tests/x86/amd-colfax.txt | 2 +-
tests/x86/xeon-e-2176g.txt | 2 +-
tests/x86/xeon-silver-4410.txt | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/x86.c b/src/x86.c
index 72f67d1..ac8db9f 100644
--- a/src/x86.c
+++ b/src/x86.c
@@ -73,6 +73,7 @@ struct flag_info flags[] = {
{ "pclmul", INTEL_ECX, (1 << 1) },
{ "popcnt", INTEL_ECX, (1 << 23) }, /* Intel */
{ "popcnt", AMD_ECX, (1 << 5) }, /* ABM on AMD; XXX: manuals say it's LZCNT */
+ { "rdrand", INTEL_ECX, (1 << 30) },
{ "sha", INTEL_SUB0_EBX, (1 << 29) },
{ "sse", INTEL_EDX, (1 << 25) },
{ "sse2", INTEL_EDX, (1 << 26) },
diff --git a/tests/x86/amd-colfax.txt b/tests/x86/amd-colfax.txt
index 94194c0..ffdbd52 100644
--- a/tests/x86/amd-colfax.txt
+++ b/tests/x86/amd-colfax.txt
@@ -1,4 +1,4 @@
-expected:aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
+expected:aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
top:00000001:00800f82:0b400800:7ed8320b:178bfbff
sub:00000007:00000000:00000000:209c01a9:00000000:00000000
top:80000001:00800f82:70000000:35c233ff:2fd3fbff
diff --git a/tests/x86/xeon-e-2176g.txt b/tests/x86/xeon-e-2176g.txt
index f15f4b8..5157e1c 100644
--- a/tests/x86/xeon-e-2176g.txt
+++ b/tests/x86/xeon-e-2176g.txt
@@ -1,4 +1,4 @@
-expected:aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
+expected:aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3
top:00000001:000906ea:07100800:7ffafbff:bfebfbff
sub:00000007:00000000:00000000:029c6fbf:40000000:9c000000
top:80000001:00000000:00000000:00000121:2c100800
diff --git a/tests/x86/xeon-silver-4410.txt b/tests/x86/xeon-silver-4410.txt
index 2018ae4..189ff3e 100644
--- a/tests/x86/xeon-silver-4410.txt
+++ b/tests/x86/xeon-silver-4410.txt
@@ -1,4 +1,4 @@
-expected:aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
+expected:aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3
top:00000001:00050654:11100800:7ffefbff:bfebfbff
sub:00000007:00000000:00000000:d39ffffb:00000018:9c002400
top:80000001:00000000:00000000:00000121:2c100800
--
2.26.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand
2020-07-13 17:11 ` [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:16 ` Sergei Trofimovich
2020-07-13 17:27 ` [gentoo-dev] [PATCHv2 " Francisco Blas Izquierdo Riera (klondike)
1 sibling, 0 replies; 16+ messages in thread
From: Sergei Trofimovich @ 2020-07-13 17:16 UTC (permalink / raw
To: Francisco Blas Izquierdo Riera (klondike), gentoo-dev
On Mon, 13 Jul 2020 19:11:52 +0200
"Francisco Blas Izquierdo Riera (klondike)" <klondike@gentoo.org> wrote:
> Package-Manager: Portage-2.3.99, Repoman-2.3.23
> Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
> ---
> dev-haskell/cryptonite/cryptonite-0.21.ebuild | 4 ++--
> dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild | 2 +-
> dev-haskell/cryptonite/metadata.xml | 1 -
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/dev-haskell/cryptonite/cryptonite-0.21.ebuild b/dev-haskell/cryptonite/cryptonite-0.21.ebuild
> index 531dfe8cfb7..c3497dae415 100644
> --- a/dev-haskell/cryptonite/cryptonite-0.21.ebuild
> +++ b/dev-haskell/cryptonite/cryptonite-0.21.ebuild
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2019 Gentoo Authors
> +# Copyright 1999-2020 Gentoo Authors
> # Distributed under the terms of the GNU General Public License v2
>
> EAPI=7
> @@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
> LICENSE="BSD"
> SLOT="0/${PV}"
> KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
> -IUSE="cpu-flags-x86-rdrand cpu_flags_x86_aes cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 +integer-gmp"
> +IUSE="cpu_flags_x86_rdrand cpu_flags_x86_aes cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 +integer-gmp"
>
> RDEPEND=">=dev-haskell/memory-0.8:=[profile?]
> >=dev-lang/ghc-7.4.1:=
> diff --git a/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild b/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
> index 8d097bb5cfa..3cdbcf44b91 100644
> --- a/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
> +++ b/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
> @@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
> LICENSE="BSD"
> SLOT="0/${PV}"
> KEYWORDS="~amd64 ~x86"
> -IUSE="+cpu-flags-x86-rdrand +cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp"
> +IUSE="+cpu_flags_x86_rdrand +cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp"
>
> RDEPEND=">=dev-haskell/basement-0.0.6:=[profile?]
> >=dev-haskell/memory-0.14.18:=[profile?]
> diff --git a/dev-haskell/cryptonite/metadata.xml b/dev-haskell/cryptonite/metadata.xml
> index c845b334ecd..8e02ebe625c 100644
> --- a/dev-haskell/cryptonite/metadata.xml
> +++ b/dev-haskell/cryptonite/metadata.xml
> @@ -29,7 +29,6 @@
> Evaluate the security related to your requirements before using.
> </longdescription>
> <use>
> - <flag name="cpu-flags-x86-rdrand">allow compilation with RDRAND on system and architecture that supports it</flag>
> <flag name="integer-gmp">Whether or not to use GMP for some functions</flag>
> </use>
> <upstream>
> --
> 2.26.2
>
Looks good!
--
Sergei
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 17:07 [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Francisco Blas Izquierdo Riera (klondike)
` (2 preceding siblings ...)
2020-07-13 17:13 ` [gentoo-dev] [PATCH 3/4] dev-libs/json-c: " Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:23 ` Michał Górny
2020-07-13 17:33 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:33 ` [gentoo-dev] " Francisco Blas Izquierdo Riera (klondike)
4 siblings, 1 reply; 16+ messages in thread
From: Michał Górny @ 2020-07-13 17:23 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
On Mon, 2020-07-13 at 19:07 +0200, Francisco Blas Izquierdo Riera
(klondike) wrote:
> Hi!
>
> We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
>
> Affected packages:
> dev-haskell/cryptonite
> dev-libs/json-c
>
I'm sorry but I haven't been following the big rdrand-AMD drama closely.
Does the kernel mitigate broken RDRAND after resume these days?
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-dev] [PATCHv2 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand
2020-07-13 17:11 ` [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:16 ` Sergei Trofimovich
@ 2020-07-13 17:27 ` Francisco Blas Izquierdo Riera (klondike)
1 sibling, 0 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:27 UTC (permalink / raw
To: Gentoo Development; +Cc: haskell
[-- Attachment #1.1: Type: text/plain, Size: 4600 bytes --]
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
---
dev-haskell/cryptonite/cryptonite-0.21.ebuild | 8 ++++----
dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild | 6 +++---
dev-haskell/cryptonite/metadata.xml | 1 -
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dev-haskell/cryptonite/cryptonite-0.21.ebuild b/dev-haskell/cryptonite/cryptonite-0.21.ebuild
index 531dfe8cfb7..3198705f21b 100644
--- a/dev-haskell/cryptonite/cryptonite-0.21.ebuild
+++ b/dev-haskell/cryptonite/cryptonite-0.21.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
# ebuild generated by hackport 0.6.9999
-#hackport: flags: -check_alignment,-old_toolchain_inliner,+support_deepseq,support_aesni:cpu_flags_x86_aes,support_pclmuldq:cpu_flags_x86_sse4_1,support_rdrand:cpu-flags-x86-rdrand,support_blake2_sse:cpu_flags_x86_sse2
+#hackport: flags: -check_alignment,-old_toolchain_inliner,+support_deepseq,support_aesni:cpu_flags_x86_aes,support_pclmuldq:cpu_flags_x86_sse4_1,support_rdrand:cpu_flags_x86_rdrand,support_blake2_sse:cpu_flags_x86_sse2
CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
inherit haskell-cabal
@@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="cpu-flags-x86-rdrand cpu_flags_x86_aes cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 +integer-gmp"
+IUSE="cpu_flags_x86_rdrand cpu_flags_x86_aes cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 +integer-gmp"
RDEPEND=">=dev-haskell/memory-0.8:=[profile?]
>=dev-lang/ghc-7.4.1:=
@@ -43,5 +43,5 @@ src_configure() {
$(cabal_flag cpu_flags_x86_sse2 support_blake2_sse) \
--flag=support_deepseq \
$(cabal_flag cpu_flags_x86_sse4_1 support_pclmuldq) \
- $(cabal_flag cpu-flags-x86-rdrand support_rdrand)
+ $(cabal_flag cpu_flags_x86_rdrand support_rdrand)
}
diff --git a/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild b/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
index 8d097bb5cfa..da6a90056ed 100644
--- a/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
+++ b/dev-haskell/cryptonite/cryptonite-0.26-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=7
# ebuild generated by hackport 0.6.1.9999
-#hackport: flags: -check_alignment,-old_toolchain_inliner,+support_deepseq,support_aesni:cpu_flags_x86_aes,support_pclmuldq:cpu_flags_x86_sse4_1,support_sse:cpu_flags_x86_sse,support_rdrand:cpu-flags-x86-rdrand
+#hackport: flags: -check_alignment,-old_toolchain_inliner,+support_deepseq,support_aesni:cpu_flags_x86_aes,support_pclmuldq:cpu_flags_x86_sse4_1,support_sse:cpu_flags_x86_sse,support_rdrand:cpu_flags_x86_rdrand
CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
inherit haskell-cabal
@@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
-IUSE="+cpu-flags-x86-rdrand +cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp"
+IUSE="+cpu_flags_x86_rdrand +cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp"
RDEPEND=">=dev-haskell/basement-0.0.6:=[profile?]
>=dev-haskell/memory-0.14.18:=[profile?]
@@ -40,6 +40,6 @@ src_configure() {
$(cabal_flag cpu_flags_x86_aes support_aesni) \
--flag=support_deepseq \
$(cabal_flag cpu_flags_x86_sse4_1 support_pclmuldq) \
- $(cabal_flag cpu-flags-x86-rdrand support_rdrand) \
+ $(cabal_flag cpu_flags_x86_rdrand support_rdrand) \
$(cabal_flag cpu_flags_x86_sse support_sse)
}
diff --git a/dev-haskell/cryptonite/metadata.xml b/dev-haskell/cryptonite/metadata.xml
index c845b334ecd..8e02ebe625c 100644
--- a/dev-haskell/cryptonite/metadata.xml
+++ b/dev-haskell/cryptonite/metadata.xml
@@ -29,7 +29,6 @@
Evaluate the security related to your requirements before using.
</longdescription>
<use>
- <flag name="cpu-flags-x86-rdrand">allow compilation with RDRAND on system and architecture that supports it</flag>
<flag name="integer-gmp">Whether or not to use GMP for some functions</flag>
</use>
<upstream>
--
2.26.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [gentoo-dev] [PATCHv2 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand
2020-07-13 17:13 ` [gentoo-dev] [PATCH 3/4] dev-libs/json-c: " Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:15 ` [gentoo-dev] Re: [PATCH 4/4] x86: Add support for 'rdrand' Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 17:29 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 19:39 ` [gentoo-dev] " Jakov Smolic
1 sibling, 1 reply; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:29 UTC (permalink / raw
To: Gentoo Development; +Cc: jakov.smolic, luka.perkov, proxy-maint
[-- Attachment #1.1: Type: text/plain, Size: 2837 bytes --]
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
---
dev-libs/json-c/json-c-0.14-r3.ebuild | 4 ++--
dev-libs/json-c/json-c-9999.ebuild | 4 ++--
dev-libs/json-c/metadata.xml | 3 ---
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dev-libs/json-c/json-c-0.14-r3.ebuild b/dev-libs/json-c/json-c-0.14-r3.ebuild
index 0d4ff648a36..0eae6655775 100644
--- a/dev-libs/json-c/json-c-0.14-r3.ebuild
+++ b/dev-libs/json-c/json-c-0.14-r3.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/5"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="cpu-flags-x86-rdrand doc static-libs threads"
+IUSE="cpu_flags_x86_rdrand doc static-libs threads"
PATCHES=(
"${FILESDIR}/${PN}-0.14-cmake-static-libs.patch"
@@ -34,7 +34,7 @@ multilib_src_configure() {
-DBUILD_DOCUMENTATION=$(multilib_native_usex doc)
-DBUILD_STATIC_LIBS=$(usex static-libs)
-DDISABLE_WERROR=ON
- -DENABLE_RDRAND=$(usex cpu-flags-x86-rdrand)
+ -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
-DENABLE_THREADING=$(usex threads)
)
diff --git a/dev-libs/json-c/json-c-9999.ebuild b/dev-libs/json-c/json-c-9999.ebuild
index 51583e0b0ad..b39b8ba779c 100644
--- a/dev-libs/json-c/json-c-9999.ebuild
+++ b/dev-libs/json-c/json-c-9999.ebuild
@@ -12,7 +12,7 @@ EGIT_REPO_URI="https://github.com/json-c/json-c.git"
LICENSE="MIT"
SLOT="0/5"
-IUSE="cpu-flags-x86-rdrand doc static-libs threads"
+IUSE="cpu_flags_x86_rdrand doc static-libs threads"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/json-c/config.h
@@ -27,7 +27,7 @@ multilib_src_configure() {
-DBUILD_DOCUMENTATION=$(multilib_native_usex doc)
-DDISABLE_WERROR=ON
-DENABLE_THREADING=$(usex threads)
- -DENABLE_RDRAND=$(usex cpu-flags-x86-rdrand)
+ -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
-DBUILD_STATIC_LIBS=$(usex static-libs)
)
diff --git a/dev-libs/json-c/metadata.xml b/dev-libs/json-c/metadata.xml
index 4165aa7d278..ca10c6aa7ae 100644
--- a/dev-libs/json-c/metadata.xml
+++ b/dev-libs/json-c/metadata.xml
@@ -13,9 +13,6 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
- <use>
- <flag name="cpu-flags-x86-rdrand">Enable RDRAND Hardware RNG Hash Seed</flag>
- </use>
<longdescription lang="en">
"A JSON implementation in C" is probably the better description, and then
"JSON-C implements a reference counting object model that allows you to
--
2.26.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 17:23 ` [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Michał Górny
@ 2020-07-13 17:33 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 19:27 ` Michał Górny
0 siblings, 1 reply; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:33 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 773 bytes --]
El 13/7/20 a las 19:23, Michał Górny escribió:
> On Mon, 2020-07-13 at 19:07 +0200, Francisco Blas Izquierdo Riera
> (klondike) wrote:
>> Hi!
>>
>> We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
>>
>> Affected packages:
>> dev-haskell/cryptonite
>> dev-libs/json-c
>>
> I'm sorry but I haven't been following the big rdrand-AMD drama closely.
> Does the kernel mitigate broken RDRAND after resume these days?
>
AGESA patches do exist to address this issue: https://www.reddit.com/r/Amd/comments/cmza34/agesa_1003_abb_fixes_rdrandrdseed/ I suspect AMD microcode does too.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-dev] Re: [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 17:07 [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Francisco Blas Izquierdo Riera (klondike)
` (3 preceding siblings ...)
2020-07-13 17:23 ` [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Michał Górny
@ 2020-07-13 17:33 ` Francisco Blas Izquierdo Riera (klondike)
4 siblings, 0 replies; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 17:33 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1.1: Type: text/plain, Size: 992 bytes --]
Please ignore patches 2 and 3, I missed some USE flag replacements. I'll resubmit in a second.
El 13/7/20 a las 19:07, Francisco Blas Izquierdo Riera (klondike) escribió:
> Hi!
>
> We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
>
> Affected packages:
> dev-haskell/cryptonite
> dev-libs/json-c
>
> The following set of patches:
>
> 1 Add the cpu_flags_x86_rdrand use flag to the USE_EXPAND variable.
> 2 and 3 Make affected packages use the new USE flag
> 4 Provides detection on cpuid2cpuflags
>
> Patches 1 to 3 are available as a pull request at: https://github.com/gentoo/gentoo/pull/16686
>
> Patch 4 is available as a pull request at: https://github.com/mgorny/cpuid2cpuflags/pull/16
>
> (Using GitHub mostly to make following the patches easier, keep the discussion here)
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 17:33 ` Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 19:27 ` Michał Górny
2020-07-13 20:07 ` Francisco Blas Izquierdo Riera (klondike)
0 siblings, 1 reply; 16+ messages in thread
From: Michał Górny @ 2020-07-13 19:27 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
On Mon, 2020-07-13 at 19:33 +0200, Francisco Blas Izquierdo Riera
(klondike) wrote:
> El 13/7/20 a las 19:23, Michał Górny escribió:
> > On Mon, 2020-07-13 at 19:07 +0200, Francisco Blas Izquierdo Riera
> > (klondike) wrote:
> > > Hi!
> > >
> > > We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
> > >
> > > Affected packages:
> > > dev-haskell/cryptonite
> > > dev-libs/json-c
> > >
> > I'm sorry but I haven't been following the big rdrand-AMD drama closely.
> > Does the kernel mitigate broken RDRAND after resume these days?
> >
> AGESA patches do exist to address this issue: https://www.reddit.com/r/Amd/comments/cmza34/agesa_1003_abb_fixes_rdrandrdseed/ I suspect AMD microcode does too.
>
Lemme rephrase: is this something we should be warning our users before
they enable the flag? I think we should aim to avoid the situation that
cpuid2cpuflags enables this behind user's backs and their programs
suddenly break as a result.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [gentoo-dev] Re: [PATCHv2 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand
2020-07-13 17:29 ` [gentoo-dev] [PATCHv2 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 19:39 ` Jakov Smolic
0 siblings, 0 replies; 16+ messages in thread
From: Jakov Smolic @ 2020-07-13 19:39 UTC (permalink / raw
To: gentoo-dev; +Cc: Luka Perkov, proxy-maint, klondike
LGTM, thank you!
I just left a comment on the pull request to close the related bug [1]
via the commit.
Best regards,
Jakov Smolic
[1] https://bugs.gentoo.org/724354
On Mon, Jul 13, 2020 at 7:29 PM Francisco Blas Izquierdo Riera
(klondike) <klondike@gentoo.org> wrote:
>
>
> Package-Manager: Portage-2.3.99, Repoman-2.3.23
> Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
> ---
> dev-libs/json-c/json-c-0.14-r3.ebuild | 4 ++--
> dev-libs/json-c/json-c-9999.ebuild | 4 ++--
> dev-libs/json-c/metadata.xml | 3 ---
> 3 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/dev-libs/json-c/json-c-0.14-r3.ebuild b/dev-libs/json-c/json-c-0.14-r3.ebuild
> index 0d4ff648a36..0eae6655775 100644
> --- a/dev-libs/json-c/json-c-0.14-r3.ebuild
> +++ b/dev-libs/json-c/json-c-0.14-r3.ebuild
> @@ -13,7 +13,7 @@ SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
> LICENSE="MIT"
> SLOT="0/5"
> KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
> -IUSE="cpu-flags-x86-rdrand doc static-libs threads"
> +IUSE="cpu_flags_x86_rdrand doc static-libs threads"
>
> PATCHES=(
> "${FILESDIR}/${PN}-0.14-cmake-static-libs.patch"
> @@ -34,7 +34,7 @@ multilib_src_configure() {
> -DBUILD_DOCUMENTATION=$(multilib_native_usex doc)
> -DBUILD_STATIC_LIBS=$(usex static-libs)
> -DDISABLE_WERROR=ON
> - -DENABLE_RDRAND=$(usex cpu-flags-x86-rdrand)
> + -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
> -DENABLE_THREADING=$(usex threads)
> )
>
> diff --git a/dev-libs/json-c/json-c-9999.ebuild b/dev-libs/json-c/json-c-9999.ebuild
> index 51583e0b0ad..b39b8ba779c 100644
> --- a/dev-libs/json-c/json-c-9999.ebuild
> +++ b/dev-libs/json-c/json-c-9999.ebuild
> @@ -12,7 +12,7 @@ EGIT_REPO_URI="https://github.com/json-c/json-c.git"
>
> LICENSE="MIT"
> SLOT="0/5"
> -IUSE="cpu-flags-x86-rdrand doc static-libs threads"
> +IUSE="cpu_flags_x86_rdrand doc static-libs threads"
>
> MULTILIB_WRAPPED_HEADERS=(
> /usr/include/json-c/config.h
> @@ -27,7 +27,7 @@ multilib_src_configure() {
> -DBUILD_DOCUMENTATION=$(multilib_native_usex doc)
> -DDISABLE_WERROR=ON
> -DENABLE_THREADING=$(usex threads)
> - -DENABLE_RDRAND=$(usex cpu-flags-x86-rdrand)
> + -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
> -DBUILD_STATIC_LIBS=$(usex static-libs)
> )
>
> diff --git a/dev-libs/json-c/metadata.xml b/dev-libs/json-c/metadata.xml
> index 4165aa7d278..ca10c6aa7ae 100644
> --- a/dev-libs/json-c/metadata.xml
> +++ b/dev-libs/json-c/metadata.xml
> @@ -13,9 +13,6 @@
> <email>proxy-maint@gentoo.org</email>
> <name>Proxy Maintainers</name>
> </maintainer>
> - <use>
> - <flag name="cpu-flags-x86-rdrand">Enable RDRAND Hardware RNG Hash Seed</flag>
> - </use>
> <longdescription lang="en">
> "A JSON implementation in C" is probably the better description, and then
> "JSON-C implements a reference counting object model that allows you to
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 19:27 ` Michał Górny
@ 2020-07-13 20:07 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 20:53 ` Francisco Blas Izquierdo Riera (klondike)
0 siblings, 1 reply; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 20:07 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 1607 bytes --]
El 13/7/20 a las 21:27, Michał Górny escribió:
> On Mon, 2020-07-13 at 19:33 +0200, Francisco Blas Izquierdo Riera
> (klondike) wrote:
>> El 13/7/20 a las 19:23, Michał Górny escribió:
>>> On Mon, 2020-07-13 at 19:07 +0200, Francisco Blas Izquierdo Riera
>>> (klondike) wrote:
>>>> Hi!
>>>>
>>>> We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
>>>>
>>>> Affected packages:
>>>> dev-haskell/cryptonite
>>>> dev-libs/json-c
>>>>
>>> I'm sorry but I haven't been following the big rdrand-AMD drama closely.
>>> Does the kernel mitigate broken RDRAND after resume these days?
>>>
>> AGESA patches do exist to address this issue: https://www.reddit.com/r/Amd/comments/cmza34/agesa_1003_abb_fixes_rdrandrdseed/ I suspect AMD microcode does too.
>>
> Lemme rephrase: is this something we should be warning our users before
> they enable the flag? I think we should aim to avoid the situation that
> cpuid2cpuflags enables this behind user's backs and their programs
> suddenly break as a result.
You then mean the other rdrand bug.
Yes, current stable linux kernel (5.4.48) in amd64 does include the patch, I'm uncertain about prior kernel branches though but I don't expect many users on that confluence.
The patch: https://lore.kernel.org/linux-doc/776cb5c2d33e7fd0d2893904724c0e52b394f24a.1565817448.git.thomas.lendacky@amd.com/
The bug: https://bugzilla.kernel.org/show_bug.cgi?id=85911
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 20:07 ` Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-13 20:53 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-14 2:36 ` Michał Górny
0 siblings, 1 reply; 16+ messages in thread
From: Francisco Blas Izquierdo Riera (klondike) @ 2020-07-13 20:53 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 1826 bytes --]
El 13/7/20 a las 22:07, Francisco Blas Izquierdo Riera (klondike) escribió:
> El 13/7/20 a las 21:27, Michał Górny escribió:
>> On Mon, 2020-07-13 at 19:33 +0200, Francisco Blas Izquierdo Riera
>> (klondike) wrote:
>>> El 13/7/20 a las 19:23, Michał Górny escribió:
>>>> On Mon, 2020-07-13 at 19:07 +0200, Francisco Blas Izquierdo Riera
>>>> (klondike) wrote:
>>>>> Hi!
>>>>>
>>>>> We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
>>>>>
>>>>> Affected packages:
>>>>> dev-haskell/cryptonite
>>>>> dev-libs/json-c
>>>>>
>>>> I'm sorry but I haven't been following the big rdrand-AMD drama closely.
>>>> Does the kernel mitigate broken RDRAND after resume these days?
>>>>
>>> AGESA patches do exist to address this issue: https://www.reddit.com/r/Amd/comments/cmza34/agesa_1003_abb_fixes_rdrandrdseed/ I suspect AMD microcode does too.
>>>
>> Lemme rephrase: is this something we should be warning our users before
>> they enable the flag? I think we should aim to avoid the situation that
>> cpuid2cpuflags enables this behind user's backs and their programs
>> suddenly break as a result.
> You then mean the other rdrand bug.
>
> Yes, current stable linux kernel (5.4.48) in amd64 does include the patch, I'm uncertain about prior kernel branches though but I don't expect many users on that confluence.
>
> The patch: https://lore.kernel.org/linux-doc/776cb5c2d33e7fd0d2893904724c0e52b394f24a.1565817448.git.thomas.lendacky@amd.com/
> The bug: https://bugzilla.kernel.org/show_bug.cgi?id=85911
>
>
I have checked also stable versions for other kernel branches and all seem to have the patch icluded.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag
2020-07-13 20:53 ` Francisco Blas Izquierdo Riera (klondike)
@ 2020-07-14 2:36 ` Michał Górny
0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2020-07-14 2:36 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 2104 bytes --]
On Mon, 2020-07-13 at 22:53 +0200, Francisco Blas Izquierdo Riera
(klondike) wrote:
> El 13/7/20 a las 22:07, Francisco Blas Izquierdo Riera (klondike) escribió:
> > El 13/7/20 a las 21:27, Michał Górny escribió:
> > > On Mon, 2020-07-13 at 19:33 +0200, Francisco Blas Izquierdo Riera
> > > (klondike) wrote:
> > > > El 13/7/20 a las 19:23, Michał Górny escribió:
> > > > > On Mon, 2020-07-13 at 19:07 +0200, Francisco Blas Izquierdo Riera
> > > > > (klondike) wrote:
> > > > > > Hi!
> > > > > >
> > > > > > We have currently two packages that have USE cpu-flags-x86-rdrand as there is no USE_EXPAND version available. This pattern is likely to confuse users as they may not be aware of the difference between dashes and underscores.
> > > > > >
> > > > > > Affected packages:
> > > > > > dev-haskell/cryptonite
> > > > > > dev-libs/json-c
> > > > > >
> > > > > I'm sorry but I haven't been following the big rdrand-AMD drama closely.
> > > > > Does the kernel mitigate broken RDRAND after resume these days?
> > > > >
> > > > AGESA patches do exist to address this issue: https://www.reddit.com/r/Amd/comments/cmza34/agesa_1003_abb_fixes_rdrandrdseed/ I suspect AMD microcode does too.
> > > >
> > > Lemme rephrase: is this something we should be warning our users before
> > > they enable the flag? I think we should aim to avoid the situation that
> > > cpuid2cpuflags enables this behind user's backs and their programs
> > > suddenly break as a result.
> > You then mean the other rdrand bug.
> >
> > Yes, current stable linux kernel (5.4.48) in amd64 does include the patch, I'm uncertain about prior kernel branches though but I don't expect many users on that confluence.
> >
> > The patch: https://lore.kernel.org/linux-doc/776cb5c2d33e7fd0d2893904724c0e52b394f24a.1565817448.git.thomas.lendacky@amd.com/
> > The bug: https://bugzilla.kernel.org/show_bug.cgi?id=85911
> >
> >
> I have checked also stable versions for other kernel branches and all seem to have the patch icluded.
>
>
LGTM then.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2020-07-14 2:37 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-13 17:07 [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:09 ` [gentoo-dev] [PATCH 1/4] CPU_FLAGS_X86: add " Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:11 ` [gentoo-dev] [PATCH 2/4] dev-haskell/cryptonite: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:16 ` Sergei Trofimovich
2020-07-13 17:27 ` [gentoo-dev] [PATCHv2 " Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:13 ` [gentoo-dev] [PATCH 3/4] dev-libs/json-c: " Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:15 ` [gentoo-dev] Re: [PATCH 4/4] x86: Add support for 'rdrand' Francisco Blas Izquierdo Riera (klondike)
2020-07-13 17:29 ` [gentoo-dev] [PATCHv2 3/4] dev-libs/json-c: Change USE to cpu_flags_x86_rdrand Francisco Blas Izquierdo Riera (klondike)
2020-07-13 19:39 ` [gentoo-dev] " Jakov Smolic
2020-07-13 17:23 ` [gentoo-dev] [PATCH 0/4] CPU_FLAGS_X86: Introduce 'rdrand' flag Michał Górny
2020-07-13 17:33 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 19:27 ` Michał Górny
2020-07-13 20:07 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-13 20:53 ` Francisco Blas Izquierdo Riera (klondike)
2020-07-14 2:36 ` Michał Górny
2020-07-13 17:33 ` [gentoo-dev] " Francisco Blas Izquierdo Riera (klondike)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox