]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
10 years agoMFC r259043:
kib [Fri, 13 Dec 2013 06:00:44 +0000 (06:00 +0000)]
MFC r259043:
Build an allocator for the aligned memory on top of the rtld-private
malloc.

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

10 years agoMFC r259042:
kib [Fri, 13 Dec 2013 05:54:30 +0000 (05:54 +0000)]
MFC r259042:
Do not force to run atexit handlers, which text comes from a dso owning
the handle passed to __cxa_finalize() but which are registered by other
dso, when the process is inside exit(3).

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

10 years agoMFC r259156:
eadler [Fri, 13 Dec 2013 00:56:05 +0000 (00:56 +0000)]
MFC r259156:
mtest(8): use correct macro in mdoc

The An macros is used for authors while the Ar macro is used for arguments.
AFAIK mcast-addr and ifname are not authors.

PR: docs/184649

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

10 years agoMFC r259274
rodrigc [Thu, 12 Dec 2013 21:51:33 +0000 (21:51 +0000)]
MFC r259274

Mention BIND removal in release notes.

Submitted by: skreuzer

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

10 years agoMFC r258712;
pfg [Thu, 12 Dec 2013 19:01:50 +0000 (19:01 +0000)]
MFC r258712;

libcpp: fix an underflow.

Similar fix seen in Apple's gcc42.

Obtained from: OpenBSD (Rev 1.2)
MFC after: 2 weeks

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

10 years agoMFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
pfg [Thu, 12 Dec 2013 18:15:32 +0000 (18:15 +0000)]
MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
r258206, r258207, r258321

This is a series of commits inspired on Google's gcc-4.2.1 for
Android that were taken from the gcc pre-4.3 under the GPLv2.

gcc: Backport fixes for -W parentheses in C++
This fixes GCC 19564.
gcc: merge rs6000 change from FSF pre-gcc43
Don't set MASK_PPC_GFXOPT for 8540 or 8548.
Merge vrp-tree fix from gcc-4.3
Fix missed conversion from / to >> (GCC PR32521)
Merge in GCCr120505 to include definition of TREE_OVERFLOW_P
gcc: warn about integer overflow in constant expressions in the C++ frontend.
gcc: Add a new option -Wvla to warn variable length array.
libcpp: preprocessor speedup patches from upstream gcc.
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
gcc: Fix postreload-gcse treatment of call-clobbered registers.
gcc: Record some previous commits in the ChangeLog.gcc43 file.

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

10 years agoMFC: r258427, r258694
andreast [Thu, 12 Dec 2013 13:00:07 +0000 (13:00 +0000)]
MFC: r258427, r258694

r258694:
Make RTAS calls, which call setfault() to recover from machine checks,
preserve any existing fault buffer. RTAS calls are meant to be safe from
interrupt context (and are indeed used there to implement the xics PIC
driver). Without this, calling into RTAS in interrupt context would have
the effect of clearing any existing onfault state of the interrupted
thread, potentially leading to a panic.

r258427:
For PCI<->PCI bridges, #address-cells may be 3. Allow this when parsing the
ibm,dma-window properties. This is especially a concern when
#ibm,dma-address-cells is not specified and we have to use the regular
#address-cells property.

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

10 years agoMFC: r258051, r258052
andreast [Thu, 12 Dec 2013 12:36:40 +0000 (12:36 +0000)]
MFC: r258051, r258052

r258052:
Following the approach with ACPI DMAR on x86, split IOMMU handling into
a variant PCI bus instead of trying to shoehorn it into the PCI host bridge
adapter. Besides matching better the architecture on other platforms, this
also allows systems with multiple partitionable endpoints per PCI host
bridge to work correctly.

r258051:
Actually add IOMMU domain to the list of known mappings. This fixes a bug
where multiple devices in the same IOMMU domain would be allocated
conflicting mappings unless they also shared a DMA tag.

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

10 years agoMFC: r258722, r258757
andreast [Thu, 12 Dec 2013 12:29:35 +0000 (12:29 +0000)]
MFC: r258722, r258757

r258722:
Give some output about the CPU clock on IBMPOWER machines, currently read
from OF. Linux does it similar, means they also read the OF values and
display them.
r258757:
Use the Open Firmware-based CPU frequency determination as a generic
fallback if we can't measure CPU frequency. This is also useful on a
variety of embedded systems using FDT.

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

10 years agoMFC: r256932, r256938, r256953
andreast [Thu, 12 Dec 2013 12:17:20 +0000 (12:17 +0000)]
MFC: r256932, r256938, r256953

r256932:
Add a new function (OF_getencprop()) that undoes the transformation applied
by encode-int. Specifically, it takes a set of 32-bit cell values and
changes them to host byte order. Most non-string instances of OF_getprop()
should be using this function, which is a no-op on big-endian platforms.

r256938:
A few other common cases for encode-int decoding: OF_getencprop_alloc()
and OF_searchencprop(). I thought about using the element size parameter
to OF_getprop_alloc() to do endian-switching automatically, but it breaks
use with structs and a *lot* of FDT code (which can hopefully be moved to
these new APIs).

r256953:
Fix build.

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

10 years agoMFC r258658:
mdf [Thu, 12 Dec 2013 02:03:42 +0000 (02:03 +0000)]
MFC r258658:

Fix a segfault / internal compiler error.

Among other causes, when gcc throws a warning before parsing any tokens,
the cur_token pointer is at the beginning of malloc'd memory.
Dereferencing cur_token[-1] can cause a segfault.

Code taken from OpenBSD
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
which was a more complete fix than the one I originally coded.

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

10 years agoMFC r259145:
np [Thu, 12 Dec 2013 00:27:27 +0000 (00:27 +0000)]
MFC r259145:
Unstaticize t4_list and t4_uld_list.  This works around a clang
annoyance[1] and allows kgdb to find these symbols.

[1] http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041166.html

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

