summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Switch powerpc clang to -msvr4-struct-return, like gcc.gkoehler2020-03-041-0/+6
| | | | | | | | 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@
* Merge LLVM 8.0.0 release.patrick2019-06-2324-3246/+743
| | | | | | | | | 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@
* Import LLVM 8.0.0 release including clang, lld and lldb.patrick2019-06-23257-8092/+17916
|
* Improve the X86FixupGadgets pass:mortimer2019-02-221-0/+4
| | | | | | | | | | - 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@
* implement -msave-args in clang/llvm, like the sun did for gccdlg2019-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is a bit different to gcc as gcc likes to use movs to move stuff on and off the stack, and directly updates the stack pointers with add and sub instructions. llvm prefers to use push and pop instructions, is a lot more careful about keeping track of how much stuff is currently on the stack, and generally pops the frame pointer rather than do maths on it. -msave-args adds a bunch of pushes as the first thing a function prologue does. to keep the stack aligned, if there's an odd number of arguments to the function it pushes the first one again to put the frame back on a 16 byte boundary. to undo the pushes the frame pointer needs to be updated in function epilogues. clang emits a series of pops to fix up the registers on the way out, but popping saved arguments is a waste of time and harmful to actual data in the function. rather than add an offset to the stack pointer, -msave-args emits a leaveq operation to fix up the frame again. leaveq is effectively mov rbp,rsp; pop rbp, and is a single byte, meaning there's less potential for gadgets compared to a direct add to rsp, or an explicit mov rbp,rsp. the only thing missing compared to the gcc implementation is adding the SUN_amd64_parmdump dwarf flag to affected functions. if someone can tell me how to add that from the frame lowering code, let me know. when enabled in kernel builds again, this will provide useful arguments in ddb stack traces again.
* Tedu files that got removed in LLVM 7.0.1.patrick2019-01-273-1133/+0
|
* Merge LLVM 7.0.1 release.patrick2019-01-279-1560/+2140
| | | | | With fixes from mortimer@ (thanks!) Tested by many, especially naddy@ (thanks!)
* Import LLVM 7.0.1 release including clang, lld and lldb.patrick2019-01-27425-19247/+30052
|
* The %b printf extension in the kernel is not fixed to a int type. On sparc64claudio2018-12-291-2/+4
| | | | | | there are various %llb formats. Adjust the code to handle the length specifiers and type check like it is used by the regular case. OK guenther@
* Add RETGUARD to clang for amd64. This security mechanism uses per-functionmortimer2018-06-062-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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/+4
|
* Tedu files that got removed in LLVM 6.0.0.patrick2018-04-063-944/+0
|
* Merge LLVM 6.0.0 release.patrick2018-04-065-576/+1085
|
* Import LLVM 6.0.1 release including clang, lld and lldb.patrick2018-04-06252-6957/+16029
| | | | "where is the kaboom?" deraadt@
* Merge LLVM 5.0.1 release.patrick2017-12-241-1/+1
|
* Import LLVM 5.0.1 release including clang, lld and lldb.patrick2017-12-243-3/+17
|
* Merge LLVM 5.0.0 release.patrick2017-10-046-486/+1342
|
* Import LLVM 5.0.0 release including clang, lld and lldb.patrick2017-10-04214-2150/+10380
|
* Backport https://reviews.llvm.org/D29778. Fixes a bug where clang waskettenis2017-08-041-3/+5
| | | | | | | optimizing code around an lgamma(3) call a bit too much. Fixes the lib/libm/lgamma regress test. ok patrick@, millert@
* Disable -Waddress-of-packed-member by default.kettenis2017-07-291-1/+1
| | | | | | | While these warnings have the potential to be useful, there are too manu false positives right now. ok deraadt@
* teach clang about our syslog format attributerobert2017-07-271-0/+1
| | | | ok deraadt@
* Synonym -Wno-cpp for -Wno-#warnings. That one is not a headache forespie2017-06-021-0/+1
| | | | | | scripting. (got it into upstream, it's just a backport) okay kettenis@, patrick@
* Merge LLVM 4.0.0 release.patrick2017-03-141-3/+4
|
* Import LLVM 4.0.0 release including clang and lld.patrick2017-03-144-66/+32
|
* Disable colored diagnostics in the clang frontend.patrick2017-03-091-1/+1
| | | | Requested by deraadt@, millert@ and some more.
* Disable -Wpointer-sign warnings per defaultstefan2017-02-121-1/+1
| | | | base gcc does the same. suggested by and ok jsg@
* Merge LLVM 4.0.0 rc1patrick2017-01-241-31/+169
|
* Import LLVM 4.0.0 rc1 including clang and lld to help the currentpatrick2017-01-24223-3129/+9746
| | | | development effort on OpenBSD/arm64.
* Merge LLVM 3.9.1patrick2017-01-1412-443/+159
|
* Import LLVM 3.9.1 including clang and lld.patrick2017-01-14214-3947/+15384
|
* Handle -p as an alias of -pg. From the ports patch.jsg2016-09-091-1/+1
| | | | ok patrick@
* Use the space freed up by sparc and zaurus to import LLVM.pascal2016-09-03448-0/+192615
ok hackroom@