195870 Commits

Author SHA1 Message Date
jhb
bdcad19a9a 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.
2014-06-27 17:22:18 +00:00
jpaetzel
79ef481e2b 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
2014-06-27 17:10:28 +00:00
emaste
c17570f4b1 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.
2014-06-27 14:42:13 +00:00
kib
4dd240dde0 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.
2014-06-27 11:42:51 +00:00
pluknet
b39fb82c62 MFC r261140:
Add MLINK for fdclosedir.3 to directory.3 and sort fdopendir(3) entry.
2014-06-27 09:11:24 +00:00
pluknet
e6e3575a65 MFC r266479, r267153:
- Move Nx definition to a separate block.
- Add Lb string for libcuse.
2014-06-27 05:50:55 +00:00
hiren
918d4e15e9 MFC r267690
Hide a harmless "QUEUE FULL EVENT" message behind bootverbose.
2014-06-27 05:37:00 +00:00
jhb
b9c113aadd 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.)
2014-06-26 19:19:06 +00:00
pluknet
42ff249abc MFC r267196:
Add support for inspecting process flags set in p_flag2.
2014-06-26 08:55:06 +00:00
pluknet
2e4a0412a1 MFC r261901:
Preserve one character space for a trailing '\0'.
2014-06-26 08:41:54 +00:00
kib
15d33955d2 MFC r267630:
Add MAP_EXCL flag for mmap(2).
2014-06-26 08:30:08 +00:00
kib
b371ec04aa MFC r267629:
Tidy up code of the wrapper.
2014-06-26 08:27:01 +00:00
kib
5d64734c2e MFC r267766:
Use correct names for the flags.
2014-06-26 08:24:18 +00:00
gjb
a8966aac9e 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
2014-06-25 18:59:43 +00:00
ume
ec8b74659a 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
2014-06-25 17:10:26 +00:00
cy
a526189dcb 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)
2014-06-25 13:33:31 +00:00
marius
06338f8ccc 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
2014-06-25 10:17:00 +00:00
np
810c9620cc MFC r267757:
cxgbe(4): Update the bundled T4 and T5 firmwares to versions 1.11.27.0

Obtained from:	Chelsio
2014-06-25 02:14:55 +00:00
gjb
3fdf363616 Document FreeBSD-SA-14:15.iconv and FreeBSD-SA-14:16.file
Sponsored by:	The FreeBSD Foundation
2014-06-25 00:10:41 +00:00
delphij
d1fedb7971 Fix multiple vulnerabilities in file(1) and libmagic(3).
Security:	FreeBSD-SA-14:16.file
Approved by:	so
2014-06-24 19:04:55 +00:00
bdrewery
f6034d31b7 MFC r267599:
- Add a LOCAL_ITOOLS to allow adding additional tools required for the
    installworld and distributeworld targets

PR:		179562
2014-06-24 15:57:48 +00:00
kib
3b20767696 MFC r267564:
In msdosfs_setattr(), add a check for result of the utimes(2) permissions test.
Refactor the permission checks for utimes(2).
2014-06-24 08:21:43 +00:00
dim
cf140f008f 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.
2014-06-24 06:12:11 +00:00
rodrigc
8d5996c444 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
2014-06-23 22:37:49 +00:00
rodrigc
360ded2657 Undo bad merge. 2014-06-23 22:35:41 +00:00
rodrigc
95d8d7a8ec 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
2014-06-23 22:31:28 +00:00
pfg
f1ff231dba MFC r267601:
stdtime: style(9) fixes.

Obtained from:	illumos
2014-06-23 15:03:51 +00:00
emaste
6632b872a3 MFC r267124, r267582:
Install VT support files

  They can be disabled by setting WITHOUT_VT_SUPPORT=yes in src.conf.
2014-06-23 13:50:02 +00:00
marius
27080bb5dd 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
2014-06-23 08:32:36 +00:00
marius
e7db5d1d10 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
2014-06-23 08:27:15 +00:00
kib
bab6ec9043 MFC r267254:
Make mmap(MAP_STACK) search for the available address space.

MFC r267497 (by alc):
Use local variable instead of sgrowsiz.
2014-06-23 08:08:22 +00:00
tuexen
08c9939204 MFC r267688:
Fix a bug which incorrectly allowed two listening SCTP sockets on
the same port bound to the wildcard address.
2014-06-23 07:58:41 +00:00
tuexen
ba54ed0f05 MFC r267682:
Fix a bug in the setsockopt()-handling of the SCTP
specific option SCTP_PEER_ADDR_THLDS: Use the
provided address as intended.
2014-06-23 07:56:39 +00:00
tuexen
41ae4ee23b 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.
2014-06-23 07:54:12 +00:00
np
e77b6c9934 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.
2014-06-23 05:39:10 +00:00
mav
afa2d243ef MFC r267429:
Fix some leaks on LUN creation error.
2014-06-22 21:28:05 +00:00
mav
59b5ddd687 MFC r267479:
Fix/improve fhe_stats sysctl output.
2014-06-22 21:26:46 +00:00
mav
de973a144b MFC r267351:
Move root_mount_hold() functionality to separate mutex.

It has nothing to share with mutex protecting list of mounted file systems.
2014-06-22 21:21:27 +00:00
mav
c8436ca653 MFC r267391:
Introduce new "256 Bucket" zone to split requests and reduce congestion
on "128 Bucket" zone lock.
2014-06-22 21:19:19 +00:00
mav
d2e570bf14 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.
2014-06-22 21:18:24 +00:00
mav
48559e83fe 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.
2014-06-22 21:16:18 +00:00
mav
febec37d72 MFC r267362:
Remove unneeded mountlist_mtx acquisition from sync_fsync().

All struct mount fields accessed by sync_fsync() are protected by MNT_MTX.
2014-06-22 21:14:34 +00:00
pfg
b27356ce84 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.
2014-06-22 20:29:51 +00:00
pfg
031b23ab31 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.
2014-06-22 20:24:17 +00:00
mav
0d8805deb2 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.
2014-06-22 18:06:11 +00:00
mav
23b32162ce 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.
2014-06-22 18:03:53 +00:00
mav
1d8eae9d0a MFC r267223:
Remove st_idle variable, duplicating st_xprt.
2014-06-22 18:02:39 +00:00
mav
ad4e5fe06b 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.
2014-06-22 18:01:40 +00:00
tuexen
6b3b15bb3a MFC r267329:
Add support for the SCTP_LOCAL_TRACE_BUF options.
While there, fix some whitespaces.
2014-06-22 16:58:29 +00:00
tuexen
7225abb45f MFC r267105:
Use ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf().
This was suggested by kevlo@.
2014-06-22 16:57:07 +00:00