summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Reparent a kernel thread to init during kthread_exit() so that the zombiejhb2000-10-191-0/+1
| | | | can be reaped.
* o Introduce new VOP_ACCESS() flag VADMIN, allowing file systems to performrwatson2000-10-192-0/+10
| | | | | | | | | | | | | | | | | | | | "administrative" authorization checks. In most cases, the VADMIN test checks to make sure the credential effective uid is the same as the file owner. o Modify vaccess() to set VADMIN as an available right if the uid is appropriate. o Modify references to uid-based access control operations such that they now always invoke VOP_ACCESS() instead of using hard-coded policy checks. o This allows alternative UFS policies to be implemented by replacing only ufs_access() (such as mandatory system policies). o VOP_ACCESS() requires the caller to hold an exclusive vnode lock on the vnode: I believe that new invocations of VOP_ACCESS() are always called with the lock held. o Some direct checks of the uid remain, largely associated with the QUOTA and SUIDDIR code. Reviewed by: eivind Obtained from: TrustedBSD Project
* Axe the idle_event eventhandler, and add a MD cpu_idle function usedjhb2000-10-191-4/+3
| | | | | | for things such as halting CPU's, idling CPU's, etc. Discussed with: msmith
* EVENTHANDLER_INVOKE() takes two arguments.peter2000-10-181-1/+1
|
* Don't needlessly pass the diagnostic counter to the idle_event eventjhb2000-10-181-1/+1
| | | | handlers.
* Add new bus method 'GET_RESOURCE_LIST' and appropriate genericmdodd2000-10-182-0/+101
| | | | | | | | | | implementation. Add bus_generic_rl_{get,set,delete,release,alloc}_resource() functions which provide generic operations for devices using resource list style resource management. This should simplify a number of bus drivers. Further commits to follow.
* - Wrap the sanity checks for staying in the idle loop for absurdly longjhb2000-10-171-6/+12
| | | | | amounts of time in #ifdef DIAGNOSTIC - Call vm_page_zero_idle() during the idle loop.
* Implement resource alignment as discussed in arch@ a long time ago.imp2000-10-171-1/+23
| | | | | | | This was implemented by Shigeru YAMAMOTO-san and Jonathan Chen. I've cleaned them up somewhat and they seem to work well enough to boot current (but given current's state it can be hard to tell). Doug Rabson also reviewed the design and signed off on it.
* Put the header section in the header file not the c file.n_hibma2000-10-151-1/+1
| | | | | Submitted by: Jonathan Chen <jon@spock.org> PR: 21982
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Add nmbcnt sysctl and make it tunable at boottime; nmbcnt is thebmilekic2000-10-151-1/+5
| | | | | | | | | | | | | number of ext_buf counters that are possibly allocatable. Do this because: (i) It will make it easier to influence EXT_COUNTERS for if_sk, if_ti (or similar) users where the driver allocates its own ext_bufs and where it is important for the mbuf system to take it into account when reserving necessary space for counters. (ii) Facilitate some percentile calculation for netstat(1)
* Remove the signal value check from the PT_STEP codepath. Itjwd2000-10-141-1/+1
| | | | | | | can cause an bogus failure. Reviewed by: Sean Eric Fagan <sef@kithrup.com> and no other response to the review request.
* savectx() is now used exclusively by the crash dump system. Move thepeter2000-10-131-3/+0
| | | | | i386 specific gunk (copy %cr3 to the pcb) from the MI dumpsys() to the MD savectx().
* Do not allocate a callout for all crashdumps, not just when you panic.ps2000-10-131-1/+2
|
* o Simplify capability types away from an array of ints to a singlerwatson2000-10-131-2/+9
| | | | | | | | | | | | | | | | | | u_int64_t flag field, bounding the number of capabilities at 64, but substantially cleaning up capability logic (there are currently 43 defined capabilities). o Heads up to anyone actually using capabilities: the constant assignments for various capabilities have been redone, so any persistent binary capability stores (i.e., '$posix1e.cap' EA backing files) must be recreated. If you have one of these, you'll know about it, so if you have no idea what this means, don't worry. o Update libposix1e to reflect this new definition, fixing the exposed functions that directly manipulate the flags fields. Obtained from: TrustedBSD Project
* For lockmgr mutex protection, use an array of mutexes that are allocatedjasone2000-10-122-22/+87
| | | | | | | | | and initialized during boot. This avoids bloating sizeof(struct lock). As a side effect, it is no longer necessary to enforce the assumtion that lockinit()/lockdestroy() calls are paired, so the LK_VALID flag has been removed. Idea taken from: BSD/OS.
* Add a gross hack for ia64 to allocate the backing store for a new program.dfr2000-10-121-0/+16
|
* Blow away the v_specmountpoint define, replacing it with what it waseivind2000-10-092-4/+4
| | | | defined as (rdev->si_mountpoint)
* Do not call lockdestroy() for v_vnlock, which may point to a lock in ajasone2000-10-062-8/+2
| | | | | | deeper vfs stacking layer. Submitted by: bp
* Correct a warning where the r_debug_state() dummy function used to triggerjhb2000-10-062-6/+12
| | | | | | a breakpoint in the kernel didn't use the proper argument list. To avoid having to include the userland link.h header everyhwere that sys/linker.h is used, make r_debug_state() a static function in link_elf.c as well.
* - Change fast interrupts on x86 to push a full interrupt frame and tojhb2000-10-064-33/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | return through doreti to handle ast's. This is necessary for the clock interrupts to work properly. - Change the clock interrupts on the x86 to be fast instead of threaded. This is needed because both hardclock() and statclock() need to run in the context of the current process, not in a separate thread context. - Kill the prevproc hack as it is no longer needed. - We really need Giant when we call psignal(), but we don't want to block during the clock interrupt. Instead, use two p_flag's in the proc struct to mark the current process as having a pending SIGVTALRM or a SIGPROF and let them be delivered during ast() when hardclock() has finished running. - Remove CLKF_BASEPRI, which was #ifdef'd out on the x86 anyways. It was broken on the x86 if it was turned on since cpl is gone. It's only use was to bogusly run softclock() directly during hardclock() rather than scheduling an SWI. - Remove the COM_LOCK simplelock and replace it with a clock_lock spin mutex. Since the spin mutex already handles disabling/restoring interrupts appropriately, this also lets us axe all the *_intr() fu. - Back out the hacks in the APIC_IO x86 cpu_initclocks() code to use temporary fast interrupts for the APIC trial. - Add two new process flags P_ALRMPEND and P_PROFPEND to mark the pending signals in hardclock() that are to be delivered in ast(). Submitted by: jakeb (making statclock safe in a fast interrupt) Submitted by: cp (concept of delaying signals until ast())
* Various whitespace cleanups after the SMPng commit, which jumbled thingsjhb2000-10-061-19/+19
| | | | around a bit in the trap handling code.
* Don't treat a kernel stack fault the same as a general protect fault orjhb2000-10-061-0/+3
| | | | a segment not present fault in the non-vm86 case.
* - Heavyweight interrupt threads on the alpha for device I/O interrupts.jhb2000-10-053-20/+227
| | | | | | | | | | | - Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures. Submitted by: dfr
* Style fixes based on comments by bdeeivind2000-10-052-40/+62
|
* Add a workaround for statically linked kernels.dfr2000-10-041-0/+6
|
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-0411-191/+239
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Move KASSERTs which checks value of v_usecount after vnode locking, sobp2000-10-022-4/+8
| | | | it will not produce wrong alarms.
* Treat %X the same as %x (not entirely correct, but close enough).msmith2000-10-021-0/+1
|
* Big mbuf subsystem diff #1: incorporate mutexes and fix things up somewhatbmilekic2000-09-301-254/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to accomodate the changes. Here's a list of things that have changed (I may have left out a few); for a relatively complete list, see http://people.freebsd.org/~bmilekic/mtx_journal * Remove old (once useful) mcluster code for MCLBYTES > PAGE_SIZE which nobody uses anymore. It was great while it lasted, but now we're moving onto bigger and better things (Approved by: wollman). * Practically re-wrote the allocation macros in sys/sys/mbuf.h to accomodate new allocations which grab the necessary lock. * Make sure that necessary mbstat variables are manipulated with corresponding atomic() routines. * Changed the "wait" routines, cleaned it up, made one routine that does the job. * Generalized MWAKEUP() macro. Got rid of m_retry and m_retryhdr, as they are now included in the generalized "wait" routines. * Sleep routines now use msleep(). * Free lists have locks. * etc... probably other stuff I'm missing... Things to look out for and work on later: * find a better way to (dynamically) adjust EXT_COUNTERS * move necessity to recurse on a lock from drain routines by providing lock-free lower-level version of MFREE() (and possibly m_free()?). * checkout include of mutex.h in sys/sys/mbuf.h - probably violating general philosophy here. The code has been reviewed quite a bit, but problems may arise... please, don't panic! Send me Emails: bmilekic@freebsd.org Reviewed by: jlemon, cp, alfred, others?
* Add ia64 support.dfr2000-09-291-1/+1
|
* Don't support dynamic linking on ia64 for now - the tools can't cope.dfr2000-09-292-0/+12
|
* Change the conditionaal so that we only build this on i386 instead ofdfr2000-09-291-1/+1
| | | | trying to build it on all non-alpha arches.
* Check so_error in filt_so{read|write} in order to detect UDP errors.jlemon2000-09-281-0/+4
| | | | PR: 21601
* Do the right thing if bdevvp is called twice for the same device.mckusick2000-09-272-0/+4
| | | | Obtained from: Poul-Henning Kamp <phk@freebsd.org>
* aio_qphysio: Eliminate one instance of an out-of-range check that isalc2000-09-261-18/+3
| | | | | | | | performed twice. Eliminate initialization that is already performed by _aio_aqueue. aio_physwakeup: Eliminate redundant synchronization that is already performed by bufdone.
* Make size of dynamic loader argument variable to supporttakawata2000-09-261-14/+22
| | | | | | various executable file format. Reviewed by: peter
* Add a lock structure to vnode structure. Previously it was either allocatedbp2000-09-253-60/+28
| | | | | | | | | | | | | | | | | | | separately (nfs, cd9660 etc) or keept as a first element of structure referenced by v_data pointer(ffs). Such organization leads to known problems with stacked filesystems. From this point vop_no*lock*() functions maintain only interlock lock. vop_std*lock*() functions maintain built-in v_lock structure using lockmgr(). vop_sharedlock() is compatible with vop_stdunlock(), but maintains a shared lock on vnode. If filesystem wishes to export lockmgr compatible lock, it can put an address of this lock to v_vnlock field. This indicates that the upper filesystem can take advantage of it and use single lock structure for entire (or part) of stack of vnodes. This field shouldn't be examined or modified by VFS code except for initialization purposes. Reviewed in general by: mckusick
* Add a KASSERT() to catch instances where the mutex that we pass in tojhb2000-09-241-0/+2
| | | | | | msleep() are recursed. Suggested by: cp
* Move MAXCPU from machine/smp.h to machine/param.h to fix breakageps2000-09-231-2/+2
| | | | | with !SMP kernels. Also, replace NCPUS with MAXCPU since they are redundant.
* Don't #include <sys/proc.h>, since machine/mutex.h does it now.jasone2000-09-231-1/+1
|
* Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC,ps2000-09-221-36/+54
| | | | | | NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP. Reviewed by: peter
* o Introduce vn_extattr_rm(), a helper function in the style ofrwatson2000-09-221-0/+23
| | | | | | | | vn_extattr_get() and vn_extattr_set(). vn_extattr_rm() removes the specified extended attribute from a vnode, authorizing the change as the kernel (NULL cred). Obtained from: TrustedBSD Project
* Style fixes:eivind2000-09-222-104/+214
| | | | | | | | | | * Add lots of comments * Convert a couple of assertions to KASSERT() * Minimal whitespace & misapplied {} fixes * Convert #if 0 to #if COMPILING_LINT for code we presently do not support, but want to keep available. Reviewed by: adrian, markm
* Staticize addalias()eivind2000-09-222-2/+4
|
* Create an event (idle_event) which is invoked every time around themsmith2000-09-221-0/+7
| | | | | idle loop. Machine-dependant code can elect to eg. take power-saving actions when this event is invoked.
* Make the EVENTHANDLER mechanism MP-safe. Events can now be invokedmsmith2000-09-221-3/+21
| | | | without holding the Giant lock.
* o Change locking rules for VOP_GETACL() to indicate that vnode locksrwatson2000-09-214-4/+13
| | | | | | | | | | must be held when retrieving ACLs from vnodes. This is required for EA-based UFS ACL implementations. o Update vacl_get_acl() so that it does appropriate vnode locking. o Remove static from M_ACL malloc define so that it is accessible for consumers of ACLs other than in kern_acl.c Obtained from: TrustedBSD Project
* comment vfs_export functions, requested by: eivindalfred2000-09-212-2/+24
|
* Remove unneeded #include that was a remnant of an earlier version oftruckman2000-09-211-1/+0
| | | | | | my uidinfo patch. Found by: phk
OpenPOWER on IntegriCloud