Commit Graph

22379 Commits

Author SHA1 Message Date
Michael Tuexen
dd718119f2 sctp: document sctp_recvmsg as implemented
PR:		275990

(cherry picked from commit eee88ef45f)
2024-08-01 22:52:09 +02:00
Michal Meloun
8ca43e674e gdtoa: Regenerate configuration headers for 32-bit arm.
These configuration headers were only guessed, but unfortunately not exactly
correctly. Therefore, re-generate them on real HW.

Generated on CA15, verified on CA9, CA7(with VFP lite) and on 32-bit ARMv9.

PR:	272229
Reported by:	Robert Clausecker <fuz@FreeBSD.org>
MFC after:	2 weeks

(cherry picked from commit e59b6e48f4)
2024-07-31 14:25:35 +02:00
Michal Meloun
30863065e5 libthr: Preresolve selected EABI symbols on arm.
Add the ability to pre-resolve architecture-specific EABI symbols and
use it on arm for selected EABI functions. These functions can be called
with rtld bind lock write-locked, so they should be resolved in forward.

Reported by:	Mark Millard <marklmi@yahoo.com>, John F Carr <jfc@mit.edu>
Reviewed by:	kib, imp
MFC after:	1 week
Differential Revision:  https://reviews.freebsd.org/D46104

(cherry picked from commit 5670b8cc36)
2024-07-31 14:03:39 +02:00
Gordon Bergling
9242934b6f erf.3: Add a STANDARDS section
Add a STANDARDS section for the erf(3) manual page.

PR:	273413
Reviewed by:	pauamma_gundo.com
Differential Revision:	https://reviews.freebsd.org/D44140

(cherry picked from commit 16c3d7e1fa)
2024-06-30 07:31:52 +02:00
Alan Somers
51bee6ab65 geli.8: minor proofreading
Sponsored by:	Axcient
Reviewed by:	imp, pauamma (manpages)
Differential Revision: https://reviews.freebsd.org/D44907

(cherry picked from commit c0f02dcd4c)
2024-06-28 12:49:18 -06:00
Mariusz Zaborski
c7bb7a2333 libcapsicum: cache more time zone information
The functions like gmtime(3) expect to cache a GMT time zone. Some
sandboxed programs (like last(1)) use the gmtime(3) function.
In case of last(1), this function fails to load a proper time zone
because it is called after entering the capability mode.

_open () at _open.S:4
0x00000008011bc5a8 in tzloadbody (name=0x8018b9580 "/usr/share/zoneinfo/Etc/UTC", sp=0x801870140,
tzload (name=<optimized out>, sp=0x801870140, doextend=true)
0x00000008011bb8ba in gmtload (sp=0x801870140) at /usr/src/contrib/tzcode/localtime.c:1456
gmtcheck () at /usr/src/contrib/tzcode/localtime.c:1581
0x000000080111f85a in _libc_once (once_control=0x80127c550, init_routine=0x0)
_once (once_control=0x80127c550, init_routine=0x0) at /usr/src/lib/libc/gen/_once_stub.c:63
0x00000008011bb9d0 in gmtime_r (timep=0x7fffffffe3a8, tmp=0x80127c568)
gmtime (timep=timep@entry=0x7fffffffe3a8) at /usr/src/contrib/tzcode/localtime.c:1865
0x0000000001024cd4 in printentry (bp=bp@entry=0x8018b4800, tt=tt@entry=0x80186a0a0)
0x00000000010245ae in doentry (bp=0x8018b4800)
0x00000000010243a7 in main (argc=1, argv=<optimized out>)

This time zone is not loaded by the tzset(3) function. Because of
that, extend the caph_cache_tzdata(3) function to also include the
GMT time zone. There is no other way to cache this data than
calling gmtime(3) once.

MFC after:	5 days
Reviewed by:	emaste, markj
Differential Revision:	https://reviews.freebsd.org/D45297

(cherry picked from commit e24ff5c99b)
2024-06-28 12:19:56 +02:00
Baptiste Daroussin
798c7248e7 libarchive: fix thread autodetermination for zstd compression format
The libarchive code uses sysconf(3) to determine the number of threads
when 0 has been given as the number of thread to use

MFC after:	3 days

(cherry picked from commit a25e0ba57e)
2024-06-27 10:54:04 +02:00
Andreas Kempe
b1e82630b4 libusbhid: add missing include guards
PR:		265136

(cherry picked from commit 230efeda08)
(cherry picked from commit 7f0392e1c8)
2024-06-09 13:02:41 -04:00
Ed Maste
4010c267a5 libc: move NIS xdr_* symbols from rpc's to yp's Symbol.map
To fix WITHOUT_NIS build.  Building yp_xdr.c is gated by MK_NIS.

PR:		279270
Reported by:	peterj
Reported by:	matteo
Reported by:	Michael Dexter's Build Option Survey run
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45347

(cherry picked from commit 61639bb3fc)
(cherry picked from commit 1e3dfe0c34)
2024-05-29 11:42:17 -04:00
Dimitry Andric
70be2f0deb Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67.

PR:		276104
MFC after:	3 days

(cherry picked from commit 3a0793336e)
2024-05-28 07:26:45 +02:00
Dag-Erling Smørgrav
55cd52a441 access(2): Discourage use of these system calls.
Fixes:		421025a274
PR:		262895
MFC after:	3 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D45240

(cherry picked from commit a4be1eb211)
2024-05-23 04:43:49 +02:00
Gordon Bergling
78ea1fcf29 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 421025a274)
2024-05-23 04:43:49 +02:00
Brooks Davis
364133901a msun/riscv: expose fe{disable,enable}except
This is required for GCC to build.

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

