]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agomerge upstream hg 06347b1f76fe (fix IXFR)
Dag-Erling Smørgrav [Wed, 13 Jul 2016 18:26:05 +0000 (18:26 +0000)]
merge upstream hg 06347b1f76fe (fix IXFR)

PR: 209177
MFC after: 3 days

7 years agopw should sanitize the argument of -w.
Alan Somers [Wed, 13 Jul 2016 17:09:20 +0000 (17:09 +0000)]
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

7 years agoAfter removing collation for [a-z] ranges in r302512, mimic system
Andrey A. Chernov [Wed, 13 Jul 2016 16:49:48 +0000 (16:49 +0000)]
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.

7 years agomail(1): Bring some fixes from other BSDs.
Pedro F. Giffuni [Wed, 13 Jul 2016 16:45:26 +0000 (16:45 +0000)]
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)

7 years agore-apply r299908: zfsctl_snapdir_lookup: clear VV_ROOT of snapshot's root
Andriy Gapon [Wed, 13 Jul 2016 15:16:51 +0000 (15:16 +0000)]
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

7 years agomail(1): check for out of memory conditions when calling calloc(3).
Pedro F. Giffuni [Wed, 13 Jul 2016 14:59:17 +0000 (14:59 +0000)]
mail(1): check for out of memory conditions when calling calloc(3).

Suggested by: oshogbo
MFC after: 3 days

7 years agoTrace timeval parameters to the getitimer(2) and setitimer(2) syscalls.
Konstantin Belousov [Wed, 13 Jul 2016 14:37:58 +0000 (14:37 +0000)]
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

7 years agoAfter removing collation for [a-z] ranges in r302512, do it here too.
Andrey A. Chernov [Wed, 13 Jul 2016 10:01:31 +0000 (10:01 +0000)]
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.

7 years agohyperv/vmbus: Cleanup channel rescind
Sepherosa Ziehau [Wed, 13 Jul 2016 09:44:24 +0000 (09:44 +0000)]
hyperv/vmbus: Cleanup channel rescind

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

7 years agohyperv/vmbus: Remove unused code
Sepherosa Ziehau [Wed, 13 Jul 2016 09:36:46 +0000 (09:36 +0000)]
hyperv/vmbus: Remove unused code

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

7 years agohyperv/vmbus: Reorganize MNF event sending.
Sepherosa Ziehau [Wed, 13 Jul 2016 09:28:46 +0000 (09:28 +0000)]
hyperv/vmbus: Reorganize MNF event sending.

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

7 years agohyperv: Signal event input parameter is shared w/ MNF
Sepherosa Ziehau [Wed, 13 Jul 2016 09:19:33 +0000 (09:19 +0000)]
hyperv: Signal event input parameter is shared w/ MNF

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

7 years agohyperv: All Hypercall parameters have same alignment requirement.
Sepherosa Ziehau [Wed, 13 Jul 2016 09:11:03 +0000 (09:11 +0000)]
hyperv: All Hypercall parameters have same alignment requirement.

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

7 years agohyperv/vmbus: Install different task function for batch/non-batch channels
Sepherosa Ziehau [Wed, 13 Jul 2016 08:30:14 +0000 (08:30 +0000)]
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

7 years agoAfter removing collation for [a-z] ranges in r302512, do it here too.
Andrey A. Chernov [Wed, 13 Jul 2016 08:13:09 +0000 (08:13 +0000)]
After removing collation for [a-z] ranges in r302512, do it here too.

Approved by:    jilles

7 years agoFully back out r302594 case 2) since overflow may happens.
Andrey A. Chernov [Wed, 13 Jul 2016 07:56:01 +0000 (07:56 +0000)]
Fully back out r302594 case 2) since overflow may happens.

7 years agohyperv/vmbus: Remove unnecessary callback check.
Sepherosa Ziehau [Wed, 13 Jul 2016 06:55:21 +0000 (06:55 +0000)]
hyperv/vmbus: Remove unnecessary callback check.

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

7 years agohyperv/vmbus: Pack bool field into flags field
Sepherosa Ziehau [Wed, 13 Jul 2016 06:46:29 +0000 (06:46 +0000)]
hyperv/vmbus: Pack bool field into flags field

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

