qingli [Mon, 18 May 2009 02:25:45 +0000 (02:25 +0000)]
This patch resolves the following issues:
-- A routing socket message is not generated when an IPv6 address is
either inserted or deleted from an interface. The missing routing
message problem was discovered by Randall Stewart and Michael Tuxen
during SCTP testing.
-- Previously when an IPv6 address is configured on an interface, if the
prefix length is /128, then a host route is instaleld in the kernel
for this address. But this host route is not deleted when that IPv6
address is removed from the interface.
-- Routes to the link-local all-nodes multicast address and the
interface-local all-nodes multicast address are not removed when
the last IPv6 address is removed from an interface.
delphij [Mon, 18 May 2009 01:51:52 +0000 (01:51 +0000)]
DMA synchronization fixes:
- In bce_rx_intr(), use BUS_DMASYNC_POSTREAD instead of
BUS_DMASYNC_POSTWRITE, as we want to "read" from the
rx page chain pages.
- Document why we need to do PREWRITE after we have updated
the rx page chain pages.
- In bce_intr(), use BUS_DMASYNC_POSTREAD and
BUS_DMASYNC_PREREAD when before and after CPU "reading"
the status block.
- Adjust some nearby style mismatches/etc.
Pointed out by: yongari
Approved by: davidch (no objection) but bugs are mine :)
bz [Mon, 18 May 2009 01:05:09 +0000 (01:05 +0000)]
tbr_timeout() is a timer driven function[1]. While the previous commit
made LINT happy this does the proper looping over all vnets as we are
only called `globally' and not once per vnet instance.
imp [Mon, 18 May 2009 01:00:11 +0000 (01:00 +0000)]
Turns out that my BCM4318 has a PCI ID of 0x4319, which lead me to
believe it was a BCM4319. However, it is the a/b/g variation of the
BCM4318. The chip itself is labelled BCM4318EKFBG, and the board is
BCM94318MKABG.
Paradox's patch includes the type of 802.11 wireless for each card,
but changes all the names (I don't think the latter is quite right).
Import that part of the patch, but keep the current set of BCM names
(with a minor tweak for the 4306 ones). I'll need to verify them via
some other means.
alc [Sun, 17 May 2009 20:40:41 +0000 (20:40 +0000)]
Eliminate a pointless call to pmap_clear_reference() from vm_pageout_scan().
If the page belongs to an object with a reference count of zero, then it
can't have any managed mappings on which to clear a reference bit.
rmacklem [Sun, 17 May 2009 19:33:48 +0000 (19:33 +0000)]
Fix the acquisition of local locks via VOP_ADVLOCK() by the
experimental nfsv4 server. It was setting the a_id argument
to a fixed value, but that wasn't sufficient for FreeBSD8.
Instead, set l_pid and l_sysid to 0 plus set the F_REMOTE
flag to indicate that these fields are used to check for
same lock owner. Since, for NFSv4, a lockowner is a ClientID plus
an up to 1024byte name, it can't be put in l_sysid easily.
I also renamed the p variable to td, since it's a thread ptr.
rmacklem [Sun, 17 May 2009 17:54:01 +0000 (17:54 +0000)]
Added a SYSCTL to sys/fs/nfsserver/nfs_nfsdport.c so that the value of
nfsrv_dolocallocks can be changed via sysctl. I also added some non-empty
descriptor strings and reformatted some overly long lines.
ed [Sun, 17 May 2009 12:30:25 +0000 (12:30 +0000)]
Several cleanups to tty_info(), better known as Ctrl-T.
- Only pick up PROC_LOCK once, which means we can drop the PGRP_LOCK
right after picking up PROC_LOCK for the first time.
- Print the process real time, making it consistent with tools like
time(1).
- Use `p' and `td' to reference the process/thread we are going to
print. Only use pick-variables inside the loops. We already did this
for the threads, but not the processes.
brian [Sun, 17 May 2009 04:34:14 +0000 (04:34 +0000)]
When finding processes, ignore ourself and our ancestors. It is almost
always surprising when you kill a 'sh -c ...' ancestor or when you kill
yourself when using -f.
dougb [Sat, 16 May 2009 22:22:31 +0000 (22:22 +0000)]
Enhance the safety of the -U option:
1. In several places make sure that the mtree database is not empty using
the -s argument to test instead of -f. (I thought I'd already changed this,
but obviously not.)
2. When deriving the list of changed files use a colon-delimited list.
3. If the list of changed files is empty, unset the variable, and test
for a non-empty CHANGED in diff_loop() before entering that routine.
Enhance the speed of the -U option by using an internal case statement
instead of echoing the variable to an external grep for every file.
dougb [Sat, 16 May 2009 20:55:28 +0000 (20:55 +0000)]
1. New feature; option to have the script loop until a specified hostname
(localhost by default) can be successfully looked up. Off by default.
2. New feature: option to create a forwarder configuration file based on
the contents of /etc/resolv.conf. This allows you to utilize a local
resolver for better performance, less network traffic, custom zones, etc.
while still relying on the benefits of your local network resolver.
Off by default.
3. Add named-checkconf into the startup routine. This will prevent named
from trying to start in a situation where it would not be possible to do
so.
rmacklem [Sat, 16 May 2009 03:12:55 +0000 (03:12 +0000)]
Fixed the Null callback RPCs so that they work with the new krpc. This
required two changes: setting the program and version numbers before
connect and fixing the handling of the Null Rpc case in newnfs_request().
rmacklem [Fri, 15 May 2009 19:33:59 +0000 (19:33 +0000)]
Move the nfsstat structure and proc/op number definitions on the
experimental nfs subsystem from sys/fs/nfs/nfs.h and sys/fs/nfs/nfsproto.h
to sys/fs/nfs/nfsport.h and rename nfsstat to ext_nfsstat. This was done
so that src/usr.bin/nfsstat.c could use it alongside the regular nfs
include files and struct nfsstat.
kib [Fri, 15 May 2009 19:23:05 +0000 (19:23 +0000)]
Devfs replaces file ops vector with devfs-specific one in devfs_open(),
before the struct file is fully initialized in vn_open(), in particular,
fp->f_vnode is NULL. Other thread calling file operation before f_vnode
is set results in NULL pointer dereference in devvn_refthread().
Initialize f_vnode before calling d_fdopen() cdevsw method, that might
set file ops too.
Reported and tested by: Chris Timmons <cwt networks cwu edu>
(RELENG_7 version)
MFC after: 3 days
kib [Fri, 15 May 2009 14:41:44 +0000 (14:41 +0000)]
Revert r192094. The revision caused problems for sysctl(3) consumers
that expect that oldlen is filled with required buffer length even when
supplied buffer is too short and returned error is ENOMEM.
Redo the fix for kern.proc.filedesc, by reverting the req->oldidx when
remaining buffer space is too short for the current kinfo_file structure.
Also, only ignore ENOMEM. We have to convert ENOMEM to no error condition
to keep existing interface for the sysctl, though.
ed [Fri, 15 May 2009 14:30:37 +0000 (14:30 +0000)]
Turn consolectl into a simple device node, not a TTY.
Apart from the 16 virtual terminals, Syscons allocates two device nodes
that should not really be TTYs, even though they are. One of them is
consolectl. In RELENG_7 and before, these device nodes are used in
single user mode. After I simplified input path, we only use this device
node to call ioctl() on (moused, Xorg, vidcontrol).
When you call ioctl() on consolectl, it will behave the same as being
called on the first window.
delphij [Thu, 14 May 2009 23:09:33 +0000 (23:09 +0000)]
As the comment says, close() frees the variable, record. So we obtain
the length by evaluating the value from the copy, cbuf instead. This
fixes a crash caused by previous commit (use-after-free)
Submitted by: Dimitry Andric <dimitry andric com>
Pointy hat to: delphij
delphij [Thu, 14 May 2009 22:33:37 +0000 (22:33 +0000)]
Try to workaround a race where bge_stop() may sneak in when bge_rxeof()
drops and re-grabs the softc mutex in the middle, resulting in kernel
trap 12. This may happen when a lot of traffic is being hammered on
one bge(4) interface while the system is shutting down.
jhb [Thu, 14 May 2009 22:01:32 +0000 (22:01 +0000)]
- Use a separate sx lock to try to limit the number of concurrent userland
sysctl requests to avoid wiring too much user memory. Only grab this
lock if the user's old buffer is larger than a page as a tradeoff to
allow more concurrency for common small requests.
- Just use a shared lock on the sysctl tree for user sysctl requests now.
jhb [Thu, 14 May 2009 21:53:35 +0000 (21:53 +0000)]
Trim the default set of device hints on i386 and amd64:
- Remove vga0 and the disabled uart2/uart3 hints from both platforms.
- Remove hints for ISA adv0, bt0, aha0, aic0, ed0, cs0, sn0, ie0, fe0, and
le0 from i386. All these hints were marked 'disabled' and thus already
did not work "out of the box".
rmacklem [Thu, 14 May 2009 21:39:08 +0000 (21:39 +0000)]
Apply changes to the experimental nfs server so that it uses the security
flavors as exported in FreeBSD-CURRENT. This allows it to use a
slightly modified mountd.c instead of a different utility.
rmacklem [Thu, 14 May 2009 20:39:09 +0000 (20:39 +0000)]
Change the file names in the comments in sys/fs/nfs/nfs_var.h so
that they are the names used in FreeBSD-CURRENT. Also shuffled a
few entries around, so that they under the correct comment.
attilio [Thu, 14 May 2009 17:43:00 +0000 (17:43 +0000)]
FreeBSD right now support 32 CPUs on all the architectures at least.
With the arrival of 128+ cores it is necessary to handle more than that.
One of the first thing to change is the support for cpumask_t that needs
to handle more than 32 bits masking (which happens now). Some places,
however, still assume that cpumask_t is a 32 bits mask.
Fix that situation by using always correctly cpumask_t when needed.
While here, remove the part under STOP_NMI for the Xen support as it
is broken in any case.
Additively make ipi_nmi_pending as static.
Reviewed by: jhb, kmacy
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
raj [Thu, 14 May 2009 16:48:25 +0000 (16:48 +0000)]
PowerPC common SMP startup and time base rework.
- make mftb() shared, rewrite in C, provide complementary mttb()
- adjust SMP startup per the above, additional comments, minor naming
changes
- eliminate redundant TB defines, other minor cosmetics
sam [Thu, 14 May 2009 16:23:24 +0000 (16:23 +0000)]
correct handling of ctl frames: the sender's address is always i_addr2 for
frames we should expect to process (old code was trying to handle frames
we should never see--like ACK)
jhb [Thu, 14 May 2009 14:57:13 +0000 (14:57 +0000)]
- Add a void pointer to the ata-pci controller softc to allow
chipset-specific code to attach chipset-specific data.
- Use chipset-specific data in the acard and promise chipsets rather than
changing the ivars of ATA PCI devices. ivars are reserved for use by the
parent bus driver and are _not_ available for use by devices directly.
This fixes a panic during sysctl -a with certain Promise controllers with
ACPI enabled.
Reviewed by: mav
Tested by: Magnus Kling (kingfon @ gmail) (on 7)
MFC after: 3 days