Skip to content

cpufeatures says AES intrinsics are available on the BCM2711 when they are not #1542

Closed as duplicate

Description

@der-winter-justus

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)

Activity

  1. der-winter-justus commented on Sep 16, 2026

    @der-winter-justus
    Author

    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.

  2. newpavlov commented on Sep 16, 2026

    @newpavlov
    Member

    Yeah, it's a toolchain issue (see the duplicate link).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions