]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoAdd a runner script for cryptotest.
gnn [Fri, 2 Sep 2016 21:35:32 +0000 (21:35 +0000)]
Add a runner script for cryptotest.

Althought cryptotest itself has a -z mode to test all algorithms at a variety
of sizes, this script allows us to be more selective.  Threads and buffer sizes
move in powers of two from 1, for threads, and 256 for buffer sizes.

e.g.  cryptorun.sh aes 4 512

Test aes with 1, 2 and 4 processes, and at sizes of 256 and 512 bytes.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agodhclient: add support for interface-mtu (26)
cem [Fri, 2 Sep 2016 21:14:29 +0000 (21:14 +0000)]
dhclient: add support for interface-mtu (26)

Make dhclient set interface MTU if it was provided.

This version implements MTU setting in dhclient itself before it runs
dhclient-script.

PR: 206721
Submitted by: novel@
Reported by: Jarrod Petz <jlpetz at gmail.com>
Reviewed by: cem, allanjude
Differential Revision: https://reviews.freebsd.org/D5675

7 years agosh: Add some tests for non-standard features of the echo builtin.
jilles [Fri, 2 Sep 2016 21:13:46 +0000 (21:13 +0000)]
sh: Add some tests for non-standard features of the echo builtin.

MFC after: 1 week

7 years agoClean up the usage message and remove dead code.
gnn [Fri, 2 Sep 2016 21:11:37 +0000 (21:11 +0000)]
Clean up the usage message and remove dead code.

Reviewed by: cem
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D7765

7 years agoDIRDEPS_BUILD: Update dependencies after a 'make bootstrap-tools'.
bdrewery [Fri, 2 Sep 2016 20:41:43 +0000 (20:41 +0000)]
DIRDEPS_BUILD: Update dependencies after a 'make bootstrap-tools'.

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

7 years agoRenaming libifc to libifconfig in response to feedback on initial commit of
kp [Fri, 2 Sep 2016 18:33:08 +0000 (18:33 +0000)]
Renaming libifc to libifconfig in response to feedback on initial commit of
this library. Sticking to 'libifconfig' (and 'ifconfig_' as function prefix)
should reduce chances of namespace collisions, make it more clear what the
library does, and be more in line with existing libraries.

Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Differential Revision: https://reviews.freebsd.org/D7742
Reviewed by: cem, kp

7 years agoWhen -n is specified, don't make bogus DNS queries. Instead,
ume [Fri, 2 Sep 2016 18:28:14 +0000 (18:28 +0000)]
When -n is specified, don't make bogus DNS queries.  Instead,
when -n is specified more than once, hostnames stored in utmp
are attempted to resolve to display them as network addresses.

PR: 212272

7 years agoMerge from CheriBSD:
brooks [Fri, 2 Sep 2016 18:22:56 +0000 (18:22 +0000)]
Merge from CheriBSD:

Rename sigprop-table constants to SIGPROP_ from SA_ to reduce the
impression of a namespace collision.

Submitted by: rwatson
Reviewed by: jhb, kib (slightly different versions)
Obtained from: CheriBSD (814ec5771cb1cb53deba317c561de62a91ae7684)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D7616

7 years agoAdd a pc_clock pcpu field and use it to implement cpu_est_clockrate. This
andrew [Fri, 2 Sep 2016 10:13:51 +0000 (10:13 +0000)]
Add a pc_clock pcpu field and use it to implement cpu_est_clockrate. This
will allow drivers that manage the clock frequency to communicate this with
the reset of the kernel.

Reported by: jmcneill
MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoFix array size issue when using the pre-scaling feature for
hselasky [Fri, 2 Sep 2016 08:44:14 +0000 (08:44 +0000)]
Fix array size issue when using the pre-scaling feature for
ISOCHRONOUS USB transfers. Make sure enough length and buffer pointers
are allocated when setting up the libusb transfer structure to support
the maximum number of frames the kernel can handle.

MFC after: 1 week

7 years agoSkip :test_large on i386
ngie [Fri, 2 Sep 2016 08:17:43 +0000 (08:17 +0000)]
Skip :test_large on i386

More assertions are failing on ^/head now.

PR: 205446
Sponsored by: EMC / Isilon Storage Division

7 years agohyperv/ic: Cleanup timesync channel callback.
sephe [Fri, 2 Sep 2016 06:23:28 +0000 (06:23 +0000)]
hyperv/ic: Cleanup timesync channel callback.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7745

7 years agohyperv/ic: Cleanup shutdown channel callback.
sephe [Fri, 2 Sep 2016 06:15:30 +0000 (06:15 +0000)]
hyperv/ic: Cleanup shutdown channel callback.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7744

7 years agohyperv/ic: Minor style fix.
sephe [Fri, 2 Sep 2016 06:08:08 +0000 (06:08 +0000)]
hyperv/ic: Minor style fix.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7743

7 years agonet/rndis: Define common message header for RNDIS messages.
sephe [Fri, 2 Sep 2016 05:57:13 +0000 (05:57 +0000)]
net/rndis: Define common message header for RNDIS messages.

And avoid RNDIS_HEADER_OFFSET hardcoding.

Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7739

7 years agonet/rndis: Add comment for rndis_comp_hdr
sephe [Fri, 2 Sep 2016 05:49:38 +0000 (05:49 +0000)]
net/rndis: Add comment for rndis_comp_hdr

Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7738

7 years agohyperv/hn: Use the per-packet-info types defined by net/rndis.h
sephe [Fri, 2 Sep 2016 05:30:38 +0000 (05:30 +0000)]
hyperv/hn: Use the per-packet-info types defined by net/rndis.h

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7737

