Bug 496477 - Valgind/memcheck doesn't handle stlur instruction in ARM64/aarch64
Summary: Valgind/memcheck doesn't handle stlur instruction in ARM64/aarch64
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.24 GIT
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-19 22:03 UTC by Rob Bresalier
Modified: 2024-11-21 14:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Bresalier 2024-11-19 22:03:04 UTC
SUMMARY

When I run my application under valgrind/memcheck on ARM64 architecture under Wind River Linux I get a SIGILL on "stlur" instruction.

The backtrace with "--sigill-diagnostics=yes" shows:

disInstr(arm64): unhandled instruction 0xD905001F

Using an online instruction decoder:

https://armconverter.com/?disasm&code=1F0005D9

Shows that the offending instruction is:

stlur xzr, [x0, #0x50]

The encoding and description of this instruction may be found here:

https://developer.arm.com/documentation/ddi0602/2024-09/Base-Instructions/STLUR--Store-release-register--unscaled--

STEPS TO REPRODUCE

I ran under valgrind using command line:

exec valgrind --sigill-diagnostics=yes --show-mismatched-frees=no --leak-check=full --show-possibly-lost=no --undef-value-errors=no --error-limit=no EquipApp

The application "EquipApp" is a proprietary application that can't be shared and requires a proprietary circuit pack to run.

OBSERVED RESULT

2024-11-19T01:23:06.536Z ARM64 front end: load_store
2024-11-19T01:23:14.010Z disInstr(arm64): unhandled instruction 0xD905001F
2024-11-19T01:23:14.015Z disInstr(arm64): 1101'1001 0000'0101 0000'0000 0001'1111
2024-11-19T01:23:14.020Z ==3454== valgrind: Unrecognised instruction at address 0xbee5cc4.
2024-11-19T01:23:14.026Z ==3454==    at 0xBEE5CC4: store (atomic_base.h:725)
2024-11-19T01:23:14.030Z ==3454==    by 0xBEE5CC4: operator= (atomic_base.h:632)
2024-11-19T01:23:14.035Z ==3454==    by 0xBEE5CC4: operator= (atomic:392)
2024-11-19T01:23:14.040Z ==3454==    by 0xBEE5CC4: google::protobuf::DescriptorBuilder::BuildFieldOrExtension(google::protobuf::FieldDescriptorProto const&, google::protobuf::Descriptor*, google::protobuf::FieldDescriptor*, bool, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6493)
2024-11-19T01:23:14.064Z ==3454==    by 0xBEE8A03: BuildField (descriptor.cc:4224)
2024-11-19T01:23:14.069Z ==3454==    by 0xBEE8A03: google::protobuf::DescriptorBuilder::BuildMessage(google::protobuf::DescriptorProto const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor*, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6040)
2024-11-19T01:23:14.089Z ==3454==    by 0xBEEC1F7: google::protobuf::DescriptorBuilder::BuildFileImpl(google::protobuf::FileDescriptorProto const&, google::protobuf::internal::FlatAllocator&) (descriptor.cc:5874)
2024-11-19T01:23:14.104Z ==3454==    by 0xBEEDCD3: google::protobuf::DescriptorBuilder::BuildFile(google::protobuf::FileDescriptorProto const&) (descriptor.cc:5632)
2024-11-19T01:23:14.119Z ==3454==    by 0xBEEE4DF: google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&) const (descriptor.cc:4551)
2024-11-19T01:23:14.134Z ==3454==    by 0xBEEE76F: google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2563)
2024-11-19T01:23:14.149Z ==3454==    by 0xBEEEA7F: google::protobuf::DescriptorPool::FindFileByName(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2143)
2024-11-19T01:23:14.159Z ==3454==    by 0xBF714B3: google::protobuf::(anonymous namespace)::AssignDescriptorsImpl(google::protobuf::internal::DescriptorTable const*, bool) (generated_message_reflection.cc:3626)
2024-11-19T01:23:14.178Z ==3454==    by 0xBF7178B: operator() (generated_message_reflection.cc:3707)
2024-11-19T01:23:14.183Z ==3454==    by 0xBF7178B: __invoke_impl<void, google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:60)
2024-11-19T01:23:14.203Z ==3454==    by 0xBF7178B: __invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:95)
2024-11-19T01:23:14.223Z ==3454==    by 0xBF7178B: invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (functional:88)
2024-11-19T01:23:14.248Z ==3454==    by 0xBF7178B: void absl::lts_20240116::base_internal::CallOnceImpl<google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}>(std::atomic<unsigned int>*, absl::lts_20240116::base_internal::SchedulingMode, google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}&&) [clone .constprop.0] (call_once.h:182)
2024-11-19T01:23:14.297Z ==3454==    by 0xBF718B3: call_once<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (call_once.h:216)
2024-11-19T01:23:14.317Z ==3454==    by 0xBF718B3: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&) (generated_message_reflection.cc:3704)
2024-11-19T01:23:14.337Z ==3454==    by 0xBEE239F: GetDescriptor (descriptor.pb.h:9939)
2024-11-19T01:23:14.342Z ==3454==    by 0xBEE239F: descriptor (descriptor.pb.h:9936)
2024-11-19T01:23:14.347Z ==3454==    by 0xBEE239F: google::protobuf::DescriptorPool::generated_pool() (descriptor.cc:2089)
2024-11-19T01:23:14.356Z ==3454==    by 0xBF7002F: MaybeInitializeLazyDescriptors (generated_message_reflection.cc:3655)
2024-11-19T01:23:14.366Z ==3454==    by 0xBF7002F: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*) (generated_message_reflection.cc:3714)
2024-11-19T01:23:14.381Z ==3454== Your program just tried to execute an instruction that Valgrind
2024-11-19T01:23:14.387Z ==3454== did not recognise.  There are two possible reasons for this.
2024-11-19T01:23:14.391Z ==3454== 1. Your program has a bug and erroneously jumped to a non-code
2024-11-19T01:23:14.396Z ==3454==    location.  If you are running Memcheck and you just saw a
2024-11-19T01:23:14.406Z ==3454==    warning about a bad jump, it's probably your program's fault.
2024-11-19T01:23:14.411Z ==3454== 2. The instruction is legitimate but Valgrind doesn't handle it,
2024-11-19T01:23:14.416Z ==3454==    i.e. it's Valgrind's fault.  If you think this is the case or
2024-11-19T01:23:14.426Z ==3454==    you are not sure, please let us know and we'll try to fix it.
2024-11-19T01:23:14.431Z ==3454== Either way, Valgrind will now raise a SIGILL signal which will
2024-11-19T01:23:14.436Z ==3454== probably kill your program.
2024-11-19T01:23:14.441Z ==3454== 
2024-11-19T01:23:14.441Z ==3454== Process terminating with default action of signal 4 (SIGILL): dumping core
2024-11-19T01:23:14.446Z ==3454==  Illegal opcode at address 0xBEE5CC4
2024-11-19T01:23:14.451Z ==3454==    at 0xBEE5CC4: store (atomic_base.h:725)
2024-11-19T01:23:14.455Z ==3454==    by 0xBEE5CC4: operator= (atomic_base.h:632)
2024-11-19T01:23:14.460Z ==3454==    by 0xBEE5CC4: operator= (atomic:392)
2024-11-19T01:23:14.465Z ==3454==    by 0xBEE5CC4: google::protobuf::DescriptorBuilder::BuildFieldOrExtension(google::protobuf::FieldDescriptorProto const&, google::protobuf::Descriptor*, google::protobuf::FieldDescriptor*, bool, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6493)
2024-11-19T01:23:14.490Z ==3454==    by 0xBEE8A03: BuildField (descriptor.cc:4224)
2024-11-19T01:23:14.495Z ==3454==    by 0xBEE8A03: google::protobuf::DescriptorBuilder::BuildMessage(google::protobuf::DescriptorProto const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor*, google::protobuf::internal::FlatAllocator&) (descriptor.cc:6040)
2024-11-19T01:23:14.515Z ==3454==    by 0xBEEC1F7: google::protobuf::DescriptorBuilder::BuildFileImpl(google::protobuf::FileDescriptorProto const&, google::protobuf::internal::FlatAllocator&) (descriptor.cc:5874)
2024-11-19T01:23:14.535Z ==3454==    by 0xBEEDCD3: google::protobuf::DescriptorBuilder::BuildFile(google::protobuf::FileDescriptorProto const&) (descriptor.cc:5632)
2024-11-19T01:23:14.545Z ==3454==    by 0xBEEE4DF: google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&) const (descriptor.cc:4551)
2024-11-19T01:23:14.559Z ==3454==    by 0xBEEE76F: google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2563)
2024-11-19T01:23:14.574Z ==3454==    by 0xBEEEA7F: google::protobuf::DescriptorPool::FindFileByName(std::basic_string_view<char, std::char_traits<char> >) const (descriptor.cc:2143)
2024-11-19T01:23:14.589Z ==3454==    by 0xBF714B3: google::protobuf::(anonymous namespace)::AssignDescriptorsImpl(google::protobuf::internal::DescriptorTable const*, bool) (generated_message_reflection.cc:3626)
2024-11-19T01:23:14.604Z ==3454==    by 0xBF7178B: operator() (generated_message_reflection.cc:3707)
2024-11-19T01:23:14.609Z ==3454==    by 0xBF7178B: __invoke_impl<void, google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:60)
2024-11-19T01:23:14.634Z ==3454==    by 0xBF7178B: __invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (invoke.h:95)
2024-11-19T01:23:14.653Z ==3454==    by 0xBF7178B: invoke<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (functional:88)
2024-11-19T01:23:14.673Z ==3454==    by 0xBF7178B: void absl::lts_20240116::base_internal::CallOnceImpl<google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}>(std::atomic<unsigned int>*, absl::lts_20240116::base_internal::SchedulingMode, google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&)::{lambda()#1}&&) [clone .constprop.0] (call_once.h:182)
2024-11-19T01:23:14.723Z ==3454==    by 0xBF718B3: call_once<google::protobuf::internal::AssignDescriptors(const google::protobuf::internal::DescriptorTable* (*)(), absl::lts_20240116::once_flag*, const google::protobuf::Metadata&)::<lambda()> > (call_once.h:216)
2024-11-19T01:23:14.743Z ==3454==    by 0xBF718B3: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20240116::once_flag*, google::protobuf::Metadata const&) (generated_message_reflection.cc:3704)
2024-11-19T01:23:14.763Z ==3454==    by 0xBEE239F: GetDescriptor (descriptor.pb.h:9939)
2024-11-19T01:23:14.767Z ==3454==    by 0xBEE239F: descriptor (descriptor.pb.h:9936)
2024-11-19T01:23:14.772Z ==3454==    by 0xBEE239F: google::protobuf::DescriptorPool::generated_pool() (descriptor.cc:2089)
2024-11-19T01:23:14.782Z ==3454==    by 0xBF7002F: MaybeInitializeLazyDescriptors (generated_message_reflection.cc:3655)
2024-11-19T01:23:14.792Z ==3454==    by 0xBF7002F: google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*) (generated_message_reflection.cc:3714)
2024-11-19T01:23:14.807Z ==3454== 
2024-11-19T01:23:14.807Z ==3454== HEAP SUMMARY:
2024-11-19T01:23:14.807Z ==3454==     in use at exit: 1,301,901 bytes in 15,081 blocks
2024-11-19T01:23:14.812Z ==3454==   total heap usage: 117,907 allocs, 102,826 frees, 6,995,214 bytes allocated
2024-11-19T01:23:14.822Z ==3454== 
2024-11-19T01:23:14.822Z ==3454== LEAK SUMMARY:
2024-11-19T01:23:14.827Z ==3454==    definitely lost: 0 bytes in 0 blocks
2024-11-19T01:23:14.832Z 
2024-11-19T01:23:14.832Z ==3454==    indirectly lost: 0 bytes in 0 blocks
2024-11-19T01:23:14.832Z 
2024-11-19T01:23:14.832Z ==3454==      possibly lost: 59,054 bytes in 1,009 blocks
2024-11-19T01:23:14.837Z ==3454==    still reachable: 1,242,847 bytes in 14,072 blocks
2024-11-19T01:23:14.846Z ==3454==                       of which reachable via heuristic:
2024-11-19T01:23:14.852Z ==3454==                         newarray           : 960 bytes in 4 blocks
2024-11-19T01:23:14.857Z ==3454==         suppressed: 0 bytes in 0 blocks
2024-11-19T01:23:14.861Z ==3454== Reachable blocks (those to which a pointer was found) are not shown.
2024-11-19T01:23:14.866Z ==3454== To see them, rerun with: --leak-check=full --show-leak-kinds=all
2024-11-19T01:23:14.876Z ==3454== 
2024-11-19T01:23:14.876Z ==3454== For lists of detected and suppressed errors, rerun with: -s
2024-11-19T01:23:14.886Z ==3454== ERROR SUMMARY: 48 errors from 48 contexts (suppressed: 0 from 0)

