]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoFix patch(1) shell injection vulnerability via ed(1). [SA-15:18]
delphij [Wed, 5 Aug 2015 22:05:02 +0000 (22:05 +0000)]
Fix patch(1) shell injection vulnerability via ed(1). [SA-15:18]

Fix routed remote denial of service vulnerability. [SA-15:19]

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

8 years agoFix segfault were modifying the uid of a user
bapt [Wed, 5 Aug 2015 20:32:07 +0000 (20:32 +0000)]
Fix segfault were modifying the uid of a user

Do a direct commit as the code on head has changed a lot and does not fail in
that case

PR: 202111
Reported by: gondim@bsdinfo.com.br

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

8 years agoMFC r285720:
pfg [Wed, 5 Aug 2015 18:52:40 +0000 (18:52 +0000)]
MFC r285720:
libusb: Fix minor warning.

Fix a warning triggered by the gcc + FORTIFY_SOURCE patches:

In function 'libusb20_parse_config_desc': lib/libusb/libusb20_desc.c:141:
warning: passing argument 1 of 'memcpy' discards qualifiers from pointer
target type

Submitted by: hselansky

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

8 years agoMake the kern.racct.tunable actually work.
trasz [Wed, 5 Aug 2015 15:57:08 +0000 (15:57 +0000)]
Make the kern.racct.tunable actually work.

This is a direct commit to 10-STABLE - 11-CURRENT is not affected,
because tunables are automatically fetched there.

MFC after: ASAP
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285710:
ae [Wed, 5 Aug 2015 11:24:40 +0000 (11:24 +0000)]
MFC r285710:
  Invoke LLE event handler when entry is deleted.

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

8 years agoMFC r285888:
ae [Wed, 5 Aug 2015 10:59:59 +0000 (10:59 +0000)]
MFC r285888:
  Build debug version of rmlock's methods only when LOCK_DEBUG > 0.

  Currently LOCK_DEBUG is always defined in sys/lock.h (0 or 1).
  This means that debugging code always built. In addition the kernel
  modules have always defined LOCK_DEBUG as 1. So, debugging rmlock code
  is always used by kernel modules.

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

8 years agoImplement x86 ptrace(2) requests PT_{GET,SET}{FS,GS}BASE.
kib [Wed, 5 Aug 2015 08:17:10 +0000 (08:17 +0000)]
Implement x86 ptrace(2) requests PT_{GET,SET}{FS,GS}BASE.

MFC r284918:
Add helper fill_based_sd(9).

MFC r284919:
Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to
obtain the thread %fs and %gs bases.  Add x86 PT_SETFSBASE and
PT_SETGSBASE requests to set the bases from debuggers.  The set
requests, similarly to the sysarch({I386,AMD64}_SET_FSBASE), override
the corresponding segment registers.

MFC r284965:
Document x86 machine-specific ptrace(2) requests.

MFC r285011:
Disallow a debugger on 64bit system to set fs/gs bases of the 32bit
process beyond the end of the process address space.

MFC r285104:
Grammar and language fixes.

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

8 years agoMFC r284921:
kib [Wed, 5 Aug 2015 07:35:34 +0000 (07:35 +0000)]
MFC r284921:
pcb_gs32sd is unused for long time, remove it.  Keep the padding in pcb.

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

8 years agoMFC r285046:
kib [Wed, 5 Aug 2015 07:29:59 +0000 (07:29 +0000)]
MFC r285046:
Account for the main process stack being one page below the highest
user address when ABI uses shared page.

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

8 years agoMFC r285041:
kib [Wed, 5 Aug 2015 07:21:44 +0000 (07:21 +0000)]
MFC r285041:
Use single instance of the identical INKERNEL() and PMC_IN_KERNEL()
macros on amd64 and i386.  On i386, correct the lowest kernel address.

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

8 years agoMFC r285973
davidcs [Wed, 5 Aug 2015 00:00:06 +0000 (00:00 +0000)]
MFC r285973
  - Avoid lock contention in the if_transmit callback by using trylock and
   enqueueing the frames when it fails. This way there is some latency
   removed from the transmitting path.
  - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
   enqueue the desired frames and return successful transmit. This way we
   avoid to return errors on transmit side and resulting in
   possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
   everytime we get the threshold ring hit, so this can be happening quite
   often.

Submitted by: Attilio.Rao@isilon.com

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

8 years agoMFC r281581: vidcontrol: make size argument optional again for syscons
emaste [Tue, 4 Aug 2015 15:15:06 +0000 (15:15 +0000)]
MFC r281581: vidcontrol: make size argument optional again for syscons

r273544 (MFC in r273921) changed the -f option allow no arguments in vt
mode (used to reset the font back to the default), but broke the
optionality of the size argument for syscons. Drop the required argument
from syscons' optstring for -f so the optional argument handler works
the same way for both syscons and vt.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r286285:
gjb [Tue, 4 Aug 2015 13:41:37 +0000 (13:41 +0000)]
MFC r286285:
 Ensure the local MANIFEST is always used when verifying remote
 distribution sets.

