]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMove all devfs related files to sbin/devfs/
Brad Davis [Wed, 22 Aug 2018 15:55:23 +0000 (15:55 +0000)]
Move all devfs related files to sbin/devfs/

This is related to pkgbase as it uses CONFS to properly tag these as config
files.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16785

5 years agoTurn off LOADER_GELI and LOADER_LUA for sparc64, until those options
Kurt Lidl [Wed, 22 Aug 2018 15:29:54 +0000 (15:29 +0000)]
Turn off LOADER_GELI and LOADER_LUA for sparc64, until those options
are fully debugged.  With these options off, the unified "loader"
binary for sparc64 works to boot a kernel from ZFS.

Submitted by: kevans
Reviewed by: imp kevans

5 years agoSkip PMAP_PCID_KERN + 1 PCPU pcid_next value on APs as well.
Konstantin Belousov [Wed, 22 Aug 2018 14:58:52 +0000 (14:58 +0000)]
Skip PMAP_PCID_KERN + 1 PCPU pcid_next value on APs as well.
r337838 did it for BSP.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

5 years agoIncrease the size of the heap size available on sparc64 during
Kurt Lidl [Wed, 22 Aug 2018 14:33:57 +0000 (14:33 +0000)]
Increase the size of the heap size available on sparc64 during
operation of "loader".  The dramatic increase in size of
SPA_MAXBLOCKSIZE in r304321 causes the heap space to be exhausted,
so malloc() fails, ultimately leading to a memcpy() with a
destination of 0x0.

MFC after: 3 days

5 years agoAdding device ID for Terratec SiXPack 5.1+.
Tai-hwa Liang [Wed, 22 Aug 2018 14:06:31 +0000 (14:06 +0000)]
Adding device ID for Terratec SiXPack 5.1+.

MFC after: 3 days

5 years agoNote that ntpd_sync_on_start is a preferred alternative to ntpdate_enable.
Mateusz Piotrowski [Wed, 22 Aug 2018 13:30:48 +0000 (13:30 +0000)]
Note that ntpd_sync_on_start is a preferred alternative to ntpdate_enable.

A similar note is already present in the description of the
ntpd_sync_on_start variable.

This patch adds a note to the description of the ntpdate_enable variable.
This way it would be easier to spot.  Otherwise a user might skip the part
of the manual describing ntpd_sync_on_start if they stop reading after
learning about ntpdate_enable.

Reviewed by: bcr
Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D16519

5 years agoSuggest to reboot after installworld in the example of development workflow.
Mateusz Piotrowski [Wed, 22 Aug 2018 13:25:41 +0000 (13:25 +0000)]
Suggest to reboot after installworld in the example of development workflow.

Reviewed by: trasz
Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D16746

5 years agoRevert r320758, which was the man page update for r320757 just reverted.
Rick Macklem [Wed, 22 Aug 2018 12:26:17 +0000 (12:26 +0000)]
Revert r320758, which was the man page update for r320757 just reverted.

This is a content change.

PR: 230752

5 years agoRevert r320757 since it can cause "excl->shared" panics.
Rick Macklem [Wed, 22 Aug 2018 12:20:10 +0000 (12:20 +0000)]
Revert r320757 since it can cause "excl->shared" panics.

PR#230752 shows a panic where an nfsd thread tries to do soconnect() on
the AF_LOCAL socket used by the nfsuserd while already holding an
exclusive lock on it. I am not 100% sure how this happens, but since an
AF_LOCAL socket is in the file system namespace it is conceivable that it
could lock it and then attempt an upcall to the nfsuserd.
However, reverting r320757 stops the nfsuserd from using an AF_LOCAL
socket, so it should avoid any such panic().
r320757 did fix a problem with running the nfsuserd when jails were
enabled, but that can be dealt with less elegantly by allowing the
use of an alternate address instead of 127.0.0.1.
The gssd daemon also uses an AF_LOCAL socket, but it will do upcalls
before the nfsd thread processes the RPC, so I think it should not
be suseptible to this problem.

PR: 230752

5 years agoUse unifdef -x1 instead of ignoring the shell exit code
Alex Richardson [Wed, 22 Aug 2018 11:56:51 +0000 (11:56 +0000)]
Use unifdef -x1 instead of ignoring the shell exit code

This way the target fails if unifdef doesn't exist or doesn't modify the
file instead of just generating an empty .c file.
I found this while building without inherited $PATH (D16815)

Approved By: jhb (mentor)

5 years agoStop using unifdef to generate bsdxml.h
Alex Richardson [Wed, 22 Aug 2018 11:56:42 +0000 (11:56 +0000)]
Stop using unifdef to generate bsdxml.h

The current invocation of unifdef causes the build to fail when using a shell
with -o pipefail on by default since unifdef will return a non-zero exit status
if it changes something. The only thing this call to unifdef does is remove 5
lines that will be ignored by the compiler anyway. Furthermore, it is the only
make rule in the source tree that requires unifdef. Removing this call also
makes it slightly easier to build without inhering $PATH (D16815) since we
don't need unifdef anymore.

