]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r292454, r292455
pfg [Sat, 26 Dec 2015 18:37:01 +0000 (18:37 +0000)]
MFC r292454, r292455
ed(1): Prevent possible string overflows

Use strlcpy to guarantee NULL termination.

With hint from: imp, cem, ngie
CID: 1007252

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

8 years agoMFC r291155:
pfg [Sat, 26 Dec 2015 18:26:44 +0000 (18:26 +0000)]
MFC r291155:
bc: sync with OpenBSD

tty.c Rev. 1.3
Avoid unintended problems with operator precedence when doing an
assignment and comparison.

bc.1, Rev. 1.31, 1.32
'.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
Clarify sentence about `quit` in BUGS section.

extern.h, Rev. 1.12
whitespace

bc.y, Rev. 1.47
Prefer setvbuf() to setlinebuf() for portability

Obtained from: OpenBSD

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

8 years agoMFC 276962:
ume [Sat, 26 Dec 2015 12:06:52 +0000 (12:06 +0000)]
MFC 276962:
  Do not regenerate and install liblzma.pc when only build libraries
  aka do not regenerate while generating 32bits libs

Reported by: Shin-ichi Okano <s-okano__at__n08.itscom.net>

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

8 years agoMFC r292128:
kib [Sat, 26 Dec 2015 11:10:44 +0000 (11:10 +0000)]
MFC r292128:
In md(4) over vnode, correct handling of the unaligned unmapped io
requests which page alignment + size is greater than MAXPHYS. Split
request up to the size of io which fits into pbuf KVA with alignment,
and retry if a part of the bio is left unprocessed.

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

8 years agoAdd AI_V4MAPPED and AI_ALL support for getaddrinfo(3).
ume [Fri, 25 Dec 2015 11:17:21 +0000 (11:17 +0000)]
Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).

PR: 198092

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

8 years agoMFC r292435, r292441:
ume [Fri, 25 Dec 2015 10:53:30 +0000 (10:53 +0000)]
MFC r292435, r292441:
  - Keep hosts.by{name,addr} IPv4 only.
  - Add comment how we handle hosts and ipnodes.
  - Generate ipnodes.by{addr,name} from /etc/hosts for
    compatibility with FreeBSD local name resolution.
    If /var/yp/ipnodes exists, we generate them from it
    for backward compatibility.

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

8 years agoMFH: r292263
brueffer [Thu, 24 Dec 2015 20:15:14 +0000 (20:15 +0000)]
MFH: r292263

Assorted grammar, spelling and punctuation fixes.

PR: 203336, 203339
Submitted by: espeyb@rpi.edu, themesta@gmail.com

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

8 years agoMFC r292564:
jlh [Thu, 24 Dec 2015 16:55:09 +0000 (16:55 +0000)]
MFC r292564:

    Add port for IRC over TLS/SSL, as noted in RFC 7194.

    PR:     192505
    Submitted by:   loic.blot@unix-experience.fr

MFC r292694:

    Replace all whitespaces between port name and number with tabs.

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

8 years agoMFC r292313:
lidl [Wed, 23 Dec 2015 21:59:38 +0000 (21:59 +0000)]
MFC r292313:

Skip unavailable pools when running zfs pool scrubs

Approved by: rpaulo (mentor)

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

8 years agoMFC r290405:
lidl [Wed, 23 Dec 2015 21:57:26 +0000 (21:57 +0000)]
MFC r290405:

Restrict 520.pfdenied to only list rules that blocked traffic.
Before this change, the 520.pfdenied script listed all rules that
matched /^block/ in the rule. Restrict the printed output to only
those rules that result in packets being dropped.

Approved by: rpaulo (mentor)

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

8 years agoMFC r292360: sh: Fix use-after-free when attempting to modify a read-only
jilles [Wed, 23 Dec 2015 18:24:40 +0000 (18:24 +0000)]
MFC r292360: sh: Fix use-after-free when attempting to modify a read-only
variable.

Reported by: bapt

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

8 years agoMFC r292485:
ngie [Wed, 23 Dec 2015 10:34:11 +0000 (10:34 +0000)]
MFC r292485:

Add missing return statement to atf/printf_test to make the example
complete and correct, and mute a compiler warning from clang

Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r292319:
ngie [Wed, 23 Dec 2015 10:31:46 +0000 (10:31 +0000)]
MFC r292319:

Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for
testing for kernel features via the feature_present(3) libcall

The semantics are similar to the other macros in the header (skip
testcase with ATF macro; exit with appropriate exit code with the
PLAIN macro)

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r292316:
ngie [Wed, 23 Dec 2015 10:11:54 +0000 (10:11 +0000)]
MFC r292316:

Remove hosts that don't resolve properly with the nss and resolv tests

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r292327:
ngie [Wed, 23 Dec 2015 09:18:47 +0000 (09:18 +0000)]
MFC r292327:

Use fabsl instead of fabs to mute -Wabsolute-value warnings from clang
because `nums[]` is an array of long doubles

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289635
davidcs [Tue, 22 Dec 2015 19:34:21 +0000 (19:34 +0000)]
MFC r289635

ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
ql_os.c: removed unnecessary debug printf
ql_ver.h: updated version number

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

8 years agoMerge r292411: Fix regression in if_ndis in r280347.
glebius [Tue, 22 Dec 2015 18:39:07 +0000 (18:39 +0000)]
Merge r292411: Fix regression in if_ndis in r280347.

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

8 years agoMFC r291654, r291727, r291821, r291872, r292034, r292041, r292249, r292042:
mav [Tue, 22 Dec 2015 13:19:29 +0000 (13:19 +0000)]
MFC r291654, r291727, r291821, r291872, r292034, r292041, r292249, r292042:
Add initial support for 16Gbps FC QLogic chips.

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

8 years agoMFC r291868: Rework WWNs generation to make cards without NVRAM more useful.
mav [Tue, 22 Dec 2015 12:54:13 +0000 (12:54 +0000)]
MFC r291868: Rework WWNs generation to make cards without NVRAM more useful.

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

