David Greenman [Mon, 6 Feb 1995 02:20:40 +0000 (02:20 +0000)]
Changed order of release of vnode/object to fix a problem where the vnode
is freed with an old object still attached (subsequently causing a panic).
Fixes NFS server panic "object/pager mismatch".
Correct a bug in the P function: according to 7th edition UNIX (tm), the
newline must be part of the pattern space i.e. `echo a|sed -e P' must print
a
a
and not
aa
This is consistent with gnu sed, SunOS, Ultrix (and probably others!)
Søren Schmidt [Sun, 5 Feb 1995 23:44:25 +0000 (23:44 +0000)]
Fixed the annoing bug that caused writes to /dev/console to go to
the active virtual terminal (Boy, do I have little hair left).
Misc other fixes, try to enable cursor earlier in the game.
Bill Paul [Sun, 5 Feb 1995 21:48:04 +0000 (21:48 +0000)]
Wrote manual page for yppush and edited Makefile to install it.
Added conditional definition for _PATH_YP in yppush.c in case _PATH_YP
isn't defined anywhere else.
Bring pcvt console driver into the tree - now users can chose whichever
console driver they like best (2 is ok, it was 4 that was a little insane
for awhile there! :-).
Submitted by: hm
Change the defaults for newfs to disregard the geometry in the disklabel.
We pretend we have one head with two megabyte worth of sectors per cylinder.
The code try to access another head in what it belives to the same
physical cylinder, because it belives that it would be faster than
waiting for the next free sector under this head to come around.
Most modern drives doesn't have a "classical" geometry, and thus
we end up fooling ourselves doing the above optimization. With this
change we will fill a cylinder sequentially if we can, and thus get
much more mileage from the track-buffer/cache built into the drives.
As a result a lot of seeks to the next or previous track should be
avoided by this.
(My disk is a lot less noisy actually...)
You can still get the old behaviour, by specifying zero for the
numbers.
This will also solve the problem with newfs barfing at really big
drives.
A cute hack to speed up things by Keith: if getenv("PWD") is the same
inode as ".", then just return that. I added a check so it must start with
a '/'.
Satoshi Asami [Sat, 4 Feb 1995 05:49:26 +0000 (05:49 +0000)]
Add long-awaited (:) support for sophisticated dependency checking. We now
have three variables:
EXEC_DEPENDS - A list of "prog:dir" pairs of other ports this
package depends on. "prog" is the name of an
executable. make will search your $PATH for it and go
into "dir" to do a "make all install" if it's not found.
LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package
depends on. "lib" is the name of a shared library.
make will use "ldconfig -r" to search for the
library. Note that lib can be any regular expression,
and you need two backslashes in front of dots (.) to
supress its special meaning (e.g., use
"foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*").
DEPENDS - A list of other ports this package depends on being
made first. Use this for things that don't fall into
the above two categories.
DEPENDS behaves exactly like before, so old Makefiles will still work
the same. The two variables are lists of pairs as described above.
For instance, if your program depends on unzip and libjpeg.5.*, use
the following definitions:
Bruce Evans [Fri, 3 Feb 1995 22:28:34 +0000 (22:28 +0000)]
Include <time.h> instead of <sys/time.h> to get CLK_TCK. Including
<sys/time.h> works because <sys/time.h> includes <time.h> if KERNEL
is not defined, but is ugly.
Bruce Evans [Fri, 3 Feb 1995 22:09:56 +0000 (22:09 +0000)]
Change CLK_TCK to CLOCKS_PER_SEC.
Add a missing apostrophe that suggests inverting the frequency to get
tick size. It read better before because `CLK_TCK' suggests a tick
size although it is actually a frequency.
Bruce Evans [Fri, 3 Feb 1995 21:47:48 +0000 (21:47 +0000)]
Define CLOCKS_PER_SEC.
Define CLK_TCK only if _ANSI_SOURCE is not defined.
Don't include <machine/limits.h> to get the definition of CLK_TCK.
CLK_TCK should never have been defined there, and the inclusion
polluted the namespace.
Bruce Evans [Fri, 3 Feb 1995 21:31:35 +0000 (21:31 +0000)]
Don't depend on namespace pollution in <machine/limits.h> for the
definition of CLK_TCK. Use _BSD_CLK_TCK_ instead of CLK_TCK so that
we don't have to include the user header <time.h>.
Justin T. Gibbs [Fri, 3 Feb 1995 17:15:12 +0000 (17:15 +0000)]
Keep track of when we actually are awaiting a reply to an SDTR or WDTR
message instead of relying on the fact that we are scheduled to send them.
The old method worked 99.9% of the time, but someone reported some periferals
that did MSG_REJECT at odd times (sometimes before we could send an SDTR
or WDTR) that we would construe as the response to an SDTR or WDTR message.
This also removes a possible race condition where after a bus reset (the
result of a command time out not during intial probe time), we might queue
two commands both requesting SDTR, WDTR or both.
Justin T. Gibbs [Fri, 3 Feb 1995 17:08:17 +0000 (17:08 +0000)]
#include<kernel.h> to quiet a compiler warning having to do with the
DATA_SET (pcidevice_set, ahc_device) macro. Maybe this will allow
the aic7870 to be probed again. I don't have a PCI machine here
to test it.
Fix to h2ph "undefined function" bug
i reported today earlier..tested and works OK..
( To those who want to experience bug try running aub
with old version of socket.ph and with new one or just any
perl script "requiring " <sys/socket.ph> or <sys/cdefs.ph> )
David Greenman [Fri, 3 Feb 1995 03:40:08 +0000 (03:40 +0000)]
Removed a pile of vfs_unbusy_pages()...both unnecessary and wrong - resulted
in serious system instability. Changed a B_INVAL to a B_NOCACHE so that
buffer data is properly disposed of.
Submitted by: John Dyson, Rick Macklin, and ohki@gssm.otsuka.tsukuba.ac.jp
Bill Paul [Fri, 3 Feb 1995 01:09:35 +0000 (01:09 +0000)]
Fixed a rather serious bug that presents itself when FreeBSD is configured
as an NIS client. The pw_breakout_yp routines that are used to populate the
_pw_passwd structire only do anything if the bits in the pw_fields member
_pw_passwd are cleared. Unfortunately, we can get into a state where
pw_fields has garbage in it right before the YP lookup functions are
called, which causes the breakout functions to screw up in a big way.
Here's how to duplicate the problem:
- Configure FreeBSD as an NIS client
- Log in as a user who's password database records reside only in
the NIS passwd maps.
- Type ps -aux
Result: your processes appear to be owned by 'root' or 'deamon.'
/bin/ls can exhibit the same problem.
The reason this happens:
- When ps(1) needs to match a username to a UID, it calls getpwuid().
- root is in the local password file, so getpwuid() calls __hashpw()
and __hashpw() populates the _pw_passwd struct, including the pw_fields
member. This happens before NIS lookups take place because, by coincidence,
ps(1) tends to display processes owned by root before it happens upon
a proccess owned by you.
- When your UID comes up, __hashpw() fails to find your entry in the
local password database, so it bails out, BUT THE BITS IN THE pw_fields
STRUCTURE OF _pw_passwd ARE NEVER CLEARED AND STILL CONTAIN INFORMATION
FROM THE PREVIOUS CALL TO __hash_pw()!!
- If we have NIS enabled, the NIS lookup functions are called.
- The pw_breakout_yp routines see that the pw_fields bits are set and
decline to place the data retrieved from the NIS passwd maps into the
_pw_passwd structure.
- getpwuid() returns the results of the last __hashpw() lookup instead
of the valid NIS data.
- Hijinxs ensue when user_from_uid() caches this bogus information and
starts handing out the wrong usernames.
AAAARRRRRRRRRGGGGGGHHHHHHHHHH!!!
*Please* don't tell me I'm the only person to have noticed this.
Fixed by having __hashpw() check the state of pw_fields just before
bailing out on a failed lookup and clearing away any leftover garbage.
What a fun way to spend an afternoon.
Stefan Eßer [Thu, 2 Feb 1995 22:01:40 +0000 (22:01 +0000)]
Removed misleading copyright note. This file contains just
definitions taken from the PCI specs. Part of them were typed
in by Wolfgang Stanglmeier, the (at that time unneeded) rest
by Charles Hannum (thanks !).
Stefan Eßer [Thu, 2 Feb 1995 15:50:57 +0000 (15:50 +0000)]
Disable disconnect after drive timeouts, since these
may be the result of reselect following too fast for
the driver to notice. Not the final solution, but the
problem has been seen only with very few devices.
Reviewed by: se
Submitted by: wolf (Wolfgang Stanglmeier)
David Greenman [Thu, 2 Feb 1995 13:12:18 +0000 (13:12 +0000)]
Reapplied all of Stefan's changes. What a mess - the files were modified
and moved at the same time. This made it *very* difficult to fix the
revision log lossage that happend when the files were moved. SIGH.
David Greenman [Thu, 2 Feb 1995 09:09:15 +0000 (09:09 +0000)]
swap_pager.c:
Fixed long standing bug in freeing swap space during object collapses.
Fixed 'out of space' messages from printing out too often.
Modified to use new kmem_malloc() calling convention.
Implemented an additional stat in the swap pager struct to count the
amount of space allocated to that pager. This may be removed at some
point in the future.
Minimized unnecessary wakeups.
vm_fault.c:
Don't try to collect fault stats on 'swapped' processes - there aren't
any upages to store the stats in.
Changed read-ahead policy (again!).
vm_glue.c:
Be sure to gain a reference to the process's map before swapping.
Be sure to lose it when done.
kern_malloc.c:
Added the ability to specify if allocations are at interrupt time or
are 'safe'; this affects what types of pages can be allocated.
vm_map.c:
Fixed a variety of map lock problems; there's still a lurking bug that
will eventually bite.
vm_object.c:
Explicitly initialize the object fields rather than bzeroing the struct.
Eliminated the 'rcollapse' code and folded it's functionality into the
"real" collapse routine.
Moved an object_unlock() so that the backing_object is protected in
the qcollapse routine.
Make sure nobody fools with the backing_object when we're destroying it.
Added some diagnostic code which can be called from the debugger that
looks through all the internal objects and makes certain that they
all belong to someone.
vm_page.c:
Fixed a rather serious logic bug that would result in random system
crashes. Changed pagedaemon wakeup policy (again!).
vm_pageout.c:
Removed unnecessary page rotations on the inactive queue.
Changed the number of pages to explicitly free to just free_reserved
level.
David Greenman [Thu, 2 Feb 1995 08:49:08 +0000 (08:49 +0000)]
Calling semantics for kmem_malloc() have been changed...and the third
argument is now more than just a single flag. (kern_malloc.c)
Used new M_KERNEL value for socket allocations that previous were
"M_NOWAIT". Note that this will change when we clean up the M_ namespace
mess.
David Greenman [Thu, 2 Feb 1995 08:45:14 +0000 (08:45 +0000)]
Mostly cosmetic changes. Use KERNBASE instead of UPT_MAX_ADDRESS in
some comparisons as it is more correct (we want the kernel page tables
included).
Reorganized some of the expressions for efficiency.
Fixed the new pmap_prefault() routine - it would sometimes pick up the
wrong page if the page in the shadow was present but the page in object
was paged out. The routine remains unused and commented out, however.
Explicitly free zero reference count page tables (rather than waiting
for the pagedaemon to do it).
Clean these up a bunch more - gee I'm glad I do these snapshots, they uncover
*so many problems*.. Too bad the snaps themselves don't get made as a
consequence.. :-)
Bump the date forward Yet Another Day. David has some changes he wants to
see rolled in, so I guess we're down for Feb 2nd as the snap date!