200921 Commits

Author SHA1 Message Date
ume
6885269fd5 MFC r292514:
addrinfo.ai_family is an address family, not a protocol family.

PR:		162434
2015-12-27 00:37:04 +00:00
pfg
1ee182fa5f MFC r292454, r292455
ed(1): Prevent possible string overflows

Use strlcpy to guarantee NULL termination.

With hint from:	imp, cem, ngie
CID:		1007252
2015-12-26 18:37:01 +00:00
pfg
c41fd18fc0 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
2015-12-26 18:26:44 +00:00
ume
ea7b0bc9d3 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>
2015-12-26 12:06:52 +00:00
kib
4091b74ce5 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.
2015-12-26 11:10:44 +00:00
ume
55621219f5 Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).
PR:		198092
2015-12-25 11:17:21 +00:00
ume
8feffa60ae 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.
2015-12-25 10:53:30 +00:00
brueffer
93f5797f20 MFH: r292263
Assorted grammar, spelling and punctuation fixes.

PR:		203336, 203339
Submitted by:	espeyb@rpi.edu, themesta@gmail.com
2015-12-24 20:15:14 +00:00
jlh
bed33ef6ee 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.
2015-12-24 16:55:09 +00:00
lidl
c598c5a4e9 MFC r292313:
Skip unavailable pools when running zfs pool scrubs

Approved by:	rpaulo (mentor)
2015-12-23 21:59:38 +00:00
lidl
8d600f995b 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)
2015-12-23 21:57:26 +00:00
jilles
ce8728e0fa MFC r292360: sh: Fix use-after-free when attempting to modify a read-only
variable.

Reported by:	bapt
2015-12-23 18:24:40 +00:00
ngie
f5638e5134 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
2015-12-23 10:34:11 +00:00
ngie
481eabe8eb 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
2015-12-23 10:31:46 +00:00
ngie
2ef955db7d MFC r292316:
Remove hosts that don't resolve properly with the nss and resolv tests

Sponsored by: EMC / Isilon Storage Division
2015-12-23 10:11:54 +00:00
ngie
8d7553732e 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
2015-12-23 09:18:47 +00:00
davidcs
fe1c291a3e MFC r289635
ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
ql_os.c: removed unnecessary debug printf
ql_ver.h: updated version number
2015-12-22 19:34:21 +00:00
glebius
8af142a2e4 Merge r292411: Fix regression in if_ndis in r280347. 2015-12-22 18:39:07 +00:00
mav
7cf21203e4 MFC r291654, r291727, r291821, r291872, r292034, r292041, r292249, r292042:
Add initial support for 16Gbps FC QLogic chips.
2015-12-22 13:19:29 +00:00
mav
2c4aa69214 MFC r291868: Rework WWNs generation to make cards without NVRAM more useful. 2015-12-22 12:54:13 +00:00
mav
88f7208f58 MFC r291730: Update isp_put_icb_2400() for new structure fields. 2015-12-22 12:53:01 +00:00
mav
df0dedf653 MFC r292290: Set DS flag, required for LPB log page by spec. 2015-12-22 09:02:51 +00:00
delphij
bcb7eaa910 Bump __FreeBSD_version after xz 5.2.2 merge (multithread support). 2015-12-22 08:08:41 +00:00
delphij
897a072717 MFC: xz 5.2.2.
Relnotes:	yes
2015-12-22 08:03:23 +00:00
jhb
1515aec4ed 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.
2015-12-21 22:16:09 +00:00
jhb
025d443e86 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.
2015-12-21 20:40:17 +00:00
kp
37c817149c 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
2015-12-21 20:29:55 +00:00
emaste
261de747f4 MFC r279738, r281307: boot1.efi: add error reporting
Sponsored by:	The FreeBSD Foundation
2015-12-21 19:49:00 +00:00
emaste
fc1a3087a9 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
2015-12-21 19:40:32 +00:00
emaste
a989874001 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
2015-12-21 19:25:27 +00:00
dim
7295d680ea 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
2015-12-21 17:15:03 +00:00
emaste
6ddaa5ff34 MFC r292355: Remove lldb(1) files if WITHOUT_LLDB is set
Sponsored by:	The FreeBSD Foundation
2015-12-21 15:13:15 +00:00
araujo
d0682c6d12 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>
2015-12-21 14:32:29 +00:00
kib
3a7585bfb2 MFC r291936:
Update ctime when atime or birthtime are updated.
Cleanup setting of ctime/mtime/birthtime.
2015-12-21 11:44:54 +00:00
brueffer
3b59a2fb92 MFH: r292212
Flesh out the SEE ALSO section.

PR:		202929
Submitted by:	jhs@berklix.com
2015-12-21 09:34:45 +00:00
jilles
c5949fa695 MFC r292130: exec(3): Fix COMPATIBILITY section: default path does not
contain cwd.
2015-12-20 13:41:06 +00:00
ngie
5c10cb40f5 MFC r291892:
Remove redundant default TESTSDIR that is already defined in bsd.test.mk
after r289158

Sponsored by: EMC / Isilon Storage Division
2015-12-20 04:12:12 +00:00
ngie
4b0edd2775 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
2015-12-20 00:40:33 +00:00
vangyzen
b6f246520d 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.
2015-12-19 02:41:31 +00:00
vangyzen
ec40565958 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.
2015-12-19 02:35:32 +00:00
ume
b186dc0928 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
2015-12-19 01:21:28 +00:00
jilles
16bcef78d6 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
2015-12-18 19:58:34 +00:00
royger
a5f1c95b3c MFC r291156:
Ignore the inbound checksum flags when doing packet forwarding in netvsc
driver.

Sponsored by:	Microsoft OSTC
PR:		203630
2015-12-18 14:56:49 +00:00
royger
40f9a4207f 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
2015-12-18 14:52:12 +00:00
ngie
75b1bfea2e 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
2015-12-18 06:58:44 +00:00
emaste
ceeb430497 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
2015-12-18 03:06:39 +00:00
emaste
c068c81a4d MFC r281655: crunchide: remove unused a.out and non-functional ECOFF support
Sponsored by:	The FreeBSD Foundation
2015-12-18 02:34:01 +00:00
emaste
a22ae7157f 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
2015-12-18 01:44:03 +00:00
jhb
4f0dd9d342 MFC 292038:
Fix a copy and paste bug when this page was first written by copying from
BUS_BIND_INTR.9.
2015-12-18 01:03:34 +00:00
jhb
2bd3d3a22d MFC 290429:
When dumping an rman in DDB, include the RID of each resource.
2015-12-18 00:40:19 +00:00