summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed troff(1) and mdoc(7) warnings.ru2003-05-184-5/+6
| | | | Approved by: re (blanket)
* Fix a simple bug that prevents svc_tli_create to bind to the addressmbr2003-05-181-1/+1
| | | | | | | | | | specified by caller. NetBSD rev. 1.6 Reviewed by: rwatson Approved by: rwatson (re) Obtained from: NetBSD
* Revamp of the syscall path, exception and context handling. Themarcel2003-05-163-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prime objectives are: o Implement a syscall path based on the epc inststruction (see sys/ia64/ia64/syscall.s). o Revisit the places were we need to save and restore registers and define those contexts in terms of the register sets (see sys/ia64/include/_regset.h). Secundairy objectives: o Remove the requirement to use contigmalloc for kernel stacks. o Better handling of the high FP registers for SMP systems. o Switch to the new cpu_switch() and cpu_throw() semantics. o Add a good unwinder to reconstruct contexts for the rare cases we need to (see sys/contrib/ia64/libuwx) Many files are affected by this change. Functionally it boils down to: o The EPC syscall doesn't preserve registers it does not need to preserve and places the arguments differently on the stack. This affects libc and truss. o The address of the kernel page directory (kptdir) had to be unstaticized for use by the nested TLB fault handler. The name has been changed to ia64_kptdir to avoid conflicts. The renaming affects libkvm. o The trapframe only contains the special registers and the scratch registers. For syscalls using the EPC syscall path no scratch registers are saved. This affects all places where the trapframe is accessed. Most notably the unaligned access handler, the signal delivery code and the debugger. o Context switching only partly saves the special registers and the preserved registers. This affects cpu_switch() and triggered the move to the new semantics, which additionally affects cpu_throw(). o The high FP registers are either in the PCB or on some CPU. context switching for them is done lazily. This affects trap(). o The mcontext has room for all registers, but not all of them have to be defined in all cases. This mostly affects signal delivery code now. The *context syscalls are as of yet still unimplemented. Many details went into the removal of the requirement to use contigmalloc for kernel stacks. The details are mostly CPU specific and limited to exception_save() and exception_restore(). The few places where we create, destroy or switch stacks were mostly simplified by not having to construct physical addresses and additionally saving the virtual addresses for later use. Besides more efficient context saving and restoring, which of course yields a noticable speedup, this also fixes the dreaded SMP bootup problem as a side-effect. The details of which are still not fully understood. This change includes all the necessary backward compatibility code to have it handle older userland binaries that use the break instruction for syscalls. Support for break-based syscalls has been pessimized in favor of a clean implementation. Due to the overall better performance of the kernel, this will still be notived as an improvement if it's noticed at all. Approved by: re@ (jhb)
* Catch up with the renaming of the "union" filesystem to "unionfs".tjr2003-05-161-1/+1
| | | | | | | Fixes a problem where directory entries could show up twice: once on the top layer of the union stack, and once on the bottom layer. Approved by: re (rwatson)
* * The copy of the stat struct in the man page has rotted, so remove it.dougb2003-05-131-29/+2
| | | | | | | | Those who really need this information can find it in the include file. * Include a succinct description of the st_birthtime field. Approved by: re (bmah)
* Update ldexp.c for amd64.peter2003-05-102-7/+1
|
* Add a comment describing why it's important for the values in thisdas2003-05-086-0/+42
| | | | | | file to be correct, and how to generate them automatically. Caused much pain and suffering for: peter
* SIG_SETMASK is 3, not 1. Sigh.peter2003-05-081-1/+1
|
* Fix an embarresing transcription error from i386 to amd64. Put the argumentspeter2003-05-082-13/+12
| | | | | to sigprocmask(2) int the correct order. *blush*. For sigsetjmp(), match up the pushq/popq in the non-savemask case.
* Tidy up modf.S and make it actually work. It wasn't extractingpeter2003-05-081-16/+13
| | | | | the value out of ST(0) before copying it to %xmm0. Also remove bogus stack frame and work in the red zone.
* Fix typo, even though this is unused.peter2003-05-081-1/+1
|
* Like ia64, amd64 has got a 16 byte sized and aligned 'long double'.peter2003-05-081-1/+2
| | | | Obtained from: re (blanket amd64)
* Turn off alloca.S - it cannot possibly work like this since on AMD64, gccpeter2003-05-071-1/+1
| | | | | | | doesn't use stack frames. It uses offsets relative to %rsp, not %rbp. So we cannot just change %rsp like this. Approved by: re (blanket amd64)
* Actually use the correct values for AMD64. It is a 64 bit platform,peter2003-05-071-0/+4
| | | | configure gdtoa as such.
* Properly cleanup the stack before jumping to cerror() if rfork(2) fails.jhb2003-05-071-0/+4
| | | | | Submitted by: Igor Sysoev <is@rambler-co.ru> Approved by: re (scottl)
* Replace use of a spinlock with a mutex.deischen2003-05-042-12/+9
|
* Use the .Dl macro.trhodes2003-05-011-1/+1
| | | | Discussed with: mdoc(7) officer ru
* State the fact that the range is twice the traditional RAND_MAX.trhodes2003-05-011-1/+16
| | | | | | | Add an EXAMPLES section. PR: 48493 Submitted by: Paul Herman <pherman@frenchfries.net> (original version)
* Back out the `hiding' of strlcpy and strlcat. Several peoplenectar2003-05-0120-71/+51
| | | | vocally objected to this safety belt.
* Convert the i386 alloca(3) to the x86-64 ISA.obrien2003-05-011-0/+53
| | | | Alignment hack from: NetBSD
* Add __amd64__ to the list of things that use IEEEFPpeter2003-04-301-1/+1
|
* Tell malloc.c that AMD64 uses the same pagesize as i386.peter2003-04-301-0/+4
|
* Add __amd64__ to the list of things that use HIDENAME() to hide minbrkpeter2003-04-301-1/+1
|
* Delete i386_* syscall wrappers and manpages. Rename Ovfork.S to vfork.S.peter2003-04-301-12/+2
|
* Update for AMD64 after repocopy from i386/sys/*. This means:peter2003-04-306-105/+35
| | | | | | | - strip out the nasty PIC_PROLOGUE/EPILOGUE stuff, since we dont have to lose a register in PIC mode anymore (we use %rip-relative addressing). - update for C register argument passing conventions. - convert 32 bit to 64 bit register sizes etc.
* I have no idea why the reboot(2) syscall wrapper ends with iret, butpeter2003-04-301-1/+1
| | | | update it to be iretq for completeness.
* Update for AMD64. Depend on %rdi (first syscall argument) being preservedpeter2003-04-301-4/+3
| | | | across a "syscall"-style syscall
* Update for AMD64 (repocopied from i386/sys/Ovfork.S - why is it O?)peter2003-04-301-5/+4
| | | | | Depend on %rsi being preserved across the "syscall"-style syscall and strip out the PIC stuff (this cpu has full PC-relative addressing, at last!)
* Update for AMD64 contexts. Note that this still has some x87-style FPUpeter2003-04-303-105/+112
| | | | | instructions here, these may need to be updated for SSE. (Repocopied from i386/gen)
* Reduce the SRCS to what compilespeter2003-04-301-3/+3
|
* Update for AMD64 (repocopied from i386/net). We can depend on havingpeter2003-04-304-10/+6
| | | | | the bswap instruction (yay!). Update for register parameter passing instead of i386 style stack based param passing.
* Update for AMD64-style syscalls. Repocopied from i386/SYS.h.peter2003-04-301-7/+4
| | | | | | | | | | Note that the syscall instruction clobbers %rcx, which is inconvenient because it is the fourth syscall argument, so we use %r10 (another scratch register) for the 4th syscall arg instead (I picked %r10 to be the same as NetBSD). int 0x80 is still possible though, and it uses %rcx as usual. Note that the syscall style syscall does *NOT* preserve all the registers, unlike int 0x80. We do not preserve the scratch registers except for %rdi and %rsi. int 0x80 does preserve everything but the return values.
* Floating point libc functions traditionally written in ASM.obrien2003-04-302-0/+113
| | | | | | | AMD64 does away with the x87 in 64-bit long mode, so we have to play the SSE/SSE2 game now. Obtained from: NetBSD/x86-64
* Backout my changes in rev. 1.32 and 1.33. There is some code that dependsmtm2003-04-301-4/+2
| | | | | | | on the previous behaviour. This also brings strptime(3) behaviour back in line with the other BSDs. Approved by: markm (mentor)
* `Hide' strlcpy and strlcat (using the namespace.h / __weak_referencenectar2003-04-2920-51/+71
| | | | | | | technique) so that we don't wind up calling into an application's version if the application defines them. Inspired by: qpopper's interfering and buggy version of strlcpy
* Document VM86_INTCALL.mdodd2003-04-291-4/+35
| | | | Submitted by: Bruce M Simpson
* Replace the return value of rfork_thread(3) in its manual pagerobert2003-04-271-1/+1
| | | | | function prototype with `pid_t' to match the declaration in <unistd.h>.
* Correct the return value of vfork(2) and rfork(2) in theirrobert2003-04-272-2/+2
| | | | manual page function prototypes.
* Add some strategic whitespace.rwatson2003-04-261-0/+1
|
* When using `compat' mode, be sure to re-dispatch setpwent, endpwent,nectar2003-04-252-0/+58
| | | | | | | | | | setgrent, and endgrent also. (The previous NSS implementation used to simply twiddle the internal data of the various modules directly.) A symptom (group list set incorrectly in sshd) was Reported by: Glenn Johnson <gjohnson@srrc.ars.usda.gov> Sponsored by: DARPA, Network Associates Laboratories
* In compat mode, we `redispatch' the lookup. It is probably a goodnectar2003-04-241-0/+1
| | | | | | | | idea to re-initialize `struct passwd', because e.g. pw_class might get set by one module, but not by another. Add another call to the internal pwd_init function to accomplish this. Sponsored by: DARPA, Network Associates Laboratories
* Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' bynectar2003-04-241-1/+3
| | | | | | namespace.h. Sponsored by: DARPA, Network Associates Laboratories
* Don't complain about missing NSS methods when built statically. It isnectar2003-04-241-1/+3
| | | | | | annoying and not very useful. Sponsored by: DARPA, Network Associates Laboratories
* Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' bynectar2003-04-242-4/+8
| | | | | | namespace.h. Sponsored by: DARPA, Network Associates Laboratories
* Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' bynectar2003-04-242-3/+3
| | | | | | namespace.h. Sponsored by: DARPA, Network Associates Laboratories
* ``Strong typing is a crutch for people with weak memories.''nectar2003-04-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | Correct a bug that should have wreaked havoc everywhere, but for some reason only bit unlucky people who use `-march' optimizations. The compiler cannot assist one in distinguishing between the two function calls below. int nsdispatch(void *, ...); void *discard; nsdispatch(&discard, ...); /* correct .. no, really! */ nsdispatch(discard, ...); /* Boom */ Robin provided me with a debugging environment in which I could see what was going on. Badness when using CPUTYPE was Reported by: "Robin P. Blanchard" <Robin.Blanchard@gactr.uga.edu> Reported by: nork Sponsored by: DARPA, Network Associates Laboratories
* Correct a bug that was somehow both obvious and hard-to-see. :-)nectar2003-04-211-1/+1
| | | | | | | | | | | | An incorrectly-sized allocation was being made due to an incorrect argument to the `sizeof' operator. Obvious, because it violated the `foo = malloc(sizeof(*foo))' idiom. Hard-to-see, because it was a missing `*' (`*p' versus `**p'). Resulting failure was Reported by: ache Sponsored by: DARPA, Network Associates Laboratories
* Don't try to access the NIS `master' maps unless we have superusernectar2003-04-211-7/+9
| | | | | | | | privileges. To do so may cause the NIS server to log spurious and annoying `access denied' messages. Reported by: Philip Paeps <philip@paeps.cx> Sponsored by: DARPA, Network Associates Laboratories
* Add FILES section to mac.3 and mac.conf.5. Properly Xref mac.conf.5rwatson2003-04-203-1/+22
| | | | | | | from mac.3; likewise, mac.conf.5 from mac_prepare.3. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Add a man page for the mac.conf MAC library configuration file.rwatson2003-04-202-0/+105
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
OpenPOWER on IntegriCloud