]>
CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
Luiz Otavio O Souza [Tue, 17 Aug 2021 07:54:40 +0000 (09:54 +0200)]
ipfw: use unsigned int for dummynet bandwidth
This allows the maximum value of
4294967295 (~4Gb/s) instead of previous
value of
2147483647 (~2Gb/s).
Reviewed by: np, scottl
Obtained from: pfSense
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31582
(cherry picked from commit
20ffd88ed54fe3fd098ac30bd221275b2a14f52c )
Kyle Evans [Tue, 20 Jul 2021 10:40:30 +0000 (05:40 -0500)]
init: execute /etc/rc.final after all user processes have terminated
This can be useful for, e.g., unmounting filesystems that were needed
for shutdown.
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
X-NetApp-PR: #63
(cherry picked from commit
4d1597691916240b9023ee9f15e249503abf67fd )
Kyle Evans [Sun, 20 Jun 2021 19:36:10 +0000 (14:36 -0500)]
kenv: allow listing of static kernel environments
The early environment is typically cleared, so these new options
need the PRESERVE_EARLY_KENV kernel config(8) option. These environments
are reported as missing by kenv(1) if the option is not present in the
running kernel.
(cherry picked from commit
db0f26439357b78863e61985acd1e5acf75ce73d )
Kyle Evans [Sun, 20 Jun 2021 19:29:31 +0000 (14:29 -0500)]
kern: add an option for preserving the early kenv
Some downstream configurations do not store secrets in the
early (loader/static) environments and desire a way to preserve these
for diagnostic reasons. Provide an option to do so.
(cherry picked from commit
7a129c973b5ba0fa916dfa658d523bec66dbd02d )
Kyle Evans [Mon, 21 Jun 2021 03:11:26 +0000 (22:11 -0500)]
kenv: s/dump/list/ to clarify meaning
The contents of the kenv will be dumped to stdout, while dump could have
also meant 'discard'. Call it 'list' instead.
(cherry picked from commit
46438b5366f9405beb6f76474a5aae822352f012 )
Kevin Bowling [Thu, 19 Aug 2021 14:59:34 +0000 (07:59 -0700)]
e1000: Update intel shared code
Sync the e1000 shared code with DPDK shared code
"cid-gigabit.2020.06.05.tar.gz released by ND"
Primary focus was on client platforms (ich8lan). More work remains here
but we need an Intel contact for client networking.
Reviewed by: grehan, Intel Networking (erj, earlier rev)
Obtained from: DPDK <http://git.dpdk.org/dpdk/tree/drivers/net/e1000/base>
MFC after: 1 week
Sponsored by: me
Differential Revision: https://reviews.freebsd.org/D31547
(cherry picked from commit
fc7682b17f3738573099b8b03f5628dcc8148adb )
Fabian Kurtz [Wed, 18 Aug 2021 17:12:48 +0000 (10:12 -0700)]
dhclient: support supersede statement for option 54
PR: 217978
Reported by: Franco Fichtner <franco@opnsense.org>
Reviewed by: markj
Obtained from: OPNsense
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31503
(cherry picked from commit
0a539a0f005e8acbe4974ede30aa928099c988b9 )
Franco Fichtner [Wed, 18 Aug 2021 17:05:29 +0000 (10:05 -0700)]
gre: simplify RSS ifdefs
Use the early break to avoid else definitions. When RSS gains a
runtime option previous constructs would duplicate and convolute
the existing code.
While here init flowid and skip magic numbers and late default
assignment.
Reviewed by: melifaro, kbowling
Obtained from: OPNsense
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31584
(cherry picked from commit
bb250fae9e9e278b681cf3a71ced718700ecf74c )
Stephan de Wit [Wed, 18 Aug 2021 07:17:43 +0000 (00:17 -0700)]
iflib: emulate counters in netmap mode
When iflib devices are in netmap mode the driver
counters are no longer updated making it look from
userspace tools that traffic has stopped.
Reported by: Franco Fichtner <franco@opnsense.org>
Reviewed by: vmaffione, iflib (erj, gallatin)
Obtained from: OPNsense
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31550
(cherry picked from commit
66fa12d8fb61485780f32f0226e79d3389567496 )
Warner Losh [Fri, 28 Aug 2020 17:49:56 +0000 (17:49 +0000)]
Allow the pseudo-errnos to be returned as well in boot loader
Expose the pseudo-errno values in _STANDALONE is defined so that code
in the boot loader can make use of them. Nothing uses them today, but
the zstd support that's coming will need them.
(cherry picked from commit
0c35b860913807d4937098d5238c5f4363fb6362 )
Gordon Bergling [Sun, 22 Aug 2021 06:16:09 +0000 (08:16 +0200)]
rpc(3): Correct a few common typos in source code comments
- s/therfore/therefor/
- s/activte/active/
Obtained from: NetBSD
(cherry picked from commit
0d55bc8eb2ab9508c43e135616ca887ed719ea9a )
Mark Johnston [Tue, 24 Aug 2021 18:13:00 +0000 (14:13 -0400)]
bhyve: Fix vq_getchain() error handling bugs in various device models
Reviewed by: grehan, khng
Approved by: so
Security: CVE-2021-29631
Security: FreeBSD-SA-21:13.bhyve
(cherry picked from commit
71fbc6faed62e8eb5864f7c40839740f5e9f5558 )
Gordon Tetlow [Tue, 24 Aug 2021 18:03:46 +0000 (11:03 -0700)]
Fix multiple OpenSSL vulnerabilities.
Approved by: so
Security: SA-21:16.openssl
Security: CVE-2021-3711
Security: CVE-2021-3712
(cherry picked from commit
be158ffe54dcc4a633652685afc5e37894e10ea0 )
Gordon Tetlow [Tue, 24 Aug 2021 17:59:01 +0000 (10:59 -0700)]
Fix libfetch out of bounds read.
Approved by: so
Security: SA-21:15.libfetch
Security: CVE-2021-36159
(cherry picked from commit
3be62d49ae2b6f9050f39fe74210c88f35901fa5 )
Gordon Tetlow [Tue, 24 Aug 2021 17:40:49 +0000 (10:40 -0700)]
Fix remote code execution in ggatec(8).
Approved by: so
Security: SA-21:14.ggatec
Security: CVE-2021-29630
(cherry picked from commit
515216929c40169cc72b62466ff9238682661613 )
Andrey V. Elsukov [Tue, 17 Aug 2021 08:08:28 +0000 (11:08 +0300)]
ipfw: fix possible data race between jump cache reading and updating.
Jump cache is used to reduce the cost of rule lookup for O_SKIPTO and
O_CALLRETURN actions. It uses rules chain id to check correctness of
cached value. But due to the possible race, there is the chance that
one thread can read invalid value. In some cases this can lead to out
of bounds access and panic.
Use thread fence operations to constrain the reordering of accesses.
Also rename jump_fast and jump_linear functions to jump_cached and
jump_lookup_pos respectively.
Submitted by: Arseny Smalyuk
Obtained from: Yandex LLC
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D31484
(cherry picked from commit
322e5efda8578bb9c0a0ab0ef785cd1e1c222c85 )
Kristof Provost [Tue, 24 Aug 2021 13:29:36 +0000 (15:29 +0200)]
netinet6 tests: build fix
Add missing '\'.
Direct commit to stable/12 due to mismerge.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Kristof Provost [Tue, 17 Aug 2021 14:19:29 +0000 (16:19 +0200)]
netinet tests: delete an interface with pending lookups
This has been known to trigger panics. It currently doesn't, but we may
as well have a test for it.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
e86469075c5e391cc86e5bcd4f252712a69de37e )
Alexander V. Chernikov [Sat, 20 Feb 2021 18:20:24 +0000 (18:20 +0000)]
Add arp/ndp tests in addition to rtsock ll tests.
(cherry picked from commit
f17f94cd1b99c61faa08aa988b47805c53b78ac7 )
Alexander Motin [Tue, 10 Aug 2021 20:30:12 +0000 (16:30 -0400)]
ntb_transport(4): Mark callouts MP-safe.
The only thing around NTB using Giant lock is NewBus, and these callouts
have nothing to do with it.
MFC after: 2 weeks
(cherry picked from commit
c6902e7796bc78df011131a2b8b024faed884b8f )
Kevin Bowling [Mon, 23 Aug 2021 16:21:39 +0000 (09:21 -0700)]
ixgbe: Avoid sbuf_trim(9) in sysctl handler
This was an error, we cannot use sbuf_trim(9) in the
ixgbe_sbuf_fw_version function because it also gets called in
the context of sbuf_new_for_sysctl(9). sbuf(9) explains the interaction
with drain functions as used by sbuf_new_for_sysctl(9).
Reviewed by: imp
Fixes:
7660e4ea5cb7
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D31633
(cherry picked from commit
5de5419b5e8685ab2261edaafe6fdb6fc36e8bbc )
Kevin Bowling [Sat, 31 Jul 2021 15:00:16 +0000 (08:00 -0700)]
igc: sync igc_txrx with igb(4)
Reviewed by: grehan
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31227
(cherry picked from commit
d02e436353d292e6fd50f70ea80507095543764e )
Kevin Bowling [Mon, 16 Aug 2021 17:17:34 +0000 (10:17 -0700)]
e1000: always enable PCSD when RSS hashing
To enable RSS hashing in the NIC, the PCSD bit must be set.
By default, this is never set when RXCSUM is disabled - which
causes problems higher up in the stack.
While here improve the RXCSUM flag assignments when enabling or
disabling IFCAP_RXCSUM.
See also: https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076148.html
Reviewed by: markj, Franco Fichtner <franco@opnsense.org>,
Stephan de Wit <stephan.dewt@yahoo.co.uk>
Obtained from: OPNsense
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31501
Co-authored-by: Stephan de Wit <stephan.dewt@yahoo.co.uk>
Co-authored-by: Franco Fichtner <franco@opnsense.org>
(cherry picked from commit
69e8e8ea3d4be9da6b5bc904a444b51958128ff5 )
Kristof Provost [Fri, 20 Aug 2021 11:43:15 +0000 (13:43 +0200)]
libpfctl: Fix endianness issues
Several fields are supplied in big-endian format, so we need to convert
them before we display them.
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
719b5397c2887bc0619bb6ffb38f67f37bbf13c6 )
Mateusz Guzik [Wed, 21 Jul 2021 03:34:32 +0000 (05:34 +0200)]
arm: hide busdma statistics behind ifdef ARM_BUSDMA_MAPLOAD_STATS
Stat collection using counter(9) is quite expensive on this platform and
these counters are normally not needed.
In particular we see about 1.5% bump in packet rate using Cortex-A9
Reviewed by: ian
Sponsored by: Rubicon Communications, LLC ("Netgate")
Different Revision: https://reviews.freebsd.org/D31592
(cherry picked from commit
aec8ad8a9e6aba2d73c98bd41f2994744aae3d01 )
Mateusz Guzik [Tue, 17 Aug 2021 18:16:09 +0000 (20:16 +0200)]
pf: assert dir state on pf_test{,6}
The intent is to line up various enums so that branching in the lines of:
idx = (dir == PF_IN ? PF_SK_WIRE : PF_SK_STACK);
is avoided.
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
3e875f952af05697807139b460e5124eb5f6137b )
Mateusz Guzik [Tue, 17 Aug 2021 18:04:31 +0000 (20:04 +0200)]
pf: save on branching in the common case in pf_test
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
5091ca26507b83ebd5ce677dd26bd10e4bad4153 )
Peter Grehan [Mon, 23 Aug 2021 11:46:49 +0000 (21:46 +1000)]
igc(4): Introduce new driver for the Intel I225 Ethernet controller.
This controller supports 2.5G/1G/100MB/10MB speeds, and allows
tx/rx checksum offload, TSO, LRO, and multi-queue operation.
The driver was derived from code contributed by Intel, and modified
by Netgate to fit into the iflib framework.
Thanks to Mike Karels for testing and feedback on the driver.
Reviewed by: bcr (manpages), kbowling, scottl, erj
Relnotes: yes
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30668
For stable/12, CTLFLAG_NEEDGIANT removed and if_foreach_llmaddr() replaced with
if_multiaddr_array().
(cherry picked from commit
517904de5ccac643589c71ac0d2751797f89e4f9 )
Gordon Bergling [Fri, 20 Aug 2021 07:59:18 +0000 (09:59 +0200)]
ufs_dirhash: Correct a typo in a comment
- s/memry/memory/
(cherry picked from commit
464a166c27bb8947d5de1f617170ef6813587cc3 )
Alexander Motin [Mon, 9 Aug 2021 01:34:33 +0000 (21:34 -0400)]
Optimize res_find().
When the device name is provided, we can simply run strncmp() for each
line to quickly skip unrelated ones, that is much faster than sscanf()
and only then strcmp().
MFC after: 2 weeks
(cherry picked from commit
696fca3fd491972e615195f2ce94598b9c469cac )
Mark Johnston [Mon, 16 Aug 2021 17:15:25 +0000 (13:15 -0400)]
sigtimedwait: Use a unique wait channel for sleeping
When a sigtimedwait(2) caller goes to sleep, it uses a wait channel of
p->p_sigacts with the proc lock as the interlock. However, p_sigacts
can be shared between processes if a child is created with
rfork(RFSIGSHARE | RFPROC). Thus we can end up with two threads
sleeping on the same wait channel using different locks, which is not
permitted.
Fix the problem simply by using a process-unique wait channel, following
the example of sigsuspend. The actual wait channel value is irrelevant
here, sleeping threads are awoken using sleepq_abort().
Reported by: syzbot+
8c417afabadb50bb8827 @syzkaller.appspotmail.com
Reported by: syzbot+
1d89fc2a9ef92ef64fa8 @syzkaller.appspotmail.com
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
(cherry picked from commit
c4feb1ab0ae0c0e779af372e4c5f3b9e0d3e1388 )
Alan Somers [Tue, 27 Jul 2021 18:14:00 +0000 (12:14 -0600)]
ftpd: delete dead code
Delete code killed by SVN r13139 in 1996. Little chance that it would
still compile today.
PR: 257317
Reported by: Alan Shearer <sakison@gmail.com>
Sponsored by: Axcient
(cherry picked from commit
674400eb20b65369a88b1cb778d729bc297832c9 )
Alan Somers [Thu, 8 Jul 2021 16:16:32 +0000 (10:16 -0600)]
iostat: fix rounding errors in iostat -x
Better to round numbers instead of flooring them.
Sponsored by: Axcient
(cherry picked from commit
61631b24a1347a23cafe0657fba894622b1606e2 )
Alan Somers [Wed, 21 Jul 2021 21:11:00 +0000 (15:11 -0600)]
Escape any '.' characters in sysctl node names
ZFS creates some sysctl nodes that include a pool name, and '.' is an
allowed character in pool names. But it's the separator in the sysctl
tree, so it can't be included in a sysctl name. Replace it with "%25".
Handily, "%" is illegal in ZFS pool names, so there's no ambiguity
there.
PR: 257316
Sponsored by: Axcient
Reviewed by: freqlabs
Differential Revision: https://reviews.freebsd.org/D31265
(cherry picked from commit
6c9506559080da2914749bf611225d7c0a153609 )
Alexander Motin [Sun, 8 Aug 2021 22:19:08 +0000 (18:19 -0400)]
kbdmux(4): Make callout handler mpsafe.
Both callout and taskqueue now have drain() routines not requiring
external locking. It allows to remove TASK flag and manual drain,
so the only thing remaining for lock to protect inside the callout
handler is ks_inq_length zero comparison, that can be lockless.
MFC after: 2 weeks
(cherry picked from commit
e5018628e76a27e0f61ca03e2aa2247b3c62a158 )
Dimitry Andric [Sat, 21 Aug 2021 14:26:51 +0000 (16:26 +0200)]
Apply upstream clang fix for assertion failure compiling devel/capnproto
Merge commit
48c70c1664aa from llvm git (by Richard Smith):
Extend memset-to-zero optimization to C++11 aggregate functional casts
Aggr{...}.
We previously missed these cases due to not stepping over the additional
AST nodes representing their syntactic form.
Direct commit to stable/12, as both main and stable/13 already have this
fix as part of clang 12.0.1.
Reported by: fernape
PR: 257961
Kyle Evans [Fri, 16 Apr 2021 01:11:35 +0000 (20:11 -0500)]
kern: ether_gen_addr: randomize on default hostuuid, too
Currently, this will still hash the default (all zero) hostuuid and
potentially arrive at a MAC address that has a high chance of collision
if another interface of the same name appears in the same broadcast
domain on another host without a hostuuid, e.g., some virtual machine
setups.
Instead of using the default hostuuid, just treat it as a failure and
generate a random LA unicast MAC address.
Reviewed by: bz, gbe, imp, kbowling, kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29788
(cherry picked from commit
2d741f33bd07bf94a59635db3c7b9e070a8a6e55 )
Kyle Evans [Fri, 16 Apr 2021 01:08:27 +0000 (20:08 -0500)]
man: document ether_gen_addr(9)
This KPI is used to assign a MAC address to an interface that doesn't
already have one assigned.
Reviewed by: bcr, gnn, imp, kbowling, kp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29787
(cherry picked from commit
e58a65ccdac352712e19a60fffa57a86afabbde9 )
Gordon Bergling [Sat, 14 Aug 2021 12:30:59 +0000 (14:30 +0200)]
Fix a typo that was introduced while fixing a typo
- s/enrtry/entry/
(cherry picked from commit
646f3a36c8df0e54e71332038ede594965daac6e )
Gordon Bergling [Sat, 14 Aug 2021 12:17:48 +0000 (14:17 +0200)]
Fix a common typo in source code comments
- s/aligment/alignment/
(cherry picked from commit
a1581cd73594bbbde638859c31226c2c21be1ab3 )
Gordon Bergling [Sat, 14 Aug 2021 11:29:51 +0000 (13:29 +0200)]
Fix a common typo in a comment
- s/enrty/entry/
(cherry picked from commit
86b74b736818a0b025ef520f8a4f570f48741666 )
Gordon Bergling [Sat, 14 Aug 2021 08:08:49 +0000 (10:08 +0200)]
Fix a few typos in source code comments
- s/procesing/processing/
(cherry picked from commit
288e553623d3f8ac33baaabc93a4f030689755d2 )
Gordon Bergling [Sat, 14 Aug 2021 06:55:58 +0000 (08:55 +0200)]
Fix some common typos in source code comments
- s/struture/structure/
- s/structre/structure/
(cherry picked from commit
17db4b52fb41aeabeb945c68c1b5edd4db4eac31 )
Gordon Bergling [Sat, 14 Aug 2021 12:08:46 +0000 (14:08 +0200)]
Fix a common typo in source code comments
- s/definitons/definitions/
(cherry picked from commit
1da11b8ac3474817f38330e272f50553f2ef21a4 )
Gordon Bergling [Sat, 14 Aug 2021 12:48:39 +0000 (14:48 +0200)]
md5(1): Fix a typo in the manual page
- s/compatibilty/compatibility/
(cherry picked from commit
0d71cea832f4b6e1db9d28d3ca393682d577b43e )
Gordon Bergling [Sat, 14 Aug 2021 07:39:17 +0000 (09:39 +0200)]
Fix a few typos in source code comments
- s/posbile/possible/
(cherry picked from commit
34f620f1d0cfa67f5987452ac3fdd8c113b6b099 )
Gordon Bergling [Sat, 14 Aug 2021 07:06:09 +0000 (09:06 +0200)]
Fix a few typos in source code comments
- s/becase/because/
(cherry picked from commit
fa7a635f7ee277960eb37b9102a3aef76b36b825 )
Ed Maste [Mon, 16 Aug 2021 17:16:23 +0000 (13:16 -0400)]
ipfilter: remove doubled semicolons
Local commit; ipfilter upstream is inactive.
Discussed with: cy
MFC after: 3 days
Mateusz Guzik [Fri, 13 Aug 2021 11:32:03 +0000 (13:32 +0200)]
frag6: do less work in frag6_slowtimo if possible
frag6_slowtimo avoidably uses CPU on otherwise idle boxes
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31528
(cherry picked from commit
8afe9481cfa382337b8a885f358fe888bddf5982 )
Mateusz Guzik [Fri, 13 Aug 2021 11:28:39 +0000 (13:28 +0200)]
frag6: drop the volatile keyword from frag6_nfrags and mark with __exclusive_cache_line
The keyword adds nothing as all operations on the var are performed
through atomic_*
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31528
(cherry picked from commit
c17ae18080b4412435aa2fb91cd6e81dd6cd180b )
Mateusz Guzik [Fri, 13 Aug 2021 09:32:16 +0000 (11:32 +0200)]
ip_reass: do less work in ipreass_slowtimo if possible
ipreass_slowtimo avoidably uses CPU on otherwise idle boxes
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31526
(cherry picked from commit
3be3cbe06d6107486d67d8eb80480d34d084c39c )
Mateusz Guzik [Fri, 13 Aug 2021 09:29:57 +0000 (11:29 +0200)]
ip_reass: drop the volatile keyword from nfrags and mark with __exclusive_cache_line
The keyword adds nothing as all operations on the var are performed
through atomic_*
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31526
(cherry picked from commit
d2b95af1c27ed51d72bef5d9f3d89860edc4fd40 )
Ed Maste [Wed, 11 Aug 2021 17:22:23 +0000 (13:22 -0400)]
ar: remove invalid extra param in bsdar_warnc calls
A number of warnings passed an exit status code to bsdar_warnc, but it
does not take exit status (as a warning, it does not exit).
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit
09319f7d3f8aefe8a6b37b1c2a6d842126a2c181 )
Kevin Bowling [Tue, 10 Aug 2021 19:47:22 +0000 (12:47 -0700)]
e1000: rctl/srrctl buffer size init, rfctl fix
Simplify the setup of srrctl.BSIZEPKT on igb class NICs.
Improve the setup of rctl.BSIZE on lem and em class NICs.
Don't try to touch rfctl on lem class NICs.
Manipulate rctl.BSEX correctly on lem and em class NICs.
Approved by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31457
(cherry picked from commit
12e8addd320df995bfb2b00f51c233541f741ae4 )
Marius Strobl [Wed, 27 Jan 2021 14:28:25 +0000 (15:28 +0100)]
e1000: fix build after
92804cf3dc48 (orig
c1655b0f )
(cherry picked from commit
c262e8e87e7b59b768c717c1779ef1ba28507f44 )
Marius Strobl [Sat, 23 Jan 2021 18:18:28 +0000 (19:18 +0100)]
e1000: consistently use the hw variables
It's rather confusing when adapter->hw and hw are mixed and matched
within a particular function.
Some of this was missed in
cd1cf2fc1d49c509ded05dcd41b7600a5957fb9a
and r353778 respectively.
(cherry picked from commit
c1655b0f8998f9e842a004f33e7c9c01c5d9e879 )
Mateusz Piotrowski [Sun, 18 Apr 2021 23:53:06 +0000 (01:53 +0200)]
bhyve.8: Fix mandoc -Tlint issues
While here, keep network backends section consistent with other
sections.
MFC after: 2 weeks
(cherry picked from commit
8d9fefe64334818a27812658bf9efd0371fbc77c )
Mateusz Piotrowski [Sun, 18 Apr 2021 23:50:29 +0000 (01:50 +0200)]
bhyve: Document the format for HD audio backends
- This change is done for consistency with other backend definitions.
MFC after: 2 weeks
(cherry picked from commit
061f37d280976e0f79f823c732fa80825ce48ded )
Mateusz Piotrowski [Sun, 18 Apr 2021 23:44:23 +0000 (01:44 +0200)]
bhyve.8: Improve AHCI backends documentation
- Document the backend format.
MFC after: 2 weeks
(cherry picked from commit
d5fcc4b6066e878ed70bce7a52d6aca605befde5 )
Mateusz Piotrowski [Sun, 18 Apr 2021 23:16:51 +0000 (01:16 +0200)]
bhyve.8: Improve documentation of NVME backend
- Document the configuration format.
- Document two additional configuration options: eui64 and dsm.
MFC after: 2 weeks
(cherry picked from commit
6eff58acc776d8308863f49b89664997d4642a4e )
Mateusz Piotrowski [Sun, 18 Apr 2021 22:59:44 +0000 (00:59 +0200)]
bhyve.8: Improve framebuffer backends description
- Use appropriate mdoc macros
- Document that tcp= is a synonym to rfb= (tcp is used in the examples,
but never mentioned)
- Clarify the IP address specification
MFC after: 2 weeks
(cherry picked from commit
8b97e97548bdc74cf3b4939a0b21cfdd27d8c11c )
Mateusz Piotrowski [Sun, 18 Apr 2021 22:23:26 +0000 (00:23 +0200)]
bhyve.8: Clean up virtio console device backends description
MFC after: 2 weeks
(cherry picked from commit
3f4c771f64e816750de08ab6fd7e7bf29398f5fb )
Mateusz Piotrowski [Sun, 18 Apr 2021 22:09:22 +0000 (00:09 +0200)]
bhyve.8: Clean up TTY, boot ROM, and pass-through descriptions
MFC after: 2 weeks
(cherry picked from commit
2fda01a1b7e958e6cfffda512954b8d6c40a064e )
Mateusz Piotrowski [Sun, 18 Apr 2021 21:49:18 +0000 (23:49 +0200)]
bhyve.8: Clean up SCSI device backends section
MFC after: 2 weeks
(cherry picked from commit
7c5829c942822561688c9b8239900773c6d82db4 )
Mateusz Piotrowski [Sun, 18 Apr 2021 21:39:53 +0000 (23:39 +0200)]
bhyve.8: Clean up block storage device backends description
MFC after: 2 weeks
(cherry picked from commit
5232a35f1ed7b8fa4f378897598438c2056ef60e )
Mateusz Piotrowski [Sun, 18 Apr 2021 21:29:30 +0000 (23:29 +0200)]
bhyve.8: Clean up network backends section
- Reformat the format lists, use appropriate mdoc macros for
readability.
- Add a missing Oxford comma.
MFC after: 2 weeks
(cherry picked from commit
7fb22729816ef6c9e65e5c544047e669edd2f06d )
Mateusz Piotrowski [Sun, 18 Apr 2021 21:08:39 +0000 (23:08 +0200)]
bhyve.8: Improve emulation description of the -s flag
- Set width of the list to the longest key word for readability.
- Separate descriptions of amd_hostbridge and hostbridge emulations.
Also, wordsmith their descriptions for consistency with other entries.
- Use Cm instead of Li for command modifiers.
- Do not stylize AMD with Li, there's no need to do it.
- Fix a typo in the definition of ahci-hd ("hard drive" instead of
"hard-drive").
MFC after: 2 weeks
(cherry picked from commit
7014cb2393594ee4a8389c65d507afacf729c041 )
Mateusz Piotrowski [Sun, 18 Apr 2021 20:56:19 +0000 (22:56 +0200)]
bhyve.8: Clean up the slot description of -s
Also, remove the macros of the nested list which contained slot,
emulation and conf. This decreases the indention of the -s description.
It was necessary to clean up the slot description.
MFC after: 2 weeks
(cherry picked from commit
234d8c470b44160fe0cbce49b972b3b19f246a89 )
Mateusz Piotrowski [Sun, 18 Apr 2021 20:28:47 +0000 (22:28 +0200)]
bhyve.8: Clean-up synopsis of -s
- Document "-s help" separately for readability.
- Use appropriate mdoc macros.
MFC after: 2 weeks
(cherry picked from commit
449f0e48e902ed36ec0de31279eefad9e6200cdc )
Mateusz Piotrowski [Sun, 18 Apr 2021 20:06:12 +0000 (22:06 +0200)]
bhyve.8: Fix indention in the signals table
MFC after: 2 weeks
(cherry picked from commit
3357e9482fe8a0ee153ec62d4bd8cb96966bbf26 )
Mateusz Piotrowski [Sun, 18 Apr 2021 20:01:30 +0000 (22:01 +0200)]
bhyve.8: Fix the synopsis of -p
Use appropriate mdoc macros.
MFC after: 2 weeks
(cherry picked from commit
90df54374f1ce1b94c10c34c2a5b06be0353ebae )
Mateusz Piotrowski [Sun, 18 Apr 2021 19:56:13 +0000 (21:56 +0200)]
bhyve.8: Improve the description of the -m flag
- Stylize the synopsis with proper mdoc macros
- Do some wordsmithing on the description for consistency.
MFC after: 2 weeks
(cherry picked from commit
7e0cb3df687695212ae20cc90d5f2f48bd42eba7 )
Mateusz Piotrowski [Sun, 18 Apr 2021 19:41:15 +0000 (21:41 +0200)]
bhyve.8: Improve the description and synopsis of -l
- Describe "-l help" separately for readability.
- List all the supported comX devices explicitly
- Use Cm instead of Ar for command modifiers (i.e., literal values a
user can specify as an argument to the command).
- Explain where to get more information about the possible values of the
conf argument.
MFC after: 2 weeks
(cherry picked from commit
4c08b978b276f8cfc25f72715e97898f629f7f89 )
Mateusz Piotrowski [Sun, 18 Apr 2021 18:26:04 +0000 (20:26 +0200)]
bhyve.8: Sort the options in the OPTIONS section
No content change intended. Just moving the option descriptions around
to follow the order suggested by style(9).
MFC after: 2 weeks
(cherry picked from commit
ccb1c87a6aa563a927a98a6f9175d95929535b21 )
Mateusz Piotrowski [Sun, 18 Apr 2021 18:13:54 +0000 (20:13 +0200)]
bhyve: Improve the option description in the usage message
- Sort options as suggested by style(9)
- Capitalize some words like CPU and HLT
- Add a missing description for the -G flag
MFC after: 2 weeks
(cherry picked from commit
b6a572d03f654236b929b91d376ad1a6dfaa2e9a )
Mateusz Piotrowski [Sun, 18 Apr 2021 18:04:12 +0000 (20:04 +0200)]
bhyve: Fix synopsis in the usage message
In particular:
- Sort short options to align with style(9)
- Add two missing flags: -G and -r
- Drop unnecessary angle brackets for consistency
- Rename the "vm" argument to vmname for consistency with the manual
page
MFC after: 2 weeks
(cherry picked from commit
03c3e5e40d6497afa33df1d0b43857157c086729 )
Note: the -r flag is not present on branch stable/12.
Mateusz Piotrowski [Sun, 18 Apr 2021 17:54:45 +0000 (19:54 +0200)]
bhyve.8: Make synopsis more readable
There is no need to squeeze all the possible options into one synopsis
entry. Let "-l help" and "-s help" be listed separately.
While here, keep -s and its arguments on the same line.
MFC after: 2 weeks
(cherry picked from commit
bfe40b692d087cdd5fdeea69e18496ab2a7f67ac )
Gordon Bergling [Wed, 11 Aug 2021 07:53:01 +0000 (09:53 +0200)]
ipfw(8): Fix a typo in an error message
- s/suport/support/
(cherry picked from commit
809ad8170aa97e570ef5e1e414b4c25e4b58044c )
Gordon Bergling [Wed, 11 Aug 2021 07:55:08 +0000 (09:55 +0200)]
iscontrol(8): Fix a typo in a struct
- s/suport/support/
(cherry picked from commit
1e1fbf3b47d7296896593b1e477141263b0c555f )
Vladimir Kondratyev [Wed, 14 Jul 2021 10:30:26 +0000 (13:30 +0300)]
psm(4): Probe Synaptics touchpad with active multiplexing mode enabled
if it is only multiplexed device. Also enable syncbit checks for them.
This fixes touchpad recognition on Panasonic Toughbook CF-MX4 laptop.
Reported by: Tomasz "CeDeROM" CEDRO <tomek_AT_cedro_DOT_info>
PR: 253279
Differential revision: https://reviews.freebsd.org/D28502
(cherry picked from commit
f5998d20ed80fdc1cb3ba0c245cae5f179e22fe2 )
Kevin Bowling [Mon, 9 Aug 2021 21:29:31 +0000 (14:29 -0700)]
e1000: Fix lem/em UDP rx csum offload
Rebase on igb code and unify lem/em implementations.
PR: 257642
Reported by: Nick Reilly <nreilly@blackberry.com>
Reviewed by: karels, emaste
Tested by: Nick Reilly <nreilly@blackberry.com>
Approved by: grehan
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31449
(cherry picked from commit
015075f383489fcbedbe8aae7c1c64a3d55ca75e )
Mateusz Piotrowski [Sat, 17 Apr 2021 21:26:54 +0000 (23:26 +0200)]
getprogname.3: Add an example
It shows the difference between getprogname() and argv[0].
Reviewed by: yuripv
Approved by: yuripv (src)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D27204
(cherry picked from commit
1ffdcdadf61423dd02ddad82fc4f3f6c39090c8c )
Mateusz Piotrowski [Fri, 5 Feb 2021 18:38:09 +0000 (19:38 +0100)]
grep: Fix an incorrect description of the -C flag
It seems that the number of lines is no longer an optional parameter to
the -C flag. Document it accordingly both in the manual page and the
usage message.
Reviewed by: yuripv
Approved by: yuripv
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D28509
(cherry picked from commit
be6b8b7a3a18acb3b044e144d946392fca05e5d0 )
Dimitry Andric [Thu, 5 Aug 2021 18:57:22 +0000 (20:57 +0200)]
Add ElfW() macro for compatibility with Linux
Some Linux software using ELF headers assumes the existence of an
ElfW(type) macro, which concatenates 'Elf', the default ELF word size,
and the given type. This is identical to our __ElfN(x) macro in
<sys/elf_generic.h>. Add the macro for compatibility, with a comment
that we prefer the __ElfN() macro for FreeBSD.
Reviewed by: emaste, kib
Differential Revision: https://reviews.freebsd.org/D31427
MFC after: 1 week
(cherry picked from commit
34e7e4b6a059eee5e4e3e34de5b9d5f0d6e589f9 )
Gordon Bergling [Mon, 9 Aug 2021 11:53:30 +0000 (13:53 +0200)]
mkimg(1): Correct a typo in the usage output
- s/partion/partition/
(cherry picked from commit
6bddade6114abacacb30ef2c28781f1af331c106 )
Andrey V. Elsukov [Thu, 5 Aug 2021 08:51:46 +0000 (11:51 +0300)]
Fix panic in IPv6 multicast code.
Add check that ifp supports IPv6 multicasts in in6_getmulti.
This fixes panic when user application tries to join into multicast
group on an interface that doesn't support IPv6 multicasts, like
IFT_PFLOG interfaces.
PR: 257302
Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D31420
(cherry picked from commit
d477a7feed177d0ad5c12bc6e2cce804d427ed38 )
Alexander Motin [Fri, 30 Jul 2021 03:16:22 +0000 (23:16 -0400)]
coretemp(4): Switch to smp_rendezvous_cpus().
Use of smp_rendezvous_cpus() instead of sched_bind() allows to not
block indefinitely if target CPU is running some thread with higher
priority, while all we need is single rdmsr/wrmsr instruction call.
I guess it should also be much cheaper than full thread migration.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
(cherry picked from commit
74f80bc1af2ffd56ec290f610c80e46f768731a0 )
Alexander Motin [Fri, 30 Jul 2021 03:39:04 +0000 (23:39 -0400)]
ipmi(4): Add more watchdog error checks.
Add request submission status checks before checking req->ir_compcode,
otherwise it may be zero just because of initialization.
Add checks for req->ir_compcode errors in ipmi_reset_watchdog() and
ipmi_set_watchdog(). In first case explicitly check for 0x80, which
means timer was not previously set, that I found happening after BMC
cold reset. This change makes watchdog timer to recover instead of
permanently ignoring reset errors after BMC reset or upgraded.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
(cherry picked from commit
9d3b47abbba74830661e90206cc0f692b159c432 )
Gordon Bergling [Mon, 9 Aug 2021 11:45:10 +0000 (13:45 +0200)]
nanobsd: Correct a typo in a comment
- s/partion/partition/
(cherry picked from commit
8b9f6d62f75a367459997e5bb27d86d0302aedd2 )
Mitchell Horne [Wed, 4 Aug 2021 18:20:50 +0000 (15:20 -0300)]
Prefer MK_SSP=no to SSP_CFLAGS=
It is more idiomatic. CFLAGS is only augmented with $SSP_CFLAGS when
$MK_SSP != "no".
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31401
(cherry picked from commit
61ed578ee66648eff206ee5622b66727bfb52e78 )
Mitchell Horne [Wed, 4 Aug 2021 18:17:34 +0000 (15:17 -0300)]
mk: format some option lists
Alphabetize and give each option its own line, ahead of making another
change to these lists. This makes future diffs easier to read.
Reviewed by: imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31399
(cherry picked from commit
bcd2f41f7d222a942fe0a268614b46d3ec3af4c0 )
Mitchell Horne [Wed, 4 Aug 2021 17:31:36 +0000 (14:31 -0300)]
hwpmc: disable uncore class on Sandy Bridge and newer
It was written for Nehalem and Westmere, with minor but incomplete
updates for Sandy Bridge in
78d763a29b15 . The uncore architecture
changed significantly with this generation, bringing new layouts and
locations for some MSRs.
Misprogramming these MSRs in ucp_start_pmc() may panic the system, and
this is trivially reproducible via pmcstat(8) on at least Broadwell and
Haswell. Disable the class on these CPUs until it can be updated more
completely and leave a TODO comment detailing some of the work required.
Note that the nclasses value for Broadwell was already incorrect and
doesn't need changing.
The result is that any uncore events listed by pmcstat -L will no longer
be allocatable, but this is already the case for newer generations of
Intel CPUs.
PR: 253687
Reported by: Zhenlei Huang <zlei.huang@gmail.com>
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31389
(cherry picked from commit
4f35e8cba232d9256ab1399b8adfb761988e5eff )
Mateusz Guzik [Sat, 24 Jul 2021 07:47:40 +0000 (09:47 +0200)]
pf: batch critical section for several counters
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
87c010e6e364e96e2c1546b3c2bbcbef1dcd422f )
Mateusz Guzik [Thu, 22 Jul 2021 14:45:14 +0000 (16:45 +0200)]
pf: switch rule counters to pf_counter_u64
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
02cf67ccf6538b14677672640e405f7f94044dc3 )
Mateusz Guzik [Fri, 23 Jul 2021 10:29:46 +0000 (12:29 +0200)]
pf: switch kif counters to pf_counter_u64
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
d40d4b3ed788b05697541b9ae94b1960ff2cf6f6 )
Mateusz Guzik [Sat, 24 Jul 2021 05:33:52 +0000 (07:33 +0200)]
pf: switch pf_status.fcounters to pf_counter_u64
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
fc4c42ce0b5ce87901b327e25f55b4e3ab4c6cf5 )
Mateusz Guzik [Thu, 22 Jul 2021 20:47:24 +0000 (22:47 +0200)]
pf: add hybrid 32- an 64- bit counters
Numerous counters got migrated from straight uint64_t to the counter(9)
API. Unfortunately the implementation comes with a significiant
performance hit on some platforms and cannot be easily fixed.
Work around the problem by implementing a pf-specific variant.
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
defdcdd5648dc1ea789bc54bb45108fcab546a6b )
Mateusz Guzik [Sat, 24 Jul 2021 05:17:27 +0000 (07:17 +0200)]
pf: drop redundant 'else' in pf_normalize_*
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
6f1fb6561236fa933835a9a67bd442053fb509e9 )
Mateusz Guzik [Fri, 23 Jul 2021 15:01:29 +0000 (17:01 +0200)]
pf: consistently malloc rules with M_ZERO
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
49a7d47235434a300cc57b205e493988fdebf79c )
Mateusz Guzik [Fri, 23 Jul 2021 17:34:43 +0000 (17:34 +0000)]
pf: hide struct pf_kstatus behind ifdef _KERNEL
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit
d9cc6ea270ea52e860e3cc730876ee4324081586 )