I also noticed that the sed call to replace the include guard has been broken
for over 10 years since the import of expat 2.0.1 changed it from
`XmlParse_INCLUDED` to `Expat_INCLUDED`. I could also fix this but since it's
been broken for so long and no one noticed, it's probably not necessary.

Reviewed By: emaste
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D14317

5 years agotop(1): Use warnx and errx instead of fprintf
Eitan Adler [Wed, 22 Aug 2018 10:07:15 +0000 (10:07 +0000)]
top(1): Use warnx and errx instead of fprintf

This also makes make "-v" exit without error, since it isn't.

5 years agoloader: bios loader should allow to chain load a file
Toomas Soome [Wed, 22 Aug 2018 10:04:42 +0000 (10:04 +0000)]
loader: bios loader should allow to chain load a file

The current chain command does accept only device, allow also a file to be used,
such as /boot/pmbr or /boot/mbr (or stored third party MBR/VBR block).

Also fix file descriptor leak.

5 years agotop(1): issue warning on invalid delay
Eitan Adler [Wed, 22 Aug 2018 09:49:38 +0000 (09:49 +0000)]
top(1): issue warning on invalid delay

When top -sH is run it continually updates. It should issue an warning
instead.

Reported by: jmg
PR: 230803

5 years agopfctl: Remove unused function
Kristof Provost [Wed, 22 Aug 2018 08:27:49 +0000 (08:27 +0000)]
pfctl: Remove unused function

Fix compile issues.

MFC after: 1 week

5 years agopfctl: Improve set skip handling for groups
Kristof Provost [Wed, 22 Aug 2018 08:14:29 +0000 (08:14 +0000)]
pfctl: Improve set skip handling for groups

Rely on the kernel to appropriately mark group members as skipped.
Once a group is skipped we can clear the update flag on all the members.

PR: 229241
Submitted by: Andreas Longwitz <longwitz AT incore.de>
MFC after: 1 week

5 years agoMake NVMe compatible with the original API
Chuck Tuffli [Wed, 22 Aug 2018 04:29:24 +0000 (04:29 +0000)]
Make NVMe compatible with the original API

The original NVMe API used bit-fields to represent fields in data
structures defined by the specification (e.g. the op-code in the command
data structure). The implementation targeted x86_64 processors and
defined the bit fields for little endian dwords (i.e. 32 bits).

This approach does not work as-is for big endian architectures and was
changed to use a combination of bit shifts and masks to support PowerPC.
Unfortunately, this changed the NVMe API and forces #ifdef's based on
the OS revision level in user space code.

This change reverts to something that looks like the original API, but
it uses bytes instead of bit-fields inside the packed command structure.
As a bonus, this works as-is for both big and little endian CPU
architectures.

Bump __FreeBSD_version to 1200081 due to API change

Reviewed by: imp, kbowling, smh, mav
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D16404

5 years agoin_mcast: fix copy paste error when clearing flag
Matt Macy [Wed, 22 Aug 2018 04:09:55 +0000 (04:09 +0000)]
in_mcast: fix copy paste error when clearing flag

5 years agor338172 followup - removal of stray drm references
Matt Macy [Wed, 22 Aug 2018 03:04:43 +0000 (03:04 +0000)]
r338172 followup - removal of stray drm references

5 years agor338172 follow - remove firmwares
Matt Macy [Wed, 22 Aug 2018 02:53:35 +0000 (02:53 +0000)]
r338172 follow - remove firmwares

5 years agocleanup after git svn detritus left by r338172
Matt Macy [Wed, 22 Aug 2018 02:43:34 +0000 (02:43 +0000)]
cleanup after git svn detritus left by r338172

5 years agodisconnect drm2 from tegra build until made self-contained
Matt Macy [Wed, 22 Aug 2018 02:18:45 +0000 (02:18 +0000)]
disconnect drm2 from tegra build until made self-contained

5 years agolualoader: Fix loader.conf(5) EOL validation for 'exec' lines
Kyle Evans [Wed, 22 Aug 2018 01:52:55 +0000 (01:52 +0000)]
lualoader: Fix loader.conf(5) EOL validation for 'exec' lines

This includes some light rework to simplify the line parsing, as well.  If
we hit a line match, we'll always either use the line and move on to the
next line, or we'll spew out malformed line errors.

We had multiple spots to output the error and set the status based on
whether we had a non-nil first capture group or failed EOL validation, but
it was always the same error.  Light rework entails a small label jump to
skip error handling and elimination of 'found' local.

5 years agoRemove legacy drm and drm2 from tree
Matt Macy [Wed, 22 Aug 2018 01:50:12 +0000 (01:50 +0000)]
Remove legacy drm and drm2 from tree

As discussed on the MLs drm2 conflicts with the ports' version and there
is no upstream for most if not all of drm. Both have been merged in to
a single port.

Users on powerpc, 32-bit hardware, or with GPUs predating Radeon
and i915 will need to install the graphics/drm-legacy-kmod. All
other users should be able to use one of the LinuxKPI-based ports:
graphics/drm-stable-kmod, graphics/drm-next-kmod, graphics/drm-devel-kmod.

MFC: never
Approved by: core@

