]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r300638:
cy [Sat, 28 May 2016 03:33:06 +0000 (03:33 +0000)]
MFC r300638:

Use the expiry date to determine whether to replace the DB copy of
leapfile instead of using the leapfile serial number (create
timestamp).

PR: 209577

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

7 years agoMFC: r299514
rmacklem [Thu, 26 May 2016 21:32:16 +0000 (21:32 +0000)]
MFC: r299514
Fix use-after-free in NFS4 lock test service.

Trivial use-after-free where stp was freed too soon in the non-error path.
To fix, simply move its release to the end of the routine.

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

7 years agoMFC r299666 - r299672
kadesai [Thu, 26 May 2016 12:00:14 +0000 (12:00 +0000)]
MFC r299666 - r299672

r299666: Takes care of any firmware command timeout scenarios by initiating OCR.
r299667: Similar to RAID map for Logical Drives, now JBOD map has been introduced
r299668: This patch implements driver support for 1MB IO size.
r299669: Implemented interrupt Config Hook in mrsas(4) to defer some of the tasks, like:
registering AEN, creating cdev.
r299670: Added support for Avago Intruder controller.
r299671: bugs fixed as part of this patch in kdump and some NULL pointer dereference
r299672: Version update patch.

Sponsored by:   AVAGO Technologies/ Broadcom Limited

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

7 years agoMFC r284872 - 284873
kadesai [Thu, 26 May 2016 11:01:25 +0000 (11:01 +0000)]
MFC r284872 - 284873

r284872: Kernel panic may be observed by user, if MR controller is under Chip reset (OCR)

r284873: Counter part of mfi driver commit in mrsas  gracefully fail,
         if the /dev/megaraid_sas_ioctl_node symlink already exists

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

7 years agoMFC r300327:
ken [Wed, 25 May 2016 15:10:07 +0000 (15:10 +0000)]
MFC r300327:

  ------------------------------------------------------------------------
  r300327 | ken | 2016-05-20 13:30:52 -0600 (Fri, 20 May 2016) | 11 lines

  Add the density code for LTO-7 to libmt and the mt(1) man page.

  The density code and bits per mm values were obtained from an
  actual drive density report.

  The number of tracks were obtained from an LTO-7 hardware
  announcement on IBM's web site.
  ------------------------------------------------------------------------
Sponsored by: Spectra Logic

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

7 years agoMFC r300224:
ken [Wed, 25 May 2016 14:30:33 +0000 (14:30 +0000)]
MFC r300224:

  ------------------------------------------------------------------------
  r300224 | ken | 2016-05-19 13:13:43 -0600 (Thu, 19 May 2016) | 12 lines

  Adjust a couple of error cases in camdd(8).

  usr.sbin/camdd/camdd.c:
   In camdd_probe_file(), fix an error case after fstat where
   we were bailing out and leaving two lines of cleanup code
   unexecuted.  Instead, just goto bailout_error.

   In camdd_probe_pass(), fail if the sector size is 0.
  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

7 years agoMFC r300432:
kib [Wed, 25 May 2016 10:04:53 +0000 (10:04 +0000)]
MFC r300432:
Giant is dropped by mi_startup() before passing the control to swapper.

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

7 years agoFix build on stable/10.
mav [Wed, 25 May 2016 08:09:14 +0000 (08:09 +0000)]
Fix build on stable/10.

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

7 years agoAdd ioat.4 missed in r300661.
mav [Wed, 25 May 2016 07:14:52 +0000 (07:14 +0000)]
Add ioat.4 missed in r300661.

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

7 years agoMFC ioat(4) driver in its present state.
mav [Wed, 25 May 2016 07:09:54 +0000 (07:09 +0000)]
MFC ioat(4) driver in its present state.

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

7 years agoMFC r299505
sephe [Wed, 25 May 2016 06:15:26 +0000 (06:15 +0000)]
MFC r299505

hyperv/stor: Enable INQUIRY result check only on WIN10 like host systems

On WIN8 like host systems, when rescan happens, the already installed
disks seem to return random invalid results for INQUIRY.

More investigation is under way to figure out why random invalid INQUIRY
results are delivered to VM on WIN8 like host systems.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6316

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

7 years agoMFC r300177 and r300179: fix two typos in man page.
cy [Wed, 25 May 2016 01:48:44 +0000 (01:48 +0000)]
MFC r300177 and r300179: fix two typos in man page.

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

7 years agoMFC 299310:
jhb [Tue, 24 May 2016 23:04:16 +0000 (23:04 +0000)]
MFC 299310:
Don't store generated firmware object files in the source directory.

Trim the leading directory of a firmware source file from the resulting
target object file name so the object file is stored in the object
directory. Previously, using 'FIRMWS= /path/to/fw.bin:fw.bin' would
store the generated 'fw.bin.fwo' file in the /path/to directory. Now
it stores it in the object directory of the kernel module being built.

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

