]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agohyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus
Sepherosa Ziehau [Fri, 15 Apr 2016 02:20:18 +0000 (02:20 +0000)]
hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: jhb, kib, sephe
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5910

8 years agoUse NULL instead of 0 for pointers and memory allocation.
Marcelo Araujo [Fri, 15 Apr 2016 02:14:11 +0000 (02:14 +0000)]
Use NULL instead of 0 for pointers and memory allocation.
malloc and realloc will return NULL pointer if it can't alloc memory.

MFC after: 4 weeks

8 years agoAdd fman and dpaa fixups for powerpc fdt
Justin Hibbits [Fri, 15 Apr 2016 01:45:05 +0000 (01:45 +0000)]
Add fman and dpaa fixups for powerpc fdt

Obtained from: Semihalf

8 years agoInitialize pointer with NULL instead of 0.
Marcelo Araujo [Fri, 15 Apr 2016 00:47:30 +0000 (00:47 +0000)]
Initialize pointer with NULL instead of 0.

Submitted by: pfg

8 years agoAdd more debugging statements in vdev_geom.c
Alan Somers [Thu, 14 Apr 2016 23:14:41 +0000 (23:14 +0000)]
Add more debugging statements in vdev_geom.c

Log a debugging message whenever geom functions fail in vdev_geom_attach.
Printing these messages is controlled by vfs.zfs.debug

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agoAdd External Actions KPI to ipfw(9).
Andrey V. Elsukov [Thu, 14 Apr 2016 22:51:23 +0000 (22:51 +0000)]
Add External Actions KPI to ipfw(9).

It allows implementing loadable kernel modules with new actions and
without needing to modify kernel headers and ipfw(8). The module
registers its action handler and keyword string, that will be used
as action name. Using generic syntax user can add rules with this
action. Also ipfw(8) can be easily modified to extend basic syntax
for external actions, that become a part base system.
Sample modules will coming soon.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoAdd note about CAM I/O scheduler.
Warner Losh [Thu, 14 Apr 2016 22:38:13 +0000 (22:38 +0000)]
Add note about CAM I/O scheduler.

8 years agoRegenerate the list of bsd.progs.mk supported variables
Enji Cooper [Thu, 14 Apr 2016 22:32:56 +0000 (22:32 +0000)]
Regenerate the list of bsd.progs.mk supported variables

Prefix with dashes (unordered list) and put one variable on each
line (to avoid future conflicts)

Done via the following one-liner:

> sh -c 'for i in $(make -C tests/sys/aio PROG=foo -VPROG_VARS:O); do printf "\t\t- $i\n"; done'

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoCommit documentation change for r298012
Enji Cooper [Thu, 14 Apr 2016 22:23:15 +0000 (22:23 +0000)]
Commit documentation change for r298012

Requested by: bdrewery
X-MFC with: r298012
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS
Enji Cooper [Thu, 14 Apr 2016 22:22:03 +0000 (22:22 +0000)]
Add DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS

This will allow the variables [*] to be overridden on a per-PROG basis,
which is useful when controlling "stripping" behavior for some tests
that require debug symbols or to be unstripped

DEBUG_FLAGS (similar to CFLAGS) supports appending, whereas STRIP is
an override

*: Due to how STRIP is defined in bsd.own.mk (in addition to
bsd.lib.mk and bsd.prog.mk), and the fact that bsd.test.mk pulls in
bsd.own.mk first, overriding STRIP doesn't work today.

A follow up commit is pending to "rectify" this after additional
testing is done.

Discussed with: bdrewery
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a comment about why the timeout for flush was lowered to 5s.
Warner Losh [Thu, 14 Apr 2016 22:13:46 +0000 (22:13 +0000)]
Add a comment about why the timeout for flush was lowered to 5s.

8 years agoAdd in missing files from r298002.
Warner Losh [Thu, 14 Apr 2016 22:13:44 +0000 (22:13 +0000)]
Add in missing files from r298002.

8 years agoRegenerate
Bryan Drewery [Thu, 14 Apr 2016 22:10:37 +0000 (22:10 +0000)]
Regenerate

8 years agoUpdate the devd.conf man page to describe the new CAM/periph system/subsystem.
Scott Long [Thu, 14 Apr 2016 22:03:23 +0000 (22:03 +0000)]
Update the devd.conf man page to describe the new CAM/periph system/subsystem.

