| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)
and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)
to show that r11 and r12 are in use between setup and check, and to
pick registers other than r11 and r12 in some kernel functions.
ok mortimer@ deraadt@
|
|
|
|
|
|
|
|
|
|
| |
Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.
Tested by deraadt@, who put this diff in a macppc snap.
|
|
|
|
|
| |
Put a hard-trap instruction after the syscall instruction.
ok kettenis mortimer
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
|
|
| |
__cerror
ok ketternis@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!
Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!
Clean up libpthread's symbol exports like libc.
On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.
Testing by various, particularly sthen@ and patrick@
ok kettenis@
|
|
|
|
|
|
|
|
|
| |
into libc, and move pthread_sigmask() as well (just a trivial wrapper).
This provides consistent handling of SIGTHR between single- and multi-threaded
programs and is a step in the merge of all the libpthread overloads, providing
some ASM and Makefile bits that the other wrappers will need.
ok deraadt@ millert@
|
|
|
|
|
|
|
|
|
|
| |
r2 is zero. Some upcoming changes will probably change the offset at which
the errno pointer is stored, or might even store errno directly. Instead,
call __errno to get the location of errno. Make sure we go through the PLT
such that we call the version in libpthread if it is linked in. Set up r30
for this purpose. The ___cerrno function itself remains protected.
ok guenther@
|
|
|
|
|
| |
cone of shame guenther@
ok deraadt@
|
|
|
|
|
|
|
|
| |
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.
ok deraadt@
|
| |
|
|
|
|
|
|
|
| |
Delete exect(2); it wasn't portable across archs and nothing used it.
ports test build by naddy@
ok deraadt@ kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
| |
libpthread no longer has to override it which means that we can use a local
call and can avoid setting up r30 as a _GLOBAL_OFFSET_TABLE_ pointer, which
is hard the way the powerpc ABI works.
For now we continue to provide __cerror as a weak symbol, but ___cerror is
now protected and internal calls within libc now use ___cerror instead of
__cerror.
discussed with guenther@
|
|
|
|
| |
Secure-PLT ABI.
|
|
|
|
|
|
|
|
|
|
| |
unregistering callbacks if the DSO is unloaded. Move the callback
handling from libpthread to libc, though libpthread still overrides the
inner call to handle locking and thread-library reinitialization.
Major version bump for both libc and libpthread.
verification that this fixes various ports ajacoutot@
asm assistance miod@; ok millert@ deraadt@
|
|
|
|
|
|
|
| |
for a long time, so there's no need to test the second return register here
in the asm stub.
ok and testing of many archs by krw@ miod@
|
| |
|
| |
|
|
|
|
| |
ok miod@
|
|
|
|
|
|
|
|
|
| |
so that it can't get a signal while still running on the parent thread's
stack. Also, pass in sizeof(struct __tfork) to provide forward compat
when more members are added. This is an ABI change, so switch syscall
numbers and bump lib majors this time.
ok deraadt@ matthew@
|
| |
|
|
|
|
|
|
| |
it can be used for not-strictly-threading purposes
ok matthew@ kurt@
|
|
|
|
|
|
| |
On mips64, also correct the name called from plain cerror to __cerror.
"looks correct" miod@
|
|
|
|
| |
okay deraadt@ (tested them all)
|
| |
|
| |
|
|
|
|
| |
powerpc port by Dale Rahn.
|
| |
|
| |
|
| |
|
|
|
|
| |
added as appropriate.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The powerpc specific code was previously handling system call errors
as if kernel threads existed (currently only userlang threads are modeled).
Thus if multiple threads existed in a process, the process would not
get the correct errno from a system call. This would cause _many_ tests
to fail. Fixing this causes a number of the tests in libc_r/TEST to now work,
that did not before, however a few still fail.
|
|
|
|
| |
that EFAULT return value is possible
|
|
|
|
| |
libc_r was never completed for the powerpc arch.
|
|
|
|
| |
contact rahnds@openbsd.org before attempting to use this funcationality.
|
| |
|
|
|
|
|
| |
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.
|
|
|
|
| |
or poorly implemented.
|
|
|
|
|
| |
makes it easier to debug code to see the function entry not the local
branch targets.
|
|
|
|
|
| |
can cause!! Returned sigmask value was taken from wrong register... So no
more zombies!!!
|
| |
|
|
NOTE: This will not work until the other pieces are checked in.
This is primarily the NetBSD powerpc port, with modifications
to support ELF.
|