]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 months agovm_page: Fix a logic error in the handling of PQ_ACTIVE operations
Mark Johnston [Wed, 5 Oct 2022 19:12:46 +0000 (15:12 -0400)]
vm_page: Fix a logic error in the handling of PQ_ACTIVE operations

As an optimization, vm_page_activate() avoids requeuing a page that's
already in the active queue.  A page's location in the active queue is
mostly unimportant.

When a page is unwired and placed back in the page queues,
vm_page_unwire() avoids moving pages out of PQ_ACTIVE to honour the
request, the idea being that they're likely mapped and so will simply
get bounced back in to PQ_ACTIVE during a queue scan.

In both cases, if the page was logically in PQ_ACTIVE but had not yet
been physically enqueued (i.e., the page is in a per-CPU batch), we
would end up clearing PGA_REQUEUE from the page.  Then, batch processing
would ignore the page, so it would end up unwired and not in any queues.
This can arise, for example, when a page is allocated and then
vm_page_activate() is called multiple times in quick succession.  The
result is that the page is hidden from the page daemon, so while it will
be freed when its VM object is destroyed, it cannot be reclaimed under
memory pressure.

Fix the bug: when checking if a page is in PQ_ACTIVE, only perform the
optimization if the page is physically enqueued.

PR: 256507
Fixes: f3f38e2580f1 ("Start implementing queue state updates using fcmpset loops.")
Reviewed by: alc, kib
Sponsored by: E-CARD Ltd.
Sponsored by: Klara, Inc.

(cherry picked from commit 2c9dc2384f85a4ccc44a79b349f4fb0253a2f254)

19 months agoRevert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"
Kevin Bowling [Wed, 12 Oct 2022 12:01:12 +0000 (05:01 -0700)]
Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"

This reverts commit 9ab4dfce8feda8cf3545be0c3c7569095b1fcd24.

OPNsense users have reported a regression with fixed configs.

The e1000 api is not ready for this change.

(cherry picked from commit 66dad2db0a484d65df331df76db0b68ef518f4db)

19 months agodf: do not report a 100% full inode usage on fs without inodes
Baptiste Daroussin [Thu, 10 Mar 2022 14:28:50 +0000 (15:28 +0100)]
df: do not report a 100% full inode usage on fs without inodes

Before:
devfs    2        2         0   100%       0          0  100%   /dev

After:
devfs    2        2         0   100%       0          0     -   /dev

The previous behaviour was confusing for end users and many monitoring tools

Note the linux df tools is also using the same syntax '-' for such filesystem

MFC After: 2 weeks
Reviewed by: manu, emaste, imp
Differential Revision: https://reviews.freebsd.org/D34515

(cherry picked from commit 2eee44bd5ebcb88bf304215be1b0c68b6802a924)

19 months agolocate: change from BSD-4-clause to BSD-3-clause
Baptiste Daroussin [Tue, 25 Jan 2022 08:17:36 +0000 (09:17 +0100)]
locate: change from BSD-4-clause to BSD-3-clause

We have the authorization from the University of California to remove
the advertising clause for a while, wosch@ who also hold a copyright
on this code also approved the relicensing

Approved by: wosch@
MFC after: 3 days

(cherry picked from commit 389844c058ec1ab69bb506601ed673fdd4e4d12b)

19 months agosh(1): fix home/del key on mobaxterm env
Baptiste Daroussin [Wed, 20 Oct 2021 11:58:18 +0000 (13:58 +0200)]
sh(1): fix home/del key on mobaxterm env

For $reason mobaxterm default on sending unusual sequence from home/del
key, which makes libedit unabel to catch them and bind them correctly.

mobaxterm seems popular on the windows environment, so add proper
keybinding to default shrc configuration so it works out of box.

Reported by: lme

(cherry picked from commit f3aad18d5e57328469be0e3be9e17d7bc48e6822)

19 months agoskel: update .shrc as well
Baptiste Daroussin [Wed, 20 Oct 2021 09:23:13 +0000 (11:23 +0200)]
skel: update .shrc as well

Somehow we end up having 2 definition of the same .shrc in the source
tree, both of them should have been updated.

A batter fix would be to only keep one copy of the same file. but that
would be for another commit

Reported by: lme

(cherry picked from commit 5fe97373486619373e3eeecb25582b5c937a26c5)

19 months agosh(1): interactive mode improvement
Baptiste Daroussin [Tue, 19 Oct 2021 06:37:47 +0000 (08:37 +0200)]
sh(1): interactive mode improvement

In the default configuration add 2 bindings which has been requested by
many during the HEADSUP discussion:
* csh like arrow history navigation
* ctrl-arrow to jump from word to words

Add an alias to make the history command exist as an alias to fc -l.

(cherry picked from commit ef0d94a3d34c880bd9f86cd842ee01b6075bc1d8)

19 months agomandoc: import version 1.14.6
Baptiste Daroussin [Mon, 15 Nov 2021 15:54:38 +0000 (16:54 +0100)]
mandoc: import version 1.14.6

MFC after: 3 weeks

(cherry picked from commit 6d38604fc532a3fc060788e3ce40464b46047eaf)

19 months ago/usr/sbin/pkg: don't sleep on fetch failure
John Hood [Thu, 21 Apr 2022 21:39:14 +0000 (17:39 -0400)]
/usr/sbin/pkg: don't sleep on fetch failure

PR: 263458
(cherry picked from commit 60b92ba9323c2dd249ba3a3349b207c2d0b9d212)

19 months agopci_vendors: udpate to 2022-05-18
Baptiste Daroussin [Fri, 10 Jun 2022 10:55:43 +0000 (12:55 +0200)]
pci_vendors: udpate to 2022-05-18

(cherry picked from commit 60408c23c9505de0366aa21ce61eb57bd528d1ad)

19 months agoupdate to 2022-03-22
Baptiste Daroussin [Thu, 14 Apr 2022 14:15:47 +0000 (16:15 +0200)]
update to 2022-03-22

(cherry picked from commit 4fea9c7cfeac7878872080406c4e1704563eef56)

19 months agopci_vendors: update to 2022.03.06
Baptiste Daroussin [Fri, 11 Mar 2022 09:48:04 +0000 (10:48 +0100)]
pci_vendors: update to 2022.03.06

(cherry picked from commit 7da4ef4ef21dfc0c56c5b07fb1c253e4d31db494)

19 months agopci_vendors: update to 2022-01-15
Baptiste Daroussin [Wed, 19 Jan 2022 08:58:13 +0000 (09:58 +0100)]
pci_vendors: update to 2022-01-15

(cherry picked from commit 6521372e95bdd9e4ab444eee2d5cbe1534004cac)

19 months agopci_vendors: update to 2021-11-24
Baptiste Daroussin [Fri, 26 Nov 2021 07:52:20 +0000 (08:52 +0100)]
pci_vendors: update to 2021-11-24

(cherry picked from commit ecff38de76ded358558aacc62c1081da4451c8fb)

19 months agolibedit: import version of 2022-04-11
Baptiste Daroussin [Thu, 14 Apr 2022 14:46:47 +0000 (16:46 +0200)]
libedit: import version of 2022-04-11

It includes improvements in the libreadline compatibility and a change
from pstef@ which fixes filename autocompletion for strings like a\)b

(cherry picked from commit 7f39937557052c004d7ebf55dd973108323756f3)

19 months agolibedit: import snapshot 2021-09-10
Baptiste Daroussin [Wed, 22 Sep 2021 08:19:43 +0000 (10:19 +0200)]
libedit: import snapshot 2021-09-10

(cherry picked from commit 91f764172e197c82efa97a66cfbc13d2c744b02b)

19 months agoident: replace sbuf(9) with open_memstream(3)
Baptiste Daroussin [Thu, 28 Oct 2021 13:39:24 +0000 (15:39 +0200)]
ident: replace sbuf(9) with open_memstream(3)

This change makes ident only dependant on libc functions

This makes our ident(1) more portable, also the fact that we only
depend on libc which is maintained with excellent backward compatibility
means that if one day ident is removed from base, someone using FreeBSD
22 will be able to fetch ident from FreeBSD 14 to run ident against
FreeBSD 1.0 binary

MFC After: 1 week

(cherry picked from commit 1a4d5f13ba19308f9909ef712c5d7eebaf1f9806)

19 months agoopenssl: install pc files
Baptiste Daroussin [Fri, 26 Aug 2022 14:02:09 +0000 (16:02 +0200)]
openssl: install pc files

most programs in ports are looking for .pc files in order to get the
necessary information on how to compile and link against openssl.

The ports now also has a way to hide or force a path for pkgconf.

Providing .pc files along with openssl in base will allow (once all
the supported version of FreeBSD has it) so improve the framework to
deal with openssl in base vs openssl in ports (and libressl)

This will also greatly reduce the number of patches necessary to
workaround the build systems which only knows how to detect where
openssl is installed via pkgconf.

PR: 266051
MFC After: 3 weeks
Reviewed by: jkim, delphij
Exp-run by: antoine
Differential Revision: https://reviews.freebsd.org/D36360

(cherry picked from commit b323fa85f15268ac44b8ff90faf90bce5d87b608)

19 months agocopy_file_range: truncate write if it would exceed RLIMIT_FSIZE
Alan Somers [Sun, 25 Sep 2022 22:53:36 +0000 (16:53 -0600)]
copy_file_range: truncate write if it would exceed RLIMIT_FSIZE

PR: 266611
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D36706

(cherry picked from commit 52360ca32ff90b605ac7481fd79e6a251e8b5116)

19 months agofusefs: truncate write if it would exceed RLIMIT_FSIZE
Alan Somers [Sun, 25 Sep 2022 18:59:33 +0000 (12:59 -0600)]
fusefs: truncate write if it would exceed RLIMIT_FSIZE

PR: 164793
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D36703

(cherry picked from commit be280f60dd8e8ef765a76966aac9c6ca7d6264d0)

19 months agofusefs: respect RLIMIT_FSIZE during truncate
Alan Somers [Sun, 25 Sep 2022 17:56:11 +0000 (11:56 -0600)]
fusefs: respect RLIMIT_FSIZE during truncate

PR: 164793
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D36703

(cherry picked from commit 0a192b3abab19deac70f762cd1ec45ba09ec47ca)

19 months agorb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.
John Baldwin [Thu, 29 Sep 2022 22:05:22 +0000 (15:05 -0700)]
rb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.

Reviewed by: dougm
Reported by: GCC -Wunused-value
Differential Revision: https://reviews.freebsd.org/D36778

(cherry picked from commit 1aef571102e2d56b062916d69d962e8eeecfd1bf)

19 months agorb_tree: add augmentation comments
Doug Moore [Mon, 26 Sep 2022 17:39:16 +0000 (12:39 -0500)]
rb_tree: add augmentation comments

Add comments to better explain why augmentation is done in several places.
Reviewed by: alc
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36646

(cherry picked from commit b5b07c71e83637af8a2507ef96c32bc7e2d226c6)

19 months agoUse 0 and 1, not false and true, in tree.h changes.
Doug Moore [Wed, 21 Sep 2022 04:36:40 +0000 (23:36 -0500)]
Use 0 and 1, not false and true, in tree.h changes.
Reported by: jenkins

(cherry picked from commit 86d00db451f7b9fcc06e5a507cced4b20aa55ade)

19 months agorb_tree: augmentation shortcut
Doug Moore [Wed, 21 Sep 2022 04:21:14 +0000 (23:21 -0500)]
rb_tree: augmentation shortcut

RB-tree augmentation maintains data in each node of the tree that
represents the product of some associative operator applied to all the
nodes of the subtree rooted at that node. If a node in the tree
changes, augmentation data for the node is updated for that node and
all nodes on the path from that node to the tree root. However,
sometimes, augmenting a node changes no data in that node,
particularly if the associated operation is something involving 'max'
or 'min'. If augmentation changes nothing in a node, then the work of
walking to the tree root from that point is pointless, because
augmentation will change nothing in those nodes either. This change
makes it possible to avoid that wasted work.

Define RB_AUGMENT_CHECK as a macro much like RB_AUGMENT, but which
returns a value 'true' when augmentation changes the augmentation data
of a node, and false otherwise. Change code that unconditionally walks
and augments to the top of tree to code that stops once an
augmentation has no effect. In the case of rebalancing the tree after
insertion or deletion, where previously a node rotated into the path
was inevitably augmented on the march to the tree root, now check to
see if it needs augmentation because the march to the tree root
stopped before reaching it.

Change the augmentation function in iommu_gas.c so that it returns
true/false to indicate whether the augmentation had any effect.

Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36509

(cherry picked from commit b16f993ec2cafe48fae96ca0eb27224951b30d7e)

