summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386/sys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r304928:kib2016-09-032-58/+1
| | | | | | | | | | | | | Do not obliterate errno value in the main thread during ptrace(2) call on x86. MFC r304931: Follow ABI when calling __error from the ptrace(2) wrapper. MFC r305012: Rewrite ptrace(2) wrappers in C. MFC r305022: Restore the requirement of setting errno to zero before calling ptrace(2).
* MFC r285240:trasz2016-01-122-46/+1
| | | | | | | Remove reboot.S (part of libc). It's not needed and was actually broken - returning 0 from reboot(2) resulted in SIGBUS. Sponsored by: The FreeBSD Foundation
* libc: Access _logname_valid more efficiently.jilles2013-08-171-8/+1
| | | | | | | | | | | The variable _logname_valid is not exported via the version script; therefore, change C and i386/amd64 assembler code to remove indirection (which allowed interposition). This makes the code slightly smaller and faster. Also, remove #define PIC_GOT from i386/amd64 in !PIC mode. Without PIC, there is no place containing the address of each variable, so there is no possible definition for PIC_GOT.
* Rework the __vdso_* symbols attributes to only make the symbols weak,kib2013-01-301-0/+10
| | | | | | | | | | but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
* libc/i386: Do not export .cerror.jilles2012-09-058-32/+12
| | | | | | | | | | | | | | | | | | | | | | | For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden. Not exporting .cerror causes it to be jumped to directly instead of via the PLT. This change also takes advantage of .cerror's new status by not saving and loading %ebx before jumping to it. (Therefore, .cerror now saves and loads %ebx itself.) Where there was a conditional jump to a jump to .cerror, the conditional jump has been changed to jump to .cerror directly (many modern CPUs don't do static prediction and in any case it is not much of a benefit anyway). This change makes libc.so.7 a few kilobytes smaller. Reviewed by: kib
* Use struct vdso_timehands data to implement fast gettimeofday(2) andkib2012-06-222-1/+52
| | | | | | | | | | | | | | | clock_gettime(2) functions if supported. The speedup seen in microbenchmarks is in range 4x-7x depending on the hardware. Only amd64 and i386 architectures are supported. Libc uses rdtsc and kernel data to calculate current time, if enabled by kernel. Hopefully, this code is going to migrate into vdso in some future. Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
* mdoc: sort prologue macros.joel2012-03-263-3/+3
|
* Add section .note.GNU-stack for assembly files used by 386 and amd64.kib2011-01-0712-0/+23
|
* Unconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(),kib2009-04-011-4/+3
| | | | | | | i386_get_ldt() and i386_set_ldt(). In collaboration with: pho Reviewed by: jhb
* On i386, the primary function that SYSCALL() generates is with thepeter2008-11-153-3/+3
| | | | | __sys_ prefix. Make END() match. This didn't cause a compile error, but the function size is attached to the .weak symbol, not the real one.
* Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.ed2008-11-091-2/+1
| | | | | | | | | | | | | | | | | | | | | Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4. Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname(). I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality. Reviewed by: rdivacky, kib
* Add missing END() macros, as per rev 184547 for amd64. The lack of thesepeter2008-11-0210-0/+11
| | | | is mostly harmless, but it does upset some of valgrind's functionality.
* Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudopeter2007-07-041-3/+5
| | | | | | | | | | syscalls, unless WITHOUT_SYSCALL_COMPAT is defined. The default case will have the .c wrappers still. If you define WITHOUT_SYSCALL_COMPAT, the .c wrappers will go away and libc will make direct syscalls. After 7-stable starts, the direct syscall method will be default. Approved by: re (kensmith)
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-0912-48/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Forgot to bump the document date.ru2006-10-131-1/+1
|
* Some word smithing adopted from the PR.ru2006-10-131-14/+14
| | | | | | | PR: docs/54451 Originally by: Andreas Fuchs Adopted by: jhb MFC after: 3 days
* Markup fixes.ru2006-09-171-6/+6
|
* A few minor wording changes and a clarification about error conditions.bsd2006-05-031-10/+10
|
* Provide stub functions for i386_set_ldt() and i386_get_ldt() even whenpeter2005-04-261-3/+4
| | | | | compiling as an amd64 support binary. They will return EINVAL on an amd64 kernel, but this simplifies other #ifdefs that were getting a bit nasty.
* No longer use _amd64_set_gsbase(). Use i386_set_gsbase() even whenpeter2005-04-265-165/+1
| | | | building for amd64.
* Add stubs for the %fs/%gs base management calls.peter2005-04-145-0/+149
|
* Fix strict-alias warnings by removing excessive (and wrong) casts.peter2005-04-072-2/+2
|
* When building the custom i386 libraries for use on amd64 kernels, wepeter2004-11-065-0/+166
| | | | | | | | | can't use the i386_set_ldt() family of routines, because they are not implemented. Instead, use the recently exposed direct access sysarch routines for setting what %fs and %gs point to. Use this for the i386 TLS _set_tp() routine, but only when compiling to run as a 32 bit support binary for amd64 kernels.
* Mechanically kill hard sentence breaks.ru2004-07-022-6/+12
|
* Removed trailing whitespace.ru2004-07-021-10/+10
|
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mnectar2004-01-095-15/+5
| | | | | | | | | | at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* Make getcontext(2) work on i386. It needs a small wrapper in libcpeter2003-09-042-2/+52
| | | | | | | | | | | | | | | | | | | | | | | otherwise the return from the syscall stub for getcontext will pop off the return value for the caller to the getcontext stub and it will appear as though the setcontext() syscall returned instead of the getcontext(). The same bug exists on amd64, a fix is coming there too. The bug can be demonstrated with this test code fragment: main() { ucontext_t top; if (getcontext(&top) == 0) { write(2, "PING!\n", 6); /* Cause a return value of 1 from getcontext this time */ top.uc_mcontext.mc_eax = 1; setcontext(&top); err(1, "setcontext() returned"); } write(2, "PONG!\n", 6); _exit(0); }
* Add the mlockall() and munlockall() system calls.bms2003-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - All those diffs to syscalls.master for each architecture *are* necessary. This needed clarification; the stub code generation for mlockall() was disabled, which would prevent applications from linking to this API (suggested by mux) - Giant has been quoshed. It is no longer held by the code, as the required locking has been pushed down within vm_map.c. - Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES to express their intention explicitly. - Inspected at the vmstat, top and vm pager sysctl stats level. Paging-in activity is occurring correctly, using a test harness. - The RES size for a process may appear to be greater than its SIZE. This is believed to be due to mappings of the same shared library page being wired twice. Further exploration is needed. - Believed to back out of allocations and locks correctly (tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC). PR: kern/43426, standards/54223 Reviewed by: jake, alc Approved by: jake (mentor) MFC after: 2 weeks
* Allow foot shooting as Linux emulation needs it.julian2003-08-041-1/+2
| | | | | | | | | Also change "Auto mode" to use a "special" value instead of 0, and define and document it. I had thought libpthread had already been switched to use auto mode but it appears that patch hasn't been committed yet. Discussed with: Davidxu
* Update manual for i386_set_ldt to reflect newly added features.davidxu2003-07-311-0/+34
| | | | Submitted by: julian
* Remove stale reference to the deprecated USER_LDT option. The associatedjhb2003-06-091-4/+0
| | | | | | | code is always compiled into the kernel now. Submitted by: Hubert Tournier <hubert@frbsd.org> PR: docs/53068
* Assorted mdoc(7) fixes.ru2003-05-221-6/+9
| | | | Approved by: re (blanket)
* Fixed troff(1) and mdoc(7) warnings.ru2003-05-181-1/+1
| | | | Approved by: re (blanket)
* Document VM86_INTCALL.mdodd2003-04-291-4/+35
| | | | Submitted by: Bruce M Simpson
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-165-0/+10
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* english(4) police.schweikh2002-12-271-1/+1
|
* mdoc(7) police: "The .Fa argument.".ru2002-12-193-3/+15
|
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.ru2002-12-181-1/+1
|
* mdoc(7) police: "The .Fn function".ru2002-12-181-0/+8
|
* mdoc(7) police: "The .Fn system call".ru2002-12-183-0/+18
|
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-2/+0
|
* track gratuitous change to sys/i386/include/reg.hsam2002-10-212-4/+4
|
* Use '_end' symbol instead of 'end' to initialize minbrk and curbrkkan2002-08-081-3/+3
| | | | | | | | | | | | | variables. Both symbols are set to the same value by the linker, and _end symbol has less chances to clash with application defined global symbols. alpha, ia64 and sparc64 ports already use _end, i386 is now consistent with them. Reviewed by: bde Approved by: obrien Reported by: pirzyk
* Generate the normal asm stubs for all sysv system calls. Use these insteadjake2002-05-231-5/+3
| | | | | | | of C wrappers for the *sys indirect system calls. The indirect system calls are horribly broken on sparc64. Submitted by: tmm
* Restore CSRG ID's lost in January 1995.obrien2002-03-2311-44/+55
|
* Fix the style of the SCM ID's.obrien2002-03-227-32/+14
| | | | I believe have made all of libc .c's as consistent as possible.
* Use 'mov' instead of 'lea' for setting the syscall number in %eax as thatjhb2001-11-275-7/+7
| | | | | | is clearer about what we are actually doing. Requested by: bde
* Cleanups after previous change:jhb2001-11-131-9/+2
| | | | | | | | | | | - Renumber labels since the previous revision removed one. - Remove useless and wrong comment. - Repeating the function name is just redundant. - The previous revision made the comment about %edx useless. - The comment about %eax was wrong (but did explain why %eax used to be fixed up). Submitted by: bde
* The kernel already fixes up %eax for parents that return from fork, sojhb2001-11-134-104/+2
| | | | | don't bother manually fixing up %eax for the parent process by testing the value in %edx and zeroing and already zeroed %eax.
OpenPOWER on IntegriCloud