Commit graph

24282 commits

Author SHA1 Message Date
Kristof Provost
5fb08c6ff0 libpfctl: fix incorrect pcounters array size
The array is 2 x 2 x 2, not 2 x 2 x 3.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
MFC after:	2 weeks

(cherry picked from commit a3f7176523e8611b259cefd7431c01e24f446db7)
2024-06-03 11:06:56 +02:00
Vincenzo Maffione
a407a9671a libnetmap: remove interface name validation
When trying to use a VLAN device (e.g. "em0.123") with a dot
the library fails to parse the interface correctly. The former
pattern is much too restrictive given that almost all characters
can be coerced into a device name via ifconfig.

Remove the particularly restrictive validation.  Some characters
still cannot be used as an interface name as they are used as
delimiters in the syntax, but this allows to be able to use most
of them without an issue.

Submitted by:	franco@opnsense.org
Differential Revision:	https://reviews.freebsd.org/D42485
Reviewed by:	vmaffione

(cherry picked from commit ad874544d9f018bf8eef4053b5ca7b856c4674cb)
2024-06-03 11:06:53 +02:00
Colin Percival
10e31f0946 Update in preparation for 14.1-RELEASE
- Bump BRANCH to RELEASE
- Add the anticipated RELEASE announcement date
- Set a static __FreeBSD_version

Approved by:    re (implicit)
Sponsored by:   https://www.patreon.com/cperciva
2024-05-30 17:31:16 -07:00
Dag-Erling Smørgrav
fb18c369c3 access(2): Discourage use of these system calls.
Fixes:		421025a274fb
PR:		262895
MFC after:	3 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D45240

(cherry picked from commit a4be1eb21165d7aedae9dc6634528619ff10d025)
(cherry picked from commit 79b39f23e1)

Approved by:	re (cperciva)
2024-05-23 04:45:55 +02:00
Gordon Bergling
8766ae10d3 access.2: Mention that lstat(2) should be used for symbolic links
access(), eaccess() and faccessat() will always dereference
symbolic links.

So add a note in the manual page, that lstat(2) should be
used in the case of symbolic links.

PR:	262895
Reviewed by:	gbe, pauamma_gundo.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44890

(cherry picked from commit 421025a274fb5759b3ecc8bdb30b24db830b45ae)
(cherry picked from commit f075b61137)

Approved by:	re (cperciva)
2024-05-23 04:45:49 +02:00
Cy Schubert
dcde37c417 unbound: Vendor import 1.20.0
Release notes at
	https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:	The DNSBomb vulnerability CVE-2024-33655

Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main

(cherry picked from commit 335c7cda12138f2aefa41fb739707612cc12a9be)
(cherry picked from commit 7a2bb28f8e)

Approved by:	re (cperciva)
2024-05-21 22:17:21 +02:00
Alexander Ziaee
839a522e2e intro.2 as errno.2: Update maximum hard link limit
MFC after:	1 week
Co-authored-by: brooks
Reviewed by:	brooks, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1192

(cherry picked from commit 6dfbe695c3223822734dddc926415a3ba347b42c)
(cherry picked from commit 828e648b26)
Approved-by: re (cperciva)
2024-05-21 14:08:58 -06:00
Alexander Ziaee
e59ebcf36f intro.2: Add sys/syscall.h to SYNOPSIS
MFC after:	1 week
Co-authored-by: brooks
Reviewed by:	brooks, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1192

(cherry picked from commit 69ff2d754c1c8bd9c2b6cea28aa754e9f92f9613)
(cherry picked from commit cbe2436dda)
Approved-by: re (cperciva)
2024-05-21 14:08:53 -06:00
Brooks Davis
07f9866016 msun/riscv: expose fe{disable,enable}except
This is required for GCC to build.

PR:		272759
Reported by:	dgilbert@eicat.ca
Approved by:	re (cperciva)
Submitted by:	jrtc27
Differential Revision:	https://reviews.freebsd.org/D44333

