]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 months agodaemon: move variables into struct daemon_state
Ihor Antonov [Sun, 12 Mar 2023 16:07:34 +0000 (10:07 -0600)]
daemon: move variables into struct daemon_state

The fact that most of the daemon's state is stored on the stack
of the main() makes it hard to split the logic smaller chunks.
Which in turn leads to huge main func that does a a lot of things.
struct log_params existed because some variables need to be passed
into other functions together.

This change renames struct log_params into daemon_state
and moves the rest of the variables into it. This is a necessary
preparation step for further refactroing.

Reviewed by: imp

(cherry picked from commit 298a392ec31819c8440974eeb47dfed48568fd5e)

15 months agoBump __FreeBSD_version for llvm 15.0.7 merge
Dimitry Andric [Wed, 8 Feb 2023 19:20:21 +0000 (20:20 +0100)]
Bump __FreeBSD_version for llvm 15.0.7 merge

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 3264f6b88fce7c5437d205685863617d8f6a22dd)

15 months agosctp: tweak panic message
Michael Tuexen [Wed, 3 Aug 2022 15:28:15 +0000 (17:28 +0200)]
sctp: tweak panic message

MFC after: 1 week

(cherry picked from commit 979bc32c7c14f944a340058fcd1a580a7492f785)

15 months agoi386: ansify
Dmitry Chagin [Sat, 25 Mar 2023 20:21:03 +0000 (23:21 +0300)]
i386: ansify

Reported by: clang 15

(cherry picked from commit f0fe68a965a2f0b42c296fef2c756f168a57b326)

15 months agorpc: ansify
Mateusz Guzik [Mon, 13 Feb 2023 05:39:10 +0000 (05:39 +0000)]
rpc: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 71948c15ba9e6db536e7a26c65f2f22ee03f1630)

15 months agolge: ansify
Mateusz Guzik [Sun, 12 Feb 2023 21:37:24 +0000 (21:37 +0000)]
lge: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 16d10ee0235abb217773aa46b927c8c1513f3261)

15 months agosysv: ansify
Mateusz Guzik [Wed, 8 Feb 2023 00:11:10 +0000 (00:11 +0000)]
sysv: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 08d357287b4306b24110dc5ff15bcf5d51f79b28)

15 months agoddb: ansify
Mateusz Guzik [Wed, 8 Feb 2023 00:09:23 +0000 (00:09 +0000)]
ddb: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fb1b78bfcead2126f9a984ac1c3e6a3a7e505f83)

15 months agosk: ansify
Mateusz Guzik [Wed, 8 Feb 2023 00:05:03 +0000 (00:05 +0000)]
sk: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 82c519c21f15b7ce4775a7484aa4354f40771480)

15 months agosmbfs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:35:11 +0000 (23:35 +0000)]
smbfs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b09b03a19d26e63046f3413cc8be2e4ece08daff)

15 months agoudf: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:24:24 +0000 (23:24 +0000)]
udf: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 724240c6fa249e03762cee62a95405105bd69ebe)

15 months agonullfs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:22:27 +0000 (23:22 +0000)]
nullfs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 24641b8b3964e9015d3f8579b2359104bb0e5eea)

15 months agofifofs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:18:51 +0000 (23:18 +0000)]
fifofs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit ed40bc50dff06219baa251f1d238249624cb74ec)

15 months agovfs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:03:20 +0000 (23:03 +0000)]
vfs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 8377575772be0ed37eb42a0b08c684d9fc5c3e18)

15 months agoamd64: ansify
Mateusz Guzik [Tue, 7 Feb 2023 22:52:06 +0000 (22:52 +0000)]
amd64: ansify

Reported by:    clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b2c68dc6d9b31de853664ac9277816678d2c9181)

15 months agoUpdate CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for clang 15.
Dimitry Andric [Mon, 25 Jul 2022 10:29:58 +0000 (12:29 +0200)]
Update CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for clang 15.

MFC after: 3 days

(cherry picked from commit 526f57bf85a2b9b113c55ded47b932abc8567bc5)

15 months agoFix unused variable warnings in sctp_indata.c
Dimitry Andric [Mon, 25 Jul 2022 19:15:52 +0000 (21:15 +0200)]
Fix unused variable warnings in sctp_indata.c

With clang 15, the following -Werror warnings are produced:

    sys/netinet/sctp_indata.c:3309:6: error: variable 'tot_retrans' set but not used [-Werror,-Wunused-but-set-variable]
            int tot_retrans = 0;
                ^
    sys/netinet/sctp_indata.c:3842:20: error: variable 'resend' set but not used [-Werror,-Wunused-but-set-variable]
            int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
                              ^
    sys/netinet/sctp_indata.c:3842:47: error: variable 'acked' set but not used [-Werror,-Wunused-but-set-variable]
            int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
                                                         ^
    sys/netinet/sctp_indata.c:3842:58: error: variable 'above' set but not used [-Werror,-Wunused-but-set-variable]
            int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
                                                                    ^

The 'tot_retrans' variable was used in sctp_strike_gap_ack_chunks(), but
refactoring in 493d8e5a830e got rid of it. Remove the variable since it
no longer serves any purpose.

The 'resend', 'acked', and 'above' variables are only used when
INVARIANTS is undefined. Ensure they are only declared and set in that
case.

MFC after: 3 days

(cherry picked from commit 05b3a4282c408f495add570bbca12242dd006279)