19 months agorb_tree: pass parent to RB_INSERT_COLOR
Doug Moore [Tue, 13 Sep 2022 06:11:47 +0000 (01:11 -0500)]
rb_tree: pass parent to RB_INSERT_COLOR

Change RB_COLOR_INSERT to take a parent parameter, to avoid looking up
a value already available. Make adjustments to a linux rbtree header,
which invokes it.

Reviewed by: alc, hselasky
Differential Revision: https://reviews.freebsd.org/D36114

(cherry picked from commit 4893472c9a18cd8ce3b68d0c54084ef6f0285d0f)

19 months agoiommu_gas: don't remove and insert boundary entry
Doug Moore [Fri, 16 Sep 2022 20:32:11 +0000 (15:32 -0500)]
iommu_gas: don't remove and insert boundary entry

Avoid removing an item in iommu_gas_free_region only to reinsert it,
by avoiding removing an entry that is either first_place or
last_place.

Reviewed by: kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36597

(cherry picked from commit 87cd087a4ae7b272986ce3bcf27ffe4930f15e55)

19 months agoAdd mbuf_tstmp2timeval()
Konstantin Belousov [Mon, 3 Oct 2022 22:49:45 +0000 (01:49 +0300)]
Add mbuf_tstmp2timeval()

(cherry picked from commit 2220b66fe0d5c2dfdaf3c22dcec3771665874d69)

19 months agosmr: Fix synchronization in smr_enter()
Mark Johnston [Sat, 24 Sep 2022 13:18:04 +0000 (09:18 -0400)]
smr: Fix synchronization in smr_enter()

smr_enter() must publish its observed read sequence number before
issuing any subsequent memory operations.  The ordering provided by
atomic_add_acq_int() is insufficient on some platforms, at least on
arm64, because it permits reordering of subsequent loads with the store
to c_seq.

Thus, use atomic_thread_fence_seq_cst() to issue a store-load barrier
after publishing the read sequence number.

On x86, take advantage of the fact that memory operations are not
reordered with locked instructions to improve code density: we can store
the observed read sequence and provide a store-load barrier with a
single operation.

Based on a patch from Pierre Habouzit <pierre@habouzit.net>.

PR: 265974
Reviewed by: alc

(cherry picked from commit 8694fd333556addb97acfff1feca6a1e389201ce)

19 months agoriscv: Apply 8d7ee2047c5e to the riscv pmap
Mark Johnston [Tue, 4 Oct 2022 16:49:36 +0000 (12:49 -0400)]
riscv: Apply 8d7ee2047c5e to the riscv pmap

Reviewed by: alc

(cherry picked from commit d5dc278eeca341cf1b5199c7c6ba70553bbb44a0)

19 months agoriscv: better CTR messages in pmap_enter_l2()
Mitchell Horne [Thu, 25 Aug 2022 20:08:41 +0000 (17:08 -0300)]
riscv: better CTR messages in pmap_enter_l2()

Disambiguate the failure cases.

Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36562

(cherry picked from commit dd18b62cec6228c17aef428a575f44152ea55d53)

19 months agoriscv: move GEOM_PART_GPT option to DEFAULTS
Mitchell Horne [Tue, 14 Jun 2022 17:19:46 +0000 (14:19 -0300)]
riscv: move GEOM_PART_GPT option to DEFAULTS

This is consistent with other architectures.

(cherry picked from commit 3a91cecea412cc6c73d10f7594a3b6f472748b9d)

19 months agoamd64: Make it possible to grow the KERNBASE region of KVA
Mark Johnston [Sat, 24 Sep 2022 13:19:21 +0000 (09:19 -0400)]
amd64: Make it possible to grow the KERNBASE region of KVA

pmap_growkernel() may be called when mapping a region above KERNBASE,
typically for a kernel module.  If we have enough PTPs left over from
bootstrap, pmap_growkernel() does nothing.  However, it's possible to
run out, and in this case pmap_growkernel() will try to grow the kernel
map all the way from kernel_vm_end to somewhere past KERNBASE, which can
easily run the system out of memory.  This happens with large kernel
modules such as the nvidia GPU driver.  There is also a WIP dtrace
provider which needs to map KVA in the region above KERNBASE (to provide
trampolines which allow a copy of traced kernel instruction to be
executed), and its allocations could potentially trigger this scenario.

This change modifies pmap_growkernel() to manage the two regions
separately, allowing them to grow independently.  The end of the
KERNBASE region is tracked by modifying "nkpt".

PR: 265019
Reviewed by: alc, imp, kib

(cherry picked from commit 0b29f5efcc7ee8271ad2f6b6447898b489d618ec)

19 months agostty(1): provide details about interaction with job control
Konstantin Belousov [Mon, 26 Sep 2022 21:34:22 +0000 (00:34 +0300)]
stty(1): provide details about interaction with job control

PR: 266627

(cherry picked from commit a7eac018437e592a575f46a59151eedc7a742fa7)

19 months agonfs_clvnops.c: Fix access to v_mount when vnode unlocked
Rick Macklem [Sat, 1 Oct 2022 23:30:07 +0000 (16:30 -0700)]
nfs_clvnops.c: Fix access to v_mount when vnode unlocked

Commit ab17854f974b fixed access to v_mount when the
vnode is unlocked for nfs_copy_file_range().

This patch does the same for nfs_advlockasync().

(cherry picked from commit a82308abab86740e9bc37499bd2a13568764d7a0)

19 months agotmpfs: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE
Konstantin Belousov [Sun, 18 Sep 2022 13:27:28 +0000 (16:27 +0300)]
tmpfs: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE

PR: 164793

(cherry picked from commit 8bdb2695d69710b7f2e7cc20820aab8b3f4668a6)

19 months agomsdosfs: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE
Konstantin Belousov [Sun, 18 Sep 2022 11:51:33 +0000 (14:51 +0300)]
msdosfs: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE

PR: 164793

(cherry picked from commit a9c439ba104d83a2666d114dae9f26b2efb22d17)

19 months agoFFS: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE
Konstantin Belousov [Sun, 18 Sep 2022 11:48:40 +0000 (14:48 +0300)]
FFS: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE

PR: 164793

(cherry picked from commit 87525ef94007c792c6745db7938251a663ca5706)

19 months agoAdd vn_rlimit_fsizex() and vn_rlimit_fsizex_res()
Konstantin Belousov [Sun, 18 Sep 2022 11:46:19 +0000 (14:46 +0300)]
Add vn_rlimit_fsizex() and vn_rlimit_fsizex_res()

