]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoFor i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE
Konstantin Belousov [Fri, 3 Feb 2017 12:51:40 +0000 (12:51 +0000)]
For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE
and device npx.

This means that FPU is always initialized and handled when available,
and SSE+ register file and exception are handled when available.  This
makes the kernel FPU code much easier to maintain by the cost of
slight bloat for CPUs older than 25 years.

CPU_DISABLE_CMPXCHG outlived its usefulness, see the removed comment
explaining the original purpose.

Suggested by and discussed with: bde
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

7 years agoFix the comment showing the meaning of the first argument to sigprocmask.
Andrew Turner [Fri, 3 Feb 2017 11:51:06 +0000 (11:51 +0000)]
Fix the comment showing the meaning of the first argument to sigprocmask.

Sponsored by: ABT Systems Ltd

7 years agoRemove an old use of _ARM_ARCH_6, we are moving to using the standard
Andrew Turner [Fri, 3 Feb 2017 11:47:57 +0000 (11:47 +0000)]
Remove an old use of _ARM_ARCH_6, we are moving to using the standard
__ARM_ARCH >= 6 spelling.

Sponsored by: ABT Systems Ltd

7 years agoOnly define atomic_fcmpset_long in the kernel. We may include
Andrew Turner [Fri, 3 Feb 2017 10:04:17 +0000 (10:04 +0000)]
Only define atomic_fcmpset_long in the kernel. We may include
machine/atomic.h in userspace, however atomic_fcmpset_32 is unimplemented
there.

Sponsored by: ABT Systems Ltd

7 years ago[net80211] don't update quiet time counter values every probe request.
Adrian Chadd [Fri, 3 Feb 2017 06:04:06 +0000 (06:04 +0000)]
[net80211] don't update quiet time counter values every probe request.

The quiet time counter update is happening each time the IE is added,
which also means it happens for each quiet time IE addition to the probe
response.

Only update the countdown if we request ie (ie, beacon updates.)

7 years ago[ath_hal] [ar9300] link in the CAC enable/diable methods and expose it via the HAL.
Adrian Chadd [Fri, 3 Feb 2017 05:15:35 +0000 (05:15 +0000)]
[ath_hal] [ar9300] link in the CAC enable/diable methods and expose it via the HAL.

7 years ago[ath_hal] prepare for CAC quiet time.
Adrian Chadd [Fri, 3 Feb 2017 05:15:08 +0000 (05:15 +0000)]
[ath_hal] prepare for CAC quiet time.

To support DFS, the NIC needs to be very quiet during this time.
No transmissions including ACKs are allowed.

This is just the initial HAL glue.

7 years ago[ath_hal] [ar9300] initial radar decode for AR9380 and later chips.
Adrian Chadd [Fri, 3 Feb 2017 03:57:06 +0000 (03:57 +0000)]
[ath_hal] [ar9300] initial radar decode for AR9380 and later chips.

7 years agoSync the x86 dis_tables.c with upstream.
Mark Johnston [Fri, 3 Feb 2017 03:22:47 +0000 (03:22 +0000)]
Sync the x86 dis_tables.c with upstream.

This corresponds to the following illumos issues:

  5755 want support for Intel FMA instrs
  5756 want support for Intel BMI1 instrs
  5757 want support for Intel BMI2 instrs
  5758 want support for Intel AVX2 instrs
  7204 Want broadwell rdseed and adx support
  7208 Want stac/clac disasm support
  7733 Need SHA Instruction dis support
  7756 dis can't handle x86 SSE 3 instructions
  7757 want avx2 disasm tests
  7758 want SSE 4.1 disasm tests

MFC after: 2 weeks

7 years agoEnsure that the passthrough request will fit in MAXPHYS bytes after it
Warner Losh [Thu, 2 Feb 2017 23:04:06 +0000 (23:04 +0000)]
Ensure that the passthrough request will fit in MAXPHYS bytes after it
has been rounded to full pages. This avoids a panic in
vm_fault_quick_hold_pages due to this off-by-one error passing one
page too many into vmapbuf.

7 years agoUse aligned buffer for the firmware data. Otherwise, when loading a
Warner Losh [Thu, 2 Feb 2017 23:04:00 +0000 (23:04 +0000)]
Use aligned buffer for the firmware data. Otherwise, when loading a
MAXPHYS bytes of data, the I/O would require MAXPHYS + PAGE_SIZE worth
of pages to do the I/O and we'd hit an assertion in
vm_fault_quick_hold_pages unless MAXPHYS was larger than 1M +
PAGE_SIZE.

7 years agoUse ANSI definitions for some i386 functions.
Konstantin Belousov [Thu, 2 Feb 2017 22:02:10 +0000 (22:02 +0000)]
Use ANSI definitions for some i386 functions.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoTry to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)
Alexey Dokuchaev [Thu, 2 Feb 2017 20:30:50 +0000 (20:30 +0000)]
Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)

There is one capability explicitly documented in gettytab(5) as stupid: he.
And it is indeed.  It was meant to facilitate system hostname modification,
but is hardly usable in practice because it allows very limited editing
(e.g., it depends on a particular hostname length, making it non-generic).

Replace it with simple implementation that treats ``he'' as POSIX extended
regular expression which is matched against the hostname.  If there are no
parenthesized subexpressions in the pattern, entire matched string is used
as the final hostname.  Otherwise, use the first matched subexpression.
If the pattern does not match, the original hostname is not modified.

Using regex(3) gives more freedom, does not complicate the code very much,
and makes a lot more sense, in turn making ``he'' less stupid and actually
useful (e.g., it is now possible to obtain node or domain names from the
original hostname string, without knowing it in advance).

Reviewed by: jilles, manpages (wblock)
Approved by: jilles (implied)
Differential Revision: https://reviews.freebsd.org/D9244

7 years agoUpdate byacc regression tests to match 20170201.
Jung-uk Kim [Thu, 2 Feb 2017 20:01:54 +0000 (20:01 +0000)]
Update byacc regression tests to match 20170201.

