]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMFC r233098:
dim [Wed, 13 Jun 2012 19:53:29 +0000 (19:53 +0000)]
MFC r233098:

Make sure libgcc_s is finished building in _startup_libs before
building libcxxrt with high -j levels.  The workaround in
libc++/Makefile isn't necessary once that race is solved.

Reviewed by: theraven

git-svn-id: svn://svn.freebsd.org/base/stable/9@237019 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoEnsure that the beginning of the DSS is aligned on a chunk boundary.
jhb [Wed, 13 Jun 2012 19:04:39 +0000 (19:04 +0000)]
Ensure that the beginning of the DSS is aligned on a chunk boundary.
If the _end symbol used an address with the low bit set, then the initial
arena could end up with corrupted rb trees causing a crash during the
first call to malloc().

This is a direct commit to stable/9 as it does not affect the version
of malloc in HEAD.

Reviewed by: jasone
MFC after: 1 week

git-svn-id: svn://svn.freebsd.org/base/stable/9@237017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234188,r234463,r234465:
pluknet [Wed, 13 Jun 2012 14:47:03 +0000 (14:47 +0000)]
MFC r234188,r234463,r234465:

- Update the swi_add prototype after struct ithd was split up into
struct intr_event and struct intr_thread. [1]
- Update the rest of struct ithd references.
- net_ih and softclock_ih cookies have gone away.
- Document swi_remove(9).

PR: docs/166864 [1]

git-svn-id: svn://svn.freebsd.org/base/stable/9@237007 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236669:
fabient [Wed, 13 Jun 2012 06:42:36 +0000 (06:42 +0000)]
MFC r236669:
Remove spurious ARM symbols from lookup table.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236286:
eadler [Wed, 13 Jun 2012 03:40:59 +0000 (03:40 +0000)]
MFC r236286:
Fix likely race condition if wait_child() is interrupted by sigchild()

PR: bin/102834
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236288:
eadler [Wed, 13 Jun 2012 03:34:42 +0000 (03:34 +0000)]
MFC r236288:
Only set _w to 0 when the file stream is not currently reading. Without this fflush may fail to write data in the buffer.

PR: kern/137819
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236290:
eadler [Wed, 13 Jun 2012 03:18:47 +0000 (03:18 +0000)]
MFC r236290:
Document daily_status_security_chkportsum_enable

PR: docs/167980
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoForget to propogate mergeinfo to directories
ache [Wed, 13 Jun 2012 00:12:47 +0000 (00:12 +0000)]
Forget to propogate mergeinfo to directories

git-svn-id: svn://svn.freebsd.org/base/stable/9@236978 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236578:
dim [Tue, 12 Jun 2012 21:03:24 +0000 (21:03 +0000)]
MFC r236578:

Fix build of aicasm when CC=clang.  This was due to a side-effect of the
EARLY_BUILD macro: the -Qunused-arguments flag isn't passed anymore when
building this particular program.  However, with clang 3.1 and -Werror,
such unused argument warnings are flagged as errors, causing buildkernel
to fail at this stage, due to the -nostdinc flag passed during linking.
Since the -nostdinc flag isn't actually needed, just remove it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236550, r236551:
trociny [Tue, 12 Jun 2012 20:04:23 +0000 (20:04 +0000)]
MFC r236550, r236551:

r236550:

On a child exit, call waitpid(2) to clean up the process table.

Submitted by: Andrey Zonov <andrey zonov.org>

r236551:

Document -r option in SYNOPSIS and usage statement.

Submitted by: Andrey Zonov <andrey zonov.org>

git-svn-id: svn://svn.freebsd.org/base/stable/9@236970 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235859:
kib [Tue, 12 Jun 2012 20:01:29 +0000 (20:01 +0000)]
MFC r235859:
Enable drm2 modules build.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoFix a problem where zero-length RDATA fields can cause named(8) to crash.
bz [Tue, 12 Jun 2012 12:10:10 +0000 (12:10 +0000)]
Fix a problem where zero-length RDATA fields can cause named(8) to crash.
[12:03]

Correct a privilege escalation when returning from kernel if
running FreeBSD/amd64 on non-AMD processors. [12:04]

Fix reference count errors in IPv6 code. [EN-12:02]

