]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMFS r366395: Fix Typo in ng_hci_le_connection_complete_ep struct.
Kyle Evans [Sun, 4 Oct 2020 01:39:29 +0000 (01:39 +0000)]
MFS r366395: Fix Typo in ng_hci_le_connection_complete_ep struct.

Approved by: re (gjb)

3 years agoRename releng/12.2 to RC1 as part of the 12.2-RELEASE cycle.
Glen Barber [Fri, 2 Oct 2020 01:08:11 +0000 (01:08 +0000)]
Rename releng/12.2 to RC1 as part of the 12.2-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: Rubicon Communications, LLC (netgate.com)

3 years agoMFS r366305: MFC r366064, r366065, r366215
Xin LI [Thu, 1 Oct 2020 18:58:06 +0000 (18:58 +0000)]
MFS r366305: MFC r366064, r366065, r366215

sbin/fsck_msdosfs: Fix an integer overflow on 32-bit platforms

Approved by: re (gjb)

3 years agoMFS r366324:
Michael Tuexen [Thu, 1 Oct 2020 18:17:56 +0000 (18:17 +0000)]
MFS r366324:
Improve the handling of receiving unordered and unreliable user
messages using DATA chunks. Don't use fsn_included when not being
sure that it is set to an appropriate value. If the default is
used, which is -1, this can result in SCTP associaitons not
making any user visible progress.

Thanks to Yutaka Takeda for reporting this issue for the the
userland stack in https://github.com/pion/sctp/issues/138.

MFS r366329:
Improve the input validation and processing of cookies.
This avoids setting the association in an inconsistent
state, which could result in a use-after-free situation.
This can be triggered by a malicious peer, if the peer
can modify the cookie without the local endpoint recognizing
it.
Thanks to Ned Williamson for reporting the issue.

Approved by: re (gjb)

3 years agoMFS 366297: Revert most of r360179.
John Baldwin [Thu, 1 Oct 2020 17:30:38 +0000 (17:30 +0000)]
MFS 366297: Revert most of r360179.

I had failed to notice that sgsendccb() was using cam_periph_mapmem()
and thus was not passing down user pointers directly to drivers.  In
practice this broke requests submitted from userland.

PR: 249395
Approved by: re (gjb)

3 years agoMFS r365996:
Mitchell Horne [Wed, 30 Sep 2020 22:41:24 +0000 (22:41 +0000)]
MFS r365996:
MFC r365304:
arm64: update the set of HWCAP definitions

MFC r365459:
arm64: fix incorrect HWCAP definitions

Approved by: re (gjb)

3 years agoMFC r357530/MFS r357530:
Konstantin Belousov [Wed, 30 Sep 2020 16:11:37 +0000 (16:11 +0000)]
MFC r357530/MFS r357530:
Remove unneeded assert for curproc.  Simplify.

Approved by: re (gjb)

3 years agoMF stable/12 r366258:
Niclas Zeising [Tue, 29 Sep 2020 17:22:14 +0000 (17:22 +0000)]
MF stable/12 r366258:

bsdconfig, bsdinstall: Prune dead mirrors

Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall.
All these return NXDOMAIN when trying to resolve them.

Approved by: re (gjb), emaste

3 years agoMFS: r366238
Rick Macklem [Tue, 29 Sep 2020 15:09:38 +0000 (15:09 +0000)]
MFS: r366238
Bjorn reported a problem where the Linux NFSv4.1 client is
using an open_to_lock_owner4 when that lock_owner4 has already
been created by a previous open_to_lock_owner4. This caused the NFS server
to reply NFSERR_INVAL.

For NFSv4.0, this is an error, although the updated NFSv4.0 RFC7530 notes
that the correct error reply is NFSERR_BADSEQID (RFC3530 did not specify
what error to return).

For NFSv4.1, it is not obvious whether or not this is allowed by RFC5661,
but the NFSv4.1 server can handle this case without error.
This patch changes the NFSv4.1 (and NFSv4.2) server to handle multiple
uses of the same lock_owner in open_to_lock_owner so that it now correctly
interoperates with the Linux NFS client.
It also changes the error returned for NFSv4.0 to be NFSERR_BADSEQID.

Thanks go to Bjorn for diagnosing this and testing the patch.
He also provided a program that I could use to reproduce the problem.

PR: 249567
Approved by: re (gjb)

3 years agoMFS r366028: Spawn the DHCPv6 client in EC2 instances via rtsold.
Colin Percival [Mon, 28 Sep 2020 17:32:18 +0000 (17:32 +0000)]
MFS r366028: Spawn the DHCPv6 client in EC2 instances via rtsold.

Approved by: re (gjb)
Sponsored by: https://www.patreon.com/cperciva

3 years agoMF12 r366218:
Stefan Eßer [Mon, 28 Sep 2020 14:47:36 +0000 (14:47 +0000)]
MF12 r366218:

Add documentation of the build options WITH_GH_BC and WITHOUT_GH_BC to
optionally replace the traditional implementation of bc(1) and dc(1) with
the new implementation that has become the default version in -CURRENT.

The man-page differs from the one in -CURRENT due to different default
values of that build option.

Approved by:  re (gjb)

3 years agoMFS r366220:
Mark Johnston [Mon, 28 Sep 2020 12:14:38 +0000 (12:14 +0000)]
MFS r366220:
MFC r366167:
ng_l2tp: Fix callout synchronization in the rexmit timeout handler

PR: 241133
Approved by: re (gjb)

3 years agoMFS r366178: Move finalize_components_config from get_params to cmd_*.
Colin Percival [Mon, 28 Sep 2020 00:54:50 +0000 (00:54 +0000)]
MFS r366178: Move finalize_components_config from get_params to cmd_*.

This eliminates spurious emails from `freebsd-update cron` when the src
component is listed in freebsd-update.conf but is not present.

Approved by: re (delphij)
Sponsored by: https://www.patreon.com/cperciva

3 years agoMFS r366179: Make nvmecontrol work with nda like it does with nvd, and
Colin Percival [Mon, 28 Sep 2020 00:53:45 +0000 (00:53 +0000)]
MFS r366179: Make nvmecontrol work with nda like it does with nvd, and
associated bits.

Approved by: re (delphij)
Sponsored by: https://www.patreon.com/cperciva

3 years agoMFS r366009: Include ebsnvme-id in arm64 AMIs.
Colin Percival [Mon, 28 Sep 2020 00:52:16 +0000 (00:52 +0000)]
MFS r366009: Include ebsnvme-id in arm64 AMIs.

Approved by: re (delphij)
Sponsored by: https://www.patreon.com/cperciva

3 years agoMF stable/12 r366190:
Alan Somers [Mon, 28 Sep 2020 00:23:59 +0000 (00:23 +0000)]
MF stable/12 r366190:

fusefs: fix mmap'd writes in direct_io mode

