Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 915624

Summary: profiles: CPU_FLAGS_ARM: add CPU_FLAGS_ARM_SM4
Product: Gentoo Linux Reporter: Sam James <sam>
Component: ProfilesAssignee: Michał Górny <mgorny>
Status: RESOLVED FIXED    
Severity: normal CC: arm64
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: ARM64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=915544
https://github.com/gentoo/gentoo/pull/34542
Whiteboard: arm64: HWCAP_SM4 (1 << 19)
Package list:
Runtime testing required: ---

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-12 08:08:23 UTC
dev-libs/botan could benefit from this (came up in bug #915544).

Newer ARM64 CPUs may (not always though) support an SM4 crypto extension. We should add CPU_FLAGS_ARM_SM4 for it and add detection in cpuid2cpuflags.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-12-29 17:02:44 UTC
That's arm64 only, correct?

#define HWCAP_SM4		(1 << 19)
#define HWCAP2_SVESM4		(1 << 6)

I suppose the first one, yes?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-12-29 17:08:42 UTC
Looking at src/lib/utils/cpuid/cpuid_aarch64.cpp in botan, the former.
Comment 3 Larry the Git Cow gentoo-dev 2024-01-02 16:44:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5312f4f222ef54ecf173b4d48b55dc992b94596d

commit 5312f4f222ef54ecf173b4d48b55dc992b94596d
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2023-12-29 17:54:01 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-01-02 16:44:02 +0000

    profiles/desc: Add cpu_flags_arm_sm4
    
    Closes: https://bugs.gentoo.org/915624
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/desc/cpu_flags_arm.desc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)