7 years agoMFC r300084:
kib [Tue, 24 May 2016 10:46:23 +0000 (10:46 +0000)]
MFC r300084:
Do enable io accounting for read-only mounts and mounts which are
remounted to writeable after initial read-only.  Assign to
dev->si_mountpt earlier to account the accesses done at the mount
time.

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

7 years agoMFC r300083:
kib [Tue, 24 May 2016 10:41:34 +0000 (10:41 +0000)]
MFC r300083:
If IO_SYNC was passed to ffs_truncate(), request synchronous inode
update from the final ffs_update().

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

7 years agoMFC r300082:
kib [Tue, 24 May 2016 10:39:55 +0000 (10:39 +0000)]
MFC r300082:
For async UFS mounts, shrink the directory asynchronously, at least do
not pass IO_SYNC to ffs_truncate() unneccessary.

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

7 years agoMFC r300030:
kib [Tue, 24 May 2016 10:36:33 +0000 (10:36 +0000)]
MFC r300030:
Fix comments.

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

7 years agoMFC r300027:
kib [Tue, 24 May 2016 10:34:24 +0000 (10:34 +0000)]
MFC r300027:
Fix typo in the message.

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

7 years agoMFC r299373: Allow sleepable allocations in enclosure daemon threads.
mav [Tue, 24 May 2016 07:21:23 +0000 (07:21 +0000)]
MFC r299373: Allow sleepable allocations in enclosure daemon threads.

There were at least two places where M_NOWAIT was used without NULL check.
This change should fix NULL-dereference panic there and possibly improve
operation in other ways under memory pressure.

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

7 years agoMFC r299347, r299348: Validate XCOPY range offsets and lengths.
mav [Tue, 24 May 2016 07:19:52 +0000 (07:19 +0000)]
MFC r299347, r299348: Validate XCOPY range offsets and lengths.

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

7 years agoMFC r299346: More XCOPY parameters validation.
mav [Tue, 24 May 2016 07:19:00 +0000 (07:19 +0000)]
MFC r299346: More XCOPY parameters validation.

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

7 years agoMFC r299329: Improve validation of some POPULATE TOKEN parameters.
mav [Tue, 24 May 2016 07:18:22 +0000 (07:18 +0000)]
MFC r299329: Improve validation of some POPULATE TOKEN parameters.

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

7 years agoMFC r300072: Fix NULL-dereference panic if VESA reports zero modes.
mav [Tue, 24 May 2016 07:17:09 +0000 (07:17 +0000)]
MFC r300072: Fix NULL-dereference panic if VESA reports zero modes.

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

7 years agoMFC r300218: Add proper reporting for early task management errors.
mav [Tue, 24 May 2016 07:15:53 +0000 (07:15 +0000)]
MFC r300218: Add proper reporting for early task management errors.

This covers unknown requests and requests to unknown virtual ports.
Previously it "worked" only because of timeout handling on initiator.

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

7 years agoMFC r300217: Add IOCB debugging for ISPCTL_RESET_DEV and ISPCTL_ABORT_CMD.
mav [Tue, 24 May 2016 07:15:10 +0000 (07:15 +0000)]
MFC r300217: Add IOCB debugging for ISPCTL_RESET_DEV and ISPCTL_ABORT_CMD.

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

7 years agoMFC r300157: Unify Multi ID target code by reusing isp_find_chan_by_did().
mav [Tue, 24 May 2016 07:14:24 +0000 (07:14 +0000)]
MFC r300157: Unify Multi ID target code by reusing isp_find_chan_by_did().

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

7 years agoMFC r300058: Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.
mav [Tue, 24 May 2016 07:13:42 +0000 (07:13 +0000)]
MFC r300058: Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.

It is normal for ZOMBIE ports to be logged out.  This status is not really
an error until Gone Device Timeout expires, so make CAM retry after delay.

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

7 years agoMFC r300052: Completely remove broken now autologin port flag.
mav [Tue, 24 May 2016 07:12:53 +0000 (07:12 +0000)]
MFC r300052: Completely remove broken now autologin port flag.

Firmware automatically logs in only to local loop ports, and those ports
can be easily identified without extra flag by zero domain and area IDs.

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

7 years agoMFC r299957: Reduce verbosity of "now sending synthesized status" message.
mav [Tue, 24 May 2016 07:12:11 +0000 (07:12 +0000)]
MFC r299957: Reduce verbosity of "now sending synthesized status" message.

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

7 years agoMFC r299955: No need to check login status for ZOMBIE ports.
mav [Tue, 24 May 2016 07:11:31 +0000 (07:11 +0000)]
MFC r299955: No need to check login status for ZOMBIE ports.

ZOMBIE ports are always logged out, and so initiator may try to relogin.

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

7 years agoMFC r299691: Fix FCP_CMD LENGTH mask in ATIO7 IOCB.
mav [Tue, 24 May 2016 07:10:50 +0000 (07:10 +0000)]
MFC r299691: Fix FCP_CMD LENGTH mask in ATIO7 IOCB.

