Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915624 - profiles: CPU_FLAGS_ARM: add CPU_FLAGS_ARM_SM4
Summary: profiles: CPU_FLAGS_ARM: add CPU_FLAGS_ARM_SM4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard: arm64: HWCAP_SM4 (1 << 19)
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-10-12 08:08 UTC by Sam James
Modified: 2024-01-02 16:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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(-)