Approved by: re (glebius, insta-MFC)
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285932:
kib [Tue, 4 Aug 2015 04:30:54 +0000 (04:30 +0000)]
MFC r285932:
Add bit names for the IA32_MISC_ENABLE msr.

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

8 years agoMFC r284988, r285220, and r285221.
np [Tue, 4 Aug 2015 04:00:36 +0000 (04:00 +0000)]
MFC r284988, r285220, and r285221.

r284988:
cxgbe(4): request an automatic tx update when a netmap tx queue idles.
The NIC tx queues already do this.

r285220:
cxgbe(4): Do not override the the global defaults for congestion drops.
The hw.cxgbe.cong_drop knob is not affected by this change because the
driver sets up congestion drop on a per-queue basis.

r285221:
cxgbe(4): Add a new knob that controls the congestion response of netmap
rx queues.  The default is to drop rather than backpressure.

This decouples the congestion settings of NIC and netmap rx queues.

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

8 years agoMFC r284718:
np [Tue, 4 Aug 2015 03:43:09 +0000 (03:43 +0000)]
MFC r284718:

cxgbe: get_fl_payload returns a header mbuf when successful.

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

8 years agoMFC r284984:
np [Tue, 4 Aug 2015 03:40:19 +0000 (03:40 +0000)]
MFC r284984:

cxgbetool: fix code that decodes T5 SGE contexts.  Some of the fields
that changed between T4 and T5 were not displayed correctly.

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

8 years agoMFC r284445 and r286107.
np [Tue, 4 Aug 2015 03:33:59 +0000 (03:33 +0000)]
MFC r284445 and r286107.

r284445:
cxgbe(4): Add the ability to dump mailbox commands and replies.  It is
enabled/disabled via bit 0 of adapter->debug_flags (which is available
at dev.t5nex.<n>.debug_flags).

r286107:
cxgbe(4): initialize debug_flags from the kernel environment.

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

8 years agoMFC r286102:
pfg [Tue, 4 Aug 2015 03:06:23 +0000 (03:06 +0000)]
MFC r286102:
Buffer overflow in wall(1).

This affected syslogd, wall and talkd.
Detected by FORTIFY_SOURCE GSoC (with clang).

Submitted by: Oliver Pinter
Differential Revision: https://reviews.freebsd.org/D3254
Reviewed by: delphij, jmg

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

8 years agoMFC r286208:
imp [Mon, 3 Aug 2015 23:12:29 +0000 (23:12 +0000)]
MFC r286208:

Only match devices that belong to this driver.

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

8 years agoMFC r284611:
delphij [Mon, 3 Aug 2015 23:08:40 +0000 (23:08 +0000)]
MFC r284611:

Fix markups and change e.g./eg. to e.g.,.

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

8 years agoMFC r284607:
delphij [Mon, 3 Aug 2015 23:04:32 +0000 (23:04 +0000)]
MFC r284607:

Document kern.cam.ada.legacy_aliases, while I'm there also fix some typos.

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

8 years agoAdd a 'First rev' marker, indicating the releng/ branch point
gjb [Mon, 3 Aug 2015 19:15:19 +0000 (19:15 +0000)]
Add a 'First rev' marker, indicating the releng/ branch point
of the most recent release.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285869.
dru [Mon, 3 Aug 2015 16:56:40 +0000 (16:56 +0000)]
MFC r285869.
Fix transposed words in man page.

PR: 201752
Reviewed by: gjb

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

8 years agoMFC r286092:
gjb [Mon, 3 Aug 2015 16:30:03 +0000 (16:30 +0000)]
MFC r286092:
  Fix a rendering issue in the zfs(8) manual.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r282086:
trasz [Mon, 3 Aug 2015 08:04:31 +0000 (08:04 +0000)]
MFC r282086:

Make setproctitle(3) work in Capsicum capability mode.  This makes
ctld(8) child processes to indicate initiator address and name in
their titles, similar to what iscsid(8) child processes do.

PR: 181352
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r284542:
trasz [Mon, 3 Aug 2015 07:28:23 +0000 (07:28 +0000)]
MFC r284542:

Allow '@' in unquoted strings, such as with the "path" statement.  Note
that one can use any character they like by using double quotes.

PR: 200895
Sponsored by: The FreeBDS Foundation

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

8 years agoMFC r285086:
trasz [Mon, 3 Aug 2015 07:20:33 +0000 (07:20 +0000)]
MFC r285086:

Remove OpenSSL dependency from iscsid(8) and ctld(8).

Sponsored by: The FreeBSD Foundation

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

8 years agoFix ia64 to not override the call stack bottom address with the
kib [Mon, 3 Aug 2015 03:08:48 +0000 (03:08 +0000)]
Fix ia64 to not override the call stack bottom address with the
register stack bottom address, after the merge of r284956 in r285967.

