]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
10 years agoMFC 197775,197777-197779,197781,197794,243152,243313,255478:
jhb [Mon, 13 Jan 2014 21:29:34 +0000 (21:29 +0000)]
MFC 197775,197777-197779,197781,197794,243152,243313,255478:
First cut at implementing SOCK_SEQPACKET support for UNIX (local) domain
sockets.  This allows for reliable bi-directional datagram communication
over UNIX domain sockets, in contrast to SOCK_DGRAM (M:N, unreliable) or
SOCK_STERAM (bi-directional bytestream).  Largely, this reuses existing
UNIX domain socket code.  This allows applications requiring record-
oriented semantics to do so reliably via local IPC.

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

10 years agoMFC r259197:
mav [Mon, 13 Jan 2014 19:14:29 +0000 (19:14 +0000)]
MFC r259197:
Do not DELAY() for P-state transition unless we want to see the result.

Intel manual says: "If a transition is already in progress, transition to
a new value will subsequently take effect. Reads of IA32_PERF_CTL determine
the last targeted operating point."  So seems it should be fine to just
trigger wanted transition and go.  Linux does the same.

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

10 years agoMFC r259666, r259696:
pfg [Mon, 13 Jan 2014 16:05:18 +0000 (16:05 +0000)]
MFC r259666, r259696:

gcc: warnings from -Wformat-security

Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)

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

10 years agoMFC r259920:
pfg [Mon, 13 Jan 2014 15:32:37 +0000 (15:32 +0000)]
MFC r259920:

gcc: Implement -Wmost for compatibility with clang.

This is equivalent to -Wall -Wno-parentheses.

Obtained from: Apple GCC 4.2 - 5531

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

10 years agoMFC r258573:
pfg [Mon, 13 Jan 2014 15:28:39 +0000 (15:28 +0000)]
MFC r258573:

Removes strict-aliasing warnings from newer GCC in tcpdump.

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

10 years agoMFC r258081, r258138, r258143, r258179, r258157, r258204, r258205,
pfg [Mon, 13 Jan 2014 15:22:37 +0000 (15:22 +0000)]
MFC r258081, r258138, r258143, r258179, r258157, r258204, r258205,
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.

Tested by: danfe

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

10 years agoMFC r260184:
hselasky [Sat, 11 Jan 2014 08:24:52 +0000 (08:24 +0000)]
MFC r260184:
Minor correction for the XHCI reset logic.

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

10 years agoMFC r260361:
pfg [Sat, 11 Jan 2014 01:50:45 +0000 (01:50 +0000)]
MFC r260361:

gcc: Fix optimization bug.

GCC-PR rtl-optimization/34628
* combine.c (try_combine): Stop and undo after the first combination
if an autoincrement side-effect on the first insn has effectively
been lost.

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

10 years agoRevert MFC of r258821 - it was already handled by MFC of r239672.
peter [Wed, 8 Jan 2014 03:16:50 +0000 (03:16 +0000)]
Revert MFC of r258821 - it was already handled by MFC of r239672.

Pointy hat to: peter

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

10 years agoMerged r260415 from head.
edavis [Tue, 7 Jan 2014 23:14:55 +0000 (23:14 +0000)]
Merged r260415 from head.

Approved by: davidcd

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

10 years agoMFC r258821 - fix tcp simultaneous close
peter [Tue, 7 Jan 2014 23:02:13 +0000 (23:02 +0000)]
MFC r258821 - fix tcp simultaneous close

PR:             kern/99188

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

10 years agoMFC r260049:
trociny [Tue, 7 Jan 2014 21:25:18 +0000 (21:25 +0000)]
MFC r260049:

Add mibs for hastd(1) queue stats.

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

10 years agoMFC r235128:
hselasky [Sun, 5 Jan 2014 10:52:57 +0000 (10:52 +0000)]
MFC r235128:
Add missing LibUSB 1.0 API function: libusb_get_string_descriptor().

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

10 years agoMFC r260112:
dim [Sat, 4 Jan 2014 23:12:01 +0000 (23:12 +0000)]
MFC r260112:

In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.

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

10 years agoMFC r260095:
dim [Sat, 4 Jan 2014 22:00:07 +0000 (22:00 +0000)]
MFC r260095:

For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.

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

10 years agoMFC r260103:
dim [Sat, 4 Jan 2014 21:45:52 +0000 (21:45 +0000)]
MFC r260103:

In sys/amd64/amd64/pmap.c, remove static function pmap_is_current(),
which has been unused since r189415.

Reviewed by: alc

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