8 years agoMFC r291730: Update isp_put_icb_2400() for new structure fields.
mav [Tue, 22 Dec 2015 12:53:01 +0000 (12:53 +0000)]
MFC r291730: Update isp_put_icb_2400() for new structure fields.

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

8 years agoMFC r292290: Set DS flag, required for LPB log page by spec.
mav [Tue, 22 Dec 2015 09:02:51 +0000 (09:02 +0000)]
MFC r292290: Set DS flag, required for LPB log page by spec.

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

8 years agoBump __FreeBSD_version after xz 5.2.2 merge (multithread support).
delphij [Tue, 22 Dec 2015 08:08:41 +0000 (08:08 +0000)]
Bump __FreeBSD_version after xz 5.2.2 merge (multithread support).

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

8 years agoMFC: xz 5.2.2.
delphij [Tue, 22 Dec 2015 08:03:23 +0000 (08:03 +0000)]
MFC: xz 5.2.2.

Relnotes: yes

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

8 years agoMFC 291947:
jhb [Mon, 21 Dec 2015 22:16:09 +0000 (22:16 +0000)]
MFC 291947:
Set %esp correctly in the extended TSS.

The pcb is saved at the top of the kernel stack on x86 platforms.
The initial kenrel stack pointer is set in the TSS so that the trapframe
from user -> kernel transitions begins directly below the pcb and grows
down.

The XSAVE changes moved the FPU save area out of the pcb and into a
variable-sized area after the pcb.  This required updating the expressions
to calculate the initial stack pointer from 'stacktop - sizeof(pcb)' to
'stacktop - sizeof(pcb) + FPU save area size'.

The i386_set_ioperm() system call allows user applications to access
individual I/O ports via the I/O port permission bitmap in the TSS.
On FreeBSD this requires allocating a custom per-process TSS instead of
using the shared per-CPU TSS.

The expression to initialize the initial kernel stack pointer in the
per-process TSS created for i386_set_ioperm() was not properly updated
after the XSAVE changes.  Processes that used i386_set_ioperm() would
trash the trapframe during subsequent context switches resulting in
panics from memory corruption.

This changes fixes the kernel stack pointer calculation for the per-process
TSS.

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

8 years agoMFC 290948:
jhb [Mon, 21 Dec 2015 20:40:17 +0000 (20:40 +0000)]
MFC 290948:
Only use a power of 2 for the number of receive and transmit queues.
Using other values causes VMXNET3_CMD_ENABLE to fail.  The Linux
driver also enforces this restriction.

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

8 years agoMFC r292219:
kp [Mon, 21 Dec 2015 20:29:55 +0000 (20:29 +0000)]
MFC r292219:

inet6: Do not assume every interface has ip6 enabled.

Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words,
ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is
updated.

pfsync interfaces will never have ip6 support, because it's explicitly disabled
in in6_domifattach().

PR:         205194

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

8 years agoMFC r279738, r281307: boot1.efi: add error reporting
emaste [Mon, 21 Dec 2015 19:49:00 +0000 (19:49 +0000)]
MFC r279738, r281307: boot1.efi: add error reporting

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r276146: Use explicit --output-target to set EFI file format
emaste [Mon, 21 Dec 2015 19:40:32 +0000 (19:40 +0000)]
MFC r276146: Use explicit --output-target to set EFI file format

According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r280047: build x86-specific files in amd64 loader.efi
emaste [Mon, 21 Dec 2015 19:25:27 +0000 (19:25 +0000)]
MFC r280047: build x86-specific files in amd64 loader.efi

This was originally done for the arm and arm64 loader.efi and is MFC'd
here to ease future UEFI loader MFCs.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r277735 (by royger):
dim [Mon, 21 Dec 2015 17:15:03 +0000 (17:15 +0000)]
MFC r277735 (by royger):

amd64: allow base memory segment to start at address different than 0

Current code requires that the first physical memory segment starts at 0,
but this is not really needed. We only need to make sure the bootstrap code
and page tables for APs are allocated below 4GB.

This patch removes this requirement and allows booting a Dell R710 from
UEFI, where the first physical memory segment starts at 0x10000.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D1417

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

8 years agoMFC r292355: Remove lldb(1) files if WITHOUT_LLDB is set
emaste [Mon, 21 Dec 2015 15:13:15 +0000 (15:13 +0000)]
MFC r292355: Remove lldb(1) files if WITHOUT_LLDB is set

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC: r291073
araujo [Mon, 21 Dec 2015 14:32:29 +0000 (14:32 +0000)]
MFC: r291073

If a NIS server has long entries on its database that is bigger than
1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry
loop when is requesting the information from the NIS server.

The ypmatch(1) will return an error until the command receives an
kill(1).

To avoid this problem, we check the MAX_RETRIES that is by default set
to 20 and avoid get in infinet loop at the client side.

NOTE: FreeBSD nis(8) server doesn't present this issue.

Submitted by:   Ravi Pokala <rpokala at panasas.com>,
                Lakshmi N. Sundararajan <lakshmi.n at msystechnologies.com>,
                Lewis, Fred <flewis at panasas.com>,
                Pushkar Kothavade <pushkar.kothavade at msystechnologies.com>

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

8 years agoMFC r291936:
kib [Mon, 21 Dec 2015 11:44:54 +0000 (11:44 +0000)]
MFC r291936:
Update ctime when atime or birthtime are updated.
Cleanup setting of ctime/mtime/birthtime.

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

8 years agoMFH: r292212
brueffer [Mon, 21 Dec 2015 09:34:45 +0000 (09:34 +0000)]
MFH: r292212

Flesh out the SEE ALSO section.

PR: 202929
Submitted by: jhs@berklix.com

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

8 years agoMFC r292130: exec(3): Fix COMPATIBILITY section: default path does not
jilles [Sun, 20 Dec 2015 13:41:06 +0000 (13:41 +0000)]
MFC r292130: exec(3): Fix COMPATIBILITY section: default path does not
contain cwd.

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

