Matt Jacob [Thu, 17 Jan 2002 02:16:35 +0000 (02:16 +0000)]
Allow alpha kernels to compile again- make sure opt_ddb.h is included
and the reference to db_regs is *extern* from alpha/include/db_machdep.h
(put it in alpha/alpha/machdep.c)- this avoids the problems we've had
about different 'common' sizes prohibiting the kernel from linking.
Alfred Perlstein [Thu, 17 Jan 2002 00:12:05 +0000 (00:12 +0000)]
Fix boundry condition in lock management:
Alfred, I took a look at retry_blockingfilelocklist() and the
solution seemed simple enough. Please correct me if I am wrong.
It seems said routine doesn't take into account boundary conditions
when putting back file_lock entries into the blocked lock-list.
Specifically, it fails when the file_lock being put back is the
last element in the list, and when it is the only element in the
list. I've included a patch below.
Basically, it introduces another variable: pfl, which keeps track
of the list item before ifl. That way if nfl is NULL, ifl gets
inserted after pfl. If pfl is also NULL, then it gets inserted
at the head of the list (since it was the only element in the
list).
Submitted by: Mike Makonnen <mike_makonnen@yahoo.com>
Tested by: Thomas Quinot <thomas@cuivre.fr.eu.org>
Doug Ambrisko [Wed, 16 Jan 2002 16:33:58 +0000 (16:33 +0000)]
Add VLAN for the dc(4) driver (ie long frame). The patch is 2 parts.
One to notify the system that the MTU for VLAN can be 1500 so the vlan
will automatically be configured with a 1500 MTU the other is to ignore
the error case if the received frame is to long.
The frame size notification came from code in the SIS driver, and
the support for long frames derived from the NetBSD Tulip driver.
Tested on: 4 port D-Link adapter DFE-570TX 4 Intel 21143
Netgear card with 82c169 PNIC 10/100BaseTX
Bruce Evans [Wed, 16 Jan 2002 12:18:22 +0000 (12:18 +0000)]
Added this makefile. This is not attached to the build yet. I often
install parts of /etc manually and it helps to have a makefile for
each subdir even if the main makefile doesn't invoke it.
Peter Wemm [Wed, 16 Jan 2002 02:22:19 +0000 (02:22 +0000)]
Change <b28> to HTT (Hyperthreading technology). If this flag is set then
cpuid with %eax=1 will return a logical cpu count in bits 16-23 of %ebx.
Bit 29 is actually 'TM' according to AP-485. This signifies the presence
of the thermal control circuit (which I believe can slow the clock down
to reduce core temperature).
Peter Wemm [Wed, 16 Jan 2002 00:44:29 +0000 (00:44 +0000)]
Ensure that we set all the %cr0 bits to a known state for the AP's before
they make it through to userland. This should fix the p5-smp problem
without affecting the other cpus (eg: cyrix, see initcpu.c and the special
cache handling for these cpu types).
Warner Losh [Tue, 15 Jan 2002 20:21:43 +0000 (20:21 +0000)]
o Sync the device list with OLDCARD.
o Remove bogus flags that aren't used (if we need them in the future, we can
add them back).
o Add support for the TI-1031. This is the only YENTA compatible PCI-PCMCIA
bridge that I'm aware of (all the others are PCIC on a PCI bus, which is
different).
John Baldwin [Tue, 15 Jan 2002 14:20:33 +0000 (14:20 +0000)]
Bump the limits for determining if we've held a spinlock too long as they
seem to be too short for the 500 Mhz DS20 I'm testing on. The rather
arbitrary numbers are rather bogus anyways. We should probably have
variables for these limits that are calibrated in the MD startup code
somehow.
John Baldwin [Tue, 15 Jan 2002 14:17:07 +0000 (14:17 +0000)]
- Catch up printtrap() to KSE by using curthread and testing it against
NULL rather than curproc. Without this, if we trap early before
curthread is set, we recursively panic.
- In an SMP kernel, if we trap before curthread is set, then trap is going
to recursively panic trying to bump td->td_md.md_kernnest. The trap is
fatal anyways, so to make debugging easier just call printtrap() to
dump the trap info to the console and then halt.
Ruslan Ermilov [Tue, 15 Jan 2002 14:11:05 +0000 (14:11 +0000)]
Do not install man(1) setuid ``man''.
The catpaging and setuidness features of man(1) combined make
it vulnerable to a number of security attacks. Specifically,
it was possible to overwrite system catpages with arbitrarily
contents by either setting up a symlink to a directory holding
system catpages, or by writing custom -mdoc or -man groff(1)
macro packages and setting up GROFF_TMAC_PATH in environment
to point to them. (See PR below for details).
This means man(1) can no longer create system catpages on a
regular user's behalf. (It is still able to if the user has
write permissions to the directory holding catpages, e.g.,
user's own manpages, or if the running user is ``root''.)
To create and install catpages during ``make world'', please
set MANBUILDCAT=YES in /etc/make.conf. To rebuild catpages
on a weekly basis, please set weekly_catman_enable="YES" in
/etc/periodic.conf.
Kirk McKusick [Tue, 15 Jan 2002 07:17:12 +0000 (07:17 +0000)]
When downgrading a filesystem from read-write to read-only, operations
involving file removal or file update were not always being fully
committed to disk. The result was lost files or corrupted file data.
This change ensures that the filesystem is properly synced to disk
before the filesystem is down-graded.
This delta also fixes a long standing bug in which a file open for
reading has been unlinked. When the last open reference to the file
is closed, the inode is reclaimed by the filesystem. Previously,
if the filesystem had been down-graded to read-only, the inode could
not be reclaimed, and thus was lost and had to be later recovered
by fsck. With this change, such files are found at the time of the
down-grade. Normally they will result in the filesystem down-grade
failing with `device busy'. If a forcible down-grade is done, then
the affected files will be revoked causing the inode to be released
and the open file descriptors to begin failing on attempts to read.
Warner Losh [Tue, 15 Jan 2002 06:46:59 +0000 (06:46 +0000)]
Make PCI_ALLOW_UNSUPPORTED_IO_RANGE an option until the ISA address
problem is fixed at the bridge level. This is needed for some newer
laptops that have the cardbus bridge not on pci0.
Doug Ambrisko [Tue, 15 Jan 2002 04:31:08 +0000 (04:31 +0000)]
Make man page and usage statement match reality submitted by Ruslan,
Clean up "n to m" type options with "n-m" and some other improvements
suggested by Ruslan.
Change -C option to report the transmit key "4" if in "Home" mode.
Marcel Moolenaar [Tue, 15 Jan 2002 03:10:33 +0000 (03:10 +0000)]
Reinstate linux_ifname. Although the Linuxulator doesn't use it
itself, it's used outside the Linuxulator. Reimplement the
function so that its behaviour matches the current renaming
scheme. It's probably better to formalize these interdependencies.
Alfred Perlstein [Tue, 15 Jan 2002 00:58:40 +0000 (00:58 +0000)]
Push down Giant in dup(2) and dup2(2), Giant is only needed when
calling closef() in the case of dup2(2) duping over a descriptor
and when fdalloc must grow or free a filedesc.
Alfred Perlstein [Mon, 14 Jan 2002 22:03:48 +0000 (22:03 +0000)]
Fix select on fifos.
Backout revision 1.56 and 1.57 of fifo_vnops.c.
Introduce a new poll op "POLLINIGNEOF" that can be used to ignore
EOF on a fifo, POLLIN/POLLRDNORM is converted to POLLINIGNEOF within
the FIFO implementation to effect the correct behavior.
This should allow one to view a fifo pretty much as a data source
rather than worry about connections coming and going.
Ian Dowse [Mon, 14 Jan 2002 19:39:19 +0000 (19:39 +0000)]
Make the i386 boot2 fully blocksize-agnostic, as has already been
done with boot1 on the alpha. We use 4k buffers regardless of the
actual filesystem block size.
Remove the simple malloc() implementation, as it is no longer used.
Matthew Dillon [Mon, 14 Jan 2002 19:14:08 +0000 (19:14 +0000)]
The vnode was not being vput()'d in the EEXIST mknod case on the nfs
server side. This can lead to a system deadlock.
Reviewed by: iedowse
Tested by: Alexey G Misurenko <mag@caravan.ru>, iedowse
Bug found with help by: Alexey G Misurenko <mag@caravan.ru>
MFC at: earliest convenience
Warner Losh [Mon, 14 Jan 2002 14:10:13 +0000 (14:10 +0000)]
The datasheet for the 6710/6722 says that you must use one method to
detect 3.3V cards for the 6710 and another method for the 6722. This
latter method is also how the 6729/6730 is supposed to detect 3.3V
cards. This method works great on my Fujitsu Stylistic 500. Sadly,
it appears that not all laptop makers are as detail oriented as the
folks that made the Stylistic. IBM Thinkpad 701C and AST Asentia 810N
both hang hard when the 6729 method is used, but at least the thinkpad
works when the 6710 method is used. The failure mode appears to be any
access to the memory that we've mapped the CIS in causes the machine to
hang until you eject the card. The Thinkpad, at least, works with this
change, and it doesn't break my Stylistic.
Sheldon Hearn [Mon, 14 Jan 2002 09:16:56 +0000 (09:16 +0000)]
Revert rev 1.316 now that the bootstrap issues with filesystems using
block sizees larger than 8192 bytes have been resolved, as per the
following deltas:
Alan Cox [Mon, 14 Jan 2002 07:26:33 +0000 (07:26 +0000)]
o Correct the initialization of aiolio_zone: Each entry was 16 times larger
than necessary.
o Move a rarely-used goto label inside a critical section so that we don't
perform an splnet() for which there is no corresponding splx().
o Remove unnecessary splnet()/splx() around accesses to kaioinfo::kaio_jobdone
in aio_return().
o Use TAILQ_FOREACH for simple cases of iteration over kaioinfo::kaio_jobdone.
Peter Wemm [Mon, 14 Jan 2002 02:13:46 +0000 (02:13 +0000)]
Implement vfs.nfs.iodmin (minimum number of nfsiod's) and
vfs.nfs.iodmaxidle (idle time before nfsiod's exit). Make it adaptive
so that we create nfsiod's on demand and they go away after not being
used for a while. The upper limit is NFS_MAXASYNCDAEMON (currently 20).
More will be done here, but this is a useful checkpoint.
Alan Cox [Sun, 13 Jan 2002 19:36:35 +0000 (19:36 +0000)]
o Call the functions registered with at_exec() from exec_new_vmspace()
instead of execve(). Otherwise, the possibility still exists
for a pending AIO to modify the new address space.
Gary Jennejohn [Sun, 13 Jan 2002 19:16:52 +0000 (19:16 +0000)]
Make call_desc[] extern since it's also defined in layer4/i4b_l4mgmt.c
which was causing the link of the kernel to fail. Since layer4/i4b_l4mgmt.c
is always required by i4b and layer3/i4b_q931.c is only needed when a
passive card is present it makes sense to have the declaration in the
former file only.
No MFC required since the problem only became apparent after a change to
the compile options in -current which AFAIK wasn't made in -stable.
Sergey Babkin [Sun, 13 Jan 2002 14:37:40 +0000 (14:37 +0000)]
The fix for >/dev/stdout, including Tor Egge's fix for the bug in the
original attempt of the fix. And yes, this time I've tried to build
world with it and it succeeded.