7 years agohyperv/hn: Simplify RX hash related bits.
sephe [Fri, 2 Sep 2016 03:19:55 +0000 (03:19 +0000)]
hyperv/hn: Simplify RX hash related bits.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7736

7 years agocron: use existing maximum username constant MAXLOGNAME
emaste [Fri, 2 Sep 2016 03:15:54 +0000 (03:15 +0000)]
cron: use existing maximum username constant MAXLOGNAME

Previously cron had its own maximum username length limit, which was
smaller than the system's MAXLOGNAME. This could lead to crontab -u
updating the wrong user's crontab (if the name was truncated, and
matched another user).

PR: 212305
Reported by: Andrii Kuzik
Reviewed by: allanjude, jilles
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7747

7 years agohyperv/hn: Rework RXCSUM related bits
sephe [Fri, 2 Sep 2016 03:10:30 +0000 (03:10 +0000)]
hyperv/hn: Rework RXCSUM related bits

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7735

7 years agoRevert r304192 to fix short month names and replace %b with %_m in date_fmt
kevlo [Fri, 2 Sep 2016 00:43:03 +0000 (00:43 +0000)]
Revert r304192 to fix short month names and replace %b with %_m in date_fmt
for Chinese locales.

As mentioned in the commit message of r289041, nl_langinfo(ABMON_*) only
returned numbers when using a Chinese locale, this causes problems in
applications that put the short month name and the day of the month together.

Spotted by: Ting-Wei Lan <lantw44 gmail com>

7 years agoReplace %m with %_m in date_fmt for Chinese locales.
kevlo [Fri, 2 Sep 2016 00:27:27 +0000 (00:27 +0000)]
Replace %m with %_m in date_fmt for Chinese locales.
This is a fix for the problem mentioned in the PR.

PR: 199441

7 years agocxgbe/cxgbei: Provide a knob to set the DDP threshold for iSCSI
np [Fri, 2 Sep 2016 00:21:24 +0000 (00:21 +0000)]
cxgbe/cxgbei: Provide a knob to set the DDP threshold for iSCSI
transfers.

The Initiator and Target both perform zero copy receive for transfers
greater than or equal to this threshold.

Sponsored by: Chelsio Communications

7 years agoInitialize lists of signals using C99 designators
brooks [Fri, 2 Sep 2016 00:16:19 +0000 (00:16 +0000)]
Initialize lists of signals using C99 designators

Reviewed by: jilles
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D7601

7 years agocxgbe/cxgbei: Count various events related to iSCSI operation and make
np [Thu, 1 Sep 2016 23:58:36 +0000 (23:58 +0000)]
cxgbe/cxgbei: Count various events related to iSCSI operation and make
these counters available in the sysctl MIB.

Sponsored by: Chelsio Communications

7 years agoioat(4): Despam relatively common hardware reset messages
cem [Thu, 1 Sep 2016 23:56:02 +0000 (23:56 +0000)]
ioat(4): Despam relatively common hardware reset messages

Reported by: ngie@

7 years agoDIRDEPS_BUILD: Build crunchide for the host.
bdrewery [Thu, 1 Sep 2016 23:52:25 +0000 (23:52 +0000)]
DIRDEPS_BUILD: Build crunchide for the host.

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

7 years agoDIRDEPS_BUILD: Include crunched object meta files for gendirdeps.
bdrewery [Thu, 1 Sep 2016 23:52:20 +0000 (23:52 +0000)]
DIRDEPS_BUILD: Include crunched object meta files for gendirdeps.

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

7 years agoBump __FreeBSD_version for crunchgen META_MODE fix in r305254.
bdrewery [Thu, 1 Sep 2016 23:22:31 +0000 (23:22 +0000)]
Bump __FreeBSD_version for crunchgen META_MODE fix in r305254.

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

7 years agoDIRDEPS_BUILD: Fix 'make bootstrap-tools' not using the proper tblgen binaries.
bdrewery [Thu, 1 Sep 2016 23:21:12 +0000 (23:21 +0000)]
DIRDEPS_BUILD: Fix 'make bootstrap-tools' not using the proper tblgen binaries.

This was an incomplete item from r291561.  The host {clang,llvm}-tblgen
binaries were used, rather than the ones built into the host stagedir by
normal Makefile.depend dependencies on tblgen.

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

7 years agoMETA_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds.
bdrewery [Thu, 1 Sep 2016 23:21:08 +0000 (23:21 +0000)]
META_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds.

- DIRDEPS_BUILD: Fix crunchgen builds losing their library dependencies
  on a nop-rebuild.
- META_MODE: Fix not rebuilding various crunch.mk targets if their .meta
  files warrant a rebuild.  They were lacking .meta files previously.
  This adds .NOMETA to the crunch objects being used since they are
  already built.  Bmake was forcing a rebuild on them since their
  .meta files were not in the expected place; there is no reason to
  rebuild them.

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

7 years agoMETA_MODE: Don't expect .meta files for side-effect generated files.
bdrewery [Thu, 1 Sep 2016 23:20:54 +0000 (23:20 +0000)]
META_MODE: Don't expect .meta files for side-effect generated files.

This is similar to r301285.

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

7 years agocxgbe/cxgbei: Minor changes in the iSCSI CPL handlers.
np [Thu, 1 Sep 2016 22:40:55 +0000 (22:40 +0000)]
cxgbe/cxgbei: Minor changes in the iSCSI CPL handlers.

- Use m_copydata instead of bcopy.
- Add new assertions.
- Log some more information.

Sponsored by: Chelsio Communications

7 years agoRemove warning about pci_addr_t being different sizes.
jhb [Thu, 1 Sep 2016 21:30:12 +0000 (21:30 +0000)]
Remove warning about pci_addr_t being different sizes.