5 years agolualoader: Refactor config line expressions
Kyle Evans [Tue, 21 Aug 2018 23:42:20 +0000 (23:42 +0000)]
lualoader: Refactor config line expressions

A couple of issues addressed:

1.) Modules with - in the name were not recognized as modules
2.) The module regex was repeated for each place a module name may appear
3.) The 'strip leading space' bits were repeated for each expression
4.) The trailing 'comment validation' stuff was repeated every expression

#4 still has some more work to be done. exec lines, for instance, don't
capture a 'value' -- there's only one capture pattern. This throws off the
'c' value that we match, so the trailing bits aren't *actually* being
validated. This isn't a new issue, though, so a future comit will address
this.

5 years agolualoader: Just compare expression directly
Kyle Evans [Tue, 21 Aug 2018 23:34:30 +0000 (23:34 +0000)]
lualoader: Just compare expression directly

5 years agocxgbe(4): Be explicit about ignoring the return value of cmpset in some
Navdeep Parhar [Tue, 21 Aug 2018 23:33:38 +0000 (23:33 +0000)]
cxgbe(4): Be explicit about ignoring the return value of cmpset in some
cases.

Reported by: Coverity (CIDs 10093981009400100940113573251394783).  All false positives.
Sponsored by: Chelsio Communications

5 years agonewsyslog(8): Reject configurations that specify setuid or executable logs
Conrad Meyer [Tue, 21 Aug 2018 23:12:46 +0000 (23:12 +0000)]
newsyslog(8): Reject configurations that specify setuid or executable logs

Prevent some classes of foot-shooting that may result in permissions
problems.

Reviewed by: dab, delphij, vangyzen (earlier version)
Relnotes: yes (behavior change)
Sponsored by: Dell EMC Isilon
Differential Revision: D16831

5 years agoFix resource leak when using strdup(3).
Marcelo Araujo [Tue, 21 Aug 2018 23:11:26 +0000 (23:11 +0000)]
Fix resource leak when using strdup(3).

Reported by: Coverity
CID: 1394929
Sponsored by: iXsystems Inc.

5 years agoFix null deref in mld_v1_transmit_report
Matt Macy [Tue, 21 Aug 2018 23:03:02 +0000 (23:03 +0000)]
Fix null deref in mld_v1_transmit_report

After r337866 it is possible for an in_multi6 to be referenced while
mid teardown. Handle case of cleared ifnet pointer.

Reported by: ae

5 years agofix copy/paste error when clearing ifma flag
Matt Macy [Tue, 21 Aug 2018 22:59:22 +0000 (22:59 +0000)]
fix copy/paste error when clearing ifma flag

CID: 1395119
Reported by: vangyzen

5 years agocxgbe/tom: Make sure 'matched' is always initialized before use.
Navdeep Parhar [Tue, 21 Aug 2018 22:19:34 +0000 (22:19 +0000)]
cxgbe/tom: Make sure 'matched' is always initialized before use.

Reported by: Coverity (CID 1390894)
MFC after: 1 week
Sponsored by: Chelsio Communications

5 years agocxgbe(4): Do not leak memory in case of errors during VI initialization.
Navdeep Parhar [Tue, 21 Aug 2018 22:15:57 +0000 (22:15 +0000)]
cxgbe(4): Do not leak memory in case of errors during VI initialization.

Reported by: Coverity (CID 1392026)
MFC after: 1 week
Sponsored by: Chelsio Communications

5 years agocxgbe(4): Make it clear that VI_INIT_DONE implies vi->ntxq > 0, and so
Navdeep Parhar [Tue, 21 Aug 2018 21:42:17 +0000 (21:42 +0000)]
cxgbe(4): Make it clear that VI_INIT_DONE implies vi->ntxq > 0, and so
rc will never be returned uninitialized.

Reported by: Coverity (CID 1394884).  This is a false positive though.
Sponsored by: Chelsio Communications

5 years agocxgbe(4): Check the RO bit properly before disabling relaxed ordering.
Navdeep Parhar [Tue, 21 Aug 2018 21:32:51 +0000 (21:32 +0000)]
cxgbe(4): Check the RO bit properly before disabling relaxed ordering.

Reported by: Coverity (CID 1384286)
MFC after: 1 week
Sponsored by: Chelsio Communications

5 years agoAdd muge(4) to the arm64 GENERIC kernel
Oleksandr Tymoshenko [Tue, 21 Aug 2018 21:30:19 +0000 (21:30 +0000)]
Add muge(4) to the arm64 GENERIC kernel

muge(4) is the USB ethernet adapter that is used in RPi 3B+. Shipping it
in GENERIC kernel allows using NFS root out of the box instead of either
building custom kernel or modifying loader.conf for early loading of if_muge.ko

No objections: emaste

5 years agocxgbe(4): Avoid overflow while calculating channel rate.
Navdeep Parhar [Tue, 21 Aug 2018 21:08:58 +0000 (21:08 +0000)]
cxgbe(4): Avoid overflow while calculating channel rate.

Reported by: Coverity (CID 1008352)
MFC after: 1 week
Sponsored by: Chelsio Communications

5 years agoMove all bluetooth related config files out of etc
Brad Davis [Tue, 21 Aug 2018 19:28:53 +0000 (19:28 +0000)]
Move all bluetooth related config files out of etc