PR: 164793

(cherry picked from commit 1b4b75171ee3f2213b7671878a910fd5ddb3306e)

19 months agotmpfs: disallow truncation to set file size past RLIMIT_FSIZE
Konstantin Belousov [Sun, 18 Sep 2022 13:28:11 +0000 (16:28 +0300)]
tmpfs: disallow truncation to set file size past RLIMIT_FSIZE

PR: 164793

(cherry picked from commit b5b16659c5aceb9caa0a9b76c7746e1d12a505ce)

19 months agomsdosfs: disallow truncation to set file size past RLIMIT_FSIZE
Konstantin Belousov [Sun, 18 Sep 2022 11:51:03 +0000 (14:51 +0300)]
msdosfs: disallow truncation to set file size past RLIMIT_FSIZE

PR: 164793

(cherry picked from commit 701b73858e3afa15d8ca2ea4aa480173ccc5960e)

19 months agoUFS: disallow truncation to set file size past RLIMIT_FSIZE
Konstantin Belousov [Sun, 18 Sep 2022 11:49:57 +0000 (14:49 +0300)]
UFS: disallow truncation to set file size past RLIMIT_FSIZE

PR: 164793

(cherry picked from commit 70385088cafaab3365c5243f22b8fc9c712c1fde)

19 months agoAdd vn_rlimit_trunc()
Konstantin Belousov [Sun, 18 Sep 2022 19:52:13 +0000 (22:52 +0300)]
Add vn_rlimit_trunc()

(cherry picked from commit 2ac083f60f8c9ce361c3daf691c60486459d87ae)

19 months agofilesystems: return error from vn_rlimit_fsize() instead of EFBIG
Konstantin Belousov [Sun, 18 Sep 2022 14:44:49 +0000 (17:44 +0300)]
filesystems: return error from vn_rlimit_fsize() instead of EFBIG

(cherry picked from commit cc65a412ae226136e6207bdc8db4722dab99982f)

19 months agotmpfs_subr.c: some style
Konstantin Belousov [Sun, 18 Sep 2022 13:20:24 +0000 (16:20 +0300)]
tmpfs_subr.c: some style

(cherry picked from commit 0f01fb01c2de3e2c9ce8719750aea379c402ece6)

19 months agolibc: Fix size range check in setvbuf
Ed Maste [Mon, 3 Oct 2022 18:24:42 +0000 (14:24 -0400)]
libc: Fix size range check in setvbuf

From enh at google.com via openbsd-tech mailing list via pfg@:

The existing test is wrong for LP64, where size_t has twice as many
relevant bits as int, not just one. (Found by inspection by
rprichard.)

(cherry picked from commit 9515313b26beb005a521aff2e6edd4d75cd010da)

19 months agovmstat: remove processor counting from getcpuinfo()
Elliott Mitchell [Thu, 29 Sep 2022 16:27:24 +0000 (09:27 -0700)]
vmstat: remove processor counting from getcpuinfo()

(cherry picked from commit 42dc8696df5e3004ea65fd315aba500d269dbcbf)

19 months agosshd: update the libwrap patch to drop connections early
Gleb Smirnoff [Mon, 3 Jan 2022 02:32:30 +0000 (18:32 -0800)]
sshd: update the libwrap patch to drop connections early

OpenSSH has dropped libwrap support in OpenSSH 6.7p in 2014
(f2719b7c in github.com/openssh/openssh-portable) and we
maintain the patch ourselves since 2016 (a0ee8cc636cd).

Over the years, the libwrap support has deteriotated and probably
that was reason for removal upstream.  Original idea of libwrap was
to drop illegitimate connection as soon as possible, but over the
years the code was pushed further down and down and ended in the
forked client connection handler.

The negative effects of late dropping is increasing attack surface
for hosts that are to be dropped anyway.  Apart from hypothetical
future vulnerabilities in connection handling, today a malicious
host listed in /etc/hosts.allow still can trigger sshd to enter
connection throttling mode, which is enabled by default (see
MaxStartups in sshd_config(5)), effectively casting DoS attack.
Note that on OpenBSD this attack isn't possible, since they enable
MaxStartups together with UseBlacklist.

A only negative effect from early drop, that I can imagine, is that
now main listener parses file in /etc, and if our root filesystems
goes bad, it would get stuck.  But unlikely you'd be able to login
in that case anyway.

Implementation details:

- For brevity we reuse the same struct request_info.  This isn't
  a documented feature of libwrap, but code review, viewing data
  in a debugger and real life testing shows that if we clear
  RQ_CLIENT_NAME and RQ_CLIENT_ADDR every time, it works as intended.
- We set SO_LINGER on the socket to force immediate connection reset.
- We log message exactly as libwrap's refuse() would do.

Differential revision: https://reviews.freebsd.org/D33044

(cherry picked from commit ca573c9a1779bdeeea6d0a6e948676555977737e)

19 months agossh-keysign: fix double free in error path
Ed Maste [Tue, 4 Oct 2022 20:34:15 +0000 (16:34 -0400)]
ssh-keysign: fix double free in error path

From OpenSSH-portable commit 141535b904b6, OpenBSD commit 3d21aa127b1f.

MFC after: 3 days

(cherry picked from commit 963c7b084b8bf2397deced4f568b976a42611910)

19 months agossh-keygen: fix double free in error path
Ed Maste [Tue, 4 Oct 2022 20:31:39 +0000 (16:31 -0400)]
ssh-keygen: fix double free in error path

From OpenSSH-portable commit 5062ad48814b, OpenBSD commit 39f35e16ba87.

MFC after: 3 days

(cherry picked from commit 666605ad2df3f5c1fb973dbd719ffbe3f3935c1d)

19 months agossh-keyscan: Strictly enforce the maximum allowed SSH2 banner size
Ed Maste [Tue, 4 Oct 2022 20:28:13 +0000 (16:28 -0400)]
ssh-keyscan: Strictly enforce the maximum allowed SSH2 banner size

From OpenSSH-portable commit ff89b1bed807, OpenBSD commit 6ae664f9f4db.

MFC after: 3 days

(cherry picked from commit 5e5ebbee81bfd1c034caffa00d58d4e06e1b26ee)

19 months agossh: drop $FreeBSD$ from crypto/openssh
Ed Maste [Fri, 22 Apr 2022 23:05:44 +0000 (19:05 -0400)]
ssh: drop $FreeBSD$ from crypto/openssh

