Home | History | Annotate | only in /src/lib/libc/arch/x86_64/sys
History log of /src/lib/libc/arch/x86_64/sys
RevisionDateAuthorComments
 1.4 11-Mar-2006  christos remove files moved to the new compat layout.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 03-Jun-2002  fvdl Use the syscall insn for system calls. Fix up some assembly to
remove either previously made errors, or to account for the
fact that syscall clobbers %ecx.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.6 03-May-2025  riastradh libc/x86_64: Omit needless __PIC__ conditionals.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.5 22-May-2014  uebayasi branches: 1.5.36;
Put missing END() markers to set ELF symbol size.
 1.4 12-Sep-2013  joerg branches: 1.4.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.3 18-Nov-2011  joerg branches: 1.3.6;
Exploit hidden __cerror
 1.2 06-Jun-2002  fvdl branches: 1.2.56;
Fix the EINVAL return path.
 1.1 03-Jun-2002  fvdl Add clone(2) implementation.
 1.2.56.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.56.1 17-Apr-2012  yamt sync with head
 1.3.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 10-Aug-2014  tls Rebase.
 1.5.36.1 02-Aug-2025  perseant Sync with HEAD
 1.2 11-Mar-2006  christos remove files moved to the new compat layout.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.12 26-Oct-2021  christos Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
 1.11 14-May-2014  uebayasi Whitespace.
 1.10 28-Apr-2008  martin branches: 1.10.8; 1.10.28; 1.10.40;
Remove clause 3 and 4 from TNF licenses
 1.9 19-Feb-2006  christos branches: 1.9.18;
make these consistent.
 1.8 12-Jun-2005  lukem Add missing __RCSID()
 1.7 25-Mar-2004  drochner kill sigcontext passing to signal handlers, we don't have to worry
about compatibility
 1.6 23-Mar-2004  drochner save errno while trying to install a !SA_SIGINFO trampoline -- this
is expected to fail with !COMPAT_16 kernels, and we shouldn't
overwrite errno in this case
 1.5 18-Oct-2003  briggs Need a couple more headers for the last change.
 1.4 18-Oct-2003  briggs Sync with the i386 version.
 1.3 06-Oct-2003  fvdl Userland amd64 siginfo support.
 1.2 30-Jan-2003  fvdl Add ucontext glue for x86_64.
 1.1 09-Jul-2002  thorpej New __sigaction14() system call stub which registers the signal
trampoline, and the signal trampolines themselves.

NOTE: These are not yet enabled; they will be enabled after further
testing on more architectures.
 1.9.18.1 18-May-2008  yamt sync with head.
 1.10.40.1 10-Aug-2014  tls Rebase.
 1.10.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.10.8.1 28-Apr-2008  martin file __sigaction14_sigtramp.c was added on branch christos-time_t on 2008-04-28 20:22:59 +0000
 1.4 11-Mar-2006  christos remove files moved to the new compat layout.
 1.3 26-Mar-2004  drochner disembowel -- there is no kernel support anyway
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.5 25-Mar-2004  drochner kill sigcontext passing to signal handlers, we don't have to worry
about compatibility
 1.4 15-Mar-2003  fvdl No need to use movq for the small immediate values here, they'll be
zero-extended with movl.
 1.3 13-Dec-2002  fvdl The fast syscall path clobbers 2 registers. Which is fine for a plain
system call, as long as the stub knows about it. However, it's bad
for sigreturn. Hence, use the old entry point for sigreturn. XXX
 1.2 14-Jul-2002  fvdl Remove fs and gs kludge.
 1.1 09-Jul-2002  thorpej New __sigaction14() system call stub which registers the signal
trampoline, and the signal trampolines themselves.

NOTE: These are not yet enabled; they will be enabled after further
testing on more architectures.
 1.9 19-Oct-2020  kamil Restore RSP from mcontext

Fixes unwinding of multiple frames without base pointer.

Patch by: Nikhil Benesch via PR lib/55719
 1.8 12-Oct-2020  kamil Decorate the x86_64 signal trampoline with CFI attributes easing unwinding

Combine the approach provided by Nikhil Benesch and Andrew Cagney.

Now, the unwinders (in gccgo, backtrace(3), etc) can unwind properly
the stack from a signal handler.

Fixes lib/55719 by Nikhil Benesch
 1.7 02-Dec-2019  christos Add cfi annotations so that gdb can unwind the stack through signal handlers.
 1.6 22-May-2014  uebayasi branches: 1.6.24;
Put missing END() markers to set ELF symbol size.
 1.5 08-Nov-2006  drochner branches: 1.5.48; 1.5.60;