10 years agoMFC: r257901
rmacklem [Wed, 11 Dec 2013 23:28:31 +0000 (23:28 +0000)]
MFC: r257901
Fix an NFSv4.1 client specific case where a forced dismount would hang.
The hang occurred in nfsv4_setsequence() when it couldn't find an
available session slot and is fixed by checking for a forced dismount
in progress and just returning for this case.

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

10 years agoMFC r258930:
dumbbell [Wed, 11 Dec 2013 23:15:19 +0000 (23:15 +0000)]
MFC r258930:

drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge

Before this fix, capabilities were read from vgapci and were incorrect.

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

10 years agoMFC r259104:
dumbbell [Wed, 11 Dec 2013 23:06:03 +0000 (23:06 +0000)]
MFC r259104:

drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD

The code was unmodified compared to Linux and returned the amount of
received bytes from the i2c bus. This led to non-working i2c bus and
failure to eg. read monitor's EDID, if connected to DisplayPort.

Tested by: Mikaël Urankar <mikael.urankar@gmail.com>

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

10 years agoMFC r257991, r257992, 257993, 258504
andreast [Wed, 11 Dec 2013 22:36:20 +0000 (22:36 +0000)]
MFC     r257991, r257992, 257993, 258504

r257991:
  Consolidate Apple firmware hacks and improve them by switching on the
  presence of mac-io devices in the tree, which uniquely identifies Apple
  hardware.

r257992:
  Allow OF_decode_addr() to also be able to map resources on big-endian
  devices. To this end, make PCI device detection rely on the device_type
  field rather than name, as per the standard.

r257993:

  Make tsec work with the device tree present on the RB800. The previous code
  assumed that the MDIO bus was a direct child of the Ethernet interface. It
  may not be and indeed on many device trees is not. While here, add proper
  locking for MII transactions, which may be on a bus shared by several MACs.

r258504:

  Save and restore the trap vectors when doing OF calls on pSeries machines.

  It turned out that on pSeries machines the call into OF modified the trap
  vectors and this made further behaviour unpredictable.

  With this commit I'm now able to boot multi user on a network booted
  environment on my IntelliStation 285. This is a POWER5+ machine.

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

10 years agoMFC r259101:
dumbbell [Wed, 11 Dec 2013 22:26:09 +0000 (22:26 +0000)]
MFC r259101:

drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes

This fixes radeon_agp_init() and gtt_size is now correct. However, this
is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
implemented yet.

Submitted by: tijl@

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

10 years agoMFC r259007
andreast [Wed, 11 Dec 2013 22:00:03 +0000 (22:00 +0000)]
MFC r259007

Increase PHYS_AVAIL_SZ because on pSeries machines we can have many logical
regions which represent the total amount of memory. The size of these regions
is not the physical size of the chip but it is a logical one and it is given
by the OpenFirmware, it is selectable at boot time and varies between 16MB and
256MB in my case. There is an 'automatic' option which would select the size as
64MB in case you have around 16GB of RAM.
To make sure we can allocate RAM with the automatic option bump this value
of PHYS_AVAIL_SZ to 256.

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

10 years agoMFC r258778
andreast [Wed, 11 Dec 2013 21:41:21 +0000 (21:41 +0000)]
MFC r258778

Add a printf to inform about the logical memory block size which is in use
by the system. This might give a hint why a pSeries system is not booting.

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

10 years agoMFC r258615
andreast [Wed, 11 Dec 2013 21:37:32 +0000 (21:37 +0000)]
MFC r258615

Take care to handle the full 16 byte buffer in the get/put routines. Also,
skip the VTERM header once when receiving data from the hypervisor call when
we have a HVTERMPROT connection.

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

10 years agoMFC r258503
andreast [Wed, 11 Dec 2013 20:56:23 +0000 (20:56 +0000)]
MFC r258503

Limit the large page size to 16MB for now.

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

10 years agoMFC r257805, r257806, r257807, r257942:
gjb [Wed, 11 Dec 2013 19:26:56 +0000 (19:26 +0000)]
MFC r257805, r257806, r257807, r257942:

r257805:
  Add a 'mini-memstick.img' release target, which will use the
  'bootonly.iso' components to create a smaller memory stick image.

  This is useful for system recovery, where a full memstick.img image
  is not necessarily needed (or wanted).  In addition, it is possible
  to do bootonly-style installation, where the base.txz, kernel.txz,
  etc. are fetched from a remote source.

  Provide backwards-compatible target (mini-memstick), to keep in sync
  with the targets documented in release/Makefile.

r257806:
  Remove extra target from 'memstick' that I forgot to remove before
  previous commit.

r257807:
  Update release(7) to include 'mini-memstick'.

r257942:
  Fix a few style nits.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r256448, r257029;
pfg [Wed, 11 Dec 2013 19:25:17 +0000 (19:25 +0000)]
MFC r256448, r257029;

Make di_blocks unsigned in UFS1 as is the case already for UFS2.
 Most of the code between UFS1 and UFS2 is shared so this change
 is pretty safe. Not only this makes UFS1 and 2 consistent but it
 also matches what NetBSD and MacOS X have for some years now.

UFS2: make di_extsize unsigned.
 di_extsize is the EA size and as such it should be unsigned.
 Adjust related types for consistency.

Reviewed by: mckusick

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

10 years agoMFC r259111:
dim [Wed, 11 Dec 2013 07:43:30 +0000 (07:43 +0000)]
MFC r259111:

Use correct casts in gcc's emmintrin.h for the first arguments of the
following builtin functions:

* __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
* __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
* __builtin_ia32_psradi128() takes __v4si instead of __v8hi

This should fix the following errors when building the LINT kernel with
gcc:

sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
'__builtin_ia32_psradi128'
sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
'__builtin_ia32_pslldi128'

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

10 years agoMFC r259100:
dim [Wed, 11 Dec 2013 07:34:34 +0000 (07:34 +0000)]
MFC r259100:

Pull in r196658 from upstream clang trunk:

  CodeGen: Don't emit linkage on thunks that aren't emitted because they're
  vararg.

  This can happen when we're trying to emit a thunk with available_externally
  linkage with optimization enabled but bail because it doesn't make sense for
  vararg functions.

  [LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by: se

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

10 years agoMFC: r257598
rmacklem [Wed, 11 Dec 2013 00:39:56 +0000 (00:39 +0000)]
MFC: r257598
During code inspection, I spotted that there was a code path where
CLNT_CONTROL() would be called on "client" after it was
released via CLNT_RELEASE(). It was unlikely that this
code path gets executed and I have not heard of any problem
report caused by this bug. This patch fixes the code so that
this cannot happen.

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

10 years agoMFC r258692 (gnn).
np [Wed, 11 Dec 2013 00:17:13 +0000 (00:17 +0000)]
MFC r258692 (gnn).

Add constants for use in interrogating various fiber and copper connectors
most often used with network interfaces.

The SFF-8472 standard defines the information that can be retrieved
from an optic or a copper cable plugged into a NIC, most often
referred to as SFP+.  Examples of values that can be read
include the cable vendor's name, part number, date of manufacture
as well as running data such as temperature, voltage and tx
and rx power.

Copious comments on how to use these values with an I2C interface
are given in the header file itself.

Discussed with: gnn

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

10 years agoMFC r257345,257382,257388:
nwhitehorn [Tue, 10 Dec 2013 22:55:22 +0000 (22:55 +0000)]
MFC r257345,257382,257388:

Implement extended LUN support. If PIM_EXTLUNS is set by a SIM, encode
the upper 32-bits of the LUN, if possible, into the target_lun field as
passed directly from the REPORT LUNs response. This allows extended LUN
support to work for all LUNs with zeros in the lower 32-bits, which covers
most addressing modes without breaking KBI. Behavior for drivers not
setting PIM_EXTLUNS is unchanged. No user-facing interfaces are modified.

Extended LUNs are stored with swizzled 16-bit word order so that, for
devices implementing LUN addressing (like SCSI-2), the numerical
representation of the LUN is identical with and without PIM_EXTLUNS. Thus
setting PIM_EXTLUNS keeps most behavior, and user-facing LUN IDs, unchanged.
This follows the strategy used in Solaris. A macro (CAM_EXTLUN_BYTE_SWIZZLE)
is provided to transform a lun_id_t into a uint64_t ordered for the wire.

This is the second part of work for full 64-bit extended LUN support and is
designed to a bridge for stable/10 to the final 64-bit LUN code. The
third and final part will involve widening lun_id_t to 64 bits and will
not be MFCed. This third part will break the KBI but will keep the KPI
unchanged so that all drivers that will care about this can be updated now
and not require code changes between HEAD and stable/10.

Reviewed by: scottl

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

10 years agoMerge r257065 (by adrian) from head:
gavin [Tue, 10 Dec 2013 13:42:59 +0000 (13:42 +0000)]
Merge r257065 (by adrian) from head:

  Fix a use-after-free node reference issue when waiting for a return
  from a management frame transmission.

  This bug is a bit loopy, so here goes.

  The underlying cause is pretty easy to understand - the node isn't
  referenced before passing into the callout, so if the node is deleted
  before the callout fires, it'll dereference free'd memory.

  The code path however is slightly more convoluted.

  The functions _say_ mgt_tx - ie management transmit - which is partially
  true.  Yes, that callback is attached to the mbuf for some management
  frames.  However, it's only for frames relating to scanning and
  authentication attempts.  It helpfully drives the VAP state back to
  "SCAN" if the transmission fails _OR_ (as I subsequently found out!)
  if the transmission succeeds but the state machine doesn't make progress
  towards being authenticated and active.

  Now, the code itself isn't terribly clear about this.

  It _looks_ like it's just handling the transmit failure case.

  However, when you look at what goes on in the transmit success case, it's
  moving the VAP state back to SCAN if it hasn't changed state since
  the time the callback was scheduled.  Ie, if it's in ASSOC or AUTH still,
  it'll go back to SCAN.  But if it has transitioned to the RUN state,
  the comparison will fail and it'll not transition things back to the
  SCAN state.

  So, to fix this, I decided to leave everything the way it is and merely
  fix the locking and remove the node reference.

  The _better_ fix would be to turn this callout into a "assoc/auth request"
  timeout callback and make the callout locked, thus eliminating all races.
  However, until all the drivers have been fixed so that transmit completions
  occur outside of any locking that's going on, it's going to be impossible
  to do this without introducing LORs.  So, I leave some of the evilness
  in there.

Candidate for 10.0.

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

10 years agoMerge r256294 (by adrian) from head:
gavin [Tue, 10 Dec 2013 13:38:39 +0000 (13:38 +0000)]
Merge r256294 (by adrian) from head:

  Fix the "am I a net80211 vap" check for bpf listeners.

  I changed it to use if_transmit a while ago but apparently with monitor
  mode the if_transmit method is overridden.

  This is (mostly) a workaround until a more permanent solution can be
  found.

Candidate for 10.0.

Submitted by: Patrick Kelsey <kelsey@ieee.org>

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

10 years agoMerge r258758 (by adrian) from head:
gavin [Tue, 10 Dec 2013 13:36:56 +0000 (13:36 +0000)]
Merge r258758 (by adrian) from head:

  Make sure any waiters on the scan results get notified if the scan task
  decides to do nothing.

  If this isn't done, then a scan request whilst a scan occurs in an
  active channel set or a completed channel set will hang.

Candidate for 10.0.

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

10 years agoMerge r257754 (by adrian) from head:
gavin [Tue, 10 Dec 2013 13:35:04 +0000 (13:35 +0000)]
Merge r257754 (by adrian) from head:

  Don't return ENOBUFS if the transmit path handles the frame but queues
  it (eg in power save.)

10.0 candidate.

PR: kern/183727

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

10 years agoMFC r259083:
dim [Tue, 10 Dec 2013 07:28:26 +0000 (07:28 +0000)]
MFC r259083:

For WARNS <= 3, change the clang warning flag -Wno-conversion to
-Wno-enum-conversion.  In earlier clang versions (before 3.2), the
latter did not exist, and suppressing enum conversion warnings was
really the goal of this warning suppression flag.

This should enable the same kind of warning again as was fixed by
r259072 ("incompatible integer to pointer conversion passing 'Elf_Addr'
(aka 'unsigned int') to parameter of type 'void *'"), and which was only
emitted by gcc.

Noticed by: kib

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

10 years agoMFC r259053:
dim [Tue, 10 Dec 2013 07:25:25 +0000 (07:25 +0000)]
MFC r259053:

Pull in r196590 from upstream clang trunk (by rdivacky):

  Move the body of GCCInstallationDetector ctor into an init() function
  and call it from its only user. The linux toolchain. This saves quite
  a lot of directory searching on other platforms.

See http://docs.freebsd.org/cgi/mid.cgi?51E6FAF5.3080802 for the
original discussion.  With this fix, the search for gcc installations is
completely eliminated on FreeBSD.

Reported by: Kurt Lidl <lidl@pix.net>

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

10 years agoMFC r259079:
gjb [Tue, 10 Dec 2013 00:35:33 +0000 (00:35 +0000)]
MFC r259079:
  Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
  passed to 'make release'.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r257654, r257772, r258441, r258689, r258698, r258879, r259048, and
np [Mon, 9 Dec 2013 22:40:22 +0000 (22:40 +0000)]
MFC r257654, r257772, r258441, r258689, r258698, r258879, r259048, and
r259103.

r257654:
cxgbe(4): Exclude MPS_RPLC_MAP_CTL (0x11114) from the register dump.  Turns
out it's a write-only register with strange side effects on read.

r257772:
cxgbe(4): Tidy up the display for payload memory statistics (pm_stats).

r258441:
cxgbe(4): update the internal list of device features.

r258689:
Disable an assertion that relies on some code[1] that isn't in HEAD yet.

r258698:
cxgbetool: "modinfo" command to display SFP+ module information.

r258879:
cxgbe(4):  T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
scheduling classes in the chip and to bind tx queue(s) to a scheduling
class respectively.  These can be used for various kinds of tx traffic
throttling (to force selected tx queues to drain at a fixed Kbps rate,
or a % of the port's total bandwidth, or at a fixed pps rate, etc.).

r259048:
Two new cxgbetool subcommands to set up scheduler classes and to bind
them to NIC queues.

r259103:
cxgbe(4): save a copy of the RSS map for each port for the driver's use.

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

10 years agoMFC r259094 - Fix undocumented side effect of r256256 that changes/breaks
peter [Mon, 9 Dec 2013 21:32:36 +0000 (21:32 +0000)]
MFC r259094 - Fix undocumented side effect of r256256 that changes/breaks
existing jails.  This burned us in the freebsd cluster yesterday.

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

10 years agoRegenerate after r259138
bdrewery [Mon, 9 Dec 2013 21:07:57 +0000 (21:07 +0000)]
Regenerate after r259138

Approved by: bapt (implicit)

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

10 years agoMFC r258924:
bdrewery [Mon, 9 Dec 2013 20:47:50 +0000 (20:47 +0000)]
MFC r258924:

  Add missing period for WITHOUT_PKGBOOTSTRAP so that it matches all
  other entries.

Approved by: bapt (implicit)

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

10 years agoHoist all the mergeinfo up to the root in preparation for enforcing merges
peter [Sat, 7 Dec 2013 18:23:29 +0000 (18:23 +0000)]
Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only.  All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root.  Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x.  This confuses the coalescing
code and prevents it from doing its job.

Approved by: re (gjb, implicit)

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

10 years agoBump __FreeBSD_version to 1000700, to set it higher than what is in
gjb [Sat, 7 Dec 2013 13:06:14 +0000 (13:06 +0000)]
Bump __FreeBSD_version to 1000700, to set it higher than what is in
releng/10.0 now.

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

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

10 years agoSet stable/10 to -PRERELEASE, now that releng/10.0 has been branched.
gjb [Sat, 7 Dec 2013 11:33:07 +0000 (11:33 +0000)]
Set stable/10 to -PRERELEASE, now that releng/10.0 has been branched.

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

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

10 years agoMFC r258927: Fix a regression introduced by SVN r257842 that prevents
dteske [Sat, 7 Dec 2013 00:33:10 +0000 (00:33 +0000)]
MFC r258927: Fix a regression introduced by SVN r257842 that prevents
Encryption from being enabled.

Approved by: re (gjb)

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

10 years agoMFC r258948:
delphij [Fri, 6 Dec 2013 23:40:50 +0000 (23:40 +0000)]
MFC r258948:

Support Hyper-V on i386:

 - Add 'hyperv' module into build;
 - Allow building Hyper-V support as part of the kernel;
 - Hook Hyper-V build into NOTES.

Approved by: re (rodrigc)

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

10 years agoMFC r258941:
delphij [Fri, 6 Dec 2013 23:30:46 +0000 (23:30 +0000)]
MFC r258941:

Apply vendor improvements to oce(4) driver:

 - Add support to 40Gbps devices;
 - Add support to control adaptive interrupt coalescing (AIC)
   via sysctl;
 - Improve support of BE3 devices;

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by: Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Approved by: re (rodrigc)

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

10 years agoMFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM.
cperciva [Fri, 6 Dec 2013 20:48:53 +0000 (20:48 +0000)]
MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM.

The rc system aggressively caches the contents of /etc/rc.conf in order to
improve boot performance; this produces arguably astonishing (non-)results
if /etc/rc.conf is modified during the boot process.  This commit provides
a mechanism for explicitly requesting that rc.conf be reloaded.

Approved by: re (rodrigc)

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

10 years agoMFC 258178:
royger [Thu, 5 Dec 2013 18:09:48 +0000 (18:09 +0000)]
MFC 258178:

Improve robustness of the Xen balloon driver.

sys/dev/xen/balloon/balloon.c:
Remove unused and commented out code.

Fix deadlock caused by performing a sleepable malloc
while holding the balloon mutex.

Perform proper accounting of the memory used by the domain.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: gibbs (mentor)
Approved by: re (gjb)

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

10 years agoMFC 258176:
royger [Thu, 5 Dec 2013 18:08:05 +0000 (18:08 +0000)]
MFC 258176:

Fix accounting for hw.realmem on the i386 and amd64 platforms.

sys/i386/i386/machdep.c:
sys/amd64/amd64/machdep.c:
The value reported by FreeBSD as "real memory" when booting
doesn't match what is later reported by sysctl as hw.realmem.
This is due to the fact that the value printed during the
boot process is fetched from smbios data (when possible),
and accounts for holes in physical memory. On the other
hand, the value of hw.realmem is unconditionally set to be
one larger than the highest page of the physical address
space.

Fix this by setting hw.realmem to the same value printed
during boot, this makes hw.realmem honour it's name and
account properly for physical memory present in the system.

Submitted by: Roger Pau Monné
Reviewed by: gibbs
Approved by: gibbs (mentor)
Approved by: re (gjb)

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

10 years agoMFC 257876:
royger [Thu, 5 Dec 2013 18:06:12 +0000 (18:06 +0000)]
MFC 257876:

On XenServer the "halt" message is used instead of "poweroff", which
makes FreeBSD halt but not poweroff (as expected when issuing a
shutdown from the VM manager). Fix this by using the same handler
for both "halt" and "poweroff".

NB: The "halt" signal seems to be used on XenServer only.  The OSS
    Xen toolstack (xl) uses "poweroff" instead.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: gibbs (mentor)
Approved by: re (gjb)

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

10 years agoMFC r257769 to stable/10
sbruno [Thu, 5 Dec 2013 17:57:51 +0000 (17:57 +0000)]
MFC r257769 to stable/10

Fix powerd/states on AMD cpus.  Resolves issues with system reporting:
hwpstate0: set freq failed, err 6

Tested on FX-8150 and others.

PR: kern/167018
Submitted by: avg@
Approved by: re (gjb)

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

10 years agoMFC r258842:
trasz [Thu, 5 Dec 2013 16:29:22 +0000 (16:29 +0000)]
MFC r258842:

Grammar fix.

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

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

10 years agoMFC r258841:
trasz [Thu, 5 Dec 2013 16:14:56 +0000 (16:14 +0000)]
MFC r258841:

Fix typos.

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

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

10 years agoMFC r258830:
yongari [Thu, 5 Dec 2013 06:13:59 +0000 (06:13 +0000)]
MFC r258830:
  Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787.
  PR: 184304
  Approved by: re (rodrigc)

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

10 years agoMFC r258914
rodrigc [Thu, 5 Dec 2013 01:21:45 +0000 (01:21 +0000)]
MFC r258914

Update release notes.

Submitted by: skreuzer
Approved by: re (delphij)

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

10 years agoMFC r258854:
gjb [Thu, 5 Dec 2013 01:06:05 +0000 (01:06 +0000)]
MFC r258854:
  Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since
  the format of 'pkg -vv' output has changed.

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

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

10 years agoMFC r258786, r258796, r258797, r258847, r258853, r258949:
gjb [Thu, 5 Dec 2013 00:59:29 +0000 (00:59 +0000)]
MFC r258786, r258796, r258797, r258847, r258853, r258949:

r258786:
  Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise
  the textproc/docproj port build fails.

r258796 (hrs):
  - Prevent TARGET and TARGET_ARCH from being defined as empty when
    TARGET="" and/or TARGET_ARCH="" is specified.
  - Remove extra ().

r258797 (hrs):
  Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk.

r258847:
  Provide reproducibility between builds by building pkg(8) from ports,
  instead of using pkg-bootstrap.

  This should resolve a problem that was discovered during 10.0-BETA4
  freebsd-update(8) builds,

r258853:
  Turn off the dvdrom target by default.  dvd1.iso is now built by
  specifying 'WITH_DVD=1' during 'make release'.

  This caused some problems during the freebsd-update builds for
  10.0-BETA4.

r258949:
  Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating
  to true.

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

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

10 years agoMFC: r258718: fix emulated jail_v0 byte order
peter [Wed, 4 Dec 2013 18:25:04 +0000 (18:25 +0000)]
MFC: r258718: fix emulated jail_v0 byte order

Approved by: re (gjb)

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

10 years agoMFC r258495:
mav [Wed, 4 Dec 2013 10:54:23 +0000 (10:54 +0000)]
MFC r258495:
Update description of logical CPU handling in the latest releases and
remove obsolete sysctl variable machdep.hlt_logical_cpus.

Approved by: re (hrs)

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

10 years agoMFC r258790:
trasz [Wed, 4 Dec 2013 09:46:27 +0000 (09:46 +0000)]
MFC r258790:

Fix hang on reboot with active iSCSI connections.

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

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

10 years agoMFC 258591
rodrigc [Wed, 4 Dec 2013 07:55:49 +0000 (07:55 +0000)]
MFC 258591
In vnet_route_uninit(), free some memory that is allocated in vnet_route_init().

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html
            http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html

This doesn't eliminate all the "Freed UMA keg was not empty" warning messages
on the console, but it helps.

Approved by: re (gjb)

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

10 years agoMFC r258588
rodrigc [Wed, 4 Dec 2013 07:50:18 +0000 (07:50 +0000)]
MFC r258588

In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);".
This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit().

Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(),
but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions.
In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c,
IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN
and
IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER

Consequently, if VIMAGE is enabled, and jails are created and destroyed,
the system sometimes crashes, because we are trying to use a deleted lock.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL,
so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit().

Approved by: re (gjb)

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

10 years agoMFC r258737
rodrigc [Wed, 4 Dec 2013 07:46:53 +0000 (07:46 +0000)]
MFC r258737

In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty"
message printed to the console.  This makes it easier to track down
the source of certain memory leaks.

Suggested by: adrian
Approved by: re (gjb)

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

10 years agoMFC r258738
rodrigc [Wed, 4 Dec 2013 07:45:08 +0000 (07:45 +0000)]
MFC r258738

Also mention that drill(1) can be used, now that nslookup and dig are no
longer in the base system.

Suggested by: peter
Approved by: re (gjb)

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

10 years agoMFC r258574:
tuexen [Tue, 3 Dec 2013 20:55:37 +0000 (20:55 +0000)]
MFC r258574:

Only initialize some mutexes for the default VNET.

In r208160, sctp_it_ctl was made a global variable, across all VNETs.
However, sctp_init() is called for every VNET that is created.  This results
in the same global mutexes which are part of sctp_it_ctl being initialized.  This can result
in crashes if many jails are created.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Witness will warn about the same mutex being initialized.

Fix the problem by only initializing these mutexes in the default VNET.

MFC r258765:

In
http://svnweb.freebsd.org/changeset/base/258221
I introduced a bug which initialized global locks
whenever the SCTP stack initialized. This was fixed in
http://svnweb.freebsd.org/changeset/base/258574
by rodrigc@. He just initialized the locks for
the default vnet. This fix reverts to the old
behaviour before r258221, which explicitly makes
sure it is only called once, because this works also on
other platforms.

Approved by: re@ (gjb)

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

10 years agoMFC r258663:
kib [Tue, 3 Dec 2013 19:42:46 +0000 (19:42 +0000)]
MFC r258663:
Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline
location for the native amd64 ABI.  This fixes unwinding over the
signal frame after trampoline was moved to the shared page.

Approved by: re (gjb)

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

10 years agoMFC r258660:
kib [Tue, 3 Dec 2013 19:41:48 +0000 (19:41 +0000)]
MFC r258660:
Fix sys/sysctl.h use for cc -m32 on amd64.

Approved by: re (gjb)

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

10 years agoMFC r258661:
kib [Tue, 3 Dec 2013 19:40:32 +0000 (19:40 +0000)]
MFC r258661:
Add sysctl KERN_PROC_SIGTRAMP to retrieve signal trampoline location for the
given process.

Approved by: re (gjb)

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

10 years agoMFC r258043:
trasz [Tue, 3 Dec 2013 18:35:17 +0000 (18:35 +0000)]
MFC r258043:

Fix typo.

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

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

10 years agoMFC r258042:
trasz [Tue, 3 Dec 2013 18:28:18 +0000 (18:28 +0000)]
MFC r258042:

Fix description to actually make sense.

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

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

10 years agoMFC r258041:
trasz [Tue, 3 Dec 2013 18:18:35 +0000 (18:18 +0000)]
MFC r258041:

Mention acl_get_brand_np(3).

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

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

10 years agoUpdate stable/10 to BETA4 as part of the 10.0-RELEASE cycle.
gjb [Sat, 30 Nov 2013 17:40:48 +0000 (17:40 +0000)]
Update stable/10 to BETA4 as part of the 10.0-RELEASE cycle.

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

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

10 years agoMFC r258550:
gjb [Sat, 30 Nov 2013 17:33:49 +0000 (17:33 +0000)]
MFC r258550:
  Do not create pkg.conf, as it is not necessary anymore
  and packagesite is deprecated

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

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

10 years agoMFC r258499:
kib [Sat, 30 Nov 2013 14:36:32 +0000 (14:36 +0000)]
MFC r258499:
Fix for the spurious signal handler call with zero signo in the threaded
process.

Approved by: re (hrs)

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

10 years agoMFC r258664:
delphij [Sat, 30 Nov 2013 07:03:18 +0000 (07:03 +0000)]
MFC r258664:

Create /var/cache with mode 0755 instead of 0750.

This directory is used by many third party applications and having
permission 0750 makes it impossible to drop group privileges.

Approved by: re (glebius)

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

10 years agoMFC r258669:
gjb [Sat, 30 Nov 2013 03:31:40 +0000 (03:31 +0000)]
MFC r258669:
  Document the dvdrom target and NODVD variable.

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

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

10 years agoMFC r258347,r258349:
bdrewery [Fri, 29 Nov 2013 21:13:30 +0000 (21:13 +0000)]
MFC r258347,r258349:

  Support SNI in libfetch

  SNI is Server Name Indentification which is a protocol for TLS that
  indicates the host that is being connected to at the start of the
  handshake. It allows to use Virtual Hosts on HTTPS.

PR: kern/183583
Approved by: bapt (implicit)
Approved by: re (gjb)

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

10 years agoMFC r258348:
bdrewery [Fri, 29 Nov 2013 21:12:35 +0000 (21:12 +0000)]
MFC r258348:

  Document 'enabled' as boolean instead of string.

Approved by: bapt (implicit)
Approved by: re (gjb)

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

10 years agoMFC r258537, r258587:
gjb [Fri, 29 Nov 2013 19:44:30 +0000 (19:44 +0000)]
MFC r258537, r258587:

r258537 (hrs):
  Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl.  GNU iconv returns
  EILSEQ when there is an invalid character in the output codeset
  while it is valid in the input.  However, POSIX requires iconv()
  to perform an implementation-defined conversion on the character.
  So, Citrus iconv converts such a character to a special character
  which means it is invalid in the output codeset.

  This is not a problem in most cases but some software like libxml2
  depends on GNU's behavior to determine if a character is output
  as-is or another form such as a character entity (&#NNN;).

r258587 (peter):
  Move the iconv wrapper source from libc_nonshared to libc/iconv so
  that it is all in the one place again.  Rename libc/iconv/iconv.c
  to bsd_iconv.c. Compile the wrappers into libc.a so that
  WITHOUT_DYNAMICROOT works again.

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

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

10 years agoMFC r258620:
dim [Fri, 29 Nov 2013 18:06:02 +0000 (18:06 +0000)]
MFC r258620:

Pull in r195558 from upstream clang trunk:

  Fix a SSE2 intrinsics typo

  Full discourse at:

   http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html
   http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html

  Patch by Dimitry Andric and Alexey Dokuchaev!

Reported by: danfe
Approved by: re (gjb)

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

10 years agoMFC r258714
rodrigc [Fri, 29 Nov 2013 07:12:10 +0000 (07:12 +0000)]
MFC r258714
  Add some text to clarify that nslookup and dig are no longer in the
  base system after the removal of BIND.

Approved by: re (delphij)

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

10 years agoMFC r257879:
delphij [Thu, 28 Nov 2013 22:06:37 +0000 (22:06 +0000)]
MFC r257879:

Fix typo in r256646: We want to generate lists of directories in
INDEX-OLD and INDEX-NEW and compare them, not generate the same
list of directories from INDEX-OLD twice...

Pointy hats to: cperciva & everybody who didn't proofread
EN-13:04 enough
Errata Notice: FreeBSD-EN-13:05.freebsd-update
Approved by: re (gjb)

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

10 years agoMFC r258227 (bapt):
gjb [Thu, 28 Nov 2013 14:24:26 +0000 (14:24 +0000)]
MFC r258227 (bapt):
 Enabled should be a boolean, not a string

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

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

10 years agoMFC r258549 and r258553:
dumbbell [Thu, 28 Nov 2013 10:04:53 +0000 (10:04 +0000)]
MFC r258549 and r258553:

drm: Dereference pointers given to qsort_r()'s cmp callback

drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the
array passed to qsort_r(), not the elements themselves.

Before this fix, the use of qsort_r() shuffled the array, not sorted it,
because the compare callback accessed random memory locations, not the
expected elements.

This bug triggered an infinite loop in KDE/xserver:

    1. KDE has a kded module called "randrmonitor" which queries xserver
       for current monitors at startup and then listens to RandR
       notifications from xserver.

    2. xserver handles the query from "randrmonitor" by polling the
       video device using the "drm_mode_getconnector()" ioctl. This
       ioctl returns a list of connectors and, for those with a
       connected monitor, the available modes. Each modes list is sorted
       by the kernel before returning. When xserver gets the connectors
       list, it sorts the modes lists again.

       In the case of this bug, when two modes are equal (in xserver's
       compare function PoV), their order is kept stable (ie. the
       kernel order is kept for those two modes). And because the list
       was shuffled by the kernel, the order of two equal modes was
       frequently changed in the final modes list in xserver.

    3. xserver compares the returned connectors list with the list
       obtained earlier. In particular, it compares the sorted
       modes lists for each connector. If a property of a connector
       changes (eg. modes), xserver sends a "RRNotify_OutputChange"
       notification.

       Because of the change of order between equal modes, xserver sent
       a notification after each polling of the connectors.

    4. "randrmonitor" receives a notification, triggered by its query. The
       notification doesn't contain the new connectors list, therefore, it
       asks for the new list using the same function: go back to step #2.

Approved by: re (kib)

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

10 years agoMFC r258262:
dumbbell [Thu, 28 Nov 2013 09:30:05 +0000 (09:30 +0000)]
MFC r258262:

drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability

This fixes DPMS with KDE and radeonkms. Without this, the display would
freeze when the monitor is put into sleep state, and only resumes after
several dozens of minutes once the monitor is powered on again.

Tested by: Mathias Picker <Mathias.Picker@virtual-earth.de>
Approved by: re (kib)

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

10 years agoMFC: r258456
brooks [Tue, 26 Nov 2013 16:13:48 +0000 (16:13 +0000)]
MFC: r258456

Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is
nmtree.

The mtree output used by mergemaster in this case was clearly not meant for
computer consumption and an approach based on -f <file1> -f <file2> would
probably be a better idea, but this is a minimal change.

Approved by: re (glebius)

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

10 years agoMFC r258437:
brooks [Tue, 26 Nov 2013 16:12:40 +0000 (16:12 +0000)]
MFC r258437:

Sync with NetBSD.  The functional change is to make the output when
comparing a directory to an mtree file more compatible with fmtree when
FreeBSD 9 compatiblity mode is on.  This output is clearly intended for
humans not computers, but some tools such as mergemaster's -U option rely
on it.

Approved by: re (glebius)

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

10 years ago[Forced commit to correct checkin comment for r256757]
gibbs [Tue, 26 Nov 2013 14:50:39 +0000 (14:50 +0000)]
[Forced commit to correct checkin comment for r256757]

MFC: r256423

Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and
prior releases.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (gjb)

sys/dev/xen/blkfront/blkfront.c:
On XenServer versions up to an including 6.2, paravirtualized
CDROM support is broken.  When running in an HVM domain,
ignore paravirtualized instances of CDROM media, and instead
rely on native drivers attaching to emulated hardware.  This
functions correctly on all currently known Xen based
platforms.
------------------------------------------------------------------------

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

10 years agoMFC r258399,258492:
jmg [Tue, 26 Nov 2013 08:46:39 +0000 (08:46 +0000)]
MFC r258399,258492:
mark aesni module _SYNC, improves performance ~27%...

Approved by: re (glebius)

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

10 years agoMFC r258350:
dim [Mon, 25 Nov 2013 22:56:46 +0000 (22:56 +0000)]
MFC r258350:

Pull in r191896 from upstream llvm trunk:

  CaptureTracking: Plug a loophole in the "too many uses" heuristic.

  The heuristic was added to avoid spending too much compile time in a
  specially crafted test case (PR17461, PR16474) with many uses on a
  select or bitcast instruction can still trigger the slow case. Add a
  check for that case.

  This only affects compile time, don't have a good way to test it.

This fixes the excessive compile time spent on a specific file of the
graphics/rawtherapee port.

Reported by: mandree
Approved by: re (gjb)

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

10 years agoMFC r258294:
smh [Mon, 25 Nov 2013 20:47:37 +0000 (20:47 +0000)]
MFC r258294:
Fix ZFS deadlock when sending a snapshot which is mounted.

Approved by: re (glebius)
Sponsored by: Multiplay

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

10 years agoMFC 258570
rodrigc [Mon, 25 Nov 2013 20:39:09 +0000 (20:39 +0000)]
MFC 258570

Change sysinstall.8 references to bsdinstall.8.

Submitted by: skreuzer
Approved by: re (delphij)

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

10 years agoMFV r258378: 4089 NULL pointer dereference in arc_read()
avg [Mon, 25 Nov 2013 17:30:18 +0000 (17:30 +0000)]
MFV r258378: 4089 NULL pointer dereference in arc_read()

illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea

Tested by: adrian
Approved by: re (gjb)

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

10 years agoMFV r258377: 4088 use after free in arc_release()
avg [Mon, 25 Nov 2013 17:19:05 +0000 (17:19 +0000)]
MFV r258377: 4088 use after free in arc_release()

illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772

Approved by: re (gjb)

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

10 years agoMFC r258353: zfs page_busy: fix the boundaries of the cleared range
avg [Mon, 25 Nov 2013 16:31:31 +0000 (16:31 +0000)]
MFC r258353: zfs page_busy: fix the boundaries of the cleared range

This is a fix for a regression introduced in r246293.

vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries,
otherwise it extends them.  Thus it can happen that the whole page is
marked clean while actually having some small dirty region(s).
This commit makes the range properly aligned and ensures that only
the clean data is marked as such.

It would interesting to evaluate how much benefit clearing with DEV_BSIZE
granularity produces.  Perhaps instead we should clear the whole page
when it is completely overwritten and don't bother clearing any bits
if only a portion a page is written.

Reviewed by: kib
Approved by: re (gjb)

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

10 years agoMFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
emaste [Mon, 25 Nov 2013 15:58:48 +0000 (15:58 +0000)]
MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)

  Debuggers may need to change PSL_RF. Note that tf_eflags is already stored
  in the signal context during signal handling and PSL_RF previously could
  be modified via sigreturn, so this change should not provide any new
  ability to userspace.

  For background see the thread at:
  http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html

  Reviewed by: jhb, kib

Sponsored by: DARPA, AFRL
Approved by: re (gjb)

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

10 years agoMFC r258426: libexecinfo: Include terminating null in byte count
emaste [Mon, 25 Nov 2013 15:54:18 +0000 (15:54 +0000)]
MFC r258426: libexecinfo: Include terminating null in byte count

  Otherwise, a formatted string with a strlen equal to the remaining
  buffer space would have the last character omitted (because vsnprintf
  always null-terminates), and later the assert in backtrace_symbols_fmt
  would fail.

Sponsored by: DARPA, AFRL
Approved by: re (gjb)

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

10 years agoMFC: r258387,r258425
gber [Mon, 25 Nov 2013 15:34:57 +0000 (15:34 +0000)]
MFC: r258387,r258425
Split raw reading/programming into smaller chunks to avoid allocating too
big chunk of kernel memory. Validate size of data. Add error handling to
avoid calling copyout() when data has not been read correctly. Also MFC of
change r258425 which fixes problem introduced by r258387.

Reviewed by:    zbb
Reported by:    x90c <geinblues@gmail.com>
Approved by:    re

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

10 years agoMFC r258086:
cperciva [Sun, 24 Nov 2013 23:30:23 +0000 (23:30 +0000)]
MFC r258086:
  Strip the -pN patch level from the VERSION string which gets encoded into
  CTF data.  Otherwise FreeBSD Update builds think every kernel file has
  changed every time there's a security advisory, since the FreeBSD Update
  build code isn't smart enough to look inside CTF data to ignore those
  changes.

Approved by: re (gjb)

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

10 years agoMFC r256951:
mjg [Sat, 23 Nov 2013 23:54:38 +0000 (23:54 +0000)]
MFC r256951:
gnop: make sure that newly allocated memory for softc is zeroed

This prevents mtx_init from encountering non-zeros and panicking
the kernel as a result.

Approved by: re

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

10 years agoMFC r258316:
tijl [Sat, 23 Nov 2013 12:17:05 +0000 (12:17 +0000)]
MFC r258316:

Bug fixes in iconv(3) UTF-7 support.

- Add ' to the list of directly encoded characters and * to the list of
  optionally directly encoded characters as per RFC 2152.

- In _citrus_UTF7_mbtoutf16 on end of input when the next output character
  has only been partially decoded, save a copy of the buffer of input
  characters (not just its length).  On the next call with more input
  characters this buffer is reprocessed together with the new input to
  form a fully decoded output character.

- At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT)
  by decrementing psenc->chlen and i.  This is needed to make room in
  psenc->ch (input buffer) in case the next input character starts a new
  base64 encoded sequence.  And also, if this is the end of input and no
  output character can be returned, this brings the encoder in the initial
  state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which
  is used by the caller to distinguish between no output and partial
  output.

- In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer)
  directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0).  This way s
  is updated correctly in case of errors.

- In _citrus_UTF7_mbrtowc_priv when called with psenc->surrogate set
  (previous call did not have enough input), retrieve the previously
  decoded UTF-16 character from (psenc->cache >> psenc->bits) instead of
  (psenc->cache >> 2).

Approved by: re (kib)

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