<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/gnu/llvm/include, branch jd/simplify-queueing</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/gnu/llvm/include?h=jd%2Fsimplify-queueing</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/gnu/llvm/include?h=jd%2Fsimplify-queueing'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2019-06-23T22:05:08Z</updated>
<entry>
<title>Merge LLVM 8.0.0 release.</title>
<updated>2019-06-23T22:05:08Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-06-23T22:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f27a781c9811da94fe68b2cf34237c2a61b48c96'/>
<id>urn:sha1:f27a781c9811da94fe68b2cf34237c2a61b48c96</id>
<content type='text'>
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@
</content>
</entry>
<entry>
<title>Import LLVM 8.0.0 release including clang, lld and lldb.</title>
<updated>2019-06-23T21:36:31Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-06-23T21:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=23f101f37937a1bd4a29726cab2f76e0fb038b35'/>
<id>urn:sha1:23f101f37937a1bd4a29726cab2f76e0fb038b35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not store the retguard cookie in frame in leaf functions if possible.</title>
<updated>2019-03-31T02:39:47Z</updated>
<author>
<name>mortimer</name>
<email>mortimer@openbsd.org</email>
</author>
<published>2019-03-31T02:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=52357f02de6027c0408b01b51141d97603ef4460'/>
<id>urn:sha1:52357f02de6027c0408b01b51141d97603ef4460</id>
<content type='text'>
Makes things slightly faster and also improves security in these functions,
since the retguard cookie can't leak via the stack.

ok deraadt@
</content>
</entry>
<entry>
<title>implement -msave-args in clang/llvm, like the sun did for gcc</title>
<updated>2019-01-30T03:08:12Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2019-01-30T03:08:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=728e23dfc36a7a5f9a19f349b6c8d489de3d3859'/>
<id>urn:sha1:728e23dfc36a7a5f9a19f349b6c8d489de3d3859</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Tedu files that got removed in LLVM 7.0.1.</title>
<updated>2019-01-27T17:29:29Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-01-27T17:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6bb631ead20c14c11b7571b98555381c065c4a04'/>
<id>urn:sha1:6bb631ead20c14c11b7571b98555381c065c4a04</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Re-add files that were previously removed but are now part of LLVM 7.0.1.</title>
<updated>2019-01-27T17:16:56Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-01-27T17:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=5aee48645eb8e9d4a0b11a5fdf62f775d4df23cc'/>
<id>urn:sha1:5aee48645eb8e9d4a0b11a5fdf62f775d4df23cc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Tedu files that got removed in LLVM 7.0.1.</title>
<updated>2019-01-27T17:11:29Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-01-27T17:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=9f520fd6abbfde117cf551fb4eacdd2687a606a9'/>
<id>urn:sha1:9f520fd6abbfde117cf551fb4eacdd2687a606a9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge LLVM 7.0.1 release.</title>
<updated>2019-01-27T16:55:35Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-01-27T16:55:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=5072e66b18f5d3ac6abf1c18a092e85eab2d7568'/>
<id>urn:sha1:5072e66b18f5d3ac6abf1c18a092e85eab2d7568</id>
<content type='text'>
With fixes from mortimer@ (thanks!)
Tested by many, especially naddy@ (thanks!)
</content>
</entry>
<entry>
<title>Import LLVM 7.0.1 release including clang, lld and lldb.</title>
<updated>2019-01-27T16:42:12Z</updated>
<author>
<name>patrick</name>
<email>patrick@openbsd.org</email>
</author>
<published>2019-01-27T16:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=b773203fb58f3ef282fb69c832d8710cab5bc82d'/>
<id>urn:sha1:b773203fb58f3ef282fb69c832d8710cab5bc82d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor retguard to make adding additional arches easier.</title>
<updated>2018-08-12T16:59:31Z</updated>
<author>
<name>mortimer</name>
<email>mortimer@openbsd.org</email>
</author>
<published>2018-08-12T16:59:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=072a3efe7c8d5518a5dad80d7a50ff47d8b80751'/>
<id>urn:sha1:072a3efe7c8d5518a5dad80d7a50ff47d8b80751</id>
<content type='text'>
</content>
</entry>
</feed>
