You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cpufeatures says AES intrinsics are available on the BCM2711 when they are not #1542
I noticed that aes-0.9.3 crashes executing an aes intrinsic on the RaspberryPi compute module 4, which uses a BCM2711. Apparently, this cpu doesn't have the aes intrinsics even though it is an Armv8. Some sleuthing seems to point to the cpufeatures crate:
# cat /proc/cpuinfo
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
# /tmp/aes-intrinsics-test
Hardware AES *is* available
# ./mod-f1ce64266db6b712 # <--- the aes crate's tests
running 9 tests
Illegal instruction (core dumped)
Some more digging revealed the culprit to be RUSTFLAGS="-C target-cpu=cortex-a72" which seems to override the runtime check. Adding -C target-feature=-aes helps, but this is not obvious.
Activity
der-winter-justus commentedon Sep 16, 2026
Some more digging revealed the culprit to be
RUSTFLAGS="-C target-cpu=cortex-a72"which seems to override the runtime check. Adding-C target-feature=-aeshelps, but this is not obvious.newpavlov commentedon Sep 16, 2026
Yeah, it's a toolchain issue (see the duplicate link).
-C target_cpu=cortex-a72(and-target-cpu=nativeon Raspberry Pi) wrongly enables crypto features that are optional on Cortex-A72 rust-lang/rust#125033