Commit Graph

214266 Commits

Author SHA1 Message Date
Andrew Turner
07b8a57120 Add memmmap on arm64 so we can mmap /dev/mem and /dev/kmem.
Obtained from:	ABT Systems Ltd
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-13 23:03:34 +00:00
Andrew Turner
5ff4e2400d Fix the type used to hold the value returned from getopt. On arm64 char is
unsigned so will never be -1.

Obtained from:	ABT Systems Ltd
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-13 22:53:30 +00:00
Eric van Gyzen
464d005d84 zpool(8): update Hot Spares section to mention zfsd(8)
Reviewed and reworded by:	asomers
MFC after:	3 days
Sponsored by:	Dell Inc.
2016-07-13 21:27:10 +00:00
Jared McNeill
169285288c Allwinner Gigabit EMAC performance improvements.
- Support DEVICE_POLLING
 - Increase TX descriptors to 1024
 - Add support for passing a chain of mbufs to if_input, reducing the
   number of calls to mtx_unlock/mtx_lock under load.
 - Remove duplicate byteswap when setting TX_INT_CTL in TX descriptor.
 - Set undocumented "TX_NEXT_FRAME" bit in TX control 1 register.
   According to the A83T BSP, setting this bit allows the DMA engine to
   operate on a packet while receiving another.

Tested on A83T (1000Mbps PHY) and H3 (100Mbps PHY).

Reviewed by:		manu
Differential Revision:	https://reviews.freebsd.org/D7031
2016-07-13 20:46:54 +00:00
Jared McNeill
814f548cd5 H3/A83T: Use PLL_PERIPH/2 for AHB2 parent clock.
Reviewed by:	manu
2016-07-13 20:44:02 +00:00
Dimitry Andric
be39349169 Fix a page fault in ip6_setpktopt(), occurring when the pflog module is
loaded, and syncthing is started, which uses setsockopt(IPV6_PKGINFO).

This is because pflog interfaces do not normally have an IPv6 address,
causing the ND_IFINFO() macro to dereference a NULL pointer.

Reviewed by:	ae
PR:		210943
MFC after:	3 days
2016-07-13 19:41:19 +00:00
Eric Badger
fdb6320d45 Add explicit detection of KVM hypervisor
Set vm_guest to a new enum value (VM_GUEST_KVM) when kvm is detected and use
vm_guest in conditionals testing for KVM.

Also, fix a conditional checking if we're running in a VM which caught only
the generic VM case, but not more specific VMs (KVM, VMWare, etc.).  (Spotted
by: vangyzen).

Differential revision:	https://reviews.freebsd.org/D7172
Sponsored by:	Dell Inc.
Approved by:	kib (mentor), vangyzen (mentor)
Reviewed by:	alc
MFC after:	4 weeks
2016-07-13 19:19:18 +00:00
Jung-uk Kim
0aed566c32 Remove a tunable and always reset system clock while resuming with ACPI.
Requested by:	bde (long ago)
2016-07-13 19:16:32 +00:00
Andrey A. Chernov
ea81c8d0ef After removing collation for [a-z] ranges in r302512, do it here too.
Instead of trying to expand whole range at regcomp() stage as we do,
GNU regex allocates separate ranges [start,end] set each character
is checked against, so collation is possible and turned on for ranges here.

When something like that will be implemented or our obsoleted regex code
will be replaced to something like TRE, and in case we decide to use
collation in [a-z] ranges, all changes related to r302512 can be backed out,
but now we need consistency.
2016-07-13 19:02:59 +00:00
Andrey A. Chernov
f04b8af8fa After removing collation for [a-z] ranges in r302512, do it here too.
Instead of trying to expand whole range at regcomp() stage as we do,
GNU regex allocates separate ranges [start,end] set each character
is checked against, so collation is possible and turned on for ranges here.