15 months agoless: silence K&R warns
Mateusz Guzik [Thu, 16 Mar 2023 18:24:12 +0000 (18:24 +0000)]
less: silence K&R warns

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 3451ed888e7519ba620e7372ba620500c47bdc8a)

15 months agolibz: silence K&R warns
Mateusz Guzik [Thu, 16 Mar 2023 18:22:24 +0000 (18:22 +0000)]
libz: silence K&R warns

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit de0009f001c2aa0bfb9349d9e08199c46b1af707)

15 months agosendmail: silence K&R warns
Mateusz Guzik [Thu, 16 Mar 2023 18:18:48 +0000 (18:18 +0000)]
sendmail: silence K&R warns

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 95a2b4d17234fb78177add37c8882d133855c3d0)

15 months agozlib: Use NO_WDEPRECATED_NON_PROTOTYPE
Warner Losh [Mon, 13 Feb 2023 16:15:58 +0000 (09:15 -0700)]
zlib: Use NO_WDEPRECATED_NON_PROTOTYPE

Also add it to kern.mk so it's available for module builds.

Sponsored by: Netflix
Noticed by: mjg
Fixes: b9f235ba3178
Differential Revision: https://reviews.freebsd.org/D38550

(cherry picked from commit b80185c267243a57bbc3e03fd2b47680672d6050)

15 months agobearssl: Suppress warnings from functions that have no args
Warner Losh [Mon, 13 Feb 2023 15:19:40 +0000 (08:19 -0700)]
bearssl: Suppress warnings from functions that have no args

clag15 is much pickier than others, so suppress the warning until
upstream can be updated.

Sponsored by: Netflix

(cherry picked from commit 9768746ba83efa02837c5b9c66348db6e900208f)

15 months agoProperly conditionalize clang 15-only flags
Warner Losh [Mon, 13 Feb 2023 15:19:00 +0000 (08:19 -0700)]
Properly conditionalize clang 15-only flags

Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38550

(cherry picked from commit b9f235ba3178e5315cc1c77c87febd033cf69b3e)

15 months agozlib: silence K&R warns
Mateusz Guzik [Sun, 12 Feb 2023 21:12:34 +0000 (21:12 +0000)]
zlib: silence K&R warns

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit eca005d8531fd153f46f941f3101e73cdf181a0b)

15 months agoclang: Define NO_WDEPRECATED_NON_PROTOTYPE for clang 15
Warner Losh [Wed, 30 Nov 2022 18:08:16 +0000 (11:08 -0700)]
clang: Define NO_WDEPRECATED_NON_PROTOTYPE for clang 15

Clang 15 enforces function definitions using the C89 form rather than
the K&R form. While not strictly a prototype (which is only for a
declaration), use the name that mirror's clang's warning name. Much code
in contrib still uses K&R function definitions, so invent this for
compiling there.

Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D37515

(cherry picked from commit 0ecb61619688acf57a6f5d7b00bf7fda62cf7c53)

15 months agollvm/lld: damage control threading
Mateusz Guzik [Sun, 2 Apr 2023 12:38:49 +0000 (12:38 +0000)]
llvm/lld: damage control threading

See the comment inside.

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D39389

(cherry picked from commit 04bab189b8a54974fcd9530140e4eed6ad137f48)

15 months agoReapply: <type_traits>: Avoid instantiating a pointer type in std::decay<>
Dimitry Andric [Thu, 9 Feb 2023 09:33:42 +0000 (10:33 +0100)]
Reapply: <type_traits>: Avoid instantiating a pointer type in std::decay<>

  GCC expands the pointer type in this conditional expression even for
  template types _Up that are not arrays.  This raises an error when
  std::decay<> is used with reference types (as is done in LLVM's
  sources).  Using add_pointer<> causes GCC to only instantiate a
  pointer type for array types.

  A similar change to this commit (albeit reworked due to upstream
  changes) has been merged to libc++ in commit
  26068c6e60324ed866a1ca2afb5cb5eb0aaf015b.

  In file included from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/ordering.h:13,
                   from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/common_comparison_category.h:12,
                   from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/tuple:168,
                   from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:20,
                   from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMap.h:17,
                   from /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:36:
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits: In instantiation of 'struct std::__1::__decay<llvm::CHIArg&, true>':
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1591:89:   required from 'struct std::__1::decay<llvm::CHIArg&&>'
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__utility/pair.h:132:16:   required by substitution of 'template<class _Tuple, typename std::__1::enable_if<typename std::__1::conditional<(std::__1::__tuple_like_with_size<_Tuple, 2, typename std::__1::__uncvref<_Tp>::type>::value && (! std::__1::is_same<typename std::__1::decay<_Tp>::type, std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> > >::value)), std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* <anonymous> > constexpr std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::pair(_Tuple&&) [with _Tuple = llvm::CHIArg&&; typename std::__1::enable_if<typename std::__1::conditional<(std::__1::__tuple_like_with_size<_Tuple, 2, typename std::__1::__uncvref<_Tp>::type>::value && (! std::__1::is_same<typename std::__1::decay<_Tp>::type, std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> > >::value)), std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* <anonymous> = <missing>]'
  /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:892:51:   required from here
  /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1582:30: error: forming pointer to reference type 'std::__1::remove_extent<llvm::CHIArg&>::type' {aka 'llvm::CHIArg&'}
   1582 |                      >::type type;
        |                              ^~~~

  Reviewed by:    dim
  Differential Revision:  https://reviews.freebsd.org/D36898

