195852 Commits

Author SHA1 Message Date
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
tuexen
43d8b12efc 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@
2014-06-22 16:54:59 +00:00
tuexen
e27908d03e 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
2014-06-22 16:50:46 +00:00
gavin
e44b7f112f 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.
2014-06-22 16:48:21 +00:00
tuexen
08bf577274 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.
2014-06-22 16:45:42 +00:00
tuexen
d6a02f0073 MFC r264704:
Add consistency checks to ensure that fragments of a user message
have the same U-bit.
2014-06-22 16:43:59 +00:00
tuexen
51d3c53b6e MFC r264701:
Send also a packet containing an ABORT chunk in response to an OOTB packet
containing a COOKIE-ECHO chunk.
2014-06-22 16:42:09 +00:00
tuexen
d64d9d1bce MFC r264682:
Use consistently debug output instead of an unconditional printf.
2014-06-22 16:40:36 +00:00
tuexen
d5831ca68c MFC r264679:
Send the correct error cause, when a DATA chunk with no user data
is received. This bug was reported by Irene Ruengeler.
2014-06-22 16:38:06 +00:00
tuexen
493873a6ef MFC r264241:
Call sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(),
since rt_addrmsg() gets also called from other functions.
2014-06-22 16:36:14 +00:00
tuexen
de3cc21706 MFC r264017:
Increment the SSN only after processing the last fragment of an
ordered user message.
2014-06-22 16:34:27 +00:00
tuexen
1831342aca 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@.
2014-06-22 16:32:41 +00:00
tuexen
39c4d67449 MFC r263921:
Use SCTP_OVER_UDP_TUNNELING_PORT more consistently.
2014-06-22 16:30:52 +00:00
tuexen
bfa185cf87 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@.
2014-06-22 16:28:52 +00:00
tuexen
23098a703a 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.
2014-06-22 16:26:16 +00:00
tuexen
c9ffc26041 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.
2014-06-22 16:22:44 +00:00
tuexen
c6eec1dbae MFC r262252:
Remove redundant code and fix a style error.
2014-06-22 16:21:14 +00:00
kib
abdd2eb078 MFC r267492:
Fix some cosmetic issues with the use of kmem_malloc() in the i386 LDT
sysarch(2) code.
2014-06-22 08:32:31 +00:00
kib
1e107e92ab MFC r267255:
Change the nblock mutex to rwlock.

MFC r267264:
Devolatile as needed.
2014-06-22 08:30:43 +00:00