Note: this is a direct commit to stable/10.

Reported and tested by: clusteradm (peter)
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285889:
ae [Sun, 2 Aug 2015 16:25:21 +0000 (16:25 +0000)]
MFC r285889:
  Report the scheme and provider names in warning message about unaligned
  partition.

  PR: 201873

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

8 years agoMFC r284582:
trasz [Sun, 2 Aug 2015 10:08:57 +0000 (10:08 +0000)]
MFC r284582:

Fix off-by-one error in fstyp(8) and geom_label(4) that made them use
a single space (" ") as a CD9660 label name when no label was present.
Similar problem was also present in msdosfs label recognition.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285675:
trasz [Sun, 2 Aug 2015 09:39:41 +0000 (09:39 +0000)]
MFC r285675:

Remove a comment in the wrong place.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285674:
trasz [Sun, 2 Aug 2015 09:37:47 +0000 (09:37 +0000)]
MFC r285674:

Document suspend/resume notification in devd.conf(5).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285673:
trasz [Sun, 2 Aug 2015 09:35:53 +0000 (09:35 +0000)]
MFC r285673:

Add CARP events description to devd.conf(5).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285873:
trasz [Sun, 2 Aug 2015 09:34:03 +0000 (09:34 +0000)]
MFC r285873:

Update Capsicum and Mandatory Access Control manual pages
to no longer claim they are experimental.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285672:
trasz [Sun, 2 Aug 2015 09:30:43 +0000 (09:30 +0000)]
MFC r285672:

fstyp(8) ships with 10.2.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285671:
trasz [Sun, 2 Aug 2015 09:28:51 +0000 (09:28 +0000)]
MFC r285671:

uefisign(8) ships with 10.2.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285676:
trasz [Sun, 2 Aug 2015 09:27:07 +0000 (09:27 +0000)]
MFC r285676:

Expand sysctl descriptions in iscsi(4) and ctl(4).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285251:
trasz [Sun, 2 Aug 2015 09:25:05 +0000 (09:25 +0000)]
MFC r285251:

Fix markup.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285100:
trasz [Sun, 2 Aug 2015 09:23:24 +0000 (09:23 +0000)]
MFC r285100:

Make ctl(4) appear in "man -k iscsi" results.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r284682:
trasz [Sun, 2 Aug 2015 09:21:31 +0000 (09:21 +0000)]
MFC r284682:

Expand sysctls descriptions for iscsi(4) and ctl(4).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283286:
trasz [Sun, 2 Aug 2015 09:14:52 +0000 (09:14 +0000)]
MFC r283286:

Start documenting ctl(4) sysctls.

Differential Revision: The FreeBSD Foundation

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

8 years agoMFC: r286090
brueffer [Sun, 2 Aug 2015 07:25:05 +0000 (07:25 +0000)]
MFC: r286090

The kernel option and module are actually called pmspcv.

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

8 years agoMFC: r286046
rmacklem [Sat, 1 Aug 2015 22:56:42 +0000 (22:56 +0000)]
MFC: r286046
This patch fixes a problem where, if the NFSv4 server has a previous
unconfirmed clientid structure for the same client on the last hash list,
this old entry would not be removed/deleted. I do not think this bug would have
caused serious problems, since the new entry would have been before the old one
on the list. This old entry would have eventually been scavenged/removed.

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

8 years agoMFC r285878:
kib [Sat, 1 Aug 2015 03:37:00 +0000 (03:37 +0000)]
MFC r285878:
Revert r173708's modifications to vm_object_page_remove().
This fixes inconsistencies encountered by vm_object_unwire() or
by the buffer cache when the file is truncated.

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

8 years agoMFC: r285113
rmacklem [Fri, 31 Jul 2015 21:31:58 +0000 (21:31 +0000)]
MFC: r285113
If a "principal" argument isn't provided for a Kerberized NFS mount,
the kernel would generate a bogus one with a ":/<path>" suffix.
This would only occur for the case where there was no explicit
"principal" argument and the getaddrinfo() call in mount_nfs.c failed to a
return a cannonical name for the server.
This patch fixes this unusual case.

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

8 years agoMFC r286131:
gjb [Fri, 31 Jul 2015 15:25:07 +0000 (15:25 +0000)]
MFC r286131:
 Pull pmspcv (pms(4)) from GENERIC.  It has PCI ID conflicts
 with ahd(4), mvs(4), and likely other drivers.

With hat: re
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285945, r285960:
garga [Fri, 31 Jul 2015 12:02:44 +0000 (12:02 +0000)]
MFC r285945, r285960:

Respect pf rule log option before log dropped packets with IP options or
dangerous v6 headers

Reviewed by: gnn, eri
Approved by: gnn, glebius
Obtained from: pfSense
Sponsored by: Netgate
Differential Revision: https://reviews.freebsd.org/D3222

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

8 years agoMFC: r285946 and r285947
smh [Fri, 31 Jul 2015 09:43:07 +0000 (09:43 +0000)]
MFC: r285946 and r285947

