]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoMFC r330245:
dab [Fri, 9 Mar 2018 14:45:17 +0000 (14:45 +0000)]
MFC r330245:

Allow the "@" and "!" characters in passwd file GECOS fields.

Two PRs (152084 & 210187) request allowing the "@" and/or "!"
characters in the passwd file GECOS field. The man page for pw does
not mention that those characters are disallowed, Linux supports those
characters in this field, and the "@" character in particular would be
useful for storing email addresses in that field.

PR: 152084, 210187
Submitted by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
Reported by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
Sponsored by: Dell EMC

6 years agoMFC r330085:
dab [Fri, 9 Mar 2018 14:38:46 +0000 (14:38 +0000)]
MFC r330085:

dhclient violates RFC2131 when sending early DHCPREQUEST message to re-obtain old IP

When dhclient first starts, if an old IP address exists in the
dhclient.leases file, dhclient(8) sends early DHCPREQUEST message(s)
in an attempt to re-obtain the old IP address again. These messages
contain the old IP as a requested-IP-address option in the message
body (correct) but also use the old IP address as the packet's source
IP (incorrect).

RFC2131 sec 4.1 states:

  DHCP messages broadcast by a client prior to that client obtaining
  its IP address must have the source address field in the IP header
  set to 0.

The use of the old IP as the packet's source address is incorrect if
(a) the computer is now on a different network or (b) it is on the
same network, but the old IP has been reallocated to another host.

Fix dhclient to use 0.0.0.0 as the source IP in this circumstance
without removing any existing functionality. Any previously-used old
IP is still requested in the body of an early DHCPREQUEST message.

PR:             199378
Submitted by:   J.R. Oldroyd <fbsd@opal.com>
Reported by:    J.R. Oldroyd <fbsd@opal.com>
Sponsored by:   Dell EMC

6 years agoMFC r330285:
kib [Fri, 9 Mar 2018 14:34:42 +0000 (14:34 +0000)]
MFC r330285:
Remove _Nonnull attributes from user addresses arguments for
copyout(9) family.

6 years agoMFC r330304: imcsmb(4): Intel integrated Memory Controller (iMC) SMBus
rpokala [Fri, 9 Mar 2018 02:55:22 +0000 (02:55 +0000)]
MFC r330304: imcsmb(4): Intel integrated Memory Controller (iMC) SMBus
controller driver

imcsmb(4) provides smbus(4) support for the SMBus controller functionality
in the integrated Memory Controllers (iMCs) embedded in Intel Sandybridge-
Xeon, Ivybridge-Xeon, Haswell-Xeon, and Broadwell-Xeon CPUs. Each CPU
implements one or more iMCs, depending on the number of cores; each iMC
implements two SMBus controllers (iMC-SMBs).

*** IMPORTANT NOTE ***
Because motherboard firmware or the BMC might try to use the iMC-SMBs for
monitoring DIMM temperatures and/or managing an NVDIMM, the driver might
need to temporarily disable those functions, or take a hardware interlock,
before using the iMC-SMBs. Details on how to do this may vary from board to
board, and the procedure may be proprietary. It is strongly suggested that
anyone wishing to use this driver contact their motherboard vendor, and
modify the driver as described in the manual page and in the driver itself.
(For what it's worth, the driver as-is has been tested on various SuperMicro
motherboards.)

6 years agoMFC r330527:
brooks [Fri, 9 Mar 2018 01:17:03 +0000 (01:17 +0000)]
MFC r330527:

Use umtx_copyin_umtx_time32() in __umtx_op_lock_umutex_compat32().

Non-NULL timeouts where copied in improperly and could produce failures
due to incompatible data structures.

Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14587

6 years agoMFC r328521 (by imp):
mav [Thu, 8 Mar 2018 21:33:52 +0000 (21:33 +0000)]
MFC r328521 (by imp):
Use atomic load and stores to ensure that the compiler doesn't
optimize away these loops. Change boolean to int to match what atomic
API supplies. Remove wmb() since the atomic_store_rel() on status.done
ensure the prior writes to status. It also fixes the fact that there
wasn't a rmb() before reading done. This should also be more efficient
since wmb() is fairly heavy weight.

6 years agoMFC r330034
dab [Thu, 8 Mar 2018 16:26:49 +0000 (16:26 +0000)]
MFC r330034

Fix a memory leak in syslogd

A memory leak in syslogd for processing of forward actions was
reported. This modification adapts the patch submitted with that bug
to fix the leak.

PR: 198385
Submitted by: Sreeram <sreeramabs@yahoo.com>
Reported by: Sreeram <sreeramabs@yahoo.com>
Sponsored by: Dell EMC

6 years agoMFC r316797:
eadler [Thu, 8 Mar 2018 08:04:32 +0000 (08:04 +0000)]
MFC r316797:

banner(6): Squash a harmless coverity warning

The destination buffer is sized as the sum of program argument lengths, so
it has plenty of room for *argv.  Appease Coverity by using strlcpy instead
of strcpy.  Similar to a nearby cleanup performed in r316500.

No functional change.

6 years agoMFC r316796:
eadler [Thu, 8 Mar 2018 08:02:51 +0000 (08:02 +0000)]
MFC r316796:

Attempt to clear logos more thoroughly.

PR: 202288

6 years agoMFC r326599:
eadler [Thu, 8 Mar 2018 07:57:26 +0000 (07:57 +0000)]
MFC r326599:

Implement "vidcontrol -h <history_size>" for vt(4)

PR: 210415

6 years agoMFC r327672:
eadler [Thu, 8 Mar 2018 07:55:03 +0000 (07:55 +0000)]
MFC r327672:

stddef.h is not used by cat.c, remove the include.

6 years agoMFC r326651:
eadler [Thu, 8 Mar 2018 07:52:32 +0000 (07:52 +0000)]
MFC r326651:

Fix mandoc -Tlint warnings in bin/

Many style-level issues are still reported.

6 years agoMFC r323865:
eadler [Thu, 8 Mar 2018 07:50:11 +0000 (07:50 +0000)]
MFC r323865:

Ammend bin/cat/cat.c so the output is the same aside
from blank lines being numbered or unnumbered, depending on whether cat
was invoked with -ne or -be.

At present, when cat is invoked with -be, there is an aditional
difference that the '$' on blank lines is placed on the far left of the
output.

Discussed in bug 210607.

While here, revert the workaround from r304035 which skipped the unit test for
this issue previously.

PR: 210607

6 years agoMFC r303540:
eadler [Thu, 8 Mar 2018 07:17:20 +0000 (07:17 +0000)]
MFC r303540:

Use nitems() from sys/param.h

Sponsored by: gandi.net (BSD Day Taiwan)

6 years agoMFC r303539:
eadler [Thu, 8 Mar 2018 07:16:53 +0000 (07:16 +0000)]
MFC r303539:

Use nitems() from sys/param.h.

6 years agoMFC r313544:
eadler [Thu, 8 Mar 2018 07:05:19 +0000 (07:05 +0000)]
MFC r313544:

indent(1): add regression test cases

These examples show expected behavior of indent(1). They are meant to be used
together with a regression test mechanism, either Kyua, a Makefile or perhaps
something else. The mechanism should in essence do this:
  indent -P${test}.pro < ${test}.0 > ${test}.0.run
and compare ${test}.0.stdout to ${test}.0.run. If the files differ or the exit
status isn't 0, the test failed.

* ${test}.pro is an indent(1) profile: a list of options passed through a file.
  The program doesn't complain if the file doesn't exist.
* ${test}.0 is a C source file which acts as input for indent(1). It doesn't
  have to have any particular formatting, since it's the output that matters.
* ${test}.0.stdout contains expected output. It doesn't have to be formatted in
  Kernel Normal Form as the point of the tests is to check for regressions in
  the program and not to check that it always produces KNF.

6 years agoMFC r309220:
eadler [Thu, 8 Mar 2018 06:54:33 +0000 (06:54 +0000)]
MFC r309220:

indent(1): Properly handle the wide string literal and wide char constant L.

indent(1) treated the "L" in "L'a'" as if it were an identifier and forced
a space character after it, breaking valid code.

PR: 143090

6 years agoMFC r326283:
eadler [Thu, 8 Mar 2018 06:51:17 +0000 (06:51 +0000)]
MFC r326283:

netconfig.h: sync with upstream.

Bring some comments and the license.
Add SPDX License ID tag while here.

6 years agoMFC r318587:
eadler [Thu, 8 Mar 2018 05:41:53 +0000 (05:41 +0000)]
MFC r318587:

Add -w to usage string.

6 years agoMFC r326820:
eadler [Thu, 8 Mar 2018 05:40:13 +0000 (05:40 +0000)]
MFC r326820:

Tone down the description for the growfs "-y" flag.

6 years agoMFC r322659 (by glebius):
np [Thu, 8 Mar 2018 01:03:26 +0000 (01:03 +0000)]
MFC r322659 (by glebius):
Fix cut and paste typo that prevented T5 firmware to be compiled in.

6 years agoMFC 328102: Save and restore guest debug registers.
jhb [Wed, 7 Mar 2018 20:50:28 +0000 (20:50 +0000)]
MFC 328102: Save and restore guest debug registers.

Currently most of the debug registers are not saved and restored
during VM transitions allowing guest and host debug register values to
leak into the opposite context.  One result is that hardware
watchpoints do not work reliably within a guest under VT-x.

Due to differences in SVM and VT-x, slightly different approaches are
used.

For VT-x:

- Enable debug register save/restore for VM entry/exit in the VMCS for
  DR7 and MSR_DEBUGCTL.
- Explicitly save DR0-3,6 of the guest.
- Explicitly save DR0-3,6-7, MSR_DEBUGCTL, and the trap flag from
  %rflags for the host.  Note that because DR6 is "software" managed
  and not stored in the VMCS a kernel debugger which single steps
  through VM entry could corrupt the guest DR6 (since a single step
  trap taken after loading the guest DR6 could alter the DR6
  register).  To avoid this, explicitly disable single-stepping via
  the trace flag before loading the guest DR6.  A determined debugger
  could still defeat this by setting a breakpoint after the guest DR6
  was loaded and then single-stepping.

