brucec [Thu, 9 Dec 2010 15:24:59 +0000 (15:24 +0000)]
MFC r216243:
Ignore any failures with the "local" distribution since it's not present
on release CDs and so will normally fail.
installCommit() returns a DITEM_ value, not a Boolean.
distExtractAll() returns a Boolean, not a DITEM_ value.
Affects resolver operators who are validating with DNSSEC, and
querying zones which are in a key rollover period. The bug will
cause answers to incorrectly be marked as insecure.
trasz [Tue, 7 Dec 2010 22:00:48 +0000 (22:00 +0000)]
MFC r216084:
Don't panic when we read an empty ACL from ZFS. Apparently this may happen
with filesystems created under MacOS X ZFS port. This is kind of filesystem
corruption (we don't allow for setting empty ACLs), so make acl_get_file(3)
and related syscalls fail with EINVAL in that case. In theory, we could
return empty ACL to userland, but I'm afraid this would break some code.
yongari [Tue, 7 Dec 2010 19:14:18 +0000 (19:14 +0000)]
MFC r216111:
If RX lockup workaround is enabled, fxp(4) will periodically reset
the controller to workaround silicon bug of i82557. Each reset will
re-establish link which in turn triggers MII status change
callback. The callback will try to reconfigure controller if the
controller is not i82557 to enable flow-control. This caused
endless link UP/DOWN when the workaround was enabled on non-i82557
controller.
To fix the issue, apply RX lockup workaround only for i82557.
Previously it blindly checked undocumented EEPROM location such
that it sometimes enabled the workaround for other controllers. At
this time, only i82557 is known to have the silicon bug.
This fixes a regression introduced in r215906 which enabled flow
control support for all controllers except i82557.
Reported by: Karl Denninger (karl <> denninger dot net)
Tested by: Karl Denninger (karl <> denninger dot net)
Approved by: re (kensmith)
emax [Mon, 6 Dec 2010 22:45:29 +0000 (22:45 +0000)]
MFC r215195
Add firmware downloader for Atheros AR3011 based USB Bluetooth devices.
Hardware donated by: Rusty Nejdl rnejdl at ringofsaturn dot com
Tested by: Rusty Nejdl rnejdl at ringofsaturn dot com
Tested by: Andrzej Tobola ato at iem dot pw dot edu dot pl
Approved by: re
kib [Fri, 3 Dec 2010 22:07:07 +0000 (22:07 +0000)]
MFC r209463:
Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also,
note that usercontext is not initialized anymore in fpstate_drop().
Systematically replace references to npxgetregs() and npxsetregs()
by npxgetuserregs() and npxsetuserregs() in comments.
MFC r215865:
Remove npxgetregs(), npxsetregs(), fpugetregs() and fpusetregs()
functions, they are unused. Remove 'user' from npxgetuserregs()
etc. names.
For {npx,fpu}{get,set}regs(), always use pcb->pcb_user_save for FPU
context storage.
MFC r216012:
Calling fill_fpregs() for curthread is legitimate, and ELF coredump
does this.
jhb [Thu, 2 Dec 2010 15:58:54 +0000 (15:58 +0000)]
MFC 215820:
Add device IDs for two more ServerWorks Host-PCI bridges so that we can
read their starting PCI bus number for older systems that do not support
ACPI (or have a broken _BBN method).
Plug well observed races on la_hold entries with the callout handler.
Call the handler function with the lock held, return unlocked as we
might free the entry. Rework functions later in the call graph to be
either called with the lock held or, only if needed, unlocked.
Place asserts to document and tighten assumptions on various lle locking,
which were not always true before.
We call nd6_ns_output() unlocked and the assignment of ip6->ip6_src was
decentralized to minimize possible complexity introduced with the formerly
missing locking there. This also resulted in a push down of local
variable scopes into smaller blocks.
Reported by: many
Submitted by: Dmitrij Tejblum (tejblum yandex-team.ru) (original version)
Tested by: remko
PR: kern/148857
Approved by: re (kib)
brucec [Thu, 2 Dec 2010 09:09:46 +0000 (09:09 +0000)]
MFC r216052:
Update the serial port device names. They changed in 8.0 because the
default driver is now uart(4).
PR: bin/140887
Submitted by: Joe Barbish <fbsd1 at a1poweruser.com>
MFC r216053:
If no floppy drive is installed kldBrowser() can generate an error
early on. Initialize menu and count so the cleanup code doesn't try
and use their uninitialized values.
PR: bin/152270
Submitted by: Remi LAURENT <cloud at madpowah.org>
gibbs [Tue, 30 Nov 2010 22:25:44 +0000 (22:25 +0000)]
Merge revision 211236 form current:
Allow interrupt driven config hooks to be registered from config hook callbacks.
Interrupt driven configuration hooks serve two purposes: they are a
mechanism for registering for a callback that is invoked once interrupt
services are available, and they hold off root device selection so long
as any configuration hooks are still active. Before this change, it was
not possible to safely register additional hooks from the context of a
configuration hook callback. The need for this feature arises when
interrupts are required to discover new devices (e.g. access to the XenStore
to find para-virtualized devices) which in turn also require the ability
to hold off root device selection until some lengthy, interrupt driven,
configuration task has completed (e.g. Xen front/back device driver
negotiation).
More specifically, the mutex protecting the list of active configuration
hooks is never held during a callback, and static information is used
to ensure proper ordering and only a single callback to each hook even
when faced with registration or removal of a hook during an active run.
Sponsored by: Spectra Logic Corporation
Approved by: re (kib)
gallatin [Mon, 29 Nov 2010 13:36:20 +0000 (13:36 +0000)]
MFC 215686:
Fix a TSO checksum bug on mxge(4):
The Myri10GE NIC will assume all TSO frames contain partial checksum,
and will emit TSO segments with bad TCP checksums if a TSO frame
contains a full checksum. The mxge driver takes care to make sure
that TSO is disabled when checksum offload is disabled for this
reason. However, modules that modify packet contents (like pf) may
end up completing a checksum on a TSO frame, leading to the NIC emitting
TSO segments with bad checksums.
To workaround this, restore the partial checksum in the mxge driver
when we're fed a TSO frame with a full checksum.
attilio [Mon, 29 Nov 2010 08:04:10 +0000 (08:04 +0000)]
MFC r215544,215683:
Scan the list in reverse order for the shutdown handlers of loaded modules.
This way, when there is a dependency between two modules, the handler of the
latter probed runs first.
gad [Mon, 29 Nov 2010 04:57:46 +0000 (04:57 +0000)]
= MFC of r211190:
- Improve the wait4data() routine so it behaves better when checking
print-jobs which have last-modification times that are in the future.
This shouldn't happen, of course, but it can. And when it did happen,
the previous check could cause completely-spooled jobs to sit in the
queue for 20 minutes per job. The new code waits until the last-modify
time is not changing, instead of making decisions based on the specific
value of last-modify.
yongari [Mon, 29 Nov 2010 01:41:56 +0000 (01:41 +0000)]
MFC r215329:
Add flow control for all re(4) controllers. re(4) controllers do
not provide any MAC configuration interface for resolved flow
control parameters. There is even no register that configures water
mark which will control generation of pause frames.
However enabling flow control surely enhanced performance a lot.
yongari [Mon, 29 Nov 2010 01:36:15 +0000 (01:36 +0000)]
MFC r215848:
Allocate 1 MSI/MSI-X vector. Originally jme(4) was designed to
support multi-queue but the hardware limitation made it hard to
implement supporting multi-queue. Allocating more than necessary
vectors is resource waste and it can be added back when we
implement multi-queue support.
yongari [Mon, 29 Nov 2010 01:33:25 +0000 (01:33 +0000)]
MFC r215847:
Disable retrying RX descriptor loading. The counter is used to set
number of retry to be performed whenever controller found RX
descriptor was empty. RX empty interrupt is generated only when the
retry counter is over. Experimentation shows retrying RX descriptor
loading increased number of dropped frames under flow-control
enabled environments so disable it and have controller generate RX
empty interrupt as fast as it can.
While I'm here fix RXCSR_DESC_RT_CNT macro.
pjd [Sun, 28 Nov 2010 20:56:51 +0000 (20:56 +0000)]
MFC r215799:
Add gptboot_enable rc variable, which allows to turn gptboot reporting off in
case user wants to implement his own actions and doesn't want the attributes to
vanish.
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
bz [Sun, 28 Nov 2010 16:31:39 +0000 (16:31 +0000)]
MFC r215423:
Do not initialize flag variables before needed.
Consistently use the LLE_ prefix for lla_lookup() and the ND6_ prefix
for nd6_lookup() even though both are defined the same. Use the right
flag variable when checking each.
marius [Sun, 28 Nov 2010 16:03:01 +0000 (16:03 +0000)]
MFC: r215907
Remove the description of the dev.fxp.%d.noflow tunable as it was removed
in r215906 (MFC'ed to stable/8 in r216002) and the flowcontrol media option
now should be set as desired via ifconfig(8) instead.
marius [Sun, 28 Nov 2010 15:59:39 +0000 (15:59 +0000)]
MFC: r215906
Fix and implement missing parts of flow control support. This also removes
the dev.fxp.%d.noflow tunable as the same effect can now be achieved with
ifconfig(8) by setting the flowcontrol media option as desired (besides
the tunable never having a chance to actually enable flow control support
so far).
In joint forces with: yongari
mm [Sun, 28 Nov 2010 09:52:06 +0000 (09:52 +0000)]
MFC r213634, r213673:
MFC r213634:
Change FAPPEND to IO_APPEND as this is a ioflag and not a fflag.
This corrects writing to append-only files on ZFS.
MFC r213673 (pjd):
Provide internal ioflags() function that converts ioflag provided by FreeBSD's
VFS to OpenSolaris-specific ioflag expected by ZFS. Use it for read and write
operations.
PR: kern/149495 [1], kern/151082 [2]
Submitted by: Daniel Zhelev <daniel@zhelev.biz> [1], Michael Naef <cal@linu.gs> [2]
Reviewed by: mm (r213673)
Approved by: delphij (mentor)
thompsa [Sun, 28 Nov 2010 07:18:14 +0000 (07:18 +0000)]
MFC r215253
Fix LibUSB v1.0 compliancy.
1) We need to allow the USB callback to free the USB transfer itself.
2) The USB transfer buffer should only be automatically freed when
freeing the USB transfer.
thompsa [Sun, 28 Nov 2010 07:04:28 +0000 (07:04 +0000)]
MFC r213809
USB network (NCM driver):
- correct the ethernet payload remainder which
must be post-offseted by -14 bytes instead of
0 bytes. This is not very clearly defined in the
NCM specification.
jchandra [Sun, 28 Nov 2010 06:43:39 +0000 (06:43 +0000)]
MFC r215973
The current implementation of vm_page_alloc_freelist() does not handle
order > 0 correctly. Remove order parameter to the function and use it
only for order 0 pages.
zec [Sat, 27 Nov 2010 23:48:53 +0000 (23:48 +0000)]
MFC r215800:
Simplify ng_pipe locking model by relying on the netgraph framework
to provide serialization of calls into the node, which is accomplished
by markng the node as single-threaded (NGF_FORCE_WRITER).
The price we pay is that each ng_pipe instance now has its own callout
handler which polls for queued frames on each clock tick, as long as
the pipe has any frames in its internal queues. OTOH, we got rid of
the global ng_pipe mutex, so from now on multiple ng_pipe instances
can operate in parallel. This change also fixes counting of forwarded
frames when an ng_pipe node is not enforcing any packet impairments.
While here, attempt to improve adherance to style(9) throughout
otherwise mostly unreadable code.
ae [Sat, 27 Nov 2010 13:53:21 +0000 (13:53 +0000)]
MFC r215570:
Add to gpart(8) an ability to backup partition table and
restore it from given backup.
MFC r215671:
Always dump partition labels with `gpart backup`, but `gpart restore`
does restore them only when -l option is specified [1]. Make number of
entries field in backup format optional. Document -l and -r options of
`gpart show` action.
MFC r215672:
Add SIGINT handler to `gpart restore` action.
ae [Sat, 27 Nov 2010 13:38:17 +0000 (13:38 +0000)]
r214975 was not fully adapted to stable/8 and in-kernel version of
"destroy -F" does not work, because g_part_parm_uint assumes that
parameter is an asci string, but in head/ it is not.
Add gpart_destroy wrapper function to gpart(8). It changes "force"
parameter and does convert it to string.
jchandra [Sat, 27 Nov 2010 12:26:40 +0000 (12:26 +0000)]
Merge MIPS platform support to 8-STABLE.
This commit merges the MIPS platform changes that was now stable in
-CURRENT into 8-STABLE. The MIPS changesets are too many (~400) to list
here. But the changesets merged in this commit that affect other platforms
are summarized below:
r204635 : (changes to sys/dev/hwpmc, lib/libpmc, sys/sys/pmc.h)
Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.
r205845: (changes to sys/modules/Makefile)
Fix for building modules on mips and arm.
r204031: (changes to sys/kern/link_elf_obj.c)
printf fix, as part of kernel module support for MIPS.
r206404: (changes to sys/arm/include/bus.h)
Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the
other platforms - for arm and mips.
r206819: (changes to sys/vm/)
Add VMFS_TLB_ALIGNED_SPACE option and kmem_alloc_nofault_space(), which
is used to allocate kernel stack address on MIPS.
r208165, r211087: (sys/kern/subr_smp.c, sys/kern/sched_ule.c)
Enable ULE scheduler for MIPS, Fix for an issue in SMP when 32 cpus are
enabled.
r208659: (sys/{ia64/ia64,mips/mips,sun4v/sun4v}/pmap.c)
Simplify the inner loop of get_pv_entry()
r208794: (changes to sys/vm/)
Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig()
fails to allocate MIPS page table pages.
r210327: (changes to sys/vm/)
Support for MIPS page table page allocation. Add a new function 'vm_page_t
vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to
allocate a page from a specified freelist, and other related changes.
mjacob [Sat, 27 Nov 2010 03:59:55 +0000 (03:59 +0000)]
This is an MFC of 205847
Change how multipath labels are created and managed. This makes it easier
to support various storage boxes which really aren't active-active.
We only write the label on the *first* provider. For all other providers
we just "add" the disk. This also allows for an "add" verb.
A usage implication is that you should specificy the currently active
storage path as the first provider.
Note that this does not add RDAC-like functionality, but better allows for
autovolumefailover configurations (additional checkins elsewhere will support
this).
lstewart [Sat, 27 Nov 2010 03:19:59 +0000 (03:19 +0000)]
MFC r215552:
When enabling or disabling SIFTR with a VIMAGE kernel, ensure we add or remove
the SIFTR pfil(9) hook functions to or from all network stacks. This patch
allows packets inbound or outbound from a vnet to be "seen" by SIFTR.
Reported and tested by: David Hayes <dahayes at swin edu au>
lstewart [Sat, 27 Nov 2010 02:18:55 +0000 (02:18 +0000)]
Partially MFC r215166:
Disable priming the congestion window from the host cache. The current method
interacts poorly with delayed ack and appropriate byte counting amongst other
things, resulting in undesired delay during a connection's opening slow start.
Even if we did fix the issues, the current method is still dubious at best and
needs to be thought through thoroughly.
Due to a mistake on my behalf, the change described above was committed to head
as part of a larger patch in revision 215166. Instead of waiting for the MFC of
215166, I'm merging just this small portion for the upcoming release without
bringing the mergeinfo for r215166 along. The mergeinfo will sort itself out
when r215166 is eventually merged.
This is an intentional direct commit to the 8-STABLE branch.
Reported by: Maxim Dounin <mdounin at mdounin ru> and others
Submitted by: andre
nwhitehorn [Sat, 27 Nov 2010 00:46:57 +0000 (00:46 +0000)]
MFC r215752:
Properly use SCHAR_MAX instead of CHAR_MAX for 0x7f. This fixes operation
of locate(1) on systems on which char is unsigned by default (ARM and
PowerPC).
nwhitehorn [Sat, 27 Nov 2010 00:37:13 +0000 (00:37 +0000)]
MFC r214494:
Fix netboot on some Apple machines on which calling dma-free on the
network device can hang the machine. This causes the loss of 64 KB of
accessible memory on netbooted machines.
nwhitehorn [Sat, 27 Nov 2010 00:36:11 +0000 (00:36 +0000)]
MFC r214493,214495:
Fix some memory management issues discovered when trying to boot the PPC
OF loader on systems where address cells and size cells are both 2 (the
Mambo simulator) and fix an error where cons_probe() was called before
init_heap() but used malloc() to set environment variables.
simon [Fri, 26 Nov 2010 22:50:58 +0000 (22:50 +0000)]
Merge OpenSSL 0.9.8p into stable/8.
This merges up to and including head/crypto/openssl/ r215697; and
head/secure/lib/libcrypto/, head/secure/lib/libssl/,
head/secure/usr.bin/openssl/ r215698.
To make the merge simpler, a hack was added to set MACHINE_CPUARCH.
Security: CVE-2010-2939, CVE-2010-3864
Security: http://www.openssl.org/news/secadv_20101116.txt
Security: FreeBSD-SA-10:10.openssl
Approved by: re (implicitly - they did not object of the general idea
of OpenSSL update)
marius [Fri, 26 Nov 2010 21:27:13 +0000 (21:27 +0000)]
MFC: r215780
Remove the description of the link0 link option, since r215297 (merged to
stable/8 in r215881) the master media option generally should be used
instead.
This is MFC'ed in order to discourage the use of the link0 link option,
although it's still available in stable/8).