7 years agoMFV: r313101
Jung-uk Kim [Thu, 2 Feb 2017 20:00:01 +0000 (20:00 +0000)]
MFV: r313101

Update byacc to 20170201.

7 years agoReduce diff to upstream using HAVE_CAPSICUM instead of __FreeBSD__. It'll also
Gleb Smirnoff [Thu, 2 Feb 2017 19:56:41 +0000 (19:56 +0000)]
Reduce diff to upstream using HAVE_CAPSICUM instead of __FreeBSD__. It'll also
make it easier to upstream HAVE_CASPER patch.

7 years agoImport byacc 20170201.
Jung-uk Kim [Thu, 2 Feb 2017 19:22:26 +0000 (19:22 +0000)]
Import byacc 20170201.

7 years agoIfdef out the unused vm_rr_selectdomain().
Edward Tomasz Napierala [Thu, 2 Feb 2017 17:44:55 +0000 (17:44 +0000)]
Ifdef out the unused vm_rr_selectdomain().

MFC after: 2 weeks
Sponsored by: DARPA, AFRL

7 years agoFix compilation for mips64 platforms
Kurt Lidl [Thu, 2 Feb 2017 17:43:00 +0000 (17:43 +0000)]
Fix compilation for mips64 platforms

The hwpmc_mips24k / hwpmc_mips74k modules are only for mips 32-bit hosts.
Reviewed by: adrian

7 years agoRequire Data Layer Active reporting for native PCI-e HotPlug.
John Baldwin [Thu, 2 Feb 2017 17:29:15 +0000 (17:29 +0000)]
Require Data Layer Active reporting for native PCI-e HotPlug.

Some PCI-e bridges report that they support HotPlug in the slot
capabilities but do not report support for Data Layer Active events
in the link capabilities register.  These bridges do not work correctly
when HotPlug is used.  Further, while the description of HotPlug in
the spec does not mention that DL active events are required, the
description of the link capabilities register says that DL active is
required for HotPlug.  Thanks to Dave Baukus for finding that language
in the spec.

PR: 211699
Submitted by: Dave Baukus <daveb@spectralogic.com>
Reviewed by: vangyzen
MFC after: 3 days

7 years ago[ath_hal] [ar9300] initial radar detection glue.
Adrian Chadd [Thu, 2 Feb 2017 09:19:57 +0000 (09:19 +0000)]
[ath_hal] [ar9300] initial radar detection glue.

* flesh out a "get default DFS parameters" routine
* remove the stub that returns NULL
* fix up the enable DFS method to do what FreeBSD does - specifically, allow pe_enabled
  to be set/cleared.

This allows the radar pulse reporting code to function, but it doesn't yet
do anything useful.

7 years agoRemake support for SMP kernel on UP cpu:
Michal Meloun [Thu, 2 Feb 2017 06:14:44 +0000 (06:14 +0000)]
Remake support for SMP kernel on UP cpu:
 - Use new option SMP_ON_UP instead of (mis)using specific CPU type.
   By this, any SMP kernel can be compiled with SMP_ON_UP support.
 - Enable runtime detection of CPU multiprocessor extensions only
   if SMP_ON_UP option is used. In other cases (pure SMP or UP),
   statically compile only required variant.
 - Don't leak multiprocessor instructions to UP kernel.
 - Correctly handle data cache write back to point of unification.
   DCCMVAU is supported on all armv7 cpus.
 - For SMP_ON_UP kernels, detect proper TTB flags on runtime.

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

7 years agoRemove remaining ifdefs from CESA header
Wojciech Macek [Thu, 2 Feb 2017 06:07:39 +0000 (06:07 +0000)]
Remove remaining ifdefs from CESA header

Commit r312743 ("Use SoC ID - based detection in CESA") resulted
in build failing for Marvell armv5 platforms, which don't support
the newer version of CESA controller. This patch provides a fix by
removing ifdefs around bitfields' definitions, so that they are
known to all platforms.

Submitted by:          Marcin Wojtas <mw@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield

7 years ago[ath_hal] [ar9300] initial hacks to make spectral scan working on AR9380 and later...
Adrian Chadd [Thu, 2 Feb 2017 05:29:22 +0000 (05:29 +0000)]
[ath_hal] [ar9300] initial hacks to make spectral scan working on AR9380 and later NICs.

* add debugging
* disable the manual noise floor calibration and tracking done by the HAL;
  this interferes with the normal calibration path and will lock up the RX
  side
* don't program short report / priority if they're provided as NOVAL.

7 years ago[ath] ensure the NIC is woken up before changing the spectral scan parameters.
Adrian Chadd [Thu, 2 Feb 2017 05:27:48 +0000 (05:27 +0000)]
[ath] ensure the NIC is woken up before changing the spectral scan parameters.

7 years ago[ath_hal] add debugging level for spectral scan.
Adrian Chadd [Thu, 2 Feb 2017 05:27:27 +0000 (05:27 +0000)]
[ath_hal] add debugging level for spectral scan.

7 years ago[ath] add spectral scan priority.
Adrian Chadd [Thu, 2 Feb 2017 05:27:06 +0000 (05:27 +0000)]
[ath] add spectral scan priority.

7 years ago[athspectral] add a knob to expose the spectral scan priority.
Adrian Chadd [Thu, 2 Feb 2017 05:26:39 +0000 (05:26 +0000)]
[athspectral] add a knob to expose the spectral scan priority.

This is required for AR9380 and later chips.. please leave it at 0 for now.

7 years agoFix build with WITHOUT_INET6.
Gleb Smirnoff [Thu, 2 Feb 2017 04:53:33 +0000 (04:53 +0000)]
Fix build with WITHOUT_INET6.

Submitted by: Alex Deiter <alex.deiter gmail.com>

7 years agoRemove dangling DE425 EISA card references in the de driver. They
Warner Losh [Thu, 2 Feb 2017 04:50:20 +0000 (04:50 +0000)]
Remove dangling DE425 EISA card references in the de driver. They
aren't used, and this doesn't change the supported hardware.

