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
F102098712: D33061.id98751.diff
Thu, Nov 7, 2:34 PM
Unknown Object (File)
Sun, Nov 3, 1:18 PM
Unknown Object (File)
Fri, Oct 18, 10:39 AM
Unknown Object (File)
Fri, Oct 18, 10:38 AM
Unknown Object (File)
Fri, Oct 18, 10:37 AM
Unknown Object (File)
Wed, Oct 16, 1:27 AM
Unknown Object (File)
Mon, Oct 14, 9:32 PM
Unknown Object (File)
Mon, Oct 14, 9:32 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.