MFC r275368:
When passing LUN IDs through treat ASCII values as fixed-length, not
interpreating NULLs as EOLs, but converting them to spaces.

SPC-4 does not tell that T10-based IDs should be NULL-terminated/padded.
And while it tells that it should include only ASCII chars (0x20-0x7F),
there are some USB sticks (SanDisk Ultra Fit), that have NULLs inside
the value.  Treating NULLs as EOLs there made those LUN IDs non-unique.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r267361:
  Improve logic besides net.bpf.optimize_writers.
  Direct bpf(4) consumers should now work fine with this tunable turned on.
  In fact, the only case when optimized_writers can change program
  behavior is direct bpf(4) consumer setting its read filter to
  catch-all one.

Sponsored by:	Yandex LLC


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275071:

Reinstitate send() after syslogd restarts.

In r228193 the test of CONNPRIV have been moved to before the _usleep
and send in vsyslog().  When syslogd restarts, this would prevent the
message being logged after the disconnect/connect dance for
scenario #1.

PR:		194751
Submitted by:	Peter Creath <pjcreath+freebsd gmail com>
Reviewed By:	glebius


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r257302 (by rea):

binutils/bfd: fix printf-like format strings for "bfd *" arguments

There is a special format argument '%B' that directly handles values
of type 'bfd *', they must be used instead of '%s'.  Manifestations
of this bug can be seen in ld(1) error messages, for example,
  http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
  http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html

Approved by:	dim

MFC r275386:

Let GNU ld be less obscure about missing symbols and DSOs.  If the BFD
object looks like a typical shared library, suggest adding '-l<foo>',
where <foo> has the 'lib' prefix and '.so<bar>' or '.a' suffix removed.

Otherwise, suggest adding '-l:<foo>', where <foo> is the full DT_SONAME.

Submitted by:	Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by:	EMC / Isilon storage division
Reviewed by:	emaste
PR:		194296
Differential Revision: https://reviews.freebsd.org/D1152


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix multiple vulnerabilities in file(1) and libmagic(3).

Security:	FreeBSD-SA-14:28.file
Security:	CVE-2014-3710, CVE-2014-8116, CVE-2014-8117

Fix BIND remote denial of service vulnerability.

Security:	FreeBSD-SA-14:29.bind
Security:	CVE-2014-8500


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275477:

Pull in r174303 from upstream gcc trunk (by Jason Merrill):

  PR c++/48211
  * name-lookup.h (cp_class_binding): Make base a pointer.
  * name-lookup.c (new_class_binding): Adjust.
  (poplevel_class): Adjust.

This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc.  See also the upstream bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211

Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275699 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274411: Improve CAM's reaction on asymmetric access errors.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275723 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275636:
Move OFED init a bit earlier so that PXE boot works.

Sponsored by:	Mellanox Technologies


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275725 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r275213.

Set the current vnet inside the ioctl handler for ipfilter.

Without this fix, the vnet was NULL and would crash.
This fix is similar to what was done inside the ioctl handler for PF.

Tested by:
   (1) Boot a kernel with "options VIMAGE" enabled
   (2) Type:

   echo "map lo0 from 10.0.0.0/24 to ! 10.0.0.0/24 -> 127.0.0.1/32" > /etc/ipnat.rules ; service ipnat onerestart

PR: 176992
Differential Revision: https://reviews.freebsd.org/D1191


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@275741 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275633:

Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin):

  PR21302. Vectorize only bottom-tested loops.

  rdar://problem/18886083

This fixes a bug in the llvm vectorizer, which could sometimes cause
vectorized loops to perform an additional iteration, leading to possible
buffer overruns.  Symptoms of this, which are usually segfaults, were
first noticed when building gcc ports, here:

https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/095466.html
https://lists.freebsd.org/pipermail/freebsd-toolchain/2014-September/001211.html

Since this fix is very important for ports, bump __FreeBSD_version to
make it easier for port maintainers to test whether the fix has been
applied.

Upstream PR:	http://llvm.org/PR21302


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