10 years agoMFC r260057:
dim [Sat, 4 Jan 2014 21:32:53 +0000 (21:32 +0000)]
MFC r260057:

In sys/dev/scc, remove unused static function scc_setmreg().  While
here, invoke scc_getmreg() in two more places where it can be used.

Reviewed by: marcel

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

10 years agoMFC r260055:
dim [Sat, 4 Jan 2014 21:18:54 +0000 (21:18 +0000)]
MFC r260055:

In sys/dev/usb/wlan/if_urtw.c, #if 0 a static const variable, which has
been unused since r198194.

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

10 years agoMFC r260054:
dim [Sat, 4 Jan 2014 19:13:25 +0000 (19:13 +0000)]
MFC r260054:

In sys/dev/tpm/tpm.c, #if 0 an unused static function.

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

10 years agoMFC r260048:
dim [Sat, 4 Jan 2014 19:04:53 +0000 (19:04 +0000)]
MFC r260048:

In sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[].

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

10 years agoMFC r260042:
dim [Sat, 4 Jan 2014 18:58:18 +0000 (18:58 +0000)]
MFC r260042:

Remove superfluous old-style rcsid[] from if_my.c.  There is already an
__FBSDID() at the top of the file.

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

10 years agoMFC r260040:
dim [Sat, 4 Jan 2014 18:53:31 +0000 (18:53 +0000)]
MFC r260040:

In sys/dev/mcd/mcd.c, mark the static const COPYRIGHT string as __used,
so it ends up in the object file, and no warnings are emitted about it
being actually unused.

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

10 years agoMFC r260038:
dim [Sat, 4 Jan 2014 18:48:29 +0000 (18:48 +0000)]
MFC r260038:

In sys/dev/en/midway.c, #if 0 an unused static function.

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

10 years agoMFC Broadcom 10Gb bxe driver
edavis [Sat, 4 Jan 2014 18:10:15 +0000 (18:10 +0000)]
MFC Broadcom 10Gb bxe driver
Merged r255736, r255861, r256299, r256341, r258187, r259928, r260113

Approved by:  davidch (mentor)

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

10 years agoMFC r260016:
dim [Sat, 4 Jan 2014 17:33:05 +0000 (17:33 +0000)]
MFC r260016:

Remove superfluous old-style rcsid[] from if_sk.c.  There is already an
__FBSDID() at the top of the file.

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

10 years agoMFC r259872:
pluknet [Thu, 2 Jan 2014 16:41:10 +0000 (16:41 +0000)]
MFC r259872:

 The compile time constant limit on number of swap devices was removed in 5.2.
 As such, remove the EINVAL error saying so.  Currently the vm.nswapdev sysctl
 just represents the number of added swap devices.

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

10 years agoMFC r260125:
gjb [Tue, 31 Dec 2013 12:25:04 +0000 (12:25 +0000)]
MFC r260125:
  Bump copyright year.
  Happy New Year 2014!

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196:
trociny [Sat, 28 Dec 2013 19:23:16 +0000 (19:23 +0000)]
MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196:

r257155:

Make hastctl list command output current queue sizes.

Reviewed by: pjd

r257582 (pjd):

Correct alignment.

r259191:

For memsync replication, hio_countdown is used not only as an
indication when a request can be moved to done queue, but also for
detecting the current state of memsync request.

This approach has problems, e.g. leaking a request if memsynk ack from
the secondary failed, or racy usage of write_complete, which should be
called only once per write request, but for memsync can be entered by
local_send_thread and ggate_send_thread simultaneously.

So the following approach is implemented instead:

1) Use hio_countdown only for counting components we waiting to
   complete, i.e. initially it is always 2 for any replication mode.

2) To distinguish between "memsync ack" and "memsync fin" responses
   from the secondary, add and use hio_memsyncacked field.

3) write_complete() in component threads is called only before
   releasing hio_countdown (i.e. before the hio may be returned to the
   done queue).

4) Add and use hio_writecount refcounter to detect when
   write_complete() can be called in memsync case.

Reported by: Pete French petefrench ingresso.co.uk
Tested by: Pete French petefrench ingresso.co.uk

r259192:

Add some macros to make the code more readable (no functional chages).

r259193:

Fix compiler warnings.

r259194:

In remote_send_thread, if sending a request fails don't take the
request back from the receive queue -- it might already be processed
by remote_recv_thread, which lead to crashes like below:

  (primary) Unable to receive reply header: Connection reset by peer.
  (primary) Unable to send request (Connection reset by peer):
      WRITE(954662912, 131072).
  (primary) Disconnected from kopusha:7772.
  (primary) Increasing localcnt to 1.
  (primary) Assertion failed: (old > 0), function refcnt_release,
      file refcnt.h, line 62.