(cherry picked from commit 1947a9383e)
2024-05-20 23:26:02 +01:00
Kristof Provost
75a94658d3 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 a3f7176523)
2024-05-13 17:41:05 +02:00
Ed Maste
eca3db908c clock_gettime.2: fix markup
The CLOCK_* constants are "defined variable or preprocessor constants"
and so use .Dv.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45106

(cherry picked from commit 2d29d2eceb)
(cherry picked from commit 0e0220d11a)
2024-05-13 10:27:19 -04:00
Mateusz Piotrowski
c595a834eb clock_gettime.2: Clarify CLOCK_*
Clarify that CLOCK_* (e.g., CLOCK_REALTIME) do not necessarily default
to CLOCK_*_FAST.

PR:		259642
(cherry picked from commit 16e4487e5f)
2024-05-13 10:26:10 -04:00
Ed Maste
3c05a91910 dlopen(3): mention fdlopen for capsicum(4)
Capsicum-sandboxed applications generally cannot use dlopen, as absolute
and cwd-relative paths cannot be accessed.  Mention that fdlopen is
useful for sandboxed applications.

PR:		277169
Reviewed by:	markj, oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45108

(cherry picked from commit d84fd89ecd)
(cherry picked from commit f2109683ce)
2024-05-13 10:24:57 -04:00
Konstantin Belousov
5cf78a5500 __cxa_thread_call_dtors(3): fix dtor pointer validity check
PR:	278701

(cherry picked from commit b27eb9ce96)
2024-05-10 10:49:36 +03:00
Dimitry Andric
e5e6242f62 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
MFC after:	3 days

(cherry picked from commit 6f44401900)
2024-05-07 19:04:30 +02:00
Dimitry Andric
3c6fe83671 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
Fixes:		d67fc74b9249
MFC after:	3 days

(cherry picked from commit 894cb08f0d)
2024-05-07 19:04:27 +02:00
Mateusz Piotrowski
64f6c5fd9b gettimeofday.2: Do mention improbable future removal
As kib@ noted:

> Obviously gettimeofday(2) is not going to be removed
> even in the far future.

Reported by:	kib
Fixes:		4395d3ced5 Document that gettimeofday() is obsolescent
MFC after:	3 days

(cherry picked from commit 6662c2312e)
2024-05-04 15:06:55 +02:00
Mateusz Piotrowski
f7659ab235 Document that gettimeofday() is obsolescent
Reported by:	kaktus
Reviewed by:	kaktus, pstef
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D23942

(cherry picked from commit 4395d3ced5)
2024-05-04 15:06:40 +02:00
Martin Matuska
3a77c21a25 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

PR:	278662 (exp-run)