MFC after: 3 days
Sponsored by: Netflix

8 years agoAdd more content for WITH_META_MODE/WITH_DIRDEPS_BUILD.
Bryan Drewery [Thu, 14 Apr 2016 22:00:49 +0000 (22:00 +0000)]
Add more content for WITH_META_MODE/WITH_DIRDEPS_BUILD.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE+filemon: Default -DNO_CLEAN enabled.
Bryan Drewery [Thu, 14 Apr 2016 22:00:33 +0000 (22:00 +0000)]
META_MODE+filemon: Default -DNO_CLEAN enabled.

When using meta mode with filemon, the build is reliably incremental
safe.  Bmake will use the meta files, along with filemon information,
to rebuild targets when their dependencies change, commands change,
or files they generate are missing.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a link to the CTM section of the Handbook, which no longer exists.
Warren Block [Thu, 14 Apr 2016 21:56:36 +0000 (21:56 +0000)]
Remove a link to the CTM section of the Handbook, which no longer exists.

MFC after: 1 week

8 years agoAdd a devctl/devd notification conduit for CAM errors that happen at the
Scott Long [Thu, 14 Apr 2016 21:55:42 +0000 (21:55 +0000)]
Add a devctl/devd notification conduit for CAM errors that happen at the
periph level.  When a relevant error is reported to the periph, some
amplifying information is gathered, and the error and information are fed
to devctl with the attributes / keys system=CAM, subsystem=periph.  The
'type' key will be either 'error' or 'timeout', and based on this, various
other keys are also populated.

The purpose of this is to provide a concise mechanism for error reporting
that is less noisy than the system console but higher in resolution and
fidelity than simple sysctl counters.  We will be using it at Netflix to
populate a structured log and database to track errors and error trends
across our world-wide population of drives.

Submitted by: imp, scottl
Approved by: kenm
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: D5943

8 years agoChange the type of 'etlv' field in struct named_object to uint16_t.
Andrey V. Elsukov [Thu, 14 Apr 2016 21:52:31 +0000 (21:52 +0000)]
Change the type of 'etlv' field in struct named_object to uint16_t.
It should match with the type field in struct ipfw_obj_tlv.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoNew CAM I/O scheduler for FreeBSD. The default I/O scheduler is the same
Warner Losh [Thu, 14 Apr 2016 21:47:58 +0000 (21:47 +0000)]
New CAM I/O scheduler for FreeBSD. The default I/O scheduler is the same
as before. The common scheduling bits have moved from inline code in
each of the CAM periph drivers into a library that implements the
default scheduling.

In addition, a number of rate-limiting and I/O preference options can
be enabled by adding CAM_IOSCHED_NETFLIX to your config file. A number
of extra stats are also maintained. CAM_IOSCHED_NETFLIX isn't on by
default because it uses a separate BIO_READ and BIO_WRITE queue, so
doesn't honor BIO_ORDERED between these two types of operations. We
already didn't honor it for BIO_DELETE, and we don't depend on
BIO_ORDERED between reads and writes anywhere in the system (it is
currently used with BIO_FLUSH in ZFS to make sure some writes are
complete before others start and as a poor-man's soft dependency in
one place in UFS where we won't be issuing READs until after the
operation completes). However, out of an abundance of caution, it
isn't enabled by default.

Plus, this also brings in NCQ TRIM support for those SSDs that support
it. A black list is also provided for known rogues that use NCQ trim
as an excuse to corrupt the drive. It was difficult to separate out
into a separate commit.

This code has run in production at Netflix for over a year now.

Sponsored by: Netflix, Inc
Differential Revision: https://reviews.freebsd.org/D4609

8 years agoAdjust some comments and make ref_opcode_object() static.
Andrey V. Elsukov [Thu, 14 Apr 2016 21:45:18 +0000 (21:45 +0000)]
Adjust some comments and make ref_opcode_object() static.

8 years agoo Teach opcode rewriting framework handle several rewriters for
Andrey V. Elsukov [Thu, 14 Apr 2016 21:31:16 +0000 (21:31 +0000)]
o Teach opcode rewriting framework handle several rewriters for
  the same opcode.

o Reduce number of times classifier callback is called. It is
  redundant to call it just after find_op_rw(), since the last
  does call it already and can have all results.