If a FUSE server returns FOPEN_DIRECT_IO in response to FUSE_OPEN, that
instructs the kernel to bypass the page cache for that file. This feature
is also known by libfuse's name: "direct_io".

However, when accessing a file via mmap, there is no possible way to bypass
the cache completely. This change fixes a deadlock that would happen when
an mmap'd write tried to invalidate a portion of the cache, wrongly assuming
that a write couldn't possibly come from cache if direct_io were set.

Arguably, we could instead disable mmap for files with FOPEN_DIRECT_IO set.
But allowing it is less likely to cause user complaints, and is more in
keeping with the spirit of open(2), where O_DIRECT instructs the kernel to
"reduce", not "eliminate" cache effects.

PR: 247276
Approved by: re (gjb)
Reported by: trapexit@spawn.link
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D26485

3 years agoMFS of 366163 from stable/12 which is MFC of 365992 from head.
Kirk McKusick [Sat, 26 Sep 2020 21:45:33 +0000 (21:45 +0000)]
MFS of 366163 from stable/12 which is MFC of 365992 from head.

Update check-hash when doing large UFS filesystem expansions.

Approved by:  re@ (Glen Barber)
Sponsored by: Netflix

3 years agoMFS: r366176
Jung-uk Kim [Fri, 25 Sep 2020 22:43:14 +0000 (22:43 +0000)]
MFS: r366176

Merge OpenSSL 1.1.1h.

Approved by: re (gjb)

3 years agoMFS r366154:
Mark Johnston [Fri, 25 Sep 2020 16:34:42 +0000 (16:34 +0000)]
MFS r366154:
MFC r366005:
udf: Validate the full file entry length

PR: 248613
Approved by: re (gjb)

3 years agoUpdate releng/12.2 to BETA3 as part of the 12.2-RELEASE cycle.
Glen Barber [Fri, 25 Sep 2020 00:36:59 +0000 (00:36 +0000)]
Update releng/12.2 to BETA3 as part of the 12.2-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: Rubicon Communications, LLC (netgate.com)

3 years agoMFS r365987: certctl rehash upon install/distribute
Kyle Evans [Thu, 24 Sep 2020 18:36:31 +0000 (18:36 +0000)]
MFS r365987: certctl rehash upon install/distribute

r365829:
installworld: run `certctl rehash` after installation completes

This was originally introduced back in r360833, and subsequently reverted
because it was broken for -DNO_ROOT builds and it may not have been the
correct place for it.

While debatably this may still not be 'the correct place,' it's much cleaner
than scattering rehashes all throughout the tree. brooks has fixed the issue
with -DNO_ROOT by properly writing to the METALOG in r361397.

Do note that this is different than what was originally committed; brooks
had revisions in D24932 that made it actually use the revised unprivileged
mode and write to METALOG, along with being a little more friendly to
foreign crossbuilds and just using the certctl in-tree.

With this change, I believe we should now have a populated /etc/ssl/certs in
the VM images.

r365837:
Promote the installworld `certctl rehash` to distributeworld

Contrary to my belief, installworld is not sufficient for getting certs
installed into VM images. Promote the rehash to both installworld and
distributeworld (notably: not stageworld) and rehash the base distdir so we
end up with /etc/ssl/certs populated in the base dist archive. A future
commit will remove the rehash from bsdinstall, which doesn't really need to
happen if they're installed into base.txz.

While here, fix a minor typo: s/CERTCLTFLAGS/CERTCTLFLAGS/

r365852:
Revert r361257: bsdinstall: do a `certctl rehash` upon installation [...]

As of r365829, any given base distribution set will now include the /etc/ssl
symlinks that this rehash would've otherwise installed. This extra step is
no longer required.

Approved by: re (gjb)

3 years agoMFS: r366050, r366117
Rick Macklem [Thu, 24 Sep 2020 16:21:30 +0000 (16:21 +0000)]
MFS: r366050, r366117
Fix a LOR between the NFS server and server side krpc.

Recent testing of the NFS-over-TLS code found a LOR between the mutex lock
used for sessions and the sleep lock used for server side krpc socket
structures.
The code in nfsrv_checksequence() and nfsrv_bindconnsess() would call
SVC_RELEASE() with mutex(es) held.  Normally this is ok, since
all that happens is SVC_RELEASE() decrements the reference count.
However, if the socket has just been shut
down, SVC_RELEASE() drops the reference count to 0 and acquires a sleep
lock during destruction of the server side krpc structure.

This patch fixes the problem by moving the SVC_RELEASE() call in
nfsrv_checksequence() and nfsrv_bindconnsess() down a few lines to
below where the mutex(es) are released.

Approved by: re (gjb)

3 years agoMFS: r365703
Rick Macklem [Thu, 24 Sep 2020 14:59:10 +0000 (14:59 +0000)]
MFS: r365703
Fix a case where the NFSv4.0 server might crash if delegations are enabled.

asomers@ reported a crash on an NFSv4.0 server with a backtrace of:
kdb_backtrace
vpanic
panic
nfsrv_docallback
nfsrv_checkgetattr
nfsrvd_getattr
nfsrvd_dorpc
nfssvc_program
svc_run_internal
svc_thread_start
fork_exit
fork_trampoline
where the panic message was "docallb", which indicates that a callback
was attempted when the ClientID is unconfirmed.
This would not normally occur, but it is possible to have an unconfirmed
ClientID structure with delegation structure(s) chained off it if the
client were to issue a SetClientID with the same "id" but different
"verifier" after acquiring delegations on the previously confirmed ClientID.

The bug appears to be that nfsrv_checkgetattr() failed to check for
this uncommon case of an unconfirmed ClientID with a delegation structure
that no longer refers to a delegation the client knows about.

This patch adds a check for this case, handling it as if no delegation
exists, which is the case when the above occurs.
Although difficult to reproduce, this change should avoid the panic().

PR: 249127
Approved by: re (gjb)

3 years agoMFS r365983
Eric Joyner [Wed, 23 Sep 2020 23:56:49 +0000 (23:56 +0000)]
MFS r365983

Contains fixes for issues in em(4)/igb(4):
- Fix define and includes with RSS option enabled
- Properly retain promisc flag in init

PR: 249191, 248869
Approved by: re (gjb@)

3 years agoMFS r365986: caroot: update base store
Kyle Evans [Wed, 23 Sep 2020 17:42:19 +0000 (17:42 +0000)]
MFS r365986: caroot: update base store

Count:
- Two (2) removed
- Three (3) added

Approved by: re (gjb)

3 years agoMFS r365979:
Mark Johnston [Tue, 22 Sep 2020 01:35:55 +0000 (01:35 +0000)]
MFS r365979:
Mark sysctls added in r365689 as MPSAFE.

Approved by: re (gjb)