This reapplies commit c36de97088a2b9141cdaf2fae2a7f41bf820ffa0, which I
accidentally overwrote in the llvm 15 merge. (It turns out upstream did
not merge this to their 15.x branch.)

MFC after: 2 weeks

(cherry picked from commit 4378cc5cfb5cf928e287c0143efb120d5558c4a0)

15 months agoMerge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6
Dimitry Andric [Sat, 14 Jan 2023 16:33:24 +0000 (17:33 +0100)]
Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 50d7464c3fe687c0a3d4dea6b96a5437779a3ef6)

15 months agoMerge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a
Dimitry Andric [Sun, 4 Dec 2022 22:09:55 +0000 (23:09 +0100)]
Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit f3fd488f1e19a3d09c4bdcece893901de4f49cdd)

15 months agoMerge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846
Dimitry Andric [Sun, 16 Oct 2022 19:03:40 +0000 (21:03 +0200)]
Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 6246ae0b85d8159978c01ae916a9ad6cde9378b5)

15 months agoMerge llvm-project release/15.x llvmorg-15.0.0-9-g1c73596d3454
Dimitry Andric [Sat, 10 Sep 2022 18:56:18 +0000 (20:56 +0200)]
Merge llvm-project release/15.x llvmorg-15.0.0-9-g1c73596d3454

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-9-g1c73596d3454.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit a4a491e2238b12ccd64d3faf9e6401487f6f1f1b)

15 months agoMerge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d
Dimitry Andric [Sat, 13 Aug 2022 15:37:04 +0000 (17:37 +0200)]
Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-rc2-40-gfbd2950d8d0d.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 61cfbce3347e4372143bcabf7b197577b9f3958a)

15 months agoMerge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4
Dimitry Andric [Wed, 27 Jul 2022 20:11:54 +0000 (22:11 +0200)]
Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before
the upstream release/16.x branch was created.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 972a253a57b6f144b0e4a3e2080a2a0076ec55a0)

15 months agoMerge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b
Dimitry Andric [Sun, 24 Jul 2022 15:11:41 +0000 (17:11 +0200)]
Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17485-ga3e38b4a206b.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit fcaf7f8644a9988098ac6be2165bce3ea4786e91)

15 months agoMerge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f
Dimitry Andric [Thu, 14 Jul 2022 18:58:48 +0000 (20:58 +0200)]
Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 753f127f3ace09432b2baeffd71a308760641a62)

15 months agoMerge llvm-project main llvmorg-15-init-15358-g53dc0f10787
Dimitry Andric [Mon, 4 Jul 2022 19:20:19 +0000 (21:20 +0200)]
Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR: 265425
MFC after: 2 weeks

(cherry picked from commit 81ad626541db97eb356e2c1d4a20eb2a26a766ab)

15 months agolibc/yp: sort out warnings
Mateusz Guzik [Thu, 16 Mar 2023 18:56:47 +0000 (18:56 +0000)]
libc/yp: sort out warnings

.. in least-effort manner

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit ba5070ab441f1ad901c0412f531bd646d0bd0616)

15 months agoRevert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"
Dimitry Andric [Wed, 29 Mar 2023 18:37:02 +0000 (20:37 +0200)]
Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"

This reverts commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71. The intent
of this change was to avoid possible compilation errors when certain
.inc files were not regenerated, but the method turns out to cause way
more rebuilds than anticipated. Another method will have to be found,
and in the mean time, WITH_CLEAN is the solution that always works.

Fixes: ab80f0b21fbb
(cherry picked from commit 4dc3b1fa1bbcf20f7713d94776a1604964ada32b)

15 months ago<type_traits>: Avoid instantiating a pointer type in std::decay<>.
John Baldwin [Thu, 24 Nov 2022 00:10:05 +0000 (16:10 -0800)]
<type_traits>: Avoid instantiating a pointer type in std::decay<>.

GCC expands the pointer type in this conditional expression even for
template types _Up that are not arrays.  This raises an error when
std::decay<> is used with reference types (as is done in LLVM's
sources).  Using add_pointer<> causes GCC to only instantiate a
pointer type for array types.

A similar change to this commit (albeit reworked due to upstream
changes) has been merged to libc++ in commit
26068c6e60324ed866a1ca2afb5cb5eb0aaf015b.

In file included from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/ordering.h:13,
                 from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/common_comparison_category.h:12,
                 from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/tuple:168,
                 from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:20,
                 from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMap.h:17,
                 from /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:36:
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits: In instantiation of 'struct std::__1::__decay<llvm::CHIArg&, true>':
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1591:89:   required from 'struct std::__1::decay<llvm::CHIArg&&>'
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__utility/pair.h:132:16:   required by substitution of 'template<class _Tuple, typename std::__1::enable_if<typename std::__1::conditional<(std::__1::__tuple_like_with_size<_Tuple, 2, typename std::__1::__uncvref<_Tp>::type>::value && (! std::__1::is_same<typename std::__1::decay<_Tp>::type, std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> > >::value)), std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* <anonymous> > constexpr std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::pair(_Tuple&&) [with _Tuple = llvm::CHIArg&&; typename std::__1::enable_if<typename std::__1::conditional<(std::__1::__tuple_like_with_size<_Tuple, 2, typename std::__1::__uncvref<_Tp>::type>::value && (! std::__1::is_same<typename std::__1::decay<_Tp>::type, std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> > >::value)), std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<llvm::CHIArg, 2> >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* <anonymous> = <missing>]'
/usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:892:51:   required from here
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1582:30: error: forming pointer to reference type 'std::__1::remove_extent<llvm::CHIArg&>::type' {aka 'llvm::CHIArg&'}
 1582 |                      >::type type;
      |                              ^~~~

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D36898

