Commit Graph

3149 Commits

Author SHA1 Message Date
David Greenman
60f6659f70 Changes to support the "new" bad144. Adds a "BADSCAN" ioctl and support.
Reviewed by:	Bruce Evans
Submitted by:	Poul-Henning Kamp
1995-05-16 07:52:17 +00:00
David Greenman
765b90447e These diffs modify the behaviour of multicast clients to conform with the
IGMPv2 spec.  This fixes the following bugs:

o ntohs() on a char provides silly results
o timer needs to be scaled to units of PR_FASTHZ; this was being done
  inconsistenly so now it gets done when it is initialized.

Reviewed by:	Garrett Wollman
Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1995-05-16 01:28:29 +00:00
David Greenman
c9a8415607 Fixed route reference count bug that squirmed in during the the
routing-socket code upgrade from Berkeley..

Submitted by:	Garrett Wollman via Peter Wemm via Cornell
1995-05-15 22:57:53 +00:00
David Greenman
635d58b32c Removed unnecessary extern declaration that was causing compiler warnings.
Reviewed by:	Garrett Wollman
1995-05-15 22:55:18 +00:00
David Greenman
aeb0491c43 Removed extraneous comma.
Reviewed by:	Bruce Evans
1995-05-15 22:27:48 +00:00
David Greenman
1469eec81e Fixed incompleteness that would allow dirty filesystems to get mounted
when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.

Reviewed by:	Poul-Henning Kamp, Rod Grimes
1995-05-15 08:39:37 +00:00
David Greenman
9b5bb13bf8 From Bruce Evans:
I ran into another manifestation of the problem reported in PR 211 and
fixed it. Try this:

as non-root:
	cd /tmp; mkdir x y x/z
as root:
	chown root /tmp/x/z
as non-root:
	cd /tmp/x; mv z ../y		# EACCES as expected
as root:
	cd /tmp/x; mv z ../y		# EINVAL NOT as expected

This is because ufs_rename() sets IN_RENAME and fails to clear it.

Reviewed by:	davidg
Submitted by:	bde
1995-05-15 07:31:09 +00:00
David Greenman
30fd0561cd Added apersand constraint to make sure that the source and destination
registers aren't combined.

Reviewed by:	Bruce Evans and David Greenman
Submitted by:	John Dyson
1995-05-14 22:25:11 +00:00
Nate Williams
3288e2905f Prototype for madvise() is missing from sys/mman.h
Submitted by:	Kai Vorma <vode@snakemail.hut.fi>
1995-05-14 19:19:07 +00:00
Bruce Evans
9f83fbf2e7 Fix declaration of palette[] so that fade saver doesn't cause panics. 1995-05-14 12:54:30 +00:00
David Greenman
14c77d8a98 After carefully reading three reference documents, and analyzing
the 802.3 frames generated by the DC21040 (which does automatic padding
of less-than-minimum frames) and the frames generated by the 'ed'
driver, I've found that there is indeed a bug in the size of "ETHER_MIN_LEN"
as reported by several people, John Hay being the most recent. The driver
was actually setting the length to 6+6+2+50 (64 bytes), which when adding
in the CRC (which is automatically appended to the frame and not included
in the length), the minimum frame is 4 bytes larger than it is supposed to
be. All of this is confirmed by tcpdump showing 50 bytes of data for
minimum frames from the 'ed' cards and 46 bytes from 'de' cards. This
analysis has also revealed that there is garbage in the un-filled in
portion at the end of the minimum frames from the 'ed' driver; I don't
plan to fix this.
1995-05-14 11:01:20 +00:00
David Greenman
a401ebbe32 Changed swap partition handling/allocation so that it doesn't
require specific partitions be mentioned in the kernel config
file ("swap on foo" is now obsolete).

From Poul-Henning:

The visible effect is this:

As default, unless
        options "NSWAPDEV=23"
is in your config, you will have four swap-devices.
You can swapon(2) any block device you feel like, it doesn't have
to be in the kernel config.

There is a performance/resource win available by getting the NSWAPDEV right
(but only if you have just one swap-device ??), but using that as default
would be too restrictive.

The invisible effect is that:

Swap-handling disappears from the $arch part of the kernel.
It gets a lot simpler (-145 lines) and cleaner.

