Page MenuHomeFreeBSD

security/openssl: Fix detection of ARMv7/ARM64 CPU features
ClosedPublic

Authored by allanjude on Fri, Nov 19, 3:25 PM.

Details

Summary

OpenSSL assumes the same value for AT_HWCAP at Linux
So it ends up calling elf_auxv_info() with AT_CANARY which
returns ENOENT, and all acceleration features are disabled.

With this, my ARM64 test machine, the benchmark
openssl speed -evp aes-256-gcm is nearly 20x faster
going from 100 MB/sec to 2000 MB/sec

Also update the configure scripts to detect arm64-*-freebsd
rather than using BSD-generic32

PR: 259937
Sponsored by: Klara Inc.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

20x faster is nice. You should also bump PORTREVISION.

allanjude retitled this revision from openssl: Fix detection of ARMv7 and ARM64 CPU features to security/openssl: Fix detection of ARMv7/ARM64 CPU features.Fri, Nov 19, 6:35 PM
allanjude edited the summary of this revision. (Show Details)
allanjude edited the summary of this revision. (Show Details)

Update with cleaner patch and add configure scripts to enable armcap.c

Awaiting comments from upstream before committing. I'm assuming this will be incorporated in next releases too.

Committing version 1.1.1l_1,1 is too beautiful a chance to let is pass me by!

This revision is now accepted and ready to land.Sat, Nov 20, 2:22 PM

Awaiting comments from upstream before committing. I'm assuming this will be incorporated in next releases too.

Committing version 1.1.1l_1,1 is too beautiful a chance to let is pass me by!

This same patch (just the armcap bits, since we don't use the configure scripts) should land in base shortly, and get an errata notice for all supported versions.