summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_xxx.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* retguard has now replaced the stack protector on clang architectures,deraadt2019-04-021-2/+2
| | | | | | the kernel does not need a __stack_smash_handler function. WARNING: You need a fairly new clang, approximately > March 31. with mortimer
* When we are rebooting, do not fail in uvn_io(). The vnodes arebluhm2018-03-081-1/+5
| | | | | | | | revoked while syncing disk, so the processes lose their executable pages. Instead of killing them with a SIGBUS after page fault, just sleep. This should prevent that init dies without pages followed by a kernel panic. initial diff from tedu@; OK deraadt@ tedu@
* Remove almost unused `flags' argument of suser().mpi2018-02-191-2/+2
| | | | | | | The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
* p_comm is the process's command and isn't per thread, so move it fromguenther2017-01-211-6/+10
| | | | | | struct proc to struct process. ok deraadt@ kettenis@
* Include sys/proc.h when compiled with SYSCALL_DEBUG to get access topatrick2016-12-181-8/+9
| | | | | | | struct proc. Also bump the printf of "code" to %ld and remove a few casts to long as register_t is always long. ok kettenis@
* Display/test/use the process PID, not the thread's TID, in a few places.guenther2016-10-051-3/+3
| | | | ok mpi@ mikeb@
* Write the system time back to the RTC every 30 minutes.naddy2016-09-031-1/+3
| | | | | | | This fixes the problem that long-running machines which were not shut down properly would reboot with a badly offset system time. hints and ok kettenis@
* remove stale lint annotationstedu2015-12-051-2/+1
|
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-3/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* reboot(9): Add MI reboot entry functionuebayasi2014-07-111-2/+12
| | | | | | | | 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@
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-2/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Move p_emul and p_sigcode from proc to process.guenther2014-03-261-3/+3
| | | | | | | | | Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
* Move the common bits of syscall invocation and return handling intoguenther2012-08-071-3/+4
| | | | | | | | | | an MI file, <sys/syscall_mi.h>, correcting inconsistencies and the handling when copyin() of arguments fails. Tested on i386, amd64, sparc64, and alpha (thanks naddy@) Any issues with other platforms will be fixed in tree. header name from millert@; ok miod@
* In reboot, no need to sched_peg_curproc() to the primary, becausederaadt2012-07-091-19/+2
| | | | | sched_stop_secondary_cpus() leaves us on the only cpu which is left. ok kettenis haesbaert guenther
* Revert art@'s moving around of the KERNEL_LOCK()/KERNEL_UNLOCK() calls,guenther2011-07-111-9/+3
| | | | | | as it causes hangs in some ports, including libsigsegv's configure script confirmed by krw@, landry@
* There is a bunch of places in the kernel entry points where we don'tart2011-07-071-3/+9
| | | | | | | | | | | hold the kernel lock, but still need call one function that needs it. Instead of grabbing the lock all over the place, move the locks into the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret, systrace_redirect and ADDUPROF. In the cases we already hold the biglock we'll just recurse. kettenis@, beck@ ok
* if_downall() cannot be done MI in sys_reboot() because vfs_shutdown()deraadt2011-06-261-3/+1
| | | | | might need network (ie. nfs). Move the call to the MD boot() routines. This cause for boot hangs diagnosed by kettenis.
* more #ifdef needed for the case of not pegging on a non-MP kernelderaadt2010-07-281-1/+3
|
* It's pretty pointless to peg ourselves to the primary CPU if that's thekettenis2010-07-281-2/+2
| | | | | | only one we have. ok krw@, deraadt@
* Implement functions to take away the secondary CPUs from the scheduler andkettenis2010-04-061-23/+4
| | | | | | | give them back again, effectively stopping and starting these CPUs. Use the stop function in sys_reboot(). ok marco@, deraadt@
* Add code to stop scheduling processes on CPUs, effectively halting that CPU.kettenis2010-01-091-1/+24
| | | | | | | Use this to do a shutdown with only the boot processor running. This should avoid nasty races during shutdown. help from art@, ok deraadt@, miod@
* Backout previous commit. There is a possible race which makes it possiblekettenis2009-11-291-19/+2
| | | | for sys_reboot() to hang forever.
* Add a mechanism to stop the scheduler from scheduling processes on akettenis2009-11-251-2/+19
| | | | | | | particular CPU such that it just sits and spins in the idle loop, effectively halting that CPU. ok deraadt@, miod@
* At sys_reboot time, bring all the interfaces down so that their xxstopderaadt2009-08-101-1/+5
| | | | | | | functions are called, which will turn off DMA. Receiving packets into your memory after a system reboot is pretty nasty. This will also mean that the shutdown hooks can go; this solution is smaller. ok henning miod dlg kettenis
* Make sure that sys_reboot runs on the primary cpu. Won't hurt when notart2009-04-031-1/+17
| | | | needed, but some machines seem to work much better with it.
* ansi/deregister.jsg2005-11-281-13/+4
| | | | 'go for it' deraadt@
* change arguments to suser. suser now takes the process, and a flagstedu2003-08-151-2/+2
| | | | | | | | | argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Add option NO_PROPOLICE, which explicitely disables the use of the propolicemiod2003-05-131-2/+3
| | | | | | | | stack protection when building kernels. Intended to be used on installation media, with tight space constraints - currently, only added where SMALL_KERNEL was already defined. Not thoroughly tested, but requested by deraadt.
* support for propolice in the kernel.tedu2003-05-131-1/+10
| | | | | | some style input itojun@ tdeval@ toby@ tested, mostly by deraadt, on i386, macppc, vax, sparc64 ok deraadt@ miod@
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+2
| | | | (Look ma, I might have broken the tree)
* fix syscall debuggingderaadt1996-08-261-3/+3
|
* sync syscalls, no sys/cpu.hderaadt1996-05-021-3/+2
|
* From NetBSD: 960217 mergeniklas1996-03-031-3/+4
|
* initial import of NetBSD treederaadt1995-10-181-0/+137