EXPECTED RESULT

There should be no crash.

SOFTWARE/OS VERSIONS

Linux:
uname -a
Linux 32EC3-81-1 5.10.216-nokia-wr21 #V66.64.02 RT SMP PREEMPT Thu Oct 31 09:45:47 EDT 2024 aarch64 aarch64 aarch64 GNU/Linux

This is an embedded system, telecom infrastructure using Wind River Linux 21 on aarch64 architecture.

ADDITIONAL INFORMATION
Comment 1 Rob Bresalier 2024-11-19 22:11:21 UTC
Below are the contents of atomic_base.h around line 725 where the crash occurs.

It is trying to execute "__atomic_store_n(&_M_p, __p, int(__m));"

I think this translates to the "stlur" instruction:

715       _GLIBCXX_ALWAYS_INLINE void
716       store(__pointer_type __p,
717 	    memory_order __m = memory_order_seq_cst) noexcept
718       {
719         memory_order __b = __m & __memory_order_mask;
720
721 	__glibcxx_assert(__b != memory_order_acquire);
722 	__glibcxx_assert(__b != memory_order_acq_rel);
723 	__glibcxx_assert(__b != memory_order_consume);
724
725 	__atomic_store_n(&_M_p, __p, int(__m));
726       }
Comment 2 Rob Bresalier 2024-11-19 22:13:24 UTC
The atomic_base.h file comes from gcc version 10.5.0, located at path:

usr/include/c++/10.5.0/bits/atomic_base.h
Comment 3 Paul Floyd 2024-11-20 03:43:47 UTC
What hardware is this on? And what compiler flags are you using?
Comment 4 Rob Bresalier 2024-11-20 13:46:17 UTC
It is an ARM Neoverse N2 CPU core, cn106 variant. See: https://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-octeon-10-dpu-platform-product-brief.pdf

I'll get back to you about compiler flags tomorrow, I have the day off today.

The output of /proc/cpuinfo is:

processor       : 0
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 1
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 2
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 3
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 4
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 5
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 6
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 7
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 8
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 9
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 10
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 11
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 12
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 13
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 14
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0

processor       : 15
BogoMIPS        : 2000.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd49
CPU revision    : 0
Comment 5 Rob Bresalier 2024-11-21 14:55:01 UTC
2 main compiler flags that are likely most important:

 -mcpu=neoverse-n2 -march=armv8.5-a+crypto

Compiler version info:

$ /opt/WR/WindRiverLinux-21-240903/wr21-toolchain/bin/aarch64-cn10k-linux-g++ --version
aarch64-cn10k-linux-g++ (GCC) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here is the full compile command line with all the compiler flags:

/opt/WR/WindRiverLinux-21-240903/wr21-toolchain/bin/aarch64-cn10k-linux-g++ --sysroot=/opt/WR/WindRiverLinux-21-240903/wrlinux-cn10k/sysroots/neoversen2-crypto-cn10k-linux -DGOOGLE_PROTOBUF_CMAKE_BUILD -DLIBPROTOBUF_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotobuf_EXPORTS -I/home/user/workspace/mdt_assets/wr21_cn106.build/grpc-prefix/src/grpc-build/third_party/protobuf -I/home/user/workspace/mdt_assets/grpc/third_party/protobuf/src -I/home/user/workspace/mdt_assets/grpc/third_party/protobuf/third_party/utf8_range -isystem /home/user/workspace/mdt_stage/wr21_cn106.stage/usr/local/include -mcpu=neoverse-n2 -march=armv8.5-a+crypto -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -fPIC -fno-omit-frame-pointer -funwind-tables -fdata-sections -ffunction-sections -ffile-prefix-map=/home/user/workspace/= -fcoroutines -DAGRPC_BOOST_ASIO -DHAVE_CPP_STDLIB -Wno-psabi -Wno-misleading-indentation  -O2 -ggdb -std=gnu++2a -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o -MF third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o.d -o third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o -c /home/user/workspace/mdt_assets/grpc/third_party/protobuf/src/google/protobuf/descriptor.c