This helps with pkgbase by switching to CONFS so they are properly tagged as
config files.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16833

5 years agoFor CID 1394785, add a comment explaining that global->event_buf is
Cy Schubert [Tue, 21 Aug 2018 19:17:35 +0000 (19:17 +0000)]
For CID 1394785, add a comment explaining that global->event_buf is
not really a char * but a struct rt_msghdr *.

MFC after: 3 days

5 years agoFUSE extattrs: fix issue when neither uio nor size were not passed to VOP_* (cosmetic...
Fedor Uporov [Tue, 21 Aug 2018 18:50:29 +0000 (18:50 +0000)]
FUSE extattrs: fix issue when neither uio nor size were not passed to VOP_* (cosmetic only).

Reviewed by:    cem, pfg
MFC after:      2 weeks

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

5 years agoFUSE extattrs: fix issue when neither uio nor size were not passed to VOP_*.
Fedor Uporov [Tue, 21 Aug 2018 18:39:47 +0000 (18:39 +0000)]
FUSE extattrs: fix issue when neither uio nor size were not passed to VOP_*.

The requested size was returned incorrectly in case uio == NULL from listextattr because the
nameprefix/name conversion was not applied.
Also, make a_size/uio returning logic more unified with other filesystems.

Reviewed by:    cem, pfg
MFC after:      2 weeks

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

5 years agoChange unused inodes counters behavior in the cylinder groups.
Fedor Uporov [Tue, 21 Aug 2018 18:39:29 +0000 (18:39 +0000)]
Change unused inodes counters behavior in the cylinder groups.
Make it more close to native ext4 implementation to avoid fsck errors.

5 years agoFix directory blocks checksum updating logic.
Fedor Uporov [Tue, 21 Aug 2018 18:39:02 +0000 (18:39 +0000)]
Fix directory blocks checksum updating logic.

Count dirent tail in the searchslot logic in case of directory block search.
Add htree root csum update function call in case of rename.

5 years agoRevert r337978: Rework rtld's TLS Variant I implementation to match r326794
Brooks Davis [Tue, 21 Aug 2018 18:22:12 +0000 (18:22 +0000)]
Revert r337978: Rework rtld's TLS Variant I implementation to match r326794

Michal Meloun reports that it breaks ctype (isspace()..) related
functions on armv7 so back out while we diagnose the issue.

Reported by: Michal Meloun <melounmichal@gmail.com>

5 years agoRemove 'imen' global variable from atpic(4).
John Baldwin [Tue, 21 Aug 2018 17:13:51 +0000 (17:13 +0000)]
Remove 'imen' global variable from atpic(4).

In pre-SMPng, the global 'imen' was used to track mask state of the
hardware interrupts and was aligned to the masks used by spl*().
When the atpic code was converted to using the x86 interrupt source
abstraction, the global 'imen' was preserved by having each PIC
instance point to an invididual byte in the global 'imen' to hold its
8-bit interrupt mask.  The global 'imen' is no longer used for
anything however, so rather than storing pointers in 'struct atpic',
just store the individual 8-bit mask for each PIC as a char.

While here, convert the ATPIC macro to using C99 initializers.

Reviewed by: kib, imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16827

5 years agoMove ftpusers to libexec/ftpd/
Brad Davis [Tue, 21 Aug 2018 17:07:52 +0000 (17:07 +0000)]
Move ftpusers to libexec/ftpd/

Thsi helps with pkgbase by switching to CONFS so that ftpusers will be
properly tagged as a config file.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16787

5 years agoMove all syslogd related configs to usr.sbin/syslogd/
Brad Davis [Tue, 21 Aug 2018 17:01:47 +0000 (17:01 +0000)]
Move all syslogd related configs to usr.sbin/syslogd/

This helps with pkgbase as it switches these to use CONFS which properly tags
them as config files.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16783

5 years agoRelax the check added in 338096
Alex Richardson [Tue, 21 Aug 2018 16:52:14 +0000 (16:52 +0000)]
Relax the check added in 338096

Checking for any include below ${SRCTOP}/sys is too strict and breaks
e.g. mkimg which includes sys/sys/disk. ABI issues will only be caused
by including headers in sys/sys since they might not match the host.

Approved By: jhb (mentor)
Suggested By: imp

5 years agoMove all devd related configs to sbin/devd/
Brad Davis [Tue, 21 Aug 2018 16:51:45 +0000 (16:51 +0000)]
Move all devd related configs to sbin/devd/

This helps with pkgbase as it switches these to using CONFS so they are
properly tagged as config files.

Approved by: will (mentor), imp
Differential Revision: https://reviews.freebsd.org/D16781

5 years agoEliminate kmem_malloc()'s unused arena parameter. (The arena parameter
Alan Cox [Tue, 21 Aug 2018 16:43:46 +0000 (16:43 +0000)]
Eliminate kmem_malloc()'s unused arena parameter.  (The arena parameter
became unused in FreeBSD 12.x as a side-effect of the NUMA-related
changes.)