This caused "long IU length (16384) ignored" errors following by others.

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

7 years agoMFC r299465,r299807,r299808,r299817,r299831,r299832,r300167:
ngie [Tue, 24 May 2016 04:49:58 +0000 (04:49 +0000)]
MFC r299465,r299807,r299808,r299817,r299831,r299832,r300167:

r299465 (by cem):

bsnmp: Don't overrun privkey buffer by copying wrong size

The 'priv_key' array is SNMP_PRIV_KEY_SIZ bytes, not SNMP_AUTH_KEY_SIZ.

CIDs: 10083261009675

r299807:

Replace QUADFMT with %ju and QUADXFMT with %jx and cast values with uintmax_t

This will cure some -Wformat warnings

r299808:

Use sizeof(..)s for the destination buffers instead of hardcoded values corresponding
to the destination buffer sizes

r299817:

Use SNMPD_INPUT_FAILED instead of SNMP_CODE_FAILED

SNMPD_INPUT_FAILED is `enum snmpd_input_err` type (which matches the return
code from the function). SNMP_CODE_FAILED is `enum snmp_code` type.

r299831:

Remove NO_WERROR and add WARNS?= 6

This now compiles cleanly on all architectures

Tested with: clang 3.8, gcc 4.2.1, gcc 4.5, make tinderbox

r299832:

Remove trailing whitespace in license tort

r300167 (by glebius):

Revert r299830, it has couple of fatal errors.

The CMSG_ family of macros take care of alignment, so we don't need r299830
at all, even if it was correct.  Put NO_WCAST_ALIGN into Makefile.

Together with: peter

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

7 years agoMFC r299764,r299765,r299767,r299769,r299770,r299774,r299802,r299803,r299805,r299814:
ngie [Tue, 24 May 2016 04:23:58 +0000 (04:23 +0000)]
MFC r299764,r299765,r299767,r299769,r299770,r299774,r299802,r299803,r299805,r299814:

r299764:

Use the size of the destination buffer, not the source buffer.

Technically this is a no-op, but mute the clang warning in case the malloc call
above for fstring ever changes in the future

r299765:

Fix theoretical buffer overflow issues in snmp_oid2asn_oid

Increase the size of `string` by 1 to account for the '\0' terminator. In the event
that `str` doesn't contain any non-alpha chars, i would be set to MAXSTR, and
the subsequent strlcpy call would overflow by a character.

Remove unnecessary `string[i] = '\0'` -- this is already handled by strlcpy.

r299767:

Mute sign compare warning by casting rc to u_int to match nbindings' type

rc cannot be negative -- that was already tested for earlier on in
the function

r299769:

Use the size of the destination buffer instead of the malloc size, repeated, in order
to mute a -Wstrlcpy-strlcat-size warning

r299770:

Fix up r299764

I meant to use nitems, not sizeof(..) with the destination buffer. Using sizeof(..)
on a pointer will always truncate the output in the destination buffer incorrectly

Pointyhat to: ngie

r299774:

Do minimal work necessary to cure a -Wunused-but-set-variable warning from gcc

How errno is saved before and restored after strtoul calls needs a rethink

r299802:

Fix up both r299764 and r299770

nitems was wrong too, as it was being tested against a pointer instead of a buffer on
the stack.

Since the old code was just doing malloc, then strlcpy'ing the contents of the source
buffer into the destination buffer, replace it all with a call to strdup..

Supersized Duncecap to: ngie

r299803:

Replace malloc + memset(.., 0, ..) with calloc calls

r299805:

Fix up r299769

Similar to r299802, it was noted that using nitems on scalar pointers is
invalid.

Use strdup instead of malloc + strlcpy (which is what the old code was doing
anyhow).

Pointyhat to: ngie

r299814:

Replace malloc + memset(.., 0, ..) with calloc calls

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

7 years agosed: rewrite the main loop.
pfg [Tue, 24 May 2016 03:08:32 +0000 (03:08 +0000)]
sed: rewrite the main loop.

Rewrite the main loop of the "sed s/..." command, shortening it by ten
lines and simplifying it by removing the switch statement implementing
/g, /1, and /2 separately and repetitively.

This will be needed to bring a fix from OpenBSD later.

Obtained from: OpenBSD (schwarze CVS Rev. 1.18)

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

7 years agoMFV r299377:
pfg [Tue, 24 May 2016 02:57:13 +0000 (02:57 +0000)]
MFV r299377:
sed.1: Correction for the case insensitive case.

Use the capital I instead of the lowercase.

Submitted by: Mikhail T.

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

7 years agoMFC 300307:
kp [Tue, 24 May 2016 02:44:44 +0000 (02:44 +0000)]
MFC 300307:

pf: Fix fragment timeout

We were inconsistent about the use of time_second vs. time_uptime.
Always use time_uptime so the value can be meaningfully compared.

Submitted by: "Max" <maximos@als.nnov.ru>

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

