Age | Commit message (Collapse) | Author |
|
go direct instead of through the PLT.
ok millert@ kettenis@
|
|
ok deraadt@
|
|
|
|
|
|
sig{block,setmask} to directly using the sigprocmask syscall. Rewrite
sig{set,long}jmp based on {set,long}jmp to avoid the deprecated
store/load-multiple instructions.
in snaps; ok deraadt@
|
|
|
|
ok kettenis@
|
|
__cerror
ok ketternis@
|
|
|
|
wondering about that
|
|
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@
|
|
So instead, do the kbind disabling with syscall().
debugging and ok deraadt@, ok kettenis@
|
|
move their definitions and initialization in static links to libc.a
Make crt0 always invoke a new func _csu_finish() in libc to process the auxv
and to either register the ld.so cleanup function (in dynamic links) or
initialize environ and __progname and do MC_DISABLE_KBIND (in static links).
In libc, get pagesize from auxv; cache that between getpagesize() and
sysconf(_SC_PAGESIZE)
ok mpi@ "good time" deraadt@
|
|
and ldexp().
ok millert@
|
|
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@
|
|
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)
ok miod@
|
|
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@
|
|
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.
tests clean on i386, amd64, sparc64, powerpc, and mips64
naming feedback from kettenis@ and millert@
ok kettenis@
|
|
|
|
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.
|
|
Secure-PLT ABI.
|
|
This is primed with the current list of exported symbols so it doesn't
change the ABI yet, but will prevent unintentional additions in the future
and sets the stage for reductions.
ok deraadt@ kettenis@
|
|
part of the ISO C standard and have also been dropped from POSIX.
OK guenther@ kettenis@
|
|
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@
|
|
MI syslog_r/abort version for the time being.
ok miod
|
|
(potentially) MD versions (function dependent, not filename dependent)
split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex
Bring back amd64 .S versions
And the final touch: switch all architectures temporarily to MI
memcpy.c, which contains syslog + abort for overlapping copies. A nice
harsh undefined behaviour. We will clean the entire userland of the
remaining issues in this catagory, then switch to the optimised memcpy
which skips the memmove check.
I tried to cut this change into pieces, but testing each sub-step on
every architecture is too time consuming and mindnumbing.
ok miod
|
|
|
|
last 15 years and there is no point to use it in the future.
From Jean-Philippe Ouellet
|
|
A while back, pascal@ converted our system call stubs from using "cpp
| as" to "cc -x assembler-with-cpp", so there's no need to stay
compatible with ancient preprocessor semantics.
ok miod
|
|
|
|
where appropriate. Among other things makes the symbols consistent
across all architectures (notably where ldbl mantissa is 53 bits).
While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there
to trick lint into recording the right prototypes for aliased
functions. Most of the work done at the awesome n2k13 hackathon.
Agreed by kettenis@, guenther@, matthew@.
|
|
ok guenther millert kettenis
|
|
|
|
|
|
ok miod@
|
|
It turns out <float.h> is the right file to pull in.
ok millert
|
|
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@
|
|
Correct the namespace protections for sigreturn(), sigwait(), and psignal()
ok millert@
|
|
on this historical behavior; so we're stuck in this stupid situation.
No cookie for me.
|
|
them in libc for a very long time. OK guenther@.
|
|
the invalid exception bits, as described in Section 3.3.6.1.1 of
PowerPC Architecture Programming Environments Manual.
A proper way to cause an invalid operation exception is to set
FPSCR[VXSOFT]. Similarly, we clear all the FPSCR[VX*] bits otherwise.
|
|
On mips64, also correct the name called from plain cerror to __cerror.
"looks correct" miod@
|