if setcontext(2) returns, _exit(2) with a return code of -1 instead
of relying on a sensible return value
 1.4 23-Mar-2004  drochner replace the last occurence of an "int 0x80" syscall
 1.3 18-Oct-2003  fvdl Use the int 0x80 path for context system calls.
 1.2 17-Oct-2003  fvdl Get ucontext pointer back out of callee-saved register %r15.
 1.1 06-Oct-2003  fvdl Userland amd64 siginfo support.
 1.5.60.1 10-Aug-2014  tls Rebase.
 1.5.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.24.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.5 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.4 18-Nov-2011  joerg branches: 1.4.6; 1.4.16;
Exploit hidden __cerror
 1.3 07-Aug-2003  agc branches: 1.3.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 03-Jun-2002  fvdl Use the syscall insn for system calls. Fix up some assembly to
remove either previously made errors, or to account for the
fact that syscall clobbers %ecx.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3.56.1 17-Apr-2012  yamt sync with head
 1.4.16.1 10-Aug-2014  tls Rebase.
 1.4.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.5 12-Sep-2013  joerg branches: 1.5.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.4 18-Nov-2011  joerg branches: 1.4.6;
Exploit hidden __cerror
 1.3 07-Aug-2003  agc branches: 1.3.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 03-Jun-2002  fvdl Use the syscall insn for system calls. Fix up some assembly to
remove either previously made errors, or to account for the
fact that syscall clobbers %ecx.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3.56.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.56.1 17-Apr-2012  yamt sync with head
 1.4.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.8 03-May-2025  riastradh libc/x86_64: Omit needless __PIC__ conditionals.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.7 22-May-2014  uebayasi branches: 1.7.36;
Put missing END() markers to set ELF symbol size.
 1.6 12-Sep-2013  joerg branches: 1.6.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.5 27-Feb-2012  joerg branches: 1.5.2;
Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.
 1.4 18-Nov-2011  joerg branches: 1.4.2;
Explicitly mark __cerror as hidden
 1.3 07-Aug-2003  agc branches: 1.3.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 03-Jun-2002  fvdl Use the syscall insn for system calls. Fix up some assembly to
