Mailing List Archive

[PATCH] CPU_FLAGS_X86: Introduce 'sha' flag
Introduce 'sha' flag that corresponds to SHA-NI instruction set.
This has two potential users, and is present in git version
of cpuid2cpuflags (pending release once the flag is added).

Signed-off-by: Micha? Górny <mgorny@gentoo.org>
---
profiles/desc/cpu_flags_x86.desc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/profiles/desc/cpu_flags_x86.desc b/profiles/desc/cpu_flags_x86.desc
index 35ca08b18700..d891398e7a60 100644
--- a/profiles/desc/cpu_flags_x86.desc
+++ b/profiles/desc/cpu_flags_x86.desc
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation.
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Whenever the flag name does not correspond to /proc/cpuinfo flags,
@@ -19,6 +19,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)
+sha - Use the SHA-NI instruction set
sse - Use the SSE instruction set
sse2 - Use the SSE2 instruction set
sse3 - Use the SSE3 instruction set ([pni] in cpuinfo, NOT ssse3)
--
2.22.0
Re: [PATCH] CPU_FLAGS_X86: Introduce 'sha' flag [ In reply to ]
On Thu, Jul 18, 2019 at 7:53 AM Micha? Górny <mgorny@gentoo.org> wrote:
>
> Introduce 'sha' flag that corresponds to SHA-NI instruction set.
> This has two potential users, and is present in git version
> of cpuid2cpuflags (pending release once the flag is added).

Ack
Re: [PATCH] CPU_FLAGS_X86: Introduce 'sha' flag [ In reply to ]
On Thu, Jul 18, 2019, 15:53 Micha? Górny <mgorny@gentoo.org> wrote:

> Introduce 'sha' flag that corresponds to SHA-NI instruction set.
> This has two potential users, and is present in git version
> of cpuid2cpuflags (pending release once the flag is added).
>

A bit of bikeshedding: as I understand it, SHA-NI covers SHA-1 and SHA-256,
but not SHA-3 or some of the other SHA-2 variants. Maybe name it sha-ni or
sha_ni to be more accurate?

>
Re: [PATCH] CPU_FLAGS_X86: Introduce 'sha' flag [ In reply to ]
On Thu, 2019-07-18 at 17:53 +0100, Dirkjan Ochtman wrote:
> On Thu, Jul 18, 2019, 15:53 Micha? Górny <mgorny@gentoo.org> wrote:
>
> > Introduce 'sha' flag that corresponds to SHA-NI instruction set.
> > This has two potential users, and is present in git version
> > of cpuid2cpuflags (pending release once the flag is added).
> >
>
> A bit of bikeshedding: as I understand it, SHA-NI covers SHA-1 and SHA-256,
> but not SHA-3 or some of the other SHA-2 variants. Maybe name it sha-ni or
> sha_ni to be more accurate?
>

We already name AES-NI 'aes', so naming SHA-NI 'sha' follows suit.
Besides, unless I'm mistaken NI stands for 'new instructions',
so I don't see how that would be relevant to SHA algorithms supported.

--
Best regards,
Micha? Górny