3 years agoMFS r365937, which merged r365861 and r365872 from head to stable/12.
Navdeep Parhar [Mon, 21 Sep 2020 18:19:48 +0000 (18:19 +0000)]
MFS r365937, which merged r365861 and r365872 from head to stable/12.

r365861:
cxgbe(4): Update T4/5/6 firmwares to 1.25.0.0.

r365872:
cxgbe(4): add the firmware binaries instead of the empty files that were added
in r365861.

Approved by: re@ (gjb@)

3 years agoMFS r365667,r365920: extend kern.geom.part.check_integrity to work on GPT
Eugene Grosbein [Mon, 21 Sep 2020 12:37:41 +0000 (12:37 +0000)]
MFS r365667,r365920: extend kern.geom.part.check_integrity to work on GPT

There are multiple USB/SATA bridges on the market that unconditionally
cut some LBAs off connected media. This could be a problem
for pre-partitioned drives so GEOM complains and does not create
devices in /dev for slices/partitions preventing access to existing data.

We have a knob kern.geom.part.check_integrity that allows us to correct
partitioning if changed from default 1 to 0 but it works for MBR only.
If backup copy of GPT is unavailable due to decreased number of LBAs,
the kernel does not give access to partitions still and prints to dmesg:

GEOM: md0: corrupt or invalid GPT detected.
GEOM: md0: GPT rejected -- may not be recoverable.

This change makes it work for GPT too, so it created partitions in /dev
and prints to dmesg this instead:

GEOM: md0: the secondary GPT table is corrupt or invalid.
GEOM: md0: using the primary only -- recovery suggested.

Then "gpart recover" re-creates backup copy of GPT
and allows further manipulations with partitions.

This change is no-op for default configuration having
kern.geom.part.check_integrity=1

Reported by: Alex Korchmar
Approved by: re (gjb)

3 years agoMFS r365928:
Mark Johnston [Mon, 21 Sep 2020 00:31:06 +0000 (00:31 +0000)]
MFS r365928:
MFC r365841:
Increase the default vm.max_user_wired value.

Approved by: re (gjb)

3 years agoMFS r365689,r365808,r365860
Allan Jude [Sat, 19 Sep 2020 20:46:56 +0000 (20:46 +0000)]
MFS r365689,r365808,r365860

MFOpenZFS: Introduce read/write kstats per dataset

The following patch introduces a few statistics on reads and writes
grouped by dataset. These statistics are implemented as kstats
(backed by aggregate sums for performance) and can be retrieved by
using the dataset objset ID number. The motivation for this change is
to provide some preliminary analytics on dataset usage/performance.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
openzfs/zfs@a448a2557ec4938ed6944c7766fe0b8e6e5f6456

Also contains parts of:
MFOpenZFS: Connect dataset_kstats for FreeBSD

Example output:
kstat.zfs.mypool.dataset.objset-0x10b.nread: 150528
kstat.zfs.mypool.dataset.objset-0x10b.reads: 48
kstat.zfs.mypool.dataset.objset-0x10b.nwritten: 134217728
kstat.zfs.mypool.dataset.objset-0x10b.writes: 1024
kstat.zfs.mypool.dataset.objset-0x10b.dataset_name: mypool/datasetname

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed by: Sean Eric Fagan <sef@ixsystems.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
openzfs/zfs@4547fc4e071ceb1818b3a46c3035b923e06e5390

Approved by: re (gjb)
Relnotes: yes
Sponsored by: Klara Inc.

3 years agoMFS r365891: certctl: fix unprivileged mode
Kyle Evans [Sat, 19 Sep 2020 02:12:04 +0000 (02:12 +0000)]
MFS r365891: certctl: fix unprivileged mode

The first issue was lack of quoting around INSTALLFLAGS, which set it
incorrectly and produced an error on -M.

The second issue was that we weren't actually doing the install in
unprivileged mode, making it effectively useless. This was designed to pass
through the proper metalog/unpriv flags to install(1), so just let it
happen.

Approved by: re (gjb)

3 years agoRename releng/12.2 to BETA2 as part of the 12.2-RELEASE cycle.
Glen Barber [Fri, 18 Sep 2020 00:02:58 +0000 (00:02 +0000)]
Rename releng/12.2 to BETA2 as part of the 12.2-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: Rubicon Communications, LLC (netgate.com)

3 years agoMFS12 r365838:
Glen Barber [Thu, 17 Sep 2020 16:31:19 +0000 (16:31 +0000)]
MFS12 r365838:
 MFC r365646, r365720:
 r365646:
  Enclose BRANCH_OVERRIDE in quotes in order to fix an issue with
  freebsd-update(8) builds, where BRANCH is suffixed with -p0 for
  builds.

 r365720 (gordon):
  Partially revert r346018 and use the if/then construct instead of
  shell.

Approved by: re (kib)
Sponsored by: Rubicon Communications, LLC (netgate.com)

3 years agoAdd UPDATING entries and bump version.
Gordon Tetlow [Tue, 15 Sep 2020 21:48:24 +0000 (21:48 +0000)]
Add UPDATING entries and bump version.

Approved by: so
Approved by: re (implicit for releng/12.2)

3 years agoFix ftpd privilege escalation via ftpchroot.
Gordon Tetlow [Tue, 15 Sep 2020 21:47:44 +0000 (21:47 +0000)]
Fix ftpd privilege escalation via ftpchroot.

Approved by: so
Approved by: re (implicit for releng/12.2)
Security: FreeBSD-SA-20:30.ftpd
Security: CVE-2020-7468

3 years agoFix bhyve SVM guest escape.
Gordon Tetlow [Tue, 15 Sep 2020 21:46:39 +0000 (21:46 +0000)]
Fix bhyve SVM guest escape.

This actually has a patch to sys/amd64/vmm/amd/svm.c that was accidentally
committed as part of r365779.

Approved by: so
Approved by: re (implicit for releng/12.2)
Security: FreeBSD-SA-20:29.bhyve_svm
Security: CVE-2020-7467

3 years agoFix bhyve privilege escalation via VMCS access.
Gordon Tetlow [Tue, 15 Sep 2020 21:43:41 +0000 (21:43 +0000)]
Fix bhyve privilege escalation via VMCS access.

Approved by: so
Approved by: re (implicit for releng/12.2)
Security: FreeBSD-SA-20:28.bhyve_vmcs
Security: CVE-2020-24718

3 years agoFix ure device driver susceptible to packet-in-packet attack.
Gordon Tetlow [Tue, 15 Sep 2020 21:42:05 +0000 (21:42 +0000)]
Fix ure device driver susceptible to packet-in-packet attack.

Approved by: so
Approved by: re (implicit for releng/12.2)
Security: FreeBSD-SA-20:27.ure
Security: CVE-2020-7464