Reviewed by: kib, markj
Discussed with: jeff, re@
Differential Revision: https://reviews.freebsd.org/D16825

5 years agoSet arc_kmem_cache_reap_retry_ms to 0 and make it configurable.
Mark Johnston [Tue, 21 Aug 2018 16:37:37 +0000 (16:37 +0000)]
Set arc_kmem_cache_reap_retry_ms to 0 and make it configurable.

r329759 introduced this parameter, which controls the rate at which ZFS
UMA zones are drained when the ARC reclaim thread is shrinking the ARC.
The reclamation target is derived from the global free page count, and
arc_shrink() only frees buffers back to UMA, so the free page count is
not updated until the zones are drained.  Thus, back-to-back calls to
arc_shrink() within the arc_kmem_cache_reap_retry_ms interval do not
provide immediate feedback to the arc_reclaim control loop, so we may
free more of the ARC than needed to address a transient page shortage.

As we do not implement the asynchronous zone draining added in r329759,
disable the retry interval, restoring pre-r329759 behaviour.  That is,
we will drain the ZFS UMA zones before each attempt to shrink the ARC.

Reviewed by: mav
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

5 years agoQuieten the svn (or svnlite) commands used to extract information from an
Colin Percival [Tue, 21 Aug 2018 15:30:47 +0000 (15:30 +0000)]
Quieten the svn (or svnlite) commands used to extract information from an
SVN checkout for placement into an EC2 AMI.  We only run these if there
is a .svn directory; but in the event that SVN was used to check out a
tree which is then exported over NFS, we were unnecessarily noisy.

Reported by: Andrey Fesenko
MFC after: 3 days
X-MFC-With: r336420, r336433, r336593, r336621,
r336622, r336624, r337394, r337401

5 years agominor grammar nit, to what? between them..
John-Mark Gurney [Tue, 21 Aug 2018 15:11:43 +0000 (15:11 +0000)]
minor grammar nit, to what?  between them..

5 years agoRemove unneccessary code, which also introduced a (very minor)
Edward Tomasz Napierala [Tue, 21 Aug 2018 14:34:24 +0000 (14:34 +0000)]
Remove unneccessary code, which also introduced a (very minor)
race condition, due to a missing call to cfiscsi_target_release().

Discussed with: mav@
Tested by: Eugene M. Zheganin <emz at norma.perm.ru> (earlier version)
MFC after: 2 weeks
Sponsored by: playkey.net

5 years agoEnabling the IPPROTO_IPV6 level socket option IPV6_USE_MIN_MTU on a TCP
Michael Tuexen [Tue, 21 Aug 2018 14:12:30 +0000 (14:12 +0000)]
Enabling the IPPROTO_IPV6 level socket option IPV6_USE_MIN_MTU on a TCP
socket resulted in sending fragmented IPV6 packets.

This is fixes by reducing the MSS to the appropriate value. In addtion,
if the socket option is set before the handshake happens, announce this
MSS to the peer. This is not stricly required, but done since TCP
is conservative.

PR: 173444
Reviewed by: bz@, rrs@
MFC after: 1 month
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16796

5 years agoFix the inheritance of IPv6 level socket options on TCP sockets.
Michael Tuexen [Tue, 21 Aug 2018 14:07:36 +0000 (14:07 +0000)]
Fix the inheritance of IPv6 level socket options on TCP sockets.

This was broken for IPv6 listening socket, which are not IPV6_ONLY,
and the accepted TCP connection was using IPv4.

Reviewed by: bz@, rrs@
MFC after: 1 month
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16792

5 years agoAdd SOL_SOCKET level socket option with name SO_DOMAIN to get
Michael Tuexen [Tue, 21 Aug 2018 14:04:30 +0000 (14:04 +0000)]
Add SOL_SOCKET level socket option with name SO_DOMAIN to get
the domain of a socket.

This is helpful when testing and Solaris and Linux have the same
socket option using the same name.

Reviewed by: bcr@, rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16791

5 years agoWhitespace change.
Michael Tuexen [Tue, 21 Aug 2018 13:37:06 +0000 (13:37 +0000)]
Whitespace change.

5 years agoRefactor the SHUTDOWN_PENDING state handling.
Michael Tuexen [Tue, 21 Aug 2018 13:25:32 +0000 (13:25 +0000)]
Refactor the SHUTDOWN_PENDING state handling.

This is not a functional change but a preperation for the upcoming
DTrace support. It is necessary to change the state in one
logical operation, even if it involves clearing the sub state
SHUTDOWN_PENDING.

MFC after: 1 month

5 years ago- Add CSV output to gstat via -C flag.
Marcelo Araujo [Tue, 21 Aug 2018 11:22:49 +0000 (11:22 +0000)]
- Add CSV output to gstat via -C flag.

Add a -C option, similar to -B, that allows gstat to produce basic CSV output
with absolute timestamps (ISO 8601, nearly.) Multiple devices are handled by
way of a single-pivot CSV table with duplicated timestamps for each object
output.

Submitted by: Nick Principe <nap__ixsystems.com>
Reviewed by: myself, imp@, asomers (earlier verison), bcr (manpages)
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D16151