o Do immediately opcode rewrite in the ref_opcode_object().
  This eliminates additional classifier lookup later on bulk update.
  For unresolved opcodes the behavior still the same, we save information
  from classifier callback in the obj_idx array, then perform automatic
  objects creation, then perform rewriting for opcodes using indeces
  from created objects.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoClean up trailing whitespace in lib/libcam; no functional change
Enji Cooper [Thu, 14 Apr 2016 21:10:53 +0000 (21:10 +0000)]
Clean up trailing whitespace in lib/libcam; no functional change

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.
Bryan Drewery [Thu, 14 Apr 2016 21:09:03 +0000 (21:09 +0000)]
META_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.

Some of the clang libraries build in this phase and the cross-tools
phase.  Later in the cross-tools phase when they build with a default
TOOLS_PREFIX, they see a changed build command in meta mode due to
the changed DEFAULT_SYSROOT.  This is avoided by passing along
TOOLS_PREFIX earlier.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Don't rebuild build-tools targets during normal build.
Bryan Drewery [Thu, 14 Apr 2016 21:06:10 +0000 (21:06 +0000)]
META_MODE: Don't rebuild build-tools targets during normal build.

This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build.  Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by: EMC / Isilon Storage Division

8 years agoImplement the dependency condition more safely.
Bryan Drewery [Thu, 14 Apr 2016 21:04:49 +0000 (21:04 +0000)]
Implement the dependency condition more safely.

Nested : are not handled well without "".

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r297835: Let the intented default cookie work.
Bryan Drewery [Thu, 14 Apr 2016 21:04:45 +0000 (21:04 +0000)]
Follow-up r297835: Let the intented default cookie work.

This happened to work for not prepending .OBJDIR twice but broke the
other case of prepending it when needed.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoRework META_TARGETS so that it automatically adds META_DEPS to the targets.
Bryan Drewery [Thu, 14 Apr 2016 21:04:42 +0000 (21:04 +0000)]
Rework META_TARGETS so that it automatically adds META_DEPS to the targets.

This will only be done if the target is defined, so if the target is
defined after bsd.sys.mk is included then it needs to manually add
${META_DEPS} still.

Sponsored by: EMC / Isilon Storage Division

8 years agoMark some more .PHONY targets.
Bryan Drewery [Thu, 14 Apr 2016 21:04:37 +0000 (21:04 +0000)]
Mark some more .PHONY targets.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove several functions related to opcode rewriting framework from
Andrey V. Elsukov [Thu, 14 Apr 2016 20:49:27 +0000 (20:49 +0000)]
Move several functions related to opcode rewriting framework from
ip_fw_table.c into ip_fw_sockopt.c and make them static.

Obtained from: Yandex LLC

8 years agoExtract virtual port address from RQSTYPE_RPT_ID_ACQ.
Alexander Motin [Thu, 14 Apr 2016 20:49:01 +0000 (20:49 +0000)]
Extract virtual port address from RQSTYPE_RPT_ID_ACQ.

This should close the race between request arriving on new target mode
virtual port and its scanner thread finally fetch its address for request
routing.

8 years agoAllow the handling of ICMP messages sent in response to SCTP packets
Michael Tuexen [Thu, 14 Apr 2016 19:59:21 +0000 (19:59 +0000)]
Allow the handling of ICMP messages sent in response to SCTP packets
containing an INIT chunk. These need to be handled in case the peer
does not support SCTP and returns an ICMP messages indicating destination
unreachable, protocol unreachable.

MFC after: 1 week

8 years agoWhen delivering an ICMP packet to the ctlinput function, ensure that
Michael Tuexen [Thu, 14 Apr 2016 19:51:29 +0000 (19:51 +0000)]
When delivering an ICMP packet to the ctlinput function, ensure that
the outer IP header, the ICMP header, the inner IP header and the
first n bytes are stored in contgous memory. The ctlinput functions
currently rely on this for n = 8. This fixes a bug in case the inner IP
header had options.
While there, remove the options from the outer header and provide a
way to increase n to allow improved ICMP handling for SCTP. This will
be added in another commit.

MFC after: 1 week