(cherry picked from commit 13d826ff94)
2024-05-04 13:54:42 +02:00
Martin Matuska
43a6a8b077 libarchive: add two missing package files to libarchive tests
(cherry picked from commit 7d03ec3306)
2024-05-04 13:53:07 +02:00
Martin Matuska
aa2aad0492 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 b9128a37fa)
2024-05-04 13:53:07 +02:00
Martin Matuska
2772835855 unzip: swtich to bsdunzip from libarchive
Unzip from FreeBSD has been ported to libarchive.
Change usr.bin/unzip to use bsdunzip from libarchive.

Differential Revision:	https://reviews.freebsd.org/D41239
PR:			272845 (exp-run)

(cherry picked from commit b5a3a89c50)
2024-05-04 13:53:07 +02:00
Martin Matuska
cd09ca5e71 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

(cherry picked from commit e64fe029e9)
2024-05-04 13:53:07 +02:00
Pierre Pronchery
d2291dbb3c 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

(cherry picked from commit e23d45187b)
2024-05-04 13:53:07 +02:00
Pierre Pronchery
9377240725 libarchive: Request the OpenSSL 1.1 API
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future update should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 5a7500dab9)
2024-05-04 13:53:07 +02:00
John Baldwin
ffd190f223 libarchive: Remove MIPS build glue.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39329

(cherry picked from commit f40b617e15)
2024-05-04 13:53:07 +02:00
Jessica Clarke
89342dba7d 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 d8c84215d7)
2024-05-02 21:11:52 +01:00
Alex Richardson
f16e205c6f 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 60e845ceef)
2024-05-02 21:11:52 +01:00
Dag-Erling Smørgrav
3f59eb3141 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 c28253ecde)
2024-05-02 11:08:36 +02:00
Konstantin Belousov
509819691c libc_private.h: use private namespace name for size_t
This is direct commit to stable/13.

(cherry picked from commit a951992d1e)
2024-04-30 04:15:47 +03:00
Konstantin Belousov
f0e8600d71 libc printf_render_errno(): do not use strerror()
(cherry picked from commit aa66995b4c)
2024-04-30 03:49:53 +03:00
Konstantin Belousov
fcac864ee1 libc: minor style, wrap long lines
(cherry picked from commit bac9d7e8f2)
2024-04-30 03:49:53 +03:00
Konstantin Belousov
27e54c9f16 __vprintf(): switch from strerror() to strerror_rl()
PR:	278556

(cherry picked from commit f887667694)
2024-04-30 03:49:53 +03:00
Konstantin Belousov
a8ae94b9e2 libc: make strerror_rl() usable for libc
(cherry picked from commit 92771bc00a)
2024-04-30 03:49:52 +03:00
Alexander Motin
a36b9f2442 libpmc: Import AMD Zen 4 PMU events
MFC after:	1 week

(cherry picked from commit 278d695094)
2024-04-26 23:02:51 -04:00
Dimitry Andric
7929070fb7 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 dfa39133b3)
2024-04-23 19:33:14 +02:00
Brooks Davis
82d22a88c3 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 0b9e358580)
2024-04-20 12:29:10 +02:00
Dimitry Andric
50fd2fbec9 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 f276adc148)
2024-04-20 12:29:10 +02:00
Dimitry Andric
3f0f6c9806 libllvm: add missed tlbgen headers and sources for BPF target
Noticed by:	vishwin
PR:		276104
MFC after:	1 month

(cherry picked from commit 442d351bd2)
2024-04-20 12:29:09 +02:00
Dimitry Andric
7334d08a3a 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 4c983a2886)
2024-04-20 12:29:09 +02:00
Dimitry Andric
e2e4022725 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 2e226748a9)
2024-04-20 12:29:09 +02:00
Dimitry Andric
5018444b28 libcompiler_rt Makefile.inc: remove debugging messages
PR:		276104
MFC after:	1 month

(cherry picked from commit d00b9344bb)
2024-04-20 12:29:09 +02:00
Dimitry Andric
3a287a03cf 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 439352ac82)
2024-04-19 23:24:48 +02:00
Dimitry Andric
b09953d54d 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 4c2d3b022a)
2024-04-19 23:24:47 +02:00
Dimitry Andric
7032a43521 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 56727255ad)
2024-04-19 23:24:47 +02:00
Dimitry Andric
c80674ff65 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 74626c16ff)
2024-04-19 23:24:47 +02:00