summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2007-03-01Remove two ancient debugging printfs.Artur Grabowski
2007-02-26exclude control data from the number of bytes returned by FIONREAD ioctl()Kurt Miller
by adding a sb_datacc count to sockbuf that counts data excluding MT_CONTROL and MT_SONAME mbuf types. w/help from deraadt@. okay deraadt@ claudio@
2007-02-26m_dup1() copies the packet header and allocates the mbuf cluster in theClaudio Jeker
wrong order. M_DUP_PKTHDR needs to be called with an empty mbuf. Allocating an mbuf cluster beforehand is not allowed as the resulting mbuf is no longer considered empty (part of the header is initialized). The correct order is to allocate an mbuf via MGETHDR(), copy the packet header and as last step allocate the cluster. Issue found by JINMEI Tatuya. OK canacar@ deraadt@ mglocker@ additional input itojun@
2007-02-20for vfsconf sysctl, do not leak kernel sensors out to userlandTheo de Raadt
ok art thib
2007-02-20for sensors do not leak kernel pointers when copying out to userland;Theo de Raadt
spotted by art, ok dlg art
2007-02-17fix ddb buf printing for daddr_t growth to 64bit;Michael Shalayeff
from juan hernandez gonzalez; tested by bluhm@
2007-02-14Consistently spell FALLTHROUGH to appease lint.Jonathan Gray
ok kettenis@ cloder@ tom@ henning@
2007-02-13fix ddb buf printMichael Shalayeff
2007-02-06Use atomic.h operation for manipulating p_siglist in struct proc. SolvesArtur Grabowski
the problem with lost signals in MP kernels. miod@, kettenis@ ok
2007-02-03Remove unused functionality from lockmgr():Miod Vallat
- LK_EXCLUPGRADE is never used. - LK_REENABLE is never used. - LK_SETRECURSE is never used. Because of this, the lk_recurselevel field is always zero, so it can be removed to. - the spinlock version (and LK_SPIN) is never used, since it was decided to use different locking structure for MP-safe protection. Tested by many
2007-01-18allow kernels with TCP_SIGNATURE (aka tcp md5sig), but without IPSEC toHenning Brauer
compile and work. need to register pfkey whenever tcp md5 or ipsec is defined, and the various ipsec encapsulations only if ipsec is defined. ok theo
2007-01-17When sending signals, instead of checking if the process sending theArtur Grabowski
signal to is the curproc, check if it's SONPROC. That way we'll also signotify processes on other CPUs. This gives MD code the opportunity to actually deliver signals to other CPUs faster than the clock interrupt (in the worst case). This is a NOP until MD code is fixed. miod@ ok
2007-01-17reintroduce rev 1.83 -- put the new process on the proc listsMichael Shalayeff
later when more of it's resources have been allocated and thus kill(2)ing such a process has more predictable results. now w/ a couple of kettenis remarks; kettenis@ miod@ ok
2007-01-16regenThordur I. Bjornsson
2007-01-16Retire VOP_LEASE(); It was a bit for NQNFS and hasThordur I. Bjornsson
effectively been a no-op for quite some time now, without promise for future usage. ok pedro@ Testing by krw@ (earlier diff) and Johan Mson Lindman (tybollt@solace.miun.se)
2007-01-12Switch some lockmgr locks to rwlocks.Artur Grabowski
In this commit: - gdt lock on amd64 - sysctl lock - malloc sysctl lock - disk sysctl lock - swap syscall lock miod@, pedro@ ok (and "looks good" others@)
2007-01-10Fix getitimer to use uptime as setitimer does. Fixes bad output fromArtur Grabowski
getitimer when the clock on the machine has been reset. miod@ ok
2007-01-03Remove two "unused" mbuf tag functions and kill the superfluous argumentClaudio Jeker
to the m_tag_delete_chain() function. m_tag_free() and m_tag_unlink() are only used by m_tag_delete() and I see no need to have these functions around. m_tag_delete_chain() has a second argument to specifiy a starting point from where the chain should be deleted. This feature is never used and is more complex because it is not possible to remove a SLIST element without doing a list walk. Instead use SLIST_FIRST() and SLIST_REMOVE_HEAD() to remove all items from the list. OK dhartmei@
2007-01-02return is not a function.Marc Balmer
2007-01-022007Dale Rahn
2006-12-29Avoid void * arithmetic, okay deraadt@, suggestions from millert@Pedro Martelletto
2006-12-24If <machine/cpu.h> defines PROC_PC to compute the userland pc from an exceptionMiod Vallat
frame, use it to report profiling information via addupc_intr().
2006-12-24Keep a counter for addupc_intr() invocations, and pass its value, instead of 1,Miod Vallat
to addupc_task() in ADDUPROF(). From NetBSD via art@.
2006-12-23adapt to new two-level sensor api; Constantine A. MureninTheo de Raadt
2006-12-23kernel code implimemting the new two-level sensor api; written byTheo de Raadt
Constantine A. Murenin
2006-12-23in nmeaopen(), only add the sensors to the system if there was no error.Marc Balmer
2006-12-21Change the semantics of kern.watchdog.auto slightly: If kern.watchdog.auto isMarc Balmer
set to 0, the watchdog will not be retriggered by the kernel *and* it will not be disabled at system shutdown time (before it got disabled at system shutdown time.) ok markus mickey mk
2006-12-21'tranfer' -> 'transfer' in comments.Kenneth R Westerback
2006-12-15Correct order of malloc(9) arguments.Marc Balmer
Spotted by Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru>; thanks.
2006-12-12Complete gwk's previous patch to stop setperf methods from returningDimitry Andric
errors to userland: make all cpu_setperf functions return void. Tested by many, ok gwk@
2006-12-11allow bit 32 to be printed; bug spotted and fix tested by dlgTheo de Raadt
2006-12-08A more permanent solution to setperf methods returning error values andGordon Willem Klok
the higher level sysctl code passing them to userland. Distinct diff from the one I passed around internally with less crazy semantics. Also nuke some trailing spaces in a few places. "just go ahead" deraadt@
2006-12-01spell kqueue, not kqeueCamiel Dobbelaar
ok jmc
2006-11-30s/completly/completely/Michael Knudsen
ok brad
2006-11-29Correct the calculation of block address for specfs block i/o onKenneth R Westerback
devices with sectorsizes other than 512. e.g. cd's. Fixes PR #5235 from Paul Stoeber with a slightly tweaked diff. NetBSD did the same with their r1.59 in 2001, closing their PR#3261 and PR#14026. tweak suggestions and ok pedro@
2006-11-29Update the sensor description based on the GPS operation mode. InitialMarc Balmer
diff received from matthieu. ok matthieu
2006-11-29We don't use mb_map anymore since a long time already. Remove it.Miod Vallat
2006-11-29Kernel stack can be swapped. This means that stuff that's on the stackMiod Vallat
should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Loads of code doesn't follow the rules here. Instead of trying to track down all offenders and fix this hairy situation, it makes much more sense to not swap kernel stacks. From art@, tested by many some time ago.
2006-11-28Let nmea(4) use tty timestamps if they are enabled. Using a GPS receiverMarc Balmer
that provides a PPS signal, more precision and less jitter can be expected. With my test setting (a Garmin GPS 18 LVC hooked up to a i386 machine) I observed a skew of 0.03 to 0.05 seconds between the tty timestamp and the soft timestamp. "put it in" deraadt
2006-11-28Make malloc() print out a warning message when returning NULL due toPedro Martelletto
M_CANFAIL, idea from miod@, okay deraadt@
2006-11-24When copying out struct statfs to userland, we need to zero out the fsidArtur Grabowski
field unless it's root that's asking. This far, this has been done by putting a struct statfs on the stack and modifying it. struct statfs is large. Large things on the stack are bad. Create copyout_statfs() that copies out a struct statfs to userland, does the necessary root check and gives userland what it needs withtout wasting stack space. pedro@, deraadt@ ok.
2006-11-22If M_CANFAIL is set and the malloc() size is to bigThordur I. Bjornsson
return NULL instead of panic()'ing. ok pedro@, deraadt@
2006-11-20vprint() should be defined if DIAGNOSTIC || DEBUG. Noticed by (andTom Cosgrove
original diff from) Jake < antipsychic (at) hotmail.com >. Discussed with Mickey and Miod. ok miod@ pedro@
2006-11-18more fixes from bret lambert; ok pedroJason McIntyre
2006-11-18typos; from bret lambertJason McIntyre
2006-11-17typos from bret lambert;Jason McIntyre
2006-11-17missing punctuation in comments; from bret lambertJason McIntyre
2006-11-17Make getpeereid() work on both sides of a connection. The client can now getClaudio Jeker
the euid/egid of the server it connects to. The euid and egid are captured in the bind() call -- this is the equivalent of the client behaviour where the same thing is done in connect(). tested and ok espie@, ok henning@, go for it deraadt@
2006-11-15typos; from bret lambertJason McIntyre
2006-11-14grammar, spelling, and style fixes from bret lambert;Jason McIntyre
kern_descrip.c change ok deraadt