Taking the request back was not necessary (it would properly be
processed by the remote_recv_thread) and only complicated things.

r259195:

Send wakeup to threads waiting on empty queue before releasing the
lock to decrease spurious wakeups.

Submitted by: davidxu

r259196:

Check remote protocol version only for the first connection (when it
is actually sent by the remote node).

Otherwise it generated confusing "Negotiated protocol version 1" debug
messages when processing the second connection.

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

10 years agoMFC r259756:
dim [Sat, 28 Dec 2013 00:03:15 +0000 (00:03 +0000)]
MFC r259756:

Get rid of register keyword usage in gperf, it is totally obsolete for
C++, and this allows gperf to be compiled for C++11 without a warning
about it.

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

10 years agoMFC r259973:
delphij [Fri, 27 Dec 2013 23:09:40 +0000 (23:09 +0000)]
MFC r259973:

Tighten default restrictions for ntpd(8) server and provide a link
to NTP access restriction documentation.

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

10 years agoMFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }.
jhb [Thu, 26 Dec 2013 16:59:50 +0000 (16:59 +0000)]
MFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }.

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

10 years agoMFC r259724:
dim [Wed, 25 Dec 2013 00:48:08 +0000 (00:48 +0000)]
MFC r259724:

Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by
zoulasc) to contrib/file:

  don't write a char to a pointer.

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

10 years agoMFC r259520:
ae [Tue, 24 Dec 2013 23:50:35 +0000 (23:50 +0000)]
MFC r259520:
  Fix copy/paste typo.

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

10 years agoMFC 258869:
jhb [Tue, 24 Dec 2013 19:03:30 +0000 (19:03 +0000)]
MFC 258869:
Fix an off-by-one error in r228960.  The maximum priority delta provided
by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting
priority value (before nice adjustment) is between SCHED_PRI_MIN and
SCHED_PRI_MAX, inclusive.

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

10 years agoMFC of 259626, tzdata2013i:
edwin [Thu, 19 Dec 2013 20:26:00 +0000 (20:26 +0000)]
MFC of 259626, tzdata2013i:

Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba

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

10 years agoMFC r258363:
truckman [Thu, 19 Dec 2013 09:46:14 +0000 (09:46 +0000)]
MFC r258363:

Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my
Virgin Mobile branded device.  It needs the U3GINIT_SCSIEJECT quirk.

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

10 years agoMFC r259248 and r259462:
hselasky [Thu, 19 Dec 2013 07:17:18 +0000 (07:17 +0000)]
MFC r259248 and r259462:
Set chain bit correctly. This will fix some problems sending and
receiving Zero Length Packets, ZLPs. See comment in code for more
information.

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

10 years agoMFC r259023 and r259095:
hselasky [Thu, 19 Dec 2013 07:09:28 +0000 (07:09 +0000)]
MFC r259023 and r259095:
Improve the XHCI command timeout recovery handling code.
Fix some typos while at it.

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

10 years agoMFC r258819,258928:
nwhitehorn [Mon, 16 Dec 2013 15:08:30 +0000 (15:08 +0000)]
MFC r258819,258928:

Add new sysctl, kern.supported_archs, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by: imp

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

10 years agoFix build breakage after r259449
bjk [Mon, 16 Dec 2013 06:56:38 +0000 (06:56 +0000)]
Fix build breakage after r259449

Approved by: hrs (mentor, src committer)

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

