]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoDefine SHT_GNU_LIBLIST and R_MIPS_64
emaste [Tue, 3 Feb 2015 15:35:58 +0000 (15:35 +0000)]
Define SHT_GNU_LIBLIST and R_MIPS_64

MFC of r260793

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

9 years agoDefine SHT_GNU_LIBLIST and R_MIPS_64
emaste [Tue, 3 Feb 2015 15:31:06 +0000 (15:31 +0000)]
Define SHT_GNU_LIBLIST and R_MIPS_64

MFC of r260793

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

9 years agoMFV r277814, r277868, r277869:
pfg [Tue, 3 Feb 2015 14:36:48 +0000 (14:36 +0000)]
MFV r277814, r277868, r277869:
amd: Add extra check for NULL before deref.

MFV r277841:
Fix a clang 3.6.0 warning (from dim)

CID: 274421
Obtained from: NetBSD
MFC after: 4 days

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

9 years agoMFC r277794:
kib [Tue, 3 Feb 2015 11:54:33 +0000 (11:54 +0000)]
MFC r277794:
The sys_quotactl() contract demands that the mount point is
vfs_unbusy()ed when the cmd is Q_QUOTAON, regardless of other input
parameters or error return.

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

9 years agoMFC r277793:
kib [Tue, 3 Feb 2015 11:45:01 +0000 (11:45 +0000)]
MFC r277793:
Rewrite pmap_enter(9) man page.

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

9 years agoMFC r277419:
mav [Tue, 3 Feb 2015 08:06:13 +0000 (08:06 +0000)]
MFC r277419:
Allow skipping dmu_buf_will_dirty() call in dsl_dir_transfer_space().

dsl_dir_transfer_space() is mostly called after dsl_dir_diduse_space(),
which already calls dmu_buf_will_dirty() for the same dbuf and tx, so
its duplicate call in those cases will change nothing, only spend time.

Skipping this call by four times reduces time spent in dbuf_write_done()
and descendants, updating dataset statistics with several congested lock
acquisitions.  When rewriting 8K zvol blocks at 1GB/s rate, this reduces
CPU time spent inside dbuf_write_done(), according to profiling, from 45%
of 683K samples to 18% of 422K.

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

9 years agoMFC r277952:
dim [Tue, 3 Feb 2015 08:03:19 +0000 (08:03 +0000)]
MFC r277952:

Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST.  No
functional change.

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

9 years agoMFC r277951:
dim [Tue, 3 Feb 2015 07:59:33 +0000 (07:59 +0000)]
MFC r277951:

Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
__DECONST.  No functional change.

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

9 years agoMFC r277792:
nwhitehorn [Tue, 3 Feb 2015 00:29:58 +0000 (00:29 +0000)]
MFC r277792:
Fix bug in mapppings of multiple pages exposed by updates to the VSCSI
support in QEMU. Each page of a many page mapping was getting mapped to
the same physical address, which is not the desired behavior.

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

9 years agoMFC r277806:
delphij [Mon, 2 Feb 2015 18:48:49 +0000 (18:48 +0000)]
MFC r277806:

Use unsigned int for index value.

Without this change a local attacker could trigger a panic by
tricking the kernel into accessing undefined kernel memory.

We would like to acknowledge Francisco Falcon from CORE Security
Technologies who discovered the issue and reported to the
FreeBSD Security Team.

More information can be found at CORE Security's advisory at:
http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities

This is an errata candidate for releng/10.1 and releng/9.3.  Earlier
releases are not affected.

Reported by:  Francisco Falcon from CORE Security Technologies
Security:     CVE-2014-0998
Reviewed by:  dumbbell

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

9 years agoMFC r277354, r277365:
pfg [Mon, 2 Feb 2015 15:52:11 +0000 (15:52 +0000)]
MFC r277354, r277365:
ext2: Garbage-collect some unused variables

Reported by: clang static analysis

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

9 years agoMFC r277042:
loos [Mon, 2 Feb 2015 12:48:13 +0000 (12:48 +0000)]
MFC r277042:

Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.