For SVM:
- Enable debug register caching in the VMCB for DR6/DR7.
- Explicitly save DR0-3 of the guest.
- Explicitly save DR0-3,6-7, and MSR_DEBUGCTL for the host.  Since SVM
  saves the guest DR6 in the VMCB, the race with single-stepping
  described for VT-x does not exist.

For both platforms, expose all of the guest DRx values via --get-drX
and --set-drX flags to bhyvectl.

6 years agoDocument EN-18:01, EN-18:02, SA-18:01, SA-18:02.
gjb [Wed, 7 Mar 2018 15:02:13 +0000 (15:02 +0000)]
Document EN-18:01, EN-18:02, SA-18:01, SA-18:02.

Sponsored by: The FreeBSD Foundation

6 years agoMFC r329719: MFV r329718: 8520 7198 lzc_rollback_to should support rolling back to...
avg [Wed, 7 Mar 2018 13:45:29 +0000 (13:45 +0000)]
MFC r329719: MFV r329718: 8520 7198 lzc_rollback_to should support rolling back to origin

6 years agoMFC r329714: MFV r329713: 8731 ASSERT3U(nui64s, <=, UINT16_MAX) fails for large blocks
avg [Wed, 7 Mar 2018 13:39:10 +0000 (13:39 +0000)]
MFC r329714: MFV r329713: 8731 ASSERT3U(nui64s, <=, UINT16_MAX) fails for large blocks

6 years agoMFC r330338: db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common
avg [Wed, 7 Mar 2018 13:37:25 +0000 (13:37 +0000)]
MFC r330338: db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common

6 years agoMFC r327206:
eadler [Wed, 7 Mar 2018 11:09:07 +0000 (11:09 +0000)]
MFC r327206:

Fix CID 1008428.

6 years agoMFC r302779,r302807:
eadler [Wed, 7 Mar 2018 11:03:01 +0000 (11:03 +0000)]
MFC r302779,r302807:

merge upstream hg 06347b1f76fe (fix IXFR)

Initialize first_serial to 0 in dozonetransfer(..) to fix -Wuninitialized
warning

PR: 209177

6 years agoRevert MFC of r330463 r330462 r330454 r330452 r330451:
eadler [Wed, 7 Mar 2018 10:54:10 +0000 (10:54 +0000)]
Revert MFC of r330463 r330462 r330454 r330452 r330451:

These commits have KPI/KBI considerations (or are a result of those that
do). I did not properly take into account these concerns when merging to
a kbi-stable branch.

Requested by: jhb
Pointyhat to: eadler

6 years agoMFC r316339,317396,317829,326010,329554: less v530.
delphij [Wed, 7 Mar 2018 06:13:47 +0000 (06:13 +0000)]
MFC r316339,317396,317829,326010,329554: less v530.

Relnotes: yes

6 years agoMFC r329855
davidcs [Tue, 6 Mar 2018 23:12:32 +0000 (23:12 +0000)]
MFC r329855
  1. Added support to offline a port if is error recovery on successful.
  2. Sysctls to enable/disable driver_state_dump and error_recovery.
  3. Sysctl to control the delay between hw/fw reinitialization and
     restarting the fastpath.
  4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off.
  5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat
     failure.
  6. Speed up slowpath shutdown during error recovery.
  7. link_state update using atomic_store.
  8. Added timestamp information on driver state and minidump captures.
  9. Added support for Slowpath event logging
  10.Added additional failure injection types to simulate failures.

6 years agoMFC r330075:
markj [Tue, 6 Mar 2018 16:16:30 +0000 (16:16 +0000)]
MFC r330075:
Give the 0th domain's page daemon thread a consistent name.

6 years agoMFC: r329889
jkim [Mon, 5 Mar 2018 23:51:29 +0000 (23:51 +0000)]
MFC: r329889

Partially revert r197863 to reduce diff against i386.

6 years agoMFC r326400
asomers [Mon, 5 Mar 2018 20:37:54 +0000 (20:37 +0000)]
MFC r326400

Revert r326399

Accidentally committed wrong file

Pointy hat to:  asomers
Sponsored by:   Spectra Logic Corp

6 years agoMFC r320726, r320727
asomers [Mon, 5 Mar 2018 18:37:05 +0000 (18:37 +0000)]
MFC r320726, r320727

r320726:
Expect :snprintf_float to segfault

This issue started occurring within the past month or so.

PR:   220502
Reported by:  Jenkins (amd64-head job)

r320727:
:snprintf_float: don't blindly set RLIMIT_DATA and RLIMIT_AS to 1 MB -- raise
the limit to 32MB instead.

Require user=root and memory=64MB+ first so one can be reasonably sure that
the test will function appropriately.

MFC with: r320726
PR: 220502

6 years agoRevert r330445
eadler [Mon, 5 Mar 2018 17:01:26 +0000 (17:01 +0000)]
Revert r330445

This commit was reverted in r321480 in head

Reported by: sbruno

6 years agoMFC r330027
dab [Mon, 5 Mar 2018 13:58:03 +0000 (13:58 +0000)]
MFC r330027

iconv uses strlen directly on user supplied memory

