Commit Graph

235924 Commits

Author SHA1 Message Date
Chuck Tuffli
9544e6dcf1 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
2018-08-22 04:29:24 +00:00
Matt Macy
d3878608d7 in_mcast: fix copy paste error when clearing flag 2018-08-22 04:09:55 +00:00
Matt Macy
d494a4a745 r338172 followup - removal of stray drm references 2018-08-22 03:04:43 +00:00
Matt Macy
92c151322b r338172 follow - remove firmwares 2018-08-22 02:53:35 +00:00
Matt Macy
1d1b4bba45 cleanup after git svn detritus left by r338172 2018-08-22 02:43:34 +00:00
Matt Macy
a965e09972 disconnect drm2 from tegra build until made self-contained 2018-08-22 02:18:45 +00:00
Kyle Evans
9a16e110d0 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.
2018-08-22 01:52:55 +00:00
Matt Macy
d157fbd5b4 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@
2018-08-22 01:50:12 +00:00
Kyle Evans
058c692e15 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.
2018-08-21 23:42:20 +00:00
Kyle Evans
b83a355d70 lualoader: Just compare expression directly 2018-08-21 23:34:30 +00:00
Navdeep Parhar
da6e33875c cxgbe(4): Be explicit about ignoring the return value of cmpset in some
cases.

Reported by:	Coverity (CIDs 1009398, 1009400, 1009401, 1357325, 1394783).  All false positives.
Sponsored by:	Chelsio Communications
2018-08-21 23:33:38 +00:00
Conrad Meyer
c657f9385b 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
2018-08-21 23:12:46 +00:00
Marcelo Araujo
1465a1e1eb Fix resource leak when using strdup(3).
Reported by:	Coverity
CID:		1394929
Sponsored by:	iXsystems Inc.
2018-08-21 23:11:26 +00:00
Matt Macy
f3499ce48f 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
2018-08-21 23:03:02 +00:00
Matt Macy
77ad07b6a3 fix copy/paste error when clearing ifma flag
CID: 1395119
Reported by:	vangyzen
2018-08-21 22:59:22 +00:00
Navdeep Parhar
24bc8671f9 cxgbe/tom: Make sure 'matched' is always initialized before use.
Reported by:	Coverity (CID 1390894)
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-08-21 22:19:34 +00:00
Navdeep Parhar
e758d7758a 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
2018-08-21 22:15:57 +00:00
Navdeep Parhar
eb6f5d6e72 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
2018-08-21 21:42:17 +00:00
Navdeep Parhar
036ff794dd cxgbe(4): Check the RO bit properly before disabling relaxed ordering.
Reported by:	Coverity (CID 1384286)
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-08-21 21:32:51 +00:00
Oleksandr Tymoshenko
b14b007818 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
2018-08-21 21:30:19 +00:00
Navdeep Parhar
5a35633d7f cxgbe(4): Avoid overflow while calculating channel rate.
Reported by:	Coverity (CID 1008352)
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-08-21 21:08:58 +00:00
Brad Davis
c8e7055577 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
2018-08-21 19:28:53 +00:00
Cy Schubert
cdba33f23c 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
2018-08-21 19:17:35 +00:00
Fedor Uporov
28f4f62303 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
2018-08-21 18:50:29 +00:00
Fedor Uporov
493b4a8ccd 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
2018-08-21 18:39:47 +00:00
Fedor Uporov
4c1e1d2bcc Change unused inodes counters behavior in the cylinder groups.
Make it more close to native ext4 implementation to avoid fsck errors.
2018-08-21 18:39:29 +00:00
Fedor Uporov
e49d64a7a7 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.
2018-08-21 18:39:02 +00:00
Brooks Davis
a5207d3ef6 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>
2018-08-21 18:22:12 +00:00
John Baldwin
62a08214bc 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
2018-08-21 17:13:51 +00:00
Brad Davis
541075a618 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
2018-08-21 17:07:52 +00:00
Brad Davis
64be79ef76 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
2018-08-21 17:01:47 +00:00
Alex Richardson
cd4d034fd6 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
2018-08-21 16:52:14 +00:00
Brad Davis
44e1285c7b 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
2018-08-21 16:51:45 +00:00
Alan Cox
83a90bffd8 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
2018-08-21 16:43:46 +00:00
Mark Johnston
b1a90834bb 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
2018-08-21 16:37:37 +00:00
Colin Percival
7ac2ecc0af 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
2018-08-21 15:30:47 +00:00
John-Mark Gurney
9d58ffcf21 minor grammar nit, to what? between them.. 2018-08-21 15:11:43 +00:00
Edward Tomasz Napierala
3b95cface1 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
2018-08-21 14:34:24 +00:00
Michael Tuexen
5dff1c3845 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
2018-08-21 14:12:30 +00:00
Michael Tuexen
7d4dcc36a8 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
2018-08-21 14:07:36 +00:00
Michael Tuexen
6b01d4d433 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
2018-08-21 14:04:30 +00:00
Michael Tuexen
6ef849e601 Whitespace change. 2018-08-21 13:37:06 +00:00
Michael Tuexen
1a0b021677 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
2018-08-21 13:25:32 +00:00
Marcelo Araujo
0b9079bf95 - 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
2018-08-21 11:22:49 +00:00
John Baldwin
3b27d79c2a 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().
2018-08-21 10:08:12 +00:00
Alex Richardson
2f0437dab1 Fix -DWITHOUT_AUTO_OBJ build of rescue after r338096
Approved By:	jhb (mentor)
2018-08-21 09:35:56 +00:00
Matt Macy
d12e91d584 Make dnode definition uniform on !x86
gcc4 requires -fms-extensions to accept anonymous union members
2018-08-21 03:45:09 +00:00
Matt Macy
2aae9642a5 Make epoch KBI consistent between INVARIANTS and non-INVARIANTS
move extra fields under EPOCH_TRACKER_DEBUG

Reported by:	hps
2018-08-21 03:33:54 +00:00
Xin LI
4e1ef62a36 MFV r338092: ntp 4.2.8p12.
Relnotes:	yes
2018-08-21 02:38:07 +00:00
Pedro F. Giffuni
ab82c6bdad libthr: minor spacing cleanup.
No functional change.

X-MFC with:	r337992
2018-08-21 01:33:25 +00:00