To cut off the power we need to start the shutdown sequence by writing
the OFF bit on PMIC.

Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE
pin when it is ready for the PMIC to cut off the power.  This is done by
triggering the ALARM2 interrupt on SoC RTC.

The RTC driver only works in power management mode which means it won't
provide any kind of time keeping functionality.  It only implements a way
to trigger the ALARM2 interrupt when requested.

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

9 years agoMFC r261459, r273045, r273047.
loos [Mon, 2 Feb 2015 12:36:05 +0000 (12:36 +0000)]
MFC r261459, r273045, r273047.

r261459:
Remove trailing tabs causing false grep positives.

r273045:
Sort the files in the am355x directory.

r273047:
Remove the need for files.beaglebone and std.beaglebone by moving the one
option they defined into files.am335x.

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

9 years agoMFC r277758: Fix several potential overflows in UNMAP code.
mav [Mon, 2 Feb 2015 12:09:42 +0000 (12:09 +0000)]
MFC r277758: Fix several potential overflows in UNMAP code.

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

9 years agoMFC r276751:
loos [Mon, 2 Feb 2015 11:42:35 +0000 (11:42 +0000)]
MFC r276751:

Remove the check that prevent carp(4) advskew to be set to '0'.

CARP devices are created with advskew set to '0' and once you set it to
any other value in the valid range (0..254) you can't set it back to zero.

The code in question is also used to prevent that zeroed values overwrite
the CARP defaults when a new CARP device is created.  Since advskew already
defaults to '0' for newly created devices and the new value is guaranteed
to be within the valid range, it is safe to overwrite it here.

PR: 194672
Reported by: cmb@pfsense.org

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

9 years agoMFC r277208:
loos [Mon, 2 Feb 2015 11:26:52 +0000 (11:26 +0000)]
MFC r277208:

Fix the PMIC node name to match the PMIC i2c address.

Remove an extra blank line.

No functional changes.

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

9 years agoMFC r277206:
loos [Mon, 2 Feb 2015 11:12:31 +0000 (11:12 +0000)]
MFC r277206:

Catch a few cases where we need to release memory resources on errors.

Place parentheses around variables in macros.

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

9 years agoMFC r277686,r277687:
ngie [Mon, 2 Feb 2015 09:56:57 +0000 (09:56 +0000)]
MFC r277686,r277687:

r277686:

  Install bsnmp rc.d script if MK_BSNMP != no

  Sponsored by: EMC / Isilon Storage Division

r277687:

  Fill in entries for MK_BSNMP == no

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277541:
ngie [Mon, 2 Feb 2015 09:24:40 +0000 (09:24 +0000)]
MFC r277541:

r277541:

  Add sample log rotation support for opensm

  Up to 7 archives of the log will be kept (just for consistency with the other
  log rotation rules)

  PR: 196788
  Reviewed by: hselasky
  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277685:
ngie [Mon, 2 Feb 2015 08:53:45 +0000 (08:53 +0000)]
MFC r277685:

r277685:

  Fill in some dtrace entries when MK_CDDL == no

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277901:
dim [Mon, 2 Feb 2015 08:05:11 +0000 (08:05 +0000)]
MFC r277901:

Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST.  No
functional change.

MFC r277903:

Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
strtoul() and strtouq(), by using __DECONST.  No functional change.

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

9 years agoMFC r277899:
dim [Mon, 2 Feb 2015 07:42:03 +0000 (07:42 +0000)]
MFC r277899:

Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using
__DECONST.  No functional change.

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

9 years agoMFC r277898:
dim [Mon, 2 Feb 2015 07:37:25 +0000 (07:37 +0000)]
MFC r277898:

Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using
__DECONST.  No functional change.

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

9 years agoMFC r277883:
dim [Mon, 2 Feb 2015 07:30:00 +0000 (07:30 +0000)]
MFC r277883:

Ensure that lint does not pick up C11 keywords (e.g.  _Noreturn), even
if C11 mode is used.  It does not support any C11 constructs.

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

9 years agoMFC r277674:
ngie [Mon, 2 Feb 2015 05:46:36 +0000 (05:46 +0000)]
MFC r277674:

r277674 (by ngie):

  Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from
  usr.bin/make

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277666:
ngie [Mon, 2 Feb 2015 05:44:34 +0000 (05:44 +0000)]
MFC r277666:

r277666 (by ngie):

  Only build share/dtrace if MK_CDDL != no

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r271892:
ngie [Mon, 2 Feb 2015 05:17:26 +0000 (05:17 +0000)]
MFC r271892:

r271892 (by ngie):

  Sort the optional rc.d scripts by their knobs

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277939:
ngie [Mon, 2 Feb 2015 04:54:43 +0000 (04:54 +0000)]
MFC r277939:

r277939 (by ngie):

  Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r262936:
gjb [Mon, 2 Feb 2015 01:02:49 +0000 (01:02 +0000)]
MFC r262936:
  Update board definition for WANDBOARD-QUAD to match crochet.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r276123:
smh [Sun, 1 Feb 2015 12:39:40 +0000 (12:39 +0000)]
MFC r276123:
Always sync the global ZFS config cache to reflect the new mosconfig

MFC r277351:
Clean ZFS spa config before syncing

Sponsored by: Multiplay

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

9 years agoMFC r276027:
smh [Sun, 1 Feb 2015 12:33:40 +0000 (12:33 +0000)]
MFC r276027:
Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12

MFC r277333:
Fix bsdinstall when working with geli boot disks

Sponsored by: Multiplay

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

9 years agoRevert r278017 (MFC of r273381 and r276417) and r278018 (MFC of r273434)
dim [Sun, 1 Feb 2015 02:29:58 +0000 (02:29 +0000)]
Revert r278017 (MFC of r273381 and r276417) and r278018 (MFC of r273434)
until I can figure out why it leads to link failures in some scenarios.

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

9 years agoMFC r273434 (by bapt):
dim [Sun, 1 Feb 2015 01:42:38 +0000 (01:42 +0000)]
MFC r273434 (by bapt):

Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
when used in combinaison with libcxxrt since it is now defined there already.
This fixes building world

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

9 years agoMFC r273381 (by bapt):
dim [Sat, 31 Jan 2015 23:48:59 +0000 (23:48 +0000)]
MFC r273381 (by bapt):

Add support for __cxa_throw_bad_array_new_length in libcxxrt

It is required for use with newer g++49

Differential Revision: https://reviews.freebsd.org/D982
Reviewed by: theraven
Approved by: theraven

MFC r276417:

Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.

Interesting fixes:
76584a0  Reorganize code to use only 32bit atomic ops for 32bit platforms
30d2ae5  Implement __cxa_throw_bad_array_new_length

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D1390

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

9 years agoMFC r277855:
jamie [Sat, 31 Jan 2015 17:35:53 +0000 (17:35 +0000)]
MFC r277855:

  Add allow.mount.fdescfs jail flag.

PR: 192951
Submitted by: ruben@verweg.com

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

9 years agoMFC r277827:
kib [Sat, 31 Jan 2015 11:04:41 +0000 (11:04 +0000)]
MFC r277827:
tmpfs does not use UVM on FreeBSD.

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

9 years agoMFC r277646:
kib [Sat, 31 Jan 2015 11:02:20 +0000 (11:02 +0000)]
MFC r277646:
Avoid calling vmspace_free() while owning the process lock.

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

9 years agoMFC 274398,274537:
jhb [Fri, 30 Jan 2015 18:55:05 +0000 (18:55 +0000)]
MFC 274398,274537:
Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
gzip, and split).

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

9 years agoMFC r277802, r277811:
pfg [Fri, 30 Jan 2015 14:36:02 +0000 (14:36 +0000)]
MFC r277802, r277811:

sed: Fix resource leak and dereference after NULL.

process.c:
Protect access against NULL.

main.c:
Prevent outfile overwrite resource leak.

CID: 271181
CID: 1006930

Obtained from: NetBSD

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

9 years agoMerge libedit fixes from NetBSD
emaste [Fri, 30 Jan 2015 14:22:15 +0000 (14:22 +0000)]
Merge libedit fixes from NetBSD

Add trailing NULL's to the varargs functions as required.
(John Spencer)

    readline.c r1.106