(cherry picked from commit c36de97088a2b9141cdaf2fae2a7f41bf820ffa0)

15 months agotimes: Use modern function definitions
Warner Losh [Tue, 25 Oct 2022 05:03:11 +0000 (23:03 -0600)]
times: Use modern function definitions

Use the modern ANSI function defition syntax rather than the old K&R
syntax for times.

Sponsored by: Netflix

(cherry picked from commit aec9453fec70864234c70ccd0198c8b612139cf7)

15 months agonetlink: add standrard ifaddr/neigh parsers to snl(3).
Alexander V. Chernikov [Sun, 26 Mar 2023 09:04:41 +0000 (09:04 +0000)]
netlink: add standrard ifaddr/neigh parsers to snl(3).

MFC after: 2 weeks

(cherry picked from commit 9a11f3dff991bac89afb5f74a476e765abdbd1d1)

15 months agorouting: add public rt_is_exportable() version to check if
Alexander V. Chernikov [Sun, 26 Mar 2023 08:19:56 +0000 (08:19 +0000)]
routing: add public rt_is_exportable() version to check if
 the route can be exported to userland when jailed.

Differential Revision: https://reviews.freebsd.org/D39204
MFC after: 2 weeks

(cherry picked from commit 2cda6a2fb0d9473a53931dc2b0171af54dd79b04)

15 months agoheimdal: Do not build a redundant source file
Cy Schubert [Sat, 1 Apr 2023 03:43:10 +0000 (20:43 -0700)]
heimdal: Do not build a redundant source file

Heimdal's lib/hdb/db3.c is only built if DB3 is enabled, i.e. #if HAVE_DB3.
FreeBSD's bdb is DB1. Therefore the entire db3.c file is #ifdef'd out.
Let's avoid building a file that results in a useless object file.

(cherry picked from commit 7ee18f5aada07f03433504545c1b7bed91cbda82)

15 months agowpa_supplicant/hostapd: Fix uninitialized packet pointer on error
Cy Schubert [Thu, 6 Apr 2023 04:07:15 +0000 (21:07 -0700)]
wpa_supplicant/hostapd: Fix uninitialized packet pointer on error

The packet pointer (called packet) will remain uninitialized when
pcap_next_ex() returns an error. This occurs when the wlan
interface is shut down using ifconfig destroy. Adding a NULL
assignment to packet duplicates what pcap_next() does.

The reason we use pcap_next_ex() in this instance is because with
pacp_next() when we receive a null pointer if there was an error
or if no packets were read. With pcap_next_ex() we can differentiate
between an error and legitimately no packets were received.

PR: 270649
Reported by: Robert Morris <rtm@lcs.mit.edu>
Fixes: 6e5d01124fd4

(cherry picked from commit 953efa5b200f060564a090ab71b3d7f614a35e3f)

15 months agorouting: fix panic when adding an interface route to the p2p interface
Alexander V. Chernikov [Wed, 29 Mar 2023 20:28:24 +0000 (20:28 +0000)]
routing: fix panic when adding an interface route to the p2p interface
  without and inet/inet6 addresses attached.

MFC after:      3 days

(cherry picked from commit badcb3fd5710a511e35ac3afd724ef68c77614b7)

15 months agonetlink: reduce the default debugging levels
Alexander V. Chernikov [Tue, 21 Mar 2023 18:55:00 +0000 (18:55 +0000)]
netlink: reduce the default debugging levels

Reported by: kp
MFC after: 2 weeks

(cherry picked from commit a74998f38a2e1d1c943087e2c9cf104a4f037a45)

15 months agotests: fix python parsing of netlink nested attributes
Alexander V. Chernikov [Mon, 13 Mar 2023 10:17:36 +0000 (10:17 +0000)]
tests: fix python parsing of netlink nested attributes

MFC after: 2 weeks

(cherry picked from commit 90bc2120b51bc5ac9fbcb29763cc47562ee49977)

15 months agotests: add more netlink tests for neighbors/routes
Alexander V. Chernikov [Tue, 7 Mar 2023 17:30:35 +0000 (17:30 +0000)]
tests: add more netlink tests for neighbors/routes

Differential Revision: https://reviews.freebsd.org/D38912
MFC after: 2 weeks

(cherry picked from commit c57dfd92c876fabc04e94945dd9534468520bbbf)

15 months agotests: add netlink large dump buffer check
Alexander V. Chernikov [Mon, 20 Feb 2023 10:20:23 +0000 (10:20 +0000)]
tests: add netlink large dump buffer check

Differential Revision: https://reviews.freebsd.org/D38665
MFC after: 2 weeks

(cherry picked from commit 828d3c6c4cc0b782e16abb1ae18023734a0b710f)

15 months agotests: fix netlink test_dump_ifaces_many test.
Alexander V. Chernikov [Sat, 18 Feb 2023 22:26:32 +0000 (22:26 +0000)]
tests: fix netlink test_dump_ifaces_many test.

Consider only loopback interfaces when counting.
Otherwise, if pf is loaded, 'pflog0' gets added to the vnet,
 breaking the test.

MFC after: 2 weeks

(cherry picked from commit 79748cec1f1c3437e49d7694e95fc7f438336805)

15 months agonetlink: do not crash when linux message translation fails.
Alexander V. Chernikov [Sat, 18 Feb 2023 17:41:48 +0000 (17:41 +0000)]
netlink: do not crash when linux message translation fails.

