Commit graph

9674 commits

Author SHA1 Message Date
Dimitry Andric
6bbffa1a32 Merge commit 989879f8fded from llvm git (by Paul Walker):
[Clang] Allow C++11 style initialisation of SVE types.

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

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

Requested by:	andrew
MFC after:	3 days

(cherry picked from commit 641efdd10cc3ad05fb7eaeeae20b15c5ad4128c8)
2023-12-24 14:59:13 +01:00
Philip Paeps
b277fb9996 contrib/tzdata: import tzdata 2023d
Changes: https://github.com/eggert/tz/blob/2023d/NEWS

(cherry picked from commit eebb9c2caea1584773ae4cec311cee1eea5b1655)
2023-12-24 09:41:47 +08:00
Brooks Davis
9d39900498 telnet: remove locally added __FBSDID
This partially reverts 77b7cdf199.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42704

(cherry picked from commit a3c858005cae175e277f6f6735ca9eaea7eaf3c3)
2023-12-13 23:08:51 +00:00
Brooks Davis
80e123a3c3 smbfs: remove locally added __FBSDID
Differential Revision:	https://reviews.freebsd.org/D42703

(cherry picked from commit a159b74a5d86e89eb86dcb5df3ec402e662012a6)
2023-12-13 23:08:51 +00:00
Brooks Davis
a9bc0a5a08 pnpinfo: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42702

(cherry picked from commit 78e6a1bd063884ae2c42256bcaee6824efbcfbc8)
2023-12-13 23:08:50 +00:00
Brooks Davis
4fe486b8c8 ee: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42701

(cherry picked from commit 3f944f3bb75fe6eae6000511ad19799d90da54ba)
2023-12-13 23:08:50 +00:00
Brooks Davis
74b8927f82 bzip2: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42700

(cherry picked from commit ae477ca7da55f76d28859e1bd01cd1051e36f28f)
2023-12-13 23:08:50 +00:00
Brooks Davis
cbbe7c135b pf: Remove __FBSDID() macro use
These are local additions that no longer make sense with the transition
to git.

This partially reverts a10f530f93.

Reviewed by:	kp, imp
Differential Revision:	https://reviews.freebsd.org/D42687

(cherry picked from commit bbde5c0725a5b34c456b3818cc69d17f22cef9f8)
2023-12-13 23:08:50 +00:00
Brooks Davis
52b970f98d Remove __FBSDID from netbsd libc sources
I added them per then-current practice when I imported them, but now
they are just gratuious local diffs.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42686

(cherry picked from commit ea2be8ed283597062853935a5a29dfd67973044b)
2023-12-13 23:08:50 +00:00
Brooks Davis
0f6bc5ca95 vis: relocate _DIAGASSERT() define
Other similar files from NetBSD define it unconditionally as a local
diff.

Reviewed by:	imp (as part of D42686)

(cherry picked from commit db94e7c3f9a2344958667e756015393ad3124b3e)
2023-12-13 23:08:49 +00:00
Xin LI
29553f9e8c MFV: xz 5.4.5
(cherry picked from commit ca6a6373bdaed010d6cbfb27f7249ae96009409d)
2023-12-10 01:06:26 -08:00
Baptiste Daroussin
8b2cfd9d19 nvi: import version 2.2.1
(cherry picked from commit 0fcececbac9880b092aeb56a41a16f1ec8ac1ae6)
2023-12-04 11:20:00 +01:00
Dimitry Andric
289f6bfe0a compiler-rt: remove unnecessary include
This is to sync the code with upstream, see:
See https://github.com/llvm/llvm-project/pull/73439#discussion_r1406644942

Fixes:		4c9a0adad182
MFC after:	3 days

(cherry picked from commit d2033021a73db7b8d910c1ffc52f4d1d0def7162)
2023-12-02 12:16:32 +01:00
Cy Schubert
4ebd34fbd5 libevent: Import libevent 2.1.12
Merge commit '5223d1d95fddcef6f9a36e264a5800bd907ade8b' into main

