Commit Graph

9556 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
8e022d3cde byacc: Update to 20230201.
Note that this enables the backtracking extension, which we had previously left disabled.

PR:		244149, 269425
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38421
2023-02-20 23:35:32 +01:00
Piotr Kubaj
a1ffc2fe9c llvm: make sure to use ELFv2 ABI on powerpc64
Currently LLVM is more or less set up to use ELFv2, but it still defaults to
ELFv1 in some places. This causes lld to generate broken binaries when used
with LTO.

PR:	269455
Approved by:	dim
MFC after:	3 days
2023-02-17 00:53:30 +01:00
Joseph Mingrone
6d1c946e91
libpcap: Make pcap/bpf.h a wrapper around system net/bpf.h
In the past, we modified pcap/pcap.h to include the system net/bpf.h
rather than libpcap's own pcap/bpf.h.  However, starting around 1.10.2,
libpcap requires a few extern functions defined in pcap/bpf.h to build.
Simply reverting that local change and pulling in pcap/bpf.h is not a
solution, because some ports with '#include <pcap.h>' such as mail/spamd
and net/xprobe require the system net/bpf.h to be pulled in.  To
accommodate both requirements, make pcap/bpf.h a wrapper around the
system net/bpf.h, but retain the extern function definitions.  This is
in preparation for libpcap 1.10.3.

Approved by:	cy, philip, emaste, delphij (earlier revision)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38575
2023-02-16 11:37:51 -04:00
Simon J. Gerraty
dc1b8c9a84 Merge bmake-20230208
Merge commit 'f4d51098686d961fc03dc5aa327619d0af3c9dcd'
2023-02-09 17:23:23 -08:00
Dag-Erling Smørgrav
71e0c8906e tzcode: Resurrect tzsetwall(3) with a deprecation warning.
This function has been around since 4.4BSD but was dropped upstream in 2020.  This went unnoticed when tzcode was updated.  Bring it back, but prepare for removing it before 14.0 is released.

PR:		269445
MFC after:	3 days
Reported by:	val@packett.cool
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38445
2023-02-09 19:35:34 +01:00
Dimitry Andric
4378cc5cfb 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 c36de97088, 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
2023-02-09 17:28:32 +01:00
Dimitry Andric
50d7464c3f 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
2023-02-08 20:05:25 +01:00
Dimitry Andric
f3fd488f1e 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
2023-02-08 20:05:19 +01:00
Dimitry Andric
6246ae0b85 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
2023-02-08 20:05:09 +01:00
Dimitry Andric
a4a491e223 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
2023-02-08 20:05:02 +01:00
Dimitry Andric
61cfbce334 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
2023-02-08 20:04:56 +01:00
Dimitry Andric
972a253a57 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
2023-02-08 20:04:48 +01:00
Dimitry Andric
fcaf7f8644 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
2023-02-08 20:04:38 +01:00
Dimitry Andric
753f127f3a 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
2023-02-08 20:03:59 +01:00
Dimitry Andric
81ad626541 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
2023-02-08 20:02:26 +01:00
Warner Losh
8c784bb8cf lua: Update to 5.4.4
Merge commit '755d9301ca89f02956fd17858b9d4d821ab5c972' from the
vendor branch. This updates us from lua 5.4.2 to 5.4.4.