CID: 1498889
MFC after: 2 weeks

(cherry picked from commit 453c7d6803aa9cbbaec74c7706276736de22f7b4)

15 months agonetlink: initialise error in nl_autobind_port().
Alexander V. Chernikov [Sat, 18 Feb 2023 17:18:57 +0000 (17:18 +0000)]
netlink: initialise error in nl_autobind_port().

CID: 1498877
MFC after: 2 weeks

(cherry picked from commit 4404e840cf3aa8d06d79dc281fffbb32860ab2af)

15 months agonetlink: check result of sooptcopyin().
Alexander V. Chernikov [Sat, 18 Feb 2023 17:15:25 +0000 (17:15 +0000)]
netlink: check result of sooptcopyin().

CID: 1498866
MFC after: 2 weeks

(cherry picked from commit 3f70fca90f9f1c6a40e55e6edd2dc1b1272f4998)

15 months agonetlink: remove redundant check.
Alexander V. Chernikov [Sat, 18 Feb 2023 17:10:39 +0000 (17:10 +0000)]
netlink: remove redundant check.

MFC after: 2 weeks
CID: 1498867

(cherry picked from commit 1ea58b413595310de43587c609421ede74770f11)

15 months agonetlink: improve attribute decoding in python tests
Alexander V. Chernikov [Fri, 17 Feb 2023 18:04:53 +0000 (18:04 +0000)]
netlink: improve attribute decoding in python tests

MFC after: 2 weeks

(cherry picked from commit ff8da9b2bab43920a19c16855ac3d30b5ccb1df2)

15 months agonetlink: add public ucred accessor for nlp.
Alexander V. Chernikov [Sat, 18 Mar 2023 11:44:29 +0000 (11:44 +0000)]
netlink: add public ucred accessor for nlp.

MFC after: 2 weeks

(cherry picked from commit 046acc2bfd13f0caaf5132c1ad34877917db1a38)

15 months agonetlink: fix capped uncapped ack handling in snl(3).
Alexander V. Chernikov [Fri, 17 Mar 2023 14:27:08 +0000 (14:27 +0000)]
netlink: fix capped uncapped ack handling in snl(3).

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D39144
MFC after: 2 weeks

(cherry picked from commit 568a645ba55a1c3fc4fc74735cb0fab08bfe4cbf)

15 months agonetlink: improve snl(3)
Alexander V. Chernikov [Wed, 15 Mar 2023 13:56:26 +0000 (13:56 +0000)]
netlink: improve snl(3)

Summary:
* add snl_send_message() as a convenient send wrapper
* add signed integer parsers
* add snl_read_reply_code() to simplify operation result checks
* add snl_read_reply_multi() to simplify reading multipart messages
* add snl_create_genl_msg_request()
* add snl_get_genl_family() to simplify family name->id resolution
* add tests for some of the functionality

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D39092
MFC after: 2 weeks

(cherry picked from commit 73ae25c174b515616050496dea764a943796efef)

15 months agofix buildworld after 595d23f777dc.
Alexander V. Chernikov [Thu, 9 Mar 2023 15:44:59 +0000 (15:44 +0000)]
fix buildworld after 595d23f777dc.

Reported by: se

(cherry picked from commit da4047d3ba23201ae4049dccea1151bd6ca2d1df)

15 months agonetlink: add snl(3) default parsers for routes and links.
Alexander V. Chernikov [Thu, 9 Mar 2023 14:43:56 +0000 (14:43 +0000)]
netlink: add snl(3) default parsers for routes and links.

This change adds the "default" parsers of _all_ route/link attributes
 exported by the kernel.
It removes the need to declare similar parsers in the userland applications,
 simplifying their logic.

Differential Revision: https://reviews.freebsd.org/D38979
MFC after: 2 weeks

(cherry picked from commit 595d23f777dc24cb285b072c596ca96bbc2db3cd)

15 months agonetlink: add rtsock-compatible header to use with netlink snl(3).
Alexander V. Chernikov [Thu, 9 Mar 2023 14:36:52 +0000 (14:36 +0000)]
netlink: add rtsock-compatible header to use with netlink snl(3).

Some routing socket defines (`RTM_` and `RTA_` ones) clash with the ones
 used by the the Netlink.
As some rtsock definitions like interface flags or route flags are used in
 both netlink and rtsock, provide a convenient way to include those without
 running into the define collision.

Differential Revision: https://reviews.freebsd.org/D38982
MFC after: 2 weeks

(cherry picked from commit 90d625122886a2db5b66d248807b89f4a0270466)

15 months agonetlink: add basic message writing support to snl(3).
Alexander V. Chernikov [Thu, 9 Mar 2023 14:33:26 +0000 (14:33 +0000)]
netlink: add basic message writing support to snl(3).

Differential Revision: https://reviews.freebsd.org/D38947
MFC after: 2 weeks

(cherry picked from commit 76f6d391504b040528882a908147e47ea90b7b90)

15 months agonetlink: make snl(3) scratch buffer growable
Alexander V. Chernikov [Wed, 8 Mar 2023 11:17:43 +0000 (11:17 +0000)]
netlink: make snl(3) scratch buffer growable

Differential Revision: https://reviews.freebsd.org/D38946
MFC after: 2 weeks

(cherry picked from commit 0679eb1f39aa798da6c4601bb06bab4c175c4b18)

