Commit Graph

50481 Commits

Author SHA1 Message Date
Kirk McKusick
55ba28c60a Add stub for softdep_flushworklist() so that kernels compiled
without the SOFTUPDATES option will load correctly.

Obtained from:	John Baldwin <jhb@bsdi.com>
2000-07-25 05:28:59 +00:00
Kirk McKusick
d56bdab31c Eliminate periodic 'mfs_badop[vop_getwritemount] = 45' messages.
Submitted by:	Sheldon Hearn <sheldonh@uunet.co.za>
2000-07-25 05:11:57 +00:00
Robert Watson
e2e45aa8a0 o Add missing function return types from capability syscall call stubs,
fix compiler warning.

Submitted by:	jake
2000-07-25 03:37:36 +00:00
Kris Kennaway
abe829c0e3 Don't build crypto-enabled telnetd if NO_OPENSSL is defined, since it
attempts to link against libcrypto.
2000-07-25 01:11:17 +00:00
Archie Cobbs
678f9e335e Several fixes:
- Fix slowness when operating over fast connections, where the timeout(9)
  granularity is on the same order of magnitude as the round trip time.
  timeout(9) can happen up to 1 tick early, which was causing receive
  ack timeouts to happen too early, causing bogus "lost" packets.
- Increase the local time counter to 64 bits to avoid roll-over.
- Keep statistics on memory allocation failures.
- Add a new option to always include the ack when sending data packets.
  Might be useful in high packet loss situations. Might not.
2000-07-25 00:23:19 +00:00
Justin T. Gibbs
c27eebfde8 aic7xxx.c:
Correct the BUILD_TCL macro.  It was placing the target id
	in the wrong bits.  This was only an issue for adapters that
	do not perform SCB paging (aha-3940AUW for instance).

	Don't bother inlining ahc_index_busy_tcl.  It is never
	used in a performance critical path and is a bit chunky.

	Correct ahc_index_busy_tcl to deal with "busy target tables"
	embedded in the latter half of 64byte SCBs.

	Don't initialize the busy target table to its empty state
	until after we have finished extracting configuration
	information from chip SRAM.  In the common case of using
	16 bytes of chip SRAM to do untagged target lookups,
	we were trashing the last 8 targets configuration data.
	(actually only target 8 because of the bug in the
	BUILD_TCL macro).

	Cram the "bus reset delivered" message back under bootverbose.

	Fix the cleanup of the SCB busy target table when aborting
	commands.  If the lun is wildcarded, we must loop through
	all possible luns.

aic7xxx.h:
	Only bother supporting 64 luns right now.  It doesn't seem
	like either this driver or any peripherals will be doing
	information unit transfers (where the lun number is a
	32 bit integer) any time soon.

aic7xxx.seq:
	Fix support for the aic7895.  We must flush the data
	FIFO if performing a manual transfer that is not
	a multiple of 8 bytes.  We were doing this quite
	regularly for embedded cdbs.

	Manaually flush the fifo on earlier adapters when
	dealing with embedded cdbs too.  We were stuffing
	the FIFO with 16 bytes instead, but triggering
	the flush is more efficient and allows us to
	remove two instructions from the "copy_to_fifo"
	routine.
2000-07-24 22:27:40 +00:00
Sheldon Hearn
fbf29924ba Rev 1.4 shut up warnings about uninitialized (not unused) variables. 2000-07-24 21:54:52 +00:00
Sheldon Hearn
0b113423f2 Avoid the need to capitalize an extraneous argument to the Nm macro
and be more precise about the handling of command-line arguments.

Reviewed by:	ps
2000-07-24 21:53:04 +00:00
Sheldon Hearn
b86e825a0c Simplify some conditionals. 2000-07-24 21:50:38 +00:00
Sheldon Hearn
dee82c612a Shut an optimizing compiler up about possibly (but never) unused
variables.

Submitted by:	charnier
2000-07-24 21:46:12 +00:00
Mitsuru IWASAKI
df56ce3e40 Fix a bug so that we have correct number of pccard instances in pcic_attach().
pcic_attach() got a wrong pointer to pcic_slots since device haven't
set correct unit number yet, so always accessed elements of pcic_slots
which belong to pcic0 (unit number 0).