7 years agohyperv/bufring: Remove unused fields
Sepherosa Ziehau [Wed, 13 Jul 2016 06:39:04 +0000 (06:39 +0000)]
hyperv/bufring: Remove unused fields

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

7 years agohyperv/vmbus: Nuke unused field from hv_vmbus_channel.
Sepherosa Ziehau [Wed, 13 Jul 2016 06:30:33 +0000 (06:30 +0000)]
hyperv/vmbus: Nuke unused field from hv_vmbus_channel.

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

7 years agohyperv: Get rid of hv_device, which is unnecessary indirection.
Sepherosa Ziehau [Wed, 13 Jul 2016 06:17:15 +0000 (06:17 +0000)]
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

7 years agohyperv/hn: Avoid the hv_device
Sepherosa Ziehau [Wed, 13 Jul 2016 05:58:46 +0000 (05:58 +0000)]
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

7 years agohyperv/vmbus: Deprecate the usage of hv_device.
Sepherosa Ziehau [Wed, 13 Jul 2016 05:47:09 +0000 (05:47 +0000)]
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

7 years agohyperv/util: Avoid the hv_device
Sepherosa Ziehau [Wed, 13 Jul 2016 05:35:28 +0000 (05:35 +0000)]
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

7 years agohyperv/stor: Avoid the hv_device and nuke the broken get_stor_device
Sepherosa Ziehau [Wed, 13 Jul 2016 05:28:07 +0000 (05:28 +0000)]
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

7 years agohyperv/vmbus: Add channel ivar accessor.
Sepherosa Ziehau [Wed, 13 Jul 2016 05:19:45 +0000 (05:19 +0000)]
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

7 years agohyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar
Sepherosa Ziehau [Wed, 13 Jul 2016 05:11:45 +0000 (05:11 +0000)]
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

7 years agohyperv/vmbus: Add vmbus method for GUID base device probing.
Sepherosa Ziehau [Wed, 13 Jul 2016 05:01:12 +0000 (05:01 +0000)]
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

7 years agohyperv/vmbus: Remove the embedded offer message from hv_vmbus_channel
Sepherosa Ziehau [Wed, 13 Jul 2016 04:51:37 +0000 (04:51 +0000)]
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

7 years agohyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel
Sepherosa Ziehau [Wed, 13 Jul 2016 04:39:16 +0000 (04:39 +0000)]
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

7 years agohyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication
Sepherosa Ziehau [Wed, 13 Jul 2016 04:31:08 +0000 (04:31 +0000)]
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

7 years agohyperv/vmbus: Make subchan index a field of hv_vmbus_channel.
Sepherosa Ziehau [Wed, 13 Jul 2016 03:35:22 +0000 (03:35 +0000)]
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

7 years agohyperv/vmbus: Make channel id a field of hv_vmbus_channel.
Sepherosa Ziehau [Wed, 13 Jul 2016 03:24:29 +0000 (03:24 +0000)]
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

7 years agohyperv/vmbus: Merge hv_connection.c into hv_channel.c
Sepherosa Ziehau [Wed, 13 Jul 2016 03:14:29 +0000 (03:14 +0000)]
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

7 years agoReduce the set of things on the disc1 image to those on the bootonly image.
Nathan Whitehorn [Wed, 13 Jul 2016 02:07:36 +0000 (02:07 +0000)]
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

7 years agoRevert r302670 and r302671 for now.
Bryan Drewery [Wed, 13 Jul 2016 01:35:53 +0000 (01:35 +0000)]
Revert r302670 and r302671 for now.

MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which
has it backwards.

7 years agoioat(4): Check ring links at grow/shrink in INVARIANTS
Conrad Meyer [Tue, 12 Jul 2016 21:57:05 +0000 (21:57 +0000)]
ioat(4): Check ring links at grow/shrink in INVARIANTS

7 years agoioat(4): Add KTR trace for ioat_reset_hw
Conrad Meyer [Tue, 12 Jul 2016 21:57:02 +0000 (21:57 +0000)]
ioat(4): Add KTR trace for ioat_reset_hw

7 years agoioat(4): Enhance KTR logging for descriptor completions
Conrad Meyer [Tue, 12 Jul 2016 21:57:00 +0000 (21:57 +0000)]
ioat(4): Enhance KTR logging for descriptor completions

7 years agoioat(4): Assert against ring underflow
Conrad Meyer [Tue, 12 Jul 2016 21:56:57 +0000 (21:56 +0000)]
ioat(4): Assert against ring underflow

7 years agoioat_reserve_space: Recheck quiescing flag after dropping submit lock
Conrad Meyer [Tue, 12 Jul 2016 21:56:55 +0000 (21:56 +0000)]
ioat_reserve_space: Recheck quiescing flag after dropping submit lock

Fix a minor bound check error while here (ring can only hold 1 <<
MAX_ORDER - 1 entries).

7 years agoioat(4): Remove force_hw_error sysctl; it does not work reliably
Conrad Meyer [Tue, 12 Jul 2016 21:56:52 +0000 (21:56 +0000)]
ioat(4): Remove force_hw_error sysctl; it does not work reliably

7 years agoioat(4): Export HW capabilities to consumers
Conrad Meyer [Tue, 12 Jul 2016 21:56:49 +0000 (21:56 +0000)]
ioat(4): Export HW capabilities to consumers

7 years agoioat(4): Submitters pick up a shovel if queue is too full
Conrad Meyer [Tue, 12 Jul 2016 21:56:46 +0000 (21:56 +0000)]
ioat(4): Submitters pick up a shovel if queue is too full

Before attempting to grow the ring.

7 years agoioat(4): Don't shrink ring if active
Conrad Meyer [Tue, 12 Jul 2016 21:56:34 +0000 (21:56 +0000)]
ioat(4): Don't shrink ring if active

7 years agoioat(4): Print some more useful information about the ring from ddb "show ioat"
Conrad Meyer [Tue, 12 Jul 2016 21:52:26 +0000 (21:52 +0000)]
ioat(4): Print some more useful information about the ring from ddb "show ioat"

7 years agoMETA_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8)
Bryan Drewery [Tue, 12 Jul 2016 19:47:01 +0000 (19:47 +0000)]
META_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8)

New .meta files will be created without filemon data, but any future build
that wants filemon data will force a rebuild due to the missing data
due to use of bmake's .MAKE.MODE=missing-filemon=yes feature.

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

7 years agoUse real values to calculate Max I/O size instead of guessing.
Stephen McConnell [Tue, 12 Jul 2016 19:34:10 +0000 (19:34 +0000)]
Use real values to calculate Max I/O size instead of guessing.

Reviewed by: ken, scottl
Approved by: ken, scottl, ambrisko (mentors)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7043

7 years agoCreate a TARGET_CPUARCH thing to go with MACHINE_CPUARCH.
Bryan Drewery [Tue, 12 Jul 2016 18:57:28 +0000 (18:57 +0000)]
Create a TARGET_CPUARCH thing to go with MACHINE_CPUARCH.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7160

7 years agoCreate one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.
Bryan Drewery [Tue, 12 Jul 2016 18:57:25 +0000 (18:57 +0000)]
Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.

This also adds missing s/aarch64/arm64 to the sys.mk version and also
adds back armv6hf for universe since it was added to the sys.mk version
in r300438.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7159

7 years agoioat(4): Shrink using the correct timer
Conrad Meyer [Tue, 12 Jul 2016 17:58:58 +0000 (17:58 +0000)]
ioat(4): Shrink using the correct timer

Fix a typo introduced in r302352.

Sponsored by: EMC / Isilon Storage Division

7 years agoMake unknown register reads predictable.
Alexander Motin [Tue, 12 Jul 2016 17:38:18 +0000 (17:38 +0000)]
Make unknown register reads predictable.

Reported by: Coverity
CID: 1357525

7 years agoFix problems in the FQ-PIE AQM cleanup code that could leak memory or
Don Lewis [Tue, 12 Jul 2016 17:32:40 +0000 (17:32 +0000)]
Fix problems in the FQ-PIE AQM cleanup code that could leak memory or
cause a crash.

Because dummynet calls pie_cleanup() while holding a mutex, pie_cleanup()
is not able to use callout_drain() to make sure that all callouts are
finished before it returns, and callout_stop() is not sufficient to make
that guarantee.  After pie_cleanup() returns, dummynet will free a
structure that any remaining callouts will want to access.

Fix these problems by allocating a separate structure to contain the
data used by the callouts.  In pie_cleanup(), call callout_reset_sbt()
to replace the normal callout with a cleanup callout that does the cleanup
work for each sub-queue.  The instance of the cleanup callout that
destroys the last flow will also free the extra allocated block of memory.
Protect the reference count manipulation in the cleanup callout with
DN_BH_WLOCK() to be consistent with all of the other usage of the reference
count where this lock is held by the dummynet code.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7174

7 years agoAdd missing breaks in I/O BAR read/write.
Alexander Motin [Tue, 12 Jul 2016 17:30:37 +0000 (17:30 +0000)]
Add missing breaks in I/O BAR read/write.

This could be important if any guest actually used those registers.

Reported by: Coverity
CID: 13575191357520

7 years agomkimg(1): minor cleanups with argument order in calloc(3).
Pedro F. Giffuni [Tue, 12 Jul 2016 15:46:53 +0000 (15:46 +0000)]
mkimg(1): minor cleanups with argument order in calloc(3).

Generally the first argument in calloc is supposed to stand for a count
and the second for a size. Try to make that consistent. While here,
attempt to make some use of the overflow detection capability in
calloc(3).

7 years agohyperv/vmbus: Destroy channel list lock upon attach failure and detach.
Sepherosa Ziehau [Tue, 12 Jul 2016 09:06:25 +0000 (09:06 +0000)]
hyperv/vmbus: Destroy channel list lock upon attach failure and detach.

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

7 years agohyperv/vmbus: Remove needed bits
Sepherosa Ziehau [Tue, 12 Jul 2016 08:55:08 +0000 (08:55 +0000)]
hyperv/vmbus: Remove needed bits

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

7 years agohyperv/vmbus: Move channel map to vmbus_softc
Sepherosa Ziehau [Tue, 12 Jul 2016 08:47:04 +0000 (08:47 +0000)]
hyperv/vmbus: Move channel map to vmbus_softc

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

7 years agoxen: automatically disable MSI-X interrupt migration
Roger Pau Monné [Tue, 12 Jul 2016 08:43:09 +0000 (08:43 +0000)]
xen: automatically disable MSI-X interrupt migration

If the hypervisor version is smaller than 4.6.0. Xen commits 74fd00 and
70a3cb are required on the hypervisor side for this to be fixed, and those
are only included in 4.6.0, so stay on the safe side and disable MSI-X
interrupt migration on anything older than 4.6.0.

It should not cause major performance degradation unless a lot of MSI-X
interrupts are allocated.

Sponsored by: Citrix Systems R&D
MFC after: 3 days
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D7148

7 years agohyperv/vmbus: Fix sub-channel re-open support.
Sepherosa Ziehau [Tue, 12 Jul 2016 08:38:03 +0000 (08:38 +0000)]
hyperv/vmbus: Fix sub-channel re-open support.

For multi-channel devices, once the primary channel is closed,
a set of 'rescind' messages for sub-channels will be delivered
by Hypervisor.  Sub-channel MUST be freed according to these
'rescind' messages; directly re-openning sub-channels in the
same fashion as the primary channel's re-opening does NOT work
at all.

After the primary channel is re-opened, requested # of sub-
channels will be delivered though 'channel offer' messages, and
this set of newly offered channels can be opened along side with
the primary channel.

This unbreaks the MTU setting for hn(4), which requires re-
openning all existsing channels upon MTU change.

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

7 years agohyperv/vmbus: Free sysctl properly upon channel close.
Sepherosa Ziehau [Tue, 12 Jul 2016 08:28:51 +0000 (08:28 +0000)]
hyperv/vmbus: Free sysctl properly upon channel close.

Prepare for sub-channel re-open.

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

7 years agohyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}
Sepherosa Ziehau [Tue, 12 Jul 2016 08:21:28 +0000 (08:21 +0000)]
hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}

Reviewed by: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6976