8 years agoDefine the *soft targets properly.
Bryan Drewery [Thu, 14 Apr 2016 19:29:35 +0000 (19:29 +0000)]
Define the *soft targets properly.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r284673: /usr/lib32/libc_pic.a is still installed, just not the profiled...
Bryan Drewery [Thu, 14 Apr 2016 19:26:29 +0000 (19:26 +0000)]
Follow-up r284673: /usr/lib32/libc_pic.a is still installed, just not the profiled libs.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate a debugging message in vdev_geom_open_by_guids for consistency with
Alan Somers [Thu, 14 Apr 2016 19:20:31 +0000 (19:20 +0000)]
Update a debugging message in vdev_geom_open_by_guids for consistency with
similar messages elsewhere in the file.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agoDo not overwrite the dchg variable.
Luiz Otavio O Souza [Thu, 14 Apr 2016 18:57:30 +0000 (18:57 +0000)]
Do not overwrite the dchg variable.

It does not cause any real issues because the variable is overwritten
only when the packet is forwarded (and the variable is not used anymore).

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agoMake pfctl(8) more flexible when parsing bandwidth values.
Luiz Otavio O Souza [Thu, 14 Apr 2016 18:37:40 +0000 (18:37 +0000)]
Make pfctl(8) more flexible when parsing bandwidth values.

This is the current behaviour in OpenBSD and a similar patch exist in
pfSense too.

Obtained from: OpenBSD (partly - rev. 1.625)
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agolibpcap: fix for simple NULL pointer dereference.
Pedro F. Giffuni [Thu, 14 Apr 2016 18:31:45 +0000 (18:31 +0000)]
libpcap: fix for simple NULL pointer dereference.

Found with devel/coccinelle.

8 years agoSet NULL to the ai_next pointer which fix cap_getaddrinfo().
Mariusz Zaborski [Thu, 14 Apr 2016 18:27:10 +0000 (18:27 +0000)]
Set NULL to the ai_next pointer which fix cap_getaddrinfo().
Add regression test case.

PR: 195551
Submitted by: Mikhail <mp39590@gmail.com>
Approved by: pjd (mentor)

8 years agoFix output formatting of O_UNREACH6 opcode.
Andrey V. Elsukov [Thu, 14 Apr 2016 18:22:08 +0000 (18:22 +0000)]
Fix output formatting of O_UNREACH6 opcode.

Obtained from: Yandex LLC

8 years agoInclude -a in the nextboot(8) usage string.
Mark Johnston [Thu, 14 Apr 2016 18:03:55 +0000 (18:03 +0000)]
Include -a in the nextboot(8) usage string.

X-MFC-With: r297772

8 years agorisc-v: for pointers replace 0 with NULL.
Pedro F. Giffuni [Thu, 14 Apr 2016 17:25:50 +0000 (17:25 +0000)]
risc-v: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoisa/pnp: for pointers replace 0 with NULL.
Pedro F. Giffuni [Thu, 14 Apr 2016 17:20:35 +0000 (17:20 +0000)]
isa/pnp: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoClean up some style(9) violations.
Jamie Gritton [Thu, 14 Apr 2016 17:07:26 +0000 (17:07 +0000)]
Clean up some style(9) violations.

8 years agoRPC: for pointers replace 0 with NULL.
Pedro F. Giffuni [Thu, 14 Apr 2016 17:06:37 +0000 (17:06 +0000)]
RPC: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agox86: for pointers replace 0 with NULL.
Pedro F. Giffuni [Thu, 14 Apr 2016 17:04:06 +0000 (17:04 +0000)]
x86: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoarm64 libc: hide .cerror, .curbrk, .minbrk for WITHOUT_SYMVER
Ed Maste [Thu, 14 Apr 2016 16:32:27 +0000 (16:32 +0000)]
arm64 libc: hide .cerror, .curbrk, .minbrk for WITHOUT_SYMVER

When symver is in use these are hidden because they're not listed in
the Symbol.map. Add an explicit .hidden so they are also hidden in the
WITHOUT_SYMVER case.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5775

8 years agoSort so pic_if.m is in the correct location with the other kern files.
Andrew Turner [Thu, 14 Apr 2016 15:52:11 +0000 (15:52 +0000)]
Sort so pic_if.m is in the correct location with the other kern files.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoUnmagic the thread pointer offset.
Ruslan Bukin [Thu, 14 Apr 2016 15:31:05 +0000 (15:31 +0000)]
Unmagic the thread pointer offset.