Now we set unit number to pcic device first, then access to pcic_slots
based on the unit number we've just set.
2000-07-24 21:44:00 +00:00
Kenneth D. Merry
cf8432359c Allocate major number 153 for the character device interface for the ti(4)
driver.
2000-07-24 21:21:03 +00:00
David E. O'Brien
cfcf9e97c9 Back out rev 1.12 (safe quoting) until I have a chance to rework the change
and get wider testing.  Too many people are having problems with the
script in its current form.
2000-07-24 20:50:18 +00:00
Paul Saab
176e822873 Typos and spelling fixes.
Submitted by:	charnier
2000-07-24 20:35:19 +00:00
Philippe Charnier
8ad08d33c1 Start enumerate option with `The following options are available' like
most of the utilities.
.Nm prog -> .Nm
Remove unused include
Make use of getopt() instead of parsing params by hand.
2000-07-24 20:22:49 +00:00
Kirk McKusick
91ea161570 If the lost+found directory is created by fsck, it will do a cacheino()
which sets the inoinfo's i_parent and i_dotdot to 0, but they never get
set to ROOTINO. This means that propagate will never find lost+found and
its descendents, subdirectories will remain DSTATE (instead of DFOUND)
even though they *are* correctly linked in, and pass4.c will try to
clear them unsuccessfully, thinking that there is no link count from the
DSTATE directory's parent. The result is that you need to run fsck twice
and get link count increasing errors (which are unexpected and fatal
when running in preen mode). The fix is to set i_parent and i_dotdot to
"parent" after the second cacheino() call in dir.c:allocdir().

Obtained from:	"Ethan Solomita" <ethan@geocast.com> (of the NetBSD Project)
2000-07-24 19:50:20 +00:00
Poul-Henning Kamp
2eaaa4dea8 Allocate major 152 to ACPI.
Requested by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
2000-07-24 19:00:18 +00:00
Jordan K. Hubbard
b5e57da1d1 Remove outdated crypto comments. 2000-07-24 18:45:25 +00:00
Sheldon Hearn
3c63f48c66 Clean up some nits, with the permission of the author:
* Grammar fixes.
  * Mark up rfork and vnode as cross-references.
  * Clarify the use of the RFFDG flag to rfork(2).
2000-07-24 18:03:53 +00:00
Jordan K. Hubbard
cf07fd263a Terminate, with extreme prejudice, the USAResident hack which
does bad things to /etc/make.conf in certain situations.  Also
soften the "don't install crypto from the USA!" messages since,
except for RSA (which is still noted), that's not so true anymore.
2000-07-24 18:00:16 +00:00
Nick Sayer
6d57c73f9c Sundry changes to debugging code.
Add spl/splx to various sensitive spots
Change semantics of the vmnet version of the device to keep VMware happy
(don't junk state when the device is closed)

Submitted by:	vsilyaev@mindspring.com
2000-07-24 15:32:26 +00:00
Sheldon Hearn
d16b1d092c Previous commit was...
Reviewed by:	markm
2000-07-24 15:15:36 +00:00
Sheldon Hearn
0e2c115b95 Close a window of readability when creating the entropy seed file,
which must not be world-readable.
2000-07-24 15:14:47 +00:00
Sheldon Hearn
1b9735e6f2 Mark up the -a flag to unalias as a flag (Fl), not an argument (Ar). 2000-07-24 15:02:04 +00:00
Sheldon Hearn
5d3b843b57 Add missing punctuation to one line. 2000-07-24 14:59:50 +00:00
Sheldon Hearn
1f3ea974f3 Add an EXAMPLES section with an example of how to mount a
malloc(9)-backed md(4) device on /tmp .
2000-07-24 14:23:47 +00:00
David Malone
a144588d15 Allow syslogd to select messages based on the originating host in
a similar way to the way it can select messages from a given program.

Lines beginning with "+hostname" or "#+hostname" select messaes
from that hostname and lines beginning with "-hostname" or "#-hostname"
match messages not from that hostname.

There are some significant style issues left in the original program
selection code and the man page. This should be cleared up in some
later commits.

Reviewed by:	sheldonh
Based on an original patch by:    Bernd Walter <ticso@cicely8.cicely.de>
Man page stylist:	sheldonh
2000-07-24 14:10:17 +00:00
Sheldon Hearn
c146223678 When manual pages are moved or removed, MANX should be changed
to NOMAN.

Reported by:	bde
2000-07-24 13:52:07 +00:00
Sheldon Hearn
ae193fb45b If the initial attempt to write ${entropy_file} to /dev/random fails
and the randomdev.ko module is not resident, try to load the module and
perform the write again.

Reviewed by:	markm
2000-07-24 13:40:41 +00:00
Jeroen Ruigrok van der Werven
899266e346 Document device tdfx and options TDFX_LINUX. 2000-07-24 11:16:56 +00:00
Sheldon Hearn
6b88e76b89 truncate.c:
Do not include unused header files.
	Add rcsid.
	Change copyright.

truncate.1:
	Add AUTHORS section.

Submitted by:	charnier
2000-07-24 08:56:42 +00:00
Brian Feldman
0c09388123 Get rid of the stupid bug where diff sticks trash in your generated
diff output; there being no trailing newline caused it to bitch and
moan and ruin diffs.  That's dumb, if I may say so myself.

Yes, this file is coming off the vendor branch.  It hasn't been
updated in 6 years.

Approved by:	peter
2000-07-24 07:40:02 +00:00
Kirk McKusick
9b97113391 This patch corrects the first round of panics and hangs reported
with the new snapshot code.

Update addaliasu to correctly implement the semantics of the old
checkalias function. When a device vnode first comes into existence,
check to see if an anonymous vnode for the same device was created
at boot time by bdevvp(). If so, adopt the bdevvp vnode rather than
creating a new vnode for the device. This corrects a problem which
caused the kernel to panic when taking a snapshot of the root
filesystem.

Change the calling convention of vn_write_suspend_wait() to be the
same as vn_start_write().

Split out softdep_flushworklist() from softdep_flushfiles() so that
it can be used to clear the work queue when suspending filesystem
operations.

Access to buffers becomes recursive so that snapshots can recursively
traverse their indirect blocks using ffs_copyonwrite() when checking
for the need for copy on write when flushing one of their own indirect
blocks. This eliminates a deadlock between the syncer daemon and a
process taking a snapshot.

Ensure that softdep_process_worklist() can never block because of a
snapshot being taken. This eliminates a problem with buffer starvation.

Cleanup change in ffs_sync() which did not synchronously wait when
MNT_WAIT was specified. The result was an unclean filesystem panic
when doing forcible unmount with heavy filesystem I/O in progress.

Return a zero'ed block when reading a block that was not in use at
the time that a snapshot was taken. Normally, these blocks should
never be read. However, the readahead code will occationally read
them which can cause unexpected behavior.

Clean up the debugging code that ensures that no blocks be written
on a filesystem while it is suspended. Snapshots must explicitly
label the blocks that they are writing during the suspension so that
they do not cause a `write on suspended filesystem' panic.