7 years agoReplace for/retry loops with "wait_for_ggate_device" calls and check
Enji Cooper [Thu, 2 Feb 2017 03:54:43 +0000 (03:54 +0000)]
Replace for/retry loops with "wait_for_ggate_device" calls and check
results of commands

As noted in r313008, the underlying issue was that geom_gate device
creation wasn't created at ggatel command completion, but some short
time after. ggatec(8) employs similar logic when creating geom_gate(4)
devices.

Switch from retry loops (after the ggatec/dd write calls) to
wait_for_ggate_device function calls after calling ggatec(8) instead
to detect the presence of the /dev/ggate* device, as this function is
sufficient for determining whether or not the character device is ready
for testing

While here, use atf_check consistently with all dd calls to ensure that
data output is as expected.

MFC after: 1 week
Reviewed by: asomers
Differential Revision: D9409
Sponsored by: Dell EMC Isilon

7 years agoi386: fixup fcmpset
Mateusz Guzik [Thu, 2 Feb 2017 01:33:08 +0000 (01:33 +0000)]
i386: fixup fcmpset

An incorrect output specifier was used which worked with clang by accident,
but breaks with the in-tree gcc version.

While here plug a whitespace nit.

Reported by: bde

7 years agoMFV r313071:
Martin Matuska [Thu, 2 Feb 2017 00:50:46 +0000 (00:50 +0000)]
MFV r313071:
Sync libarchive with vendor

Vendor changes (relevant to FreeBSD):
- support extracting NFSv4 ACLs from Solaris tar archives
- bugfixes and optimizations in the ACL code
- multiple fixes in the test suite
- typo and other small bugfixes

Security fixes:
- cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
- LHA reader: heap-buffer-overflow in lha_read_file_header_1()
  (CVE-2017-5601)
- LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
  (OSS-Fuzz 453)
- mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
- WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)

Memory leak fixes:
- ACL support: free memory allocated by acl_get_qualifier()
- disk writer: missing free in create_filesystem_object()
- file reader: fd leak (Coverity 1016755)
- gnutar writer: fix free in archive_write_gnutar_header()
  (Coverity 101675)
- iso 9660 reader: missing free in parse_file_info()
  (partial Coverity 1016754)
- program reader: missing free in __archive_read_program()
- program writer: missing free in __archive_write_program_free()
- xar reader: missing free in xar_cleanup()
- xar reader: missing frees in expat_xmlattr_setup()
  (Coverity 1229979-1229981)
- xar writer: missing free in file_free()
- zip reader: missing free in zip_read_local_file_header()

MFC after: 1 week
X-MFC with: 310866, 310868, 310870, 311899

7 years agoUpdate vendor/libarchive to git d77b577b2d5aa259fca06313c4940e1e61ab1e0e
Martin Matuska [Thu, 2 Feb 2017 00:20:18 +0000 (00:20 +0000)]
Update vendor/libarchive to git d77b577b2d5aa259fca06313c4940e1e61ab1e0e

Vendor changes (relevant to FreeBSD):
- bugfixes, improvemens and optimizations in ACL code
- NFSv4 ACLs can now be extracted from Solaris tar archives

Security fixes:
- cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
- LHA reader: heap-buffer-overflow in lha_read_file_header_1() (CVE-2017-5601)
- LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
  (OSS-Fuzz 453)
- mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
- WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)

Memory leak fixes:
- ACL support: free memory allocated by acl_get_qualifier()
- disk writer: missing free in create_filesystem_object()
- file reader: fd leak (Coverity 1016755)
- gnutar writer: fix free in archive_write_gnutar_header() (Coverity 1016752)
- iso 9660 reader: missing free in parse_file_info() (part. Coverity 1016754)
- program reader: missing free in __archive_read_program()
- program writer: missing free in __archive_write_program_free()
- xar reader: missing free in xar_cleanup()
- xar reader: missing frees in expat_xmlattr_setup() (Coverity 1229979-1229981)
- xar writer: missing free in file_free()
- zip reader: missing free in zip_read_locazip_read_local_file_header()

7 years agoAllow 999.local to run scripts in any language
Alan Somers [Wed, 1 Feb 2017 23:22:54 +0000 (23:22 +0000)]
Allow 999.local to run scripts in any language

If one of the scripts listed in (daily|weekly|monthly)_local is executable,
999.local should simply execute it. Only if the script isn't executable
should 999.local assume it needs /bin/sh.

Reviewed by: brian
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp

7 years ago[am335x] Fallback to standard video interface bindings when using Linux dts
Oleksandr Tymoshenko [Wed, 1 Feb 2017 22:03:59 +0000 (22:03 +0000)]
[am335x] Fallback to standard video interface bindings when using Linux dts

Historically AM335x LCDC driver used non-standard "hdmi" property to
refer to HDMI framer. There is no such thing in upstream DTS, so to
handle both cases fallback to bindings described in
bindings/media/video-interfaces.txt in Linux documentation.

We still make some assumptions that are not universally true: we
assume that if remote endpoint is available it's going to be HDMI
framer. Which is true for AM335x-based devices currently supported
but may be not true for some custom hardware.

MFC after: 1 week

7 years agoPull in r293536 from upstream compiler-rt trunk:
Dimitry Andric [Wed, 1 Feb 2017 20:41:09 +0000 (20:41 +0000)]
Pull in r293536 from upstream compiler-rt trunk:

  Recommit: Stop intercepting some malloc-related functions on FreeBSD
  and macOS

  Summary:
  In https://bugs.freebsd.org/215125 I was notified that some configure
  scripts attempt to test for the Linux-specific `mallinfo` and
  `mallopt` functions by compiling and linking small programs which
  references the functions, and observing whether that results in
  errors.

  FreeBSD and macOS do not have the `mallinfo` and `mallopt` functions,
  so normally these tests would fail, but when sanitizers are enabled,
  they incorrectly succeed, because the sanitizers define interceptors
  for these functions.  This also applies to some other malloc-related
  functions, such as `memalign`, `pvalloc` and `cfree`.

  Fix this by not intercepting `mallinfo`, `mallopt`, `memalign`,
  `pvalloc` and `cfree` for FreeBSD and macOS, in all sanitizers.

  Also delete the non-functional `cfree` wrapper for Windows, to fix the
  test cases on that platform.

  Reviewers: emaste, kcc, rnk

  Subscribers: timurrrr, eugenis, hans, joerg, llvm-commits, kubamracek

  Differential Revision: https://reviews.llvm.org/D27654

