summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* o Merge contents of struct pcred into struct ucred. Specifically, add therwatson2001-05-2533-368/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the real uid, only rename it to cr_ruidinfo so as not to conflict with cr_uidinfo, which corresponds to the effective uid. o Remove p_cred from struct proc; add p_ucred to struct proc, replacing original macro that pointed. p->p_ucred to p->p_cred->pc_ucred. o Universally update code so that it makes use of ucred instead of pcred, p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo, cr_{r,sv}{u,g}id instead of p_*, etc. o Remove pcred0 and its initialization from init_main.c; initialize cr_ruidinfo there. o Restruction many credential modification chunks to always crdup while we figure out locking and optimizations; generally speaking, this means moving to a structure like this: newcred = crdup(oldcred); ... p->p_ucred = newcred; crfree(oldcred); It's not race-free, but better than nothing. There are also races in sys_process.c, all inter-process authorization, fork, exec, and exit. o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid; remove comments indicating that the old arrangement was a problem. o Restructure exec1() a little to use newcred/oldcred arrangement, and use improved uid management primitives. o Clean up exit1() so as to do less work in credential cleanup due to pcred removal. o Clean up fork1() so as to do less work in credential cleanup and allocation. o Clean up ktrcanset() to take into account changes, and move to using suser_xxx() instead of performing a direct uid==0 comparision. o Improve commenting in various kern_prot.c credential modification calls to better document current behavior. In a couple of places, current behavior is a little questionable and we need to check POSIX.1 to make sure it's "right". More commenting work still remains to be done. o Update credential management calls, such as crfree(), to take into account new ruidinfo reference. o Modify or add the following uid and gid helper routines: change_euid() change_egid() change_ruid() change_rgid() change_svuid() change_svgid() In each case, the call now acts on a credential not a process, and as such no longer requires more complicated process locking/etc. They now assume the caller will do any necessary allocation of an exclusive credential reference. Each is commented to document its reference requirements. o CANSIGIO() is simplified to require only credentials, not processes and pcreds. o Remove lots of (p_pcred==NULL) checks. o Add an XXX to authorization code in nfs_lock.c, since it's questionable, and needs to be considered carefully. o Simplify posix4 authorization code to require only credentials, not processes and pcreds. Note that this authorization, as well as CANSIGIO(), needs to be updated to use the p_cansignal() and p_cansched() centralized authorization routines, as they currently do not take into account some desirable restrictions that are handled by the centralized routines, as well as being inconsistent with other similar authorization instances. o Update libkvm to take these changes into account. Obtained from: TrustedBSD Project Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
* Fix DMA on machines with more than 128MB.scottl2001-05-251-1/+1
| | | | | Obtained from: cg MFC after: 5 days
* Make if_tun's clone create SI_CHEAPCLONE devices.phk2001-05-251-0/+1
|
* Make the PTY drivers cloning algorithm create "CHEAPCLONE" dev_t,phk2001-05-251-11/+12
| | | | so that some twit cannot allocate all 256 PTY's with "ls -l".
* + Turn on SMP support by default (yes an Alpha SMP kernel works onobrien2001-05-252-0/+14
| | | | | uniprocessor systems, aren't Alpha's neat :-)) + Add example KTR (debugging) options.
* Don't lie to diskerr() now that it listens to us.phk2001-05-252-10/+0
|
* Use the name given to the dev_t, rather than creating our own.phk2001-05-251-1/+2
| | | | | This makes it possible to give sensible information for /dev/fd.720 and similar "special" devices.
* Submitted by: Juha-Matti Liukkonen (Cubical Solutions Ltd) (jml@cubical.fi)hm2001-05-2523-51/+4646
| | | | | | Add a CAPI (hardware independent) driver i4bcapi(4) and hardware driver iavc (4) to support active CAPI-based BRI and PRI cards (currently AVM B1 and T1 cards) to isdn4bsd.
* - sys/msdosfs moved to sys/fs/msdosfsru2001-05-2524-7999/+39
| | | | | - msdos.ko renamed to msdosfs.ko - /usr/include/msdosfs moved to /usr/include/fs/msdosfs
* Add intrack field to each slot. This can be used to acknowledgeimp2001-05-252-0/+4
| | | | | | | interrupts on other buses. Right now it isn't used, but will be for the pci attachment. # Add copyright by me for this year since I've changed so much.
* Minor name space issues.imp2001-05-251-19/+20
|
* Don't rely on cdevsw_add() when we hack about with dev_t's.phk2001-05-241-0/+2
|
* Don't take the detour around devsw() to find out if the proto-cdevswphk2001-05-241-3/+1
| | | | is already initialized.
* Oops. Unremove vestiges of the old, broken sound drivers. They are nowbde2001-05-243-0/+1580
| | | | used in new drivers.
* whitespace/stylealfred2001-05-241-1/+2
|
* Stick VM syscalls back under Giant if the BLEED option is not defined.jhb2001-05-242-0/+57
|
* Add a new kernel option 'BLEED' to be used for code that is still underjhb2001-05-241-0/+1
| | | | | | development but is being developed in the tree for whatever reason. Not objected to by: peter, jlemon
* Remove vestiges of the old, broken sound drivers.bde2001-05-243-1580/+0
|
* Actually rename FDESC, PORTAL, UMAP and UNION file systems.ru2001-05-244-4/+4
| | | | OK'ed by: bp
* mount_umap(8) -> mount_umapfs(8).ru2001-05-241-1/+1
|
* mount_null(8) -> mount_nullfs(8).ru2001-05-241-4/+4
|
* (Re-)enabled boot2.nyan2001-05-241-1/+1
|
* Update boot[12] program to compile ELF binary.nyan2001-05-246-117/+92
| | | | | Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> and kawanobe@st.rim.or.jp (Kawanobe Koh)
* Restrict even further what parts of <sys/conf.h> can be seen fromphk2001-05-242-4/+12
| | | | userland.
* Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files.obrien2001-05-243-2/+14
| | | | Do the same for the non-wcs*/wmem* files while I'm here.
* This patch implements O_DIRECT about 80% of the way. It takes a patchsetdillon2001-05-2410-15/+88
| | | | | | | | | | | | | | | | Tor created a while ago, removes the raw I/O piece (that has cache coherency problems), and adds a buffer cache / VM freeing piece. Essentially this patch causes O_DIRECT I/O to not be left in the cache, but does not prevent it from going through the cache, hence the 80%. For the last 20% we need a method by which the I/O can be issued directly to buffer supplied by the user process and bypass the buffer cache entirely, but still maintain cache coherency. I also have the code working under -stable but the changes made to sys/file.h may not be MFCable, so an MFC is not on the table yet. Submitted by: tegge, dillon
* Use bus_space functions rather than inb/outb.imp2001-05-245-20/+28
| | | | | | | Add defines for PCIC_INDEX and PCIC_DATA offsets. Change PCIC_INDEX_0 to PCIC_PORT_0 Add define for PCIC_NPORT. Document why the vadem probe works.
* Produce a config-time warning about EXT2FS and GPL_MATH_EMULATEpeter2001-05-242-2/+4
|
* Remove DEV_SNP -> opt_snp.hpeter2001-05-241-1/+0
| | | | Forgotten by: dd
* Do what we should have done a long time ago:imp2001-05-241-0/+10
| | | | | | | | | | | o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_PCMCIA and programming interface is 0, assume that it is a generic PCMCIA PCI chip we can program. I don't think there are any of these that we don't know about, but you never know. o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_CARDBUS and programming interface is 0, assume that it is a YENTA cardbus bridge that we know how to cope with. There are likely some cardbus bridges that haven't it made it in here yet.
* Move getb1 and putb1 from pcic_isa.c to pcic.c. Rename them toimp2001-05-243-22/+24
| | | | | | pcic_{get,put}b_io. There are some pci bridges (the CL-PD6729 and maybe others) that do not have memory mapped registers, so we'll need these in both places. Declare them in pcicvar.h.
* Add snp_olddisc member to struct snoop; the linedisc'ized snp(4) uses this.dd2001-05-241-0/+1
| | | | Pointy hat to: dd
* Correct style bugs with regards to long lines and comments.dd2001-05-231-15/+22
| | | | Reviewed by: bde
* Build snp(4) as a module.dd2001-05-231-2/+2
|
* Change #if VINUMDEBUG to #ifdef VINUMDEBUG. This is a flag, not a variable.grog2001-05-238-31/+27
|
* Don't acquire Giant just to call trap_fatal(), we are about to panicjhb2001-05-233-12/+0
| | | | | anyway so we'd rather see the printf's then block if the system is hosed.
* Don't release Giant around vm_oject_page_clean() in fsync() as the pagerjhb2001-05-232-4/+0
| | | | putpages called will need Giant.
* - Assert Giant is held in the vnode pager methods.jhb2001-05-231-14/+18
| | | | | - Lock the VM while walking down a vm_object's backing_object list in vnode_pager_lock().
* - Add in several asserts of vm_mtx.jhb2001-05-231-5/+42
| | | | | | | | | - Assert Giant in vm_pageout_scan() for the vnode hacking that it does. - Don't hold vm_mtx around vget() or vput(). - Lock Giant when calling vm_pageout_scan() from the pagedaemon. Also, lock curproc while setting the P_BUFEXHAUST flag. - For now we still hold Giant for all of the vm_daemon. When process limits are locked we will be only need Giant for swapout_procs().
* - Assert that the vm lock is held for all of _vm_object_allocate().jhb2001-05-231-31/+48
| | | | | | | | | | | | | | - Restore the previous order of setting up a new vm_object. The previous had a small bug where we zero'd out the flags after we set the OBJ_ONEMAPPING flag. - Add several asserts of vm_mtx. - Assert Giant is held rather than locking and unlocking it in a few places. - Add in some #ifdef objlocks code to lock individual vm objects when vm objects each have their own lock someday. - Don't bother acquiring the allproc lock for a ddb command. If DDB blocked on the lock, that would be worse than having an inconsistent allproc list.
* - Add lots of vm_mtx assertions.jhb2001-05-231-2/+39
| | | | | | | - Add a few KTR tracepoints to track the addition and removal of vm_map_entry's and the creation adn free'ing of vmspace's. - Adjust a few portions of code so that we update the process' vmspace pointer to its new vmspace before freeing the old vmspace.
* - Lock the VM around the pmap_swapin_proc() call in faultin().jhb2001-05-231-15/+16
| | | | | | | | | | | | | | | - Don't lock Giant in the scheduler() function except for when calling faultin(). - In swapout_procs(), lock the VM before the proccess to avoid a lock order violation. - In swapout_procs(), release the allproc lock before calling swapout(). We restart the process scan after swapping out a process. - In swapout_procs(), un #if 0 the code to bump the vmspace reference count and lock the process' vm structures. This bug was introduced by me and could result in the vmspace being free'd out from under a running process. - Fix an old bug where the vmspace reference count was not free'd if we failed the swap_idle_threshold2 test.
* - Fix the sw_alloc_interlock to actually lock itself when the lock isjhb2001-05-231-16/+20
| | | | | | | acquired. - Assert Giant is held in the strategy, getpages, and putpages methods and the getchainbuf, flushchainbuf, and waitchainbuf functions. - Always call flushchainbuf() w/o the VM lock.
* Assert Giant is held for the device pager alloc and getpages methods sincejhb2001-05-231-3/+3
| | | | we call the mmap method of the cdevsw of the device we are mmap'ing.
* Assert Giant is held by the caller rather than getting it and releasingjhb2001-05-232-20/+4
| | | | it in getpages/putpages.
* - Always call bfreekva() w/o vm_mtx held.jhb2001-05-231-28/+12
| | | | | | | - Always call vfs_setdirty() with vm_mtx held. - Fix an old comment: vm_hold_unload_pages is called vm_hold_free_pages() nowadays. - Always call vm_hold_free_pages() w/o vm_mtx held.
* Don't acquire/release Giant around some of the places that need it injhb2001-05-231-2/+1
| | | | spec_getpages(). Instead, assert that Giant is held by the caller.
* - Obtain Giant in mmap() syscall while messing with file descriptors andjhb2001-05-231-18/+32
| | | | | | | | | | | vnodes. - Fix an old bug that would leak a reference to a fd if the vnode being mmap'd wasn't of type VREG or VCHR. - Lock Giant in vm_mmap() around calls into the VM that can call into pager routines that need Giant or into other VM routines that need Giant. - Replace code that used a goto to jump around the else branch of a test to use an else branch instead.
* pmap_mapdev needs the vm_mtx, aquire it if not already lockedalfred2001-05-232-0/+16
|
* lock vm while playing with pmapalfred2001-05-232-0/+18
|
OpenPOWER on IntegriCloud