summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Fix style inconsistencies in the last few commits.bde1995-05-071-30/+28
|
* Test the correct nonblocking flag in ttylclose(). IO_NDELAY is only validbde1995-05-071-2/+2
| | | | | | | | | | | | | in read() and write(). FNONBLOCK is valid in ioctl() and close(). The bug caused hung ptys when a process talked to itself using nonblocking i/o and exited while the slave pty had output to flush. ttywait() was called and hung. Signals didn't work because the process was exiting. `comcontrol /dev/ttyp0 drainwait 1' worked to terminate the wait. This shows that comcontrol is not limited to hardware control. It has no i386 or driver dependencies and doesn't belong in src/sbin/i386. Bruce
* Kludged around a problem with "cat /proc/0/regs" causing a panic bydg1995-05-041-1/+9
| | | | | | initializing proc0's frame base, too, using cpu_set_init_frame(). It's a kludge because that macro is intended to be used only for init, but does what we want nonetheless.
* Removed unused variable caused by last commit.dg1995-05-022-4/+4
|
* Fix for sync() to close a potential panic with accessing a mount structdg1995-05-022-6/+4
| | | | | | that had been freed. Submitted by: John Dyson
* When past cyl 1024 it's ok if CHS is (0xff,0xff,0xff).phk1995-05-011-3/+7
| | | | It's actually recommended it seems...
* Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller'sbde1995-04-301-17/+70
| | | | | | slice pointer and to print the device name in error messages. Finishing implementing DIOCSYNCSLICEINFO (except for locking).
* Added UIO_NOCOPY case to ureadc() to quiet gcc.dg1995-04-301-1/+3
|
* Check for curproc != NULL before dereferencing it.dg1995-04-301-5/+6
|
* set[ug]id(): call suser() only when neccesarryache1995-04-291-9/+9
| | | | Submitted by: bde
* Bruce is right - ENOTTY is more appropriate than EINVAL in this case.jkh1995-04-291-2/+2
|
* fixes the ioctl routine to not chew up massive amounts of kernel timejkh1995-04-291-2/+2
| | | | | | if an invalid ioctl is done on /dev/klog. logioctl() needs to return an errno instead of -1 on a failed ioctl. Submitted by: Mike Pritchard <mpp@mpp.com>
* Implement POSIX SAVED_IDS for setuid/setgidache1995-04-281-10/+17
|
* setre*(): simplify return scheme, pointed by Bruceache1995-04-281-23/+19
|
* Implement setreuid/setregid according to SunOS manpageache1995-04-271-23/+41
|
* Add ioctls DIOCGSLICEINFO and DIOCSYNCSLICEINFO. The latter isn'tbde1995-04-241-1/+24
| | | | finished or tested.
* Undo the move of `#include "sc.h"' etc. to cons.h. It broke anythingbde1995-04-241-1/+4
| | | | that includes <machine/cons.h>.
* Make bad144 debugging code conditional on ds_debug.bde1995-04-241-2/+2
|
* Declare the console switch functions completely.bde1995-04-231-14/+2
| | | | | Move declarations of console functions to cons.h (they should be config(8)ed).
* Make setreuid/setregid active syscallsache1995-04-234-16/+14
|
* Correct the type of the `acflag' arg to suser().bde1995-04-231-2/+2
|
* We will use /sbin/init on cdrom too.phk1995-04-231-5/+1
|
* Remove the slice for the first 63 sectors for the OnTrack case, it's uselessphk1995-04-201-12/+2
| | | | and nobody care about it anyway.
* Undo the stupidity I inflicted on these files and replace it withwpaul1995-04-201-72/+27
| | | | | | | | | | some (hopefully) less offensive stupidity: If we detect that a user has loaded a module that fails to initialize itself correctly, panic. There really isn't a safe way to recover from something like this; we can't know that the module is bad until after the entry point is called, by which time it's too late to do anything about it.
* Added support for disks which "OnTrack Disk Manager" has munged.phk1995-04-201-19/+58
| | | | | I suggest you do all partitioning using the OnTrack SW, to avoid confusing it.
* Couple of small cosmetic changes:wpaul1995-04-181-5/+7
| | | | | | | | | - Add $Id$ string. - Fix comment ("we might *not* be able to unload the module afterwards without panicking...") - Get rid of variable 'j' that I used in name checking for(;;) loop and use 'i' instead (I thought there'd be a problem with this, but there isn't).
* Fix module handling to stop oddball modules (if_ppp_mod, if_sl_mod,wpaul1995-04-181-7/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if_tun_mod, etc...) from crashing the system. These modules are useful, but because they don't yet have proper load()/unload() functions, they can lead to panics: if, for example, you load the if_ppp module, any user can panic the system by running modstat. You can also hang the system outright if you try to unload the PPP module too. Changes are as follows: - Save the name passed to us during the RESERVE stage for name matching (we can't load if_ppp_mod twice: we've have two ppp0's and two ppp1's, which is beyond strange). This makes the lkmexists() cheks somewhat redundant, but there's no way around it that I can see. - If we call the module entry point and find that we have no lkm_any structure in our 'private' section, create a fake one. This keeps modstat happy. We mark such modules as LM_UNKNOWN. - Don't allow LM_UNLOAD modules to be unloaded: it just ain't possible. (Unless someone wants to write a pppunattach() function. :( ) - In lkmunreserve(), mark private.lkm_any as NULL so we don't get confused later. I think this is bogus, but I can't prove it. XXX: the name matching used to keep the user from loading two instances of the same module can easily be defeated simply by changing the module name or, in the case of the oddball modules, simply by renaming the module files. I haven't found a nice simple way to tell one module from another.
* Removed unused & empty bufstats() function.dg1995-04-161-6/+1
|
* Killed gratuitous b_vp=NULL in bufinit. The entire buffer is alreadydg1995-04-161-2/+1
| | | | bzero()'d.
* Changed #ifdef around printlockedvnodes() from DEBUG to DDB.dg1995-04-162-4/+4
|
* Make vegetarian and animal rights people happy and use 0xdeadc0de insteaddg1995-04-161-3/+3
| | | | | of 0xdeadbeef as the fill pattern. Decreased MAX_COPY to 64 (256 was a bit overzealous in most cases).
* 1) Check for curproc != NULL in bread/bwrite. John convinced me that thisdg1995-04-161-3/+10
| | | | | | | | | is necessary in order for panic+sync to work. Will also gloss over a panic that Jordan was having with the install floppies that remains unexplainable. 2) Handle "bogus_page" a little better. 3) Set page protection to VM_PROT_NONE if the entire page has become !valid. Submitted by: John Dyson (2&3), me (1).
* Speed up ttnread() in the !(ICANON | ISIG) case by copying to user spacebde1995-04-151-16/+53
| | | | | | | | | | | | | | | | | through a temporary buffer instead of one character at a time. The old method takes about 6 usec/char on a 486DX2/66. This is larger than than the combined interrupt and PIO overhead for a 16550! This change was first implemented in 1.1.5. It was rewritten for 2.1. The clist access functions allow a simpler implementation at some cost in correctness and speed. There needs to be an ungetc() function to recover from EFAULT, and it wastes time to copy through a temporary buffer. Don't snoop on single characters that weren't read due to EFAULT. Rewrite a snoop comment in my approximation to English. Undo bogus exportation of ttnread().
* Changes needed for kzip to work.phk1995-04-151-7/+30
|
* Fixed serious off by one bug I introduced that will likely cause thedg1995-04-151-3/+3
| | | | | | machine to panic whenever the name cache fills up. Submitted by: John Dyson
* Backed out previous change - it reduces performance. (oops).dg1995-04-131-2/+4
|
* Actually copy the class field over from the kernel to the user structure.wollman1995-04-131-1/+2
|
* Slight optimization to select().dg1995-04-131-4/+2
|
* Extract "set" family functions to separate module, needed forache1995-04-111-70/+90
| | | | locking in sio f.e.
* Changes to make FreeBSD use a CDROM as rootdev, for installation purposes.phk1995-04-101-1/+10
| | | | If "BOOTCDROM" is defined, you get this pretty special case stuff.
* Call ptsstop in ptsclose instead of ptcwakeupache1995-04-101-2/+2
|
* ptcwakeup() was called from wrong placesache1995-04-091-4/+5
|
* Changes from John Dyson and myself:dg1995-04-093-145/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed remaining known bugs in the buffer IO and VM system. vfs_bio.c: Fixed some race conditions and locking bugs. Improved performance by removing some (now) unnecessary code and fixing some broken logic. Fixed process accounting of # of FS outputs. Properly handle NFS interrupts (B_EINTR). (various) Replaced calls to clrbuf() with calls to an optimized routine call vfs_bio_clrbuf(). (various FS sync) Sync out modified vnode_pager backed pages. ffs_vnops.c: Do two passes: Sync out file data first, then indirect blocks. vm_fault.c: Fixed deadly embrace caused by acquiring locks in the wrong order. vnode_pager.c: Changed to use buffer I/O system for writing out modified pages. This should fix the problem with the modification date previous not getting updated. Also dramatically simplifies the code. Note that this is going to change in the future and be implemented via VOP_PUTPAGES(). vm_object.c: Fixed a pile of bugs related to cleaning (vnode) objects. The performance of vm_object_page_clean() is terrible when dealing with huge objects, but this will change when we implement a binary tree to keep the object pages sorted. vm_pageout.c: Fixed broken clustering of pageouts. Fixed race conditions and other lockup style bugs in the scanning of pages. Improved performance.
* Added a few more entries to the list of prime numbers.dg1995-04-091-4/+4
|
* Implement a simple hook (or hack?) to allow graphics device consolejoerg1995-04-082-4/+9
| | | | | | | | | | | | | drivers to protect DDB from being invoked while the console is in process-controlled (i.e., graphics) mode. Implement the logic to use this hook from within pcvt. (I'm sure Søren will do the syscons part RSN). I've still got one occasion where the system stalled, but my attempts to trigger the situation artificially resulted int the expected behaviour. It's hard to track bugs without the console and DDB available. :-/
* Check for case of blkno already known to avoid unnecessary VOP_BMAP's.dg1995-04-041-1/+2
| | | | Submitted by: John Dyson
* kern_subr.c:dg1995-04-042-6/+41
| | | | | | | | | | | | | | Added a new type to uiomove - "UIO_NOCOPY" which causes it to update pointers and counts, but doesn't do any data copying. This is needed for upcoming changes to the way that the vnode pager does its page outs. Added a new hash init function call "phashinit" that allocates and initializes a prime number sized hash table. vfs_cache.c: Changed hashing algorithm to use the remainder of dividing by a prime number to improve the distribution characteristcs. Uses new phashinit function in kern_subr.c.
* Back out changes related to locked bits until more elegant solution will beache1995-04-021-20/+20
| | | | found. Fix flags declarations.
* Attempt to fix the `you can log into console only once' problem (PRjoerg1995-04-021-2/+13
| | | | | | | | #179). The fix implements a ttyhalfclose() (sort of), resetting the session and pgrp pointers when the physical device is about to be closed. Suggested by: bde
* Fix error in TIOCSETC/TIOCSLTC, they need to call TIOCSETA.ache1995-04-021-16/+18
| | | | Remove static from some functions, needed in sio (later)
OpenPOWER on IntegriCloud