]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r339635,r350301,r350327,r351151:
Bryan Drewery [Thu, 5 Sep 2019 20:26:20 +0000 (20:26 +0000)]
MFC r339635,r350301,r350327,r351151:

  r339635:
    Fix regex for extracting SHM_* values for libsysdecode
  r350301:
    libsysdecode: add explicit dependencies on recently changed headers
  r350327:
    libsysdecode: use the proper include directory
  r351151:
    Rework r339635 to fix .depend.tables.h handling.

5 years agoMFC r350848:
Ian Lepore [Thu, 5 Sep 2019 19:25:44 +0000 (19:25 +0000)]
MFC r350848:

The am335x_ehrpwm driver now requires the pwmbus_if interface, add it.

5 years agoFix LINT kernel builds on powerpc64 and sparc64. This is a direct commit
Ian Lepore [Thu, 5 Sep 2019 17:20:48 +0000 (17:20 +0000)]
Fix LINT kernel builds on powerpc64 and sparc64.  This is a direct commit
to 12-stable because the nandfs code no longer exists in 13-current.

The build was failing with

 nandfs_dat.c:301:
  warning: comparison is always false due to limited range of data type

I tried to fix it with an inline (size_t) cast of nargv->nv_nmembs in the
if() expression, but that didn't help (which seems a bit buggy), but using
an intermediate variable fixed it.  Elegance doesn't matter as much as
suppressing the warning; this code is long-dead even on this branch.

5 years agoMFC r348979:
Bryan Drewery [Thu, 5 Sep 2019 17:20:20 +0000 (17:20 +0000)]
MFC r348979:

  Stop using .OODATE for extracting firmware.

5 years agoMFC r350847:
Ian Lepore [Thu, 5 Sep 2019 16:53:55 +0000 (16:53 +0000)]
MFC r350847:

Allow the sdhci timeout sysctl var to be set as a tunable.  Also, add a
missing newline in a warning printf.

5 years agoMFC r346255:
Bryan Drewery [Thu, 5 Sep 2019 16:52:55 +0000 (16:52 +0000)]
MFC r346255:

  Fix 'jot -r 0 start end' to work.

Relnotes: yes

5 years agoMFC r350988:
Ian Lepore [Thu, 5 Sep 2019 16:48:43 +0000 (16:48 +0000)]
MFC r350988:

Add PNP_INFO to the gpiopps driver.

5 years agoMFC r350838, r350840-r350841, r350849, r350879
Ian Lepore [Thu, 5 Sep 2019 16:46:16 +0000 (16:46 +0000)]
MFC r350838, r350840-r350841, r350849, r350879

r350838:
Switch the am335x_pmic driver to using iicdev_readfrom/writeto.

PR: 239697
Submitted by: Chuhong Yuan

r350840:
Garbage collect the no-longer-necessary MAX_IIC_DATA_SIZE (there is not a
buffer allocated at that fixed size anymore).

r350841:
When responding to an interrupt in the am335x_pmic driver, use a taskqueue
thread to do the work that involves i2c IO, which sleeps while the IO is
in progress.

r350849:
Remove use of intr_config_hook from the am335x_pmic and tda19988 drivers.
Long ago this was needed, but now low-level i2c controller drivers cleverly
defer attachment of the bus until interrupts are enabled (if they require
interrupts to function), so that every i2c slave device doesn't have to.

r350879:
Revert r350841.  I didn't realize that on this chip, reading the interrupt
status register clears pending interrupts.  By moving that code out of the
interrupt handler into a taskqueue task, I effectively created an interrupt
storm by returning from the handler with the interrupt source still active.

We'll have to find a different solution for this driver's need to sleep
in an ithread context.

5 years agoMFC r350591, r350971, r351724
Ian Lepore [Thu, 5 Sep 2019 16:37:10 +0000 (16:37 +0000)]
MFC r350591, r350971, r351724

r350591:
Add a driver for Texas Instruments ADS101x/ADS111x i2c ADC chips.

Instances of the device can be configured using hints or FDT data.

Interfaces to reconfigure the chip and extract voltage measurements from
it are available via sysctl(8).

r350971:
Fix the driver name in ads111x.4, and hook the manpage up to the build.

The driver was originally written with the name ads1115, but at the last
minute it got renamed to ads111x to reflect its support for many related
chips, but I forgot to update the manpage to match the renaming before
committing it all.

r351724:
Fix the name of the devicetree bindings document file cited in the manpage.

5 years agoMFC r349957:
Tijl Coosemans [Thu, 5 Sep 2019 09:57:20 +0000 (09:57 +0000)]
MFC r349957:

Fix layout.  -C needs to be styled as a flag here, not as a new list item.

5 years agoMFC r351167:
Hans Petter Selasky [Thu, 5 Sep 2019 09:35:06 +0000 (09:35 +0000)]
MFC r351167:
Include item position in report descriptor dump in usbhidctl(1).

Submitted by: Kevin Zheng <kevinz5000@gmail.com>
PR: 239918

5 years agoMFC r351146:
Hans Petter Selasky [Thu, 5 Sep 2019 09:32:00 +0000 (09:32 +0000)]
MFC r351146:
Implement detach_kernel_driver command in usbconfig(8).

Submitted by: Kevin Zheng <kevinz5000@gmail.com>
PR: 239916

5 years agoMFC r351009:
Hans Petter Selasky [Thu, 5 Sep 2019 09:28:58 +0000 (09:28 +0000)]
MFC r351009:
Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
This patch makes the DRM graphics driver in ports usable on aarch64.

Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D21008
Sponsored by: Mellanox Technologies

5 years agoMFC r347387:
Hans Petter Selasky [Thu, 5 Sep 2019 09:20:15 +0000 (09:20 +0000)]
MFC r347387:
Fix memory leak of PCI BUS structure in the LinuxKPI.

Sponsored by: Mellanox Technologies

5 years agoMFC: r350395
Rick Macklem [Wed, 4 Sep 2019 20:14:21 +0000 (20:14 +0000)]
MFC: r350395
Fix printing of Server Re-Failed and Server Faults.

nfsstat -s prints bogus large numbers for the Server Re-Failed and Server
Faults fields. This was introduced by r328588.
Although I know nothing about libxo, these lines aren't titles and this
patch seems to fix the problem, so I am committing it for rea@ who emailed
it to me.
It also deleted the trailing ':' from the title lines, since those were not
in the pre-r328588 output.

If there is a more correct fix, someone conversant with libxo will need
to do so.

5 years agoMFC r351213: assert that td_lk_slocks is not leaked upon return from kernel
Aleksandr Rybalko [Wed, 4 Sep 2019 19:32:50 +0000 (19:32 +0000)]
MFC r351213: assert that td_lk_slocks is not leaked upon return from kernel

5 years agoMFC: r351231, r351233
Jung-uk Kim [Wed, 4 Sep 2019 14:05:04 +0000 (14:05 +0000)]
MFC: r351231, r351233

Fix sound on headset jack for Lenovo Thinkpad X1 Carbon Gen 6 (model 20KH).

5 years agoMFC r351213: assert that td_lk_slocks is not leaked upon return from kernel
Andriy Gapon [Wed, 4 Sep 2019 09:54:05 +0000 (09:54 +0000)]
MFC r351213: assert that td_lk_slocks is not leaked upon return from kernel

5 years agoMFC r351168: zfs_vget: fix vnode reference count leak in error path
Andriy Gapon [Wed, 4 Sep 2019 08:47:29 +0000 (08:47 +0000)]
MFC r351168: zfs_vget: fix vnode reference count leak in error path

5 years agoMFC r350897: MFV r350896: 6585 sha512, skein, and edonr have an
Andriy Gapon [Wed, 4 Sep 2019 08:41:55 +0000 (08:41 +0000)]
MFC r350897: MFV r350896: 6585 sha512, skein, and edonr have an
unenforced dependency on extensible dataset

5 years agostable/ branches: commit missing part of patch
Kyle Evans [Tue, 3 Sep 2019 21:11:04 +0000 (21:11 +0000)]
stable/ branches: commit missing part of patch

truss prior to r350069 also attempted to use mips regnum bits -- let it
happen.

5 years agotests: shm_open(2): Verify FD_CLOEXEC
Kyle Evans [Tue, 3 Sep 2019 20:26:08 +0000 (20:26 +0000)]
tests: shm_open(2): Verify FD_CLOEXEC

Motivated by the fact that I'm messing around near the implementation and
wanting to ensure this doesn't get messed up in the process.

5 years agoMFC r351227: mips: avoid empty mdproc struct
Kyle Evans [Tue, 3 Sep 2019 20:23:58 +0000 (20:23 +0000)]
MFC r351227: mips: avoid empty mdproc struct

Compiling with a more modern toolchain than GCC 4.2 in base warns about the
empty struct. Take a hint and comment from r350902+r350953 by luporl@.

5 years agoMFC r351408-r351410: reduce pollution from mips machine/regnum.h
Kyle Evans [Tue, 3 Sep 2019 20:19:43 +0000 (20:19 +0000)]
MFC r351408-r351410: reduce pollution from mips machine/regnum.h

r351408:
libsa: mips: use _JB_* from machine/asm.h, remove regnum dep

This brings the libsa/mips _setjmp implementation closer to parity with the
libc version.

r351409:
mips: hide regnum definitions behind _KERNEL/_WANT_MIPS_REGNUM

machine/regnum.h ends up being included by sys/procfs.h and sys/ptrace.h via
machine/reg.h. Many of the regnum definitions are too short and too generic
to be exposing to any userland application including one of these two
headers. Moreover, these actively cause build failures in googletest
(template <typename T1 ...> expanding to template <typename 9 ...>).

Hide the definitions behind _KERNEL or _WANT_MIPS_REGNUM, and patch all of
the userland consumers to define as needed.

r351410:
libsa: mips: fix typo that had slipped into the diff on local machine