15 months agonetlink: cleanup netlink_writer code
Alexander V. Chernikov [Tue, 7 Mar 2023 17:42:27 +0000 (17:42 +0000)]
netlink: cleanup netlink_writer code

* Remove unused nlattr_add_nla() - that's a duplicate of nlattr_add_raw().
* Calculate alignment only once in nlmsg_reserve_data_raw()

MFC after: 2 weeks

(cherry picked from commit 5c8277ec2588a660f126e1a9866cd65f59336c51)

15 months agonetlink: fix vlan interface creation
Alexander V. Chernikov [Fri, 3 Mar 2023 16:01:34 +0000 (16:01 +0000)]
netlink: fix vlan interface creation

MFC after: 2 weeks

(cherry picked from commit ce9f95bd835ec7d3ac6def5a910282509b1413f0)

15 months agonetlink: add u8/u64 attribute fetcher accessors to snl(3).
Alexander V. Chernikov [Fri, 3 Mar 2023 14:05:40 +0000 (14:05 +0000)]
netlink: add u8/u64 attribute fetcher accessors to snl(3).

MFC after: 2 weeks

(cherry picked from commit 61507ae30b9096eaa0d44fec71211f3843d546eb)

15 months agonetlink: add userland name mappings to all NETLINK_ROUTE messages.
Alexander V. Chernikov [Wed, 1 Mar 2023 15:22:21 +0000 (15:22 +0000)]
netlink: add userland name mappings to all NETLINK_ROUTE messages.

MFC after: 1 day

(cherry picked from commit e6b4177c478da54e25db464ae60ddae9e890c2cb)

15 months agofdesc_lookup(): drop fdropped
Konstantin Belousov [Thu, 23 Mar 2023 19:30:04 +0000 (21:30 +0200)]
fdesc_lookup(): drop fdropped

(cherry picked from commit 13262b07a06910edd5e58e6bb2e1d4786a7b7d8e)

15 months agofdesc_lookup(): the condition to use vn_vget_ino() is always true
Konstantin Belousov [Thu, 23 Mar 2023 19:28:08 +0000 (21:28 +0200)]
fdesc_lookup(): the condition to use vn_vget_ino() is always true

(cherry picked from commit 7dca8fd1cb3f91e7a3c07b7f57af6d9d43d0c71c)

15 months agofdesc_lookup(): no need to vhold the dvp vnode
Konstantin Belousov [Wed, 22 Mar 2023 13:36:00 +0000 (15:36 +0200)]
fdesc_lookup(): no need to vhold the dvp vnode

(cherry picked from commit 8d97282a394278d29883e7afa98ed6294efab35e)

15 months agoacl tests: Serialize
Mark Johnston [Sat, 25 Mar 2023 19:09:48 +0000 (15:09 -0400)]
acl tests: Serialize

Some of these tests import a ZFS pool with a hard-coded name, so they
cannot run in parallel.

MFC after: 1 week

(cherry picked from commit 34b696e41259e41ae3ac61a539bd152d3afb73ae)

15 months agofdgrowtable tests: Address a set-but-not-used warning
Mark Johnston [Thu, 30 Mar 2023 17:53:48 +0000 (13:53 -0400)]
fdgrowtable tests: Address a set-but-not-used warning

MFC after: 1 week

(cherry picked from commit 889b5662ce06ad01f87f1e501dc56c7bc50bbf9b)

15 months agopf tests: Serialize
Mark Johnston [Sat, 25 Mar 2023 12:55:41 +0000 (08:55 -0400)]
pf tests: Serialize

These tests reuse jail names and cannot run in parallel.  Until this is
fixed - which is desirable since these takes take a while to run - tell
kyua to serialize them.

MFC after: 1 week

(cherry picked from commit b60600ceeb68d1001d61222830e0be3441ef0885)

15 months agonetpfil tests: Serialize
Mark Johnston [Thu, 30 Mar 2023 15:20:01 +0000 (11:20 -0400)]
netpfil tests: Serialize

These tests reuse jail names and so cannot run in parallel.

MFC after: 1 week

(cherry picked from commit cdb192434cbc6449778888a73c7bdbe2ae94c3c8)

15 months agoaio tests: Use unique names for zvols
Mark Johnston [Sat, 25 Mar 2023 19:41:07 +0000 (15:41 -0400)]
aio tests: Use unique names for zvols

Otherwise tests which create zvols cannot be run in parallel.

MFC after: 1 week

(cherry picked from commit 9cefc0fb1387f6c5b0954e875b14e596167c9a45)

15 months agocap_dns tests: Convert to ATF, avoid failing when lookups don't resolve
Mark Johnston [Thu, 30 Mar 2023 23:27:36 +0000 (19:27 -0400)]
cap_dns tests: Convert to ATF, avoid failing when lookups don't resolve

The cap_dns tests require Internet access.  Currently they fail when
that's not available, which for CI purposes is undesirable.  Let's
instead skip the tests if none of the non-casper name/addr lookups
succeed.

To that end:
- Convert the tests to ATF so that skipping is easier to implement.
- Break up the tests into separate test cases.
- If one of the system (i.e., non-casper) lookup functions fails, skip
  the test if all of them failed, otherwise fail the tests, since
  partial failure indicates something is flaky and deserves a closer
  look.

Reviewed by: oshogbo
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39241

(cherry picked from commit 615bf03e33e466ca10e3f1d203f4c27188d28fc3)

15 months agocap_sysctl tests: Serialize
Mark Johnston [Fri, 24 Mar 2023 16:26:20 +0000 (12:26 -0400)]
cap_sysctl tests: Serialize