`iconv_sysctl_add` from `sys/libkern/iconv.c` incorrectly limits the
size of user strings, such that several out of bounds reads could have
been possible.

static int
iconv_sysctl_add(SYSCTL_HANDLER_ARGS)
{
struct iconv_converter_class *dcp;
struct iconv_cspair *csp;
struct iconv_add_in din;
struct iconv_add_out dout;
int error;

error = SYSCTL_IN(req, &din, sizeof(din));
if (error)
return error;
if (din.ia_version != ICONV_ADD_VER)
return EINVAL;
if (din.ia_datalen > ICONV_CSMAXDATALEN)
return EINVAL;
if (strlen(din.ia_from) >= ICONV_CSNMAXLEN)
return EINVAL;
if (strlen(din.ia_to) >= ICONV_CSNMAXLEN)
return EINVAL;
if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN)
return EINVAL;
...

Since the `din` struct is directly copied from userland, there is no
guarantee that the strings supplied will be NULL terminated. The
`strlen` calls could continue reading past the designated buffer
sizes.

Declaration of `struct iconv_add_in` is found in `sys/sys/iconv.h`:

struct iconv_add_in {
int ia_version;
char ia_converter[ICONV_CNVNMAXLEN];
char ia_to[ICONV_CSNMAXLEN];
char ia_from[ICONV_CSNMAXLEN];
int ia_datalen;
const void *ia_data;
};

Our strings are followed by the `ia_datalen` member, which is checked
before the `strlen` calls:

if (din.ia_datalen > ICONV_CSMAXDATALEN)

Since `ICONV_CSMAXDATALEN` has value `0x41000` (and is `unsigned`),
this ensures that `din.ia_datalen` contains at least 1 byte of 0, so
it is not possible to trigger a read out of bounds of the `struct`
however, this code is fragile and could introduce subtle bugs in the
future if the `struct` is ever modified.

PR: 207302
Submitted by: CTurt <cturt@hardenedbsd.org>
Reported by: CTurt <cturt@hardenedbsd.org>
Sponsored by: Dell EMC

6 years agoMFC r329994: mac_portacl(4): stop panicing INVARIANTS-enabled kernel by loading .ko
eugen [Mon, 5 Mar 2018 12:16:37 +0000 (12:16 +0000)]
MFC r329994: mac_portacl(4): stop panicing INVARIANTS-enabled kernel by loading .ko
when kernel already has options MAC_PORTACL.

PR: 183817
Approved by: avg (mentor)

6 years agoMFC r329930: route(8): make it possible to manually delete pinned route
eugen [Mon, 5 Mar 2018 12:04:43 +0000 (12:04 +0000)]
MFC r329930: route(8): make it possible to manually delete pinned route

Reported by: Andreas Longwitz <longwitz@incore.de>
Approved by: avg (mentor)

6 years agoMFC r324424:
eadler [Mon, 5 Mar 2018 09:18:40 +0000 (09:18 +0000)]
MFC r324424:

Remove CVS - we don't run that infrastructure anymore

6 years agoMFC r326386:
eadler [Mon, 5 Mar 2018 09:17:55 +0000 (09:17 +0000)]
MFC r326386:

Fix pthread_condattr(3) type

6 years agoMFC r326479:
eadler [Mon, 5 Mar 2018 09:17:18 +0000 (09:17 +0000)]
MFC r326479:

Add include guard to fpmath.h

6 years agoMFC r327117:
eadler [Mon, 5 Mar 2018 09:06:14 +0000 (09:06 +0000)]
MFC r327117:

calendar: add missing header file

time.h is required for strftime and struct tm

6 years agoMFC r326473:
eadler [Mon, 5 Mar 2018 09:05:37 +0000 (09:05 +0000)]
MFC r326473:

diag/httpd-error: remove

This is a script for a web server in a specific
configuration. Current web servers don't produce
similar log files and it isn't FreeBSD's
goal to produce a log file analyzer.

6 years agoMFC r326724,r326868,r326869,r327096,r327333,r327334,r327342,r327361,r327510:
eadler [Mon, 5 Mar 2018 09:01:51 +0000 (09:01 +0000)]
MFC r326724,r326868,r326869,r327096,r327333,r327334,r327342,r327361,r327510:

Add two dates derived from looking at archival source tarballs in the
TUHS collection for 7th Edition and V32.

------------------------------------------------------------------------
r326868 | eadler | 2017-12-15 03:36:48 +0000 (Fri, 15 Dec 2017) | 4 lines

bsd-family-tree: Add NetBSD 7.0.2

Pulled directly from NetBSD

------------------------------------------------------------------------
r326869 | eadler | 2017-12-15 03:46:52 +0000 (Fri, 15 Dec 2017) | 2 lines

bsd-family-tree: add dfly 5.0.[12]

------------------------------------------------------------------------
r327096 | sevan | 2017-12-22 21:54:39 +0000 (Fri, 22 Dec 2017) | 5 lines

Drop the NetBSD rcs tag introduced in r326868.

Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D13511

------------------------------------------------------------------------
r327333 | eadler | 2017-12-29 04:49:59 +0000 (Fri, 29 Dec 2017) | 7 lines

bsd-family-tree: add HardenedBSD

