Edwin Groothuis [Wed, 7 Nov 2007 01:14:28 +0000 (01:14 +0000)]
After discussions with grog@ (mentor):
- When none of the directories in FORTUNE_PATH exist, abort instead
of using the default FORTDIR.
- Little stylify changes.
- Add documentation about the FORTUNE_PATH variable.
Oleg Bulyzhin [Tue, 6 Nov 2007 23:01:42 +0000 (23:01 +0000)]
1) dummynet_io() declaration has changed.
2) Alter packet flow inside dummynet: allow certain packets to bypass
dummynet scheduler. Benefits are:
- lower latency: if packet flow does not exceed pipe bandwidth, packets
will not be (up to tick) delayed (due to dummynet's scheduler granularity).
- lower overhead: if packet avoids dummynet scheduler it shouldn't reenter ip
stack later. Such packets can be fastforwarded.
- recursion (which can lead to kernel stack exhaution) eliminated. This fix
long existed panic, which can be triggered this way:
kldload dummynet
sysctl net.inet.ip.fw.one_pass=0
ipfw pipe 1 config bw 0
for i in `jot 30`; do ipfw add 1 pipe 1 icmp from any to any; done
ping -c 1 localhost
3) Three new sysctl nodes are added:
net.inet.ip.dummynet.io_pkt - packets passed to dummynet
net.inet.ip.dummynet.io_pkt_fast - packets avoided dummynet scheduler
net.inet.ip.dummynet.io_pkt_drop - packets dropped by dummynet
P.S. Above comments are true only for layer 3 packets. Layer 2 packet flow
is not changed yet.
Edwin Groothuis [Tue, 6 Nov 2007 22:40:16 +0000 (22:40 +0000)]
Another typo in the previous commited fix. That makes four typos
in one fortune of only 32 words. Based on that single ratio, there
are 50453 more typos in the rest of the fortunes file....
Marius Strobl [Tue, 6 Nov 2007 21:50:43 +0000 (21:50 +0000)]
In _pthread_key_create() ensure that libthr is initialized. This
fixes a NULL-dereference of curthread when libstdc+ initializes
the exception handling globals on archs we can't use GNU TLS due
to lack of support in binutils 2.15 (i.e. arm and sparc64), yet,
thus making threaded C++ programs compiled with GCC 4.2.1 work
again on these archs.
Pyun YongHyeon [Tue, 6 Nov 2007 01:01:38 +0000 (01:01 +0000)]
Apparently some NVIDIA NICs store ethernet address in reverse order
while other variants have inorder ethernet address for the same
chipset. Override ethernet address ordering if we already know how
it was stored. This fixes the use of inversed ethernet address on
MCP67.
Ulf Lilleengen [Mon, 5 Nov 2007 23:15:03 +0000 (23:15 +0000)]
- Add ZFS-support to fstat(1). This allows ZFS-filsystems to be including in
the open file-listing. It is added as a separate source file, so it can
respect WITH_/WITHOUT_CDDL as compile-flags.
- The warnlevel of the Makefile was decreased to quell solaris #pragma
warnings.
- Expect that fstat(1) doesn't work with kernel compiled with
DEBUG_VFS_LOCKS/DEBUG_LOCKS for now.
If setting a state to anything but open state, close access to vdev.
This fixes replacing drive in place, eg. zpool replace tank da1 da1.
Before it complained that device is already open.
Do not pass an address to local stack variable to usbd_set_report_async.
Allocate space in keyboard state structure instead to prevent random byte
from possibly overwritten stack location frombeing shoved into USB device
when transfer actually takes place.
This fixes at least one instance of LEDs not working with USB keyboards.
Remove "zfs:" prefix from lock and condvar names and also skip non-letter
characters (mostly "&"). Because top(1) shows only first six characters of
wait channel, without this change we saw only one meaningful character.
Alan Cox [Mon, 5 Nov 2007 18:13:34 +0000 (18:13 +0000)]
Add comments explaining why all stores updating a non-kernel page table
must be globally performed before calling any of the TLB invalidation
functions.
With one exception, on amd64, this requirement was already met. Fix this
one case. Also, as a clarification, change an existing atomic op into a
release. (Suggested by: jhb)
Sam Leffler [Mon, 5 Nov 2007 17:24:28 +0000 (17:24 +0000)]
Correct handling of off-channel frames:
o do not override the home channel recorded for the sta when the frame is
received off-channel; this fixes a problem where we might think the sta
was operating on the channel the frame was received on causing association
requests to be ignored/rejected (likely cause of kern/99036)
o don't include rssi of off-channel frames in the avg rssi used to select
a bss; this gives us a better estimate of the signal we will see for the
station when on-channel
PR: kern/99036
Found by: Yubin Gong
Reviewed by: sephe
MFC after: 1 week
Benjamin Close [Mon, 5 Nov 2007 11:47:19 +0000 (11:47 +0000)]
Initial Import of wpi driver based on p4 changeset 128641.
This import includes:
o wpi Wireless driver for the Intel 3945 Wireless Lan Controller (802.11abg) (sys/dev/wpi)
o Intel firmware revision 2.14.4 & associated LICENSE (sys/dev/contrib/wpi, sys/contrib/dev/wpi/LICENSE)
o wpifw Firmware driver (sys/modules/wpifw)
Fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
As consequence, vmspace_exec() and vmspace_unshare() returns the errno
int. struct vmspace arg was added to vm_forkproc() to avoid dealing
with failed allocation when most of the fork1() job is already done.
The kernel stack for the thread is now set up in the thread_alloc(),
that itself may return NULL. Also, allocation of the first process
thread is performed in the fork1() to properly deal with stack
allocation failure. proc_linkup() is separated into proc_linkup()
called from fork1(), and proc_linkup0(), that is used to set up the
kernel process (was known as swapper).
In collaboration with: Peter Holm
Reviewed by: jhb
The intent of the freeing the (zeroed) page in vm_page_cache() for
default object rather than cache it was to have
vm_pager_has_page(object, pindex, ...) == FALSE to imply that there is
no cached page in object at pindex. This allows to avoid explicit
checks for cached pages in vm_object_backing_scan().
For now, we need the same bandaid for the swap object, otherwise both
the vm_page_lookup() and the pager can report that there is no page at
offset, while page is stored in the cache. Also, this fixes another
instance of the KASSERT("object type is incompatible") failure in the
vm_page_cache_transfer().
Reported and tested by: Peter Holm
Reviewed by: alc
MFC after: 3 days
Andrew Thompson [Mon, 5 Nov 2007 06:13:07 +0000 (06:13 +0000)]
Change wpa_supplicant to down the interface at the start of the init routine.
wpa_supplicant expects that it has exclusive access to the net80211 state so
when its starts poking in the WEP/WPA settings and the card is already
scanning it can cause net80211 to try and associate incorrectly with a
protected AP.
This is an inconvenience for firmware based cards such as iwi where it can be
sent an auth instruction with incomplete security info and cause a firmware
error.
Remove the 'ifconfig up' from network.subr since wpa_supplicant will
immediately down the interface again.
Reported by: Guy Helmer (and others)
Reviewed by: sam, brooks, avatar
MFC after: 3 days
Robert Watson [Sun, 4 Nov 2007 19:20:33 +0000 (19:20 +0000)]
Garbage collect now-unused nfsrv_setcred() -- it's not only unused, but
also a purveyor of unfortunate (and now unsupported) direct frobbing of
struct ucred.
Andrew Thompson [Sun, 4 Nov 2007 08:32:27 +0000 (08:32 +0000)]
Add an option to limit the number of source MACs that can be behind a bridge
interface. Once the limit is reached packets with unknown source addresses are
dropped until an existing host cache entry expires or is removed. Useful to
use with the STICKY cache option.
Scott Long [Sat, 3 Nov 2007 17:33:41 +0000 (17:33 +0000)]
Ever since the module registration system was introduced to this driver,
it's been printing out scary messages about "Unhanded Event Notify Frame"
that are needlessly worrisome to users. Change this warning to only print
out at an elevated debugging level.
Alan Cox [Sat, 3 Nov 2007 05:15:26 +0000 (05:15 +0000)]
Eliminate spurious "Approaching the limit on PV entries, ..."
warnings. Specifically, whenever vm_page_alloc(9) returned NULL to
get_pv_entry(), we issued a warning regardless of the number of pv
entries in use. (Note: The older pv entry allocator in RELENG_6 does
not have this problem.)
Reported by: Jeremy Chadwick
Eliminate the direct call to pagedaemon_wakeup() by get_pv_entry().
This was a holdover from earlier times when the page daemon was
responsible for the reclamation of pv entries.
Introduce pkg_updating(1) which scans for installed ports and shows
all ports/UPDATING entries that affect one of the installed ports,
and are relevant on the given machine.
Doug Barton [Fri, 2 Nov 2007 22:37:15 +0000 (22:37 +0000)]
Update to the 1 November 2007 version of this file. The change
is to the address of l.root-servers.net, which is moving to a
new /24 in order to enable anycast routing down the road.
Julian Elischer [Fri, 2 Nov 2007 19:40:36 +0000 (19:40 +0000)]
Completely remove the code for single threading the mainline fork code.
Put in a little comment explaining why it went away.
Re-enable it in the case there an exisiting process is just splitting
off its address space and file descriptors.
(I donpt think anything uses that code but it needs some sort of locking
and this does the job.
Reviewed by: Davidxu, alc, others
MFC after: 3 days
Nate Lawson [Fri, 2 Nov 2007 17:29:36 +0000 (17:29 +0000)]
Fix a shutdown hang on some SMP systems. The previous logic was to IPI all
CPUs to make sure idle threads are evicted from the softc before returning
from acpi_cpu_shutdown(). However, this is unnecessary since stop_cpus()
handles this for itself and at this point it's possible that our IPI will be
blocked (interrupts disabled).
Thanks to: Glen Leeder <glen.leeder / nokia.com>
MFC after: 3 days
Matteo Riondato [Fri, 2 Nov 2007 14:51:53 +0000 (14:51 +0000)]
Add the -h <bindip> option to rpc.lockd, similar to the one in
nfsd(8), in mountd(8), and in rpc.statd(8)
-h bindip
Specify specific IP addresses to bind to for TCP and UDP requests.
This option may be specified multiple times. If no -h option is
specified, rpc.lockd will bind to INADDR_ANY. Note that when specifying
IP addresses with -h, rpc.lockd will automatically add 127.0.0.1 and
if IPv6 is enabled, ::1 to the list.
Sam Leffler [Fri, 2 Nov 2007 05:11:45 +0000 (05:11 +0000)]
don't try to re-associate after a parameter change, too many ap's
don't do this right; instead go to the scan cache so we pass through
auth state (if the cache is warm we can do this w/o an actual scan)
John Baldwin [Thu, 1 Nov 2007 20:51:04 +0000 (20:51 +0000)]
Don't look for GPT primary and secondary tables on a disk unless we have
a valid PMBR. Without this fix, if label a disk with a GPT, then relabel
it with an MBR the GPT tables are still present. If you then try to create
a GPT with 'gpt create', gpt(8) will fail to open the device because the
partitions in the stale GPT overlap with the slices in the MBR.
Matteo Riondato [Thu, 1 Nov 2007 20:13:33 +0000 (20:13 +0000)]
Add the -h <bindip> option to rpc.statd, similar to the one in nfsd(8)
and in mountd(8)
-h bindip
Specify specific IP addresses to bind to for TCP and UDP requests.
This option may be specified multiple times. If no -h option is
specified, rpc.statd will bind to INADDR_ANY. Note that when specifying
IP addresses with -h, rpc.statd will automatically add 127.0.0.1 and if
IPv6 is enabled, ::1 to the list.
John Baldwin [Thu, 1 Nov 2007 20:06:12 +0000 (20:06 +0000)]
Fix 'gpt boot' to work on disk devices and not just plain files. Writes to
disk devices have to consist of a block of sectors. Thus, when writing
gptboot to the boot partition, round the size of the gptboot file up to a
sector boundary, pre-zero it, and write out the full buffer to disk.
Call zil_commit() (if ZIL is not disabled) after every non-read request
(BIO_WRITE and BIO_FLUSH) as it is done is Solaris. The difference is
that Solaris calls it only for sync requests, but we can't say in GEOM
is the request is sync or async, so we do it for every request.
Yaroslav Tykhiy [Wed, 31 Oct 2007 11:19:32 +0000 (11:19 +0000)]
Add a hackish knob to skip rtld, NO_RTLD. In conjunction with
src/Makefile.inc1 rev. 1.590, it can allow installing a world
cross-built for a different arch over the live system. The procedure
is more or less as follows:
cp -R /rescue /rescue.old
make installkernel TARGET_ARCH=foo
make -DNO_RTLD installworld TARGET_ARCH=foo
^^^^^^^^^
PATH=/rescue.old
chflags noschg /libexec/ld-elf.so.1
cp /usr/obj/foo/usr/src/libexec/rtld/ld-elf.so.1 /libexec
chflags schg /libexec/ld-elf.so.1
<ditto for ld-elf32.so.1 if installing for amd64>
reboot
Yaroslav Tykhiy [Wed, 31 Oct 2007 09:26:42 +0000 (09:26 +0000)]
Decouple the install tools from the main system as much as possible.
I.e., not only copy them to a scratch dir, but also make them use saved
copies of libraries and locale files. That gives us several benefits:
1) ABI breakages should no longer affect installworld over the live system.
2) It becomes safe to run installworld while still running the old kernel.
However, it can be reasonable to save the old /rescue before that to be
able to run the old reboot(8), as the new binaries are rather likely to
fail with the old kernel. Anyhow, it's now possible to upgrade a system
in a single reboot _reliably_.
3) With a bit of hackery around rtld(8), it becomes possible to do destructive
cross-installs, e.g., i386->amd64 over the live system.
The only shared item left between the old and new systems is rtld(8),
which cannot be run from a saved copy easily because its full
pathname is stored in the respective field of each ELF executable.
(In theory, that field could be overridden, e.g., from the environment,
but this can lead to security issues.) That's why a destructive
cross-install isn't possible w/o hackery yet.
Yaroslav Tykhiy [Wed, 31 Oct 2007 08:20:09 +0000 (08:20 +0000)]
Give more details on the following topics:
o How global, command-line, and environment variables relate.
o What peculiarities the -f option has WRT ${MAKEFLAGS}.