summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
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
2013-03-14regenTed Unangst
2013-03-14the 5.1 era tfork syscall claws its way out of the grave. we failed toTed Unangst
fully deprecate it (notably the go port was still using it as of 5.3) so to give users a little more time to update, __tfork51 lives again. okish deraadt guenther
2013-03-12Fix kernel profiling on MP systems by using per-CPU buffers and teachMartin Pieuchot
kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
2013-03-07Reword some wrong comments and some improperly formatted comments and addMike Larkin
information about piglet memory layout. No functional changes.
2013-03-06Fix a bad comparison when calculating the size of the hibernate signatureMike Larkin
block ok deraadt@
2013-03-02regenPhilip Guenther
2013-03-02No longer need the 5.1 version of the __tfork syscallPhilip Guenther
ok deraadt@
2013-02-17Comment out recently added __attribute__((__format__(__kprintf__))) annotationsMiod Vallat
in MI code; gcc 2.95 does not accept such annotation for function pointer declarations, only function prototypes. To be uncommented once gcc 2.95 bites the dust.
2013-02-16Fix a bug in udp socket splicing in case a packet gets diverted andAlexander Bluhm
spliced and routed to loopback. The content of the pf header in the mbuf was keeping the divert information on its way. Reinitialize the whole packet header of the mbuf and remove the mbuf tags when the packet gets spliced. OK claudio@ markus@
2013-02-12Back out per-CPU kernel profiling, it shouldn't modify a public headerMartin Pieuchot
at this moment.
2013-02-11Fix kernel profiling on MP systems by using per-CPU buffer. PreviouslyMartin Pieuchot
various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
2013-02-11When information about threads are not requested sum the '%cpu' ofMartin Pieuchot
all threads in a process instead of returning only the '%cpu' for the main thread. This makes top(1) display the correct percentage of CPU usage for threaded processes when theads are not displayed. ok sthen@, mikeb@
2013-02-09Remove no longer used struct emul extern declarations.Miod Vallat
2013-02-09Add explicit __attribute__ ((__format__(__kprintf__)))) to the functions andMiod Vallat
function pointer arguments which are {used as,} wrappers around the kernel printf function. No functional change.
2013-02-08Insufficient levels of hops in the local brew led to Theo and I muckingPhilip Guenther
up the VFS calls in the error paths in coredump() Pointed out by armani@, ok beck@
2013-02-07convert mbuf tags to use pool(9) as a backend storage;Mike Belopuhov
ok markus claudio haesbaert henning
2013-01-30In doreadlinkat(), only access auio.uio_resid if it's already beenMatthew Dempsky
initialized. (In the case where it wasn't initialized, the computed *retval ends up getting clobbered by the EINVAL error anyway so it's not an info leak, but it's still technically undefined behavior.) pointed out by Maxime Villard on tech ok guenther
2013-01-18oops. this kassert should have gone with the B_NOTMAPPED commitBob Beck
2013-01-18Give buf_acquire_unmapped and B_NOTMAPPED a viking funeral as they shouldBob Beck
really have been called "maybemapped and hope it all works out". - use buf_acquire_nomap instead which acounts for busymapped bufs correctly. ok krw@ guenther@ kettenis@
2013-01-17Ensure the tty hiwat is less than the size of the ring buffer (sinceTheo de Raadt
we do not grow space like clist chains). Clamp it a bit more precisely, ensuring a bit of space for kernel ^T handling and such. It was definately wrong, and we can tune this if required later. ok kettenis
2013-01-17Expand the socket splicing functionality from TCP to UDP. MergeAlexander Bluhm
the code relevant for UDP from sosend() and soreceive() into somove(). That allows the kernel to directly transfer the UDP data from one socket to another. OK claudio@
2013-01-17Style, no functional changes.Paul Irofti
Discussed with mlarkin@.
2013-01-17Add a hibernate HIB_DONE op. After the memory-side-effect driver finishesTheo de Raadt
IO to the disk, DVACT_RESUME the controller back to normal operation. That allows us to do the full DVACT_POWERDOWN sequence afterwards. ok mlarkin
2013-01-17increase the number of pages used to hold the chunk ordering map and changeMike Larkin
the index type from int to short. Allows amd64 to hibernate with up to 64GB phys memory
2013-01-17fix an error in the amd64 asm unhibernate code and a slight adjustment toMike Larkin
the MI hibernate code to handle 64 bit archs
2013-01-15restrict KERN_PROC_ARGS lookup of KERN_PROC_NENV and KERN_PROC_ENVjoshua stein
to process owner and root ok deraadt millert guenther
2013-01-15Pass an EFBIG error to user land when the maximum splicing lengthAlexander Bluhm
has been reached. This creates a read event on the spliced source socket that can be noticed with select(2). So the kernel passes control to the relay process immediately. This could be used to log the end of an http request within a persistent connection. deraadt@ reyk@ mikeb@ like the idea
2013-01-15Changing the socket buffer flags sb_flags was not interrupt safeAlexander Bluhm
as |= and &= are non-atomic operations. To avoid additional locks, put the flags that have to be accessed from interrupt into a separate sb_flagsintr 32 bit integer field. sb_flagsintr is protected by splsoftnet. Input from miod@ deraadt@; OK deraadt@
2013-01-15Allow SIGKILL to terminate coredumping processes. Semantics decidedTheo de Raadt
with kettenis guenther and beck. ok guenther