History log of /dragonfly/lib/libc/x86_64/sys/getcontext.S (Results 1 – 4 of 4)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2
# bc27e030 25-Dec-2015 Matthew Dillon <dillon@apollo.backplane.com>

libc - fix getcontext bug from last commit

* getcontext() should not save the FP state (which is all scratch),
and was already setting the flags to indicate such, but still calling
the xsave ins

libc - fix getcontext bug from last commit

* getcontext() should not save the FP state (which is all scratch),
and was already setting the flags to indicate such, but still calling
the xsave instruction.

Remove the xsave instruction, fixing issues on numerous computers.

* Note that setcontext() will properly restore the FP state if the context
contains valid FP state (i.e. the ucontext was taken from a signal handler
argument).

Reported-by: YRabbit

show more ...


# 63261abb 21-Dec-2015 Matthew Dillon <dillon@apollo.backplane.com>

libc - Fix bugs in getcontext(), setcontext(), and swapcontext()

* Fix multiple bugs revealed by qemu's use of these functions. Most of
these fixes are accomplished by calling sigreturn(uctx) to

libc - Fix bugs in getcontext(), setcontext(), and swapcontext()

* Fix multiple bugs revealed by qemu's use of these functions. Most of
these fixes are accomplished by calling sigreturn(uctx) to restore the
state instead of trying to roll our own in userland. This won't be much
slower (if at all) because we had to save and restore the signal state
in the userland code anyway, so we could not avoid making at least one
system call.

Using sigreturn() handles the signal mask atomicy for us so we don't have
to deal with it and fixes numerous other issues. Along with this change,
adjust getcontext() and makecontext() to fill out additional important
fields in the ucontext that sigreturn() inspects.

* Fixes two stack corruption bugs. First, getcontext() was calling
get_mcontext() and get_mcontext() was setting up the setcontext return
state to return 1 ... from get_mcontext(), NOT from getcontext(). If
normal operations or signals mess with the stack, the double return
will not work. Oops.

Secondly, getcontext scribbled over the red-zone in a way that is not
permitted.

* setcontext() was restoring the context as saved by makecontext() or
getcontext(), but setcontext() can also be called with the ucontext
from the signal handler which requires a full restore. setcontext()
was not restoring FPU or scratch registers or rflags.

* Fixes signal restoration bug and corruption that can mess up emulation
in qemu.

* Fixes issues with qemu related to SMP startup and lack of preemption.

Reported-by: ivadasz

show more ...


Revision tags: v4.4.1, v4.4.0, v4.5.0, v4.4.0rc
# 8b927cb7 05-Sep-2015 John Marino <draco@marino.st>

libc/x86-64: Add GNU-stack ELF notes to many assembly files

Most of the assembly files in libc/x86-64 were missing GNU-stack ELF
notes (they never had them) which means libc and every program that
l

libc/x86-64: Add GNU-stack ELF notes to many assembly files

Most of the assembly files in libc/x86-64 were missing GNU-stack ELF
notes (they never had them) which means libc and every program that
links with it has required an executable stack. I need to determine
a way to check which object files are missing this section and make
sure every single libc object file is covered.

show more ...


Revision tags: v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1
# 1b773b6e 25-Jan-2012 Markus Pfeiffer <markus.pfeiffer@morphism.de>

libc: add getcontext, setcontext, makecontext and swapcontext on x86_64

The *context functions are not part of the POSIX standard anymore, but
are still used by quite some packages.