(cherry picked from commit b50261e21f39a6c7249a49e7b60aa878c98512a8)
2023-11-28 07:15:25 -08:00
Cy Schubert
a118088ff3 Unbound: Remove backup file brought in from upstream
Upstream tarball included config.h~.

This was previously manually removed from vendor where in fact it
should not have been as it would have caused a merge conflict.

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

(cherry picked from commit 5aab39b24ce7437265b94461ffdd9b12c0723658)
2023-11-28 07:15:24 -08:00
Cy Schubert
4631a51047 unbound: Vendor import 1.19.0
Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.19.0-released/

Merge commit '16fd0b24910488e59ca1941387b9ac7fb646a837' into unbound

(cherry picked from commit 103ba509e72e3949d22485666949e9705d4af8cd)
2023-11-28 07:15:24 -08:00
Cy Schubert
5748304782 sqlite3: Vendor import of sqlite3 3.44.0
Release notes at https://www.sqlite.org/releaselog/3_44_0.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3440000.tar.gz

Merge commit '3a88fe13354325b9f56f07927e654de4f5398707'

(cherry picked from commit 7963e4115453c0aa003023386cbbc635de242150)
2023-11-28 07:15:23 -08:00
Dimitry Andric
1e4798e967 compiler-rt: avoid segfaults when re-exec'ing with ASLR
After 930a7c2ac6 ("compiler-rt: re-exec with ASLR disabled when
necessary") and 96fe7c8ab0 ("compiler-rt: support ReExec() on
FreeBSD"), binaries linked against the sanitizer libraries may segfault
due to procctl(2) being intercepted. Instead, the non-intercepted
internal_procctl() should be called.

Similarly, the ReExec() function that re-executes the binary after
turning off ASLR should not call elf_aux_info(3) and realpath(3), since
these will also be intercepted. Instead, loop directly over the elf aux
info vector to find the executable path, and avoid calling realpath(3)
since it is actually unwanted for this use case.

Fixes:		930a7c2ac6, 96fe7c8ab0
MFC after:	3 days

(cherry picked from commit 4c9a0adad18263ec8725d9bfc5f560c6ad1da8bd)
2023-11-25 10:05:09 +01:00
Luiz Amaral
f88698a4eb tcpdump: decode pfsync packets on network interfaces
When print-ip-demux.c was introduced on ee67461e, the pfsync_ip_print
function was missed, causing tcpdump to treat pfsync packets on network
interfaces as an unknown protocol.

MFC after:	1 week
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42504

(cherry picked from commit 85247ee6a2ba1c2dd0053e9be9055efa4be1438e)
2023-11-15 10:45:33 +01:00
Jose Luis Duran
687bf7433c (upstream) PR/386: Add newlines for consitency 2
Obtained from:	https://github.com/file/file/pull/134/

(cherry picked from commit 3347078000c078f2e67214ef1ba2e0bffe1aea4f)
2023-11-03 23:28:32 -04:00
Jose Luis Duran
c3ca5da36e file_test: Fix file test
Trimming of the line feed is no longer necessary after
d993c6b0db

Currently the tests:

  - bcachefs2
  - gpkg-1-zst
  - multiple

are failing, but a fix will be committed upstream.

This also reverts c5e957ad4 "file: fix test case for gpkg by removing the extra \n."

MFC after:	3 days

(cherry picked from commit 0d3a87569f14b0e48826bbaab5e05f35669bcebf)
2023-11-03 23:05:19 -04:00
Ed Maste
465b393b73 Add expected failure for tmpfs atime test failing on FreeBSD
PR:		274615
Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42321

(cherry picked from commit 63f537551380d2dab29fa402ad1269feae17e594)
2023-10-24 08:49:17 -04:00
Cy Schubert
8a9416b18f unbound: Import upstream 0ee44ef3 when ENOBUFS is returned
From upstream 0ee44ef3:

- Fix send of udp retries when ENOBUFS is returned. It stops looping
  and also waits for the condition to go away. Reported by Florian
  Obser.

PR:		274352

Merge commit '292d51198aa319c58f534549851e9c28486abdf4'

(cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a)
2023-10-15 21:00:00 -07:00
Mina Galic
9afc0c849e local-unbound: remove stray config.h.in backup
despite being ignored in our main .gitignore, such files can still be
merged from vendor branches.

Reviewed by:		cy
Fixes:			8f76bb7dad (unbound: Vendor import 1.18.0)
MFC after:		2 weeks
X-MFC with:		8f76bb7dad
Differential Revision:	https://reviews.freebsd.org/D41920

(cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe)
2023-10-03 18:01:06 -07:00
Cy Schubert
1b5982339c unbound: Vendor import 1.18.0
Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/

Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main

(cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5)
2023-10-03 18:01:06 -07:00
Cy Schubert
36eb0dc68b sqlite3: Vendor import of sqlite3 3.43.1
Release notes at https://www.sqlite.org/releaselog/3_43_1.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz

Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main

(cherry picked from commit ec994981447e8a974426660b5071bc405280af73)
2023-10-03 18:01:06 -07:00
Bartosz Sobczak
4e80493a33
irdma(4): remove artificial completion generator
Removing artificial completion generator as there had been no indication
of the code being required for E810 cards.  Further more it was found
that the code may have unpleasant side effects on user experience when
using ucmatose tool.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41593

(cherry picked from commit ffafa6a4d157e49e6b12567958c4ab0c9151c080)
2023-09-22 13:38:33 -07:00
Ed Maste
5bfbde817c libfido2: update to 1.13.0
Some highlights from NEWS entries:

 ** Improved OpenSSL 3.0 compatibility.
 ** Support for hidraw(4) on FreeBSD; gh#597.
 ** Improved support for FIDO 2.1 authenticators.

PR:		273596
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e)
2023-09-22 07:03:36 -04:00
Ed Maste
3df74eecfd libfido2: backport hidraw(4) support
PR:		273596
Submitted by:	David Horn
Obtained from:	libfido2 2c9dfaae2a56, 930160388700

