FreeBSD/src bbc2d15share/man/man5 pf.conf.5

pf.conf.5: Fix typo

Fix small typo in pf.conf(5)

MFC after:              3 days
Reviewed by:            ziaee
Differential Revision:  https://reviews.freebsd.org/D57938
DeltaFile
+1-1share/man/man5/pf.conf.5
+1-11 files

FreeBSD/src 6d29a93include assert.h

libc: Add variadic assert in accordance with C23

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit 867b51452ea78ece0b312a387e63fdbc2a11056a)
DeltaFile
+35-7include/assert.h
+35-71 files

FreeBSD/src 54dab51include assert.h

libc: Restrict the static_assert macro to pre-C23 modes

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit c5c7d18d011830088a2134e1be32f610f1f3e797)
DeltaFile
+4-1include/assert.h
+4-11 files

FreeBSD/src f57a6d5share/man/man3 assert.3

assert.3: Update as per C23

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit c115aad996d52f5270ccd22b27d1f34b4f0f4160)
DeltaFile
+61-15share/man/man3/assert.3
+61-151 files

FreeBSD/src 2126cabinclude assert.h

libc: Add <assert.h> C23 feature test macro

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit 0fe73dcf7c3260260afd95c3d1cfe846feb1df7c)
DeltaFile
+3-3include/assert.h
+3-31 files

FreeBSD/src a353353include assert.h

assert.h: Remove leading tabs for whitespace consistency

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit 157c184689ea3d7b8b6bd89aff849e94f004aa0e)
DeltaFile
+9-9include/assert.h
+9-91 files

FreeBSD/src d077749sbin/mdmfs mdmfs.c

mdmfs: Use standard bool definition

Include `<stdbool.h>` instead of defining a local bool enum.
This avoids duplicating a standard type name and keeps the
source compatible with headers that provide bool as a macro,
or in case of C23 that compilers provide it as keyword.

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit 64502126e126476456ca2aa60b4f798ed2d0b879)
DeltaFile
+1-2sbin/mdmfs/mdmfs.c
+1-21 files

FreeBSD/src 4706832include/rpcsvc yp_prot.h

rpcsvc: Remove obsolete bool definition from yp_prot.h

`yp_prot.h` has carried a SunRPC-era typedef of `bool` guarded by
`BOOL_DEFINED`, but the header itself does not use it. The YP/RPC
interfaces use `bool_t` for protocol booleans.

Defining `bool` in a public header collides with modern C headers
that provide `bool` as a macro or keyword, such as `<stdbool.h>`
and C23-aware assert handling. Drop the compatibility typedef and
leave `bool` definition to the consumer's language mode.

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2203

(cherry picked from commit 60c11e7c54d0128fafcea9c804c7736e2fb53e37)
DeltaFile
+0-5include/rpcsvc/yp_prot.h
+0-51 files

FreeBSD/src 58a15fesys/arm64/arm64 freebsd32_machdep.c

sys/arm64: fix return values of freebsd32_{set,swap}context()

This patch aligns the return values of freebsd32_{set,swap}context()
with their counterparts on amd64 and powerpc64, fixing the setcontext()
and swapcontext() calls in armv7 applications running on aarch64.

In particular, this fixes random crashes in armv7 Ruby applications
running on aarch64 hosts.

Tested by:      fuz
MFC after:      1 week

(cherry picked from commit 92ae21e8a155734f73589b7ef9fa19a6bb6d042f)
DeltaFile
+2-2sys/arm64/arm64/freebsd32_machdep.c
+2-21 files

FreeBSD/src 964215asys/arm64/arm64 freebsd32_machdep.c

sys/arm64: fix return values of freebsd32_{set,swap}context()

This patch aligns the return values of freebsd32_{set,swap}context()
with their counterparts on amd64 and powerpc64, fixing the setcontext()
and swapcontext() calls in armv7 applications running on aarch64.

In particular, this fixes random crashes in armv7 Ruby applications
running on aarch64 hosts.

Tested by:      fuz
MFC after:      1 week

(cherry picked from commit 92ae21e8a155734f73589b7ef9fa19a6bb6d042f)
DeltaFile
+2-2sys/arm64/arm64/freebsd32_machdep.c
+2-21 files

FreeBSD/src 65251c4share/man/man4 ntsync.4

ntsync.4: be explicit about the effect of automatic vs manual event on waiters

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+7-1share/man/man4/ntsync.4
+7-11 files

