summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Changed the global `idt' from an array to a pointer so that npx.cbde1999-06-181-3/+2
| | | | | | | | | | | | | automatically hacks on the active copy of the IDT if f00f_hack() has changed it. This also allows simplifications in setidt(). This fixes breakage of FP exception handling by rev.1.55 of sys/kernel.h. FP exceptions were sent to npx.c's probe handlers because npx.c "restored" the old handlers to the wrong copy of the IDT. The SYSINIT for f00f_hack() was purposely run quite late to avoid problems like this, but it is bogusly associated with the SYSINIT for proc0 so it was moved with the latter. Problem reported and fix tested by: Martin Cracauer <cracauer@cons.org>
* Reviewed by: the cast of thousandsgreen1999-06-173-10/+21
| | | | | | | | | This is the change to struct sockets that gets rid of so_uid and replaces it with a much more useful struct pcred *so_cred. This is here to be able to do socket-level credential checks (i.e. IPFW uid/gid support, to be added to HEAD soon). Along with this comes an update to pidentd which greatly simplifies the code necessary to get a uid from a socket. Soon to come: a sysctl() interface to finding individual sockets' credentials.
* Add Id stringsgpalmer1999-06-173-0/+6
|
* Update the comments on values than can be returned by DEVICE_PROBE.n_hibma1999-06-171-8/+9
| | | | | | DEVICE_PROBE can return priorities. Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Fixed a missing userland dev_t to kernel dev_t conversion.bde1999-06-171-1/+1
|
* Reformat comment to match indentation of code around it.julian1999-06-171-8/+9
|
* Add a vnode argument to VOP_BWRITE to get rid of the last vnodemckusick1999-06-166-112/+23
| | | | | operator special case. Delete special case code from vnode_if.sh, vnode_if.src, umap_vnops.c, and null_vnops.c.
* Make sure syscall arguments properly aligned in ktrace records.dt1999-06-161-6/+12
| | | | | | | Make syscall return value a register_t. Based on a patch from Hidetoshi Shimokawa. Mostly reviewed by: Hidetoshi Shimokawa and Bruce Evans.
* Changed trypbuf to a getpbuf to work around a problem where redundant writesdg1999-06-161-2/+2
| | | | | | | | | would occur when clustering them - caused by running out of buffers and taking a degenerate code path as a result. It appears that waiting instead for buffers to become available is okay. Submitted by: Matthew Dillon <dillon@apollo.backplane.com> Discovered by: Craig A Soules <soules+@andrew.cmu.edu>
* If we still haven't got a sufficient number of free buffers after thetegge1999-06-161-2/+2
| | | | | | call to flushdirtybuffers() then sleep in waitfreebuffers(). PR: 11697 Reviewed by: David Greenman, Matt Dillon
* Get rid of the global variable rushjob and replace it with a function inmckusick1999-06-153-15/+74
| | | | | kern/vfs_subr.c named speedup_syncer() which handles the speedup request. Change the various clients of rushjob to use the new function.
* From the submitter:msmith1999-06-072-21/+18
| | | | | | | | | | | | | | | | | - this causes POSIX locking to use the thread group leader (p->p_leader) as the locking thread for all advisory locks. In non-kernel-threaded code p->p_leader == p, so this will have no effect. This results in (more) correct POSIX threaded flock-ing semantics. It also prevents the leader from exiting before any of the children. (so that p->p_leader will never be stale) in exit1(). We have been running this patch for over a month now in our lab under load and at customer sites. Submitted by: John Plevyak <jplevyak@inktomi.com>
* ksprintn() may be called with base=2, so redefine MAXNBUF accordingly.archie1999-06-071-18/+19
| | | | | | Other brucification tweaks. Obtained from: bde@freebsd.org
* The function ksprintn(), which is used to convert numbers to ASCII, is notarchie1999-06-061-8/+14
| | | | | reentrant because it returns a static buffer. This results in a race condition when/if an interrupt handler calls log(), printf() etc. Fix this.
* Restructure pipe_read in order to eliminate several race conditions.alc1999-06-051-68/+46
| | | | Submitted by: Matthew Dillon <dillon@apollo.backplane.com> and myself
* Plug a mbuf leak in tcp_usr_send(). pru_send() routines are expectedpeter1999-06-041-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | to either enqueue or free their mbuf chains, but tcp_usr_send() was dropping them on the floor if the tcpcb/inpcb has been torn down in the middle of a send/write attempt. This has been responsible for a wide variety of mbuf leak patterns, ranging from slow gradual leakage to rather rapid exhaustion. This has been a problem since before 2.2 was branched and appears to have been fixed in rev 1.16 and lost in 1.23/1.28. Thanks to Jayanth Vijayaraghavan <jayanth@yahoo-inc.com> for checking (extensively) into this on a live production 2.2.x system and that it was the actual cause of the leak and looks like it fixes it. The machine in question was loosing (from memory) about 150 mbufs per hour under load and a change similar to this stopped it. (Don't blame Jayanth for this patch though) An alternative approach to this would be to recheck SS_CANTSENDMORE etc inside the splnet() right before calling pru_send() after all the potential sleeps, interrupts and delays have happened. However, this would mean exposing knowledge of the tcp stack's reset handling and removal of the pcb to the generic code. There are other things that call pru_send() directly though. Problem originally noted by: John Plevyak <jplevyak@inktomi.com>
* || vs && confusion in cdevsw_add().dt1999-06-011-2/+2
|
* Introduce the makebdev() function, it does the same as the makedev()phk1999-06-012-3/+9
| | | | function for now, but that will change.
* Unifdef VM86.jlemon1999-06-013-15/+20
| | | | Reviewed by: silence on on -current
* Simplify cdevsw registration.phk1999-05-319-99/+72
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-306-41/+148
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* * Add a function devclass_create() which looks up the named devclass anddfr1999-05-301-2/+8
| | | | | creates it if it doesn't exist. * Rename resource_list_remove() to resource_list_delete() for consistency.
* * Change device_add_child_after() to device_add_child_ordered() which isdfr1999-05-282-23/+26
| | | | | | | easier to use and more flexible. * Change BUS_ADD_CHILD to take an order argument instead of a place. * Define a partial ordering for isa devices so that sensitive devices are probed before non-sensitive ones.
* Fix an embarrasing typo in device_add_child_after(). I can't understanddfr1999-05-271-3/+3
| | | | | | how this hasn't caused problems before. Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* Back out my previous change (phk didn't like it) in favour of settingjb1999-05-242-16/+2
| | | | | rootdev in the mfs initialisation code iff MFS_ROOT (which Bruce doesn't like). Damned if I do - damned if I don't.
* Remove the test for bdevsw(dev) == NULL from bdevvp() because it failsjb1999-05-242-4/+4
| | | | | | | | if there is no character device associated with the block device. In this case that doesn't matter because bdevvp() doesn't use the character device structure. I can use the pointy bit of the axe too.
* Make MFS_ROOT work again. MFS_ROOT means that rootdev is not set.jb1999-05-232-4/+20
| | | | | Broken by: phk Problem ignored by: phk
* Don't call calcru() on a swapped-out process. calcru() access p_stats, whichdt1999-05-221-8/+11
| | | | is in U-area.
* Add some helper functions to make it easier to write a driver for a busdfr1999-05-221-1/+149
| | | | which needs to manage resources for its children.
* Add seatbelt like in previous function..peter1999-05-221-1/+3
|
* Realy fix overflow on SO_*TIMEOache1999-05-211-4/+12
| | | | Submitted by: bde
* Silently return NULL from devclass_get_device if dc == NULL. The callerdfr1999-05-211-2/+2
| | | | | | should be handling NULL returns already. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* Oops, set module->file..peter1999-05-201-1/+2
| | | | | PR: 1179 Submitted-by: lha@stacken.kth.se
* TIOCEXT is also inapproriate before the slave is open, return EAGAIN whenluoqi1999-05-181-29/+31
| | | | | | these ioctls are attempted. Move a misplaced comment. Pointed out by: Bruce
* Avoid negative numbers in dev_t manipulation. This should fix recent MFSluoqi1999-05-181-3/+3
| | | | related crashes.
* Use NOUDEV for udev_t'sphk1999-05-171-2/+2
|
* Change the definition of e_tdev in struct kinfo_proc from dev_t to udev_tdfr1999-05-171-2/+2
| | | | Reviewed by: Poul-Henning Kamp <phk@critter.freebsd.dk>
* Add the options MAP_PREFAULT and MAP_PREFAULT_PARTIAL to vm_map_find/insert,alc1999-05-172-21/+6
| | | | | | | eliminating the need for the pmap_object_init_pt calls in imgact_* and mmap. Reviewed by: David Greenman <dg@root.com>
* Add enough include files to make this actually compile on an a.out system.eivind1999-05-151-1/+8
|
* Simplify vm_map_find/insert's interface: remove the MAP_COPY_NEEDED option.alc1999-05-142-6/+6
| | | | | | | It never makes sense to specify MAP_COPY_NEEDED without also specifying MAP_COPY_ON_WRITE, and vice versa. Thus, MAP_COPY_ON_WRITE suffices. Reviewed by: David Greenman <dg@root.com>
* Ignore some ioctls on the master until the slave is open.luoqi1999-05-141-3/+12
|
* Legally acquire a major number for mfs.luoqi1999-05-142-10/+4
|
* * Define a new static method DEVICE_IDENTIFY which is called to add devicedfr1999-05-143-3/+40
| | | | | | | | | | instances to a parent bus. * Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY to add new instances. * Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY for each driver attached to the parent's devclass. * Move the hint-based isa probe from the isa driver to a new isahint driver which can be shared between i386 and alpha.
* Adjust method dispatch to ensure that default methods are called properly.dfr1999-05-141-1/+8
|
* Previously directories were sync'ed every 10 seconds while bitmaps &mckusick1999-05-142-6/+6
| | | | | | | | inodes were synced every 15 seconds. This is now reversed as during directory create, we cannot commit the directory entry until its inode has been written. With this switch, the inodes will be more likely to be written by the time that the directory is written thus reducing the number of directory rollbacks that are needed.
* Added ../sys/syscall.mk to targets. Back it up like all the otherbde1999-05-131-1/+2
| | | | targets.
* Regenerated.bde1999-05-132-2/+2
|
* Fixed nonsense arg type `const caddr_t' in the prototype() for utrace().bde1999-05-131-3/+3
| | | | | | | | | Changed to `const void *'. utrace() is undocumented, so nothing should notice. Fixed missing consts for utrace() and ktrace() in syscalls.master. sys/ktrace.h is missing some Lite2 changes of shorts to ints.
* Try an fix a couple of dev_t/major/minor etc nits.peter1999-05-123-7/+9
|
* Unbreak VESA on SMP.luoqi1999-05-121-2/+3
|
OpenPOWER on IntegriCloud