(cherry picked from commit 1843dfb05ed80149f5a412180af882e3cb8f451b)
2023-09-22 07:03:35 -04:00
Dag-Erling Smørgrav
51d54ed615 tcpdump: Initialize tzcode early.
An explicit tzset() call is usually not needed as it happens implicitly
the first time we call localtime() or mktime(), but in some cases
(sandboxing, chroot) this may be too late.

PR:		273807
MFC after:	3 days
Reviewed by:	jrm
Differential Revision:	https://reviews.freebsd.org/D41880

(cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6)
2023-09-19 10:10:21 +00:00
Xin LI
acdad1f1cb MFC: MFV: file 5.45.
(cherry picked from commit 898496ee09ed2b7d25f6807edc4515628196ec0a)

Disable byteswap.h for now.

(cherry picked from commit 90474518912f5e5f49bc5325b7f88e94eba64d6a)
2023-09-14 15:01:08 -07:00
Jessica Clarke
2f269a3532 Merge commit 4bb2416d42eb from llvm-project (by Jessica Clarke):
[builtins][AArch64] Implement _sync out-of-line atomics

  Whilst Clang does not use these, recent GCC does, and so on systems such
  as FreeBSD that wish to use compiler-rt as the system runtime library
  but also wish to support building programs with GCC these interfaces are
  needed.

  This is a light adaptation of the code committed to GCC by Sebastian Pop
  <spop@amazon.com>, relicensed with permission for use in compiler-rt.

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

  Reviewed By: sebpop, MaskRay

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

Reviewed by:	dim
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41716