Bounds search for reallocated index, from OpenBSD via Andreas Fett

    map.c 1.34
    map.h 1.10
    parse.c 1.27
    read.c 1.71

This is a direct commit to stable/10 as these changes are included in a
broader sync with NetBSD committed by bapt@ in r276881.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D1728

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

9 years agoMFC r277247: Don't count status as sent until CTIO completes successfully.
mav [Fri, 30 Jan 2015 09:05:43 +0000 (09:05 +0000)]
MFC r277247: Don't count status as sent until CTIO completes successfully.

If we aggregated status sending with data move and got error, allow status
to be updated and resent again separately.  Without this command may stuck
without status sent at all.

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

9 years agoMFC r277529: Don't count requests with status sent as overlapping.
mav [Fri, 30 Jan 2015 09:04:20 +0000 (09:04 +0000)]
MFC r277529: Don't count requests with status sent as overlapping.

While those requests are still in target OOA queue, for initiator they are
already completed, so tags can be reused.

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

9 years agoMFC r277239:
smh [Fri, 30 Jan 2015 01:05:50 +0000 (01:05 +0000)]
MFC r277239:
Eliminate illumos whole disk special case when searching for a ZFS vdev

Sponsored by: Multiplay

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

9 years agoMFC r276446:
smh [Fri, 30 Jan 2015 01:04:17 +0000 (01:04 +0000)]
MFC r276446:
Use the correct state name for unavailable pools in zpool list

Sponsored by: Multiplay

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

9 years agoMFH (r277237): pass PAM_RHOST to RADIUS server as Calling-Station-ID
des [Thu, 29 Jan 2015 09:03:57 +0000 (09:03 +0000)]
MFH (r277237): pass PAM_RHOST to RADIUS server as Calling-Station-ID

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

9 years agoMFC r277352:
rstone [Wed, 28 Jan 2015 21:51:34 +0000 (21:51 +0000)]
MFC r277352:

  When mountd is creating sockets, it iterates over all addresses specified
  in the "hosts" array and eventually looks up the network address with
  getaddrinfo(). At one point it checks for a numeric address and if it
  sees one, it sets a hint parameter to force getaddrinfo to interpret the
  host as a numeric address. However that hint is not cleared for subsequent
  iterations of the loop and if any hosts seen after this point are host names,
  getaddrinfo will fail on the name.  The result of this bug is that you cannot
  pass a host name to the -h flag.

  Unfortunately, the first iteration will either process ::1 or 127.0.0.1,
  so the flag is set on the first iteration and all host names will fail
  to be processed.

  The same bug applies to rpc.lockd and rpc.statd, so fix them too.

  Differential Revision:        https://reviews.freebsd.org/D1507
  Reported by:  Dylan Martin
  MFC after:    1 week
  Sponsored by: Sandvine Inc.

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

9 years agoMFC r277246:
hselasky [Wed, 28 Jan 2015 20:01:21 +0000 (20:01 +0000)]
MFC r277246:
Add more USB device IDs.

PR: 196362

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

9 years agoMFC r277245:
hselasky [Wed, 28 Jan 2015 19:49:53 +0000 (19:49 +0000)]
MFC r277245:
Add more USB request definitions. The values are described in section
9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification"

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

9 years agoMFC r277417:
hselasky [Wed, 28 Jan 2015 19:41:31 +0000 (19:41 +0000)]
MFC r277417:
Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular
the value returned in the "udp_port_level" field.

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

9 years agoMFC r277340, r277349:
pfg [Wed, 28 Jan 2015 15:36:24 +0000 (15:36 +0000)]
MFC r277340, r277349:

Remove dead code.
After the ext2 variant of the "orlov allocator" was implemented,
the case for a negative or zero dirsize disappeared.

Drop the dead code and unsign dirsize given that it can't be
negative anyways.

ext2fs: fix for uninitialized pointer read.
path.ep_bp was being used uninitialized in ext4_ext_find_extent().

CID: 1062344
CID: 1008669

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