When something like that will be implemented or our obsoleted regex code
will be replaced to something like TRE, and in case we decide to use
collation in [a-z] ranges, all changes related to r302512 can be backed out,
but now we need consistency.
2016-07-13 18:51:19 +00:00
Dag-Erling Smørgrav
f4dc9bf434 merge upstream hg 06347b1f76fe (fix IXFR)
PR:		209177
MFC after:	3 days
2016-07-13 18:26:05 +00:00
Alan Somers
7c46e6ef06 pw should sanitize the argument of -w.
Otherwise, it will silently disable the login for the selected account if
the argument is unrecognizable.

usr.sbin/pw/pw.h
usr.sbin/pw/pw_conf.c
usr.sbin/pw/pw_user.c
	Use separate rules to validate boolean parameters and passwd
	parameters.  Error out if a password parameter cannot be parsed.

usr.sbin/pw/tests/Makefile
usr.sbin/pw/tests/crypt.c
usr.sbin/pw/tests/pw_useradd.sh
usr.sbin/pw/tests/pw_usermod.sh
	Add tests for the validation.  Also, enhance existing
	password-related tests to actually validate that the correct hash is
	written to master.passwd.

Reviewed by:	bapt
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D6840
2016-07-13 17:09:20 +00:00
Andrey A. Chernov
ab1e39bc6b After removing collation for [a-z] ranges in r302512, mimic system
glob() here too.

I try to keep the change minimal to not touch contribed code much.
I'll send it upstream when it will be merged to the main branches,
but we need this change now here.
2016-07-13 16:49:48 +00:00
Pedro F. Giffuni
b22a869924 mail(1): Bring some fixes from other BSDs.
- Use varargs properly
- Use pid_t
- Better handling of error conditions on forked jobs.
- Some prototype and warning cleanups.

Obtained from:	NetBSD (some originaly from OpenBSD)
2016-07-13 16:45:26 +00:00
Andriy Gapon
ac3623e090 re-apply r299908: zfsctl_snapdir_lookup: clear VV_ROOT of snapshot's root
The change has been undone in r301275 on the assumption that it was no
longer required.  But that was incorrect, because in this case (and only
in this case) the snapshot root vnode is looked up before z_parent is
fixed up.