(cherry picked from commit 8524dc53fd4c6b79d75b82cb82f3ac72fc25e85f)
2023-09-11 22:46:57 +01:00
Martin Matuska
0c9b008671 libarchive: merge security fix from vendor branch
This commit fixes a couple of security vulnerabilities in the PAX writer:
1. Heap overflow in url_encode() in archive_write_set_format_pax.c
2. NULL dereference in archive_write_pax_header_xattrs()
3. Another NULL dereference in archive_write_pax_header_xattrs()
4. NULL dereference in archive_write_pax_header_xattr()

Security:	No known reference yet
Obtained from:	https://github.com/libarchive/libarchive/commit/1b4e0d0f9

(cherry picked from commit f10f65999fe56e92f00b5bc5d27ac342cfea5364)
2023-09-11 09:02:07 +02:00
Kristof Provost
50eccf98b2 pf (t)ftp-proxy: use libpfctl instead of DIOCGETSTATUS
Prefer libpfctl functions over direct access to the ioctl whenever
possible. This will allow subsequent removal of DIOCGETSTATUS (in 15) as
there already is an nvlist-based alternative.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D41647

(cherry picked from commit ddd08375c85576b49fb9a34968ba2c2f4f8d56cf)
2023-09-09 11:05:50 +02:00
Dag-Erling Smørgrav
0171f9ccfe unifdef: Handle redefined symbols correctly.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41758

(cherry picked from commit aacbe7384221d2eafa326864bbbe2f22a10063ce)

Approved by:	re (gjb)
2023-09-07 20:28:31 +00:00
Dag-Erling Smørgrav
bae932999e libc: Implement N2630.
This adds formatted input/output of binary integer numbers to the printf(), scanf(), and strtol() families, including their wide-character counterparts.

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

(cherry picked from commit d9dc1603d6e48cca84cad3ebe859129131b8387c)

libc: Add unit tests for N2630 and possible collateral damage.

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

(cherry picked from commit b9385720f34b536ef2568a642e8b1fad0450056f)

libc: Document support for binary integers.

Reviewed by:	debdrup, emaste
Differential Revision:	https://reviews.freebsd.org/D41522

(cherry picked from commit 76edfabbecdec686a570b8e009d5ea4112f943e0)

libc: Fix fixed-width case in the new integer parser.

Fixes:		d9dc1603d6e4
Differential Revision:	https://reviews.freebsd.org/D41622

(cherry picked from commit aca3bd1602577591e5cd237c4bb0bb71b3be0c75)

libc: Add a wide version of snprintf_test.

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

(cherry picked from commit 4ec9ee9912765ac4ca57353999caa92a23283d8e)

libc: Suppress format checks on printf() / scanf() tests.

Reviewed by:	jrtc27, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D41727

(cherry picked from commit 294bd2827e61a78041f6613f4b82235fcc454157)

Approved by:	re (gjb)
2023-09-07 20:28:30 +00:00
Glen Barber
29a16ce065 release: update stable/14 following branching from main
Approved by:	re (implicit)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-24 19:07:33 -04:00
Dag-Erling Smørgrav
049b7608f4 unifdef: Reapply our 7102ec5226. 2023-08-21 19:52:25 +02:00
Dag-Erling Smørgrav
343b776fd0 unifdef: Reapply our 61287be181. 2023-08-21 19:52:06 +02:00
Dag-Erling Smørgrav
fb3ef04d20 Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80'
git-subtree-dir: contrib/unifdef
git-subtree-mainline: 3b7ffacdee
git-subtree-split: 0da4488583
2023-08-21 19:51:03 +02:00
Kyle Evans
79e6ffb695 netbsd-tests: libc: fix strvis(3) overflow tests
These tests weren't run on x86 until CI grabbed them.  It turns out,
there's a sign extension bug that surfaces on x86 with char being a
signed type.

NetBSD unearthed this when they took and improved the patch, so just
grab their solution until we get to merging in the latest version of
the test.