7 years agoMFC r298270:
loos [Mon, 23 May 2016 16:37:04 +0000 (16:37 +0000)]
MFC r298270:

Add PCI ID for family 10h model 30h to amdtemp(4).

This adds support to CPU found in PC Engines APU2 series.

Sponsored by: Rubicon Communications (Netgate)

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

7 years agoMFC r297985:
loos [Mon, 23 May 2016 16:20:50 +0000 (16:20 +0000)]
MFC r297985:

Do not overwrite the dchg variable.

It does not cause any real issues because the variable is overwritten
only when the packet is forwarded (and the variable is not used anymore).

Obtained from: pfSense
Sponsored by: Rubicon Communications (Netgate)

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

7 years agoAdd respective tunables to all sysctls.
mav [Mon, 23 May 2016 16:12:11 +0000 (16:12 +0000)]
Add respective tunables to all sysctls.

This is direct commit to stable/10, since head does not need it any more.

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

7 years agoMFC r297984:
loos [Mon, 23 May 2016 16:02:29 +0000 (16:02 +0000)]
MFC r297984:

Make pfctl(8) more flexible when parsing bandwidth values.

This is the current behaviour in OpenBSD and a similar patch exist in
pfSense too.

Obtained from: OpenBSD (partly - rev. 1.625)
Sponsored by: Rubicon Communications (Netgate)

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

7 years agoMFC 299559:
n_hibma [Mon, 23 May 2016 09:44:06 +0000 (09:44 +0000)]
MFC 299559:

 Allow silencing of 'promiscuous mode enabled/disabled'
 messages.

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

7 years agoMFC r299916: vfs_read_dirent: increment ncookies after adding a cookie
avg [Mon, 23 May 2016 07:21:01 +0000 (07:21 +0000)]
MFC r299916: vfs_read_dirent: increment ncookies after adding a cookie

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

7 years agoMFC r300024: zfs_ioc_rename: fix a reversed condition
avg [Mon, 23 May 2016 07:15:23 +0000 (07:15 +0000)]
MFC r300024: zfs_ioc_rename: fix a reversed condition

PR: 209093

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

7 years agoMFC r299710,r299711,r299763,r299783,r299811:
ngie [Mon, 23 May 2016 06:01:04 +0000 (06:01 +0000)]
MFC r299710,r299711,r299763,r299783,r299811:

r299710:

Staticize global variables only used in bsnmpimport.c to fix
-Wmissing-variable-declarations warnings

r299711:

Fold two malloc + memset(.., 0, ..) calls into equivalent calloc calls

r299763:

Mute -Wstrlcpy-strlcat-size warning by using nitems with the size of the buffer

This is a no-op as the malloc above set the size of the buffer to the size used
below, but this keeps things consistent in case the malloc call changes somehow.

r299783:

Convert tok from enum tok to int32_t in function calls

get_token(..) returns int32_t, not enum tok, and in many cases tests for items
not in enum tok (e.g. '('). Make the typing consistent with get_token, which
includes a domino effect of changing enum tok to int32_t.

r299811:

Use strdup instead of malloc + strlcpy

Fix error messages on failure for calloc/strdup

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

7 years agoMFC r300005
truckman [Mon, 23 May 2016 05:45:52 +0000 (05:45 +0000)]
MFC r300005

swprintf() and apparently wcsftime() want the their output buffer size
specified in terms of the the number of wide characters and not
sizeof(buffer).

Reported by: Coverity
CID: 10076051007606

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

7 years agoMFC r300002
truckman [Mon, 23 May 2016 05:43:59 +0000 (05:43 +0000)]
MFC r300002

When clearing rtmsg, pass &rtmsg to bzero() instead of the address of
just the header

Reported by: Coverity
CID: 10075681194256

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

7 years agoMFC r299712,r299759,r299760,r299761,r299762:
ngie [Mon, 23 May 2016 05:41:53 +0000 (05:41 +0000)]
MFC r299712,r299759,r299760,r299761,r299762:

r299712:

Fix some trivial clang/gcc warnings in bsnmptc.c

- By definition, `enum snmp_tc` can't be false (the implied starting sequence
  index for the enum is 0). Don't test for it being < 0.
- Staticize `struct snmp_text_conv` to mute a -Wmissing-variable-declarations
  warning from clang.
- Remove set but unused variable, ptr, in parse_bridge_id(..) and
  parse_bport_id(..) to mute warning from gcc 4.9+.
- Mark value and string unused in snmp_inetaddr2oct(..) and parse_inetaddr(..)
  as they're just stub functions.

r299759:

Use calloc instead of memset(.., 0, ..) + malloc

r299760:

Sort variables in parse_ascii(..) per style(9)

r299761:

parse_ascii: make count size_t to mute a -Wsign-compare issue

count is always unsigned.

r299762:

Mark snmptoolctx unused in parse_authentication(..), parse_privacy(..),
parse_context(..), and parse_user_security(..).

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