This prevents autoconf scripts from incorrectly detecting that functions
like mallinfo, mallopt, memalign, pvalloc and cfree are supported.

PR: 215125, 215455
MFC after: 1 week

7 years agoUpdate tcpdump to 4.9.0.
Gleb Smirnoff [Wed, 1 Feb 2017 20:26:42 +0000 (20:26 +0000)]
Update tcpdump to 4.9.0.

It fixes many buffer overflow in different protocol parsers, but none of
them are critical, even in absense of Capsicum.

Security: CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925
Security: CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929
Security: CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933
Security: CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937
Security: CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973
Security: CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984
Security: CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993
Security: CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203
Security: CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342
Security: CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485
Security: CVE-2017-5486

7 years agoloader: disk/part api needs to use uint64_t offsets
Toomas Soome [Wed, 1 Feb 2017 20:10:56 +0000 (20:10 +0000)]
loader: disk/part api needs to use uint64_t offsets

The disk_* and part_* api is using 64bit values for media size and
offsets. However, the current api is using off_t type, which is signed
64-bit int.

In this context the signed media size does not make any sense, and
the offsets are used to mark absolute, not relative locations.

Also, the data from GPT partition table and some other sources is
already using uint64_t data type, so using signed off_t can cause sign
issues.

Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8710

7 years agoAdd an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP probes.
George V. Neville-Neil [Wed, 1 Feb 2017 19:33:00 +0000 (19:33 +0000)]
Add an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP probes.

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9401

7 years agoAdd some comments with examples on how to build Vagrant images.
Brad Davis [Wed, 1 Feb 2017 16:15:23 +0000 (16:15 +0000)]
Add some comments with examples on how to build Vagrant images.

Approved by: re (gjb)

7 years agoMerge filt_soread and filt_solisten and decide what to do when checking
Hartmut Brandt [Wed, 1 Feb 2017 13:12:07 +0000 (13:12 +0000)]
Merge filt_soread and filt_solisten and decide what to do when checking
for EVFILT_READ at the point of the check not when the event is registers.
This fixes a problem with asio when accepting a connection.

Reviewed by: kib@, Scott Mitchell

7 years agoloader.efi environment related cleanups
Toomas Soome [Wed, 1 Feb 2017 08:46:59 +0000 (08:46 +0000)]
loader.efi environment related cleanups

Since we have dedicated libefi/env.c file for variable support, the following
changes are done:

Simple cstyle changes in env.c
Moved efi variable related commands from loader/main.c to libefi/env.c
Did create function to set "efi-version" environment variable in env.c.

This function does serve two purposes: for first a  small clean up of the
loader main(), and for second, it does replace the otherwise unused
efi_variable_support hack.
A bit of cleanup of ficl backend functions. The TEST_MAIN has no meaning,
and removed few memory leaks.

The forth code is updated to use "efi-version" variable, instead of ficl
environment check.

Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D9165

7 years agoBump GCC FBSD_CC_VER for r312899 (-march=octeon+ support)
Ed Maste [Wed, 1 Feb 2017 05:24:17 +0000 (05:24 +0000)]
Bump GCC FBSD_CC_VER for r312899 (-march=octeon+ support)

Reported by: lidl
MFC after: 1 month
MFC with: r312899
Sponsored by: The FreeBSD Foundation

7 years agoAdd atomic_fcmpset_*() inlines for MIPS
Alexander Kabaev [Wed, 1 Feb 2017 05:00:34 +0000 (05:00 +0000)]
Add atomic_fcmpset_*() inlines for MIPS

atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the
read value from the target memory location into the 'old' pointer.

Reviewed by: imp, brooks
Requested by: mjg
Differential Revision: https://reviews.freebsd.org/D9391

7 years agoImplement get_pcpu() for the remaining architectures and use it to
Jason A. Harmening [Wed, 1 Feb 2017 03:32:49 +0000 (03:32 +0000)]
Implement get_pcpu() for the remaining architectures and use it to
replace pcpu_find(curcpu) in MI code.

7 years agoAdd Book-E Enhanced Debug (E.D) profile debug support
Justin Hibbits [Wed, 1 Feb 2017 03:29:13 +0000 (03:29 +0000)]
Add Book-E Enhanced Debug (E.D) profile debug support

Freescale added the E.D profile to e500mc and derivative cores.  From
Freescale's EREF reference manual this is enabled by a bit in HID0 and should
otherwise default to traditional debug.  However, none of the Freescale cores
support that bit, and instead always use E.D.  This results in kernel panics
using the standard debug on e500mc+ cores.

Enhanced debug allows debugging of interrupts, including critical interrupts,
as it uses a different save/restore registers (srr*).  At this time we don't use
this ability, so instead share the core of the debug handler code between both
handlers.

MFC after: 3 weeks

7 years agoAdd rfdi opcode to binutils
Justin Hibbits [Wed, 1 Feb 2017 02:42:45 +0000 (02:42 +0000)]
Add rfdi opcode to binutils

The rfdi instruction is part of the e500mc and derivative cores.  It came into
binutils in a GPLv3 patch, along with the rest of the e500mc instruction set.
Currently only rfdi is planned to be used, so rather than attempt to backport
the full patch, take a surgical route and add instructions as needed.

MFC after: 2 weeks