5 years agoDe-spl mly(4).
John Baldwin [Tue, 21 Aug 2018 10:08:12 +0000 (10:08 +0000)]
De-spl mly(4).

The driver already has mutex locking and holds its per-softc lock across
calls to the one function that still used splcam().

5 years agoFix -DWITHOUT_AUTO_OBJ build of rescue after r338096
Alex Richardson [Tue, 21 Aug 2018 09:35:56 +0000 (09:35 +0000)]
Fix -DWITHOUT_AUTO_OBJ build of rescue after r338096

Approved By: jhb (mentor)

5 years agoMake dnode definition uniform on !x86
Matt Macy [Tue, 21 Aug 2018 03:45:09 +0000 (03:45 +0000)]
Make dnode definition uniform on !x86

gcc4 requires -fms-extensions to accept anonymous union members

5 years agoMake epoch KBI consistent between INVARIANTS and non-INVARIANTS
Matt Macy [Tue, 21 Aug 2018 03:33:54 +0000 (03:33 +0000)]
Make epoch KBI consistent between INVARIANTS and non-INVARIANTS

move extra fields under EPOCH_TRACKER_DEBUG

Reported by: hps

5 years agoMFV r338092: ntp 4.2.8p12.
Xin LI [Tue, 21 Aug 2018 02:38:07 +0000 (02:38 +0000)]
MFV r338092: ntp 4.2.8p12.

Relnotes: yes

5 years agolibthr: minor spacing cleanup.
Pedro F. Giffuni [Tue, 21 Aug 2018 01:33:25 +0000 (01:33 +0000)]
libthr: minor spacing cleanup.

No functional change.

X-MFC with: r337992

5 years agoAdjust formatting of grep and zgrep manual pages.
Mateusz Piotrowski [Mon, 20 Aug 2018 22:23:59 +0000 (22:23 +0000)]
Adjust formatting of grep and zgrep manual pages.

grep(1) changes:
 - Pet mandoc & igor.
 - Stylize the text more with macros when appropriate.
 - Stylize equal signs in long options (e.g., "--color=auto") with
   the "Cm" macro as suggested by mdoc(7).
 - Add missing arguments to --exlude, --exclude-dir, --include and
   --include-dir.
 - Remove a duplicate entry for the --context flag.
 - Use a list in the EXAMPLES sections to make it easier to tell
   which paragraphs belong to which example.
 - Cross reference zgrep(1).

zgrep(1) changes:
 - Fix Nd.
 - Split synopsis into paragraphs for readability.
 - Cross reference bzip(1), grep(1) and xz(1).

Reviewed by: bcr
Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D16779

5 years agoefidev.4: Improve formatting.
Mateusz Piotrowski [Mon, 20 Aug 2018 22:16:15 +0000 (22:16 +0000)]
efidev.4: Improve formatting.

- Move some information out of the SYNOPSIS section because it is formated
  in a broken way by mandoc(1) otherwise.
- Improve the formatting of the list of provided ioctls.
- Use "Fa" for struct fields.
- Pet mandoc and igor.
- Fix typos.

Reviewed by: kevans
Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D16765

5 years agoconfig(8): Allow escape-quoted empty strings
Kyle Evans [Mon, 20 Aug 2018 22:08:03 +0000 (22:08 +0000)]
config(8): Allow escape-quoted empty strings

For use with things like BOOT_TAG=\"\" -- there are valid reasons to allow
empty strings, especially as these are usually being passed through as
options. The same argument could perhaps be made for the unquoted
variant in things like MODULES_OVERRIDE="", but it's not immediately clear
that this is an issue so I've left it untouched.

MFC after: 3 days

5 years agocxgbe/tom: Provide the hardware tid in tcp_info.
Navdeep Parhar [Mon, 20 Aug 2018 21:40:14 +0000 (21:40 +0000)]
cxgbe/tom: Provide the hardware tid in tcp_info.

Submitted by: marius@

5 years agoTRIM consolodation is supposed to be off by default
Kirk McKusick [Mon, 20 Aug 2018 21:19:21 +0000 (21:19 +0000)]
TRIM consolodation is supposed to be off by default

5 years agoFix incorrect output when printing block lists for files small enough
Kirk McKusick [Mon, 20 Aug 2018 20:44:11 +0000 (20:44 +0000)]
Fix incorrect output when printing block lists for files small enough
to fit in only direct blocks whose size is exactly a multiple of the
filesystem block size.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: Netflix

5 years agoMove options INTRNG into std.armv6 and std.armv7
Warner Losh [Mon, 20 Aug 2018 20:31:53 +0000 (20:31 +0000)]
Move options INTRNG into std.armv6 and std.armv7

INTRNG is required on all armv6 and armv7 systems, so make it
standard.

5 years agoGC inc_isipv6; it was added for "temp" compatibility in 2001, r86764
Bjoern A. Zeeb [Mon, 20 Aug 2018 20:06:36 +0000 (20:06 +0000)]
GC inc_isipv6; it was added for "temp" compatibility in 2001, r86764
and does not seem to be used.

5 years agomergemaster: better defaults for SOURCEDIR
Warner Losh [Mon, 20 Aug 2018 19:39:49 +0000 (19:39 +0000)]
mergemaster: better defaults for SOURCEDIR

