SVNews

NOTE: This service is experimental and subject to change! Use at your own risk!

Year:   Month: - or - Filter committers: - or -
Filter paths:
Include diffs if smaller than lines.

2017 - 05 - 28   (today)
04:43:02 - r319044
( 4 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getgr_test.c
getgr_test: fix -Wunused warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:41:06 - r319043
( 6 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getpw_test.c
getpw_test: fix -Wunused warnings

- Mark unused parameters __unused.
- Put dump_passwd under DEBUG as it's only used in that case.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:34:57 - r319042
( 12 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/gethostby_test.c
gethostby_test: fix multiple warning types

- Fix -Wmissing-declaration warning by staticizing run_tests.
- Fix -Wsign-compare warnings by casting size_t types to int
  for comparisons.

Reindent some of the code in sdump_hostent(..) to accomodate the
overall changes.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:15:57 - r319041
( 31 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getproto_test.c
getproto_test: fix -Wunused warnings

Mark unused parameters __unused in functions.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:15:05 - r319040
( 32 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getrpc_test.c
getrpc_test: fix -Wunused warnings

- Mark unused function parameters unused.
- Remove an unused function prototype.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:12:52 - r319039
( 34 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getserv_test.c
getserv_test: mark unused parameters __unused to fix corresponding
warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:12:02 - r319038
( 35 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getusershell_test.c
getusershell_test: mark mdata parameter in compare_usershell __unused

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:11:04 - r319037
( 36 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getaddrinfo_test.c
getaddrinfo_test: mark unused function parameters __unused to fix -Wunused
warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:05:19 - r319036
( 42 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getproto_test.c
getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:04:32 - r319035
( 43 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getrpc_test.c
getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:03:45 - r319034
( 44 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getaddrinfo_test.c
getaddrinfo_test: fix -Wsign-compare warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
04:03:06 - r319033
( 44 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getserv_test.c
getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
03:59:33 - r319032
( 48 minutes ago)
by gjb
Affects: 
(4 files)
/stable/10/release/tools/vmimage.subr
/stable/11/release/tools/vmimage.subr
MFC r318872:
 Enable DHCP and IPv6 autoconfig on non-cloud VM images.

PR: 203653
Sponsored by: The FreeBSD Foundation
03:58:36 - r319031
( 49 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getusershell_test.c
getusershell_test: staticize run_tests(..) to fix warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
03:47:58 - r319030
( 59 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/getgr_test.c
Fix -Wsign-compare warnings

MFC after: 3 days
Sponsored by: Dell EMC Isilon
03:42:49 - r319029
(1 hour 4 minutes ago)
by ngie
Affects: 
(4 files)
/head/lib/libc/tests/nss/*
Staticize functions and remove unused variables to aid with bumping WARNS

MFC after: 3 days
Sponsored by: Dell EMC Isilon
03:39:24 - r319028
(1 hour 8 minutes ago)
by ngie
Affects:  /head/lib/libc/tests/nss/Makefile
Sort make variables to suit style.Makefile(5)

This is being done prior to functional changes.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
02:55:04 - r319027
(1 hour 52 minutes ago)
by ngie
Affects: 
(5 files)
/head/lib/libc/tests/nss/*
lib/libc/tests/nss: use calloc appropriately

The pattern used prior to this commit was `calloc(1, n * sizeof(type))`;
the pattern that should be used however is `calloc(n, sizeof(type))`.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
02:15:57 - r319026
(2 hours 31 minutes ago)
by ngie
Affects:  /head/usr.sbin/pw/tests/Makefile
/head/usr.sbin/pw/tests/pw_groupshow_test.sh
/head/usr.sbin/pw/tests/pw_usershow_test.sh
pw: add some basic testcases for groupshow and usershow

- groupshow: test out -a/-g/-n .
- usershow: test out -a/-n/-u .

MFC after: 1 week
Sponsored by: Dell EMC Isilon
01:14:59 - r319025
(3 hours 32 minutes ago)
by ngie
Affects: 
(11 files)
/stable/10/sys/boot/*
MFC r309412,r316109,r316132:

r309412 (by imp):

dd is currently a bootstrap tool. It really doesn't have any business
being a bootstrap tool. However, for reproducible build output,
FreeBSD added dd status=none because it was otherwise difficult to
suppress the status information, but retain any errors that might
happen. There's no real reason that dd has to be a build tool, other
than we use status=none unconditional. Remove dd from a bootstrap tool
entirely by only using status=none when available. This may also help
efforts to build the system on non-FreeBSD hosts as well.

r316109:

Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead

This is a better pattern to follow when creating the bootloaders and doing
the relevant space checks to make sure that the sizes aren't exceeded (and
thus, copy-pasting is a bit less error prone).

r316132:

Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to
sys/boot/i386/zfsboot/...

This is being done to make it easier to change in the future--this action might
be
needed sooner rather than later because of gcc 6.3.0 bailing, stating that there
is negative free space left (deficit) in the boot2 bootloader.
01:08:46 - r319024
(3 hours 39 minutes ago)
by ngie
Affects: 
(12 files)
/stable/11/Makefile.inc1
/stable/11/sys/boot/*
MFC r309412,r316109,r316132:

r309412 (by imp):

dd is currently a bootstrap tool. It really doesn't have any business
being a bootstrap tool. However, for reproducible build output,
FreeBSD added dd status=none because it was otherwise difficult to
suppress the status information, but retain any errors that might
happen. There's no real reason that dd has to be a build tool, other
than we use status=none unconditional. Remove dd from a bootstrap tool
entirely by only using status=none when available. This may also help
efforts to build the system on non-FreeBSD hosts as well.

r316109:

Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead

This is a better pattern to follow when creating the bootloaders and doing
the relevant space checks to make sure that the sizes aren't exceeded (and
thus, copy-pasting is a bit less error prone).

r316132:

Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to
sys/boot/i386/zfsboot/...

This is being done to make it easier to change in the future--this action might
be
needed sooner rather than later because of gcc 6.3.0 bailing, stating that there
is negative free space left (deficit) in the boot2 bootloader.
00:47:02 - r319023
(4 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/lib/libcam/camlib.c
MFC r316131:

Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)

Part of my original reasoning as far as converting the snprintf
calls was to permit switching over from char[] to wchar_t[] in the
future, as well as futureproof in case cam_errbuf's size was ever
changed.

Unfortunately, my approach was bugged because it conflated the
number of items with the size of the buffer, instead of the number of
elements being a fixed size != 1 byte.

Use nitems(..) instead which counts the quantity of items of a specific
type, as opposed to an unqualified sizeof(..) (which assumes that the
number of characters is equal to the buffer size).

Noted by: cem
00:45:28 - r319022
(4 hours 2 minutes ago)
by vangyzen
Affects:  /head/share/mk/bsd.init.mk
Fix INSTALL_AS_USER with external nsswitch databases

The INSTALL_AS_USER option tells "install" to use the current
user name as the owner of the installed file. The "install"
command executed by the build is statically linked, so it does not
load nsswitch modules, such as nss_ldap.so, so it fails when
the user is only defined in such a database.

Fix it to use the current UID instead of user name. This works
for all users. I expect it is also slightly more efficient.

Reviewed by: sjg
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10862
00:45:02 - r319021
(4 hours 2 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libcam/camlib.c
MFC r316131:

Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)

Part of my original reasoning as far as converting the snprintf
calls was to permit switching over from char[] to wchar_t[] in the
future, as well as futureproof in case cam_errbuf's size was ever
changed.

Unfortunately, my approach was bugged because it conflated the
number of items with the size of the buffer, instead of the number of
elements being a fixed size != 1 byte.

Use nitems(..) instead which counts the quantity of items of a specific
type, as opposed to an unqualified sizeof(..) (which assumes that the
number of characters is equal to the buffer size).

Noted by: cem
00:43:12 - r319020
(4 hours 4 minutes ago)
by vangyzen
Affects:  /head/share/mk/bsd.init.mk
/head/share/mk/bsd.own.mk
Fix INSTALL_AS_USER

Move INSTALL_AS_USER into bsd.init.mk to maximize the chance that
it has final authority over fooOWN and fooGRP.

Reviewed by: sjg
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10810
00:28:11 - r319019
(4 hours 19 minutes ago)
by ngie
Affects:  /head/lib/libgeom/geom_stats.c
Remove getpagesize(3) error checking added in r317312

getpagesize(3) no longer fails as of r317436.

MFC after: 3 days
Sponsored by: Dell EMC Isilon
00:25:44 - r319018
(4 hours 22 minutes ago)
by ngie
Affects: 
(3 files)
/stable/10/lib/libgeom/geom_ctl.c
/stable/10/lib/libgeom/geom_stats.c
MFC r317310,r317316:

r317310:

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.

r317316:

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.
00:25:41 - r319017
(4 hours 22 minutes ago)
by ngie
Affects: 
(3 files)
/stable/11/lib/libgeom/geom_ctl.c
/stable/11/lib/libgeom/geom_stats.c
MFC r317310,r317316:

r317310:

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.

r317316:

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.
00:13:44 - r319016
(4 hours 34 minutes ago)
by rgrimes
Affects: 
(8 files)
/stable/11/*
MFC r314833
  Convert absolute links to relative links.
  Style.Makefile(9) has been ignored to produce minimal diffs.

MFC r314837
  The relative symlink fix causes downstream issues for
  EMC DELL Isilon so revert the relative symlink fix
  pending a better solution.

  Reported by: ngie

MFC r315091
  Revert r314833 until the problem with INSTALL_RSYMLINKS can be found
  as it appears to break arm release builds.

  PR: 217705
  Reported by: cyclaero@gmail.com

Approved by: grehan (mentor)
2017 - 05 - 27   (yesterday)
23:57:09 - r319015
(4 hours 50 minutes ago)
by ngie
Affects:  /head/tools/regression/geom_gpt/gctl_test_helper.c
Use calloc instead of malloc + memset

MFC after: 3 days
Sponsored by: Dell EMC Isilon
23:31:59 - r319014
(5 hours 15 minutes ago)
by ngie
Affects: 
(6 files)
/stable/10/tools/regression/geom_gpt/*
MFC
r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309:

r317290:

Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h
#include below the stdio.h #include.

gctl_dump(3) needs stdio.h, per reasoning noted in r317289.

PR: 218809

r317291:

Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c

This is being done to reduce ambiguity and to make the tests more portable
in the future to other locations in the source tree.

r317292:

gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly

r317293:

gctl_test_helper: apply polish

- Staticize variables to fix warnings.
- Sprinkle asserts around for calls that can fail
- Apply style(9) for main(..) definition.
- ANSIify usage(..) definition.

r317294:

Bump WARNS to 6 per previous commits which fixed warnings

Tested with: clang (4.0), gcc (4.2.1, 6.3.0)

r317295:

The GPT class no longer exists; use the PART class instead

r317304:

gctl_test_helper: add diagnostic output for parse_retval(..)

This will help end-users better diagnose issues with the function.

r317306:

gctl_test.t: minor tweaks

- Declare $count with the `my` scope operator to permit `use strict`.
- Add `use strict`.
- Use `use warnings` instead of using `-w` in the shebang.
- Don't unlink $cmd when done (prevents unnecessary rebuilding).
- Improve the error message when running with insufficient permissions, e.g.,
  non-root.

r317307:

Use verb=delete not verb=remove

The `remove` verb hasn't been present in geom_part*(4) for well
over a decade, if ever. I couldn't find any references to it in
^/stable/5 at least, which is around the timeframe that this test
was written.

r317308:

gctl_test.t: more tweaks to try and update the code and get it functional
(again?)

- Make the logfile for $out be built off the basename for $cmd, instead of $cmd.
  (r317292 broke this assumption).
- Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for
  mountpoints.
- Reindent the umount directive block while here to match the rest of the code.

r317309:

gctl_test.t: improve error reporting with mdcfg and mount directives

If the commands had failed previously, it would press on and result in a
series of cascading failures. Fail early and continue on to the next case
instead of executing additional commands after a previously failed series
of steps.
23:31:51 - r319013
(5 hours 15 minutes ago)
by ngie
Affects: 
(6 files)
/stable/11/tools/regression/geom_gpt/*
MFC
r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309:

r317290:

Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h
#include below the stdio.h #include.

gctl_dump(3) needs stdio.h, per reasoning noted in r317289.

PR: 218809

r317291:

Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c

This is being done to reduce ambiguity and to make the tests more portable
in the future to other locations in the source tree.

r317292:

gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly

r317293:

gctl_test_helper: apply polish

- Staticize variables to fix warnings.
- Sprinkle asserts around for calls that can fail
- Apply style(9) for main(..) definition.
- ANSIify usage(..) definition.

r317294:

Bump WARNS to 6 per previous commits which fixed warnings

Tested with: clang (4.0), gcc (4.2.1, 6.3.0)

r317295:

The GPT class no longer exists; use the PART class instead

r317304:

gctl_test_helper: add diagnostic output for parse_retval(..)

This will help end-users better diagnose issues with the function.

r317306:

gctl_test.t: minor tweaks

- Declare $count with the `my` scope operator to permit `use strict`.
- Add `use strict`.
- Use `use warnings` instead of using `-w` in the shebang.
- Don't unlink $cmd when done (prevents unnecessary rebuilding).
- Improve the error message when running with insufficient permissions, e.g.,
  non-root.

r317307:

Use verb=delete not verb=remove

The `remove` verb hasn't been present in geom_part*(4) for well
over a decade, if ever. I couldn't find any references to it in
^/stable/5 at least, which is around the timeframe that this test
was written.

r317308:

gctl_test.t: more tweaks to try and update the code and get it functional
(again?)

- Make the logfile for $out be built off the basename for $cmd, instead of $cmd.
  (r317292 broke this assumption).
- Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for
  mountpoints.
- Reindent the umount directive block while here to match the rest of the code.

r317309:

gctl_test.t: improve error reporting with mdcfg and mount directives

If the commands had failed previously, it would press on and result in a
series of cascading failures. Fail early and continue on to the next case
instead of executing additional commands after a previously failed series
of steps.
23:26:10 - r319012
(5 hours 21 minutes ago)
by ngie
Affects: 
(6 files)
/stable/10/etc/mtree/BSD.tests.dist
/stable/10/lib/libkvm/Makefile
/stable/10/lib/libkvm/tests/*
MFC r316099:

lib/libkvm: start adding basic tests for kvm(3)

- kvm_close: add a testcase to verify support for errno = EINVAL / -1
  (see D10065) when kd == NULL is provided to the libcall.
- kvm_geterr:
-- Add a negative testcase for kd == NULL returning "" (see D10022).
-- Add two positive testcases:
--- test the error case using kvm_write on a O_RDONLY descriptor.
--- test the "no error" case using kvm_read(3) and kvm_nlist(3) as
  helper routines and by injecting a bogus error message via
  _kvm_err (an internal API) _kvm_err was used as there isn't a
  formalized way to clear the error output, and because
  kvm_nlist always returns ENOENT with the NULL terminator today.
- kvm_open, kvm_open2:
-- Add some basic negative tests for kvm_open(3) and kvm_open2(3).
  Testing positive cases with a specific
  `corefile`/`execfile`/`resolver` requires more work and would require
  user intervention today in order to reliably test this out.

MFC note:
  lib/libkvm/kvm_open2_test is not compiled/tested because ^/stable/10
  lacks the kvm_open2(3) libcall.
23:24:33 - r319011
(5 hours 23 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libkvm/tests/kvm_geterr_test.c
MFC r319010:

Fix #if conditional added in r319008

I committed an earlier version of the file by accident

This is a no-op on ^/head and ^/stable/11.
23:23:22 - r319010
(5 hours 24 minutes ago)
by ngie
Affects:  /head/lib/libkvm/tests/kvm_geterr_test.c
Fix #if conditional added in r319008

I committed an earlier version of the file by accident

This is a no-op on ^/head and ^/stable/11.

MFC after: now
Sponsored by: Dell EMC Isilon
23:20:28 - r319009
(5 hours 27 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libkvm/tests/kvm_geterr_test.c
MFC r319008:

kvm_geterr_test: Compile out the portions that require kvm_open2(3) on
systems that lack the libcall, based on __FreeBSD_version.

kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11,
but not ^/stable/10. This makes some of kvm_geterr_test available for testing
on ^/stable/10.
23:19:32 - r319008
(5 hours 28 minutes ago)
by ngie
Affects:  /head/lib/libkvm/tests/kvm_geterr_test.c
kvm_geterr_test: Compile out the portions that require kvm_open2(3) on
systems that lack the libcall, based on __FreeBSD_version.

kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11,
but not ^/stable/10. This makes some of kvm_geterr_test available for testing
on ^/stable/10.

MFC after: now
Sponsored by: Dell EMC Isilon
23:04:48 - r319007
(5 hours 43 minutes ago)
by ngie
Affects: 
(3 files)
/stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh
/stable/10/tests/sys/fs/tmpfs/Makefile
MFC r318546:

sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic

The previous logic was flawed in the sense that it assumed that /dev/md3
was always available. This was a caveat I noted in r306038, that I hadn't
gotten around to solving before now.

Cache the device for the mountpoint after executing mdmfs, then use the
cached value in basic_cleanup(..) when unmounting/disconnecting the md(4)
device.

Apply sed expressions to use reuse logic in the NetBSD code that could
also be applied to FreeBSD, just with different tools.
23:04:40 - r319006
(5 hours 43 minutes ago)
by ngie
Affects: 
(4 files)
/stable/11/etc/mtree/BSD.tests.dist
/stable/11/lib/libkvm/Makefile
/stable/11/lib/libkvm/tests
MFC r316099:

lib/libkvm: start adding basic tests for kvm(3)

- kvm_close: add a testcase to verify support for errno = EINVAL / -1
  (see D10065) when kd == NULL is provided to the libcall.
- kvm_geterr:
-- Add a negative testcase for kd == NULL returning "" (see D10022).
-- Add two positive testcases:
--- test the error case using kvm_write on a O_RDONLY descriptor.
--- test the "no error" case using kvm_read(3) and kvm_nlist(3) as
  helper routines and by injecting a bogus error message via
  _kvm_err (an internal API) _kvm_err was used as there isn't a
  formalized way to clear the error output, and because
  kvm_nlist always returns ENOENT with the NULL terminator today.
- kvm_open, kvm_open2:
-- Add some basic negative tests for kvm_open(3) and kvm_open2(3).
  Testing positive cases with a specific
  `corefile`/`execfile`/`resolver` requires more work and would require
  user intervention today in order to reliably test this out.
22:59:23 - r319005
(5 hours 48 minutes ago)
by ngie
Affects: 
(3 files)
/stable/11/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh
/stable/11/tests/sys/fs/tmpfs/Makefile
MFC r318546:

sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic

The previous logic was flawed in the sense that it assumed that /dev/md3
was always available. This was a caveat I noted in r306038, that I hadn't
gotten around to solving before now.

Cache the device for the mountpoint after executing mdmfs, then use the
cached value in basic_cleanup(..) when unmounting/disconnecting the md(4)
device.

Apply sed expressions to use reuse logic in the NetBSD code that could
also be applied to FreeBSD, just with different tools.
22:57:10 - r319004
(5 hours 50 minutes ago)
by ngie
Affects: 
(2 files)
/stable/11/lib/libgeom/libgeom.3
MFC r317288,r317289:

r317288:

libgeom(3): apply minor polish

- Use .Dv when mentioning NULL per mdoc(7).
- Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions
  so they're less wordy.
- Fix a typo in `g_device_path` (can not -> cannot).

Tested with: igor, make manlint

r317289:

libgeom(3): note that stdio.h is required when referencing gctl_dump(3)

gctl_dump(3) is only exposed when stdio.h is #include'd first, per its
addition in r112510. The reasoning noted for the conditional "exposure"
of the function was to "limit #include pollution".

This addresses an issue I found with the documentation when looking at
bug 218809, which in turn addresses a -Wimplicit-function-declaration
compiler warning in `tools/regression/geom_gpt/test.c` (it uses
gctl_dump(3)).
22:57:07 - r319003
(5 hours 50 minutes ago)
by ngie
Affects: 
(2 files)
/stable/10/lib/libgeom/libgeom.3
MFC r317288,r317289:

r317288:

libgeom(3): apply minor polish

- Use .Dv when mentioning NULL per mdoc(7).
- Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions
  so they're less wordy.
- Fix a typo in `g_device_path` (can not -> cannot).

Tested with: igor, make manlint

r317289:

libgeom(3): note that stdio.h is required when referencing gctl_dump(3)

gctl_dump(3) is only exposed when stdio.h is #include'd first, per its
addition in r112510. The reasoning noted for the conditional "exposure"
of the function was to "limit #include pollution".

This addresses an issue I found with the documentation when looking at
bug 218809, which in turn addresses a -Wimplicit-function-declaration
compiler warning in `tools/regression/geom_gpt/test.c` (it uses
gctl_dump(3)).
22:40:20 - r319002
(6 hours 7 minutes ago)
by ngie
Affects:  /head/usr.bin/grep/tests/grep_freebsd_test.sh
:rgrep : use atf-check to check the exit code/save the output of grep -r instead
of calling grep -r without it, and saving the output to a file

This ensures that any errors thrown via grep -r are caught, not lost, and uses
existing atf-sh idioms for saving files.

Tested with: bsdgrep, gnu grep (base, ports)
Sponsored by: Dell EMC Isilon
21:46:00 - r319001
(7 hours 1 minute ago)
by alc
Affects:  /head/sys/vm/swap_pager.c
After r118390, the variable "dmmax" was neither the correct strip size
nor the correct maximum block size. Moreover, after r318995, it serves
no purpose except to provide information to user space through a read-
sysctl.

This change eliminates the variable "dmmax" but retains the sysctl. It
also corrects the value returned by the sysctl.

Reviewed by: kib, markj
MFC after: 3 days
20:01:50 - r319000
(8 hours 45 minutes ago)
by pfg
Affects:  /head/contrib/binutils/ld/configure.tgt
Align text correctly by using tabs instead of spaces.

The text was copy-pasted from the lines that carry the bogus spaces.
This is a non-functional change.
18:46:00 - r318999
(10 hours 1 minute ago)
by bapt
Affects:  /head/sys/boot/common/dev_net.c
Update the comments concerning net_parse_rootpath to reflect what it is now
really doing

Reported by: rgrimes
Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D10959
18:01:14 - r318998
(10 hours 46 minutes ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_sync.c
Fix return value of ip_sync_nat. Previously, regardless of error it
always returned a return code of 0.

Obtained from: NetBSD ip_sync.c r1.5
MFC after: 1 week
17:00:30 - r318997
(11 hours 47 minutes ago)
by kib
Affects: 
(5 files)
/head/sys/*
Use whole mnt_stat.f_fsid bits for st_dev.

Since ino64 expanded dev_t to 64bit, make VOP_GETATTR(9) provide all
bits of mnt_stat.f_fsid as va_fsid for vnodes on filesystems which use
f_fsid. In particular, NFSv3 and sometimes NFSv4, and ZFS use this
method or reporting st_dev by stat(2).

Provide a new helper vn_fsid() to avoid duplicating code to copy
f_fsid to va_fsid.

Note that the change is mostly cosmetic. Its motivation is to avoid
sign-extension of f_fsid[0] into 64bit dev_t value which happens after
dev_t becomes 64bit..

Reviewed by: avg(zfs), rmacklem (nfs) (both for previous version)
Sponsored by: The FreeBSD Foundation
16:53:39 - r318996
(11 hours 54 minutes ago)
by jhb
Affects:  /head/usr.bin/netstat/ipsec.c
Add descriptions for AES-GCM IPSec authentication (AH) counters.

MFC after: 1 week
Sponsored by: Chelsio Communications
16:40:00 - r318995
(12 hours 7 minutes ago)
by alc
Affects:  /head/sys/vm/swap_pager.c
In r118390, the swap pager's approach to striping swap allocation over
multiple devices was changed. However, swapoff_one() was not fully and
correctly converted. In particular, with r118390's introduction of a per-
device blist, the maximum swap block size, "dmmax", became irrelevant to
swapoff_one()'s operation. Moreover, swapoff_one() was performing out-of-
range operations on the per-device blist that were silently ignored by
blist_fill().

This change corrects both of these problems with swapoff_one(), which will
allow us to potentially increase MAX_PAGEOUT_CLUSTER. Previously,
swapoff_one() would panic inside of blist_fill() if you increased
MAX_PAGEOUT_CLUSTER.

Reviewed by: kib, markj
MFC after: 3 days
14:07:46 - r318994
(14 hours 40 minutes ago)
by bapt
Affects:  /head/sys/boot/i386/pxeldr/pxeboot.8
Catch with the change in the user class
14:06:57 - r318993
(14 hours 40 minutes ago)
by bapt
Affects:  /head/lib/libstand/bootp.c
Use the usual FreeBSD spelling for the DHCP user class

Reported by: lidl
13:55:20 - r318992
(14 hours 52 minutes ago)
by bapt
Affects:  /head/sys/boot/i386/pxeldr/pxeboot.8
Capitalize DHCP

Reported by: danfe
13:26:18 - r318991
(15 hours 21 minutes ago)
by bapt
Affects:  /head/sys/boot/i386/pxeldr/pxeboot.8
Document recent changes on pxeboot
12:46:46 - r318990
(16 hours 1 minute ago)
by bapt
Affects:  /head/sys/boot/common/dev_net.c
Partially revert r314948

While it sounds like a good idea to extract the RFC1048 data from PXE, in the
end it is not and it is causing lots of issues. Our pxeloader might need
options which are incompatible with other pxe servers (for example iPXE, but
not only).

Our pxe loaders are also now settings their own user class, so it is useful to
issue our own pxe request at startup

Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10953
12:35:01 - r318989
(16 hours 12 minutes ago)
by bapt
Affects: 
(4 files)
/head/lib/libstand/*
/head/sys/boot/common/dev_net.c
Always issue the pxe request

All the code are now only issueing one single dhcp request at startup of the
loader meaning we can always request a the PXE informations from the
dhcp server.

Previous code lost that information, meaning no option 55 anymore (meaning not
working with the kea dhcp server) and no request for rootpath etc, no user class

Remove the flags from the bootp function which is not needed anymore

Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10952
12:20:13 - r318988
(16 hours 27 minutes ago)
by bapt
Affects:  /head/sys/boot/i386/loader/Makefile
Always build tftpfs support along with nfs for pxeboot

This change was already done for loader.efi
12:06:52 - r318987
(16 hours 40 minutes ago)
by bapt
Affects:  /head/sys/boot/common/dev_net.c
Support URI scheme for root-path in netbooting

Rather that previous attempts to add tftpfs support at the same time as NFS
support. This time decide on a proper URI parser rather than hacks.

root-path can now be define the following way:
For tftpfs:

tftp://ip/path
tftp:/path (this one will consider the tftp server is the same as the one where
the pxeboot file was fetched from)

For nfs:
nfs:/path
nfs://ip/path

The historical
ip:/path
/path

are kept on NFS

Reviewed by: tsoom, rgrimes
Differential Revision: https://reviews.freebsd.org/D10947
11:41:54 - r318986
(17 hours 5 minutes ago)
by bapt
Affects:  /head/lib/libstand/bootp.c
add a comment on vendor index 19 and 20 to avoid confusion

Suggested by: tsoome
11:25:21 - r318985
(17 hours 22 minutes ago)
by dim
Affects:  /projects/clang500-import/lib/clang/libllvm/Makefile
Missed a few additional files in libllvm, for llvm-objdump and llvm-pdbdump.
11:21:20 - r318984
(17 hours 26 minutes ago)
by bapt
Affects: 
(2 files)
/stable/10/share/misc/pci_vendors
MFC r318900:

update pci_vendors to 2017.05.25
11:12:11 - r318983
(17 hours 35 minutes ago)
by bapt
Affects: 
(2 files)
/stable/11/share/misc/pci_vendors
MFC r318900:

update pci_vendors to 2017.05.25
10:50:35 - r318982
(17 hours 57 minutes ago)
by bapt
Affects:  /head/lib/libstand/bootp.c
/head/lib/libstand/bootp.h
Pass a "FREEBSD" user-class in PXE dhcp request

rfc3004 allows to pass multiple user classes on dhcp requests
this is used by dhcp servers to differentiate the caller if needed.

As an example with isc dhcp server it will be possible to make options
only for the FreeBSD loaders:

if exists user-class and option user-class = "FREEBSD" {
  option root-path "tftp://192.168.42.1/FreeBSD;
}

Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10951
08:30:32 - r318981
(20 hours 17 minutes ago)
by hselasky
Affects: 
(7 files)
/stable/8/sys/dev/sound/pcm/feeder_mixer.c
/stable/8/sys/tools/sound/snd_fxdiv_gen.awk
MFC r318820:
Increase the allowed maximum number of audio channels from 31 to 127
in the PCM feeder mixer. Without this change a value of 32 channels is
treated like zero, due to using a mask of 0x1f, causing a kernel
assert when trying to playback bitperfect 32-channel audio. Also
update the AWK script which is generating the division tables to
handle more than 18 channels. This commit complements r282650.
08:28:51 - r318980
(20 hours 18 minutes ago)
by hselasky
Affects: 
(3 files)
/stable/9/sys/dev/sound/pcm/feeder_mixer.c
/stable/9/sys/tools/sound/snd_fxdiv_gen.awk
MFC r318820:
Increase the allowed maximum number of audio channels from 31 to 127
in the PCM feeder mixer. Without this change a value of 32 channels is
treated like zero, due to using a mask of 0x1f, causing a kernel
assert when trying to playback bitperfect 32-channel audio. Also
update the AWK script which is generating the division tables to
handle more than 18 channels. This commit complements r282650.
08:27:11 - r318979
(20 hours 20 minutes ago)
by hselasky
Affects: 
(3 files)
/stable/10/sys/dev/sound/pcm/feeder_mixer.c
/stable/10/sys/tools/sound/snd_fxdiv_gen.awk
MFC r318820:
Increase the allowed maximum number of audio channels from 31 to 127
in the PCM feeder mixer. Without this change a value of 32 channels is
treated like zero, due to using a mask of 0x1f, causing a kernel
assert when trying to playback bitperfect 32-channel audio. Also
update the AWK script which is generating the division tables to
handle more than 18 channels. This commit complements r282650.
08:25:08 - r318978
(20 hours 22 minutes ago)
by hselasky
Affects: 
(3 files)
/stable/11/sys/dev/sound/pcm/feeder_mixer.c
/stable/11/sys/tools/sound/snd_fxdiv_gen.awk
MFC r318820:
Increase the allowed maximum number of audio channels from 31 to 127
in the PCM feeder mixer. Without this change a value of 32 channels is
treated like zero, due to using a mask of 0x1f, causing a kernel
assert when trying to playback bitperfect 32-channel audio. Also
update the AWK script which is generating the division tables to
handle more than 18 channels. This commit complements r282650.
08:17:59 - r318977
(20 hours 29 minutes ago)
by hselasky
Affects: 
(4 files)
/stable/10/sys/arm/arm/busdma_machdep-v6.c
/stable/10/sys/arm/arm/busdma_machdep.c
/stable/10/sys/x86/x86/busdma_bounce.c
MFC r318353:
Avoid use of contiguous memory allocations in busdma when possible.

This patch improves the boundary checks in busdma to allow more cases
using the regular page based kernel memory allocator. Especially in
the case of having a non-zero boundary in the parent DMA tag. For
example AMD64 based platforms set the PCI DMA tag boundary to
PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous
memory allocations to be preferred when allocating more than PAGE_SIZE
bytes. Even if the required alignment was less than PAGE_SIZE bytes.

This patch also fixes the nsegments check for using kmem_alloc_attr()
when the maximum segment size is less than PAGE_SIZE bytes.

Updated some comments describing the code in question.

Differential Revision: https://reviews.freebsd.org/D10645
Reviewed by: kib, jhb, gallatin, scottl
Sponsored by: Mellanox Technologies
07:47:52 - r318976
(20 hours 59 minutes ago)
by hselasky
Affects: 
(6 files)
/stable/11/sys/*
MFC r318353:
Avoid use of contiguous memory allocations in busdma when possible.

This patch improves the boundary checks in busdma to allow more cases
using the regular page based kernel memory allocator. Especially in
the case of having a non-zero boundary in the parent DMA tag. For
example AMD64 based platforms set the PCI DMA tag boundary to
PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous
memory allocations to be preferred when allocating more than PAGE_SIZE
bytes. Even if the required alignment was less than PAGE_SIZE bytes.

This patch also fixes the nsegments check for using kmem_alloc_attr()
when the maximum segment size is less than PAGE_SIZE bytes.

Updated some comments describing the code in question.

Differential Revision: https://reviews.freebsd.org/D10645
Reviewed by: kib, jhb, gallatin, scottl
Sponsored by: Mellanox Technologies
06:24:06 - r318975
(22 hours 23 minutes ago)
by delphij
Affects:  /head/etc/rc.d/random
Tighten /entropy permissions.

PR: 219527
Reported by: Lu Tung-Pin <lutungpin at openmailbox.org>
Submitted by: jilles
MFC after: 3 days
02:07:22 - r318974
(1 day 2 hours ago)
by emaste
Affects:  /head/sys/dev/uart/uart_bus_pci.c
uart: add AMT SOL PCI ID

I adjusted the description to be similar to existing AMT entries.

PR: 219384
Submitted by: "Tooker"
MFC after: 1 week
02:05:21 - r318973
(1 day 2 hours ago)
by np
Affects:  /head/contrib/ofed/libcxgb4/src/qp.c
libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace
RDMA library for cxgbe(4).

MFC after: 3 days
Sponsored by: Chelsio Communications
01:35:59 - r318972
(1 day 3 hours ago)
by emaste
Affects: 
(4 files)
/stable/11/sys/sys/elf32.h
/stable/11/sys/sys/elf64.h
/stable/11/sys/sys/elf_common.h
MFC r312599 (cem): Add remaining ELF compression definitions and structs

PR: 219417
00:30:51 - r318971
(1 day 4 hours ago)
by gjb
Affects: 
(6 files)
/stable/11/*
MFC r318794, r318795:
 Update the "first appeared in" version in several manual pages.

Sponsored by: The FreeBSD Foundation
2017 - 05 - 26   (2 days ago)
22:22:48 - r318970
(1 day 6 hours ago)
by mav
Affects:  /head/sys/net/if_lagg.c
Call VLAN_CAPABILITIES() when LAGG capabilities change.

This makes VLAN on top of LAGG to expose proper capabilities if they are
changed after creation.

MFC after: 1 week
22:17:44 - r318969
(1 day 6 hours ago)
by cem
Affects: 
(7 files)
/head/lib/libprocstat/*
/head/sys/*
/head/usr.bin/procstat/procstat_files.c
procstat(1): Add TCP socket send/recv buffer size

Add TCP socket send and receive buffer size to procstat -f output.

Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D10689
21:10:01 - r318968
(1 day 7 hours ago)
by brooks
Affects:  /head/usr.bin/procstat/procstat.1
/head/usr.bin/procstat/procstat.c
Add missing usage and getopt(3) options

- Add the missing option 'n' to the getopt(3) string
- Add the missing options 'libxo' and 'N' to the usage message
- Add the missing options 'M' and 'N' to the man-page

Submitted by: Keegan Drake H.P. <kdrakehp@zoho.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10915
20:20:40 - r318967
(1 day 8 hours ago)
by jhb
Affects:  /head/sys/dev/cxgbe/crypto/t4_crypto.c
Fail large requests with EFBIG.

The adapter firmware in general does not accept PDUs larger than 64k - 1
bytes in size. Sending crypto requests larger than this size result in
hangs or incorrect output, so reject them with EFBIG. For requests
chaining an AES cipher with an HMAC, the firmware appears to require
slightly smaller requests (around 512 bytes).

Sponsored by: Chelsio Communications
20:15:33 - r318966
(1 day 8 hours ago)
by mav
Affects:  /head/sys/net/if_lagg.c
Improve applying unified capabilities to the lagg ports.

Some NICs have some capabilities dependent, so that disabling one require
disabling some other (TXCSUM/RXCSUM on em). This code tries to reach the
consensus more insistently.

PR: 219453
MFC after: 1 week
19:19:47 - r318965
(1 day 9 hours ago)
by n_hibma
Affects: 
(3 files)
/stable/11/etc/rc.d/ipfw
/stable/11/etc/rc.d/routing
MFC 317729:

  Silence sysctl in startup scripts.

  This makes 'stop' behave consistently with 'start' in the script.
  Also use $SYSCTL instead of sysctl for consistency within that script.
19:11:24 - r318964
(1 day 9 hours ago)
by dim
Affects: 
(922 files)
/projects/clang500-import/*
Merge ^/head r318658 through r318963.
19:02:46 - r318963
(1 day 9 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/release/tools/ec2.conf
/stable/11/release/tools/ec2.conf
MFC r314935 (thompsa):
 Change ec2.conf to use the pkg tool from a chroot rather than trying
 to bootstrap it and fail from the livecd readonly filesystem.

Sponsored by: The FreeBSD Foundation
17:44:47 - r318962
(1 day 11 hours ago)
by avg
Affects:  /head/sys/cam/ata/ata_xpt.c
Allow PROBE_SPINUP to fail in CAM ATA transport

The motivation for this is two-fold.

1. Some old WD SATA disks may appear as if they need to be spun up
when they are already spinning. Those disks would respond with
an error to the spin-up request.

2. Even if we really fail to spin up the disk, we still can try to
proceed to the subsequent phases. If we fail later on, then no
difference. Otherwise we get a chance to communicate with the
disk which is better than completely ignoring it, because a user
can try to recover the disk.

Reviewed by: mav
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D10896
17:11:27 - r318961
(1 day 11 hours ago)
by jhb
Affects: 
(3 files)
/stable/11/usr.bin/truss/syscall.h
/stable/11/usr.bin/truss/syscalls.c
MFC 315335,315336,315496,315497,315500,315502,315504,315509,315523,315524,
315525: Decode more system call arguments in truss.

315335:
Remove duplicate argument from linux_stat64() decoding.

315336:
Automate the handling of QUAD_ALIGN and QUAD_SLOTS.

Previously, the offset in a system call description specified the
array index of the start of a system call argument. For most system
call arguments this was the same as the index of the argument in the
function signature. 64-bit arguments (off_t and id_t values) passed
on 32-bit platforms use two slots in the array however. This was
handled by adding (QUAD_SLOTS - 1) to the slot indicies of any
subsequent arguments after a 64-bit argument (though written as ("{
Quad, 1 }, { Int, 1 + QUAD_SLOTS }" rather than "{ Quad, 1 }, { Int, 2
+ QUAD_SLOTS - 1 }"). If a system call contained multiple 64-bit
arguments (such as posix_fadvise()), then additional arguments would
need to use 'QUAD_SLOTS * 2' but remember to subtract 2 from the
initial number, etc. In addition, 32-bit powerpc requires 64-bit
arguments to be 64-bit aligned, so if the effective index in the array
of a 64-bit argument is odd, it needs QUAD_ALIGN added to the current
and any subsequent slots. However, if the effective index in the
array of a 64-bit argument was even, QUAD_ALIGN was omitted.

This approach was messy and error prone. This commit replaces it with
automated pre-processing of the system call table to do fixups for
64-bit argument offsets. The offset in a system call description now
indicates the index of an argument in the associated function call's
signature. A fixup function is run against each decoded system call
description during startup on 32-bit platforms. The fixup function
maintains an 'offset' value which holds an offset to be added to each
remaining system call argument's index. Initially offset is 0. When
a 64-bit system call argument is encountered, the offset is first
aligned to a 64-bit boundary (only on powerpc) and then incremented to
account for the second argument slot used by the argument. This
modified 'offset' is then applied to any remaining arguments. This
approach does require a few things that were not previously required:

1) Each system call description must now list arguments in ascending
  order (existing ones all do) without using duplicate slots in the
  register array. A new assert() should catch any future
  descriptions which violate this rule.

2) A system call description is still permitted to omit arguments
  (though none currently do), but if the call accepts 64-bit
  arguments those cannot be omitted or incorrect results will be
  displated on 32-bit systems.

315496:
Decode the arguments passed to cap_fcntls_get() and cap_fcntls_limit().

315497:
Decode arguments passed to posix_fadvise().

315500:
Decode file flags passed to *chflags*().

While here, decode arguments passed to fchflags() and chflagsat().

315502:
Decode flock() operation.

315504:
Decode arguments passed to getfsstat().

Note that this does not yet decode the statfs structures returned by
getfsstat().

315509:
Decode arguments passed to kldsym() and kldunloadf().

This does not currently decode the kld_sym_lookup structure passed to
kldsym().

315523:
Add a Sizet type for 'size_t' values and use it instead of Int.

Various size_t arguments were previously decoded as Int values instead
which would have truncated values above 2^31 on 64-bit systems.

315524:
Decode arguments to madvise().

315525:
Improve decoding of last arguments to ioctl() and sendto().

Decode the last argument to ioctl() as a pointer rather than an int.
Eventually this could use 'int' for the _IOWINT() case and pointers for
all others.

The last argument to sendto() is a socklen_t value, not a pointer.
16:36:30 - r318960
(1 day 12 hours ago)
by dab
Affects: 
(6 files)
/head/usr.sbin/newsyslog/*
Add newsyslog capability to write RFC5424 compliant rotation message.

This modification adds the capability to newsyslog to write the
rotation message in a format that is compliant with RFC5424. This
capability is enabled on a per-log file basis through a new value
("T") in the flags field in newsyslog.conf. This is useful on systems
that use the RFC5424 format for log files so that the rotation message
format matches that of the other log messages. There has been recent
mention of adding an RFC5424 compliant mode to syslogd and at least
one alternative system log daemon (rsyslogd) that already has the
capability to use that format.

Reviewed by: vangyzen, ngie
Approved by: vangyzen (mentor)
MFC after: 2 months
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10253
16:29:55 - r318959
(1 day 12 hours ago)
by dim
Affects:  /head/sys/sys/_types.h
Define a new __INO64 macro in <sys/_types.h>, to indicate the system
uses 64-bit inode numbers. Programs can use this to avoid including
<sys/param.h>, with its associated namespace pollution.

Reviewed by: kib
16:29:00 - r318958
(1 day 12 hours ago)
by tuexen
Affects: 
(6 files)
/head/sys/netinet/*
Use the SCTP_PCB_FLAGS_ACCEPTING flags to check for listeners.

While there, use a macro for checking the listen state to allow for
easier changes if required.

This done to help glebius@ with his listen changes.
16:03:28 - r318957
(1 day 12 hours ago)
by emaste
Affects:  /head/Makefile.inc1
rm stale ptrace dependencies after r305012

This is similar to r318912, except that ptrace.[sS] was previously a
file in the source tree, not a generated assembly wrapper.

Check for the existence of ptrace.[sS] in the .depend file to determine
if we have to clean it up. This is a bit hackish and will not be left
in place indefinitely, but provides a useful example case when
investigating a better solution in bmake.

Reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10930
15:57:54 - r318956
(1 day 12 hours ago)
by vangyzen
Affects:  /head/lib/libthr/Makefile
libthr: increase WARNS to the default (6)

...and silence cast-align warnings from gcc.

Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10935
15:56:28 - r318955
(1 day 12 hours ago)
by vangyzen
Affects: 
(6 files)
/head/lib/libthr/arch/*
/head/lib/libthr/thread/thr_private.h
libthr: fix warnings at WARNS=6

Fix more warnings about redundant declarations.

Reviewed by: kib emaste
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10932
15:55:03 - r318954
(1 day 12 hours ago)
by vangyzen
Affects: 
(5 files)
/head/libexec/rtld-elf/*
rtld: fix warnings about redundant declarations

Fix warnings about redundant declarations in rtld
when libthr in increased to WARNS=6.

Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10934
15:53:27 - r318953
(1 day 12 hours ago)
by vangyzen
Affects:  /head/lib/libthr/thread/thr_sig.c
libthr: fix style in previous commit

I intended to add this to the previous commit.

Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
15:51:51 - r318952
(1 day 12 hours ago)
by vangyzen
Affects:  /head/lib/libthr/thread/thr_sig.c
libthr: prevent setcontext() from masking SIGTHR

__thr_setcontext() mistakenly tested for the presence of SIGCANCEL
in its local ucontext_t instead of the parameter. Therefore,
if a thread calls setcontext() with a context whose signal mask
contains SIGTHR (a.k.a. SIGCANCEL), that signal will be blocked,
preventing the thread from being cancelled or suspended.

Reported by: gcc 6.1 via RISC-V tinderbox
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10933
15:49:20 - r318951
(1 day 12 hours ago)
by emaste
Affects: 
(6 files)
/head/usr.sbin/makefs/*
makefs: add -O (offset) option

NetBSD revs:
ffs.c 1.60
makefs.8 1.44
makefs.c 1.48
makefs.h 1.33
ffs/buf.c 1.20
ffs/mkfs.c 1.27

Obtained from: NetBSD
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10780
15:13:46 - r318950
(1 day 13 hours ago)
by lidl
Affects: 
(6 files)
/stable/11/contrib/blacklist/bin/blacklistd.c
/stable/11/contrib/blacklist/include/*
/stable/11/contrib/blacklist/lib/*
MFC r318755: Extend libblacklist support with new action types

The original blacklist library supported two notification types:
 - failed auth attempt, which incremented the failed login count
  by one for the remote address
 - successful auth attempt, which reset the failed login count
  to zero for that remote address

When the failed login count reached the limit in the configuration
file, the remote address would be blocked by a packet filter.

This patch implements a new notification type, "abusive behavior",
and accepts, but does not act on an additional type, "bad username".
It is envisioned that a system administrator will configure a small
list of "known bad usernames" that should be blocked immediately.

Sponsored by: The FreeBSD Foundation
13:09:16 - r318949
(1 day 15 hours ago)
by gjb
Affects: 
(2 files)
/stable/10/tools/build/mk/OptionalObsoleteFiles.inc
MFC r318748:
 Honor WITHOUT_TFTP for check-old* and delete-old* targets.

PR: 217949
Sponsored by: The FreeBSD Foundation
13:06:13 - r318948
(1 day 15 hours ago)
by gjb
Affects: 
(2 files)
/stable/11/tools/build/mk/OptionalObsoleteFiles.inc
MFC r318748:
 Honor WITHOUT_TFTP for check-old* and delete-old* targets.

PR: 217949
Sponsored by: The FreeBSD Foundation
12:13:58 - r318947
(1 day 16 hours ago)
by avg
Affects: 
(8 files)
/vendor-sys/illumos/dist/uts/common/fs/zfs/*
/vendor/illumos/dist/cmd/ztest/ztest.c
7578 Fix/improve some aspects of ZIL writing.

illumos/illumos-gate@c5ee46810f82e8a53d2cc5a487568a573f449039
https://github.com/illumos/illumos-gate/commit/c5ee46810f82e8a53d2cc5a487568a573f449039

https://www.illumos.org/issues/7578
  After some ZIL changes 6 years ago zil_slog_limit got partially broken
  due to zl_itx_list_sz not updated when async itx'es upgraded to sync.
  Actually because of other changes about that time zl_itx_list_sz is not
  really required to implement the functionality, so this patch removes
  some unneeded broken code and variables.
  Original idea of zil_slog_limit was to reduce chance of SLOG abuse by
  single heavy logger, that increased latency for other (more latency critical)
  loggers, by pushing heavy log out into the main pool instead of SLOG. Beside
  huge latency increase for heavy writers, this implementation caused double
  write of all data, since the log records were explicitly prepared for SLOG.
  Since we now have I/O scheduler, I've found it can be much more efficient
  to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE
  to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG.
  Existing ZIL implementation had problem with space efficiency when it
  has to write large chunks of data into log blocks of limited size. In some
  cases efficiency stopped to almost as low as 50%. In case of ZIL stored on
  spinning rust, that also reduced log write speed in half, since head had to
  uselessly fly over allocated but not written areas. This change improves
  the situation by offloading problematic operations from z*_log_write() to
  zil_lwb_commit(), which knows real situation of log blocks allocation and
  can split large requests into pieces much more efficiently. Also as side
  effect it removes one of two data copy operations done by ZIL code WR_COPIED
  case.
  While there, untangle and unify code of z*_log_write() functions.
  Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing
  block boundary, that may also improve efficiency if ZPL is made to do that.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alexander Motin <mav@FreeBSD.org>
12:13:27 - r318946
(1 day 16 hours ago)
by avg
Affects: 
(39 files)
/vendor-sys/illumos/dist/*
/vendor/illumos/dist/*
8021 ARC buf data scatter-ization
8100 8021 seems to cause random BAD TRAP: type=d (#gp General protection)

illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383
https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad18d93383

https://www.illumos.org/issues/8021
  The ARC buf data project (known simply as "ABD" since its genesis in the ZoL
  community) changes the way the ARC allocates `b_pdata` memory from using
linear
  `void *` buffers to using scatter/gather lists of fixed-size 1KB chunks. This
  improves ZFS's performance by helping to defragment the address space occupied
  by the ARC, in particular for cases where compressed ARC is enabled. It could
  also ease future work to allocate pages directly from `segkpm` for minimal-
  overhead memory allocations, bypassing the `kmem` subsystem.
  This is essentially the same change as the one which recently landed in ZFS on
  Linux, although they made some platform-specific changes while adapting this
  work to their codebase:
  1. Implemented the equivalent of the `segkpm` suggestion for future work
  mentioned above to bypass issues that they've had with the Linux kernel memory
  allocator.
  2. Changed the internal representation of the ABD's scatter/gather list so it
  could be used to pass I/O directly into Linux block device drivers. (This
  feature is not available in the illumos block device interface yet.)

https://www.illumos.org/issues/8100
  My supermicro system is getting random BAD TRAP: type=d (#gp General
  protection) at about the stage where ZFS filesystems are mounted - usually
  console login prompt is already present but the services are still starting.
  After backing out 8021, the boot is completed and no panics do occur.
  Machine does dump, however savecore fails:
  savecore: bad magic number baddcafe
  I can get more data out with boot -k, if needed.
  # psrinfo -vp
  The physical processor has 4 cores and 8 virtual processors (0-7)
  The core has 2 virtual processors (0 4)
  The core has 2 virtual processors (1 5)
  The core has 2 virtual processors (2 6)
  The core has 2 virtual processors (3 7)
  x86 (GenuineIntel 306C3 family 6 model 60 step 3 clock 3500 MHz)
  Intel(r) Xeon(r) CPU E3-1246 v3 @ 3.50GHz

  # prtconf -m
  32657

  $ zpool status
  pool: rpool
  state: ONLINE
  scan: none requested
  config:

  NAME STATE READ WRITE CKSUM
  rpool ONLINE 0 0 0
  raidz1-0 ONLINE 0 0 0
  c3t0d0 ONLINE 0 0 0
  c3t1d0 ONLINE 0 0 0

Reviewed by: Matthew Ahrens mahrens@delphix.com
Reviewed by: George Wilson george.wilson@delphix.com
Reviewed by: Paul Dagnelie pcd@delphix.com
Reviewed by: John Kennedy john.kennedy@delphix.com
Reviewed by: Prakash Surya prakash.surya@delphix.com
Reviewed by: Prashanth Sreenivasa pks@delphix.com
Reviewed by: Pavel Zakharov pavel.zakharov@delphix.com
Reviewed by: Chris Williamson chris.williamson@delphix.com
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Dan Kimmel <dan.kimmel@delphix.com>
12:08:38 - r318945
(1 day 16 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
MFV r318944: 8265 Reserve send stream flag for large dnode feature

illumos/illumos-gate@bc83969fdbd1cb0d97ba00218c0a3de5c89fba92
https://github.com/illumos/illumos-gate/commit/bc83969fdbd1cb0d97ba00218c0a3de5c89fba92

https://www.illumos.org/issues/8265
  Reserve bit 23 in the zfs send stream flags for the large
  dnode feature which has been implemented for Linux.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Brian Behlendorf <behlendorf1@llnl.gov>

MFC after: 1 week
12:07:47 - r318944
(1 day 16 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h
8265 Reserve send stream flag for large dnode feature

illumos/illumos-gate@bc83969fdbd1cb0d97ba00218c0a3de5c89fba92
https://github.com/illumos/illumos-gate/commit/bc83969fdbd1cb0d97ba00218c0a3de5c89fba92

https://www.illumos.org/issues/8265
  Reserve bit 23 in the zfs send stream flags for the large
  dnode feature which has been implemented for Linux.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Brian Behlendorf <behlendorf1@llnl.gov>
12:04:21 - r318943
(1 day 16 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
MFV r318942: 8166 zpool scrub thinks it repaired offline device

illumos/illumos-gate@2d2f193a21231a58c583466dc23ba71f1a25f424
https://github.com/illumos/illumos-gate/commit/2d2f193a21231a58c583466dc23ba71f1a25f424

https://www.illumos.org/issues/8166
  If we do a scrub while a leaf device is offline (via "zpool offline"),
  we will inadvertently clear the DTL (dirty time log) of the offline
  device, even though it is still damaged. When the device comes back
  online, we will incompletely resilver it, thinking that the scrub
  repaired blocks written before the scrub was started. The incomplete
  resilver can lead to data loss if there is a subsequent failure of a
  different leaf device.
  The fix is to never clear the DTL of offline devices. Note that if a
  device is onlined while a scrub is in progress, the scrub will be
  restarted.
  The problem can be worked around by running "zpool scrub" after
  "zpool online".
  See also https://github.com/zfsonlinux/zfs/issues/5806

Reviewed by: George Wilson george.wilson@delphix.com
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>
12:02:51 - r318942
(1 day 16 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
8166 zpool scrub thinks it repaired offline device

illumos/illumos-gate@2d2f193a21231a58c583466dc23ba71f1a25f424
https://github.com/illumos/illumos-gate/commit/2d2f193a21231a58c583466dc23ba71f1a25f424

https://www.illumos.org/issues/8166
  If we do a scrub while a leaf device is offline (via "zpool offline"),
  we will inadvertently clear the DTL (dirty time log) of the offline
  device, even though it is still damaged. When the device comes back
  online, we will incompletely resilver it, thinking that the scrub
  repaired blocks written before the scrub was started. The incomplete
  resilver can lead to data loss if there is a subsequent failure of a
  different leaf device.
  The fix is to never clear the DTL of offline devices. Note that if a
  device is onlined while a scrub is in progress, the scrub will be
  restarted.
  The problem can be worked around by running "zpool scrub" after
  "zpool online".
  See also https://github.com/zfsonlinux/zfs/issues/5806

Reviewed by: George Wilson george.wilson@delphix.com
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>
12:02:14 - r318941
(1 day 16 hours ago)
by avg
Affects: 
(12 files)
/vendor-sys/illumos/dist/*
/vendor/illumos/dist/*
7446 zpool create should support efi system partition

illumos/illumos-gate@7855d95b30fd903e3918bad5a29b777e765db821
https://github.com/illumos/illumos-gate/commit/7855d95b30fd903e3918bad5a29b777e765db821

https://www.illumos.org/issues/7446
  Since we support whole-disk configuration for boot pool, we also will need
  whole disk support with UEFI boot and for this, zpool create should create
efi-
  system partition.
  I have borrowed the idea from oracle solaris, and introducing zpool create -
  B switch to provide an way to specify that boot partition should be created.
  However, there is still an question, how big should the system partition be.
  For time being, I have set default size 256MB (thats minimum size for FAT32
  with 4k blocks). To support custom size, the set on creation "bootsize"
  property is created and so the custom size can be set as: zpool create B -
  o bootsize=34MB rpool c0t0d0
  After pool is created, the "bootsize" property is read only. When -B switch is
  not used, the bootsize defaults to 0 and is shown in zpool get output with
  value ''. Older zfs/zpool implementations are ignoring this property.
  https://www.illumos.org/rb/r/219/

Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: Dan McDonald <danmcd@kebe.com>
Author: Toomas Soome <tsoome@me.com>
12:00:31 - r318940
(1 day 16 hours ago)
by avg
Affects:  /vendor/illumos/dist/man/man1m/zpool.1m
7956 "minimum" is misspelled in zpool manpage

illumos/illumos-gate@eba8726136851528470dad9bad27892859bc1e3e
https://github.com/illumos/illumos-gate/commit/eba8726136851528470dad9bad27892859bc1e3e

https://www.illumos.org/issues/7956

Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Brad Lewis <blewis@delphix.com>
11:59:20 - r318939
(1 day 16 hours ago)
by avg
Affects:  /vendor/illumos/dist/man/man1m/zpool.1m
6418 zpool should have a label clearing command

illumos/illumos-gate@6401734d545a04c18f68b448202f9d9a77216bb9
https://github.com/illumos/illumos-gate/commit/6401734d545a04c18f68b448202f9d9a77216bb9

https://www.illumos.org/issues/6418
  An easy, direct means of sanitizing pool vdevs can be helpful for management
  purposes.
  FreeBSD has had a 'zpool labelclear' for some time, see: https://
  svnweb.freebsd.org/base?view=revision&revision=224171
  SpectraBSD has a slightly updated version, which I propose for inclusion.

Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Will Andrews <will@firepipe.net>

Note: the bulk of the change has been already imported, this is a follow
up that imports zpool.1m changes.
11:56:28 - r318938
(1 day 16 hours ago)
by avg
Affects:  /vendor/illumos/dist/man/man1m/zpool.1m
6781 zpool man page needs updated to remove duplicate entry of "cannot be"
where it discusses cache devices

illumos/illumos-gate@e4cb59f791c5c6dea7ad4caa6dee845024ce71ef
https://github.com/illumos/illumos-gate/commit/e4cb59f791c5c6dea7ad4caa6dee845024ce71ef

https://www.illumos.org/issues/6781
  cache
  A device used to cache storage pool data. A cache device cannot
  be cannot be configured as a mirror or raidz group. For more
  information, see the "Cache Devices" section.
  needs changed to
  cache
  A device used to cache storage pool data. A cache device cannot
  be configured as a mirror or raidz group. For more
  information, see the "Cache Devices" section.

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Alexander Pyhalov <apyhalov@gmail.com>
11:55:31 - r318937
(1 day 16 hours ago)
by avg
Affects:  /vendor/illumos/dist/man/man1m/zpool.1m
2897 "zpool split" documentation missing from manpage

illumos/illumos-gate@879bece34ee134b2be670393fe9ffe33ce268aa0
https://github.com/illumos/illumos-gate/commit/879bece34ee134b2be670393fe9ffe33ce268aa0

https://www.illumos.org/issues/2897
  Found this option in some Oracle documentation and wanted to check out the
  zpool manpage on it in OI. Unfortunately it seems to be missing from the
  manpage, so I first thought it was unsupported. However, "# zpool split" does
  print the correct usage. Testing with the "-n" switch makes me believe it is
  supported (I don't actually need to split my pool).

Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: Steven Burgess <sburgess@datto.com>
11:54:42 - r318936
(1 day 16 hours ago)
by avg
Affects:  /vendor/illumos/dist/man/man1m/zpool.1m
4465 zpool(1M) is able to offline cache vdevs despite what man page says
5659 in the manual page for zpool(1M), one misuse of the word 'zpool' to
describe a pool

illumos/illumos-gate@c8323d4323a565676ba44883bfeb289d9ed8813e
https://github.com/illumos/illumos-gate/commit/c8323d4323a565676ba44883bfeb289d9ed8813e

https://www.illumos.org/issues/4465
  zpool(1M) is able to offline cache vdevs despite man page saying that it
isn't:
  zpool offline [-t] pool device ...
  Takes the specified physical device offline. While the device is
  offline, no attempt is made to read or write to the device.

  This command is not applicable to spares or cache devices.
  altair:root:~# zpool create testoff c9t67d0 cache c9t71d0
  altair:root:~# zpool status testoff
  pool: testoff
  state: ONLINE
  scan: none requested
  config:

  NAME STATE READ WRITE CKSUM
  testoff ONLINE 0 0 0
  c9t67d0 ONLINE 0 0 0
  cache
  c9t71d0 ONLINE 0 0 0

  errors: No known data errors
  altair:root:~# zpool offline testoff c9t71d0
  altair:root:~# zpool status testoff
  pool: testoff
  state: ONLINE
  status: One or more devices has been taken offline by the administrator.
  Sufficient replicas exist for the pool to continue functioning in a
  degraded state.
  action: Online the device using 'zpool online' or replace the device with
  'zpool replace'.
  scan: none requested

https://www.illumos.org/issues/5659
  At https://github.com/illumos/illumos-gate/blob/master/usr/src/man/man1m/
  zpool.1m#L931
  Do not add a disk that is currently configured as a quorum device to
  a zpool.
  – should be:
  Do not add a disk that is currently configured as a quorum device to
  a pool.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
11:49:42 - r318935
(1 day 16 hours ago)
by avg
Affects: 
(3 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
MFV r318934: 8070 Add some ZFS comments

illumos/illumos-gate@40713f2b249d289022c715107b3951055a63aef0
https://github.com/illumos/illumos-gate/commit/40713f2b249d289022c715107b3951055a63aef0

https://www.illumos.org/issues/8070
  Add some ZFS comments left by various developers at different times

Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

MFC after: 1 week
11:48:29 - r318934
(1 day 16 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
/vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
8070 Add some ZFS comments

illumos/illumos-gate@40713f2b249d289022c715107b3951055a63aef0
https://github.com/illumos/illumos-gate/commit/40713f2b249d289022c715107b3951055a63aef0

https://www.illumos.org/issues/8070
  Add some ZFS comments left by various developers at different times

Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>
11:39:34 - r318933
(1 day 17 hours ago)
by avg
Affects: 
(6 files)
/vendor-sys/illumos/dist/uts/common/fs/*
/vendor-sys/illumos/dist/uts/common/sys/vnode.h
8064 need a static DTrace probe in VN_HOLD

illumos/illumos-gate@ade42b557a6e29c3d17a61b1535d99af10e379be
https://github.com/illumos/illumos-gate/commit/ade42b557a6e29c3d17a61b1535d99af10e379be

https://www.illumos.org/issues/8064
  It's currently nearly impossible to trace what process places a hold on
  a vnode, as the only ways holds are place is via the `VN_HOLD()` and
  `VN_HOLD_CALLER()` macros, which inline the bumping of `v_count`. Adding
  static DTrace probes to these macros would enable tracing of where
  specific vnode references come from.
  For completeness and symmetry, a similar static probe should be added to
  `vn_rele()` and `vn_rele_dnlc()`.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Sebastien Roy <seb@delphix.com>
11:37:11 - r318932
(1 day 17 hours ago)
by avg
Affects: 
(9 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFV r318931: 8063 verify that we do not attempt to access inactive txg

illumos/illumos-gate@b7b2590dd9f11b12a0b4878db3886068cce176af
https://github.com/illumos/illumos-gate/commit/b7b2590dd9f11b12a0b4878db3886068cce176af

https://www.illumos.org/issues/8063
  A standard practice in ZFS is to keep track of "per-txg" state. Any of
  the 3 active TXG's (open, quiescing, syncing) can have different values
  for this state. We should assert that we do not attempt to modify other
  (inactive) TXG's.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

MFC after: 2 weeks
11:35:34 - r318931
(1 day 17 hours ago)
by avg
Affects: 
(8 files)
/vendor-sys/illumos/dist/uts/common/fs/zfs/*
8063 verify that we do not attempt to access inactive txg

illumos/illumos-gate@b7b2590dd9f11b12a0b4878db3886068cce176af
https://github.com/illumos/illumos-gate/commit/b7b2590dd9f11b12a0b4878db3886068cce176af

https://www.illumos.org/issues/8063
  A standard practice in ZFS is to keep track of "per-txg" state. Any of
  the 3 active TXG's (open, quiescing, syncing) can have different values
  for this state. We should assert that we do not attempt to modify other
  (inactive) TXG's.

Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
11:33:34 - r318930
(1 day 17 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
MFV r318929: 7786 zfs`vdev_online() needs better notification about state
changes

illumos/illumos-gate@5f368aef86387d6ef4eda84030ae9b402313ee4c
https://github.com/illumos/illumos-gate/commit/5f368aef86387d6ef4eda84030ae9b402313ee4c

https://www.illumos.org/issues/7786
  Currently, vdev_online() will only post sysevent if previous state was
  "offline". It should also post the event when the state changes from "removed"
  or "faulted" to "healthy" or "degraded".
  This will fix the following scenario:
  - pull disk from slot A
  - check that hotspare has taken its place (if available)
  - insert disk into slot B
  - check that hotspare moved back to "avail" state (if spare was used)
  The problem here is that we don't get any ESC_ZFS_VDEV_* notification and fail
  to update the vdev FRU.

Reviewed by: Matthew Ahrens mahrens@delphix.com
Reviewed by: George Wilson george.wilson@delphix.com
Approved by: Albert Lee <trisk@forkgnu.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

MFC after: 1 week
11:32:05 - r318929
(1 day 17 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
7786 zfs`vdev_online() needs better notification about state changes

illumos/illumos-gate@5f368aef86387d6ef4eda84030ae9b402313ee4c
https://github.com/illumos/illumos-gate/commit/5f368aef86387d6ef4eda84030ae9b402313ee4c

https://www.illumos.org/issues/7786
  Currently, vdev_online() will only post sysevent if previous state was
  "offline". It should also post the event when the state changes from "removed"
  or "faulted" to "healthy" or "degraded".
  This will fix the following scenario:
  - pull disk from slot A
  - check that hotspare has taken its place (if available)
  - insert disk into slot B
  - check that hotspare moved back to "avail" state (if spare was used)
  The problem here is that we don't get any ESC_ZFS_VDEV_* notification and fail
  to update the vdev FRU.

Reviewed by: Matthew Ahrens mahrens@delphix.com
Reviewed by: George Wilson george.wilson@delphix.com
Approved by: Albert Lee <trisk@forkgnu.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
11:30:55 - r318928
(1 day 17 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
MFV r318927: 8025 dbuf_read() creates unnecessary zio_root() for bonus buf

illumos/illumos-gate@def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e
https://github.com/illumos/illumos-gate/commit/def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e

https://www.illumos.org/issues/8025
  dbuf_read() creates a zio_root() to track and wait for all the zio's
  that may happen as part of this call. However, if the blkptr_t for
  this buffer is NULL or a hole, we will not create any more zio's, so
  this zio_root() is unnecessary. This is always the case when calling
  dbuf_read() on a bonus buffer, because it has no blkptr (it's part of
  the containing dnode). For workloads that read a lot of bonus buffers
  (e.g. file creation and removal), creating and destroying these
  unnecessary zio's can decrease performance by around 3%.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
11:29:31 - r318927
(1 day 17 hours ago)
by avg
Affects:  /vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
8025 dbuf_read() creates unnecessary zio_root() for bonus buf

illumos/illumos-gate@def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e
https://github.com/illumos/illumos-gate/commit/def4fac5882b4ca67bd0f4a53509b6d1fa8ae14e

https://www.illumos.org/issues/8025
  dbuf_read() creates a zio_root() to track and wait for all the zio's
  that may happen as part of this call. However, if the blkptr_t for
  this buffer is NULL or a hole, we will not create any more zio's, so
  this zio_root() is unnecessary. This is always the case when calling
  dbuf_read() on a bonus buffer, because it has no blkptr (it's part of
  the containing dnode). For workloads that read a lot of bonus buffers
  (e.g. file creation and removal), creating and destroying these
  unnecessary zio's can decrease performance by around 3%.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
11:25:44 - r318926
(1 day 17 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris
MFV r316919: 7885 zpool list can report 16.0e for expandsz

FreeBSD note: this is a record-only change, the actual change was
directly committed by smh.

illumos/illumos-gate@c040c10cdd1e4eab0fc88203758367dd81e057b7
https://github.com/illumos/illumos-gate/commit/c040c10cdd1e4eab0fc88203758367dd81e057b7

https://www.illumos.org/issues/7885
  When a member of a RAIDZ has been replaced with a device smaller than the
  original, then the top level vdev can report its expand size as 16.0E.
  The reduced child asize causes the RAIDZ to have a vdev_asize lower than its
  vdev_max_asize which then results in an underflow during the calculation of
the
  parents expand size.
  Also for RAIDZ vdevs the sum of their child vdev_min_asize could be smaller
  than the parents vdev_min_size.
  Fixed by: https://github.com/openzfs/openzfs/pull/296

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>
11:23:16 - r318925
(1 day 17 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
MFV r316929: 6914 kernel virtual memory fragmentation leads to hang

illumos/illumos-gate@af868f46a5b794687741d5424de9e3a2d684a84a
https://github.com/illumos/illumos-gate/commit/af868f46a5b794687741d5424de9e3a2d684a84a

https://www.illumos.org/issues/6914

FreeBSD note: only a ZFS part of the change is merged, changes to the VM
subsystem are not ported (obviously). Also, now that FreeBSD has
vmem(9) we don't have to ifdef-out the code that uses it.

MFC after: 2 weeks
11:05:56 - r318924
(1 day 17 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
arc_init: make code closer to upstream by introducing 'allmem' variable

All the differences in calculations are kept.
A comment about arc_max being 1/2 of all memory is fixed to reflect the
actual code that uses 5/8 as a factor.

MFC after: 1 week
10:37:55 - r318923
(1 day 18 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
zfs_putpages: assert that sa_bulk_update() must succeed

Same as the upstream does in r316927.

MFC after: 1 week
10:34:33 - r318922
(1 day 18 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris
MFV r316927: 5379 modifying a mmap()-ed file does not update its timestamps

FreeBSD note: this is a record-only merge as the FreeBSD putpages code
is quite different from the upstream.

illumos/illumos-gate@80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6
https://github.com/illumos/illumos-gate/commit/80e10fd0d22bbf0d18bfdae035e06f44c68ae8e6

https://www.illumos.org/issues/5379
  The following is based on a review of the illumos code and on a similar
problem
  reported for FreeBSD where the relevant code is different.
  Looking at this block of code http://src.illumos.org/source/xref/illumos-gate/
  usr/src/uts/common/fs/zfs/zfs_vnops.c#4187 I see code to set up an
  sa_bulk_attr_t object, I see code to set up mtime and ctime values, but I do
  not see code to actually apply the attributes...
  I would expect there to be a call to sa_bulk_update(), there is such a call in
  zfs_write() for instance.
  mmap_write.c [Magnifier] - demo (1.42 KB) Andriy Gapon, 2015-11-11 01:53 PM

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>
10:31:05 - r318921
(1 day 18 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
MFV r316928: 7256 low probability race in zfs_get_data

illumos/illumos-gate@0c94e1af6784c69a1dea25e0e35dd13b2b91e2e5
https://github.com/illumos/illumos-gate/commit/0c94e1af6784c69a1dea25e0e35dd13b2b91e2e5

https://www.illumos.org/issues/7256
  error = dmu_sync(zio, lr->lr_common.lrc_txg,
  zfs_get_done, zgd);
  ASSERT(error || lr->lr_length <= zp->z_blksz);
  It's possible, although extremely rare, that the zfs_get_done() callback is
  executed before dmu_sync() returns.
  In that case the znode's range lock is dropped and the znode is unreferenced.
  Thus, the assertion can access some invalid or wrong data via the zp pointer.
  size variable caches the correct value of z_blksz and can be safely used here.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>

MFC after: 1 week
10:27:35 - r318920
(1 day 18 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c
MFC r316924: 8061 sa_find_idx_tab can be declared more type-safely

illumos/illumos-gate@7f0bdb4257bb4f1f76390b72665961e411da24c6
https://github.com/illumos/illumos-gate/commit/7f0bdb4257bb4f1f76390b72665961e411da24c6

https://www.illumos.org/issues/8061
  sa_find_idx_tab() is declared as taking and returning "void *" parameters.
  These can be declared to be the specific types.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

MFC after: 1 week
08:59:16 - r318919
(1 day 19 hours ago)
by royger
Affects: 
(2 files)
/stable/11/sys/dev/xen/netfront/netfront.c
MFC r318523, r318631:

xen/netfront: don't drop the ring RX lock with inconsistent ring state
xen/netfront: don't drop the RX lock in xn_rxeof
08:57:00 - r318918
(1 day 19 hours ago)
by royger
Affects: 
(2 files)
/stable/11/sys/dev/xen/blkfront/blkfront.c
MFC r318520:

xen/blkfront: correctly detach a disk with active users
06:09:11 - r318917
(1 day 22 hours ago)
by delphij
Affects:  /head/kerberos5/lib/libroken/Makefile
Disconnect heimdal version of qsort.c from build because we are already
using libc's version of qsort.

PR: bin/213922
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D10814
03:35:59 - r318916
(2 days 1 hour ago)
by emaste
Affects:  /head/usr.bin/grep/regex/tre-fastmatch.c
bsdgrep: use safer sizeof() construct

Submitted by: Kyle Evans <kevans91@ksu.edu>
03:27:06 - r318915
(2 days 1 hour ago)
by araujo
Affects:  /head/usr.sbin/ypldap/aldap.c
Simplify parseval() by allocating a buffer the size of the input string,
which will always be big enough to hold the output string.

Obtained from: OpenBSD (revision 1.36)
02:30:26 - r318914
(2 days 2 hours ago)
by emaste
Affects:  /head/usr.bin/grep/grep.c
/head/usr.bin/grep/grep.h
/head/usr.bin/grep/util.c
bsdgrep: correct assumptions to prepare for chunking

Correct a couple of minor BSD grep assumptions that are valid for line
processing but not future chunk-based processing.

Submitted by: Kyle Evans <kevans91@ksu.edu>
Reviewed by: bapt, cem
Differential Revision: https://reviews.freebsd.org/D10824
01:14:58 - r318913
(2 days 3 hours ago)
by pfg
Affects:  /head/lib/libc/gen/fts-compat.c
/head/lib/libc/gen/fts-compat11.c
/head/lib/libc/gen/fts.c
fts_open: move bogus initialization further below, before it is used.

Move an unneeded initialization, introduced in r54770 to quiet down GCC,
to a place nearer to its first use. This has no practical effect, it just
keeps the garbage better sorted.

Hinted by: OpenBSD (CVS rev. 1.56, without obfuscations)
00:51:05 - r318912
(2 days 3 hours ago)
by emaste
Affects:  /head/Makefile.inc1
libc: rm stale generated files which are no longer syscalls

This is an attempt to help -DNO_CLEAN builds after r302092 (which
removed the pipe libc syscall wrapper) and r318736 (which removed
getdents, lstat, mknod, and stat).

Dependencies cannot cope with certain source tree changes,
particularly with respect to removing source files and replacing
generated files. Handle these cases from _worldtmp in an ad-hoc
fashion.

Reviewed by: bdrewery, cem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10876
00:48:21 - r318911
(2 days 3 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_rx.c
[ath] fix short-GI wireshark flag.

Yes, HAL_RX_GI means "short guard interval."
00:26:08 - r318910
(2 days 4 hours ago)
by mav
Affects: 
(2 files)
/stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
MFC r318516: Fix time handling in cv_timedwait_hires().

pthread_cond_timedwait() receives absolute time, not relative. Passing
wrong time there caused two threads of zdb to spin in a tight loop.
00:25:08 - r318909
(2 days 4 hours ago)
by mav
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
MFC r318516: Fix time handling in cv_timedwait_hires().

pthread_cond_timedwait() receives absolute time, not relative. Passing
wrong time there caused two threads of zdb to spin in a tight loop.
00:19:50 - r318908
(2 days 4 hours ago)
by emaste
Affects:  /head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
bsdgrep: add --mmap tests

Basic sanity tests as well as coverage for the bug fixed in r318565.

Submitted by: Kyle Evans <kevans91@ksu.edu>
Reviewed by: bapt, ngie
Differential Revision: https://reviews.freebsd.org/D10827
2017 - 05 - 25   (3 days ago)
23:19:09 - r318907
(2 days 5 hours ago)
by mav
Affects:  /head/sys/net/if_lagg.c
/head/sys/net/if_lagg.h
Remove some code, dead from the day one.
23:14:51 - r318906
(2 days 5 hours ago)
by dim
Affects:  /head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
Pull in r303257 from upstream llvm trunk (by Krzysztof Parzyszek)

  [PPC] Properly update register save area offsets

  The variables MinGPR/MinG8R were not updated properly when resetting the
  offsets, which in the included testcase lead to saving the CR register
  in the same location as R30.

  This fixes another issue reported in PR26519.

  Differential Revision: https://reviews.llvm.org/D33017

Reported by: Mark Millard
PR: 206990
MFC after: 3 days
22:41:34 - r318905
(2 days 6 hours ago)
by truckman
Affects: 
(3 files)
/stable/10/sys/netpfil/ipfw/dn_aqm_pie.c
/stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c
MFC r318527

Fix the queue delay estimation in PIE/FQ-PIE when the timestamp
(TS) method is used. When packet timestamp is used, the "current_qdelay"
keeps storing the last queue delay value calculated in the dequeue
function. Therefore, when a burst of packets arrives followed by
a pause, the "current_qdelay" will store a high value caused by the
burst and stick to that value during the pause because the queue
delay measurement is done inside the dequeue function. This causes
the drop probability calculation function to calculate high drop
probability value instead of zero and prevents the burst allowance
mechanism from working properly. Fix this problem by resetting
"current_qdelay" inside the drop probability calculation function
when the queue length is zero and TS option is used.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
22:39:48 - r318904
(2 days 6 hours ago)
by truckman
Affects: 
(3 files)
/stable/11/sys/netpfil/ipfw/dn_aqm_pie.c
/stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c
MFC r318527

Fix the queue delay estimation in PIE/FQ-PIE when the timestamp
(TS) method is used. When packet timestamp is used, the "current_qdelay"
keeps storing the last queue delay value calculated in the dequeue
function. Therefore, when a burst of packets arrives followed by
a pause, the "current_qdelay" will store a high value caused by the
burst and stick to that value during the pause because the queue
delay measurement is done inside the dequeue function. This causes
the drop probability calculation function to calculate high drop
probability value instead of zero and prevents the burst allowance
mechanism from working properly. Fix this problem by resetting
"current_qdelay" inside the drop probability calculation function
when the queue length is zero and TS option is used.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
21:59:19 - r318903
(2 days 6 hours ago)
by phk
Affects:  /head/tools/tools/sysbuild/sysbuild.sh
Try to keep up with the ports system Makefiles.
21:41:06 - r318902
(2 days 7 hours ago)
by emaste
Affects: 
(6 files)
/head/usr.sbin/makefs/ffs.c
/head/usr.sbin/makefs/ffs/*
makefs: make buf generic

it has nothing to do with ffs and will eventually be moved.
gc sectorsize.

This is a corrected version of r317744.

NetBSD versions:
ffs.c 1.58
ffs/buf.c 1.14 1.18
ffs/buf.h 1.8

Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10803
21:16:39 - r318901
(2 days 7 hours ago)
by bapt
Affects:  /head/ObsoleteFiles.inc
/head/share/misc/Makefile
/head/share/misc/man.template
Remove the old man.template

In FreeBSD we only use mdoc(7) format. A template is available as mdoc.template
The usage of man(7) format is discouraged and this file was driving people into
the front direction as a template to use.
21:11:25 - r318900
(2 days 7 hours ago)
by bapt
Affects:  /head/share/misc/pci_vendors
update to 2017.05.25

MFC after: 2 days
20:52:16 - r318899
(2 days 7 hours ago)
by jkim
Affects: 
(503 files)
/head/crypto/openssl/*
/head/secure/lib/*
/head/secure/usr.bin/openssl/*
Merge OpenSSL 1.0.2l.
19:39:16 - r318898
(2 days 9 hours ago)
by jkim
Affects:  /vendor-crypto/openssl/1.0.2l
Tag OpenSSL 1.0.2l.
19:38:38 - r318897
(2 days 9 hours ago)
by jkim
Affects: 
(129 files)
/vendor-crypto/openssl/dist/*
 Import OpenSSL 1.0.2l.
19:20:06 - r318896
(2 days 9 hours ago)
by slm
Affects: 
(7 files)
/head/share/man/man4/mpr.4
/head/sys/dev/mpr/*
Fix several problems with mapping code.

Reviewed by: ken, scottl, asomers, ambrisko, mav
Approved by: ken, mav
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10861
19:14:44 - r318895
(2 days 9 hours ago)
by slm
Affects: 
(7 files)
/head/share/man/man4/mps.4
/head/sys/dev/mps/*
Fix several problems with mapping code.

Reviewed by: ken, scottl, asomers, ambrisko, mav
Approved by: ken, mav
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10878
19:02:54 - r318894
(2 days 9 hours ago)
by cperciva
Affects:  /head/release/Makefile.ec2
/head/release/tools/ec2.conf
Turn on support for the Amazon "Elastic Network Adapter" in EC2 AMIs.

X-MFC-after: 318647 + fixes for some lock ordering warnings
18:55:10 - r318893
(2 days 9 hours ago)
by stevek
Affects: 
(2 files)
/stable/11/lib/libc/sys/open.2
MFC r318314

Add information to open(2) man page about the O_VERIFY flag.

PR: 219262
Reviewed by: bjk wblock
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
18:46:13 - r318892
(2 days 10 hours ago)
by bapt
Affects:  /head/usr.bin/diff3/diff3.1
Update the diff3 manpage to reflect the fact the version in freebsd does
not use temporary files nor uses a /usr/libexec/diff3prog
18:16:17 - r318891
(2 days 10 hours ago)
by dteske
Affects:  /head/usr.sbin/bsdconfig/console/keymap
/head/usr.sbin/bsdconfig/share/keymap.subr
Fix long standing issue in bsdconfig's keymap selection

Since the translation to vt as terminal emulator, the keymaps files
path has changed and this change does not get followed in bsdconfig.
This implicates boot time warnings about a wrong keymap file, what
is very confusing for the new users and for me too, so initialize
the default keymaps search path depending on terminal type.

Differential Revision: https://reviews.freebsd.org/D8734
Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Reviewed by: ed, jilles, dteske
MFC after: 3 days
X-MFC-to: stable/11
Sponsored by: HardenedBSD
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
17:58:01 - r318890
(2 days 10 hours ago)
by bapt
Affects:  /head/usr.bin/diff3/tests/diff3_test.sh
For now comment tests for arguments which are not in par with GNU diff3 yet
17:55:40 - r318889
(2 days 10 hours ago)
by bapt
Affects:  /head/usr.bin/diff3/diff3.c
Remove the MAX_CHECK macro, it was initially used to test if a file was a
text file or not.

The check is not done by diff3 but by diff (the argument -a is directly passed
to diff(1))
17:45:50 - r318888
(2 days 11 hours ago)
by bapt
Affects: 
(19 files)
/head/usr.bin/diff3/*
Import working progress BSD diff3

import bsd diff3 from OpenBSD.
Differences with OpenBSD:
- lots of warning fixed
- no shell wrapper with diff3 actually living in libexec
- capsicumized

Keep it disconnected as it is not yet good enough to replace GNU diff

The motivation to import it now it to allow other people to jump in and also to
have an open development on it

Obtained from: OpenBSD
17:38:19 - r318887
(2 days 11 hours ago)
by bapt
Affects:  /projects/doctools
Abandon the doctools project

The new plan is to totally remove the roff toolchain from base as there are too
many corner cases to switch the roff toolchain
17:23:26 - r318886
(2 days 11 hours ago)
by truckman
Affects: 
(3 files)
/stable/10/sys/netpfil/ipfw/dn_aqm_pie.c
/stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c
MFC r318511

The result of right shifting a negative signed value is implementation
defined. On machines without arithmetic shift instructions, zero bits
may be shifted in from the left, giving a large positive result instead
of the desired divide-by power-of-2. Fix this by operating on the
absolute value and compensating for the possible negation later.

Reverse the order of the underflow/overflow tests and the exponential
decay calculation to avoid the possibility of an erroneous overflow
detection if p is a sufficiently small non-negative value. Also
check for negative values of prob before doing the exponential decay
to avoid another instance of of right shifting a negative value.

Tested by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
17:22:13 - r318885
(2 days 11 hours ago)
by truckman
Affects: 
(3 files)
/stable/11/sys/netpfil/ipfw/dn_aqm_pie.c
/stable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c
MFC r318511

The result of right shifting a negative signed value is implementation
defined. On machines without arithmetic shift instructions, zero bits
may be shifted in from the left, giving a large positive result instead
of the desired divide-by power-of-2. Fix this by operating on the
absolute value and compensating for the possible negation later.

Reverse the order of the underflow/overflow tests and the exponential
decay calculation to avoid the possibility of an erroneous overflow
detection if p is a sufficiently small non-negative value. Also
check for negative values of prob before doing the exponential decay
to avoid another instance of of right shifting a negative value.

Tested by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
16:41:07 - r318884
(2 days 12 hours ago)
by emaste
Affects:  /head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
lldb: map TRAP_CAP to a trace trap

In the absense of a more specific handler for TRAP_CAP (generated by
ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace
trap.

Example usage (testing the bug in PR219173):

% proccontrol -m trapcap lldb usr.bin/hexdump/obj/hexdump -- -Cv -s 1 /bin/ls
...
(lldb) run
Process 12980 launching
Process 12980 launched: '.../usr.bin/hexdump/obj/hexdump' (x86_64)
Process 12980 stopped
* thread #1, stop reason = trace
  frame #0: 0x0000004b80c65f1a libc.so.7`__sys_lseek + 10
...

In the future we should have LLDB control the trapcap procctl itself
(as it does with ASLR), as well as report a specific stop reason.
This change eliminates an assertion failure from LLDB for now.
16:31:53 - r318883
(2 days 12 hours ago)
by bapt
Affects:  /head/Makefile.inc1
Now that roff documentation has been disconnected from the build, it is no
longer necessary to have groff(1) as a bootstrap tool
16:15:19 - r318882
(2 days 12 hours ago)
by dim
Affects: 
(4 files)
/stable/11/contrib/llvm/include/llvm/MC/ConstantPools.h
/stable/11/contrib/llvm/lib/MC/ConstantPools.cpp
/stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
MFC r318655:

Pull in r302416 from upstream llvm trunk (by Martin Storsjö):

  [ARM] Clear the constant pool cache on explicit .ltorg directives

  Multiple ldr pseudoinstructions with the same constant value will
  reuse the same constant pool entry. However, if the constant pool is
  explicitly flushed with a .ltorg directive, we should not try to
  reference constants in the previous pool any longer, since they may
  be out of range.

  This fixes assembling hand-written assembler source which repeatedly
  loads the same constant value, across a binary size larger than the
  pc-relative fixup range for ldr instructions (4096 bytes). Such
  assembler source already uses explicit .ltorg instructions to emit
  constant pools with regular intervals. However if we try to reuse
  constants emitted in earlier pools, they end up out of range.

  This makes the output of the testcase match what binutils gas does
  (prior to this patch, it would fail to assemble).

  Differential Revision: https://reviews.llvm.org/D32847

This should fix "out of range pc-relative fixup value" errors, when
compiling certain ARM inline assembly for www/webkit-gtk[23].

Reported by: mmel
14:54:22 - r318881
(2 days 13 hours ago)
by bapt
Affects:  /head/ObsoleteFiles.inc
/head/share/doc/Makefile
/head/tools/build/mk/OptionalObsoleteFiles.inc
In preparation for the removal of the roff toolchain, disconnect the
roff documentation from the build.

Those documents will be added to the doc tree and distributed as PDF from
the documentation website. As they are valuable has history, but do not match
current FreeBSD

Further more, the ascii format we were using to distribute them is not really
accurate for such documents.

more details:
https://lists.freebsd.org/pipermail/freebsd-arch/2017-May/018211.html
14:34:21 - r318880
(2 days 14 hours ago)
by zbb
Affects:  /head/sys/arm/mv/mv_pci.c
Unmask legacy interrupts on Marvell PCIE controller

This patch fixes a bug introduced with commit:
r294510 "Remove an extra '!' found by clang 3.8."

'!' was removed without inverting the logic, which
broke PCIe legacy interrupts operation for Marvell
controllers.

Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Netgate
14:27:54 - r318879
(2 days 14 hours ago)
by tuexen
Affects: 
(5 files)
/head/lib/libsysdecode/*
/head/usr.bin/truss/syscalls.c
Improve the decoding of the third argument of the socket() call.

Decoding of the third argument depends on the first one. For doing this,
add a corresponding function to libsysdecode.

Thanks to jhb@ for suggesting this.
14:25:05 - r318878
(2 days 14 hours ago)
by zbb
Affects:  /head/sys/arm/mv/mv_common.c
Add workaround for CESA MBUS windows with 4GB DRAM

Armada 38x SoC's equipped with 4GB DRAM suffer freeze
during CESA operation, if MBUS window opened at given
DRAM CS reaches end of the address space. Apply a workaround
by setting the window size to the closest possible
value, i.e. divide it by 2 (it has to be power-of-2).

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10724
14:23:49 - r318877
(2 days 14 hours ago)
by zbb
Affects:  /head/sys/arm/mv/mv_common.c
Fix PM recognition on recent Marvell boards

PM status is only supported on Kirkwood and Disvovery.
Cleanup the code to properly report its state on
other platforms.

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10718
14:22:00 - r318876
(2 days 14 hours ago)
by zbb
Affects:  /head/sys/arm/mv/armada/wdt.c
/head/sys/arm/mv/armada38x/files.armada38x
/head/sys/arm/mv/files.mv
Introduce separate watchdog driver for Armada to fix phony DELAY

DELAY is a problematic routine called all over the kernel.
Armada38x using CA-9 CPUs are using mpcore timer to count events
and measure time but DELAY in the mpcore timer code is a weak
function reference and therefore will be replaced by the platform
implementation if the one is introduced. Since Armada38x uses
on-chip watchdog to which the driver is merged with the on-chip timer
driver there will be a platform DELAY implementation.
The latter however will not use any HW timers as it will not attempt
to configure any. Phony busy loop will be used instead.

To fix that we introduce a separate watchdog driver for Armada platforms,
(currently only A38X) and stop using Marvell timer driver. That
switches DELAY to the desired implementation.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10710
14:19:20 - r318875
(2 days 14 hours ago)
by zbb
Affects:  /head/sys/arm/mv/armada38x/armada38x.c
/head/sys/arm/mv/mvreg.h
Enable SCU Speculative linefills to L2 on Armada 38x

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10709
14:16:43 - r318874
(2 days 14 hours ago)
by zbb
Affects:  /head/sys/arm/mv/mv_common.c
Fix memory corruption while configuring CPU windows on Marvell SoCs

Resolving CPU windows from localbus entry caused buffer overflow
and memory corruption. Fix wrong indexing and ensure the index
does not exceed table size.

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10720
12:57:15 - r318873
(2 days 15 hours ago)
by bapt
Affects:  /head/share/doc/papers/timecounter/timecounter.ms
Fix rendering with modern groff

Reported by: tj
12:53:49 - r318872
(2 days 15 hours ago)
by gjb
Affects:  /head/release/tools/vmimage.subr
Enable DHCP and IPv6 autoconfig on non-cloud VM images.

PR: 203653
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
12:04:23 - r318871
(2 days 16 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Further expand the r318785 entry, noting vfs.zfs.debugflags can be
set in loader.conf(5), whereas vfs.zfs.debug_flags could not.

Submitted by: avg
Sponsored by: The FreeBSD Foundation
11:05:19 - r318870
(2 days 17 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r312790, EC2 IPv6 by default.

Sponsored by: The FreeBSD Foundation
11:05:19 - r318869
(2 days 17 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r318660, Amazon EFS support in the NFS client.

Sponsored by: The FreeBSD Foundation
10:56:33 - r318868
(2 days 17 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r318660, various NFS client fixes.

Sponsored by: The FreeBSD Foundation
10:49:56 - r318867
(2 days 17 hours ago)
by avg
Affects:  /head/sys/dev/vmware/vmxnet3/if_vmx.c
fix vmxnet3 crash when LRO is enabled

The crash can occur when all of the following conditions are true:
- a packet consists of multiple segements (requires LRO enabled)
- there has been a failure to allocate an mbuf for the packet and
  the packet has to be dropped
- a host (vmware) still owned at least one segment of the packet,
  so the driver had to wait for another interrupt to proceed to
  discarding the remaning segment(s)

Reviewed by: rstone
MFC after: 2 weeks
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D10874
10:47:18 - r318866
(2 days 18 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r318785, vfs.zfs.debug_flags -> vfs.zfs.debugflags rename.

Sponsored by: The FreeBSD Foundation
09:34:29 - r318865
(2 days 19 hours ago)
by jlh
Affects: 
(2 files)
/stable/10/UPDATING
MFC r318863:
  Replace stale handbook URL with the proper oneb.
09:27:33 - r318864
(2 days 19 hours ago)
by jlh
Affects: 
(2 files)
/stable/11/UPDATING
MFC r318863:
  Replace stale handbook URL with the proper one.
09:21:21 - r318863
(2 days 19 hours ago)
by jlh
Affects:  /head/UPDATING
Replace stale handbook URL with the proper on.

MFC after: 0 days
08:53:55 - r318862
(2 days 19 hours ago)
by pho
Affects:  /user/pho/stress2/misc/bio.sh
Improve error handling and return error status.

Sponsored by: Dell EMC Isilon
08:34:24 - r318861
(2 days 20 hours ago)
by trasz
Affects:  /head/etc/mtree/BSD.root.dist
Create /net by default, for autofs.

MFC after: 2 weeks
05:23:47 - r318860
(2 days 23 hours ago)
by hselasky
Affects:  /head/sys/dev/sound/pcm/buffer.c
/head/sys/tools/sound/snd_fxdiv_gen.awk
Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of
binary data from sound.ko and the kernel.

MFC after: 3 days
05:02:43 - r318859
(2 days 23 hours ago)
by adrian
Affects:  /head/lib/Makefile
[lib] disable libc++experimental on mips platforms for now.

This breaks at least mips32 platform builds.

Reviewed by: dim
05:01:44 - r318858
(2 days 23 hours ago)
by adrian
Affects:  /head/UPDATING
Bump UPDATING to cover the ath shuffle.
04:26:26 - r318857
(3 days ago)
by adrian
Affects: 
(4 files)
/head/sys/dev/ath/ath_hal/*
/head/sys/dev/ath/if_ath_rx.c
[ath] [ath_hal] retire AH_SUPPORT_AR5416 changing anything.

Yes, the memory bloat is large, but it's 2017 and I'll fix it later
by making it runtime configurable / per-chip configurable if I ever need to.
04:18:46 - r318856
(3 days ago)
by adrian
Affects: 
(36 files)
/head/sys/dev/ath/*
/head/sys/modules/*
[ath] [ath_hal] (etc, etc) - begin the task of re-modularising the HAL.

In the deep past, when this code compiled as a binary module, ath_hal
built as a module. This allowed custom, smaller HAL modules to be built.
This was especially beneficial for small embedded platforms where you
didn't require /everything/ just to run.

However, sometime around the HAL opening fanfare, the HAL landed here
as one big driver+HAL thing, and a lot of the (dirty) infrastructure
(ie, #ifdef AH_SUPPORT_XXX) to build specific subsets of the HAL went away.
This was retained in sys/conf/files as "ath_hal_XXX" but it wasn't
really floated up to the modules themselves.

I'm now in a position where for the reaaaaaly embedded boards (both the
really old and the last couple generation of QCA MIPS boards) having a
cut down HAL module and driver loaded at runtime is /actually/ beneficial.

This reduces the kernel size down by quite a bit. The MIPS modules look
like this:

adrian@gertrude:~/work/freebsd/head-embedded/src % ls -l
../root/mips_ap/boot/kernel.CARAMBOLA2/ath*ko
-r-xr-xr-x 1 adrian adrian 5076 May 23 23:45
../root/mips_ap/boot/kernel.CARAMBOLA2/ath_dfs.ko
-r-xr-xr-x 1 adrian adrian 100588 May 23 23:45
../root/mips_ap/boot/kernel.CARAMBOLA2/ath_hal.ko
-r-xr-xr-x 1 adrian adrian 627324 May 23 23:45
../root/mips_ap/boot/kernel.CARAMBOLA2/ath_hal_ar9300.ko
-r-xr-xr-x 1 adrian adrian 314588 May 23 23:45
../root/mips_ap/boot/kernel.CARAMBOLA2/ath_main.ko
-r-xr-xr-x 1 adrian adrian 23472 May 23 23:45
../root/mips_ap/boot/kernel.CARAMBOLA2/ath_rate.ko

And the x86 versions, like this:

root@gertrude:/home/adrian # ls -l /boot/kernel/ath*ko
-r-xr-xr-x 1 root wheel 36632 May 24 18:32 /boot/kernel/ath_dfs.ko
-r-xr-xr-x 1 root wheel 134440 May 24 18:32 /boot/kernel/ath_hal.ko
-r-xr-xr-x 1 root wheel 82320 May 24 18:32 /boot/kernel/ath_hal_ar5210.ko
-r-xr-xr-x 1 root wheel 104976 May 24 18:32 /boot/kernel/ath_hal_ar5211.ko
-r-xr-xr-x 1 root wheel 236144 May 24 18:32 /boot/kernel/ath_hal_ar5212.ko
-r-xr-xr-x 1 root wheel 336104 May 24 18:32 /boot/kernel/ath_hal_ar5416.ko
-r-xr-xr-x 1 root wheel 598336 May 24 18:32 /boot/kernel/ath_hal_ar9300.ko
-r-xr-xr-x 1 root wheel 406144 May 24 18:32 /boot/kernel/ath_main.ko
-r-xr-xr-x 1 root wheel 55352 May 24 18:32 /boot/kernel/ath_rate.ko

.. so you can see, not building the whole HAL can save quite a bit.
For example, if you don't need AR9300 support, you can actually avoid
wasting half a megabyte of RAM. On embedded routers this is quite a
big deal.

The AR9300 HAL can be later further shrunk because, hilariously,
it indeed supports AH_SUPPORT_<xxx> for optionally adding chipset support.
(I'll chase that down later as it's quite a big savings if you're only
building for a single embedded target.)

So:

* Create a very hackish way to load/unload HAL modules
* Create module metadata for each HAL subtype - ah_osdep_arXXXX.c
* Create module metadata for ath_rate and ath_dfs (bluetooth is
  currently just built as part of it)
* .. yes, this means we could actually build multiple rate control
  modules and pick one at load time, but I'd rather just glue this
  into net80211's rate control code. Oh well, baby steps.
* Main driver is now "ath_main"
* Create an "if_ath" module that does what the ye olde one did -
  load PCI glue, main driver, HAL and all child modules.
  In this way, if you have "if_ath_load=YES" in /boot/modules.conf
  it will load everything the old way and stuff should still work.
* For module autoloading purposes, I actually /did/ fix up
  the name of the modules in if_ath_pci and if_ath_ahb.

If you want to selectively load things (eg on ye cheape ARM/MIPS platforms
where RAM is at a premium) you should:

* load ath_hal
* load the chip modules in question
* load ath_rate, ath_dfs
* load ath_main
* load if_ath_pci and/or if_ath_ahb depending upon your particular
  bus bind type - this is where probe/attach is done.

TODO:

* AR5312 module and associated pieces - yes, we have the SoC side support
  now so the wifi support would be good to "round things out";
* Just nuke AH_SUPPORT_AR5416 for now and always bloat the packet
  structures; this'll simplify other things.
* Should add a simple refcnt thing to the HAL RF/chip modules so you
  can't unload them whilst you're using them.
* Manpage updates, UPDATING if appropriate, etc.
02:00:37 - r318855
(3 days 2 hours ago)
by np
Affects: 
(4 files)
/stable/10/sys/dev/cxgbe/adapter.h
/stable/10/sys/dev/cxgbe/t4_main.c
/stable/10/sys/dev/cxgbe/t4_sge.c
MFC r318014, r318091, r318125, and r318263.

r318014:
cxgbe(4): Fixes related to the knob that controls link autonegotiation.

- Do not leak the adapter lock in sysctl_autoneg.
- Accept only 0 or 1 as valid settings for autonegotiation.
- A fixed speed must be requested by the driver when autonegotiation is
  disabled otherwise the firmware will reject the l1cfg command. Use
  the top speed supported by the port for now.

r318091:
cxgbe(4): Do not assume that if_qflush is always followed by inteface-down.

r318125:
Adjust whitespace and fix a comment. No functional change.

r318263:
cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq
or ofld_rxq and should be ignored by vi_intr_iq.

Sponsored by: Chelsio Communications
01:59:58 - r318854
(3 days 2 hours ago)
by np
Affects: 
(4 files)
/stable/11/sys/dev/cxgbe/adapter.h
/stable/11/sys/dev/cxgbe/t4_main.c
/stable/11/sys/dev/cxgbe/t4_sge.c
MFC r318014, r318091, r318125, and r318263.

r318014:
cxgbe(4): Fixes related to the knob that controls link autonegotiation.

- Do not leak the adapter lock in sysctl_autoneg.
- Accept only 0 or 1 as valid settings for autonegotiation.
- A fixed speed must be requested by the driver when autonegotiation is
  disabled otherwise the firmware will reject the l1cfg command. Use
  the top speed supported by the port for now.

r318091:
cxgbe(4): Do not assume that if_qflush is always followed by inteface-down.

r318125:
Adjust whitespace and fix a comment. No functional change.

r318263:
cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq
or ofld_rxq and should be ignored by vi_intr_iq.

Sponsored by: Chelsio Communications
01:45:43 - r318853
(3 days 3 hours ago)
by gjb
Affects: 
(6 files)
/stable/10/release/*
/stable/11/release/*
MFC r318646:
 Allow PORTSDIR to be overridden in the pkg-stage target.

PR: 218393
Sponsored by: The FreeBSD Foundation
01:43:39 - r318852
(3 days 3 hours ago)
by gjb
Affects: 
(2 files)
/stable/11/usr.sbin/efivar/efivar.8
MFC r318599, r318643:
 r318599 (bjk):
  Updates for efivar.8

  Fix spelling, appease igor and mandoc -Tlint, and adopt the
  language style to be more consistent with our corpus.

 r318643:
  Correct the "first appeared in" version for efivar(8).

Sponsored by: The FreeBSD Foundation
01:43:28 - r318851
(3 days 3 hours ago)
by np
Affects: 
(10 files)
/stable/10/sys/conf/files
/stable/10/sys/dev/cxgbe/*
/stable/10/sys/modules/cxgbe/if_cxgbe/Makefile
MFC r317702, r317847, r318307

r317702:
cxgbe(4): Support routines for Tx traffic scheduling.

- Create a new file, t4_sched.c, and move all of the code related to
  traffic management from t4_main.c and t4_sge.c to this file.
- Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl)
  parameters in the PF driver.
- Initialize all the cl_rl limiters with somewhat arbitrary default
  rates and provide routines to update them on the fly.
- Provide routines to reserve and release traffic classes.

r317847:
cxgbe(4): The Tx scheduler initialization either works or doesn't. It
doesn't need a refresh in either case.

r318307:
cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx
queue from a traffic class fails.

Sponsored by: Chelsio Communications
01:40:40 - r318850
(3 days 3 hours ago)
by np
Affects: 
(10 files)
/stable/11/sys/conf/files
/stable/11/sys/dev/cxgbe/*
/stable/11/sys/modules/cxgbe/if_cxgbe/Makefile
MFC r317702, r317847, r318307

r317702:
cxgbe(4): Support routines for Tx traffic scheduling.

- Create a new file, t4_sched.c, and move all of the code related to
  traffic management from t4_main.c and t4_sge.c to this file.
- Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl)
  parameters in the PF driver.
- Initialize all the cl_rl limiters with somewhat arbitrary default
  rates and provide routines to update them on the fly.
- Provide routines to reserve and release traffic classes.

r317847:
cxgbe(4): The Tx scheduler initialization either works or doesn't. It
doesn't need a refresh in either case.

r318307:
cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx
queue from a traffic class fails.

Sponsored by: Chelsio Communications
01:31:12 - r318849
(3 days 3 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/release/Makefile.vm
/stable/11/release/Makefile.vm
MFC r308737, r308779:
 r308737:
  Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise
  mkimg(1) does not create the second partition after r307008.

 r308779:
  Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the
  vm-image target, missed in r308737.

Sponsored by: The FreeBSD Foundation
01:17:07 - r318848
(3 days 3 hours ago)
by markj
Affects: 
(2 files)
/stable/11/sys/dev/drm2/ttm/ttm_page_alloc.c
MFC r318479:
Don't bother enqueuing a page immediately before freeing it.
01:15:53 - r318847
(3 days 3 hours ago)
by markj
Affects: 
(3 files)
/stable/11/sys/dev/drm2/ttm/ttm_bo_vm.c
/stable/11/sys/kern/kern_fail.c
MFC r318476, r318478:
Fix up some kern_yield() usages.
01:14:34 - r318846
(3 days 3 hours ago)
by np
Affects: 
(2 files)
/stable/11/sys/netinet6/ip6_output.c
MFC r318124:

ip6_output runs with the inp lock held, just like ip_output.
01:09:45 - r318845
(3 days 3 hours ago)
by markj
Affects: 
(2 files)
/stable/11/sys/kern/kern_sig.c
MFC r318191:
Let ptracestop() suspend threads sleeping in an SBDRY section.
01:01:35 - r318844
(3 days 3 hours ago)
by np
Affects: 
(3 files)
/stable/10/sys/dev/cxgbe/t4_main.c
/stable/10/sys/dev/cxgbe/t4_vf.c
MFC r317820 and r317837.

r317820:
cxgbe(4): Update the list of PCIe devices claimed by the driver. At
this point any board with a T6 should just work.

r317837:
cxgbe(4): Update the VF device ids too. This should have been part
of r317820.

Sponsored by: Chelsio Communications
01:00:57 - r318843
(3 days 3 hours ago)
by np
Affects: 
(4 files)
/stable/11/sys/dev/cxgbe/t4_iov.c
/stable/11/sys/dev/cxgbe/t4_main.c
/stable/11/sys/dev/cxgbe/t4_vf.c
MFC r317820 and r317837.

r317820:
cxgbe(4): Update the list of PCIe devices claimed by the driver. At
this point any board with a T6 should just work.

r317837:
cxgbe(4): Update the VF device ids too. This should have been part
of r317820.

Sponsored by: Chelsio Communications
00:43:56 - r318842
(3 days 4 hours ago)
by np
Affects: 
(3 files)
/stable/11/sys/dev/cxgbe/adapter.h
/stable/11/sys/dev/cxgbe/t4_sge.c
MFC r317041:

cxgbe: Add tunables to control the number of LRO entries and the number
of rx mbufs that should be presorted before LRO. There is no change in
default behavior.

Sponsored by: Chelsio Communications
00:34:01 - r318841
(3 days 4 hours ago)
by emaste
Affects: 
(2 files)
/stable/11/contrib/elftoolchain/nm/nm.1
MFC r318603: nm: document 'r' symbol type

PR: 219245
Sponsored by: The FreeBSD Foundation
00:16:41 - r318840
(3 days 4 hours ago)
by np
Affects: 
(4 files)
/stable/10/sys/dev/cxgbe/common/common.h
/stable/10/sys/dev/cxgbe/common/t4_hw.c
/stable/10/sys/dev/cxgbe/t4_sge.c
MFC r316971:

cxgbe: Add a tunable to configure the SGE time scaler, which is
available starting with T6. The values in the timer holdoff registers
are multiplied by the scaling factor before use.

dev.<nexus>.<n>.holdoff_timers shows the final values of the
timers in microseconds.

Sponsored by: Chelsio Communications
00:16:01 - r318839
(3 days 4 hours ago)
by np
Affects: 
(4 files)
/stable/11/sys/dev/cxgbe/common/common.h
/stable/11/sys/dev/cxgbe/common/t4_hw.c
/stable/11/sys/dev/cxgbe/t4_sge.c
MFC r316971:

cxgbe: Add a tunable to configure the SGE time scaler, which is
available starting with T6. The values in the timer holdoff registers
are multiplied by the scaling factor before use.

dev.<nexus>.<n>.holdoff_timers shows the final values of the
timers in microseconds.

Sponsored by: Chelsio Communications
2017 - 05 - 24   (4 days ago)
23:08:45 - r318838
(3 days 5 hours ago)
by np
Affects: 
(2 files)
/stable/10/sys/dev/cxgbe/t4_main.c
MFC r316506:

cxgbe(4): Program the global RSS key once instead of once per ifnet.

Sponsored by: Chelsio Communications
23:08:17 - r318837
(3 days 5 hours ago)
by np
Affects: 
(2 files)
/stable/11/sys/dev/cxgbe/t4_main.c
MFC r316506:

cxgbe(4): Program the global RSS key once instead of once per ifnet.
22:48:17 - r318836
(3 days 5 hours ago)
by np
Affects: 
(2 files)
/stable/10/sys/dev/cxgbe/common/t4_hw.c
MFC r316172:

cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs.

Sponsored by: Chelsio Communications
22:47:45 - r318835
(3 days 6 hours ago)
by np
Affects: 
(2 files)
/stable/11/sys/dev/cxgbe/common/t4_hw.c
MFC r316172:

cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs.

Sponsored by: Chelsio Communications
22:40:56 - r318834
(3 days 6 hours ago)
by avg
Affects:  /head/sys/cddl/contrib/opensolaris
MFV r316930: 5814 bpobj_iterate_impl(): Close a refcount leak iterating on a
sublist.

illumos/illumos-gate@b67dde11a73a9455d641403cbbb65ec2add41b41
https://github.com/illumos/illumos-gate/commit/b67dde11a73a9455d641403cbbb65ec2add41b41

https://www.illumos.org/issues/5814
  Lets pull in this patch from freebsd:
  http://svnweb.freebsd.org/base?view=revision&revision=271781
  bpobj_iterate_impl(): Close a refcount leak iterating on a sublist.
  If bpobj_space() returned non-zero here, the sublist would have been
  left open, along with the bonus buffer hold it requires. This call
  does not invoke any calls to bpobj_close() itself.
  This bug doesn't have any known vector, but was found on inspection.
  MFC after: 1 week
  Sponsored by: Spectra Logic
  Affects: All ZFS versions starting 21 May 2010 (illumos cde58dbc)
  MFSpectraBSD: r1050998 on 2014/03/26
  Fix bpobj_iterate_impl() to properly call bpobj_close() if bpobj_space()
  returns an error.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Will Andrews <will@freebsd.org>

FreeBSD note: this is a "record-only" commit as the actual change was
directly committed to FreeBSD by (or on behalf of) the author.
22:34:54 - r318833
(3 days 6 hours ago)
by avg
Affects: 
(3 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
MFV r316925: 6101 attempt to lzc_create() a filesystem under a volume results
in a panic

illumos/illumos-gate@b127fe3c059af7adf772735498680b4f2e1405ef
https://github.com/illumos/illumos-gate/commit/b127fe3c059af7adf772735498680b4f2e1405ef

https://www.illumos.org/issues/6101
  lzc_create(), or more correctly, zfs_ioc_create() does not reject an attempt
to
  create a filesystem as a child of a volume, instead it proceeds to a crash.
  A crash stack obtained on FreeBSD:
  page fault while in kernel mode

  zap_leaf_lookup()
  fzap_lookup()
  zap_lookup_norm()
  zap_lookup()
  zfs_get_zplprop()
  zfs_fill_zplprops_impl()
  zfs_ioc_create()
  zfsdev_ioctl()
  devfs_ioctl_f()
  kern_ioctl()
  sys_ioctl()
  This crash happened with a kernel without debugging assertions.
  The immediate cause of crash appears to an attempt to interpret a zvol object
  as a zap object.
  For filesystems:
  #define MASTER_NODE_OBJ 1
  For zvols:
  #define ZVOL_OBJ 1ULL
  #define ZVOL_ZAP_OBJ 2ULL
  So, I see two problems here:
  1. an attempt to create a filesystem under a zvol should be rejected as
  early as possible, maybe in zfs_fill_zplprops()
  2. maybe zap_lookup / zap_lockdir should reject objects that are not of one
  of the zap object types

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>
MFC after: 2 weeks
22:32:56 - r318832
(3 days 6 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
MFV r316923: 8026 retire zfs_throttle_delay and zfs_throttle_resolution

illumos/illumos-gate@6b036259815954b7ad86d651af18efba672cb7a9
https://github.com/illumos/illumos-gate/commit/6b036259815954b7ad86d651af18efba672cb7a9

https://www.illumos.org/issues/8026
  zfs_throttle_delay and zfs_throttle_resolution became disused since the new
  write throttling mechanism was introduced.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Andriy Gapon <avg@FreeBSD.org>
MFC after: 1 week
22:30:21 - r318831
(3 days 6 hours ago)
by avg
Affects: 
(3 files)
/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
MFV r316922: 5380 receive of a send -p stream doesn't need to try renaming
snapshots

illumos/illumos-gate@471a88e499c660844f4590487ce7c4d5a7090294
https://github.com/illumos/illumos-gate/commit/471a88e499c660844f4590487ce7c4d5a7090294

https://www.illumos.org/issues/5380
  A stream created with zfs send -p -I contains properties of all snapshots of a
  given dataset as opposed to only properties of snapshots in a given range.
  Not only this is suboptimal but the receive code also does not filter
  properties by the range. So, properties of earlier snapshots would be updated
  even though the snapshots themselves are not in the stream (just their
  properties).
  Given that modifying the snapshot properties requires a TXG sync and that the
  snapshots are updated one by one the described behavior may lead to a sever
  performance penalty.

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>
MFC after: 3 weeks
22:27:48 - r318830
(3 days 6 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
MFC r316921: 8027 tighten up dsl_pool_dirty_delta

illumos/illumos-gate@313ae1e182df6e6a04b56c4b73ded33e11b75666
https://github.com/illumos/illumos-gate/commit/313ae1e182df6e6a04b56c4b73ded33e11b75666

https://www.illumos.org/issues/8027
  dsl_pool_dirty_delta() should not wake up waiters when dp->dp_dirty_total ==
  zfs_dirty_data_max, because they wait for dp_dirty_total to fall strictly
below
  the threshold.
  It's probably very rare for that condition to occur, but it's better to have
  more accurate code.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>
MFC after: 1 week
22:25:26 - r318829
(3 days 6 hours ago)
by avg
Affects: 
(6 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFV r316920: 8023 Panic destroying a metaslab deferred range tree

illumos/illumos-gate@3991b535a8e990c0369be677746a87c259b13e9f
https://github.com/illumos/illumos-gate/commit/3991b535a8e990c0369be677746a87c259b13e9f

https://www.illumos.org/issues/8023
  $C
  ffffff0011bc0970 vpanic()
  ffffff0011bc0a00 strlog()
  ffffff0011bc0a30 range_tree_destroy+0x72(ffffff043769ad00)
  ffffff0011bc0a70 metaslab_fini+0xd5(ffffff0449acf380)
  ffffff0011bc0ab0 vdev_metaslab_fini+0x56(ffffff0462bae800)
  ffffff0011bc0af0 spa_unload+0x9b(ffffff03e3dac000)
  ffffff0011bc0b70 spa_export_common+0x115(ffffff047f4b4000, 2, 0, 0, 0)
  ffffff0011bc0b90 spa_destroy+0x1d(ffffff047f4b4000)
  ffffff0011bc0bd0 zfs_ioc_pool_destroy+0x20(ffffff047f4b4000)
  ffffff0011bc0c80 zfsdev_ioctl+0x4d7(11400000000, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68)
  ffffff0011bc0cc0 cdev_ioctl+0x39(11400000000, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68)
  ffffff0011bc0d10 spec_ioctl+0x60(ffffff03d9153b00, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68, 0)
  ffffff0011bc0da0 fop_ioctl+0x55(ffffff03d9153b00, 5a01, 8040190, 100003,
  ffffff03e1956b10, ffffff0011bc0e68, 0)
  ffffff0011bc0ec0 ioctl+0x9b(3, 5a01, 8040190)
  ffffff0011bc0f10 _sys_sysenter_post_swapgs+0x149()

Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: George Wilson <george.wilson@delphix.com>
MFC after: 2 weeks
22:21:24 - r318828
(3 days 6 hours ago)
by avg
Affects: 
(16 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFV r316917: 7968 multi-threaded spa_sync()

illumos/illumos-gate@94c2d0eb22e9624151ee84a7edbf7178e1bf4087
https://github.com/illumos/illumos-gate/commit/94c2d0eb22e9624151ee84a7edbf7178e1bf4087

https://www.illumos.org/issues/7968
  spa_sync() iterates over all the dirty dnodes and processes each of them by
  calling dnode_sync(). If there are many dirty dnodes (e.g. because we created
  or removed a lot of files), the single thread of spa_sync() calling
  dnode_sync() can become a bottleneck. Additionally, if many dnodes are dirtied
  concurrently in open context (e.g. due to concurrent file creation), the
  os_lock will experience lock contention via dnode_setdirty().
  The solution is to track dirty dnodes on a multilist_t, and for spa_sync() to
  use separate threads to process each of the sublists in the multilist.
  On the concurrent file creation microbenchmark, the performance improvement
  from dnode_setdirty() is up to 7%. Additionally, the wall clock time spent in
  spa_sync() is reduced to 15%-40% of the single-threaded case. In terms of
cost/
  reward, once the other bottlenecks are addressed, fixing this bug will provide
  a medium-large performance gain and require a medium amount of effort to
  implement.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
MFC after: 3 weeks
22:15:16 - r318827
(3 days 6 hours ago)
by avg
Affects: 
(6 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFV r316916: 7970 zfs_arc_num_sublists_per_state should be common to all
multilists

illumos/illumos-gate@10fbdecb05f411234920f8d3c92c148d39106d7e
https://github.com/illumos/illumos-gate/commit/10fbdecb05f411234920f8d3c92c148d39106d7e

https://www.illumos.org/issues/7970
  The global tunable zfs_arc_num_sublists_per_state is used by the ARC and
  the dbuf cache, and other users are planned. We should change this
  tunable to be common to all multilists.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
MFC after: 3 weeks
21:54:04 - r318826
(3 days 6 hours ago)
by np
Affects: 
(3 files)
/stable/10/sys/dev/cxgbe/t4_main.c
/stable/10/sys/dev/cxgbe/t4_netmap.c
MFC r309725:

cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities
any more (since r307394). Do it in the driver instead.
21:53:47 - r318825
(3 days 6 hours ago)
by np
Affects: 
(3 files)
/stable/11/sys/dev/cxgbe/t4_main.c
/stable/11/sys/dev/cxgbe/t4_netmap.c
MFC r309725:

cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities
any more (since r307394). Do it in the driver instead.

Sponsored by: Chelsio Communications
21:52:20 - r318824
(3 days 6 hours ago)
by avg
Affects: 
(2 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
MFC r316915: 7801 add more by-dnode routines (lint)

illumos/illumos-gate@411be58a6e030a3b606f1afcc7f2e2459ffda844
https://github.com/illumos/illumos-gate/commit/411be58a6e030a3b606f1afcc7f2e2459ffda844
MFC after: 24 days
X-MFC with: r318823
21:49:21 - r318823
(3 days 6 hours ago)
by avg
Affects: 
(8 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r316914: 7801 add more by-dnode routines

illumos/illumos-gate@b0c42cd4706ba01ce158bd2bb1004f7e59eca5fe
https://github.com/illumos/illumos-gate/commit/b0c42cd4706ba01ce158bd2bb1004f7e59eca5fe

https://www.illumos.org/issues/7801
  Add *_by_dnode() routines for accessing objects given their
  dnode_t *, this is more efficient than accessing the object by
  (objset_t *, uint64_t object). This change converts some but
  not all of the existing consumers. As performance-sensitive
  code paths are discovered they should be converted to use
  these routines.
  Ported from:
https://github.com/zfsonlinux/zfs/commit/0eef1bde31d67091d3deed23fe2394f5a8bf2276

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: bzzz77 <bzzz.tomas@gmail.com>
MFC after: 24 days
21:45:52 - r318822
(3 days 7 hours ago)
by avg
Affects: 
(3 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
MFC r316913: 7869 panic in bpobj_space(): null pointer dereference

illumos/illumos-gate@a3905a45920de250d181b66ac0b6b71bd200d9ef
https://github.com/illumos/illumos-gate/commit/a3905a45920de250d181b66ac0b6b71bd200d9ef

https://www.illumos.org/issues/7869
  The issue fixed by this patch is a race condition in the deadlist code.
  A thread executing an administrative command that uses
  `dsl_deadlist_space_range()` holds the lock of the whole `deadlist_t` to
  protect the access of all its entries that the deadlist contains in an
  avl tree.
  Sync threads trying to insert a new entry in the deadlist
  (through `dsl_deadlist_insert()` -> `dle_enqueue()`) do not hold the
  deadlist lock at that moment. If the `dle_bpobj` is the empty bpobj (our
  sentinel value), we close and reopen it. Between these two operations,
  it is possible for the `dsl_deadlist_space_range()` thread to dereference
  that bpobj which is `NULL` during that window.
  Threads should hold the a deadlist's `dl_lock` when they manipulate its
  internal data so scenarios like the one above are avoided. In addition,
  threads should also hold the bpobj lock whenever they are allocating the
  subobj list of a bpobj, and not just when they actually insert the subobj
  to the list. This way we can avoid potential memory leaks.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
MFC after: 2 weeks
21:43:34 - r318821
(3 days 7 hours ago)
by avg
Affects: 
(19 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r316912: 7793 ztest fails assertion in dmu_tx_willuse_space

illumos/illumos-gate@61e255ce7267b52208af9daf434b77d37fb75622
https://github.com/illumos/illumos-gate/commit/61e255ce7267b52208af9daf434b77d37fb75622

https://www.illumos.org/issues/7793
  Background information: This assertion about tx_space_* verifies that we
  are not dirtying more stuff than we thought we would. We “need” to know
  how much we will dirty so that we can check if we should fail this
  transaction with ENOSPC/EDQUOT, in dmu_tx_assign(). While the
  transaction is open (i.e. between dmu_tx_assign() and dmu_tx_commit() —
  typically less than a millisecond), we call dbuf_dirty() on the exact
  blocks that will be modified. Once this happens, the temporary
  accounting in tx_space_* is unnecessary, because we know exactly what
  blocks are newly dirtied; we call dnode_willuse_space() to track this
  more exact accounting.
  The fundamental problem causing this bug is that dmu_tx_hold_*() relies
  on the current state in the DMU (e.g. dn_nlevels) to predict how much
  will be dirtied by this transaction, but this state can change before we
  actually perform the transaction (i.e. call dbuf_dirty()).
  This bug will be fixed by removing the assertion that the tx_space_*
  accounting is perfectly accurate (i.e. we never dirty more than was
  predicted by dmu_tx_hold_*()). By removing the requirement that this
  accounting be perfectly accurate, we can also vastly simplify it, e.g.
  removing most of the logic in dmu_tx_count_*().
  The new tx space accounting will be very approximate, and may be more or
  less than what is actually dirtied. It will still be used to determine
  if this transaction will put us over quota. Transactions that are marked
  by dmu_tx_mark_netfree() will be excepted from this check. We won’t make
  an attempt to determine how much space will be freed by the transaction
  — this was rarely accurate enough to determine if a transaction should
  be permitted when we are over quota, which is why dmu_tx_mark_netfree()
  was introduced in 2014.
  We also won’t attempt to give “credit” when overwriting existing blocks,
  if those blocks may be freed. This allows us to remove the
  do_free_accounting logic in dbuf_dirty(), and associated routines. This

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
MFC after: 3 weeks
21:42:48 - r318820
(3 days 7 hours ago)
by hselasky
Affects:  /head/sys/dev/sound/pcm/feeder_mixer.c
/head/sys/tools/sound/snd_fxdiv_gen.awk
Increase the allowed maximum number of audio channels from 31 to 127
in the PCM feeder mixer. Without this change a value of 32 channels is
treated like zero, due to using a mask of 0x1f, causing a kernel
assert when trying to playback bitperfect 32-channel audio. Also
update the AWK script which is generating the division tables to
handle more than 18 channels. This commit complements r282650.

MFC after: 3 days
21:32:35 - r318819
(3 days 7 hours ago)
by avg
Affects: 
(4 files)
/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
/head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
MFC r316908: 7541 zpool import/tryimport ioctl returns ENOMEM because provided
buffer is too small for config

illumos/illumos-gate@8b65a70b763232c90a91f31eb2010314c02ed338
https://github.com/illumos/illumos-gate/commit/8b65a70b763232c90a91f31eb2010314c02ed338

https://www.illumos.org/issues/7541
  When calling zpool import, zpool does a few ioctls to ZFS.
  zpool allocates a buffer in userland and passes it to the kernel so that ZFS
  can copy info into it. ZFS will use it to put the nvlist that describes the
  pool configuration.
  If the allocated buffer is too small, ZFS will return ENOMEM and the call will
  have to be redone. This wastes CPU time and slows down the import process.
This
  happens very often for the ZFS_IOC_POOL_TRYIMPORT call.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
MFC after: 2 weeks
21:29:31 - r318818
(3 days 7 hours ago)
by avg
Affects: 
(10 files)
/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/*
MFC r316907: 1300 filename normalization doesn't work for removes

illumos/illumos-gate@1c17160ac558f98048951327f4e9248d8f46acc0
https://github.com/illumos/illumos-gate/commit/1c17160ac558f98048951327f4e9248d8f46acc0

https://www.illumos.org/issues/1300

FreeBSD note: recent FreeBSD was not affected by the issue fixed as the
name cache is completely bypassed when normalization is enabled.
The change is imported for the sake of ZAP infrastructure modifications.

Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Kevin Crowe <kevin.crowe@nexenta.com>

MFC after: 3 weeks
21:18:13 - r318817
(3 days 7 hours ago)
by asomers
Affects: 
(2 files)
/stable/11/sbin/camcontrol/fwdownload.c
MFC r317759:

Fix memory leaks in camcontrol

Reported by: Coverity
CID: 1331674, 1331675
Reviewed by: ken
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10588
21:02:53 - r318816
(3 days 7 hours ago)
by trasz
Affects: 
(8 files)
/head/lib/*
/head/share/man/*
/head/usr.sbin/pmcstudy/pmcstudy.8
Don't end up manpage titles with a full stop.

MFC after: 2 weeks
20:54:14 - r318815
(3 days 7 hours ago)
by np
Affects: 
(2 files)
/stable/11/sys/sys/mbuf.h
MFC r307380:

Fix typo in comments.
20:53:01 - r318814
(3 days 7 hours ago)
by avg
Affects: 
(2 files)
/head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
MFC r316904: 7729 libzfs_core`lzc_rollback() leaks result nvl

illumos/illumos-gate@ac428481f96be89add7a1edf43ae47dd71038553
https://github.com/illumos/illumos-gate/commit/ac428481f96be89add7a1edf43ae47dd71038553

https://www.illumos.org/issues/7729
  libzfs_core`lzc_rollback() doesn't free the result nvl after lzc_ioctl() call.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

MFC after: 2 weeks
20:52:47 - r318813
(3 days 7 hours ago)
by asomers
Affects: 
(6 files)
/stable/11/sbin/ifconfig/*
MFC r317755, r317758

r317755:
Various Coverity fixes in ifconfig(8)

* Exit early if kldload(2) fails (1011259). This is the only change that
  affects ifconfig's behavior.
* Close memory and resource leaks (1305624, 1305205, 1007100)
* Mark usage() as _Noreturn (1305806, 1305750)
* Fix some dereference after null checks (1011474, 270774)

Reported by: Coverity
CID: 1305624, 1305205, 1007100, 1305806, 1305750, 1011474,
CID: 270774, 1011259
Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10587

r317758:
Unbreak ifconfig for mlx4en(4) after r317755

ifconfig doesn't correctly infer mlx interfaces' module names, so it will
attempt to load the mlx(4) module even when not necessary.

Reported by: rstone
X-MFC-With: 317755
Sponsored by: Spectra Logic Corp
20:41:26 - r318812
(3 days 8 hours ago)
by avg
Affects: 
(3 files)
/head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
MFV r316860: 7545 zdb should disable reference tracking

illumos/illumos-gate@4dd77f9e38ef05b39db128ff7608d926fd3218c6
https://github.com/illumos/illumos-gate/commit/4dd77f9e38ef05b39db128ff7608d926fd3218c6

https://www.illumos.org/issues/7545
  When evicting from the ARC, we manipulate some refcount_t's, e.g. arcs_size.
  When using zdb to examine a large amount of data (e.g. zdb -bb on a large pool
  with small blocks), the ARC may have a large number of entries. If reference
  tracking is enabled, there will be ~1 reference for each block in the ARC.
When
  evicting, we decrement the refcount and have to search all the references to
  find the one that we are removing, which is very slow.
  Since zdb is typically used to find problems with the on-disk format, and not
  with the code it is running, we should disable reference tracking in zdb.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

MFC after: 2 weeks
20:34:19 - r318811
(3 days 8 hours ago)
by np
Affects: 
(3 files)
/stable/10/release/Makefile.vm
/stable/10/release/tools/vmimage.subr
MFC r307008:

Add the ability to override the size of the swap partition when building
VM images. The default continues to be 1G.

Sponsored by: Chelsio Communications
20:33:49 - r318810
(3 days 8 hours ago)
by np
Affects: 
(3 files)
/stable/11/release/Makefile.vm
/stable/11/release/tools/vmimage.subr
MFC r307008:

Add the ability to override the size of the swap partition when building
VM images. The default continues to be 1G.

Sponsored by: Chelsio Communications
20:29:20 - r318809
(3 days 8 hours ago)
by np
Affects: 
(3 files)
/stable/10/share/man/man4/cxgbe.4
/stable/10/sys/dev/cxgbe/t4_main.c
MFC r313318:

cxgbe(4): Allow tunables that control the number of queues to be set to
'-n' to tell the driver to create _up to_ 'n' queues if enough cores are
available. For example, setting hw.cxgbe.nrxq10g="-32" will result in
16 queues if the system has 16 cores, 32 if it has 32.

There is no change in the default number of queues of any type.

Sponsored by: Chelsio Communications
20:28:48 - r318808
(3 days 8 hours ago)
by np
Affects: 
(3 files)
/stable/11/share/man/man4/cxgbe.4
/stable/11/sys/dev/cxgbe/t4_main.c
MFC r313318:

cxgbe(4): Allow tunables that control the number of queues to be set to
'-n' to tell the driver to create _up to_ 'n' queues if enough cores are
available. For example, setting hw.cxgbe.nrxq10g="-32" will result in
16 queues if the system has 16 cores, 32 if it has 32.

There is no change in the default number of queues of any type.

Sponsored by: Chelsio Communications
20:25:40 - r318807
(3 days 8 hours ago)
by asomers
Affects: 
(2 files)
/stable/11/sbin/ifconfig/af_nd6.c
MFC r317715:

ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP"

PR: 218958
Reviewed by: kristof
Differential Revision: https://reviews.freebsd.org/D10543
20:13:49 - r318806
(3 days 8 hours ago)
by jpaetzel
Affects: 
(2 files)
/stable/10/sys/dev/tws/tws.h
MFC 318401

Increase the number of LUNs this hardware can support.

Experimentally we know this value works, but the hardware
may support an even higher value.

PR: 213876
Reported by: J.Catrysse@proximedia.be
20:10:38 - r318805
(3 days 8 hours ago)
by jpaetzel
Affects: 
(2 files)
/stable/11/sys/dev/tws/tws.h
MFC 318401

Increase the number of LUNs this hardware can support.

Experimentally we know this value works, but the hardware
may support an even higher value.

PR: 213876
Reported by: J.Catrysse@proximedia.be
20:01:12 - r318804
(3 days 8 hours ago)
by np
Affects: 
(5 files)
/stable/10/sys/dev/cxgbe/tom/*
MFC r313346:

cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every
IPv6 connection being handled by the TOE should have a reference on its
CLIP entry.

Sponsored by: Chelsio Communications
19:57:22 - r318803
(3 days 8 hours ago)
by np
Affects: 
(5 files)
/stable/11/sys/dev/cxgbe/tom/*
MFC r313346:

cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every
IPv6 connection being handled by the TOE should have a reference on its
CLIP entry.

Sponsored by: Chelsio Communications
19:19:02 - r318802
(3 days 9 hours ago)
by np
Affects: 
(2 files)
/stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c
MFC r314131:

Avoid NULL dereference in a couple of sysctl handlers in ibcore.
iw_cxgbe sets ib_device->dma_device to NULL (since r311880).

Sponsored by: Chelsio Communications
19:18:36 - r318801
(3 days 9 hours ago)
by np
Affects: 
(2 files)
/stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c
MFC r314131:

Avoid NULL dereference in a couple of sysctl handlers in ibcore.
iw_cxgbe sets ib_device->dma_device to NULL (since r311880).

Sponsored by: Chelsio Communications
18:54:21 - r318800
(3 days 9 hours ago)
by jhb
Affects:  /head/sys/x86/include/segments.h
Remove constants and comments for unimplemented entries in the default LDT.

These entries will never be added to the default LDT in the future.
18:16:20 - r318799
(3 days 10 hours ago)
by np
Affects: 
(9 files)
/stable/10/contrib/ofed/libcxgb4/src/t4.h
/stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
/stable/10/sys/dev/cxgbe/iw_cxgbe/*
MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937,
r316940, and r317410.

r311880:
The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where
a linuxkpi style device is expected. If OFED/linuxkpi actually starts
using this field then we'll have to figure out whether to create fake
devices for these drivers or have linuxkpi deal with NULL device.

This mismatch was first reported as part of D6585.

r314167:
cxgbe/iw_cxgbe: Minor changes for T6.

r316118:
cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be
registered in one ib_reg_phys_mr.

r316571:
cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for
memory regions larger than 4GB.

r316573:
cxgbe/iw_cxgbe: Replace a magic constant with something more readable
(and accurate).

T4 and later have an extra bit for page shift so the maximum page size
is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space
in the chip's PBL (physical buffer list) when registering very large
memory regions.

r316580:
cxgbe/iw_cxgbe: Remove another bad cast. This should have been
included in r316571.

r316936:
cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains.

r316937:
cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device.

r316940:
cxgbe/iw_cxgbe: Report the actual values of various parameters as
configured by the firmware.

r317410:
cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the
iw_cxgb4 Linux driver.
18:14:57 - r318798
(3 days 10 hours ago)
by np
Affects: 
(9 files)
/stable/11/contrib/ofed/libcxgb4/src/t4.h
/stable/11/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
/stable/11/sys/dev/cxgbe/iw_cxgbe/*
MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937,
r316940, and r317410.

r311880:
The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where
a linuxkpi style device is expected. If OFED/linuxkpi actually starts
using this field then we'll have to figure out whether to create fake
devices for these drivers or have linuxkpi deal with NULL device.

This mismatch was first reported as part of D6585.

r314167:
cxgbe/iw_cxgbe: Minor changes for T6.

r316118:
cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be
registered in one ib_reg_phys_mr.

r316571:
cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for
memory regions larger than 4GB.

r316573:
cxgbe/iw_cxgbe: Replace a magic constant with something more readable
(and accurate).

T4 and later have an extra bit for page shift so the maximum page size
is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space
in the chip's PBL (physical buffer list) when registering very large
memory regions.

r316580:
cxgbe/iw_cxgbe: Remove another bad cast. This should have been
included in r316571.

r316936:
cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains.

r316937:
cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device.

r316940:
cxgbe/iw_cxgbe: Report the actual values of various parameters as
configured by the firmware.

r317410:
cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the
iw_cxgb4 Linux driver.

Sponsored by: Chelsio Communications
17:52:56 - r318797
(3 days 10 hours ago)
by np
Affects: 
(4 files)
/stable/10/sys/dev/cxgbe/common/common.h
/stable/10/sys/dev/cxgbe/offload.h
/stable/10/sys/dev/cxgbe/t4_main.c
MFC r316774:

cxgbe: Query some more RDMA related parameters from the firmware.

Sponsored by: Chelsio Communications
17:51:07 - r318796
(3 days 10 hours ago)
by np
Affects: 
(4 files)
/stable/11/sys/dev/cxgbe/common/common.h
/stable/11/sys/dev/cxgbe/offload.h
/stable/11/sys/dev/cxgbe/t4_main.c
MFC r316774:

cxgbe: Query some more RDMA related parameters from the firmware.

Sponsored by: Chelsio Communications
17:50:34 - r318795
(3 days 10 hours ago)
by gjb
Affects:  /head/lib/libc/gen/sem_timedwait.3
/head/lib/libc/sys/fsync.2
Update the "first appeared in" version in several manual pages.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
17:47:49 - r318794
(3 days 10 hours ago)
by gjb
Affects:  /head/sbin/zfsbootcfg/zfsbootcfg.8
/head/share/man/man9/mutex.9
/head/usr.sbin/efidp/efidp.8
Update the "first appeared in" version in several manual pages.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
17:47:16 - r318793
(3 days 11 hours ago)
by glebius
Affects:  /head/sys/netinet/in_pcb.c
/head/sys/netinet/in_pcb.h
o Rearrange struct inpcb fields to optimize the TCP output code path
  considering cache line hits and misses. Put the lock and hash list
  glue into the first cache line, put inp_refcount inp_flags inp_socket
  into the second cache line.
o On allocation zero out entire structure except the lock and list entries,
  including inp_route inp_lle inp_gencnt. When inp_route and inp_lle were
  introduced, they were added below inp_zero_size, resulting on not being
  cleared after free/alloc. This definitely was a source of bugs with route
  caching. Could be that r315956 has just fixed one of them.
  The inp_gencnt is reinitialized on every alloc, so it is safe to clear it.

This has been proved to improve TCP performance at Netflix.

Obtained from: rrs
Differential Revision: D10686
17:11:10 - r318792
(3 days 11 hours ago)
by emaste
Affects:  /head/UPDATING
UPDATING: clarify ino64 upgrade instructions even further

- mention COMPAT_FREEBSD11 earlier so that the steps are in chronological
  order
- suggest removing /usr/obj before build to ensure there are no stale
  objects

Reviewed by: allanjude, kib
Sponsored by: The FreeBSD Foundation
16:39:19 - r318791
(3 days 12 hours ago)
by loos
Affects: 
(2 files)
/stable/11/sys/dev/sdhci/sdhci_fdt_gpio.c
MFC r312346:

Set the the wp_disabled flag when asked to.

While here, add the missing new line.

Sponsored by: Rubicon Communications, LLC (Netgate)
16:30:38 - r318790
(3 days 12 hours ago)
by asomers
Affects:  /head/usr.sbin/bootparamd/bootparamd/bootparamd.c
Fix a buffer overflow in bootparamd(8)

If /etc/bootparams contains a line with an excessively long pathname, and a
client asks for that path, then bootparamd will overflow a buffer and crash
while parsing that line. This is not remotely exploitable since it requires
a malformed /etc/bootparams file.

Reported by: Coverity
CID: 1305954
MFC after: 1 week
Sponsored by: Spectra Logic Corp
14:36:51 - r318789
(3 days 14 hours ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_nat.c
Ifdef out a redundant if statement when LARGE_NAT is disabled.

MFC after: 1 week
14:24:47 - r318788
(3 days 14 hours ago)
by pfg
Affects:  /head/usr.sbin/bhyve/bhyvegc.c
bhyvegc_resize: make use of reallocarray(3) for bounds-checking.

Also add __FBSDID.

Reviewed by: grehan

This file lacks a license(!) so for this change the following declaration
applies:

To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably
and unconditionally waives, abandons, and surrenders all of Affirmer's
Copyright and Related Rights and associated claims and causes of action,
whether now known or unknown (including existing as well as future claims
and causes of action).
14:22:22 - r318787
(3 days 14 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r318763, EARLY_AP_STARTUP enabled by default.

Sponsored by: The FreeBSD Foundation
11:38:43 - r318786
(3 days 17 hours ago)
by avg
Affects: 
(2 files)
/stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
MFC r316854: rename vfs.zfs.debug_flags to vfs.zfs.debugflags

Since this is a stable branch vfs.zfs.debug_flags sysctl is also kept.
The corresponing tunable could never work.
11:38:31 - r318785
(3 days 17 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
MFC r316854: rename vfs.zfs.debug_flags to vfs.zfs.debugflags

Since this is a stable branch vfs.zfs.debug_flags sysctl is also kept.
The corresponing tunable could never work.
11:11:13 - r318784
(3 days 17 hours ago)
by avg
Affects: 
(2 files)
/stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
MFC r316853: dtrace: fix normalization of stddev aggregation

Sponsored by: Panzura
11:10:55 - r318783
(3 days 17 hours ago)
by avg
Affects: 
(2 files)
/stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
MFC r316853: dtrace: fix normalization of stddev aggregation

Sponsored by: Panzura
11:09:06 - r318782
(3 days 17 hours ago)
by avg
Affects: 
(2 files)
/stable/11/sys/x86/x86/mp_x86.c
MFC r316643: use msr 0xc001100c to discover multi-node AMD processors
10:09:54 - r318781
(3 days 18 hours ago)
by kib
Affects:  /head/share/man/man9/bitset.9
/head/sys/sys/bitset.h
Add BIT_OR2(), BIT_AND2(), BIT_NAND2(), BIT_XOR() and BIT_XOR2().

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 2 weeks
09:25:13 - r318780
(3 days 19 hours ago)
by kib
Affects:  /head/include/termios.h
/head/sys/sys/_termios.h
Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE.

The Termios headers <termios.h> and <sys/_termios.h> used sometimes
_POSIX_SOURCE directly to determine if a thing should be exposed to
the user. This circumvented the feature mechanisms of <sys/cdefs.h>.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 2 weeks
09:09:10 - r318779
(3 days 19 hours ago)
by pho
Affects: 
(19 files)
/user/pho/stress2/misc/*
Fix more hard coded mount point names.

Sponsored by: Dell EMC Isilon
09:03:46 - r318778
(3 days 19 hours ago)
by ae
Affects: 
(2 files)
/stable/11/sys/netinet/ip_divert.c
MFC r318399:
  Set M_BCAST and M_MCAST flags on mbuf sent via divert socket.

  r290383 has changed how mbufs sent by divert socket are handled.
  Previously they are always handled by slow path processing in ip_input().
  Now ip_tryforward() is invoked from ip_input() before in_broadcast() check.
  Since diverted packet lost all mbuf flags, it passes the broadcast check
  in ip_tryforward() due to missing M_BCAST flag. In the result the broadcast
  packet is forwarded to the wire instead of be consumed by network stack.

  Add in_broadcast() check to the div_output() function. And restore the
  M_BCAST flag if destination address is broadcast for the given network
  interface.

  PR: 209491
09:01:54 - r318777
(3 days 19 hours ago)
by ae
Affects: 
(2 files)
/stable/11/sbin/ipfw/tables.c
MFC r318400:
  Allow zero port specification in table entries with type flow.

  PR: 217620
06:49:01 - r318776
(3 days 21 hours ago)
by mmel
Affects: 
(2 files)
/stable/11/contrib/binutils/gas/config/tc-arm.c
MFC r318135:

  Fix parsing of 'vmov Q<n>.F32,Q<n>.F32' instruction.
05:30:36 - r318775
(3 days 23 hours ago)
by np
Affects: 
(2 files)
/stable/10/sys/dev/cxgbe/common/t4_msg.h
MFC r311846:
cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto
engine.
04:48:09 - r318774
(3 days 23 hours ago)
by np
Affects:  /head/sys/dev/cxgbe/iw_cxgbe/cm.c
cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be
treated as fatal errors.

MFC after: 3 days
Sponsored by: Chelsio Communications
04:42:31 - r318773
(4 days ago)
by np
Affects: 
(2 files)
/stable/11/sys/dev/cxgbe/common/t4_msg.h
MFC r311846:
cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto
engine.
03:56:48 - r318772
(4 days ago)
by np
Affects: 
(2 files)
/stable/11/sys/netinet/tcp_lro.c
MFC r317170, r317389, and r317390.

r317170:
Remove redundant assignment.

r317389:
Frames that are not considered for LRO should not be counted in LRO
statistics.

r317390:
Flush the LRO ctrl as soon as lro_mbufs fills up. There is no need to
wait for the next enqueue from the driver.

Sponsored by: Chelsio Communications
03:26:15 - r318771
(4 days 1 hour ago)
by jhb
Affects: 
(2 files)
/stable/11/usr.bin/kdump/kdump.c
MFC 315334: Decode arguments to chflagsat().
01:06:09 - r318770
(4 days 3 hours ago)
by jhb
Affects: 
(2 files)
/stable/11/lib/libsysdecode/sysdecode_ioctlname.3
MFC 315310: Spell "const" properly.

PR: 217797
01:03:30 - r318769
(4 days 3 hours ago)
by kevlo
Affects:  /head/share/man/man9/Makefile
Add missing MLINKS for functions decribed in iflibdd(9), iflibdi(9), and
iflibtxrx(9).
01:02:35 - r318768
(4 days 3 hours ago)
by adrian
Affects:  /head/sys/dev/ath/if_ath_ahb.c
[ath] begin migration of AHB support to use the PCI style board data API for
calibration data.

This brings the AHB support in line with the PCI support - now other "things"
can wrap up the calibration / board data into a firmware blob and have them
probe/attach after the system has finished booting.

Note that this change requires /all/ of the AHB using kernel configurations
to change - so until I drop those changes in, this breaks AHB.

Fear not, I'll do that soon.

TODO:

* the above stuff.

Tested:

* AR9331, carambola 2, loading if_ath / wlan as modules at run time
01:01:57 - r318767
(4 days 3 hours ago)
by allanjude
Affects:  /head/sys/compat/freebsd32/freebsd32_sysent.c
/head/sys/kern/init_sysent.c
Followup to r318765 (capsicumize cpuset_*affinity)

Update *sysent files
01:01:43 - r318766
(4 days 3 hours ago)
by kevlo
Affects:  /head/share/man/man9/iflibdi.9
Remove duplicate definition of iflib_led_create().
00:58:30 - r318765
(4 days 3 hours ago)
by allanjude
Affects: 
(5 files)
/head/lib/libc/sys/cpuset_getaffinity.2
/head/share/man/man4/capsicum.4
/head/sys/*
Allow cpuset_{get,set}affinity in capabilities mode

bhyve was recently sandboxed with capsicum, and needs to be able to
control the CPU sets of its vcpu threads

Reviewed by: emaste, oshogbo, rwatson
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D10170
00:36:27 - r318764
(4 days 4 hours ago)
by jhb
Affects: 
(2 files)
/stable/11/lib/libsysdecode/flags.c
MFC 315283:
Fix sysdecode_cap_rights which currently prints bogus capability rights.

PR: 217787
00:00:55 - r318763
(4 days 4 hours ago)
by jhb
Affects: 
(4 files)
/stable/11/sys/amd64/conf/GENERIC
/stable/11/sys/amd64/conf/MINIMAL
/stable/11/sys/i386/conf/GENERIC
MFC 310177: Enable EARLY_AP_STARTUP on amd64 and i386 kernels by default.

PR: 199321, 203682
Discussed with: re (kib)
Relnotes: yes
2017 - 05 - 23   (5 days ago)
23:40:17 - r318762
(4 days 5 hours ago)
by np
Affects: 
(14 files)
/head/sys/conf/files
/head/sys/dev/cxgbe/firmware/*
/head/sys/modules/cxgbe/*
cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0.

The latest firmware has a number of link related fixes, support for a
new custom card, and the fix for a bug that affected rate limiting on
FreeBSD.

Obtained from: Chelsio Communications
MFC after: 1 week
Sponsored by: Chelsio Communications
22:34:18 - r318761
(4 days 6 hours ago)
by jhb
Affects:  /head/sys/i386/i386/machdep.c
/head/sys/x86/include/segments.h
Remove the BSD/OS 2.1 system call gate LDT entry.

An extra copy of the system call gate was added to the default LDT back
in 1996 (r18513 / r18514). However, the ability to run BSD/OS 2.1
i386 binaries under FreeBSD's native ABI is most likely no longer
needed.

Discussed with: kib
22:30:15 - r318760
(4 days 6 hours ago)
by landonf
Affects:  /head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c
/head/sys/dev/bhnd/nvram/bhnd_sprom.c
bhnd(4): Fix a SPROM identification regression introduced in r315866

In r315866, we introduced a direct read of the 8-bit sromrev field from the
memory mapped SPROM/OTP device. On OTP devices that require 16-bit access
alignment, this read fails, preventing identification of the SPROM layout.

So, let's perform an aligned read of the combined 16-bit sromrev/crc field
instead.

Approved by: adrian (mentor, implicit)
22:11:45 - r318759
(4 days 6 hours ago)
by brd
Affects: 
(2 files)
/stable/11/usr.bin/sed/sed.1
MFC r316030, r317378: Add some useful examples to the sed man page.

Reviewed by: wblock, bcr
Differential Revision: https://reviews.freebsd.org/D9958
20:51:48 - r318758
(4 days 7 hours ago)
by emaste
Affects:  /head/UPDATING
UPDATING: ino64 upgrade should include COMPAT_FREEBSD11

The upgrade process requires COMPAT_FREEBSD11 to support the combination
of "old" userland and "new" kernel that exists after "make kernel" and
reboot. Mention this explicitly for those using custom kernel configs.
Once the "new" world is installed the COMPAT_FREEBSD11 could be removed
again, but that does not seem necessary to mention in UPDATING.

Reported by: kib
Sponsored by: The FreeBSD Foundation
20:25:49 - r318757
(4 days 8 hours ago)
by emaste
Affects:  /head/UPDATING
Add note to UPDATING for ino64 to follow the standard upgrade process

The existing upgrade process documented in UPDATING is both necessary
and sufficient for upgrading across the ino64 change. However, the
shortcut of installing both kernel + world before a single reboot has
been possible for quite some time, and several developers and users
were surprised by fallout from ino64. Add an explicit entry pointing
out that the full process must be followed.

Reviewed by: allanjude, gjb, vangyzen
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10877
19:45:31 - r318756
(4 days 9 hours ago)
by ngie
Affects:  /stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
:raw no longer SIGSEGVs on FreeBSD; revert the signal expectation

This is a direct commit to ^/stable/10, since this expectation was only
added to ^/stable/10's copy of t_raw.c.

PR: 216954
Sponsored by: Dell EMC Isilon
19:03:07 - r318755
(4 days 9 hours ago)
by lidl
Affects: 
(5 files)
/head/contrib/blacklist/bin/blacklistd.c
/head/contrib/blacklist/include/*
/head/contrib/blacklist/lib/*
Extend libblacklist support with new action types

The original blacklist library supported two notification types:
 - failed auth attempt, which incremented the failed login count
  by one for the remote address
 - successful auth attempt, which reset the failed login count
  to zero for that remote address

When the failed login count reached the limit in the configuration
file, the remote address would be blocked by a packet filter.

This patch implements a new notification type, "abusive behavior",
and accepts, but does not act on an additional type, "bad username".
It is envisioned that a system administrator will configure a small
list of "known bad usernames" that should be blocked immediately.

Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10604
17:41:09 - r318754
(4 days 11 hours ago)
by jhb
Affects:  /head/sys/boot/mips/beri/boot2/Makefile
Pass -N directly to ld via -Wl rather than passing it to the compiler driver.

In particular, clang doesn't accept -N.

Obtained from: CheriBSD
Sponsored by: DARPA / AFRL
17:34:10 - r318753
(4 days 11 hours ago)
by ngie
Affects:  /head/lib/libc/gen/directory.3
directory(3): add trailing comma after e.g., missed in r318699

Submitted by: bjk
MFC after: 2 weeks
MFC with: r318699
Sponsored by: Dell EMC Isilon
17:00:56 - r318752
(4 days 11 hours ago)
by mav
Affects: 
(6 files)
/stable/11/sbin/geom/class/mirror/*
/stable/11/sys/geom/mirror/*
MFC r309321:
Add `gmirror create` subcommand, alike to gstripe, gconcat, etc.

It is quite specific mode of operation without storing on-disk metadata.
It can be useful in some cases in combination with some external control
tools handling mirror creation and disks hot-plug.

Sponsored by: iXsystems, Inc.
16:59:24 - r318751
(4 days 11 hours ago)
by swills
Affects:  /head/sys/kern/kern_prot.c
/head/sys/sys/proc.h
Add security.bsd.see_jail_proc

Add security.bsd.see_jail_proc sysctl to hide jail processes from non-root
users

Reviewed by: jamie
Approved by: allanjude
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D10770
16:38:10 - r318750
(4 days 12 hours ago)
by pfg
Affects: 
(6 files)
/head/contrib/binutils/*
/head/contrib/gcc/*
Bring some rough support for FreeBSD S/390 to the GNU toolchain.

This is no-op and only for reference: the S/390 port seems to be elusive
in the BSDs so it is convenient to keep some trace from past efforts.
It is likely newer attempts will focus on a newer toolchain using clang
instead.

Obtained from: Perforce depot/projects/s390
16:12:50 - r318749
(4 days 12 hours ago)
by vangyzen
Affects: 
(8 files)
/head/include/stdio.h
/head/lib/libc/include/libc_private.h
/head/lib/libthr/thread/*
libthr: fix warnings from GCC when WARNS=6

Fix warnings about:
- redundant declarations
- a local variable shadowing a global function (dlinfo)
- an old-style function definition (with an empty parameter list)
- a variable that is possibly used uninitialized

"make tinderbox" passes this time, except for a few unrelated
kernel failures.

Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10870
15:46:21 - r318748
(4 days 13 hours ago)
by gjb
Affects:  /head/tools/build/mk/OptionalObsoleteFiles.inc
Honor WITHOUT_TFTP for check-old* and delete-old* targets.

Submitted by: philippe dot michel7 at sfr dot fr
PR: 217949
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
15:04:29 - r318747
(4 days 13 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Move the SA entry to the tcpmd5 module addition.

Submitted by: ae
Sponsored by: The FreeBSD Foundation
14:54:58 - r318746
(4 days 13 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document the requirement for two SA entries, following the IPSEC
overhaul.

Submitted by: vangyzen
Sponsored by: The FreeBSD Foundation
14:38:59 - r318745
(4 days 14 hours ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_nat.c
Remove redundant variable declaration.

MFC after: 3 days
13:57:55 - r318744
(4 days 14 hours ago)
by kib
Affects:  /head/sys/arm64/conf/GENERIC
Add COMPAT_FREEBSD11 on arm64, the arch is almost tier-1.

Discussed with: andrew, emaste
Sponsored by: The FreeBSD Foundation
12:40:50 - r318743
(4 days 16 hours ago)
by badger
Affects:  /stable/10/sys/sys/proc.h
/stable/11/sys/kern/kern_thread.c
/stable/11/sys/sys/proc.h
move p_sigqueue to the end of struct proc

In order to preserve KBI in stable branches, replace the existing
p_sigqueue slot with padding and move the expanded (as of r315949)
p_sigqueue to the end of the struct.

This is a repeat of r317529 (which concerned td_sigqueue in struct
thread) for p_sigqueue in struct proc.

Virtualbox modules (and possibly others) are affected without this fix.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D10843
12:03:59 - r318742
(4 days 16 hours ago)
by mmel
Affects: 
(3 files)
/stable/11/sys/arm/arm/pmap-v6.c
/stable/11/sys/arm/include/pmap-v6.h
MFC r318021,r318251:

  r318021:
  Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to
  another.
  r318251:
  Clarify usage rules for pmap_remap_vm_attr(). Not a functional change.
12:00:08 - r318741
(4 days 16 hours ago)
by trasz
Affects:  /head/sys/mips/mips/busdma_machdep.c
Remove superfluous parentheses.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
11:08:36 - r318740
(4 days 17 hours ago)
by trasz
Affects:  /head/share/examples/Makefile
Remove unneccessary call to mtree, which, when building as an unprivileged
user (with -DNO_ROOT), resulted in warnings looking like these:

share/man/cat8:
  user (9, 3819, not modified: Operation not permitted)
  permissions (0755, 0700, modified)

The BSD.usr.mk is already taken care of in etc/Makefile.

Submitted by: Alex Richardson <alr48@cl.cam.ac.uk>
Reviewed by: bdrewery
MFC after: 1 month
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9212
10:00:52 - r318739
(4 days 18 hours ago)
by kib
Affects:  /head/libexec/rtld-elf/rtld.c
For ld.so direct execution mode, implement -p option: search for the
binary in $PATH.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D10790
09:32:26 - r318738
(4 days 19 hours ago)
by ae
Affects: 
(4 files)
/head/sys/netipsec/*
Fix possible double releasing for SA and SP references.

There are two possible ways how crypto callback are called: directly from
caller and deffered from crypto thread.

For outbound packets the direct call chain is the following:
 IPSEC_OUTPUT() method -> ipsec[46]_common_output() ->
 -> ipsec[46]_perform_request() -> xform_output() ->
 -> crypto_dispatch() -> crypto_invoke() -> crypto_done() ->
 -> xform_output_cb() -> ipsec_process_done() -> ip[6]_output().

The SA and SP references are held while crypto processing is not finished.
The error handling code wrongly expected that crypto callback always called
from the crypto thread context, and it did references releasing in
xform_output_cb(). But when the crypto callback called directly, in case of
error the error handling code in ipsec[46]_perform_request() also did
references releasing.

To fix this, remove error handling from ipsec[46]_perform_request() and do it
in xform_output() before crypto_dispatch().

MFC after: 10 days
09:30:42 - r318737
(4 days 19 hours ago)
by kib
Affects: 
(11 files)
/head/sys/compat/freebsd32/*
/head/sys/kern/*
/head/sys/sys/*
Regen.
09:29:05 - r318736
(4 days 19 hours ago)
by kib
Affects: 
(97 files)
/head/*
Commit the 64-bit inode project.

Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment. Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks. Unfortunately, not everything can be
fixed, especially outside the base system. For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING. Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver. Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by: The FreeBSD Foundation (emaste, kib)
Differential revision: https://reviews.freebsd.org/D10439
09:20:31 - r318735
(4 days 19 hours ago)
by n_hibma
Affects:  /stable/11
Commit the mergeinfo for the commit to sbin/dhclient.
09:01:48 - r318734
(4 days 19 hours ago)
by ae
Affects: 
(4 files)
/head/sys/netipsec/*
Fix possible double releasing for SA reference.

There are two possible ways how crypto callback are called: directly from
caller and deffered from crypto thread.

For inbound packets the direct call chain is the following:
 IPSEC_INPUT() method -> ipsec_common_input() -> xform_input() ->
 -> crypto_dispatch() -> crypto_invoke() -> crypto_done() ->
 -> xform_input_cb() -> ipsec[46]_common_input_cb() -> netisr_queue().

The SA reference is held while crypto processing is not finished.
The error handling code wrongly expected that crypto callback always called
from the crypto thread context, and it did SA reference releasing in
xform_input_cb(). But when the crypto callback called directly, in case of
error (e.g. data authentification failed) the error handling in
ipsec_common_input() also did SA reference releasing.

To fix this, remove error handling from ipsec_common_input() and do it
in xform_input() before crypto_dispatch().

PR: 219356
MFC after: 10 days
08:11:55 - r318733
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/bin/stty/stty.1
MFC r317904:

.Xr resizewin from stty(1) man page.
08:10:35 - r318732
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.1
MFC r318481:

Language fixes.
08:09:44 - r318731
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.1
MFC r318138:

Revert to pre-r318116 wording to not give the false impression
that setting the kernels' idea of terminal size is somehow an
alternative to environment variables.
08:09:04 - r318730
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.1
MFC r318116:

Random updates to resizewin(1) man page.
08:08:23 - r318729
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.c
MFC r317935:

Sort variable declarations; no functional changes.
08:07:39 - r318728
(4 days 20 hours ago)
by trasz
Affects: 
(3 files)
/stable/11/usr.bin/resizewin/resizewin.1
/stable/11/usr.bin/resizewin/resizewin.c
MFC rr317934:

Add resizewin -z. It makes resizewin not do anything if the terminal
size is already set to something other than zero. It's supposed to be
called from eg /etc/profile - it's not neccessary to query terminal
size when logging in over the network, because the protocol used already
takes care of this, but it's neccessary when logging over a serial line.
08:06:00 - r318727
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.c
MFC r317933:

Use tcflush(3) instead of (nonstandard) TIOCFLUSH.
08:04:36 - r318726
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.c
MFC r317909:

Make resizewin(1) discard the terminal queues, to lower the chance
for "unable to parse response" error which happens when youre typing
too fast for the machine you're running it on.
08:02:21 - r318725
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.c
MFC r317905:

Rename a variable, hopefully fixing build after r317901.
08:01:24 - r318724
(4 days 20 hours ago)
by trasz
Affects: 
(2 files)
/stable/11/usr.bin/resizewin/resizewin.c
MFC r317901:

Improve error reporting in resizewin(1).
08:01:11 - r318723
(4 days 20 hours ago)
by ngie
Affects:  /head/usr.sbin/bsdinstall/bsdinstall.8
bsdinstall(8): fix manpage issues

- Start new sentences on new lines.
- Separate e.g. (more of an igor thing) with commas, and rewrite some examples
  not to be enclosed in parentheses.

Reported by: igor, make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:50:42 - r318722
(4 days 20 hours ago)
by ngie
Affects:  /head/usr.sbin/bsdinstall/partedit/sade.8
sade(8): start new sentence on new line

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:46:10 - r318721
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/sys/kill.2
kill(2): add missing section for sysctl(9)

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:45:29 - r318720
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/sys/ptrace.2
ptrace(2): clean up trailing whitespace

Reviewed by: make manlint
MFC after: 2 weeks
07:44:43 - r318719
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/sys/open.2
open(2): fix manlint warnings

- Sort SEE ALSO .Xr entries.
- Sort sections (HISTORY comes after STANDARDS).

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:32:57 - r318718
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/sys/rctl_add_rule.2
rctl_add_rule(2): fix manlint warnings

- Fix commas (either missing or misused) after .Nm entries in SYNOPSIS

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:31:03 - r318717
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/sys/cap_enter.2
cap_enter(2): fix manlint issues

- Sort SEE ALSO section appropriately.
- Correct section for sysctl(9).

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:27:30 - r318716
(4 days 21 hours ago)
by markj
Affects: 
(32 files)
/stable/11/sys/*
/stable/11/usr.bin/*
MFC r308474, r308691, r309203, r309365, r309703, r309898, r310720,
r308489, r308706:
Add PQ_LAUNDRY and remove PG_CACHED pages.
07:26:45 - r318715
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/sys/_umtx_op.2
_umtx_op(2): fix minor manlint issues

- Sort .Xr entries in SEE ALSO section.
- Sort SEE ALSO and STANDARDS sections properly, in terms of the
  entire document.

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:21:26 - r318714
(4 days 21 hours ago)
by mmel
Affects: 
(4 files)
/stable/11/contrib/gcc/config/arm/libgcc-bpabi.ver
/stable/11/contrib/gcc/config/arm/libunwind-arm.S
/stable/11/contrib/gcc/libgcc-std.ver
MFC r318024,r318025:

  r318024:
  Fix _Unwind_Backtrace symbol version for ARM.
  r318025:
  Revert accidentally changed std.armv6 in r318024.
07:20:29 - r318713
(4 days 21 hours ago)
by markj
Affects:  /head/usr.bin/vmstat/vmstat.c
Let vmstat -o recognize OBJT_MGTDEVICE objects.

MFC after: 1 week
07:17:52 - r318712
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/xdr/xdr.3
xdr(3): add missing comma after xdr_sizeof(3) in SYNOPSIS

This unbreaks the .Nm declaration

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:15:57 - r318711
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/stdio/fopencookie.3
fopencookie(3): declare function pointers in SYNOPSIS correctly

Add obligatory `*` in declarations.

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:14:46 - r318710
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/stdlib/quick_exit.3
quick_exit(3): delete trailing whitespace in licensing tort

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:12:31 - r318709
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/posix1e/acl_to_text.3
acl_to_text(3): start sentences on new lines

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:11:15 - r318708
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/posix1e/acl_create_entry.3
acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:10:20 - r318707
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/net/sctp_send.3
sctp_send(3): start sentences on new lines

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:09:26 - r318706
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/locale/localeconv.3
localeconv(3): start sentences on new lines

Reported by: make manlint
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:08:30 - r318705
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/stdio/fopen.3
fopen(3): make manlint fixes

- Break on new lines.
- Use .Dv with NULL.
- Rewrap lines as necessary/when possible.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:05:34 - r318704
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/posix1e/posix1e.3
posix1e(3): reference using the section (3) when referencing libbsm with .Xr

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
07:02:01 - r318703
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/iconv/__iconv_get_list.3
__iconv_get_list: separate .Nm entries with commas

MFC after: 2 weeks
Reported by: make manlint
Sponsored by: Dell EMC Isilon
07:00:46 - r318702
(4 days 21 hours ago)
by ngie
Affects:  /head/contrib/libc-vis/vis.3
vis(3): delete spurious .Pp macro

MFC after: 2 weeks
Reported by: make manlint
Sponsored by: Dell EMC Isilon
06:58:08 - r318701
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/gen/tcsendbreak.3
tcsendbreak(3): delete spurious blank line at the end of the man page

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
06:56:57 - r318700
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/gen/dirname.3
dirname(3): fix section ordering

IMPLEMENTATION NOTES come before RETURN VALUES

MFC after: 2 weeks
Reported by: make manlint
Sponsored by: Dell EMC Isilon
06:55:51 - r318699
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/gen/directory.3
directory(3): delete trailing whitespace and rewrite `E.g.` as `e.g.`

Reported by: make manlint
Sponsored by: Dell EMC Isilon
06:53:31 - r318698
(4 days 21 hours ago)
by ngie
Affects:  /head/lib/libc/gen/basename.3
basename(3): fix section ordering

IMPLEMENTATION NOTES come before RETURN VALUES

MFC after: 2 weeks
Reported by: make manlint
Sponsored by: Dell EMC Isilon
06:20:24 - r318697
(4 days 22 hours ago)
by adrian
Affects:  /head/sys/mips/atheros/ar71xx_fixup.c
[ar71xx] remove dead code!
06:20:06 - r318696
(4 days 22 hours ago)
by adrian
Affects:  /head/sys/mips/atheros/ar71xx_caldata.c
/head/sys/mips/atheros/files.ar71xx
[ar71xx] add a very simple early boot driver called "caldata" to commit
cross-layer atrocities.

The (eventually) upcoming ath(4) changes will include being able to load
ath(4) devices on the AHB bus (ie the on-die wifi part of the SoC)
as modules.

In order for this to happen, a copy of the calibration data needs to be
copied away before the SPI driver runs or the memory map access hack
won't work.

Now, ideally (!) there'd be some driver that can come up after the MTD
pieces (eg, SPI, NAND, etc) and load into a firmware chunk the calibration
data.

(Or, really really nicely, would be an actual async firmware API that
would lead itself to having a driver schedule a file read - or a raw device
read - to get to the calibration data.)

Now, until all of the above is done - I'm going to perpetuate the layer
breaking atrocity here by simply doing the PCI bus fixup EEPROM/calibration
data hack here. This will work for any AR71xx (and later on, AR231x/AR531x)
device, as well as the handful of QCA MIPS + QCA9880v2 802.11ac boards with
NOR flash.

To use, this goes into the kernel config:

# Enable EEPROM hacks
options AR71XX_ATH_EEPROM
device ar71xx_caldata
device firmware

# This enables the ath_ahb driver (when I commit the change!) to
# pull data out of the firmware hack.
options ATH_EEPROM_FIRMWARE

In the hints file:

# ART calibration data mapping device
hint.ar71xx_caldata.0.at="nexus0"
hint.ar71xx_caldata.0.order=0

# Where the ART is - last 64k in the first 8MB of flash
hint.ar71xx_caldata.0.map.0.ath_fixup_addr=0x1fff0000
hint.ar71xx_caldata.0.map.0.ath_fixup_size=16384

# And now tell the ath(4) driver where to look!
hint.ath.0.eeprom_firmware="ar71xx_caldata.0.map.0.eeprom_firmware"

Tested:

* carambola2, AR933x SoC, using a set of ath and ath_hal modules to load

TODO:

* unify this bit of firmware loading code, as I will definitely need
  to include both the PCI bus firmware version (for PCI ID fixups too!)
  as well as AHB/on-chip calibration data.

* Commit the ath_ahb bus code

* Convert .. everything over. That'll take the majority of the time.
06:14:02 - r318695
(4 days 22 hours ago)
by ngie
Affects:  /head/lib/libc/gen/err.c
err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0`

This is being done to aid humans and static analysis checkers.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
06:05:54 - r318694
(4 days 22 hours ago)
by ngie
Affects:  /head/usr.sbin/bsdinstall/partedit/part_wizard.c
style(9): sort headers

MFC after: 2 weeks
MFC with: r318693
Sponsored by: Dell EMC Isilon
06:04:38 - r318693
(4 days 22 hours ago)
by ngie
Affects:  /head/usr.sbin/bsdinstall/partedit/part_wizard.c
Some minor style(9) fixes

- Wrap at <80 columns.
- Sort by type

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
04:14:34 - r318692
(5 days ago)
by markj
Affects: 
(6 files)
/user/markj/PQ_LAUNDRY_11/usr.bin/systat/*
/user/markj/PQ_LAUNDRY_11/usr.bin/top/*
/user/markj/PQ_LAUNDRY_11/usr.bin/vmstat/vmstat.c
MFC r308489, r308706:
Add the laundry page count to the displays of systat, top, and vmstat.
04:10:36 - r318691
(5 days ago)
by markj
Affects: 
(124 files)
/user/markj/PQ_LAUNDRY_11/*
Merge from stable/11 at r318690.
03:48:42 - r318690
(5 days ago)
by adrian
Affects:  /head/sys/dev/etherswitch/arswitch/arswitch_phy.c
[arswitch] add phy debugging to the internal PHY read/write functions.
00:13:27 - r318689
(5 days 4 hours ago)
by mav
Affects:  /head/sys/net/if_vlan.c
Add parent interface reference counting to if_vlan.

Using plain ifunit() looks like a request for troubles.

MFC after: 1 week
2017 - 05 - 22   (6 days ago)
23:31:28 - r318688
(5 days 5 hours ago)
by rpokala
Affects:  /head/sys/sys/ata.h
"struct ata_params" field "reserved206[2]" actually starts at offset 20*7*.

MFC after: 1 week
Sponsored by: Panasas
23:21:24 - r318687
(5 days 5 hours ago)
by markj
Affects:  /head/lib/libproc/proc_sym.c
Ensure that the mappings table is populated in proc_objname().

MFC after: 1 week
Sponsored by: Dell EMC Isilon
23:17:55 - r318686
(5 days 5 hours ago)
by pfg
Affects:  /head/include/ndbm.h
ndbm.h: Add a comment pointing out our non-compliance with POSIX.

Changing it to full conformance breaks the ABI.

Reference:
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/ndbm.h.html

Discussion at: https://reviews.freebsd.org/D10544
22:10:02 - r318685
(5 days 6 hours ago)
by rmacklem
Affects: 
(2 files)
/stable/10/sys/fs/nfsclient/nfs_clcomsubs.c
MFC: r318287
Make nfscl_mtofh() return ENXIO when *nfhpp == NULL.

r317272 introduced a case where nfscl_mtofh() could return 0 when
*nfhpp is NULL. This patch makes it return ENXIO for this case.
22:02:06 - r318684
(5 days 6 hours ago)
by rmacklem
Affects: 
(2 files)
/stable/11/sys/fs/nfsclient/nfs_clcomsubs.c
MFC: r318287
Make nfscl_mtofh() return ENXIO when *nfhpp == NULL.

r317272 introduced a case where nfscl_mtofh() could return 0 when
*nfhpp is NULL. This patch makes it return ENXIO for this case.
21:52:06 - r318683
(5 days 6 hours ago)
by rmacklem
Affects: 
(2 files)
/stable/10/sbin/mount_nfs/mount_nfs.c
MFC: r317931
Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts.

The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense
to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871
modified umount so that it doesn't remove any entry created by mount_nfs.
21:41:34 - r318682
(5 days 7 hours ago)
by rmacklem
Affects: 
(2 files)
/stable/11/sbin/mount_nfs/mount_nfs.c
MFC: r317931
Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts.

The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense
to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871
modified umount so that it doesn't remove any entry created by mount_nfs.
21:17:44 - r318681
(5 days 7 hours ago)
by dim
Affects: 
(419 files)
/projects/clang500-import/contrib/*
/projects/clang500-import/lib/clang/*
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303571, and update
build glue.
20:34:51 - r318680
(5 days 8 hours ago)
by markj
Affects:  /head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.c
/head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
/head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile
Add a little helper program for tst.exitcore.ksh.

sleep(1) is capsicumized, which means that we cannot rely on it to dump
core as required by the test.

MFC after: 1 week
Sponsored by: Dell EMC Isilon
20:27:29 - r318679
(5 days 8 hours ago)
by slm
Affects:  /head/sys/dev/mpr/mpr_sas.c
Fix powerpc compiler error.

Approved by: ken
20:11:40 - r318678
(5 days 8 hours ago)
by oshogbo
Affects:  /head/sys/boot/common/dev_net.c
Replacing iterating over rootpath by strsep(3).

Submitted by: kczekirda
Reviewed by: tsoome, bapt, jhb, oshogbo
MFC after: 3 weeks
Sponsored by: Oktawave
Differential Revision: https://reviews.freebsd.org/D10726
20:00:01 - r318677
(5 days 8 hours ago)
by glebius
Affects: 
(4 files)
/head/sys/compat/ndis/*
/head/sys/dev/if_ndis/*
Fix regression in ndis(4) after r286410. This adds a bunch of checks for
whether this is a Ethernet or 802.11 device and does proper dereferencing.

PR: 213237
Submitted by: <ota j.email.ne.jp>
MFC after: 2 weeks
19:57:28 - r318676
(5 days 8 hours ago)
by davidcs
Affects:  /head/sys/dev/qlnx/qlnxe/qlnx_os.c
Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits.

Submitted by:Shminderjit.Singh@cavium.com
19:57:20 - r318675
(5 days 8 hours ago)
by rmacklem
Affects: 
(2 files)
/stable/10/sys/rpc/clnt_vc.c
MFC: r317906
Fix the client side krpc from doing TCP reconnects for ERESTART from sosend().

When sosend() replies ERESTART in the client side krpc, it indicates that
the RPC message hasn't yet been sent and that the send queue is full or
locked while a signal is posted for the process.
Without this patch, this would result in a RPC_CANTSEND reply from
clnt_vc_call(), which would cause clnt_reconnect_call() to create a new
TCP transport connection. For most NFS servers, this wasn't a serious problem,
although it did imply retries of outstanding RPCs, which could possibly
have missed the DRC.
For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since
AmazonEFS often didn't retain the NFSv4.1 session and would reply with
NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which
requires open/lock state recovery.

Three options were considered to fix this:
- Return the ERESTART all the way up to the system call boundary and then
  have the system call redone. This is fraught with risk, due to convoluted
  code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it
  is still a work in prgress and may not be feasible.
- Set SB_NOINTR for the socket buffer. This fixes the problem, but makes
  the sosend() completely non interruptible, which kib@ considered
  inappropriate. It also would break forced dismount when a thread
  was blocked in sosend().
- Modify the retry loop in clnt_vc_call(), so that it loops for this case
  for up to 15sec. Testing showed that the sosend() usually succeeded by
  the 2nd retry. The extreme case observed was 111 loop iterations, or
  about 100msec of delay.
This third alternative is what is implemented in this patch, since the
change is:
- localized
- straightforward
- forced dismount is not broken by it.

This patch has been tested by cperciva@ extensively against AmazonEFS.
19:44:26 - r318674
(5 days 9 hours ago)
by dim
Affects:  /vendor/lldb/lldb-trunk-r303571
Tag lldb trunk r303571.
19:44:21 - r318673
(5 days 9 hours ago)
by dim
Affects: 
(5 files)
/vendor/lldb/dist/*
Vendor import of lldb trunk r303571:
https://llvm.org/svn/llvm-project/lldb/trunk@303571
19:44:18 - r318672
(5 days 9 hours ago)
by dim
Affects:  /vendor/lld/lld-trunk-r303571
Tag lld trunk r303571.
19:44:12 - r318671
(5 days 9 hours ago)
by dim
Affects: 
(35 files)
/vendor/lld/dist/COFF/*
/vendor/lld/dist/ELF/*
/vendor/lld/dist/test/*
Vendor import of lld trunk r303571:
https://llvm.org/svn/llvm-project/lld/trunk@303571
19:44:10 - r318670
(5 days 9 hours ago)
by dim
Affects:  /vendor/libc++/libc++-trunk-r303571
Tag libc++ trunk r303571.
19:44:05 - r318669
(5 days 9 hours ago)
by dim
Affects: 
(7 files)
/vendor/libc++/dist/test/libcxx/selftest/*
/vendor/libc++/dist/utils/libcxx/compiler.py
/vendor/libc++/dist/utils/libcxx/test/*
Vendor import of libc++ trunk r303571:
https://llvm.org/svn/llvm-project/libcxx/trunk@303571
19:44:02 - r318668
(5 days 9 hours ago)
by dim
Affects:  /vendor/compiler-rt/compiler-rt-trunk-r303571
Tag compiler-rt trunk r303571.
19:43:56 - r318667
(5 days 9 hours ago)
by dim
Affects: 
(29 files)
/vendor/compiler-rt/dist/include/xray/xray_interface.h
/vendor/compiler-rt/dist/lib/*
/vendor/compiler-rt/dist/test/*
Vendor import of compiler-rt trunk r303571:
https://llvm.org/svn/llvm-project/compiler-rt/trunk@303571
19:43:53 - r318666
(5 days 9 hours ago)
by dim
Affects:  /vendor/clang/clang-trunk-r303571
Tag clang trunk r303571.
19:43:45 - r318665
(5 days 9 hours ago)
by dim
Affects: 
(123 files)
/vendor/clang/dist/*
Vendor import of clang trunk r303571:
https://llvm.org/svn/llvm-project/cfe/trunk@303571
19:43:35 - r318664
(5 days 9 hours ago)
by dim
Affects:  /vendor/llvm/llvm-trunk-r303571
Tag llvm trunk r303571.
19:43:28 - r318663
(5 days 9 hours ago)
by dim
Affects: 
(544 files)
/vendor/llvm/dist/*
Vendor import of llvm trunk r303571:
https://llvm.org/svn/llvm-project/llvm/trunk@303571
19:40:56 - r318662
(5 days 9 hours ago)
by davidcs
Affects: 
(4 files)
/stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h
/stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c
/stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c
MFC r318383
 QL_DPRINT macro modfied to handle multiple args; print line#.

Submitted by:Shminderjit.Singh@cavium.com
19:36:26 - r318661
(5 days 9 hours ago)
by davidcs
Affects: 
(5 files)
/stable/10/sys/dev/qlnx/qlnxe/*
/stable/10/sys/modules/qlnx/qlnxe/Makefile
MFC r318382
 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for
  processing interrupts drops to around 1% for 100G and under 1% for
  other speeds.
 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN
 3. remove unused mtx tx_lock
 4. bind taskqueue kernel thread to the appropriate cpu core
 5. when tx_ring is full, stop further transmits till at least 1/16th of
  the Tx Ring is empty. In our case 1K entries. Also if there are
  rx_pkts to process, put the taskqueue thread to sleep for 100ms,
  before enabling interrupts.
 6. Use rx_pkt_threshold of 128.
19:34:37 - r318660
(5 days 9 hours ago)
by rmacklem
Affects: 
(2 files)
/stable/11/sys/rpc/clnt_vc.c
MFC: r317906
Fix the client side krpc from doing TCP reconnects for ERESTART from sosend().

When sosend() replies ERESTART in the client side krpc, it indicates that
the RPC message hasn't yet been sent and that the send queue is full or
locked while a signal is posted for the process.
Without this patch, this would result in a RPC_CANTSEND reply from
clnt_vc_call(), which would cause clnt_reconnect_call() to create a new
TCP transport connection. For most NFS servers, this wasn't a serious problem,
although it did imply retries of outstanding RPCs, which could possibly
have missed the DRC.
For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since
AmazonEFS often didn't retain the NFSv4.1 session and would reply with
NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which
requires open/lock state recovery.

Three options were considered to fix this:
- Return the ERESTART all the way up to the system call boundary and then
  have the system call redone. This is fraught with risk, due to convoluted
  code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it
  is still a work in prgress and may not be feasible.
- Set SB_NOINTR for the socket buffer. This fixes the problem, but makes
  the sosend() completely non interruptible, which kib@ considered
  inappropriate. It also would break forced dismount when a thread
  was blocked in sosend().
- Modify the retry loop in clnt_vc_call(), so that it loops for this case
  for up to 15sec. Testing showed that the sosend() usually succeeded by
  the 2nd retry. The extreme case observed was 111 loop iterations, or
  about 100msec of delay.
This third alternative is what is implemented in this patch, since the
change is:
- localized
- straightforward
- forced dismount is not broken by it.

This patch has been tested by cperciva@ extensively against AmazonEFS.
19:28:38 - r318659
(5 days 9 hours ago)
by davidcs
Affects: 
(4 files)
/stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h
/stable/11/sys/dev/qlnx/qlnxe/qlnx_ioctl.c
/stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c
MFC r318383
 QL_DPRINT macro modfied to handle multiple args; print line#.

Submitted by:Shminderjit.Singh@cavium.com
19:28:24 - r318658
(5 days 9 hours ago)
by dim
Affects: 
(81 files)
/projects/clang500-import/*
Merge ^/head r318560 through r318657.
19:22:06 - r318657
(5 days 9 hours ago)
by davidcs
Affects: 
(5 files)
/stable/11/sys/dev/qlnx/qlnxe/*
/stable/11/sys/modules/qlnx/qlnxe/Makefile
MFC r318382
  1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for
  processing interrupts drops to around 1% for 100G and under 1% for
  other speeds.
  2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN
  3. remove unused mtx tx_lock
  4. bind taskqueue kernel thread to the appropriate cpu core
  5. when tx_ring is full, stop further transmits till at least 1/16th of
  the Tx Ring is empty. In our case 1K entries. Also if there are
  rx_pkts to process, put the taskqueue thread to sleep for 100ms,
  before enabling interrupts.
  6. Use rx_pkt_threshold of 128.
19:06:39 - r318656
(5 days 9 hours ago)
by dim
Affects:  /projects/clang500-import/lib/clang/libllvm/Makefile
/projects/clang500-import/lib/clang/llvm.build.mk
Following upstream trunk, enable the new global instruction selection
(GlobalISel), cleanup some defines, and adjust the libllvm Makefile for
this.
16:16:48 - r318655
(5 days 12 hours ago)
by dim
Affects:  /head/contrib/llvm/include/llvm/MC/ConstantPools.h
/head/contrib/llvm/lib/MC/ConstantPools.cpp
/head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
Pull in r302416 from upstream llvm trunk (by Martin Storsjö):

  [ARM] Clear the constant pool cache on explicit .ltorg directives

  Multiple ldr pseudoinstructions with the same constant value will
  reuse the same constant pool entry. However, if the constant pool is
  explicitly flushed with a .ltorg directive, we should not try to
  reference constants in the previous pool any longer, since they may
  be out of range.

  This fixes assembling hand-written assembler source which repeatedly
  loads the same constant value, across a binary size larger than the
  pc-relative fixup range for ldr instructions (4096 bytes). Such
  assembler source already uses explicit .ltorg instructions to emit
  constant pools with regular intervals. However if we try to reuse
  constants emitted in earlier pools, they end up out of range.

  This makes the output of the testcase match what binutils gas does
  (prior to this patch, it would fail to assemble).

  Differential Revision: https://reviews.llvm.org/D32847

This should fix "out of range pc-relative fixup value" errors, when
compiling certain ARM inline assembly for www/webkit-gtk[23].

Reported by: mmel
MFC after: 3 days
16:13:30 - r318654
(5 days 12 hours ago)
by dim
Affects:  /head/lib/Makefile
For now, disable building libc++experimental for arm, since there are a
number of static assertion failures in the time_t related parts.

Reported by: mmel, kib
16:11:46 - r318653
(5 days 12 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/usr.bin/sort/sort.1.in
/stable/11/usr.bin/sort/sort.1.in
MFC r305613 (gabor):
 Fix typo.

PR: 211245
Sponsored by: The FreeBSD Foundation
16:07:17 - r318652
(5 days 12 hours ago)
by gjb
Affects: 
(2 files)
/stable/11/etc/rc
MFC r307469 (imp):
 Allow root_rw_mount to be both lower and upper case. Before, if it was
 upper case, you'd wind up with a read-only filesystem when you should
 sometimes.

PR: 213549
Sponsored by: The FreeBSD Foundation
15:53:30 - r318651
(5 days 12 hours ago)
by ngie
Affects:  /head/sys/Makefile
Remove glimpse make target added in r181432

The textproc/glimpse port expired over 3 years ago because there weren't any
more publicly available distfiles, and because it lacked a maintainer. Remove
the target as it's no longer executable on FreeBSD.

Differential Revision: D10764
MFC after: 1 month
Reviewed by: imp
Sponsored by: Dell EMC Isilon
15:51:17 - r318650
(5 days 12 hours ago)
by gjb
Affects: 
(4 files)
/stable/10/usr.bin/grep/grep.1
/stable/11/usr.bin/grep/grep.1
MFC r313955 (emaste):
 bsdgrep: document ignored option -u

 MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if
 running on an UNIX system." The option has no effect on systems that
 do not use CRLF line endings.

PR: 171200
Sponsored by: The FreeBSD Foundation
15:29:10 - r318649
(5 days 13 hours ago)
by tuexen
Affects:  /head/sys/netinet/tcp_usrreq.c
/head/sys/netinet6/udp6_usrreq.c
The connect() system call should return -1 and set errno to EAFNOSUPPORT
if it is called on a TCP socket
 * with an IPv6 address and the socket is bound to an
  IPv4-mapped IPv6 address.
 * with an IPv4-mapped IPv6 address and the socket is bound to an
  IPv6 address.
Thanks to Jonathan T. Leighton for reporting this issue.

Reviewed by: bz gnn
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9163
15:12:49 - r318648
(5 days 13 hours ago)
by asomers
Affects: 
(2 files)
/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
MFC r318189:

vdev_geom may associate multiple vdevs per g_consumer

vdev_geom.c currently uses the g_consumer's private field to point to a
vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For
example, when you remove a disk, the vdev's status will change to REMOVED.
However, vdev_geom will sometimes attach multiple vdevs to the same GEOM
consumer. If this happens, then geom events will only be propagated to one
of the vdevs.

Fix this by storing a linked list of vdevs in g_consumer's private field.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

* g_consumer.private now stores a linked list of vdev pointers associated
  with the consumer instead of just a single vdev pointer.

* Change vdev_geom_set_physpath's signature to more closely match
  vdev_geom_set_rotation_rate

* Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed
  that we've already accessed the consumer by the time we get here.

* Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it
  in vdev_geom_open, after we know that the open has succeeded.

PR: 218634
Reviewed by: gibbs
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10391
14:46:13 - r318647
(5 days 14 hours ago)
by zbb
Affects: 
(10 files)
/head/share/man/man4/ena.4
/head/sys/*
Add support for Amazon Elastic Network Adapter (ENA) NIC

ENA is a networking interface designed to make good use of modern CPU
features and system architectures.

The ENA device exposes a lightweight management interface with a
minimal set of memory mapped registers and extendable command set
through an Admin Queue.

The driver supports a range of ENA devices, is link-speed independent
(i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has
a negotiated and extendable feature set.

Some ENA devices support SR-IOV. This driver is used for both the
SR-IOV Physical Function (PF) and Virtual Function (VF) devices.

ENA devices enable high speed and low overhead network traffic
processing by providing multiple Tx/Rx queue pairs (the maximum number
is advertised by the device via the Admin Queue), a dedicated MSI-X
interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized
data placement.

The ENA driver supports industry standard TCP/IP offload features such
as checksum offload and TCP transmit segmentation offload (TSO).
Receive-side scaling (RSS) is supported for multi-core scaling.

The ENA driver and its corresponding devices implement health
monitoring mechanisms such as watchdog, enabling the device and driver
to recover in a manner transparent to the application, as well as
debug logs.

Some of the ENA devices support a working mode called Low-latency
Queue (LLQ), which saves several more microseconds. This feature will
be implemented for driver in future releases.

Submitted by: Michal Krawczyk <mk@semihalf.com>
  Jakub Palider <jpa@semihalf.com>
  Jan Medala <jan@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10427
14:21:45 - r318646
(5 days 14 hours ago)
by gjb
Affects:  /head/release/Makefile
/head/release/scripts/pkg-stage.sh
Allow PORTSDIR to be overridden in the pkg-stage target.

Submitted by: Johannes Jost Meixner (original)
PR: 218393
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
14:21:07 - r318645
(5 days 14 hours ago)
by gjb
Affects:  /head/gnu/usr.bin/groff/tmac/mdoc.local.in
Add 11.1 to the mdoc(7) mdoc.local.in.

Sponsored by: The FreeBSD Foundation
13:56:34 - r318644
(5 days 14 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r318576, efivar(8) addition.

Sponsored by: The FreeBSD Foundation
13:55:59 - r318643
(5 days 14 hours ago)
by gjb
Affects:  /head/usr.sbin/efivar/efivar.8
Correct the "first appeared in" version for efivar(8).

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
13:27:31 - r318642
(5 days 15 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r315514, if_ipsec(4) addition.

Submitted by: ae
Sponsored by: The FreeBSD Foundation
13:21:28 - r318641
(5 days 15 hours ago)
by vangyzen
Affects:  /head/lib/libthr/Makefile
Revert r318583 (libthr: use default WARNS level of 6)

Revert this while I fix RISC-V, SPARC, and probably all architectures
that use GCC.

Reported by: kib
Pointy hat to: vangyzen
Sponsored by: Dell EMC
13:15:59 - r318640
(5 days 15 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Fix typo: s/LDD/LLD/

Spotted by: vangyzen
Sponsored by: The FreeBSD Foundation
13:00:11 - r318639
(5 days 15 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r309312, PCI passthrough enabled on Hyper-V VMs.
Document r314091, hv_netvsc(4) SR-IOV/VF support.
Document r316272, Hyper-V Gen 2 support.
Document r317119, Hyper-V synthetic keyboard support.

Submitted by: sephe
Sponsored by: The FreeBSD Foundation
13:00:10 - r318638
(5 days 15 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Document r318472, LDD enabled by default on arm64.

Submitted by: andrew
Sponsored by: The FreeBSD Foundation
12:35:31 - r318637
(5 days 16 hours ago)
by mmel
Affects: 
(2 files)
/stable/11/sys/arm/include/vmparam.h
MFC r318530:

  Increase maximum text segment size. LLVM binaries are huge...
12:28:20 - r318636
(5 days 16 hours ago)
by gjb
Affects:  /stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml
Fix typo and grammar.

Submitted by: pfg
Sponsored by: The FreeBSD Foundation
11:45:45 - r318635
(5 days 17 hours ago)
by emaste
Affects:  /head/sys/compat/freebsd32/freebsd32_sysent.c
/head/sys/kern/init_sysent.c
Regen sysent after r318634, no open(2) in capability mode

Sponsored by: The FreeBSD Foundation
11:43:19 - r318634
(5 days 17 hours ago)
by emaste
Affects:  /head/sys/compat/freebsd32/capabilities.conf
/head/sys/kern/capabilities.conf
disallow open(2) in capability mode

Previously open(2) was allowed in capability mode, with a comment that
suggested this was likely the case to facilitate debugging. The system
call would still fail later on, but it's better to disallow the syscall
altogether.

We now have the kern.trap_enotcap sysctl or PROC_TRAPCAP_CTL proccontrol
to aid in debugging.

In any case libc has translated open() to the openat syscall since
r277032.

Reviewed by: kib, rwatson
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10850
11:41:17 - r318633
(5 days 17 hours ago)
by royger
Affects:  /head/usr.sbin/bsdinstall/scripts/script
bsdinstall: do not use distextract in scripted mode

It requires a tty, which might not be available in scripted installs. Instead
extract the sets manually using tar.

Reviewed by: tsoome
Sponsored by: Citrix Systems R&D
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D10736
11:38:39 - r318632
(5 days 17 hours ago)
by royger
Affects:  /head/usr.sbin/bsdinstall/scripts/script
bsdinstall: mount is not needed for the ZFS install case

Because the datasets are already mounted by zfsboot, and the mount script
doesn't know anything about ZFS. Also do not execute the "umount" script for
ZFS for the same reasons.

Reviewed by: dteske, tsoome
Sponsored by: Citrix Systems R&D
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D10738
11:33:44 - r318631
(5 days 17 hours ago)
by royger
Affects:  /head/sys/dev/xen/netfront/netfront.c
xen/netfront: don't drop the RX lock in xn_rxeof

Since netfront uses different locks for the RX and TX paths there's no need to
drop the RX lock before calling if_input.

Suggested by: jhb
Tested by: cperciva
Sponsored by: Citrix Systems R&D
MFC with: r318523
10:28:17 - r318630
(5 days 18 hours ago)
by n_hibma
Affects:  /stable/11/sbin/dhclient/dhclient.c
/stable/11/sbin/dhclient/options.c
MFC:

  ------------------------------------------------------------------------
  r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines

  Fix the output of very large rebind, renew and lease time options in
  lease file.

  Some routers set very large values for rebind time (Netgear) and these
  are erroneously reported as negative in the leasefile. This was due to a
  wrong printf format specification of %ld for an unsigned long on 32-bit
  platforms.

  ------------------------------------------------------------------------
  r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines

  Fix handling of large DHCP expiry values.

  They would overflow a signed 32-bit time_t on 32 bit architectures. This
  was taken care of, but a compiler optimisation makes this behave
  erratically. This could be resolved by adding a -fwrapv flag, but
  instead we can check the value before adding the current timestamp to
  it.

  In the lease file values are still wrong though:

  option dhcp-rebinding-time -644245096;

PR: 218980
08:20:50 - r318629
(5 days 20 hours ago)
by hselasky
Affects: 
(3 files)
/stable/9/sys/ofed/drivers/net/mlx4/eq.c
/stable/9/sys/ofed/drivers/net/mlx4/main.c
MFC r318531:

mlx4: Use the CQ quota for SRIOV when creating completion EQs

When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.

When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker). Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).

Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.

Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.

Sponsored by: Mellanox Technologies
08:19:08 - r318628
(5 days 20 hours ago)
by hselasky
Affects: 
(3 files)
/stable/10/sys/ofed/drivers/net/mlx4/eq.c
/stable/10/sys/ofed/drivers/net/mlx4/main.c
MFC r318531:

mlx4: Use the CQ quota for SRIOV when creating completion EQs

When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.

When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker). Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).

Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.

Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.

Sponsored by: Mellanox Technologies
08:17:07 - r318627
(5 days 20 hours ago)
by hselasky
Affects: 
(3 files)
/stable/11/sys/ofed/drivers/net/mlx4/eq.c
/stable/11/sys/ofed/drivers/net/mlx4/main.c
MFC r318531:

mlx4: Use the CQ quota for SRIOV when creating completion EQs

When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.

When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker). Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).

Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.

Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.

Sponsored by: Mellanox Technologies
06:29:20 - r318626
(5 days 22 hours ago)
by ngie
Affects: 
(3 files)
/stable/10/sys/boot/efi/boot1/boot1.c
/stable/10/sys/boot/efi/boot1/boot_module.h
MFC r316103:

Remove redundant declarations

They're already defined in libstand.h
06:26:22 - r318625
(5 days 22 hours ago)
by ngie
Affects: 
(3 files)
/stable/11/sys/boot/efi/boot1/boot1.c
/stable/11/sys/boot/efi/boot1/boot_module.h
MFC r316103:

Remove redundant declarations

They're already defined in libstand.h
06:24:43 - r318624
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/share/man/man4/usb.4
MFC r317594:

usb(4): manpage cleanup

1. Wrap at <80 columns for readability when editing. Rewrap some lines
  prematurely wrapped to better fit in <80 columns and not waste
  vertical space.
2. Fix SEE ALSO sorting (sort by section first, then manpage name).
3. Tweak the compound device description slightly by adding soft stops
  via commas.

Sponsored by Dell EMC Isilon
06:20:58 - r318623
(5 days 22 hours ago)
by ngie
Affects: 
(5 files)
/stable/10/sbin/mount/mount.8
/stable/10/sbin/mount_cd9660/mount_cd9660.8
/stable/10/share/man/man5/*
MFC r315775:

Add a post-humous manpage for cd9660(5), the ISO-9660 file system

Describe (briefly) how to compile the filesystem into the kernel and
load as a module.

Reference cd9660(5) in mount(8) and mount_cd9660(8).
06:20:22 - r318622
(5 days 22 hours ago)
by ngie
Affects: 
(5 files)
/stable/11/sbin/mount/mount.8
/stable/11/sbin/mount_cd9660/mount_cd9660.8
/stable/11/share/man/man5/*
MFC r315775:

Add a post-humous manpage for cd9660(5), the ISO-9660 file system

Describe (briefly) how to compile the filesystem into the kernel and
load as a module.

Reference cd9660(5) in mount(8) and mount_cd9660(8).
06:19:27 - r318621
(5 days 22 hours ago)
by ngie
Affects:  /stable/11/share/man/man5/src.conf.5
Regenerate src.conf(5)
06:18:15 - r318620
(5 days 22 hours ago)
by ngie
Affects:  /stable/11/share/man/man5/src.conf.5
Revert commit again to correct it

Obviously my brain's on autopilot tonight
06:17:14 - r318619
(5 days 22 hours ago)
by ngie
Affects:  /stable/11/share/man/man5/src.conf.5
MFC r311135:

Add documentation for MK_EFI added in r307243
06:15:50 - r318618
(5 days 22 hours ago)
by ngie
Affects: 
(3 files)
/stable/11/tools/build/options/WITHOUT_EFI
/stable/11/tools/build/options/WITH_EFI
MFC r311135:

Add documentation for MK_EFI added in r307243
06:12:30 - r318617
(5 days 22 hours ago)
by ngie
Affects:  /stable/10/share/man/man5/src.conf.5
Regenerate src.conf(5) per r318614
06:10:46 - r318616
(5 days 22 hours ago)
by ngie
Affects:  /stable/10/share/man/man5/src.conf.5
Revert r318615 to correct commit message
06:09:47 - r318615
(5 days 22 hours ago)
by ngie
Affects:  /stable/10/share/man/man5/src.conf.5
MFC r315766,r315768:

r315766:

Note that tools/build/options/makeman automatically generated src.conf(5)

This (as a bonus) fixes mdoc warnings with src.conf(5) :)..

r315768:

Remove the .Pa portion I added to the .An macro in AUTHORS section

That doesn't work (mandoc complains about the macro being empty).

That's what I get for being clever and not verifying before committing
things again *sigh*.

Partyhat to: ngie
06:08:20 - r318614
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/tools/build/options/makeman
MFC r315766,r315768:

r315766:

Note that tools/build/options/makeman automatically generated src.conf(5)

This (as a bonus) fixes mdoc warnings with src.conf(5) :)..

r315768:

Remove the .Pa portion I added to the .An macro in AUTHORS section

That doesn't work (mandoc complains about the macro being empty).

That's what I get for being clever and not verifying before committing
things again *sigh*.

Partyhat to: ngie
06:08:19 - r318613
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/tools/build/options/makeman
MFC r315766,r315768:

r315766:

Note that tools/build/options/makeman automatically generated src.conf(5)

This (as a bonus) fixes mdoc warnings with src.conf(5) :)..

r315768:

Remove the .Pa portion I added to the .An macro in AUTHORS section

That doesn't work (mandoc complains about the macro being empty).

That's what I get for being clever and not verifying before committing
things again *sigh*.

Partyhat to: ngie
06:07:09 - r318612
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/share/man/man3/intro.3
MFC r315793:

intro(3): fix markup

- Use `Em` with `.It` macro when referring to other libraries, instead of
  `Xr`.
- Use `.Em` instead of `.Xr` when referring to libraries.
- Remove commented out lines.
06:06:48 - r318611
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/share/man/man3/intro.3
MFC r315793:

intro(3): fix markup

- Use `Em` with `.It` macro when referring to other libraries, instead of
  `Xr`.
- Use `.Em` instead of `.Xr` when referring to libraries.
- Remove commented out lines.
06:05:35 - r318610
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.bin/which/which.c
MFC r317160:

Clean up trailing whitespace

No functional changes
06:05:14 - r318609
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.bin/which/which.c
MFC r317160:

Clean up trailing whitespace

No functional changes
06:04:20 - r318608
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/10/usr.sbin/rpcbind/rpcbind.c
MFC r317154:

Print out the signal number on exit in terminate(..) if WARMSTART is compiled
into rpcbind.

The signal number can provide helpful diagnostic info.

Obtained from: Isilon OneFS
06:03:51 - r318607
(5 days 22 hours ago)
by ngie
Affects: 
(2 files)
/stable/11/usr.sbin/rpcbind/rpcbind.c
MFC r317154:

Print out the signal number on exit in terminate(..) if WARMSTART is compiled
into rpcbind.

The signal number can provide helpful diagnostic info.

Obtained from: Isilon OneFS
03:01:35 - r318606
(6 days 1 hour ago)
by cy
Affects:  /head/sys/contrib/ipfilter/netinet/ip_fil.h
Refactor & compact struct i6addr_t #ifdef: remove redundant structure
definintion when USE_INET6 is false.

MFC after: 1 week
02:30:15 - r318605
(6 days 2 hours ago)
by sephe
Affects: 
(2 files)
/stable/10/sys/net/if_vlan_var.h
MFC 318512

  net/vlan: Revert 305177

  Miss read the parentheses.

  Reported by: oleg@
  Reviewed by: hps@
  Sponsored by: Microsoft
02:09:27 - r318604
(6 days 2 hours ago)
by sephe
Affects: 
(2 files)
/stable/11/sys/net/ethernet.h
MFC 318512

  net/vlan: Revert 305177

  Miss read the parentheses.

  Reported by: oleg@
  Reviewed by: hps@
  Sponsored by: Microsoft
01:10:12 - r318603
(6 days 3 hours ago)
by emaste
Affects:  /head/contrib/elftoolchain/nm/nm.1
nm: document 'r' symbol type

PR: 219245
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 44 ms, 442 revisions printed. Current time is 2017-05-28 04:47:48. All times are in UTC/GMT.