This adds HardenedBSD which is a pseudo-fork of FreeBSD. It hasn't had a
release yet, but does does have active users and a community. As such
document it as a branch off of FreeBSD-stable. Ideally this adds enough
space so that future releases are easy enough to add.

------------------------------------------------------------------------
r327334 | eadler | 2017-12-29 05:01:07 +0000 (Fri, 29 Dec 2017) | 5 lines

bsd-family-tree: add NetBSD 6.0.6

This was a missing release. Released on the same day as 6.1.5 per
https://blog.netbsd.org/tnf/entry/netbsd_6_1_5_and

------------------------------------------------------------------------
r327342 | eadler | 2017-12-29 14:31:43 +0000 (Fri, 29 Dec 2017) | 5 lines

bsd-family-tree: add NetBSD 7.1.1; correct NetBSD abbrev

Reported by: Herbert J. Skuhra <herbert@gojira.at>
Reported by: N.J. Mann <njm@njm.me.uk>

------------------------------------------------------------------------
r327361 | maxim | 2017-12-29 21:37:36 +0000 (Fri, 29 Dec 2017) | 2 lines

Sort by time.

------------------------------------------------------------------------
r327510 | eadler | 2018-01-03 03:46:28 +0000 (Wed, 03 Jan 2018) | 7 lines

bsd-family-tree: revert r327333

bsd-family-tree should only contain projects that have had actual
releases.

Requested by: core

6 years agoMFC r322668,r324239,r324240,r324422,r324476,r324688:
eadler [Mon, 5 Mar 2018 08:57:40 +0000 (08:57 +0000)]
MFC r322668,r324239,r324240,r324422,r324476,r324688:

FreeBSD 11.1 release added.

------------------------------------------------------------------------
r324239 | maxim | 2017-10-03 13:31:22 +0000 (Tue, 03 Oct 2017) | 2 lines

FreeBSD 10.4 release added.

------------------------------------------------------------------------
r324240 | maxim | 2017-10-03 14:23:49 +0000 (Tue, 03 Oct 2017) | 5 lines

o FreeBSD 10.4 happened after 11.1, adjust the branches accordingly.
o The current FreeBSD branch is 12 not 13.

Suggested by: lidl

------------------------------------------------------------------------
r324422 | eadler | 2017-10-09 04:43:05 +0000 (Mon, 09 Oct 2017) | 2 lines

Add macOS 10.13

------------------------------------------------------------------------
r324476 | eadler | 2017-10-10 05:47:10 +0000 (Tue, 10 Oct 2017) | 2 lines

Add OpenBSD 6.2, reorder macOS 10.13

------------------------------------------------------------------------
r324688 | maxim | 2017-10-17 14:37:12 +0000 (Tue, 17 Oct 2017) | 2 lines

DragonFly 5.0.0 release added.

6 years agoMFC r314705,r315406,r315407,r316025,r316082,r316731:
eadler [Mon, 5 Mar 2018 08:56:15 +0000 (08:56 +0000)]
MFC r314705,r315406,r315407,r316025,r316082,r316731:

Add macOS 10.12
NetBSD 7.1 release added.
Indentation for the DragonFlyBSD trunk fixed, EoL whitespace removed.
macOS 10.12 release date added.
DragonFly BSD 4.8.0 release added.
OpenBSD 6.1 release added.

6 years agoMFC r325217:
eadler [Mon, 5 Mar 2018 08:50:54 +0000 (08:50 +0000)]
MFC r325217:

Fix '\' in binary ascii table

6 years agoMFC r325353:
eadler [Mon, 5 Mar 2018 08:50:16 +0000 (08:50 +0000)]
MFC r325353:

chase removal of csup in r267863 from 2014..

6 years agoMFC r326434:
eadler [Mon, 5 Mar 2018 08:49:11 +0000 (08:49 +0000)]
MFC r326434:

fmt(1): Fix usage of Nm macro

6 years agoMFC r326456:
eadler [Mon, 5 Mar 2018 08:47:27 +0000 (08:47 +0000)]
MFC r326456:

pf.os: Add OpenBSD:6.1

Obtained From: OpenBSD

6 years agoMFC r306449:
eadler [Mon, 5 Mar 2018 08:45:39 +0000 (08:45 +0000)]
MFC r306449:

Remove an extra etter.

6 years agoMFC r306435:
eadler [Mon, 5 Mar 2018 08:44:49 +0000 (08:44 +0000)]
MFC r306435:

callsign isn't required anymore

6 years agoMFC r324423,r324436:
eadler [Mon, 5 Mar 2018 08:44:08 +0000 (08:44 +0000)]
MFC r324423,r324436:

Update iso3166 codes

Based on https://raw.githubusercontent.com/lukes/ISO-3166-Countries-with-Regional-Codes/master/all/all.csv
and hand massaged.

6 years agoMFC r311830:
eadler [Mon, 5 Mar 2018 08:42:07 +0000 (08:42 +0000)]
MFC r311830:

[rsu] add support for the "green" rsu NICs.

They're still a 1T2R NIC, so reuse the same rfconfig and
nstream configuration.

6 years agoMFC r311861:
eadler [Mon, 5 Mar 2018 08:40:18 +0000 (08:40 +0000)]
MFC r311861:

[net80211] Add default parameters for 11ac.

I doubt TDMA code will ever work for 11ac, but you never know, someone
may one day make it happen.

6 years agoMFC r310891:
eadler [Mon, 5 Mar 2018 08:37:08 +0000 (08:37 +0000)]
MFC r310891:

[net80211] add placeholders for the VHT action frame handling.

Upcoming vht support will register send/receive action handlers.

6 years agoMFC r313979:
eadler [Mon, 5 Mar 2018 08:33:29 +0000 (08:33 +0000)]
MFC r313979:

[ifconfig] fix a memory leak!

6 years agoMFC r313978:
eadler [Mon, 5 Mar 2018 08:32:54 +0000 (08:32 +0000)]
MFC r313978:

[ifconfig] fix a memory leak.

6 years agoMFC r313880:
eadler [Mon, 5 Mar 2018 08:32:15 +0000 (08:32 +0000)]
MFC r313880:

[asmc] Add support for MacBook Pro 11,2

This patch will add support for MacBookPro 11.2.
For the macros, the MBP11_* macros (for the existing MacBookPro11.3) did not
match so they have been renamed to MBP113_* and a new MBP112_* has been
added (modified copy of MBP11_*).

Some trailing whitespaces may have been removed automatically.

PR: kern/214836

6 years agoMFC r313578:
eadler [Mon, 5 Mar 2018 08:30:47 +0000 (08:30 +0000)]
MFC r313578:

[net80211] add a sysctl that forces a vap restart.

Well, vap restart really does "all restart" for now, which will be a good
way of debugging firmware restart issues.

6 years agoMFC r313425:
eadler [Mon, 5 Mar 2018 08:29:38 +0000 (08:29 +0000)]
MFC r313425:

[iwm] add version 17 firmware.

6 years agoMFC r311581:
eadler [Mon, 5 Mar 2018 08:27:29 +0000 (08:27 +0000)]
MFC r311581:

Capsicum: add capability mode to users binary

Submitted by: Tyler Littlefield <tyler@tysdomain.com>
Reviewed by: cem, oshogbo
Differential Revision: https://reviews.freebsd.org/D9046

6 years agoMFC r308950:
eadler [Mon, 5 Mar 2018 08:25:23 +0000 (08:25 +0000)]
MFC r308950:

[net80211] Remove extra \n.

6 years agoMFC r308663:
eadler [Mon, 5 Mar 2018 08:24:58 +0000 (08:24 +0000)]
MFC r308663:

[net80211] announce 11n capabilities in probe requests in IBSS mode.

The 802.11-2012 specification notes that a subset of IEs should be present
in IBSS probe requests.  This is what (initially) allows nodes to discover
that other nodes are 11n capable.  Notably - HTCAP, but not HTINFO.

This isn't everything required to reliably enable 11n between net80211
peers; there's more work to come.

Tested:

* AR9380, IBSS+11n mode

6 years agoMFC r308008:
eadler [Mon, 5 Mar 2018 08:22:48 +0000 (08:22 +0000)]
MFC r308008:

[net80211] add comments!

6 years agoMFC r308007:
eadler [Mon, 5 Mar 2018 08:22:24 +0000 (08:22 +0000)]
MFC r308007:

[net80211] don't abort a background scan upon reception of a single packet.

Full offload drivers don't need this behaviour - they do it in firmware.

6 years agoMFC r306836:
eadler [Mon, 5 Mar 2018 08:21:31 +0000 (08:21 +0000)]
MFC r306836:

[ifconfig] correctly display RSSI.

6 years agoMFC r306139:
eadler [Mon, 5 Mar 2018 08:18:13 +0000 (08:18 +0000)]
MFC r306139:

[net80211] don't add IBSS node table entries for neighbors from other SSIDs.

The adhoc probe/beacon input path was creating nodes for all SSIDs.
This wasn't a problem when the NICs were configured to only process
frames for the current BSSID, but that didn't allow IBSS merges.
Once avos and I flipped on "beacons from all BSSIDs" to allow for
correct IBSS merging, we found this interesting behaviour.

This adds a check against the current SSID.

* If there's no VAP SSID, allow anything
* If there's a VAP SSID, check if the incoming frame has a suitable
  SSID and if so, allow it.

This prevents nodes being created for other SSIDs in probe and beacon
frames - ie, beacons overlapping IBSSes with different SSIDs, and
probe requests from arbitrary devices.

Tested:

* AR9380, IBSS mode, both local and other IBSSes.

6 years agoMFC r305895:
eadler [Mon, 5 Mar 2018 08:17:02 +0000 (08:17 +0000)]
MFC r305895:

[net80211] add a HT method to populate HTCAP based on IBSS requirements.

IBSS negotiation is a subset of the STA/AP negotiation.  We always have a
current channel, so base the HT capabilities on the current channel.
This is then put into IBSS probe requests to inform peers of our
11n capabilities.

6 years agoMFC r303339:
eadler [Mon, 5 Mar 2018 08:14:11 +0000 (08:14 +0000)]
MFC r303339:

Update my TODO items.