8 years agoFix the types for the start, end, and count arguments to
Andrew Turner [Thu, 14 Apr 2016 14:44:23 +0000 (14:44 +0000)]
Fix the types for the start, end, and count arguments to
arm_gic_fdt_alloc_resource. These were the old u_long where they should be
rman_res_t. Both of these are the same size on arm64 so this is just for
correctness, and would not have led to incorrect behaviour.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoRemove some unused fields.
Hans Petter Selasky [Thu, 14 Apr 2016 14:11:32 +0000 (14:11 +0000)]
Remove some unused fields.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoEnsure the received IP header gets 32-bits aligned.
Hans Petter Selasky [Thu, 14 Apr 2016 14:10:40 +0000 (14:10 +0000)]
Ensure the received IP header gets 32-bits aligned.

The FreeBSD's TCP/IP stack assumes that the IP-header is 32-bits aligned
when decoding it. Else unaligned 32-bit memory access can happen, which
not all processor architectures support.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd missing port_up checks.
Hans Petter Selasky [Thu, 14 Apr 2016 14:01:28 +0000 (14:01 +0000)]
Add missing port_up checks.

When downing a mlxen network adapter we need to check the port_up variable
to ensure we don't continue to transmit data or restart timers which can
reside in freed memory.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoUse NULL instead of 0 for pointers.
Marcelo Araujo [Thu, 14 Apr 2016 12:53:38 +0000 (12:53 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it can't open the STREAM.

8 years agoUse NULL instead of 0 for pointers.
Marcelo Araujo [Thu, 14 Apr 2016 12:51:06 +0000 (12:51 +0000)]
Use NULL instead of 0 for pointers.

The malloc will return a pointer to the allocated memory if successful,
otherwise a NULL pointer is returned.

8 years agoRemove watchdog timer stop check.
Alexander Motin [Thu, 14 Apr 2016 12:50:27 +0000 (12:50 +0000)]
Remove watchdog timer stop check.

There are bunch of reports that this check fails at least on Nuvoton
NCT6776 chips.  I don't see why this check needed there, and Linux does
not have it either.  So far this check only made watchdogd unstopable.

MFC after: 1 month

8 years agoUse NULL instead of 0 for pointers.
Marcelo Araujo [Thu, 14 Apr 2016 12:46:46 +0000 (12:46 +0000)]
Use NULL instead of 0 for pointers.

The strchr(3) returns a NULL if the character does not appears in the string.
The malloc will return NULL if cannot allocate memory.

8 years agoUse NULL instead of 0 for pointers.
Marcelo Araujo [Thu, 14 Apr 2016 12:25:00 +0000 (12:25 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it can't open the STREAM.
The malloc will return a pointer to the allocated memory if successful,
otherwise a NULL pointer is returned.

Also add an extra DEBUG1 to print out the error to open a file.

Reviewed by: ed
Differential Revision: https://svnweb.freebsd.org/changeset/base/297959

8 years agoUse NULL instead of 0 for pointers.
Marcelo Araujo [Thu, 14 Apr 2016 11:41:30 +0000 (11:41 +0000)]
Use NULL instead of 0 for pointers.
fopen(3) returns a FILE pointer, otherwise NULL is returned.

MFC after: 2 weeks

8 years agoSet the upper limit of the DMAP region to the limit of RAM as was found in
Andrew Turner [Thu, 14 Apr 2016 10:43:28 +0000 (10:43 +0000)]
Set the upper limit of the DMAP region to the limit of RAM as was found in
the physmap. This will reduce the likelihood of an issue where we have
device memory mapped in the DMAP. This can only happen if it is within the
same 1G block of normal memory.

Reviewed by: kib
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5938

8 years agoBump bio_cmd and bio_*flags from 8 bits to 16.
Warner Losh [Thu, 14 Apr 2016 05:10:41 +0000 (05:10 +0000)]
Bump bio_cmd and bio_*flags from 8 bits to 16.

Differential Revision: https://reviews.freebsd.org/D5784

8 years agoDeprecate using hints.acpi.0.rsdp to communicate the RSDP to the
Warner Losh [Thu, 14 Apr 2016 04:59:51 +0000 (04:59 +0000)]
Deprecate using hints.acpi.0.rsdp to communicate the RSDP to the
system. This uses the hints mechnanism. This mostly works today
because when there's no static hints (the default), this value can be
fetched from the hint. When there is a static hints file, the hint
passed from the boot loader to the kernel is ignored, but for the BIOS
case we're able to find it anyway. However, with UEFI, the fallback
doesn't work, so we get a panic instead.

Switch to acpi.rsdp and use TUNABLE_ULONG_FETCH instead. Continue to
generate the old values to allow for transitions. In addition, fall
back to the old method if the new method isn't present.

Add comments about all this.

Differential Revision: https://reviews.freebsd.org/D5866

8 years agoDisable fmaxmin_test when compiling it with clang 3.8.0
Enji Cooper [Thu, 14 Apr 2016 04:40:31 +0000 (04:40 +0000)]
Disable fmaxmin_test when compiling it with clang 3.8.0

The testcase always fails today due to how C11 7.6.1/2 is interpreted
with clang 3.8.0 when combined with "#pragma STDC FENV_ACCESS ON".

This testcase passes with clang <3.8.0 and gcc, so continue testing it
with those compiler combinations

More intelligent discussion on the issue is in the PR

MFC after: never
PR: 208703
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd comment about where b_iocmd and b_ioflags come from.
Warner Losh [Thu, 14 Apr 2016 04:16:31 +0000 (04:16 +0000)]
Add comment about where b_iocmd and b_ioflags come from.

8 years agoRegenerate
Bryan Drewery [Thu, 14 Apr 2016 01:20:00 +0000 (01:20 +0000)]
Regenerate

8 years agoBuild libpam modules in parallel.
Bryan Drewery [Thu, 14 Apr 2016 01:17:37 +0000 (01:17 +0000)]
Build libpam modules in parallel.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoSimplify building libpam and fix libpam.a not containing the modules since r284345.
Bryan Drewery [Thu, 14 Apr 2016 01:17:03 +0000 (01:17 +0000)]
Simplify building libpam and fix libpam.a not containing the modules since r284345.

The change in r284345 moved the creation of openpam_static_modules.o to
lib/libpam/static_modules but never managed to get them into libpam.a.

Move this logic to lib/libpam/static_libpam and have it create a static
library for libpam.a  The main lib/libpam/libpam will only create a
shared library.  No redundancy in compilation or installation exists
in this solution.

This avoids requiring a pass with -D_NO_LIBPAM_SO_YET.

Sponsored by: EMC / Isilon Storage Division

8 years agoSend krping output to the log instead of the tty, as is done upstream.
Navdeep Parhar [Thu, 14 Apr 2016 00:25:11 +0000 (00:25 +0000)]
Send krping output to the log instead of the tty, as is done upstream.

Reviewed by: hselasky@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5931

8 years agoFix UART3 and UART4 clock offsets.
Oleksandr Tymoshenko [Wed, 13 Apr 2016 21:39:45 +0000 (21:39 +0000)]
Fix UART3 and UART4 clock offsets.

Original values were copy-pasted from UART1 and UART2

PR: 197037
Submitted by: Scott Ellis <scott@jumpnowtek.com>

8 years agolibgssapi: avoid NULL pointer dereferences.
Pedro F. Giffuni [Wed, 13 Apr 2016 21:08:02 +0000 (21:08 +0000)]
libgssapi: avoid NULL pointer dereferences.

While here also use NULL instead of zero for pointers.

Found with coccinelle.

MFC after: 1 week

8 years agoNote the brokenness of WITHOUT_INSTALLLIB.
Bryan Drewery [Wed, 13 Apr 2016 21:01:58 +0000 (21:01 +0000)]
Note the brokenness of WITHOUT_INSTALLLIB.

Sponsored by: EMC / Isilon Storage Division

8 years agoarm64: Avoid null dereference in its_init_cpu
Ed Maste [Wed, 13 Apr 2016 21:00:00 +0000 (21:00 +0000)]
arm64: Avoid null dereference in its_init_cpu

its_init_cpu() is called from gic_v3_init_secondary(), and its_sc will
be NULL if its did not attach.

Sponsored by: The FreeBSD Foundation

8 years agoThe build does work now with WITHOUT_TOOLCHAIN.
Bryan Drewery [Wed, 13 Apr 2016 20:55:05 +0000 (20:55 +0000)]
The build does work now with WITHOUT_TOOLCHAIN.

The bootstrap cross tools are still built in this mode as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove misspelled and redundant MK_INSTALLIB=no.
Bryan Drewery [Wed, 13 Apr 2016 20:43:02 +0000 (20:43 +0000)]
Remove misspelled and redundant MK_INSTALLIB=no.

8 years agosh: Simplify code by removing variable bracketed_name.
Jilles Tjoelker [Wed, 13 Apr 2016 20:32:35 +0000 (20:32 +0000)]
sh: Simplify code by removing variable bracketed_name.

8 years agoSeparate POSIX mqueue objects in jails; actually, separate them by the
Jamie Gritton [Wed, 13 Apr 2016 20:15:49 +0000 (20:15 +0000)]
Separate POSIX mqueue objects in jails; actually, separate them by the
jail's root, so jails that don't have their own filesystem directory
also won't have their own mqueue namespace.

PR: 208082

8 years agoSeparate POSIX sem/shm objects in jails, by prepending the jail's path
Jamie Gritton [Wed, 13 Apr 2016 20:14:13 +0000 (20:14 +0000)]
Separate POSIX sem/shm objects in jails, by prepending the jail's path
name to the object's "path".  While the objects don't have real path
names, it's a filesystem-like namespace, which allows jails to be
kept to their own space, but still allows the system / jail parent to
access a jail's IPC.

PR: 208082

8 years agoAdd sbuf variants ata_cmd_sbuf() and ata_res_sbuf(), and reimplement the
Scott Long [Wed, 13 Apr 2016 20:10:06 +0000 (20:10 +0000)]
Add sbuf variants ata_cmd_sbuf() and ata_res_sbuf(), and reimplement the
_string variants on top of this.  This requires a change to the function
signature of ata_res_sbuf().  Its use in the tree seems to be very limited,
and the change makes it more consistent with the rest of the API.

Reviewed by: imp, mav, kenm
Sponsored by: Netflix
Differential Revision: D5940

8 years agoHandle PBA that shares a page with MSI-X table for passthrough devices.
John Baldwin [Wed, 13 Apr 2016 18:39:33 +0000 (18:39 +0000)]
Handle PBA that shares a page with MSI-X table for passthrough devices.

If the PBA shares a page with the MSI-X table, map the shared page via
/dev/mem and emulate accesses to the portion of the PBA in the shared
page by accessing the mapped page.

Reviewed by: grehan
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5919

8 years agoExpose doreti as a global symbol on amd64 and i386.
John Baldwin [Wed, 13 Apr 2016 17:37:31 +0000 (17:37 +0000)]
Expose doreti as a global symbol on amd64 and i386.

doreti provides the common code path for returning from interrupt
andlers on x86.  Exposing doreti as a global symbol allows kernel
modules to include low-level interrupt handlers instead of requiring
all low-level handlers to be statically compiled into the kernel.

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: kib

8 years agoUse scsi_cdb_sbuf() inside of scsi_command_string now that the temporary
Scott Long [Wed, 13 Apr 2016 15:57:13 +0000 (15:57 +0000)]
Use scsi_cdb_sbuf() inside of scsi_command_string now that the temporary
string storage is no longer needed.

MFC after: 3 days
Sponsored by: Netflix

8 years agoAdd scsi_cdb_sbuf() for handling CDB strings. Reimplement scsi_cdb_string()
Scott Long [Wed, 13 Apr 2016 15:43:11 +0000 (15:43 +0000)]
Add scsi_cdb_sbuf() for handling CDB strings.  Reimplement scsi_cdb_string()
in terms of it.

Reviewed by: imp, mav, ken
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: D5934

8 years agolibvgl: do not initialize static storage.
Pedro F. Giffuni [Wed, 13 Apr 2016 14:59:50 +0000 (14:59 +0000)]
libvgl: do not initialize static storage.

The pointer value was being initialized to 0. While it would
have been better to use NULL here, it is static storage so
there is no need to do so.

8 years agoreversed commits r297916 r297909 r297898 due to i386 build failures.
David C Somayajulu [Wed, 13 Apr 2016 13:14:18 +0000 (13:14 +0000)]
reversed commits r297916 r297909 r297898 due to i386 build failures.

MFC after:5 days

8 years agoAdd hint.ahci.X.quirks tunable for some odd cases.
Alexander Motin [Wed, 13 Apr 2016 12:32:58 +0000 (12:32 +0000)]
Add hint.ahci.X.quirks tunable for some odd cases.

MFC after: 2 weeks

8 years agoDocument the memory ranges within the kernel region to help with debugging
Andrew Turner [Wed, 13 Apr 2016 11:43:03 +0000 (11:43 +0000)]
Document the memory ranges within the kernel region to help with debugging
to track down which region an address is from.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoFix compilation error on i386
David C Somayajulu [Wed, 13 Apr 2016 11:24:24 +0000 (11:24 +0000)]
Fix compilation error on i386

8 years agoFilter Port Database Changed notifications.
Alexander Motin [Wed, 13 Apr 2016 10:35:17 +0000 (10:35 +0000)]
Filter Port Database Changed notifications.

For some reason firmware sends Port Database Changed notifications in case
of explicit login requests from the driver when target port is unavailabe.
Those notifications don't give driver any new information, but only cause
infinite scan loop.

8 years agoIncrease the arm64 kernel address space to 512GB, and the DMAP region to
Andrew Turner [Wed, 13 Apr 2016 09:44:32 +0000 (09:44 +0000)]
Increase the arm64 kernel address space to 512GB, and the DMAP region to
2TB. The latter can be increased in 512GB chunks by adjusting the lower
address, however more work will be needed to increase the former.

There is still some work needed to only create a DMAP region for the RAM
address space as on ARM architectures all mappings should have the same
memory attributes, and these will be different for device and normal memory.

Reviewed by: kib
Obtained from: ABT Systems Ltd
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5859

8 years agohyperv: device_get_softc does not return NULL
Sepherosa Ziehau [Wed, 13 Apr 2016 09:20:29 +0000 (09:20 +0000)]
hyperv: device_get_softc does not return NULL

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoRespect NVRAM topology settings on 24xx and above chips.
Alexander Motin [Wed, 13 Apr 2016 07:04:04 +0000 (07:04 +0000)]
Respect NVRAM topology settings on 24xx and above chips.

8 years agoMultiple fixes in VCHI audio driver:
Oleksandr Tymoshenko [Wed, 13 Apr 2016 05:28:27 +0000 (05:28 +0000)]
Multiple fixes in VCHI audio driver:

- Pre-buffer audio data to VideoCore so there are no audible glitches when
    driver is too late to provide samples
- Start actual playback when there is some prebuffered audio,
    it fixes audible noisy click in the beginning of playback
- Use #defines instead of hardcoded values where appropriate
- Fix copy-pasted comment

PR: 208678

8 years ago[urtwn] use/track the last good RSSI for a given node, rather than no RSSI.
Adrian Chadd [Wed, 13 Apr 2016 05:19:16 +0000 (05:19 +0000)]
[urtwn] use/track the last good RSSI for a given node, rather than no RSSI.

Now that we're decap'ing A-MPDU frame, the firmware is only giving us
PHY status information for the whole PPDU, rather than duplicatig it
per frame.

So, we fake it by maintaining the RSSI that we saw in the node struct
and reuse it.

This prevents us from getting some pretty garbage looking default RSSI
values, which shows up as RSSI values of like "3" or "4" when doing
active traffic.

Tested:

* RTL8188EU, STA mode

8 years agoFix build failure on i386. Need to typecast a bunch of variables to (uintmax_t)
David C Somayajulu [Wed, 13 Apr 2016 04:13:36 +0000 (04:13 +0000)]
Fix build failure on i386. Need to typecast a bunch of variables to (uintmax_t)

MFC after:5 days

8 years agohyperv/vmbus: Merge duplicated version check for events
Sepherosa Ziehau [Wed, 13 Apr 2016 03:45:39 +0000 (03:45 +0000)]
hyperv/vmbus: Merge duplicated version check for events

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5911

8 years agoConvert ypldap_addr list to a tailq(queue(3)).
Marcelo Araujo [Wed, 13 Apr 2016 03:36:34 +0000 (03:36 +0000)]
Convert ypldap_addr list to a tailq(queue(3)).

Obtained from: OpenBSD r1.11, r1.17 and r1.36

8 years agofmt(1): for pointers use NULL instead of 0
Pedro F. Giffuni [Wed, 13 Apr 2016 01:57:06 +0000 (01:57 +0000)]
fmt(1): for pointers use NULL instead of 0

While here clean excessive not lint comment indentation.

8 years agoApply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it can
Marcelo Araujo [Wed, 13 Apr 2016 01:54:33 +0000 (01:54 +0000)]
Apply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it can
deal with messages that haven't been fully read from the server yet.

Obtained from: OpenBSD r1.11

8 years agoTry harder to find svn
Steve Wills [Wed, 13 Apr 2016 01:47:04 +0000 (01:47 +0000)]
Try harder to find svn

While here, elliminate last references to CVS_UPDATE and SUP_UPDATE

Reviewed by: gjb
Approved by: gjb