10 years agoMFC r259286,259424,259425:
bjk [Mon, 16 Dec 2013 02:30:56 +0000 (02:30 +0000)]
MFC r259286,259424,259425:
  Apply patch from upstream Heimdal for encoding fix

  RFC 4402 specifies the implementation of the gss_pseudo_random()
  function for the krb5 mechanism (and the C bindings therein).
  The implementation uses a PRF+ function that concatenates the output
  of individual krb5 pseudo-random operations produced with a counter
  and seed.  The original implementation of this function in Heimdal
  incorrectly encoded the counter as a little-endian integer, but the
  RFC specifies the counter encoding as big-endian.  The implementation
  initializes the counter to zero, so the first block of output (16 octets,
  for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
  that the counter should begin at 1, but both existing implementations
  begin with zero and it looks like the standard will be re-issued, with
  test vectors, to begin at zero.)

  This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
  from 13 October, 2013:
  % Fix krb5's gss_pseudo_random() (n is big-endian)
  %
  % The first enctype RFC3961 prf output length's bytes are correct because
  % the little- and big-endian representations of unsigned zero are the
  % same.  The second block of output was wrong because the counter was not
  % being encoded as big-endian.
  %
  % This change could break applications.  But those applications would not
  % have been interoperating with other implementations anyways (in
  % particular: MIT's).

Bump __FreeBSD_version accordingly and add a note in UPDATING.

Approved by: hrs (mentor, src committer)

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

10 years agoMFC r257987:
ae [Sat, 14 Dec 2013 04:24:50 +0000 (04:24 +0000)]
MFC r257987:
  Initialize prot variable.

  PR: 177417

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

10 years agoMFC r244673:
pfg [Fri, 13 Dec 2013 02:47:41 +0000 (02:47 +0000)]
MFC r244673:

Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.

This seems to be needed by newer compilers.

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

10 years agoMFC r258712;
pfg [Thu, 12 Dec 2013 19:02:42 +0000 (19:02 +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/8@259273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r241959:
pfg [Thu, 12 Dec 2013 16:18:45 +0000 (16:18 +0000)]
MFC r241959:

Fix a number of other clang warnings in libstdc++, which could appear
when building other C++ software with it.  Also fix one actual bug in
libsupc++, which was exposed by such a warning.  This latter fix is the
only functional change.

This is required for newer versions of gcc and clang which have
stricter warnings about parenthesis in C++ programs.

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

10 years agoMFC r256448, r257029;
pfg [Wed, 11 Dec 2013 19:30:27 +0000 (19:30 +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/8@259226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r258718: fix emulated jail_v0 byte order
peter [Sat, 30 Nov 2013 23:06:51 +0000 (23:06 +0000)]
MFC: r258718: fix emulated jail_v0 byte order

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

10 years agoMFC r246857:
pfg [Sat, 30 Nov 2013 21:29:34 +0000 (21:29 +0000)]
MFC r246857:

Regenerate libstdc++'s config.h, synchronizing it with our
almost-C99 headers.

After verifying the changes in the source code, avoid expl()
which is not available in 8.x (or 9.x).

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

10 years agoMFC r257879:
delphij [Thu, 28 Nov 2013 22:08:41 +0000 (22:08 +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

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

10 years agoMFC r229663: Allow to change vfs.zfs.arc_meta_limit at runtime.
avg [Tue, 26 Nov 2013 10:26:40 +0000 (10:26 +0000)]
MFC r229663: Allow to change vfs.zfs.arc_meta_limit at runtime.

- Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD,
as it is not a tunable.

MFC slacker: pjd

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

10 years agoMFC r240834: Add rounddown2() macro similar to the roundup2() macro.
avg [Mon, 25 Nov 2013 18:51:53 +0000 (18:51 +0000)]
MFC r240834: Add rounddown2() macro similar to the roundup2() macro.

MFC slacker: pjd

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

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

illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772

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

10 years agoMFC r258353: zfs page_busy: fix the boundaries of the cleared range
avg [Mon, 25 Nov 2013 15:40:20 +0000 (15:40 +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.

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

10 years agoMFC r255107;
pfg [Sun, 24 Nov 2013 22:10:37 +0000 (22:10 +0000)]
MFC r255107;

Add support for the GCC binary integer constants extension.

This is required to build the i965 backend with newer versions of mesa.

Original patch from Joerg Wunsch in GCC Bug 23479, under the GPLv2;
also taken from there in OpenBSD.

Obtained from: gcc 4.3 (rev. 125346; GPLv2)

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

10 years agoMFC 256274:
jhb [Fri, 15 Nov 2013 19:58:31 +0000 (19:58 +0000)]
MFC 256274:
Ignore attempts to set the nmbcluster sysctls to their current value
rather than failing with an error.

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

10 years agoMFC 256293:
jhb [Fri, 15 Nov 2013 15:08:58 +0000 (15:08 +0000)]
MFC 256293:
Sanitize the %eflags returned by BIOS routines.  Some BIOS routines enter
protected mode and may leave protected-mode-specific flags like PSL_NT set
when they return to real mode.  This can cause a fault when BTX re-enters
protected mode after the BIOS mode returns.

PR: amd64/182740

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

10 years agoMFC 255497:
jhb [Thu, 14 Nov 2013 21:27:19 +0000 (21:27 +0000)]
MFC 255497:
Fix an off-by-one error when populating mincore(2) entries for
skipped entries.  lastvecindex references the last valid byte,
so the new bytes should come after it.

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

10 years agoMFC 255248:
jhb [Wed, 13 Nov 2013 18:35:06 +0000 (18:35 +0000)]
MFC 255248:
Use an unsigned long when indexing into mfchashtbl[] and mf6ctable[].  This
matches the types used when computing hash indices and the type of the
maximum size of mfchashtbl[].

PR: kern/181821

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

10 years agoMFC 254699,255030:
jhb [Wed, 13 Nov 2013 17:10:18 +0000 (17:10 +0000)]
MFC 254699,255030:
Use tvtohz() to convert a socket buffer timeout to a tick value rather
than using a home-rolled version.  The home-rolled version could result
in shorter-than-requested sleeps.

PR: kern/181416

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

10 years agoMFC r257084:
ae [Mon, 11 Nov 2013 10:44:38 +0000 (10:44 +0000)]
MFC r257084:
  Initialize inc_fibnum for properly handling ICMP6_PACKET_TOO_BIG
  errors in multifib environment.

  PR: 183265

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

10 years agoMFC r256689 (modified):
ae [Mon, 11 Nov 2013 10:38:37 +0000 (10:38 +0000)]
MFC r256689 (modified):
  Use the same actor key for media types of the same speed.

  PR: 176097

MFC r256832:
  Add a note that lacp_compose_key() should be updated, when new media
  types will be added.

  Submitted by: melifaro

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

10 years agoConvert stable/8 to use docbook 5.0. We may still issue security advisories
delphij [Thu, 7 Nov 2013 22:08:04 +0000 (22:08 +0000)]
Convert stable/8 to use docbook 5.0.  We may still issue security advisories
and do this conversion now so there wouldn't be surprises.

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

10 years agoMFH: sync the picobsd build file with what is in head,
luigi [Thu, 7 Nov 2013 04:52:25 +0000 (04:52 +0000)]
MFH: sync the picobsd build file with what is in head,
except for the MALLOC_PRODUCTION definition

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

10 years agoMFC 254287: Some small cleanups to the fixes in r180340:
jhb [Wed, 6 Nov 2013 21:00:18 +0000 (21:00 +0000)]
MFC 254287: Some small cleanups to the fixes in r180340:
- Set NOTE_TRACKERR before running filt_proc().  If the knote did not
  have NOTE_FORK set in fflags when registered, then the TRACKERR event
  could miss being posted.
- Don't pass the pid in to filt_proc() for NOTE_FORK events.  The special
  handling for pids is done knote_fork() directly and no longer in
  filt_proc().

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

10 years agoMFC 254072:
jhb [Wed, 6 Nov 2013 19:35:06 +0000 (19:35 +0000)]
MFC 254072:
Don't emit a spurious EVFILT_PROC event with no fflags set on process exit
if NOTE_EXIT is not being monitored.  The rationale is that a listener
should only get an event for exit() if they registered interest via
NOTE_EXIT.  This matches the behavior on OS X.
- Don't save the exit status on process exit unless NOTE_EXIT is being
  monitored.
- Add an internal EV_DROP flag that requests kqueue_scan() to free the
  knote without signalling it to userland and use this when a process
  exits but the fflags in the knote is zero.

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

10 years agoMFC r257539:
delphij [Tue, 5 Nov 2013 20:00:17 +0000 (20:00 +0000)]
MFC r257539:

When zero'ing out a buffer, make sure we are using right size.

Without this change, in the worst but unlikely case scenario, certain
administrative operations, including change of configuration, set or
delete key from a GEOM ELI provider, may leave potentially sensitive
information in buffer allocated from kernel memory.

We believe that it is not possible to actively exploit these issues, nor
does it impact the security of normal usage of GEOM ELI providers when
these operations are not performed after system boot.

Security: possible sensitive information disclosure
Submitted by: Clement Lecigne <clecigne google com>

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

10 years agoMFC 253656: Enhance the description of NOTE_TRACK:
jhb [Tue, 5 Nov 2013 19:54:35 +0000 (19:54 +0000)]
MFC 253656: Enhance the description of NOTE_TRACK:
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
  If NOTE_FORK is set, the listener will get a NOTE_FORK event from
  the parent pid, but not a separate NOTE_TRACK event.
- Explicitly note that the event added to monitor the child process
  preserves the fflags from the original event.
- Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a
  bit for the user to set (which is what this list pupports to be).
  Also, explicitly note that if an error occurs, the NOTE_CHILD event
  will not be generated.

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

10 years agoMFC of 257681
edwin [Tue, 5 Nov 2013 06:39:23 +0000 (06:39 +0000)]
MFC of 257681

tzdata2013f
- Jordan goes to winter time on the last Friday in October.
- Tocantins in Brazil will not go into summer time in October.
- Indonesian time zones renames.
- Lots of cleanups in with regarding to links and historical data.

tzdata2013h
- Libya didn't go back to DST.
- Fix Morocco 2038 issue.
- Brazil/Acre and ?Western Amazonas are chaning timezones.

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

10 years agoMFC r257307:
yongari [Mon, 4 Nov 2013 08:48:35 +0000 (08:48 +0000)]
MFC r257307:
  Fix regression introduced in r235816.
  r235816 triggered kernel panic or hang after warm boot.
  Don't blindly restore BCE_EMAC_MODE media configuration in
  bce_reset().  If driver is about to shutdown it will invoke
  bce_reset() which in turn results in restoring BCE_EMAC_MODE
  media configuration.  This operation seems to confuse controller
  firmware.

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

10 years agoMFC r257154:
trociny [Thu, 31 Oct 2013 20:32:11 +0000 (20:32 +0000)]
MFC r257154:

Merging local and remote bitmaps must be protected by hr_amp lock.

This is believed to fix hastd crashes, which might occur during
synchronization, triggered by the failed assertion:

 Assertion failed: (amp->am_memtab[ext] > 0),
 function activemap_write_complete, file activemap.c, line 351.

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

10 years agoMFC r257221:
kib [Thu, 31 Oct 2013 10:15:22 +0000 (10:15 +0000)]
MFC r257221:
Fix typo.

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

10 years agoMFC r257206:
hselasky [Wed, 30 Oct 2013 06:16:11 +0000 (06:16 +0000)]
MFC r257206:
Fix a deadlock when trying to power off a USB device. The deadlock
happens because the code in question is trying to modify the parent
USB port registers outside the USB explore thread.

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

10 years agoMFC r257151:
bdrewery [Tue, 29 Oct 2013 18:46:41 +0000 (18:46 +0000)]
MFC r257151:

  Document /var/cache/pkg into hier(7) which pkg(8) uses.

Approved by: bapt

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

10 years agoMFC r256646, r256767, r257038:
delphij [Sat, 26 Oct 2013 19:54:28 +0000 (19:54 +0000)]
MFC r256646, r256767, r257038:
  When installing updates, install new directories first and remove old
  directories last.

  Allow ~ in file names so libtool droppings in contrib don't break updates.
  It has happened twice now, and is likely to happen again.

  Be more selective when filtering for lib*.so.N files.  These are deleted
  at the end of the upgrade process, after warning users to upgrade any
  3rd party software (e.g., from the ports tree) which might link to the
  libraries being removed.

Errata Notice:  FreeBSD-EN-13:04.freebsd-update

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

10 years agoMFC r253816: MFV r253780:
delphij [Fri, 25 Oct 2013 15:45:29 +0000 (15:45 +0000)]
MFC r253816: MFV r253780:

To quote Illumos #3875:

The problem here is that if we ever end up in the error
path, we drop the locks protecting access to the zfsvfs_t
prior to forcibly unmounting the filesystem. Because z_os
is NULL, any thread that had already picked up the zfsvfs_t
and was sitting in ZFS_ENTER() when we dropped our locks
in zfs_resume_fs() will now acquire the lock, attempt to
use z_os, and panic.

Illumos ZFS issues:
  3875 panic in zfs_root() after failed rollback

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

10 years agoMFC r256750:
hselasky [Fri, 25 Oct 2013 06:47:01 +0000 (06:47 +0000)]
MFC r256750:
Improve XHCI stability. When a command timeout happens, the command
should be aborted else the command queue can stop. Refer to section
"4.6.1.2" of the XHCI specification.

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

10 years agoMFC r256317:
mav [Fri, 25 Oct 2013 06:04:21 +0000 (06:04 +0000)]
MFC r256317:
Fix mode page length calculation to remove last garbage line from the
`camcontrol mode daX -l` output.

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

10 years agoFix an inverted check for the master user in "camcontrol security -U".
markj [Wed, 16 Oct 2013 03:37:22 +0000 (03:37 +0000)]
Fix an inverted check for the master user in "camcontrol security -U".

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

10 years agoMFC r255931:
dim [Sat, 12 Oct 2013 16:11:57 +0000 (16:11 +0000)]
MFC r255931:

Fix a bug in ld, where indirect symbols are not handled properly during
linking of a shared library, leading to corrupt indexes in the dynamic
symbol table.  This should fix the multimedia/ffmpegthumbnailer port.

Reported by: swills

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

10 years agoMFH (206038,206040): add a -k option which is passed through to finger(1).
des [Sat, 12 Oct 2013 14:54:25 +0000 (14:54 +0000)]
MFH (206038,206040): add a -k option which is passed through to finger(1).
Almost to the day three and a half years after the original MFC date...

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

10 years agoMFC r256061:
kib [Fri, 11 Oct 2013 04:50:27 +0000 (04:50 +0000)]
MFC r256061:
Add padding to match the compat32 struct stat32 definition to the real
struct stat on 32bit architectures.

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

10 years agoMFC r255944 (partial):
bdrewery [Thu, 10 Oct 2013 12:47:34 +0000 (12:47 +0000)]
MFC r255944 (partial):

  Use MK_SSP=no after including bsd.own.mk to disable SSP instead of user-knob
  WITH[OUT]_SSP to avoid hitting an error if user has WITH_SSP in their
  make.conf. Ports now use this knob.

    make[7]: "/usr/src/share/mk/bsd.own.mk" line 466: WITH_SSP and
    WITHOUT_SSP can't both be set.

Approved by:    bapt

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

10 years agoMFH (r255243): create /var/authpf with correct ownership and permissions
des [Mon, 7 Oct 2013 08:20:56 +0000 (08:20 +0000)]
MFH (r255243): create /var/authpf with correct ownership and permissions
MFH (r255597): add unbound user to facilitate cross-building
MFH (r256097): add missing entries to ftpusers and reorder

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

10 years agoMFC r252857,255718:
delphij [Thu, 3 Oct 2013 23:56:38 +0000 (23:56 +0000)]
MFC r252857,255718:

Refresh vendor driver version which fixes command queue
full issue with ARC-1214 and ARC-1224.

Update arcmsr(4) driver to 1.20.00.28 which fixes mutex recursion in
CCB abort codepath.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

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

10 years agoMFC r255714, r255716, r255717:
trociny [Thu, 3 Oct 2013 18:53:13 +0000 (18:53 +0000)]
MFC r255714, r255716, r255717:

r255714:

Use cv_broadcast() instead of cv_signal() when waking up threads
waiting on an empty queue as the queue may have several consumers.

Before the fix the following scenario was possible: 2 threads are
waiting on empty queue, 2 threads are inserting simultaneously. The
first inserting thread detects that the queue is empty and is going to
send the signal, but before it sends the second thread inserts
too. When the first sends the signal only one of the waiting threads
receive it while the other one may wait forever.

The scenario above is is believed to be the cause of the observed
cases, when ggate_recv_thread() was getting stuck on taking free
request, while the free queue was not empty.

Reviewed by: pjd
Tested by: Yamagi Burmeister yamagi.org

r255716:

When updating the map of dirty extents, most recently used extents are
kept dirty to reduce the number of on-disk metadata updates. The
sequence of operations is:

1) acquire the activemap lock;
2) update in-memory map;
3) if the list of keepdirty extents is changed, update on-disk metadata;
4) release the lock.

On-disk updates are not frequent in comparison with in-memory updates,
while require much more time. So situations are possible when one
thread is updating on-disk metadata and another one is waiting for the
activemap lock just to update the in-memory map.

Improve this by introducing additional, on-disk map lock: when
in-memory map is updated and it is detected that the on-disk map needs
update too, the on-disk map lock is acquired and the on-memory lock is
released before flushing the map.

Reported by: Yamagi Burmeister yamagi.org
Tested by: Yamagi Burmeister yamagi.org
Reviewed by: pjd

r255717:

Fix comments.

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

10 years agoMFC r255521, r255526, r255707:
trociny [Thu, 3 Oct 2013 18:50:09 +0000 (18:50 +0000)]
MFC r255521, r255526, r255707:

r255521 (jmg):

add support for writing the pid of the daemon program to a pid file so
that daemon can be used w/ rc.subr and ports can use the additional
functionality, such as keeping the ldap daemon up and running, and have
the proper program to signal to exit.

PR: bin/181341
Submitted by: feld

r255526 (joel):

mdoc: remove EOL whitespace.

r255707:

1. Properly clean pid files in the case of the error.
2. Write the supervisor pid before the restart loop, so we don't
   uselessly rewrite it after every child restart.
3. Remove duplicate ppfh and pfh initialization.

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

10 years agoMFC r255768:
hselasky [Tue, 1 Oct 2013 08:41:28 +0000 (08:41 +0000)]
MFC r255768:
Stability fixes for Intel LynxPoint XHCI controllers. Disable XHCI port
routing if we get certain errors. Poll for command completion upon
command timeouts. The XHCI error events might not generate interrupts.

PR: usb/181159

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

10 years agoMFC r255648:
delphij [Tue, 1 Oct 2013 00:49:57 +0000 (00:49 +0000)]
MFC r255648:

Fix a typo when accounting for tx_broadcast statistics.

Submitted by: Paul A. Patience <paul-a patience polymtl ca>

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

10 years agoMFC: r255866, r255867
jmg [Mon, 30 Sep 2013 17:35:48 +0000 (17:35 +0000)]
MFC: r255866, r255867

  fix a bug where we access a bread buffer after we have brelse'd it...
  The kernel normally didn't unmap/context switch away before we accessed
  the buffer most of the time, but under heavy I/O pressure and lots of
  mount/unmounting this would cause a fault on nofault panic...

  NULL stale pointers (should be a no-op as they should no longer be
  used)...

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

10 years agoMFC r255891:
delphij [Sun, 29 Sep 2013 07:42:25 +0000 (07:42 +0000)]
MFC r255891:

Import NetBSD readline.c,v 1.104: do not crash with add_history(NULL).

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

10 years agoMFC r255844:
kib [Fri, 27 Sep 2013 07:02:48 +0000 (07:02 +0000)]
MFC r255844:
Ensure that the ERESTART return from the syscall reloads the registers,
to make the restarted syscall instruction pass the correct arguments.

PR: kern/182161

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

10 years agoMFC r254742:
markj [Fri, 20 Sep 2013 21:52:33 +0000 (21:52 +0000)]
MFC r254742:
Hold mfi_io_lock across calls to xpt_rescan() and xpt_alloc_ccb_nowait().
xpt_rescan() expects the SIM lock to be held, and we trip a mtx_assert if
the driver initiates multiple rescans in quick succession.

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

10 years agoMFC r255488:
hselasky [Thu, 19 Sep 2013 05:43:23 +0000 (05:43 +0000)]
MFC r255488:
Don't issue USB resume signalling in USB device mode, if the USB power
mode is ON and suspend is detected. This confuses iPads running in USB
host mode at least.

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

10 years agoMFC of 253998:
mckusick [Thu, 19 Sep 2013 00:18:25 +0000 (00:18 +0000)]
MFC of 253998:

This bug fix is in a code path in rename taken when there is a
collision between a rename and an open system call for the same
target file. Here, rename releases its vnode references, waits for
the open to finish, and then restarts by reacquiring its needed
vnode locks. In this case, rename was unlocking but failing to
release its reference to one of its held vnodes. The effect was
that even after all the actual references to the vnode had gone,
the vnode still showed active references. For files that had been
removed, their space was not reclaimed until the filesystem was
forcibly unmounted.

This bug manifested itself in the Postgres server which would
leak/lose hundreds of files per day amounting to many gigabytes of
disk space. This bug required shutting down Postgres, forcibly
unmounting its filesystem, remounting its filesystem and restarting
Postgres every few days to recover the lost space.

Reported by: Dan Thomas and Palle Girgensohn
Bug-fix by:  kib
Tested by:   Dan Thomas and Palle Girgensohn

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

10 years agoMFC r255472:
hselasky [Wed, 18 Sep 2013 06:40:47 +0000 (06:40 +0000)]
MFC r255472:
Clear correct data structure.

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

10 years agoMFC r255235:
ae [Tue, 17 Sep 2013 18:51:35 +0000 (18:51 +0000)]
MFC r255235:
  Remove unused code and sort variables declarations.

PR: kern/181822

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

10 years agoMFC r254572:
hselasky [Tue, 17 Sep 2013 12:58:17 +0000 (12:58 +0000)]
MFC r254572:
Force keyboards which don't have the required
HID fields to use the USB BOOT protocol for now.

PR: usb/181425

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

10 years agoMFC r248246:
hselasky [Tue, 17 Sep 2013 12:56:37 +0000 (12:56 +0000)]
MFC r248246:

- Make quirk for reading device descriptor from broken USB devices.
Else they won't enumerate at all:
hw.usb.full_ddesc=1
- Reduce the USB descriptor read timeout from 1000ms to
500ms. Typical value for LOW speed devices is 50-100ms.
- Enumerate USB device a maximum of 3 times when a port
connection change event is detected, before giving up.

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

10 years agoMFC r255483:
delphij [Mon, 16 Sep 2013 16:44:18 +0000 (16:44 +0000)]
MFC r255483:

Do not emit size for non-regular files.  There is nothing that
mtree(1) can do in this situation and would cause confusion.

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

10 years agoMFC r255356:
hselasky [Mon, 16 Sep 2013 10:06:40 +0000 (10:06 +0000)]
MFC r255356:

Revert parts of r245132 and r245175. We don't need to write to the
IMAN register to clear the pending interrupt status bits. This patch
tries to solve problems seen on the MacBook Air, as reported by
Johannes Lundberg <johannes@brilliantservice.co.jp>

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