8 years agoMFC r291892:
ngie [Sun, 20 Dec 2015 04:12:12 +0000 (04:12 +0000)]
MFC r291892:

Remove redundant default TESTSDIR that is already defined in bsd.test.mk
after r289158

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r292153:
ngie [Sun, 20 Dec 2015 00:40:33 +0000 (00:40 +0000)]
MFC r292153:

Add -static to CFLAGS to unbreak the tests by using a libc.a with
the xlocale private symbols exposed which aren't exposed publicly
via the DSO

PR: 191354
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289315, r292216
vangyzen [Sat, 19 Dec 2015 02:41:31 +0000 (02:41 +0000)]
MFC r289315, r292216

resolver: automatically reload /etc/resolv.conf

On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed.  If so, reload the file and reinitialize
the resolver library.  However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default.  Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

Relnotes:       yes
Sponsored by:   Dell Inc.

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

8 years agoMFC r289837
vangyzen [Sat, 19 Dec 2015 02:35:32 +0000 (02:35 +0000)]
MFC r289837

resolver: abuse _res a little less

In the past, _res was a global variable.  Now, it's multiple function calls.
Several functions in the resolver use _res multiple times and therefore
call the function(s) far more than necessary.

Fix those callers to store the result of _res in a local variable.

Add __noinline to the definition of res_init() to avoid the code bloat
that these changes would have otherwise incurred.  Thanks to jilles
for noticing this.

Sponsored by:   Dell Inc.

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

8 years agoMFC r292129:
ume [Sat, 19 Dec 2015 01:21:28 +0000 (01:21 +0000)]
MFC r292129:
  RFC 3493 requires ignoring the loopback address for AI_ADDRCONFIG.
  Since it breaks certain jail setup, we ignore just 127.0.0.1
  instead of whole loopback address range.

PR: 192014
Reviewed by: hrs

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

8 years agoMFC r291770: rc.subr: Check for running daemons before a custom start_cmd
jilles [Fri, 18 Dec 2015 19:58:34 +0000 (19:58 +0000)]
MFC r291770: rc.subr: Check for running daemons before a custom start_cmd
is executed.

Currently rc scripts implementing their own start_cmd do not enjoy the
benefits of rc.subr's own check for rc_pid.

This leads to around a third of ports with such a start_cmd not to check for
the process at all and two thirds of ports to re-implement this check
(sometimes wrongly).

This patch moves the check for rc_pid to before ${rc_arg}_cmd is executed.

Submitted by: Dirk Engling
Reviewed by: feld
Relnotes: yes

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

8 years agoMFC r291156:
royger [Fri, 18 Dec 2015 14:56:49 +0000 (14:56 +0000)]
MFC r291156:

Ignore the inbound checksum flags when doing packet forwarding in netvsc
driver.

Sponsored by: Microsoft OSTC
PR: 203630

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

8 years agoMFC r292258:
royger [Fri, 18 Dec 2015 14:52:12 +0000 (14:52 +0000)]
MFC r292258:

hyperv/kvp: wake up the daemon if it's sleeping due to poll()

Submitted by:           Dexuan Cui <decui@microsoft.com>
Sponsored by: Microsoft OSTC

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

8 years agoMFC r292250:
ngie [Fri, 18 Dec 2015 06:58:44 +0000 (06:58 +0000)]
MFC r292250:

Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
lib/libc/resolv by conditionalizing its definition

Reviewed by: ume, vangyzen
Differential Revision: https://reviews.freebsd.org/D4519

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

8 years agoMFC r281674: crunchide: always include both 32- and 64-bit ELF support
emaste [Fri, 18 Dec 2015 03:06:39 +0000 (03:06 +0000)]
MFC r281674: crunchide: always include both 32- and 64-bit ELF support

This avoids the need to build a target-specific crunchide for cross-
builds.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r281655: crunchide: remove unused a.out and non-functional ECOFF support
emaste [Fri, 18 Dec 2015 02:34:01 +0000 (02:34 +0000)]
MFC r281655: crunchide: remove unused a.out and non-functional ECOFF support

Sponsored by: The FreeBSD Foundation

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

8 years agoSync crunchide(1) arch support with HEAD
emaste [Fri, 18 Dec 2015 01:44:03 +0000 (01:44 +0000)]
Sync crunchide(1) arch support with HEAD

MFC r276764, r281781, r282291, r292106

Add support to crunchide for handling AArch64 (arm64) ELF files.
Remove local EM_* ELF definitions provided by system ELF headers
Restore local EM_AARCH64 constant for bootstrapping
Add RISC-V to supported machine types

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC 292038:
jhb [Fri, 18 Dec 2015 01:03:34 +0000 (01:03 +0000)]
MFC 292038:
Fix a copy and paste bug when this page was first written by copying from
BUS_BIND_INTR.9.

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

8 years agoMFC 290429:
jhb [Fri, 18 Dec 2015 00:40:19 +0000 (00:40 +0000)]
MFC 290429:
When dumping an rman in DDB, include the RID of each resource.

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

8 years agoMFC r292277:
jamie [Fri, 18 Dec 2015 00:33:04 +0000 (00:33 +0000)]
MFC r292277:

  Fix jail name checking that disallowed anything that starts with '0'.
  The intention was to just limit leading zeroes on numeric names.  That
  check is now improved to also catch the leading spaces and '+' that
  strtoul can pass through.

PR: 204897

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

8 years agoMFC r292059:
ume [Thu, 17 Dec 2015 16:08:28 +0000 (16:08 +0000)]
MFC r292059:
  The calls to RES_SET_H_ERRNO() macro on error paths wind up
  dereferencing an uninitialized res.

PR: 202142
Submitted by: Sean Boudreau

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

8 years agoMFC r292048:
ngie [Thu, 17 Dec 2015 06:31:55 +0000 (06:31 +0000)]
MFC r292048:

Don't leak rsector/sector in mp_label(..)

Use calloc instead of malloc + memset(.., 0, ..) when allocating sector

Differential Revision: https://reviews.freebsd.org/D4450
Reported by: cppcheck
Reviewed by: mav
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r291716, r291724, r291741, r291742
ken [Wed, 16 Dec 2015 19:01:14 +0000 (19:01 +0000)]
MFC r291716, r291724, r291741, r291742

In addition to those revisions, add this change to a file that is not in
head:

sys/ia64/include/bus.h:
   Guard kernel-only parts of the ia64 machine/bus.h header with
   #ifdef _KERNEL.

   This allows userland programs to include <machine/bus.h> to get the
   definition of bus_addr_t and bus_size_t.

  ------------------------------------------------------------------------
  r291716 | ken | 2015-12-03 15:54:55 -0500 (Thu, 03 Dec 2015) | 257 lines

  Add asynchronous command support to the pass(4) driver, and the new
  camdd(8) utility.

  CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and
  completed CCBs may be retrieved via the CAMIOGET ioctl.  User
  processes can use poll(2) or kevent(2) to get notification when
  I/O has completed.

  While the existing CAMIOCOMMAND blocking ioctl interface only
  supports user virtual data pointers in a CCB (generally only
  one per CCB), the new CAMIOQUEUE ioctl supports user virtual and
  physical address pointers, as well as user virtual and physical
  scatter/gather lists.  This allows user applications to have more
  flexibility in their data handling operations.

  Kernel memory for data transferred via the queued interface is
  allocated from the zone allocator in MAXPHYS sized chunks, and user
  data is copied in and out.  This is likely faster than the
  vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in
  configurations with many processors (there are more TLB shootdowns
  caused by the mapping/unmapping operation) but may not be as fast
  as running with unmapped I/O.

  The new memory handling model for user requests also allows
  applications to send CCBs with request sizes that are larger than
  MAXPHYS.  The pass(4) driver now limits queued requests to the I/O
  size listed by the SIM driver in the maxio field in the Path
  Inquiry (XPT_PATH_INQ) CCB.

  There are some things things would be good to add:

  1. Come up with a way to do unmapped I/O on multiple buffers.
     Currently the unmapped I/O interface operates on a struct bio,
     which includes only one address and length.  It would be nice
     to be able to send an unmapped scatter/gather list down to
     busdma.  This would allow eliminating the copy we currently do
     for data.

  2. Add an ioctl to list currently outstanding CCBs in the various
     queues.

  3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do
     that.

  4. Test physical address support.  Virtual pointers and scatter
     gather lists have been tested, but I have not yet tested
     physical addresses or scatter/gather lists.

  5. Investigate multiple queue support.  At the moment there is one
     queue of commands per pass(4) device.  If multiple processes
     open the device, they will submit I/O into the same queue and
     get events for the same completions.  This is probably the right
     model for most applications, but it is something that could be
     changed later on.

  Also, add a new utility, camdd(8) that uses the asynchronous pass(4)
  driver interface.

  This utility is intended to be a basic data transfer/copy utility,
  a simple benchmark utility, and an example of how to use the
  asynchronous pass(4) interface.

  It can copy data to and from pass(4) devices using any target queue
  depth, starting offset and blocksize for the input and ouptut devices.
  It currently only supports SCSI devices, but could be easily extended
  to support ATA devices.

  It can also copy data to and from regular files, block devices, tape
  devices, pipes, stdin, and stdout.  It does not support queueing
  multiple commands to any of those targets, since it uses the standard
  read(2)/write(2)/writev(2)/readv(2) system calls.

  The I/O is done by two threads, one for the reader and one for the
  writer.  The reader thread sends completed read requests to the
  writer thread in strictly sequential order, even if they complete
  out of order.  That could be modified later on for random I/O patterns
  or slightly out of order I/O.

  camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from
  the pass(4) driver and also to send request notifications internally.

  For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR)
  per CAM CCB on the reading side, and a scatter/gather list
  (CAM_DATA_SG) on the writing side.  In addition to testing both
  interfaces, this makes any potential reblocking of I/O easier.  No
  data is copied between the reader and the writer, but rather the
  reader's buffers are split into multiple I/O requests or combined
  into a single I/O request depending on the input and output blocksize.

  For the file I/O path, camdd(8) also uses a single buffer (read(2),
  write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list
  (readv(2), writev(2), preadv(2), pwritev(2)) on writes.

  Things that would be nice to do for camdd(8) eventually:

  1.  Add support for I/O pattern generation.  Patterns like all
      zeros, all ones, LBA-based patterns, random patterns, etc. Right
      Now you can always use /dev/zero, /dev/random, etc.

  2.  Add support for a "sink" mode, so we do only reads with no
      writes.  Right now, you can use /dev/null.

  3.  Add support for automatic queue depth probing, so that we can
      figure out the right queue depth on the input and output side
      for maximum throughput.  At the moment it defaults to 6.

  4.  Add support for SATA device passthrough I/O.

  5.  Add support for random LBAs and/or lengths on the input and
      output sides.

  6.  Track average per-I/O latency and busy time.  The busy time
      and latency could also feed in to the automatic queue depth
      determination.

  sys/cam/scsi/scsi_pass.h:
   Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue
   and fetch asynchronous CAM CCBs respectively.

   Although these ioctls do not have a declared argument, they
   both take a union ccb pointer.  If we declare a size here,
   the ioctl code in sys/kern/sys_generic.c will malloc and free
   a buffer for either the CCB or the CCB pointer (depending on
   how it is declared).  Since we have to keep a copy of the
   CCB (which is fairly large) anyway, having the ioctl malloc
   and free a CCB for each call is wasteful.

  sys/cam/scsi/scsi_pass.c:
   Add asynchronous CCB support.

   Add two new ioctls, CAMIOQUEUE and CAMIOGET.

   CAMIOQUEUE adds a CCB to the incoming queue.  The CCB is
   executed immediately (and moved to the active queue) if it
   is an immediate CCB, but otherwise it will be executed
   in passstart() when a CCB is available from the transport layer.

   When CCBs are completed (because they are immediate or
   passdone() if they are queued), they are put on the done
   queue.

   If we get the final close on the device before all pending
   I/O is complete, all active I/O is moved to the abandoned
   queue and we increment the peripheral reference count so
   that the peripheral driver instance doesn't go away before
   all pending I/O is done.

   The new passcreatezone() function is called on the first
   call to the CAMIOQUEUE ioctl on a given device to allocate
   the UMA zones for I/O requests and S/G list buffers.  This
   may be good to move off to a taskqueue at some point.
   The new passmemsetup() function allocates memory and
   scatter/gather lists to hold the user's data, and copies
   in any data that needs to be written.  For virtual pointers
   (CAM_DATA_VADDR), the kernel buffer is malloced from the
   new pass(4) driver malloc bucket.  For virtual
   scatter/gather lists (CAM_DATA_SG), buffers are allocated
   from a new per-pass(9) UMA zone in MAXPHYS-sized chunks.
   Physical pointers are passed in unchanged.  We have support
   for up to 16 scatter/gather segments (for the user and
   kernel S/G lists) in the default struct pass_io_req, so
   requests with longer S/G lists require an extra kernel malloc.

   The new passcopysglist() function copies a user scatter/gather
   list to a kernel scatter/gather list.  The number of elements
   in each list may be different, but (obviously) the amount of data
   stored has to be identical.

   The new passmemdone() function copies data out for the
   CAM_DATA_VADDR and CAM_DATA_SG cases.

   The new passiocleanup() function restores data pointers in
   user CCBs and frees memory.

   Add new functions to support kqueue(2)/kevent(2):

   passreadfilt() tells kevent whether or not the done
   queue is empty.

   passkqfilter() adds a knote to our list.

   passreadfiltdetach() removes a knote from our list.

   Add a new function, passpoll(), for poll(2)/select(2)
   to use.

   Add devstat(9) support for the queued CCB path.

  sys/cam/ata/ata_da.c:
   Add support for the BIO_VLIST bio type.

  sys/cam/cam_ccb.h:
   Add a new enumeration for the xflags field in the CCB header.
   (This doesn't change the CCB header, just adds an enumeration to
   use.)

  sys/cam/cam_xpt.c:
   Add a new function, xpt_setup_ccb_flags(), that allows specifying
   CCB flags.

  sys/cam/cam_xpt.h:
   Add a prototype for xpt_setup_ccb_flags().

  sys/cam/scsi/scsi_da.c:
   Add support for BIO_VLIST.

  sys/dev/md/md.c:
   Add BIO_VLIST support to md(4).

  sys/geom/geom_disk.c:
   Add BIO_VLIST support to the GEOM disk class.  Re-factor the I/O size
   limiting code in g_disk_start() a bit.

  sys/kern/subr_bus_dma.c:
   Change _bus_dmamap_load_vlist() to take a starting offset and
   length.

   Add a new function, _bus_dmamap_load_pages(), that will load a list
   of physical pages starting at an offset.

   Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios.
   Allow unmapped I/O to start at an offset.

  sys/kern/subr_uio.c:
   Add two new functions, physcopyin_vlist() and physcopyout_vlist().

  sys/pc98/include/bus.h:
   Guard kernel-only parts of the pc98 machine/bus.h header with
   #ifdef _KERNEL.

   This allows userland programs to include <machine/bus.h> to get the
   definition of bus_addr_t and bus_size_t.

  sys/sys/bio.h:
   Add a new bio flag, BIO_VLIST.

  sys/sys/uio.h:
   Add prototypes for physcopyin_vlist() and physcopyout_vlist().

  share/man/man4/pass.4:
   Document the CAMIOQUEUE and CAMIOGET ioctls.

  usr.sbin/Makefile:
   Add camdd.

  usr.sbin/camdd/Makefile:
   Add a makefile for camdd(8).

  usr.sbin/camdd/camdd.8:
   Man page for camdd(8).

  usr.sbin/camdd/camdd.c:
   The new camdd(8) utility.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r291724 | ken | 2015-12-03 17:07:01 -0500 (Thu, 03 Dec 2015) | 6 lines

  Fix typos in the camdd(8) usage() function output caused by an error in
  my diff filter script.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r291741 | ken | 2015-12-03 22:38:35 -0500 (Thu, 03 Dec 2015) | 10 lines

  Fix g_disk_vlist_limit() to work properly with deletes.

  Add a new bp argument to g_disk_maxsegs(), and add a new function,
  g_disk_maxsize() tha will properly determine the maximum I/O size for a
  delete or non-delete bio.

  Submitted by: will
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r291742 | ken | 2015-12-03 22:44:12 -0500 (Thu, 03 Dec 2015) | 5 lines

  Fix a style issue in g_disk_limit().

  Noticed by: bdrewery

  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

8 years agoMFC r278234: EFI: print more information about EFI Tables.
emaste [Wed, 16 Dec 2015 16:48:59 +0000 (16:48 +0000)]
MFC r278234: EFI: print more information about EFI Tables.

This adds the GUIDs for DXE, HOB, Memory Type Information and Debug
Image Info.

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

8 years agoMFC r274439: Add the FDT table GUID.
emaste [Wed, 16 Dec 2015 16:46:08 +0000 (16:46 +0000)]
MFC r274439: Add the FDT table GUID.

This is used to pass the device tree blob from UEFI to the loader
in a similar way to the ACPI tables.

This will be used on arm64 but is not specific to the architecture.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r289349: mkimg: support fat16b partitions (MBR type 06h)
emaste [Wed, 16 Dec 2015 16:44:56 +0000 (16:44 +0000)]
MFC r289349: mkimg: support fat16b partitions (MBR type 06h)

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r256859: Don't force 64-bit DWARF2 on MIPS
emaste [Wed, 16 Dec 2015 16:42:24 +0000 (16:42 +0000)]
MFC r256859: Don't force 64-bit DWARF2 on MIPS

64-bit debug data is only necessary for objects with greater than 4GB of
debug data, and is not used on other 64-bit FreeBSD targets.

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

8 years agoMFC r282821: Remove redundant csu subdir logic
emaste [Wed, 16 Dec 2015 16:40:45 +0000 (16:40 +0000)]
MFC r282821: Remove redundant csu subdir logic

The appropriate subdirectories are handled by lib/csu/Makefile. There's
no need to duplicate this logic in Makefile.inc1 and lib/Makefile.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFH: r291766
brueffer [Wed, 16 Dec 2015 14:22:00 +0000 (14:22 +0000)]
MFH: r291766

ARC-1203 is supported since the latest driver update.

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

8 years agoMFC r259564,259565,291641:
delphij [Wed, 16 Dec 2015 08:02:21 +0000 (08:02 +0000)]
MFC r259564,259565,291641:

Update arcmsr(4) to 1.30.00.00 in order to add support of
ARC-1203 SATA RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

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

8 years agoMFC r292005:
ngie [Wed, 16 Dec 2015 02:43:34 +0000 (02:43 +0000)]
MFC r292005:

Call va_end on ap when vsnprintf fails in run_cmd(..) to clean up
the variable state

Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC: r257066 (partial)
marius [Wed, 16 Dec 2015 00:56:38 +0000 (00:56 +0000)]
MFC: r257066 (partial)

Mark unused parameters of bus_space_subregion(9) as such.

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

8 years agoMFC: r291638
rmacklem [Wed, 16 Dec 2015 00:52:35 +0000 (00:52 +0000)]
MFC: r291638
Fix the memory leak that occurs when the nfscommon.ko module is unloaded.
This leak was introduced by r291527 (r292223 in stable/10).
Since the nfscommon.ko module is rarely unloaded, this leak would not
have been much of an issue.

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

8 years agoMFC r290236
kp [Tue, 15 Dec 2015 21:02:53 +0000 (21:02 +0000)]
MFC r290236

pfctl: Fix uninitialised veriable

In pfctl_set_debug() we used 'level' without ever initialising it.
We correctly parsed the option, but them failed to actually assign the parsed
value to 'level' before performing to ioctl() to configure the debug level.

PR: 202996
Submitted by: Andrej Kolontai

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

8 years agoMFC r276669,r276723:
ngie [Tue, 15 Dec 2015 18:09:03 +0000 (18:09 +0000)]
MFC r276669,r276723:

r276669:

Integrate bin/cat/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

r276723:

Install d_align.{in,out} for the :align test

Pointyhat to: me

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

8 years agoMFC r271401:
ngie [Tue, 15 Dec 2015 18:01:05 +0000 (18:01 +0000)]
MFC r271401:
r271401 (by asomers):

Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
merge(1), which is part of the RCS package, it must not be installed if
WITHOUT_RCS update is set. Otherwise, it will produce confusing errors.

CR: https://reviews.freebsd.org/D691
Sponsored by: Spectra Logic

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

8 years agoMFC r284408,r289151,r289158:
ngie [Tue, 15 Dec 2015 17:58:10 +0000 (17:58 +0000)]
MFC r284408,r289151,r289158:

r284408:

Ensure TESTSDIR is defined before bsd.test.mk is .include'd

r289151:

Simplify netbsd-tests.test.mk

- projects/bmake and subsequent commits provide SRCTOP; there's no need to
  manually specify it now.
- Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually
  specifying this is probably no longer needed, but it persists just in case
  (supporting commits will need to be made to move it out of some of the meta
  .mk files).
- Compute a sane default for TESTSRC. Error out if the path cannot be found.

Sponsored by: EMC / Isilon Storage Division

r289158:

Default TESTSDIR to /usr/tests/${RELDIR:H}

When run from bin/ls/tests, for example, the value of TESTSDIR would be
${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. ->
/usr/tests/bin/ls

Document the new behavior in bsd.README.

While here, also document TESTSBASE

Relnotes: yes
Differential Revision: D1022
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r291576:
kib [Tue, 15 Dec 2015 12:58:33 +0000 (12:58 +0000)]
MFC r291576:
Handle invalid pages found during the sleepable collapse scan,  do not free
the shadow page swap space.  Combine the sleep code.

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

8 years agoMFC r291982:
ngie [Tue, 15 Dec 2015 05:47:05 +0000 (05:47 +0000)]
MFC r291982:

Skip the MAC portacl tests if MAC_PORTACL support is missing instead of
marking them failed

Sponsored by: EMC / Isilon Storage Division

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

8 years agoPartial MFC r291349:
bdrewery [Tue, 15 Dec 2015 01:37:46 +0000 (01:37 +0000)]
Partial MFC r291349:

  Standardize on OBJTOP in and outside of META MODE.

  For stable/10 this means bringing OBJTOP support in which simplifies
  MFCs.

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

8 years agoAdd SRCTOP and RELDIR support.
bdrewery [Tue, 15 Dec 2015 01:19:19 +0000 (01:19 +0000)]
Add SRCTOP and RELDIR support.

This is a direct commit to stable/10.  It allows simpler MFCing from head where
these are being used more frequently.

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC: r291536
rmacklem [Mon, 14 Dec 2015 23:09:02 +0000 (23:09 +0000)]
MFC: r291536
Add support for the new "-manage-gids" option for the nfsuserd daemon
to the rc scripts. With these changes, setting nfs_server_managegids="YES"
in /etc/rc.conf will enable this capability.

Relnotes: yes

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

8 years agoMFC: r291535
rmacklem [Mon, 14 Dec 2015 22:54:02 +0000 (22:54 +0000)]
MFC: r291535
Document the new "-manage-gids" option for the nfsuserd daemon.
This is a content change.

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

8 years agoMFC: r291534
rmacklem [Mon, 14 Dec 2015 22:43:43 +0000 (22:43 +0000)]
MFC: r291534
Add support for the "-manage-gids" option to the nfsuserd daemon.
When this option is set, the NFS server uses the list of groups
acquired via getgrouplist(3) for the uid instead of the list of
groups in the RPC request. This can be used to avoid the 16 gid
limit for the group list in the RPC request.

Relnotes: yes

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

8 years agoMFC r266566:
bdrewery [Mon, 14 Dec 2015 21:33:31 +0000 (21:33 +0000)]
MFC r266566:

  Add .../share/mk to the default system make path. This will fix the problem
  with broken in-tree builds (which are used far more pervasively than I'd
  known outside the tree). However, weird results may now happen if at any
  point in the tree above you there happens to be a directory that has
  subdirectory of share/mk, as unpredictable results will follow. This was
  considered the lessor of the two evils, at least for now. In the future this
  will be removed again when the underlying issues are resolved.

  For MFCing, this is to ensure that when upgrading to head the share/mk
  in-tree is always used.  Otherwise several build features will not work.
  This passes a build using head's bmake which has this as the default
  already.

Relnotes: yes

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

8 years agoBump __FreeBSD_version since r292223 changed the internal interface
rmacklem [Mon, 14 Dec 2015 21:30:28 +0000 (21:30 +0000)]
Bump __FreeBSD_version since r292223 changed the internal interface
between the nfsd.ko and nfscommon.ko modules such that they need
to be upgraded to-gether.

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

8 years agoMFC: r291527
rmacklem [Mon, 14 Dec 2015 21:21:43 +0000 (21:21 +0000)]
MFC: r291527
Add kernel support to the NFS server for the "-manage-gids"
option that will be added to the nfsuserd daemon in a future
commit. It modifies the cache used by NFSv4 for name<-->id
translation (both username/uid and group/gid) to support this.
When "-manage-gids" is set, the server looks up each uid
for the RPC and uses the list of groups cached in the server
instead of the list of groups provided in the RPC request.
The cached group list is acquired for the cache by the nfsuserd
daemon via getgrouplist(3).
This avoids the 16 groups limit for the list in the RPC request.
Since the cache is now used for every RPC when "-manage-gids"
is enabled, the code also modifies the cache to use a separate
mutex for each hash list instead of a single global mutex.

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

8 years agoMFC r291942:
bdrewery [Mon, 14 Dec 2015 20:29:31 +0000 (20:29 +0000)]
MFC r291942:

  Add missing CLEANFILES.

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

8 years agoFix the XEN build by disabling the mlx5 and mlx5en modules
hselasky [Mon, 14 Dec 2015 15:45:11 +0000 (15:45 +0000)]
Fix the XEN build by disabling the mlx5 and mlx5en modules
when XEN is enabled.

This is a direct commit to stable/10.

Sponsored by: Mellanox Technologies

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

8 years agoUnbreak the powerpc/powerpc64 tinderbox
ngie [Mon, 14 Dec 2015 14:44:23 +0000 (14:44 +0000)]
Unbreak the powerpc/powerpc64 tinderbox

PR: 198805
Submitted by: sbruno

MFC r280430:

r280430 (by bz):

Make ix_crcstrip a public symbol for the moment;  it probably is not
the right solution but I will leave it to experts to untangle this
problem to properly stop the build failures.

At the moment only if_ix.c includes dev/netmap/ixgbe_netmap.h which is
good as ixgbe_netmap.h defines a couple of (file) static variables--thus
local to if_ix.c.
static int ix_crcstrip however now also got checked from ix_txrx.c
(as an extern) and should not be visible there.  In fact we do see
powerpc and powerpc64 build failures because of this.  It is unclear
to me why on other (clang built?) architectures this does not lead
to a reference of an undefined symbol and similar build breakage.

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

8 years agoMFH: r291957
brueffer [Mon, 14 Dec 2015 11:38:43 +0000 (11:38 +0000)]
MFH: r291957

Fix a comment typo in the code example.

PR: 203497
Submitted by: chadf@triularity.org

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

8 years agoMFH: r291954
brueffer [Mon, 14 Dec 2015 11:34:00 +0000 (11:34 +0000)]
MFH: r291954

Add an MLINK for m_collapse.

PR: 204205
Submitted by: avos

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

8 years agoMFH: r291950
brueffer [Mon, 14 Dec 2015 11:28:16 +0000 (11:28 +0000)]
MFH: r291950

Fix a typo in the CPUTYPE list.

PR: 205099
Submitted by: xxjack12xx@gmail.com

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

8 years agoMFC r291939:
hselasky [Mon, 14 Dec 2015 10:31:03 +0000 (10:31 +0000)]
MFC r291939:
Update the mlx5 shared driver code to the latest version, which
include the following list of changes:

- Added eswitch ACL table management
  Introduce API for managing ACL table.
  This API include the following features:
  1) vlan filter - for VST/VGT+ support.
  2) spoofcheck.
  3) robust functionality to allow/drop general untagged/tagged traffic.
  4) support for both ingress and egress ACL types.