pci_addr_t has always been 64-bits since r163805.

MFC after: 1 week

7 years agoAdd support for changing A23 PLL1 frequency.
jmcneill [Thu, 1 Sep 2016 21:20:07 +0000 (21:20 +0000)]
Add support for changing A23 PLL1 frequency.

7 years agoAdd support for setting DCDC2 voltage.
jmcneill [Thu, 1 Sep 2016 21:19:11 +0000 (21:19 +0000)]
Add support for setting DCDC2 voltage.

7 years agoRemove the digi(4) manpage and digi from the release notes.
jhb [Thu, 1 Sep 2016 21:16:29 +0000 (21:16 +0000)]
Remove the digi(4) manpage and digi from the release notes.

7 years agoDIRDEPS_BUILD: Add missing crunchgen host tool.
bdrewery [Thu, 1 Sep 2016 21:15:37 +0000 (21:15 +0000)]
DIRDEPS_BUILD: Add missing crunchgen host tool.

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

7 years agofgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete
ache [Thu, 1 Sep 2016 20:45:04 +0000 (20:45 +0000)]
fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete
sequence near EOF), so we can't just check for
(wc == WEOF && !__sfeof(fp)) and must relay on __sferror(fp) with
__SERR clearing/restoring.

MFC after:      7 days

7 years agocxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to
np [Thu, 1 Sep 2016 20:43:01 +0000 (20:43 +0000)]
cxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to
routines available in t4_tom to manage the iSCSI DDP page pod region.

This adds the ability to use multiple DDP page sizes to the iSCSI
driver, among other improvements.

Sponsored by: Chelsio Communications

7 years agoRemove the digi(4) drivers.
jhb [Thu, 1 Sep 2016 19:51:35 +0000 (19:51 +0000)]
Remove the digi(4) drivers.

These drivers were never updated for the new TTY changes and have
been disconnected from the build since 8.0.

Ok'd by: imp, peterj

7 years agoThe log message for the previous commit didn't mention the most the
bde [Thu, 1 Sep 2016 19:18:26 +0000 (19:18 +0000)]
The log message for the previous commit didn't mention the most the
important detail that sc_cngetc() now opens and closes the keyboard
on every call again.  This was moved from sc_cngetc() to scn_cngrab/
ungrab() in r228644, but the change wasn't quite complete.  After
fixes for nesting in kbdd_poll() in ukbd and kbdmux, these opens
and closes should have no significant effect if done while grabbed.
They fix unusual cases when cngetc() is called while not grabbed.

This commit is the main fix for screen locking in sc_cnputc():
detect deadlock or likely-deadlock and handle it by buffering the
output atomically and printing it later if the deadlock condition
clears (and sc_cnputc() is called).

The most common deadlock is when the screen lock is held by ourself.
Then it would be safe to acquire the lock recursively if the console
driver is calling printf() in a safe context, but we don't know when
that is.  It is not safe to ignore the lock even in kdb or panic mode.
But ignore it in panic mode.  The only other known case of deadlock
is when another thread holds the lock but is running on a stopped CPU.
Detect that case approximately by using trylock and retrying for 1000
usec.  On a 4 GHz CPU, 100 usec is almost long enough -- screen switches
take slightly longer than that.  Not retrying at all is good enough
except for stress tests, and planned future versions will extend the
timeout so that the stress tests work better.

To see the behaviour when deadlock is detected, single step through
sctty_outwakeup() (or sc_puts() to start with deadlock).  Another
(serial) console is needed to the buffered-only output, but the
keyboard works in this context to continue or step out of the
deadlocked region.  The buffer is not large enough to hold all the
output for this.

7 years agoMFV r304158:
mav [Thu, 1 Sep 2016 18:37:11 +0000 (18:37 +0000)]
MFV r304158:
7136 ESC_VDEV_REMOVE_AUX ought to always include vdev information

7115 6922 generates ESC_ZFS_VDEV_REMOVE_AUX a bit too often

illumos/illumos-gate@b72b6bb10ad55121a1b352c6f68ebdc8e20c9086
https://github.com/illumos/illumos-gate/commit/b72b6bb10ad55121a1b352c6f68ebdc8e
20c9086

https://www.illumos.org/issues/7136
  6922 added ESC_ZFS_VDEV_REMOVE_AUX and ESC_ZFS_VDEV_REMOVE_DEV sysevents
  whenever an aux device gets removed from a pool. However, those sysevents will
  be created without the vdev_guid and vdev_path fields. It would be better to
  always populate those fields.

