summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/amd64/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* SYS___threxit cannot fail, but this integration looks like a gadget.deraadt2020-10-181-1/+2
| | | | | Put a hard-trap instruction after the syscall instruction. ok kettenis mortimer
* Mark top-level frame for new thread in both CFI and with zeroguenther2020-10-011-1/+9
| | | | | | framepointer, so gdb knows to stop. Inspired by glibc ok kettenis@
* Apply retpoline protection to the indirect call to the thread startfuncguenther2019-05-101-2/+7
| | | | ok mortimer@
* Remove FBSDID.kevlo2019-03-151-4/+1
| | | | ok deraadt@
* Don't need .text before ENTRY(), also minor spacing cleanupsderaadt2017-08-192-7/+6
|
* Clang ignores a .weak directive before a function is actually defined. Sokettenis2016-09-102-4/+4
| | | | | | | move it from before ENTRY() to after END(). Keeps brk(2) and sbrk(2) weak when comping libc with clang. ok guenther@
* Remove sigreturn declaration and the now-unused libc syscall stubguenther2016-05-091-57/+0
|
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-079-187/+25
| | | | | | | | | | | | | | | | | 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@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-231-3/+3
| | | | | | | | | 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@
* Rename SYSEXIT() to SYSCALL_END() for consistency with most other archs.guenther2015-10-174-8/+8
| | | | | | No change in resulting object files ok millert@
* Adds hidden _libc_FOO aliases for the system call stubs.guenther2015-09-056-30/+32
| | | | | | | | 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@
* Hide many (194!) symbols that nothing should be using.guenther2015-08-263-71/+11
| | | | | | | Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
* Set FUNC symbol sizes of auto-generated and hand-written syscall wrappers.uebayasi2015-06-179-9/+18
| | | | | | Original diff from guenther@, adjusted by me. OK guenther@
* Put END() matching _ENTRY() (== ENTRY() w/o prof).uebayasi2015-06-011-1/+2
|
* Put END() matching ENTRY().uebayasi2015-06-011-1/+2
|
* Eliminate the last uses of *fork's second syscall return register; the pidguenther2015-04-211-3/+3
| | | | | | is zero in the child ok deraadt@ miod@
* Make pthread_atfork() track the DSO that called it like atexit() does,guenther2015-04-071-2/+3
| | | | | | | | | | 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@
* Simplify fork/vfork logic: the kernel has handled returning zero in the childguenther2015-03-312-15/+3
| | | | | | | 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@
* Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccpascal2012-08-229-18/+18
| | | | | | | invocations. This allows us to use the compiler builtin define __PIC__ to check for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot. ok matthew@, conceptually ok kurt@
* __tfork() needs to set the stack address of the new thread in the kernel,guenther2012-06-211-5/+4
| | | | | | | | | 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@
* remove rfork(); ok guenther miodderaadt2012-04-121-44/+0
|
* Move __tfork_thread() from rthreads (libpthread) to libc so thatguenther2012-03-221-0/+94
| | | | | | it can be used for not-strictly-threading purposes ok matthew@ kurt@
* Switch sigreturn() to the normal syscall entry instead of int$80.guenther2011-09-051-2/+2
| | | | | | This was done for the sigreturn call in sigcode before 5.0. ok deraadt@ for post-5.0
* Move __cerror to ___cerror with a weak alias so that rthreads can override it.guenther2011-04-041-2/+4
| | | | | | On mips64, also correct the name called from plain cerror to __cerror. "looks correct" miod@
* The int (32bit) argument must be sign extended on the 64 bit amd64 beforedrahn2006-05-091-3/+5
| | | | the add. ok miod@, toby@. olrite mickey@
* Remove the advertising clause in the UCB license which Berkeleyjsg2005-12-1311-66/+22
| | | | | rescinded 22 July 1999. Checked by ian@ and deraadt@
* Define OSYSCALL* macros, as their SYSCALL* counterparts, but using themiod2004-02-221-2/+2
| | | | | | | | | int 0x80 mechanism; and use OSYSCALL for sigreturn() as done in the sigcode. Naming borrowed from NetBSD. ok deraadt@
* errno is int, not long; tracked down by otto@miod2004-02-181-4/+4
| | | | ok deraadt@
* correct syscall() stub; fixes perl and vi.recoverderaadt2004-02-111-2/+3
|
* Fix PIC cerror. ok miod@ mickey@drahn2004-02-101-2/+3
|
* CURBRK -> __curbrk changes from mickey, minbrk addition by me, ok mickey@drahn2004-02-102-12/+14
|
* masks are only 32 bits on openbsdderaadt2004-02-091-2/+2
|
* things for amd64; from art@mickey2004-01-2812-0/+735