9 years agoMFC r277185:
mav [Wed, 28 Jan 2015 02:56:18 +0000 (02:56 +0000)]
MFC r277185:
Fix overflow bug from r248577, turning 30s TRIM timeout into ~4s.

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

9 years agoMFC r277169: Reimplement TRIM throttling added in r248577.
mav [Wed, 28 Jan 2015 02:55:20 +0000 (02:55 +0000)]
MFC r277169: Reimplement TRIM throttling added in r248577.

Previous throttling implementation approached problem from the wrong side.
It significantly limited useful delaying of TRIM requests and aggregation
potential, while not so much controlled TRIM burstiness under heavy load.

With this change random 4K write benchmarks (probably the worst case for
TRIM) show me IOPS increase by 20%, average latency reduction by 30%, peak
TRIM bursts reduction by 3 times and same peak TRIM map size (memory usage).

Also the new logic does not force map size down so heavily, really allowing
to keep deleted data for 32 TXG or 30 seconds under moderate load.  It was
practically impossible with old throttling logic, which pushed map down to
only 64 segments.

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

9 years agoMFC r277608, r277656, r277659:
pfg [Wed, 28 Jan 2015 02:25:48 +0000 (02:25 +0000)]
MFC r277608, r277656, r277659:

Small upstream fixes for GDB.

GDB: Fix memset thinkos.

2005-03-25  Anthony Green  <green@redhat.com>

       * remote.c (remote_store_registers): Fix memset usage.
       * std-regs.c (value_of_builtin_frame_reg): Ditto.
       (value_of_builtin_frame_fp_reg): Ditto.
       (value_of_builtin_frame_reg): Ditto.

Reported by: Dirk Engling

gdb: Add missing break statements

2004-05-21  Jim Blandy  <jimb@redhat.com>

       * dwarf2expr.c (execute_stack_op): Add 'break' statements after
       cases for DW_OP_div and DW_OP_shr.  (Thanks to Reva Cuthbertson.)

GDB: Replace use of sprintf.

2005-03-17  Mark Kettenis  <kettenis@gnu.org>

      * corelow.c (get_core_register_section): Replace usage of sprintf
      and strcpy with xstrprintf and xstrdup.

CID: 604160, 604161, 604162, 604163
CID: 1006819 1008254

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

9 years agoMFC r277647: Fix wrong LUN reference in XCOPY block-to-block operation.
mav [Tue, 27 Jan 2015 19:41:24 +0000 (19:41 +0000)]
MFC r277647: Fix wrong LUN reference in XCOPY block-to-block operation.

This could cause data corruption due to accessing wrong LUN in case of
retries on write errors.  Failed writes were retried to read LUN.

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

9 years agoFix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability
delphij [Tue, 27 Jan 2015 19:36:08 +0000 (19:36 +0000)]
Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability
and SCTP stream reset vulnerability.

Security: FreeBSD-SA-15:02.kmem
Security: CVE-2014-8612
Security: FreeBSD-SA-15:03.sctp
Security: CVE-2014-8613

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

9 years agoBump __FreeBSD_version after r277789: Changes to the UDP tunneling callback
bryanv [Tue, 27 Jan 2015 06:24:33 +0000 (06:24 +0000)]
Bump __FreeBSD_version after r277789: Changes to the UDP tunneling callback

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

9 years agoMFC r272886:
bryanv [Tue, 27 Jan 2015 06:19:30 +0000 (06:19 +0000)]
MFC r272886:

  Add context pointer and source address to the UDP tunnel callback

  These are needed for the forthcoming vxlan implementation. The context
  pointer means we do not have to use a spare pointer field in the inpcb,
  and the source address is required to populate vxlan's forwarding table.

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

9 years agoMFC: r277594
jkim [Mon, 26 Jan 2015 19:27:30 +0000 (19:27 +0000)]
MFC: r277594

Simplify retry loops.

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

9 years agoMFC: r277579
jkim [Mon, 26 Jan 2015 19:25:35 +0000 (19:25 +0000)]
MFC: r277579

Revert r216942.  This commit was premature and caused too many complaints.

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