After we moved to git $FreeBSD$ is no longer expanded and serves no
purpose.  Remove them from OpenSSH to reduce diffs against upstream.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 835ee05f3c754d905099a3500f421dc01fab028f)

19 months agossh: update to OpenSSH v9.0p1
Ed Maste [Fri, 15 Apr 2022 14:41:08 +0000 (10:41 -0400)]
ssh: update to OpenSSH v9.0p1

Release notes are available at https://www.openssh.com/txt/release-9.0

Some highlights:

 * ssh(1), sshd(8): use the hybrid Streamlined NTRU Prime + x25519 key
   exchange method by default ("sntrup761x25519-sha512@openssh.com").
   The NTRU algorithm is believed to resist attacks enabled by future
   quantum computers and is paired with the X25519 ECDH key exchange
   (the previous default) as a backstop against any weaknesses in
   NTRU Prime that may be discovered in the future. The combination
   ensures that the hybrid exchange offers at least as good security
   as the status quo.

 * sftp-server(8): support the "copy-data" extension to allow server-
   side copying of files/data, following the design in
   draft-ietf-secsh-filexfer-extensions-00. bz2948

 * sftp(1): add a "cp" command to allow the sftp client to perform
   server-side file copies.

This commit excludes the scp(1) change to use the SFTP protocol by
default; that change will immediately follow.

MFC after: 1 month
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 87c1498d1a7473ff983e5c0456f30608f3f1e601)
(cherry picked from commit 9fce8d4140370ca8bc03d6a5668fb64a040c00fc)
(cherry picked from commit e2cec5ba2c4385eec0b76d07469ec11d3ce3d6e2)

19 months agossh: update to OpenSSH v8.9p1
Ed Maste [Wed, 13 Apr 2022 20:00:56 +0000 (16:00 -0400)]
ssh: update to OpenSSH v8.9p1

Release notes are available at https://www.openssh.com/txt/release-8.9

Some highlights:

 * ssh(1), sshd(8), ssh-add(1), ssh-agent(1): add a system for
   restricting forwarding and use of keys added to ssh-agent(1)

 * ssh(1), sshd(8): add the sntrup761x25519-sha512@openssh.com hybrid
   ECDH/x25519 + Streamlined NTRU Prime post-quantum KEX to the
   default KEXAlgorithms list (after the ECDH methods but before the
   prime-group DH ones). The next release of OpenSSH is likely to
   make this key exchange the default method.

 * sshd(8), portable OpenSSH only: this release removes in-built
   support for MD5-hashed passwords. If you require these on your
   system then we recommend linking against libxcrypt or similar.

Future deprecation notice
=========================

A near-future release of OpenSSH will switch scp(1) from using the
legacy scp/rcp protocol to using SFTP by default.

Legacy scp/rcp performs wildcard expansion of remote filenames (e.g.
"scp host:* .") through the remote shell. This has the side effect of
requiring double quoting of shell meta-characters in file names
included on scp(1) command-lines, otherwise they could be interpreted
as shell commands on the remote side.

MFC after: 1 month
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 1323ec571215a77ddd21294f0871979d5ad6b992)
(cherry picked from commit 58def461e256e3a05c3ff15a87ed702fe0c3662c)

19 months agonfscl: Fix parameter order in the calls to MGET().
Zhenlei Huang [Fri, 23 Sep 2022 21:04:36 +0000 (15:04 -0600)]
nfscl: Fix parameter order in the calls to MGET().

(cherry picked from commit 8b43388c745ebb42414496f2925f47acac662c2f)

19 months agoipfilter/libipf: printpool_live() consumer ignores return code
Cy Schubert [Thu, 22 Sep 2022 18:26:23 +0000 (11:26 -0700)]
ipfilter/libipf: printpool_live() consumer ignores return code

The single consumer of printpool_live() ignores the return code.
Avoid wasting resources on this.

(cherry picked from commit 00d8a28f19b21ce2955c0cf24a040824ec506da5)

19 months agoipfilter/ippool: Return error code when listing a pool fails
Cy Schubert [Thu, 22 Sep 2022 13:00:09 +0000 (06:00 -0700)]
ipfilter/ippool: Return error code when listing a pool fails

When an internal or other error occurs during the listing of a pool,
return an error code when extiting ippool(8). Printing an error to
stderr without returning an error code is useless in shell scripts.

(cherry picked from commit 5568c8b2c58a65a07b42af0e09c3fc619f13316c)

19 months agoipfilter/ippool: Dump a copy of ippool in ippool.conf format
Cy Schubert [Wed, 21 Sep 2022 15:33:11 +0000 (08:33 -0700)]
ipfilter/ippool: Dump a copy of ippool in ippool.conf format

Add an ippool(8) option to dump a copy of the inm-memory ippool tables
in an ippool(5) format so that it can be reloaded using ippool -f.

(cherry picked from commit 7531c434a593b2f369d69c85551e7ad1ebb7499a)

19 months agopowerpc: slb_alloc_user_cache: fix missing uma_zalloc wait flag
Alfredo Dal'Ava Junior [Mon, 3 Oct 2022 23:22:14 +0000 (20:22 -0300)]
powerpc: slb_alloc_user_cache: fix missing uma_zalloc wait flag

Flags should be M_WAITOK | M_ZERO instead of just M_ZERO

Reviewed by: markj
MFC after: 2 days
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D36865

(cherry picked from commit ff80ab1cebd61d08598fd248fb6e70782ba72e4a)

19 months agopowerpc: cpuset: add local functions for copyin/copyout
Alfredo Dal'Ava Junior [Mon, 3 Oct 2022 14:51:05 +0000 (11:51 -0300)]
powerpc: cpuset: add local functions for copyin/copyout

Add local functions to workaround an instruction segment trap (panic)
when the indirect functions copyin and copyout are called by an external
loadable kernel module (i.e. pfsync, zfs and linuxulator). The crash
was triggered by change 47a57144af25a7bd768b29272d50a36fdf2874ba, but
kernel binary linked with LLD 9 works fine. LLVM bisect points that LLD
behavior chaged after dc06b0bc9ad055d06535462d91bfc2a744b2f589.

This is know to affect powerpc targets only and the final fix is still
being discussed with the LLVM community.

PR: 266730
Reviewed by: luporl, jhibbits (on IRC, previous version)
MFC after: 2 days
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D36234

(cherry picked from commit db79bf75ac9eb1b5678ccbaebb45fb88c0e0e1e3)

