)]}' { "commit": "17d553d29914c8818fd4a6e9f57ab776ebacab5c", "tree": "c10e039f3e2756f9cb8220bacf62a7f6a4d8cb3f", "parents": [ "e67b625e43487d6aaf3dc36d4a14db57c59abd52" ], "author": { "name": "David Benjamin", "email": "davidben@google.com", "time": "Fri Dec 21 17:58:36 2018 -0600" }, "committer": { "name": "CQ bot account: commit-bot@chromium.org", "email": "commit-bot@chromium.org", "time": "Thu Jan 03 22:01:55 2019 +0000" }, "message": "Add a CFI tester to CHECK_ABI.\n\nThis uses the x86 trap flag and libunwind to test CFI works at each\ninstruction. For now, it just uses the system one out of pkg-config and\ndisables unwind tests if unavailable. We\u0027ll probably want to stick a\ncopy into //third_party and perhaps try the LLVM one later.\n\nThis tester caught two bugs in P-256 CFI annotations already:\nI47b5f9798b3bcee1748e537b21c173d312a14b42 and\nI9f576d868850312d6c14d1386f8fbfa85021b347\n\nAn earlier design used PTRACE_SINGLESTEP with libunwind\u0027s remote\nunwinding features. ptrace is a mess around stop signals (see group-stop\ndiscussion in ptrace(2)) and this is 10x faster, so I went with it. The\nquestion of which is more future-proof is complex:\n\n- There are two libunwinds with the same API,\n https://www.nongnu.org/libunwind/ and LLVM\u0027s. This currently uses the\n system nongnu.org for convenience. In future, LLVM\u0027s should be easier\n to bundle (less complex build) and appears to even support Windows,\n but I haven\u0027t tested this. Moreover, setting the trap flag keeps the\n test single-process, which is less complex on Windows. That suggests\n the trap flag design and switching to LLVM later. However...\n\n- Not all architectures have a trap flag settable by userspace. As far\n as I can tell, ARMv8\u0027s PSTATE.SS can only be set from the kernel. If\n we stick with nongnu.org libunwind, we can use PTRACE_SINGLESTEP and\n remote unwinding. Or we implement it for LLVM. Another thought is for\n the ptracer to bounce SIGTRAP back into the process, to share the\n local unwinding code.\n\n- ARMv7 has no trap flag at all and PTRACE_SINGLESTEP fails. Debuggers\n single-step by injecting breakpoints instead. However, ARMv8\u0027s trap\n flag seems to work in both AArch32 and AArch64 modes, so we may be\n able to condition it on a 64-bit kernel.\n\nSadly, neither strategy works with Intel SDE. Adding flags to cpucap\nvectors as we do with ARM would help, but it would not emulate CPUs\nnewer than the host CPU. For now, I\u0027ve just had SDE tests disable these.\n\nAnnoyingly, CMake does not allow object libraries to have dependencies,\nso make test_support a proper static library. Rename the target to\ntest_support_lib to avoid\nhttps://gitlab.kitware.com/cmake/cmake/issues/17785\n\nUpdate-Note: This adds a new optional test dependency, but it\u0027s disabled\nby default (define BORINGSSL_HAVE_LIBUNWIND), so consumers do not need\nto do anything. We\u0027ll probably want to adjust this in the future.\n\nBug: 181\nChange-Id: I817263d7907aff0904a9cee83f8b26747262cc0c\nReviewed-on: https://boringssl-review.googlesource.com/c/33966\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "963ed3c8f638718e227da609324931b8ebd2b5f1", "old_mode": 33188, "old_path": "BUILDING.md", "new_id": "ba988b769fe274223e28fc72e4bbafc76588191c", "new_mode": 33188, "new_path": "BUILDING.md" }, { "type": "modify", "old_id": "1f18782f38ef0b47cd424d96f61489c89f3837ef", "old_mode": 33188, "old_path": "CMakeLists.txt", "new_id": "abd85f55eca532583116e4ea440962f317a05b6b", "new_mode": 33188, "new_path": "CMakeLists.txt" }, { "type": "modify", "old_id": "863591020134ace4b4002298359d6474eaf21124", "old_mode": 33188, "old_path": "crypto/CMakeLists.txt", "new_id": "f846f1f7b4b51b5de89a71651d005a9e875893a7", "new_mode": 33188, "new_path": "crypto/CMakeLists.txt" }, { "type": "modify", "old_id": "773c9bd817266398c767d39087752f23cfe92207", "old_mode": 33188, "old_path": "crypto/abi_self_test.cc", "new_id": "9a1b86850639d4d3a952c40cca168e14f2f27412", "new_mode": 33188, "new_path": "crypto/abi_self_test.cc" }, { "type": "modify", "old_id": "f7ca8708a4aa321332ec39c9032da466d69573cd", "old_mode": 33261, "old_path": "crypto/perlasm/x86_64-xlate.pl", "new_id": "d896c53ee180e6bbd7f9df98319d6a668bc480e7", "new_mode": 33261, "new_path": "crypto/perlasm/x86_64-xlate.pl" }, { "type": "modify", "old_id": "0b1eab888dbf235e7a151a827b00f8f0fa6bfefa", "old_mode": 33188, "old_path": "crypto/test/CMakeLists.txt", "new_id": "d2e4cdf2e055af5274a8895aed82902f0911a544", "new_mode": 33188, "new_path": "crypto/test/CMakeLists.txt" }, { "type": "modify", "old_id": "890aa154973839b582d1a0e1b14c1222d3e51a26", "old_mode": 33188, "old_path": "crypto/test/abi_test.cc", "new_id": "e86f2f45c56f0ae8e43549d6f3696b9729ab1bd0", "new_mode": 33188, "new_path": "crypto/test/abi_test.cc" }, { "type": "modify", "old_id": "c1ef8f18fa6d13ec0db49c724cf2192df9bef4b3", "old_mode": 33188, "old_path": "crypto/test/abi_test.h", "new_id": "23f3aa594eefb89b3ffe8f17b90eb7a6caf45df1", "new_mode": 33188, "new_path": "crypto/test/abi_test.h" }, { "type": "modify", "old_id": "432bcc8b2d428aabcd7c38b844cdf26ce5a2d793", "old_mode": 33261, "old_path": "crypto/test/asm/trampoline-x86_64.pl", "new_id": "d41aadf83c2656df1104b91514e26c28b8eae364", "new_mode": 33261, "new_path": "crypto/test/asm/trampoline-x86_64.pl" }, { "type": "modify", "old_id": "f19b830d9b3710d57e098406a68d9d02697e30e2", "old_mode": 33188, "old_path": "crypto/test/gtest_main.cc", "new_id": "aeec0f5eeeadad85476167286fd8831e3ecc9c16", "new_mode": 33188, "new_path": "crypto/test/gtest_main.cc" }, { "type": "modify", "old_id": "501252c9dd0ce3f38cbb998a8c2450c32edf2287", "old_mode": 33188, "old_path": "decrepit/CMakeLists.txt", "new_id": "0829926f0e8f99a535fc3db92fcdecb3b43cae7d", "new_mode": 33188, "new_path": "decrepit/CMakeLists.txt" }, { "type": "modify", "old_id": "779fcd1a856b68aa172ef444a3b99e3b9be3bc8c", "old_mode": 33188, "old_path": "fipstools/CMakeLists.txt", "new_id": "58c9a601e68a16e9a3196e5c27c8f4ded4674667", "new_mode": 33188, "new_path": "fipstools/CMakeLists.txt" }, { "type": "modify", "old_id": "d6c1294f120e32dab248136dbfeeda6912a317dd", "old_mode": 33188, "old_path": "ssl/CMakeLists.txt", "new_id": "dc89dcaa516c0b729c657ffaebe4d3ceac971487", "new_mode": 33188, "new_path": "ssl/CMakeLists.txt" }, { "type": "modify", "old_id": "d86464c4c4260c4219a6f723d0ccad85bb2dc45b", "old_mode": 33188, "old_path": "ssl/test/CMakeLists.txt", "new_id": "ebc16f19201dfae4dcb5d4059e0042d4a77726eb", "new_mode": 33188, "new_path": "ssl/test/CMakeLists.txt" }, { "type": "modify", "old_id": "55e19213e52a3775557beb5494e6ae296c00e154", "old_mode": 33188, "old_path": "util/all_tests.go", "new_id": "fbff48c294ca2f086b075c5bc08903512b8f0446", "new_mode": 33188, "new_path": "util/all_tests.go" } ] }