3 years agoMFC r365606 and MF12 r365744:
Li-Wen Hsu [Tue, 15 Sep 2020 12:34:01 +0000 (12:34 +0000)]
MFC r365606 and MF12 r365744:

urndis(4): Add support of Inseego/Novatel Wireless MiFi 8800/8000

PR: 245152
Submitted by: rootless@gmail.com
Reviewed by: hselasky

Approved by: re (gjb)

3 years agoMFS r365647: ixl powerpc64 fixes
Eric Joyner [Mon, 14 Sep 2020 23:49:17 +0000 (23:49 +0000)]
MFS r365647: ixl powerpc64 fixes

PR: 249254
Approved by: re (gjb@)

3 years agoice(4): Add Intel 100GbE Ethernet Driver to kernel
Eric Joyner [Mon, 14 Sep 2020 22:42:17 +0000 (22:42 +0000)]
ice(4): Add Intel 100GbE Ethernet Driver to kernel

This also adds the "package" file that's loaded by the device for
configuration, used in the included ice_ddp kernel module.

MFS of r365612 and r365731.

Approved by: re (gjb@)
Relnotes: yes
Sponsored by: Intel Corporation

3 years agoMFS r365718:
Mark Johnston [Mon, 14 Sep 2020 17:21:52 +0000 (17:21 +0000)]
MFS r365718:
MFC r365437:
vm_object_split(): Handle orig_object type changes.

Approved by: re (gjb)

3 years agoMF12 r365662:
Dimitry Andric [Mon, 14 Sep 2020 14:53:09 +0000 (14:53 +0000)]
MF12 r365662:

MFC r365371:

Turn MALLOC_PRODUCTION into a regular src.conf(5) option

For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
been used to turn off potentially expensive debug checks and statistics
gathering in the implementation of malloc(3).

It seems more consistent to turn this into a regular src.conf(5) option,
e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
be toggled similar to any other source build option, and turned on or
off by default for e.g. stable branches.

Reviewed by: imp, #manpages
Differential Revision: https://reviews.freebsd.org/D26337

MFC r365373:

Follow-up r365371 by removing sentences which indicate the state of the
MK_MALLOC_PRODUCTION option on -CURRENT.

Also, for the sake of backwards compatibility, support the old way of
enabling 'production malloc', e.g. by adding a define in make.conf(5).

MF12 r365671:

Follow-up r365662 (MFC of r365371 and r365373) by correctly setting
WITH_MALLOC_PRODUCTION for stable branches. Also add a note to UPDATING,
to inform users about the new setting.

Direct commit to stable/{11,12} as this does not apply to head.

Noticed by: imp, Ronald Klop <ronald-lists@klop.ws>

MF12 r365672:

Follow-up r365662 (MFC of r365371 and r365373) by also removing the
header hack from jemalloc_FreeBSD.h, which rendered any make.conf
MALLOC_PRODUCTION or src.conf WITH/WITHOUT_MALLOC_PRODUCTION irrelevant.

Direct commit to stable/{11,12} as this does not apply to head.

Noticed by: kevans

Approved by: re (gjb)

3 years agoMF12 r365661:
Dimitry Andric [Mon, 14 Sep 2020 14:52:22 +0000 (14:52 +0000)]
MF12 r365661:

MFC r364753:

Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. __atomic_load_8 and
friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

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

MFC r364782:

After r364753, there should be no need to suppress -Watomic-alignment
warnings anymore for compiler-rt's atomic.c. This occurred because the
IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
caused the compiler to emit a runtime call to __atomic_is_lock_free(),
and that triggers the warning.

MFC r365509:

Follow-up r364753 by enabling compiler-rt's atomic implementation only
for clang, as it uses clang specific builtins, and does not compile
correctly with gcc. Note that gcc packages usually come with their own
libatomic, providing these primitives.

MFC r365588:

Follow-up r364753 by only using arm's stdatomic.c implementation, as it
already covers the functions in compiler-rt's atomic.c, leading to
conflicts when linking.

PR: 230888
Approved by: re (gjb)

3 years agoMFC r360229, r363255
Allan Jude [Sun, 13 Sep 2020 23:51:07 +0000 (23:51 +0000)]
MFC r360229, r363255
MFS r365614

r360229:
Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend

This will advertise support for TRIM to the guest virtio-blk driver and
perform the DIOCGDELETE ioctl on the backing storage if it supports it.

Thanks to Jason King and others at Joyent and illumos for expanding on
my original patch, adding improvements including better error handling
and making sure to following the virtio spec.

r363255:
Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver

If the hypervisor advertises support for the DISCARD command then the
guest can perform TRIM commands, freeing space on the backing store.

If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE

Tested with FreeBSD guests on bhyve and KVM

Approved by: re (gjb)
Relnotes: yes
Sponsored by: Klara Inc.

3 years agoMFS r365682: getlogin_r: fix the type of len
Kyle Evans [Sun, 13 Sep 2020 02:17:57 +0000 (02:17 +0000)]
MFS r365682: getlogin_r: fix the type of len

getlogin_r is specified by POSIX to to take a size_t len, not int. Fix our
version to do the same, bump the symbol version due to ABI change and
provide compat.

This was reported to break compilation of Ruby 2.8.

Some discussion about the necessity of the ABI compat did take place in the
review. While many 64-bit platforms would likely be passing it in a 64-bit
register and zero-extended and thus, not notice ABI breakage, some do
sign-extend (e.g. mips).

PR: 247102
Approved by: re (gjb)

3 years agoMFS r365681: certctl: fix hashed link generation with duplicate subjects
Kyle Evans [Sun, 13 Sep 2020 02:17:17 +0000 (02:17 +0000)]
MFS r365681: certctl: fix hashed link generation with duplicate subjects

Currently, certctl rehash will just keep clobbering .0 rather than
incrementing the suffix upon encountering a duplicate. Do this, and do it
for blacklisted certs as well.

This also improves the situation with the blacklist to be a little less
flakey, comparing cert fingerprints for all certs with a matching subject
hash in the blacklist to determine if the cert we're looking at can be
installed.

Future work needs to completely revamp the blacklist to align more with how
it's described in PR 246614. In particular, /etc/ssl/blacklisted should go
away to avoid potential confusion -- OpenSSL will not read it, it's
basically certctl internal.

PR: 246614
Approved by: re (gjb)

3 years agoMFS r365630 (markj, bz)
Bjoern A. Zeeb [Sat, 12 Sep 2020 21:50:25 +0000 (21:50 +0000)]
MFS r365630 (markj, bz)

   - Capsicumize rtsol(8) and rtsold(8).
   - Avoid relying on pollution from libcasper.h.
   - Add script for "M bit".

Approved by: re (gjb)

3 years agoMFS r365608:
Bjoern A. Zeeb [Sat, 12 Sep 2020 19:33:25 +0000 (19:33 +0000)]
MFS r365608:

Merge WiFi net80211, drivers, and management in order to support better 11n
  and upcoming 11ac.

  This includes an ath(4) update, some run(4) 11n support, 11n for otus(4),
  A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options, scanning fixes,
  enhanced PRIV checks for jails, restored parent device name printing,
  improvements for upcoming VHT support, lots of under-the-hood infrastructure
  improvements, new device ID, debug tools updates, some whitespace changes
  (to make future MFCs easier).

  This does not include (most) epoch(9) related changes as too much other
  infrastructure was not merged for that.

  Tested on: some ath(4) AP, run(4) STA, and rtwn(4) STA
  Discussed with: adrian (extremely briefly)
  Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") [partially]

Approved by: re (gjb)
Relnotes: yes

3 years agoMFC r365457:
Kristof Provost [Sat, 12 Sep 2020 18:58:36 +0000 (18:58 +0000)]
MFC r365457:

net: mitigate vnet / epair cleanup races

There's a race where dying vnets move their interfaces back to their original
vnet, and if_epair cleanup (where deleting one interface also deletes the other
end of the epair). This is commonly triggered by the pf tests, but also by
cleanup of vnet jails.

As we've not yet been able to fix the root cause of the issue work around the
panic by not dereferencing a NULL softc in epair_qflush() and by not
re-attaching DYING interfaces.

This isn't a full fix, but makes a very common panic far less likely.

PR: 244703, 238870
Approved by: re (gjb)

3 years agoMFC r342852 (by cem): powerpc: Fix regression introduced in r342771
Alexander Motin [Fri, 11 Sep 2020 15:30:47 +0000 (15:30 +0000)]
MFC r342852 (by cem): powerpc: Fix regression introduced in r342771

In r342771, I introduced a regression in Power by abusing the platform
smp_topo() method as a shortcut for providing the MI information needed for
the stated sysctls.  The smp_topo() method was already called later by
sched_ule (under the name cpu_topo()), and initializes a static array of
scheduler topology information.  I had skimmed the smp_topo_foo() functions
and assumed they were idempotent; empirically, they are not (or at least,
detect re-initialization and panic).

Do the cleaner thing I should have done in the first place and add a
platform method specifically for core- and thread-count probing.

PR: 249250
Approved by: re (gjb)

3 years ago- Copy stable/12@r365545 to releng/12.2 as part of the 12.2-RELEASE
Glen Barber [Thu, 10 Sep 2020 23:56:59 +0000 (23:56 +0000)]
- Copy stable/12@r365545 to releng/12.2 as part of the 12.2-RELEASE
  cycle.
- Update from PRERELEASE to BETA1.
- Set the default pkg(7) repository to 'quarterly'.
- Bump __FreeBSD_version.
- Prune svn:mergeinfo from the new branch.

Approved by: re (implicit)

Sponsored by: Rubicon Communications, LLC (netgate.com)

3 years agoMFC r365284:
Brooks Davis [Wed, 9 Sep 2020 23:11:55 +0000 (23:11 +0000)]
MFC r365284:

Always report ENOSYS in init

While rare, encountering an unimplemented system call early in init is
catastrophic and difficult to debug.  Even after a SIGSYS handler is
registered, such configurations are problematic.  As such, always report
such events for pid 1 (following kern.lognosys if non-zero).

Reviewed by: kevans, imp
Obtained from: CheriBSD (plus suggestions from kevans)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26288

3 years agoMFC r365016 | imp | 2020-08-31 17:48:23 -0600 (Mon, 31 Aug 2020) | 2 lines
Warner Losh [Wed, 9 Sep 2020 23:06:35 +0000 (23:06 +0000)]
MFC r365016 | imp | 2020-08-31 17:48:23 -0600 (Mon, 31 Aug 2020) | 2 lines

Add documentation for ETHERNET events.

3 years agoMFC r365015:
Warner Losh [Wed, 9 Sep 2020 23:05:47 +0000 (23:05 +0000)]
MFC r365015:
r365015 | imp | 2020-08-31 17:31:16 -0600 (Mon, 31 Aug 2020) | 12 lines

Warn for the non pccard attachments

These devices have non-pccard attachments. Warn for those as well. Both an and
wi don't do the modern cyrpto needed to use these cards on secure wifi networks.
an needs firmware from Cisco, which I don't think was ever produced. wi could
in theory do it with raw frames and on-host encryption, but nobody has written
that in the 15 years since WEP was cracked.

MFC After: 3 days
Noticed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D26138

3 years agoMFC: r365009
Warner Losh [Wed, 9 Sep 2020 23:04:40 +0000 (23:04 +0000)]
MFC: r365009
r365009 | imp | 2020-08-31 15:04:00 -0600 (Mon, 31 Aug 2020) | 10 lines

Add deprecation notice for apm BIOS

Add deprecation notice for apm bios, aka the apm(4) device. The apm(8)
command will remain, at least for a while, since ACPI emulates the apm
ioctl interface.

Discussed on: arch@
Relnotes: yes
MFC After: 3 days

3 years agoMFC r364824:
Warner Losh [Wed, 9 Sep 2020 23:01:55 +0000 (23:01 +0000)]
MFC r364824:

r364824 | imp | 2020-08-26 11:06:16 -0600 (Wed, 26 Aug 2020) | 8 lines

Make sbuf_setpos match the implementation.

sbuf_setpos can only be used to truncate the buffer, never to make it
longer. Update the documentation to reflect this.

Reviewed By: allanjude, phk
Differential Revision: https://reviews.freebsd.org/D26198

3 years agoMFC r364725, r364726
Warner Losh [Wed, 9 Sep 2020 22:59:47 +0000 (22:59 +0000)]
MFC r364725, r364726

r364725 | imp | 2020-08-24 13:35:15 -0600 (Mon, 24 Aug 2020) | 9 lines

Change the resume notification event from 'kern' to 'kernel'

We have both a system of 'kern' and of 'kernel'. Prefer the latter and
convert this notification to use 'kernel' instead of 'kern'. As a
transition period, continue to also generate the 'kern' notification
until sometime after FreeBSD 13 is branched.

r364726 | imp | 2020-08-24 13:35:27 -0600 (Mon, 24 Aug 2020) | 4 lines

Document the kern -> kernel name change for resume events.

Relnotes: YES

3 years agoMFC: 364430:
Warner Losh [Wed, 9 Sep 2020 22:54:09 +0000 (22:54 +0000)]
MFC: 364430:
r364430 | imp | 2020-08-20 11:19:40 -0600 (Thu, 20 Aug 2020) | 6 lines

Tag pccard drivers with gone in 13.

MFC After: 3 days
Reviewed by: emaste, brooks, adrian (on twitter)
Differential Revision: https://reviews.freebsd.org/D26095

