Commit Graph

9843 Commits

Author SHA1 Message Date
Dimitry Andric
a39b3aa463 Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks):
[PEI] Don't zero out noreg operands

  A tail call may have $noreg operands.

  Fixes a crash.

  Reviewed By: xgupta

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

This should fix an assertion failure building qemu, specifically those
parts using -fzero-call-used-regs.

Reported by:	Daniel Berrangé <dan-freebsd@berrange.com>
PR:		277474
MFC after:	3 days
2024-03-04 21:31:04 +01:00
Cy Schubert
84ed86380a hostapd: Work around lack of MLME support
hostap MLME uses Linux data structures and definitions not available
in FreeBSD. The ability for hostapd to select the frequency (channel)
depends Linux MLME, though strictly it's not required. Work around the
Linux MLME requirement to configure device frequency.

The detailed description is: hostapd will only set the channel (frequency)
when Linux MLME is configured. Enabling NEED_AP_MLME will result in
numerous build errors due do Linux data structures and definitions not
available under FreeBSD. The code to set the frequency from the selected
channel is only within the NEED_AP_MLME code path because without MLME,
hostapd_get_hw_features() is an inline that always returns -1 whereas with
MLME hostapd_get_hw_features() will obtain hardware features from the
kernel. Until such time we simply set the frequency as configured.

PR:		276375
MFC after:	1 month
2024-03-04 08:40:58 -08:00
Warner Losh
f32a6403d3 Merge one true awk from 2024-01-22 for the Awk Second Edition support
This brings in Unicode support, CSV support and a number of bug fixes.
They are described in _The AWK Programming Language_, Second Edition, by
Al Aho, Brian Kernighan, and Peter Weinberger (Addison-Wesley, 2024,
ISBN-13 978-0138269722, ISBN-10 0138269726).

Sponsored by:		Netflix
2024-02-29 10:42:06 -07:00
Baptiste Daroussin
ddca081d38 libucl: import snapshot 2024-02-06 2024-02-29 13:27:03 +01:00
Andrew Turner
5a02ffc32e Update the Arm Optimized Routine library to v24.01
Sponsored by:	Arm Ltd
2024-02-29 11:39:12 +00:00
Kristof Provost
706d465dae pf: convert kill/clear state to use netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44090
2024-02-28 23:26:18 +01:00
Xin LI
8db56defa7 MFV: xz 5.6.0.
MFC after:	2 weeks
2024-02-25 15:46:22 -08:00
Dag-Erling Smørgrav
1365bb722a tzcode: Fix overflow handling in TZ parser.
Obtained from:	upstream 9fc11a27
MFC after:	1 week
PR:		276281
2024-02-18 10:51:49 +01:00
Xin LI
4543ef5166 MFV: expat 2.6.0.
MFC after:	3 days
2024-02-17 14:04:14 -08:00
Bartosz Sobczak
5b5f7d0e77
irdma(4): Upgrade to 1.2.36-k
Update Intel irdma driver to version 1.2.36-k.

Notable changes:

- Start using ib_sge directly instead of irdma_sge
- Turn off flush completion generator for libirdma
- Minor formatting changes

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

Reviewed by:	erj@
MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D43567
2024-02-16 14:01:34 -08:00
Cy Schubert
b76ef9a7cb unbound: Vendor import 1.19.1
Release notes at
    https://www.nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/