FreeBSD/src 0cf7106cli/bomtool main.c, cli/spdxtool main.c generate.c

Vendor import of pkgconf 2.9.93

Obtained from https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-2.9.93.tar.gz

SHA1: 6bcbedc97081e17ea58e0164adea2ab827acfe23  -
SHA256: b9632d0d91321f56645de720fd8cd3584b0d0ca8ff13a3d9d5285888869fcc98  -
SHA512: e014096f5486b7cdfa8c6410992b9143b63c7ef0ba540c7cad09923867c3924b951c1dfbd9a85f6d786b0deb30be1b7284f67317f4b261b6e0eca70b20ace1af  -

One test folder in tests/lib1 had to be removed to avoid UTF-8 filenames
in the tree. (Breaks `make create-source-packages`)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57890
DeltaFile
+18-201cli/spdxtool/main.c
+200-0fuzzer/spdxtool-fuzzer.c
+190-0cli/spdxtool/generate.c
+39-10cli/spdxtool/software.c
+16-28cli/bomtool/main.c
+29-0cli/spdxtool/generate.h
+492-2399 files not shown
+570-25715 files

FreeBSD/src b0fc1b7tests/api test-queue.c test-personality.c, tests/lib-sbom-files private_dependency.json

Vendor import of pkgconf 2.9.92

Obtained from https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-2.9.92.tar.gz

SHA1: 865d15aac5e720a8897b14e0f475736a810a9340  -
SHA256: 1eeda57d5f7b8dd346278ea164536f313366bb10d531d7c490be439638942f6d  -
SHA512: a66960f79f83508e372ef948ec98f906abb31aed0b4c1a667f2cf8235f55ede1553fc5dfd1baaa6217a2d82c725448e64207b1dfb858f21fdb12f82e6771546f  -

One test folder in tests/lib1 had to be removed to avoid UTF-8 filenames
in the tree. (Breaks `make create-source-packages`)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57856
DeltaFile
+250-0tests/api/test-queue.c
+187-0tests/api/test-personality.c
+176-0tests/lib-sbom-files/private_dependency.json
+160-0tests/api/test-oom-spdxtool.c
+152-0tests/api/test-path-utils.c
+133-0tests/api/test-version.c
+1,058-0120 files not shown
+2,388-64126 files

FreeBSD/src eaa6379. Makefile.am, tests/api test-serialize.c

Vendor import of pkgconf 2.9.91

Obtained from https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-2.9.91.tar.gz

SHA1: 8ac84e584ff568dace16f9012efcec603b78ca34  -
SHA256: 68de1892189f085ab21e735561c67b5a077b85e0ce29f91ac774c3ad1afbfc94  -
SHA512: b069c7e9266059a126443392853b353845f0ebffd1591bdbc5582853016074d284d3b2f3a2b6588deb29a662bb712f05261c9bca81452d6de536018dbc9d4314  -

One test folder in tests/lib1 had to be removed to avoid UTF-8 filenames
in the tree. (Breaks `make create-source-packages`)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57855
DeltaFile
+203-0tests/api/test-serialize.c
+150-0tests/lib-sbom-files/multiple_packages.json
+137-0tests/lib-sbom-files/bomtool-meta_package.txt
+98-0Makefile.am
+90-0tests/lib-sbom-files/special.json
+90-0tests/lib-sbom-files/agent_name_space.json
+768-086 files not shown
+1,751-7892 files

FreeBSD/src ebcc786cli main.c core.c, cli/spdxtool core.c

Vendor import of pkgconf 2.9.90

Obtained from https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-2.9.90.tar.gz

SHA1: ebfb0525c019eda14190d463680cb1625f3177f9  -
SHA256: f5c10610be8ea7278fc31ad63b943525b5b2a2f6e5038d3c11947f5bd6fd214d  -
SHA512: f93e6d15d25d02869a03ba339e18582f01a9b7241be89a87183c0f373a3df78d1be005dee376ea464f7942735700f51dab57b8688bc802ec152ff343af721f46  -

One test folder in tests/lib1 had to be removed to avoid UTF-8 filenames
in the tree. (Breaks `make create-source-packages`)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57837
DeltaFile
+178-1,479cli/main.c
+1,576-0tests/test-runner.c
+1,464-0cli/core.c
+194-975libpkgconf/win-dirent.h
+474-446libpkgconf/pkg.c
+729-0cli/spdxtool/core.c
+4,615-2,900396 files not shown
+20,423-6,370402 files

