summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2006-10-03when using SHA1Data(), no CTX is needed, so zap that line in the exampleAlexander von Gernler
ok jmc@
2006-10-03Last Part of file descriptor race and deadlock corrections.Kurt Miller
When a fd enters the closing state prevent any threads from polling the fd and reschedule the thread with the closing_fd flag set. This fixes a class of deadlocks where a thread is blocked waiting for data (that may never arrive) and a later thread calls close() or dup2() on the fd. okay brad@
2006-10-03upon success dup2() returns newfd so don't overwrite it withKurt Miller
_thread_fd_table_init()'s return value and blow it away. fixes firefox plugin problem noticed by jolan@
2006-10-02Fix off by one comparison. FSMAXTYPES is the last valid index intoKenneth R Westerback
fstypesnames[], but that entry is NULL. The last valid file system name is at fstypesnames[FSMAXTYPES-1]. Encountered and diagnosed by pedro@. ok pedro@ deraadt@
2006-10-01Make a var volatile, which forces a mem write at the right spot, andOtto Moerbeek
detctecion of underflow where it would otherwise not happen for FPUs that have a larger register size than sizeof double (i386, m68k). ok deraadt@ weingart@ kettenis@
2006-09-29powerpc stack needs a bit more headroom; needed because of mmap()edOtto Moerbeek
stacks; report by Antoine Jacoutot; ok kurt@
2006-09-27remove superfluous paranthesisJasper Lievisse Adriaanse
from Matthew R. Dempsky <mrd at alkemio dot org> ok deraadt
2006-09-26Zap D_REMOVABLE flag from disklabel. If you didn't already know thatKenneth R Westerback
floppies and cd's were removable, displaying that fact in disklabel output was unlikely to help. And the display in disklabel was the only use of D_REMOVABLE in the tree. ok marco@
2006-09-26style(9) extra spaceKurt Miller
2006-09-26- Use mmap to allocate thread stacks instead of malloc. This preventsKurt Miller
applications that install their own thread stack red-zones with mprotect PROT_NONE from entering the malloc pool when the pages are freed. - round up requested thread stack size to closest page boundary to simplify the red-zone calculations. okay brad@
2006-09-26Part 2 of file descriptor race and deadlock corrections.Kurt Miller
Adjust design of file descriptor table to eliminate races with both opening and closing of file descriptor entries and eliminates one class of deadlocks. One nice side effect of this change in design should be better performance for applications that open and close many file descriptors due to reduced fd_table_lock contention and fd entry reuse. - Add entry states to manage use of entry and eliminate some closing races. fd entries are not deallocated upon close() now. - Call _thread_fd_table_init with one of five discreet modes to properly initialize an entry and manage the state transition to open. - When closing an entry hold the entry spinlock locked across the state transition and the _thread_sys_close call to close another race. - Introduce a new lock type FD_RDWR_CLOSE that transitions either a closed entry or an open entry into closing state and then waits for a RDWR lock so that the lock queue can unwind normally. All subsequent fd lock attempts for that entry are rejected with EBADF until the fd is fully closed, or reopened by dup2(). Once a thread holds the FD_RDWR_LOCK it is safe to close() it or dup2() on it. - When a thread creates a new fd there is a window of time when another thread could attempt to use the fd before the creating thread has initialized the entry for it. This can result in improper status_flags for the entry, so record the entries init mode, detect when this has happened and correct the status_flags when needed. reviewed by marc@ & brad@, tested by several, okay brad@
2006-09-25Remove unnecessary /* NOTREACHED */ comments because our lint isRay Lai
cool and recognizes __dead, and because shorter examples are clearer. OK otto@.
2006-09-25Include s_llrint.c instead of ithe now removed llrint.c.Mark Kettenis
2006-09-25Move llrint.c, llrintf.c, lrint.c and lrintf.c to s_llrint.c, s_llrintf.c,Mark Kettenis
s_lrint.c and s_lrintf.c, and add i387-specific assembler versions. ok deraadt@, otto@
2006-09-25Use S_IS* macros insted of masking with S_IF* flags. The latter mayOtto Moerbeek
have multiple bits set, which lead to surprising results. Spotted by Paul Stoeber. ok djm@
2006-09-24Eliminate D_CHAIN, D_ECC and D_RAMDISK flags from disklabel. They wereKenneth R Westerback
not being used in the tree for anything obviously useful. Get it done early so we can find if there are non-obvious uses out there. ok deraadt@ beck@
2006-09-23fix a bug where the logic was reversedKurt Miller
2006-09-23If fgetln() != NULL, len == 0 is impossible, so remove check.Ray Lai
OK otto@ and jaredy@.
2006-09-22Part 1 of file descriptor race and deadlock corrections.Kurt Miller
File status flags should be shared for dup'ed file descriptors. However fd_table_entry's should not be shared for dup'ed file descriptors so they can be independently be closed without interfering with dup'ed fd's. - split out file status flags into its own structure fs_flags to manage sharing of status flags between dup'ed file descriptors. - when duplicating a fd, initialize a new fd_table_entry for the new fd, but share the status flags via status_flags. - consolidate the code that sets the underlying system fd to be non-blocking to a new function _thread_fs_flags_init() - consolidate the code that sets the underlying system fd back to blocking into a new function _thread_fs_flags_replace() This change is needed as a prerequisite to the coming race and deadlock corrections. okay marc@
2006-09-22Check return value of authunix_create_default(); from bret lambertOtto Moerbeek
with some guidance by me; ok jaredy@
2006-09-22Back out change in rev 1.15 of to allow whitespace to separate aTodd C. Miller
flag from its optional argument if permutation is disabled. The idea was that since "r:" would match "-r foo" then "r::" should match "-r foo" too as long as we know that things have not been reshuffled. Unfortunately, this causes incompatibilities with GNU getopt_long when the POSIXLY_CORRECT environment variable is set. OK deraadt@
2006-09-22Remove reference to LFS, okay deraadt@Pedro Martelletto
2006-09-18+MLINK pcap.3 pcap_get_selectable_fd.3Jason McIntyre
from okan demirmen
2006-09-17dont put two '\n' at the end of the string returnd by clnt_sperror()Thordur I. Bjornsson
ok deraadt@
2006-09-15sysctl(3) can return ESRCH; noted by Kristaps Johnson; ok miod@ jmc@Otto Moerbeek
2006-09-15better desciption of ESRCH; prompted by jmc@; ok miod@ jmc@Otto Moerbeek
2006-09-09document pcap_get_selectable_fd(); MLINK will happen after unlockJason McIntyre
from okan demirmen; ok djm
2006-09-09fix RSA signature padding vulnerability in OpenSSL libcrypto CVE-2006-4339;Damien Miller
ok beck@ miod@
2006-09-07knock out an .Xr to self;Jason McIntyre
from joachim schipper (pr #5228)
2006-09-03Add EINVAL and EOPNOTSUPP for remote filesystems,Ian Darwin
OK jmc@ miod@
2006-08-29If pgrp is zero, the process ID of the specified process is used.Christian Weisgerber
ok jmc@
2006-08-09Document error return when namelen is 0. OK jmc@Todd C. Miller
2006-08-09correction from vasil dimov;Jason McIntyre
tweak whilst in here
2006-08-07- fix a sentenceJason McIntyre
- some indent
2006-08-05no point mentioning functions if we have nothing useful to sayJason McIntyre
about them; ok djm
2006-08-04Add ENOMEDIUM and EMEDIUMTYPE to report medium errors to userland programsBob Beck
when using removable media devices, along with changes to scsi_base to detect such cases in tapes other devices. This makes tar, dd, and friends report a semi useful error message instead of nonsense when there is nothing in the device. Includes libc minor bump, and will require the corresponding sets change. ok krw@ deraadt@
2006-08-04clarification from kristaps johnson;Jason McIntyre
2006-08-03tweak;Jason McIntyre
2006-08-03EILSEQ is 84 not 83.Bob Beck
2006-08-03Document EILSEQ - forgotten by the wide character folks when they addedBob Beck
it to errno. ok deraadt@
2006-07-26wording/grammar tweaks;Jason McIntyre
2006-07-26better macros;Jason McIntyre
2006-07-26document `iv';Jason McIntyre
from eren elci; tweaked by djm ok djm
2006-07-25updates from nicholas marriott;Jason McIntyre
re-worded and ok djm
2006-07-23remove tzset(3) from SYNOPSIS: it has its own man page;Jason McIntyre
spotted by stevesk; ok otto
2006-07-18get rid of arc network support. we have no users of it so this is deadDavid Gwynne
code. however, it is still cluttering up the kernel namespace a bit. it is better gone. ok claudio@
2006-07-13Back out the anon change. Apparently it was tested by a few, but most ofTheo de Raadt
us did not see it or get a chance to test it before it was commited. It broke cvs, in the ami driver, making it not succeed at seeing it's devices.
2006-07-12add some more C99 functions: round(3) and roundf(3).Brad Smith
By Steven G. Kargl <kargl at troutmask dot apl dot washington.edu> From FreeBSD
2006-07-09grammar tweak, on re-read;Jason McIntyre
2006-07-09- clean up the SOCK_RAW textJason McIntyre
- remove the SOCK_RDM text; suggested by krw - Xr inet(4) and inet6(4)