(cherry picked from commit 1947a9383ec3a048e334022365aa199a6ae55289)
(cherry picked from commit 7ad1775107)
2024-05-20 23:23:30 +01:00
Dimitry Andric
6102863fd8 lib/clang: clean out old llvm/clang Sparc target remnants
The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.

PR:		276104
Approved by:	re (cperciva)
MFC after:	3 days

(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
(cherry picked from commit 0b8cdac883)
2024-05-07 19:30:21 +02:00
Dimitry Andric
8210cd3c39 Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9
Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.

PR:		276104
Approved by:	re (cperciva)
Fixes:		d67fc74b9249
MFC after:	3 days

(cherry picked from commit 894cb08f0d3656fdb81f4d89085bedc4235f3cb6)
(cherry picked from commit a17c251dd6)
2024-05-07 19:29:58 +02:00
Jessica Clarke
9019baf667 jevents: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
macOS, like Linux, does not include an outer const qualifier for its
fts_open callback arguments, so -Wincompatible-function-pointer-types
also picks this up and breaks the build now Clang 16 makes it an error
by default. Extend the existing Linux support to fix this.

MFC after:	1 week

(cherry picked from commit d8c84215d7675b7940412122b6d7026bd193c9b5)
2024-05-02 21:10:13 +01:00
Alex Richardson
8cb8aca83f jevents: fix bootstrapping on Linux with Clang 16
The glibc fts_open() callback type does not have the second const
qualifier and it appears that Clang 16 errors by default for mismatched
function pointer types. Add an ifdef to handle this case.

Reviewed By:	imp, emaste
Differential Revision: https://reviews.freebsd.org/D43000

(cherry picked from commit 60e845ceef25533bfb60450549bea56a17b1e467)
2024-05-02 21:10:13 +01:00
Dag-Erling Smørgrav
2bdfc29889 libulog: Make sure ut_line, ut_user, ut_host are terminated.
MFC after:	3 days
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D45004

(cherry picked from commit c28253ecde333c9908b7160664805acc3a92e2b0)
2024-05-02 11:08:17 +02:00
Martin Matuska
8774c92e32 libarchive: merge from vendor branch
Libarchive 3.7.4 + three fixes from master

Security fixes:
 #2135 rar: Fix OOB in rar e8 filter (CVE-2024-26256)
 #2145 zip: Fix out of boundary access
 #2148 rar: Fix OOB in rar delta filter
 #2149 rar: Fix OOB in rar audio filter

Important bugfixes:
 #2131 7zip: Limit amount of properties
 #2110 bsdtar: Fix error handling around strtol() usages
 #2116 passphrase: Never allow empty passwords
 #2124 rar: Fix "File CRC Error" when extracting specific rar4 archives
 #2123 xar: Avoid infinite link loop
 #2150 xar: Fix another infinite loop and expat error handling
 #2108 zip: Update AppleDouble support for directories
 #2071 zstd: Implement core detectiongit

(cherry picked from commit 13d826ff947d9026f98e317e7385b22abfc0eace)
2024-04-30 08:47:56 +02:00
Martin Matuska
3cf9a5010e libarchive: add two missing package files to libarchive tests
(cherry picked from commit 7d03ec330684a4e82e6113df3f40305849e5fb6c)
2024-04-30 08:47:37 +02:00
Martin Matuska
d2539274f4 libarchive: merge from vendor branch
Libarchive 3.7.3

New features:
  #1941 uudecode filter: support file name and file mode in raw mode
  #1943 7-zip reader: translate Windows permissions into UNIX
        permissions
  #1962 zstd filter now supports the "long" write option
  #2012 add trailing letter b to bsdtar(1) substitute pattern
  #2031 PCRE2 support
  #2054 add support for long options "--group" and "--owner" to tar(1)

Security fixes:
  #2101 Fix possible vulnerability in tar error reporting introduced
        in f27c173

Important bugfixes:
  #1974 ISO9660: preserve the natural order of links
  #2105 rar5: fix infinite loop if during rar5 decompression the last
        block produced no data
  #2027 xz filter: fix incorrect eof at the end of an lzip member
  #2043 zip: fix end-of-data marker processing when decompressing zip
        archives

(cherry picked from commit b9128a37faafede823eb456aa65a11ac69997284)
2024-04-30 08:46:59 +02:00
Konstantin Belousov
a951992d1e libc_private.h: use private namespace name for size_t
This is direct commit to stable/14.
2024-04-30 04:14:52 +03:00
Konstantin Belousov
09bcfbd1ae libc printf_render_errno(): do not use strerror()
(cherry picked from commit aa66995b4c804cbb579f71645d97fe282a798bfc)
2024-04-30 03:48:10 +03:00
Konstantin Belousov
0451d4287a libc: minor style, wrap long lines
(cherry picked from commit bac9d7e8f2931149815c3d5a9ab69594bbdffde6)
2024-04-30 03:48:10 +03:00
Konstantin Belousov
ade62d4062 __vprintf(): switch from strerror() to strerror_rl()
PR:	278556

(cherry picked from commit f887667694632c829b0599b54ff86a072e93df87)
2024-04-30 03:48:10 +03:00
Konstantin Belousov
8f19af4b09 libc: make strerror_rl() usable for libc
(cherry picked from commit 92771bc00ad0f567b27876c34450bef7a0ee61d0)
2024-04-30 03:48:10 +03:00
Konstantin Belousov
bd30b3dfd5 Add test for pthread_sigqueue(3)
(cherry picked from commit fb2ab7ce52d3f1e9d0998f3e5c12c3468ce4563a)
2024-04-30 03:48:09 +03:00
Konstantin Belousov
e449481bee libthr: add pthread_sigqueue(3)
PR:	278459

(cherry picked from commit 220aa0f450409948b869237e5c4505f992c913ce)
2024-04-30 03:48:09 +03:00
Konstantin Belousov
afc8b17816 sigqueue(2): Document __SIGQUEUE_TID
(cherry picked from commit dcc180c51b9c13df3d1158d14d450308711fe93c)
2024-04-30 03:48:09 +03:00
Dimitry Andric
9e6098a911 Skip building libclang_rt when WITHOUT_CLANG is used
As noted in bug 277096, when building a pkgbase repository using
WITHOUT_CROSS_COMPILER and WITHOUT_TOOLCHAIN (which sets WITHOUT_CLANG),
the following residual files are left over:

/usr/lib/clang/18/lib/freebsd/libclang_rt.asan-x86_64.so
/usr/lib/clang/18/share/asan_ignore_list.txt
/usr/lib/clang/18/share/cfi_ignore_list.txt
/usr/lib/clang/18/share/msan_ignore_list.txt

This is because the lib/libclang_rt directory is still descended into,
even if WITHOUT_CLANG is used. Fix it by not descending into the
libclang_rt directory in that case.

PR:		277096
Reported by:	Siva Mahadevan <me@svmhdvn.name>
MFC after:	3 days

(cherry picked from commit 514773a5486d1fa4f2d5acb5af1766965c20765b)
2024-04-28 10:03:37 +02:00
Alexander Motin
75f1323c15 libpmc: Import AMD Zen 4 PMU events
MFC after:	1 week

(cherry picked from commit 278d6950943a9fec2bddb037b547c04a847c54ba)
2024-04-26 23:02:10 -04:00
Brooks Davis
d5ad60b75f libgcc_s: expose __divmoddi4 on i386
GCC has used this for some time (since 7.0) and apparently we were
getting away with using the hidden symbol, but when linking with
--no-undefined-version we get an error unless it's properly exported.
(For anyone who wonders at the assymetry, __udivmoddi4 is indeed much
older and was introduced with GCC 3.0.)

MFC after:	3 days
Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D44878

(cherry picked from commit 44e89340fe349abc020732958c6debd12b5adf2c)
2024-04-26 19:30:42 +01:00
Dimitry Andric
854034a32c Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6.

PR:		276104
MFC after:	3 days

(cherry picked from commit dfa39133b333f57ca3133bf6c71cd75be4c3e801)
2024-04-23 19:33:06 +02:00
Gordon Bergling
499d4a6094 timerfd.2: Remove a double word
- s/is is/is/

(cherry picked from commit bbef63ec27fdb86814e34c4b4013cd92ba86bc42)
2024-04-23 07:22:46 +02:00
Brooks Davis
a4f6bfe304 libgcc_{eh,s}: restore __*_frame_info symbols post llvm18
The upstream llvm commit 5eb44df1b64d made the addition of these GCC
compatability symbols dependent on build configuration rather than
hardcoded for amd64, i386, and powerpc.  Reenable them.

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

(cherry picked from commit 0b9e3585805e83718c3ebdab923aca51597193cd)
2024-04-20 12:04:35 +02:00
Dimitry Andric
47020df00d libcompiler_rt Makefile.inc: update _Float16/__bf16 checks
Clang supports __bf16 for riscv from version 18.0 onwards, so update the
checks for it. While here, rewrite the checks so they are hopefully more
readable, and also handle gcc a little better.

In addition, define COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_BFLOAT16
when these features should be available, since there are some parts in
compiler-rt that check for these defines.

PR:		276104
MFC after:	1 month

(cherry picked from commit f276adc148433d009d198c2ebccdd3303377e237)
2024-04-20 12:03:26 +02:00
Dimitry Andric
ca40ad0cb4 libllvm: add missed tlbgen headers and sources for BPF target
Noticed by:	vishwin
PR:		276104
MFC after:	1 month

(cherry picked from commit 442d351bd242d14b1c0bb67cd048ac022f2e82ad)
2024-04-20 12:03:25 +02:00
Dimitry Andric
89ef2b34ab libcompiler_rt Makefile.inc: include bsd.compiler.mk to fix build
Apparently libgcc_s has always included libcompiler_rt's Makefile.inc
without first including bsd.compiler.mk, even though Makefile.inc used
COMPILER_TYPE already. It looks like we were just lucky that the
expression was not malformed.

PR:		276104
Reported by:	Herbert J. Skuhra <herbert@gojira.at>
MFC after:	1 month

(cherry picked from commit 4c983a2886877a855ac3a2836b15d80356fbb8d4)
2024-04-20 12:03:25 +02:00
Dimitry Andric
24c9078493 libcompiler_rt Makefile.inc: don't build bfloat16 support for gcc < 13
Older versions of gcc produce "error: unknown type name '__bf16'".

PR:		276104
MFC after:	1 month

(cherry picked from commit 2e226748a961329471f5b51483318b94c8735f34)
2024-04-20 12:03:25 +02:00
Dimitry Andric
329e66dd04 libcompiler_rt Makefile.inc: remove debugging messages
PR:		276104
MFC after:	1 month

(cherry picked from commit d00b9344bb10a9a35b02df33475bec951dfccd78)
2024-04-20 12:03:25 +02:00
Dimitry Andric
c9eafe9796 Merge llvm-project release/18.x llvmorg-18.1.3-0-gc13b7485b879
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.3-0-gc13b7485b879.

PR:		276104
MFC after:	1 month

(cherry picked from commit 439352ac8257c8419cb4a662abb7f260f31f9932)
2024-04-19 23:14:17 +02:00
Dimitry Andric
471f3ba460 Merge llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e.

PR:		276104
MFC after:	1 month

(cherry picked from commit 4c2d3b022a1d543dbbff75a0c53e8d3d7242216d)
2024-04-19 23:14:17 +02:00
Dimitry Andric
8e3e0a4774 Merge llvm-project release/18.x llvmorg-18.1.0-rc3-0-g6c90f8dd5463
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.0-rc3-0-g6c90f8dd5463.

PR:		276104
MFC after:	1 month

(cherry picked from commit 56727255ad47072ec2cc81b4ae728a099697b0e4)
2024-04-19 23:14:16 +02:00
Dimitry Andric
4b8be30b44 Merge llvm-project release/18.x llvmorg-18.1.0-rc2-53-gc7b0a6ecd442
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-53-gc7b0a6ecd442.

PR:		276104
MFC after:	1 month

(cherry picked from commit 74626c16ff489c0d64cf2843dfd522e7c544f3ce)
2024-04-19 23:14:16 +02:00
Dimitry Andric
b9d9368bac Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967.

PR:		276104
MFC after:	1 month

(cherry picked from commit b3edf4467982447620505a28fc82e38a414c07dc)
2024-04-19 23:14:15 +02:00
Dimitry Andric
3f2e8ce1cf Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e.

PR:		276104
MFC after:	1 month

(cherry picked from commit 878ed4957e077721efaf90ab5b70dce86dc94f4b)
2024-04-19 23:14:14 +02:00
Dimitry Andric
a58f00ea91 Merge llvm-project main llvmorg-18-init-18359-g93248729cfae
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
last commit before the upstream release/18.x branch was created.

PR:		276104
MFC after:	1 month

(cherry picked from commit 7a6dacaca14b62ca4b74406814becb87a3fefac0)
2024-04-19 23:14:13 +02:00
Dimitry Andric
6c20abcd56 Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

PR:		276104
MFC after:	1 month

(cherry picked from commit 297eecfb02bb25902531dbb5c3b9a88caf8adf29)
2024-04-19 23:14:12 +02:00
Dimitry Andric
cdc20ff6a7 Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

PR:		276104
MFC after:	1 month

(cherry picked from commit 1db9f3b21e39176dd5b67cf8ac378633b172463e)
2024-04-19 23:14:10 +02:00
Dimitry Andric
de8261c4ac Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

PR:		276104
MFC after:	1 month

(cherry picked from commit 647cbc5de815c5651677bf8582797f716ec7b48d)
2024-04-19 23:13:53 +02:00
Dimitry Andric
e710425beb Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR:		276104
MFC after:	1 month

(cherry picked from commit cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
2024-04-19 23:12:22 +02:00
Dimitry Andric
c9157d925c Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month

(cherry picked from commit 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
2024-04-19 23:12:03 +02:00
Christopher Davidson
ac4ddd8b1f open.2: remove self-reference
Change .Xr reference to .Fn, which quiets a mandoc warning.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit d3de1bd429bc51fbbcb37fadaf2581461edf848b)
2024-04-18 15:18:34 -03:00
Simon J. Gerraty
16d49d0e4f libsecureboot do not report expected unverified files
By default only report unverified files at severity VE_WANT
and above.  This inlcudes *.conf but not *.hints, *.cookie
or *.tgz which get VE_TRY as their severity.

If Verbose is set to 0, then VerifyFlags should default to 0 too.
Thus the combination of

	module_verbose=0
	VE_VEBOSE=0

is sufficient to make the loader almost totally silent.

When verify_prep has to find_manifest and it is verified ok
return VE_NOT_CHECKED to verify_file so that it can skip
repeating verify_fd

Also add better debugging output for is_verified and add_verify_status.

vectx handle compressed modules

When verifying a compressed module (.ko.gz or .ko.bz2)
stat() reports the size as -1 (unknown).
vectx_lseek needs to spot this during closing - and just read until
EOF is hit.

Note: because of the way libsa's open() works, verify_prep will see
the path to be verified as module.ko not module.ko.bz2 etc.  This is
actually ok, because we need a separate module.ko.bz2 entry so that
the package can be verified, and the hash for module.ko is of the
uncompressed file which is what vectx will see.

Re-work local.trust.mk so site.trust.mk need only set
VE_SIGN_URL_LIST (if using the mentioned signing server)

interp.c: restrict interactive input

Apply the same restrictions to interactive input as for
unverified conf and hints files.

Use version.veriexec when LOADER_VERIEXEC is yes

Reviewed by:	kevans
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D43810

(cherry picked from commit f616d61ab6b071e5fbfdbae7033a9ef04c1444ad)
2024-04-16 13:54:22 -06:00