https://www.illumos.org/issues/7115
  The addition of spa_event_notify in vdev removal code (see #6922) causes event
s
  to be generated even if the spare failed to be removed with EBUSY.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

7 years agoMFV r302993: 7104 increase indirect block size
mav [Thu, 1 Sep 2016 18:33:39 +0000 (18:33 +0000)]
MFV r302993: 7104 increase indirect block size

illumos/illumos-gate@4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1c
https://github.com/illumos/illumos-gate/commit/4b5c8e93cab28d3c65ba9d407fd8f46e3
be1db1c

https://www.illumos.org/issues/7104
  The current default indirect block size is 16KB. We can improve
  performance by increasing it to 128KB. This is especially helpful for
  any workload that needs to read most of the metadata, e.g.
  scrub/resilver, file deletion, filesystem deletion, and zfs send.
  We also need to fix a few space estimation errors to make the tests
  pass.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT
mav [Thu, 1 Sep 2016 18:25:49 +0000 (18:25 +0000)]
MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT

illumos/illumos-gate@25f7d993adbfb3452ac4625b3791670746d35ae3
https://github.com/illumos/illumos-gate/commit/25f7d993adbfb3452ac4625b379167074
6d35ae3

https://www.illumos.org/issues/7071
  upstream
  DLPX-40482 lzc_snapshot does not fill in errlist on ENOENT

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoIf error happens, don't overwrite original errno comes from __mbrtowc()
ache [Thu, 1 Sep 2016 18:12:53 +0000 (18:12 +0000)]
If error happens, don't overwrite original errno comes from __mbrtowc()
and __srefill().

MFC after:      3 days

7 years agoPull in r277331 from upstream llvm trunk (by Diana Picus):
dim [Thu, 1 Sep 2016 18:11:44 +0000 (18:11 +0000)]
Pull in r277331 from upstream llvm trunk (by Diana Picus):

  [AArch64] Return the correct size for TLSDESC_CALLSEQ

  The branch relaxation pass is computing the wrong offsets because it assumes
  TLSDESC_CALLSEQ eats up 4 bytes, when in fact it is lowered to an instruction
  sequence taking up 16 bytes. This can become a problem in huge files with lots
  of TLS accesses, as it may slowly move branch targets out of the range computed
  by the branch relaxation pass.

  Fixes PR24234 https://llvm.org/bugs/show_bug.cgi?id=24234

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

This fixes "error in backend: fixup value out of range" when compiling
the misc/talkfilters port for AArch64.

Reported by: sbruno
PR: 201762
MFC after: 3 days

7 years agoFAST_DEPEND/META_MODE: Fix several issues with SRCS containing '/'.
bdrewery [Thu, 1 Sep 2016 17:36:52 +0000 (17:36 +0000)]
FAST_DEPEND/META_MODE: Fix several issues with SRCS containing '/'.

- For FAST_DEPEND, properly apply the -M flags when compiling by
  enduring that the condition also has the s,/,_,g filter applied to it
  first.
- For FAST_DEPEND, properly read from the filtered filename.
- For META_MODE, it needs to read from a full-pathed and s,/,_,g replaced
  filename based on bmake's meta_name() function which names the .meta
  file for SRCS with '/' in them.

This support has not been extended to the kernel build yet but may be in the
future.

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

7 years agoOpenBSD 6.0 added.
maxim [Thu, 1 Sep 2016 17:05:54 +0000 (17:05 +0000)]
OpenBSD 6.0 added.

7 years agoAs an optimization to the machine-independent layer, change the machine-
alc [Thu, 1 Sep 2016 15:57:44 +0000 (15:57 +0000)]
As an optimization to the machine-independent layer, change the machine-
dependent pmap_ts_referenced() so that it updates the page's dirty field
if a modified bit is found while counting reference bits.  This
opportunistic update can be performed at low cost and can eliminate the
need for some future calls to pmap_is_modified() by the machine-
independent layer.

Reviewed by: kib, markj
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7722

7 years ago- Invert calloc(3) argument order.
araujo [Thu, 1 Sep 2016 15:23:33 +0000 (15:23 +0000)]
- Invert calloc(3) argument order.

MFC after: 4 weeks

7 years agoMFV r302662: 6447 handful of nvpair cleanups
mav [Thu, 1 Sep 2016 15:17:39 +0000 (15:17 +0000)]
MFV r302662: 6447 handful of nvpair cleanups

illumos/illumos-gate@759e89be359f2af635e4122d147df56bce948773
https://github.com/illumos/illumos-gate/commit/759e89be359f2af635e4122d147df56bc
e948773

https://www.illumos.org/issues/6447
  I got a patch from someone who uses nvpair code outside of illumos. It fixes a
  couple of gcc warnings/bugs for him.
     1. silence uninitialized use warnings
     2. add parentheses around assignment used as truth value
     3. fix printf format specifier (ll is for integers only)
     4. strstr, strspn, strcspn, and strcmp are declared in string.h, not
        strings.h.
     5. avoid scanning integer into boolean variable

Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Steve Dougherty <sdougherty@barracuda.com>

7 years agoMFV r302661: 7082 bptree_iterate() passes wrong args to zfs_dbgmsg()
mav [Thu, 1 Sep 2016 15:10:40 +0000 (15:10 +0000)]
MFV r302661: 7082 bptree_iterate() passes wrong args to zfs_dbgmsg()

illumos/illumos-gate@10e67aa0db0823d5464aafdd681f3c966155c68e
https://github.com/illumos/illumos-gate/commit/10e67aa0db0823d5464aafdd681f3c966
155c68e

https://www.illumos.org/issues/7082
  upstream
  DLPX-40542 bptree_iterate() passes wrong args to zfs_dbgmsg()

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r302660: 6314 buffer overflow in dsl_dataset_name
mav [Thu, 1 Sep 2016 15:08:27 +0000 (15:08 +0000)]
MFV r302660: 6314 buffer overflow in dsl_dataset_name

illumos/illumos-gate@9adfa60d484ce2435f5af77cc99dcd4e692b6660
https://github.com/illumos/illumos-gate/commit/9adfa60d484ce2435f5af77cc99dcd4e6
92b6660

https://www.illumos.org/issues/6314
  Callers of dsl_dataset_name pass a buffer of size ZFS_MAXNAMELEN, but
  dsl_dataset_name copies the datasets' name PLUS the snapshot name to it,
  resulting in a max of 2 * ZFS_MAXNAMELEN + '@'.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoo Separate rtc and timecmp registers: they are different across
br [Thu, 1 Sep 2016 14:58:11 +0000 (14:58 +0000)]
o Separate rtc and timecmp registers: they are different across
  RISC-V cpu implementations.
o Update RocketChip device tree source (DTS).

We now support latest verison of RocketChip synthesized on
Xilinx FPGA (Zedboard).

RocketChip is an implementation of RISC-V processor written on
Chisel hardware construction language.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoMFV r302659: 6931 lib/libzfs: cleanup gcc warnings
mav [Thu, 1 Sep 2016 14:57:06 +0000 (14:57 +0000)]
MFV r302659: 6931 lib/libzfs: cleanup gcc warnings

illumos/illumos-gate@88f61dee20b358671b1b643e9d1dbf220a1d69be
https://github.com/illumos/illumos-gate/commit/88f61dee20b358671b1b643e9d1dbf220a1d69be

https://www.illumos.org/issues/6931
  need cleanup:
  CERRWARN += -_gcc=-Wno-switch
  CERRWARN += -_gcc=-Wno-parentheses
  CERRWARN += -_gcc=-Wno-unused-function

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Igor Kozhukhov <ikozhukhov@gmail.com>

7 years agoMFV r302658: 6872 zfs libraries should not allow uninitialized variables
mav [Thu, 1 Sep 2016 14:53:56 +0000 (14:53 +0000)]
MFV r302658: 6872 zfs libraries should not allow uninitialized variables

illumos/illumos-gate@f83b46baf98d276f5f84fa84c8b461f412ac1f5e
https://github.com/illumos/illumos-gate/commit/f83b46baf98d276f5f84fa84c8b461f41
2ac1f5e

https://www.illumos.org/issues/6872
  We compile the zfs libraries with -Wno-uninitialized. We should remove
  this. Change makefiles, fix new warnings, fix pbchk errors.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFV r302657: 4521 zfstest is trying to execute evil "zfs unmount -a"
mav [Thu, 1 Sep 2016 14:52:05 +0000 (14:52 +0000)]
MFV r302657: 4521 zfstest is trying to execute evil "zfs unmount -a"

illumos/illumos-gate@8808ac5dae118369991f158b6ab736cb2691ecde
https://github.com/illumos/illumos-gate/commit/8808ac5dae118369991f158b6ab736cb2
691ecde

https://www.illumos.org/issues/4521
  zfstest is trying to execute evil "zfs unmount -a", which fails (fortunately,
  as it would otherwise leave me with my ~ missing):
  03:44:11.86 cannot unmount '/export/home/yuri': Device busy cannot unmount '/
  export/home': Device busy
  03:44:11.86 ERROR: /usr/sbin/zfs unmount -a exited 1
  This affects, at least, zfs_mount_009_neg and zfs_mount_all_001_pos, both
  failing on that step. The pool containing the /export/home hierarchy is
  included in KEEP variable, but it doesn't seem to affect anything here.

Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

7 years agoMFV r302655: 6873 zfs_destroy_snaps_nvl leaks errlist
mav [Thu, 1 Sep 2016 14:47:43 +0000 (14:47 +0000)]
MFV r302655: 6873 zfs_destroy_snaps_nvl leaks errlist

illumos/illumos-gate@4cde22c29999ffb907ca39d2ebd512812f7e5168
https://github.com/illumos/illumos-gate/commit/4cde22c29999ffb907ca39d2ebd512812
f7e5168

https://www.illumos.org/issues/6873
  lzc_destroy_snaps() returns an nvlist in errlist.
  zfs_destroy_snaps_nvl() should nvlist_free() it before returning.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Chris Williamson <chris.williamson@delphix.com>

7 years agoMFV r302654:
mav [Thu, 1 Sep 2016 14:46:33 +0000 (14:46 +0000)]
MFV r302654:
6879 incorrect endianness swap for drr_spill.drr_length in libzfs_sendrecv.c

illumos/illumos-gate@20fea7a47472aceb64d3ed48cc2a3ea268bc4795
https://github.com/illumos/illumos-gate/commit/20fea7a47472aceb64d3ed48cc2a3ea26
8bc4795

https://www.illumos.org/issues/6879
  In libzfs_sendrecv, there's a typo:
  case DRR_SPILL:
              if (byteswap) {
                  drr->drr_u.drr_write.drr_length =
                      BSWAP_64(drr->drr_u.drr_spill.drr_length);
              }
  Instead of drr_write.drr_length, we should be assigning the result of the
  byteswap to drr_spill.drr_length.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Dan Kimmel <dan.kimmel@delphix.com>

7 years agoMFV r302653: 6111 zfs send should ignore datasets created after the ending snapshot
mav [Thu, 1 Sep 2016 14:45:11 +0000 (14:45 +0000)]
MFV r302653: 6111 zfs send should ignore datasets created after the ending snapshot

illumos/illumos-gate@4a20c933b148de8a1c1d3538391c64284e636653
https://github.com/illumos/illumos-gate/commit/4a20c933b148de8a1c1d3538391c64284
e636653

https://www.illumos.org/issues/6111
  If you create a zfs child folder, zfs send returns an error when a recursive
  incremental send is done between two snapshots made prior to the folder
  creation.
  The problem can be reproduced with the following steps.
  root@zfs:/# zfs create pool/test
  root@zfs:/# zfs snapshot pool/test@snap1
  root@zfs:/# zfs snapshot pool/test@snap2
  root@zfs:/# zfs create pool/test/child
  root@zfs:/# zfs send -R -I pool/test@snap1 pool/test@snap2 > /dev/null
  WARNING: could not send pool/test/child@snap2: does not exist
  WARNING: could not send pool/test/child@snap2: does not exist
  root@zfs:/# echo $?
  1
  root@zfs:/# zfs snapshot -r pool/test@snap3
  root@zfs:/# zfs send -R -I pool/test@snap1 pool/test@snap3 > /dev/null
  root@zfs:/# echo $?
  0
  root@zfs:/# zfs send -R -I pool/test@snap2 pool/test@snap3 > /dev/null
  root@zfs:/# echo $?
  0
  Since pool/test/child was created after snap2, zfs send should not expect snap2
  to be in pool/test/child when doing a recursive send. It should examine the
  compare the creation time of the snapshot and each child folder to decide if
  the folder will be sent. The next incremental send between snap2 and snap3
  would properly create the child folder and snap3 which first appears in the
  child folder.
  The problem is identical if '-i' is used instead of '-I'.

Reviewed by: Alex Aizman alex.aizman@nexenta.com
Reviewed by: Alek Pinchuk alek.pinchuk@nexenta.com
Reviewed by: Roman Strashkin roman.strashkin@nexenta.com
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Alex Deiter <alex.deiter@nexenta.com>

7 years agoMFV r302651: 7054 dmu_tx_hold_t should use refcount_t to track space
mav [Thu, 1 Sep 2016 14:38:25 +0000 (14:38 +0000)]
MFV r302651: 7054 dmu_tx_hold_t should use refcount_t to track space

illumos/illumos-gate@0c779ad424a92a84d1e07d47cab7f8009189202b
https://github.com/illumos/illumos-gate/commit/0c779ad424a92a84d1e07d47cab7f8009
189202b

https://www.illumos.org/issues/7054
  upstream:
  ee0003de7d3e598499be7ac3fe6b61efcc47cb7f
  DLPX-40399 dmu_tx_hold_t should use refcount_t to track space

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is set
mav [Thu, 1 Sep 2016 14:24:54 +0000 (14:24 +0000)]
MFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is set

Note that the bulk of the upstream change is not applicable to FreeBSD
and the affected files are not even in the vendor area.

illumos/illumos-gate@45b1747515a17db45e8971501ee84a26bdff37b2
https://github.com/illumos/illumos-gate/commit/45b1747515a17db45e8971501ee84a26bdff37b2

https://www.illumos.org/issues/7019
  Currently zfsdev_ioctl, when confronted by a request with the FKIOCTL flag set,
  skips all processing of secpolicy functions. This means that ZFS is not doing
  any kind of verification of the credentials or access rights of the caller and
  assuming that (as it is an in-kernel client) all such checks have already been
  done.
  This turns out to be quite a dangerous assumption, especially with respect to
  sdev. In general I don't think it's particularly reasonable to offload this
  enforcement of access rights onto other kernel subsystems when ZFS has some
  particular local semantics in this area (delegated datasets etc) and does not
  provide any kind of API to allow other subsystems to avoid code duplication
  when doing it. ZFS should apply its normal access policy to requests from
  within the kernel, and callers should take care to give it the correct
  credentials and call it from the correct context in order to get the results
  they need.
  You can observe the currently unfortunate consequences of this bug in any non-
  global zone that has access to /dev/zvol or any subset of it via sdev profiles.
  In particular, a zone used to contain a KVM or similar which has a single zvol
  passed through to it using a <device match= block in its zone XML.
  Even though sdev makes something of an attempt to control for whether the
  caller should have access to nodes in /dev/zvol, it doesn't do this correctly,
  or really at all in the lookup call path. So, if we have a zone that's been
  given access to any part of /dev/zvol, it can simply look up the full path to
  any other zvol on the entire system, and the node will appear and be able to be
  used.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alex Wilson <alex.wilson@joyent.com>

7 years agoMFV r302647: 6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device
mav [Thu, 1 Sep 2016 14:17:30 +0000 (14:17 +0000)]
MFV r302647: 6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device

illumos/illumos-gate@63364b0ee2604783e7a55f8425888867768eafa4
https://github.com/illumos/illumos-gate/commit/63364b0ee2604783e7a55f84258888677
68eafa4

https://www.illumos.org/issues/6922
  ZFS does not do a config_sync after removing an aux (spare, log, or cache)
  device. AFAICT this isn't being done because it is slow and was deemed
  unnecessary. However, it should be such a rare operation that speed doesn't
  matter, and not doing it results in two problems:
  1) It is theoretically possible to remove an aux device from one pool and
  attach it to another, then lose power. When power is restored, both pools woul
