Minor adjustments to make LINT compile again (thanks to phk for reminding me).
Because the Fritz!Card PCMCIA stuff is also affected, this includes the fix
from PR kern/10278 submitted by Udo Schweigert (udo.schweigert@mchp.siemens.de).
PR: kern/10278
Alan Cox [Tue, 16 Mar 1999 07:39:07 +0000 (07:39 +0000)]
Correct a problem in kmem_malloc: A kmem_malloc allowing "wait" may
block (VM_WAIT) holding the map lock. This is bad. For example, a subsequent
kmem_malloc by an interrupt handler on the same map may find the lock held
and panic in the lockmgr.
Brian Somers [Tue, 16 Mar 1999 01:24:23 +0000 (01:24 +0000)]
Detect pred1 packets where the length != the packet length
Use a maximum of MAX_MRU + 2 bytes for incoming packets, not
MAX_MTU + 2.
Tidy up some diagnostics.
John Polstra [Mon, 15 Mar 1999 21:56:54 +0000 (21:56 +0000)]
Add "-fkeep-inline-functions" to CFLAGS so that higher optimization
levels (-O3 and above) won't remove essential code. Many thanks
to Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> for pointing out
that it was the optimizer's removal of this code that caused make
world with -O3 to break. With this change, make buildworld now
completes.
Bill Paul [Mon, 15 Mar 1999 01:17:26 +0000 (01:17 +0000)]
Updates for vlan stuff:
- add support for devices that do vlan tag insertion/deletion in firmware
- add multicast support
- add vlan_unconfig() to complement vlan_config()
- update ifconfig(8) to configure vlan interfaces (vlan tag and
parent device)
Also fix a small bug in ifconfig; sometimes sa_family is overwritten
by ioctls.
Kazutaka YOKOTA [Mon, 15 Mar 1999 00:20:56 +0000 (00:20 +0000)]
This is a temporary workaround for kernel panic occurring when
switching video modes. People typically see the panic when the screen
saver has been running and is being stopped.
WARNING: this is not a real fix. Something really funny must be
happening in the page table entries for the physical memory
0x0-0xa0000, which is mapped to the beginning of the kernel region.
Mark Murray [Sun, 14 Mar 1999 18:02:14 +0000 (18:02 +0000)]
Build tcp_wrappers' userland. I am not building tcpd, because in a day
or two, inetd will gain the necessary functionality. At that stage,
I'll make wrapping the default for sendmail and portmapper as well.
Julian Elischer [Sun, 14 Mar 1999 09:20:01 +0000 (09:20 +0000)]
Submitted by: Matt Dillon <dillon@freebsd.org>
The old VN device broke in -4.x when the definition of B_PAGING
changed. This patch fixes this plus implements additional capabilities.
The new VN device can be backed by a file ( as per normal ), or it can
be directly backed by swap.
Due to dependencies in VM include files (on opt_xxx options) the new
vn device cannot be a module yet. This will be fixed in a later commit.
This commit delimitted by tags {PRE,POST}_MATT_VNDEV
Semen Ustimenko [Sun, 14 Mar 1999 08:30:23 +0000 (08:30 +0000)]
Implemented workaround for EPIC's Application Note 7-15 (concerning
chip int. and ext. clock synchronisation). Fixed workaround for
transmit threshold underrun. Added volatile keyword to CSR_READ_* and
CSR_WRITE_* macroses. Added DELAYs to eliminate randomness caused
by processor speed. Fixed all TXCON and RXCON registers to be accessed
only when chip is idle, as manual told. Changed epic_init_phy to
drop link by isolating and going loopback, should should force link
partner to restart autonegotiation.
PR: kern/10535, kern/9742, kern/10575
Submitted by: Peter Jeremy, David Greenman
Kenneth D. Merry [Sun, 14 Mar 1999 05:15:38 +0000 (05:15 +0000)]
Disable tagged queueing for the IBM DCAS drives. These drives have poor
write performance when tagged queueing is enabled.
Although the PR was submitted for the 4 gig version of this drive, the
assumption is that the 2 gig version has the same problem. Therefore
tagged queueing is disabled for both.
Also, update the comment for the Western Digital Enterprise drives to note
that the best performance for those drives is achieved when tagged queueing
is disabled and write caching is enabled.
Torsten Blum [Sat, 13 Mar 1999 17:35:18 +0000 (17:35 +0000)]
Install uuxqt sgid uucp. Since "rnews" should not be executable for
everyone (to prevent fake-postings) and modern Inn installs
rnews as news.uucp and mode 4550 this is the only save way to allow
uuxqt to process rnews batches.
Peter Wemm [Sat, 13 Mar 1999 09:21:27 +0000 (09:21 +0000)]
set if_snd.ifq_maxlen to something reasonable - note that if_de.c has
a wierd double-queue arrangement.. It always empties the if_snd queue
then puts the transmit packets into a different queue that is limited
by the number of TX descriptors and does it's own discards...
This should stop the boot-time XXX warning anyway.
Greg Lehey [Sat, 13 Mar 1999 07:34:56 +0000 (07:34 +0000)]
VINUM_RESETCONFIG: do the reset even if the config is open (as it has
to be for us to issue the ioctl :-). Also remove the opencount
parameter of the config, which just never worked.
Greg Lehey [Sat, 13 Mar 1999 07:32:40 +0000 (07:32 +0000)]
Change the way of recognizing whether a plex was given to a volume
after the volume had been fully operational; involves a change in the
use of the VF_NEWBORN flag. Now if you add a plex to a volume which
is up, the plex will be down and the subdisks stale. You need to
explicitly start the subdisks, which copies data from the good
subdisks to the uninitialized ones.
Stumbled-over-by: Ludwig Pummer <ludwigp@bigfoot.com>
give_sd_to_drive:
correct method to give the entire largest chunk of drive to the
subdisk. Now it's enough to specify a length, and vinum will give
you as much as it can. Not to be recommended except for empty
drives.
Correct a bogon which made vinum refuse to give the last sector of
a drive to a subdisk.
Last-reported-by: Ludwig Pummer <ludwigp@bigfoot.com>
Change %q formats to %ll before the former go away. This doesn't make
much difference, since kernel kvprintf currently doesn't support
either, and the messages in question are just error messages.
Alan Cox [Sat, 13 Mar 1999 07:31:29 +0000 (07:31 +0000)]
pmap_qenter/pmap_qremove:
Use the pmap_kenter/pmap_kremove inline functions
instead of duplicating them.
pmap_remove_all:
Eliminate an unused (but initialized) variable.
pmap_ts_reference:
Change the implementation. The new implementation is much smaller
and simpler, but functionally identical. (Reviewed by
"John S. Dyson" <dyson@iquest.net>.)
Warner Losh [Sat, 13 Mar 1999 04:41:35 +0000 (04:41 +0000)]
When printing out V1 info, make sure that there is additional info
before printing it. Terminate when we come to a 0xff byte. This
allows there to be zero or more additional info fields printed
correctly. Before, the old code would print bogons or dump core when
presented with this case.
I don't know what the spec says about this, exactly, but this allows
me to do a dumpcis of my non-ATA AMP 4M FLASH cards w/o pccardc
dumping core.
John Polstra [Sat, 13 Mar 1999 01:35:44 +0000 (01:35 +0000)]
Reverse the order of processing object files within an executable or
shared library when invoking global constructors and destructors.
For constructors, the object files used to be processed from first
to last; now they're done from last to first. (Destructors are done
in the opposite order, as required by the C++ standard.) This makes
us consistent with standard gcc and egcs compilers. It also
eliminates ordering differences between dynamic and static
executables.
Bump the value of __FreeBSD_version to 400002 to reflect this
change.
Warner Losh [Fri, 12 Mar 1999 19:40:39 +0000 (19:40 +0000)]
Don't allow anyone except root to mount file systems that map uids.
This can have bad security implications, but the impact on FreeBSD
systems is minimal because this fs isn't in the default kernels and it
is unknown if it even works.
Submitted by: Manuel Bouyer <bouyer@antioche.eu.org> and
Artur Grabowski <art@stacken.kth.se>
Warner Losh [Fri, 12 Mar 1999 18:45:47 +0000 (18:45 +0000)]
Remove static delcarations from {,un}register_pcic_intr declarations
in the not APIC_IO case. This should silence the warnings when
building pcic.c as well as the undefined functions when the kernel
links.
Noticed by: several people in -current and me building the kernel
John Polstra [Fri, 12 Mar 1999 17:33:28 +0000 (17:33 +0000)]
Move the code for the ".init" and ".fini" sections outside of a
C function so the compiler won't try to emit line numbers for it
with "-g", breaking the build. This has the nice side-effect of
making crtbegin.o and crtbeginS.o a little bit smaller.
Remove "-Wno-unused" from the Makefile. Replace it with "__unused"
on particular function and variable declarations.
Julian Elischer [Fri, 12 Mar 1999 03:09:29 +0000 (03:09 +0000)]
This solves a deadlock that can occur when read()ing into a file-mmap()
space. When doing this, it is possible to for another process to attempt
to get an exclusive lock on the vnode and deadlock the mmap/read
combination when the uiomove() call tries to obtain a second
shared lock on the vnode. There is still a potential deadlock
situation with write()/mmap().
Submitted by: Matt Dillon <dillon@freebsd.org>
Reviewed by: Luoqi Chen <luoqi@freebsd.org>
Delimmitted by tag PRE_MATT_MMAP_LOCK and POST_MATT_MMAP_LOCK
in kern/kern_lock.c kern/kern_subr.c
Julian Elischer [Fri, 12 Mar 1999 02:24:58 +0000 (02:24 +0000)]
Reviewed by: Many at differnt times in differnt parts,
including alan, john, me, luoqi, and kirk
Submitted by: Matt Dillon <dillon@frebsd.org>
This change implements a relatively sophisticated fix to getnewbuf().
There were two problems with getnewbuf(). First, the writerecursion
can lead to a system stack overflow when you have NFS and/or VN
devices in the system. Second, the free/dirty buffer accounting was
completely broken. Not only did the nfs routines blow it trying to
manually account for the buffer state, but the accounting that was
done did not work well with the purpose of their existance: figuring
out when getnewbuf() needs to sleep.
The meat of the change is to kern/vfs_bio.c. The remaining diffs are
all minor except for NFS, which includes both the fixes for bp
interaction AND fixes for a 'biodone(): buffer already done' lockup.
Sys/buf.h also contains a chaining structure which is not used by
this patchset but is used by other patches that are coming soon.
This patch deliniated by tags PRE_MAT_GETBUF and POST_MAT_GETBUF.
(sorry for the missing T matt)
Julian Elischer [Fri, 12 Mar 1999 01:15:57 +0000 (01:15 +0000)]
Fix the 'fwd' option to ipfw when asked to divert to another machine.
also rely less on other modules clearing static values, and clear them
in a few cases we missed before.
Submitted by: Matthew Reimer <mreimer@vpop.net>
Bruce Evans [Thu, 11 Mar 1999 21:53:12 +0000 (21:53 +0000)]
Fixed runtime accounting. The time since the previous context switch
was discarded on every call to calcru(). Hacking on the `switchtime'
global for a related fix in rev.1.38 of kern_resource.c was too fragile
and broke when p_switchtime went away.
David Greenman [Thu, 11 Mar 1999 18:28:46 +0000 (18:28 +0000)]
Increased kernel virtual address space to 1GB. NOTE: You MUST have fixed
bootblocks in order to boot the kernel after this! Also note that this
change breaks BSDI BSD/OS compatibility.
Also increased default NKPT to 17 so that FreeBSD can boot on machines
with >=2GB of RAM. Booting on machines with exactly 4GB requires other
patches, not included.
James FitzGibbon [Thu, 11 Mar 1999 16:17:24 +0000 (16:17 +0000)]
Add ${lpd_program} and ${portmap_program} as variables in rc.conf, with
suitable defaults pointing to the FreeBSD-shipped versions. This will allow
for easier integration of third-party replacements for these daemons.
Reviewed by: Several members of -committers