jpaetzel [Sun, 13 Feb 2011 15:15:47 +0000 (15:15 +0000)]
MFC 218523:
Netgear renamed the WG311 to the WG311v1 after they released a second
version of it. There is also a WG311v3 which uses a chipset covered by
malo(4). Along the way add the WG311T to the list which is also an
atheros chipset.
simon [Sun, 13 Feb 2011 10:22:43 +0000 (10:22 +0000)]
MFC 218625:
Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could
cause OpenSSL to parse past the end of the message.
Note: Applications are only affected if they act as a server and call
SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes
Apache httpd >= 2.3.3, if configured with "SSLUseStapling On".
The very quick MFC is done to get this fix into 7.4 / 8.2.
Discussed with: re
Approved by: so (simon, for "instant" MFC)
Obtained from: OpenSSL CVS
Security: http://www.openssl.org/news/secadv_20110208.txt
Security: CVE-2011-0014
ae [Fri, 11 Feb 2011 05:56:14 +0000 (05:56 +0000)]
MFC r218278:
vdev's sectorsize should not be greater than 8 Kbytes and also
it should be power of 2. This prevents non-aligned access while
probing vdev's labels.
ae [Fri, 11 Feb 2011 05:37:05 +0000 (05:37 +0000)]
MFC r218014:
Add new user-friendly aliases for partition types for the MBR and
EBR schemes: fat32, ebr, linux-data, linux-raid, linux-swap and
linux-lvm. Add bios-boot GUID and alias for the GPT scheme. It used by
GRUB 2 loader. Also do sorting definitions of types in diskmbr.h
and in g_part.c.
marius [Tue, 8 Feb 2011 22:08:00 +0000 (22:08 +0000)]
MFC: r216961
Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for
and switch sparc64 to use the first one for bus error filter handlers of
bridge drivers instead of (ab)using INTR_FAST for that so we eventually
can get rid of the latter.
kib [Tue, 8 Feb 2011 09:25:32 +0000 (09:25 +0000)]
MFC r218168:
Only process as much array elements as we find the sockets during
second phase of gc. Take linkage lock and recheck the eligibility
of the socket for gc, as well as call fhold() under the linkage lock.
For the ZFS kernel module, change the type of clock_t to int64_t.
The clock_t type in OpenSolaris is long (int64_t on amd64).
On FreeBSD clock_t is int32_t. The clock_t type is used in several places
in the ZFS code to store system uptime in milliseconds ("seconds * hz").
With hz=1000 we have a 32-bit integer overflow in 24 days, 20 hours,
31 minutes and 23.648 seconds. This has a user reported negative impact
on l2arc_feed_thread() and may cause unexpected results from other functions
using clock_t.
Reported by: Artem Belevich <fbsdlist@src.cx> on freebsd-fs@
brooks [Sun, 6 Feb 2011 13:59:03 +0000 (13:59 +0000)]
MFC r215213:
Add an (off by default) check for negative permissions (where the
group on a object has less permissions than everyone). These
permissions will not work reliably over NFS if you have more than
14 supplemental groups and are usually not what you mean.
emaste [Sun, 6 Feb 2011 01:13:10 +0000 (01:13 +0000)]
MFC r218207:
Revert part of r173264. Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
make use of the aac_ioctl_event callback, if acc_alloc_command fails.
This can end up in an infinite loop in the while loop in
aac_release_command.
kib [Sat, 5 Feb 2011 22:57:14 +0000 (22:57 +0000)]
MFC r217819:
Allow debugger to specify that children of the traced process should be
automatically traced. Extend the ptrace(PL_LWPINFO) to report that child
just forked.
To not change the struct thread layout, td_dbg_forked was placed at the
end of the structure.
jilles [Sat, 5 Feb 2011 21:47:04 +0000 (21:47 +0000)]
MFC r216019: sh: Make the test for cd/pwd with long pathnames more useful:
* Use $(getconf PATH_MAX /) to make sure we actually exercise the hard part
* Delete our test area even if the test fails
mav [Sat, 5 Feb 2011 21:34:26 +0000 (21:34 +0000)]
MFC r217774:
ICH7 SATA controller in legacy mode can provide access to SATA registers
via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
allocate memory for that BAR. This allows hot-plug support and connection
speed reporting.
jilles [Sat, 5 Feb 2011 21:00:35 +0000 (21:00 +0000)]
MFC r216168: sh(1): Clean up documentation of built-in commands.
Make sure all built-in commands are in the subsection named such, except
exp, let and wordexp which are deliberately undocumented. The text said only
built-ins that really need to be a built-in were documented there but in
fact almost all of them were already documented.
mav [Sat, 5 Feb 2011 20:57:01 +0000 (20:57 +0000)]
MFC r217875:
In addition to r217444, ignore also ATA status errors on DMA Auto-Activation
enabling request. Some HP disks reported to return ABORT error there while
declaring support for this feature.
mav [Sat, 5 Feb 2011 20:52:43 +0000 (20:52 +0000)]
MFC r217444:
Some old WD SATA disks report supported and enabled device-initiated
interface power management, but return ABORT error on attempt to disable
it. Make CAM SATA probe sequence ignore this error, as it is not fatal.
jilles [Sat, 5 Feb 2011 20:48:45 +0000 (20:48 +0000)]
MFC r208505: sh(1): Rework documentation of shell variables.
* Move the "environment variables" that do not need exporting to be
effective or that are set by the shell without exporting to a new section
"Special Variables".
* Add special variables LINENO and PPID.
* Add environment variables LANG, LC_* and PWD; also describe ENV under
environment variables.
jilles [Sat, 5 Feb 2011 20:25:17 +0000 (20:25 +0000)]
MFC r217557: sh: Fix signal messages being sent to the wrong file sometimes.
When a foreground job exits on a signal, a message is printed to stdout
about this. The buffer was not flushed after this which could result in the
message being written to the wrong file if the next command was a builtin
and had stdout redirected.
dougb [Sat, 5 Feb 2011 19:13:34 +0000 (19:13 +0000)]
Update to BIND 9.6.3, the latest from ISC on the 9.6 branch.
All 9.6 users with DNSSEC validation enabled should upgrade to this
version, or the latest version in the 9.7 branch, prior to 2011-03-31
in order to avoid validation failures for names in .COM as described
here:
In addition the fixes for this and other bugs, there are also the
following:
* Various fixes to kerberos support, including GSS-TSIG
* Various fixes to avoid leaking memory, and to problems that could
prevent a clean shutdown of named
jilles [Sat, 5 Feb 2011 15:09:55 +0000 (15:09 +0000)]
MFC r217847: sh: Clean up some old comments:
* There is no plan for an alternative to the command "set".
* Attempting to unset a readonly variable has not raised an error for quite
a while, so the order of unsetting a variable and a function with the same
name does not matter.
yongari [Fri, 4 Feb 2011 20:32:52 +0000 (20:32 +0000)]
MFC r216829,216833:
rr216829:
Add driver for DM&P Vortex86 RDC R6040 Fast Ethernet.
The controller is commonly found on DM&P Vortex86 x86 SoC. The
driver supports all hardware features except flow control. The
flow control was intentionally disabled due to silicon bug.
DM&P Electronics, Inc. provided all necessary information including
sample board to write driver and answered many questions I had.
Many thanks for their support of FreeBSD.
__assert() is called when an assertion fails. After printing an error
message, it will call abort(). abort() never returns, hence it has the
__dead2 attribute. Also add this attribute to __assert().
jhb [Fri, 4 Feb 2011 17:11:37 +0000 (17:11 +0000)]
MFC 217351:
Introduce two new helper macros to define the priority ranges used for
interactive timeshare threads (PRI_*_INTERACTIVE) and non-interactive
timeshare threads (PRI_*_BATCH) and use these instead of PRI_*_REALTIME
and PRI_*_TIMESHARE. No functional change.
jhb [Fri, 4 Feb 2011 16:30:13 +0000 (16:30 +0000)]
MFC 217292:
- Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
PI_DISKLOW. While here, rename PI_TTYLOW to PI_TTY.
- Add a macro PI_SWI() that takes a SWI_* constant as an argument and
returns the suitable thread priority.
To preserve the KBI, I did not renumber priorities but simply removed
unused ones.
jhb [Fri, 4 Feb 2011 14:29:05 +0000 (14:29 +0000)]
MFC 218171:
Output an appropriate amount of padding to line up per-CPU state columns
rather than using a terminal sequence to move the cursor when drawing the
initial screen.
brucec [Fri, 4 Feb 2011 10:19:56 +0000 (10:19 +0000)]
MFC r216873:
There can be more than 0x20000000 swap meta blocks allocated if a swap-backed
md(4) device is used. Don't panic when deallocating such a device if swap
has been used.
kib [Fri, 4 Feb 2011 09:15:23 +0000 (09:15 +0000)]
MFC r218026:
If more than one thread allocated sf buffers for sendfile(2), and
each of the threads needs more while current pool of the buffers is
exhausted, then neither thread can make progress.
Switch to nowait allocations after we got first buffer already.
MFC r217924:
While inspecting the disklabel check that start offset of partition is
within provider's bounds. If not then reject this disklabel.
Mark bbarea as NULL to do not free it again in destroy method.
yongari [Wed, 2 Feb 2011 18:42:53 +0000 (18:42 +0000)]
MFC r216925,217331,217349,217542:
r216925:
Add a 'locked' variant of the foo_start() routine and call it directly
from interrupt handlers and watchdog routines instead of queueing a task
to call foo_start().
r217331:
Make sure to invoke unlocked foo_start since the taskqueue does not
hold a driver lock. This should fix a regression introduced in
r216925.
r217349:
Forgot to remove unlock of the driver lock from age_start_locked() when
converting it to a locked variant.
r217542:
Fix some bugs in my last set of changes to ale(4):
- Remove extra unlock from end of ale_start_locked().
- Expand scope of locking in interrupt handler.
- Move ether_ifdetach() earlier and retire now-unneeded DETACH flag.
kib [Wed, 2 Feb 2011 12:24:53 +0000 (12:24 +0000)]
MFC r217880:
Treat async buffer writes from the gjournal switcher thread the same as
from syncer. We shall not sleep on running buffer space when suspending.
kib [Tue, 1 Feb 2011 10:20:31 +0000 (10:20 +0000)]
MFC r217824:
When vtruncbuf() iterates over the vnode buffer list, lock buffer object
before checking the validity of the next buffer pointer. Otherwise, the
buffer might be reclaimed after the check, causing iteration to run into
wrong buffer.
MFC r217531:
Limit maximum number of GPT entries to 4k. It is most realistic value
and can prevent kernel memory exhausting when big value is specified
from command line.
Split reading and writing operation to several iterations to do not
trigger KASSERT when data length is greater than MAXPHYS.
nwhitehorn [Sun, 30 Jan 2011 02:17:47 +0000 (02:17 +0000)]
MFC r217756:
Disable ATAPI DMA unconditionally on Apple Kauai ATA controllers, like it
is on the MacIO ones. It appears to be unreliable on all DBDMA-based
controllers for unknown reasons, which should be figured out eventually.
jhb [Fri, 28 Jan 2011 20:06:39 +0000 (20:06 +0000)]
MFC 217416:
Add two more features to cpuset(1):
- Add a new -C flag to create a new cpuset and move an existing pid into
that set.
- Allow 'all' to be specified for a cpu list (e.g. cpuset -s 1 -l all)
which maps to the list of all CPUs in the system.
jpaetzel [Fri, 28 Jan 2011 18:25:51 +0000 (18:25 +0000)]
MFC: r217755 r217822
This script parses output of userland tools. In the case of a faulted
zpool the output causes the script to bail out with syntax errors.
Since a scrub of a faulted zpool is pointless, just skip over any
pools marked as such.
marcel [Fri, 28 Jan 2011 00:22:03 +0000 (00:22 +0000)]
In uart_tty_outwakeup(), check CTS/RTS flow control settings and
prevent sending data when CTS is de-asserted.
In uart_tty_intr(), call uart_tty_outwakeup() when the CTS signal
changed, knowing that uart_tty_outwakeup() will do the right
thing for flow control. This avoids redundant conditionals.
PR: kern/148644
Submitted by: John Wehle <john@feith.com>
gavin [Thu, 27 Jan 2011 23:16:41 +0000 (23:16 +0000)]
Merge r217200 from head:
Sync the list of devices supported by uslcom(4) with Linux, bringing in
all new devices added between our r211022 and their git revision 93ad03d60b5b18897030038234aa2ebae8234748
gavin [Thu, 27 Jan 2011 23:07:03 +0000 (23:07 +0000)]
Merge r217264 from head:
Remove a bullet point that appears to have been accidentally inserted twice.
It has also been included within the feature lists to which it is relevant.
jhb [Thu, 27 Jan 2011 21:16:23 +0000 (21:16 +0000)]
MFC 217078,217079: Various priority fixes for creating new threads:
- Move sched_fork() later in fork() after the various sections of the new
thread and proc have been copied and zeroed from the old thread and
proc. Otherwise attempts to modify thread or process data in sched_fork()
could be undone.
- Don't copy td_{base,}_user_pri from the old thread to the new thread in
sched_fork_thread() in ULE. This is already done courtesy the bcopy()
of the thread copy region.
- Always initialize the real priority (td_priority) of new threads to the
new thread's base priority (td_base_pri) to avoid bogusly inheriting a
borrowed priority from the parent thread.
- Properly initialize the base priority (td_base_pri) of thread0 to PVM
to match the desired priority in td_priority. Otherwise the first time
thread0 used a borrowed priority it would drop down to PUSER instead of
PVM.
- Explicitly initialize the starting priority of new kprocs to PVM to
avoid inheriting some random priority from thread0.
jhb [Thu, 27 Jan 2011 20:12:18 +0000 (20:12 +0000)]
MFC 217077:
Only change the priority of timeshare threads to PRI_MAX_TIMESHARE
when yield() is called. Specifically, leave the priority of real time
and idle threads unchanged.