If we can't find a Makefile.inc1 in the specified / default SOURCEDIR, and
there's a Makefile.inc1 in the current directory, offer the user the choice
of using . for SOURCEDIR.

Differential Revsion: https://reviews.freebsd.org/D16709

5 years agoUpdate comment about ABI of flush_l1s_sw to match the reality.
Konstantin Belousov [Mon, 20 Aug 2018 19:09:39 +0000 (19:09 +0000)]
Update comment about ABI of flush_l1s_sw to match the reality.

CPUID instruction clobbers %rbx and %rdx.

Sponsored by: The FreeBSD Foundation
MFC after: 13 days

5 years agoAlways initialize PCPU kcr3 for vmspace0 pmap.
Konstantin Belousov [Mon, 20 Aug 2018 19:07:57 +0000 (19:07 +0000)]
Always initialize PCPU kcr3 for vmspace0 pmap.

If an exception or NMI occurs before CPU switched to a pmap different
from vmspace0, PCPU kcr3 is left zero for pti config, which causes
triple-fault in the handler.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

5 years ago[ig4] add ACPI Device HID for AMD platforms
Oleksandr Tymoshenko [Mon, 20 Aug 2018 18:50:56 +0000 (18:50 +0000)]
[ig4] add ACPI Device HID for AMD platforms

Added ACPI Device HID AMDI0010 for the designware I2C controllers in
future AMD platforms. Also, when verifying component version check for
minimal value instead of exact match.

PR: 230641
Submitted by: Rajesh <rajfbsd@gmail.com>
Reviewed by: cem, gonzo
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16670

5 years agoIn r324732 sysinstall was replaced by bsdinstall.
Bjoern Heidotting [Mon, 20 Aug 2018 18:17:50 +0000 (18:17 +0000)]
In r324732 sysinstall was replaced by bsdinstall.
However, for post-install configuration, bsdinstall
is not of much use. Point the user to bsdconfig instead.

Reviewed by: 0mp, bcr
Approved by: 0mp, bcr
Differential Revision: https://reviews.freebsd.org/D16751

5 years agoSerial console menus for lua.
Warner Losh [Mon, 20 Aug 2018 16:44:09 +0000 (16:44 +0000)]
Serial console menus for lua.

Remove a bunch of special cases for UEFI and serial consoles.  We do
want to do curses and menu things here. This makes us match what we do
in FORTH, with the possible exception of boxes around menus.

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

5 years agoEliminate kmem_alloc_contig()'s unused arena parameter.
Alan Cox [Mon, 20 Aug 2018 15:57:27 +0000 (15:57 +0000)]
Eliminate kmem_alloc_contig()'s unused arena parameter.

Reviewed by: hselasky, kib, markj
Discussed with: jeff
Differential Revision: https://reviews.freebsd.org/D16799

5 years agoRemove extra M_ZERO from NG_MKRESPONSE() argument.
Alexander Motin [Mon, 20 Aug 2018 14:35:54 +0000 (14:35 +0000)]
Remove extra M_ZERO from NG_MKRESPONSE() argument.

NG_MKRESPONSE() sets M_ZERO by itself.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

5 years agoiostat: update man page for r277566
Will Andrews [Mon, 20 Aug 2018 13:42:22 +0000 (13:42 +0000)]
iostat: update man page for r277566

The original commit added granularity to the transaction latency display
in the extended device stats mode, but didn't update the man page.

Reported by: Miroslav Lachman <000.fbsd@quip.cz> via jmg
MFC after: 1 day

5 years agoThis change represents a substantial restructure of the way we
Randall Stewart [Mon, 20 Aug 2018 12:43:18 +0000 (12:43 +0000)]
This change represents a substantial restructure of the way we
reassembly inbound tcp segments. The old algorithm just blindly
dropped in segments without coalescing. This meant that every
segment could take up greater and greater room on the linked list
of segments. This of course is now subject to a tighter limit (100)
of segments which in a high BDP situation will cause us to be a
lot more in-efficent as we drop segments beyond 100 entries that
we receive. What this restructure does is cause the reassembly
buffer to coalesce segments putting an emphasis on the two
common cases (which avoid walking the list of segments) i.e.
where we add to the back of the queue of segments and where we
add to the front. We also have the reassembly buffer supporting
a couple of debug options (black box logging as well as counters
for code coverage). These are compiled out by default but can
be added by uncommenting the defines.

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

5 years agoMerge amd64 and i386 <machine/intr_machdep.h> headers.
John Baldwin [Mon, 20 Aug 2018 12:31:39 +0000 (12:31 +0000)]
Merge amd64 and i386 <machine/intr_machdep.h> headers.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16803

5 years agoCreate a manual page for beinstall.sh.
Mateusz Piotrowski [Mon, 20 Aug 2018 11:05:36 +0000 (11:05 +0000)]
Create a manual page for beinstall.sh.

Reviewed by: bcr, brd, will
Approved by: krion (mentor)
Differential Revision: https://reviews.freebsd.org/D16742

