Commit Graph

224801 Commits

Author SHA1 Message Date
Baptiste Daroussin
af5147ecaf Update pci_vendors to 2017.07.13
MFC after:	2 days
2017-07-14 14:58:10 +00:00
Baptiste Daroussin
8f5003ea4a Update zstd to 1.3.0 2017-07-14 14:55:34 +00:00
Xin LI
a1103e048b Update arcmsr(4) to 1.40.00.00 in order to add support of
ARC-1884 SATA RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
MFC after:	3 days
2017-07-14 14:53:13 +00:00
Warner Losh
df4245150a This adds CAM pass(4) support for NVMe IO's. Applications indicate
the IO type (Admin or NVM) using XPT op-codes XPT_NVME_ADMIN or
XPT_NVME_IO.

Submitted by:   Chuck Tuffli <chuck@tuffli.net>
Differential Revision:  https://reviews.freebsd.org/D10247
2017-07-14 14:52:20 +00:00
Baptiste Daroussin
affe9eaf78 Import zstd 1.3.0 2017-07-14 14:51:28 +00:00
Konstantin Belousov
5cead59181 Correct sysent flags for dynamically loaded syscalls.
Using the https://github.com/google/capsicum-test/ suite, the
PosixMqueue.CapModeForked test was failing due to an ECAPMODE after
calling kmq_notify(). On further inspection, the dynamically
loaded syscall entry was initialized with sy_flags zeroed out, since
SYSCALL_INIT_HELPER() left sysent.sy_flags with the default value.

Add a new helper SYSCALL{,32}_INIT_HELPER_F() which takes an
additional argument to specify the sy_flags value.

Submitted by:	Siva Mahadevan <smahadevan@freebsdfoundation.org>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D11576
2017-07-14 09:34:44 +00:00
Alan Cox
8830260128 Generalize vm_page_ps_is_valid() to support testing other predicates on
the (super)page, renaming the function to vm_page_ps_test().

Reviewed by:	kib, markj
MFC after:	1 week
2017-07-14 02:15:48 +00:00
Ryan Libby
33c66d8aeb ixl: gcc build errors
Fix minor -Werror issues when building with gcc from -Wredundant-decls,
-Wunused, -Wbool-operations.  Also ensure the M_IXL malloc type is only
defined once.

Reviewed by:	efj
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11414
2017-07-14 00:10:51 +00:00
Alan Somers
314b447f66 Add tests for aio(4) completion notification via signals and threads
Reviewed by:	jhb
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D11468
2017-07-13 22:53:13 +00:00
Alan Somers
d600f474c6 Use ATF cleanup routines in aio_test.c
Remove aio_test's legacy timeout handling and cleanup routines.  Instead,
use ATF's builtin capabilities.  ATF automatically cleans up newly created
files, too, so we don't have to explicitly unlink them.  The only tests than
need a cleanup routine are the md(4) tests, which must destroy their md
device.

Reviewed by:	jhb
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D11468
2017-07-13 22:49:55 +00:00
Bryan Drewery
a19f95b359 Fix kldload of if_ixl without PCI_IOV kernel option.
This also avoids compiling in pci_iov support into the kernel if_ixoif
the PCI_IOV option is disabled.

Reviewed by:	rstone
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11573
2017-07-13 22:45:23 +00:00
Eric Joyner
3820007146 ixl(4)/ixlv(4): Stop leaking every busdma entry in receive path
From Brett:

In short, busdma maps for received packets were not being unloaded in the
interrupt handler before the packets were passed up the network stack. The fix
was to add a busdma sync and unload for the two receive maps.

This bug is significant for certain busdma providers, for example IOMMUs,
where not unloading the maps means that 1) the IOMMU mappings that allow the
NIC to DMA the received packets into host memory stay open indefinitely,
potentially violating a desired security policy, and 2) resources such as
device address space addresses and host memory for bookkeeping are never freed.

Without an IOMMU or bounce buffering enabled for the ixl device, I don't think
adding these calls will have any significant performance impact. With the
IOMMU enabled, I have noticed a performance impact on the receive side, which
is expected.

