summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2016-09-01one less sparcTed Unangst
2016-08-31proc_trampoline_mp hasn't needed curproc since 2011Tom Cosgrove
ok guenther@ mpi@
2016-08-31Delete unused ioctls and associated macros. Move macros that are stillAlexandre Ratchov
used internally by low-level drivers from sys/audioio.h to dev/audio_if.h instead of deleting them.
2016-08-30pool_setiplDavid Gwynne
ok natano@
2016-08-26The *_HEAD_INITIALIZER() macros are documented as taking the struct,Philip Guenther
not a pointer to it
2016-08-26Pull in <sys/time.h> for clock_ymdhms bitsPhilip Guenther
ok deraadt@
2016-08-25Spliced TCP sockets become faster when the output part is runningAlexander Bluhm
as its own task thread. This is inspired by userland copy where a process also has to go through the scheduler. This gives the socket buffer a chance to be filled up and tcp_output() is called less often and with bigger chunks. When two kernel tasks share all the workload, the current scheduler implementation will hang userland processes on single cpu machines. As a workaround put a yield() into the splicing thread after each task execution. This reduces the number of calls of tcp_output() even more. OK tedu@ mpi@
2016-08-25Completely revert the M_WAIT change on the cluster allocation andAlexander Bluhm
bring back the behaviour of rev 1.72. Although allocating small mbufs when allocating an mbuf cluster fails seems suboptimal, this should not be changed as a side effect when introducing m_getuio(). OK claudio@
2016-08-25pool_setiplDavid Gwynne
ok kettenis@
2016-08-25pool_setiplDavid Gwynne
ok kettenis@
2016-08-23rename nfiles to numfiles to avoid shadowing and stretch out the name.Ted Unangst
ok deraadt
2016-08-22Refactor the uio to mbuf code out of sosend and start to make use ofClaudio Jeker
MCLGETI and large mbuf clusters. This should speed up local connections a fair bit. OK dlg@ and bluhm@ (after reverting the M_WAIT change on the cluster allocation)
2016-08-17Fix an mbuf leak and missing error propagation in uipc_usrreq(PRU_SEND)Alexander Bluhm
in case sbappendcontrol() fails. From Simon Mages; OK mikeb@
2016-08-11shuffle some code to make it more symmetrical.David Gwynne
no functional change.
2016-08-10armish handled some early-gen arm machines, which required tons ofTheo de Raadt
workarounds. Some of them will soon stand in the way of armv7. Off to the attic you go.
2016-08-09When interrupted, connect() should leave the socket connecting in thePhilip Guenther
background, similar to a non-blocking socket. Return EALREADY whenever already connecting, not just for non-blocking sockets. Fix from {Free,Net}BSD Prompted by a report from Michael Reed (m.reed (at) mykolab.com) ok millert@
2016-07-28Revert previous commitMike Belopuhov
2016-07-28Convert ifq_deq_{begin,rollback,commit} dance to a single ifq_dequeueMike Belopuhov
2016-07-22Prevent NULL-pointer call for filesystems that don't provide vfs_sysctlMark Kettenis
in their vfsops. Issue reported by Tim Newsham. ok claudio@, natano@
2016-07-19instead of messing about with pointer arithmetic, add an empty arrayTed Unangst
to the end of the defer structure. solves sizing and alignment concerns.
2016-07-14kern.usermount=1 is unsafe for everyone, since it allows any non-pledgedTheo de Raadt
program to call the mount/umount system calls. There is no way any user can be expected to keep their system safe / reliable with this feature. Ignore setting to =1, and after release we'll delete the sysctl entirely. ok lots of people
2016-07-14Prevent silly states via knotes on pids > 2^32 and on nonexistent signals.Philip Guenther
ok tedu@
2016-07-14kevent validates that ident is a valid fd by getting the file. one sadTed Unangst
quirk: uint64 to int32 truncation can lead to false positives, and then later in the array sizing code, very big mallocs panic the kernel. add a check that the ident isn't larger than INT_MAX in the fd case. reported by Tim Newsham
2016-07-12The only valid flag for unmount(2) is MNT_FORCE, ignore any others.Todd C. Miller
Fixes a crash when MNT_DOOMED is passed in the flags to unmount(2) found by NCC Group. OK bluhm@
2016-07-12in the great unp_gc rewrite, a null check was lost. we have spent someTed Unangst
time investigating and arguing about whether a NULL fp is a bug or not, but what has become clear is that NULL fps get passed to unp_discard and have been for quite some time. restore old accomodating behavior by checking for null in unp_gc. ok deraadt kettenis
2016-07-12The check for pledge "recvfd" was mistakenly only being performedTheo de Raadt
for chroot'd processes. ok stefan semarie
2016-07-12remove more noisy messages in "sendfd" and "recvfd"Theo de Raadt
2016-07-11be less noisy on console in case of "recvfd" refusalTheo de Raadt
ok semarie
2016-07-10pledge: use uint64_t instead of int for temporary storing a 64bit integerSebastien Marie
affects only 32 bits platform (like i386). problem spotted and diff from pelikan@ ok deraadt@ jca@
2016-07-10POSIX specifies that if a processing calling tcsetpgrp() is in theTodd C. Miller
background it shall receive SIGTTOU. Handle TIOCSPGRP like we do the other tty ioctls that change the terminal. OK deraadt@ guenther@
2016-07-10Paranoia: check KTRPOINT() before calling ktrpledge() to guarantee wePhilip Guenther
can't (in the future) loop from ktrace writing hitting a pledge condition. diff from Michal Mazurek (akfaew (at) jasminek.net)
2016-07-06Return EINVAL for mknod/mknodat when dev is -1 (aka VNOVAL).Todd C. Miller
OK beck@ tedu@
2016-07-06fix several places where calculating ticks could overflow.Ted Unangst
it's not enough to assign to an unsigned type because if the arithmetic overflows the compiler may decide to do anything. so change all the long long casts to uint64_t so that we start with the right type. reported by Tim Newsham of NCC. ok deraadt
2016-07-05remove some casts that aren't necessary.Ted Unangst
2016-07-04switch calculuated thrsleep timeout to unsigned to prevent overflowTed Unangst
into negative values, which later causes a panic. reported by Tim Newsham at NCC. ok guenther
2016-07-03introduces new promise "chown" to allow changing owner/group with *chown(2) ↵Sebastien Marie
family it splits PLEDGE_FATTR in two ("fattr" stills grant the 2 flags, so no functional changes): - PLEDGE_CHOWN : to be able to call *chown(2) syscalls - PLEDGE_FATTR : the rest it introduces "chown" which grant: - PLEDGE_CHOWN : be able to call *chown(2) - PLEDGE_CHOWNUID : be able to modifying owner/group ok deraadt@ tedu@
2016-06-28introduce rwlock for socketbuf instead of the old flag and tsleep dance.Ted Unangst
ok mikeb bluhm
2016-06-28in pledgereq (the array for doing correspondance between textual promise as ↵Sebastien Marie
in pledge(2) and internal PLEDGE_* flag), the flags member should be a uint64_t and not a int. ok deraadt@
2016-06-27Repair kill(2) on zombie processes.Jeremie Courreges-Anglas
kill(2) is supposed to find zombie processes, this probably got broken when the process reaper was introduced. As a temporary(tm) workaround, walk the list of zombie processes if we can't find the target pid in the main process list. Problem with zsh initially reported by Geoff Wozniak on misc@, analysis done by naddy@. ok kettenis@ tedu@
2016-06-27Regen.Joel Sing
2016-06-27Restore the sys_o58_kill system call.Joel Sing
2016-06-27Restore the sys_o58_kill system call.Joel Sing
By keeping both the new (sys_kill/sys_thrkill) and old (sys_o58_kill) system calls for the OpenBSD 6.0 release, code that uses either of these mechanisms will work on both of the supported OpenBSD releases. This provides a clean transition for runtimes that make direct system calls (namely the Go programming language). This requires a minimal amount of non-intrusive code and does not block development progress within OpenBSD. ok deraadt@ guenther@
2016-06-27Implement IPV6_MINHOPCOUNT support.Jeremie Courreges-Anglas
Useful to implement GTSM support in daemons such as bgpd(8). Diff from 2013 revived by renato@. Input from bluhm@, ok bluhm@ deraadt@
2016-06-27dovutimens: call vrele(9) before returning EINVALSebastien Marie
ok guenther@
2016-06-27sys_revoke: call vrele() before returning ENOTTYSebastien Marie
ok guenther@
2016-06-26use error code path instead of return early without calling VOP_ABORTOP() andSebastien Marie
vrele()/vput(). ok deraadt@
2016-06-23Avoid multiple evaluation of macro arguments in softclock()Stefan Kempf
ok mikeb@ tedu@
2016-06-23As klog dropped message has no ifdef small kernel, sendsyslogAlexander Bluhm
should not have it either. While there bring some variables in sync between both functions. OK deraadt@
2016-06-23It is annoying that the dmesg buffer can overflow and loose messagesAlexander Bluhm
undetected during debugging. To make clear what happens, count the dropped bytes and write message buffer full to syslogd. This also helps to have a reliable log system. OK deraadt@ millert@ tedu@
2016-06-19Remove the lockmgr() API. It is only used by filesystems, where it is aMartin Natano
trivial change to use rrw locks instead. All it needs is LK_* defines for the RW_* flags. tested by naddy and sthen on package building infrastructure input and ok jmc mpi tedu