FreeBSD/src 8df9c18sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: adjust timing of sync_from_ni in lkpi_sta_assoc_to_run()

We used to call the (*sta_state) downcall into the driver to set the
sta state to ASSOC.  After that we did a lot of sync operations incl.
the lkpi_sta_sync_from_ni() which does a lot of rate and bandwith
adjustments.   This sync call needs to happen before we set the sta
to assoc as drivers rely on some of this information, e.g., ht_cap and
vht_cap (and equivalents for later standards) at that point.  Moving
this will make, e.g., mt7921 transmit at higher rates than just
basic_rates.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 75aadc902298005c47d2b931c483452027ceae69)
DeltaFile
+10-2sys/compat/linuxkpi/common/src/linux_80211.c
+10-21 files

FreeBSD/src f28bc5esys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: track bandwidth/rx_nss change in lkpi_sta_sync_from_ni()

In lkpi_sta_sync_from_ni() track the bandwidth and rx_nss at the
beginning so at the end we can diff if they changed in order to generate
the appropriate RC*CHNAGED flags for the (*link_sta_rc_update) downcall.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 53d9c14af6a65dcc037527c6ff5308c94806fafe)
DeltaFile
+13-0sys/compat/linuxkpi/common/src/linux_80211.c
+13-01 files

FreeBSD/src f0eeea3sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: consider emulate_chanctx in lkpi_sync_chanctx_cw_from_rx_bw()

Only return early if the bandwidth has not changed and we are not
using emulate_chanctx or the chandef.width already matches the new
bandwidth.  Otherwise we have to continue to get all the values
updated.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit cff565a4c0335e12376ea43f99ef5328c45ce933)
DeltaFile
+4-1sys/compat/linuxkpi/common/src/linux_80211.c
+4-11 files

FreeBSD/src f1f0aa3sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: add/change rate related tracing

Make use of the TRACE_RATES() macro and add various tracing events.
Also adjust some events formerly under TRACEOK to TRACE_RATES().

Ignoring the tracing, no other functional changes.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 42cf2798110e12df6ccc22a138ed89617ac7d407)
DeltaFile
+29-4sys/compat/linuxkpi/common/src/linux_80211.c
+29-41 files

FreeBSD/src f5b0b80sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: add function to update some rate related fields

Add lkpi_sta_supp_rates() which serves multiple purposes:
(a) build (and update) the supp_rates field on a sta link (deflink only
    in our case still),
(b) build and update basic_rates on the vif->bss_conf and print a
    warning in case we end up without any basic rate (should not happen
    anymore, not even on initial startup sync),
(c) if HT or VHT are supported, then update the relevant br_mask fields
    for the current band.

Deal with the various flags which trigger different updates by returning
them so the caller can act upon.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 0d3cd54642f6695f9f82b82402f27e10bbee7cfc)
DeltaFile
+150-2sys/compat/linuxkpi/common/src/linux_80211.c
+150-21 files

FreeBSD/src 1cb6a2asys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: make lkpi_sta_sync_from_ni() return bss_changes

This is a preparatory change with no functional changes.

Sponosred by:   The FreeBSD Foundation

(cherry picked from commit 038489e46ea3e77484ea85c4369610ba3ee8381b)
DeltaFile
+9-4sys/compat/linuxkpi/common/src/linux_80211.c
+9-41 files

FreeBSD/src c17a6e0sys/compat/linuxkpi/common/src linux_80211.c linux_80211.h

LinuxKPI: 802.11: initalize br_mask and basic_rates for each vap

During vap creating we inialize most [l]vif related variables.
Add a br_mask (bit rate mask) to the lvif and setup the legacy component
as it seems to be static.
Given we are looping over the bands, also initialize the bss_conf
basic_rates. At this point we only have all bitrates for the band
or the mandatory bitrates for the band available.  In order to not
hint usage of possibly unsupported bit rates set it up with the
manadatory bit rates only, which should get us through the mgmt
frames, etc. to get to assoc state.  By then we will do updates.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 7bf2eec68a293a22f332fc1592dffaa4ed9f0809)
DeltaFile
+44-1sys/compat/linuxkpi/common/src/linux_80211.c
+1-0sys/compat/linuxkpi/common/src/linux_80211.h
+45-12 files

FreeBSD/src a31e3e0sys/compat/linuxkpi/common/src linux_80211.h

