Page MenuHomeFreeBSD

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

Authored by allanjude on Nov 19 2021, 3:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 31, 12:41 AM
Unknown Object (File)
Mar 6 2024, 5:33 AM
Unknown Object (File)
Feb 26 2024, 7:24 AM
Unknown Object (File)
Feb 19 2024, 9:51 PM
Unknown Object (File)
Feb 19 2024, 9:51 PM
Unknown Object (File)
Feb 19 2024, 9:50 PM
Unknown Object (File)
Feb 19 2024, 9:50 PM
Unknown Object (File)
Feb 19 2024, 9:36 PM
Subscribers

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
Lint Not Applicable
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.Nov 19 2021, 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.Nov 20 2021, 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.