Reviewed by:	John Dyson, David Greenman
Submitted by:	Poul-Henning Kamp, with minor changes by me.
1995-05-14 03:00:10 +00:00
Jordan K. Hubbard
c25cfd0b0d "1 easy fix in 10 excrutiating steps"
A phone call from Manfred quickly pointed up the fact that I got the conflict
check backwards.  NOW we implement the conflict checking correctly!  Wheesh!
1995-05-13 00:09:38 +00:00
David Greenman
404abd2138 Only use card's soft-configured irq if no irq was specified in the kernel
config file. This should fix a number of complaints regarding the auto
detection behavior.
1995-05-12 22:39:40 +00:00
David Greenman
c4cf09ffe6 pread/pwrite() should be static.
Submitted by:	sef
1995-05-12 21:39:48 +00:00
Andrey A. Chernov
2f632e8fe8 Fix getsockopt(IP_ACCT_*) to not panic kernel
Submitted by: Bill Fenner <fenner@parc.xerox.com>
1995-05-12 20:00:21 +00:00
Garrett Wollman
5bb4f73817 The death of `options NODUMP'. Now the dump area can be dynamically
configured (and unconfigured) on the fly.  A sysctl(3) MIB variable is
provided to inspect and modify the dump device setting.
1995-05-12 19:17:31 +00:00
Bill Paul
dbda9e5ed2 - Add an entry to allow swapping on a vn device (if one is configured).
- Do the right thing when booting in NFS diskless mode, which is nothing.
  Make the default unconfigured entries for swdevt[0] and dumplo something
  that swapconf() will ignore and not choke on (the swap setup is done
  in nfs_vfsops.c when booting diskless).
1995-05-12 16:11:07 +00:00
Andrey A. Chernov
d0930614cc Add 'rc' line 1995-05-12 15:17:55 +00:00
Andrey A. Chernov
dc02f1c279 RISCom/8 driver 1995-05-12 15:09:29 +00:00
David Greenman
15f1b09648 Increased ratio of allowed vnodes on freelist to 1/4th of the total. This
is more representative of worst case situations of 4 files/directory. (If
that last sentence doesn't make any sense, I'm not surprised. It's rather
compilcated how this all fits together....).
This should fix a problem that Ed Hudson has been complaining about where
directories with lots of symlinks could cause excessive disk I/O.
1995-05-12 04:24:53 +00:00
Poul-Henning Kamp
8af2296bcb I'm about to jump on the swap-initialization, and having talked
with davidg about it, I hereby kill two undocumented misfeatures:
The code to skip a miniroot in the swapdev is not particular useful, and
if we need it we need it to be done properly, ie size the fs and skip all
of it not some hardcoded size, and subtract what we skip from the length
in the first place.
The SEQSWAP dies too.  It's not the way to do it, it doesn't work, and
nobody have expressed any great desire for it to work.  The way to
implement it correctly would be a second argument to swapon(2) to give
a priority/policy information.  Low priority swapdevs can be made so
by adding them at a far offset (0x80000000 kind of thing), with almost no
modification to the strategy routine (in particular a offset per swapdev).
But until the need is obvious, it will not be done.
1995-05-12 03:54:59 +00:00
Garrett Wollman
c356b1c45d Add some more defines that don't change the genericness of a file. 1995-05-11 20:21:23 +00:00
Garrett Wollman
1d86aba60b Make `make links' work by leaving swapkernel.c off out of the links processing
(it is never generic).
1995-05-11 19:48:45 +00:00
Rodney W. Grimes
b2b795f07c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
Poul-Henning Kamp
303fd456bf Use spc, not spt, DUH! Thanks Bruce!
Submitted by:	bde
1995-05-11 16:19:50 +00:00
Bruce Evans
0de8909518 Define _POSIX_VDISABLE so that it can be used in #if expressions. 1995-05-11 07:52:49 +00:00
Bruce Evans
d81fba0cda Add variable `idelayed' and macros setdelayed() and schedsofttty()
to access it.  setdelayed() actually ORs the bits in `idelayed' into
`ipending' and clears `idelayed'.

Call setdelayed() every (normal) clock tick to convert delayed
interrupts into pending ones.

