ae [Thu, 30 Oct 2014 10:59:57 +0000 (10:59 +0000)]
Fix mbuf leak in IPv6 multicast code.
When multicast capable interface goes away, it leaves multicast groups,
this leads to generate MLD reports, but MLD code does deffered send and
MLD reports are queued in the in6_multi's in6m_scq ifq. The problem is
that in6_multi structures are freed when interface leaves multicast groups
and thread that does deffered send will not take these queued packets.
jch [Thu, 30 Oct 2014 08:53:56 +0000 (08:53 +0000)]
Fix a race condition in TCP timewait between tcp_tw_2msl_reuse() and
tcp_tw_2msl_scan(). This race condition drives unplanned timewait
timeout cancellation. Also simplify implementation by holding inpcb
reference and removing tcptw reference counting.
Differential Revision: https://reviews.freebsd.org/D826
Submitted by: Marc De la Gueronniere <mdelagueronniere@verisign.com>
Submitted by: jch
Reviewed By: jhb (mentor), adrian, rwatson
Sponsored by: Verisign, Inc.
MFC after: 2 weeks
X-MFC-With: r264321
trasz [Thu, 30 Oct 2014 08:50:01 +0000 (08:50 +0000)]
Add support for "timeo", "actimeo", "noac", and "proto" options
to mount_nfs(8). They are implemented on Linux, OS X, and Solaris,
and thus can be expected to appear in automounter maps.
Reviewed by: rmacklem@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
mjg [Thu, 30 Oct 2014 05:10:33 +0000 (05:10 +0000)]
filedesc: get rid of atomic_load_acq_int from fget_unlocked
A read barrier was necessary because fd table pointer and table size were
updated separately, opening a window where fget_unlocked could read new size
and old pointer.
This patch puts both these fields into one dedicated structure, pointer to which
is later atomically updated. As such, fget_unlocked only needs data a dependency
barrier which is a noop on all supported architectures.
dim [Wed, 29 Oct 2014 20:18:37 +0000 (20:18 +0000)]
Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext(). While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().
jkim [Wed, 29 Oct 2014 19:21:19 +0000 (19:21 +0000)]
Replace a magic number with the proper definition. This change actually
fixes broken state field after r273266, i.e., "CPU-1" was displayed in place
of "RUN".
jhb [Wed, 29 Oct 2014 18:01:09 +0000 (18:01 +0000)]
Rework the EXAMPLES section to be a bit clearer.
- Add an example of using etcupdate diff.
- Create a subsection on bootstrapping that is below the simple
examples. This should make it clearer that 'etcupdate extract' is
a one-time operation and not part of the common workflow. It also
adds more suggestions on when bootstrapping is needed and additional
steps to make future merges simpler.
trasz [Wed, 29 Oct 2014 09:26:55 +0000 (09:26 +0000)]
Add discovery-filter. This makes it possible to restrict which targets
are returned during discovery based on initiator portal, name, and CHAP
credentials.
Reviewed by: mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
ngie [Wed, 29 Oct 2014 04:32:46 +0000 (04:32 +0000)]
Fix the logic inversion in the previous commit by ensuring that the matched
expression (:M) is empty, not the not matched (:N) is empty. The former case
means we have not found the TEST_SUBDIR value in SUBDIR
Reported by: rodrigc
X-MFC with: r273803
Pointyhat to: me (did not use a clean install root)
Sponsored by: EMC / Isilon Storage Division
ngie [Tue, 28 Oct 2014 23:01:09 +0000 (23:01 +0000)]
Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly
appending the TESTS_SUBDIRS variable to SUBDIR
Duplicate directory entries can cause unexpected side effects, like
installing the same files multiple times. This can be easily
reproduced via the following testcase prior to this commit:
jhb [Tue, 28 Oct 2014 19:17:44 +0000 (19:17 +0000)]
Rework virtual machine hypervisor detection.
- Move the existing code to x86/x86/identcpu.c since it is x86-specific.
- If the CPUID2_HV flag is set, assume a hypervisor is present and query
the 0x40000000 leaf to determine the hypervisor vendor ID. Export the
vendor ID and the highest supported hypervisor CPUID leaf via
hv_vendor[] and hv_high variables, respectively. The hv_vendor[]
array is also exported via the hw.hv_vendor sysctl.
- Merge the VMWare detection code from tsc.c into the new probe in
identcpu.c. Add a VM_GUEST_VMWARE to identify vmware and use that in
the TSC code to identify VMWare.
np [Tue, 28 Oct 2014 18:10:57 +0000 (18:10 +0000)]
Always request a completion for every work request for iWARP. The
initial MPA exchange must be tracked this way so that t4_tom's state for
the tid is all clean at the time the tid transitions to RDMA mode. Once
it does, t4_tom is out of the way and iw_cxgbe uses the qp endpoints
directly.
kib [Tue, 28 Oct 2014 15:22:13 +0000 (15:22 +0000)]
Add fueword(9) and casueword(9) functions. They are like fuword(9)
and casuword(9), but do not mix value read and indication of fault.
I know (or remember) enough assembly to handle x86 and powerpc. For
arm, mips and sparc64, implement fueword() and casueword() as wrappers
around fuword() and casuword(), which means that the functions cannot
distinguish between -1 and fault.
On architectures where fueword() and casueword() are native, implement
fuword() and casuword() using fueword() and casuword(), to reduce
assembly code duplication.
Sponsored by: The FreeBSD Foundation
Tested by: pho
MFC after: 2 weeks (ia64 needs treating)
bapt [Tue, 28 Oct 2014 14:54:04 +0000 (14:54 +0000)]
Do not delete the group wheel when bad argument is passed to pw groupdel -g
Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel
emaste [Tue, 28 Oct 2014 14:48:52 +0000 (14:48 +0000)]
Add missing /usr/lib/debug directories
Directories for /usr/lib{,32}/{i18n,private} were missing from the mtree
file, which caused installworld to install the files that should be in
the directory as the name of the directory.
bapt [Tue, 28 Oct 2014 14:19:17 +0000 (14:19 +0000)]
Fix a regression in pw usermod -G list
The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.
While here add a regression test about this bug
hselasky [Tue, 28 Oct 2014 13:38:10 +0000 (13:38 +0000)]
Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.
MFC after: 3 days
Sponsored by: Mellanox Technologies
hselasky [Tue, 28 Oct 2014 12:00:39 +0000 (12:00 +0000)]
The SYSCTL data pointers can come from userspace and must not be
directly accessed. Although this will work on some platforms, it can
throw an exception if the pointer is invalid and then panic the kernel.
Add a missing SYSCTL_IN() of "SCTP_BASE_STATS" structure.
MFC after: 3 days
Sponsored by: Mellanox Technologies
bapt [Tue, 28 Oct 2014 10:33:31 +0000 (10:33 +0000)]
Improve compatibility with GNU timeout
According to the coreutils regression testsuite for timeout(1)
It is expect to exit with a status being:
125 in case an invalid duration or signal is passed in arguments
126 in case an invalid command is passed in arguments
127 in case the command passed in arguments does not exists.
While here document this behaviour in the man page
trasz [Tue, 28 Oct 2014 10:25:59 +0000 (10:25 +0000)]
Remove the distinction between strings and numbers from ctld(8) yacc parser.
This fixes problems with passing strings that look like numbers to clauses
that expect strings; previously it caused syntax errors and had to be worked
by user, using quotes. The workaround introduced in r267833 is no longer
neccessary.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
nwhitehorn [Mon, 27 Oct 2014 23:19:51 +0000 (23:19 +0000)]
Use pkg-1.4-style platform identifiers based on MACHINE_ARCH (e.g.
FreeBSD:11:amd64 instead of freebsd:11:x86:64) when bootstrapping pkg.
Thanks to portmgr for providing symlinks so both styles work.
np [Mon, 27 Oct 2014 22:22:46 +0000 (22:22 +0000)]
Some cxgbe/iw_cxgbe fixes:
- Free rt in c4iw_connect only if it is allocated.
- Call soclose instead of so_shutdown if there is an abort from the peer.
- Close socket and return failure if TOE is not enabled.
Submitted by: Hariprasad at Chelsio dot com
Sponsored by: Chelsio Communications
grehan [Mon, 27 Oct 2014 22:02:35 +0000 (22:02 +0000)]
Output a summary of optional SVM features in dmesg similar to CPU features.
If bootverbose is enabled, a detailed list is provided; otherwise, a
single-line summary is displayed.
jhb [Mon, 27 Oct 2014 18:37:11 +0000 (18:37 +0000)]
Add foo_genassym.c files to DPSRCS so dependencies for them are generated.
This ensures these objects are rebuilt to generate an updated header of
assembly constants if needed.
pi [Mon, 27 Oct 2014 11:38:17 +0000 (11:38 +0000)]
bin/dd: Fix incorrect casting of arguments
dd(1) casts many of its numeric arguments from uintmax_t to intmax_t
and back again to detect whether or not the original arguments were
negative. This caused wrong behaviour in some boundary cases:
$ dd if=/dev/zero of=/dev/null count=18446744073709551615
dd: count cannot be negative
After the fix:
$ dd if=/dev/zero of=/dev/null count=18446744073709551615
dd: count: Result too large
kib [Mon, 27 Oct 2014 07:51:26 +0000 (07:51 +0000)]
Add a method to iicbus to request IIC_M_NOSTOP behaviour for multibyte
transfers to be default. It simplifies porting code which assumes
such settings.
Discussed with: avg, llos, nwhitehorn
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
neel [Sun, 26 Oct 2014 19:03:06 +0000 (19:03 +0000)]
Change the type of the first argument to the I/O emulation handlers to
'struct vm *'. Previously it used to be a 'void *' but there is no reason
to hide the actual type from the handler.
ian [Sun, 26 Oct 2014 18:30:35 +0000 (18:30 +0000)]
Remove the ARM_DEVICE_MULTIPASS option and make its effect be the default.
Multipass device attachment was tested on many arm platforms by users and
only success was reported on the arm@ mailing list. This is just the
long-delayed followup of making it the default.
Multipass attachment is necessary when using vendor-supplied FDT data,
because our devices may need to be attached in a different order than they
are described in the FDT data.