Reported by:	CI (via ngie)
Fixes:	2f489a509e ("libc: fix some overflow scenarios in vis(3)")
2023-08-20 00:36:23 -05:00
Dag-Erling Smørgrav
2ba1d4970a unbound: Move config.h to lib directory.
It was originally in contrib, and moved to usr.sbin in 6692aa840c1f; I always thought lib would make more sense but never got around to moving it.

Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D41504
2023-08-19 01:44:58 +00:00
Bartosz Sobczak
01fbb86991
irdma(4): upgrade to 1.2.17-k
Update Intel irdma driver to version 1.2.17-k

Notable changes:
- pf-reset handling improvements, including fixes in communication with if_ice(4)
- avoid racing when handling various events
- adding sw stats sysctls
- hand over pe_criterr handling from ice(4) to irdma(4)
- debug prints adjustments
- fix crash after changes in irdma_add_mqh_ifa_cb

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
MFC after:	1 month
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41425
2023-08-18 11:28:58 -07:00
Dag-Erling Smørgrav
e738085b94 Remove my middle name. 2023-08-17 15:08:30 +02:00
Xin LI
f80a33ea41 MFV: less v643.
MFC after:	2 weeks
2023-08-13 00:13:31 -07:00
Kyle Evans
09078445fb vis(3): need <stdint.h> for SIZE_MAX 2023-08-13 00:28:12 -05:00
Kyle Evans
ea46e63863 Merge commit 'acb089b983171667467adc66f56a723b609ed22e' into kbsd/vis
Highlights:
- Some style fixes
- Bumped mbbuf in istrsenvisx() to MB_LEN_MAX to avoid VLAs
- mbslength cannot go negative, so make it unsigned
- Further bounds checking & fix an additional overrun, with dlen == 0
- Avoid duplicate call to wcslen(start)
2023-08-13 00:23:02 -05:00
Enji Cooper
28f6c2f292 Import GoogleTest 1.14.0
GoogleTest 1.14.0 now requires C++14 to build. Change
`googletest.test.inc.mk` to reflect this requirement.

Adjust the build integration logic to handle the new version of
GoogleTest (add/remove headers/sources as needed).

Tighten down warnings via `CXXFLAGS.clang` instead of ignoring all
warnings. Some new warnings snuck in after I did my last round of fix
submissions upstream.

Also address some overlinking added in the previous version import by
removing superfluous libraries.

===============================

Expect WhenDynamicCastToTest.AmbiguousCast to fail

This change reapplies the expected failure from 1.10.0.

Ref: https://github.com/google/googletest/issues/2172

MFC after:	2 weeks
Reviewed by:	asomers, emaste
Differential Revision:	https://reviews.freebsd.org/D41399

Merge commit '8ef491440fcaec96f899d73e08873426c78583a4' into googletest-v1.14.0-import
2023-08-10 02:32:33 -07:00
Kyle Evans
2f489a509e libc: fix some overflow scenarios in vis(3)
The previous incarnation of this would call wcrtomb() on the destination
buffer, and only check for overflow *after* it's happened.
Additionally, the conversion error / VIS_NOLOCALE path also didn't check
for overflow, and the overflow check at the end didn't account for the
fact that we still need to write a NUL terminator afterward.

Start by only doing the multibyte conversion into mbdst directly if we
have enough buffer space to guarantee it'll fit.  An additional
MB_CUR_MAX buffer has been stashed on the stack to write into if we're
cutting it close at the end of the buffer, since we don't really have a
good way to determine the length of the wchar_t without just doing the
conversion.  We'll do the conversion into the buffer that's guaranteed
to fit, then copy it over if the copy won't overflow.

The byte-for-byte overflow is a little bit easier, as we simply check
for overflow with each byte written and make sure we can still NUL
terminate after.

Tests added to exercise these edge cases.

Reviewed by:	des
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D41328
2023-08-08 12:01:52 -05:00
Konstantin Belousov
21d6c29f34 opensm libopensm: remove non-existent symbols from the version map
Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:14 +03:00