d
  think that they own the aux device.
  2) Removal of the aux device doesn't send any useful sysevents to userland.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alan Somers <asomers@gmail.com>

7 years agoMFV r302646:
mav [Thu, 1 Sep 2016 14:06:30 +0000 (14:06 +0000)]
MFV r302646:
6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch

illumos/illumos-gate@ea4a67f462de0a39a9adea8197bcdef849de5371
https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef84
9de5371

https://www.illumos.org/issues/6980
  doing zfs send -i snap1 snap2 >testfile results in
  internal error: Invalid argument
  Abort (core dumped)

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years ago[BHND/PMU] Correct shift of bits in BHND_PMU_SET_BITS macro
mizhka [Thu, 1 Sep 2016 13:38:46 +0000 (13:38 +0000)]
[BHND/PMU] Correct shift of bits in BHND_PMU_SET_BITS macro

The purpose of BHND_PMU_{GET,SET}_BITS macro is to transform values from/into
register format. SET macro shifts value to left and applies filter mask.
GET macro applies filter mask and then shifts value to right.

Reviewed by:    landonf, adrian (mentor)
Approved by:    adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D7721

7 years agoMFV r302643:
mav [Thu, 1 Sep 2016 13:29:53 +0000 (13:29 +0000)]
MFV r302643:
6902 speed up listing of snapshots if requesting name only and sorting by name