Add warning about low KSTACK_PAGES for ZFS use.

Sponsored by: Multiplay

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

8 years agoMFC r285669:
kevlo [Fri, 31 Jul 2015 03:40:09 +0000 (03:40 +0000)]
MFC r285669:

Since the IETF has redefined the meaning of the tos field to accommodate
a set of differentiated services, set IPTOS_PREC_* macros using
IPTOS_DSCP_* macro definitions.

While here, add IPTOS_DSCP_VA macro according to RFC 5865.

Differential Revision: https://reviews.freebsd.org/D3119
Reviewed by: gnn

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

8 years agoMFC r285623:
kevlo [Fri, 31 Jul 2015 03:35:27 +0000 (03:35 +0000)]
MFC r285623:

Fix typo in register definition.

Submitted by: James Hung
Reviewed by: sbruno

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

8 years agoMFC r285782:
markj [Fri, 31 Jul 2015 00:21:40 +0000 (00:21 +0000)]
MFC r285782:
Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).

PR: 201700

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

8 years agoMFC r285972:
bdrewery [Thu, 30 Jul 2015 17:04:15 +0000 (17:04 +0000)]
MFC r285972:

  MFV r285970:

    Apply upstream changeset bf4f6ec64e:

    Fix issue 356: properly skip a sparse file entry in a tar file.

PR: 201506
Relnotes: yes

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

8 years agoMFC r285999 (kp):
gjb [Thu, 30 Jul 2015 16:06:13 +0000 (16:06 +0000)]
MFC r285999 (kp):
  pf: Always initialise pf_fragment.fr_flags

  When we allocate the struct pf_fragment in pf_fillup_fragment() we
  forgot to initialise the fr_flags field. As a result we sometimes
  mistakenly thought the fragment to not be a buffered fragment.
  This resulted in panics because we'd end up freeing the pf_fragment
  but not removing it from V_pf_fragqueue (believing it to be part of
  V_pf_cachequeue).  The next time we iterated V_pf_fragqueue we'd use
  a freed object and panic.

  While here also fix a pf_fragment use after free in pf_normalize_ip().
  pf_reassemble() frees the pf_fragment, so we can't use it any more.

X-MFS-To: releng/10.2
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285420:
jamie [Thu, 30 Jul 2015 04:53:53 +0000 (04:53 +0000)]
MFC r285420:

  Run a shell in the jail when no command is specified.
  Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
  Change the GET_USER_INFO macro into a function.

PR: 201300
Submitted by: Willem Jan Withagen

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

8 years agoMFC: r285843
marius [Thu, 30 Jul 2015 02:23:09 +0000 (02:23 +0000)]
MFC: r285843

- Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling
  uart_bus_attach() during its test that 20 iterations weren't sufficient
  for clearing all pending interrupts, assuming this means that hardware
  is broken and doesn't deassert interrupts. However, under pressure, 20
  iterations also can be insufficient for clearing all pending interrupts,
  leading to a panic as intr_event_handle() tries to schedule an interrupt
  handler not registered. Solve this by introducing a flag that is set in
  test mode and otherwise restores pre-r253161 behavior of uart_intr(). The
  approach of additionally registering uart_intr() as handler as suggested
  in PR 194979 is not taken as that in turn would abuse special pccard and
  pccbb handling code of intr_event_handle(). [1]
- Const'ify uart_driver_name.
- Fix some minor style bugs.

PR: 194979 [1]
Reviewed by: marcel (earlier version)

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

8 years agoMFC: r285839
marius [Thu, 30 Jul 2015 02:06:29 +0000 (02:06 +0000)]
MFC: r285839

o Revert the other functional half of r239864, i. e. the merge of r134227
  from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus()
  but also for the MD cache invalidation, TLB demapping and remote register
  reading IPIs due to the following reasons:
  - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on
    sparc64. That's because on sparc64, spin locks don't disable interrupts
    completely but only raise the processor interrupt level to PIL_TICK. This
    means that IPIs still get delivered and direct dispatch IPIs such as the
    cache invalidation etc. IPIs in question are still executed.
  - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an
    IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action().
    Consequently, smp_ipi_mtx may be locked for an extended amount of time as
    queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are
    scheduled via a soft interrupt. Moreover, given that this soft interrupt
    is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action()
    on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in
    turn leading to the target in question trying to send an IPI by itself
    while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a
    deadlock.
o As mentioned in the commit message of r245850, on least some sun4u platforms
  concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the
  reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers,
  i. e. ipi_{all_but_self,cpu,selected}().
o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started
  instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually
  are started, when smp_started is no longer 0.
o In all MD and MI IPI helpers, check for smp_started == 1 rather than for
  smp_cpus > 1 or nothing at all. This avoids races during boot causing IPIs
  trying to be delivered to APs that in fact aren't up and running, yet.
  While at it, move setting of the cpu_ipi_{selected,single}() pointers to
  the appropriate delivery functions from mp_init() to cpu_mp_start() where
  it's better suited and allows to get rid of the global isjbus variable.