3 years agoMFC r364424:
Warner Losh [Wed, 9 Sep 2020 22:51:58 +0000 (22:51 +0000)]
MFC r364424:
r364424 | imp | 2020-08-20 10:52:34 -0600 (Thu, 20 Aug 2020) | 5 lines

Fix function name in zone.9

uma_zone_prealloc -> uma_prealloc. There's no uma_zone_prealloc defined and the
docs for it describe uma_prealloc exactly.

3 years agoMFC r364359, r364360, r364361, r364362, r364364, r364370
Warner Losh [Wed, 9 Sep 2020 22:49:43 +0000 (22:49 +0000)]
MFC r364359, r364360, r364361, r364362, r364364, r364370

r364359 | imp | 2020-08-18 15:26:39 -0600 (Tue, 18 Aug 2020) | 9 lines

Move the possible event types into a column table to make it easier to read.

Sort system type alphabetically.
Remove some commas that aren't in the devd notification messages.

MFC After: 3 days
Reviewed by: 0mp (earlier versions), jhb (useful feedback on earlier versions)
Differential Revision: https://reviews.freebsd.org/D26105

r364360 | imp | 2020-08-18 15:26:45 -0600 (Tue, 18 Aug 2020) | 4 lines

GEOM::rotation_rate changes are also signaled via devctl.

MFC After: 3 days

r364361 | imp | 2020-08-18 15:26:50 -0600 (Tue, 18 Aug 2020) | 8 lines

Document the PMU system

The pmu(4) and adb(4) drivers on powerpc generate PMU events. Document them.

The allwinner power modules also generate these events. Document those as well.

MFC After: 3 days

r364362 | imp | 2020-08-18 15:26:54 -0600 (Tue, 18 Aug 2020) | 4 lines

Document the AEON subsystem for the Amiga's power button.

MFC After: 3 days

r364364 | imp | 2020-08-18 15:42:02 -0600 (Tue, 18 Aug 2020) | 5 lines

Fix two typos.

Submitted by: rpokala@
MFC After: 3 days

r364370 | imp | 2020-08-18 20:18:11 -0600 (Tue, 18 Aug 2020) | 8 lines

Three typos:
Amiga is a proper noun
Condition is traditionally spelled starting with 'c'
Some, but not all, of the over/under-voltage instances were hyphenated.
Since they are all adverb phrases, they all need to be hyphenated.

Pointy hat: imp

3 years agoMFC r364335,r364336,r364337,r364351
Warner Losh [Wed, 9 Sep 2020 22:45:11 +0000 (22:45 +0000)]
MFC r364335,r364336,r364337,r364351

r364335 | imp | 2020-08-18 00:07:34 -0600 (Tue, 18 Aug 2020) | 6 lines

Modernize a bit.

Remove PC Card specific information. It's of little value these days and on
the way out after most of its drivers have been removed.
Use iwn instead of wi device.

r364336 | imp | 2020-08-18 00:18:18 -0600 (Tue, 18 Aug 2020) | 9 lines

Document that PC Card will likely be removed before 13.

This was discussed in arch@ a while ago. Most of the 16-bit drivers that it
relied on have been removed. There's only a few other drivers remaining that
support it, and those are very rare the days (even the once ubiquitious wi(1)
is now quite rare).

Indvidual drivers will be handled separately before pccard itself is removed.

r364337 | imp | 2020-08-18 00:34:56 -0600 (Tue, 18 Aug 2020) | 2 lines

Use better gone_in_dev rather than just gone_in to print the device name.

r364351 | imp | 2020-08-18 11:29:01 -0600 (Tue, 18 Aug 2020) | 4 lines

bt(4) has already been removed. Add a deprecation notice.

MFC After: 1 day

3 years agoMFC r364291:
Warner Losh [Wed, 9 Sep 2020 22:42:14 +0000 (22:42 +0000)]
MFC r364291:
r364291 | imp | 2020-08-16 17:55:23 -0600 (Sun, 16 Aug 2020) | 33 lines

Remove heuristic for dealing with trailing newlines being truncated by mailers.
...

3 years agoMFC r363408:
Warner Losh [Wed, 9 Sep 2020 22:40:14 +0000 (22:40 +0000)]
MFC r363408:
r363408 | imp | 2020-07-21 18:44:47 -0600 (Tue, 21 Jul 2020) | 4 lines

getty appears to date from 3rd edition research unix. That's the oldest man page
on TUHS and its 'unix 1972' restoration effort has assembler sources that look
like simpler version of what's in the 5th edition.

3 years agoMFC r362664, r362665:
Warner Losh [Wed, 9 Sep 2020 22:38:18 +0000 (22:38 +0000)]
MFC r362664, r362665:

r362664 | imp | 2020-06-26 16:05:23 -0600 (Fri, 26 Jun 2020) | 21 lines
Chroot(2) actually appeared in 7th Edition Unix. ...

r362665 | imp | 2020-06-26 16:23:15 -0600 (Fri, 26 Jun 2020) | 10 lines
Chroot(8) first appeared in 4.3-Reno, not in 4.4 in the BSD world,
but in System III in the AT&T world.

Examination of the TUHS archives shows this was present in 4.3-Reno
and System III.

Reviewed by: 0mp@, allanjude@
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D25479

3 years agoMFC r362420:
Warner Losh [Wed, 9 Sep 2020 22:35:39 +0000 (22:35 +0000)]
MFC r362420:

r362420 | imp | 2020-06-19 22:07:44 -0600 (Fri, 19 Jun 2020) | 13 lines

Correct 1BSD release date.

The Quarter Century of Unix book said that 1BSD was released March 1979.
However, the 1BSD tape image that's on Kirk's historical unix collection has an
earlier date.

It was common practice, at the time, to create a new copy of the tape from the
master system when a new tape was to go out, so several different versions of
1BSD, etc were shipped from Berkerely. The date on the 1BSD tape in the Berkeley
archives on Kirk's DVD is dated in January 16 1979 on the label, and has dates
as late as Jan 29 (there's an UPDATE file that says this includes updates
through this date). Note this date as well.

3 years agoMFC: r361882:
Warner Losh [Wed, 9 Sep 2020 22:33:11 +0000 (22:33 +0000)]
MFC: r361882:

r361882 | imp | 2020-06-06 20:40:21 -0600 (Sat, 06 Jun 2020) | 2 lines

Mention nda where we mention nvd.

3 years agoMFC: r361868:
Warner Losh [Wed, 9 Sep 2020 22:30:43 +0000 (22:30 +0000)]
MFC: r361868:
r361868 | imp | 2020-06-06 00:49:06 -0600 (Sat, 06 Jun 2020) | 4 lines

Fix typo

Submitted by: Yuri Pankov

3 years agoMFC r361867:
Warner Losh [Wed, 9 Sep 2020 22:29:44 +0000 (22:29 +0000)]
MFC r361867:
r361867 | imp | 2020-06-06 00:21:20 -0600 (Sat, 06 Jun 2020) | 4 lines

