summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Convert socket structures to be type-stable and add a version number.wollman1998-05-157-56/+324
| | | | | | | | | | | | | | | | | | | Define a parameter which indicates the maximum number of sockets in a system, and use this to size the zone allocators used for sockets and for certain PCBs. Convert PF_LOCAL PCB structures to be type-stable and add a version number. Define an external format for infomation about socket structures and use it in several places. Define a mechanism to get all PF_LOCAL and PF_INET PCB lists through sysctl(3) without blocking network interrupts for an unreasonable length of time. This probably still has some bugs and/or race conditions, but it seems to work well enough on my machines. It is now possible for `netstat' to get almost all of its information via the sysctl(3) interface rather than reading kmem (changes to follow).
* Nuke signanosleep(). (I've left nanosleep1() seperate to nanosleep()peter1998-05-141-56/+1
| | | | as I don't want to mess with the multiple returns)
* regen after signanosleep nukepeter1998-05-142-4/+4
|
* deep-six signanosleep(). It sounded like a good idea at the time.peter1998-05-141-3/+2
|
* Commit an old change that has been sitting around for a long while.peter1998-05-141-2/+16
| | | | | | | | | | signanosleep() did not deal with signal masks properly. This change was based on a discussion with bde some time ago (at least 6 months or more). signanosleep() should probably go away since it was never really used for more than a few weeks and doesn't appear in released code. It should probably be killed before somebody uses it and it becomes a gratuitous nonstandard feature.
* Backed out previous commit. It is invalid to call d_ioctl() onbde1998-05-121-8/+3
| | | | | | | | | | | | possibly non-open devices, and we don't want to restrict dumping to swap devices anwyay. It is especially invalid to call d_ioctl() in non-process context for panics. d_psize() can be called on non-open devices, at least on non-SLICED ones that support d_dump(), and setdumpdev() has depended on this for a long time although it is probably wrong, but even d_psize() can't be called in non-process context - that's why dumpsys() depends on previously computed values although these values may be stale. The historical restriction to devices with dkpart(dev) == SWAP_PART should go away.
* Fix the futimes/undelete/utrace conflict with other BSD's. Note thatdyson1998-05-116-188/+759
| | | | | | | the only common usage of utrace (the possible problem with this commit) is with malloc, so this should be a real problem. Add the various NetBSD syscalls that allow full emulation of their development environment.
* Attempt to set write combining mode for graphics devices.dyson1998-05-111-59/+5
|
* In the words of the submitter:msmith1998-05-075-59/+75
| | | | | | | | | | | | | | | | | | | --------- Make callers of namei() responsible for releasing references or locks instead of having the underlying filesystems do it. This eliminates redundancy in all terminal filesystems and makes it possible for stacked transport layers such as umapfs or nullfs to operate correctly. Quality testing was done with testvn, and lat_fs from the lmbench suite. Some NFS client testing courtesy of Patrik Kudo. vop_mknod and vop_symlink still release the returned vpp. vop_rename still releases 4 vnode arguments before it returns. These remaining cases will be corrected in the next set of patches. --------- Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Add dump support to the DEVFS/slice code.julian1998-05-061-3/+8
| | | | | | now we can actually catch our crashes :-) Submitted by: Luoqi Chen <luoqi@chen.ml.org> (the man who's everywhere)
* As described by the submitter:msmith1998-05-061-23/+0
| | | | | | | | | | | | | Reverse the VFS_VRELE patch. Reference counting of vnodes does not need to be done per-fs. I noticed this while fixing vfs layering violations. Doing reference counting in generic code is also the preference cited by John Heidemann in recent discussions with him. The implementation of alternative vnode management per-fs is still a valid requirement for some filesystems but will be revisited sometime later, most likely using a different framework. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Fix the shm panic. I mistakenly used the shadow_count to keep the objectdyson1998-05-041-3/+2
| | | | from being split, and instead added an OBJ_NOSPLIT.
* Work around some VM bugs, the worst being an overly aggressivedyson1998-05-041-1/+5
| | | | | swap space free calculation. More complete fixes will be forthcoming, in a week.
* Oops, the previous commit should have changed `i386' to `__i386__',bde1998-05-012-6/+6
| | | | not `__i386'.
* Partially fixed write clustering for cases where cluster_wbuild() isbde1998-05-011-1/+4
| | | | | | | called from vfs_bio_awrite() without going through cluster_write() or ufs_bmaparray(), in particular for all writes to block disk devices. Only ufs_bmaparray() sets vp->v_maxio in a correct way, and it doesn't seem to be called early enough even for regular files.
* vm_page_is_valid() wasn't expecting a large offset argument, it'speter1998-05-011-2/+3
| | | | | | | | | | | expecting a sub-page offset. We were passing the file position, and vm_page_bits() could do some interesting things when base was larger PAGE_SIZE. if (size > PAGE_SIZE - base) size = PAGE_SIZE - base; is interesting when (PAGE_SIZE - base) is negative. I could imagine that this could have interesting consequences for memory page -> device block bit validation.
* Fix one problem with NFSv3 > 2GB file support.peter1998-05-011-3/+3
| | | | Submitted by: bde
* Translate T_PROTFLT to SIGSEGV instead of SIGBUS when running undereivind1998-04-283-3/+9
| | | | | | | | | Linux emulation. This make Allegro Common Lisp 4.3 work under FreeBSD! Submitted by: Fred Gilham <gilham@csl.sri.com> Commented on by: bde, dg, msmith, tg Hoping he got everything right: eivind
* Discussed with: bdeobrien1998-04-241-1/+1
|
* Create virgin disklabels with 8 (MAXPARTITIONS) partitions rather thanobrien1998-04-241-4/+2
| | | | | three (RAW_PART + 1); This makes ``disklabel -Brw sdN auto'' do the Right Thing.
* Added kern.ipc.nmbclustersdg1998-04-242-2/+4
|
* Make the devfs SLICE option a standard type option.julian1998-04-202-2/+4
| | | | (hopefully it will go away eventually anyhow)
* Add changes and code to implement a functional DEVFS.julian1998-04-196-13/+72
| | | | | | | | | | | | | | | | | | | | | This code will be turned on with the TWO options DEVFS and SLICE. (see LINT) Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes. /dev will be automatically mounted by init (thanks phk) on bootup. See /sys/dev/slice/slice.4 for more info. All code should act the same without these options enabled. Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others This code does not support the following: bad144 handling. Persistance. (My head is still hurting from the last time we discussed this) ATAPI flopies are not handled by the SLICE code yet. When this code is running, all major numbers are arbitrary and COULD be dynamically assigned. (this is not done, for POLA only) Minor numbers for disk slices ARE arbitray and dynamically assigned.
* Backed out lseek changes.des1998-04-192-12/+8
|
* Return EINVAL and do not change file pointer if resulting offset is negative.des1998-04-182-10/+14
| | | | PR: kern/6184
* In vfs_msync(), test to see if the vnode being examined is "interesting"peter1998-04-182-6/+20
| | | | | | | | | | | | | (ie: it has a vm_object attached and is marked as OBJ_MIGHTBEDIRTY) before attempting to lock it. This should reduce the cpu hit that is incurred when doing a sync(2) and when the syncer process is doing the 30-second writeback of dirty mmap() data to disk. Skip this speedup if we are doing an unmount() to be sure to get everything - we can afford to occasionally miss a msync while the system is running, but not at unmount. I'm not sure about the VXLOCK and MNT_WAIT case, it seems a bit odd to skip doing a page_clean at unmount time just because a vnode is VXLOCKed, but that's what was being done before...
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-175-12/+12
|
* Really finish supporting compiling with `gcc -ansi'.bde1998-04-172-4/+4
|
* When the softdep conversion took place, the periodic vfs_msync() frompeter1998-04-162-2/+4
| | | | | | | | | update got lost. This is responsible for ensuring that dirty mmap() pages get periodically written to disk. Without it, long time mmap's might not have their dirty pages written out at all of the system crashes or isn't cleanly shut down. This could be nasty if you've got a long-running writing via mmap(), dirty pages used to get written to disk within 30 seconds or so.
* Unlock mountlist_slock if the mount point was busy (unmount in progress)tegge1998-04-152-4/+8
| | | | during the attempt at lazy fsync.
* Support compiling with `gcc -ansi'.bde1998-04-159-32/+33
|
* Fix a minor mbuf leak created by the previous change.phk1998-04-141-2/+4
| | | | | Reviewed by: phk Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
* setsockopt() transports user option data in an mbuf. if the userphk1998-04-111-2/+7
| | | | | | | | | data is greater than MLEN, setsockopt is unable to pass it onto the protocol handler. Allocate a cluster in such case. PR: 2575 Reviewed by: phk Submitted by: Julian Assange proff@iq.org
* When pmap_pinit0() allocates a page for proc0's page directory,phk1998-04-111-2/+2
| | | | | | | | | | | | | kernal page table may need to be extended. But while growing the kernel page table (pmap_growkernel()), newly allocated kernel page table pages are entered into every process' page directory. For proc0, the page directory is not allocated yet, and results in a page fault. Eventually, the machine panics with "lockmgr: not holding exclusive lock". PR: 5458 Reviewed by: phk Submitted by: Luoqi Chen <luoqi@luoqi.watermarkgroup.com>
* Grammar police.alex1998-04-101-2/+2
|
* New mount option nosymfollow. If enabled, the kernel lookup()wosch1998-04-084-12/+17
| | | | | function will not follow symbolic links on the mounted file system and return EACCES (Permission denied).
* Minor adjustments to the timecounting and proc0.phk1998-04-083-11/+13
| | | | Mostly Submitted by: bde
* Today is not my lucky day. Fix missing brace and I got a requestpeter1998-04-061-3/+3
| | | | to use EMLINK instead.
* Use a different errno (ELOOP (as sef mentioned) since the text that goespeter1998-04-061-2/+6
| | | | with the error sounds ok for the condition) if O_NOFOLLOW gets a link.
* Rather than let users get fd's to symlink files, make O_NOFOLLOW causepeter1998-04-061-3/+3
| | | | | | an error if it gets a link (like it does if it gets a socket). The implications of letting users try and do file operations on symlinks themselves were too worrying.
* Implement a new open(2) flag: O_NOFOLLOW. This will instruct openpeter1998-04-061-2/+3
| | | | | | | | | | | to not follow symlinks, but to open a handle on the link itself(!). As strange as this might sound, it has several useful applications safe race-free ways of opening files in hostile areas (eg: /tmp, a mode 1777 /var/mail, etc). It also would allow things like fchown() to work on the link rather than having to implement a new syscall specifically for that task. Reviewed by: phk
* curproc is initialized in locore at the same time for both SMP and UP now.peter1998-04-061-15/+1
|
* Use real types for the SMP pages being allocated rather than arrays ofpeter1998-04-061-17/+11
| | | | | | ints. Remove some no longer needed casts. Initialize the per-cpu global data area using the structs rather than knowing too much about layout, alignment, etc.
* Make read_random() take a (void *) argument instead of (char *)phk1998-04-061-5/+5
|
* Make a kernel version of the timer* functions called timerval* to bephk1998-04-065-24/+24
| | | | | | more consistent. OK'ed by: bde
* More fixes for the iterative case of nanosleep1 from bruce.phk1998-04-051-5/+5
| | | | I hate the 2-arg time{spec|val}{add|sub} functions!
* Make the dummy timecounter run at 1 MHz rather than 100kHz (noticed by bde)phk1998-04-053-14/+13
| | | | fix the itimer(REAL) handling.
* If there is no error code, don't copyout the remaining time. (Aspeter1998-04-051-3/+3
| | | | | documented in the man page and the standards). (and besides, nanosleep1 isn't setting it in this case at present anyway, so we'd be copying junk).
* Fix nanosleep1 based on Bruces suggestion.phk1998-04-051-28/+22
|
* Remove unused atv.tv_usec = 0; from select/poll codeache1998-04-051-7/+3
|
OpenPOWER on IntegriCloud