- Added loopback filter to the vacl table.

- Added multicast list set in the vPort context

- Added promiscuous mode set in the vPort context

- Set the vlan list in vPort context
  1) Check caps if VLAN list is not longer than FW supports
  2) Set MODIFY_NIC_VPORT_CONTEXT command

- Changed MLX5_EEPROM_MAX_BYTES from 48 to 32 so that a single EEPROM
  reading cannot cross the 128-byte boundary. Previously reading the
  MCIA register was done in batches of 48 bytes. The third reading
  would then by-pass the 127th byte, which means that part of the low
  page and part of the high page would be read at the same time, which
  created a bug:
    1st: 0-47 bytes
    2nd: 48-95 bytes
    3rd: 96-143 bytes

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4411

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

8 years agoMFC r291938:
hselasky [Mon, 14 Dec 2015 10:18:04 +0000 (10:18 +0000)]
MFC r291938:
Add full support for Receive Side Scaling, RSS, to the mlx5en
driver. This includes binding all interrupt and worker threads
according to the RSS configuration, setting up correct Toeplitz
hashing keys as given by RSS and setting the correct mbuf
hashtype for all received traffic.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4410

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

8 years agoMFC r290003:
hselasky [Mon, 14 Dec 2015 10:03:04 +0000 (10:03 +0000)]
MFC r290003:
Add support for binding IRQs to CPUs in the LinuxKPI. The new function
added is for BSD only and does not exist in Linux.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r291932:
hselasky [Mon, 14 Dec 2015 09:59:21 +0000 (09:59 +0000)]
MFC r291932:
Add support for setting the TX moderation mode via a sysctl entry. TX
completion events can be moderated in the same way like RX completion
events. Expose this functionality by a sysctl variable.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4409

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