Submitted by:	Brett Gutstein <bgutstein@rice.edu>
Reviewed by:	erj@
MFC after:	1 week
2017-07-13 22:12:41 +00:00
Dimitry Andric
d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Dimitry Andric
c439438675 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update
build glue.
2017-07-13 21:58:45 +00:00
Glen Barber
27c8e6b81e Fix a missing comment marker.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-07-13 20:04:42 +00:00
Dimitry Andric
289ae9e3ac Vendor import of libc++ trunk r307894:
https://llvm.org/svn/llvm-project/libcxx/trunk@307894
2017-07-13 19:25:57 +00:00
Dimitry Andric
1992b790c2 Vendor import of compiler-rt trunk r307894:
https://llvm.org/svn/llvm-project/compiler-rt/trunk@307894
2017-07-13 19:25:48 +00:00
Dimitry Andric
8746d127c0 Vendor import of clang trunk r307894:
https://llvm.org/svn/llvm-project/cfe/trunk@307894
2017-07-13 19:25:38 +00:00
Dimitry Andric
ca089b24d4 Vendor import of llvm trunk r307894:
https://llvm.org/svn/llvm-project/llvm/trunk@307894
2017-07-13 19:25:18 +00:00
Mark Johnston
8d92040b75 Add some functions to jiffies.h.
Also add some checks for overflow to existing functions.

Reviewed by:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11533
2017-07-13 18:27:22 +00:00
Sean Bruno
d03ae351ed Add 4k and NCQ_TRIM_BROKEN quirks for Samsung 845 SSDs.
Submitted by:	 hannula@gmail.com
Differential Revision:	https://reviews.freebsd.org/D7967
2017-07-13 16:56:26 +00:00
Sean Bruno
989e632aa7 Add 4K quirks for Samsung 750 EVO SSD
Submitted by:	lev
Reviewed by:	mav
Differential Revision:	https://reviews.freebsd.org/D9478
2017-07-13 15:33:08 +00:00
Emmanuel Vadot
0fc830cca9 Add an rc.d script to setup a netflow export via ng_netflow
The default is to export netflow data on localhost on the netflow port.
ngtee is used to have the lowest overhead possible.
The ipfw ng hook is the netflow port (it can only be numeric)
Default is netflow version 5.

Sponsored-By:   Gandi.net
Reviewed by:	bapt (earlier version), olivier (earlier version)
2017-07-13 13:40:18 +00:00
Emmanuel Vadot
600a08a80d Add ipfw_status command to etc/rc.d/ipfw
This is helpful when using service/conf management tools.

Sonsored-By:	Gandi.net
2017-07-13 13:32:23 +00:00
Philip Paeps
b0e1660d53 Fix GRE over IPv6 tunnels with IPFW
Previously, GRE packets in IPv6 tunnels would be dropped by IPFW (unless
net.inet6.ip6.fw.deny_unknown_exthdrs was unset).

PR:		220640
Submitted by:	Kun Xie <kxie@xiplink.com>
MFC after:	1 week
2017-07-13 09:01:22 +00:00
Konstantin Belousov
60686c3703 Fix size argument to vm_pager_allocate(), it is in bytes, not in pages.
It is believed to be only cosmetic.

Noted by:	andrew
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-07-13 08:23:37 +00:00
Konstantin Belousov
e766a6bb01 Revert r320936 to recommit with the correct log message. 2017-07-13 08:23:12 +00:00
Konstantin Belousov
89f91fa960 It is believed to be only cosmetic.
Noted by:	andrew
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-07-13 08:19:50 +00:00
Martin Matuska
422f92722d Fix libarchive mismerge of r320927 in libarchive_entry.h
MFC after:	1 week
X-MFC-with:	320927
Reported by:	Ngie Cooper <ngie@FreeBSD.org>
2017-07-13 04:46:00 +00:00
Martin Matuska
b86cbbb3ad Fix libarchive mismerge of r320927
MFC after:	1 week
X-MFC-with:	320927
Reported by:	Ngie Cooper <ngie@FreeBSD.org>
2017-07-13 04:42:29 +00:00
Kyle Evans
b5ddde39ac Add some basic tests for hexdump(1)'s various output flags. Formatting
tests are omitted for this initial run as there are still some bugs to work
out there.