7 years agoMFC r299991
truckman [Mon, 23 May 2016 05:41:23 +0000 (05:41 +0000)]
MFC r299991

Don't walk off the end of the array when proto isn't explicitly
listed above.  Instead update the catch-all "Others" bucket.

Reported by: Coverity
CID: 10075711007572

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

7 years agoMFC r299988
truckman [Mon, 23 May 2016 05:38:40 +0000 (05:38 +0000)]
MFC r299988

Set ai2 to NULL in in find_host() before the loop and after calling
freeaddrinfo() on it to indicate that it doesn't point to a valid
addrinfo list.  This fixes this Coverity issues:
1006368 Uninitialized pointer read
1018506 Double free
1305590 Resource leak
that can be triggered in the hp->hostname[0] != '\0' case.

Don't treat a character as a boolean.

Fix these Coverity issues:
1009293 Unchecked return value from library
1194246 Wrong size argument
by tweaking the status file extend code.

Reported by: Coverity
CID: 10063681018506130559010092931194246
Reviewed by: rmacklem
Feedback from: hrs
Differential Revision: https://reviews.freebsd.org/D6398

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

7 years agoMFC r299249:
dchagin [Mon, 23 May 2016 05:31:53 +0000 (05:31 +0000)]
MFC r299249:

Add a forgotten in r283424 .eh_frame section with CFI & FDE records to allow
stack unwinding through signal handler.

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

7 years agoMFC r299659:
ngie [Mon, 23 May 2016 05:28:02 +0000 (05:28 +0000)]
MFC r299659:

Remove unused const variable

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

7 years agoMFC r299986
truckman [Mon, 23 May 2016 05:27:31 +0000 (05:27 +0000)]
MFC r299986

Actually use the loop interation limit so carefully computed on the
previous line to prevent buffer overflow.  This turns out to not be
important because the upstream xdr code already capped the object
size at the proper value.  Using the correct limit here looks a lot
less scary and should please Coverity.

Reported by: Coverity
CID: 11993091199310

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

7 years agoMFC r299971
truckman [Mon, 23 May 2016 05:25:29 +0000 (05:25 +0000)]
MFC r299971

Fix off by one error that overflowed the rep_len array when doing
the final NUL termination.

Reported by: Coverity
CID: 1007617

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

7 years agoMFC r299655:
ngie [Mon, 23 May 2016 05:23:53 +0000 (05:23 +0000)]
MFC r299655:

Add missing prototype for getchar(..)

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

7 years agoMFC r299953
truckman [Mon, 23 May 2016 05:21:55 +0000 (05:21 +0000)]
MFC r299953

Fix an off by one error to avoid overflowing rp[].

Reported by: Coverity
CID: 1007579

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

7 years agoMFC r299952
truckman [Mon, 23 May 2016 05:19:37 +0000 (05:19 +0000)]
MFC r299952

Increase size of argv[] array to avoid running off the end.

Reported by: Coverity
CID: 1193819

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

7 years agoMFC r299948
truckman [Mon, 23 May 2016 05:14:26 +0000 (05:14 +0000)]
MFC r299948

Set retval in the empty password case to avoid a path through the
code that fails to set retval before falling through to the final
return().

Reported by: emaste
Reported by: Coverity
CID: 1018711

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

7 years agoMFC r299654:
ngie [Mon, 23 May 2016 05:11:31 +0000 (05:11 +0000)]
MFC r299654:

Read the contents of the snapshot files properly

- Use fgetln instead of fgets; localize complexity related to fgetln(3)
  inside the loop.
- Skip over blank lines.
- Skip over lines (properly) that start with a "#"

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

7 years agoMFC r299926
truckman [Mon, 23 May 2016 05:11:08 +0000 (05:11 +0000)]
MFC r299926

Hoist the getpwnam() call outside the first if/else block in
pam_sm_chauthtok().  Set user = getlogin() inside the true
branch so that it is initialized for the following PAM_LOG()
call.  This is how it is done in pam_sm_authenticate().

Reported by: Coverity
CID: 272498

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

7 years agoMFC r299922
truckman [Mon, 23 May 2016 05:07:13 +0000 (05:07 +0000)]
MFC r299922

Don't call free_addrselectpolicy(&policyhead) before policyhead has been
initialized.

Reported by: Coverity
CID: 1018727

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

7 years agoMFC r299897
truckman [Mon, 23 May 2016 04:52:27 +0000 (04:52 +0000)]
MFC r299897

NULL releasedfl after calling deallocate_file_lock() which frees it
to avoid a use-after-free error in the debuglog() call at the top
of the loop.

Reported by: Coverity
CID: 1006080

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

7 years agoMFC r299894
truckman [Mon, 23 May 2016 04:50:01 +0000 (04:50 +0000)]
MFC r299894

pdu_delete(request) frees request, so move the call after
login_new_response(request) to avoid a use-after-free error

Reported by: Coverity
CID: 13312191331220

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

