summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a compile-time option called SPLASSERT_WATCH which changes theanton2019-05-081-1/+5
| | | | | | | default value of kern.splassert to 3, i.e. enter ddb on splassert() failure. Will be used during fuzzing. ok mpi@ visa@
* irrelevant part snuck into previous commit; from semariederaadt2018-10-291-2/+1
|
* Correctly deal with upper level unveil's by keeping track of the coveringbeck2018-10-281-1/+2
| | | | | | | unveil for each unveil in the process at unveil() time, and refactoring the handling of current directory and ISDOTDOT to be much more sensible. Worked out at ns2k18 with guenther@. ok deraadt@
* Do not call logwakeup(), ending in wakeup_n(), while holding a mutex.mpi2018-04-101-5/+11
| | | | | | | | Prevents a lock ordering issue between SCHED_LOCK() and printf(9)'s mutex. While here protect all kprintf() calls ending on the console with the mutex. ok kettenis@, visa@
* Do not panic from ddb(4) when a lock requirement isn't fulfilled.mpi2018-03-201-1/+3
| | | | | | | | | | | Extend the logic already present for panic() to any DDB-related operation such that if ddb(4) is entered because of a fault or other trap it is still possible to call 'boot reboot'. While here stop printing splassert() messages as well, to not fill the buffer. ok visa@, deraadt@
* Show uvm_fault and trace when typing show panic on a page fault'd kernelpirofti2018-01-051-1/+2
| | | | | | | Currently there is only support for amd64, if this change settles I will add support for the rest of the architectures. OK kettenis@.
* Delete unnecessary <sys/file.h> includesguenther2017-12-301-2/+1
| | | | ok millert@ krw@
* Rename Debugger() into db_enter().mpi2017-04-301-3/+3
| | | | | | | Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
* Unifdef KGDB.mpi2017-04-301-7/+1
| | | | | | It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
* Unifdef KADB.mpi2017-04-271-5/+1
| | | | ok deraadt@
* Tweak lock inits to make the system runnable with witness(4)visa2017-04-201-2/+3
| | | | on amd64 and i386.
* Allow sendsyslog(2) with LOG_CONS even when /dev/console has notbluhm2016-05-171-2/+1
| | | | | | | been opened during init(8). Only log with cnwrite() if cn_devvp exists, otherwise use cnputc() as fallback. While there move extern declarations to dev/cons.h. input and OK deraadt@
* Delete the final, inscrutable NOSTRICT and VARARGS lint commentsguenther2015-09-291-2/+1
| | | | ok millert@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Add dmesg -s support, to view the output of rc(8) system startup messages.mpf2015-01-131-2/+2
| | | | | Help and feedback by Theo and Miod. OK deraadt@, manpage-ok jmc@
* KASSERTMSG(9): New kernel assertion with messageuebayasi2014-07-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | KASSERT() is annoying as it only prints the expression as a string. If you (developers) want to know a little more information, you have to do: #ifdef DIAGNOSTIC if (bad) panic(...); #endif KASSERTMSG() replaces it into a single line: KASSERTMSG(!bad, ...); Taken from NetBSD. (There is a concern that KASSERT() messages are too long; consume more memory, and not friendly for small monitors. This have to be considered & revisited later.) "Like" from henning@ Man page review & advices from jmc@ and schwarze@
* reboot(9): Add MI reboot entry functionuebayasi2014-07-111-2/+3
| | | | | | | | Now, for kernel to "reboot" (reboot, halt, or shutdown), MD boot(9) is called in some places. This change introduces a new MI function reboot(9) which is simply a wrapper to call MD boot(9). OK kettenis@ deraadt@
* Add db_vprintf(), and then use it in ACPI's db_disprint() instead ofguenther2013-12-121-6/+13
| | | | | | formatting into a local buffer. ok miod@
* disable %n in printf(9); there is no need for it in the kernel besidesdjm2013-11-251-6/+7
| | | | | making format-string vulnerabilities exploitable; inspired by similar change made by Kees Cook to Linux; ok deraadt@
* After a panic, do not fill up the dmesg with splassert messages.bluhm2013-08-071-1/+4
| | | | | | They scroll away the important information. Disable splassert in panic(). OK deraadt@ uebayasi@ sthen@
* add support for %td for ptrdiff_t in kernel printfsf2013-07-031-1/+4
| | | | | | this also adds support in gcc 4.x kprintf format checks ok kettenis@
* do not include machine/cpu.h from a .c file; it is the responsibility ofderaadt2013-03-281-2/+1
| | | | | .h files to pull it in, if needed ok tedu
* Allow kernel printfs to go to console if in ddb instead of being redirecteddrahn2011-04-031-3/+14
| | | | to xconsole. ok deraadt@ guenther@
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-261-7/+9
| | | | | | | | | so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
* Do not disallow kernel crash dumps on panic if swap encryption is enabled,miod2008-06-271-8/+1
| | | | | | as dumpsys() will now clear the sensitive information. ok djm@ (and dumpsys changes too)
* Remove unused variable consintr. ok mbalmerbluhm2007-12-301-10/+3
|
* Introduce %z for printf(9), like %z for printf(3). Used to printray2007-10-081-1/+9
| | | | | | size_t and ssize_t variables. OK miod and cthulhu.
* Remove support for ddb-only %r, %z, and the ddb-specific handling of %n frommiod2007-09-011-66/+2
| | | | the kernel printf. This will allow support for the real %z in the near future.
* enable splassert (1) by default; requested and ok manyderaadt2007-04-261-2/+2
|
* allow bit 32 to be printed; bug spotted and fix tested by dlgderaadt2006-12-111-2/+2
|
* missing punctuation in comments; from bret lambertjmc2006-11-171-2/+2
|
* Make the ddb.log sysctl available as an in-ddb variable, $log, for consistency.miod2006-07-061-2/+2
|
* the bit shifted should be a type at least as wide as the comparison (u_quad_t)jason2006-06-011-2/+2
|
* extend %b support so that it will allow for arguments with more than 32 bits.jason2006-05-291-6/+24
|
* tprintf() is now only necessary for NFS, so do not compile it for kernelsmiod2005-12-271-1/+5
| | | | which like NFSSERVER and NFSCLIENT.
* ansi and deregister. No binary change.jsg2005-12-091-6/+3
|
* typo in comment: sprintf -> snprintf, ok markus@grunk2005-09-271-3/+3
|
* Try to start log message buffer on a new line. Helps install scripts avoidkrw2005-04-141-17/+3
| | | | | | detecting phantom devices when scanning dmesg output. Suggested by miod@, ok deraadt@.
* protect printf with a mutex instead of SIMPLELOCK.art2004-07-201-48/+10
|
* debranch SMP, have funniklas2004-06-131-1/+52
|
* put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosespie2004-01-031-2/+2
| | | | | | | to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
* Kill non-standard kernel printf %: braindead extension for good.miod2003-12-211-24/+1
| | | | ok markus@ drahn@
* option to log ddb output to kernel message buffer, via sysctl ddb.logtedu2003-06-281-3/+6
| | | | ok deraadt@ henric@ djm@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Add kern.splassert=3. deraadt@ ok.ho2003-05-291-1/+7
|
* typos in comments; From: Bengt Wessling <bengt@lemuria.org>, 10xhenning2003-05-271-2/+2
|
* remove sprintf() and vsprintf(). nothing in the kernel needs it. ifderaadt2003-05-221-43/+1
| | | | some module does -- tough -- they can rewrite it using the safer versions.
* Match vprintf prototype to userland and standards.art2003-05-211-4/+5
| | | | deraadt@ ok
* ansi and de-register; ok millertjason2003-05-201-33/+13
|
* Kill a bunch more commons (very few left =)jason2003-05-131-2/+2
|