Document all the sysctl values for the nda devices. Include some minimal
documentation on namespace support for nda devices. Fix a few typos
and formatting nits to apease igor.

3 years agoMFC r361673:
Warner Losh [Wed, 9 Sep 2020 22:24:09 +0000 (22:24 +0000)]
MFC r361673:
r361673 | imp | 2020-05-31 15:38:33 -0600 (Sun, 31 May 2020) | 14 lines

Correct the release date for 2.11BSD

2.11BSD was announced on March 14, 1991 in comp.bugs.2bsd by
Steven M. Schultz. The document has a 'revised January 1991'
date at the top.

Patch/1 in the official repo is dated March 31, 1991, and an identical copy of
it was posted to comp.bugs.2bsd on May 5, 1991. Patch 2 in 22 parts was likewise
posted May 18, 1991. This makes the Feb 1992 date too late. It's possible it's a
typo for Feb 1991 since that lines up with the announcement being 2 weeks
later. Without an extant copy of the 2.11 tape, however, it's hard to say for
sure. Go with the date we have the most independent, direct evidence for, which
is the announcement date.

3 years agoMFC r360993:
Warner Losh [Wed, 9 Sep 2020 22:22:38 +0000 (22:22 +0000)]
MFC r360993:
r360993 | imp | 2020-05-12 16:44:51 -0600 (Tue, 12 May 2020) | 6 lines

Refine the history of uname. It appeared in 4.4BSD. It was not in v7 unix. It
was one of the additions in PWB, and appeared in System III and later commercial
versions of Unix. The different args to uname weren't aded until System III. Add
a quick note to note the late entry into the BSD fork of Unix since PWB
otherwise implies a pre-fork date.

3 years agoMFC r365279:
Brooks Davis [Wed, 9 Sep 2020 21:57:55 +0000 (21:57 +0000)]
MFC r365279:

Remove risky compatability with old kernels

The badsys() handler for SIGSYS was added as a transtion aid for kernels
lacking sysctl() in 1993.  It is unsafe and unsound so remove it rather
than running the risk of a privilege-dropping system call being silently
omitted.

This partially reverts SCCSID 6.12 (Berkeley) 03/03/93 "add code to
change the system security level".

Reviewed by: mckusick, imp, kevans
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26289

3 years agoMFC r365262:
Alan Somers [Wed, 9 Sep 2020 13:16:20 +0000 (13:16 +0000)]
MFC r365262:

Fix output of nfsstat -cE in json or xml mode

Due to a copy/paste error, the "getacl" field was duplicated, but only in
XML or JSON mode, not in txt mode.

Discussed with: rmacklem
Sponsored by: Axcient

3 years agoMFC 362123: Fix AES-CCM requests with an AAD size smaller than a single block.
John Baldwin [Tue, 8 Sep 2020 23:19:59 +0000 (23:19 +0000)]
MFC 362123: Fix AES-CCM requests with an AAD size smaller than a single block.

The amount to copy for the first block is the minimum of the size of
the AAD region or the remaining space in the first block.

3 years agoMFC 359900: Export a sysctl count of RX FIFO overrun events.
John Baldwin [Tue, 8 Sep 2020 22:50:24 +0000 (22:50 +0000)]
MFC 359900: Export a sysctl count of RX FIFO overrun events.

uart(4) backends currently detect RX FIFO overrun errors and report
them to the uart(4) core layer.  They are then reported to the generic
TTY layer which promptly ignores them.  As a result, there is
currently no good way to determine if a uart is experiencing RX FIFO
overruns.  One could add a generic per-tty counter, but there did not
appear to be a good way to export those.  Instead, add a sysctl under
the uart(4) sysctl tree to export the count of overruns.

3 years agoMFC 359899: Correct baud rate error calculation.
John Baldwin [Tue, 8 Sep 2020 22:19:06 +0000 (22:19 +0000)]
MFC 359899: Correct baud rate error calculation.

Shifting right by 1 is not the same as dividing by 2 for signed
values.  In particular, dividing a signed value by 2 gives the integer
ceiling of the (e.g. -5 / 2 == -2) whereas shifting right by 1 always
gives the floor (-5 >> 1 == -3).

An embedded board with a 25 Mhz base clock results in an error of
-30.5% when used with a baud rate of 115200.  Using division, this
truncates to -30% and is permitted.  Using the shift, this fails and
is rejected causing TIOCSETA requests to fail with EINVAL and breaking
getty(8).

Using division gives the same error range for both over and under baud
rates and also makes the code match the behavior documented in the
existing comment about supporting boards with 25 Mhz clocks.

3 years agoMFC 359467: Trim some duplicate EIO descriptions.
John Baldwin [Tue, 8 Sep 2020 20:53:44 +0000 (20:53 +0000)]
MFC 359467: Trim some duplicate EIO descriptions.

While here, drop an extra conjunction from the list of error
conditions for the remaining EIO description in symlink(2).

3 years agoMFC 359465: Document EINTEGRITY errors for many system calls.
John Baldwin [Tue, 8 Sep 2020 20:51:19 +0000 (20:51 +0000)]
MFC 359465: Document EINTEGRITY errors for many system calls.

EINTEGRITY was previously documented as a UFS-specific error for
mount(2).  This documents EINTEGRITY as a filesystem-independent error
that may be reported by the backing store of a filesystem.

While here, document EIO as a filesystem-independent error for both
mount(2) and posix_fadvise(2).  EIO was previously only documented for
UFS for mount(2).

3 years agoRevert r365471 as it is breaking with old gcc on various arches:
Dimitry Andric [Tue, 8 Sep 2020 20:28:39 +0000 (20:28 +0000)]
Revert r365471 as it is breaking with old gcc on various arches:

MFC r364753:

Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. __atomic_load_8 and
friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

PR: 230888
Differential Revision: https://reviews.freebsd.org/D26159

MFC r364782:

After r364753, there should be no need to suppress -Watomic-alignment
warnings anymore for compiler-rt's atomic.c. This occurred because the
IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
caused the compiler to emit a runtime call to __atomic_is_lock_free(),
and that triggers the warning.

3 years agoMFC r364753:
Dimitry Andric [Tue, 8 Sep 2020 20:02:08 +0000 (20:02 +0000)]
MFC r364753:

Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. __atomic_load_8 and
friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

PR: 230888
Differential Revision: https://reviews.freebsd.org/D26159

MFC r364782:

After r364753, there should be no need to suppress -Watomic-alignment
warnings anymore for compiler-rt's atomic.c. This occurred because the
IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
caused the compiler to emit a runtime call to __atomic_is_lock_free(),
and that triggers the warning.