7 years agoMFC r299893
truckman [Mon, 23 May 2016 04:47:24 +0000 (04:47 +0000)]
MFC r299893

Don't free fnamebuf before we calling cfgfile_add().  This changes a
use-after-free error into a minor memory leak.

Reported by: Coverity
CID: 1006084

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

7 years agoMFC r300305, r300332:
kib [Mon, 23 May 2016 00:58:52 +0000 (00:58 +0000)]
MFC r300305, r300332:
Check for overflow and return EINVAL if detected.  Use unsigned index.

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

7 years agoMFC: r299242
rmacklem [Sun, 22 May 2016 20:44:11 +0000 (20:44 +0000)]
MFC: r299242
Make "-S" a default option for mountd.

After a discussion on freebsd-fs@ there seemed to be a consensus that
the "-S" option for mountd should become the default.
Since the only known issue w.r.t. using "-S" was fixed by r299201,
this commit adds "-S" to the default mountd_flags.

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

7 years agoMFC: r299226
rmacklem [Sat, 21 May 2016 20:50:25 +0000 (20:50 +0000)]
MFC: r299226
Don't increment srvrpccnt[] for the NFSv4.1 operations.

When support for NFSv4.1 was added to the NFS server, it broke
the server rpc count stats, since newnfsstats.srvrpccnt[] doesn't
have entries for the new NFSv4.1 operations.
Without this patch, the code was incrementing bogus entries in
newnfsstats for the new NFSv4.1 operations.
This patch is an interim fix. The nfsstats structure needs to be
updated and that will come in a future commit.

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

7 years agoMFC 103 ntb(4) patches by cem@ up to r295487.
mav [Sat, 21 May 2016 15:15:11 +0000 (15:15 +0000)]
MFC 103 ntb(4) patches by cem@ up to r295487.

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

7 years agoBackport security fix for absolute path traversal vulnerability in bsdcpio.
mm [Sat, 21 May 2016 09:03:45 +0000 (09:03 +0000)]
Backport security fix for absolute path traversal vulnerability in bsdcpio.

This is a direct commit to stable/10.

Security: CVE-2015-2304

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

7 years agoMFC r292000: Remove historical GNUC test
emaste [Fri, 20 May 2016 19:14:15 +0000 (19:14 +0000)]
MFC r292000: Remove historical GNUC test

The requirement is for a GCC-compatible compiler and not necessarily
GCC itself. However, we currently expect any compiler used for building
the whole of FreeBSD to be GCC-compatible and many things will break if
not; there's no longer a need to have an explicit test for this in csu.

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

7 years agoMFC r294935 (kan): Make .debug file for libgcc_s.so.1 more useful.
emaste [Fri, 20 May 2016 19:05:33 +0000 (19:05 +0000)]
MFC r294935 (kan): Make .debug file for libgcc_s.so.1 more useful.

The files compiled into libgcc_s.so.1 did not have -g on
compiler command line, making generated .debug quite
pointless.

PR: 206381

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

7 years agoMFC r298983: Add some device IDs from Intel Sunrise Point chipsets.
mav [Fri, 20 May 2016 17:25:36 +0000 (17:25 +0000)]
MFC r298983: Add some device IDs from Intel Sunrise Point chipsets.

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

7 years agoMFC r299879, r299880
truckman [Fri, 20 May 2016 07:18:33 +0000 (07:18 +0000)]
MFC r299879, r299880

r299879 | truckman | 2016-05-15 18:30:32 -0700 (Sun, 15 May 2016) | 7 lines

Likely a false positive ... but make sure that -1 can't be used as an
array index by splitting up a test.

r299880 | truckman | 2016-05-15 18:38:24 -0700 (Sun, 15 May 2016) | 8 lines

Since rdata is only used as an argument to the immediately following
call to res_nopt_rdata(), revert r299879 and fix CID 603941 by moving
rdata = &buf[n];
inside the if block.

Reported by: Coverity
CID: 603941

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

7 years agoMFC r299873
truckman [Fri, 20 May 2016 07:14:03 +0000 (07:14 +0000)]
MFC r299873

Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Use sizeof(destination) in a few places instead of IFNAMSIZ.

Cast afp->af_ridreq and afp->af_addreq  to make the intent of
the code more obvious.

Reported by: Coverity
CID: 1009628100963010096311009632100963310096351009638
CID: 1009639100964010096411009642100964310096441009645
CID: 1009646100964710100491010050101005110100521010053
CID: 1010054101129310112941011295101129610112971011298
CID: 1011299130582113517201351721

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

7 years agoMFC r299869
truckman [Fri, 20 May 2016 07:11:04 +0000 (07:11 +0000)]
MFC r299869

Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by: Coverity
CID: 1009974

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

7 years agoMFC r299868
truckman [Fri, 20 May 2016 07:08:19 +0000 (07:08 +0000)]
MFC r299868

Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by: Coverity
CID: 991863, 991864, 991865

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