19 months agopowerpcspe: make GEOM_LABEL kernel built-in
Alfredo Dal'Ava Junior [Tue, 2 Aug 2022 21:11:11 +0000 (18:11 -0300)]
powerpcspe: make GEOM_LABEL kernel built-in

Make powerpspe kernel config in sync with other targets making
GEOM_LABEL built-in to allow use of labels when mounting partitions.

MFC after: 2 days
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)

(cherry picked from commit 8b57548e9a38ffbb122947043bafabb92b037fb3)

19 months agonfs: skip bootpc when vfs.root.mountfrom is other than nfs
Alfredo Dal'Ava Junior [Tue, 31 May 2022 19:03:43 +0000 (16:03 -0300)]
nfs: skip bootpc when vfs.root.mountfrom is other than nfs

If "vfs.root.mountfrom" is set and the value is something other
than "nfs:*", it means the user doesn't want to mount root via nfs,
there's no reason to continue with bootpc

This fixes the powerpcspe kernel (MPC85XXSPE) that's compiled with
BOOTP_NFSROOT by default and gets stuck on bootpc/dhcp request loop
when no DHCP server is available on the network, even when user
specifies a local disk via "vfs.root.mountfrom" kernel parameter.

Reviewed by: imp
MFC after: 2 weeks
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D35098

(cherry picked from commit 3cb9f1976c260821e43e6eae9d46e4ec97a8d4f1)

19 months agostand: Unbreak FAT32 in loader
Michael Gmelin [Wed, 7 Sep 2022 16:56:49 +0000 (18:56 +0200)]
stand: Unbreak FAT32 in loader

This corrects an issue introduced in b4cb3fe0e39a3, where a freshly
allocated `DOS_FS` structure would not be initialized properly before
use in `dos_open`.

In case of FAT32 file systems, this would leave `fs->dirents`
uninitialized and - depending on its content and due to checks in
`parsebs` - prevent mounting the file system successfully.

This particularily impacted the EFI loader, as it was sometimes not
able to read files from a FAT32-formatted EFI partition, including
LoaderEnv (`/efi/freebsd/loader.env`).

Accepted by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36482

(cherry picked from commit 0eb736c0f673d2804a0c8c14fa1e4eae228ab6d2)

19 months agostand: Parse all arguments passed by UEFI
Michael Gmelin [Mon, 5 Sep 2022 15:56:11 +0000 (17:56 +0200)]
stand: Parse all arguments passed by UEFI

Approved by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36457

(cherry picked from commit 2b3543dbb1b3fa7c2280d71c017e3e0304e77d54)

19 months agofile: fix test case for gpkg by removing the extra \n.
Xin LI [Sat, 1 Oct 2022 05:45:32 +0000 (22:45 -0700)]
file: fix test case for gpkg by removing the extra \n.

(cherry picked from commit c5e957ad4fe63c90fccc7051ba2a4cb1fe140a75)

19 months agoscandir(3): Rename alphasort_thunk to scandir_thunk_cmp to
Xin LI [Mon, 26 Sep 2022 02:01:46 +0000 (19:01 -0700)]
scandir(3): Rename alphasort_thunk to scandir_thunk_cmp to
reflect that it is not alphasort-specific.

Reported by: emaste
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36708

(cherry picked from commit 45ff071ddccac0a158cfeb53285e6bb2df6bc835)

19 months agoamd64: Initialize IPI scoreboard earlier
Konstantin Belousov [Fri, 17 Dec 2021 04:28:11 +0000 (06:28 +0200)]
amd64: Initialize IPI scoreboard earlier

(cherry picked from commit 648fa3558c161a1d8564626d21047710c3fbfdf6)

19 months agounbound: Adjust version string
Cy Schubert [Sat, 1 Oct 2022 13:48:37 +0000 (06:48 -0700)]
unbound: Adjust version string

Sync version string with contrib.

Reported by: "Herbert J. Skuhra" <herbert@gojira.at>
Fixes: 4f5c8956cff4

(cherry picked from commit 35d60ac2e5bdb63ea8c6e08caca699dede8674e6)

19 months agopowerpc64: tell kernel when radix is not available
Leandro Lupori [Fri, 22 Oct 2021 16:44:21 +0000 (13:44 -0300)]
powerpc64: tell kernel when radix is not available

If CAS detects that radix is not supported, set radix_mmu to 0
to avoid the kernel trying to use it and panic.

Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)

(cherry picked from commit a23e18ea545675aca7551ef2395f6df40a3acb29)

19 months agopowerpc64: make radix with superpages default
Leandro Lupori [Thu, 14 Oct 2021 16:13:27 +0000 (13:13 -0300)]
powerpc64: make radix with superpages default

As Radix MMU with superpages enabled is now stable, make it the
default choice on supported hardware (POWER9 and above), since its
performance is greater than that of HPT MMU.

Reviewed by: alfredo, jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D30797

(cherry picked from commit 8ecf9a8bab608c26cb100f393b24e883a706ff03)

19 months agopowerpc64: fix radix on pseries TLB invalidation
Leandro Lupori [Wed, 8 Sep 2021 11:37:11 +0000 (08:37 -0300)]
powerpc64: fix radix on pseries TLB invalidation

When running in a virtualized environment, TLB invalidations can only
be performed on process scope, as only the hypervisor is allowed to
invalidate a global scope, or else a Program Interrupt is triggered.

Since we are here, also make sure that the register process table
hypercall returns success.

Reviewed by: jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D31775

(cherry picked from commit 4f7c436548ea1cc935c4f4b237693fbe8ed7939a)

19 months agopowerpc/pseries: Allow radix pmap in pseries for ISA 3.0
Justin Hibbits [Thu, 12 Aug 2021 00:03:27 +0000 (19:03 -0500)]
powerpc/pseries: Allow radix pmap in pseries for ISA 3.0

ISA 3.0 allows for nested radix translations with minimal to no
involvement of the hypervisor.  This should make pseries signficantly
faster on POWER9 pseries instances, as fewer hypercalls are needed to
manage pmap now.

Relnotes: yes

(cherry picked from commit 5ae48eb998ad5d41118d2df62cf28b92d6864e24)

19 months agopowerpc64le: fix boot when using QEMU PowerNV
Leandro Lupori [Thu, 25 Nov 2021 19:41:46 +0000 (16:41 -0300)]
powerpc64le: fix boot when using QEMU PowerNV

