freebsd kernel with SKQ
Go to file
Paul Richards 9abd5d84ac This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.
1998-11-19 18:12:03 +00:00
bin Don't use mmap() for non-regular files, since st_size is only meaningful 1998-11-18 11:47:45 +00:00
contrib Eliminate a setreuid() call that doesn't make sense for FreeBSD. 1998-11-18 01:24:34 +00:00
crypto Remove redundant decl. of time(). Causes problems on alpha 1998-09-01 15:17:28 +00:00
etc Add the directory "/usr/include/security", which is where the PAM 1998-11-18 01:51:25 +00:00
games Fix typo (if it's not a typo, then it doesn't make sense IMHO) 1998-11-09 05:40:22 +00:00
gnu Use mmap for reading files. This is faster than read(). 1998-11-14 23:37:32 +00:00
include 64bit clean now 1998-11-08 08:27:16 +00:00
kerberos5 While I am no longer making a shared library, nuke the old one to prevent 1998-08-30 13:08:54 +00:00
kerberosIV Add an explicit dependency on libcrypt so that shared library 1998-11-18 00:40:07 +00:00
lib Fix a couple of typos. 1998-11-19 18:07:28 +00:00
libexec Enable named-xfer and rbootd for alpha. 1998-11-10 06:50:35 +00:00
lkm Install kld version (there can be only one) 1998-11-11 07:04:49 +00:00
release Update ssh version number. It's only informational, anyway. 1998-11-15 23:30:26 +00:00
sbin Fix a typo in a comment. 1998-11-12 17:47:24 +00:00
secure Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:14 +00:00
share Mention in the man page that the Accton 1207D adapter is supported. 1998-11-18 21:05:11 +00:00
sys This fixes a bug in the bcache code whereby false cache hits occur 1998-11-19 18:12:03 +00:00
tools Removed all `vector xxxintr' specifications. Interrupt handlers are now 1998-10-22 15:53:06 +00:00
usr.bin Updated gencat(1) page from T. Lambert: 1998-11-18 04:30:53 +00:00
usr.sbin * Change 'struct resource' to 'struct config_resource'. 1998-11-15 18:07:35 +00:00
COPYRIGHT Add Id keyword 1998-09-13 23:11:13 +00:00
Makefile Restored all lost user targets that are supported by bsd.subdir.mk: 1998-10-17 15:25:26 +00:00
Makefile.inc0 Restored all lost user targets that are supported by bsd.subdir.mk: 1998-10-17 15:25:26 +00:00
Makefile.inc1 Add libpam to the "includes" and "libraries" targets. 1998-11-18 01:59:39 +00:00
Makefile.upgrade 3.0-RELEASE and now the post-release 3.0-CURRENT were being declared 1998-10-17 05:40:46 +00:00
README Correct the facts. The kerberosIV/ directory is not export restricted. 1998-09-13 09:38:34 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on: $Id: README,v 1.12 1998/06/30 08:08:05 jkh Exp $

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel and the contents of /etc.  Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.

Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

crypto		Export controlled stuff (see crypto/README).

etc		Template files for /etc

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

lkm		Loadable Kernel Modules.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/handbook/synching.html