]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoupgt(4): Adjust all pause calls to use milliseconds instead of ticks.
Hans Petter Selasky [Thu, 9 Jun 2022 13:14:17 +0000 (15:14 +0200)]
upgt(4): Adjust all pause calls to use milliseconds instead of ticks.

Sponsored by: NVIDIA Networking

(cherry picked from commit bc2e447338b7ade8d800d1f24913bb3873c65f99)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
Dimitry Andric [Sun, 12 Jun 2022 18:51:09 +0000 (20:51 +0200)]
Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days

(cherry picked from commit 56f451bb3b99a72f73d6771b98825a0b00784e7b)

2 years agoFix mtree for usr/
Xin LI [Sun, 12 Jun 2022 04:37:15 +0000 (21:37 -0700)]
Fix mtree for usr/

MFC after: 3 days

(cherry picked from commit 695052e240c7c4291707a55358fe79de9ef79767)

Account for missing `..' in BSD.usr.dist for clang 14.0.3.

MFC after: 3 days

(cherry picked from commit 1d25053e9365e99a2d16f2ee64d3416f14f7f167)

Remove yet another incorrect .. level from BSD.usr.dist

Since the spacing was off, it was not clear that it descended one level
too many.

Fixes: 695052e240c7
MFC after: 3 days

(cherry picked from commit 987d26ee3f7a1685f7070db834478964170b6f62)

2 years agomlx4core: Use-after-free causes a resource leak in flow-steering detach
Hans Petter Selasky [Tue, 7 Jun 2022 14:27:53 +0000 (16:27 +0200)]
mlx4core: Use-after-free causes a resource leak in flow-steering detach

mlx4_QP_FLOW_STEERING_DETACH_wrapper first removes the steering
rule (which results in freeing the rule structure), and then
references a field in this struct (the qp number) when releasing the
busy-status on the rule's qp.

Since this memory was freed, it could reallocated and changed.
Therefore, the qp number in the struct may be incorrect,
so that we are releasing the incorrect qp. This leaves the rule's qp
in the busy state (and could possibly release an incorrect qp as well).

Fix this by saving the qp number in a local variable, for use after
removing the steering rule.

Linux commit:
3b01fe7f91c8e4f9afc4fae3c5af72c14958d2d8

PR:       264469
Sponsored by: NVIDIA Networking

(cherry picked from commit dd2a8c8f72d369440c36f10512324d42ecedb5c7)

2 years agoktls: Refer send tag pointer once.
Hans Petter Selasky [Wed, 25 May 2022 12:16:27 +0000 (14:16 +0200)]
ktls: Refer send tag pointer once.

So that the asserts and the actual code see the same values.

Differential revision: https://reviews.freebsd.org/D32356
Sponsored by: NVIDIA Networking

(cherry picked from commit f0fca64618045bba23f4d61a377b64f9acb96220)

2 years agong_ubt(4): Probe USB Bluetooth per USB interface and not per USB device.
Hans Petter Selasky [Fri, 3 Jun 2022 08:22:54 +0000 (10:22 +0200)]
ng_ubt(4): Probe USB Bluetooth per USB interface and not per USB device.

PR: 264416
Sponsored by: NVIDIA Networking

(cherry picked from commit 9d28e15e7bbee7a809eb4ccab558d114d4343312)

2 years agoRegen src.conf.5 for recent MFCs
Ed Maste [Tue, 14 Jun 2022 00:34:43 +0000 (20:34 -0400)]
Regen src.conf.5 for recent MFCs

2 years agofdescfs: allow chown/utime etc on fdescfs fd for underlying files opened with O_PATH
Konstantin Belousov [Sun, 5 Jun 2022 18:49:09 +0000 (21:49 +0300)]
fdescfs: allow chown/utime etc on fdescfs fd for underlying files opened with O_PATH

(cherry picked from commit 156745b42d9e6dfa3d9c6dc480db7836683850cf)

2 years agoAlso define THR_PAGE_SIZE_MIN for mips
Dimitry Andric [Mon, 13 Jun 2022 18:55:23 +0000 (20:55 +0200)]
Also define THR_PAGE_SIZE_MIN for mips

Commit 6173c7833be4, which cherry-picked commit c7904405a8d4 ("Remove
PAGE_SIZE from libthr") to stable/13 resulted in build errors on mips:

/usr/src/lib/libthr/thread/thr_barrier.c:40:50: error: use of undeclared identifier 'THR_PAGE_SIZE_MIN'
_Static_assert(sizeof(struct pthread_barrier) <= THR_PAGE_SIZE_MIN,
                                                 ^

This is because c7904405a8d4 defined THR_PAGE_SIZE_MIN for all supported
architectures in main/14-CURRENT, but that list no longer includes mips.
Add a similar define for mips, so libthr can build successfully again.

Direct commit to stable/13, since main no longer has mips.

Fixes: 6173c7833be4

2 years agosrc.conf.5: Update the WITHOUT_ZFS description
Mark Johnston [Mon, 30 May 2022 14:45:57 +0000 (10:45 -0400)]
src.conf.5: Update the WITHOUT_ZFS description

... to take into account programs and libraries which might implement
some ZFS-specific features without being exclusive to ZFS.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f7f387730e3fc7d6e3807c1300269cd127ad3234)

2 years agosmp: Use local copies of the setup function pointer and argument
Yuichiro NAITO [Mon, 6 Jun 2022 15:21:33 +0000 (11:21 -0400)]
smp: Use local copies of the setup function pointer and argument

No functional change intended.

PR: 264383
Reviewed by: jhb, markj

(cherry picked from commit 8d95f500521128c2b40270bdd703a54b56dbccf2)

2 years agopkgbase: Move pw to the runtime package
Doug Rabson [Mon, 30 May 2022 13:22:08 +0000 (14:22 +0100)]
pkgbase: Move pw to the runtime package

This allows building a container image with enough functionality for
downloading and installing packages without having to include the
utilities package.

Reviewed by: manu
MFC after:   2 weeks

(cherry picked from commit 5e9c888a7ac014f81bcf369ff3d38690d51545ee)

2 years agosqlite3: Vendor import of sqlite3 3.38.5
Cy Schubert [Thu, 12 May 2022 19:25:36 +0000 (12:25 -0700)]
sqlite3: Vendor import of sqlite3 3.38.5

Changes at https://www.sqlite.org/releaselog/3_38_5.html.

Obtained from https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz.

Merge commit 'b562e59e27efbea397bdc8782dfceaa3c0e23542'

(cherry picked from commit 4fe1295c964fa712dd763e3852187da8724ef79a)

2 years agomount_nfs: Only create a mounttab file entry is nmount(2) succeeds
Rick Macklem [Sat, 28 May 2022 22:48:40 +0000 (15:48 -0700)]
mount_nfs: Only create a mounttab file entry is nmount(2) succeeds

mount_nfs creates entries in the mounttab file and umount removes
them.  Entries in the mounttab file ae used by rpc.umntall to
notify the NFS server that NFSv3 entries need to be removed when
they have not been removed by umount.

Without this patch, an enty will be created in the mounttab file,
even if the nmount(2) syscall fails for the mount.  This patch
modifies the code so that the mounttab entry is only created
after nmount(2) succeeds.

This change only affects NFSv3 and only affects how showmount
displays NFSv3 mounts.

(cherry picked from commit 7cab630ba4fb26bf85336a89d88721ed2315c46c)

2 years agonfscl: Add a diagnostic printf() for a "should never happen" case
Rick Macklem [Fri, 27 May 2022 21:32:46 +0000 (14:32 -0700)]
nfscl: Add a diagnostic printf() for a "should never happen" case

When a NFSv4.1/4.2 session to the NFS server (not a pNFS DS) is
replaced, the old session should always be marked defunct by
nfsess_defunct being set non-zero.

However, the hang reported by the PR suggests that this might
be the case.

This patch adds a printf() to indicate this has somehow happened.

PR: 260011

(cherry picked from commit a7bb120f8b8735bc4c417b3c8fc2308c3d2964aa)

2 years agonfscl: Do not handle NFSERR_BADSESSION in operation code
Rick Macklem [Fri, 27 May 2022 21:20:31 +0000 (14:20 -0700)]
nfscl: Do not handle NFSERR_BADSESSION in operation code

The NFSERR_BADSESSION reply from a NFSv4.1/4.2 server
is handled by newnfs_request().  It should not be handled
separately after newnfs_request() has returned.

These two cases were spotted during code inspection.
One of them should only redo what newnfs_request() already
did by the same "nfscl" thread.  The other might have
resulted in recovery being done twice, but the code is
only used for "pnfs" mounts, so that would be rare.
Also, since NFSERR_BADSESSION should only be replied by
a server after the server reboots, this would be extremely
rare.

(cherry picked from commit 425e5c739bcf190265330b79e85f89eb4d7b5f25)

2 years agofirewire.4: Fix typo
PauAmma [Mon, 6 Jun 2022 03:52:34 +0000 (23:52 -0400)]
firewire.4: Fix typo

While there, replace dead wiki URL with dev handbook one and fix markup.

Reviewed by: gbe
Differential Revision: https://reviews.freebsd.org/D35252

(cherry picked from commit eabfcbbfe1a4bee09d1dab659116ccbb8e36f88f)

2 years agobuild(7): fix references to svn(1) and svnlite(1)
Fernando ApesteguĂ­a [Fri, 23 Apr 2021 16:59:19 +0000 (18:59 +0200)]
build(7): fix references to svn(1) and svnlite(1)

Replace them with references to Git.

PR: 254937
Reported by: m.bueker@berlin.de
Approved by: 0mp (mentor)
Differential Revision: https://reviews.freebsd.org/D29949

(cherry picked from commit e444a4c677ee3e86038ba2179c4838f5f4b778cd)

2 years agoal_eth: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:33:36 +0000 (15:33 +0200)]
al_eth: Fix a typo in a source code comment

- s/enought/enough/

(cherry picked from commit 45b143d2ea5fb0389304cc918781e98696a4b48f)

2 years agoipsec(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:28:20 +0000 (12:28 +0200)]
ipsec(4): Fix a typo in a source code comment

- s/formated/formatted/

(cherry picked from commit 7a33c6bf52b747a1725a2a3665c438cd5a9e9355)

2 years agofstype(8): Fix two typos in source code comments
Gordon Bergling [Sat, 4 Jun 2022 08:38:48 +0000 (10:38 +0200)]
fstype(8): Fix two typos in source code comments

- s/auxillary/auxiliary/

(cherry picked from commit df4da2d6b7bc96abb1ae78bb1f2d28150124bd15)

2 years agorack: Fix a common typo in comments and a sysctl description
Gordon Bergling [Sat, 4 Jun 2022 15:56:56 +0000 (17:56 +0200)]
rack: Fix a common typo in comments and a sysctl description

- s/multipler/multiplier/

(cherry picked from commit 32a01b2b8691453b59a26cf273a5a5eae7643985)

2 years agoamdsbwd(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:26:44 +0000 (11:26 +0200)]
amdsbwd(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit 68c0bd3e3f45e030d48b354d7444934ca381a07e)

2 years agoufs: Fix a typo a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:23:53 +0000 (15:23 +0200)]
ufs: Fix a typo a source code comment

- s/droped/dropped/

(cherry picked from commit a429d3050ec3f2a807d6e74be80b055ee636cb6f)

2 years agolinux(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:27:19 +0000 (11:27 +0200)]
linux(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit 8cf0d094629edbafc1d6de055cef6a53d6a4addb)

2 years agopowerpc: Fix a typo in a comment
Gordon Bergling [Sat, 4 Jun 2022 17:55:03 +0000 (19:55 +0200)]
powerpc: Fix a typo in a comment

- s/layed/laid/

(cherry picked from commit 23615a3e4e41f55693980fdcb6842a25754741c9)

2 years agopowerpc: Fix two typos in source code comments
Gordon Bergling [Sat, 4 Jun 2022 08:39:50 +0000 (10:39 +0200)]
powerpc: Fix two typos in source code comments

- s/auxillary/auxiliary/

(cherry picked from commit d8dd4b2fd2bdedb33978692c82fc494aa594b8b2)

2 years agonvmw(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:46:03 +0000 (11:46 +0200)]
nvmw(4): Fix a typo in a source code comment

- s/inaccessable/inaccessible/

(cherry picked from commit 6e8ab6715d3589ad5577ad5fa408f81b4a7077e9)

2 years agotegra: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:54:09 +0000 (11:54 +0200)]
tegra: Fix a typo in a source code comment

- s/Disble/Disable/

(cherry picked from commit 415e8d12d12808897fe23f06637e942f5a4a2d06)

2 years agomake.conf: Fix a typo in the example file
Gordon Bergling [Sat, 4 Jun 2022 10:24:17 +0000 (12:24 +0200)]
make.conf: Fix a typo in the example file

- s/architechture/architecture/

(cherry picked from commit 6300e58ab2d2575852e15724a74d545cea32cef5)

2 years agousbhid(3): Fix a typo in the manual page
Gordon Bergling [Sat, 4 Jun 2022 17:54:25 +0000 (19:54 +0200)]
usbhid(3): Fix a typo in the manual page

- s/layed/laid/

(cherry picked from commit 9b15c51b0551fe09d589d06e654ce61584e3f61c)

2 years agovm_page: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:52:22 +0000 (12:52 +0200)]
vm_page: Fix a typo in a source code comment

- s/consistancy/consistency/

(cherry picked from commit f77a88c855c557902e4e4c9696b08e847c413f54)

2 years agotcp_rack: Fix two typos in sysctl descriptions
Gordon Bergling [Sat, 4 Jun 2022 09:24:18 +0000 (11:24 +0200)]
tcp_rack: Fix two typos in sysctl descriptions

- s/higest/highest/

(cherry picked from commit 21b923c33082b0123a7c638e8984fd313c3a6f1f)

2 years agoaic7xxx: Fix a few typos in comments and an error message
Gordon Bergling [Sat, 4 Jun 2022 14:49:53 +0000 (16:49 +0200)]
aic7xxx: Fix a few typos in comments and an error message

- s/directrive/directive/
- s/specifiled/specified/
- s/Decend/Descend/
- s/tranversal/transversal/

Obtained from: NetBSD

(cherry picked from commit d35e1c29a9bb5c2ed98a6d8df171b3b3c8439130)

2 years agoac(8): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:41:20 +0000 (12:41 +0200)]
ac(8): Fix a typo in a source code comment

- s/chosing/choosing/

(cherry picked from commit 10924c4fc3bec1a3170681e42c3a854845584a51)

2 years agoena(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 15:17:04 +0000 (17:17 +0200)]
ena(4): Fix a typo in a source code comment

- s/entred/entered/

(cherry picked from commit eb3f25b413c5d8912cdb40f2040a0b678a2af2fd)

2 years agokthread(9): Add a missing space
Gordon Bergling [Sat, 4 Jun 2022 18:15:07 +0000 (20:15 +0200)]
kthread(9): Add a missing space

- s/inthe/in the/

(cherry picked from commit a7f5cf2096346076ef16bed9c40b21d3d7a7bd8f)

2 years agosound(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:11:06 +0000 (12:11 +0200)]
sound(4): Fix a typo in a source code comment

- s/alltogether/altogether/

(cherry picked from commit 70311ccffc2f9233cc4c3db1bb706f0566d6818d)

2 years agohptmv(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:28:52 +0000 (13:28 +0200)]
hptmv(4): Fix a typo in a source code comment

- s/continous/continuous/

(cherry picked from commit bbb0ca45f8189911a35ba76000783b05188153af)

2 years agofpu: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:15:53 +0000 (13:15 +0200)]
fpu: Fix a typo in a source code comment

- s/choise/choice/

Obtained from: NetBSD

(cherry picked from commit faff37be462262c6ae958c93f0aa27118d4d62cf)

2 years agole(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:00:44 +0000 (12:00 +0200)]
le(4): Fix a typo in a source code comment

- s/brodcast/broadcast/

(cherry picked from commit b008ab622c401ee2e705b1fe5804865982dac11c)

2 years agoif_bridge(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:26:01 +0000 (11:26 +0200)]
if_bridge(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit f7faa4ad4844470058b84fa35156c463cfa8bd85)

2 years agorack: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:32:59 +0000 (15:32 +0200)]
rack: Fix a typo in a source code comment

- s/enought/enough/

(cherry picked from commit c93db89231fedd4afe64915cf8dcad89bfdd3c94)

2 years agoif_llatbl: Fix a typo in a debug statement
Gordon Bergling [Sat, 4 Jun 2022 13:22:09 +0000 (15:22 +0200)]
if_llatbl: Fix a typo in a debug statement

- s/droped/dropped/

Obtained from: NetBSD

(cherry picked from commit 4f493559b0d7853c7521bd3cb5affe659914e479)

2 years agonvmecontrol(8): Fix a typo in an error message
Gordon Bergling [Sat, 4 Jun 2022 18:30:48 +0000 (20:30 +0200)]
nvmecontrol(8): Fix a typo in an error message

- s/insufficent/insufficient/

(cherry picked from commit e2dfabb5895122ce46e627e53347f0e81019c95f)

2 years agoacpi(4): Fix a typo in a debug statement
Gordon Bergling [Sat, 4 Jun 2022 13:17:09 +0000 (15:17 +0200)]
acpi(4): Fix a typo in a debug statement

- s/Efficency/tEfficiency/

Obtained from: NetBSD

(cherry picked from commit 0b4302aa934d748503d6377f875f2972db41a092)

2 years agoif_sis(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 14:56:18 +0000 (16:56 +0200)]
if_sis(4): Fix a typo in a source code comment

- s/emperical/empirical/

(cherry picked from commit 3c2ea3ca28c5e95185f57ff27148909c8f846c3e)

2 years agosed(1): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 18:27:45 +0000 (20:27 +0200)]
sed(1): Fix a typo in a source code comment

- s/Initialy/Initially/

Obtained from: NetBSD

(cherry picked from commit bb0e21032bf61a93489f8b964b6707038cc4d1c3)

2 years agoam335x: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:28:10 +0000 (13:28 +0200)]
am335x: Fix a typo in a source code comment

- s/continous/continuous/

(cherry picked from commit 1261c01d7fa25955610936f690e237b7c308ee5b)

2 years agoaic79xx: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:52:34 +0000 (11:52 +0200)]
aic79xx: Fix a typo in a source code comment

- s/Disble/Disable/

Obtained from: NetBSD

(cherry picked from commit 2cada72c65931683121ea7f6f740a7d07420c367)

2 years agovm: Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:52:32 +0000 (09:52 +0200)]
vm: Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 860740ae0f0f247b2dabd15fcfa0c215f77e5858)

2 years agonlist(3): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:51:57 +0000 (09:51 +0200)]
nlist(3): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 565405095b88a00df786614cdaabfdd3de1148ec)

2 years agogeom(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:51:10 +0000 (09:51 +0200)]
geom(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit c2a249ad8f29e326e9c18b076eadd8730e43af0b)

2 years agoqlnxe(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:15:33 +0000 (09:15 +0200)]
qlnxe(4): Fix a typo in a source code comment

- s/indepent/independent/

(cherry picked from commit a87f167c41c5fc9240987a09a98379680c910c51)

2 years agotwe(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:55:25 +0000 (09:55 +0200)]
twe(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 508a46c745b34c1e520b0c00ad3e0b727967f5ae)

2 years agoqlxgbe(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:56:29 +0000 (09:56 +0200)]
qlxgbe(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit f1294737023fbb5748d6e572b0ac042281361bf7)

2 years agolibkern: Fix a typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 06:57:26 +0000 (08:57 +0200)]
libkern: Fix a typo in a source code comment

- s/involes/involves/

Obtained from: NetBSD

(cherry picked from commit 5cacfa7092f851ce31d75cd5dde73d26ea734497)

2 years agoffec: Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:54:39 +0000 (09:54 +0200)]
ffec: Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit d3e0919b564d0f0267758d33c5de8008526f61a5)

2 years agoif_age(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:14:17 +0000 (09:14 +0200)]
if_age(4): Fix a typo in a source code comment

- s/indepent/independent/

(cherry picked from commit f207bdd2cc4fb43fed13a20dc7f892021e8a9b42)

2 years agomlx(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:53:59 +0000 (09:53 +0200)]
mlx(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 9ae6b386ab33a701c8df281f1dbf07a1659aab90)

2 years agostand: Fix a common typo in source code comments
Gordon Bergling [Sun, 5 Jun 2022 07:49:51 +0000 (09:49 +0200)]
stand: Fix a common typo in source code comments

- s/independant/independent/

(cherry picked from commit c44b5e090d84f911551d038f61e7cf798a843b8c)

2 years agolibgssapi: Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:53:24 +0000 (09:53 +0200)]
libgssapi: Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 9e75b06f93d001fc961b6e839e59977f826b6c2f)

2 years agoixgbe(4): Fix common typos in source code comments
Gordon Bergling [Mon, 6 Jun 2022 05:28:56 +0000 (07:28 +0200)]
ixgbe(4): Fix common typos in source code comments

- s/filer/filter/

Obtained from: NetBSD

(cherry picked from commit cd7e11f78dedad810273ae71d791027e75aa16c9)

2 years agonfscl: Add support for a NFSv4 AppendWrite RPC
Rick Macklem [Sat, 30 Apr 2022 20:49:23 +0000 (13:49 -0700)]
nfscl: Add support for a NFSv4 AppendWrite RPC

For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct, followed by the Write operation.

This patch modifies the NFSv4 client to use an Appendwrite
RPC, which does a Verify to check the file's size before
doing the Write.  This avoids the need for a Getattr RPC
to preceed this RPC and reduces the RPC count by half for
IO_APPEND writes, so long as the client knows the file's
size.

The nfsd structure was moved from the stack to be malloc()'d,
since the kernel stack limit was being exceeded.

While here, fix the types of a few variables, although
there should not be any semantics change caused by these
type changes.

(cherry picked from commit 5218d82c81f987223054671b9821d39f08d87599)

2 years agonfscl: Add support for a NFSv4 AppendWrite RPC
Rick Macklem [Fri, 8 Apr 2022 20:59:05 +0000 (13:59 -0700)]
nfscl: Add support for a NFSv4 AppendWrite RPC

For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct, followed by the Write operation.

This patch modifies nfscl_wcc_data() to optionally
acquire the file's size, for use with an AppendWrite.
Although the "stuff" arguments are always NULL
(these were used for the Mac OSX port and should be
cleared out someday), make the argument to
nfscl_wcc_data() explicitly NULL for clarity.

This patch does not cause any semantics change until
the AppendWrite is added in a future commit.

(cherry picked from commit 21de450aa1a7ca226908e7421b93ca979ff42db7)

2 years agoUnbreak the build: Also define NFSV42_OLDNPROCS here.
Warner Losh [Tue, 5 Apr 2022 17:54:20 +0000 (11:54 -0600)]
Unbreak the build: Also define NFSV42_OLDNPROCS here.

If nfsproto.h is included before nfsport.h, then NFSV42_OLDNPROCS would
be undefined when it is used in struct nfsstatsov1.

(cherry picked from commit 393b7606f9c18c27f340edb28395093b618f68bd)

2 years agonfscl: Add support for a NFSv4 AppendWrite RPC
Rick Macklem [Tue, 5 Apr 2022 15:11:37 +0000 (08:11 -0700)]
nfscl: Add support for a NFSv4 AppendWrite RPC

For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct before doing the Write operation.

This patch prepares the NFSv4 client for such an
RPC, which will be added in a future commit.

This patch does not cause any semantics change.

(cherry picked from commit 330aa8acdec76d00d9e0ca526d421fe25ccf90cf)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285
Dimitry Andric [Sat, 4 Jun 2022 12:30:46 +0000 (14:30 +0200)]
Merge llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.4-0-g29f1039a7285, aka 14.0.4 release.

PR: 261742
MFC after: 3 days

(cherry picked from commit 2a66634d1bc6d7401adafad4a3be7b9ac6bab8b3)

Bump versions llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285

Somehow git rebase made this squashed commit disappear. Restore it.

PR: 261742
MFC after: 3 days

(cherry picked from commit ab9d54731f43bb6befae75e9fed64da98c9ae1b4)

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

(cherry picked from commit 809922b01004daf627ad4b8d92c7f98eb579043c)

Add more old clang files to (Optional)ObsoleteFiles.inc

There were a few more libclang_rt libraries added recently, but not yet
listed in the ObsoleteFiles.inc lists.

MFC after: 3 days

(cherry picked from commit 5e383e360314c875fee648b386493b0dcde5c5f3)

2 years agonfscl: Always invalidate buffers for append writes
Rick Macklem [Thu, 6 Jan 2022 22:18:36 +0000 (14:18 -0800)]
nfscl: Always invalidate buffers for append writes

kib@ reported a problem which was resolved by
reverting commit 867c27c23a5c, which changed the NFS
client to use direct RPCs to the server for
IO_APPEND writes.  He also spotted that the
code only invalidated buffer cache buffers
when they were marked NMODIFIED (had been
written into).

This patch modifies the NFS VOP_WRITE() to
always invalidate the buffer cache buffers
and pages for the file when IO_APPEND is
specified.  It also includes some cleanup
suggested by kib@.

(cherry picked from commit e4df1036f66dc360606fea053ec04ccabb69df14)

2 years agonfscl: Partially revert commit 867c27c23a5c
Rick Macklem [Thu, 16 Dec 2021 22:30:37 +0000 (14:30 -0800)]
nfscl: Partially revert commit 867c27c23a5c

Commit 867c27c23a5c enabled the n_directio_opens code
in open/close, which sets/clears NNONCACHE, for
IO_APPEND. This code should not be enabled unless
newnfs_directio_enable is non-zero.

This patch reverts that part of commit 867c27c23a5c.

A future patch that fixes the case where the
file that is being written IO_APPEND is mmap()'d.

(cherry picked from commit 150da1e3cd51e552f7d6bc159b387e540c5a3733)

2 years agonfscl: Change IO_APPEND writes to direct I/O
Rick Macklem [Wed, 15 Dec 2021 16:35:48 +0000 (08:35 -0800)]
nfscl: Change IO_APPEND writes to direct I/O

IO_APPEND writes have always been very slow over NFS, due to
the need to acquire an up to date file size after flushing
all writes to the NFS server.

This patch switches the IO_APPEND writes to use direct I/O,
bypassing the buffer cache.  As such, flushing of writes
normally only occurs when the open(..O_APPEND..) is done.
It does imply that all writes must be done synchronously
and must be committed to stable storage on the file server
(NFSWRITE_FILESYNC).

For a simple test program that does 10,000 IO_APPEND writes
in a loop, performance improved significantly with this patch.

For a UFS exported file system, the test ran 12x faster.
This drops to 3x faster when the open(2)/close(2) are done
for each loop iteration.
For a ZFS exported file system, the test ran 40% faster.

The much smaller improvement may have been because the ZFS
file system I tested against does not have a ZIL log and
does have "sync" enabled.

Note that IO_APPEND write performance is still much slower
than when done on local file systems.

Although this is a simple patch, it does result in a
significant semantics change, so I have given it a
large MFC time.

(cherry picked from commit 867c27c23a5c469b27611cf53cc2390b5a193fa5)

2 years agortw88: plug various skb leaks in error cases
Bjoern A. Zeeb [Sun, 5 Jun 2022 18:07:48 +0000 (18:07 +0000)]
rtw88: plug various skb leaks in error cases

Based on manual inspection the skbs are not freed in those unlikely
cases, though all would give an error message so would have gone noticed
if happened.
While here fix a typo in one of these error messages.

(cherry picked from commit 728afa885f04f6316bc9ecf6498f4a635ced1e21)

2 years agoLinuxKPI: 802.11: plug a ni leak in lkpi_sta_assoc_to_run()
Bjoern A. Zeeb [Sun, 5 Jun 2022 21:10:01 +0000 (21:10 +0000)]
LinuxKPI: 802.11: plug a ni leak in lkpi_sta_assoc_to_run()

In lkpi_sta_assoc_to_run() we are going through some code segments
twice (auth->assoc, assoc->authorized).  The 2nd time we shall not
re-gain a reference on the net80211 node as otherwise it'll leak.
Likewise we do not have to re-set lsta and sta.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 71df58aefcf8be21b32e2a7b83da6d0facb8b326)

2 years agoLinuxKPI: 802.11 plug mbuf leak in error cases
Bjoern A. Zeeb [Sun, 5 Jun 2022 18:04:57 +0000 (18:04 +0000)]
LinuxKPI: 802.11 plug mbuf leak in error cases

Manually free the mbuf in certain error cases from net80211 to not
leak it.
Note that the differences between ieee80211_input_mimo() and
ieee80211_input_mimo_all(), the former not consuming the mbuf while
the later does, is confusing.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit dbc06dd98ae9940377a9ef31a594c17566334977)

2 years agoiwlwifi: disable more MEI (Management Engine) code
Bjoern A. Zeeb [Sat, 4 Jun 2022 16:18:58 +0000 (16:18 +0000)]
iwlwifi: disable more MEI (Management Engine) code

It is unclear why this hasn't bothered anyone in months; I can only assume
optimization levels but it seems there were unresolved symbols in
iwlwifi after d9836fb4b9380e2ed1c38455fb31a3832b452671:
link_elf_obj: symbol iwl_mvm_send_roaming_forbidden_event undefined

Hide more of the currently unsupported (GPL-only) MEI (Management Engine)
code behind #ifdef to avoid this.

Reported by: dchagin
Tested by: dchagin
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 75c779fb279c2bea90c08e275af5937213bdca81)

2 years agoiwlwifi: Update man pages with card list
Bjoern A. Zeeb [Tue, 17 May 2022 01:43:15 +0000 (01:43 +0000)]
iwlwifi: Update man pages with card list

Add list of supported names to iwlwifi.4 and an extended list with
PCI IDs and firmware prefix to iwlwififw.4.

Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D35227

(cherry picked from commit f5539996511eeca7dcf3c9849edda26d85306290)

2 years agoiwlwifi: add sysctl to dump PCI IDs/ names / firmware-prefixes
Bjoern A. Zeeb [Wed, 18 May 2022 16:05:49 +0000 (16:05 +0000)]
iwlwifi: add sysctl to dump PCI IDs/ names / firmware-prefixes

Add a FreeBSD-specifc SYSCTL_PROC to dump the list of
PCI IDs / name / firmware-prefix which can be post-processed
for man pages (iwlwifi.4 and iwlwififw.4) or the wiki.

The output still yields duplicates depending on by what information
you need so one may wants to filter them out (try not to use sort/uniq).

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 645886d028c85b3cb9fb36e96b1edc661cf4c0d8)

2 years agoMFC: if_glxgbe: fix stand-alone module build
Eugene Grosbein [Sun, 5 Jun 2022 17:59:46 +0000 (00:59 +0700)]
MFC: if_glxgbe: fix stand-alone module build

Fix module build outside of kernel build environment.

(cherry picked from commit 32467e47b7b7d224ca51889bbb9233af0462d87f)

2 years agoMFC: if_glxgb: fix stand-alone module build
Eugene Grosbein [Sun, 5 Jun 2022 17:54:50 +0000 (00:54 +0700)]
MFC: if_glxgb: fix stand-alone module build

Fix module build outside of kernel build environment.

(cherry picked from commit 966e279052f33b1665480e0327c177013cb8205a)

2 years agoif_qlxge: fix stand-alone module build
Eugene Grosbein [Sun, 5 Jun 2022 18:05:02 +0000 (01:05 +0700)]
if_qlxge: fix stand-alone module build

Fix module build outside of kernel build environment.

(cherry picked from commit 20634f026179ac73d4ea780138789195e335f275)

2 years agoAdd newline after 20220524 entry in ObsoleteFiles.inc
Dimitry Andric [Thu, 26 May 2022 14:31:51 +0000 (16:31 +0200)]
Add newline after 20220524 entry in ObsoleteFiles.inc

(cherry picked from commit 442bf90e52842ebdc3cd9911508df5535e48a89e)

2 years agokqueue tests: Simplify the test runner
Mark Johnston [Wed, 25 May 2022 00:17:04 +0000 (20:17 -0400)]
kqueue tests: Simplify the test runner

Just invoke the test program directly instead of trying to convert its
output to TAP format.  The test suite is all or nothing; there's no way
to enumerate individual test cases, so there's no advantage in trying to
massage its output, and doing so throws away information that's useful
when diagnosing test failures.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 68fe988a40ca5dedec426735f52471d9af7bddbd)

2 years agokqueue tests: Add new EVFILT_TIMER regression tests from upstream
Mark Johnston [Wed, 25 May 2022 00:16:32 +0000 (20:16 -0400)]
kqueue tests: Add new EVFILT_TIMER regression tests from upstream

One of the tests exposes the regression reported in PR 264131.

One test is disabled because FreeBSD does not support setting EV_ONESHOT
on an already-added periodic timer.  Though, in this case the flag is
simply ignored, which isn't ideal.

One test is slightly modified to set EV_ADD when reconfiguring a
disabled timer per some commentary in PR 258412.

Ideally we would re-import the test suite from libkqueue but there is a
fair bit of divergence so this will require some effort.  This just gets
us one small step closer while increasing test coverage.

PR: 258412
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d6d4f9b45e0be306bdaf53b2133b2cd0f7642167)

2 years agokevent: Fix an off-by-one in filt_timerexpire_l()
Mark Johnston [Wed, 25 May 2022 00:14:33 +0000 (20:14 -0400)]
kevent: Fix an off-by-one in filt_timerexpire_l()

Suppose a periodic kevent timer fires close to its deadline, so that
now - kc->next is small.  Then delta ends up being 1, and the next timer
deadline is set to (delta + 1) * kc->to, where kc->to is the timer
period.  This means that the timer fires at half of the requested rate,
and the value returned in kn_data is similarly inaccurate.

PR: 264131
Fixes: 7cb40543e964 ("filt_timerexpire: do not iterate over the interval")
Reviewed by: kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 524dadf7a8725dea144571843e611dbdbd59d668)

2 years agokqueue tests: Add file and line info to some test failure output
Mark Johnston [Wed, 25 May 2022 00:14:20 +0000 (20:14 -0400)]
kqueue tests: Add file and line info to some test failure output

This brings us slightly closer to upstream and is useful when debugging
test failures.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit c728c56c870abe230e45cee5c477f0d890ebacef)

2 years agokqueue tests: Re-enable kqueue proc tests
Mark Johnston [Wed, 25 May 2022 00:14:10 +0000 (20:14 -0400)]
kqueue tests: Re-enable kqueue proc tests

- Some EVFILT_PROC bugs were fixed around the time that the tests were
  disabled.
- I can't reproduce any failures locally.
- Jenkins logs referenced from the PR are gone, so let's re-enable the
  tests and see whether a problem persists.

PR: 233586
Sponsored by: The FreeBSD Foundation

(cherry picked from commit bc7512cc58af2e8bbe5bbf5ca0059b1daa1da897)

2 years agoFix an indentation bug in the bcm pci driver
Andrew Turner [Mon, 23 May 2022 17:24:04 +0000 (18:24 +0100)]
Fix an indentation bug in the bcm pci driver

Sponsored by: The FreeBSD Foundation

(cherry picked from commit f16e38162c75015036b1c5e220b2f82a4bd94af1)

2 years agoUse the error given in the bcm PCI driver
Andrew Turner [Mon, 23 May 2022 17:21:40 +0000 (18:21 +0100)]
Use the error given in the bcm PCI driver

When given an error return it and not just ENXIO as it may contain
information usefule to debug an error.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 5749fdc53517179d9922235c9a1b5e99c6ac3abc)

2 years agoError is not a bool in bcm2838_pci, check for != 0
Andrew Turner [Mon, 23 May 2022 16:38:18 +0000 (17:38 +0100)]
Error is not a bool in bcm2838_pci, check for != 0

Fix for style an check if error != 0 in the bcm2838 pci driver.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit c3147104fdddb5cb358726888a0a612439d10f9e)

2 years agoFix the style of bcm_pcib_msi_attach a little
Andrew Turner [Mon, 23 May 2022 16:33:53 +0000 (17:33 +0100)]
Fix the style of bcm_pcib_msi_attach a little

Move the definition of error to the top of the function.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit b25d7f7477316d185277e4d29da220cc742f6802)

2 years agoSet mm before passing it to the UEFI firmware
Andrew Turner [Sat, 21 May 2022 10:45:41 +0000 (11:45 +0100)]
Set mm before passing it to the UEFI firmware

When reading the UEFI memory map we pass in a pointer to the memory to
hold the map. Unfortunately it wasn't initialised before the first use
so clang decided it was undefined behaviour so the entire loop was
removed. This leads to everything in bi_load after this to also be
removed as dead code.

The next function after bi_load in the binary is efi_copy_init. The
above caused us to enter efi_copy_init with a return address of the
start of the function. Because of this it would enter an infinite
loop of calling the function, allocating memory, then returning to
the start of the function.

PR: 264021
(cherry picked from commit 0d6600b579be769b85f049ef421023316f21b5c3)

2 years agoUse getpagesize in gcore to find the page size
Andrew Turner [Fri, 13 May 2022 11:56:14 +0000 (12:56 +0100)]
Use getpagesize in gcore to find the page size

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35194

(cherry picked from commit f9ca52bab510ff97c6a3c513ddce698a0d19934c)

2 years agoSupport LSE atomics in the arm64 casue* functions
Andrew Turner [Tue, 17 May 2022 13:52:30 +0000 (14:52 +0100)]
Support LSE atomics in the arm64 casue* functions

As with atomic(9) use the ARMv8.1 Large System Extension atomic
instructions to implement the userspace compare and swap functions.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35234

(cherry picked from commit 88ac318759f28f34aa991ecc6f336326ec00c501)

2 years agoHandle cas failure when the compare succeeds
Andrew Turner [Mon, 9 May 2022 14:28:56 +0000 (15:28 +0100)]
Handle cas failure when the compare succeeds

When locking a priority inherit mutex we perform a compare and swap
operation to try and acquire the mutex. This may fail even when the
compare succeeds.

Check and handle this case.

PR: 263825
Reviewed by: kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35150

(cherry picked from commit 11a6ecd4258b9108fb19420ec5db297f6d99a842)

2 years agoRemove PAGE_SIZE from libthr
Andrew Turner [Thu, 7 Apr 2022 16:24:46 +0000 (17:24 +0100)]
Remove PAGE_SIZE from libthr

In libthr we use PAGE_SIZE when allocating memory with mmap and to check
various structs will fit into a single page so we can use this allocator
for them.

Ask the kernel for the page size on init for use by the page allcator
and add a new machine dependent macro to hold the smallest page size
the architecture supports to check the structure is small enough.

This allows us to use the same libthr on arm64 with either 4k or 16k
pages.

Reviewed by: kib, markj, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34984

(cherry picked from commit c7904405a8d47f64c3b0e73158572e2dc8ef0217)

2 years agoUse the existing page size in libthr
Andrew Turner [Thu, 7 Apr 2022 16:20:04 +0000 (17:20 +0100)]
Use the existing page size in libthr

Rather than calling getpagesize() twice use the value saved after the
first call to size a mmap allocation.

Reviewed by: kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34983

(cherry picked from commit 86c500937c4514dda2319f193c4ccc043ffde2b3)

2 years agoMove the arm64 DMAP creation to C
Andrew Turner [Tue, 15 Mar 2022 17:05:48 +0000 (17:05 +0000)]
Move the arm64 DMAP creation to C

To simplify the creation of the direct map (DMAP) region on arm64 move
it from the pre-C code into pmap. This simplifies the DMAP creation
as we can use the notmal index macros, and should reduce the number
of pages needed to hold the level 1 tables to just those needed.

Reviewed by: alc, dch
Tested by: dch, kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34568

(cherry picked from commit bcd763b642abb4b236902e84184c579225265fb7)

2 years agoibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()
Hans Petter Selasky [Mon, 30 May 2022 18:19:33 +0000 (20:19 +0200)]
ibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()

The algorithm pre-allocates a cm_id since allocation cannot be done while
holding the cm.lock spinlock, however it doesn't free it on one error
path, leading to a memory leak.

Linux commit:
c14dfddbd869bf0c2bafb7ef260c41d9cebbcfec

PR: 264248
Sponsored by: NVIDIA Networking

(cherry picked from commit c4a415505311e30093b6d9ee0493427a66f2b0de)

2 years agomlx4core: Fix a memory leak when deleting slave's resources
Hans Petter Selasky [Mon, 30 May 2022 18:11:50 +0000 (20:11 +0200)]
mlx4core: Fix a memory leak when deleting slave's resources

mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule->mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR: 264249
Sponsored by: NVIDIA Networking

(cherry picked from commit f29c9901a41fb650d46fd48f4880a894f54aa737)

2 years agomlx4: Fix a memory leak bug.
Hans Petter Selasky [Thu, 19 May 2022 08:10:48 +0000 (10:10 +0200)]
mlx4: Fix a memory leak bug.

In function mlx4_opreq_action(), pointer "mailbox" is not released,
when mlx4_cmd_box() return and error, causing a memory leak bug.
Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
free this pointer.

Linux commit:
febfd9d3c7f74063e8e630b15413ca91b567f963

PR: 264056
Sponsored by: NVIDIA Networking

(cherry picked from commit 527762b2f776381569bd662ce236d2845234c0a7)