In addition, it switches around how we flavor liblua for the boot loader
and flua. This is done to reduce diffs with upstream and make it easier
to import new versions (the current method has too many conflicts to
resolve by hand): we include luaconf.local.h from luaconf.h (the only
change to this file is now that #include at the end). We then define
what we need to: for flua (which does very little) and one for stand
(which creates the new FLOAT type out of int64).

Sponsored by:		Netflix
2023-02-08 10:33:26 -07:00
Mark Johnston
7bb441c866 libdwarf: Add some constants from DWARF 5
This is not exhaustive - DWARF 5 has some new enumeration types not
implemented here - but I think I caught all the ones that are extended
in DWARF 5, plus the new compilation unit type (DW_UT_*), needed when
parsing .debug_info headers.

These were useful when extending libdwarf/ctfconvert/readelf to handle
DWARF generated by gcc 12, which is version 5 by default.

Reviewed by:	emaste
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38273
2023-02-07 15:10:24 -05:00
Bartosz Sobczak
a527c18cd7
irdma(4): Add code for compilation on stable/13 branch
Current content of the irdma(4) driver consists only of code that is
compilable on current 14-CURRENT branch which makes it impossible to
merge into stable/13 branch because of missing dependencies in the ofed
tree.

This patch adds missing code that allows for merging into stable branch.
Once it is there, code relating only to version 14 or higher should be
removed.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
MFC after:	1 day
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D38170
2023-02-06 14:37:39 -08:00
Stefan Eßer
4fca8e0f65 contrib/bc: uodate to version 6.2.4
This update contains only documentation changes (new main repository
URL and changed mail address of the program author) and changes to
the build system that do not affect the FreeBSD base system build.

MFC after:	3 days
2023-02-06 22:33:56 +01:00
Baptiste Daroussin
baff81958c libedit: update to snapshot 2023-01-06
MFC atfer:	1 week
2023-02-06 14:25:06 +01:00
Dag-Erling Smørgrav
606d0e4a9a libc: Add tests for strchrnul(3).
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D38286
2023-02-02 15:45:45 +01:00
Gregory Neil Shapiro
38c2f8fe62 Note upgrade to sendmail 8.17.1 2023-02-01 02:22:39 +00:00
Mitchell Horne
537c166b76 elftoolchain: update the list of riscv relocations
A few have been added, a couple removed.

Reviewed by:	jrtc27, imp, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38175
2023-01-31 14:32:40 -04:00
Phil Shafer
34b867ca30 Merge commit '7087c8de43b0d5d27c52da6ba2ba4957b7e336ff' into new_merge 2023-01-30 00:04:21 -05:00
Stefan Eßer
d101cdd6ed contrib/bc: merge from vendor release 6.2.2
This update fixes a few issues in history editing and the processing
of the "quit" function. The "quit" function will no longer cause bc
to exit when encountered in a script file (before any command from
the script has been executed).

New functions is_number(), is_string return 1 if the passed argument
is a number resp. a string. The asciify() function has been extended
to support the conversion of an array of numbers into a string.

Merge commit '1a63323d17fedb05b6962853e821c9d7c6b9853e'
2023-01-28 22:26:22 +01:00
Simon J. Gerraty
4fde40d9b5 Merge/update to bmake-20230126 2023-01-27 16:33:01 -08:00
Dag-Erling Smørgrav
a7b1b73935 tzcode: Document zic's -D option.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D38141
2023-01-25 18:02:55 +01:00
Dag-Erling Smørgrav
d8c9f80891 libc: Update mktime(3) / timegm(3) tests.
Sponsored by:	Klara, Inc.
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D38177
2023-01-25 07:22:46 +01:00
Konstantin Belousov
4c4a29267c libcxx: add comment explaining why umtx is only used for 64bits
Requested by:	imp
Reviewed by:	arichardson, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38178
2023-01-25 03:19:42 +02:00
Konstantin Belousov
25b18d8935 libcxx: use __SIZEOF_LONG__ == 8 instead of __LP64__
for CHERI.

Requested by:	arichardson
Reviewed by:	arichardson, emaste, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38178
2023-01-25 03:19:27 +02:00
Konstantin Belousov
9c996882b0 libcxx: Implement atomic::wait/notify using _umtx_op(2) for 64bit arches
Only 64bit architectures can be supported this way, because libcxx
defines __cxx_contention_t to be int64_t for FreeBSD, and 32bit arches
do not have a kind of UMTX_OP_WAIT_INT64_PRIVATE operation.

LLVM review:	https://reviews.llvm.org/D142134

Tested by:	emaste
Reviewed by:	dim, emaste, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38132
2023-01-24 02:52:42 +02:00
Ed Maste
8089749d38 blacklistd: diff reduction against upstream
Add `conf_` prefix, maching https://github.com/zoulasc/blocklist

Sponsored by:	The FreeBSD Foundation
2023-01-23 11:22:10 -05:00
Xin LI
047153b416 MFV: xz 5.4.1.
MFC after:	3 days
2023-01-22 16:50:36 -08:00
Tom Jones
cef7ab70ff netcat: Allow nc to be an if_tun tunnel broker
Reviewed by:	kevans
Relnotes:	yes
Sponsored by:   Zenarmor
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37435
2023-01-17 10:05:49 +00:00
Gregory Neil Shapiro
f97a19ecb9 sendmail 8.17.1 included this fix, though in a different location so
removing the FreeBSD local code in favor of the vendor branch version
2023-01-15 21:25:39 +00:00
Gregory Neil Shapiro
2fb4f839f3 Merge commit '28fbd2825d216dafca4d991ad96d05b312f4f9a3'
Merge vendor sendmail 8.17.1 into HEAD
2023-01-15 21:20:22 +00:00
Gregory Neil Shapiro
28fbd2825d Import sendmail 8.17.1 2023-01-15 19:15:36 +00:00
Cy Schubert
1838dec318 unbound: Vendor import 1.17.1
Release notes at
    https://www.nlnetlabs.nl/news/2023/Jan/12/unbound-1.17.1-released/.

MFC after:      1 month

Merge commit '7699e1386a16236002b26107ffd2dcbde375e197' into main
2023-01-14 21:39:31 -08:00
Dag-Erling Smørgrav
2aad7570f4 tzcode: Silence warnings.
* Ignore failure to remove our temp file.
* Avoid a minor memory leak in the -D case.

Reported by:	Coverity (CID 1502534, 1502535, 1502538)
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38038
2023-01-14 18:17:06 +01:00
Dag-Erling Smørgrav
55572cff58 tzcode: Fully initialize structs before use.
Reported by:	Coverity (CID 1502542, 1502548)
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38037
2023-01-14 18:16:52 +01:00
Dag-Erling Smørgrav
96e68c393f tzcode: Avoid memory leak if pthread_setspecific() fails.
Reported by:	Coverity (CID 1018472, 1018474)
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38036
2023-01-14 18:16:30 +01:00
Dag-Erling Smørgrav
3e2e5eebfa tzcode: Remove access() again, cf. 02ba1d993f.
Reported by:	Coverity (CID 1250126)
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38035
2023-01-14 18:16:17 +01:00
Cy Schubert
7699e1386a unbound: Vendor import 1.17.1
Release notes at
    https://www.nlnetlabs.nl/news/2023/Jan/12/unbound-1.17.1-released/.
2023-01-13 15:52:47 -08:00
Dag-Erling Smørgrav
394cf6719a tzcode: Move configuration into separate header.
MFC after:	1 week
Sponsored by:	Klara, Inc.
2023-01-11 11:39:12 +01:00
Dag-Erling Smørgrav
d5c85ac652 tzcode: Address some compiler warnings.
MFC after:	1 week
Sponsored by:	Klara, Inc.
2023-01-10 20:20:11 +01:00
Dag-Erling Smørgrav
bc42155199 Bring our tzcode up to date.
* Replay 2010[acflm] which had been merged but not recorded.
* Merge 2010n.
* Reorganize (unsplit) the code to match the upstream layout.
* Merge 2022[cdefg].

MFC after:      1 week
Sponsored by:   Klara, Inc.
2023-01-10 16:14:27 +01:00
Jessica Clarke
9fb118bebc libc: Fix longjmp/_longjmp(buf, 0) for AArch64 and RISC-V
These architectures fail to handle this special case, and will cause the
corresponding setjmp/_setjmp to return 0 rather than 1. Fix this and add
regression tests (also committed upstream).

PR:		268684
Reviewed by:	arichardson, jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D29363
2023-01-09 18:34:43 +00:00
Cy Schubert
5ae830e9ba sqlite3: Vendor import of sqlite3 3.40.1
Release notes at https://www.sqlite.org/releaselog/3_40_1.html.

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

Merge commit 'c728c97f5c838c9a873516c4499e4e1a41788ce7' into main
2023-01-06 09:11:41 -08:00
Xin LI
73ed8e77a7 MFV: xz 5.4.0
MFC after:	2 weeks
2022-12-31 20:25:17 -08:00
Shteryana Shopova
4ac8f40670 Follow the standard object definition from RFC2578
Use mib-2 throughout the files where applicable

PR:		254231
Reported by:	Michael Proto
Reviewed by:	bz (at) FreeBSD (dot) org
2022-12-29 22:02:27 +02:00
John Baldwin
d131218534 h_resolv: Fix a buffer overflow in load().
fgetln() returns a pointer to an array of characters that is 'len'
characters long, not 'len + 1'.  While here, overwriting the contents
of the buffer returned by fgetln isn't really safe, so switch to using
getline() instead.

Note that these fixes are a subset of those applied to a
near-identical copy of this function in libc's resolv_test.c in commit
2afeaad315.

Reviewed by:	ngie
Reported by:	CHERI (buffer overflow)
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D37886
2022-12-28 09:39:18 -08:00
Bartosz Sobczak
777e472cd8
irdma(4): Upgrade driver to 1.1.5-k
This is to upgrade current irdma driver version (in support of RDMA on
Intel(R) Ethernet Controller E810) to 1.1.5-k

change summary:
- refactor defines for hardware registers
- rereg_mr verb added in libirdma
- fix print warning during compilation
- rt_ros2priority macro fix
- irdma.4 validated with mandoc
- fixing nd6_resolve usage
- added libirdma_query_device
- sysctl for irdma version
- aeq_alloc_db fix
- dwork_flush protected with qp refcount
- PFC fixes

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
Sponsored by:	Intel Corporation
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36944
2022-12-21 17:13:42 -08:00
Ed Maste
766145637d readelf: match GNU readelf formatting
GNU readelf emits a blank line before, and uses single quotes around the
symbol table name, in each "Symbol table 'name' contains ## entries"
header.

Reviewed by:	markj
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37746
2022-12-19 12:57:41 -05:00
Dimitry Andric
4589169768 Apply llvm fix for crash building julia on PowerPC64
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes https://github.com/llvm/llvm-project/issues/55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days
2022-12-16 14:28:10 +01:00
Martin Matuska
bd5e624a86 libarchive: merge from vendor branch
Libarchive 3.6.2

Important bug fixes:
  rar5 reader: fix possible garbled output with bsdtar -O (#1745)
  mtree reader: support reading mtree files with tabs (#1783)
  various small fixes for issues found by CodeQL

MFC after:	2 weeks
PR:		286306 (exp-run)
2022-12-13 20:21:13 +01:00
Xin LI
0ca90ed42a MFV: xz 5.2.9
MFC after:	2 weeks
2022-12-08 23:52:06 -08:00
Philip Paeps
cf1ad53510 contrib/tzdata: import tzdata 2022g
Changes: https://github.com/eggert/tz/blob/2022g/NEWS

MFC after:	1 day
2022-11-30 09:36:28 +08:00
Cy Schubert
0078721898 sqlite3: Vendor import of sqlite3 3.40.0
Changes at https://www.sqlite.org/releaselog/3_40_0.html

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

Merge commit 'ac50343d44f8dff1efe667b4713de4b1351a19e1' into main
2022-11-28 06:08:46 -08:00
John Baldwin
c36de97088 <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
2022-11-23 16:10:05 -08:00
Xin LI
d0f168e680 Document that cmake files were omitted in previous import. 2022-11-19 20:17:59 -08:00
Xin LI
dc58b3fca5 MFV: expat 2.5.0
MFC after:	2 weeks
2022-11-17 22:15:00 -08:00
Xin LI
9e6bbe47a5 MFV: Merge xz 5.2.8
Relnotes:	yes
MFC after:      2 weeks
2022-11-16 20:37:07 -08:00
Ed Maste
3a13b5ac83 gnu diff3: apply patch to committed src, rather than at build time
This appears to be a leftover from the time we used a less-capable VCS.

Reviewed by:	delphij
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37368
2022-11-13 21:33:40 -05:00
Baptiste Daroussin
0b1adc42a1 rc.sendmail: remove unused script
20 years ago the use of rc.sendmail script was dropped in favor
of /etc/rc.d/sendmail, it is time to retire the script entirely
now.

MFC after:	1 week
2022-11-09 16:55:18 +01:00
Kyle Evans
2cb43631ab Merge commit '93bf91b4012a28610672d2266366dfa0a663b70f' into HEAD
This fixes a warning in wireguard-tools, as well as two issues pointed out by
FreeBSD's Coverity instance.

CID:		1500405, 1500421
2022-11-04 22:46:21 -05:00
Ed Maste
9c231325e7 Clang: Add Diags for targets pre to i686 for -fcf-protection
Intel Control-flow Enforcement Technology (CET) provides new
instructions `endbr32/64` for the indirect branch control.
They are NOPs on i686 and new targets.  We need to check for that
in case it crashes on older targets.

PR:		264497
Reviewed by:	dim
MFC after:	1 week
Obtained from:	LLVM commit 52516782972730ff065a34123a9d8876da08c254
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37268
2022-11-04 20:42:26 -04:00
Piotr Kubaj
35c87c070a ofed: allow using IPv6 address in rc_pingpong server
Summary:
The current OFED code allows binding server to IPv6 address. It was added back in 91fc39561d

Sponsored by:	Intel Corporation
MFC after:	3 days

Reviewers: hselasky

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D37196
2022-10-30 20:11:41 +01:00
Kyle Evans
adf3764857 Add 'contrib/wireguard-tools/' from commit '7e00bf8773b93a2a3ee28dba2710d2ae443989f1'
git-subtree-dir: contrib/wireguard-tools
git-subtree-mainline: 9142a2a37b
git-subtree-split: 7e00bf8773
2022-10-28 22:05:14 -05:00
Philip Paeps
9142a2a37b contrib/tzdata: import tzdata 2022f
Changes: https://github.com/eggert/tz/blob/2022f/NEWS

MFC after:	3 days
2022-10-29 10:38:01 +08:00
Xin LI
07dfb236c8 MFV: Restore the ability to process files from stdin immediately.
PR:		bin/267221
MFC after:	3 days
2022-10-27 00:12:53 -07:00
Ed Maste
c898b54aff sendmail: fix auth with cyrus-sasl-2.1.28
Apply patch extracted from sendmail-8-17.1.9 snapshot by dinoex@.

PR:		262935
Reviewed by:	gshapiro
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37119
2022-10-26 12:58:56 -04:00
Ed Maste
c61b3f7de9 OpenBSM: fix free() in au_read_rec error case
buf is a char ** and *buf is the allocated buffer.

PR:		267050
Reported by:	Robert Morris <rtm@lcs.mit.edu>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-10-24 09:49:30 -04:00
Cy Schubert
865f46b255 unbound: Reapply Vendor import 1.17.0
Reapply 643f9a0581. 64d318ea98 was a
mismerge during fake rebase. Let's reapply it.

Changes include: Added ACL per interface, proxy protocol and bug fixes.

Announcement:   https://nlnetlabs.nl/news/2022/Oct/13/unbound-1.17.0-released/

Merge commit '643f9a0581e8aac7eb790ced1164748939829826' into main
2022-10-16 14:08:33 -07:00
Cy Schubert
8cee2ebac5 Revert "unbound: Vendor import 1.17.0"
This reverts commit 64d318ea98, reversing
changes made to 8063dc0320.

Revert a mismerge which reversed 8063dc0320.
2022-10-16 13:42:15 -07:00
Cy Schubert
64d318ea98 unbound: Vendor import 1.17.0
Added ACL per interface, proxy protocol and bug fixes.

Announcement:   https://nlnetlabs.nl/news/2022/Oct/13/unbound-1.17.0-released/

Merge commit '643f9a0581e8aac7eb790ced1164748939829826' into new_merge
2022-10-16 13:32:55 -07:00
Jose Luis Duran
63f6075fcf blacklistd: Whitespace police
These were missed in the previous whitespace reduction.

Fixes:		631bdcf304 ("blacklistd: whitespace cleanup")
Obtained from:	https://github.com/zoulasc/blocklist
2022-10-13 08:47:56 -04:00
Jose Luis Duran
1c14656dad blacklistd: Reduce diff with upstream
No functional change intended.
2022-10-13 08:25:32 -04:00
Jose Luis Duran
16d39eadf7 blacklistd: Don't remove a ruleset if we have already added it
The noted argument is wrong - if it's already been deleted then the id we
have for it is invalid.
Because we don't track deletions to the ruleset, working it out is
problematic at best.

Instead, if we have already added the rule treat it as a non-op.

This is a valid use case because we might receive a burst of messages
in the downstream application for the same address and process them
one by one. It's not the job of the downstream application to track
blacklistd state.

Obtained from:	959b18a604
2022-10-12 15:47:44 -04:00
Ed Maste
b290769b98 blacklistd: silence sign-conversion warning from Clang
Obtained from:	NetBSD 518a28b2e752
2022-10-12 14:10:21 -04:00
Ed Maste
631bdcf304 blacklistd: whitespace cleanup
Diff reduction against NetBSD external/bsd/blacklist (at commit
03c74c04f277).

Sponsored by:	The FreeBSD Foundation
2022-10-12 13:41:44 -04:00
Ed Maste
1694872231 dma: restore addition of newline when missing from input
If input mail does not have a newline on the last line dma must add
one.  This was broken by the addition of long-line splitting, with the
switch from strlen(line) to linelen returned by getline().

PR:		266629
Reviewed by:	bapt, Mikko Lehto
Tested by:	Mikko Lehto
MFC after:	1 week
Fixes:		b0b2d05fd0 ("Split body of mails not respecting...")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36763
2022-10-12 11:59:01 -04:00
Jose Luis Duran
45c11d5401 blacklistd: Fix usage for blacklistd/blacklistctl
If getopt(3) encounters a character not found in optstring or if it
detects a missing option argument, it returns ? (question mark).

Obtained from:	 https://github.com/zoulasc/blocklist
Differential Revision:	https://reviews.freebsd.org/D36087
2022-10-12 10:30:12 -04:00
Jose Luis Duran
aa05c93cb7 blacklistd: Update documentation changes
Cherry-pick upstream documentation changes.

Obtained from:	 https://github.com/zoulasc/blocklist
Differential Revision:	https://reviews.freebsd.org/D36086
2022-10-12 09:27:08 -04:00
Philip Paeps
5d56371c70 contrib/tzdata: import tzdata 2022e
Changes: https://github.com/eggert/tz/blob/2022e/NEWS

MFC after:	3 days
2022-10-12 09:50:03 +08:00
Brooks Davis
d701f45aba Remove telnetd sources
Differential Revision:	https://reviews.freebsd.org/D36621
2022-10-05 17:27:14 +01:00
Dag-Erling Smørgrav
0aa2700123 Put OPIE to rest.
Differential Revision: https://reviews.freebsd.org/D36592
2022-10-02 03:37:29 +02:00
Xin LI
c5e957ad4f file: fix test case for gpkg by removing the extra \n.
MFC after:	3 days
2022-09-30 22:45:32 -07:00
Brooks Davis
b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
Cy Schubert
4f5c8956cf unbound: Vendor import 1.16.3
Fixes CVE-2022-3204 'Non-Responsive Delegation Attack'.

MFC after:	3 days
Security:	CVE-2022-3204
Security:	https://nlnetlabs.nl/downloads/unbound/CVE-2022-3204.txt
Changelog:	https://nlnetlabs.nl/news/2022/Sep/21/unbound-1.16.3-released/

Merge commit '0dde6f4f8e604df8c6fbdab8b4aadb5ddf80c76f' into unbound/main
2022-09-29 07:21:04 -07:00
Dimitry Andric
91ec809f0a Apply llvm fix for assertion/crash building math/vtk
Merge commit 307ace7f20d5 from llvm git (by David Sherwood):

  [LoopVectorize] Ensure the VPReductionRecipe is placed after all it's inputs

  When vectorising ordered reductions we call a function
  LoopVectorizationPlanner::adjustRecipesForReductions to replace the
  existing VPWidenRecipe for the fadd instruction with a new
  VPReductionRecipe. We attempt to insert the new recipe in the same
  place, but this is wrong because createBlockInMask may have
  generated new recipes that VPReductionRecipe now depends upon. I
  have changed the insertion code to append the recipe to the
  VPBasicBlock instead.

  Added a new RUN with tail-folding enabled to the existing test:

    Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll

  Differential Revision: https://reviews.llvm.org/D129550

Reported by:	yuri
PR:		264834
MFC after:	3 days
2022-09-27 23:45:56 +02:00
Cy Schubert
5760cb266e Fix CVE-2020-10188
Reviewed by:		emaste
Obtained from:		NetBSD 6cc1539c8028b
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D36732
2022-09-27 10:36:13 -07:00
Brooks Davis
6914ffef4e telnetd: fix two-byte input crash
Move initialization of the slc table earlier so it doesn't get
accessed before that happens.

For details on the issue, see:
https://pierrekim.github.io/blog/2022-08-24-2-byte-dos-freebsd-netbsd-telnetd-netkit-telnetd-inetutils-telnetd-kerberos-telnetd.html

Reviewed by:	cy
Obtained from:	NetBSD via cy
Differential Revision:	https://reviews.freebsd.org/D36680
2022-09-26 18:57:18 +01:00
Alfonso S. Siciliano
84823cc708
contrib/bsddialog: Import version 0.4
Improvements and changes to integrate bsddialog(1) with scripts in BASE.
Overview:

 * New options. --and-widget, --keep-tite, --calendar.
 * Change output format. Menus and --print-maxsize.
 * Redefine sizing. Fixed rows, cols and menurows became at the most.
 * Add DIAGNOSTICS. Error messages for bad arguments and options.
 * Add keys. Space for --menu, fast keys for --msgbox and --yesno.
 * Text. Change default text modification, add --cr-wrap.

See /usr/src/contrib/bsddialog/CHANGELOG '2022-09-24 Version 0.4'
for more detailed information.

Merge commit '9f24fda5a8e7ab8243e71473c7e2dc98b4877e64'
2022-09-25 15:09:16 +02:00
Philip Paeps
1576451a39 contrib/tzdata: import tzdata 2022d
Changes: https://github.com/eggert/tz/blob/2022d/NEWS

MFC after:	3 days
2022-09-25 13:50:36 +08:00
Xin LI
a2dfb7224e file: upgrade to 5.43.
MFC after:	3 days
2022-09-24 19:16:39 -07:00
Brooks Davis
24e1824e46 Deprecate telnet daemon
The telnetd codebase is old, unmaintained, and has a number of quality
issues.  Users wishing to provide telnetd service should find a
maintained implementation.  The telnet client is NOT deprecated as it
is lower risk.

Reviewed by:	pauamma, kevans, kp, melifaro
MFC After:	3 days
Differential Revision:	https://reviews.freebsd.org/D36619
2022-09-21 16:17:04 +01:00
Xin LI
71f0c44a04 MFV 66082b6c88: libbsdxml (expat) 2.4.9 2022-09-21 00:02:38 -07:00
Cy Schubert
5195291452 sqlite3: Vendor import of sqlite3 3.39.3
Changes at https://www.sqlite.org/releaselog/3_39_3.html.

Obtained from:  https://www.sqlite.org/2022/sqlite-autoconf-3390300.tar.gz
2022-09-19 21:37:01 -07:00
Konstantin Belousov
0e2af3b59a jemalloc: Define SWAP_RESERVE_* if not provided by the system headers
instead ifdef-ing out the return statement.

Reported by:	Mark Millard <marklmi@yahoo.com>
Fixes:	87384c51e0
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2022-09-17 01:35:35 +03:00
Konstantin Belousov
0ae364adcd jemalloc: use auxv ELF_BSDF_VMNOOVERCOMMIT instead of sysctl("vm.overcommit")
Reviewed by:	brooks, imp (previous version)
Discussed with:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D36540
2022-09-16 23:23:52 +03:00