summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2014-01-19With the earlier initialization of the random subsystem, random_hostseed()Theo de Raadt
is no longer providing significant value. The random subsystem is in pretty good state, and moments later userland will feed the dmesg. ok jsing
2014-01-19We can call random_start() immediately after cpu_startup, that is theTheo de Raadt
point at which everything it does is safe, including msg buffer access. ok kettenis jsing
2014-01-14Typo in a printf, should be 'bytes' not 'blocks'Mike Larkin
2014-01-13Return the poison value in poison_check() and not the modified value.Martin Pieuchot
ok tedu@
2014-01-11When I created UDP socket splicing, I added the goto nextpkt loopAlexander Bluhm
to splice multiple UDP packets in the m_nextpkt list. Some profiling with TCP splicing showed that checking so_rcv.sb_mb is wrong. It causes several useless runs through the loop. Better check for nextrecord which contains the original m_nextpkt value of the mbuf. OK mikeb@
2014-01-10Let "ddb show mbuf" print all mbuf fields in a consistent way. MoveAlexander Bluhm
bit field names into the header file below the definitions to keep them in sync. OK mikeb@ mpi@
2014-01-01copyright++Federico G. Schwindt
2013-12-28oops, the fallback stack protector code must handle 64-bit guardsTheo de Raadt
spotted by kettenis
2013-12-28change the stack protector guard into a long word (removing the old legacyTheo de Raadt
compat pointed out by miod), and place it inside the ELF .openbsd.randomdata segment. Inside main(), only re-initialize the guard if the bootblocks failed to initialize it for us.
2013-12-28We can initialize the srandom/random system earlier from arc4random,Theo de Raadt
and do not need microtime.
2013-12-28We can random_start() earlier (not that it does too much) and callTheo de Raadt
arc4random() much earlier. Leading to random pids for anything besides 0 and 1.
2013-12-24get rid of if (timeout_pending()) timeout_del(). this is racy. anyDavid Gwynne
conditionals you did on timeout_pending can now be done on timeout_del now that it returns what it did. ok and a very good fix from kettenis@
2013-12-24rename local ticks to nticks to avoid aliasing global. ok krwTed Unangst
2013-12-16Restore TIOCGSID ioctl that was removed along with the 4.3BSD tty(4)Todd C. Miller
compat. This will be used to implement tcgetsid() in the future. OK kettenis@ guenther@
2013-12-13Remove the 4.3BSD tty(4) compatibility shims. RIP. ok millert@Christian Weisgerber
2013-12-12Add db_vprintf(), and then use it in ACPI's db_disprint() instead ofPhilip Guenther
formatting into a local buffer. ok miod@
2013-12-12printf(variable) --> printf("%s", variable)Philip Guenther
ok deraadt@
2013-12-11Fix typo; that teaches me to steal other people's diffs!Mark Kettenis
2013-12-10dead assignment; from david hill, ok claudioMike Belopuhov
2013-12-10Add infrastructure to create un-biglocked task queues. Stolen from blambert@Mark Kettenis
who is slacking to much. ok dlg@
2013-12-09use a separate task queue for sensors;Mike Belopuhov
with input from and ok kettenis, deraadt
2013-12-09Don't keep removed files (B_INVAL bufs) in the buffer cache. Free buffersBob Beck
once brelse() is called and the buffer is B_INVAL. ok jsing@ krw@
2013-12-06Add a DVACT_WAKEUP op to the *_activate() API. This is called after theTheo de Raadt
kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
2013-12-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
2013-11-29msgs can be constTheo de Raadt
2013-11-27Defer the v_type initialisation until after the vnode has been purged fromJoel Sing
the namecache. Changing the v_type between cache_enter() and cache_purge() results in bad things happening. ok beck@
2013-11-27Assert that we never have destinations cached for a non-VDIR vnode.Joel Sing
ok beck@
2013-11-27make timeout_add and its wrappers return whether the timeout was scheduledDavid Gwynne
in this call by returning 1, or a previous call by returning 0. this makes it easy to refcount the stuff we're scheduling a timeout for, and brings the api in line with what task_add(9) provides. ok mpi@ matthew@ mikeb@ guenther@
2013-11-27get rid of the goop for maintaining multiple cftables since theresDavid Gwynne
no current code there to add or remove them. such code was put in 17 years ago, disabled 14 years ago, and removed 11 years ago, so i suspect we dont really need it or the goop to support it. very ok miod@
2013-11-261 << 31 cleanup. Eitan Adler pointed out that there has been aTheo de Raadt
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
2013-11-26compare pointers to NULLDavid Gwynne
2013-11-25Fix infinite loop pointed out by clang/brad.Matthew Dempsky
ok guenther
2013-11-25rename magicnumber to globalsleepaddrTed Unangst
2013-11-25disable %n in printf(9); there is no need for it in the kernel besidesDamien Miller
making format-string vulnerabilities exploitable; inspired by similar change made by Kees Cook to Linux; ok deraadt@
2013-11-21remove the #define b_cylinder b_resid from bufs. i hated theDavid Gwynne
overloading of that thing. the only hardware that seems to care about cylinders in our tree are floppy drives, and the drivers for those calculate their own cylinders from logical block addresses and ignore whatever the rest of the kernel thought b_cylinders should be. most of this diff is moving the floppy drivers to using b_resid as a resid and using that as part of the calculation for real cylinder values. the rest of the diff is getting rid of the useless assignments to b_cylinder that dont get used by anything (now that disksort is gone). ok miod@
2013-11-20now that all the direct users of disksort have been removed, we can nowDavid Gwynne
safely remove disksort. most hardware and pretty much all of the kernel has moved to logical block addressing when dealing with disks, so the assumptions disksort was built against arent useful these days. it also has bad edge cases with lots of sequential writes being able to starve other io requests in the system. these issues have been addressed by becks nscan implementation, which disksort was previously deprecated in favour of. this removes the guts of disksort and the bufq wrapper around it. ok miod@
2013-11-18hack in a global rendezvous for interprocess semaphores to useTed Unangst
2013-11-18simplify kthread_create(). no more stdargTheo de Raadt
ok matthew guenther mikeb
2013-11-18panic expects a format stringTheo de Raadt
2013-11-14Use (N * sizeof(struct klist)) instead of (N * sizeof(struct klist *))Charles Longeau
when malloc'ing struct klist *. Similar diff found upstream: http://svnweb.freebsd.org/base?view=revision&revision=197575 Found by LLVM/Clang Static Analyzer. ok tedu@ krw@ guenther@
2013-11-09Remove hibernate_get_next_rle function (unused, and we need to redo itMike Larkin
anyway as we move toward a streamed implmentation)
2013-11-09Add KASSERT()s to tsleep() and msleep() to verify that bogus flagsPhilip Guenther
aren't being passed to them. Fix UVM_WAIT() to not pass PNORELOCK to tsleep(), as that flag only does something with msleep(). ok beck@ dlg@
2013-11-09ticks is compared against mcl_grown to see if time has elapsed sinceDavid Gwynne
the rx ring was last allowed to grow and then assigned to it. it is erroneous to do this because mcl_grown is a u_int and ticks is an int. this makes mcl_grown an int, and follows the idiom in kern_timeout.c of going "thing - ticks < diff", which better copes with ticks wrapping around and being used to calculate relative intervals. ok pirofti@ guenther@
2013-11-09unbias the chunks and chunktable writing and reading. as a result, itTheo de Raadt
is now possible to move the chunktable right after the chunks, not at the end of the swap. ok mlarkin
2013-11-06simplify a crazy expressionTheo de Raadt
2013-11-06In hibernate_write_chunks(), keep track of relative block numbers insteadTheo de Raadt
of absolute, so that we can add range checking. ok mlarkin
2013-11-06spacingTheo de Raadt
2013-11-06return the known error, instead of EIOTheo de Raadt
2013-11-06shorten dev_t in hib_infoTheo de Raadt
2013-11-06shorten variable name for the hibernate info struct, throughout. MuchTheo de Raadt
easier to read now. ok mlarkin