{"push_id":1038051231,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"a2d4c0c426caf2b212dea39d7bc05868d780eb34","before":"dc6c1b83819cb3788c60dd669241adc6752a4604","commits":[{"sha":"054e151b16be6ada891ee8fd71915088dda30886","author":{"email":"348b1b6801801c3d890b2e1589a8e36441d09fdc@google.com","name":"David Benjamin"},"message":"Rewrite ARM feature detection.\n\nThis removes the thread-unsafe SIGILL-based detection and the\nmulti-consumer-hostile CRYPTO_set_NEON_capable API. (Changing\nOPENSSL_armcap_P after initialization is likely to cause problems.)\n\nThe right way to detect ARM features on Linux is getauxval. On aarch64,\nwe should be able to rely on this, so use it straight. Split this out\ninto its own file. The #ifdefs in the old cpu-arm.c meant it shared all\nbut no code with its arm counterpart anyway.\n\nUnfortunately, various versions of Android have different missing APIs, so, on\narm, we need a series of workarounds. Previously, we used a SIGILL fallback\nbased on OpenSSL's logic, but this is inherently not thread-safe. (SIGILL also\ndoes not tell us if the OS knows how to save and restore NEON state.) Instead,\nbase the behavior on Android NDK's cpu-features library, what Chromium\ncurrently uses with CRYPTO_set_NEON_capable:\n\n- Android before API level 20 does not provide getauxval. Where missing,\n  we can read from /proc/self/auxv.\n\n- On some versions of Android, /proc/self/auxv is also not readable, so\n  use /proc/cpuinfo's Features line.\n\n- Linux only advertises optional features in /proc/cpuinfo. ARMv8 makes NEON\n  mandatory, so /proc/cpuinfo can't be used without additional effort.\n\nFinally, we must blacklist a particular chip because the NEON unit is broken\n(https://crbug.com/341598).\n\nUnfortunately, this means CRYPTO_library_init now depends on /proc being\navailable, which will require some care with Chromium's sandbox. The\nsimplest solution is to just call CRYPTO_library_init before entering\nthe sandbox.\n\nIt's worth noting that Chromium's current EnsureOpenSSLInit function already\ndepends on /proc/cpuinfo to detect the broken CPU, by way of base::CPU.\nandroid_getCpuFeatures also interally depends on it. We were already relying on\nboth of those being stateful and primed prior to entering the sandbox.\n\nBUG=chromium:589200\n\nChange-Id: Ic5d1c341aab5a614eb129d8aa5ada2809edd6af8\nReviewed-on: https://boringssl-review.googlesource.com/7506\nReviewed-by: David Benjamin <davidben@google.com>","distinct":true,"url":"https://api.github.com/repos/google/boringssl/commits/054e151b16be6ada891ee8fd71915088dda30886"},{"sha":"a2d4c0c426caf2b212dea39d7bc05868d780eb34","author":{"email":"348b1b6801801c3d890b2e1589a8e36441d09fdc@google.com","name":"David Benjamin"},"message":"Work around Android devices without AT_HWCAP2.\n\nSome ARMv8 Android devices don't have AT_HWCAP2. This means, when running in\n32-bit mode (ARM capability APIs on Linux are different between AArch32 and\nAArch64), we can't discover the various nice instructions.\n\nOn a Nexus 6P, this gives a, uh, minor performance win when running in 32-bit\nmode.\n\nBefore:\nDid 1085000 AES-128-GCM (16 bytes) seal operations in 1000003us (1084996.7 ops/sec): 17.4 MB/s\nDid 60000 AES-128-GCM (1350 bytes) seal operations in 1013416us (59205.7 ops/sec): 79.9 MB/s\nDid 11000 AES-128-GCM (8192 bytes) seal operations in 1019778us (10786.7 ops/sec): 88.4 MB/s\nDid 1009000 AES-256-GCM (16 bytes) seal operations in 1000650us (1008344.6 ops/sec): 16.1 MB/s\nDid 49000 AES-256-GCM (1350 bytes) seal operations in 1015698us (48242.7 ops/sec): 65.1 MB/s\nDid 9394 AES-256-GCM (8192 bytes) seal operations in 1071104us (8770.4 ops/sec): 71.8 MB/s\nDid 1557000 SHA-1 (16 bytes) operations in 1000317us (1556506.6 ops/sec): 24.9 MB/s\nDid 762000 SHA-1 (256 bytes) operations in 1000527us (761598.6 ops/sec): 195.0 MB/s\nDid 45000 SHA-1 (8192 bytes) operations in 1013773us (44388.6 ops/sec): 363.6 MB/s\nDid 1459000 SHA-256 (16 bytes) operations in 1000271us (1458604.7 ops/sec): 23.3 MB/s\nDid 538000 SHA-256 (256 bytes) operations in 1000990us (537467.9 ops/sec): 137.6 MB/s\nDid 26000 SHA-256 (8192 bytes) operations in 1008403us (25783.3 ops/sec): 211.2 MB/s\n\nAfter:\nDid 1890000 AES-128-GCM (16 bytes) seal operations in 1000068us (1889871.5 ops/sec): 30.2 MB/s\nDid 509000 AES-128-GCM (1350 bytes) seal operations in 1000112us (508943.0 ops/sec): 687.1 MB/s\nDid 110000 AES-128-GCM (8192 bytes) seal operations in 1007966us (109130.7 ops/sec): 894.0 MB/s\nDid 1960000 AES-256-GCM (16 bytes) seal operations in 1000303us (1959406.3 ops/sec): 31.4 MB/s\nDid 460000 AES-256-GCM (1350 bytes) seal operations in 1001873us (459140.0 ops/sec): 619.8 MB/s\nDid 97000 AES-256-GCM (8192 bytes) seal operations in 1005337us (96485.1 ops/sec): 790.4 MB/s\nDid 1927000 SHA-1 (16 bytes) operations in 1000429us (1926173.7 ops/sec): 30.8 MB/s\nDid 1151000 SHA-1 (256 bytes) operations in 1000425us (1150511.0 ops/sec): 294.5 MB/s\nDid 87000 SHA-1 (8192 bytes) operations in 1003089us (86732.1 ops/sec): 710.5 MB/s\nDid 2357390 SHA-256 (16 bytes) operations in 1000116us (2357116.6 ops/sec): 37.7 MB/s\nDid 1410000 SHA-256 (256 bytes) operations in 1000176us (1409751.9 ops/sec): 360.9 MB/s\nDid 101000 SHA-256 (8192 bytes) operations in 1007007us (100297.2 ops/sec): 821.6 MB/s\n\nBUG=chromium:596156\n\nChange-Id: Iacc1f8d8a07e991d4615f2e12c5c54923fb31aa2\nReviewed-on: https://boringssl-review.googlesource.com/7507\nReviewed-by: David Benjamin <davidben@google.com>","distinct":true,"url":"https://api.github.com/repos/google/boringssl/commits/a2d4c0c426caf2b212dea39d7bc05868d780eb34"}]}