9 years agoMFC r277385: Remove extra mtx_unlock().
mav [Mon, 26 Jan 2015 16:30:17 +0000 (16:30 +0000)]
MFC r277385: Remove extra mtx_unlock().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years agoMFC r277096: Skip extra bcopy() when scrubbing vdev without redundancy.
mav [Mon, 26 Jan 2015 16:29:07 +0000 (16:29 +0000)]
MFC r277096: Skip extra bcopy() when scrubbing vdev without redundancy.

According to profiler, this bcopy() can use about 10% of CPU time.

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

9 years agoMFC r276226:
smh [Mon, 26 Jan 2015 13:59:39 +0000 (13:59 +0000)]
MFC r276226:
Enhancements to zpool upgrade processing

Sponsored by: Multiplay

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

9 years agoMFC r274496:
trasz [Mon, 26 Jan 2015 13:39:35 +0000 (13:39 +0000)]
MFC r274496:

Fix mdoc warning by removing empty lines.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r272294 by gavin@:
trasz [Mon, 26 Jan 2015 13:37:18 +0000 (13:37 +0000)]
MFC r272294 by gavin@:

Make clear in the ipheth(4) hardware notes that this driver is for the
tethering functionality only.  Add a "bugs" section to give a pointer
to usbconfig set_config if the device isn't automatically detected.

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

9 years agoMFC r272171 by pluknet@:
trasz [Mon, 26 Jan 2015 13:35:45 +0000 (13:35 +0000)]
MFC r272171 by pluknet@:

Add smsc(4) to the list of drivers use the miibus interface.

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

9 years agoMFC r272168 by gavin@:
trasz [Mon, 26 Jan 2015 13:34:21 +0000 (13:34 +0000)]
MFC r272168 by gavin@:

Add MLINKS for if_ipheth(4) and if_smsc(4).

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

9 years agoMFC r272165 by gavin@:
trasz [Mon, 26 Jan 2015 13:32:07 +0000 (13:32 +0000)]
MFC r272165 by gavin@:

Add very basic outline man page for smsc(4).

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

9 years agoMFC r272107 by gavin@:
trasz [Mon, 26 Jan 2015 13:29:43 +0000 (13:29 +0000)]
MFC r272107 by gavin@:

Cross reference cdce(4), ipheth(4) and urndis(4) from each other.

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

9 years agoMFC r272106 by gavin@:
trasz [Mon, 26 Jan 2015 13:28:13 +0000 (13:28 +0000)]
MFC r272106 by gavin@:

Add basic man page for ipheth(4).

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

9 years agoMFC r274791:
trasz [Mon, 26 Jan 2015 13:21:30 +0000 (13:21 +0000)]
MFC r274791:

Add missing error checking for kernel_port_{add,remove}().  Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.

MFC r275399:

Fix null pointer dereference.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r275746:
trasz [Mon, 26 Jan 2015 13:17:20 +0000 (13:17 +0000)]
MFC r275746:

Fix markup.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r277358:
ngie [Mon, 26 Jan 2015 11:49:06 +0000 (11:49 +0000)]
MFC r277358:

r277358 (by ngie):

  Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/tests

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277390:
kib [Mon, 26 Jan 2015 11:37:16 +0000 (11:37 +0000)]
MFC r277390:
Ignore devfs directory entries for devices being destroyed.

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

9 years agoMerge 272659:
luigi [Mon, 26 Jan 2015 03:26:37 +0000 (03:26 +0000)]
Merge 272659:

Add netmap support to libpcap. Tcpdump and other native pcap clients
can now run directly on netmap ports using netmap:foo or valeXX:YY
as device names.

Modifications to existing code are small and trivial,
the netmap-specific code is all in a new file.

Please be aware that in netmap mode the physical interface is
disconnected from the host stack, so libpcap will steal the traffic
not just make a copy.

For the full version of the code (including linux and autotools support) see
https://code.google.com/p/netmap-libpcap/

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

9 years agoMFC r277295:
ae [Sun, 25 Jan 2015 16:35:03 +0000 (16:35 +0000)]
MFC r277295:
  Fix condition and really sort ports. Also add comment describing
  the intent of this code.

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