7 years agohyperv/vmbus: Move channel list to vmbus_softc
Sepherosa Ziehau [Tue, 12 Jul 2016 08:11:16 +0000 (08:11 +0000)]
hyperv/vmbus: Move channel list to vmbus_softc

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

7 years agohyperv/vmbus: Move GPADL index into vmbus_softc
Sepherosa Ziehau [Tue, 12 Jul 2016 07:49:38 +0000 (07:49 +0000)]
hyperv/vmbus: Move GPADL index into vmbus_softc

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

7 years agohyperv/vmbus: Rework vmbus version accessing.
Sepherosa Ziehau [Tue, 12 Jul 2016 07:33:39 +0000 (07:33 +0000)]
hyperv/vmbus: Rework vmbus version accessing.

Instead of global variable, vmbus version is accessed through
a vmbus DEVMETHOD now.

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

7 years agoBump __FreeBSD_version after removing collation from [a-z]-type ranges.
Andrey A. Chernov [Tue, 12 Jul 2016 07:16:37 +0000 (07:16 +0000)]
Bump __FreeBSD_version after removing collation from [a-z]-type ranges.

7 years agoFix pc98 LINT build.
Dmitry Chagin [Tue, 12 Jul 2016 06:12:58 +0000 (06:12 +0000)]
Fix pc98 LINT build.

MFC after: 4 days

7 years agoAdd some .Xrs to getloginclass(2).
Edward Tomasz Napierala [Tue, 12 Jul 2016 06:00:57 +0000 (06:00 +0000)]
Add some .Xrs to getloginclass(2).

MFC after: 1 month

7 years agohyperv/vmbus: Minor renaming
Sepherosa Ziehau [Tue, 12 Jul 2016 05:55:11 +0000 (05:55 +0000)]
hyperv/vmbus: Minor renaming

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

7 years agontb: Fix LINT
Sepherosa Ziehau [Tue, 12 Jul 2016 05:41:34 +0000 (05:41 +0000)]
ntb: Fix LINT

Sponsored by: Microsoft OSTC

7 years agohyperv/vmbus: Don't be oversmart in default cpu selection.
Sepherosa Ziehau [Tue, 12 Jul 2016 05:31:33 +0000 (05:31 +0000)]
hyperv/vmbus: Don't be oversmart in default cpu selection.

Pin the channel to cpu0 by default.  Drivers having special channel-cpu
mapping requirement should call vmbus_channel_cpu_{set,rr}() themselves.

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

7 years agohyperv: Nuke unused stuffs
Sepherosa Ziehau [Tue, 12 Jul 2016 05:23:14 +0000 (05:23 +0000)]
hyperv: Nuke unused stuffs

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

7 years agohyperv/vmbus: Busdma-fy Hypercall signal event input parameter.
Sepherosa Ziehau [Tue, 12 Jul 2016 05:09:07 +0000 (05:09 +0000)]
hyperv/vmbus: Busdma-fy Hypercall signal event input parameter.

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

7 years agohyperv/vmbus: Avoid tx_evtflags setting code duplication.
Sepherosa Ziehau [Tue, 12 Jul 2016 04:58:21 +0000 (04:58 +0000)]
hyperv/vmbus: Avoid tx_evtflags setting code duplication.

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

7 years agohyperv/vmbus: Flatten channel message response processing.
Sepherosa Ziehau [Tue, 12 Jul 2016 04:35:32 +0000 (04:35 +0000)]
hyperv/vmbus: Flatten channel message response processing.

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

7 years agoUndo r302599 and partially r302594 case 2):
Andrey A. Chernov [Tue, 12 Jul 2016 04:29:34 +0000 (04:29 +0000)]
Undo r302599 and partially r302594 case 2):
since WCHAR_MAX can be not a valid wchar value, it is easier to stay
inside wint_t.

7 years agoUndo r302601, WCHAR_MAX may not be a valid wchar value.
Andrey A. Chernov [Tue, 12 Jul 2016 04:20:44 +0000 (04:20 +0000)]
Undo r302601, WCHAR_MAX may not be a valid wchar value.

7 years agoRevive the check, disabled in r197963.
Konstantin Belousov [Tue, 12 Jul 2016 03:53:15 +0000 (03:53 +0000)]
Revive the check, disabled in r197963.