8 years agoMFC r291931:
hselasky [Mon, 14 Dec 2015 09:57:42 +0000 (09:57 +0000)]
MFC r291931:
The firmware no longer supports setting a port MTU of zero bytes.
Set the port MTU and then query it and report if any problems instead.

Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4408

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

8 years agoMFC r291684:
hselasky [Mon, 14 Dec 2015 09:55:14 +0000 (09:55 +0000)]
MFC r291684:
Update the mlx5en(4) manual page.

Submitted by: Mark Bloch <markb@mellanox.com>
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4348

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

8 years agoMFC r291703:
hselasky [Mon, 14 Dec 2015 09:52:15 +0000 (09:52 +0000)]
MFC r291703:
Regenerate usb.conf .

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

8 years agoMFC r291953:
hselasky [Mon, 14 Dec 2015 09:46:46 +0000 (09:46 +0000)]
MFC r291953:
When setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
from 1500 to 1496 bytes. The MTU should remain at 1500, extending the
frame size as per IEEE 802.3. Adding IFCAP_VLAN_MTU to the
if_capabilities field in the smsc driver solves the problem.  The
datasheet for the LAN9512 chip, section 3.2.3 states that the chip
supports the extended frame.

Submitted by: rpp@ci.com.au
PR: 205050

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

8 years agoMFC r263985, r275646 and r289028:
hselasky [Mon, 14 Dec 2015 09:24:40 +0000 (09:24 +0000)]
MFC r263985, r275646 and r289028:
Add more USB IDs.

