summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove LLVM 8.0.1 files.patrick2020-08-031-6281/+0
|
* PowerPC: optimize away the frame pointer.gkoehler2020-05-251-3/+4
| | | | | | | | clang defaulted to -fomit-frame-pointer when optimizing PowerPC code for Linux and NetBSD. Now do it for all systems, including OpenBSD. This affects both 32-bit and powerpc64 code. ok kettenis@
* Switch powerpc clang to -msvr4-struct-return, like gcc.gkoehler2020-03-041-0/+13
| | | | | | | | Add these options from gcc to clang: -maix-struct-return # return all structs in memory -msvr4-struct-return # return small structs in r3/r4 ok mortimer@ jca@ deraadt@
* Add retguard for octeon/mips64.mortimer2019-10-251-0/+2
| | | | | | | | | | For this architecture we use separate retguard prologue and epilogue code for static or PIC code. In the PIC case we use some additional code before the retguard epilogue to recover the function start address and the GOT pointer in order to get the per-function random cookie. Much thanks to visa@ for suggestions and advice making it all work. ok deraadt@ visa@
* Merge LLVM 8.0.1 release.patrick2019-09-011-3/+9
| | | | | | | Tested in snaps and package builds Tested on amd64 by naddy@ Tested on arm64 by patrick@ Tested on octeon by visa@
* Merge LLVM 8.0.0 release.patrick2019-06-231-188/+706
| | | | | | | | | Prepared with help from jsg@ and mortimer@ Tested on amd64 by bcallah@, krw@, naddy@ Tested on arm64 by patrick@ Tested on macppc by kettenis@ Tested on octeon by visa@ Tested on sparc64 by claudio@
* Back out frame pointer elimination optimization.mortimer2019-06-011-11/+0
|
* Do not eliminate frame pointers on i386. The entire i386 ecosystem assumesmortimer2019-06-011-1/+0
| | | | | it will be there. problem found by naddy@, "heck yeah" kettenis@
* Re-enable frame pointer elimination for x86 and mips64 if optimizations aremortimer2019-05-311-0/+12
| | | | | | enabled. ok visa@
* Also touch --param ssp-buffer-size when using retguard in lieu of themortimer2019-04-251-1/+2
| | | | | | | stack protector. Fixes 'unused arguments' warning when this argument is given. Noticed by robert@, ok robert@
* frame-pointer elimination has encountered some resistance in ports but wederaadt2019-04-041-12/+0
| | | | | | are close to release, so punt the change till after-release easier for everyoned and especially naddy ok tedu
* Enable frame pointer elimination on i386, amd64 and mips64 when givenmortimer2019-04-021-0/+12
| | | | | | optimization flags. ok kettenis@ visa@
* Consume SSP options when using retguard to prevent warnings.mortimer2019-04-011-0/+4
| | | | ok millert@
* If using retguard, we do not also need the stack protector.mortimer2019-03-311-3/+4
| | | | ok deraadt@
* Improve the X86FixupGadgets pass:mortimer2019-02-221-0/+10
| | | | | | | | | | - Target all four kinds of return bytes (c2, c3, ca, cb) - Fix up instructions using both ModR/M and SIB bytes - Force alignment before instructions with return bytes in immediates - Force alignment before instructions that have return bytes in their encoding - Add a command line switch to toggle the functionality. ok deraadt@
* Merge LLVM 7.0.1 release.patrick2019-01-271-267/+448
| | | | | With fixes from mortimer@ (thanks!) Tested by many, especially naddy@ (thanks!)
* Add retguard for arm64.mortimer2018-08-121-1/+2
| | | | ok deraadt@
* Add RETGUARD to clang for amd64. This security mechanism uses per-functionmortimer2018-06-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | random cookies to protect access to function return instructions, with the effect that the integrity of the return address is protected, and function return instructions are harder to use in ROP gadgets. On function entry the return address is combined with a per-function random cookie and stored in the stack frame. The integrity of this value is verified before function return, and if this check fails, the program aborts. In this way RETGUARD is an improved stack protector, since the cookies are per-function. The verification routine is constructed such that the binary space immediately before each ret instruction is padded with int03 instructions, which makes these return instructions difficult to use in ROP gadgets. In the kernel, this has the effect of removing approximately 50% of total ROP gadgets, and 15% of unique ROP gadgets compared to the 6.3 release kernel. Function epilogues are essentially gadget free, leaving only the polymorphic gadgets that result from jumping into the instruction stream partway through other instructions. Work to remove these gadgets will continue through other mechanisms. Remaining work includes adding this mechanism to assembly routines, which must be done by hand. Many thanks to all those who helped test and provide feedback, especially deaadt, tb, espie and naddy. ok deraadt@
* Add ret protctor options as no-ops.mortimer2018-06-031-0/+10
|
* Merge LLVM 6.0.0 release.patrick2018-04-061-1116/+1351
|
* Merge LLVM 5.0.1 release.patrick2017-12-241-1/+5
|
* Merge LLVM 5.0.0 release.patrick2017-10-041-4/+20
|
* Import LLVM 5.0.0 release including clang, lld and lldb.patrick2017-10-041-0/+5271