This was our change from the beginning, so just reduce the upstream diff.

7 years agoMFV r302642:
mav [Thu, 1 Sep 2016 13:14:31 +0000 (13:14 +0000)]
MFV r302642:
6876 Stack corruption after importing a pool with a too-long name

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

https://www.illumos.org/issues/6876
  Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for
  trouble. We should check every dataset on import, using a 1024 byte buffer and
  checking each time to see if the dataset's new name is longer than 256 bytes.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFV r302642:
mav [Thu, 1 Sep 2016 13:04:36 +0000 (13:04 +0000)]
MFV r302642:
6876 Stack corruption after importing a pool with a too-long name

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

https://www.illumos.org/issues/6876
  Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for
  trouble. We should check every dataset on import, using a 1024 byte buffer and
  checking each time to see if the dataset's new name is longer than 256 bytes.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoFix arm64 superpages bugs in pmap_enter:
andrew [Thu, 1 Sep 2016 10:26:06 +0000 (10:26 +0000)]
Fix arm64 superpages bugs in pmap_enter:
 * Pass the correct virtual address when demoting a superpage
 * Use the correct l3 table after demoting a superpage
 * Remove an invalid KASSERT hit demoting then promoting a superpage [1]

With this it is believed that  superpages on arm64 is stable.

Reported by: [1] cognet
Obtained from: ABT Systems Ltd
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agonet/rndis: Define types for RNDIS pktinfo rm_type field.
sephe [Thu, 1 Sep 2016 07:17:06 +0000 (07:17 +0000)]
net/rndis: Define types for RNDIS pktinfo rm_type field.