5 years agoDon't rebuild ioctl.c and relink libsysdecode if there are no changes
Alex Richardson [Mon, 20 Aug 2018 10:59:49 +0000 (10:59 +0000)]
Don't rebuild ioctl.c and relink libsysdecode if there are no changes

Instead generate a temporary file and only overwrite ioctl.c if the
files are actually different.

Approved By: jhb (mentor)

5 years agoDon't create directories in ${WORLDTMP}/legacy with mtree
Alex Richardson [Mon, 20 Aug 2018 10:39:53 +0000 (10:39 +0000)]
Don't create directories in ${WORLDTMP}/legacy with mtree

This has two advantages:
1) We no longer create lots of empty directories that are not needed
2) This is a requirement for building on non-FreeBSD hosts since mtree will
only exist after the bootstrap-tools phase there.

Aproved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D16773

5 years agoAllow bootstrapping libmd on MacOS
Alex Richardson [Mon, 20 Aug 2018 10:39:48 +0000 (10:39 +0000)]
Allow bootstrapping libmd on MacOS

The assembly files use directives that only work for ELF targets so skip
them when bootstrapping on MacOS.

Reviewed By: imp
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D14247

5 years agoAvoid depending on system headers from the source tree during bootstrap
Alex Richardson [Mon, 20 Aug 2018 10:39:42 +0000 (10:39 +0000)]
Avoid depending on system headers from the source tree during bootstrap

This can cause surprising errors if the build tools is built against
headers that don't match the host system. It is also required in order
to allow building on non-FreeBSD systems where the headers in
/usr/include/sys are usually completely incompatible with those in the
source tree.

I added an error to Makefile.boot if this is done and found this was
only the case in libnv. With this error in the Makefile ABI breakages
such as r336019 should no longer be possible.

Reviewed By: bdrewery, kevans
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D16186

5 years agoMake mkioctls script work on Linux and MacOS
Alex Richardson [Mon, 20 Aug 2018 10:39:37 +0000 (10:39 +0000)]
Make mkioctls script work on Linux and MacOS

Using find -s  will not work with the Linux or MacOS find command. We pipe
to sort instead since the only real requirement here is that the order
stays the same. While I am touching this file I also fixed a `==` construct
which is not supported by POSIX sh but appears to work on FreeBSD.

Reviewed By: imp
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D14246

5 years agoFully retire the unimplemented -t option from vmstat(8).
John Baldwin [Mon, 20 Aug 2018 09:29:21 +0000 (09:29 +0000)]
Fully retire the unimplemented -t option from vmstat(8).

It was #ifdef'd out in the 4.4BSD import and hasn't been re-enabled
since then.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16804

5 years agoVendor import of ntp-4.2.8p12.
Xin LI [Mon, 20 Aug 2018 06:07:33 +0000 (06:07 +0000)]
Vendor import of ntp-4.2.8p12.

5 years agoNVMe spec version 1.3c says that "serial number" field must be 7-bit ASCII,
Marcelo Araujo [Mon, 20 Aug 2018 04:56:37 +0000 (04:56 +0000)]
NVMe spec version 1.3c says that "serial number" field must be 7-bit ASCII,
with unused bytes padded by space characters. Same for firmware number and
namespace number.

Discussed with: imp@
Sponsored by: iXsystems Inc.

5 years agoUsers must set the number of queues from 1 to maximum 16 queues.
Marcelo Araujo [Mon, 20 Aug 2018 04:50:11 +0000 (04:50 +0000)]
Users must set the number of queues from 1 to maximum 16 queues.

Sponsored by: iXsystems Inc.

5 years agoFix double mutex lock.
Marcelo Araujo [Mon, 20 Aug 2018 04:44:29 +0000 (04:44 +0000)]
Fix double mutex lock.

Reported by: Coverity
CID: 1394833
Discussed with: Leon Dang
Sponsored by: iXsystems Inc.

5 years agolualoader: Install all manpages
Kyle Evans [Mon, 20 Aug 2018 02:40:10 +0000 (02:40 +0000)]
lualoader: Install all manpages

Now that a complete set is written, save for one describing loader.lua,
install all of them. This was not previously done as they were written to
hopefully avoid confusion as bits and pieces of the overall system were
undocumented.

5 years agoAdd color.lua(8), password.lua(8), and screen.lua(8)
Kyle Evans [Mon, 20 Aug 2018 02:37:24 +0000 (02:37 +0000)]
Add color.lua(8), password.lua(8), and screen.lua(8)

5 years agoIn r331279 the code used ENOSYS to check the existence of getrandom(2).
Xin LI [Mon, 20 Aug 2018 02:17:55 +0000 (02:17 +0000)]
In r331279 the code used ENOSYS to check the existence of getrandom(2).
This will only work if the caller already handles SIGSYS, which is not
always the case.

Address this by checking osreldate instead. Note that because there
was not __FreeBSD_version bump when the system call was added, use
1200061 (r332100) which is the first bump after the introduction of
the system call.

PR: 230762
Reported by: Jenkins via Mark Millard
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D16807

5 years agoAdd drawer.lua(8)
Kyle Evans [Mon, 20 Aug 2018 02:08:39 +0000 (02:08 +0000)]
Add drawer.lua(8)