| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[runtimes][PAC] Harden unwinding when possible (#143230) This hardens the unwinding logic and datastructures on systems that support pointer authentication. The approach taken to hardening is to harden the schemas of as many high value fields in the myriad structs as possible, and then also explicitly qualify local variables referencing privileged or security critical values. This does introduce ABI linkage between libcxx, libcxxabi, and libunwind but those are in principle separate from the OS itself so we've kept the schema definitions in the library specific headers rather than ptrauth.h | 9 个月前 | |
[NFC][CMake] quote ${CMAKE_SYSTEM_NAME} consistently (#154537) A CMake change included in CMake 4.0 makes AIX into a variable (similar to APPLE, etc.) https://gitlab.kitware.com/cmake/cmake/-/commit/ff03db6657c38c8cf992877ea66174c33d0bcb0b However, ${CMAKE_SYSTEM_NAME} unfortunately also expands exactly to AIX and if auto-expands variable names in CMake. That means you get a double expansion if you write: if (${CMAKE_SYSTEM_NAME} MATCHES "AIX") which becomes: if (AIX MATCHES "AIX") which is as if you wrote: if (ON MATCHES "AIX") You can prevent this by quoting the expansion of "${CMAKE_SYSTEM_NAME}", due to policy [CMP0054](https://cmake.org/cmake/help/latest/policy/CMP0054.html#policy:CMP0054) which is on by default in 4.0+. Most of the LLVM CMake already does this, but this PR fixes the remaining cases where we do not. | 11 个月前 | |
[runtimes][PAC] Harden unwinding when possible (#143230) This hardens the unwinding logic and datastructures on systems that support pointer authentication. The approach taken to hardening is to harden the schemas of as many high value fields in the myriad structs as possible, and then also explicitly qualify local variables referencing privileged or security critical values. This does introduce ABI linkage between libcxx, libcxxabi, and libunwind but those are in principle separate from the OS itself so we've kept the schema definitions in the library specific headers rather than ptrauth.h | 9 个月前 | |
[runtimes][PAC] Harden unwinding when possible (#143230) This hardens the unwinding logic and datastructures on systems that support pointer authentication. The approach taken to hardening is to harden the schemas of as many high value fields in the myriad structs as possible, and then also explicitly qualify local variables referencing privileged or security critical values. This does introduce ABI linkage between libcxx, libcxxabi, and libunwind but those are in principle separate from the OS itself so we've kept the schema definitions in the library specific headers rather than ptrauth.h | 9 个月前 | |
[libunwind][PAuthLR] Remove PC offset when using FEAT_PAuthLR (#164224) When originally introduced to libunwind as part of #112171, FEAT_PAuthLR had its Call Frame Instruction's (CFI's) in a different location to other Signing Authentication methods. To incorporate this in libunwind, a 4 byte offset was introduced to work with this. However, this design was reversed in #121551 so the CFI's are emitted in the same location as other methods. When making this change, the offset in libunwind was not removed, so libunwind's PC value would be incorrect. As the 4 byte offset is no longer needed, that adjustment can be removed. results->ptrAuthDiversifier will still be set. | 8 个月前 | |
[libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (#68815) I was running the tests with baremetal picolibc which has a linker script that __eh_frame_start==__eh_frame_end (not equal to zero) in case there is no .eh_frame_hdr. I noticed that libunwind was trying to read nonsense data because it was printing messages such as libunwind: unsupported .eh_frame_hdr version: 20 at https://github.com/llvm/llvm-project/commit/8000d308146ebf49cb364cb600e28a0a42e22c83 This change adds a ehHdr size check to avoid reading this out-of-bounds data and potentially crashing. | 2 年前 | |
[libunwind] Fix a -Wextra-semi warning | 2 年前 | |
[runtimes][NFC] Remove filenames at the top of the license notice We've stopped doing it in libc++ for a while now because these names would end up rotting as we move things around and copy/paste stuff. This cleans up all the existing files so as to stop the spreading as people copy-paste headers around. | 4 年前 | |
| 8 个月前 | ||
[libunwind] Fix build with -Wunused-function https://reviews.llvm.org/D144252 removed -Wno-unused-function from the libunwind build, but we have an unused function when you're building for armv7 without assertions. Mark that function as possibly unused to avoid the warning, and mark the parameter as a const pointer while I'm here to make it clear that nothing is modified by a debugging function. Reviewed By: #libunwind, philnik Differential Revision: https://reviews.llvm.org/D156496 | 2 年前 | |
[runtimes][NFC] Remove filenames at the top of the license notice We've stopped doing it in libc++ for a while now because these names would end up rotting as we move things around and copy/paste stuff. This cleans up all the existing files so as to stop the spreading as people copy-paste headers around. | 4 年前 | |
[libunwind] Fix aarch64 SEH unwinding with a debugger attached (#162867) See https://github.com/LuaJIT/LuaJIT/issues/593#issuecomment-1717728494 for the original explanation of the problem. In short; when a debugger is attached, there's a function KiUserExceptionDispatcher in the stack that is being unwound. The function KiUserExceptionDispatcher contains a CONTEXT, with a copy of the context from where the exception was raised. When unwinding through this function, this whole CONTEXT gets restored. This CONTEXT is what we receive a pointer to in the callbacks, as the ms_ctx pointer. When we unwind manually using RtlUnwindEx, the unwinding overwrites the CONTEXT that is passed to it. Thus, to avoid clobbering the CONTEXT that needs to be restored by KiUserExceptionDispatcher, we could either declare a new temporary CONTEXT on the stack before calling RtlUnwindEx, or just use disp->ContextRecord as we already have available. Fixes: https://github.com/llvm/llvm-project/issues/161851 Co-authored-by: Peter Cawley <corsix@corsix.org> Co-authored-by: Hannes Domani <ssbssa@yahoo.de> | 9 个月前 | |
[libunwind] Fix a typo in debug print (#118856) | 1 年前 | |
[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (#125412) | 1 年前 | |
[Unwind][AArch64] Match sigreturn instructions in big endian (#167139) Since insns are always stored LE, on a BE system the opcodes will be loaded byte-reversed. Therefore, define two sets of opcodes, one for LE and one for BE. | 8 个月前 | |
[libunwind] Remove unnecessary strcpy dependency (#72043) libunwind uses a minimal set of necessary standard library functions, basically just memset and memcpy. There is a single use of strcpy to copy the bytes "CLNGUNW" into a uint64_t object. This is both an arguably odd use of the strcpy function as well as it unnecessarily widens the set of library functions that must be available to build libunwind, which can be an obstacle in baremetal scenarios. This change simply replaces this one strcpy with the more fundamental memcpy. | 2 年前 | |
[libunwind] Fix build error because of wrong register size (#167743) | 8 个月前 | |
[libunwind] Fix execution flow imbalance when using C++ Exceptions (#165066) | 8 个月前 | |
[libunwind][AArch64] Disable ZA before resuming from unwinding (on Linux) (#165451) This patch reimplements the SME ABI __arm_za_disable routine within libunwind. This routine must be called before resuming from unwinding on AArch64 platforms with SME support. Before calling the routine, we need to check that SME is available. In this patch, this is implemented for Linux-based platforms by checking HWCAP2. It should be possible to implement this check for other platforms as required. This patch includes a test for this functionality. This test requires SME, so on platforms without it, it will simply pass. | 8 个月前 | |
[libunwind][AIX] Implement _Unwind_FindEnclosingFunction() using traceback table on AIX Summary: The implementation of _Unwind_FindEnclosingFunction(void *ip) takes the context of itself and then uses the context to get the info of the function enclosing ip. This approach does not work for AIX because on AIX, the TOC base in GPR2 is used as the base for calculating relative addresses. Since _Unwind_FindEnclosingFunction() may be in a different shared lib than the function containing ip, their TOC bases can be different. Therefore, using the value of GPR2 in the context from _Unwind_FindEnclosingFunction() as the base results in incorrect addresses. On the other hand, the start address of a function is available in the traceback table following the instructions of each function on AIX. To get to the traceback table, search a word of 0 starting from ip and the traceback table is located after the word 0. This patch implements _Unwind_FindEnclosingFunction() for AIX by obtaining the function start address from its traceback table. Reviewed by: compnerd, MaskRay, libunwind Differential Revision: https://reviews.llvm.org/D131709 | 3 年前 | |
[libunwind] Fix execution flow imbalance when using C++ Exceptions (#165066) | 8 个月前 | |
[libunwind] Fix execution flow imbalance when using C++ Exceptions (#165066) | 8 个月前 | |
[AArch64][Libunwind] Add Support for FEAT_PAuthLR DWARF Instruction (#112171) As part of FEAT_PAuthLR, a new DWARF Frame Instruction was introduced, DW_CFA_AARCH64_negate_ra_state_with_pc. This instructs Libunwind that the PC has been used with the signing instruction. This change includes three commits - Libunwind support for the newly introduced DWARF Instruction - CodeGen Support for the DWARF Instructions - Reversing the changes made in #96377. Due to DW_CFA_AARCH64_negate_ra_state_with_pc's requirements to be placed immediately after the signing instruction, this would mean the CFI Instruction location was not consistent with the generated location when not using FEAT_PAuthLR. The commit reverses the changes and makes the location consistent across the different branch protection options. While this does have a code size effect, this is a negligible one. For the ABI information, see here: https://github.com/ARM-software/abi-aa/blob/853286c7ab66048e4b819682ce17f567b77a0291/aadwarf64/aadwarf64.rst#id23 | 1 年前 | |
libunwind: Implement the unw_strerror function for better nongnu libunwind compatibility (#160887) As it was explained to me in https://discourse.llvm.org/t/libunwinds-raison-detre/88283/2 the LLVM version of libunwind is mostly compatible with nongnu one. This change improves the compatibility a bit further. | 8 个月前 | |
libunwind: Implement the unw_strerror function for better nongnu libunwind compatibility (#160887) As it was explained to me in https://discourse.llvm.org/t/libunwinds-raison-detre/88283/2 the LLVM version of libunwind is mostly compatible with nongnu one. This change improves the compatibility a bit further. | 8 个月前 | |
[compiler-rt][libunwind] Allow for CET on OpenBSD (#164341) | 8 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 11 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 3 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 |