These tests fail spuriously when run in parallel, since some of them
write a value to a global sysctl, read it back, and expect to see the
written value.  These tests complete quite quickly in any case.

MFC after: 1 week

(cherry picked from commit 5d96ca7a307279cf4bdb191b7074cd1efcd3b8e8)

15 months agobhyve: return EEXIST when adding a fwcfg item twice
Corvin Köhne [Thu, 30 Mar 2023 05:43:28 +0000 (07:43 +0200)]
bhyve: return EEXIST when adding a fwcfg item twice

Reviewed by: rew
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39338

(cherry picked from commit e37edc91b6a0a0116005bdd0fff7c911c37adabf)

15 months agobhyve: remove unnecessary const qualifier in acpi_device.h
Corvin Köhne [Wed, 29 Mar 2023 13:13:03 +0000 (15:13 +0200)]
bhyve: remove unnecessary const qualifier in acpi_device.h

Those const qualifier declare that the function doesn't change the
values internally. It makes no sense to add them in the header file.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39318

(cherry picked from commit 404689908632599ee5b3bcbc289ae7f094368dc5)

15 months agonetmap: fix build issue in unit test
Vincenzo Maffione [Wed, 5 Apr 2023 22:19:13 +0000 (22:19 +0000)]
netmap: fix build issue in unit test

This is a direct commit to fix a build issue introduced by
b74063f03a834e9f22fb46f8e989a9df19823ff0 (cherry-picked MFC).
The build failure is caused by the use of a netmap option
that is available in CURRENT but not in stable/13.
Fix it by using an option code that is available also in
stable/13. The option value is not relevant for the test.

15 months agonetmap: fix copyin/copyout of nmreq options list
Vincenzo Maffione [Tue, 21 Mar 2023 23:23:18 +0000 (23:23 +0000)]
netmap: fix copyin/copyout of nmreq options list

The previous code unsuccesfully attempted to report a precise error for
each option in the user list. Moreover, commit 253b2ec199b broke some
ctrl-api-test (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260547).

With this patch we bail out as soon as an unrecoverable error is detected and
we properly check for copy boundaries. EOPNOTSUPP no longer immediately
returns an error, so that any other option in the list may be examined
by the caller code and a precise report of the (un)supported options can
be returned to the user.

With this patch, all ctrl-api-test unit tests pass again.

PR: 260547
Submitted by: giuseppe.lettieri@unipi.it
Reviewed by: vmaffione
MFC after: 14 days

(cherry picked from commit e2a431a0ffb6894220bdf5d8fc2ca2d0ca316e85)

15 months agofdescfs: Fix a file ref leak
Mark Johnston [Wed, 22 Mar 2023 12:52:57 +0000 (08:52 -0400)]
fdescfs: Fix a file ref leak

In fdesc_lookup(), vn_vget_ino_gen() may fail without invoking the
callback, in which case the ref on fp is leaked.  This happens if the
fdescfs mount is being concurrently unmounted.  Moreover, we cannot
safely drop the ref while the dvp is locked.

So:
- Use a flag variable to indicate whether the ref is dropped.
- Reorganize things to handle the leak.

Reported by: C Turt <ecturt@gmail.com>
Reviewed by: mjg, kib
Tested by: pho
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39189

(cherry picked from commit 0f5b6f9a041e9cca3b376f6ec909374938887a3b)

15 months agotcp_wrappers: Use ANSI (c89) function definitions
Ed Maste [Tue, 21 Mar 2023 14:08:28 +0000 (10:08 -0400)]
tcp_wrappers: Use ANSI (c89) function definitions

Although this code is in contrib/ there is no active upstream.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36047

(cherry picked from commit 14f102eacc8434a5a1f96466752578a4167140c9)
(cherry picked from commit 899becbfcbf75008c560bae5e5fce0c205a5bc82)

15 months agobhyve: make use of helper to read PCI IDs from bhyve config
Corvin Köhne [Mon, 6 Feb 2023 10:13:56 +0000 (11:13 +0100)]
bhyve: make use of helper to read PCI IDs from bhyve config

For compatibilty reasons, the old config values are still supported.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38403

(cherry picked from commit b72e06b13ee08b94a3e74ac2473e889aeb7a3d1a)

15 months agobhyve: add helper to read PCI IDs from bhyve config
Corvin Köhne [Mon, 6 Feb 2023 10:43:49 +0000 (11:43 +0100)]
bhyve: add helper to read PCI IDs from bhyve config

Changing the PCI IDs is valuable in some situations. The Intel GOP
driver requires that some PCI IDs of the LPC bridge are aligned with the
physical values of the host LPC bridge. Another use case are oracles
virtio driver. They require different subvendor ID than the default one.
For that reason, create a helper which makes it easy to read PCI IDs
from bhyve config. Additionally, this helper ensures that all emulation
devices are using the same config keys.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38402

(cherry picked from commit ffaed739a80319a56d0b1dfd6cedeb3d194ff42c)

15 months agopci: add tunable hw.pci.enable_mps_tune
Corvin Köhne [Mon, 6 Feb 2023 09:26:33 +0000 (09:26 +0000)]
pci: add tunable hw.pci.enable_mps_tune

If the tunable is set to 0, the tuning of the MPS (maximum payload size)
is disabled and the default MPS values set by the BIOS are used. In this
case the system may use a lower speed or operate in a less optimized
state, but it can resolve issues with stability and compatibility. With
specific devices the tuning of the mps, can lead to a complete freeze of
the system.