o Given that now concurrent IPI delivery no longer is possible, also nuke
  the delays before completely disabling interrupts again in the CPU-specific
  cross-trap delivery functions, previously giving other CPUs a window for
  sending IPIs on their part. Actually, we now should be able to entirely get
  rid of completely disabling interrupts in these functions. Such a change
  needs more testing, though.
o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not
  necessary for correctness, this avoids page faults when accessing the stack
  of a foreign CPU as {s,}tick now is locked into the TLBs as part of static
  kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as
  possible, avoiding jitter.

PR: 201245

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

8 years agoMFC: r284447, r284552
marius [Thu, 30 Jul 2015 00:28:27 +0000 (00:28 +0000)]
MFC: r284447, r284552

Merge from NetBSD:
o rev. 1.10: Nuke trailing whitespace.
o rev. 1.15: Fix typo in comment.
o rev. 1.16: Add the following registers from IEEE 802.3-2009 Clause 22:
 - PSE control register (0x0b)
 - PSE status register (0x0c)
 - MMD access control register (0x0d)
 - MMD access address data register (0x0e)
o rev. 1.17 (comments only): The bit location of link ability is different
  between 1000Base-X and others (see Annex 28B.2 and 28D).
o rev. 1.18: Nuke dupe word.

Obtained from: NetBSD
Sponsored by: genua mbh

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

8 years agoMFC: r281752
marius [Thu, 30 Jul 2015 00:24:21 +0000 (00:24 +0000)]
MFC: r281752

Make a comment reflect reality.

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

8 years agoAdd updated llvm patch corresponding to r286033.
dim [Wed, 29 Jul 2015 19:27:57 +0000 (19:27 +0000)]
Add updated llvm patch corresponding to r286033.

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

8 years agoReapply r286007, modified to compile with pre-C++11 compilers:
dim [Wed, 29 Jul 2015 19:25:28 +0000 (19:25 +0000)]
Reapply r286007, modified to compile with pre-C++11 compilers:

Pull in r219009 from upstream llvm trunk (by Adam Nemet):

  [ISel] Keep matching state consistent when folding during X86 address match

  In the X86 backend, matching an address is initiated by the 'addr' complex
  pattern and its friends.  During this process we may reassociate and-of-shift
  into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the
  shift into the scale of the address.

  However as demonstrated by the testcase, this can trigger CSE of not only the
  shift and the AND which the code is prepared for but also the underlying load
  node.  In the testcase this node is sitting in the RecordedNode and MatchScope
  data structures of the matcher and becomes a deleted node upon CSE.  Returning
  from the complex pattern function, we try to access it again hitting an assert
  because the node is no longer a load even though this was checked before.

  Now obviously changing the DAG this late is bending the rules but I think it
  makes sense somewhat.  Outside of addresses we prefer and-of-shift because it
  may lead to smaller immediates (FoldMaskAndShiftToScale is an even better
  example because it create a non-canonical node).  We currently don't recognize
  addresses during DAGCombiner where arguably this canonicalization should be
  performed.  On the other hand, having this in the matcher allows us to cover
  all the cases where an address can be used in an instruction.

  I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for
  the new shift node in FoldMaskedShiftToScaledMask.  This RAUW is responsible
  for initiating the recursive CSE on users
  (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it
  is not strictly necessary since the shift is hooked into the visited user.  Of
  course it's safer to keep the DAG consistent at all times (e.g. for accurate
  number of uses, etc.).

  So rather than changing the fundamentals, I've decided to continue along the
  previous patches and detect the CSE.  This patch installs a very targeted
  DAGUpdateListener for the duration of a complex-pattern match and updates the
  matching state accordingly.  (Previous patches used HandleSDNode to detect the
  CSE but that's not practical here).  The listener is only installed on X86.

  I tested that there is no measurable overhead due to this while running
  through the spec2k BC files with llc.  The only thing we pay for is the
  creation of the listener.  The callback never ever triggers in spec2k since
  this is a corner case.

  Fixes rdar://problem/18206171

This fixes a possible crash in x86 code generation when compiling recent
llvm/clang trunk sources.

Direct commit to stable/10, since head already has llvm/clang 3.6.1,
which includes this fix.

Reported by: jonathan, theraven
Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=24249

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

8 years agoMFC 285325
eri [Wed, 29 Jul 2015 17:50:14 +0000 (17:50 +0000)]
MFC 285325
Correct issue presented in r285051 by properly initializing variable.

Differential Revision:  https://reviews.freebsd.org/D3036

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

8 years agoMFC r285051
eri [Wed, 29 Jul 2015 17:46:16 +0000 (17:46 +0000)]
MFC r285051
Avoid doing multiple route lookups for the same destination IP during forwarding.

Differential Revision: https://reviews.freebsd.org/D2964

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

8 years agoMFC: r285859
brueffer [Wed, 29 Jul 2015 17:05:42 +0000 (17:05 +0000)]
MFC: r285859

Auto-generate hardware notes for pms(4).

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

8 years agoMFC: r285858, r286017
brueffer [Wed, 29 Jul 2015 16:40:48 +0000 (16:40 +0000)]
MFC: r285858, r286017

Add a basic manpage for the pms driver.

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

8 years agoRevert r286007-r286009 for now, until I can figure out how to make the
dim [Wed, 29 Jul 2015 14:07:29 +0000 (14:07 +0000)]
Revert r286007-r286009 for now, until I can figure out how to make the
fix compile with older gcc and libstdc++.

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

8 years agoAdd llvm patch corresponding to r286007.
dim [Wed, 29 Jul 2015 13:07:18 +0000 (13:07 +0000)]
Add llvm patch corresponding to r286007.

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

8 years agoPull in r219009 from upstream llvm trunk (by Adam Nemet):
dim [Wed, 29 Jul 2015 12:59:16 +0000 (12:59 +0000)]
Pull in r219009 from upstream llvm trunk (by Adam Nemet):

  [ISel] Keep matching state consistent when folding during X86 address match

  In the X86 backend, matching an address is initiated by the 'addr' complex
  pattern and its friends.  During this process we may reassociate and-of-shift
  into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the
  shift into the scale of the address.

  However as demonstrated by the testcase, this can trigger CSE of not only the
  shift and the AND which the code is prepared for but also the underlying load
  node.  In the testcase this node is sitting in the RecordedNode and MatchScope
  data structures of the matcher and becomes a deleted node upon CSE.  Returning
  from the complex pattern function, we try to access it again hitting an assert
  because the node is no longer a load even though this was checked before.

  Now obviously changing the DAG this late is bending the rules but I think it
  makes sense somewhat.  Outside of addresses we prefer and-of-shift because it
  may lead to smaller immediates (FoldMaskAndShiftToScale is an even better
  example because it create a non-canonical node).  We currently don't recognize
  addresses during DAGCombiner where arguably this canonicalization should be
  performed.  On the other hand, having this in the matcher allows us to cover
  all the cases where an address can be used in an instruction.

  I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for
  the new shift node in FoldMaskedShiftToScaledMask.  This RAUW is responsible
  for initiating the recursive CSE on users
  (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it
  is not strictly necessary since the shift is hooked into the visited user.  Of
  course it's safer to keep the DAG consistent at all times (e.g. for accurate
  number of uses, etc.).

  So rather than changing the fundamentals, I've decided to continue along the
  previous patches and detect the CSE.  This patch installs a very targeted
  DAGUpdateListener for the duration of a complex-pattern match and updates the
  matching state accordingly.  (Previous patches used HandleSDNode to detect the
  CSE but that's not practical here).  The listener is only installed on X86.

  I tested that there is no measurable overhead due to this while running
  through the spec2k BC files with llc.  The only thing we pay for is the
  creation of the listener.  The callback never ever triggers in spec2k since
  this is a corner case.

  Fixes rdar://problem/18206171

This fixes a possible crash in x86 code generation when compiling recent
llvm/clang trunk sources.

Direct commit to stable/10, since head already has llvm/clang 3.6.1,
which includes this fix.

Reported by: jonathan, theraven
Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=24249

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

8 years agoMerge r285944: fix typo: delete nsn if we were the last reference.
glebius [Wed, 29 Jul 2015 11:12:56 +0000 (11:12 +0000)]
Merge r285944: fix typo: delete nsn if we were the last reference.

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

8 years agoDocument SA-15:14 through SA-15:17.
gjb [Tue, 28 Jul 2015 20:38:52 +0000 (20:38 +0000)]
Document SA-15:14 through SA-15:17.

Sponsored by: The FreeBSD Foundation

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

8 years agoFix patch(1) shell injection vulnerability. [SA-15:14]
delphij [Tue, 28 Jul 2015 19:58:44 +0000 (19:58 +0000)]
Fix patch(1) shell injection vulnerability. [SA-15:14]

Fix resource exhaustion in TCP reassembly. [SA-15:15]

Fix OpenSSH multiple vulnerabilities. [SA-15:16]

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

8 years agoMFC r285483: pipe_direct_write: Fix mismatched pipelock/unlock
cem [Tue, 28 Jul 2015 18:37:23 +0000 (18:37 +0000)]
MFC r285483: pipe_direct_write: Fix mismatched pipelock/unlock

If a signal is caught in pipelock, causing it to fail, pipe_direct_write
should not try to pipeunlock.

Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r284956:
kib [Tue, 28 Jul 2015 17:12:41 +0000 (17:12 +0000)]
MFC r284956:
Do not calculate the stack's bottom address twice.

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

8 years agoMFC r285039:
kib [Tue, 28 Jul 2015 17:08:32 +0000 (17:08 +0000)]
MFC r285039:
Remove asserts which might reference freed memory.

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

8 years agoMFC r285173:
kib [Tue, 28 Jul 2015 17:06:13 +0000 (17:06 +0000)]
MFC r285173:
Document the locking context for the directly dispatched callouts.
Cross-reference timeout(9).

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

8 years agoMFC r285134 (by mjg):
kib [Tue, 28 Jul 2015 16:39:36 +0000 (16:39 +0000)]
MFC r285134 (by mjg):
fd: de-k&r-ify functions + some whitespace fixes

MFC r285269:
Handle copyout for the fcntl(F_OGETLK) using oflock structure.

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

8 years agoFix the description for r274486.
gjb [Tue, 28 Jul 2015 15:03:56 +0000 (15:03 +0000)]
Fix the description for r274486.

Submitted by: glebius
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285248: lldb: use .PATH to find man page instead of symlinking it
emaste [Tue, 28 Jul 2015 12:46:37 +0000 (12:46 +0000)]
MFC r285248: lldb: use .PATH to find man page instead of symlinking it

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

8 years agoMFC r285246: Avoid creating invalid UEFI device path
emaste [Tue, 28 Jul 2015 12:45:08 +0000 (12:45 +0000)]
MFC r285246: Avoid creating invalid UEFI device path

The UEFI loader on the 10.1 release install disk (disc1) modifies an
existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to
truncate the device path.  In doing so it creates an invalid device
path.

Perform the equivalent action without modification of structures
allocated by firmware.

PR: 197641
Submitted by: Chris Ruffin <chris.ruffin at intel.com>

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

8 years agoMFC r201289: mfiutil: increase buffer size to accommodate sprintf string
emaste [Tue, 28 Jul 2015 12:40:41 +0000 (12:40 +0000)]
MFC r201289: mfiutil: increase buffer size to accommodate sprintf string

PR: 201289

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

8 years agoMerge r283106:
glebius [Tue, 28 Jul 2015 09:21:19 +0000 (09:21 +0000)]
Merge r283106:
  During module unload unlock rules before destroying UMA zones, which
  may sleep in uma_drain(). It is safe to unlock here, since we are already
  dehooked from pfil(9) and all pf threads had quit.

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

8 years agoMFC r285340:
dim [Tue, 28 Jul 2015 09:19:04 +0000 (09:19 +0000)]
MFC r285340:

Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function.
Detected by clang 3.7.0 with the warning:

sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable
'rptr' is uninitialized when used here [-Werror,-Wuninitialized]
chp->cq.rptr = rptr;
       ^~~~

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

8 years agoMerge r283061, r283063: don't dereference NULL is pf_get_mtag() fails.
glebius [Tue, 28 Jul 2015 09:16:54 +0000 (09:16 +0000)]
Merge r283061, r283063: don't dereference NULL is pf_get_mtag() fails.

PR: 200222

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

8 years agoMerge 280169: always lock the hash row of a source node when updating
glebius [Tue, 28 Jul 2015 09:13:55 +0000 (09:13 +0000)]
Merge 280169: always lock the hash row of a source node when updating
its 'states' counter.

PR: 182401

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

8 years agoMerge r271458:
glebius [Tue, 28 Jul 2015 09:09:01 +0000 (09:09 +0000)]
Merge r271458:
  - Provide a sleepable lock to protect against ioctl() vs ioctl() races.
  - Use the new lock to protect against simultaneous DIOCSTART and/or
    DIOCSTOP ioctls.

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

8 years agoMFC r285735:
ae [Tue, 28 Jul 2015 08:22:50 +0000 (08:22 +0000)]
MFC r285735:
  lseek() allows an offset to be set beyond the end of file. Using
  it to check that partition has enough space to write bootcode doesn't
  work. Use the known size of provider instead.

  PR: 201504

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

8 years agomake ctdladm(8) return 0 is everything was ok.
bapt [Tue, 28 Jul 2015 05:48:58 +0000 (05:48 +0000)]
make ctdladm(8) return 0 is everything was ok.

retval is used to test the return of XML_Parse function which is ok if 1 is
returned and retval it directly returned to the main function and used as an
exit value.

if all the parsing part is done reset retval to 0 so that the command return 0
if everything ok

Differential Revision: https://reviews.freebsd.org/D3102
Reviewed by: trasz
Sponsored by: gandi.net

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

8 years agoMFC r285785 Do not enable UDP checksum offloading when running on the
whu [Tue, 28 Jul 2015 05:46:37 +0000 (05:46 +0000)]
MFC r285785 Do not enable UDP checksum offloading when running on the
Hyper-V on Windows Server 2012 and earlier hosts.

Submitted by: whu
Reviewed by: royger
Approved by: royger
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D3217

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

8 years agoMFC r285816:
jimharris [Mon, 27 Jul 2015 15:37:02 +0000 (15:37 +0000)]
MFC r285816:

  nvme: ensure csts.rdy bit is cleared before returning from nvme_ctrlr_disable

Sponsored by: Intel

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

8 years agoMFC r285815:
jimharris [Mon, 27 Jul 2015 15:35:36 +0000 (15:35 +0000)]
MFC r285815:

  nvme: properly handle case where pci_alloc_msix does not alloc all vectors

Sponsored by: Intel

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

8 years agoMFC r285796:
jimharris [Mon, 27 Jul 2015 15:34:02 +0000 (15:34 +0000)]
MFC r285796:

  nvmecontrol: read controller identify data before any log page operations

Sponsored by: Intel

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

8 years agoMFC r285767:
jimharris [Mon, 27 Jul 2015 15:32:37 +0000 (15:32 +0000)]
MFC r285767:

  nvd: set d_delmaxsize to full capacity of NVMe namespace

  The NVMe specification has no ability to specify a maximum delete size
  that is less than the full capacity of the namespace - so just using the
  namespace size is the correct value here.

  This fixes reported issues where ZFS trim on init looked like it was
  hanging the system - previously the default I/O max size (128KB on
  Intel NVMe controllers) was used for delete operations which worked out
  to only about 8MB/s.  With this patch I can add an 800GB DC P3700
  drive to a ZFS pool in about 15-20 seconds.

Sponsored by: Intel

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

8 years agoMFC: r285066
rmacklem [Mon, 27 Jul 2015 00:28:51 +0000 (00:28 +0000)]
MFC: r285066
Alex Burlyga reported a POLA violation for the new NFS client as
compared to the old NFS client via email to the freebsd-fs@ mailing list.
For the new client, when multiple clients attempted to create a symbolic
link concurrently, more that one client would report success instead of
EEXIST. This was caused by code in the new client that mapped EEXIST to
OK assuming it was caused by a retried RPC request.
Since the old client did not do this, the patch defaults to the old
behaviour and permits the new behaviour to be enabled via a sysctl.

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

8 years agoFurther refine the PAE_TABLES entry, based on feedback from
gjb [Sun, 26 Jul 2015 17:57:35 +0000 (17:57 +0000)]
Further refine the PAE_TABLES entry, based on feedback from
alc.

Sponsored by: The FreeBSD Foundation

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

8 years agoPartially revert r284034. In particular, revert the final change in this
jhb [Sat, 25 Jul 2015 00:14:02 +0000 (00:14 +0000)]
Partially revert r284034.  In particular, revert the final change in this
MFC (281874).  It broke suspend and resume on several Thinkpads (though not
all) in 10 even though it works fine on the same laptops in HEAD.

PR: 201239
Reported by: Kevin Oberman and several others

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

8 years agoMFC r285701:
delphij [Fri, 24 Jul 2015 19:51:51 +0000 (19:51 +0000)]
MFC r285701:

Use fixed date/time (the time choosen was the time the import was done
on -HEAD) in libntp so we can make reproducible build.

PR: bin/201661
Differential Revision: https://reviews.freebsd.org/D3122

While I'm there also remove libmd from linkage as reported in bin/201738

PR: bin/201738
Submitted by: John Marshall

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

8 years agoMFC r285719:
pfg [Fri, 24 Jul 2015 19:21:48 +0000 (19:21 +0000)]
MFC r285719:
snmp_hostres(3): Fix buffer overflow.

Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches.

CID: 1007594

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

8 years agoMFC r277485 by rrs: Fix minor errors found by coverity.
emaste [Fri, 24 Jul 2015 19:09:11 +0000 (19:09 +0000)]
MFC r277485 by rrs: Fix minor errors found by coverity.

PR: 201594
Sponsored by: The FreeBSD Foundation

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

8 years ago- Reset stable/10 back to -PRERELEASE status now that releng/10.2
gjb [Thu, 23 Jul 2015 23:35:20 +0000 (23:35 +0000)]
- Reset stable/10 back to -PRERELEASE status now that releng/10.2
  has been branched.
- Update __FreeBSD_version to reflect the new -STABLE branch.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r285261, r285279:
hrs [Thu, 23 Jul 2015 20:01:56 +0000 (20:01 +0000)]
MFC r285261, r285279:

- Fix offset calculation in variable substitution
  in jail.conf.  The following did not work correctly:

 A="A_${B}_C_${D}"
 B="BBBBB"
 D="DDDD_${E}_FFFFF"
 E="EEEEE"

- Implement PF_IMMUTABLE flag and apply it to "name" and "jid" in
  jail.conf parameters.  This flag disallows redefinition of the parameter.

  "name" and/or "jid" are automatically defined in jail.conf by using
  the jail names at the front of jail parameter definitions.  However,
  one could override them by using a variable with the same name like
  $name = "foo".  This confused the parser and could end up with SIGSEGV.

  Note that this change also affects a case when all of parameters are
  defined in the command line arguments, not in jail.conf.  Specifically,
  "jail -c name=j1 name=j2" no longer works.  This should be harmless.

Approved by: re (gjb)

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