)]}'
{
  "commit": "1e15682f1a4bb64c48b84884976a2b5c4201e878",
  "tree": "e2f58ca6a2ef2f01c9c3ddc6d7a6e19e8108a108",
  "parents": [
    "af561c221d3af70bd0aa48024db4f1fcf1988eef"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Mon Dec 27 13:27:22 2021 -0500"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Jan 05 19:59:15 2022 +0000"
  },
  "message": "Enable SHA-512 ARM acceleration when available.\n\nThis imports the changes to sha512-armv8.pl from\nupstream\u0027s af0fcf7b4668218b24d9250b95e0b96939ccb4d1.\n\nTweaks needed:\n- Add an explicit .text because we put .LK$BITS in .rodata for XOM\n- .LK$bits and code are in separate sections, so use adrp/add instead of\n  plain adr\n- Where glibc needs feature flags to *enable* pthread_rwlock, Apple\n  interprets _XOPEN_SOURCE as a request to *disable* Apple extensions.\n  Tighten the condition on the _XOPEN_SOURCE check.\n\nAdded support for macOS and Linux, tested manually on an ARM Mac and a\nVM, respectively. Fuchsia and Windows do not currently have APIs to\nexpose this bit, so I\u0027ve left in TODOs. Benchmarks from an Apple M1 Max:\n\nBefore:\nDid 4647000 SHA-512 (16 bytes) operations in 1000103us (74.3 MB/sec)\nDid 1614000 SHA-512 (256 bytes) operations in 1000379us (413.0 MB/sec)\nDid 439000 SHA-512 (1350 bytes) operations in 1001694us (591.6 MB/sec)\nDid 76000 SHA-512 (8192 bytes) operations in 1011821us (615.3 MB/sec)\nDid 39000 SHA-512 (16384 bytes) operations in 1024311us (623.8 MB/sec)\n\nAfter:\nDid 10369000 SHA-512 (16 bytes) operations in 1000088us (165.9 MB/sec) [+123.1%]\nDid 3650000 SHA-512 (256 bytes) operations in 1000079us (934.3 MB/sec) [+126.2%]\nDid 1029000 SHA-512 (1350 bytes) operations in 1000521us (1388.4 MB/sec) [+134.7%]\nDid 175000 SHA-512 (8192 bytes) operations in 1001874us (1430.9 MB/sec) [+132.5%]\nDid 89000 SHA-512 (16384 bytes) operations in 1010314us (1443.3 MB/sec) [+131.4%]\n\n(This doesn\u0027t seem to change the overall SHA-256 vs SHA-512 performance\nquestion on ARM, when hashing perf matters. SHA-256 on the same chip\ngets up to 2454.6 MB/s.)\n\nIn terms of build coverage, for now, we\u0027ll have build coverage\neverywhere and test coverage on Chromium, which runs this code on macOS\nCI. We should request a macOS ARM64 bot for our standalone CI.  Longer\nterm, we need a QEMU-based builder to test various features. QEMU seems\nto have pretty good coverage of all this, which will at least give us\nLinux.\n\nI haven\u0027t added an OPENSSL_STATIC_ARMCAP_SHA512 for now. Instead, we\njust look at the standard __ARM_FEATURE_SHA512 define. Strangely, the\ncorresponding -march tag is not sha512. Neither GCC and nor Clang have\n-march\u003darmv8-a+sha512. Instead, -march\u003darmv8-a+sha3 implies both\n__ARM_FEATURE_SHA3 and __ARM_FEATURE_SHA512! Yet everything else seems\nto describe the SHA512 extension as separate from SHA3.\nhttps://developer.arm.com/architectures/system-architectures/software-standards/acle\n\nUpdate-Note: Consumers with a different build setup may need to\nlimit -D_XOPEN_SOURCE\u003d700 to Linux or non-Apple platforms. Otherwise,\n\u003csys/types.h\u003e won\u0027t define some typedef needed by \u003csys/sysctl.h\u003e. If you\nsee a build error about u_char, etc., being undefined in some system\nheader, that is probably the cause.\n\nChange-Id: Ia213d3796b84c71b7966bb68e0aec92e5d7d26f0\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/50807\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "08f004c841c342866c1850f1af709ca505ba3373",
      "old_mode": 33188,
      "old_path": "BUILDING.md",
      "new_id": "64b152005479f04f2f9ec116afacdd33627a7fa1",
      "new_mode": 33188,
      "new_path": "BUILDING.md"
    },
    {
      "type": "modify",
      "old_id": "f3fc7bcd75c8b257386eaaf5f19068a75612d746",
      "old_mode": 33188,
      "old_path": "CMakeLists.txt",
      "new_id": "6c70b55f9b95ae0ed8a1ca8d29d4a35a84f85fc0",
      "new_mode": 33188,
      "new_path": "CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "d73ce1e3b466bc4b3a19c1075caf9aa47dd3df45",
      "old_mode": 33188,
      "old_path": "crypto/CMakeLists.txt",
      "new_id": "31ccfc1420614b1f9ca952db0338563a3cd7f04b",
      "new_mode": 33188,
      "new_path": "crypto/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "56012d640080275f3c656523fd35ad456ec18b6e",
      "new_mode": 33188,
      "new_path": "crypto/cpu-aarch64-apple.c"
    },
    {
      "type": "modify",
      "old_id": "98303a033c1a3a4f509956096eb6ed4e20767837",
      "old_mode": 33188,
      "old_path": "crypto/cpu-aarch64-fuchsia.c",
      "new_id": "5c6d115cb9a3a7826755688c883bb660be037ca2",
      "new_mode": 33188,
      "new_path": "crypto/cpu-aarch64-fuchsia.c"
    },
    {
      "type": "modify",
      "old_id": "0184dd4ffb982b0464fe0135bb1f5b6631f41584",
      "old_mode": 33188,
      "old_path": "crypto/cpu-aarch64-linux.c",
      "new_id": "6ae870a313297c654f9e4ac42a168f034c00b556",
      "new_mode": 33188,
      "new_path": "crypto/cpu-aarch64-linux.c"
    },
    {
      "type": "modify",
      "old_id": "ee7f8e02ac68c5fddca599f8ec733672d897b706",
      "old_mode": 33188,
      "old_path": "crypto/cpu-aarch64-win.c",
      "new_id": "3d0014ea03c108fe4c550c1b3ecc6769e94ebc78",
      "new_mode": 33188,
      "new_path": "crypto/cpu-aarch64-win.c"
    },
    {
      "type": "modify",
      "old_id": "6886aa4e1edfc465e1193ed21d069f17c5e4b07a",
      "old_mode": 33188,
      "old_path": "crypto/crypto.c",
      "new_id": "b78b12227e50d5f9a789a5c11ef2b8e70d51b5e5",
      "new_mode": 33188,
      "new_path": "crypto/crypto.c"
    },
    {
      "type": "modify",
      "old_id": "e9613121354fe56b9de298436102c64e423c435c",
      "old_mode": 33188,
      "old_path": "crypto/fipsmodule/sha/asm/sha512-armv8.pl",
      "new_id": "8cb312facc9a0b89da4e0377c996b791cbf57bce",
      "new_mode": 33188,
      "new_path": "crypto/fipsmodule/sha/asm/sha512-armv8.pl"
    },
    {
      "type": "modify",
      "old_id": "81dc796560b90b284bf0a768f35d64be7164dd26",
      "old_mode": 33188,
      "old_path": "include/openssl/arm_arch.h",
      "new_id": "13f5b4aa8dd97c71a5bc72aae25aa417e68d7da1",
      "new_mode": 33188,
      "new_path": "include/openssl/arm_arch.h"
    },
    {
      "type": "modify",
      "old_id": "91cf95e141afa982a0a244fbf571ed3ae0c39705",
      "old_mode": 33188,
      "old_path": "include/openssl/cpu.h",
      "new_id": "e71fbecd0e5efa87879141e7afa4c89a056dab06",
      "new_mode": 33188,
      "new_path": "include/openssl/cpu.h"
    },
    {
      "type": "modify",
      "old_id": "65e0cdc2e0b1d79657728bfe370f8979507f2f03",
      "old_mode": 33188,
      "old_path": "util/BUILD.toplevel",
      "new_id": "462a24f6824176e42ca07d47a3fb381e394cacda",
      "new_mode": 33188,
      "new_path": "util/BUILD.toplevel"
    }
  ]
}
