Age | Commit message (Collapse) | Author |
|
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.
|
|
"where is the kaboom?" deraadt@
|
|
|
|
ok hackroom@
|
|
From Brad
|
|
|
|
ok patrick@
|
|
Note that this will still produce binaries that have the read-only segment
placed before the executable segment. This means that on machines without
the NX bit, the read-only segment is now executable. However on machines
with an NX bit, the ordering used by lld means the program headers are no
longer executable since they are now part of the read-only segment.
ok deraadt@, naddy@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With fixes from mortimer@ (thanks!)
Tested by many, especially naddy@ (thanks!)
|
|
|
|
|
|
development effort on OpenBSD/arm64.
|
|
|
|
ok hackroom@
|
|
ok deraadt millert
|
|
Without this, values get truncated to 32-bit. Makes a sparc64 kernel
actually work when compiled with clang.
ok pguenther@, visa@
|
|
ok hackroom@
|
|
Previously they tried to depend on libtermcap which actually doesn't
exist in the objdir.
ok jca
|
|
ok kettenis@ deraadt@
|
|
Problem reported by bluhm@
ok kettenis@
|
|
tweaking the protection flags. ok phessler@ deraadt@
|
|
with naddy, ok guenther mortimer
|
|
Pointed out by Matteo Niccoli, ok bluhm@ sthen@
|
|
|
|
to regain build performance.
OK deraadt@ guenther@ kettenis@
|
|
zero-sized sections.
ok deraadt@, guenther@
|
|
The directive is needed in certain parts of the kernel code when
compiling using clang. By ignoring the directive, the old toolchain
will still be able to build the kernel after the code has been adjusted
for clang.
OK kettenis@
|
|
explicitly in SMALL_KERNEL kernel builds.
tweaks from jsg@ and tb@
ok deraadt@ kettenis@
|
|
ok hackroom@
|
|
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@
|
|
ok hackroom@
|
|
OK visa@, mpi@, guenther@
|
|
that has been compiled using clang.
The added code is based on old binutils code from year 2000.
Prodded by and OK jca@, OK kettenis@ guenther@
|
|
value, so setting it to 'no' was completely misleading
|
|
for the start+end of .{preinit,init,fini}_array sections when building
PIE executables.
ok kettenis@
|
|
dumps with many many segments.
ok yasuoka@
|
|
to pass the real count, with a minimal .shstrtab segment for consistency.
Also, add support for PN_XNUM to readelf.
problem reported and testing by claudio@
ok kettenis@
|
|
to ld and improve the readelf support:
https://sourceware.org/ml/binutils/2006-07/msg00129.html
https://sourceware.org/ml/binutils/2006-07/msg00181.html
Disable the ld support on mips64, as its ABI requires a symbol
ordering that conflicts with the requirements of DT_GNU_HASH.
Tested on macppc, alpha, and sparc64 to verify operation with all
three ELF word size combos
testing help miod@
ok kettenis@
|
|
Addresses:
* CVE-2018-18311 (Perl RT #133204)
* CVE-2018-18312 (Perl RT #133423)
* CVE-2018-18313 (Perl RT #133192)
* CVE-2018-18314 (Perl RT #131649)
|
|
avoiding runtime failures on architectures using ld.lld. Also add a note to
libcurses shlib_version reminding about bumps (as done with libcrypto/libssl).
Thanks guenther@ for suggestions of tests involving library bumps and jca@
for doing these tests and hint about DPADD.
Looks good kettenis@, ok jca@
|
|
ok naddy@ jca@
|
|
ok tb@
|
|
is referenced from code being linked.
ok deraadt@, naddy@, guenther@
|