Security: CVE-2012-1667
Security: FreeBSD-SA-12:03.bind
Security: CVE-2012-0217
Security: FreeBSD-SA-12:04.sysret
Security: FreeBSD-EN-12:02.ipv6refcount
Approved by: so (simon, bz)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236847:
mav [Tue, 12 Jun 2012 08:08:33 +0000 (08:08 +0000)]
MFC r236847:
Partially revert r236666:
Return PROTO_ATA protocol in response to XPT_PATH_INQ.

smartmontools uses it to identify ATA devices and I don't know any other
place now where it is important. It could probably use XPT_GDEV_TYPE
instead for more accurate protocol information, but let it live for now.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236183:
kib [Mon, 11 Jun 2012 21:44:24 +0000 (21:44 +0000)]
MFC r236183:
Disable end of buffer fixup by default.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236182:
kib [Mon, 11 Jun 2012 21:43:17 +0000 (21:43 +0000)]
MFC r236182:
Fix calculation of the execution buffer end in the mapped pages
when it is spilled into the next page.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235925 (by dim):
kib [Mon, 11 Jun 2012 21:41:45 +0000 (21:41 +0000)]
MFC r235925 (by dim):
Fix a clang warning in drm2.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236931 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235847:
kib [Mon, 11 Jun 2012 21:40:02 +0000 (21:40 +0000)]
MFC r235847:
The drm2 modules makefiles commit.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235846:
kib [Mon, 11 Jun 2012 21:38:36 +0000 (21:38 +0000)]
MFC r235846:
Add 'drmn' device as another drm child, to allow drm2 drivers to live
in parallel with drm1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236928 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235783:
kib [Mon, 11 Jun 2012 21:35:27 +0000 (21:35 +0000)]
MFC r235783:
Add the code for new Intel GPU driver, which supports GEM, KMS and
works with new generations of GPUs (IronLake, SandyBridge and
supposedly IvyBridge).

The driver is not connected to the build yet.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236927 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235782:
kib [Mon, 11 Jun 2012 21:33:02 +0000 (21:33 +0000)]
MFC r235782:
A rewrite of the i810 bits of the agp(4) driver.  New driver supports
operations required by GEMified i915.ko. It also attaches to SandyBridge
and IvyBridge CPU northbridges now.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236926 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235375:
kib [Mon, 11 Jun 2012 21:25:20 +0000 (21:25 +0000)]
MFC r235375:
Add new pager type, OBJT_MGTDEVICE. It provides the device pager
which carries fictitous managed pges. In particular, the consumers of
the new object type can remove all mappings of the device page with
pmap_remove_all().

The range of physical addresses used for fake page allocation shall be
registered with vm_phys_fictitious_reg_range() interface to allow the
PHYS_TO_VM_PAGE() to work in pmap.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236925 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235372:
kib [Mon, 11 Jun 2012 21:19:59 +0000 (21:19 +0000)]
MFC r235372:
Add a facility to register a range of physical addresses to be used
for allocation of fictitious pages, for which PHYS_TO_VM_PAGE()
returns proper fictitious vm_page_t. The range should be de-registered
after consumer stopped using it.

De-inline the PHYS_TO_VM_PAGE() since it now carries code to iterate
over registered ranges.

MFC r235776 (by andrew):
In PHYS_TO_VM_PAGE() when VM_PHYSSEG_DENSE is set the check if we are past
the end of vm_page_array was incorrect causing it to return NULL. This
value is then used in vm_phys_add_page causing a data abort.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235366:
kib [Mon, 11 Jun 2012 21:12:52 +0000 (21:12 +0000)]
MFC r235366:
Split the code from vm_page_getfake() to initialize the fake page struct
vm_page into new interface vm_page_initfake(). Handle the case of fake
page re-initialization with changed memattr.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236923 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235365:
kib [Mon, 11 Jun 2012 21:08:52 +0000 (21:08 +0000)]
MFC r235365:
Assert that the page passed to vm_page_putfake() is unmanaged.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235362:
kib [Mon, 11 Jun 2012 21:06:10 +0000 (21:06 +0000)]
MFC r235362:
Assert that fictitious or unmanaged pages do not appear on
active/inactive lists.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235356:
kib [Mon, 11 Jun 2012 20:58:23 +0000 (20:58 +0000)]
MFC r235356:
Make the vm_page_array_size long. Remove redundand zero initialization
for vm_page_array_size and nearby variables.