MFC after:	5 days
2016-07-13 15:16:51 +00:00
Pedro F. Giffuni
dde0f2bfd3 mail(1): check for out of memory conditions when calling calloc(3).
Suggested by:	oshogbo
MFC after:	3 days
2016-07-13 14:59:17 +00:00
Konstantin Belousov
de56aee0bf Trace timeval parameters to the getitimer(2) and setitimer(2) syscalls.
Reviewed by:	jhb
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D7158
2016-07-13 14:37:58 +00:00
Andrey A. Chernov
1d148a7c3f After removing collation for [a-z] ranges in r302512, do it here too.
I'll try to keep the change very minimal to not touch contribed code much.
I'll send it upstream when it will be merged to main branches,
but we need the change right now here.
2016-07-13 10:01:31 +00:00
Sepherosa Ziehau
e2d8dbe438 hyperv/vmbus: Cleanup channel rescind
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7090
2016-07-13 09:44:24 +00:00
Sepherosa Ziehau
37a911a59b hyperv/vmbus: Remove unused code
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7089
2016-07-13 09:36:46 +00:00
Sepherosa Ziehau
8c8cf3f2e2 hyperv/vmbus: Reorganize MNF event sending.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7088
2016-07-13 09:28:46 +00:00
Sepherosa Ziehau
562d480b7d hyperv: Signal event input parameter is shared w/ MNF
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7087
2016-07-13 09:19:33 +00:00
Sepherosa Ziehau
a570251d00 hyperv: All Hypercall parameters have same alignment requirement.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7086
2016-07-13 09:11:03 +00:00
Sepherosa Ziehau
782b0df476 hyperv/vmbus: Install different task function for batch/non-batch channels
This avoids bunch of unnecessary checks on hot path and simplifies the
channel processing.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7085
2016-07-13 08:30:14 +00:00
Andrey A. Chernov
3ea37deb6c After removing collation for [a-z] ranges in r302512, do it here too.
Approved by:    jilles
2016-07-13 08:13:09 +00:00
Andrey A. Chernov
8e0303b03b Fully back out r302594 case 2) since overflow may happens. 2016-07-13 07:56:01 +00:00
Sepherosa Ziehau
817c040c3f hyperv/vmbus: Remove unnecessary callback check.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7046
2016-07-13 06:55:21 +00:00
Sepherosa Ziehau
df1021e7bf hyperv/vmbus: Pack bool field into flags field
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7038
2016-07-13 06:46:29 +00:00
Sepherosa Ziehau
7c2abef176 hyperv/bufring: Remove unused fields
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7037
2016-07-13 06:39:04 +00:00
Sepherosa Ziehau
6de616d3a0 hyperv/vmbus: Nuke unused field from hv_vmbus_channel.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7036
2016-07-13 06:30:33 +00:00
Sepherosa Ziehau
3b50b13baa hyperv: Get rid of hv_device, which is unnecessary indirection.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7034
2016-07-13 06:17:15 +00:00
Sepherosa Ziehau
6a2ff2cbf7 hyperv/hn: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary
indirection.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7033
2016-07-13 05:58:46 +00:00
Sepherosa Ziehau
47575345ba hyperv/vmbus: Deprecate the usage of hv_device.
This paves way to nuke the hv_device, which is actually an unncessary
indirection.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7032
2016-07-13 05:47:09 +00:00
Sepherosa Ziehau
2d19acf75b hyperv/util: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary
indirection.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7028
2016-07-13 05:35:28 +00:00
Sepherosa Ziehau
d2c2a2ef36 hyperv/stor: Avoid the hv_device and nuke the broken get_stor_device
This paves way to nuke the hv_device, which is actually an unncessary
indirection.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7027
2016-07-13 05:28:07 +00:00
Sepherosa Ziehau
edd0c2c7c7 hyperv/vmbus: Add channel ivar accessor.
This makes life easier during the transition period to nuke the hv_device.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7026
2016-07-13 05:19:45 +00:00
Sepherosa Ziehau
93637258fd hyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7025
2016-07-13 05:11:45 +00:00
Sepherosa Ziehau
884d26c84c hyperv/vmbus: Add vmbus method for GUID base device probing.
Reduce the exposure of hv_device.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7024
2016-07-13 05:01:12 +00:00
Sepherosa Ziehau
abe9fa4996 hyperv/vmbus: Remove the embedded offer message from hv_vmbus_channel
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7021
2016-07-13 04:51:37 +00:00
Sepherosa Ziehau
5c604feb67 hyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7020
2016-07-13 04:39:16 +00:00
Sepherosa Ziehau
d74e22ed4a hyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7019
2016-07-13 04:31:08 +00:00
Sepherosa Ziehau
4ac0a9bf1e hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7015
2016-07-13 03:35:22 +00:00
Sepherosa Ziehau
2c4888c75b hyperv/vmbus: Make channel id a field of hv_vmbus_channel.
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7014
2016-07-13 03:24:29 +00:00
Sepherosa Ziehau
e71d17193d hyperv/vmbus: Merge hv_connection.c into hv_channel.c
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7004
2016-07-13 03:14:29 +00:00
Nathan Whitehorn
4c0ef5db05 Reduce the set of things on the disc1 image to those on the bootonly image.
Notably, this removes the toolchain from the CD-ROM image (it remains on DVD
images) and pushes the CD-ROM image well below the 700 MB mark.

MFC after:	10 days
2016-07-13 02:07:36 +00:00
Bryan Drewery
b987685fe0 Revert r302670 and r302671 for now.
MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which
has it backwards.
2016-07-13 01:35:53 +00:00
Conrad Meyer
1be25cc928 ioat(4): Check ring links at grow/shrink in INVARIANTS 2016-07-12 21:57:05 +00:00
Conrad Meyer
6d41e1ed15 ioat(4): Add KTR trace for ioat_reset_hw 2016-07-12 21:57:02 +00:00
Conrad Meyer
bd17dd691e ioat(4): Enhance KTR logging for descriptor completions 2016-07-12 21:57:00 +00:00
Conrad Meyer
3b188a672f ioat(4): Assert against ring underflow 2016-07-12 21:56:57 +00:00