When using QEMU PowerNV with latest op-build release (v2.7), its
kexec transfers control to FreeBSD kernel in BE mode, causing an
instant exception on LE kernels. Make kboot able to detect and
swap endian to fix this.

Reviewed by: imp
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D33104

(cherry picked from commit e141b62d208867fc5bdb5803d05f5496260722ac)

19 months agozfs: merge openzfs/zfs@6a6bd4939 (zfs-2.1-release) into stable/13
Martin Matuska [Tue, 4 Oct 2022 15:52:09 +0000 (17:52 +0200)]
zfs: merge openzfs/zfs@6a6bd4939 (zfs-2.1-release) into stable/13

OpenZFS release 2.1.6

Notable upstream pull requeset merges:
  #11733 ICP: Add missing stack frame info to SHA asm files
  #12274 Optimize txg_kick() process
  #12284 Add Module Parameter Regarding Log Size Limit
  #12285 Introduce a tunable to exclude special class buffers from L2ARC
  #12287 Remove refcount from spa_config_*()
  #12425 Avoid small buffer copying on write
  #12516 Fix NFS and large reads on older kernels
  #12678 spa.c: Replace VERIFY(nvlist_*(...) == 0) with fnvlist_*
  #12789 Improve log spacemap load time
  #13022 Add more control/visibility and speedup spa_load_verify()
  #13106 add physical device size to SIZE column in 'zpool list -v'
  #13388 Improve mg_aliquot math
  #13405 Revert "Reduce dbuf_find() lock contention"
  #13452 More speculative prefetcher improvements
  #13476 Refactor Log Size Limit
  #13540 AVL: Remove obsolete branching optimizations
  #13553 Reduce ZIO io_lock contention on sorted scrub
  #13555 Scrub mirror children without BPs
  #13563 FreeBSD: Improve crypto_dispatch() handling
  #13576 Several sorted scrub optimizations
  #13579 Fix and disable blocks statistics during scrub
  #13582 Several B-tree optimizations
  #13591 Avoid two 64-bit divisions per scanned block
  #13606 Avoid memory copies during mirror scrub
  #13613 Avoid memory copy when verifying raidz/draid parity
  #13643 Fix scrub resume from newly created hole
  #13756 FreeBSD: Mark ZFS_MODULE_PARAM_CALL as MPSAFE
  #13767 arcstat: fix -p option
  #13781 Importing from cachefile can trip assertion
  #13794 Apply arc_shrink_shift to ARC above arc_c_min
  #13798 Improve too large physical ashift handling
  #13811 Fix column width in 'zpool iostat -v' and 'zpool list -v'
  #13842 make DMU_OT_IS_METADATA and DMU_OT_IS_ENCRYPTED return B_TRUE
         or B_FALSE
  #13855 zfs recv hangs if max recordsize is less than received
         recordsize
  #13861 Fix use-after-free in btree code
  #13865 vdev_draid_lookup_map() should not iterate outside draid_maps
  #13878 Delay ZFS_PROP_SHARESMB property to handle it for encrypted
         raw receive
  #13882 FreeBSD: Fix integer conversion for vnlru_free{,_vfsops}()
  #13885 Fix incorrect size given to bqueue_enqueue() call in dmu_redact.c
  #13908 FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK
  #13930 zpool: Don't print "repairing" on force faulted drives
  #13954 Fix bad free in skein code

Obtained from: OpenZFS
OpenZFS tag: zfs-2.1.6
OpenZFS commit: 6a6bd493988c75331deab06e5352a9bed035a87d
Relnotes: yes

19 months agocheck/delete-old: Fix /bin/rmail removal condition
Dmitry Chagin [Thu, 21 Jul 2022 22:20:25 +0000 (01:20 +0300)]
check/delete-old: Fix /bin/rmail removal condition

When WITHOUT_SENDMAIL is enabled and WITHOUT_MAILWRAPPER is disabled
we install /bin/rmail as a link to the /usr/sbin/mailwrapper.
Ensure make delete-old does not unlink /bin/rmail in that case.

PR: 266604
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D35874
MFC after: 2 weeks

(cherry picked from commit 55736146389f997fe3e2453f1d48d96ff1ad5b7a)

19 months agoLinuxKPI: Use SYSCTL_FOREACH()
Hans Petter Selasky [Wed, 28 Sep 2022 11:42:32 +0000 (13:42 +0200)]
LinuxKPI: Use SYSCTL_FOREACH()

Differential Revision:  https://reviews.freebsd.org/D36748
Sponsored by: NVIDIA Networking

(cherry picked from commit dd6bb9abf075fd3a14956f61559a7e90bb2f26d9)

19 months agosysctl(3): Implement SYSCTL_FOREACH() to iterate all OIDs in a sysctl list.
Hans Petter Selasky [Tue, 27 Sep 2022 13:48:16 +0000 (15:48 +0200)]
sysctl(3): Implement SYSCTL_FOREACH() to iterate all OIDs in a sysctl list.

To avoid using the sysctl list macros directly in external kernel modules.

Reviewed by: asomers, manu and asiciliano
Differential Revision: https://reviews.freebsd.org/D36748
Sponsored by: NVIDIA Networking

(cherry picked from commit c075ea46bca6d48ce9f639e4575077d06d392427)

19 months agosnd_uaudio(4): Add some examples accessing USB MIDI devices.
Goran Mekic [Tue, 27 Sep 2022 17:28:27 +0000 (19:28 +0200)]
snd_uaudio(4): Add some examples accessing USB MIDI devices.

Differential Revision: https://reviews.freebsd.org/D36195
Sponsored by: NVIDIA Networking

(cherry picked from commit f092c21bf630543dc899a444fa7885d0bbbaedfd)

19 months agovt(4): Make sure vt_switch_timer() has a sleepable context.
Hans Petter Selasky [Mon, 26 Sep 2022 15:10:50 +0000 (17:10 +0200)]
vt(4): Make sure vt_switch_timer() has a sleepable context.

Fixes the following panic backtrace:

panic()
usbhid_sync_xfer()
usbhid_set_report()
hid_set_report()
hidbus_write()
hid_write()
hkbd_set_leds()
hkbd_ioctl_locked()
hkbd_ioctl_locked()
hkbd_ioctl()
kbdmux_ioctl()
vt_window_switch()
vt_switch_timer()

Differential Revision: https://reviews.freebsd.org/D36715
Sponsored by: NVIDIA Networking

(cherry picked from commit 2cce9aa0785c438fa8b66bd230824f7460df14ac)