PR: usb/188046

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

8 years agoMFC r291948:
kib [Mon, 14 Dec 2015 07:54:45 +0000 (07:54 +0000)]
MFC r291948:
Use ANSI C definition.

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

8 years agoMFC r291837:
ngie [Sun, 13 Dec 2015 21:15:03 +0000 (21:15 +0000)]
MFC r291837:

split.ih:
- Create automatically generated include header for split.c

main.c:
- Use function definitions from debug.ih and split.ih instead of externs

Sponsored by: EMC / Isilon Storage Division

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

8 years agoRevert r292168 -- I used the wrong commit message by accident
ngie [Sun, 13 Dec 2015 21:14:04 +0000 (21:14 +0000)]
Revert r292168 -- I used the wrong commit message by accident

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

8 years agoMFC r276737,r289369,r289376,r289424,r291219,r291382,r291385,r291908:
ngie [Sun, 13 Dec 2015 21:09:46 +0000 (21:09 +0000)]
MFC r276737,r289369,r289376,r289424,r291219,r291382,r291385,r291908:

r276737 (by imp):

Remove old ioctl use and support, once and for all.

r289369 (by emaste):

newfs_msdos: rework option parsing to match NetBSD

NetBSD split newfs_msdos in two so that they can reuse the file system
creation part in makefs. This change is a step on the path of bringing
that support to FreeBSD.

