]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r267981:
dim [Mon, 30 Jun 2014 20:26:30 +0000 (20:26 +0000)]
MFC r267981:

Pull in r211627 from upstream llvm trunk (by Bill Schmidt):

  [PPC64] Fix PR20071 (fctiduz generated for targets lacking that
  instruction)

  PR20071 identifies a problem in PowerPC's fast-isel implementation
  for floating-point conversion to integer.  The fctiduz instruction
  was added in Power ISA 2.06 (i.e., Power7 and later).  However, this
  instruction is being generated regardless of which 64-bit PowerPC
  target is selected.

  The intent is for fast-isel to punt to DAG selection when this
  instruction is not available.  This patch implements that change.
  For testing purposes, the existing fast-isel-conversion.ll test adds
  a RUN line for -mcpu=970 and tests for the expected code generation.
  Additionally, the existing test fast-isel-conversion-p5.ll was found
  to be incorrectly expecting the unavailable instruction to be
  generated.  I've removed these test variants since we have adequate
  coverage in fast-isel-conversion.ll.

This is needed to compile clang with debug+asserts on older powerpc64
and ppc970 targets.

Requested by: jhibbits

MFC r267982:

Add the llvm patch for r267981.

MFC r268003:

Fix breakage after r267981.

Pointy hat to: dim

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

9 years agoMFC r267336:
trociny [Mon, 30 Jun 2014 19:46:17 +0000 (19:46 +0000)]
MFC r267336:

PF_BLUETOOTH protocols: skip initialization of non-virtualized globals
for non-default VNET instances.

This fixes panic on a vnet initialization when ng_btsocket is loaded.

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

9 years agoMFC r267801: Make nd6_gctimer tunable.
ume [Mon, 30 Jun 2014 16:56:12 +0000 (16:56 +0000)]
MFC r267801: Make nd6_gctimer tunable.

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

9 years agoMFC r267800:
ume [Mon, 30 Jun 2014 16:53:12 +0000 (16:53 +0000)]
MFC r267800:
Exclude IPv4 address from doing longest match.
It prevented DNS based load balancing.

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

9 years agoMFC r267378:
delphij [Mon, 30 Jun 2014 16:31:28 +0000 (16:31 +0000)]
MFC r267378:

Fix path for zlib examples, this have no runtime effect and was
overlooked when I was doing zlib update.

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

9 years agoMFC r267839:
delphij [Mon, 30 Jun 2014 16:23:31 +0000 (16:23 +0000)]
MFC r267839:

Apply vendor fixes for big endian support and 20GBps/25GBps link speeds.

Many thanks to Emulex for their continued support of FreeBSD!

Submitted by: Venkata Duvvuru <VenkatKumar.Duvvuru Emulex.Com>

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

9 years agoMFC r267627:
pfg [Mon, 30 Jun 2014 14:52:40 +0000 (14:52 +0000)]
MFC r267627:
strptime: add support for %t and %n

Posix strptime() requires support for %t and %n, which were added
to the illumos port.  Curiously we were skipping white spaces by
default in most other cases making %t meaningless.

We now skip spaces in the case of the %e specifier as strftime(3)
explicitly adds a space for the single digit case.

Reference:
http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html

PR: 173421
Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2)

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

9 years agoMFC: r267978
marius [Mon, 30 Jun 2014 09:59:23 +0000 (09:59 +0000)]
MFC: r267978