5 years agoMFC r351407: libc: mips: remove unused longjmp.c
Kyle Evans [Tue, 3 Sep 2019 20:15:06 +0000 (20:15 +0000)]
MFC r351407: libc: mips: remove unused longjmp.c

5 years agoMFC r350502:
Konstantin Belousov [Tue, 3 Sep 2019 20:06:36 +0000 (20:06 +0000)]
MFC r350502:
Make umtxq_check_susp() to correctly handle thread exit requests.

5 years agoMFC r349951, r349994, r349995, r350005, r350023 (by jhibbits), r350478:
Konstantin Belousov [Tue, 3 Sep 2019 20:04:44 +0000 (20:04 +0000)]
MFC r349951, r349994, r349995, r350005, r350023 (by jhibbits), r350478:
Provide protection against starvation of the ll/sc loops when accessing
userpace.

5 years agoMFC r350863:
Konstantin Belousov [Tue, 3 Sep 2019 19:56:52 +0000 (19:56 +0000)]
MFC r350863:
compat/linux: Remove obsoleted and somewhat confusing comments related to COMPAT_43.

5 years agoMFC r350862:
Konstantin Belousov [Tue, 3 Sep 2019 19:55:44 +0000 (19:55 +0000)]
MFC r350862:
Only enable COMPAT_43 changes for syscalls ABI for a.out processes.

5 years agoMFC r350204:
Konstantin Belousov [Tue, 3 Sep 2019 19:52:28 +0000 (19:52 +0000)]
MFC r350204:
Switch the rest of the refcount(9) functions to bool return type.

5 years agoMFC r350200:
Konstantin Belousov [Tue, 3 Sep 2019 19:50:38 +0000 (19:50 +0000)]
MFC r350200:
Fix userspace build after r350199.

5 years agoMFC r350199:
Konstantin Belousov [Tue, 3 Sep 2019 19:49:40 +0000 (19:49 +0000)]
MFC r350199:
Check and avoid overflow when incrementing fp->f_count in
fget_unlocked() and fhold().

5 years agoMFC r351458:
Konstantin Belousov [Tue, 3 Sep 2019 19:39:06 +0000 (19:39 +0000)]
MFC r351458:
Add nvdimm(4) man page.

5 years agoMFC r350575:
Konstantin Belousov [Tue, 3 Sep 2019 19:36:46 +0000 (19:36 +0000)]
MFC r350575:
rtld-elf: Remove x86 elf_rtld.x linker scripts.

5 years agoMFC r350504:
Konstantin Belousov [Tue, 3 Sep 2019 19:34:32 +0000 (19:34 +0000)]
MFC r350504:
Try to decrease the number of bugs in unionfs after the VV_TEXT flag removal.

5 years agoMFC r351435:
Konstantin Belousov [Tue, 3 Sep 2019 19:30:02 +0000 (19:30 +0000)]
MFC r351435:
De-commision the MNTK_NOINSMNTQ kernel mount flag.

5 years agoMFC r351114:
Konstantin Belousov [Tue, 3 Sep 2019 19:27:59 +0000 (19:27 +0000)]
MFC r351114:
Fix OOM handling of some corner cases.

5 years agoMFC r350882:
Cy Schubert [Tue, 3 Sep 2019 19:14:00 +0000 (19:14 +0000)]
MFC r350882:

Initialize the frentry (the control block that defines a rule) checksum
to zero. Matching checksums save time and effort by mitigating the need
for full rule compare.

5 years agoMFC r351488
Vincenzo Maffione [Tue, 3 Sep 2019 18:04:45 +0000 (18:04 +0000)]
MFC r351488

netmap: remove obsolete file

The netmap_pt.c module has become obsolete after
the refactoring that added netmap_kloop.c.
Remove it and unlink it from the build system.

5 years agoMFC r351253:
Dimitry Andric [Tue, 3 Sep 2019 17:31:12 +0000 (17:31 +0000)]
MFC r351253:

Pull in r368867 from upstream libc++ trunk (by Marshall Clow):

  Rework recursive_timed_mutex so that it uses __thread_id instead of
  using the lower-level __libcpp_thread_id. This is prep for fixing
  PR42918. Reviewed as https://reviews.llvm.org/D65895

Pull in r368916 from upstream libc++ trunk (by Marshall Clow):

  Fix thread comparison by making sure we never pass our special 'not a
  thread' value to the underlying implementation. Fixes PR#42918.

This should fix std::thread::id::operator==() attempting to call
pthread_equal(3) with zero values.

Reported by: andrew@tao11.riddles.org.uk
PR: 239038, 239550

5 years agoMFC r348628: elf_common: add GNU note types and NT_GNU_PROPERTY_TYPE_0 bits
Ed Maste [Tue, 3 Sep 2019 17:29:01 +0000 (17:29 +0000)]
MFC r348628: elf_common: add GNU note types and NT_GNU_PROPERTY_TYPE_0 bits

To support Intel CET IBT/Shadow Stack.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r350989: Remove some more leftover rlogin man page xrefs
Ed Maste [Tue, 3 Sep 2019 16:57:32 +0000 (16:57 +0000)]
MFC r350989: Remove some more leftover rlogin man page xrefs