19 months agonfsclient: access v_mount only after the vnode is locked
Konstantin Belousov [Mon, 26 Sep 2022 18:10:47 +0000 (21:10 +0300)]
nfsclient: access v_mount only after the vnode is locked

(cherry picked from commit ab17854f974b5671b09139079d98e2068802064b)

19 months agobusdma: Fix powerpc DMA alignment check
Justin Hibbits [Tue, 4 Jan 2022 15:22:04 +0000 (09:22 -0600)]
busdma: Fix powerpc DMA alignment check

The original logic was to check if there's no filter and the address is
misaligned relative to the requirements.  The refactoring in
c606ab59e7f9423f7027320e9a4514c7db39658d missed this, and instead caused
it to return failure if the address *is* properly aligned.

(cherry picked from commit 3a9688f8bc488b16bf5676057fa86263554312b0)

19 months agobsdbox: remove previously broken telnet(d) support
Brooks Davis [Thu, 29 Sep 2022 16:54:32 +0000 (17:54 +0100)]
bsdbox: remove previously broken telnet(d) support

Support for telnet(d) was commented out some time ago.  Remove because
telnetd is gone in main and this is unlikely to be fixed.

Reviewed by: imp, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D36782

(cherry picked from commit c0f94ccbb241f530c9f89d5259efb695e4f6de95)

19 months agoman9: Add MLINKs for bus_space_{peek,poke}
Mark Johnston [Mon, 26 Sep 2022 13:28:57 +0000 (09:28 -0400)]
man9: Add MLINKs for bus_space_{peek,poke}

(cherry picked from commit b3ab58bd4384b245404ebb10c5aa88e73e7370c8)

19 months agoposixshm tests: Map the large pages in the madvise test
Mark Johnston [Mon, 26 Sep 2022 12:58:10 +0000 (08:58 -0400)]
posixshm tests: Map the large pages in the madvise test

This improves test coverage and was unintentionally omitted when the
tests were written.

(cherry picked from commit e4eedf8c31a2693f07628d3b0433c6d398fdb6cd)

19 months agoarm64: Handle 1GB mappings in pmap_enter_quick_locked()
Mark Johnston [Mon, 26 Sep 2022 12:54:35 +0000 (08:54 -0400)]
arm64: Handle 1GB mappings in pmap_enter_quick_locked()

Reviewed by: alc, kib

(cherry picked from commit 7533062ae133a0e6e8f5b9913565bb99eabacb5f)

19 months agosvc_vc_rendezvous_stat: eliminiate write only variable stat
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
svc_vc_rendezvous_stat: eliminiate write only variable stat

Sponsored by: Netflix

(cherry picked from commit 6e671ec1e64ccd11c81eabe5abef5b20745914a2)

19 months agoclnt_vc_destroy: eliminiate write only variable stat
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
clnt_vc_destroy: eliminiate write only variable stat

Sponsored by: Netflix

(cherry picked from commit 77bc5890adf4aad832e1ed35f15dad8f5220a91b)

19 months agokrpc_call: eliminiate write only variable nam
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
krpc_call: eliminiate write only variable nam

Sponsored by: Netflix

(cherry picked from commit 5c2aad7e890d9f90b0281bb68bf07e764e0d62bd)

19 months agobootpc_decode_reply: eliminiate write only variable ip
Warner Losh [Fri, 8 Jul 2022 17:53:35 +0000 (11:53 -0600)]
bootpc_decode_reply: eliminiate write only variable ip

Sponsored by: Netflix

(cherry picked from commit b64a484592b2c053f7131edd949edb0a76eef083)

19 months agosmb_smb_treedisconnect: eliminate write only variable mbp
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
smb_smb_treedisconnect: eliminate write only variable mbp

Sponsored by: Netflix

(cherry picked from commit d6f698549474982394b0d347ae72c72425cc1f32)

19 months agosmb_iod_main: eliminate write only variable error
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
smb_iod_main: eliminate write only variable error

Sponsored by: Netflix

(cherry picked from commit 65ee334d112e1d19425bb59628500d0ba91ab48c)

19 months agopim6_input: eliminate write only variable rc
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
pim6_input: eliminate write only variable rc

Sponsored by: Netflix

(cherry picked from commit c7761ca93e9f6be51db2a8632d6697253e93f6c3)

19 months agosysctl_dumpentry: move error to inner scope
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
sysctl_dumpentry: move error to inner scope

Sponsored by: Netflix

(cherry picked from commit e606e5d1572684b978ca0572da776a597ffe0d94)

19 months agoroute_ctl: eliminate write only variables ifa and nh
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
route_ctl: eliminate write only variables ifa and nh

Sponsored by: Netflix

(cherry picked from commit 5de5b5a34db93a2a646e88d39a8e7718f925636f)

19 months agoget_nhop: eliminate write only variable gateway
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
get_nhop: eliminate write only variable gateway

Sponsored by: Netflix

(cherry picked from commit 7f9c3339a4ff5fecab3f408ba86afd3c5b778bd3)

19 months agoxl_attach: eliminate write only variable unit
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
xl_attach: eliminate write only variable unit

Sponsored by: Netflix

(cherry picked from commit c972f2c065bdb7031e7935aac406365e4810df19)

19 months agovtpci_legacy_register_msix: eliminate write only variable dev
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
vtpci_legacy_register_msix: eliminate write only variable dev

Sponsored by: Netflix

(cherry picked from commit 76e96756633e5d33f334bb48bedf981557272ead)

19 months agoustorage_fs_verify: eliminate write only variables file_offset and file_offset
Warner Losh [Fri, 8 Jul 2022 17:53:34 +0000 (11:53 -0600)]
ustorage_fs_verify: eliminate write only variables file_offset and file_offset

Sponsored by: Netflix

(cherry picked from commit 7a1bef40f1e9bb4d3d56331e743dec79c49a8fc4)

19 months agocp2112iic_intr_write_callback: eliminate write only variable psc
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
cp2112iic_intr_write_callback: eliminate write only variable psc

Sponsored by: Netflix

(cherry picked from commit 11110685fcd52aa19500f029365a8093218747c6)

19 months agowsp_intr_callback: eliminate write only variable h
Warner Losh [Fri, 8 Jul 2022 17:53:33 +0000 (11:53 -0600)]
wsp_intr_callback: eliminate write only variable h

Sponsored by: Netflix

(cherry picked from commit 53c1f1fc609190733adc2136c98c16086266f03e)