In order to get vt(4) a bit closer to the feature set provided by sc(4),
implement options TERMINAL_{KERN,NORM}_ATTR. These are aliased to
SC_{KERNEL_CONS,NORM}_ATTR and like these latter, allow to change the
default colors of normal and kernel text respectively.
Note on the naming: Although affecting the output of vt(4), technically
kern/subr_terminal.c is primarily concerned with changing default colors
so it would be inconsistent to term these options VT_{KERN,NORM}_ATTR.
Actually, if the architecture and abstraction of terminal+teken+vt would
be perfect, dev/vt/* wouldn't be touched by this commit at all.

Reviewed by: emaste
Sponsored by: Bally Wulff Games & Entertainment GmbH

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

9 years agoMFC r267854:
kib [Mon, 30 Jun 2014 09:55:29 +0000 (09:55 +0000)]
MFC r267854:
Add fpu_kern.9 man page to the install.

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

9 years agoMFC r267768:
kib [Mon, 30 Jun 2014 09:54:08 +0000 (09:54 +0000)]
MFC r267768:
Add documentation for the fpu_kern(9) interfaces.

MFC r267785 (by brueffer):
Several small fixes.

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

9 years agoMFC r267815:
kib [Mon, 30 Jun 2014 09:51:27 +0000 (09:51 +0000)]
MFC r267815:
Put the aesni_cipher_setup() and aesni_cipher_process() functions into
the file which is compiled with SSE disabled.

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

9 years agoMFC r267767:
kib [Mon, 30 Jun 2014 09:48:44 +0000 (09:48 +0000)]
MFC r267767:
Add FPU_KERN_KTHR flag to fpu_kern_enter(9).
Apply the flag to padlock(4) and aesni(4).
In aesni_cipher_process(), do not leak FPU context state on error.

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

9 years agoMFC: r267967, r267968
marius [Mon, 30 Jun 2014 09:38:14 +0000 (09:38 +0000)]
MFC: r267967, r267968

- SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4.
- vt_vga(4) is a driver rather than a function so reference it accordingly.
- Uncomment HISTORY section given that vt(4) will first appear in 9.3.

Reviewed by: emaste (modulo last part)
Sponsored by: Bally Wulff Games & Entertainment GmbH

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

9 years agoMFC r267692, r267703:
pfg [Sun, 29 Jun 2014 18:54:41 +0000 (18:54 +0000)]
MFC r267692, r267703:
Add -u (unbuffered output) after GNU sed.

Obtained from: NetBSD

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

9 years agoMFC r267491:
kib [Sun, 29 Jun 2014 07:02:47 +0000 (07:02 +0000)]
MFC r267491:
Use vn_io_fault for the writes from core dumping code.

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

9 years agoMFC r267661, r267662, r267663:
bryanv [Sun, 29 Jun 2014 00:50:56 +0000 (00:50 +0000)]
MFC r267661, r267662, r267663:

  - Remove an unnecessary kick of the host at the end of transmitting
  - Handle multiple calls to rxq_eof for single packet completion
  - Increment the pending packets more aggressively for TSO

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

9 years agoMFC r267520, r267521, r267522, r267523, r267524:
bryanv [Sun, 29 Jun 2014 00:37:59 +0000 (00:37 +0000)]
MFC r267520, r267521, r267522, r267523, r267524:

  - Remove two write-only local variables
  - Remove unused element in the vtnet_rxq structure
  - Remove kernel specific macro out of the VirtIO PCI header file
  - Move the VIRTIO_RING_F_* defines out of virtqueue.h into
    virtio_config.h
  - Make the feature negotiation code easier to follow
  - Force two byte alignment for all control message headers

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

9 years agoMFC 267647:
jhb [Fri, 27 Jun 2014 20:57:12 +0000 (20:57 +0000)]
MFC 267647:
Trust the state of a power resource that we get from a working _STA method
instead of trying to cache it.

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

9 years agoMFC 267291:
jhb [Fri, 27 Jun 2014 20:39:45 +0000 (20:39 +0000)]
MFC 267291:
Use strcasecmp() instead of strcmp() when checking user-supplied encoding
names so that encoding names are treated as case-insensitive.  This allows
the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior
of iconv(1).

PR: 167977

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

9 years agoMFC 266293:
jhb [Fri, 27 Jun 2014 20:34:22 +0000 (20:34 +0000)]
MFC 266293:
- Add support for dumping current resource usage for processes via a new -r
  flag to procstat.
- Add an -H flag to request information about threads rather than processes
  when dumping statistics.  Currently it is only used for -r to display
  resource usage for individual threads instead of the entire process.

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

9 years agoMFC 266296:
jhb [Fri, 27 Jun 2014 19:50:30 +0000 (19:50 +0000)]
MFC 266296:
Correct some minor nits in the per-thread signal format description such
as missing posessives and misordering of fields.

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

9 years agoMFC 261781:
jhb [Fri, 27 Jun 2014 17:22:18 +0000 (17:22 +0000)]
MFC 261781:
Don't waste a page of KVA for the boot-time memory test on x86.  For amd64,
reuse the first page of the crashdumpmap as CMAP1/CADDR1.  For i386,
remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.

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

9 years agoMFC: 267833
jpaetzel [Fri, 27 Jun 2014 17:10:28 +0000 (17:10 +0000)]
MFC: 267833

Fix issues in config parser relating to lun serial numbers.

Without this fix some serial numbers needed to be quoted
to avoid the config parser bailing out.

Submitted by: delphij
Sponsored by: iXsystems

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

9 years agoMFC r265613, r267649: Handle ELF files with 65280 or more sections
emaste [Fri, 27 Jun 2014 14:42:13 +0000 (14:42 +0000)]
MFC r265613, r267649: Handle ELF files with 65280 or more sections

  If e_shnum or e_shstrndx are at least SHN_LORESERVE (0xff00) then an
  escape value is used to indicate that the actual value is found in one
  of section 0's fields.

  Don't dump core when the ELF file has no section headers. The ELF
  core files created by gcore are among those.

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

9 years agoMFC r267664:
kib [Fri, 27 Jun 2014 11:42:51 +0000 (11:42 +0000)]
MFC r267664:
Assert that the new entry is inserted into the right location in the
map entries list, and that it does not overlap with the previous and
next entries.

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

9 years agoMFC r261140:
pluknet [Fri, 27 Jun 2014 09:11:24 +0000 (09:11 +0000)]
MFC r261140:

Add MLINK for fdclosedir.3 to directory.3 and sort fdopendir(3) entry.

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

9 years agoMFC r266479, r267153:
pluknet [Fri, 27 Jun 2014 05:50:55 +0000 (05:50 +0000)]
MFC r266479, r267153:

- Move Nx definition to a separate block.
- Add Lb string for libcuse.

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

9 years agoMFC r267690
hiren [Fri, 27 Jun 2014 05:37:00 +0000 (05:37 +0000)]
MFC r267690

Hide a harmless "QUEUE FULL EVENT" message behind bootverbose.

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

9 years agoMFC 264277:
jhb [Thu, 26 Jun 2014 19:19:06 +0000 (19:19 +0000)]
MFC 264277:
Handle single-byte reads from the bvmcons port (0x220) by returning
0xff.  Some guests may attempt to read from this port to identify
psuedo-PNP ISA devices.  (The ie(4) driver in FreeBSD/i386 is one
example.)

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

9 years agoMFC r267196:
pluknet [Thu, 26 Jun 2014 08:55:06 +0000 (08:55 +0000)]
MFC r267196:

Add support for inspecting process flags set in p_flag2.

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

9 years agoMFC r261901:
pluknet [Thu, 26 Jun 2014 08:41:54 +0000 (08:41 +0000)]
MFC r261901:

Preserve one character space for a trailing '\0'.

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

9 years agoMFC r267630:
kib [Thu, 26 Jun 2014 08:30:08 +0000 (08:30 +0000)]
MFC r267630:
Add MAP_EXCL flag for mmap(2).

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

9 years agoMFC r267629:
kib [Thu, 26 Jun 2014 08:27:01 +0000 (08:27 +0000)]
MFC r267629:
Tidy up code of the wrapper.

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

9 years agoMFC r267766:
kib [Thu, 26 Jun 2014 08:24:18 +0000 (08:24 +0000)]
MFC r267766:
Use correct names for the flags.

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

9 years agoMFC r267693:
gjb [Wed, 25 Jun 2014 18:59:43 +0000 (18:59 +0000)]
MFC r267693:
  Fix a bug in bsdgrep(1) where patterns are not correctly
  detected.

  Certain criteria must be met for this bug to show up:

   * the -w flag is specified, and
   * neither -o or --color are specified, and
   * the pattern is part of another word in the line, and
   * the other word that contains the pattern occurs first

PR: 181973
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r267616, 267640:
ume [Wed, 25 Jun 2014 17:10:26 +0000 (17:10 +0000)]
MFC r267616, 267640:

Retooling addrconfig() to exclude addresses on loopback interfaces
when looking for configured addresses.
This change is based upon the code from the submitter, and made
following changes:
- Exclude addresses assigned on interfaces which are down, like NetBSD
  does.
- Exclude addresses assigned on interfaces which are ifdisabled.

Use SOCK_CLOEXEC.

PR: 190824
Submitted by: Justin McOmie

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

9 years agoMFC r267634: Fix case where fastroute or "to interface" is used with
cy [Wed, 25 Jun 2014 13:33:31 +0000 (13:33 +0000)]
MFC r267634: Fix case where fastroute or "to interface" is used with
incorrect FIB.

PR: 183065
Submitted by: p-freebsd-bugs@ziemba.us
Approved by: glebius (mentor)

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

9 years agoMFC: r267145
marius [Wed, 25 Jun 2014 10:17:00 +0000 (10:17 +0000)]
MFC: r267145

Fix the keyfile being cleared prematurely after r259428 (MFCed to stable/10
in r266749).

PR: 185084
Submitted by: fk@fabiankeil.de
Reviewed by: pjd

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

9 years agoMFC r267757:
np [Wed, 25 Jun 2014 02:14:55 +0000 (02:14 +0000)]
MFC r267757:

cxgbe(4): Update the bundled T4 and T5 firmwares to versions 1.11.27.0

Obtained from: Chelsio

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

9 years agoDocument FreeBSD-SA-14:15.iconv and FreeBSD-SA-14:16.file
gjb [Wed, 25 Jun 2014 00:10:41 +0000 (00:10 +0000)]
Document FreeBSD-SA-14:15.iconv and FreeBSD-SA-14:16.file

Sponsored by: The FreeBSD Foundation

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

9 years agoFix multiple vulnerabilities in file(1) and libmagic(3).
delphij [Tue, 24 Jun 2014 19:04:55 +0000 (19:04 +0000)]
Fix multiple vulnerabilities in file(1) and libmagic(3).

Security: FreeBSD-SA-14:16.file
Approved by: so

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

9 years agoMFC r267599:
bdrewery [Tue, 24 Jun 2014 15:57:48 +0000 (15:57 +0000)]
MFC r267599:

  - Add a LOCAL_ITOOLS to allow adding additional tools required for the
    installworld and distributeworld targets

PR: 179562

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

9 years agoMFC r267564:
kib [Tue, 24 Jun 2014 08:21:43 +0000 (08:21 +0000)]
MFC r267564:
In msdosfs_setattr(), add a check for result of the utimes(2) permissions test.
Refactor the permission checks for utimes(2).

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

9 years agoMFC r267704:
dim [Tue, 24 Jun 2014 06:12:11 +0000 (06:12 +0000)]
MFC r267704:

Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):

  Legalizer: Add support for splitting insert_subvectors.

  We handle this by spilling the whole thing to the stack and doing the
  insertion as a store.

  PR19492. This happens in real code because the vectorizer creates
  v2i128 when AVX is enabled.

This fixes a "fatal error: error in backend: Do not know how to split
the result of this operator!" message encountered during compilation of
the net-p2p/libtorrent-rasterbar port.

Reported by: Evgeniy <iron@mail.ua>

MFC r267705:

Add the llvm patch for r267704.

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

9 years agoMFC r263795:
rodrigc [Mon, 23 Jun 2014 22:37:49 +0000 (22:37 +0000)]
MFC r263795:

Strict value checking will cause problem.
Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD.
This behaviour is bug-compatible with Linux-3.13.5.

References:
http://d.hatena.ne.jp/syuu1228/20140326
http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094

Submitted by: syuu
PR: 187966

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

9 years agoUndo bad merge.
rodrigc [Mon, 23 Jun 2014 22:35:41 +0000 (22:35 +0000)]
Undo bad merge.

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

9 years agoMFC r263795:
rodrigc [Mon, 23 Jun 2014 22:31:28 +0000 (22:31 +0000)]
MFC r263795:

Strict value checking will cause problem.
Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD.
This behaviour is bug-compatible with Linux-3.13.5.

References:
http://d.hatena.ne.jp/syuu1228/20140326
http://lxr.linux.no/linux+v3.13.5/arch/x86/kernel/acpi/boot.c#L1094

Submitted by: syuu
PR: 187966

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

9 years agoMFC r267601:
pfg [Mon, 23 Jun 2014 15:03:51 +0000 (15:03 +0000)]
MFC r267601:

stdtime: style(9) fixes.

Obtained from: illumos

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

9 years agoMFC r267124, r267582:
emaste [Mon, 23 Jun 2014 13:50:02 +0000 (13:50 +0000)]
MFC r267124, r267582:

  Install VT support files

  They can be disabled by setting WITHOUT_VT_SUPPORT=yes in src.conf.

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

9 years agoMFC: r267638
marius [Mon, 23 Jun 2014 08:32:36 +0000 (08:32 +0000)]
MFC: r267638

Don't denounce peripherals on system shutdown. Together with r267321
(MFCed to stable/10 in r267775), we're now back to the pre-r228483
level of default verbosity. This in turn again typically allows for
reading information that userland might have printed on the screen
before initiating a halt, but still permits to debug potential device
shutdown problems on system shutdown via CAM_DEBUG etc.

Reviewed by: mav
Sponsored by: Bally Wulff Games & Entertainment GmbH

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

9 years agoMFC: r267321
marius [Mon, 23 Jun 2014 08:27:15 +0000 (08:27 +0000)]
MFC: r267321

Avoid the USB device disconnected and controller shutdown clutter on system
shutdown by putting the former under !rebooting and turning the latter into
debug messages.

Reviewed by: hps
Sponsored by: Bally Wulff Games & Entertainment GmbH

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

9 years agoMFC r267254:
kib [Mon, 23 Jun 2014 08:08:22 +0000 (08:08 +0000)]
MFC r267254:
Make mmap(MAP_STACK) search for the available address space.

MFC r267497 (by alc):
Use local variable instead of sgrowsiz.

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

9 years agoMFC r267688:
tuexen [Mon, 23 Jun 2014 07:58:41 +0000 (07:58 +0000)]
MFC r267688:

Fix a bug which incorrectly allowed two listening SCTP sockets on
the same port bound to the wildcard address.

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

9 years agoMFC r267682:
tuexen [Mon, 23 Jun 2014 07:56:39 +0000 (07:56 +0000)]
MFC r267682:

Fix a bug in the setsockopt()-handling of the SCTP
specific option SCTP_PEER_ADDR_THLDS: Use the
provided address as intended.

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

9 years agoMFC r267674:
tuexen [Mon, 23 Jun 2014 07:54:12 +0000 (07:54 +0000)]
MFC r267674:

Honor jails for unbound SCTP sockets when selecting source addresses,
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.

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

9 years agoMFC r267689:
np [Mon, 23 Jun 2014 05:39:10 +0000 (05:39 +0000)]
MFC r267689:

Consider the total number of descriptors available (and not just those
that are ready to be reclaimed) when deciding whether to resume tx after
a stall.

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

9 years agoMFC r267429:
mav [Sun, 22 Jun 2014 21:28:05 +0000 (21:28 +0000)]
MFC r267429:
Fix some leaks on LUN creation error.

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

9 years agoMFC r267479:
mav [Sun, 22 Jun 2014 21:26:46 +0000 (21:26 +0000)]
MFC r267479:
Fix/improve fhe_stats sysctl output.

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

9 years agoMFC r267351:
mav [Sun, 22 Jun 2014 21:21:27 +0000 (21:21 +0000)]
MFC r267351:
Move root_mount_hold() functionality to separate mutex.

It has nothing to share with mutex protecting list of mounted file systems.

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

9 years agoMFC r267391:
mav [Sun, 22 Jun 2014 21:19:19 +0000 (21:19 +0000)]
MFC r267391:
Introduce new "256 Bucket" zone to split requests and reduce congestion
on "128 Bucket" zone lock.

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

9 years agoMFC r267387:
mav [Sun, 22 Jun 2014 21:18:24 +0000 (21:18 +0000)]
MFC r267387:
Allocating new bucket for bucket zone, never take it from the zone itself,
since it will almost certanly fail.  Take next bigger zone instead.

This situation should not happen with original bucket zones configuration:
"32 Bucket" zone uses "64 Bucket" and vice versa.  But if "64 Bucket" zone
lock is congested, zone may grow its bucket size and start biting itself.

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

9 years agoMFC r267392:
mav [Sun, 22 Jun 2014 21:16:18 +0000 (21:16 +0000)]
MFC r267392:
Implement simple direct-mapped cache for popular filesystem identifiers to
avoid congestion on global mountlist_mtx mutex in vfs_busyfs(), while
traversing through the list of mount points.

This change significantly improves NFS server scalability, since it had
to do this translation for every request, and the global lock becomes quite
congested.

This code is more optimized for relatively small number of mount points.
On systems with hundreds of active mount points this simple cache may have
many collisions.  But the original traversal code in that case should also
behave much worse, so we are not loosing much.

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

9 years agoMFC r267362:
mav [Sun, 22 Jun 2014 21:14:34 +0000 (21:14 +0000)]
MFC r267362:
Remove unneeded mountlist_mtx acquisition from sync_fsync().

All struct mount fields accessed by sync_fsync() are protected by MNT_MTX.

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

9 years agoMFC r267512:
pfg [Sun, 22 Jun 2014 20:29:51 +0000 (20:29 +0000)]
MFC r267512:

patch: add dry-run alias for compatibility with other implementations.

Other implementations of patch(1), including GNU patch and "svn patch"
have a --dry-run option which does the same as our -C or --check
option.

Add a new alias to make our implementation more compatible.

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

9 years agoMFC r267490:
pfg [Sun, 22 Jun 2014 20:24:17 +0000 (20:24 +0000)]
MFC r267490:
patch: unsign the line length to avoid overflows.

Patch(1) uses a short int for the line length, which is usually
sufficient for regular diffs, but makes no effort to signal
when there is an overflow.

Change the line length to an unsigned short int to better use
the fact that a length is never negative.  The change is loosely
inspired on a related change in DragonFly, but we avoid spending
more memory than necessary.

While here adjust the messages to be clearer on what is happening.

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

9 years agoMFC r267232, r267239:
mav [Sun, 22 Jun 2014 18:06:11 +0000 (18:06 +0000)]
MFC r267232, r267239:
Use atomics to modify numvnodes variable.

This allows to mostly avoid lock usage in getnewvnode_[drop_]reserve(),
that reduces number of global vnode_free_list_mtx mutex acquisitions
from 4 to 2 per NFS request on ZFS, improving SMP scalability.

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

9 years agoMFC r267228:
mav [Sun, 22 Jun 2014 18:03:53 +0000 (18:03 +0000)]
MFC r267228:
Split RPC pool threads into number of smaller semi-isolated groups.

Old design with unified thread pool was good from the point of thread
utilization.  But single pool-wide mutex became huge congestion point
for systems with many CPUs.  To reduce the congestion create several
thread groups within a pool (one group for every 6 CPUs and 12 threads),
each group with own mutex.  Each connection during its registration is
assigned to one of the groups in round-robin fashion.  File affinify
code may still move requests between the groups, but otherwise groups
are self-contained.

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

9 years agoMFC r267223:
mav [Sun, 22 Jun 2014 18:02:39 +0000 (18:02 +0000)]
MFC r267223:
Remove st_idle variable, duplicating st_xprt.

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

9 years agoMFC r267221, r267278:
mav [Sun, 22 Jun 2014 18:01:40 +0000 (18:01 +0000)]
MFC r267221, r267278:
Introduce new per-thread lock to protect the list of requests.

This allows to slightly simplify svc_run_internal() code: if we processed
all the requests in a queue, then we know that new one will not appear.

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

9 years agoMFC r267329:
tuexen [Sun, 22 Jun 2014 16:58:29 +0000 (16:58 +0000)]
MFC r267329:

Add support for the SCTP_LOCAL_TRACE_BUF options.
While there, fix some whitespaces.

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

9 years agoMFC r267105:
tuexen [Sun, 22 Jun 2014 16:57:07 +0000 (16:57 +0000)]
MFC r267105:

Use ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf().
This was suggested by kevlo@.

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

9 years agoMFC r265691:
tuexen [Sun, 22 Jun 2014 16:54:59 +0000 (16:54 +0000)]
MFC r265691:

For some UDP packets (for example with 200 byte payload) and IP options,
the IP header and the UDP header are not in the same mbuf.
Add code to in_delayed_cksum() to deal with this case.

MFC r265713:

Use KASSERTs as suggested by glebius@

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

9 years agoMFC r265455:
tuexen [Sun, 22 Jun 2014 16:50:46 +0000 (16:50 +0000)]
MFC r265455:

Remove unused code. This is triggered by the bugreport of Sylvestre Ledru
which deal with useless code in the user land stack:
https://bugzilla.mozilla.org/show_bug.cgi?id=1003929

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

9 years agoMerge r267482,r267483,r267486,r267577,r267671,r267672 from head:
gavin [Sun, 22 Jun 2014 16:48:21 +0000 (16:48 +0000)]
Merge r267482,r267483,r267486,r267577,r267671,r267672 from head:

  Remove send-pr and fix up all references to it.  Replace it with a
  stub send-pr directing people towards the web site.

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

9 years agoMFC r264838:
tuexen [Sun, 22 Jun 2014 16:45:42 +0000 (16:45 +0000)]
MFC r264838:

Don't free an mbuf twice. This only happens in very rare error
cases where the peer sends illegal sequencing information in
DATA chunks for an existing association.

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

9 years agoMFC r264704:
tuexen [Sun, 22 Jun 2014 16:43:59 +0000 (16:43 +0000)]
MFC r264704:

Add consistency checks to ensure that fragments of a user message
have the same U-bit.

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

9 years agoMFC r264701:
tuexen [Sun, 22 Jun 2014 16:42:09 +0000 (16:42 +0000)]
MFC r264701:

Send also a packet containing an ABORT chunk in response to an OOTB packet
containing a COOKIE-ECHO chunk.

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

9 years agoMFC r264682:
tuexen [Sun, 22 Jun 2014 16:40:36 +0000 (16:40 +0000)]
MFC r264682:

Use consistently debug output instead of an unconditional printf.

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

9 years agoMFC r264679:
tuexen [Sun, 22 Jun 2014 16:38:06 +0000 (16:38 +0000)]
MFC r264679:

Send the correct error cause, when a DATA chunk with no user data
is received. This bug was reported by Irene Ruengeler.

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

9 years agoMFC r264241:
tuexen [Sun, 22 Jun 2014 16:36:14 +0000 (16:36 +0000)]
MFC r264241:

Call sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(),
since rt_addrmsg() gets also called from other functions.

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

9 years agoMFC r264017:
tuexen [Sun, 22 Jun 2014 16:34:27 +0000 (16:34 +0000)]
MFC r264017:

Increment the SSN only after processing the last fragment of an
ordered user message.

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

9 years agoMFC r263922:
tuexen [Sun, 22 Jun 2014 16:32:41 +0000 (16:32 +0000)]
MFC r263922:

Handle an edge case of address management similar to TCP.
This needs to be reconsidered when the address handling
will be reimplemented.
The patch is from rrs@.

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

9 years agoMFC r263921:
tuexen [Sun, 22 Jun 2014 16:30:52 +0000 (16:30 +0000)]
MFC r263921:

Use SCTP_OVER_UDP_TUNNELING_PORT more consistently.

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

9 years agoMFC r263237:
tuexen [Sun, 22 Jun 2014 16:28:52 +0000 (16:28 +0000)]
MFC r263237:

* Provide information in error causes in ASCII instead of
  proprietary binary format.
* Add support for a diagnostic information error cause.
  The code is sysctlable and the default is 0, which
  means it is not sent.

This is joint work with rrs@.

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

9 years agoMFC r263096:
tuexen [Sun, 22 Jun 2014 16:26:16 +0000 (16:26 +0000)]
MFC r263096:

Put the offset of the CRC32C in csum_data instead of 0.
The virtio driver needs the offset to be stored in csum_data,
like in the case for UDP and TCP.

The virtio problem was reported by
Niu Zhixiong <kaiaixi@gmail.com>, who helped in debugging
and testing the patch.

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

9 years agoMFC r263094:
tuexen [Sun, 22 Jun 2014 16:22:44 +0000 (16:22 +0000)]
MFC r263094:

SCTP uses CRC32C and not Adler anymore. While there change the reference
to RFC 4960.
This does not change any code, just comments.

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

9 years agoMFC r262252:
tuexen [Sun, 22 Jun 2014 16:21:14 +0000 (16:21 +0000)]
MFC r262252:

Remove redundant code and fix a style error.

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

9 years agoMFC r267492:
kib [Sun, 22 Jun 2014 08:32:31 +0000 (08:32 +0000)]
MFC r267492:
Fix some cosmetic issues with the use of kmem_malloc() in the i386 LDT
sysarch(2) code.

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

9 years agoMFC r267255:
kib [Sun, 22 Jun 2014 08:30:43 +0000 (08:30 +0000)]
MFC r267255:
Change the nblock mutex to rwlock.

MFC r267264:
Devolatile as needed.

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

9 years agoMFC r267426, r267464:
pfg [Sat, 21 Jun 2014 01:48:45 +0000 (01:48 +0000)]
MFC r267426, r267464:

Avoid zeroing during allocation.

This change reverts a change from OpenBSD which made use of
calloc, and therefore wasted time initializing arrays that
will later be realloc'ed.

Consistently use FreeBSD's reallocf():
- Drop some bogus casts to size_t.
- The new_p_foo variables are not needed anymore.

Also merge the changes from OpenBSD's manpage
patch.1 Rev 1.27:
"patch was moved from user portability (UP) to base in issue 7
and is no longer optional"

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

9 years agoMFC r267600:
np [Sat, 21 Jun 2014 00:30:51 +0000 (00:30 +0000)]
MFC r267600:

cxgbe(4):  Fix bug in the fast rx buffer recycle path.  In some cases rx
buffers were getting recycled when they should have been left alone.

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

9 years agoUpdate list of SAs on the 10.0R errata page.
gjb [Fri, 20 Jun 2014 20:17:03 +0000 (20:17 +0000)]
Update list of SAs on the 10.0R errata page.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r267544:
pfg [Fri, 20 Jun 2014 15:43:58 +0000 (15:43 +0000)]
MFC r267544:

Update license to strptime(3) implementation.

Our strptime(3) implementation was the base for the illumos
implementation and after contacting the author, Kevin Rudy
stated the code is under a 2-Clause BSD License [1]

After reviewing our local changes to the file in question,
the FreeBSD Foundation has agreed that their contributions
to this file are not required to carry clause 3 or 4 so
the file can be relicensed as in Illumos [2].

References:

[1] https://www.illumos.org/issues/357
[2] Illumos Revision: 13222:02526851ba75

Approved: core (jhb)
Approved: FreeBSD Foundation (emaste)

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

9 years agoMFC r267513:
pfg [Fri, 20 Jun 2014 15:40:13 +0000 (15:40 +0000)]
MFC r267513:

Merge from r258379 missed the tests.

4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision: 54a20ab41aadcb81c53e72fc65886e964e9add59

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

9 years agoMFC r267441:
tijl [Fri, 20 Jun 2014 07:35:55 +0000 (07:35 +0000)]
MFC r267441:

Don't install GSS-API headers when the GSSAPI option has been disabled.
Some ports assume GSS-API is supported when they find the headers.

PR: 189156
Submitted by: Garrett Cooper <yanegomi@gmail.com>

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

9 years agoMFC r267436-267439:
tijl [Fri, 20 Jun 2014 07:32:03 +0000 (07:32 +0000)]
MFC r267436-267439:

- Replace malloc+memset with calloc.
- iconv_open(3): initialise ci_ilseq_invalid field of _citrus_iconv_shared
  struct after allocation with malloc.
- iconvlist(3): reduce a memory leak by copying strings only once.
- iconv(1):
  - Make invalids variable local to do_conv such that it prints the number
    of invalid characters of the current file instead of an accumulated
    value.
  - Make do_conv return an error when invalid characters have been found.
    Return EXIT_FAILURE from main if any file contained invalid characters.
    This matches the behaviour of GNU iconv.
  - Mark usage with __dead2 attribute.
  - Make the long_options array const.

Tested by: Pavel Timofeev <timp87@gmail.com>

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

9 years agoMFC r261270:
n_hibma [Wed, 18 Jun 2014 22:09:33 +0000 (22:09 +0000)]
MFC r261270:

Fix the ordering of the arguments to printf in
uhub_child_location_string(). This produced bogus information in

        dev.<USB driver>.<id>.%location

output from sysctl.

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

9 years agoMFC r267342:
jimharris [Wed, 18 Jun 2014 19:32:38 +0000 (19:32 +0000)]
MFC r267342:

  Use bitwise OR instead of logical OR when constructing value for
  SET_FEATURES/NUMBER_OF_QUEUES command.

Sponsored by: Intel

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

9 years agoMFC r267062:
kib [Wed, 18 Jun 2014 05:35:09 +0000 (05:35 +0000)]
MFC r267062:
Disable existing uncore hwpmc code for Nehalem and Westmere EX.

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

9 years agoMFC r266901
neel [Tue, 17 Jun 2014 21:49:03 +0000 (21:49 +0000)]
MFC r266901
Allocate a zeroed LDT.
Failing to do this might result in the LDT appearing to run out of free
descriptors because of random junk in the descriptor's 'sd_type' field.

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