rcmds were removed in r32435 and these three man pages can trivially
drop the references.

There's still a reference in pts.4 because it describes a mode
(TIOCPKT_NOSTOP), and only lists rlogin/rlogind as examples of programs
that use that mode.  To update later.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r350983: crunch: remove rsh and rlogin from example config file
Ed Maste [Tue, 3 Sep 2019 16:55:28 +0000 (16:55 +0000)]
MFC r350983: crunch: remove rsh and rlogin from example config file

rcmds removed in r324351.

Historical references in the README are maintained.  There's a paragraph
describing a "980K crunched 'fixit'" that references rsh and rlogin.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r350979: Remove rsh/rlogin references from security man page
Ed Maste [Tue, 3 Sep 2019 16:54:27 +0000 (16:54 +0000)]
MFC r350979: Remove rsh/rlogin references from security man page

More extensive changes to this page are certainly needed, but at least
remove references to binaries that no longer exist.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r350980: Remove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT
Ed Maste [Tue, 3 Sep 2019 16:52:44 +0000 (16:52 +0000)]
MFC r350980: Remove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT

rcmds were removed in r324351

Sponsored by: The FreeBSD Foundation

5 years agoMFC r351134: Add support for 'j', 't' and 'z' flags to kernel sscanf().
Alexander Motin [Tue, 3 Sep 2019 16:38:25 +0000 (16:38 +0000)]
MFC r351134: Add support for 'j', 't' and 'z' flags to kernel sscanf().

5 years agoMFC r351000: sys/{x86,amd64}: remove one of doubled ;s
Ed Maste [Tue, 3 Sep 2019 16:26:35 +0000 (16:26 +0000)]
MFC r351000: sys/{x86,amd64}: remove one of doubled ;s

5 years agoMFC r351395: msdosfs_fat: reduce diffs with NetBSD and makefs
Ed Maste [Tue, 3 Sep 2019 16:25:27 +0000 (16:25 +0000)]
MFC r351395: msdosfs_fat: reduce diffs with NetBSD and makefs

Use pointer arithmetic (as now done in makefs, and in NetBSD) instead of
taking the address of array element.  No functional change, but this
makes it easier to compare different versions of this file.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r351606: Take proper lock in ses_setphyspath_callback().
Alexander Motin [Tue, 3 Sep 2019 16:20:04 +0000 (16:20 +0000)]
MFC r351606: Take proper lock in ses_setphyspath_callback().

XPT_DEV_ADVINFO call should be protected by the lock of the specific
device it is addressed to, not the lock of SES device.  In some weird
case, probably with hardware violating standards, it sometimes caused
NULL dereference due to race.

To protect from it further, add lock assertion to *_dev_advinfo().

5 years agoMFC r350492: vmx: use C99 bool, not boolean_t
Ed Maste [Tue, 3 Sep 2019 16:18:07 +0000 (16:18 +0000)]
MFC r350492: vmx: use C99 bool, not boolean_t

Bhyve's vmm is a self-contained modern component and thus a good
candidate for use of C99 types.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r351425: vtfontcvt: simplify rshift_row
Ed Maste [Tue, 3 Sep 2019 16:15:57 +0000 (16:15 +0000)]
MFC r351425: vtfontcvt: simplify rshift_row

We don't need to specify the buffer size in both bytes and bits.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r351550: Always check cam_periph_error() status for ERESTART.
Alexander Motin [Tue, 3 Sep 2019 14:52:39 +0000 (14:52 +0000)]
MFC r351550: Always check cam_periph_error() status for ERESTART.

Even if we do not expect retries, we better be sure, since otherwise it
may result in use after free kernel panic.  I've noticed that it retries
SCSI_STATUS_BUSY even with SF_NO_RECOVERY | SF_NO_RETRY.

5 years agoMFC r351205: Use calloc().
Xin LI [Tue, 3 Sep 2019 07:02:18 +0000 (07:02 +0000)]
MFC r351205: Use calloc().

5 years agoMFC r351204:
Xin LI [Tue, 3 Sep 2019 06:52:21 +0000 (06:52 +0000)]
MFC r351204:

Remove redundant check and wrong fix: fat.c checks already take care
about cluster chains.

Obtained from: OpenBSD

5 years agoMFC r351542:
Konstantin Belousov [Tue, 3 Sep 2019 06:40:17 +0000 (06:40 +0000)]
MFC r351542:
vn_vget_ino_gen(): relock the lower vnode on error.

5 years agoMFC r351518:
Mark Johnston [Mon, 2 Sep 2019 21:52:18 +0000 (21:52 +0000)]
MFC r351518:
Fix a few nits in vm_pqbatch_process_page().

5 years agoMFC r350957:
Konstantin Belousov [Mon, 2 Sep 2019 08:20:02 +0000 (08:20 +0000)]
MFC r350957:
Increase YPMAXRECORD to 16M to be compatible with Linux.

Sponsored by: Mellanox Technologies