Reviewed by: manu
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38397

(cherry picked from commit 48d70503bcae816eea6109c30ba79261eb47c9d0)

15 months agoAlways install llvm-objdump as objdump
Ed Maste [Fri, 18 Nov 2022 20:47:13 +0000 (15:47 -0500)]
Always install llvm-objdump as objdump

Instead of providing no /usr/bin/objdump when LLVM_BINUTILS is false.

PR: 267854 [exp-run]
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37445

(cherry picked from commit 86edb11e7491e657e6c75ef6814867021665c377)

15 months agoAdd myself (cc) as a src commiter.
Cheng Cui [Fri, 31 Mar 2023 10:06:52 +0000 (06:06 -0400)]
Add myself (cc) as a src commiter.

Summary: Adding mentor relationships for cc when committing new diffs.

Reviewed by: rscheff (mentor), tuexen (mentor)
Approved by: rscheff (mentor), tuexen (mentor)
Differential Revision: https://reviews.freebsd.org/D39368

(cherry picked from commit 95940a2d2442c4ae47013b8ddb5bfb8bb5e40b39)

15 months agoMFV: xz 5.4.2.
Xin LI [Mon, 20 Mar 2023 02:30:08 +0000 (19:30 -0700)]
MFV: xz 5.4.2.

(cherry picked from commit c917796c041664a04153af24c2e68cc963fe52bc)

15 months agohv_hid: Hyper-V HID driver
Yuri [Sun, 5 Feb 2023 15:32:08 +0000 (18:32 +0300)]
hv_hid: Hyper-V HID driver

Hyper-V HID driver using hidbus/hms.

Reviewed by: wulf
MFC after: 1 week
PR: 221074
Differential revision: https://reviews.freebsd.org/D38140

(cherry picked from commit e4d3f1e40ab3327e4ff6f689f54a64bd2ebc0568)

15 months agodevd.conf.5: Fix a typo in the manual page
Gordon Bergling [Sun, 26 Mar 2023 07:43:58 +0000 (09:43 +0200)]
devd.conf.5: Fix a typo in the manual page

- s/deteted/detected/

(cherry picked from commit 328ebd4680563d62d79c724ab6bbeaadafba7997)

15 months agovnode_pager_input: return runningbufspace back
Konstantin Belousov [Fri, 24 Mar 2023 21:12:21 +0000 (23:12 +0200)]
vnode_pager_input: return runningbufspace back

(cherry picked from commit 28f957b8b3a22086927451fee89789fdf596260b)

15 months agofdesc_allocvp(): fix potential use after free
Konstantin Belousov [Tue, 21 Mar 2023 21:24:06 +0000 (23:24 +0200)]
fdesc_allocvp(): fix potential use after free

(cherry picked from commit 51b8ffb95c4fe45f6825d551bd093889820a8115)

15 months agofdescfs: remove useless XXX comment, unwrap line
Konstantin Belousov [Tue, 21 Mar 2023 21:28:16 +0000 (23:28 +0200)]
fdescfs: remove useless XXX comment, unwrap line

(cherry picked from commit fa3ea81b77e41e3f33a611e51fd8bcbb2f4c8a95)

15 months agoSupport compilation with llvm 15
Mateusz Guzik [Thu, 30 Mar 2023 14:53:33 +0000 (14:53 +0000)]
Support compilation with llvm 15

This is a direct bare minimum commit.

15 months agorarpd(8): Fix a typo in a source code comment
Gordon Bergling [Mon, 27 Mar 2023 06:45:30 +0000 (08:45 +0200)]
rarpd(8): Fix a typo in a source code comment

- s/combinataion/combination/

Obtained from: NetBSD

(cherry picked from commit 107597fbd4dcd6d0a6ec09913642af151635b77a)

15 months agoRewrite function definitions with identifier lists.
Kirk McKusick [Wed, 22 Mar 2023 22:57:26 +0000 (15:57 -0700)]
Rewrite function definitions with identifier lists.

A few functions snuck in with K&R style definitions.

Also add some missing memory frees.

(cherry picked from commit e5d0d1c5fbbc0ce44fdc720a35b499056fe60b06)

15 months agopf: remove pd_refs from pfsync
Kristof Provost [Fri, 24 Mar 2023 06:04:56 +0000 (07:04 +0100)]
pf: remove pd_refs from pfsync

It only served to complicate cleanup, and added no value.

While here drop packets in pfsync_defer_tmo() if we don't have a syncif,
rather than just leaving them on the queue.

Reviewed by: markj
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D39248

(cherry picked from commit 27b23cdec9d1255e014ea0decac42a5be8d00735)

15 months agopfsync: hold b_mtx for callout_stop(pd_tmo)
Kristof Provost [Wed, 22 Mar 2023 13:46:25 +0000 (14:46 +0100)]
pfsync: hold b_mtx for callout_stop(pd_tmo)

The pd_tmo callout has an associated mutex, which we must hold while
calling callout_stop().

Reported by: markj
Reviewed by: markj
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D39223

(cherry picked from commit 01194da28a2123a2aa09808319f152fa115f60f1)

15 months agoamd64 wakeup: recalculate mitigations after APICs are woken
Konstantin Belousov [Tue, 28 Mar 2023 23:51:44 +0000 (02:51 +0300)]
amd64 wakeup: recalculate mitigations after APICs are woken

PR: 270489
Approved by: re (cperciva)

(cherry picked from commit cd137909c3097fe223ce2b49075eed42a4933bb5)