LinuxKPI: 802.11: introduce TRACE_RATES()

Add a tracing bit for tracing rates related changes introduced in
followup commits.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit b58d8df5829233ced7024c30a0a979e2e0a722fd)
DeltaFile
+7-0sys/compat/linuxkpi/common/src/linux_80211.h
+7-01 files

FreeBSD/src 848cb6bsys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: add 11g check to lkpi_ic_getradiocaps()

Replace an early comment with code and add a (simplified) 11g check.
We make use of the annotated bitrate flags we added (see
lkpi_wiphy_band_annotate()) and check if on the 2GHz band there are
any bitrates which are 11g.  Upon the first one found we do set the
IEEE80211_MODE_11G to announce to net80211 that the 2.4Ghz channels
may operate on 11g as well.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit d4a529ad0d5638ad3e8d27815948b0a7c4628e3f)
DeltaFile
+13-3sys/compat/linuxkpi/common/src/linux_80211.c
+13-31 files

FreeBSD/src 5f4cd6csys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: add/improve/correct comments

Adjust/add comments to clarify certain situations.

No functional changes.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 08a78a296c840aa95ec13895c3c9bf1349becbae)
DeltaFile
+3-2sys/compat/linuxkpi/common/src/linux_80211.c
+3-21 files

FreeBSD/src 717e9ecsys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: leave a comment for sta->rates (mt7615, ?)

While we currently try to fill most rates places (e.g., basic_rates,
supp_rates, (*set_bitrate_mask)), sta->rates are not populated.

They are likely managed by the 802.11 rate control code (given no
ieee80211_hw_check HAS_RATE_CONTROL), which for use would be net80211,
which will require some extra code just to manage that.

At least Mediatek mt76 (mt7615) driver seems to fall into the category
of this need.  See about that once/if we get to it.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 557eed60d2a34d061350ac37acebe6686cd80d83)
DeltaFile
+1-1sys/compat/linuxkpi/common/include/net/mac80211.h
+1-11 files

FreeBSD/src 7299344sys/contrib/dev/mediatek/mt76/mt7925 pci.c

mt76: mt7925: prevent PM from scheduling another delayed work on detach

This duplicates 009d92b25f7c from mt7921 which has the full description.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 482fda9814937691557ebadd0930535ff3d301b0)
DeltaFile
+5-0sys/contrib/dev/mediatek/mt76/mt7925/pci.c
+5-01 files

FreeBSD/src 3b3b733sys/compat/linuxkpi/common/include/linux scatterlist.h

LinuxKPI: scatterlist.h: implement sg_init_marker()

Add sg_init_marker() which is needed by mt76 drivers USB attachment.

Sponosored by:  The FreeBSD Foundation
Reviewed by:    emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D57594

(cherry picked from commit 3d0b6c69dced4936fccff6733912a0ef93214dbe)
DeltaFile
+6-0sys/compat/linuxkpi/common/include/linux/scatterlist.h
+6-01 files

FreeBSD/src 2b3a18dsys/compat/linuxkpi/common/include/linux kernel.h

LinuxKPI: add KERNEL_VERSION() macro

Add a KERNEL_VERSION() macro which normally would be in linux/version.h.
On Linux that file is auto-generated and we are supporting more than
one Linux version in LinuxKPI anyway so any further defines in there
would likely be wrong.

Adding the macro helps to support (vendor/out of tree) drivers more
easily which are supporting multiple Linux versions.

Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D57590

(cherry picked from commit c5d6e2085a471cbb75cc7b88b37a2fe6276c16f8)
DeltaFile
+3-0sys/compat/linuxkpi/common/include/linux/kernel.h
+3-01 files

FreeBSD/src 4406a07sys/compat/linuxkpi/common/src linux_80211.c linux_80211_macops.c

LinuxKPI: 802.11: lock down mac80211 downcalls

Add lock assertions and "might_sleep" annotations to various
mac80211 operation downcalls into the driver.

Make sure the code to these is all covered by locks--pushing more wiphy
lock into the code--or lock assertions as well.  Split up parts of the
MC code up into an unlocked and locked version to avoid recurive locking.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 1c601bf516ebefb1670f5612316c501f2ae2654a)
DeltaFile
+48-10sys/compat/linuxkpi/common/src/linux_80211.c
+19-0sys/compat/linuxkpi/common/src/linux_80211_macops.c
+67-102 files