5 years agoMFC r351603: vnic: avoid NULL deref in error case
Ed Maste [Mon, 2 Sep 2019 00:37:59 +0000 (00:37 +0000)]
MFC r351603: vnic: avoid NULL deref in error case

Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation

5 years agoMFC r351621: xdma: avoid NULL deref in error case
Ed Maste [Mon, 2 Sep 2019 00:36:26 +0000 (00:36 +0000)]
MFC r351621: xdma: avoid NULL deref in error case

Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation

5 years agoMFC r351620: qlxgbe: avoid NULL deref in error case
Ed Maste [Mon, 2 Sep 2019 00:31:03 +0000 (00:31 +0000)]
MFC r351620: qlxgbe: avoid NULL deref in error case

Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation

5 years agoMFC r351618, r351619: exynos5: avoid NULL deref in error case
Ed Maste [Mon, 2 Sep 2019 00:29:14 +0000 (00:29 +0000)]
MFC r351618, r351619: exynos5: avoid NULL deref in error case

Reported by: Dr Silvio Cesare of InfoSect
Sponsored by: The FreeBSD Foundation

5 years agoMFC r351587:
Mark Johnston [Sun, 1 Sep 2019 16:57:19 +0000 (16:57 +0000)]
MFC r351587:
Install all bzip2.1 MLINKs from the same place.

5 years agoMFC r351453:
Konstantin Belousov [Sat, 31 Aug 2019 08:40:41 +0000 (08:40 +0000)]
MFC r351453:
Make stack grow use the same gap as stack create.

5 years agoMFC r351563:
Cy Schubert [Sat, 31 Aug 2019 04:28:22 +0000 (04:28 +0000)]
MFC r351563:

Document ipf_nat_hashtab_add() return codes.

5 years agoMFC r351562:
Cy Schubert [Sat, 31 Aug 2019 04:26:59 +0000 (04:26 +0000)]
MFC r351562:

Destroy the mutex in case of error.

Obtained from: NetBSD ip_nat.c r1.7

5 years agoMFC r351561:
Cy Schubert [Sat, 31 Aug 2019 04:25:35 +0000 (04:25 +0000)]
MFC r351561:

Fixup typo in comment.

Obtained from: NetBSD ip_nat.c r1.7

5 years agoMFC r350103:
Cy Schubert [Sat, 31 Aug 2019 04:23:25 +0000 (04:23 +0000)]
MFC r350103:

MFV r350080:

Update sqlite3-3.28.0 (3280000) --> sqlite3-3.29.0 (3290000)

5 years agoBump __FreeBSD_version number for changes made in r351276
Eric Joyner [Fri, 30 Aug 2019 17:36:45 +0000 (17:36 +0000)]
Bump __FreeBSD_version number for changes made in r351276

Sponsored by: Intel Corporation

5 years agoMFC r351397:
Cy Schubert [Thu, 29 Aug 2019 19:13:27 +0000 (19:13 +0000)]
MFC r351397:

MFV r346563:

Update wpa 2.8 --> 2.9