9 years agoMFC r276983: When aggregating TRIM segments, move the new one to the end.
mav [Sun, 25 Jan 2015 14:31:44 +0000 (14:31 +0000)]
MFC r276983: When aggregating TRIM segments, move the new one to the end.

New segment at the list head may block all TRIM requests until txg of that
segment can be processed.  On my random I/O tests this change reduce peak
TRIM list length from 650 to 450 segments.  Hopefully it should reduce TRIM
burstiness when list processing is unblocked.

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

9 years agoMFC r276952: Add LBA as secondary sort key for synchronous I/O requests.
mav [Sun, 25 Jan 2015 14:29:40 +0000 (14:29 +0000)]
MFC r276952: Add LBA as secondary sort key for synchronous I/O requests.

On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz)
precision.  It makes primary sort key (timestamp) collision very possible.
In such situations sorting by secondary key of LBA is much more reasonable
then by totally meaningless zio pointer value.

With this change on multi-threaded synchronous ZVOL read I've measured 10%
throughput increase and average latency reduction.

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

9 years agoMFC r276913: Use new optimized dmu_read_uio_dbuf() for ZVOLs in device mode.
mav [Sun, 25 Jan 2015 14:25:44 +0000 (14:25 +0000)]
MFC r276913: Use new optimized dmu_read_uio_dbuf() for ZVOLs in device mode.

This slightly reduces overhead by avoiding dnode_hold()/dnode_rele() calls.

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

9 years agoMFC r277322:
kib [Sun, 25 Jan 2015 13:15:12 +0000 (13:15 +0000)]
MFC r277322:
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process.

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

9 years agoMFC r277321:
kib [Sun, 25 Jan 2015 13:09:53 +0000 (13:09 +0000)]
MFC r277321:
Make SIGSTOP working for sleeps done while waiting for fifo readers or
writers in open(2), when the fifo is located on an NFS mount.

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

9 years agoMFC r277318:
cperciva [Sun, 25 Jan 2015 08:16:51 +0000 (08:16 +0000)]
MFC r277318:
  When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't
  accidentally enable non-existent states.

  This bug was triggered if ACPI advertises the presence of a C2 state
  which we fail to parse via acpi_PkgGas due to our lack of support for
  FFixedHW resources, and causes an immediate panic when an attempt is
  made to enter the (NULL) state.

  One affected platform is the EC2 c4.8xlarge VM instance type; there
  may be others.

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

9 years agoMFC r277527:
ngie [Sun, 25 Jan 2015 05:18:03 +0000 (05:18 +0000)]
MFC r277527:

r277527 (by ngie):

  Make this compile with WARNS=6 and clang/gcc

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277278:
ngie [Sun, 25 Jan 2015 00:28:15 +0000 (00:28 +0000)]
MFC r277278:

r277278 (by ngie):

  Fix lib/libthr/tests/detach_test

  - Eliminate race with liberal use of sleep(3) [1]
  - Fix NetBSD-specific implementation way of testing result from pthread_cancel
    by testing with `td` instead of `NULL` [2]

  PR: 196738 [1]
  PR: 191906 [2]

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r277301:
pfg [Sat, 24 Jan 2015 21:23:53 +0000 (21:23 +0000)]
MFC r277301:
ext2: cosmetical issues

Minor sorting and note when the cases are expected to fall through.

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

9 years agoMFC r277488:
kib [Sat, 24 Jan 2015 08:35:49 +0000 (08:35 +0000)]
MFC r277488:
Do not allow pthread_sigmask() to block SIGCANCEL.

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

9 years agouse the same version as in HEAD
luigi [Sat, 24 Jan 2015 06:11:13 +0000 (06:11 +0000)]
use the same version as in HEAD
(among other things, the -v flag to make is long since unsupported)

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

9 years agoMFC r276194:
smh [Sat, 24 Jan 2015 00:40:42 +0000 (00:40 +0000)]
MFC r276194:
Prevent zpool upgrade failing due to unavailable pools

Sponsored by: Multiplay

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

9 years agoMFC r276904:
delphij [Sat, 24 Jan 2015 00:27:50 +0000 (00:27 +0000)]
MFC r276904:

Improve style and fix a possible use-after-free case introduced in r268384
by reinitializing the 'freestate' pointer after freeing the memory.

Obtained from: HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb)
PR: 194525
Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>

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

9 years agoMFC r275923:
delphij [Fri, 23 Jan 2015 22:46:07 +0000 (22:46 +0000)]
MFC r275923:

Add missing continue: we can't proceed further if the
kernel does not panic with zfs_panic_recover.

Illumos issue:
    5438 zfs_blkptr_verify should continue after zfs_panic_recover

Reported by: Coverity
CID: 1232014

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

9 years agoNote OpenSSL MFC.
delphij [Fri, 23 Jan 2015 19:19:34 +0000 (19:19 +0000)]
Note OpenSSL MFC.

This is a direct commit to stable/10.

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

9 years agoMFC: r277274
jkim [Fri, 23 Jan 2015 19:17:04 +0000 (19:17 +0000)]
MFC: r277274

Update buildinf.h to make SSLeay_version(3) little bit more useful.

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

9 years agoMFC: r277270
jkim [Fri, 23 Jan 2015 19:14:36 +0000 (19:14 +0000)]
MFC: r277270

Merge OpenSSL 1.0.1l.

Relnotes: yes

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

9 years agoMFC r276891:
delphij [Fri, 23 Jan 2015 18:56:31 +0000 (18:56 +0000)]
MFC r276891:

var/named/etc/namedb/working should be removed as part of namedb.

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

9 years agoMFC r276795:
delphij [Fri, 23 Jan 2015 18:55:24 +0000 (18:55 +0000)]
MFC r276795:

Fix sos@'s name.

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

9 years agoMFC r276577: MFV r276568:
delphij [Fri, 23 Jan 2015 18:48:59 +0000 (18:48 +0000)]
MFC r276577: MFV r276568:

Update file to 5.22.

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

9 years agoMFC r276495: Fix markup for minthreads and maxthreads.
delphij [Fri, 23 Jan 2015 18:45:22 +0000 (18:45 +0000)]
MFC r276495: Fix markup for minthreads and maxthreads.

PR: 196403

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

9 years agoMFC r275918:
delphij [Fri, 23 Jan 2015 18:42:05 +0000 (18:42 +0000)]
MFC r275918:

Sync with NetBSD, mainly address NetBSD bug #43355:

Fix valid_format() to be more careful about allowing only valid
printf formats.

Obtained from:        NetBSD

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

9 years agoMFC r275552: MFV r260710 + 275532:
delphij [Fri, 23 Jan 2015 18:40:47 +0000 (18:40 +0000)]
MFC r275552:  MFV r260710 + 275532:

Add a new method, nvlist_print_json to allow libnvpair to emit JSON.

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

9 years agoMFC r275922: MFV r275914:
delphij [Fri, 23 Jan 2015 18:39:26 +0000 (18:39 +0000)]
MFC r275922: MFV r275914:

As of r270383, the dbuf_compare comparator compares the dbuf
attributes in the following order:

      db_level (indirect level)
      db_blkid (block number)
      db_state (current state)
      the address of the element

Because db_state is being considered before the element's state,
changing of db_state would affect balancedness of the AVL tree,
even when the address of element compares differently.  For
instance, in dbuf_create, db_state may be altered after the
node is inserted into the AVL tree and may break AVL tree
balancedness.

Instead of using db_state as a comparision critera (introduced
in r270383), consider it only when we are doing a lookup, that
is one of the two dbuf pointers contains DB_SEARCH.

Illumos issue:
    5422 preserve AVL invariants in dn_dbufs

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

9 years agoMFC r275812: MFV r275784:
delphij [Fri, 23 Jan 2015 18:36:21 +0000 (18:36 +0000)]
MFC r275812: MFV r275784:

Plug a memory leak in libzfs.  In zfs_iter_bookmarks, an nvlist is allocated
before calling lzc_get_bookmarks, which allocates the nvlist again (and
overwrites the pointer to previously allocated list).

Illumos issue:
    5427 memory leak in libzfs when doing rollback

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