7 years agoMFC r299867
truckman [Fri, 20 May 2016 07:00:11 +0000 (07:00 +0000)]
MFC r299867

Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by: Coverity
CID: 974860, 10099721009973

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

7 years agoMFC 299866
truckman [Fri, 20 May 2016 06:56:43 +0000 (06:56 +0000)]
MFC 299866

Use strlcpy() instead of strncpy() when copying ifname to ensure
that it is NUL terminated.  Additional NUL padding is not required
for short names.

Reported by: Coverity
CID: 974852

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

7 years agoMFC r299865
truckman [Fri, 20 May 2016 06:54:59 +0000 (06:54 +0000)]
MFC r299865

When handling SIOCSIFNAME ensure that the new interface name is NUL
terminated.  Reject the rename attempt if the name is too long.

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

7 years agoMFC r299593
truckman [Fri, 20 May 2016 06:47:42 +0000 (06:47 +0000)]
MFC r299593

Properly compute the size argument to pass to malloc().

Reported by: Coverity
CID: 1198856

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

7 years agoMFC r299592
truckman [Fri, 20 May 2016 06:43:55 +0000 (06:43 +0000)]
MFC r299592

Move a call to cam_freeccb() to avoid a use after free error and
a later double free.

Reported by: Coverity
CID: 1018507

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

7 years agoMFC r299591
truckman [Fri, 20 May 2016 06:41:26 +0000 (06:41 +0000)]
MFC r299591

Always return either a dynamically allocated string or NULL from
expand().  Never return the name parameter, which could be a the buf[]
buffer which is allocated on the stack by getdeadletter() and which
would then be used after getdeadletter() has returned.

Reported by: Coverity
CID: 1199383

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

7 years agoMFC r299585
truckman [Fri, 20 May 2016 06:38:46 +0000 (06:38 +0000)]
MFC r299585

Declare line[] in the outermost scope of retrieve() instead of
declaring it in an inner scope and then using it via a pointer
in the outer scope.

Reported by: Coverity
CID: 605895

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

7 years agoMFC r299581
truckman [Fri, 20 May 2016 06:35:14 +0000 (06:35 +0000)]
MFC r299581

Use strlcpy() instead of strncpy() to ensure that qf->fsname is NUL
terminated.  Don't bother checking for truncation since the subsequent
stat() call should detect that and fail.

Reported by: Coverity
CID: 1018189

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

7 years agoMFC r299580
truckman [Fri, 20 May 2016 06:33:02 +0000 (06:33 +0000)]
MFC r299580

Use strlcpy() instead of strncpy() to ensure that ret->name is
NUL terminated.  The source and destination buffers are the same
size and the source *should* be NUL terminated, but be paranoid.

Reported by: Coverity
CID: 1011274

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

7 years agoMFC r299579
truckman [Fri, 20 May 2016 06:27:58 +0000 (06:27 +0000)]
MFC r299579

Use strlcpy() instead of strncpy() to ensure that qup->fsname is NUL
terminated.  Don't bother checking for truncation since the subsequent
quota_read() should detect that and fail.

Reported by: Coverity
CID: 1009980

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

7 years agoMFC r299577, r299578, r299589
truckman [Fri, 20 May 2016 06:24:16 +0000 (06:24 +0000)]
MFC r299577, r299578, r299589

r299577 | truckman | 2016-05-12 16:14:31 -0700 (Thu, 12 May 2016) | 15 lines

Avoid Coverity NUL termination warning about strncpy() by using
memcpy() instead.  It's probably a bit more optimal in this case
anyway. [1]

The program logic leading up to the creation of the strncpy/memcpy
destination buffer is a bit hairy.  Add a call to assert() to make
it clear what is happening here and detect any potential buffer
overruns in the future.

Check a couple syscall error returns.  Ignore the EEXIST error from
link() to preserve existing behavior. [2] [3]

r299578 | truckman | 2016-05-12 16:37:58 -0700 (Thu, 12 May 2016) | 2 lines

If fchdir() fails, call err() instead of warn().

r299589 | truckman | 2016-05-12 22:49:02 -0700 (Thu, 12 May 2016) | 4 lines

Instead of ignoring the EEXIST from link(), unconditionally unlink
the terget before calling link().  This should prevent links to an
old copy of the file from being retained.

Reported by: Coverity
CID: 1009659 [1], 1009349 [2], 1009350 [3]

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

7 years agoMFC r290903, r299573
truckman [Fri, 20 May 2016 06:19:00 +0000 (06:19 +0000)]
MFC r290903, r299573

r290903 is needed to prevent a conflict whem merging r299573

r290903 | araujo | 2015-11-15 19:18:40 -0800 (Sun, 15 Nov 2015) | 5 lines

Don't need cast malloc.

r299573 | truckman | 2016-05-12 14:35:40 -0700 (Thu, 12 May 2016) | 10 lines

Use strlcpy() instead of strncpy() when copying to dom_domain to
ensure that the latter is NUL terminated since it is passed
as an argument to *printf().