7 years agoAdd USB IDs supported by TI / Intel USB 3410 family (modems of various
Warner Losh [Wed, 1 Feb 2017 02:00:18 +0000 (02:00 +0000)]
Add USB IDs supported by TI / Intel USB 3410 family (modems of various
flavors). This includes both the release products (from Honeywell,
Moxa and Multitech) as well as development kits.

7 years agoAdd myself (jmd) to committers-ports.dot. Document rene and swills as my mentors.
Johannes M Dieterich [Wed, 1 Feb 2017 01:25:30 +0000 (01:25 +0000)]
Add myself (jmd) to committers-ports.dot. Document rene and swills as my mentors.

Reviewed by: rene (mentor)
Approved by: rene (mentor)
Differential Revision: https://reviews.freebsd.org/D9393

7 years agoEnsure that the variable bail is always initialized before used.
Michael Tuexen [Wed, 1 Feb 2017 00:10:29 +0000 (00:10 +0000)]
Ensure that the variable bail is always initialized before used.

MFC after: 1 week

7 years agoTake the SCTP common header into account when computing the
Michael Tuexen [Tue, 31 Jan 2017 23:36:31 +0000 (23:36 +0000)]
Take the SCTP common header into account when computing the
space available for chunks. This unbreaks the handling of
ICMPV6 packets indicating "packet too big". It just worked
for IPv4 since we are overbooking for IPv4.

MFC after: 1 week

7 years agoRemove a duplicate debug statement.
Michael Tuexen [Tue, 31 Jan 2017 23:34:02 +0000 (23:34 +0000)]
Remove a duplicate debug statement.

MFC after: 1 week

7 years agonet80211: cleanup ic_flags / iv_flags
Andriy Voskoboinyk [Tue, 31 Jan 2017 22:21:08 +0000 (22:21 +0000)]
net80211: cleanup ic_flags / iv_flags

Flags
 - IEEE80211_F_ASCAN
 - IEEE80211_F_SIBSS
 - IEEE80211_F_IBSSON
are not used since r170530 (old WI compatibility ioctls removal)
and r178354 (removed from other places).

IEEE80211_F_TXPOW_FIXED was never utilized; initially added with
IEEE80211_F_TXPOW_AUTO / IEEE80211_F_TXPOW_OFF flags,
which were replaced with IEEE80211_C_TXPMGT capability check in r138568.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D9369

7 years agoAdd a new vagrant-box target, to make it easier and less redundant to only
Brad Davis [Tue, 31 Jan 2017 21:59:10 +0000 (21:59 +0000)]
Add a new vagrant-box target, to make it easier and less redundant to only
produce the Vagrant box and not upload it.

Approved by: re (gjb)

7 years ago[ath] log seqno, type and subtype when assigning sequence numbers for A-MPDU.
Adrian Chadd [Tue, 31 Jan 2017 20:57:40 +0000 (20:57 +0000)]
[ath] log seqno, type and subtype when assigning sequence numbers for A-MPDU.

This is just to improve adrian-debugging.

7 years agoAdd tests for multi-fib IPv6 routing
Alan Somers [Tue, 31 Jan 2017 20:13:50 +0000 (20:13 +0000)]
Add tests for multi-fib IPv6 routing

PR: 196361
Submitted by: jhujhiti@adjectivism.org
Reported by: Jason Healy <jhealy@logn.net>
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

7 years agoImport tcpdump-4.9.0 into dist.
Gleb Smirnoff [Tue, 31 Jan 2017 19:17:06 +0000 (19:17 +0000)]
Import tcpdump-4.9.0 into dist.

7 years agoForce a few variables to be upper case when they are evaulated.
Brad Davis [Tue, 31 Jan 2017 19:09:06 +0000 (19:09 +0000)]
Force a few variables to be upper case when they are evaulated.

This allows specifying, for example: CLOUDWARE=vagrant-vmware

Approved by: re (gjb)

7 years agoFix a couple of issues with t4iov probe and attach.
John Baldwin [Tue, 31 Jan 2017 18:54:13 +0000 (18:54 +0000)]
Fix a couple of issues with t4iov probe and attach.

- Check for Chelsio vendor ID in probe routines.
- Fail attach instead of faulting if pci_find_dbsf() doesn't find a
  device.

PR: 216539
Reported by: asomers
Tested by: Dave Baukus <daveb@spectralogic.com>
MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoAdd the folowing set accessor functions for recently-added members of ifnet
Stephen J. Kiernan [Tue, 31 Jan 2017 16:12:31 +0000 (16:12 +0000)]
Add the folowing set accessor functions for recently-added members of ifnet
structure:

if_gethwtsomax(), if_sethwtsomax()                 - if_hw_tsomax
if_gethwtsomaxsegcount(), if_sethwtsomaxsegcount() - if_hw_tsomaxsegcount
if_gethwtsomaxsegsize(), if_sethwtsomaxsegsize()   - if_hw_tsomaxsegsize

Update em and vnic drivers which had already been coverted to use accessor
functions for the other ifnet structure members.

Reviewed by: erj
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8544

7 years agoAdd kern_pread() and kern_pwrite(), and use it in compats instead
Edward Tomasz Napierala [Tue, 31 Jan 2017 15:35:18 +0000 (15:35 +0000)]
Add kern_pread() and kern_pwrite(), and use it in compats instead
of their sys_*() counterparts. The svr4 is left unchanged.

Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9379

7 years agoFix linux_getppid() to debug the actual parent, even it was reparented
Edward Tomasz Napierala [Tue, 31 Jan 2017 15:22:51 +0000 (15:22 +0000)]
Fix linux_getppid() to debug the actual parent, even it was reparented
by debugger.

Reviewed by: dchagin@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9361

7 years agoReplace calls to sys_truncate() with kern_truncate().
Edward Tomasz Napierala [Tue, 31 Jan 2017 15:19:44 +0000 (15:19 +0000)]
Replace calls to sys_truncate() with kern_truncate().

Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9371

7 years agoAdd kern_cpuset_getid() and kern_cpuset_setid(), and use them
Edward Tomasz Napierala [Tue, 31 Jan 2017 15:11:23 +0000 (15:11 +0000)]
Add kern_cpuset_getid() and kern_cpuset_setid(), and use them
in compat32 instead of their sub_*() counterparts.

Reviewed by: jhb@, kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9382

7 years agoAdd missing ephy bus gates and resets.
Jared McNeill [Tue, 31 Jan 2017 14:36:06 +0000 (14:36 +0000)]
Add missing ephy bus gates and resets.

7 years agoExpose symbols in lib/libclang_rt/profile to fix --coverage
Enji Cooper [Tue, 31 Jan 2017 07:13:01 +0000 (07:13 +0000)]
Expose symbols in lib/libclang_rt/profile to fix --coverage

The symbols currently hidden in libprofile_rt are needed for linking with
`clang --coverage` to add coverage counters at link time and produce
coverage numbers at runtime.

In collaboration with: dim
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: D9168

7 years agoWait for /dev/ggate* to appear after calling `ggatel create` in :ggatel_{file,md}
Enji Cooper [Tue, 31 Jan 2017 06:12:51 +0000 (06:12 +0000)]
Wait for /dev/ggate* to appear after calling `ggatel create` in :ggatel_{file,md}

The test assumed that `ggatel create` created a device on completion, but that's
incorrect. This squashes the race by waiting for the device to appear, as
`ggatel create` daemonizes before issuing an ioctl to geom_gate(4) if not called
with `-v`.

Discussed with: asomers
MFC after: 1 week
PR: 204616
Sponsored by: Dell EMC Isilon

7 years agoDon't retry a lost reservation in atomic_fcmpset()
Justin Hibbits [Tue, 31 Jan 2017 03:40:13 +0000 (03:40 +0000)]
Don't retry a lost reservation in atomic_fcmpset()

The desired behavior of atomic_fcmpset_() is to always exit on error.  Instead
of retrying on lost reservation, leave the retry to the caller, and return
error.

Reported by: kib

7 years agocalculate_crc32c: Add SSE4.2 implementation on x86
Conrad Meyer [Tue, 31 Jan 2017 03:26:32 +0000 (03:26 +0000)]
calculate_crc32c: Add SSE4.2 implementation on x86

Derived from an implementation by Mark Adler.

The fast loop performs three simultaneous CRCs over subsets of the data
before composing them.  This takes advantage of certain properties of
the CRC32 implementation in Intel hardware.  (The CRC instruction takes 1
cycle but has 2-3 cycles of latency.)

The CRC32 instruction does not manipulate FPU state.

i386 does not have the crc32q instruction, so avoid it there.  Otherwise
the implementation is identical to amd64.

Add basic userland tests to verify correctness on a variety of inputs.

PR: 216467
Reported by: Ben RUBSON <ben.rubson at gmail.com>
Reviewed by: kib@, markj@ (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9342

7 years agoUpdate CFLAGS for clang compatibility
Justin Hibbits [Tue, 31 Jan 2017 01:55:29 +0000 (01:55 +0000)]
Update CFLAGS for clang compatibility

* Clang/llvm does not (yet) support -m(no-)spe, so make it gcc-only
* Clang now supports -msoft-float, and does not appear to recognize
  "-disable-ppc-float-in-variadic", which appears to have been a crutch until
  soft-float was implemented.  It's now implemented for both 32- and 64-bit.
* Clang/llvm use a 'medium' code model by default for powerpc64, supporting up
  to 4GB TOC, and does not support the '-mminimal-toc' option.  Given both of
  these, make -mminimal-toc gcc-only.

MFC after: 2 weeks

7 years agoFix compilation!
Adrian Chadd [Tue, 31 Jan 2017 01:48:55 +0000 (01:48 +0000)]
Fix compilation!

7 years agoRemove a duplicate store when performing REL32 relocations in rtld.
John Baldwin [Mon, 30 Jan 2017 23:13:41 +0000 (23:13 +0000)]
Remove a duplicate store when performing REL32 relocations in rtld.

The duplicate call to store_ptr() was added in r204687, but it should
have no effect as it only stores an Elf_Sword and the later store_ptr()
does a write that is at least as large if not larger.

Reviewed by: jmallett
Obtained from: CheriBSD (sort of)
Sponsored by: DARPA / AFRL

7 years agoMFV 312999:
Pedro F. Giffuni [Mon, 30 Jan 2017 23:00:51 +0000 (23:00 +0000)]
MFV 312999:
Update libedit 2016-03-21

Minor cleanups plus some license syncing.

Obtained from: NetBSD
X-MFC with: r312997

7 years agoFix indentantion in pf_purge_thread(). No functional change.
Gleb Smirnoff [Mon, 30 Jan 2017 22:47:48 +0000 (22:47 +0000)]
Fix indentantion in pf_purge_thread().  No functional change.

7 years agoImport libedit 2016-03-21
Pedro F. Giffuni [Mon, 30 Jan 2017 22:35:42 +0000 (22:35 +0000)]
Import libedit 2016-03-21

Obtained from: NetBSD

7 years ago[mips] add some (temporary, I hope!) mips24k/mips74k hwpmc modules.
Adrian Chadd [Mon, 30 Jan 2017 22:29:21 +0000 (22:29 +0000)]
[mips] add some (temporary, I hope!) mips24k/mips74k hwpmc modules.

Ideally we'd have a top level hwpmc module with the shared bits, then
cpu specific glue as needed.  However, on the MIPS side, there's no
probe code - {mips24k, mips74k, octeon} implement a set of methods
that hwpmc_mips.c expects.

So this populates separate modules with duplicate code.
Ew, but it does work.

This gets me off the hook - these work fine as copied into the relevant
mfsroot for mips24k/mips74k systems.

TODO:

* do it the "right" way in the future.  Note that modules/hwpmc/ does
  build fine on MIPS, it jusn't DO anything.  So it'd be nice to
  maybe call that "hwpmc_core" and then "hwpmc" can be the CPU/arch glue.

7 years agoMFV r312996:
Pedro F. Giffuni [Mon, 30 Jan 2017 22:11:53 +0000 (22:11 +0000)]
MFV r312996:
Re-import libedit 2016-02-27

This reverts r296435: the issues related to lldb and this update appear to
have been identified (in lldb).

Obtained from: NetBSD
Reported by: emaste
MFC after: 3 weeks

7 years agoImport libedit 2016-02-27
Pedro F. Giffuni [Mon, 30 Jan 2017 21:06:07 +0000 (21:06 +0000)]
Import libedit 2016-02-27

This basically reverts r296500: there are many changes in the latest
version and this intermediate step lets us save all the work done
for the previous update.

Obtained from: NetBSD

7 years agoInitialize a stack variable in mprsas_get_sas_address_for_sata_disk
Alan Somers [Mon, 30 Jan 2017 19:49:08 +0000 (19:49 +0000)]
Initialize a stack variable in mprsas_get_sas_address_for_sata_disk

Thought it's difficult to reproduce, I think this variable was responsible
for a use-after-free panic when a SATA disk timed out responding to a SATA
identify command during boot.

Submitted by: slm
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9364

7 years agoAvoid page lookups in the top-level object in vm_object_madvise().
Mark Johnston [Mon, 30 Jan 2017 18:51:43 +0000 (18:51 +0000)]
Avoid page lookups in the top-level object in vm_object_madvise().

We can iterate over consecutive resident pages in the top-level object
using the object's page list rather than by performing lookups in the
object radix tree. This extends one of the optimizations in r312208 to the
case where a shadow chain is present.

Suggested by: alc
Reviewed by: alc, kib (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9282

7 years agoPull in r279454 from upstream llvm trunk (by James Molloy):
Dimitry Andric [Mon, 30 Jan 2017 18:35:24 +0000 (18:35 +0000)]
Pull in r279454 from upstream llvm trunk (by James Molloy):

  [SROA] Remove incorrect assertion

  Confirmed with aprantl, this assertion is incorrect - code can get
  here (for example 80-bit FP types) and if it does it's benign. This
  is exposed by a completely unrelated patch of mine, so stop the
  compiler falling over.

  Original differential: http://reviews.llvm.org/D16187
  aprantl's advice to remove assertion:
  http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html

This should fix assertions when building the math/opensolaris-libm port.

Reported by: marino
MFC after: 3 days

7 years agoMFV r312970:
Pedro F. Giffuni [Mon, 30 Jan 2017 16:32:53 +0000 (16:32 +0000)]
MFV r312970:
openresolv: update to version 3.9.0.

It is now possible to drop the _WITH_ARG vars thanks to a change to the
pdns_recursor upstreamed by Guy Yur.

MFC after: 3 weeks

7 years agoput very expensive sanity checks of advisory locks under DIAGNOSTIC
Andriy Gapon [Mon, 30 Jan 2017 15:20:13 +0000 (15:20 +0000)]
put very expensive sanity checks of advisory locks under DIAGNOSTIC

The checks have quadratic complexity over a number of advisory locks
active for a file and that could be a lot.  What's the worse is that the
checks are done while holding ls_lock.  That could lead to a long a very
long backlog and performance degradation even if all requested locks are
compatible (e.g. all shared locks).

The checks used to be under INVARIANTS.

Discussed with: kib
MFC after: 2 weeks
Sponsored by: Panzura

7 years agoAdd kern_listen(), kern_shutdown(), and kern_socket(), and use them
Edward Tomasz Napierala [Mon, 30 Jan 2017 12:57:22 +0000 (12:57 +0000)]
Add kern_listen(), kern_shutdown(), and kern_socket(), and use them
instead of their sys_*() counterparts in various compats. The svr4
is left untouched, because there's no point.

Reviewed by: ed@, kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9367

7 years agoAdd kern_lseek() and use it instead of sys_lseek() in various compats.
Edward Tomasz Napierala [Mon, 30 Jan 2017 12:24:47 +0000 (12:24 +0000)]
Add kern_lseek() and use it instead of sys_lseek() in various compats.
I didn't touch svr4/, there's no point.

Reviewed by: ed@, kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9366

7 years agoReplace sys_ftruncate() with kern_ftruncate() in various compats.
Edward Tomasz Napierala [Mon, 30 Jan 2017 11:50:54 +0000 (11:50 +0000)]
Replace sys_ftruncate() with kern_ftruncate() in various compats.

Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9368

7 years agoExtend LD_UTRACE by also generating utrace(2) log events for runtime linker
Peter Jeremy [Mon, 30 Jan 2017 08:38:32 +0000 (08:38 +0000)]
Extend LD_UTRACE by also generating utrace(2) log events for runtime linker
errors.

Reviewed by: kib, jhb
Approved by: jhb(mentor)
MFC after: 1 week
Differential Revision:  D9347

7 years agoMake "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
Hans Petter Selasky [Mon, 30 Jan 2017 08:35:15 +0000 (08:35 +0000)]
Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
structure. This fixes compilation with amd64-xtoolchain-gcc.

PR: 216588
MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoCorrect comment grammar and make it easier to understand.
Cy Schubert [Mon, 30 Jan 2017 04:51:18 +0000 (04:51 +0000)]
Correct comment grammar and make it easier to understand.

MFC after: 1 week

7 years agocache: use vrefact for '.' lookups and refing the rdir in fullpath
Mateusz Guzik [Mon, 30 Jan 2017 03:20:05 +0000 (03:20 +0000)]
cache: use vrefact for '.' lookups and refing the rdir in fullpath

7 years agofd: sprinkle __read_mostly and __exclusive_cache_line
Mateusz Guzik [Mon, 30 Jan 2017 03:07:32 +0000 (03:07 +0000)]
fd: sprinkle __read_mostly and __exclusive_cache_line

7 years agoDo not update the lagg link layer address when destroying a lagg clone.
Luiz Otavio O Souza [Mon, 30 Jan 2017 03:04:33 +0000 (03:04 +0000)]
Do not update the lagg link layer address when destroying a lagg clone.

This would enqueue an event to send the gratuitous arp on a dying lagg
interface without any physical ports attached to it.

Apart from that, the taskqueue_drain() on lagg_clone_destroy() runs too
late, when the ifp data structure is already freed.  Fix that too.

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoDrop the __GNUCLIKE_ASM guards around most atomic inlines.
Justin Hibbits [Mon, 30 Jan 2017 02:52:15 +0000 (02:52 +0000)]
Drop the __GNUCLIKE_ASM guards around most atomic inlines.

There are no alternatives defined, so there's no point in keeping them.  Also,
they weren't around every inline asm block anyway.  Without __GNUCLIKE_ASM
defined, the guarded functions return garbage.

Reported by: Andrew Thompson

7 years agoForce the setting of bit 7 in the sysmouse packet byte 1 to be unsigned.
Justin Hibbits [Mon, 30 Jan 2017 02:32:33 +0000 (02:32 +0000)]
Force the setting of bit 7 in the sysmouse packet byte 1 to be unsigned.

Clang complains about the shift of (1 << 7) into a int8_t changing the value:

warning: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes
value from 128 to -128 [-Wconstant-conversion]

Squash this warning by forcing clang to see it as an unsigned bit.

This seems odd, given that it's still a conversion of 128->-128, but I'm
guessing the explicit unsigned attribute notifies clang that sign really doesn't
matter in this case.

Reported by: Mark Millard <markmi AT dsl-only DOT net>
MFC after: 2 weeks

7 years agoMan page update to go along with r312907.
Hiren Panchasara [Mon, 30 Jan 2017 02:25:55 +0000 (02:25 +0000)]
Man page update to go along with r312907.

Reviewed by:     Allanjude
MFC after:     2 weeks
Sponsored by:     Limelight Networks

7 years agoi386: add atomic_fcmpset
Mateusz Guzik [Mon, 30 Jan 2017 02:24:54 +0000 (02:24 +0000)]
i386: add atomic_fcmpset

Tested by: pho

7 years agoAdd a INTR_TRIG_INVALID, and use it in the powerpc interrupt code.
Justin Hibbits [Mon, 30 Jan 2017 02:21:29 +0000 (02:21 +0000)]
Add a INTR_TRIG_INVALID, and use it in the powerpc interrupt code.

Summary:
Clang throws the following warning in powerpc intr_machdep:

/usr/src/sys/powerpc/powerpc/intr_machdep.c:454:15: warning: comparison of
constant -1 with expression of type 'enum intr_trigger' is always false
[-Wtautological-constant-out-of-range-compare]
    if (i->trig == -1)
        ~~~~~~~ ^  ~~

This may lead to legitimate problems with aggressive optimizations, if not now
then in the future.  To avoid this, add a new enum, INTR_TRIG_INVALID, set to
-1, and use this new enumeration in these checks.

Test Plan: Compile test.

Reviewed By: jhb, kib
Differential Revision: https://reviews.freebsd.org/D9300

7 years agoAdd atomic_fcmpset_*() inlines for powerpc
Justin Hibbits [Mon, 30 Jan 2017 02:15:54 +0000 (02:15 +0000)]
Add atomic_fcmpset_*() inlines for powerpc

Summary:
atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the read value
from the target memory location into the 'old' pointer in the case of failure.

Requested by:  mjg
Differential Revision: https://reviews.freebsd.org/D9325

7 years ago[net80211] address seqno allocation for group addressed frames
Adrian Chadd [Mon, 30 Jan 2017 01:11:30 +0000 (01:11 +0000)]
[net80211] address seqno allocation for group addressed frames

After some digging and looking at packet traces, it looks like the
sequence number allocation being done by net80211 doesn't meet
802.11-2012.

Specifically, group addressed frames (broadcast, multicast) have
sequence numbers allocated from a separate pool, even if they're
QoS frames.

This patch starts to try and address this, both on transmit and
receive.

* When receiving, don't throw away multicast frames for now.
  It's sub-optimal, but until we correctly track group addressed
  frames via another TID counter, this is the best we can do.

* When doing A-MPDU checks, don't include group addressed frames
  in the sequence number checks.

* When transmitting, don't allocate group frame sequence numbers
  from the TID, instead use the NONQOS TID for allocation.

This may fix iwn(4) 11n because I /think/ this was one of the
handful of places where ni_txseqs[] was being assigned /outside/
of the driver itself.

This however doesn't completely fix things - notably the way that
TID assignment versus WME assignment for driver hardware queues
will mess up multicast ordering. For example, if all multicast
QoS frames come from one sequence number space but they're
expected to obey the QoS value assigned, they'll end up in
different queues in the hardware and go out in different
orders.

I can't fix that right now and indeed fixing it will require some
pretty heavy lifting of both the WME<->TID QoS assignment, as well
as figuring out what the correct way for drivers to behave.

For example, both iwn(4) and ath(4) shouldn't put QoS multicast
traffic into the same output queue as aggregate traffic, because
the sequence numbers are all wrong. So perhaps the correct thing
to do there is ignore the WME/TID for QoS traffic and map it all
to the best effort queue or something, and ensure it doesn't
muck up the TID/blockack window tracking. However, I'm /pretty/
sure that is still going to happen.

.. maybe I should disable multicast QoS frames in general as well,
but I don't know what that'll do for whatever the current state
of 802.11s mesh support is.

Tested:

* STA mode, ath10k NIC
* AP mode, AR9344/AR9580 AP
* iperf tcp/udp tests with concurrent multicast QoS traffic.

Before this, iperfs would fail pretty quickly because the sending
AP would start sending out QoS multicast frames that would be
out of order from the rest of the TID traffic, causing the blockack
window to get way, way out of sync.

This now doesn't occur.

TODO:

* verify which QoS frames SHOULD be tagged as M_AMPDU_MPDU.
  For example, QoS NULL frames shouldn't be tagged!

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D9357