Age | Commit message (Collapse) | Author |
|
specified; suggested by and ok kettenis@
|
|
stack protector. Fixes 'unused arguments' warning when this argument is
given.
Noticed by robert@, ok robert@
|
|
genassym.sh on sparc64 when using clang as the compiler.
ok claudio@, deraadt@
|
|
ok hackroom@
|
|
the .text section in use after the file header, improving compatibility
with gcc. Without this change, module-level inline assembly blocks could
end up into wrong section.
OK kettenis@ guenther@
|
|
ok hackroom@
|
|
disable it in upcoming 6.5 release.
(phessler and mortimer have the details)
|
|
are close to release, so punt the change till after-release
easier for everyoned and especially naddy
ok tedu
|
|
optimization flags.
ok kettenis@ visa@
|
|
This adds more trap padding before the return while ensuring that the
return is still in the same cache line.
ok deraadt@
|
|
ok millert@
|
|
ok deraadt@
|
|
Makes things slightly faster and also improves security in these functions,
since the retguard cookie can't leak via the stack.
ok deraadt@
|
|
symlink for libLLVM-7.so or libLLVM.so. Adjust llvm-config to cope and
force llvm-config DyLibExists to true.
This is specific to LLVM in base this patch should not be used in ports.
|
|
ok hackroom@
|
|
- 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@
|
|
load and store instructions. The vast majority of PowerPC CPUs that
OpenBSD runs on don't implement those and will generate an alignment
exceptions. While we do emulate lfd and stfd (to work around GCC bugs),
we don't emulate lfs and stfs. It is way more efficient to have the
compiler generate code that only uses aligned load and store instructions.
Based on a diff from Georg Koehler.
ok patrick@, visa@
|
|
ok hackroom@
|
|
ok patrick@
|
|
|
|
to fix a regression in floating point operations. Bluhm noticed that
the bc regression test has been failing after the upgrade to 7.0.1
because setting the floating point control register was in some cases
reordered erroneously.
Found and tested by bluhm@
ok bluhm@ kettenis@
|
|
ok hackroom@
|
|
FreeBSD/powerpc. From George Koehler.
ok millert@, deraadt@, visa@
|
|
"where is the kaboom?" deraadt@
|
|
ok dlg@
|
|
are on command-line.
and use a bool type for a boolean in C++.
ok kettenis@ deraadt@
|
|
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@
|
|
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@
|
|
Without this, values get truncated to 32-bit. Makes a sparc64 kernel
actually work when compiled with clang.
ok pguenther@, visa@
|
|
ok hackroom@
|
|
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@
|
|
is referenced from code being linked.
ok deraadt@, naddy@, guenther@
|
|
|
|
From upstream r335090. ok guenther@
|
|
GNU linkers by convention supports both `--foo bar` and `--foo=bar` styles
for all long options that take arguments.
From upstream r326506. ok patrick@ kettenis@
|