aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* gettimeofday.2: Do mention improbable future removalMateusz Piotrowski2024-04-281-5/+3
| | | | | | | | | | | As kib@ noted: > Obviously gettimeofday(2) is not going to be removed > even in the far future. Reported by: kib Fixes: 4395d3ced5cf Document that gettimeofday() is obsolescent MFC after: 3 days
* Skip building libclang_rt when WITHOUT_CLANG is usedDimitry Andric2024-04-251-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Document that gettimeofday() is obsolescentMateusz Piotrowski2024-04-251-1/+24
| | | | | | | Reported by: kaktus Reviewed by: kaktus, pstef MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23942
* syscalls.master: correct return type of {read,write}vBrooks Davis2024-04-241-4/+4
| | | | | | | | | This was missed when read/write, etc were updated to return ssize_t. Fixes: 2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D44930
* geli.8: add some notes regarding performance tuningAlan Somers2024-04-241-1/+41
| | | | | | | MFC after: 1 week Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44908
* pow,powf(3),__ieee754_rem_pio2(f): Avoid negative integer left shift UBKarl Tomlinson2024-04-234-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compiler clever enough to know that z is positive with a non-zero biased exponent could, for example, optimize away the scalbnf(z,n) in pow() because behavior for left shift of negative values is undefined. `n` is negative when y*log2(|x|) < -0.5. i.e. |x^y| < sqrt(0.5) The intended behavior for operator<< in this code is to shift the two's complement representation of the first operand. In the pow() functions, the result is added to the IEEE 754 exponent of z = 2^y'. n may be negative enough to underflow the biased IEEE 754 exponent below zero, which is manifested in the sign bit of j (which would correspond to the IEEE 754 sign bit). The conversion from uint32_t to int32_t for out-of-int32_t-range values is implementation defined. The assumed behavior of interpreting the uint32_t value as a two's complement representation of a signed value is already assumed in many parts of the code, such as uses of GET_FLOAT_WORD() with signed integers. This code passes all the current tests, and makes some out of tree fuzzing tests pass again rather than hit UB (detailed in the commentary of the pull request). Signed-off-by: Karl Tomlinson <karlt+@karlt.net> Reviewed by: imp, steve kargl, dim Pull Request: https://github.com/freebsd/freebsd-src/pull/1137
* libc printf_render_errno(): do not use strerror()Konstantin Belousov2024-04-231-3/+4
| | | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916
* libc: minor style, wrap long linesKonstantin Belousov2024-04-231-2/+4
| | | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916
* __vprintf(): switch from strerror() to strerror_rl()Konstantin Belousov2024-04-231-1/+5
| | | | | | | | | | | | | | | This eliminates the use of non-thread-safe function in printf*() family, and make the call locale-aware. Also, it stops obliterating the strerror() static buffer, which aligns with the POSIX requirement that implementations must behave as if no standard-mandated functions call strerror(). PR: 278556 Reported by: Jonathan Gruber <jonathan.gruber.jg@gmail.com> Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916
* libc: make strerror_rl() usable for libcKonstantin Belousov2024-04-232-5/+7
| | | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916
* Add test for pthread_sigqueue(3)Konstantin Belousov2024-04-232-0/+121
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867
* libthr: add pthread_sigqueue(3)Konstantin Belousov2024-04-234-0/+85
| | | | | | | | PR: 278459 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867
* sigqueue(2): Document __SIGQUEUE_TIDKonstantin Belousov2024-04-231-1/+18
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867
* Update manual page references and macros to align to mandoc syntaxChristopher Davidson2024-04-231-4/+4
| | | | | | | | | | | | | | | | xlocale.3: Comment out reference to atof_l(3), atoi_l(3), atol_l(3), atoll_l(3) These manual page references do not exist. lagg.4: Change the reference for /etc/rc.conf from a reference link .Xr -> .Pa based on the context within the manual page it is used. buf.9: Remove .Xr entries from the file The buf.9 manual page contains a commented out .Xr reference. The <filmmein> 9 entry is a placeholder and has been removed for clarity. Reviewed by: mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/1114
* swab.c(libc): use a simplified version of byte swappingrilysh2024-04-231-47/+11
| | | | | | | | | | | | | | This version of swab function simplifies the logic of swapping adjacent bytes. Previous version of swab() used an arbitrary unrolling, which was relevant back in the day but unnecessary for modern compilers, as if the input size is known at compile time, they can do it automatically. This version of swab() is inspired by musl. A similar version can be found at: https://github.com/openbsd/src/blob/master/lib/libc/string/swab.c Signed-off-by: rilysh <nightquick@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1086
* package: move cron into its own packageLexi Winter2024-04-231-1/+4
| | | | | Reviewed by: imp, manu, Mina Galic Pull Request: https://github.com/freebsd/freebsd-src/pull/1172
* libipsec: make const-correctLexi Winter2024-04-234-16/+16
| | | | | | | | | | | | | | | | | | | - add const to the appropriate places in the libipsec public API and the relevant internal functions needed to support that. - replace caddr_t with c_caddr_t in ipsec_dump_policy() - update the ipsec_dump_policy manpage to use c_caddr_t (this manpage was already wrong as it had "char *" instead of caddr_t previously). While here, update pfkeyv2.h to not cast away const in the PFKEY_*() macros. This should not cause any ABI changes as the actual types have not changed. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1099
* geli.8: minor proofreadingAlan Somers2024-04-221-3/+3
| | | | | | | MFC after: 3 days Sponsored by: Axcient Reviewed by: imp, pauamma (manpages) Differential Revision: https://reviews.freebsd.org/D44907
* libcxxrt: align more with libc/MakefileBrooks Davis2024-04-221-2/+2
| | | | | | Use src.opts.mk instead of bsd.own.mk and define PACKAGE first. Fixes: da77a1b4f0dff libcxxrt: don't export nonexistant symbols
* libsys/arm: make vfork less of an outlierBrooks Davis2024-04-221-2/+6
| | | | | | | | Following the pattern of other architectures, make __sys_vfork the main symbol and _vfork and vfork weak aliases. This avoids the need to special case vfork in the generated list of symbols. Differential Revision: https://reviews.freebsd.org/D44330
* Make __libsys_interposing_slot libsys onlyBrooks Davis2024-04-224-3/+5
| | | | | Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44881
* libthr: always use __libc_interposing_slot()Brooks Davis2024-04-221-1/+1
| | | | | | | | | Use __libc_interposing_slot() in favor of __libsys_interposing_slot() so that the interposing interface is entierly between libc and libthr with libsys only involved as an implementation detail. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44880
* libcxxrt: define SHLIBDIR before including bsd.own.mkDimitry Andric2024-04-221-1/+2
| | | | | | | | | | Otherwise bsd.own.mk overrides it, causing libcxxrt.so.1 to be erroneously installed into /usr/lib. Also add an ObsoleteFiles.inc entry, for removing the bad copy. Reported by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Fixes: da77a1b4f0df
* libpmc: Import AMD Zen 4 PMU eventsAlexander Motin2024-04-2011-1/+3871
| | | | MFC after: 1 week
* Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6Dimitry Andric2024-04-207-15/+15
| | | | | | | | 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
* timerfd.2: Remove a double wordGordon Bergling2024-04-201-1/+1
| | | | | | - s/is is/is/ MFC after: 3 days
* glabel: Remove support for old reiserfsRicardo Branco2024-04-191-4/+1
| | | | | Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1101
* intro.2: Integrate introduction with state of pageAlexander Ziaee2024-04-191-2/+6
| | | | | Reviewed by: imp, brooks Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
* intro.2: Section RETURN VALUES is actually ERRORSAlexander Ziaee2024-04-191-281/+281
| | | | | Reviewed by: imp, brooks Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
* intro.2: Add FILES mentioning table of syscallsAlexander Ziaee2024-04-191-0/+5
| | | | | Reviewed by: imp, brooks Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
* intro.2: Tweak grammar and syntax for consistencyAlexander Ziaee2024-04-191-123/+101
| | | | | Reviewed by: imp, brooks Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
* intro.2: Import HISTORY from OpenBSD but our styleAlexander Ziaee2024-04-191-1/+6
| | | | | Reviewed by: imp, brooks Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
* libc/quad: further narrow list of i386 symbolsBrooks Davis2024-04-191-4/+4
| | | | | | | | | It's unclear to me why lld didn't complain about these are they aren't present and haven't been. Instead ld.bfd complained. Reviewed by: dim Fixes: 6e6cd03c911c libc/quad: narrow list of symbols exposed on i386 Differential Revision: https://reviews.freebsd.org/D44879
* libgcc_s: expose __divmoddi4 on i386Brooks Davis2024-04-192-0/+9
| | | | | | | | | | | | 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
* libgcc_{eh,s}: restore __*_frame_info symbols post llvm18Brooks Davis2024-04-191-0/+3
| | | | | | | | | 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
* Revert "lib{c,sys}: normalize export of openat, setcontext, and swapcontext"Brooks Davis2024-04-194-4/+3
| | | | | | | | | I put the symbols in the wrong file (should have been lib/libc/sys/Symbol.map), added a duplicate pdfork entry due to a botch rebase, and there seems to be a issue with gcc13/binutils not exposing the symbols so revert the whole thing while I debug. This reverts commit ee632fb9eb4a060a4087a7f5425bfe36e65cda61.
* lib{c,sys}: normalize export of openat, setcontext, and swapcontextBrooks Davis2024-04-174-3/+4
| | | | | | | | | List them in the symbol map rather than using the __sym_default to expose them. This will allow later improvements in the stub implementations in libc.so. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44113
* libsys: expose a few more symbols for libc's useBrooks Davis2024-04-171-0/+9
| | | | | | | | These private symbols are used by libc so expose as we do with auxargs bits rather then relying on duplicate implementations in libc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44114
* libcompiler_rt Makefile.inc: update _Float16/__bf16 checksDimitry Andric2024-04-171-5/+28
| | | | | | | | | | | | | 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
* libarchive: add two missing package files to libarchive testsMartin Matuska2024-04-171-0/+2
| | | | MFC after: 1 week
* libarchive: merge from vendor branchMartin Matuska2024-04-162-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 PR: 278315 (exp-run) MFC after: 1 week
* libc/arm: export __signalcontext not _signalcontextBrooks Davis2024-04-161-1/+1
| | | | | | | The former exists and architectures other than aarch64 and riscv provide it. The later does not exist. Differential Revision: https://reviews.freebsd.org/D44329
* libcxxrt: don't export nonexistant symbolsBrooks Davis2024-04-163-43/+384
| | | | | | | | | | | | | Remove version entries that we don't build. Add an arm specific Version.map and for other targets run the files through sed to handle int vs long in new and delete. Ideally we'd use the SYMBOL_MAPS functionality to preprocess with cpp, but it doesn't currently handle C++ symbols so be annoyingly duplicative for now. Differential Revision: https://reviews.freebsd.org/D44325
* libgcc_s: exclude symbols not present on some archesBrooks Davis2024-04-161-0/+24
| | | | | | | arm, aarch64, and riscv lack some/all frame_info interfaces. arm and powerpc lack some numeric functions. Differential Revision: https://reviews.freebsd.org/D44324
* libgcc_s: only export 128-bit int APIs when availableBrooks Davis2024-04-161-26/+41
| | | | | | | | | These interfaces are only compiled when the platform supports 128-bit ints. Use a CRT_HAS_128BIT guard similar to the one used in the compiler_rt sources. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D44323
* libgcc_s: only export 128-bit long double when availableBrooks Davis2024-04-161-0/+2
| | | | | | | These functions are only available on aarch64 and riscv so only try to export them on those architectures. Differential Revision: https://reviews.freebsd.org/D44322
* librpcsec_gss: don't export non-existant symbolsBrooks Davis2024-04-161-3/+0
| | | | | | | | | | rpc_gss_mesh_to_oid was never implemented. This doesn't seem to be any reason why we would need to export the _stub functions, but it's also a little unclear to me why the linker thinks they aren't present. Perhaps they should be static. Differential Revision: https://reviews.freebsd.org/D44248
* libc: don't try to export __sFBrooks Davis2024-04-161-1/+0
| | | | | | This symbol has been static since 2008 (commit 1e98f88776fc). Differential Revision: https://reviews.freebsd.org/D44188
* libc: don't try to export _nsdbtdumpBrooks Davis2024-04-161-1/+0
| | | | | | | It is only present when compiling nsdispatch.c with -D_NSS_DEBUG and we provide no mechanism to do so. Differential Revision: https://reviews.freebsd.org/D44187
* libc: don't try to export mexitcountBrooks Davis2024-04-161-1/+0
| | | | | | | This requires that mcount.c be compiled with -DGUPROF and we provide no mechanism to do so. Differential Revision: https://reviews.freebsd.org/D44186