Despite the implication (process has pending signals -> the current
thread marked for AST and has TDF_NEEDSIGCHK set) is not true due to
other thread might manipulate its signal blocking mask, it should still
hold for the single-threaded processes.  Enable check for the condition
for single-threaded case, and replicate it from userret() to ast() as
well, where we check that ast indeed has no signal to deliver.

Note that the check is under DIAGNOSTIC, it is not enabled for INVARIANTS
but !DIAGNOSTIC since it imposes too heavy-weight locking for day-to-day
used debugging kernel.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdd assert to complement r302328.
Konstantin Belousov [Tue, 12 Jul 2016 03:52:05 +0000 (03:52 +0000)]
Add assert to complement r302328.

AST must not execute with TDF_SBDRY or TDF_SEINTR/TDF_SERESTART thread
flags set, which is asserted in userret(). As the consequence, -1 return
from cursig() must not be possible.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agohyperv: Nuke unused stuffs
Sepherosa Ziehau [Tue, 12 Jul 2016 03:38:29 +0000 (03:38 +0000)]
hyperv: Nuke unused stuffs

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

7 years agohyperv/vmbus: Use post message Hypercall APIs for GPA disconnect
Sepherosa Ziehau [Tue, 12 Jul 2016 03:32:07 +0000 (03:32 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect

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

7 years agohyperv/vmbus: Use post message Hypercall APIs for channel close
Sepherosa Ziehau [Tue, 12 Jul 2016 03:25:36 +0000 (03:25 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for channel close

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

7 years agohyperv/vmbus: Use post message Hypercall APIs for GPADL connect.
Sepherosa Ziehau [Tue, 12 Jul 2016 03:19:40 +0000 (03:19 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.

This also fixes memory leakge if sub-connect messages are needed.

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

7 years agohyperv/vmbus: Remove unnecessary check and unapplied comment
Sepherosa Ziehau [Tue, 12 Jul 2016 03:14:35 +0000 (03:14 +0000)]
hyperv/vmbus: Remove unnecessary check and unapplied comment

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

7 years agohyperv/vmbus: Use post message Hypercall APIs for channel open
Sepherosa Ziehau [Tue, 12 Jul 2016 03:09:10 +0000 (03:09 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for channel open

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

7 years agohyperv/vmbus: Reorganize vmbus scan process.
Sepherosa Ziehau [Tue, 12 Jul 2016 03:03:17 +0000 (03:03 +0000)]
hyperv/vmbus: Reorganize vmbus scan process.

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

7 years agohyperv/stor: Save the response status and xfer length properly.
Sepherosa Ziehau [Tue, 12 Jul 2016 02:57:13 +0000 (02:57 +0000)]
hyperv/stor: Save the response status and xfer length properly.

The current command response handling discards status and xfer
length unconditionally, so that all of the commands would be
considered successful, even if errors happened.  When errors
really happens, this causes all kinds of wiredness, since the
buffer will not be filled on the host side and sense data will
be ignored.

Most of the time, errors do not happen, however, error does
happen for the request sent immediately after the disk resizing.
Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense
data (capacity changes) prevents the disk resizing from working
properly.

This commit saves the response status and xfer length properly
for later use.

Submitted by: Dexuan Cui <decui microsoft com>
Noticed by: sephe
MFC after: 3 days
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7181

7 years agobhnd(4): Add bus pass-aware discovery of platform devices (PMU,
Landon J. Fuller [Tue, 12 Jul 2016 02:16:48 +0000 (02:16 +0000)]
bhnd(4): Add bus pass-aware discovery of platform devices (PMU,
NVRAM, ChipCommon, etc).

This extends the existing handling of NVRAM core discovery to support
locating additional devices that may be attached either directly as real
cores, or indirectly via ChipCommon (e.g. bhnd_pmu).

When attached as a SoC root bus (as opposed to a bridged WiFi device),
the platform devices may not be attached until later bus passes,
necessitating delayed discovery/initialization.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6962

7 years agomips/ddb: fix MIPS backtrace truncation and MIPS32 register printing.
Landon J. Fuller [Tue, 12 Jul 2016 02:12:31 +0000 (02:12 +0000)]
mips/ddb: fix MIPS backtrace truncation and MIPS32 register printing.

 - Cast 32-bit register values to uintmax_t for use with %jx.
 - Add special-case return address handling for MipsKernGenException to
   avoid early termination of stack walking in the exception handler
   stack frame.

Submitted by: Michael Zhilin <mizhka@gmail.com>
Reviewed by: ray
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6907

7 years agobhnd(4): print extra register information on chipc SPI timeout.
Landon J. Fuller [Tue, 12 Jul 2016 01:15:00 +0000 (01:15 +0000)]
bhnd(4): print extra register information on chipc SPI timeout.

Submitted by: Michael Zhilin <mizhka@gmail.com>
Reviewed by: imp
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6993

7 years agoI don't know why unsigned int is choosed for wchar_t here, but WCHAR_MAX
Andrey A. Chernov [Tue, 12 Jul 2016 00:37:48 +0000 (00:37 +0000)]
I don't know why unsigned int is choosed for wchar_t here, but WCHAR_MAX
should be <= WINT_MAX. It is bigger, __UINT_MAX > INT32_MAX

7 years agoCast WCHAR_MAX to wint_t, it can be unsigned on some systems.
Andrey A. Chernov [Mon, 11 Jul 2016 23:06:11 +0000 (23:06 +0000)]
Cast WCHAR_MAX to wint_t, it can be unsigned on some systems.

7 years agoFix TARGET_TRIPLE for 12.0-CURRENT.
Glen Barber [Mon, 11 Jul 2016 21:55:56 +0000 (21:55 +0000)]
Fix TARGET_TRIPLE for 12.0-CURRENT.

Submitted by: rene
Sponsored by: The FreeBSD Foundation

7 years agoRemove assumptions in MI code that the BSP is CPU 0.
Nathan Whitehorn [Mon, 11 Jul 2016 21:25:28 +0000 (21:25 +0000)]
Remove assumptions in MI code that the BSP is CPU 0.

MFC after: 2 weeks

7 years ago1) Following r302512 (remove collation support for [a-z]-ranges in libc)
Andrey A. Chernov [Mon, 11 Jul 2016 21:23:50 +0000 (21:23 +0000)]
1) Following r302512 (remove collation support for [a-z]-ranges in libc)
remove collation support for a-z ranges here too.
It was implemented for single byte locales only in any case.

2) Reduce [Cc]flag loop to WCHAR_MAX, WINT_MAX here includes WEOF which is
not a character.

3) Optimize [Cc]flag case: don't repeatedly add the last character of
string2 to squeeze cset when string2 reach its EOS state.

4) Reflect in the manpage that [=equiv=] is implemented for single
byte locales only.

7 years agoAdd support for Allwinner A64.
Jared McNeill [Mon, 11 Jul 2016 20:15:46 +0000 (20:15 +0000)]
Add support for Allwinner A64.

Reviewed by: andrew, manu

7 years agoReturn early from bus_dmamap_load callback if the error indicator is set.
Jared McNeill [Mon, 11 Jul 2016 20:14:50 +0000 (20:14 +0000)]
Return early from bus_dmamap_load callback if the error indicator is set.

Reviewed by: andrew, manu

7 years agoAdd support for arm64. The allwinner_soc_family() function is not available
Jared McNeill [Mon, 11 Jul 2016 20:13:46 +0000 (20:13 +0000)]
Add support for arm64. The allwinner_soc_family() function is not available
on arm64 and all SoCs using the old FIFO register location are 32-bit only,
so unconditionally use the new location for arm64.

Reviewed by: andrew, manu

7 years agoAdd support for Allwinner A64 CPUx-PORT and CPUs-PORT Port Controllers.
Jared McNeill [Mon, 11 Jul 2016 20:09:17 +0000 (20:09 +0000)]
Add support for Allwinner A64 CPUx-PORT and CPUs-PORT Port Controllers.

Reviewed by: andrew, manu

7 years agoAdd Allwinner A64 padconf settings.
Jared McNeill [Mon, 11 Jul 2016 20:06:21 +0000 (20:06 +0000)]
Add Allwinner A64 padconf settings.

Reviewed by: andrew, manu