6 years agoMFC r318001:
eadler [Mon, 5 Mar 2018 08:05:30 +0000 (08:05 +0000)]
MFC r318001:

[iwm] include opt_iwm.h and opt_wlan.h consistently in all files.

6 years agoMFC r313306:
eadler [Mon, 5 Mar 2018 08:01:08 +0000 (08:01 +0000)]
MFC r313306:

[iwm] free node reference if rxparams addition fails.

6 years agoMFC r308185:
eadler [Mon, 5 Mar 2018 08:00:17 +0000 (08:00 +0000)]
MFC r308185:

[iwm] Set full-offload scan flag. Fixes fw panic when already associated.

* Starting a scan from wpa_supplicant or via ifconfig while associated,
  should no longer cause firmware panics or abort early.

Tested:

* AC7260, STA mode

6 years agoMFC r307158:
eadler [Mon, 5 Mar 2018 07:58:48 +0000 (07:58 +0000)]
MFC r307158:

net80211: convert all ieee80211_input_mimo*() consumers
to ieee80211_add_rx_params() + drop last (ieee80211_rx_stats) parameter

Note: there is an additional check for ieee80211_get_rx_params()
return value (which does not exist in the original diff).

6 years agoMFC r306837:
eadler [Mon, 5 Mar 2018 07:54:57 +0000 (07:54 +0000)]
MFC r306837:

[net80211] extend the ieee80211_rx_stats struct to include more information.

There are a variety of more interesting RX statistics that we should
keep track of but we don't.  This is a starting point for adding more
information.

Specifically:

* now the RX rate information and some of the packet status is
  passed up;
* The 32 bit or 64 bit TSF is passed up;
* the PHY mode is passed up;
* the "I'm decap'ed AMSDU!" state is passed up;
* number of RX chains is bumped to 4.

This is all mostly a placeholder for getting the data into the RX status
before we pass it up to net80211 - unfortunately we don't yet enforce
that drivers provide it, nor do we pass the provided info back up the
stack so anyone can use the data.

We're going to need to use some of this data moving forward.
Notably, now that some hardware can do AMSDU decap for us (the intel iwm
driver can do it when we flip it on; the ath10k port I'm doing does
it for us) then we need to pass it up through the stack so the duplicate
RX sequence numbers and crypto/IV details don't cause the packet to
be dropped and/or counted against a replay counter.

It's also the beginning of being able to do more interesting node
accounting in net80211.  Specifically, once drivers start populating
per-packet rate information, AMPDU information, timestamps, etc,
we can start providing histograms of rate-versus-RSSI, account
for receive time spent per node and other such interesting things.

(Note: I'm also hoping to include ranging and RTT information for
future chipset support; and it's likely going to include it in
this kind of fashion.)

6 years agoMFC r326572:
eadler [Mon, 5 Mar 2018 07:33:00 +0000 (07:33 +0000)]
MFC r326572:

ioat(4): Add Skylake Xeon PCI-ID

SKX IOAT is just another 3.2 version of the CBDMA engine.

6 years agoMFC r326276:
eadler [Mon, 5 Mar 2018 07:26:05 +0000 (07:26 +0000)]
MFC r326276:

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.

6 years agoMFC r314181:
eadler [Mon, 5 Mar 2018 07:14:56 +0000 (07:14 +0000)]
MFC r314181:

[ifconfig] handle illegal WPS frames

Some APs broadcast WPS IE frames with totally broken data.  Ifconfig's printwpsie()
loops through WPS frames printing the attributes out; if the frame's data is bad,
printwpsie() can end up looking at out-of-bounds addresses causing ifconfig to
bus error.

Thanks to Takashi Inoue at Nihon U for his efforts in debugging this.

PR: bin/217312

6 years agoMFC r315924:
eadler [Mon, 5 Mar 2018 07:08:58 +0000 (07:08 +0000)]
MFC r315924:

[iwm] GC unused code from if_iwm_scan.c, copyied from iwn or iwlwifi/dvm.

Obtained from: dragonflybsd.git 10881df269b93c26e5ee6af629c36db5672e6e52

6 years agoMFC r327231,r327232:
eadler [Mon, 5 Mar 2018 06:59:30 +0000 (06:59 +0000)]
MFC r327231,r327232:

kernel: Fix several typos and minor errors
lib: Fix several typos and minor errors

- duplicate words
- typos
- references to old versions of FreeBSD

6 years agoMFC r307901,r308180:
eadler [Mon, 5 Mar 2018 06:52:26 +0000 (06:52 +0000)]
MFC r307901,r308180:

FreeBSD tcp stack used to inform respective congestion control module about the
loss event but not use or obay the recommendations i.e. values set by it in some
cases.

Here is an attempt to solve that confusion by following relevant RFCs/drafts.
Stack only sets congestion window/slow start threshold values when there is no
CC module availalbe to take that action. All CC modules are inspected and
updated when needed to take appropriate action on loss.

tcp_stacks/fastpath module has been updated to adapt these changes.

Note: Probably, the most significant change would be to not bring congestion
window down to 1MSS on a loss signaled by 3-duplicate acks and letting
respective CC decide that value.