Reorganize ffs_copyonwrite() to eliminate a deadlock and also to
prevent a race condition that would permit the same block to be
copied twice. This change eliminates an unexpected soft updates
inconsistency in fsck caused by the double allocation.

Use bqrelse rather than brelse for buffers that will be needed
soon again by the snapshot code. This improves snapshot performance.
2000-07-24 05:28:33 +00:00
Marcel Moolenaar
3adc8b3d1d Revert the reversion of the default mtree behaviour. The mtree
command now follows symlinks again.

Requested by: jkh
2000-07-24 02:57:27 +00:00
Brian Feldman
55af4c7d94 Using an atomic operation here won't help if nobody else uses them (for
this).  Use the simple_lock() on v_interlock like elsewhere.
2000-07-23 22:19:49 +00:00
Marcel Moolenaar
a5061fba1f Argh... mtree has been removed from the bootstrap-tools. In that
case we need to save it in installworld. That latter I forgot...

Pointy hat: me
2000-07-23 21:30:35 +00:00
Marcel Moolenaar
dce97721ea Name all kernels 'kernel'. This fixes the incompatible behaviour
of the buildkernel and installkernel targets where the kernel
was called after the config name.

While here, fix the brokenness of the installkernel target. It
used to use ${IMAKEENV}, but since that has a very restricted
PATH, it couldn't find make(1). Use ${CROSSENV} instead.
2000-07-23 17:38:32 +00:00
Marcel Moolenaar
03567510a8 Add bounds checking to stackgap_alloc. Previously it was possible
to construct a path that was long enough (ie longer than
SPARE_USRSPACE bytes) and trash the stack.