This covers -s flag testing on devices and non-devices that would have
caught breakage found in PR 219173 as well as other subtle breakage caused
locally.

Reviewed by:	cem, ngie
Approved by:	cem (acting co-mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11279
2017-07-13 03:52:54 +00:00
Ian Lepore
2d5f51fb22 Put an #ifdef notyet wrapper around a function that's not being used yet,
to avoid compile warnings.
2017-07-13 02:20:07 +00:00
Ian Lepore
7164f27ddc Support the "disable-over-current" property for imx ehci controllers.
It turns out that this is more than a power optization.  The OTG port
won't work on boards that have this property unless this setting is honored.

Also ensure that the usb phy device attaches before ehci.
2017-07-13 02:16:15 +00:00
Martin Matuska
8bad9d67f0 MFV r320924:
Bump libarchive to 3.3.2

Vendor changes:
  PR #901: don't depend on stdin in a testcase

MFC after:	1 week
2017-07-13 00:28:36 +00:00
Martin Matuska
f8c95ef815 Update vendor/libarchive to git 98a695399e8e7420635a5448aecde8b0a82fb83a
Release 3.3.2

Vendor changes:
  PR #901: don't depend on stdin in a testcase
2017-07-13 00:16:51 +00:00
Bryan Drewery
f80b8a886d META_MODE: Fix not writing .meta files in the kernel build.
This was a regression in r320220 due to improper porting of the
same logic from share/mk/bsd.dep.mk and having only tested with
-DNO_FILEMON at the time.

Pointyhat to:	bdrewery
Reported by:	Mark Millard, dhw, O. Hartmann
Sponsored by:	Dell EMC Isilon
2017-07-12 19:01:25 +00:00
Mark Johnston
5aaf766710 Add a newline after the version string.
MFC after:	3 days
2017-07-12 18:29:25 +00:00
Sean Bruno
fb6aa95d9f Reset unsupported SFP tuneable back to original entry name.
Reported by:	olivier@
2017-07-12 17:35:32 +00:00
Alan Somers
97ae05e314 Remove an extraneous strlen from t_setdomainname.c
Reported by:	Coverity
CID:		1377568
MFC after:	15 days
X-MFC-With:	320737
Sponsored by:	Spectra Logic Corp
2017-07-12 14:51:32 +00:00
Ryan Libby
808a9c8646 kvprintf %b enhancements
Make the %b formatter accept number formatting flags. It will now accept
alternate form, precision, and length modifiers. It also now partially
supports field width (but forces left justification).

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11284
2017-07-12 07:30:14 +00:00
Xin LI
49426905b3 MFV r320905: Import upstream fix for CVE-2017-11103.
In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted version
stored in 'ticket'.  Use of the unecrypted version provides an
opportunity for successful server impersonation and other attacks.

Submitted by:	hrs
Obtained from:	Heimdal
Security:	FreeBSD-SA-17:05.heimdal
Security:	CVE-2017-11103
2017-07-12 07:19:06 +00:00
Xin LI
f52d4664e3 Import upstream fix for CVE-2017-11103:
CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
	In _krb5_extract_ticket() the KDC-REP service name must be obtained from
	encrypted version stored in 'enc_part' instead of the unencrypted version
	stored in 'ticket'.  Use of the unecrypted version provides an
	opportunity for successful server impersonation and other attacks.

	Identified by Jeffrey Altman, Viktor Duchovni and Nico Williams.

	Change-Id: I45ef61e8a46e0f6588d64b5bd572a24c7432547c

Submitted by:	hrs
Obtained from:	6dd3eb836b
Security:	CVE-2017-11103
Security:	FreeBSD-SA-17:05.heimdal
2017-07-12 07:13:56 +00:00
Ian Lepore
a8d7b9d3bb Support multiple realtime clocks, and remove locking/sleeping restrictions
on clock drivers.

This tracks multiple concurrent realtime clock drivers in a list sorted by
clock resolution.  When system time changes (and periodically) the
clock_settime() methods of all registered clocks are invoked.

To initialize system time, each driver is tried in turn from best to worst
resolution, until one succesfully returns a valid time.

The code no longer holds a mutex while calling the clock_settime() and
clock_gettime() methods of the registered clocks. This allows clock drivers
to do whatever kind of locking or sleeping is necessary (this is especially
important for i2c clock chips since i2c drivers often need to sleep).

A new clock_register_flags() function allows the clock driver to pass
flags. The flags currently defined help support drivers that use their own
techniques to avoid roundoff errors (prevents the 4/5 rounding done by the
subr_rtc code). A driver which may need to wait for resources (such as bus
ownership) may pass a flag to indicate that it will obtain system time for
itself after waiting for resources; this is merely an optimization to avoid
the common code retrieving a timespec that will never get used.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11484
2017-07-12 02:53:54 +00:00
Ian Lepore
b524a31593 Protect access to the AT realtime clock with its own mutex.
The mutex protecting access to the registered realtime clock should not be
overloaded to protect access to the atrtc hardware, which might not even be
the registered rtc. More importantly, the resettodr mutex needs to be
eliminated to remove locking/sleeping restrictions on clock drivers, and
that can't happen if MD code for amd64 depends on it. This change moves the
protection into what's really being protected: access to the atrtc date and
time registers.

This change also adds protection when the clock is accessed from
xentimer_settime(), which bypasses the resettodr locking.

Differential Revision:	https://reviews.freebsd.org/D11483
2017-07-12 02:42:57 +00:00
John Baldwin
15a88f8158 Consistently use vop_stdpathconf() for default pathconf values.
Update filesystems not currently using vop_stdpathconf() in pathconf
VOPs to use vop_stdpathconf() for any configuration variables that do
not have filesystem-specific values.  vop_stdpathconf() is used for
variables that have system-wide settings as well as providing default
values for some values based on system limits.  Filesystems can still
explicitly override individual settings.

PR:		219851
Reported by:	cem
Reviewed by:	cem, kib, ngie
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D11541
2017-07-11 21:55:20 +00:00
Mark Johnston
4e287bd860 Add a subroutine for comparing kerneldump identifiers.
MFC after:	2 weeks
2017-07-11 18:24:05 +00:00
Mark Johnston
7f48d6a486 Don't dlclose NSS modules from nss_atexit().
As hinted in the commit log message for r259042, this is unnecessary.
Moreover, as a result of that change we may invoke a DSO's atexit handler
after it has been unmapped.

Reviewed by:	bdrewery, cem
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-07-11 17:59:15 +00:00
Andrew Turner
75f48c23ea Add external PLATFORM access on arm, and use it in the pl310 driver.
This allows multiple instances of SoCs that use the pl310 driver to be
built within the same kernel:

 * Add access to the platform_t object from outside platform.c
 * Use this with the pl310 driver

There is a new platform_pl310 interface to replace the existing code. SoCs
need to implement the init method, and if they have special requirements to
write to the two registers we care about will also need to implement the
write_ctrl and write_debug methods.

Differential Revision:	https://reviews.freebsd.org/D11546
2017-07-11 16:30:16 +00:00
Konstantin Belousov
f08b46d9da Fix BIT_FLS().
The iteration index is unsigned, so testing for larger than or equal
to zero makes little sense.

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after:	3 days
2017-07-11 12:35:44 +00:00
Edward Tomasz Napierala
d43225de5c Make fsck_y_enable default to passing pass -R to fsck_ffs(8) in addition
to -y.  To me, fsck_y_enable means "try as hard as possible", and without
-R, it... well, doesn't.

Reviewed by:	mckusick
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11490
2017-07-11 12:32:40 +00:00