| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
("permanently undefined")
ok deraadt@ kettenis@
|
|
|
|
|
| |
Put a hard-trap instruction after the syscall instruction.
ok kettenis mortimer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
|
|
|
|
|
|
|
|
|
| |
problems as 64-bit models. To resolve the syscall speculation, as a first
step "nop; nop" was added after all occurances of the syscall ("swi 0")
instruction. Then the kernel was changed to jump over the 2 extra instructions.
In this final step, those pair of nops are converted into the speculation-blocking
sequence ("dsb nsh; isb").
Don't try to build through these multiple steps, use a snapshot instead.
Packages matching the new ABI will be out in a while...
ok kettenis
|
|
|
|
|
|
| |
problems as 64-bit models. For the syscall instruction issue, add nop;nop
after swi 0, in preparation for jumping over a speculation barrier here later.
ok kettenis
|
|
|
|
|
|
|
|
|
| |
as well as those in arch/arm/gen/divsi3.S. This cleans up the PLTs on the
32bit archs.
luna88k testing by aoyama@
"looks good" kettenis@, testing and ok deraadt@
|
|
|
|
|
|
|
| |
by the ASM stub, which is also in libc. The compiler only generates
invocations of the latter.
ok mpi@ deraadt@ kettenis@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
| |
so passing "nan" and "-nan" produces a NaN with the right sign.
Bug reported and diff provided by George Koehler.
ok kettenis@
|
|
|
|
|
|
| |
take care of this.
ok visa@, mpi@
|
|
|
|
|
|
|
|
|
|
| |
both the hardfloat (FPU registers) and softfloat (software) state. This
makes these functions work correctly when mixing hardfloat and softfloat
code. Disable trapping for softfloat since most (if not all) ARMv7 and
ARMv8 hardware that is on the market doesn't support trapping of
floating-point exceptions.
ok patrick@
|
|
|
|
|
|
|
|
|
| |
since ARMv5. Should be much faster but more importantly it removes the
data table from .text which could introduce unwanted ROP gadgets.
Based on changes in Android/Bionic by Elliott Hughes.
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
| |
The error was:
--8<--
ffs.S:57:2: error: unsupported relocation on symbol
adrne r2, .L_ffs_table
^
-->8--
Minimal workaround suggested by deraadt@, ok guenther@ kettenis@
|
|
|
|
|
|
|
| |
dance, mark it protected. This works better for both gcc and clang: gcc
blocks overriding of internal calls, while clang permits inlining again.
ok otto@
|
|
|
|
|
|
| |
bump.
"just go ahead -- crank" deraadt@
|
|
|
|
|
|
| |
in libc.
ok patrick@, jsg@, guenther@
|
|
|
|
| |
Slightly tweaked diff from guenther@
|
|
|
|
|
|
|
|
|
| |
to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when
building with clang, instead mark those as protected visibility to get rid
of the PLT relocations. We can't take the address of them then, but that's
ok: it's a build-time error not a run-time error.
ok kettenis@
|
|
|
|
|
|
| |
and the resulting byte-alignment triggers unaligned access.
ok patrick@, deraadt@
|
|
|
|
| |
ok kettenis@ deraadt@
|
|
|
|
|
|
|
|
|
| |
unneeded linker-generated symbols and libgcc symbols that are accidentally
re-exported.
Riding the upcoming libc major bump.
ok guenther@
|
|
|
|
|
|
|
| |
from libpthread to libc. No changes to the build yet, just making it
easier to review the substantive diffs.
ok beck@ kettenis@ tedu@
|
|
|
|
|
|
|
| |
of indirecting through __errno().
Register naming tweaks and clang testing by patrick@ and jsg@
ok kettenis@
|
|
|
|
| |
ok jsg@
|
|
|
|
| |
fix suggested by and ok guenther@
|
|
|
|
|
|
| |
Makes exceptions work in C++ code work again om armv7.
ok guenther@
|
|
|
|
|
|
|
| |
Switch from calling obsolete sig{block,setmask} to directly using the
sigprocmask syscall.
ok deraadt@ kettenis@
|
|
|
|
|
|
|
| |
Eliminate pointless use of PIC_SYM()
Split out DEFS.h from SYS.h like some other archs
ok kettenis@ deraadt@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
|
| |
longjmp performs can't really be relied upon, even after we got rid of the
false positives...
ok millert@ deraadt@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok miod@ jsg@
|
|
|
|
|
| |
CFLAGS.
ok guenther@
|
|
|
|
|
|
|
| |
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)
ok miod@
|
|
|
|
|
|
|
|
|
|
| |
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.
alpha, arm, m88k, sh, sparc, and vax assistance miod@
hppa assistance kettenis@
ok deraadt@ miod@
|
|
|
|
| |
ok guenther
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
While binutils supports both "unified" and "divided" syntax (defaulting
to divided) the integrated assembler in clang only supports unified names
so switch some files to unified syntax. Similiar changes were made in
bitrig and freebsd. No difference in objdump -d output.
tested on zaurus by deraadt@, ok miod@
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
unused for around 8 years, when the kernel ABI was changed to use the
syscall number specified in r12.
ok miod@ jsg@
|
|
|
|
|
|
|
| |
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@
|