remove either previously made errors, or to account for the
fact that syscall clobbers %ecx.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3.56.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.56.1 17-Apr-2012  yamt sync with head
 1.4.2.1 27-Feb-2012  riz Pull up following revision(s) (requested by joerg in ticket #57):
lib/libc/arch/arm/sys/cerror.S: revision 1.8
lib/libc/arch/vax/SYS.h: revision 1.12
lib/libc/arch/powerpc64/sys/cerror.S: revision 1.3
lib/libc/arch/powerpc64/sys/cerror.S: revision 1.4
lib/libc/arch/i386/sys/cerror.S: revision 1.16
lib/libc/arch/x86_64/sys/cerror.S: revision 1.5
lib/libc/arch/powerpc/sys/cerror.S: revision 1.10
lib/libc/arch/mips/sys/cerror.S: revision 1.17
lib/libc/arch/powerpc/sys/cerror.S: revision 1.9
Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.
PowerPC doesn't have CERROR since it never had a.out.
Use _C_LABEL(__cerror) instead.
 1.5.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.7.36.1 02-Aug-2025  perseant Sync with HEAD
 1.5 07-Feb-2017  kamil Mark exect(3) obsolete and bind it to plain execve(2) on all platforms

The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
- exect(2) traces (single-steps) libc and it requires hundreds or
thousands steps before entering a new image
- it's vax and x86 specific code
- this functionality has been moved to the kernel - once a process is
traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
its debugger
- the side effects and unportability make this interface unusable
- there are no known users of this interface
- it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>
 1.4 22-May-2014  uebayasi branches: 1.4.6; 1.4.10;
Put missing END() markers to set ELF symbol size.
 1.3 18-Nov-2011  joerg branches: 1.3.6; 1.3.16;
Exploit hidden __cerror
 1.2 07-Aug-2003  agc branches: 1.2.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.2.56.1 17-Apr-2012  yamt sync with head
 1.3.16.1 10-Aug-2014  tls Rebase.
 1.3.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.10.1 21-Apr-2017  bouyer Sync with HEAD
 1.4.6.1 20-Mar-2017  pgoyette Sync with HEAD
 1.4 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.3 07-Aug-2003  agc branches: 1.3.62; 1.3.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 13-Feb-2003  nathanw Implement pthread_atfork() (in libc, because the required threadlib
stub behavior is exactly the same as the usual behavior).
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3.74.1 10-Aug-2014  tls Rebase.
 1.3.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.3 09-Mar-2004  drochner branches: 1.3.62; 1.3.74;
Really, there is no need to use the old int0x80 syscall entry just for
getcontext(). There are some registers not properly saved with the
new syscall entry, but these are calee-saved, scratch or meaningless.
It's the setcontext() return path what matters.
 1.2 18-Oct-2003  fvdl Use the int 0x80 path for context system calls.
 1.1 30-Jan-2003  fvdl Add ucontext glue for x86_64.
 1.3.74.1 10-Aug-2014  tls Rebase.
 1.3.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 11-Mar-2006  christos remove files moved to the new compat layout.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.2 07-Aug-2003  agc branches: 1.2.62; 1.2.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.2.74.1 10-Aug-2014  tls Rebase.
 1.2.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8 03-May-2025  riastradh libc/x86_64: Omit needless __PIC__ conditionals.

PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
 1.7 19-Mar-2016  christos branches: 1.7.28;
Save and restore all the registers we need instead of playing tricks and
"knowing" which registers the compiler clobbers. gcc-5.3 clobbers both
rcx and rdx...
 1.6 24-Nov-2014  christos Fix ptrace %rcx corruption when pthread_errno() is used. Small example:
#include <sys/types.h>
#include <stdio.h>
#include <sys/ptrace.h>
int main(void) { ptrace(18, getpid(), NULL, 0xabcd); }
The -lpthread cases pases 0 instead of 0xabcd
 1.5 22-May-2014  uebayasi branches: 1.5.2;
Put missing END() markers to set ELF symbol size.
 1.4 12-Sep-2013  joerg branches: 1.4.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.3 18-Nov-2011  joerg branches: 1.3.6;
Exploit hidden __cerror
 1.2 07-Aug-2003  agc branches: 1.2.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.2.56.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.56.1 17-Apr-2012  yamt sync with head
 1.3.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 10-Aug-2014  tls Rebase.
 1.5.2.1 25-Nov-2014  martin Pull up following revision(s) (requested by christos in ticket #263):
lib/libc/arch/x86_64/sys/ptrace.S: revision 1.6
Fix ptrace %rcx corruption when pthread_errno() is used. Small example:
#include <sys/types.h>
#include <stdio.h>
#include <sys/ptrace.h>
int main(void) { ptrace(18, getpid(), NULL, 0xabcd); }
The -lpthread cases pases 0 instead of 0xabcd
 1.7.28.1 02-Aug-2025  perseant Sync with HEAD
 1.6 22-May-2014  uebayasi Put missing END() markers to set ELF symbol size.
 1.5 12-Sep-2013  joerg branches: 1.5.2;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.4 18-Nov-2011  joerg branches: 1.4.6;
Exploit hidden __cerror
 1.3 02-Jul-2008  rmind branches: 1.3.2; 1.3.6;
Avoid calling a syscall when argument to sbrk(2) is zero.
OK by <ad>.
 1.2 07-Aug-2003  agc branches: 1.2.32;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.2.32.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.6.2 02-Jul-2008  rmind Avoid calling a syscall when argument to sbrk(2) is zero.
OK by <ad>.
 1.3.6.1 02-Jul-2008  rmind file sbrk.S was added on branch christos-time_t on 2008-07-02 20:07:44 +0000
 1.3.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.4.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 10-Aug-2014  tls Rebase.
 1.2 18-Jan-2003  thorpej These files are obsolete; setlogin() is now implemented in C with a
small syscall stub.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.2 11-Mar-2006  christos remove files moved to the new compat layout.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.2 11-Mar-2006  christos remove files moved to the new compat layout.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3 11-Mar-2006  christos remove files moved to the new compat layout.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3 11-Mar-2006  christos remove files moved to the new compat layout.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.4 11-Mar-2006  christos remove files moved to the new compat layout.
 1.3 26-Mar-2004  drochner disembowel -- there is no kernel support anyway
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3 11-Mar-2006  christos remove files moved to the new compat layout.
 1.2 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.5 18-Apr-2020  thorpej Rename "syscall" to "_syscall" and provide "syscall" as a weak alias.
 1.4 05-Nov-2007  dsl branches: 1.4.72;
syscall() has to be implemented in the kernel - so is a normal system call here.This has always been broken, so I suspect everything is using __syscall().
 1.3 07-Aug-2003  agc branches: 1.3.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.2 03-Jun-2002  fvdl Use the syscall insn for system calls. Fix up some assembly to
remove either previously made errors, or to account for the
fact that syscall clobbers %ecx.
 1.1 19-Jun-2001  fvdl Initial commit of x86-64 specific parts of libc.
 1.3.22.1 06-Nov-2007  matt sync with HEAD
 1.4.72.1 21-Apr-2020  martin Sync with HEAD

RSS XML Feed