Security:	CVE-2023-50387, CVE-2023-50868
MFC after:	3 days
2024-02-13 21:05:50 -08:00
Dag-Erling Smørgrav
46c599340f Update tzcode to 2024a.
MFC after:	3 weeks
Sponsored by:	Klara, Inc.
2024-02-13 21:31:41 +01:00
Dimitry Andric
cf67576852 Merge commit f577bfb99528 from llvm-project (by Alexander Potapenko):
[sanitizer][msan] fix AArch64 vararg support for KMSAN (#70660)

  Cast StackSaveAreaPtr, GrRegSaveAreaPtr, VrRegSaveAreaPtr to pointers to
  fix assertions in getShadowOriginPtrKernel().

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

  Patch by Mark Johnston.

Requested by:	markj
MFC after:	3 days
2024-02-08 20:19:27 +01:00
Lexi Winter
9b7a920a12 traceroute: move from contrib to usr.sbin
traceroute hasn't had a vendor import since 2002, while since then it's
had several significant FreeBSD-specific commits.  Since it's unlikely
another vendor import will happen, and to make the merge of traceroute6
into traceroute easier, import traceroute into usr.sbin.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1100
2024-02-08 09:52:42 -07:00
Gregory Neil Shapiro
31fbc98c94 Belatedly update version and date for sendmail 8.18.1 upgrade 2024-02-07 02:03:47 +00:00
Bartosz Sobczak
8e1f58caf7
ofed: fix warnings during libibverbs compilation
create_qp_handle_resp_common_cleanup should be void
__ibv_cleanup_wq should use wq->cond for cond destroy
both issues were overlooked in:
a687910 ('Cleanup pthread locks in ofed RDMA verbs')

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

Reviewed by:	sean.lim@dell.com, vangyzen@, erj@
MFC after:	1 day
Sponsored by: Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D43491
2024-02-05 18:58:20 -08:00
Jose Luis Duran
864780bca0 traceroute: Remove $FreeBSD$ rcsid tags
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901
2024-02-02 20:14:09 -07:00
Jose Luis Duran
5eb1aebf8d traceroute: Lint manuals
Fix a number of warning mandoc -Tlint and igor turned up.  No changes
intended.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901
2024-02-02 20:14:09 -07:00
Jose Luis Duran
ba09352b73 traceroute: Standardize usage
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901
2024-02-02 20:14:09 -07:00
Jose Luis Duran
00aa635337 traceroute: Update values in examples
Standardize the documentation and update it to reflect the current
values.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901
2024-02-02 20:14:09 -07:00
Jose Luis Duran
af87ba6522 traceroute: Silence compiler warning
Silence the warning:

argument to 'sizeof' in 'strncpy' call is the same expression as the
source; did you mean to use the size of the destination?"

by using strlcpy() and the size of the destination (device).

No functional change intended.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/901
2024-02-02 20:14:09 -07:00
Philip Paeps
2723c7ffb7 contrib/tzdata: import tzdata 2024a
Changes: https://github.com/eggert/tz/blob/2024a/NEWS

MFC after:	3 days
2024-02-02 10:01:39 +08:00
Gregory Neil Shapiro
d39bd2c138 Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
Merge vendor sendmail 8.18.1 into HEAD
2024-01-31 23:53:48 +00:00
Gregory Neil Shapiro
850ef5ae11 Import sendmail 8.18.1 2024-01-31 23:37:30 +00:00
Dimitry Andric
ee14a9725d Merge commit 4a39d0890894 from llvm-project (by Mark Johnston):
[libc++] Fix filesystem::remove_all() on FreeBSD (#79540)

  remove_all_impl() opens the target path with O_NOFOLLOW, which fails if
  the target is a symbolic link. On FreeBSD, rather than returning ELOOP,
  openat() returns EMLINK. This is unlikely to change for compatibility
  reasons, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214633 .

  Thus, check for EMLINK as well.

Reported by:	markj
PR:		276632
MFC after:	3 days
2024-01-29 18:26:48 +01:00
Dimitry Andric
31aedef26f Merge commit 16a1ef86cbc5 from llvm-project (by David CARLIER):
[compiler-rt] remove hexdump interception. (#79378)

  a freebsd dev member reported a symbol conflict and intercepting this
  had little value anyway.

This is one part of fixing the WITH_ASAN build. Some executables in the
base system define their own hexdump() symbol, which would otherwise
conflict with the ASan-intercepted one.

Reported by:	markj
PR:		276597
MFC after:	3 days
2024-01-27 22:48:58 +01:00
Dimitry Andric
ecf4106237 Merge libcxxrt master 03c83f5a57be8c5b1a29a68de5638744f17d28ba
Interesting fixes (* were already cherry-picked):
- 03c83f5 add __cxa_init_primary_exception (#23)
* 5d8a158 Fix two bugs in __cxa_end_cleanup()
* b00c6c5 Insert padding in __cxa_dependent_exception
* 45ca8b1 Insert padding in __cxa_exception struct for compatibility
* f2e5509 Fix unlock in two-word version and add missing comment.
- 6229590 Add an option for disabling emergency buffers. (#14)

MFC after:	2 weeks
2024-01-25 18:43:23 +01:00
Piotr Pawel Stefaniak
8297ff13fb tcp_wrappers: silence a few warnings
Mostly -Wdeprecated-non-prototype.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D43531
2024-01-22 17:23:49 +01:00
Cy Schubert
c19fb1f963 sqlite3: Vendor import of sqlite3 3.45.0
Release notes at https://www.sqlite.org/releaselog/3_45_0.html

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz

MFC after:	2 weeks
Merge commit 'cdad538768db9e2c8258d19e9282fb5aaae80e46'
2024-01-22 07:35:06 -08:00
Muhammad Moinur Rahman
6b13d60bf4
contrib/kyua: Merge vendor import
* commit '5f174897f67783925f4ec69122673f9bad6ee6fe':
  vendor/kyua: Update to snapshot 84c8ec8
  Vendor import of freebsd/kyua@a0d44bb356
Approved by:    markj
Differential Revision:  https://reviews.freebsd.org/D43475
2024-01-18 17:26:13 +01:00
Simon J. Gerraty
d5e0a182cf Update to bmake-20240108 2024-01-13 17:31:01 -08:00
Stefan Eßer
f4fbc49d20 vendor/bc: upgrade to version 6.7.5
This update fixes a bug that line breaks in printed numbers may not
match the line length set by the user. The value is printed correctly,
just not split as specified in some situations.

(cherry picked from commit 52a5ec1b178fd07651446c7e31b1512794a04dbf)
2024-01-10 17:36:29 +01:00
Stefan Eßer
e6857bd4d7 vendor/bc: upgrade to version 6.7.4
Documentation updates only, no functional changes to the software.

(cherry picked from commit a3f3a7b4dc80d577e4c8fc64dfbbb359d2e24228)
2024-01-10 17:35:14 +01:00
Stefan Eßer
aa339f1d5d vendor/bc: upgrade to version 6.7.2
This update improves the implementation of the power function p() and
adds 3 new functions to the extended math library: min(), max(), and
i2rand().

(cherry picked from commit 0b4a06ab29a0da80f6cb5c99189054cb8e2f756c)
2024-01-10 17:34:49 +01:00
Kristof Provost
324fd7ec40 libpfctl: introduce a handle-enabled variant of pfctl_add_rule()
Introduce pfctl_add_rule_h(), which takes a pfctl_handle rather than a
file descriptor (which it didn't use). This means that library users can
open the handle while they're running as root, but later drop privileges
and still add rules to pf.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-01-04 23:10:44 +01:00
Jose Luis Duran
8aafae6639 traceroute: Implement ECN bleaching detection
Explicit Congestion Notification (ECN) is a mechanism that allows
end-to-end notification of network congestion without dropping packets
by explicitly setting the ECN code point (2 bits).

Per RFC 8087, section 3.5, network devices should not be configured to
change the ECN code point in the packets that they forward, except to
set the CE (Congestion Experienced) code point ('11') to signal
incipient congestion.

The current commit adds an -E flag to traceroute that crafts a packet
with an ECT(1) code point ('01').

If the packet is received back with a zero ECN code point ('00'), it
outputs that the hop in question erases or "bleaches" the ECN code point
values.  Bleaching may occur for various reasons (including normalizing
packets to hide which equipment supports ECN).  This policy prevents the
use of ECN by applications.

If the packet is received back with an all-ones ECN code point ('11'),
it outputs that the hop in question is experiencing "congestion".

If the packet is received back with a different ECN code point ('10'),
it outputs that the hop in question changes or "mangles" the ECN code
point values.

If the packet is received with the same ECN code point that was sent
('01'), it outputs that the hop has "passed" the ECN bits appropriately.

Inspired by:	Darwin
Reviewed by:	imp, markj
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/879
2024-01-03 12:57:54 -05:00
Jose Luis Duran
943a9f4e47 traceroute: style(9) fixes
No functional change intended.

Reviewed by:	imp, markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/879
2024-01-03 12:56:10 -05:00
Jose Luis Duran
b023e965dc traceroute: Remove the $FreeBSD$ pattern
Reviewed by:	imp, markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/879
2024-01-03 12:54:18 -05:00
Dimitry Andric
7963968640 Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan):
[PowerPC] Expand FSINCOS of fp128 (#76494)

This fixes "fatal error: error in backend: Cannot select: 0x6d420285c0:
f128,f128 = fsincos 0x6d4202b6f0" when compiling s_cpowl.c for
powerpc64le.

Upstream ticket: https://github.com/llvm/llvm-project/issues/76442

Reported by:	pkubaj
MFC after:	3 days
2023-12-29 20:30:45 +01:00
Mateusz Guzik
3358108a38 llvm: Support: don't block signals around close if it can be avoided
Signal blocking originally showed up in 51c2afc4b65b2782 ("Support:
Don't call close again if we get EINTR"), but it was overzealous --
there are systems where the error is known to be fine.

This commit elides signal blocking for said systems (the list is
incomplete though).

Note close() can still fail for other reasons (like ENOSPC), in which
case an error will be returned while the fd slot is cleared up.

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D42984
2023-12-29 18:52:12 +00:00
Igor Ostapenko
d4d14d965f atf-sh: fix comment typo
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/895
2023-12-26 16:24:42 -07:00
Konstantin Belousov
bf7830d79d ofed: use ANSI C functions definitions in opensm/sm.c
Sponsored by:	NVidia networking
MFC after:	1 week
2023-12-26 21:22:01 +02:00
Dimitry Andric
1ff41cad71 Minimize libc++ errno-related header diffs with upstream
In commit 88640c0e8b the new EINTEGRITY errno value was added, and
this caused us to carry a patch for upstream libc++ since that time.
Because it can cause merge conflicts when importing libc++ code from
upstream, I have submitted an upstream pull request to get most of that
patch integrated.

It turns out that we do not need the errno.h part of it at all, since
all supported FreeBSD versions define EOWNERDEAD and ENOTRECOVERABLE,
and therefore the block that juggles with ELAST values is never used in
FreeBSD. At the moment it only applies to older versions of Linux, or
possibly other platforms.

Therefore the only part that needs to stay is the definition of a enum
errc value for EINTEGRITY, and this is made optional upon EINTEGRITY
being defined, to make it suitable for upstreaming.

No functional change is intended.

MFC after:	1 week
2023-12-25 18:19:12 +01:00
Philip Paeps
eebb9c2cae contrib/tzdata: import tzdata 2023d
Changes: https://github.com/eggert/tz/blob/2023d/NEWS

MFC after:	1 day
2023-12-23 09:51:01 +08:00
Dimitry Andric
c794d18822 Fix snprintf truncation in telnet
Building telnet with clang 18 results in the following warning:

  contrib/telnet/telnet/telnet.c:231:5: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 11 [-Werror,-Wformat-truncation]
    231 |     snprintf(temp2, sizeof(temp2), "%c%c%c%c....%c%c", IAC, SB, TELOPT_COMPORT,
	|     ^

The temp2 buffer is 10 chars, while the format string also consists of
10 chars. Therefore, snprintf(3) will truncate the last character, 'SE'
(end sub negotation) in this case.

Bump the buffer to 11 chars to avoid truncation.

MFC after:	3 days
2023-12-21 23:45:52 +01:00
Alex Richardson
0156465c6d mandoc: fix bootstrapping on Linux with Clang 16
It appears that Clang 16 errors by default for the mismatched function
pointer types that are triggered by the fts callback (since glibc has a
callback type without the second const qualifier).
Fortunately, there is already code to handle glibc inside mandoc, we
just have to edit the checked-in config.h.

Reviewed By:	imp, emaste
Differential Revision: https://reviews.freebsd.org/D42999
2023-12-11 21:14:56 -08:00
Mariusz Zaborski
a7100ae23a capsicum: introduce cap_rights_is_empty Function
Before this commit, we only had the capability to check if a specific
capability was set (using cap_rights_is_set function). However, there
was no efficient method to determine if a cap_rights_t structure doesn't
contain any capability. The cap_rights_is_empty function addresses
this gap.

PR:		275330
Reported by:	vini.ipsmaker@gmail.com
Reviewed by:	emaste, markj
Differential Revision:	https://reviews.freebsd.org/D42780
2023-12-11 12:15:46 +01:00
Dimitry Andric
feb5b0c76f Merge commit 158f4f30adb4 from llvm git (by Corentin Jabot):
[Clang] Do not change the type of captured vars when checking lambda constraints

  When checking the constraint of a lambda, we need to respect the constness
  of the call operator when establishing the type of capture variables.

  In D124351, this was done by adding const to the captured variable...
  However, that would change the type of the variable outside of the scope
  of the lambda, which is clearly not the desired outcome.

  Instead, to ensure const-correctness, we need to populate
  a LambdaScopeInfo with the capture variables before checking the
  constraints of a generic lambda.

  There is no changelog as I'd like to tentatively propose we backport
  this change to RC3 as it is a regression introduced in the Clang 17
  cycle.

  Fixes #61267

  Reviewed By: aaron.ballman, #clang-language-wg

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

Merge commit 3ed9e9e3ace6 from llvm git (by Corentin Jabot):

  [Clang] Add captures to the instantiation scope of lambda call operators

  Like concepts checking, a trailing return type of a lambda
  in a dependent context may refer to captures in which case
  they may need to be rebuilt, so the map of local decl
  should include captures.

  This patch reveal a pre-existing issue.
  `this` is always recomputed by TreeTransform.

  `*this` (like all captures) only become `const`
  after the parameter list.

  However, if try to recompute the value of `this` (in a parameter)
  during template instantiation while determining the type of the call operator,
  we will determine  it to be const (unless the lambda is mutable).

  There is no good way to know at that point that we are in a parameter
  or not, the easiest/best solution is to transform the type of this.

  Note that doing so break a handful of HLSL tests.
  So this is a prototype at this point.

  Fixes #65067
  Fixes #63675

  Reviewed By: erichkeane

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

This fixes 'Assertion failed: (isa<LabelDecl>(D) && "declaration not
instantiated in this scope"), function findInstantiationOf' error when
building databases/mongodb44.

PR:		273753
MFC after:	1 month
2023-12-08 18:36:06 +01:00
Dimitry Andric
5c16e71d30 Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR:		273753
MFC after:	1 month
2023-12-08 18:35:59 +01:00
Dimitry Andric
b121cb0095 Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.5-0-g98bfdac5ce82.

PR:		273753
MFC after:	1 month
2023-12-08 18:35:50 +01:00
Dimitry Andric
bdb86d1a85 Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.3-0-g888437e1b600.

PR:		273753
MFC after:	1 month
2023-12-08 18:35:41 +01:00
Dimitry Andric
3bd749dbd9 Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.2-0-gb2417f51dbbd.

PR:		273753
MFC after:	1 month
2023-12-08 18:35:33 +01:00
Dimitry Andric
4542f901cb Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.1-25-g098e653a5bed.

PR:		273753
MFC after:	1 month
2023-12-08 18:35:22 +01:00
Dimitry Andric
8a4dda33d6 Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.0-rc4-10-g0176e8729ea4.

PR:		273753
MFC after:	1 month
2023-12-08 18:35:11 +01:00
Dimitry Andric
06c3fb2749 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.

PR:		273753
MFC after:	1 month
2023-12-08 18:34:50 +01:00
Dimitry Andric
641efdd10c 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
2023-12-04 18:59:11 +01:00
Bjoern A. Zeeb
1edc20b769 wpa: ctrl_iface set sendbuf size
In order to avoid running into the default net.local.dgram.maxdgram
of 2K currently when calling sendto(2) try to set the sndbuf size to
the maximum ctrl message size.
While on 14 and 15 this does not actually raise the limit anymore (and
be7c095ac9 raised it for syslogd and this),
FreeBSD 13 still requires this change and it will work as expected there.
In addition we always ensure a large enough send buffer this way
independent of kernel defaults.
The problem occured, e.g., when the scan_list result had enough BSSIDs
so the text output would exceed 2048 bytes.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
PR:		274990
Reviewed by:	cy, adrian (with previous comment)
Differential Revision: https://reviews.freebsd.org/D42558
2023-12-02 20:37:36 +00:00
Dimitry Andric
d2033021a7 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:		4c9a0adad1
MFC after:	3 days
2023-11-28 19:17:54 +01:00
Brooks Davis
a3c858005c telnet: remove locally added __FBSDID
This partially reverts 77b7cdf199.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42704
2023-11-27 16:47:37 +00:00
Brooks Davis
a159b74a5d smbfs: remove locally added __FBSDID
Differential Revision:	https://reviews.freebsd.org/D42703
2023-11-27 16:47:33 +00:00
Brooks Davis
78e6a1bd06 pnpinfo: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42702
2023-11-27 16:47:30 +00:00
Brooks Davis
3f944f3bb7 ee: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42701
2023-11-27 16:47:26 +00:00
Brooks Davis
ae477ca7da bzip2: remove locally added __FBSDID
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42700
2023-11-27 16:47:22 +00:00
Xin LI
ca6a6373bd MFV: xz 5.4.5
MFC after:	2 weeks
2023-11-25 17:02:59 -08:00
Dimitry Andric
4c9a0adad1 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
2023-11-22 19:23:06 +01:00
Brooks Davis
bbde5c0725 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
2023-11-21 00:21:11 +00:00
Brooks Davis
ea2be8ed28 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
2023-11-21 00:21:11 +00:00
Brooks Davis
db94e7c3f9 vis: relocate _DIAGASSERT() define
Other similar files from NetBSD define it unconditionally as a local
diff.

Reviewed by:	imp (as part of D42686)
2023-11-21 00:21:11 +00:00
Warner Losh
4ac3cfa939 traceroute: Remove stray __P
Remove stray __P(). It's no longer needed, and since the whole rest of
the file lacks them, it's not very useful.

Sponsored by:		Netflix
2023-11-17 21:05:00 -07:00
Warner Losh
f863f39636 pnpinfo: Remove __P
We don't need to compile on a K&R compiler (and we've long ago lost the
ability to do so). It's not even clear if it ever worked with a pure K&R
compiler, but maybe it once did...

Sponsored by:		Netflix
2023-11-17 21:04:59 -07:00
Warner Losh
b2376a5f1e Revert "awk: Merge upstream 2nd Edition Awk Book"
The pre-push testing I did turned out to be testing the old version with
the old testsuite (for reasons I don't understnad). There's issues with
the new version, the new test in the suite or (likely) both. Revert
until they can be chased down.

This should also fix the github CI that's gone red since this commit.

This reverts commit 3fd60a6b73, reversing
changes made to 194df014fe.

Sponsored by:		Netflix
2023-11-15 15:28:05 -07:00
John Baldwin
ab43851b0c Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser):
[libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++

    These are changes to allow GCC 13 to successfully compile the runtimes stack.

    Reviewed By: ldionne, #libc, #libunwind, MaskRay

    Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits

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

Reviewed by:	imp, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D42578
2023-11-14 18:34:45 -08:00
Cy Schubert
b50261e21f libevent: Import libevent 2.1.12
MFC after:	2 weeks

Merge commit '5223d1d95fddcef6f9a36e264a5800bd907ade8b' into main
2023-11-14 17:13:02 -08:00
Warner Losh
3fd60a6b73 awk: Merge upstream 2nd Edition Awk Book
Merge in the November 2nd, 2023 version of one true awk.

This brings in Unicode support, CSV support and a number of bug fixes.

Sponsored by:		Netflix
Reviewed by:		delphij
Differential Revision:	https://reviews.freebsd.org/D42447
2023-11-13 21:49:34 -07:00
Cy Schubert
5aab39b24c 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>
MFC:		2 weeks
2023-11-13 16:46:12 -08:00
Cy Schubert
103ba509e7 unbound: Vendor import 1.19.0
Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.19.0-released/

MFC after:	2 weeks

Merge commit '16fd0b24910488e59ca1941387b9ac7fb646a837' into unbound
2023-11-13 13:38:45 -08:00
Cy Schubert
7963e41154 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
MFC after:	2 weeks

Merge commit '3a88fe13354325b9f56f07927e654de4f5398707'
2023-11-13 08:50:36 -08:00
Luiz Amaral
85247ee6a2 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
2023-11-08 16:12:14 +01:00
Ed Maste
5f4c09dd85 Track upstream project rename in contrib/blocklistd
Upstream is now https://github.com/zoulasc/blocklist/.  Rename the
contrib directory and update Makefiles to match, in advance of the next
vendor branch update.

Sponsored by:	The FreeBSD Foundation
2023-11-03 16:53:04 -04:00
Jose Luis Duran
b73612a342 blacklistd: Handle fds that are pointing to routing sockets
If the fd has access to make changes via the routing socket, grant full
permission to make filter changes.

Obtained from:	1b9475b2c8
2023-11-02 14:52:40 -04:00
Ed Maste
63f5375513 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
2023-10-22 10:58:52 -04:00
Mitchell Horne
eb87588155 Tweaks to libarchive's upgrade instructions
I would like to use this file as an example of the FREEBSD-upgrade
convention, see D42302. libarchive is picked somewhat arbitrarily as a
longstanding piece of contrib software in FreeBSD.

- Remove SVN references (HEAD/trunk)
- Mention the vendor/libarchive git branch
- Update link to import instructions
- Remove $FreeBSD$

Reviewed by:	mm, imp, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D42308
2023-10-20 12:12:02 -03:00
Dag-Erling Smørgrav
ca57a343e8 libc: More missing MLINKS.
Differential Revision:	https://reviews.freebsd.org/D42292
2023-10-20 12:29:40 +02:00
Cy Schubert
6e71235e55 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
MFC after:	3 days

Merge commit '292d51198aa319c58f534549851e9c28486abdf4'
2023-10-12 17:04:25 -07:00
Jose Luis Duran
3347078000 (upstream) PR/386: Add newlines for consitency 2
Obtained from:	https://github.com/file/file/pull/134/
2023-10-08 21:52:53 -07:00
Jose Luis Duran
0d3a87569f 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
2023-10-08 21:44:14 -07:00
Baptiste Daroussin
61ba55bcf7 bsddialog: import version 1.0 2023-10-04 18:12:03 +02:00
Mariusz Zaborski
62d3f57c22 capsicum: add tests for copy_file_range
Reviewed by:    emaste, theraven, kib, markj (all previous version)
Differential Revision:  https://reviews.freebsd.org/D41967
2023-09-28 15:48:32 +02:00
Baptiste Daroussin
0fcececbac nvi: import version 2.2.1 2023-09-27 18:14:45 +02:00
Mina Galic
948e11aaf4 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
2023-09-20 07:41:58 -07:00
Ed Maste
2ccfa855b2 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
2023-09-19 13:06:12 -04:00
Ed Maste
1843dfb05e libfido2: backport hidraw(4) support
PR:		273596
Submitted by:	David Horn
Obtained from:	libfido2 2c9dfaae2a56, 930160388700
2023-09-19 12:53:47 -04:00
Cy Schubert
ec99498144 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

MFC after:      2 weeks

Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main
2023-09-19 08:06:50 -07:00
Sean Lim
a687910fc4 Cleanup pthread locks in ofed RDMA verbs
On FreeBSD, pthread mutex, cond, and spinlocks allocate memory.  On
Linux-based systems, these calls do not allocate memory.  So there was a
safe assumption that the ofed RDMA verb calls do not need to explicitly
destroy the pthread locks.  This assumption is false on FreeBSD.  So let
us rearrange the code to cleanup the pthread locks.

Reviewed by:	delphij
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D41105
2023-09-19 09:10:42 -05:00
Cy Schubert
8f76bb7dad unbound: Vendor import 1.18.0
Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/

MFC after:      2 weeks

Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main
2023-09-18 21:17:09 -07:00
Cy Schubert
401770e05c unbound: Vendor import 1.18.0
Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/
2023-09-18 12:59:52 -07:00
Simon J. Gerraty
9887588385 Merge bmake-20230909
Merge commit '1012cf15f75d1e9048779abd07270a37cdba590a'
2023-09-17 18:09:37 -07:00
Dag-Erling Smørgrav
7e0a7ef95f 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
2023-09-15 23:36:41 +02:00
Bartosz Sobczak
ffafa6a4d1
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@
MFC after:	1 day
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41593
2023-09-13 15:16:21 -07:00
Xin LI
898496ee09 MFV: file 5.45.
MFC after:	3 days
2023-09-10 12:21:16 -07:00
Martin Matuska
f10f65999f 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
MFC after:	3 days
2023-09-07 17:22:34 +02:00
Dag-Erling Smørgrav
aacbe73842 unifdef: Handle redefined symbols correctly.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41758
2023-09-06 17:11:13 +00:00
Jessica Clarke
8524dc53fd 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
2023-09-04 09:33:27 +01:00
Kristof Provost
ddd08375c8 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
2023-08-31 10:56:31 +02:00
Dag-Erling Smørgrav
b9385720f3 libc: Add unit tests for N2630 and possible collateral damage.
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41512
2023-08-28 15:34:05 +00:00
Pietro Cerutti
d4b3aefdf9 netcat: add --crlf to convert LF into CRLF
This adds the --crlf option to netcat, which triggers translation of \n
characters into \r\n sequences in the input -> network direction.
The Linux version of nc also supports this functionality with --crlf and
-C. The OpenBSD version uses -C to specify client certificates. Our
version is too old and doesn't have it, but I avoided adding -C anyway
to ease future syncs with upstream.

Attempts to upstream the feature were unsuccessful:
https://marc.info/?t=169282068500001

Differential Revision: https://reviews.freebsd.org/D41489
2023-08-28 10:58:17 +00: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
Konstantin Belousov
6fdf714d5d opensm libvendor: remove non-existent symbols from the version map
Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:14 +03:00
Konstantin Belousov
67c5de2dca opensm libosmcomp: remove non-existent symbols from the version map
Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Konstantin Belousov
e5cf232b3f librmdacm: rdma_get_local_addr and rdma_get_peer_addr are not exported
they are static inline, remove them from the version script.

Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Konstantin Belousov
9a7eba89f9 librdmacm: remove rsocket symbols from the map file
rsocket support was never compiled on FreeBSD at all.

Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Konstantin Belousov
dd0f2d02c6 libibverbs: remove nonexistent symbols from the linker map
The function ibv_query_device_ex is static inline, it is not exported
from the dso. With lld 16, which is much more picky about versioning and
undefined symbols, this becomes an error.

The ibv_register_driver driver symbol is explicitly versioned in
sources, it is non-existent in un-versioned object files.

Sponsored by:	NVidia networking
MFC after:	1 week
2023-08-04 02:13:13 +03:00
Martin Matuska
058ab969fd libarchive: merge from vendor branch
Changes to not yet connected unzip only.

MFC after:	1 week
2023-08-04 01:04:14 +02:00
Xin LI
1f3ced26d4 MFV: xz 5.4.4.
MFC-after:	2 weeks
2023-08-03 00:52:36 -07:00
Martin Matuska
d91bfe0fb7 libarchive: merge from vendor branch
Changes to not yet connected unzip only.

MFC after:	1 week
2023-07-31 13:15:12 +02:00
Martin Matuska
64884e0d4c libarchive: merge from vendor branch
Libarchive 3.7.1

Important changes (relevant to FreeBSD):
  ISSUE #1934: stack buffer overflow in cpio verbose mode
  ISSUE #1935: SEGV in cpio verbose mode
  PR #1731 tar: respect --strip-components and -s patterns in cru modes

MFC after:	1 week
2023-07-29 23:05:34 +02:00
Martin Matuska
70968ea087 Update vendor/libarchive to libarchive/libarchive@0e1e2b926
Important bugfixes (relevant to FreeBSD):
  ISSUE #1934: stack buffer overflow in cpio verbose mode
  ISSUE #1935: SEGV in cpio verbose mode
  PR #1731 tar: respect --strip-components and -s patterns in cru modes

Obtained from:		libarchive
Libarchive commit:	0e1e2b926aad81512a79a05c791b9dc7e0fa8715
Libarchive tag:		v3.7.1
2023-07-29 20:19:08 +02:00
Mike Karels
f1d5183124 arm64 lib32: change clang to allow -m32 on arm64
The FreeBSD driver support for clang tested explicitly for 32-bit
Intel, MIPS, or PowerPC targets where /usr/lib32/libcrt1.o was
present to decide whether -m32 should use /usr/lib32.  At jrtc27's
suggestion, simply test for a 32-bit platform rather than adding
arm to the list.  Upstreamed as
3450272fc2
Bump the freebsd version to force a bootstrap build.  This is one
step in adding support for -m32 on arm64.

Reviewed by:	jrtc27, brooks, dim
Differential Revision:	https://reviews.freebsd.org/D40943
2023-07-25 18:58:51 -05:00
Martin Matuska
e64fe029e9 libarchive: merge from vendor branch
Libarchive 3.7.0

Important changes (relevant to FreeBSD):
  #1814 Do not account for NULL terminator when comparing with "TRAILER!!!"
  #1818 Add ability to produce multi-frame zstd archives
  #1840 year 2038 fix for pax archives on platforms with 64-bit time_t
  #1860 Make single bit bitfields unsigned to avoid clang 16 warning
  #1869 Fix FreeBSD builds with WARNS=6
  #1873 bsdunzip ported to libarchive from FreeBSD
  #1894 read support for zstd compression in 7zip archives
  #1918 ARM64 filter support in 7zip archives

MFC after:	2 weeks
PR:		272567 (exp-run)
2023-07-24 07:42:43 +02:00
Dimitry Andric
b8f1c9dd9b Merge commit 2b0f5df7b4e0 from llvm-project (by Jessica Clarke):
[builtins][Mips] Un-break FreeBSD build of __clear_cache

  Commit 674a17e9bbe8 ("MIPS/compiler_rt: use synci to flush icache on
  r6") completely removed the OS-specific guards under the guise of "For
  pre-r6, we can use cacheflush libc function, which is same on Linux and
  FreeBSD." However, the code in question had guards for Linux and
  OpenBSD, not Linux and FreeBSD, and FreeBSD does not have a cacheflush
  libc function as claimed, so this was neither the statement they
  intended to make nor was it sufficient justification for making the code
  completely unconditional. Whilst the upcoming FreeBSD 14 release has
  dropped support for MIPS, FreeBSD 13 has support for it.

  Fix this by only calling cacheflush on the OSes where it was previously
  called, and not on other OSes where it either definitely isn't available
  (FreeBSD) or is unknown (any other OS than the three mentioned in this
  commit).

This is only needed for MFC'ing, as mips has been removed from
14-CURRENT.

PR:		271047
MFC after:	immediately
2023-07-23 13:01:42 +02:00
Gleb Smirnoff
1d9722de6f tcp_wrappers: recognize IPv6 addresses/prefixes
Intentionally or not, but the libwrap was written in such manner that
if your /etc/hosts.allow doesn't have any domain names, neither smart
keywords like LOCAL or KNOWN, then it will not try to resolve the
client address during the hosts check.  This was achieved with the
NOT_INADDR() check that matched IPv4 addresses/prefixes.  Extend this
to also skip resolve if client list token looks like IPv6.

Reviewed by:		philip, emaste
PR:			269456
Differential revision:	https://reviews.freebsd.org/D40070
2023-07-20 14:56:20 -07:00
Dimitry Andric
8d0cab8800 Merge commit 9ca395b5ade1 from llvm-project (by Haojian Wu):
[clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's initializer.

  Similar to the https://reviews.llvm.org/D86048 (it only sets the bit for C++
  code), we propagate the contains-errors bit for C-code path.

  Fixes https://github.com/llvm/llvm-project/issues/50236
  Fixes https://github.com/llvm/llvm-project/issues/50243
  Fixes https://github.com/llvm/llvm-project/issues/48636
  Fixes https://github.com/llvm/llvm-project/issues/50320

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

This fixes an assertion ('Assertion failed: ((LHSExpr->containsErrors()
|| RHSExpr->containsErrors()) && "Should only occur in error-recovery
path."), function BuildBinOp') when building parts of dtrace in certain
scenarios.

Reported by:	dstolfa
PR:		271047
MFC after:	1 month
2023-07-19 19:14:23 +02:00
Martin Matuska
14b646f7c3 Update vendor/libarchive to libarchive/libarchive@ee4579617
Important changes (relevant to FreeBSD):
  #1840 year 2038 fix for pax archives on platforms with 64-bit time_t
  #1873 bsdunzip ported to libarchive from FreeBSD
  #1894 read support for zstd compression in 7zip archives
  #1918 ARM64 filter support in 7zip archives

Obtained from:		libarchive
Libarchive commit:	ee45796171324519f0c0bfd012018dd099296336
Libarchive tag:		v3.7.0
2023-07-18 09:58:47 +02:00
Dimitry Andric
881fc20356 Merge commit 8757ce490130 from llvm-project (by Simon Pilgrim):
[PowerPC] Replace PPCISD::VABSD cases with generic ISD::ABDU(X,Y) node

    A move towards using the generic ISD::ABDU nodes on more backends

    Also support ISD::ABDS for v4i32 types using the existing signbit flip trick

    PowerPC has a select(icmp_ugt(x,y),sub(x,y),sub(y,x)) -> abdu(x,y) combine that I intend to move to DAGCombiner in a future patch.

    The ABS(SUB(X,Y)) -> PPCISD::VABSD(X,Y,1) v4i32 combine wasn't legal (https://alive2.llvm.org/ce/z/jc2hLU) - so I've removed it, having already added the legal sub nsw tests equivalent.

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

This fixes a "Wasn't expecting to be able to lower this!" fatal error
when compiling graphics/opencv for PowerPC.

Requested by:	pkubaj
PR:		271047
MFC after:	1 month
2023-07-16 20:45:29 +02:00
Warner Losh
a9490b81b0 Merge LUA 5.4.6
This is a bug fix to Lua 5.4.4 (5.4.5 was withdrawn due to ABI issues
and 5.4.6 is 5.4.5 with those fixed).
2023-07-15 11:31:04 -06:00
Dimitry Andric
1cd9788408 Merge commit fde5924dcc69 from llvm-project (by Serge Pavlov):
[clang] Reset FP options before template instantiation

  AST nodes that may depend on FP options keep them as a difference
  relative to the options outside the AST node. At the moment of
  instantiation the FP options may be different from the default values,
  defined by command-line option. In such case FP attributes would have
  unexpected values. For example, the code:

      template <class C> void func_01(int last, C) {
        func_01(last, int());
      }
      void func_02() { func_01(0, 1); }
      #pragma STDC FENV_ACCESS ON

  caused compiler crash, because template instantiation takes place at the
  end of translation unit, where pragma STDC FENV_ACCESS is in effect. As
  a result, code in the template instantiation would use constrained
  intrinsics while the function does not have StrictFP attribute.

  To solve this problem, FP attributes in Sema must be set to default
  values, defined by command line options.

  This change resolves https://github.com/llvm/llvm-project/issues/63542.

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

Requested by:	pkubaj
PR:		265755, 265758
MFC after:	1 month
2023-07-13 20:57:22 +02:00
Jessica Clarke
0ade2f8cf7 openpam: Migrate from COMPAT_32BIT to generic COMPAT_libcompat
See commit 8fad2cda93 ("bsd.compat.mk: Provide new CPP and sub-make
variables") for the context behind this change.

Reviewed by:	brooks, jhb
Differential Revision:	https://reviews.freebsd.org/D40923
2023-07-09 18:48:17 +01:00
Dmitry Chagin
a18b956b73 libexecinfo: Enable backtrace_test.backtrace_fmt_basic on amd64 again
Due to unwind tables generation enabled after c969310c for csu.

PR:			241562, 246322, 246537
Reviewed by:		kib, ngie
Differential Revision:	https://reviews.freebsd.org/D40758
2023-06-29 19:53:07 +03:00
Simon J. Gerraty
148ee84570 Merge bmake-20230622
Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0'
2023-06-27 13:57:58 -07:00
John Baldwin
2e1665ff34 ldns: Remove a set but unused variable.
Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D40695
2023-06-27 10:19:32 -07:00
John Baldwin
32c7dde816 hyperv/kvp: Remove set but unused variables.
Reported by:	GCC
Reviewed by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Differential Revision:	https://reviews.freebsd.org/D40660
2023-06-27 10:19:32 -07:00
Dag-Erling Smørgrav
3ba4c8c81a Upgrade to OpenPAM Ximenia.
Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b'
2023-06-27 19:03:17 +02:00
Pierre Pronchery
e23d45187b libarchive: Avoid a build failure with OpenSSL 3.0
This is a minimal workaround; a proper fix will come via a future update
from upstream.

Sponsored by:	The FreeBSD Foundation
2023-06-23 18:53:36 -04:00
Dimitry Andric
e048f78b21 Merge llvm-project release/16.x llvmorg-16.0.6-0-g7cbf1a259152
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16.0.6-0-g7cbf1a259152 (aka 16.0.6 release).

PR:		271047
MFC after:	1 month
2023-06-22 20:22:59 +02:00
Dimitry Andric
cf24393421 Merge commit 69d42eef4bec from llvm-project (by Dimitry Andric):
[Clang] Show type in enum out of range diagnostic

  When the diagnostic for an out of range enum value is printed, it
  currently does not show the actual enum type in question, for example:

      v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
        static constexpr T kMax = static_cast<T>(kNumValues - 1);
                                  ^

  This can make it cumbersome to find the cause for the problem. Add the
  enum type to the diagnostic message, to make it easier.

  Reviewed By: aaron.ballman

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

PR:		271047
MFC after:	1 month
2023-06-22 20:22:54 +02:00
Dimitry Andric
2efbaac7a0 Merge llvm-project release/16.x llvmorg-16.0.5-0-g185b81e034ba
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16.0.5-0-g185b81e034ba (aka 16.0.5 release).

PR:		271047
MFC after:	1 month
2023-06-22 20:22:50 +02:00
Dimitry Andric
a324c34037 Merge llvm-project release/16.x llvmorg-16.0.4-0-gae42196bc493
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16.0.4-0-gae42196bc493 (aka 16.0.4 release).

PR:		271047
MFC after:	1 month
2023-06-22 20:22:43 +02:00
Dimitry Andric
cbe9438cfe Merge llvm-project release/16.x llvmorg-16.0.3-0-gda3cd333bea5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16.0.3-0-gda3cd333bea5 (aka 16.0.3 release).

PR:		271047
MFC after:	1 month
2023-06-22 20:22:35 +02:00