summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2013-05-19select(-1, ...) should fail with EINVAL.Philip Guenther
ok matthew@
2013-05-07Merge from FreeBSD, r191313Philip Guenther
--------------------------- On the exit of the child process which parent either set SA_NOCLDWAIT or ignored SIGCHLD, unconditionally wake up the parent instead of doing this only when the child is a last child. This brings us in line with other U**xes that support SA_NOCLDWAIT. If the parent called waitpid(childpid), then exit of the child should wake up the parent immediately instead of forcing it to wait for all children to exit. --------------------------- ok tedu@, millert@
2013-05-06restore original gangster lockstatus return values for compatTed Unangst
2013-05-03switch the malloc and pool freelists to using xor simpleq.Ted Unangst
this adds a tiny bit more protection from list manipulation.
2013-05-02according to pedro, ids work better with the ending $Ted Unangst
2013-05-01a few tweaks noticed by jsingTed Unangst
2013-05-01exorcise lockmgr. the api remains, but is now backed by recursive rwlocks.Ted Unangst
originally by thib. ok deraadt jsing and anyone who tested
2013-04-29regenMatthew Dempsky
2013-04-29Extend P_SIGSUSPEND handling in userret() to properly restore theMatthew Dempsky
sigmask even if there are no pending signals under the temporary sigmask. Refactor existing select() and poll() system calls to introduce the pselect() and ppoll() system calls. Add rthread wrappers for pselect() and ppoll(). While there, update cancellation point comments to reflect recent fdatasync() addition. Minor bumps for libc and librthread due to new symbols. ok guenther, millert, deraadt, jmc
2013-04-24Add tstohz(9) as the timespec analog to tvtohz(9).Matthew Dempsky
ok miod
2013-04-24When a ucom(4) is removed, it frees the tty with ttyfree(). However ifNicholas Marriott
anyone is waiting with kqueue their knotes may still have a reference to the tty and later try to use it in the filt_tty* functions. To avoid this, walk the knotes in ttyfree(), remove them from the tty's list and invalidate them by setting kn_hook to NODEV. The filter functions can then check for this and safely ignore the knotes. ok tedu matthieu
2013-04-24When attaching disks, feed the disklabel's checksum toBret Lambert
the random pool as unique-esque-but-not-secret data. inspired by conversations with tedu@/deraadt@ ok deraadt@
2013-04-19sprinkle ifdef MP to disable cpu migration code when not needed.Ted Unangst
ok deraadt
2013-04-17check that the pool we are about to init isn't already on the list inTed Unangst
order to detect double init mistakes. add a similar check and rearrange pool_destory to detect the opposite mistake.
2013-04-16Some compat options require snapshot coordinationPhilip Guenther
2013-04-15regenJoel Sing
2013-04-15regenJoel Sing
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
2013-04-10Fix various glitches in queue macro usage.Philip Guenther
ok millert@
2013-04-09Add a magic number to the head of the signature block. Check for magicMike Larkin
number match during signature block read during speculative unhibernate on boot. If the magic number matches but we have otherwise chosen to not unhibernate (due to kernel/memory mismatch), clear the signature block early to avoid accidentally trying to unhibernate on subsequent boots. This prevents accidental unhibernates and endless unhibernate/reboot cycles. Add a define for HIBERNATE_DEBUG for various debugging printfs (disabled by default). Finally, change some KASSERTs to warning printfs (they probably shouldn't have been KASSERTs in the first place). "looks good" deraadt@
2013-04-06make kernel compileTheo de Raadt
2013-04-06i missed this file too.Ted Unangst
2013-04-06i missed a file, crap. found by deraadtTed Unangst
2013-04-06shuffle around some poison code, prototypes, values...Ted Unangst
allow some more pool debug code to be enabled if not compiled in bump poison size back up to 64
2013-04-06rthreads are always enabled. remove the sysctl.Ted Unangst
ok deraadt guenther kettenis matthew
2013-04-05remove some obsolete castsTed Unangst
2013-04-04Do not allow the listen(2) syscall for an already connected socket.Alexander Bluhm
This would create a weird set of states in TCP. FreeBSD has the same check. Issue found by and OK guenther@
2013-04-01Make setrlimit() return EINVAL if rlim_cur > rlim_max, per POSIX.Philip Guenther
Use limfree() instead of decrementing the reference counter directly. ok kettenis@
2013-03-31replace pool debug magic with shared mem poison codeTed Unangst
ok deraadt
2013-03-30vrele() is a tricky beast. it can sleep if the refcount hits zero,Ted Unangst
leaving us with a free type function that isn't atomic. deal with this by erasing any reachable pointers to the vnode first, then free it. ok deraadt guenther
2013-03-30Return ENOTDIR if an *at() syscall is passed a relative path and aPhilip Guenther
fd to resolve against that isn't a directory ok matthew@
2013-03-28sys/param.h gets you sys/types.h automaticallyTheo de Raadt
2013-03-28do not include machine/cpu.h from a .c file; it is the responsibility ofTheo de Raadt
.h files to pull it in, if needed ok tedu
2013-03-28separate memory poisoning code to a new file and make it usable kernel wideTed Unangst
ok deraadt
2013-03-28Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,Philip Guenther
msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
2013-03-28no need for vnode.h to include namei.h unconditionallyTed Unangst
ok deraadt guenther
2013-03-28When updating fd_cdir or fd_rdir, put the new pointer in placePhilip Guenther
_before_ vrele()'ing the old one, so that you can't catch the process with a vnode with no references. Similarly, in checkdirs(), just count the needed releases and do them all at the end. (I think I saw this in FreeBSD.) Original problem encountered by landry@ (yay for backtrace) ok tedu@ deraadt@
2013-03-28Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,Philip Guenther
_PC_PRIO_IO, and _PC_SYNC_IO names in VOP_PATHCONF(), as they're fs-independent for us. Since we don't support latter three on any fs, we can also define the related _POSIX_{ASYNC,PRIO,SYNC}_IO symbols in <unistd.h> (via sys/unistd.h) with value -1. Also, zap pointless tty-only values from procfs(!). ok beck@, deraadt@
2013-03-27Move soidle() into the big #ifdef SOCKET_SPLICE block to have itAlexander Bluhm
all in one place. Saves one additional #ifdef, no functional change. OK mikeb@
2013-03-27rename NCHNAMLEN to NAMECACHE_MAXLEN. easier to read, easier to type.Ted Unangst
ok beck deraadt after a style issue noticed by kettenis
2013-03-26simpleq is lighter weight and sufficient for pool's needs.Ted Unangst
ok deraadt
2013-03-26replace kern malloc's hand rolled freelist with simpleq macros.Ted Unangst
ok deraadt mpi
2013-03-25the unused palm code goes away.Theo de Raadt
2013-03-25reseed the random pool with 'dmesg' when more devices are attachedMarkus Friedl
from hshoexer@; ok tedu@, "looks good" deraadt@
2013-03-23pull the suser check for sysctl pointers up higher, out of the loops.Ted Unangst
hide a few more pointery things. ok deraadt
2013-03-21use PAGE_SHIFT instead of PGSHIFTTheo de Raadt
2013-03-20When non-root asks sysctl for kinfo proc or file requests, do not fill inTheo de Raadt
any kernel addresses information. ok guenther
2013-03-19After a socket splicing timeout is fired, a network interrupt canAlexander Bluhm
unsplice() the sockets before soidle() goes to splsoftnet. In this case, unsplice() was called twice. So check wether splicing still exists within the splsoftnet protection. Uvm fault in sounsplice() reported by keith at scott-land dot net. OK claudio@
2013-03-18nscan only operates in a single direction, remove leftover dir variable.Ted Unangst
2013-03-15factor out the deadbeef code for legibility.Ted Unangst
ok deraadt