MFC r235359:
Commit the change forgotten in r235356.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236920 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236738:
mjg [Mon, 11 Jun 2012 17:54:40 +0000 (17:54 +0000)]
MFC r236738:
Plug socket refcount leak on error in sys_sctp_peeloff.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236900 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r233771:
hselasky [Mon, 11 Jun 2012 17:27:53 +0000 (17:27 +0000)]
MFC r233771:
Add definitions and structures for USB 2.0 Link Power Management, LPM.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236898 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236439:
hselasky [Mon, 11 Jun 2012 17:23:24 +0000 (17:23 +0000)]
MFC r236439:
Add appropriate checks for ic_bsschan being set to IEEE80211_CHAN_ANYC in
some of the USB WLAN drivers. This fixes a panic when using monitor mode.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236897 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236407:
hselasky [Mon, 11 Jun 2012 17:18:31 +0000 (17:18 +0000)]
MFC r236407:
Improve support for detaching kernel drivers on a per interface basis.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235381
rmacklem [Mon, 11 Jun 2012 12:34:14 +0000 (12:34 +0000)]
MFC: r235381
Fix two cases in the new NFS server where a tsleep() is
used, when the code should actually protect the tested
variable with a mutex. Since the tsleep()s had a 10sec
timeout, the race would have only delayed the allocation
of a new clientid for a client. The sleeps will also
rarely occur, since having a callback in progress when
a client acquires a new clientid, is unlikely.
in practice, since having a callback in progress when
a fresh clientid is being acquired by a client is unlikely.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236887 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 236582,236618 - remove unused serrno variable
ache [Mon, 11 Jun 2012 11:59:29 +0000 (11:59 +0000)]
MFC 236582,236618 - remove unused serrno variable

git-svn-id: svn://svn.freebsd.org/base/stable/9@236885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236572:
delphij [Mon, 11 Jun 2012 07:11:34 +0000 (07:11 +0000)]
MFC r236572:

Replace the use of wall clock time with monotonically increasing
clock.  In general, gettimeofday() is not appropriate interface
when accounting for elasped time because it can go backward, in
which case the policy code could errornously consider the limit
as exceeded.

Reported by: Mahesh Arumugam
Submitted by: Dorr H. Clark via gnn
Sponsored by: Citrix / NetScaler

git-svn-id: svn://svn.freebsd.org/base/stable/9@236875 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236649,236670:
kevlo [Mon, 11 Jun 2012 01:44:17 +0000 (01:44 +0000)]
MFC r236649,236670:

Check the return value of pci_find_cap()

git-svn-id: svn://svn.freebsd.org/base/stable/9@236865 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236700:
kevlo [Mon, 11 Jun 2012 01:38:34 +0000 (01:38 +0000)]
MFC r236700:

Fix a logic error when use PCIY_PMG capability

Reviewed by: yongari

git-svn-id: svn://svn.freebsd.org/base/stable/9@236864 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236716:
wblock [Sun, 10 Jun 2012 19:44:08 +0000 (19:44 +0000)]
MFC r236716:

Add specific supported revision of ASUS USB-N13 ver. A1.
http://lists.freebsd.org/pipermail/freebsd-doc/2012-June/019960.html

