VVitaly Buka[sanitizer] Switch StackStore to 8 MiB blocks
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[HWASan] Use page aliasing on x86_64. Userspace page aliasing allows us to use middle pointer bits for tags without untagging them before syscalls or accesses. This should enable easier experimentation with HWASan on x86_64 platforms. Currently stack, global, and secondary heap tagging are unsupported. Only primary heap allocations get tagged. Note that aliasing mode will not work properly in the presence of fork(), since heap memory will be shared between the parent and child processes. This mode is non-ideal; we expect Intel LAM to enable full HWASan support on x86_64 in the future. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D98875 | 5 年前 | |
[hwasan] Support malloc in atfork. Before this change we were locking the StackDepot in the fork() interceptor. This results in a deadlock when allocator functions are used in a pthread_atfork() callback. Instead, set up a pthread_atfork() callback at init that locks/unlocks both StackDepot and the allocator. Since our callback is set up very early, the pre-fork callback is executed late, and both post-fork ones are executed early, which works perfect for us. Differential Revision: https://reviews.llvm.org/D108063 | 4 年前 | |
[hwasan] Stress test for thread creation. This test has two modes - testing reused threads with multiple loops of batch create/join, and testing new threads with a single loop of create/join per fork. The non-reuse variant catches the problem that was fixed in D101881 with a high probability. Differential Revision: https://reviews.llvm.org/D101936 | 5 年前 | |
[sanitizer] Switch StackStore to 8 MiB blocks Larger blocks are more convenient for compressions. Blocks are allocated with MmapNoReserveOrDie to save some memory. Also it's 15% faster on StackDepotBenchmarkSuite Depends on D114464. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D114488 | 4 年前 | |
[compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591 | 6 年前 | |
[HWASan] Use page aliasing on x86_64. Userspace page aliasing allows us to use middle pointer bits for tags without untagging them before syscalls or accesses. This should enable easier experimentation with HWASan on x86_64 platforms. Currently stack, global, and secondary heap tagging are unsupported. Only primary heap allocations get tagged. Note that aliasing mode will not work properly in the presence of fork(), since heap memory will be shared between the parent and child processes. This mode is non-ideal; we expect Intel LAM to enable full HWASan support on x86_64 in the future. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D98875 | 5 年前 | |
[hwasan] Remove untagging of kernel-consumed memory Now that page aliasing for x64 has landed, we don't need to worry about passing tagged pointers to libc, and thus D98875 removed it. Unfortunately, we still test on aarch64 devices that don't have the kernel tagged address ABI (https://reviews.llvm.org/D98875#2649269). All the memory that we pass to the kernel in these tests is from global variables. Instead of having architecture-specific untagging mechanisms for this memory, let's just not tag the globals. Reviewed By: eugenis, morehouse Differential Revision: https://reviews.llvm.org/D101121 | 5 年前 | |
[hwasan] Remove untagging of kernel-consumed memory Now that page aliasing for x64 has landed, we don't need to worry about passing tagged pointers to libc, and thus D98875 removed it. Unfortunately, we still test on aarch64 devices that don't have the kernel tagged address ABI (https://reviews.llvm.org/D98875#2649269). All the memory that we pass to the kernel in these tests is from global variables. Instead of having architecture-specific untagging mechanisms for this memory, let's just not tag the globals. Reviewed By: eugenis, morehouse Differential Revision: https://reviews.llvm.org/D101121 | 5 年前 | |
[HWASan] Add aliasing flag and enable HWASan to use it. -fsanitize-hwaddress-experimental-aliasing is intended to distinguish aliasing mode from LAM mode on x86_64. check-hwasan is configured to use aliasing mode while check-hwasan-lam is configured to use LAM mode. The current patch doesn't actually do anything differently in the two modes. A subsequent patch will actually build the separate runtimes and use them in each mode. Currently LAM mode tests must be run in an emulator that has LAM support. To ensure LAM mode isn't broken by future patches, I will next set up a QEMU buildbot to run the HWASan tests in LAM. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102288 | 5 年前 |