They are defined by NDIS spec, so the NDIS prefix.

Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7717

7 years agohyperv/hn: Fix VLAN tag construction.
sephe [Thu, 1 Sep 2016 07:04:47 +0000 (07:04 +0000)]
hyperv/hn: Fix VLAN tag construction.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7716

7 years agobd_int13probe() should check extended info if sector info is bad
tsoome [Thu, 1 Sep 2016 06:35:13 +0000 (06:35 +0000)]
bd_int13probe() should check extended info if sector info is bad

In some Dell systems and usb stick combinations, it is found that
int13 AH=08 is reporting back bad sector information, preventing the
boot.

This update is allowing bd_int13probe() to use extended info call to
build disk properties.

It also can happen the total sectors count from extended info may be
wrong, in such case, the CHS data is used to calculate total sectors.

Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D7718

7 years agonet/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
sephe [Thu, 1 Sep 2016 06:32:35 +0000 (06:32 +0000)]
net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.

Reviewed by: araujo, hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7710

7 years agohyperv/hn: Stringent per-packet-info verification.
sephe [Thu, 1 Sep 2016 06:05:08 +0000 (06:05 +0000)]
hyperv/hn: Stringent per-packet-info verification.

While I'm here, minor style changes.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7709

7 years agonet/rndis: Define per-packet-info for RNDIS packet message
sephe [Thu, 1 Sep 2016 05:40:13 +0000 (05:40 +0000)]
net/rndis: Define per-packet-info for RNDIS packet message

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7708

7 years agohyperv/hn: Remove unused function
sephe [Thu, 1 Sep 2016 05:29:58 +0000 (05:29 +0000)]
hyperv/hn: Remove unused function

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7706

7 years agonet/rndis: Add comment for rndis_set_parameter
sephe [Thu, 1 Sep 2016 05:15:04 +0000 (05:15 +0000)]
net/rndis: Add comment for rndis_set_parameter

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7705

7 years agoallow kern.proc.nfds sysctl in capability mode
emaste [Thu, 1 Sep 2016 02:51:50 +0000 (02:51 +0000)]
allow kern.proc.nfds sysctl in capability mode

Reviewed by: allanjude
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7733

7 years agoDon't bake all of CC/CPP/CXX into CFLAGS
ngie [Thu, 1 Sep 2016 02:42:11 +0000 (02:42 +0000)]
Don't bake all of CC/CPP/CXX into CFLAGS

Capture executable names for CC, CPP, CXX (assumed to be the
first non-CCACHE_BIN word).

