summaryrefslogtreecommitdiff
path: root/gnu/llvm
AgeCommit message (Collapse)Author
2024-03-03For macppc, add missing CFI for cr2, cr3, cr4George Koehler
clang -S was missing a line like ".cfi_offset cr2, -16" in functions that spill cr2 (or cr3, cr4) to the stack. This was breaking a few C++ exceptions. This fix adds the missing CFI. This will fix the C++ exception that was crashing egdb from ports/devel/gdb when you did "q to quit" in the pager. ok kettenis@ tobhe@
2024-02-27Linux still doesn't actually implement IBT for userland. And by the paceMark Kettenis
things are going, it will take another decade before it does. But OpenBSD has it enabled *by default* already. Drop the #ifdef __linux__. This should hurt other OSes when they finally catch up with us. ok robert@, tb@
2024-02-19Revert the change that enabled retpoline thunks by default. The use ofMark Kettenis
retpolines makes IBT less useful and we have enabled additional mitigations in our kernel now that should make them (mostly) unnecessary. ok guenther@
2024-02-19Remove "noretpolineplt" from the list of known -z flags. Missed in theMark Kettenis
previous commit. ok guenther@
2024-02-12Revert the change that enables retpoline PLTs by default. While theseMark Kettenis
provide a mitigation against branch speculation attacks, they also make IBT control flow integrity less effective. Our kernel now uses IBPB to as a mitigation against branch speculation attacks, so we can disable retpoline PLTs again. ok deraadt@
2024-02-07riscv64 fix: Handle relaxation reductions of more than 65536 bytesJeremie Courreges-Anglas
Upstream commit: https://github.com/llvm/llvm-project/commit/9d37ea95df1b84cca9b5e954d8964c976a5e303e Already needed at least by ports/math/hdf5, prerequisite if we want to enable linker relaxation (clang upstream defaults). ok kettenis@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2024-02-03On OpenBSD we always want IBT-compatible PLT entries. Currently we useMark Kettenis
repoline PLT entries that were changed to include the necessary endbr64 instructions. But with -Wl,-znoretpolineplt we would still emit non-BIT PLT entries under certain circumstances. Fix this. ok deraadt@, guenther@
2024-01-26merge llvm libcxx 16.0.6Robert Nagy
2024-01-26import of libcxx-16.0.6Robert Nagy
2024-01-26merge llvm libcxxabi 16.0.6Robert Nagy
2021-04-28Import libc++ 11.1.0 release.Patrick Wildt
2021-01-02Import libc++ 10.0.1 release.Patrick Wildt
2024-01-26import of libcxxabi 16.0.6Robert Nagy
2024-01-26merge llvm libunwind 16.0.6Robert Nagy
2024-01-26import of llvm libunwind 16.0.6Robert Nagy
2024-01-26merge llvm compiler-rt 16.0.6Robert Nagy
2024-01-26import llvm compiler-rt 16.0.6Robert Nagy
2021-01-02Import libc++abi 10.0.1 release.Patrick Wildt
2020-08-10Import compiler-rt 10.0.1 release.Patrick Wildt
ok kettenis@
2023-12-04protect access to the gnu warning map with a mutex to avoid random crashesRobert Nagy
discussed with, tested by and ok tb@
2023-12-03Collect .openbsd.syscalls sections into a new PT_OPENBSD_SYSCALLS segment.Mark Kettenis
This will be used soon to pin system calls to designated call sites. ok deraadt@
2023-11-26Add arm64 bti pads for range extension thunks.Tobias Heider
Large arm64 binaries like chromium use range extension thunks for accessing plt entries. Add bti landing pads for the additional indirection. upstream commit: 60827df765156cee6cca3dc5049388dde9dac1c0 ok kettenis@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-20Stop erroring out when .gcc_except_table relocs point at discarded sectionsJeremie Courreges-Anglas
lang/gcc on riscv64 has a wart, it creates such relocs which upset ld.lld. The workaround I have used in lang/gcc since Sep 2022 doesn't work any more, so ask ld.lld to be more lenient. This will let the fortran ports and friends build on riscv64. clang has fixed since some time already, but our lang/gcc port will likely keep that wart for some time. Upstream report: https://reviews.llvm.org/D83244 Input and ok kettenis@
2023-11-20Code changes between llvm 13 and 16 mean that we have to drop the final dotMark Kettenis
for the .openbsd.randomdata and .openbsd.mutable section merging code. ok jca@
2023-11-20Restore lost patch: downgrade RISCV ABI mismatch error to a warningJeremie Courreges-Anglas
This lets lld link code with object files created with ld -b binary, as used by several ports (mupdf, postgresql-pllua, various games). Upstream report with an unfinished diff: https://reviews.llvm.org/D106378 ok gkoehler@ kettenis@
2023-11-20only enable bti and pac by default on arm64Jonathan Gray
before this change, clang on armv7 defined __ARM_FEATURE_BTI_DEFAULT and __ARM_FEATURE_PAC_DEFAULT which broke the build of llvm libunwind ok kettenis@ deraadt@
2023-11-19Disable LOAD_STACK_GUARD on OpenBSD/armv7. It seems the implementationMark Kettenis
is incomplete resulting in SIGSEGV with the OpenBSD default options. ok deraadt@, jsg@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-19Fix cc -ftrapping-math on macppcGeorge Koehler
Handle CALL_RM like CALL for 32-bit ELF. If a function call has the strictfp attribute, its opcode changes from CALL to CALL_RM. If a call uses the secure PLT, then it must getGlobalBaseReg() to set r30. After I rebuilt xenocara/lib/pixman with this change, Xorg stopped crashing on my macppc. pixman uses cc -ftrapping-math which puts strictfp on each function call. https://github.com/llvm/llvm-project/pull/72758 ok jca@ tobhe@ deraadt@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-16downgrade -Wint-conversion to a warningRobert Nagy
autoconf might misinterpet this so we need to do a full sweep before it can be upgraded to an error again
2023-11-12revert https://reviews.llvm.org/D135402 for now to shut lld up until we fixRobert Nagy
all the symbol lists
2023-11-12Fix parsing of branch target protection options on arm64 to enableMark Kettenis
BTI and PAC again by default on OpenBSD. ok robert@
2023-11-12flip the ignoreFunctionAddressEquality flag; lost in merging changes from ↵Robert Nagy
llvm-13
2023-11-11merge lldb-16.0.6Robert Nagy
2023-11-11import lldb from LLVM-16.0.6Robert Nagy
2023-11-11merge lld-16.0.6Robert Nagy
2023-11-11import of lld from LLVM-16.0.6Robert Nagy
2023-11-11merge clang-16.0.6Robert Nagy
2023-11-11import of clang from LLVM-16.0.6Robert Nagy
2023-11-11merge llvm-16.0.6Robert Nagy
2023-11-11import of llvm from LLVM 16.0.6Robert Nagy
2021-04-28Import LLVM 11.1.0 release including clang, lld and lldb.Patrick Wildt
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-10-23create __OpenBSD__ versions that use futex() with the correct numberTheo de Raadt
of arguments and without using syscall(). the glibc people should be ashamed of the mess they created. ok miod
2021-01-02Import libc++abi 10.0.1 release.Patrick Wildt
2023-07-20Make sure -msign-return-address doesn't disable BTI support.Mark Kettenis
ok deraadt@