Submitted by: PseudoCylon (AK)
Approved by: gjb (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236528:
dim [Sun, 10 Jun 2012 13:28:14 +0000 (13:28 +0000)]
MFC r236528:

During buildworld and buildkernel, define EARLY_BUILD in the earlier
stages (build-tools, cross-tools, etc) of the build, so we can detect in
bsd.*.mk whether to pass compiler-specific flags to ${CC}.

In particular, this commit will allow using WITH_CLANG_IS_CC when the
base compiler is still gcc, and when ${CC}, ${CXX} and ${CPP} are left
at their defaults.  The early stages will then be built using gcc, and
no clang-specific flags will be passed to it.  The later stages will be
built as usual.

The EARLY_BUILD define can also serve other uses, such as building the
world stage C++ executables with libc++ instead of libstdc++: during the
early build stages, we cannot assume libc++ is already available, so we
must still build with libstdc++ at that time.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236155:
mm [Sun, 10 Jun 2012 07:40:26 +0000 (07:40 +0000)]
MFC r236155:
Import illumos changeset 13570:3411fd5f1589
1948 zpool list should show more detailed pool information

Display per-vdev information with "zpool list -v".
The added expandsize property has currently no value on FreeBSD.
This changeset allows adding expansion support to individual vdevs
in the future.

References:
https://www.illumos.org/issues/1948

Obtained from: illumos (issue #1948)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236839 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236143, r236705:
mm [Sun, 10 Jun 2012 07:23:45 +0000 (07:23 +0000)]
MFC r236143, r236705:

MFC r236143 [1]:
Import illumos changeset 13571:a5771a96228c
1950 ztest backwards compatibility testing option

MFC r236705 [2]:
Import Illumos revision 13715:351036203e4b
2803 zfs get guid pretty-prints the output

References:
https://www.illumos.org/issues/1950 [1]
https://www.illumos.org/issues/2803 [2]

Obtained from: illumos (issue #1950 [1], #2803 [2])

git-svn-id: svn://svn.freebsd.org/base/stable/9@236837 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236615:
bz [Sat, 9 Jun 2012 22:44:24 +0000 (22:44 +0000)]
MFC r236615:

 Plug two interface address refcount leaks in early error return cases
 in the ioctl path.

 Reported by: rpaulo
 Reviewed by: emax

git-svn-id: svn://svn.freebsd.org/base/stable/9@236826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236695:
dim [Sat, 9 Jun 2012 10:06:49 +0000 (10:06 +0000)]
MFC r236695:

Fix two warnings about self-assignment in libc.  These normally only
trigger with clang, when you either use -save-temps, or ccache.

Reported by: Sevan / Venture37 <venture37@gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@236807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236690:
kib [Sat, 9 Jun 2012 08:25:39 +0000 (08:25 +0000)]
MFC r236690:
Do not execute a needed statement with side-effect in assert().

git-svn-id: svn://svn.freebsd.org/base/stable/9@236798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236686:
kib [Sat, 9 Jun 2012 08:23:55 +0000 (08:23 +0000)]
MFC r236686:
Add gettimeofday() test.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236465:
kib [Sat, 9 Jun 2012 08:13:57 +0000 (08:13 +0000)]
MFC r236465:
Update the print mask for decoding b_flags. Add print masks for
b_vflags and b_xflags_t and print them as well.

MFC r236487:
Fix typo. Use commas to separate flag printouts, in style with
other parts of function.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236796 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236044:
kib [Sat, 9 Jun 2012 08:09:16 +0000 (08:09 +0000)]
MFC r236044:
Implement SEEK_HOLE/SEEK_DATA for UFS.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236795 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236691:
mav [Sat, 9 Jun 2012 08:06:49 +0000 (08:06 +0000)]
MFC r236691:
Remove declaration of scsi_interpret_sense(), removed 11 years ago.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236793 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236043:
kib [Sat, 9 Jun 2012 08:04:08 +0000 (08:04 +0000)]
MFC r236043:
Add a vn_bmap_seekhole(9) vnode helper which can be used by any
filesystem which supports VOP_BMAP(9) to implement SEEK_HOLE/SEEK_DATA
commands for lseek(2).

git-svn-id: svn://svn.freebsd.org/base/stable/9@236792 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agor236666:
mav [Sat, 9 Jun 2012 07:53:57 +0000 (07:53 +0000)]
r236666:
ATA/SATA controllers have no idea about protocol of the connected device
until transport will do some probe actions (at least soft reset).
Make ATA/SATA SIMs to not report bogus and confusing PROTO_ATA protocol.
Make ATA/SATA transport to fill that gap by reporting protocol to SIM with
XPT_SET_TRAN_SETTINGS and patching XPT_GET_TRAN_SETTINGS results if needed.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236552:
mav [Sat, 9 Jun 2012 07:48:08 +0000 (07:48 +0000)]
MFC r236552:
Remove some dead code that I doubt will ever be implemented.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236437:
mav [Sat, 9 Jun 2012 07:43:11 +0000 (07:43 +0000)]
MFC r236437:
Rewrite enabling NCQ for SATA devices in a way more alike to SCSI TCQ.
This allows to control it with `camcontrol negotiate adaX -T (en|dis)able`
on the fly, same as for SCSI devices.

Sponsored by:   iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236786 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoNFC r236393:
mav [Sat, 9 Jun 2012 07:31:04 +0000 (07:31 +0000)]
NFC r236393:
Use AC_GETDEV_CHANGED async to notify ada driver about DMA and NCQ status
change. Now that allows switching between PIO and DMA modes on the fly.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236234:
mav [Sat, 9 Jun 2012 07:28:11 +0000 (07:28 +0000)]
MFC r236234:
Allow to change number of openings (used tags) for ATA/SATA devices
via `camcontrol tags ... -N ...`.  There is no need to tune it in
usual cases, but some users want to have it for debugging purposes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236782 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236228:
mav [Sat, 9 Jun 2012 07:18:13 +0000 (07:18 +0000)]
MFC r236228:
Plug request and references leak caused by race between invalidated
ond probe periph destruction and new incoming probe request.

This at least caused problems with SATA Port Multipliers hot-plug.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236779 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235897:
mav [Sat, 9 Jun 2012 06:43:26 +0000 (06:43 +0000)]
MFC r235897:
 - Add low-level support for SATA Enclosure Management Bridge (SEMB)
devices -- SATA equivalents of the SCSI SES/SAF-TE devices.
 - Add some utility functions for SCSI SAF-TE devices access.

Sponsored by:   iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236778 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236122,r236595:
wblock [Sat, 9 Jun 2012 01:41:41 +0000 (01:41 +0000)]
MFC r236122,r236595:

Wording corrections and simplifications.

Approved by: gjb (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236773 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235982:
mav [Fri, 8 Jun 2012 20:30:37 +0000 (20:30 +0000)]
MFC r235982:
Add tunable/sysctl kern.cam.pmp.hide_special, controlling whether special
PMP ports such as PMP configuration or SEMB should be exposed or hidden.
These ports were always hidden before as useless and sometimes promatic.
But with updated ses driver supporting SEMB it is no longer so straight.
Keep ports hidden by default to avoid probe request ttimeouts if SEP is
not connected to PMP's SEMB via I2C, that is very often situation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236765 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r231544
fjoe [Fri, 8 Jun 2012 10:03:37 +0000 (10:03 +0000)]
MFC: r231544

Include target names in diagnostic output.

Submitted by: Garrett Cooper

git-svn-id: svn://svn.freebsd.org/base/stable/9@236742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236619:
mav [Fri, 8 Jun 2012 05:53:25 +0000 (05:53 +0000)]
MFC r236619:
Add missing newlines into XML output.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236412,236418,236420,236591,236624
sbruno [Thu, 7 Jun 2012 19:12:49 +0000 (19:12 +0000)]
MFC r236412,236418,236420,236591,236624

Doc updates for bce(4) tuneables

Note that for 7/8/9 the strict_rx_mtu variable is named
loose_rx_mtu.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236722 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoUpdate mergeinfo from r236323 that was missed in the code MFC commit
sbruno [Thu, 7 Jun 2012 18:58:59 +0000 (18:58 +0000)]
Update mergeinfo from r236323 that was missed in the code MFC commit
at r236323

doh!

git-svn-id: svn://svn.freebsd.org/base/stable/9@236721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236323
sbruno [Thu, 7 Jun 2012 18:44:06 +0000 (18:44 +0000)]
MFC r236323

Cosmetic nit.  If a configured volume has no label, don't emit an empty
string for the name during probe.  Simply indicate that it has no label.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236719 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236571:
dim [Thu, 7 Jun 2012 06:41:09 +0000 (06:41 +0000)]
MFC r236571:

Make aicasm compile without warnings if -Wpointer-sign is enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236371:
yongari [Thu, 7 Jun 2012 05:35:43 +0000 (05:35 +0000)]
MFC r236371:
  Remove unnecessary device_printfs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236702 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 233760:
jhb [Wed, 6 Jun 2012 21:49:31 +0000 (21:49 +0000)]
MFC 233760:
Export some more useful info about shared memory objects to userland
via procstat(1) and fstat(1):
- Change shm file descriptors to track the pathname they are associated
  with and add a shm_path() method to copy the path out to a caller-supplied
  buffer.
- Use the fo_stat() method of shared memory objects and shm_path() to
  export the path, mode, and size of a shared memory object via
  struct kinfo_file.
- Add a struct shmstat to the libprocstat(3) interface along with a
  procstat_get_shm_info() to export the mode and size of a shared memory
  object.
- Change procstat to always print out the path for a given object if it
  is valid.
- Teach fstat about shared memory objects and to display their path,
  mode, and size.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r232272, r232273
oleg [Wed, 6 Jun 2012 18:00:19 +0000 (18:00 +0000)]
MFC: r232272, r232273

- lookup_dyn_rule_locked(): style(9) cleanup
- Refresh dynamic tcp rule only if both sides answered keepalive packets.
- Remove some useless assignments.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236692 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 228509,228620,228533:
jhb [Wed, 6 Jun 2012 16:00:31 +0000 (16:00 +0000)]
MFC 228509,228620,228533:
Add a helper API to allow in-kernel code to map portions of shared memory
objects created by shm_open(2) into the kernel's address space.  This
provides a convenient way for creating shared memory buffers between
userland and the kernel without requiring custom character devices.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236683 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r230053:
mav [Wed, 6 Jun 2012 12:16:54 +0000 (12:16 +0000)]
MFC r230053:
Add BIO_DELETE support for SCSI Direct Access devices (da).

Depending on device capabilities use different methods to implement it.
Currently used method can be read/set via kern.cam.da.X.delete_method
sysctls. Possible values are:
 NONE - no provisioning support reported by the device;
 DISABLE - provisioning support was disabled because of errors;
 ZERO - use WRITE SAME (10) command to write zeroes;
 WS10 - use WRITE SAME (10) command with UNMAP bit set;
 WS16 - use WRITE SAME (16) command with UNMAP bit set;
 UNMAP - use UNMAP command (equivalent of the ATA DSM TRIM command).
The last two methods (UNMAP and WS16) are defined by SBC specification and
the UNMAP method is the most advanced one. The rest of methods I've found
supported in Linux, and as soon as they were trivial to implement, then
why not? Hope they will be useful in some cases.

Unluckily I have no devices properly reporting parameters of the logical
block provisioning support via respective VPD pages (0xB0 and 0xB2). So
all info I have/use now is the flag telling whether logical block
provisioning is supported or not. As result, specific methods chosen now
by trying different ones in order (UNMAP, WS16, DISABLE) and checking
completion status to fallback if needed. I don't expect problems from this,
as if something go wrong, it should just disable itself. It may disable
even too aggressively if only some command parameter misfit.

Unlike Linux, which executes each delete with separate request, I've
implemented here the same request aggregation as implemented in ada driver.
Tests on SSDs I have show much better results doing it this way: above
8GB/s of the linear delete on Intel SATA SSD on LSI SAS HBA (mps).

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236677 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236289:
eadler [Wed, 6 Jun 2012 06:38:56 +0000 (06:38 +0000)]
MFC r236289:
Relax security permissions on '.seq' file creation - the strict,
but odd permissions resulted in a security alert from 110.neggrpperm

PR: bin/165533
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236285:
eadler [Wed, 6 Jun 2012 06:35:09 +0000 (06:35 +0000)]
MFC r236285:
Add missing flag enable when certain arguments are parsed

PR: bin/163053
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236377:
eadler [Wed, 6 Jun 2012 06:32:50 +0000 (06:32 +0000)]
MFC r236377:
Fix bug revealed by warning generated by clang:
warning: equality comparison with extraneous parentheses
       [-Wparentheses-equality]

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236379:
eadler [Wed, 6 Jun 2012 04:38:25 +0000 (04:38 +0000)]
MFC r236379:
   Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.

PR: kern/166239
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236283:
eadler [Wed, 6 Jun 2012 04:26:03 +0000 (04:26 +0000)]
MFC r236283:
 Add support for newer garmin devices

PR: kern/163932
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236282:
eadler [Wed, 6 Jun 2012 04:17:40 +0000 (04:17 +0000)]
MFC r236282:
Add support for Sun 1040 PCI Quad Serial

PR: kern/163450
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236650 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236309:
kib [Wed, 6 Jun 2012 01:01:12 +0000 (01:01 +0000)]
MFC r236309:
Assert that TDP_NOFAULTING and TDP_NOSPEEPING thread flags do not leak
when thread returns from a syscall to usermode.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r236491
marius [Tue, 5 Jun 2012 20:53:46 +0000 (20:53 +0000)]
MFC: r236491

Add missing prototypes. While at it, sort them alphabetically.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r236488
marius [Tue, 5 Jun 2012 20:49:18 +0000 (20:49 +0000)]
MFC: r236488

Take advantage of nitems().

git-svn-id: svn://svn.freebsd.org/base/stable/9@236641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235781:
trasz [Tue, 5 Jun 2012 20:27:41 +0000 (20:27 +0000)]
MFC r235781:

Fix enforcement of file size limit with O_APPEND on ZFS.

vn_rlimit_fsize takes uio->uio_offset and uio->uio_resid into account
when determining whether given write would exceed RLIMIT_FSIZE.

When APPEND flag is specified, ZFS updates uio->uio_offset to point to the
end of file.

But this happens after a call to vn_rlimit_fsize, so vn_rlimit_fsize check
can be rendered ineffective by thread that opens some file with O_APPEND
and lseeks below RLIMIT_FSIZE before calling write.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236636 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r236486
marius [Tue, 5 Jun 2012 19:58:58 +0000 (19:58 +0000)]
MFC: r236486

Add nitems(), a macro for determining the number of elements in a
statically-allocated array.

Obtained from: OpenBSD (in principle)

MFC: r236489

git-svn-id: svn://svn.freebsd.org/base/stable/9@236631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236237:
trasz [Tue, 5 Jun 2012 13:57:02 +0000 (13:57 +0000)]
MFC r236237:

Fix lock interaction table for rmlocks - by default they cannot sleep,
just like rwlocks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r236148. This allows C++ code to include <cmath> after explicitly including...
theraven [Tue, 5 Jun 2012 11:42:34 +0000 (11:42 +0000)]
Merge r236148.  This allows C++ code to include <cmath> after explicitly including math.h.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236575 (by emax):
bz [Tue, 5 Jun 2012 11:28:57 +0000 (11:28 +0000)]
MFC r236575 (by emax):

 Plug more refcount leaks and possible NULL deref for interface
 address list.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236501 (by emax):
bz [Tue, 5 Jun 2012 11:26:43 +0000 (11:26 +0000)]
MFC r236501 (by emax):

  Plug reference leak.

  Interface addresses are refcounted as packets move through the stack,
  and there's garbage collection tied to it so that address changes can
  safely propagate while traffic is flowing. In our setup, we weren't
  changing or deleting any addresses, but the refcounting logic in
  ip6_input() was wrong and caused a reference leak on every inbound
  V6 packet. This eventually caused a 32bit overflow, and the resulting
  0 value caused the garbage collection to run on the active address.
  That then snowballed into the panic.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236327 (by emax):
bz [Tue, 5 Jun 2012 11:23:56 +0000 (11:23 +0000)]
MFC r236327 (by emax):

  When we return deprecated addresses, we need to reference them.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236444:
dim [Tue, 5 Jun 2012 06:43:45 +0000 (06:43 +0000)]
MFC r236444:

Install libcxxrt's C++ ABI and unwind headers.  This is done in libc++'s
Makefile, so these headers go into the same destination directory as
libc++'s own headers, currently /usr/include/c++/v1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236442:
dim [Tue, 5 Jun 2012 06:41:47 +0000 (06:41 +0000)]
MFC r236442:

Tabify libcxxrt and libc++'s Makefiles.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoUpgrade to 9.8.3-P1, the latest from ISC. This version contains
dougb [Mon, 4 Jun 2012 22:14:33 +0000 (22:14 +0000)]
Upgrade to 9.8.3-P1, the latest from ISC. This version contains
a critical bugfix:

    Processing of DNS resource records where the rdata field is zero length
    may cause various issues for the servers handling them.

    Processing of these records may lead to unexpected outcomes. Recursive
    servers may crash or disclose some portion of memory to the client.
    Secondary servers may crash on restart after transferring a zone
    containing these records. Master servers may corrupt zone data if the
    zone option "auto-dnssec" is set to "maintain". Other unexpected
    problems that are not listed here may also be encountered.

All BIND users are strongly encouraged to upgrade.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r235848 from head to stable/9:
issyl0 [Mon, 4 Jun 2012 14:11:49 +0000 (14:11 +0000)]
Merge r235848 from head to stable/9:
  Add two new locale-specific man pages:
  - libc/stdio/scanf_l.3
  - libc/stdio/printf_l.3

Approved by: gabor (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234066:
mav [Mon, 4 Jun 2012 07:16:12 +0000 (07:16 +0000)]
MFC r234066:
Microoptimize cpu_search().

According to profiling, it makes one take 6% of CPU time on hackbench
with its million of context switches per second, instead of 8% before.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232740:
mav [Mon, 4 Jun 2012 07:12:36 +0000 (07:12 +0000)]
MFC r232740:
Make kern.sched.idlespinthresh default value adaptive depending of HZ.
Otherwise with HZ above 8000 CPU may never skip timer ticks on idle.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236184:
mav [Mon, 4 Jun 2012 07:07:46 +0000 (07:07 +0000)]
MFC r236184:
Make legacy ATA to not call device_add_child() with unit number but
without driver name.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235333:
mav [Mon, 4 Jun 2012 07:03:56 +0000 (07:03 +0000)]
MFC r235333:
Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
to allow drivers to handle request completion directly without passing
them to the CAM SWI thread removing extra context switch.
Modify all ATA/SATA drivers to use them.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236541 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236388:
dim [Mon, 4 Jun 2012 06:45:49 +0000 (06:45 +0000)]
MFC r236388:

Make devd build with libc++.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236540 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236387:
dim [Mon, 4 Jun 2012 06:43:01 +0000 (06:43 +0000)]
MFC r236387:

Fix dangling else in libc++'s __bit_reference header.  This has also
been sent upstream.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236386:
dim [Mon, 4 Jun 2012 06:39:10 +0000 (06:39 +0000)]
MFC r236386:

Pull in r155978 from upstream llvm trunk:

  Fix unintentional use of operator bool.

This enables llvm's bugpoint tool to build with libc++.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236538 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: 234851, 235059
bapt [Sun, 3 Jun 2012 18:16:17 +0000 (18:16 +0000)]
MFC: 234851, 235059

Add two special directives to libmap.conf:
include <file>:
  Parse the contents of file before continuing with the current file.
includedir <dir>:
  Parse the contents of every file in dir that ends in .conf before continuing
  with the current file.
Any file or directory encountered while processing include or includedir
directives will be parsed exactly once, even if it is encountered multiple
times.

Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236523 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoOpenSSH: allow VersionAddendum to be used again
rea [Sun, 3 Jun 2012 18:00:38 +0000 (18:00 +0000)]
OpenSSH: allow VersionAddendum to be used again

Prior to this, setting VersionAddendum will be a no-op: one will
always have BASE_VERSION + " " + VERSION_HPN for VersionAddendum
set in the config and a bare BASE_VERSION + VERSION_HPN when there
is no VersionAddendum is set.

HPN patch requires both parties to have the "hpn" inside their
advertized versions, so we add VERSION_HPN to the VERSION_BASE
if HPN is enabled and omitting it if HPN is disabled.

VersionAddendum now uses the following logics:
 * unset (default value): append " " and VERSION_ADDENDUM;
 * VersionAddendum is set and isn't empty: append " "
   and VersionAddendum;
 * VersionAddendum is set and empty: don't append anything.

Approved by: des
Reviewed by: bz

git-svn-id: svn://svn.freebsd.org/base/stable/9@236520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: let netmap build as a module (but do not connect to the main build yet)
luigi [Sun, 3 Jun 2012 17:51:53 +0000 (17:51 +0000)]
MFC: let netmap build as a module (but do not connect to the main build yet)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r233666
marius [Sun, 3 Jun 2012 17:48:04 +0000 (17:48 +0000)]
MFC: r233666

Fix build after changes to trap headers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r233635
marius [Sun, 3 Jun 2012 11:54:26 +0000 (11:54 +0000)]
MFC: r233635

Allow multiple inclusion of trap.h. This has always been broken, but
until recently never caused problems.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236145, r236146:
mm [Sun, 3 Jun 2012 09:37:27 +0000 (09:37 +0000)]
MFC r236145, r236146:

MFC r236145 [1]:
Import illumos changeset 13564:cf89c0c60496
1946 incorrect formatting when listing output of multiple pools with
zpool iostat -v

MFC r236146 [2]:
Import illumos changeset 13605:b5c2b5db80d6 (partial)
763 FMD msg URLs should refer to something visible
Replace sun.com URL's with illumos.org

References:
https://www.illumos.org/issues/1946 [1]
https://www.illumos.org/issues/763 [2]

Obtained from: illumos (issue #1946 [1], #763 [2])

git-svn-id: svn://svn.freebsd.org/base/stable/9@236505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f