This change strips out all of the cross-compiler arguments, (-target,
-B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it
doesn't infect the build and subsequently the test.

Add comments noting why this logic is being added, and why the logic in
r305041 was necessary/what it was trying to achieve.

This is required after recent changes made to the toolchain to always
specify --sysroot, -target, -B, etc with clang in buildworld (presumably
r304681).

Reviewed by: rodrigc (earlier version)
Reported by: Jenkins (FreeBSD_HEAD job from 559+)
MFC after: 12 days
X-MFC with: r304681, r305041
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7732

7 years ago_taskqueue_start_threads() now fails if it doesn't actually start any threads.
pkelsey [Thu, 1 Sep 2016 02:05:46 +0000 (02:05 +0000)]
_taskqueue_start_threads() now fails if it doesn't actually start any threads.

Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7701

7 years agoFix linker warnings (errors on gcc) that resulted from r304510.
erj [Thu, 1 Sep 2016 01:08:18 +0000 (01:08 +0000)]
Fix linker warnings (errors on gcc) that resulted from r304510.

The variables that are extern in the netmap header file should be
defined in ixl_txrx.c (the file that is included in both ixl(4)/ixlv(4),
not in the main driver source files.

Reported by: ed@, dim@, ngie@

7 years agocxgbe/t4_tom: Two new routines to allocate and write page pods for a
np [Thu, 1 Sep 2016 00:51:59 +0000 (00:51 +0000)]
cxgbe/t4_tom: Two new routines to allocate and write page pods for a
buffer in the kernel's address space.

7 years agocxgbe/t4_tom: Add general purpose routines to deal with page pod regions
np [Wed, 31 Aug 2016 23:23:46 +0000 (23:23 +0000)]
cxgbe/t4_tom: Add general purpose routines to deal with page pod regions
and allocations within them.  Switch to these routines to manage the TOE
DDP region.

Sponsored by: Chelsio Communications

7 years agoRename unp_dispose_so() to unp_dispose().
markj [Wed, 31 Aug 2016 21:48:22 +0000 (21:48 +0000)]
Rename unp_dispose_so() to unp_dispose().

It implements the dom_dispose method for local socket domain, so its name
should match the method name.

7 years agoSet UEFI boot loader PE/COFF timestamps to known value for reproducible builds
emaste [Wed, 31 Aug 2016 21:35:38 +0000 (21:35 +0000)]
Set UEFI boot loader PE/COFF timestamps to known value for reproducible builds

Reviewed by: rpokala
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7633

7 years agousers: don't build when we don't have a C++ toolchain
emaste [Wed, 31 Aug 2016 21:12:50 +0000 (21:12 +0000)]
users: don't build when we don't have a C++ toolchain

(On RISC-V MK_CXX is in BROKEN_OPTIONS, so users remains skipped there.)

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D7725

7 years agoreadelf: silence GCC 4.2.1 uninitialized variable warning
emaste [Wed, 31 Aug 2016 21:04:58 +0000 (21:04 +0000)]
readelf: silence GCC 4.2.1 uninitialized variable warning

Sponsored by: The FreeBSD Foundation

7 years agodirectory(3): Deprecate readdir_r(). Clarify dirent buffers.
jilles [Wed, 31 Aug 2016 20:38:40 +0000 (20:38 +0000)]
directory(3): Deprecate readdir_r(). Clarify dirent buffers.

In existing implementations including FreeBSD, there is no reason to use
readdir_r() in the common case where potentially multiple threads each list
their own directory. Code using readdir() is simpler.

What's more, lthough readdir_r() can safely be used on FreeBSD because
NAME_MAX is forced to 255, it cannot be used safely on systems where
{NAME_MAX} is not fixed. As a concrete example, FAT/NTFS filenames can be up
to 255 UTF-16 code units long, which can be up to 765 UTF-8 bytes.

Deprecating readdir_r() in POSIX has been proposed in
http://www.austingroupbugs.net/view.php?id=696
and glibc wants to deprecate it as well.

Reviewed by: ed, wblock
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7678

7 years agoAll the TI platforms are FDT based and it is not necessary to enumerate
loos [Wed, 31 Aug 2016 19:37:10 +0000 (19:37 +0000)]
All the TI platforms are FDT based and it is not necessary to enumerate
the hinted children (there wont be any).

Spotted by: gonzo

7 years agoDIRDEPS_BUILD: Add some missing dirctories to the build.
bdrewery [Wed, 31 Aug 2016 19:30:59 +0000 (19:30 +0000)]
DIRDEPS_BUILD: Add some missing dirctories to the build.

Sponsored by: EMC / Isilon Storage Division

7 years agoAdd a 'make print-dir' that simply traverses all directories and prints them.
bdrewery [Wed, 31 Aug 2016 19:30:52 +0000 (19:30 +0000)]
Add a 'make print-dir' that simply traverses all directories and prints them.

This is useful for finding connected directories.

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

7 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Wed, 31 Aug 2016 19:30:46 +0000 (19:30 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: EMC / Isilon Storage Division

7 years agoDIRDEPS_BUILD: Avoid cyclic dependency with libc++.
bdrewery [Wed, 31 Aug 2016 19:30:00 +0000 (19:30 +0000)]
DIRDEPS_BUILD: Avoid cyclic dependency with libc++.

The DIRDEPS_BUILD does not have a 'make includes' phase, so it would
otherwise want libc++ to be fully built/staged before building
libgcc.  Using the header directly works.

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

7 years ago'addrlen' does not matter when we need to find the first non-zero bit in
ache [Wed, 31 Aug 2016 18:49:50 +0000 (18:49 +0000)]
'addrlen' does not matter when we need to find the first non-zero bit in
the byte from the left and 'addrlen' already counted in 'lim'.

PR:     212121
Submitted by:   Herbie.Robinson@stratus.com
MFC after:      7 days

7 years agoRegnerate after r305140, getdtablesize in capability mode
emaste [Wed, 31 Aug 2016 18:37:51 +0000 (18:37 +0000)]
Regnerate after r305140, getdtablesize in capability mode

Sponsored by: The FreeBSD Foundation

7 years agoFix the build.
loos [Wed, 31 Aug 2016 18:35:41 +0000 (18:35 +0000)]
Fix the build.

Works better when the file with the #define is actually included...

7 years agoAllow getdtablesize in capability mode
emaste [Wed, 31 Aug 2016 18:33:15 +0000 (18:33 +0000)]
Allow getdtablesize in capability mode

getdtablesize is "trivial global state" and is similar to
getrlimit(RLIMIT_NOFILE), so should be permitted in capability mode.

Reviewed by: oshogbo
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7719

7 years agodf(1): Allow duplicate -l flags gracefully
cem [Wed, 31 Aug 2016 18:10:41 +0000 (18:10 +0000)]
df(1): Allow duplicate -l flags gracefully

Rather than producing a misleading error message when duplicate -l flags are
provided to df(1), simply ignore extra flags and proceed as if only one was
specified.  This seems most reasonable given the usage for -l:

     -l      Only display information about locally-mounted file systems.

l and t flags still conflict, as before.

PR: 208169
Reported by: by at reorigin.com
Reviewed by: allanjude

7 years agoEliminate unnecessary loop in _cap_check()
allanjude [Wed, 31 Aug 2016 17:52:11 +0000 (17:52 +0000)]
Eliminate unnecessary loop in _cap_check()

Calling cap_rights_contains() several times with the same inputs is not
going to produce a different output. The variable being iterated, i, is
never used inside the for loop.

The loop is actually done in cap_rights_contains()

Submitted by: Ryan Moeller <ryan@freqlabs.com>
Reviewed by: oshogbo, ed
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7369