Note that SPARE_USRSPACE is much smaller than MAXPATHLEN so that
the Linuxulator will now return ENAMETOOLONG even if the path
is smaller than MAXPATHLEN.

PR: 12749
2000-07-23 16:54:18 +00:00
Marcel Moolenaar
fa90cca2fc Remove mtree for bootstrap-tools. The -L switch change has been
backed out.
2000-07-23 16:43:03 +00:00
Marcel Moolenaar
11017a687b Backout addition of -L switch to mtree. Using -L breaks the
build process in too many cases. Adding mtree to bootstrap-tools
to solve this breaks the upgrade path because mtree needs a
libc that has strtofflags and fflagstostr.
2000-07-23 16:33:00 +00:00
Seigo Tanimura
eecdc4415b MFPAO: Add support for AX88190, equipped in MELCO LPC3-TX. 2000-07-23 15:15:43 +00:00
Sheldon Hearn
4d532a362e Close file descriptors after use so as not to abuse the descriptor
table when a long argument list is given. :-)

Reported by:	Sven Agnew <afterhours80@hotmail.com>
2000-07-23 13:24:01 +00:00
Jeroen Ruigrok van der Werven
4c27efd514 Add weak_mountd_authentication, which is examined in /etc/rc.network.
Setting this to YES instead of its default NO, causes mountd to be
passed the -n flag, which allow non-root users mount requests to be served.
2000-07-23 11:31:09 +00:00
Mark Murray
1e42415db0 Remove references to the (removed) kern.timecounter.method sysctl. 2000-07-23 11:12:59 +00:00
Mark Murray
c90a8fc9a5 Clean this up with some BDE-inspired fixes.
o Make the comments KNF-compliant.
o Use nanotime instead of getnanotime; the manpage lies about the
  kern.timecounter.method - it has been removed.
o Fix the ENTROPYSOURCE const permanently.
o Make variable names more consistent.
o Make function prototypes more consistent.

Some more needs to be done; to follow.
2000-07-23 11:08:16 +00:00
Sheldon Hearn
bf1a3264f7 Remove the awi(4) manual page from the sys/ hierarchy after a repo-
copy to share/man/man4 .  The file is still not connected to the
build from that directory either.
2000-07-23 09:40:39 +00:00
Brian Feldman
792e090234 Clarification (forced commit):
The immutability flag referred to in the previous revision is actually
VTEXT, not VEXEC.
2000-07-23 08:59:18 +00:00
Brian Feldman
25ead03462 Solve the problem where it is possible to get the kernel stuck in
a loop down in pmap_init_pt().  A subtraction causes the number of
pages to become negative, that was assigned to an unsigned variable,
and there is a lot of iteration.  The bug is due to the ELF image
activator not properly checking for its files being the correct size
as specified by the ELF header.

The solution is to check that the header doesn't ask for part of a
file when that part of the file doesn't exist.  Make sure to set
VEXEC at the proper times to make the executables immutable (remove
race conditions).  Also, the ELF format specifiies header entries
that allow embedding of other executables (hence how ld-elf.so.1
gets loaded, but not the same as loading shared libraries), so those
executables need to be set VEXEC, too, so they're immutable.

Reviewed by:	peter
2000-07-23 06:49:46 +00:00
Warner Losh
11c5444470 First attempt to fix a buildworld from -stable machine. Explicitly
include strtofflags.c from lib/libc/gen when building mtree until the
current dependency mess with mtree is fixed.
2000-07-23 06:15:54 +00:00
Nick Sayer
a19fdb8f27 apm -d also needs a writable file descriptor. 2000-07-23 04:49:43 +00:00