Commit Graph

1099 Commits

Author SHA1 Message Date
David Nugent 1273ebf576 Copy process resource settings before modifying.
Candidate for 2.2.
1997-01-21 16:37:01 +00:00
Bruce Evans 713aa001e2 Updated generated files. 1997-01-16 15:59:31 +00:00
Bruce Evans ac0ad63f37 Reduced #include spam in <sys/sysproto.h> and fixed things that depended
on it.

makesyscalls.sh:
This parsed $Id$.  Fixed(?) to parse $FreeBSD$.  The output is wrong when
the id is not expanded in the source file.

syscalls.master:
Fixed declaration of sigsuspend().  There are still some bogons and
spam involving sigset_t.
Use `struct foo *' instead of the equivalent `foo_t *' for some nfs and
lfs syscalls so that <sys/sysproto.h> doesn't depend on <sys/mount.h>.
1997-01-16 15:58:32 +00:00
Bruce Evans f7b630a403 Added file kern_opt.c for putting warnings about defunct options in.
Warn about recently removed option EXTRAVNODES and about other rubbish
that hasn't been put in opt_defunct.h yet.
1997-01-16 13:31:55 +00:00
Bruce Evans 5131d64e0c Removed option EXTRAVNODES. All versions of FreeBSD-2.x have a sysctl
variable `kern.maxvnodes' which gives much better control over vnode
allocation than EXTRAVNODES (except in -current between 1995/10/28 and
1996/11/12, kern.maxvnodes was read-only and thus useless).
1997-01-16 13:16:10 +00:00
David Greenman 649c409d03 Fix bug related to map entry allocations where a sleep might be attempted
when allocating memory for network buffers at interrupt time. This is due
to inadequate checking for the new mcl_map. Fixed by merging mb_map and
mcl_map into a single mb_map.

Reviewed by:	wollman
1997-01-15 20:46:02 +00:00
Bruce Evans 16a02c1105 Removed redundant spl0()'s from kernel processes. They were work-arounds
for a bug in fork().
1997-01-15 19:05:08 +00:00
Bruce Evans 3e2bca9e04 Fixed interrupt unmasking for child processes which I broke in
rev.1.10 two years ago.  Children continued to run at splhigh()
after returning from vm_fork().  This mainly affected kernel
processes and init.  For ordinary processes, interrupts are normally
unmasked a few instructions later after fork() returns (it may be
important for syscall() not to reschedule the child processes).
Kernel processes had workarounds for the problem.  Init manages to
start because some routines "know" that it is safe to go to sleep
despite their caller starting them at a high ipl.  Then its ipl
gets fixed on its first normal return from a syscall.
1997-01-15 18:58:42 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
John Hay 885bd8e459 Update our kernel ntp code to the latest from David Mills. The main change
is the addition of the FLL code, which is used by the latest versions of
xntpd. The kernel PPS code is also updated, although I can't test that yet.
1996-12-30 18:26:28 +00:00
David Greenman 675526e892 Delete bogus inconsistency check that could cause a gratuitous panic. I
had added this years ago when I didn't understand all the subtilties of
the flock code.
1996-12-29 09:22:34 +00:00
John Dyson 8b612c4b4a This commit is the embodiment of some VFS read clustering improvements.
Firstly, now our read-ahead clustering is on a file descriptor basis and not
on a per-vnode basis.  This will allow multiple processes reading the
same file to take advantage of read-ahead clustering.  Secondly, there
previously was a problem with large reads still using the ramp-up
algorithm.  Of course, that was bogus, and now we read the entire
"chunk" off of the disk in one operation.   The read-ahead clustering
algorithm should use less CPU than the previous also (I hope :-)).

NOTE:  THAT LKMS MUST BE REBUILT!!!
1996-12-29 02:45:28 +00:00
Joerg Wunsch e9822d926c Make DFLDSIZ and MAXDSIZ fully-supported options.
"Don't forget to do a ``make depend''" :-)
1996-12-22 23:17:09 +00:00
Poul-Henning Kamp 15cfc283d8 Make this compile in the kernel too, major cosmetic cleanup. 1996-12-22 10:27:25 +00:00
Bruce Evans b8b6f5017f Fixed nonexistent checking of lock types for F_GETLK.
Found by:	NIST-PCTS
1996-12-19 19:59:51 +00:00
Bruce Evans bb65f5a1cc Fixed lseek() on named pipes. It always succeeded but should always fail.
Broke locking on named pipes in the same way as locking on non-vnodes
(wrong errno).  This will be fixed later.

The fix involves negative logic.  Named pipes are now distinguished from
other types of files with vnodes, and there is additional code to handle
vnodes and named pipes in the same way only where that makes sense (not
for lseek, locking or TIOCSCTTY).
1996-12-19 19:42:37 +00:00
Bruce Evans 78f64bccfd Fixed setpgid(). Negative pgids were accepted.
Found by:	NIST-PCTS
1996-12-19 13:28:47 +00:00
Bruce Evans a88bd8aae4 Fixed arg checking in if_advlock(). Invalid args were accepted in an
optimized case.  Preposterous lengths weren't checked for.

Found by:	NIST-PCTS
1996-12-19 13:22:30 +00:00
Bruce Evans 959c02787e Only handle copyin/out/etc faults when not in an interrupt handler.
This makes unexpected faults (in an interrupt handler) more likely
to crash properly.  It could be done even better (more robustly and
more efficiently) using lazy fault handling.
1996-12-18 19:12:01 +00:00
Alexander Langer 37b688c466 Typo fix. 1996-12-17 00:46:07 +00:00
Bruce Evans 1fbf1f7140 Fixed garbage being returned for constant int values, e.g., for
KERN_SAVED_IDS.

Should be in 2.2.

Reviewed by:	phk
Found by:	NIST-PCTS
1996-12-15 14:38:46 +00:00
Bruce Evans e408eccfc7 Fixed magic and wrong numbers in calibration of nullfunc_loop_profiled()
and removed related debugging code.  Now this part of the calibration is
almost as machine-independent as gprof generally.
1996-12-13 12:59:28 +00:00
Bruce Evans f7f70b3d0f Fixed a null pointer panic in ADDENTRY(). Unloading the lkm and joy
modules sort of works now.  Their devswitch entries aren't cleaned
up, so accessing them after they have been unloaded causes a panic
in spec_open().

Submitted by:	durian@plutotech.com (Mike Durian), IIRC
1996-12-06 12:47:05 +00:00
Julian Elischer ed5b7817a4 Add comments to hard-to-follow File descriptor handling code 1996-12-05 22:41:13 +00:00
John Dyson 3596818baa Clean-up of the new buffer kva allocation code. Also, there was an
error in the !BOUNCE_BUFFERS case.
1996-12-05 04:28:52 +00:00
Bruce Evans 4eb73cdaff Removed all references to b_cylinder (aka b_cylin). It was evil and
hasn't been used for a year or two since disksort() started sorting
on b_pblkno.
1996-12-01 16:34:41 +00:00
Bruce Evans 4958bbd175 Don't allow empty pathnames. POSIX standard.
Most of the standard utilities that depended on (or were broken in
a different way by) the old behaviour of interpreting "" as "."
were fixed a year or two ago.  There is still a fairly harmless
bug in tar and a harmless bug in gzip.  Tar apparently replaces
"/" by "" when it strips leading slashes.
1996-12-01 16:05:44 +00:00
John Dyson 621d520e2f Fix a problem with the new buffer_map management code. Additionally,
decrease the size of buffer_map to approx 2/3 of what it used to be
(buffer_map can be smaller now.)  The original commit of these changes
increased the size of buffer_map to the point where the system would
not boot on large systems -- now large systems with large caches will
have even less problems than before.
1996-12-01 15:46:40 +00:00
Søren Schmidt 7cb29d3394 This update adds the support for != 512 byte sector SCSI devices to
the sd & od drivers. There is also slight changes to fdisk & newfs
in order to comply with different sectorsizes.
Currently sectors of size 512, 1024 & 2048 are supported, the only
restriction beeing in fdisk, which hunts for the sectorsize of
the device.
This is based on patches to od.c and the other system files by
John Gumb & Barry Scott, minor changes and the sd.c patches by
me.
There also exist some patches for the msdos filesys code, but I
havn't been able to test those (yet).

	John Gumb (john@talisker.demon.co.uk)
	Barry Scott (barry@scottb.demon.co.uk)
1996-12-01 11:25:38 +00:00
John Dyson 09e0c6ccdd Implement a new totally dynamic (up to MAXPHYS) buffer kva allocation
scheme.  Additionally, add the capability for checking for unexpected
kernel page faults.  The maximum amount of kva space for buffers hasn't
been decreased from where it is, but it will now be possible to do so.

This scheme manages the kva space similar to the buffers themselves.  If
there isn't enough kva space because of usage or fragementation, buffers
will be reclaimed until a buffer allocation is successful.  This scheme
should be very resistant to fragmentation problems until/if the LFS code
is fixed and uses the bogus buffer locking scheme -- but a 'fixed' LFS
is not likely to use such a scheme.

Now there should be NO problem allocating buffers up to MAXPHYS.
1996-11-30 22:41:49 +00:00
David Greenman add2e5d0f4 Check for error return from uiomove to prevent looping endlessly in
soreceive(). Closes PR#2114.

Submitted by:	wpaul
1996-11-29 19:03:42 +00:00
Bruce Evans e6eeb36daf Fixed sigaction() for SIGKILL and SIGSTOP. Reading the old action now
succeeds.  Writing an action now succeeds iff the handler isn't changed.
(POSIX allows attempts to change the handler to be ignored or cause an
error.  Changing other parts of the action is allowed (except attempts
to mask unmaskable signals are silently ignored as usual).)

Found by:	NIST-PCTS
1996-11-29 18:01:55 +00:00
Bruce Evans 63f3c673f6 Help broken d_stop() routines by flushing the output queue before
calling them (as well as after).

Found by:	NIST PCTS
1996-11-29 16:16:47 +00:00
Bruce Evans 8be1cbf1f4 Fixed bugs handling (background) orphaned process groups. tty
writes and tty ioctls by processes in such groups must return
-1/EIO, but they were allowed.  tty reads were handled correctly.

Found by:	NIST PCTS
1996-11-29 15:50:56 +00:00
Bruce Evans 7542ee31b8 Fixed some bugs in BREAK handling. If BRKINT is set, then always flush
the queues and generate a SIGINT.  Previously, this wasn't done if ISIG
was clear or the VINTR character was disabled, and it was done by
converting the BREAK to a VINTR character and sometimes bogusly echoing
this character.

Found by:	NIST-PCTS
1996-11-29 15:23:42 +00:00
Bruce Evans c02039bc20 Fixed handling of non-POSIX control characters. They must not do
anything special unless IEXTEN is set.

Found by:	NIST-PCTS
1996-11-29 15:06:17 +00:00
John Dyson 71a5742716 Potentially fix a problem, whereby MSDOSFS can request buffers
larger than the vfs layer can provide.  We now automatically support
32K clusters if MSDOSFS is installed, and panic if a filesystem tries
to allocate a buffer larger than MAXBSIZE.

This commit is a result of some "prodding" by BDE.
1996-11-28 04:26:04 +00:00
John Dyson 9970cd3721 Improve the caching of small files like directories, while not
substantially increasing buffer space.  Specifically, we double
the number of buffers, but allocate only half the amount of memory
per buffer.  Note that VDIR files aren't cached unless instantiated
in a buffer.  This will significantly improve caching.
1996-11-17 02:11:01 +00:00
Bruce Evans b83ddf9c86 Restored writability of kern.maxvnodes. It was broken a year ago in
rev.1.29 of kern_sysctl.c.

Should be in 2.2.
1996-11-12 09:24:31 +00:00
Bill Fenner 82c23eba89 Add the IP_RECVIF socket option, which supplies a packet's incoming interface
using a sockaddr_dl.

Fix the other packet-information socket options (SO_TIMESTAMP, IP_RECVDSTADDR)
to work for multicast UDP and raw sockets as well.  (They previously only
worked for unicast UDP).
1996-11-11 04:56:32 +00:00
John Dyson 2cb544c3c9 Fix an ordering bug -- pmap_remove_pages should be called BEFORE
vm_map_remove, not after...

2.2-RELEASE candidate.
1996-11-09 03:54:25 +00:00
Bruce Evans fd25850c96 Don't clobber max_ncyls, ending up guessing thetotal number of cylinders as
the number in the 4th slot.

Fixes PR 1893.

Should be in 2.1.5 and 2.2.
1996-11-04 17:40:43 +00:00
Julian Elischer d13d3630fd Further improved version of hadling a HALT when there is no console. 1996-10-31 00:57:28 +00:00
Satoshi Asami e30f001135 More merge and update.
(1) deleted #if 0

    pc98/pc98/mse.c

(2) hold per-unit I/O ports in ed_softc

    pc98/pc98/if_ed.c
    pc98/pc98/if_ed98.h

(3) merge more files by segregating changes into headers.

  new file (moved from pc98/pc98):

    i386/isa/aic_98.h

  deleted:

    well, it's already in the commit message so I won't repeat the
    long list here ;)

Submitted by:	The FreeBSD(98) Development Team
1996-10-30 22:41:46 +00:00
Julian Elischer 75680b05c6 if there is no console, cngetc should act like getc and return -1
make callers aware of this in those cases where it can occur.
1996-10-30 21:40:25 +00:00
Bruce Evans 61679f2ba2 Search for labels on all slices whenever any minor for a drive is opened.
If DEVFS is configured, create devfs devices for previously invisible
partitions on the slices.

Fixed an old aliasing bug which caused E=17 errors from DEVFS for
DIOCSDINFO when there were no real slices.
1996-10-29 13:15:30 +00:00
Poul-Henning Kamp 19060a3ad9 init_main.c: pass -d to init if DEVFS_ROOT
kern_conf.c:	gd driver is a disk.
vfs_subr.c:	include opt_devfs.h
1996-10-28 11:34:57 +00:00
Wolfram Schneider 510681905e Move static variable nextpid out from fork1(). Now top(1) can print
last pid value.
1996-10-27 13:29:22 +00:00
Bruce Evans 835bd1ce62 Improved biasing of i586 clock by adjusting for hardclock() latency.
I decided to do this for every hardclock() call instead of lazily
in microtime().  The lazy method is simpler but has more overhead
if microtime() is called a lot.

CPU_THISTICKLEN() is now a no-op and should probably go away.
Previously it did nothing directly but had the side effect of
setting i586_last_tick for CPU_CLOCKUPDATE() and i586_avg_tick for
debugging.  CPU_CLOCKUPDATE() now uses a better method and
i586_avg_tick is too much trouble to maintain.

Reduced nesting of #includes in the usual case.

Increased nesting of #includes when CLOCK_HAIR is defined.  This
is a kludge to get typedefs for inline functions only when the
inline functions are used.  Normally only kern_clock.c defines
this.  kern_clock.c can't include the i386 headers directly.

Removed unused LOCORE support.
1996-10-25 13:01:56 +00:00
Søren Schmidt d672246bcc Added a missing break, so all static bins would be missed :( 1996-10-24 19:13:00 +00:00