hostapd:
* SAE changes
  - disable use of groups using Brainpool curves
  - improved protection against side channel attacks
  [https://w1.fi/security/2019-6/]
* EAP-pwd changes
  - disable use of groups using Brainpool curves
  - improved protection against side channel attacks
  [https://w1.fi/security/2019-6/]
* fixed FT-EAP initial mobility domain association using PMKSA caching
* added configuration of airtime policy
* fixed FILS to and RSNE into (Re)Association Response frames
* fixed DPP bootstrapping URI parser of channel list
* added support for regulatory WMM limitation (for ETSI)
* added support for MACsec Key Agreement using IEEE 802.1X/PSK
* added experimental support for EAP-TEAP server (RFC 7170)
* added experimental support for EAP-TLS server with TLS v1.3
* added support for two server certificates/keys (RSA/ECC)
* added AKMSuiteSelector into "STA <addr>" control interface data to
  determine with AKM was used for an association
* added eap_sim_id parameter to allow EAP-SIM/AKA server pseudonym and
  fast reauthentication use to be disabled
* fixed an ECDH operation corner case with OpenSSL

wpa_supplicant:
* SAE changes
  - disable use of groups using Brainpool curves
  - improved protection against side channel attacks
  [https://w1.fi/security/2019-6/]
* EAP-pwd changes
  - disable use of groups using Brainpool curves
  - allow the set of groups to be configured (eap_pwd_groups)
  - improved protection against side channel attacks
  [https://w1.fi/security/2019-6/]
* fixed FT-EAP initial mobility domain association using PMKSA caching
  (disabled by default for backwards compatibility; can be enabled
  with ft_eap_pmksa_caching=1)
* fixed a regression in OpenSSL 1.1+ engine loading
* added validation of RSNE in (Re)Association Response frames
* fixed DPP bootstrapping URI parser of channel list
* extended EAP-SIM/AKA fast re-authentication to allow use with FILS
* extended ca_cert_blob to support PEM format
* improved robustness of P2P Action frame scheduling
* added support for EAP-SIM/AKA using anonymous@realm identity
* fixed Hotspot 2.0 credential selection based on roaming consortium
  to ignore credentials without a specific EAP method
* added experimental support for EAP-TEAP peer (RFC 7170)
* added experimental support for EAP-TLS peer with TLS v1.3
* fixed a regression in WMM parameter configuration for a TDLS peer
* fixed a regression in operation with drivers that offload 802.1X
  4-way handshake
* fixed an ECDH operation corner case with OpenSSL

Security:       https://w1.fi/security/2019-6/\
                sae-eap-pwd-side-channel-attack-update.txt

5 years agoMFC r351331:
Mark Johnston [Wed, 28 Aug 2019 16:16:35 +0000 (16:16 +0000)]
MFC r351331:
Don't requeue active pages in vm_swapout_object_deactivate_pages().

5 years agoMFC r351333:
Mark Johnston [Wed, 28 Aug 2019 16:16:14 +0000 (16:16 +0000)]
MFC r351333:
Simplify vm_page_dequeue() and fix an assertion.

5 years agoMFC r351389:
Brooks Davis [Wed, 28 Aug 2019 08:09:10 +0000 (08:09 +0000)]
MFC r351389:

Reorganise conditionals to reduce duplication.

No functional change.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

5 years agoMFC r348446:
Brooks Davis [Wed, 28 Aug 2019 08:05:16 +0000 (08:05 +0000)]
MFC r348446:

makesyscalls.sh: always use absolute path for syscalls.conf

syscalls.conf is included using "." which per the Open Group:

 If file does not contain a <slash>, the shell shall use the search
 path specified by PATH to find the directory containing file.

POSIX shells don't fall back to the current working directory.

Submitted by: Nathaniel Wesley Filardo <nwf20@cl.cam.ac.uk>
Reviewed by: bdrewery
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D20476

5 years agoMFC r340424:
Brooks Davis [Wed, 28 Aug 2019 07:53:10 +0000 (07:53 +0000)]
MFC r340424:

Use the main capabilities.conf for freebsd32.

Allow the location of capabilities.conf to be configured.

Also allow a per-abi syscall prefix to be configured with the
abi_func_prefix syscalls.conf variable and check syscalls against
entries in capabilities.conf with and without the prefix amended.

Take advantage of these two features to allow use shared
capabilities.conf
between the default syscall vector and the freebsd32 compatability
layer.  We've been inconsistent about keeping the two in sync as
evidenced by the bugs fixed in r340294.  This eliminates that problem
going forward.

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17932

5 years agoRegenerate to add @generated tag in generated files.
Brooks Davis [Wed, 28 Aug 2019 07:43:31 +0000 (07:43 +0000)]
Regenerate to add @generated tag in generated files.

This is a manual merge of r347230.

5 years agoMFC r339624:
Brooks Davis [Wed, 28 Aug 2019 07:37:34 +0000 (07:37 +0000)]
MFC r339624:

Remove the need for backslashes in syscalls.master.

Join non-special lines together until we hit a line containing a '}'
character. This allows the function declaration body to be split
across multiple lines without backslash continuation characters.

Continue to join lines ending with backslashes to allow gradual
migration and to support out-of-tree syscall vectors

Reviewed by: emaste, kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17488

5 years agoMFC r350433: Fix sound on headset jack for ALC255 and ALC256 codec.
Marcelo Araujo [Tue, 27 Aug 2019 07:17:31 +0000 (07:17 +0000)]
MFC r350433: Fix sound on headset jack for ALC255 and ALC256 codec.

PR: 219350 [1], [2]
Submitted by: Masachika ISHIZUKA (ish_at_amail.plala.or.jp) [1]
Neel Chauhan (neel_at_neelc.org) [2]
Yuri Momotyuk (yurkis_at_gmail.com) [3]
Reported by: miwi
Reviewed by: mav
Obtained from: https://github.com/trueos/trueos/pull/279 [3]
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19017

5 years agoMFC r351105, r351107: Limit memory window usage in ntb_transport to 256MB.
Alexander Motin [Tue, 27 Aug 2019 04:16:42 +0000 (04:16 +0000)]
MFC r351105, r351107: Limit memory window usage in ntb_transport to 256MB.

This adds safety net for the case of misconfigured NTB with too big
memory window, for which we may be unable to allocate a memory buffer,
which does not make much sense for the network interface.  While there,
fix the code to really work with asymmetric window sizes setup.

This makes driver just print warning message on boot instead of hanging
if too large memory window is configured.

5 years agoMFC r351072: Implement new methods for Intel and PLX NTB.
Alexander Motin [Tue, 27 Aug 2019 04:15:21 +0000 (04:15 +0000)]
MFC r351072: Implement new methods for Intel and PLX NTB.

This restores parity with AMD NTB driver.  Though without any drivers
supporting more then one peer and respective KPI modification to pass
peer index to most of the calls this addition is pretty useless now.

5 years agoMFC r351056, r351083: Add support for PCI Device ID 0x148B in ntb_hw_amd driver.
Alexander Motin [Tue, 27 Aug 2019 04:14:38 +0000 (04:14 +0000)]
MFC r351056, r351083: Add support for PCI Device ID 0x148B in ntb_hw_amd driver.

Submitted by: Rajesh Kumar <rajesh1.kumar@amd.com>

5 years agoMFC r349594, r349595, r349601: Add driver for NTB in AMD SoC.
Alexander Motin [Tue, 27 Aug 2019 04:13:22 +0000 (04:13 +0000)]
MFC r349594, r349595, r349601: Add driver for NTB in AMD SoC.

This patch is the driver for NTB hardware in AMD SoCs (ported from Linux)
and enables the NTB infrastructure like Doorbells, Scratchpads and Memory
window in AMD SoC. This driver has been validated using ntb_transport and
if_ntb driver already available in FreeBSD.

Submitted by: Rajesh Kumar <rajesh1.kumar@amd.com>
Relnotes: yes

5 years agoMFC r351352: Improve NVMe hot unplug handling.
Alexander Motin [Tue, 27 Aug 2019 04:04:19 +0000 (04:04 +0000)]
MFC r351352: Improve NVMe hot unplug handling.

If device is unplugged from the system (CSTS register reads return
0xffffffff), it makes no sense to send any more recovery requests or
expect any responses back.  If there is a detach call in such state,
just stop all activity and free resources.  If there is no detach
call (hot-plug is not supported), rely on normal timeout handling,
but when it trigger controller reset, do not wait for impossible and
quickly report failure.

Sponsored by: iXsystems, Inc.

5 years agoMFC r351320: Formalize NVMe controller consumer life cycle.
Alexander Motin [Tue, 27 Aug 2019 04:03:42 +0000 (04:03 +0000)]
MFC r351320: Formalize NVMe controller consumer life cycle.

This fixes possible double call of fail_fn, for example on hot removal.
It also allows ctrlr_fn to safely return NULL cookie in case of failure
and not get useless ns_fn or fail_fn call with NULL cookie later.

5 years agoMFC r351038: Print few more useful identify fields.
Alexander Motin [Tue, 27 Aug 2019 04:02:25 +0000 (04:02 +0000)]
MFC r351038: Print few more useful identify fields.

5 years agoMFC r351028: Report NOIOB and NPWG fields as stripe size.
Alexander Motin [Tue, 27 Aug 2019 04:01:56 +0000 (04:01 +0000)]
MFC r351028: Report NOIOB and NPWG fields as stripe size.

Namespace Optimal I/O Boundary field added in NVMe 1.3 and Namespace
Preferred Write Granularity added in 1.4 allow upper layers to align
I/Os for improved SSD performance and endurance.

I don't have hardware reportig those yet, but NPWG could probably be
reported by bhyve.

Sponsored by: iXsystems, Inc.

5 years agoMFC r351004, r351006: Make nvd(4) report NGUID or EUI64 as GEOM::lunid.
Alexander Motin [Tue, 27 Aug 2019 04:01:09 +0000 (04:01 +0000)]
MFC r351004, r351006: Make nvd(4) report NGUID or EUI64 as GEOM::lunid.

With support for multiple namespaces and multiple ports in NVMe there is
now a need for reliable unique namespace identification alike to SCSI.

Sponsored by: iXsystems, Inc.

5 years agoMFC r350676, r350677: Make `camcontrol modepage` support block descriptors.
Alexander Motin [Tue, 27 Aug 2019 03:55:38 +0000 (03:55 +0000)]
MFC r350676, r350677: Make `camcontrol modepage` support block descriptors.

It allows to read and write block descriptors alike to mode page parameters.
It allows to change block size or short-stroke HDDs or overprovision SSDs.
Depenting on -P parameter the change can be either persistent or till reset.
In case of block size change device may need reformat after the setting.
In case of SSD overprovisioning format or sanitize may be needed to really
free the flash.

During implementation appeared that csio_encode_visit() can not handle
integers of more then 4 bytes, that makes 8-byte LBA handling awkward.
I had to split it into two 4-byte halves now.

Relnotes: yes
Sponsored by: iXsystems, Inc.

5 years agoMFC r350457: Make `camcontrol modepage` to use 10 byte commands.
Alexander Motin [Tue, 27 Aug 2019 03:54:29 +0000 (03:54 +0000)]
MFC r350457: Make `camcontrol modepage` to use 10 byte commands.

While old devices may not support 10 byte MODE SENSE/MODE SELECT commands,
new ones may not be able to report all mode pages with 6 byte commands.

This patch makes camcontrol by default start with 10 byte commands and
fall back to 6 byte on ILLEGAL REQUEST error, or 6 byte can be forced.

5 years agoMFC r350424: Use present now scsi_mode_sense_subpage().
Alexander Motin [Tue, 27 Aug 2019 03:53:22 +0000 (03:53 +0000)]
MFC r350424: Use present now scsi_mode_sense_subpage().

5 years agoMFC r350393: Decode some more IDENTIFY DEVICE bits.
Alexander Motin [Tue, 27 Aug 2019 03:52:22 +0000 (03:52 +0000)]
MFC r350393: Decode some more IDENTIFY DEVICE bits.

5 years agoMFC r351348 (by markj):
Alexander Motin [Tue, 27 Aug 2019 03:05:57 +0000 (03:05 +0000)]
MFC r351348 (by markj):
Modify pipe_poll() to properly check for pending direct writes.

With r349546, it is a responsibility of the writer to clear PIPE_DIRECTW
after pinned data has been read.  In particular, once a reader has
drained this data, there is a small window where the pipe is empty but
PIPE_DIRECTW is set.  pipe_poll() was using the presence of PIPE_DIRECTW
to determine whether to return POLLIN, so in this window it would
claim that data was available to read when this was not the case.

Fix this by modifying several checks for PIPE_DIRECTW to instead look
at the number of residual bytes in data pinned by a direct writer.  In
some cases we really do want to check for PIPE_DIRECTW, since the
presence of this flag indicates that any attempt to write to the pipe
will block on the existing direct writer.

5 years agoMFC 349474: Reject attempts to register a TCP stack being unloaded.
John Baldwin [Tue, 27 Aug 2019 00:29:30 +0000 (00:29 +0000)]
MFC 349474: Reject attempts to register a TCP stack being unloaded.

5 years agoMFC r351221
Vincenzo Maffione [Mon, 26 Aug 2019 18:57:29 +0000 (18:57 +0000)]
MFC r351221

link ptnet(4) man page to the build system

Reported by:    kevans
Reviewed by:    kevans, bcr
Differential Revision:  https://reviews.freebsd.org/D21312

5 years agoMFC r351119, r351135-r351136, r351412: stand xtoolchain-llvm90 fixes
Kyle Evans [Mon, 26 Aug 2019 17:34:07 +0000 (17:34 +0000)]
MFC r351119, r351135-r351136, r351412: stand xtoolchain-llvm90 fixes

r351119:
stand: push LIBC_SRC up into defs.mk

Other parts of stand/ that don't use libsa will need to grab bits from libc
shortly. Push LIBC_SRC up to defs.mk in advance of this so that they can use
it, and rename it to LIBCSRC to match the convention of the rest of the *SRC
variables in this file.

r351135:
stand: boot2: fix build with xtoolchain-llvm90

ufsread.c grows a dependency on __ashldi3 with llvm90. Grab ashldi3.c out of
compiler-rt rather than trying to link against libsa (for now).
-Wno-missing-prototypes is necessary to compile ashldi3.c standalone.

r351136:
stand: gptboot: fix build with xtoolchain-llvm90

ufsread.c grows a dependency on __ashldi3 with llvm90. For gptboot, just
start pulling in ashldi3.c ashrdi3.c lshrdi3.c into libsa for all archs as
the number of archs requiring one or more of them keeps growing. qdivrem.c
and quad.h can be trivially kicked out of libsa if we start pulling these
from compiler-rt as qdivrem was only used to implement umoddi3, divdi3,
moddi3 (also in qdivrem.c).

r351412:
stand: boot2: fix amd64-xtoolchain-gcc build

-Wno-missing-declarations is the GCC equivalent of
-Wno-missing-prototypes... this was overlooked in r351135.

5 years agoMFC r351359:
Mark Johnston [Mon, 26 Aug 2019 15:21:29 +0000 (15:21 +0000)]
MFC r351359:
Fix inverted predicates for sx lock hold events in lockstat(1).

5 years agoMFC r351214:
Andrey V. Elsukov [Mon, 26 Aug 2019 09:29:14 +0000 (09:29 +0000)]
MFC r351214:
  Use TAILQ_FOREACH_SAFE() macro to avoid use after free in soclose().

  PR: 239893

5 years agoMFC r351211:
Konstantin Belousov [Mon, 26 Aug 2019 08:07:10 +0000 (08:07 +0000)]
MFC r351211:
sys.kern.pdeathsig.signal_delivered_ptrace: fix startup.

PR: 237657

5 years agoMFC r351210:
Konstantin Belousov [Mon, 26 Aug 2019 08:06:18 +0000 (08:06 +0000)]
MFC r351210:
sys.kern.pdeathsig.signal_delivered_ptrace: fix debugger detach

PR: 237657

5 years agoMFC r350881:
Cy Schubert [Sun, 25 Aug 2019 13:36:20 +0000 (13:36 +0000)]
MFC r350881:

Calculate the number interface array elements using the new FR_NUM macro
instead of the hard-coded value of 4. This is a precursor to increasing
the number of interfaces speficied in "on {interface, ..., interface}".
Note that though this feature is coded in ipf_y.y, it is partially
supported in the ipfilter kld, meaning it does not work yet (and is yet
to be documented in ipf.5 too).

5 years agoMFC r351195:
Konstantin Belousov [Sun, 25 Aug 2019 06:22:13 +0000 (06:22 +0000)]
MFC r351195:
Fix an issue with executing tmpfs binary.