3 years agoMFC 361764: Revise r361712 to disable tcpmd5.ko for 'options TCP_SIGNATURE'
John Baldwin [Tue, 8 Sep 2020 18:58:38 +0000 (18:58 +0000)]
MFC 361764: Revise r361712 to disable tcpmd5.ko for 'options TCP_SIGNATURE'

3 years agoUse kmod.opts.mk in sys/modules/tcp/Makefile to fix standalone builds.
John Baldwin [Tue, 8 Sep 2020 18:49:58 +0000 (18:49 +0000)]
Use kmod.opts.mk in sys/modules/tcp/Makefile to fix standalone builds.

This was included in the original commit to head that added use of
KERN_OPTS (r361638) but was left out of the MFC since kmod.opts.mk
hadn't been MFC'd at the time.  It has since been merged.

This is a direct commit to stable/11 and stable/12.

Reported by: Eugene Grosbein <eugen@grosbein.net>

3 years agoPartial MFC 357275: if_vlan grew a dependency on opt_inet6.h in r356993
John Baldwin [Tue, 8 Sep 2020 18:33:41 +0000 (18:33 +0000)]
Partial MFC 357275: if_vlan grew a dependency on opt_inet6.h in r356993

3 years agoMFC 361634: Add opt_ipsec.h to fix standalone builds after r361633.
John Baldwin [Tue, 8 Sep 2020 18:29:20 +0000 (18:29 +0000)]
MFC 361634: Add opt_ipsec.h to fix standalone builds after r361633.

3 years agoMFC 354970: Add a kmod.opts.mk.
John Baldwin [Tue, 8 Sep 2020 16:43:32 +0000 (16:43 +0000)]
MFC 354970: Add a kmod.opts.mk.

This Makefile sets KERN_OPTS.  This permits kernel module Makefiles to
use KERN_OPTS to control the value of variables such as SRCS that are
used by bsd.kmod.mk for KERN_OPTS values that honor WITH/WITHOUT
options for standalone builds.

3 years agoMFC r365043-r365046:
Mark Johnston [Tue, 8 Sep 2020 12:38:34 +0000 (12:38 +0000)]
MFC r365043-r365046:
pw: Coverity fixes.

3 years agoMFC r365048:
Mark Johnston [Tue, 8 Sep 2020 12:37:46 +0000 (12:37 +0000)]
MFC r365048:
Tighten frame pointer checking in DTrace's amd64 stack unwinder.

3 years agoMFC r365047:
Mark Johnston [Tue, 8 Sep 2020 12:37:18 +0000 (12:37 +0000)]
MFC r365047:
Correct the D definition for EINTEGRITY.

3 years agoMFC r364369:
Robert Wing [Tue, 8 Sep 2020 07:37:45 +0000 (07:37 +0000)]
MFC r364369:

bectl(8): Fix output of 'bectl list' for the 'Mountpoint' column.

PR: 241064

3 years agoMFC 364339
Peter Grehan [Tue, 8 Sep 2020 03:55:49 +0000 (03:55 +0000)]
MFC 364339
   Allow guest device MMIO access from bootmem memory segments.

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

3 years agoMFC r364995:
Mark Johnston [Mon, 7 Sep 2020 23:22:16 +0000 (23:22 +0000)]
MFC r364995:
ggated(8): Avoid doubly opening the requested disk device.

PR: 132845

3 years agoMFC r364993:
Mark Johnston [Mon, 7 Sep 2020 23:21:53 +0000 (23:21 +0000)]
MFC r364993:
rtwn(4): Add support for the Belkin N300.

PR: 249034

3 years agoMFC r364982: ipv6: quit dropping packets looping back on p2p interfaces
Kyle Evans [Mon, 7 Sep 2020 23:20:02 +0000 (23:20 +0000)]
MFC r364982: ipv6: quit dropping packets looping back on p2p interfaces

PR: 247718

3 years agoMFC r365429:
Dimitry Andric [Mon, 7 Sep 2020 20:17:13 +0000 (20:17 +0000)]
MFC r365429:

Merge commit 47b0262d3 from llvm git (by me):

  Add <stdarg.h> include to kmp_os.h, to get the va_list type, required
  after cde8f4c164a2. Sort system includes, while here.

The original merged commit works fine by itself on head, but fails to
compile on stable branches because stdarg.h is not implicitly pulled in.

PR: 248864

3 years agoMFC r364732:
Dimitry Andric [Mon, 7 Sep 2020 19:35:30 +0000 (19:35 +0000)]
MFC r364732:

Merge commit cde8f4c16 from llvm git (by me):

  Move special va_list handling to kmp_os.h

  Instead of copying and pasting the same #ifdef expressions in
  multiple places, define a type and a pair of macros in kmp_os.h, to
  handle whether va_list is pointer-like or not:

  * kmp_va_list is the type to use for __kmp_fork_call()
  * kmp_va_deref() dereferences a va_list, if necessary
  * kmp_va_addr_of() takes the address of a va_list, if necessary

  Also add FreeBSD to the list of OSes that has a non pointer-like
  va_list. This can now be easily extended to other OSes too.

  Reviewed By: AndreyChurbanov

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

This should enable building of LLVM's OpenMP on AArch64. Addition to
share/mk will follow in a subsequent commit.

PR: 248864

MFC r364733:

After r364732, we can now enable MK_OPENMP for aarch64 by default.

PR: 248864

3 years agoMFC r364081:
Dimitry Andric [Mon, 7 Sep 2020 19:29:06 +0000 (19:29 +0000)]
MFC r364081:

Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
subdirectories for compiler-rt's internal fuzzer, profile and xray
headers, but forgot to add installing those headers themselves.

3 years agoRevert r364939 and add a stable/12 approach for populating the ESP
Oleksandr Tymoshenko [Mon, 7 Sep 2020 18:47:25 +0000 (18:47 +0000)]
Revert r364939 and add a stable/12 approach for populating the ESP

make_esp_file is not available in stable/12 so r364939 broke VM-related targets.
Revert offending commit and use pre-r342283 approach to populate ESP partition.

PR: 249168
Tested on: VirtualBox, Hyper-V v2 VM

3 years agoTPC rack: use #error rather than syntax error
Ed Maste [Mon, 7 Sep 2020 17:31:58 +0000 (17:31 +0000)]
TPC rack: use #error rather than syntax error

Until the changes to make this a proper dependency are merged, avoid using
a syntax error for a user-facing error report.

PR: 249037
Suggested by: avg

3 years agoMFC r364684:
Marc Fonvieille [Mon, 7 Sep 2020 16:11:49 +0000 (16:11 +0000)]
MFC r364684:

s/redundacy/redundancy

3 years agoMFC r364682:
Marc Fonvieille [Mon, 7 Sep 2020 16:09:37 +0000 (16:09 +0000)]
MFC r364682:

Add missing Korean doc package entry, remove non-existent Serbian doc
package entry.

Approved by: re (gjb)