summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2016-03-19Remove the unused flags argument from VOP_UNLOCK().natano
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
2016-03-17Replace curcpu_is_idle() by cpu_is_idle() and use it instead of rollingMartin Pieuchot
our own. From Michal Mazurek, ok mmcc@
2016-03-17KNF: Remove a blank line.Masao Uebayashi
2016-03-17- add realloc_pages to move a buffer's physmem from one range to another.Bob Beck
- modify B_DMA handling to be in vfs_biomem.c - change buffer allocation to try allocations with NOWAIT and to throw away clean pages if allocation fails - allocate with WAITOK only if you can't throw away enough pages to succeed "probably sound" deraadt@
2016-03-16Expose new audio ioctls that do one thing only: start and stop DMA,Alexandre Ratchov
set and get parameters. This is much simpler. ok semarie, armani, tweaks from jmc
2016-03-15pledge: wl_paths: resolvpath() logic errorSebastien Marie
prepend chroot value *after* canonization and not before.
2016-03-15pledge: wl_paths: corrects a memory leak in error code path and an evaluationSebastien Marie
order ("a += b > c" is the same as "a += (b > c)" which is wrong here) ok jca@
2016-03-15Remove now unused legacy uiomovei() function.Stefan Kempf
All its callers got reviewed and converted to use uiomove() properly. ok deraadt@
2016-03-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2016-03-13keep disabled wl_paths for now. the expensiveness impact need to be betterSebastien Marie
considered. ok deraadt@
2016-03-13reenable wl_paths (whitelisted-paths) in pledge(2)Sebastien Marie
2016-03-13pledge: replace #if 0 printf with DNPRINTF macroSebastien Marie
2016-03-13pledge: let wl_paths works well with chrootSebastien Marie
it factorizes path resolution in resolvpath() function, and use it in sys_pledge() and pledge_namei(). please note that wl_paths is still disabled.
2016-03-13corrects on off-by-one error in pledge_namei()Sebastien Marie
- rewrite canonpath() to not require extra byte before shrinking - make canonpath() error not fatal for the caller (proposition from tedu@) ok millert@ tedu@ deraadt@
2016-03-12When vfs_busy() is sleeping, it uses RW_SLEEPFAIL and will fail.Alexander Bluhm
So if vop_generic_revoke() does not unmount because the mount point is busy, this could result in a mount point without a valid device. It is better to check and sleep in a loop to avoid a corrupt mount point. OK natano@ krw@
2016-03-11increase size of oldpids to 128 to prevent mod bias when idx wraps.Ted Unangst
from Michal Mazurek
2016-03-11pledge: define the meaning of passing NULL to one arguments of pledge(2) as "ISebastien Marie
don't want to change the current value" it changes only the `request' argument behaviour when NULL is passed: previously it was traited as "" was passed. with help from jmc@ for man-page OK tb@ on previous version
2016-03-10Start some refactoring in here. this gets bufadjust outBob Beck
of the hibernate path and starts preparing for some other work in here
2016-03-09remove handling of vaxTheo de Raadt
2016-03-09Correct some comments and definitions, from Michal Mazurek.Martin Pieuchot
2016-03-07Sync no-argument function declaration and definition by adding (void).Christian Weisgerber
ok mpi@ millert@
2016-03-06No more compat emulations, so remove ktrace EMUL records and the baggagePhilip Guenther
for generating and parsing them. ok mpi@ naddy@ millert@ deraadt@
2016-03-06Do not fetch the same block multiple times if it is already presentMartin Pieuchot
in the buffer cache. When the Dynamic Buffer Cache has been introduced bread_cluster() became the replacement of cluster_read(). However this function did not consider the B_CACHE flag of the first buffer of a cluster like its predecessor did. This improves a lot read operations on MSDOSFS while reducing the number of DMA operations. ok beck@
2016-03-06Localize some declarations to kern_exit.c: the last good reason to putPhilip Guenther
them in sys/proc.h has been removed with compat_linux diff from Michal Mazurek (akfaew (at) jasminek.net)
2016-03-04repair documentation for inferior(); from Michal MazurekTheo de Raadt
2016-03-03replace the XXX next to setting link_maxhdr with an explanationDavid Gwynne
the XXX has been there since 1.1, even back in netbsd, and im too lazy to go back further to try and see why it is there. either way it is meaningless. suggested by mikeb@ and mpi@
2016-03-03bump link_maxhdr up from 16 to 64David Gwynne
link_maxhdr is best explained as the space reserved before an ip packet payload for link headers, the most common of which is ethernet. 16 was a good choice when the only traffic we really did was ip over ethernet, but now there are commonly used transports that are bigger, specifically 802.11 traffic and vlan/vlan encapsulations, that justify bumping it up. i chose 64 because it would also allow enough space for encapsulations like etherip or gif. this reduces the size of the smallest packet that can fit into an mbuf before more storage needs to be suffixed, but because most traffic is either full sized (ie, already bigger than a single mbuf) or tiny packets (think tcp ACKS, keystrokes over ssh, or dns requests) the impact is negligible. ok stsp@ mpi@ sthen@ mikeb@
2016-03-01Copy the stackgap_init() and stackgap_alloc() functions fromChristian Weisgerber
compat/common/compat_util.c to dev/systrace.c, the one place they are used, and remove the remaining kernel references to compat/*. ok visa@
2016-02-29delete the kern.emul/KERN_EMUL sysctl bits since there are noChristian Weisgerber
emulations left; ok millert@ deraadt@, jmc@ (man pages)
2016-02-28Support for running Linux binaries under emulation is going away.Christian Weisgerber
Remove "option COMPAT_LINUX" and everything directly tied to it from the kernel and the corresponding man page documentation. ok visa@ guenther@
2016-02-23provide m_dup_pkt() for doing fast deep mbuf copies with a specified alignmentDavid Gwynne
if a physical interface receives a multicast/broadcast packet and has carp interfaces on it, that packet needs to be copied for reception by each of those carp interfaces. previously it was using m_copym2, but that doesn't respect the alignment of the source packet. this meant the ip header in the copies were aligned incorrectly for the network stack, which breaks strict alignment archs. m_dup_pkt lets carp specify that the payload needs an ETHER_ALIGN adjustment, so the ip header inside will be aligned correctly. reported and tested by anthony eden who hit this on armv7 i reproduced the problem on sparc64 and verified the fix on amd64 and sparc64 ok mpi@ mikeb@ deraadt@
2016-02-17Return ENOTTY for TIOCFLUSH when allowed by pledge but the fd isTodd C. Miller
not a tty. Fixes a pledge failure in telnet when piping the output. OK deraadt@
2016-02-11Make sure uiomove does not copy more than uio_resid bytes, as the manualStefan Kempf
says. Move code belonging to diagnostics in the #ifdef DIAGNOSTIC part and add a KASSERT that makes sure that we do not run beyond uio_iov. Diff from Martin Natano.
2016-02-08"exceeds past the end" -> "extends past the end" in comment.Kenneth R Westerback
2016-02-01add a DIAGNOSTIC for refcnt_take overflow.David Gwynne
ok mpi@
2016-01-31- m_pkthdr.pf.statekey changes are not ready for 5.9, I must back them outAlexandr Nedvedicky
OK sthen@
2016-01-28Convert to uiomove. Diff from Martin Natano.Stefan Kempf
2016-01-19Convert min() and uiomovei() to ulmin() and uiomove(),Stefan Kempf
preventing integer truncation. Diff from Martin Natano ok kettenis@
2016-01-19Check if the vnode type is VBAD (corresponds to disconnectedAlexandre Ratchov
usb devices) and return ENOTTY rather than terminating the caller program. Found by Michael Reed <m.reed at mykolab.com> ok semarie, deraadt
2016-01-18Add SYS_truncate as a "wpath" operation. Omission noticed by tb and sthen.Theo de Raadt
2016-01-15Convert to uiomove(); from Martin NatanoStefan Kempf
ok millert@
2016-01-15Improve the socket panic messages further. claudio@ wants to seeAlexander Bluhm
the socket type and dlg@ is interested in the pointers for ddb show socket. OK deraadt@ dlg@
2016-01-15KASSERT on refcnt underflow.David Gwynne
ok mpi@ bluhm@
2016-01-15print TAILQ_NEXT(so, so_qe) tooDavid Gwynne
2016-01-15add a "show socket" command to ddbDavid Gwynne
should help inspecting socket issues in the future. enthusiasm from mpi@ bluhm@ deraadt@
2016-01-14Increase buffer sizes and watermarks for tty and pppStefan Fritsch
Use 115200 the default speed for buffer sizing in ttymalloc(). A lot of devices call ttymalloc(0) so this affects quite a few of them. Increases the buffer size for 9600 < baud <= 115200 from 1k to 4k. Make ppp use the lo/hi watermarks from the tty layer which are adjusted according to speed + buffer size. The previous fixed values of 100 and 400 were way too small Make pty call ttymalloc() with baud == 1000000, which is the common value used in the tree for "fast". ok deraadt@
2016-01-13To make bug hunting easier, print more information in the soreceive()Alexander Bluhm
and somove() panic messages. OK phessler@ benno@ deraadt@ mpi@
2016-01-13Convert to uiomove(); from Martin Natano, thanks!Stefan Kempf
ok deraadt@
2016-01-09drop "abort" promise, and make it the default behaviour.Sebastien Marie
The current code has already setted it by default since 1.74 any pledge failure tries to make a coredump (default rules for coredump still applies: so setuid binaries don't create them locally). ok deraadt@
2016-01-08Add "vmm" pledge to allow restricted ioctl access to /dev/vmm.Reyk Floeter
This will allow to pledge vmd(8)'s vmm and vm processes, so that VMs themselves run "sandboxed", including their host-side virtio layer. It will remain disabled for now (in userland) to not get into the way of ongoing development and upcoming changes in vmd and the ioctl interface. OK mlarkin@ deraadt@ "kernel side in, but not the callers in userland"