Reviewed by: kib, pfg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3905

r289376 (by emaste):

newfs_msdos: move mkfs_msdos to separate file for later use in makefs

Sponsored by: The FreeBSD Foundation

r289424 (by emaste):

newfs_msdos: prefer snprintf to sprintf

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

r291219 (by emaste):

newfs_msdos: rework error handling for eventual use in makefs

Return -1 on errors from mkfs_msdos() instead of err()/errx(), to
allow different consumers to handle errors as appropriate.

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

r291382 (by emaste):

mkfs_msdos: sync with NetBSD

Add a sanity test and clean up whitespace.

Obtained from: NetBSD

r291385 (by emaste):

Use netbsd usage() implementation in newfs_msdos

In r289629 newfs_msdos option descriptions are available in
mkfs_msdos.h.

Obtained from: NetBSD

r291908:

Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end
of the function

Differential Revision: https://reviews.freebsd.org/D4405
PR: 204943
Reviewed by: emaste, jilles
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r291980,r291981:
ngie [Sun, 13 Dec 2015 04:29:09 +0000 (04:29 +0000)]
MFC r291980,r291981:

r291980:

Add missing va_ends for corresponding va_starts to clean up variable arguments
initialized in _test_fmt(..)

Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

r291981:

Delete bogus freeing of uninitialized data

Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r292013:
ngie [Sun, 13 Dec 2015 04:24:15 +0000 (04:24 +0000)]
MFC r292013:

Use stdint.h instead of inttypes.h as the latter pollutes namespace more

Submitted by: bde
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r291891:
ngie [Sun, 13 Dec 2015 04:22:50 +0000 (04:22 +0000)]
MFC r291891:

Use .Fx instead of explicitly spelling out FreeBSD

Fix several warnings reported by igor

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r291896:
ngie [Sun, 13 Dec 2015 04:20:47 +0000 (04:20 +0000)]
MFC r291896:

Remove unused atf.test.mk variables

- ATF_BUILD_CC
- ATF_BUILD_CPP
- ATF_BUILD_CXX
- ATF_SHELL
- ATF_PREFIX

Sponsored by: EMC / Isilon Storage Division

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