Warn about NIS domains that are too long.

Reported by: Coverity
CID: 10096201009621

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

7 years agoMFC r299525
truckman [Fri, 20 May 2016 06:05:20 +0000 (06:05 +0000)]
MFC r299525

  Use strlcpy() instead of strncpy() when copying date and subj
  to ensure that these are properly NUL terminated since they
  are passed to printf().

Reported by: Coverity
CID: 974770

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

7 years agoMFC r299524
truckman [Fri, 20 May 2016 06:02:44 +0000 (06:02 +0000)]
MFC r299524

  Use strlcpy() instead of strncpy() when copying the encoding value
  to ensure that the destination is NUL terminated.  Length truncation
  of one more character should not be an issue since encoding values
  that long are not supported by libc.  The destination string is
  treated as a NUL terminated string, but it is only passed to strcmp()
  for comparison to a set of shorter, fixed length strings, so this
  is not a serious problem.

Reported by: Coverity
CID: 974769

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

7 years agoMFC: r299201
rmacklem [Fri, 20 May 2016 01:19:30 +0000 (01:19 +0000)]
MFC: r299201
Give mountd -S priority over outstanding RPC requests when suspending the nfsd.

It was reported via email that under certain heavy RPC loads
long delays before the exports would be updated was observed
when using "mountd -S". This patch reverses the priority between
the exclusive lock request to suspend the nfsd threads and the
shared lock request for performing RPCs.
As such, when mountd attempts to suspend the nfsd threads, it
gets priority over outstanding RPC requests to do this.
I suspect that the case reported was an artificial test load,
but this patch did fix the problem for the reporter.

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

7 years agoFollow-up r300233: Don't override MK_* from env as head does.
bdrewery [Thu, 19 May 2016 22:53:44 +0000 (22:53 +0000)]
Follow-up r300233: Don't override MK_* from env as head does.

PR: D6271
Sponsored by: EMC / Isilon Storage Division

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

7 years agoBump version for r300233
bdrewery [Thu, 19 May 2016 21:47:32 +0000 (21:47 +0000)]
Bump version for r300233

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

7 years agoAllow MK_ overrides.
bdrewery [Thu, 19 May 2016 21:41:35 +0000 (21:41 +0000)]
Allow MK_ overrides.

This is a direct commit to stable.

This was done in head in r264661 and is needed to force certain options off
for ports.

PR: D6271
Sponsored by: EMC / Isilon Storage Division

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

7 years agoMFC r298420, r298439, r298644
asomers [Thu, 19 May 2016 16:04:20 +0000 (16:04 +0000)]
MFC r298420, r298439, r298644

r298420 | asomers | 2016-04-21 10:43:15 -0600 (Thu, 21 Apr 2016) | 10 lines

Notify userspace listeners when geom disk attributes have changed

sys/geom/geom_disk.c:
        disk_attr_changed(): Generate a devctl event of type GEOM:<attr> for
        every call.

r298439 | asomers | 2016-04-21 15:13:41 -0600 (Thu, 21 Apr 2016) | 10 lines

DRY on buffer sizes.  Update to r298420.

sys/geom/geom_disk.c:
        In disk_attr_changed, don't repeat a buffer size.

r298644 | asomers | 2016-04-26 08:48:58 -0600 (Tue, 26 Apr 2016) | 8 lines

Add GEOM::physpath documentation to devd.conf(5)

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

7 years agoMFC r297947:
bdrewery [Wed, 18 May 2016 20:55:04 +0000 (20:55 +0000)]
MFC r297947:

  Build libpam modules in parallel.

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

7 years agoMFC r299413:
kib [Wed, 18 May 2016 12:02:05 +0000 (12:02 +0000)]
MFC r299413:
Use vfs_hash_ref(9) to eliminate LK_EXCLOTHER kludge.

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

7 years agoMFC r299412:
kib [Wed, 18 May 2016 11:58:16 +0000 (11:58 +0000)]
MFC r299412:
Add vfs_hash_ref(9) function, which finds a vnode by the hash value
and returns it referenced.

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

7 years agoMFC r299408:
kib [Wed, 18 May 2016 11:51:17 +0000 (11:51 +0000)]
MFC r299408:
Style: wrap long lines.

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

7 years agoMFC r299089:
pfg [Wed, 18 May 2016 00:33:08 +0000 (00:33 +0000)]
MFC r299089:
fsck_msdosfs: Adjust a check.

The on-disk FAT array does not include anything before CLUST_FIRST,
compensate in size check.

Obtained from: NetBSD (CVS Rev. 1.20)

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

7 years agoValidate that user supplied control message length is not negative.
glebius [Tue, 17 May 2016 22:30:43 +0000 (22:30 +0000)]
Validate that user supplied control message length is not negative.

Submitted by: C Turt <cturt hardenedbsd.org>
Security: SA-16:19
Security: CVE-2016-1887

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