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)
While it is true we moved over to our own elf*-<arch>-fbsd files as the
last comment said; these files didn't deal with ELF branding, but that the
default ELF_DYNAMIC_INTERPRETER is wrong for us (and most everyone else!).
We now have our own FBSD emulation and the ELF_DYNAMIC_INTERPRETER is
handled thru the new emulation by 'ld'.
Alan Cox [Mon, 2 Dec 2002 04:54:21 +0000 (04:54 +0000)]
Hold the page queues lock when calling pmap_unwire_pte_hold() or
pmap_remove_pte(). Use vm_page_sleep_if_busy() in
_pmap_unwire_pte_hold() so that the page queues lock is released
when sleeping.
Robert Watson [Mon, 2 Dec 2002 03:22:57 +0000 (03:22 +0000)]
Add support for -R for file relabel operations.
Add 'setfsmac' link, which permits labels to be provided in a label
specification file, making it easier to provide initial file system
labeling specifications. This is used by the new mac_lomac to
provide initial system labeling and policy, and by sebsd, the port
of SELinux FLASK/TE to FreeBSD.
Peter Wemm [Mon, 2 Dec 2002 03:20:25 +0000 (03:20 +0000)]
Update bmake glue after 1.11.2.1-20021201 import. options.h is no longer
touched by configure in the autoconf system and a standard version is
now used.
Peter Wemm [Mon, 2 Dec 2002 03:13:37 +0000 (03:13 +0000)]
Import cvs-1.11.2.1 as of 2002/12/01 onto vendor branch. This fixes all
of the bugs that I know of. We've been running a slightly older version
of this on freefall/repoman, where it was afflicted by a silly merge error
on my part (fixed).
o Newer EFI implementations require that a GPT is preceeded by
a PMBR. Make sure the create command creates a PMBR as well
(if not already present).
o When parsing the MBR, explicitly check for a PMBR and create
a PMBR map node if one is found.
o When parsing the MBR, recurse to handle extended partitions.
This allows us to flatten nested MBRs when migrating to a
GPT.
o Have the migrate command bail out if it encounters a partition
it doesn't know how to migrate. This avoids data loss.
o Change the output of the show command so that the UUIDs of the
GPT partitions fit on the same line.
o Show when partitions are extended partitions and add the PMBR
type.
Peter Wemm [Mon, 2 Dec 2002 01:05:08 +0000 (01:05 +0000)]
Replace rev 1.33 with a real fix. The problem was integer overflows
when trying to store the year in a signed int. The maximum time_t on ia64
is around 292 billion years in the future, but 'int' and struct tm.tm_year
can only represent then ext 2.1 billion years or so.
This solves the problem of mktime/localtime looping on ia64. Unfortunately,
the standards say that tm_year is an 'int', so we are still stuck with a
y2147483647 bug. bash2's configure script looks for bugs in mktime() and
fails on ia64 because of this. However, mktime() on FreeBSD fails the test
normally anyway so this is no big loss.
This change does not affect any other platforms besides ia64.
Thomas Moestl [Sun, 1 Dec 2002 23:30:26 +0000 (23:30 +0000)]
Always initialize the UPA target module id in the interrupt mapping
register to the one of the processor doing the interrupt setup. This
is required since this field is preinitialized to 0, but there exist
machines which have no processor with a MID of 0 (e.g. e450s with 1 or 2
processors).
Add some more macros for handle the interrupt mapping registers, and
rename some existing ones for consistency.
Thomas Moestl [Sun, 1 Dec 2002 23:21:15 +0000 (23:21 +0000)]
1.) Do not look for PCI INOs in the FFB interrupt mapping registers; they
are nevers used for PCI interrupts, but can cause false matches since
they are fully programmable.
2.) Skip the mapping registers for slot a2 and a3 on "psycho" bridges,
since they are not present there. Again, this could cause false matches,
which would result in the interrupt being delivered at most once.
Robert Watson [Sun, 1 Dec 2002 23:19:57 +0000 (23:19 +0000)]
Teach mdmfs how to pass UFS version numbers through to newfs. Because
of an argument name collision with -O, use -v, and default to whatever
the newfs default is for the platform (generally, UFS1). This is
required to support diskless workstations that use UFS2 for their
mdmfs file systems.
Thomas Moestl [Sun, 1 Dec 2002 23:06:14 +0000 (23:06 +0000)]
Reverse the quirk table entry for swizzling on a missing interrupt map;
this is now done on all machines except for some known problematic ones.
Add an additional guard to make sure that the interrupt numbers are
in the correct range before swizzling. This should catch any remaining
models for which the swizzle is inappropriate.
Correct the swizzle calculation to account for the fact that the parent
interrupt numbers to be swizzled are 1-based.
Thomas Moestl [Sun, 1 Dec 2002 22:59:29 +0000 (22:59 +0000)]
Do not panic when a dmamap is unloaded more then once, but just silently
ignore it. This is non-fatal on the other architectures, and some
drivers seem to do this.
Alan Cox [Sun, 1 Dec 2002 18:57:56 +0000 (18:57 +0000)]
Hold the page queues lock when calling pmap_protect(); it updates fields
of the vm_page structure. Make the style of the pmap_protect() calls
consistent.
Bruce A. Mah [Sun, 1 Dec 2002 18:03:42 +0000 (18:03 +0000)]
Make the following changes to the semi-automated package split:
1. On disc1, print/acroread4 for alpha and print/acroread5 for i386
replace print/acroread, which was not compatible with the linux_base
that we ship by default. Remove print/acroread4 from disc3 as
redundant.
2. www/linux-netscape47-* were removed due to security holes;
substitute www/netscape48-* on disc1.
Bruce Evans [Sun, 1 Dec 2002 17:36:18 +0000 (17:36 +0000)]
Backed out previous commit (alignment suitable for RELENG_4) as planned
since it has been MFC'ed. See the log message for the previous commit
for more details. The alignment bug in gcc-3 has not been fixed, but
it is not very serious and the previous commit just moved it (as intended).
Conceiveably, there may exist an algorithm which can tell if a sequence of bytes
are the output of AES/128/CBC or ARC4RANDOM. Encrypt the random data with which
we wipe when we get a BIO_DELETE to make such an algorithm useful.
Sponsored by: DARPA & NAI Labs
Approved by: re (blanket)
Thomas Quinot [Sun, 1 Dec 2002 14:20:08 +0000 (14:20 +0000)]
In ata_reinit, when ata_getparam fails for a new device (indicating that
the device is not actually present), clear the corresponding bit in
the ch->devices bitmap. This resolves a panic that occurred with ATAPI/CAM
after an APM suspend/resume, when the ATA hardware would erroneously
report an extra ATAPI device.
Approved by: re, sos
Reviewed by: roberto
MFC after: 7 days
Udo Erdelhoff [Sun, 1 Dec 2002 12:56:41 +0000 (12:56 +0000)]
MFbed: track changes in the english version and general cleanup
early-adopter/article.sgml: 1.5 -> 1.7
hardware/common/dev.sgml: 1.115 -> 1.116
installation/common/upgrade.sgml: 1.9 -> 1.10
relnotes/common/new.sgml: 1.455 -> 1.460
Scott Long [Sun, 1 Dec 2002 08:13:37 +0000 (08:13 +0000)]
Major update to the ahd driver to fix many bugs found in the previous
version, plus add support for the new features found in the Rev B
version of the chip. The changelog is quite long and can be provided
on request. Major features include vastly improved protocol violation
handling, full support for the 7902 Rev B, better parity error
handling, and better packetized overrun handling, to name a few.
Scott Long [Sun, 1 Dec 2002 07:59:01 +0000 (07:59 +0000)]
Implement workaround for broken busfree-rev in the A4.
HP -> CPQ
Rearrange IDs to better match which chips they use.
Convert to uniform product description strings.
Simplify 7901A setup function.
Add the NONPACKFIFO_BUG and PACED_NEGTABLE_BUG entries
for the A.
Add rev B bugs and features.
The double write workaround for CURRSCB is only required if
abort pending is set. Remove this work around and set the
abort pending bug bit on the B at least until we have better
confirmation that the double write is always safe.
Add updated H2B identifiers
Move IOCell paramters into softc and add a hook for the
OSM to modify these as well as other settings prior to
committing them to the chip.
SLEW -> SLEWRATE
PREQDIS in DEVCONFIG1 went away after the A2.
Remove all code that references this bit. This
is especially important since this bit was reused
in the B for a different HW fix workaround.
Properly set the AHD_NEW_IOCELL_OPTS and
AHD_NEW_DFCNTRL_OPTS features for the B.
Remove stray/random extra 7901A generic PCI
table entry. Also switch the correct 7901A
generic entry to use ID_ALL_MASK since we
can only differentiate the 7901A from the
7902 by checking for a "type field" of 0xE.
Set AHD_INTCOLLISIONT_BUG for the Rev B.
Set the PREQDIS bit in DEVCONFIG1 for the B. The
bit is misnamed, but seems to disable a work-around
that breaks on the B on PCI busses.
Add a routine for testing memory mapped register access.
This will hopefully detect things like buggy via chipsets
so that the OSM can fallback to using I/O mapped access
when memory mapped I/O simply will not work.
Scott Long [Sun, 1 Dec 2002 07:54:53 +0000 (07:54 +0000)]
Add our controller name to the front of our
diagnostic "Setting Mode" messages.
Use a read of HCNTRL to flush our write to CLRCMDCMPLT
on the RevB. This allows us to check to see if the sequencer
is paused and to initiate the interrupt collision workaround
without incuring an extra read.
Alan Cox [Sun, 1 Dec 2002 05:40:18 +0000 (05:40 +0000)]
Hold the page queues lock when calling pmap_protect(); it updates fields
of the vm_page structure. Nearby, remove an unnecessary semicolon and
return statement.