6 years agoMFC r308065:
eadler [Mon, 5 Mar 2018 06:47:28 +0000 (06:47 +0000)]
MFC r308065:

Remove a PCI ID for a raid controller from Adaptec that was planned,
but never released. Since no real hardware was released with this ID,
just drop it from the aacraid driver. This paves the path for future
drivers for hardware that actually has this ID.

Submitted by: Scott Benesh from Microsemi.
Differential Revision: https://reviews.freebsd.org/D8377
MFC After: 3 days

6 years agoMFC r306896:
eadler [Mon, 5 Mar 2018 06:37:02 +0000 (06:37 +0000)]
MFC r306896:

Fix spurious white space introduced in r301059

r301059 accidently introduced a subtle change for point to point interfaces
where an extra space is inserted before the netmask. This can cause issues
for scripts that parse ifconfig output.

6 years agoMFC r330364:
bdrewery [Sun, 4 Mar 2018 23:39:12 +0000 (23:39 +0000)]
MFC r330364:

  Don't read SRC_ENV_CONF for MAKEOBJDIRPREFIX guard.

6 years agoMFC r325776:
bdrewery [Sun, 4 Mar 2018 23:36:49 +0000 (23:36 +0000)]
MFC r325776:

  Rework r325568 so all 'make LINT' targets work.

6 years agoMFC r325627:
bdrewery [Sun, 4 Mar 2018 23:35:35 +0000 (23:35 +0000)]
MFC r325627:

  Deal with src.conf for top-level MAKEOBJDIRPREFIX guard.

6 years agoMFC r330127:
bdrewery [Sun, 4 Mar 2018 23:34:02 +0000 (23:34 +0000)]
MFC r330127:

  Allow overriding .MAKE.MAKEFILE_PREFERENCE.

6 years agoMFC r325292:
bdrewery [Sun, 4 Mar 2018 23:32:36 +0000 (23:32 +0000)]
MFC r325292:

  META_MODE: Respect make -s.

6 years agoMFC r329271:
bdrewery [Sun, 4 Mar 2018 23:28:42 +0000 (23:28 +0000)]
MFC r329271:

  nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR].

6 years agoMFC r325570:
bdrewery [Sun, 4 Mar 2018 23:25:26 +0000 (23:25 +0000)]
MFC r325570:

  AUTO_OBJ: Fix 'old style' kernel builds using wrong .OBJDIR.

6 years agoMFC r320367: Add "Terminus BSD Console" size 32
cperciva [Sun, 4 Mar 2018 21:58:55 +0000 (21:58 +0000)]
MFC r320367: Add "Terminus BSD Console" size 32

6 years agoMFC r305504:
eadler [Sun, 4 Mar 2018 19:17:32 +0000 (19:17 +0000)]
MFC r305504:

nullfs: stop special-casing directories in null_vptocnp

The previous code was forcing an expensive walk in vop_stdvptocnp,
which was causing performance issues on highly contended zfs.

6 years agoMFC r330236:
hselasky [Sun, 4 Mar 2018 19:15:24 +0000 (19:15 +0000)]
MFC r330236:
Correct the return value from flush_work() and flush_delayed_work() in the
LinuxKPI to comply more with Linux. This fixes an issue when these functions
are used in waiting loops.

Sponsored by: Mellanox Technologies

6 years agoMFC r307156:
eadler [Sun, 4 Mar 2018 08:00:07 +0000 (08:00 +0000)]
MFC r307156:

MFportsnap r264740: Use case insensitive match when parsing host(1) output.

Some DNS caches turn "FreeBSD.org" into "freebsd.org", which was causing
the printed SRV records to not match our regex.

PR: 170503

6 years agoMFC r330256:
eadler [Sun, 4 Mar 2018 02:41:25 +0000 (02:41 +0000)]
MFC r330256:

sys/sys: Use a more common spelling of 'dirent'

6 years agoMFC r306767:
eadler [Sat, 3 Mar 2018 21:23:31 +0000 (21:23 +0000)]
MFC r306767:

Correctly calculate snd_max in persist case.

In the persist case, take the SYN and FIN flags into account when updating
the sequence space sent.

6 years agoMFC r305137:
eadler [Sat, 3 Mar 2018 21:05:28 +0000 (21:05 +0000)]
MFC r305137:

Eliminate unnecessary loop in _cap_check()

Calling cap_rights_contains() several times with the same inputs is not
going to produce a different output. The variable being iterated, i, is
never used inside the for loop.

The loop is actually done in cap_rights_contains()

6 years agoMFC r302519:
eadler [Sat, 3 Mar 2018 18:11:02 +0000 (18:11 +0000)]
MFC r302519:

Audit the file-descriptor number argument for openat(2).  Remove a comment
about the desirability of auditing the number, as it was in fact in the
wrong place (in the common path for open(2) and openat(2), and only the
latter accepts a file-descriptor argument).  Where other ABIs support
openat(2), it may be necessary to do additional argument auditing as it is
not performed in kern_openat(9).

MFC after: 3 days

6 years agoMFC r329905:
kib [Sat, 3 Mar 2018 11:53:44 +0000 (11:53 +0000)]
MFC r329905:
Hide all vm/vm_pageout.h content under #ifdef _KERNEL.