bms [Thu, 22 Feb 2007 00:14:02 +0000 (00:14 +0000)]
Fix a bug in if_findmulti(), whereby it would not find (and thus delete)
a link-layer multicast group membership.
Such memberships are needed in order to support protocols such as
IS-IS without putting the interface into PROMISC or ALLMULTI modes.
sa_equal() is not OK for comparing sockaddr_dl as it has deeper structure
than a simple byte array, so add sa_dl_equal() and use that instead.
jhb [Wed, 21 Feb 2007 18:17:44 +0000 (18:17 +0000)]
Restore support for the 5706C bce(4) phy that was broken during the
addition of SerDes support. According to the docs, the 5706C and 5708C
phys are supposed to use the same MII model that is separate from the
SerDes parts, but the 5706C actually uses the MII model of the SerDes
parts. To fix this, readd the old 5706C entry to miidevs and add a
special check in brgphy_probe() for phys that match the 5706C ID. If
the phy is supported by the gentbi(4) driver, then it's a SerDes phy, so
we fail the probe and let gentbi(4) grab it. Otherwise, it's a 5706C phy,
so we let brgphy(4) grab it.
gallatin [Wed, 21 Feb 2007 17:34:05 +0000 (17:34 +0000)]
Work around a firmware bug where broadcast frames would be incorrectly
treated as multicast frames and filtered, but when only when "adopting"
running firmware. By "adopting", I mean using pre-existing firmware
loaded from eeprom at PCI reset, rather than firmware loaded by the
driver.
sos [Wed, 21 Feb 2007 14:05:57 +0000 (14:05 +0000)]
Temporarily disable the support for some incarnations of the ICH8 chip that has
non consecutively numbered ports.
This should fix current SATA problems.
Support AHCI chips where the ports are not consecutively numbered as in
some incarnations of the ICH8 chip.
bms [Wed, 21 Feb 2007 13:41:51 +0000 (13:41 +0000)]
Change wording of warnings when there is no ip_mroute.ko module
loaded into the system.
Change wording of comments to reflect the fact we should unconditionally
use KVM if the -M option is used to specify a core file.
Add comments to document the fact that IPv6 multicast forwarding
information display still relies on KVM for gathering information.
n_hibma [Wed, 21 Feb 2007 07:45:02 +0000 (07:45 +0000)]
Reduce the noise when plugging in (USB) mass storage devices, like a 4 port
flash card reader.
Also remove an 'Opened da0 -> <random number>' which is not needed on a daily
basis (available through bootverbose).
kientzle [Wed, 21 Feb 2007 05:07:43 +0000 (05:07 +0000)]
If we already have stat() data, we might be able to
determine if this is a physical dir without an lstat().
While I'm in here, try to clarify the comments around
the _is_dir() and _is_physical_dir() tests.
cognet [Wed, 21 Feb 2007 00:30:09 +0000 (00:30 +0000)]
Check that the error returned by vfs_getopts() is not ENOENT before assuming
there's actually an error.
This is just in order to unbreak ntfs on current, before a proper solution is
committed.
n_hibma [Tue, 20 Feb 2007 21:29:30 +0000 (21:29 +0000)]
[Found the original diff I made, see previous commit for other part]
Assume '-a' and '-t malloc' flags for '-s <size>' (malloc ramdisk) if not
specified.
emaste [Tue, 20 Feb 2007 18:10:13 +0000 (18:10 +0000)]
Avoid writing uninitialized stack data into a thread's MMX/SSE state by
first getting the current state with td_thr_getxmmregs_p. Without this,
debugging a threaded app that uses libthr resulted in kernel panics or
spurious SIGFPEs for me.
(As of revision 1.6, sys/i386/i386/ptrace_machdep.c masks off the
reserved bits in the mxcsr register, which prevents the kernel panics.)
Architectures without PT_GETXMMREGS are not affected.
luigi [Tue, 20 Feb 2007 17:32:30 +0000 (17:32 +0000)]
Rename IWI_LOCK_ASSERT to IWI_LOCK_CHECK per Sam's suggestion,
and make it print under debug.iwi control same as other debugging stuff.
Remove the device_printf() in iwi_ioctl() and replace with this:
/*
* wait until pending iwi_cmd() are completed, to avoid races
* that could cause problems.
*/
while (sc->flags & IWI_FLAG_BUSY)
msleep(sc, &sc->sc_mtx, 0, "iwiioctl", hz);
This at least prevents what has become an almost systematic failure for my
system, presumably due to a previous iwi_cmd() not complete yet by the
time iwi_ioctl() is called.
It has been pointed to my attention that the real problem could be
calling ieee80211_ioctl() with the lock held. If that is true,
there might still be a possibility for a race condition e.g. an
interrupt coming while the ioctl is sleeping.
Need to investigate further on what changes are required to release
the lock before calling ieee80211_ioctl
luigi [Tue, 20 Feb 2007 15:45:59 +0000 (15:45 +0000)]
Address a few issues with the iwi driver, namely:
+ do not release the dma-ble region used for downloading firmware.
This should fix the problems that some people were seeing, due to
memory becoming too fragmented which prevented subsequent allocations
of a suitable contiguous region of memory;
+ document the firmware format and usage in if_iwivar.h
+ use a loop to allocate the four tx rings, instead of replicating
the body of the loop.
+ add debugging code IWI_LOCK_ASSERT() to detect missing locks.
These only do a printf, and should go away once we figure out why
the driver sometimes freezes the system due to a (yet unidentified)
race condition.
+ add a device_printf() in iwi_ioctl() in certain conditions
(see comment in the code). This helps preventing the race condition
mentioned above, and makes the system survive. This printf will
also go away once fixing this bug is completed.
+ change iwi_getfw() to return 0 on success, 1 on error, consistently
with other functions.
+ fix the argument of a sizeof() in iwi_get_firmware()
+ use le32toh() to access little-endian fields
+ simplify error handling in iwi_load_firmware() and iwi_init_locked()
The bugs fixed by this commit (the freezing one especially) are serious
enough to call for a quick MFC
rwatson [Tue, 20 Feb 2007 13:38:11 +0000 (13:38 +0000)]
Update auditing of socket information for the inpcb new world order:
so_pcb will always be non-NULL, and lock the inpcb while non-atomically
accessing address data.
rwatson [Tue, 20 Feb 2007 10:50:02 +0000 (10:50 +0000)]
Break introductory comment into two paragraphs to separate material on the
garbage collection complications from general discussion of UNIX domain
sockets.
Staticize unp_addsockcred().
Remove XXX comment regarding Giant and v_socket -- v_socket is protected
by the global UNIX domain socket lock.
rwatson [Tue, 20 Feb 2007 10:20:03 +0000 (10:20 +0000)]
Rename two identically named log_in_vain variables: tcp_input.c's static
log_in_vain to tcp_log_in_vain, and udp_usrreq's global log_in_vain to
udp_log_in_vain.
rwatson [Tue, 20 Feb 2007 00:06:59 +0000 (00:06 +0000)]
Sync up PRIV_IPC_{ADMIN,READ,WRITE} priv checks in ipcperm() with
kern_jail.c: allow jailed root these privileges. This only has an
effect if System V IPC is administratively enabled for the jail.
rwatson [Mon, 19 Feb 2007 22:59:23 +0000 (22:59 +0000)]
Restore sysv_ipc.c:1.30, which was backed out due to interactions with
System V shared memory, now believed fixed in sysv_shm.c:1.109:
date: 2006/11/06 13:42:01; author: rwatson; state: Exp; lines: +65 -37
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning
specific privilege names to a broad range of privileges. These may
require some future tweaking.
Sponsored by: nCircle Network Security, Inc.
Obtained from: TrustedBSD Project
Discussed on: arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
Alex Lyashkov <umka at sevcity dot net>,
Skip Ford <skip dot ford at verizon dot net>,
Antoine Brodin <antoine dot brodin at laposte dot net>
This restores fine-grained privilege support to System V IPC.
rwatson [Mon, 19 Feb 2007 22:56:10 +0000 (22:56 +0000)]
Remove call to ipcperm() in shmget_existing(). The flags argument is
ignored on other systems I investigated when accessing an existing
memory segment rather than creating a new one. This call to ipcperm()
is the only one to pass in a complete mode flag to the permission
checks rather than a simple access request mask, and caused problems
for the revised ipcperm() based on the priv(9) interface, which can
now be restored.
njl [Mon, 19 Feb 2007 22:49:43 +0000 (22:49 +0000)]
Note problems I had with bsnmpd while updating from an older -current.
There may be better ways to fix/work around these issues but this worked
for me.
rwatson [Mon, 19 Feb 2007 13:33:10 +0000 (13:33 +0000)]
Rename three quota privileges from the UFS privilege namespace to the
VFS privilege namespace: exceedquota, getquota, and setquota. Leave
UFS-specific quota configuration privileges in the UFS name space.
This renumbers VFS and UFS privileges, so requires rebuilding modules
if you are using security policies aware of privilege identifiers.
This is likely no one at this point since none of the committed MAC
policies use the privilege checks.
rwatson [Mon, 19 Feb 2007 13:25:17 +0000 (13:25 +0000)]
Do allow bypass of mac_seeotheruids in jail in order to be consistent
with other uses of PRIV_SEEOTHERUIDS. This will automatically be
scoped to the jail by the jail policy.
rwatson [Mon, 19 Feb 2007 13:22:36 +0000 (13:22 +0000)]
Use priv_check(9) instead of suser(9) for checking the privilege to
set real-time priority on a thread. It looks like this suser(9)
call was introduced after my first pass through replacing superuser
checks with named privilege checks.
rwatson [Mon, 19 Feb 2007 13:04:25 +0000 (13:04 +0000)]
Do allow PIOCSFL in jail for setguid processes; this is more consistent
with other debugging checks elsewhere. XXX comment on the fact that
p_candebug() is not being used here remains.
kib [Mon, 19 Feb 2007 10:56:09 +0000 (10:56 +0000)]
Remove union_dircheckp hook, it is not needed by new unionfs code anymore.
As consequence, getdirentries() no longer needs to drop/reacquire
directory vnode lock, that would allow it to be reclaimed in between.
Reported and tested by: Peter Holm
Approved by: rodrigc (unionfs)
MFC after: 1 week
kib [Mon, 19 Feb 2007 10:55:16 +0000 (10:55 +0000)]
MFi386 rev. 1.544 of i386/i386/pmap.c:
Rounding addr upwards to next 2M boundary in pmap_growkernel() could
cause addr to become 0, resulting in an early return without populating
the last PDE.
cognet [Mon, 19 Feb 2007 01:03:08 +0000 (01:03 +0000)]
Add two new options, FLASHADDR, which defines the address the flash is
mapped at, and LOADERRAMADDR, the address at which the loader maps the ram at
at the time the kernel is booted.
They are used to detect if the kernel is booted from the onboard flash.
Define those for the IQ31244
alc [Sun, 18 Feb 2007 05:54:42 +0000 (05:54 +0000)]
Enable vm_page_free() and vm_page_free_zero() to be called on some pages
without the page queues lock being held, specifically, pages that are not
contained in a vm object and not a member of a page queue.
sos [Sat, 17 Feb 2007 16:56:39 +0000 (16:56 +0000)]
Add support for chipsets that has NULL'd BAR's for legacy ports.
This allows DMA to be used on a fine little geode system I got here and
most like on lots of older systems like that.
mckusick [Sat, 17 Feb 2007 08:25:43 +0000 (08:25 +0000)]
This README file is obsolete. The cited problems were fixed long ago
and the code is installed by default so no longer requires action by
the administrator to be included.
imp [Fri, 16 Feb 2007 05:36:59 +0000 (05:36 +0000)]
Two changes:
(1) change debounce period from 1s to 250ms. This appears to be fine and
speeds things up a little.
(2) In the middle of cbb_pcic_power_disable_socket we write 0 to the EXCA_INTR
register to put the card into reset. However, this turns off CSC
interrupts for TI bridges (and maybe others). So no further card
insertion events would be noticed. To compensate, after we've gone
through the entire power down sequence, turn on EXCA_INTR_ENABLE so
that CSC events happen.
#2 should fix the 'dead slot' problem that has been reported after
card ejection (but only 16-bit cards).
mohans [Fri, 16 Feb 2007 03:46:55 +0000 (03:46 +0000)]
Backing out an earlier change. It seems harmless for NFS to miss the "force
unmount" flag, making the acquisition of the MNT_ILOCK in nfs_request() and
nfs_sigintr() unnecessary. Pointed out by tegge@.
bmah [Fri, 16 Feb 2007 02:20:11 +0000 (02:20 +0000)]
Switch to unified MI hardware notes. The hardware notes are
now contained entirely in a single DocBook article, which has
information pertinent to all architectures. This will improve
the maintainability of the hardware notes going forward by
reducing complexity of the build process, improving the visibiilty
of the architecture-specific text, and removing the need to generate
an extra version of the document for every architecture.
Remove all of the MD hardware notes stuff; all relevant content
has been folded into hardware/article.sgml.
bmah [Fri, 16 Feb 2007 02:10:12 +0000 (02:10 +0000)]
Add support for auto-generating hardware notes entries in a
manner consistent with the new MI-style hardware notes document.
man2hwnotes.pl now defaults to generating entities for the MI-style
hardware notes (i.e. hardware/article.sgml). A new -c
option causes it to generate entities for the older MD-style
hardware notes (i.e. hardware/common/dev.sgml).
The Makefile infrastructure supplies the -c option to man2hwnotes.pl
now unless the HWNOTES_MI Makefile variable is defined, so
compatiblity is preserved for hardware notes translations that
aren't converted to the new organization yet. As translations
convert, they should define HWNOTES_MI in their hardware/Makefile.
When all the relevant translations catch up, the compatibility goop
in share/mk/doc.relnotes.mk and share/sgml/Makefile can be removed.
Thanks go to simon@ for help with the backwards compatiblity
mechanism.
pjd [Thu, 15 Feb 2007 22:08:35 +0000 (22:08 +0000)]
Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.
This way we may support multiple structures in v_data vnode field within
one file system without using black magic.
Vnode-to-file-handle should be VOP in the first place, but was made VFS
operation to keep interface as compatible as possible with SUN's VFS.
BTW. Now Solaris also implements vnode-to-file-handle as VOP operation.
VFS_VPTOFH() was left for API backward compatibility, but is marked for
removal before 8.0-RELEASE.
Approved by: mckusick
Discussed with: many (on IRC)
Tested with: ufs, msdosfs, cd9660, nullfs and zfs
sos [Thu, 15 Feb 2007 21:51:42 +0000 (21:51 +0000)]
Support AHCI chips where the ports are not consecutively numbered as in
some incarnations of the ICH8 chip.
Also fix the panic introduced by the last commit.
bmah [Thu, 15 Feb 2007 19:33:47 +0000 (19:33 +0000)]
First step in consolidating the various MD bits of the hardware notes.
Convert MD references in the supported devices section from arch=""
attributes for conditional compilation to entities that will just
print architecture names. (The entities aren't defined yet...this
will happen in a future commit.)