Drivers can set bits in `idelayed' at any time to schedule an interrupt
at the next clock tick.  This is more efficient than calling timeout().
Currently only software interrupts can be scheduled.
1995-05-11 07:44:40 +00:00
Jordan K. Hubbard
c77a009363 Move conflicts flag to the end. 1995-05-11 07:41:52 +00:00
Bruce Evans
0ee893eb32 Add loadandclear(). It atomically loads a value from memory, clears the
value in memory and returns the original value.
1995-05-11 07:24:35 +00:00
Jordan K. Hubbard
da8d0268df Pass me the pointed chapeau - this typo somehow got through my testing. 1995-05-11 05:20:43 +00:00
Bill Paul
2c739e6439 If you config a kernel with 'config kernel swap generic' and try to
boot diskless with it, you get a panic because setconf() is only
called for mountroot == ffs_mountroot. It really needs to be called
no matter what manner of rootfs we have. I can't really say if
swapgeneric will work with a CD-ROM though. (I get the feeling I'm
the only one who uses swapgeneric these days anyway.)
1995-05-11 02:50:11 +00:00
Jordan K. Hubbard
9cc347481f Remove all vestiges of the ALLOW_CONFLICT_FOO evil and replace it with
something slightly less evil - a per device conflict flag.
1995-05-11 02:15:55 +00:00
David Greenman
6b067b0744 #ifdef'd my Nagel/ACK hack with "TCP_ACK_HACK", disabled by default. I'm
currently considering reducing the TCP fasttimo to 100ms to help improve
things, but this would be done as a seperate step at some point in the
future.
This was done because it was causing some sometimes serious performance
problems with T/TCP.
1995-05-11 01:41:06 +00:00
Garrett Wollman
c9cd353a18 Delete two debugging printfs that mistakenly crept in. 1995-05-11 00:16:44 +00:00
Garrett Wollman
748e0b0acc Make networking domains drop-ins, through the magic of GNU ld. (Some day,
there may even be LKMs.)  Also, change the internal name of `unixdomain'
to `localdomain' since AF_LOCAL is now the preferred name of this family.
Declare netisr correctly and in the right place.
1995-05-11 00:13:26 +00:00
David Greenman
54ea0c000f Unlock the vnode before sleeping on an OBJ_DEAD object. Should fix Bruce's
hang. Fixed some formatting anomolies and removed some unneeded casts.
1995-05-10 18:59:11 +00:00
David Greenman
ee3a64c992 Changed "handle" from type caddr_t to void *; "handle" is several different
types of pointers, and "char *" is a bad choice for the type.
1995-05-10 18:56:09 +00:00
Garrett Wollman
78a8281095 Updated routing-socket code from Berkeley
Obtained from: Keith Bostic by way of Paul Traina
1995-05-10 16:48:52 +00:00
Rodney W. Grimes
3e0b4dc1f6 Submitted by: wpaul (with 2 lines moved by rgrimes)
Add support for kern_devconf structure.
1995-05-10 15:19:29 +00:00
Bruce Evans
d8762fa6a0 Submitted by: Mike Pritchard <pritc003@maroon.tc.umn.edu>
msdosfs_lookup() did no validation to see if the caller was validated
to delete/rename/create files.  msdosfs_setattr() did no validation
to see if the caller was allowed to change the file permissions (turn
on/off the write bit) or update the file modification time (utimes).

The routines were fixed to validate the calls just like ufs does.
1995-05-09 16:30:45 +00:00
David Greenman
94a5d9b6a1 Replaced some bcopy()'s with memcpy()'s so that gcc while inline/optimize. 1995-05-09 13:35:48 +00:00
Andras Olah
40db8ef747 Fix a misspelled constant in tcp_input.c.
On Tue, 09 May 1995 04:35:27 PDT, Richard Stevens wrote:
> In tcp_dooptions() under the case TCPOPT_CC there is an assignment
>
>       to->to_flag |= TCPOPT_CC;
>
> that should be
>
>       to->to_flag |= TOF_CC;
>
> I haven't thought through the ramifications of what's been happening ...
>
>       Rich Stevens

Submitted by:	rstevens@noao.edu (Richard Stevens)
1995-05-09 12:32:06 +00:00
Rodney W. Grimes
2d9d0204f7 Fix -Wformat warnings, still need to do something about %b and pointer
type args.
1995-05-09 12:26:00 +00:00
Rodney W. Grimes
14b77878bb Rewrite the MCD_TRACE macro to be a varargs macro so that the extraneous
arguments to printf could be fixed.

Correct all but 1 -Wformat warning.  Some would have caused garbage to
be printed due to missing args!
1995-05-09 11:39:40 +00:00
John Dyson
40ab35ce04 Added bounce support for user scsi requests.
Reviewed by:	David Greenman
1995-05-09 02:38:15 +00:00
Poul-Henning Kamp
e34fb4afd7 Cleanup to the INET part of lpt.c.
Reviewed by:	phk
Submitted by:	pst
1995-05-09 01:33:16 +00:00
David Greenman
6c206048ae Improved hashinit panic strings. 1995-05-08 23:11:12 +00:00
Paul Traina
255aed5d97 Correction, Jim Lowe is the author... Getting code to work right is far
easier than writing the comments. :-(
1995-05-08 19:42:00 +00:00
Paul Traina
adc5e4f1f7 Update copyright notice to properly reflect that this was original work
by James Miller (sorry Jim).
1995-05-08 19:34:16 +00:00