Scott Long [Thu, 5 Dec 2002 00:47:27 +0000 (00:47 +0000)]
The sequencer downloading code assumes that all jump
labels are acurate in relation to a fully compiled
sequencer program (all patches downloaded). Correct
a few occurances of a relative jump across a macro
that ended up jumping us into the last instruction
of the macro.
Chris Costello [Thu, 5 Dec 2002 00:05:38 +0000 (00:05 +0000)]
Document the following MAC policies:
o Biba: A data integrity policy
o BSD Extended: Support for the firewall-like access controls (ugidfw(8))
o MLS: Multi-level security, a confidentiality policy
(These files originally lived in src/share/man/man9)
Scott Long [Wed, 4 Dec 2002 22:51:29 +0000 (22:51 +0000)]
Last minute fixes to ahc and ahd:
ahd_pci.c:
Retrieve the allow_memio hint from the resource manager to
determine whether or not to try PCI MEMIO.
aic79xx_osm.h:
aic7xxx_osm.h:
Don't wrongly abuse the callout_reset() interface when trying
to abuse timeouts generated from the CAM layer. This fixes the
console freeze and lost timeout problem that many have reported,
especially on SMP systems.
aic79xx_pci.c
aic7xxx_pci.c
Rewrite the MEMIO test routine to prevent certain broken chipsets
from trying to burst multiple DWORDs to the registers. Also make
the routine better detect byte merging by the host bridge and
deal with it.
aic79xx.reg:
Correct an incorrect register definition.
Robert Watson [Wed, 4 Dec 2002 22:01:03 +0000 (22:01 +0000)]
Remove a const that generates a warning: the const isn't strictly
wrong, since we don't want the variable changed, but since we assign
it to variables that may also refer to other non-const strings,
warnings were generated that could break LINT.
Ruslan Ermilov [Wed, 4 Dec 2002 18:57:46 +0000 (18:57 +0000)]
Consistently mark std(in|out|err) with .Dv, because that's how they
are marked up in stdio(3), and because they are defined expressions
of type "FILE *".
Kris Kennaway [Wed, 4 Dec 2002 17:22:48 +0000 (17:22 +0000)]
Minimal change to cause pkg_version to examine the new INDEX-5 file
instead of INDEX. This should be done better since this file name will
depend on the FreeBSD major version.
Merge revs 1.2 (-fformat-extensions), 1.7 (FORCE_OPTIMIZATION_DOWNGRADE knob),
1.14 (-O/-O1 optimize alignment for time, not size) into Gcc 3.2.1 release.
Change the process title as soon as possible to mask information passed on
the command line by getty(8). This is not a perfect fix, but drastically
reduces the window of exposure.
Use the correct value when writing the Day Of Week byte in the CMOS.
The correct range is [1...7] with Sunday=1, but we have been writing
[0...6] with Sunday=0.
The Soekris computers flagged the zero, zapped the date, so if you
rebooted your soekris on a sunday, it would come up with a wrong
date.
Bruce has a more extensive rework of this code, but we will stick with
the minimalist fix for now.
Spotted by: Soren Kristensen <soren@soekris.com>
Thanks to: Michael Sierchio <kudzu@tenebras.com>.
Confirmed by: bde
Approved by: re
Jake Burkholder [Wed, 4 Dec 2002 04:34:59 +0000 (04:34 +0000)]
Reduce WARNS level to 3 in the non-crypto case to fix make release on sparc64.
This may only be turning up now to changes in the cpp predefines for sparc64,
which may be turning on more strict alignment checking.
Robert Watson [Tue, 3 Dec 2002 22:25:47 +0000 (22:25 +0000)]
Reformulate how sysinstall handles file system options in the label
editor, in order to support specifying UFS2 as a newfs option.
(1) Support three different newfs types: NEWFS_UFS, NEWFS_MSDOS, and
NEWFS_CUSTOM. Don't mix up the arguments to them: you can't use
soft updates on an msdos file system.
(2) Distinguish adding new arguments to the newfs command line from
replacing it. Permit the addition of new arguments by the user for
NEWFS_UFS. If we entirely replace the command line provided by
sysinstall, call it NEWFS_CUSTOM. 'N' will now add additional
arguments; 'Z' will opt to replace the newfs command line entirely,
but will prompt the user with their current command line as a
starting point.
(3) Construct the newfs command line dynamically based on the options
provided by the user at label-time. Right now, this means selecting
UFS1 vs. UFS2, and the soft updates flag. Drop in some variables
to support ACLs and MAC Multilabel in the future also, but don't
expose them now.
This provides sysinstall with the ability to do more "in band" editing
of the newfs command line, so we can provide more support for the user,
but doesn't sacrifice the ability to entirely specify the newfs command
line of the user is willing to give up on the cushiness factor. It
also makes it easier for us to specify defaults in the future, and
define conditional behavior based on user configuration selections.
For now, we default to UFS1, and permit UFS2 to be used as the root
only on non-i386 systems.
While I was there, I dropped the default fragment and block sizes,
since newfs has much more sensible defaults now.
Søren Schmidt [Tue, 3 Dec 2002 20:20:44 +0000 (20:20 +0000)]
Add support for the PC98 platform to the ATA driver.
This mostly consists of functionality to serialize accesses to
the two ATA channels (which can also be used to "fix" certain
PCI based controllers).
Add support for Acard controllers.
Enable the ATA driver in PC98 GENERIC, and add device hints.
Update man page with latest support.
The PC98 core team has kindly provided me with a PC98
machine that made this all possible, thanks to all that
contributed to that effort, without that this would
probably newer have been possible..
John Baldwin [Tue, 3 Dec 2002 19:42:30 +0000 (19:42 +0000)]
- Convert the installation of the X package to using installPackage()
rather than installX11package().
- Add a perl psuedo-dist that installs the perl package. The perl
distribution is selected by default when a User distribution set is
selected. It is not selected when a Minimal distribution set is
selected. The perl distribution may be toggled manually in the
custom menu just as other distributions.
Kirk McKusick [Tue, 3 Dec 2002 18:21:09 +0000 (18:21 +0000)]
Add the `L' option to dump to notify it that it is dumping a
live filesystem. To obtain a consistent dump image, dump takes
a snapshot of the filesystem and then does a dump of the snapshot.
The snapshot is removed when the dump is complete.
Also add an operator warning that the `L' option should be used
if dump is run on a live filesystem without the `L' option being
specified. The alternative would be to silently use a snapshot
any time that a live filesystem is dumped, but this change in
dump semantics seemed too drastic at this time.
Kirk McKusick [Tue, 3 Dec 2002 18:19:27 +0000 (18:19 +0000)]
Have to use bread() rather than UFS_BALLOC() when obtaining a
previously allocated block as the previous use of the block may
have fallen out of the cache. Failure to reread its contents cause
zeroed results to be written instead of the proper contents.
Conversely, when the block is going to be entirely filled in, it
is not necessary reread the old contents.
John Baldwin [Tue, 3 Dec 2002 16:09:55 +0000 (16:09 +0000)]
Fix a bug in the fdisk editor that partially masked the chunk deletion
bug fixed yesterday. New slices created in the fdisk editor and slices
whose sub-type is changed are of type 'mbr' if their sub-type is not a
magic type, not type 'unknown'.
Robert Watson [Tue, 3 Dec 2002 15:16:10 +0000 (15:16 +0000)]
Hook up a sample LOMAC labeling policy. Unlike the old LOMAC module,
the file system initial labeling policy exists in userland, and is
fed into setfsmac(1). This is based on the old LOMAC PLM.
Warner Losh [Tue, 3 Dec 2002 08:34:20 +0000 (08:34 +0000)]
Properly account for prefetchable memory when a request is being made.
We allow the request to go through if it matches either a prefetchable
or a non-prefetchable part of the bridge. We do not check to make
sure it is the right kind of memory because most drivers to not yet
properly set RF_PREFETCHABLE (only cardbus seems to do so, and I'm not
entirely sure it does it right). RF_PREFETCHABLE was invented for
cardbus, so hasn't been properly documented yet.
This is still overridable by hw.pci.allow_unsupported_io_ranges, but
the need for that is greatly reduced, especially for the nvida driver.
Approved by: re
Reviewed by: jhb and many testers
Submitted by: Matt Emmerton (although this has been reworked somewhat)
Kirk McKusick [Tue, 3 Dec 2002 05:10:07 +0000 (05:10 +0000)]
Properly handle UFS2 sparsely allocated inodes. The UFS2 filesystem
only preallocates a small number of inodes. The dump program tries
to scan through all the allocated inodes on a filesystem which
causes bad behavior if they have never been allocated. Thus dump
must calculate the set of inodes that have actually been allocated
and scan only those inodes.
Greg Lehey [Mon, 2 Dec 2002 23:49:59 +0000 (23:49 +0000)]
Relax partition overlap check to allow Vinum partitions to overlap
other partitiosns. This is necessary when migrating conventional
partitions to Vinum and was broken by recent more stringent overlap
checks. This is arguably the wrong way to do it. A better method
would be to have the loader understand a subset of Vinum partitioning
and allow an install directly to Vinum, but until then, this is the
best we have.
John Baldwin [Mon, 2 Dec 2002 21:42:29 +0000 (21:42 +0000)]
Break up a bunch of crazy if statements to use a case statement instead
to be cleaner. Also, when deleting a chunk, try to find the mother chunk
as a whole chunk by default if this isn't a BSD partition or a unused or
whole chunk. Before we just did this for FreeBSD and FAT slices, which
means that other chunk types such as EFI and mbr (mbr is used for slices
that don't have their own chunk type).
Peter Pentchev [Mon, 2 Dec 2002 20:38:12 +0000 (20:38 +0000)]
Make a CR/LF sequence measure up to its name: the order of the CR and LF
characters was reversed, resulting in some network appliances, including
at least some NAS devices from Ascend, not recognizing our finger(1)
request.
PR: 45914
Submitted by: J R Matthews <jrm@delta-e.com.au>
Approved by: re (rwatson)
MFC after: 2 weeks
Peter Pentchev [Mon, 2 Dec 2002 20:29:08 +0000 (20:29 +0000)]
Replace the remaining strcpy() instances with strlcpy(), fixing a segfault
when parsing a malformed command-line parameter.
Rearrange a risky usage of sprintf() in a loop.
Reported by: phrail@division7.us via the vuln-dev mailing list
Approved by: re (rwatson)
ia64 specific.
o Mount the EFI file system as msdosfs and not ufs as it's a FAT
file system. Introduce Mount_msdos() for this to go side-by-side
with Mount().
o Also, since mounting is performed as a command (which means it's
queued, sorted, lost, found and executed), we cannot create a
directory on the file system by calling mkdir. We must make sure
the mkdir happens after the mount. Introduce Mkdir_command() to
allow mkdir operations to be queued, sorted, lost, found and
executed as well.
Kirk McKusick [Mon, 2 Dec 2002 19:31:53 +0000 (19:31 +0000)]
Correctly calculate the initial number of fragments in a filesystem
so that fsck does not complain with `SUMMARY BLK COUNT(S) WRONG IN
SUPERBLK' the first time it is run on a new filesystem.
Reported by: Poul-Henning Kamp <phk@freebsd.org>
Sponsored by: DARPA & NAI Labs.
Kirk McKusick [Mon, 2 Dec 2002 19:30:37 +0000 (19:30 +0000)]
Verify that alternate superblocks have a correct magic number before
trying to use them. Set a minimum value for numdirs when using an
alternate superblock to avoid spurious numdirs == 0 error. Calculate
new fields when using an alternate superblock from a UFS1 filesystem
to avoid segment faulting.
Thomas Moestl [Mon, 2 Dec 2002 18:56:30 +0000 (18:56 +0000)]
Remove a workaround for a binutils bug that was fixed in the recent
import, as it breaks the relocation kernel modules built with the new
binutils.
Note that this, together with the binutils import, marks a kernel module
flag day on sparc64: modules built with the old binutils will not work
with new kernels and vice versa. Mismatches will result in panics.
Ruslan Ermilov [Mon, 2 Dec 2002 14:31:21 +0000 (14:31 +0000)]
If /usr/bin/make fails to pass the regression tests, it might not
be suitable for building. The old action here was to upgrade the
make in /usr/bin. This is both bogus and does not work under non
root. So, rather than overwriting the existing /usr/bin/make, we
now install it into a safe location, and use it from there.
Reviewed by: imp, marcel
Approved by: re (rwatson)