aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* libcasper: fix warnings when _ALIGN preserves typesBrooks Davis3 days1-2/+2
| | | | | | | | | | | Without the void * casts, the compiler complains about an alignment requirement increase. Reviewed by: kib, markj Obtained from: CheriBSD Effort: CHERI upstreaming Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D53946
* get*ent: be consistant about _ALIGN(p) - pBrooks Davis3 days7-13/+21
| | | | | | | | | | | | | Add an nscache specific inline function to calculate the misalignment rather than adding and subtracting _ALIGN(p) and p which can take the buffer far out of bound (undefined behavior in C and unsupported on CHERI). Reviewed by: kib Effort: CHERI upstreaming Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D53945
* libc/string: add strdupa(3) and strndupa(3)Konstantin Belousov5 days2-2/+36
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54066
* libc/string: put source files list one item per lineKonstantin Belousov5 days1-23/+121
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54066
* man typos: Fix pf.conf.5 and jail.2 typosSeth Hoffert5 days1-1/+1
| | | | | | MFC after: 3 days Signed-off-by: Seth Hoffert <seth.hoffert@gmail.com> Closes: https://github.com/freebsd/freebsd-src/pull/1919
* libsysdecode: Use consistent include pathDag-Erling Smørgrav6 days1-1/+1
| | | | | | | | | | | mkioctls should look at the same set of headers as mktables does. MFC after: 1 week Fixes: 139d114acc7b ("libsysdecode use MKTABLES_INCLUDEDIR") Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D54106
* libc/limits_test: add no-op testcase to satisfy kyuaSiva Mahadevan8 days1-1/+4
| | | | | | | | | | | | | This test suite is purely tested with compile-time assertions, so it needs a dummy runtime test to ensure that kyua reports the file as passing. Pull Request: https://github.com/freebsd/freebsd-src/pull/1915 Sponsored by: The FreeBSD Foundation Reviewed by: fuz Approved by: markj (mentor) MFC after: 1 month Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
* pf: convert DIOCRGETASTATS to netlinkKristof Provost8 days1-12/+80
| | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* pfctl: move astats query into libpfctlKristof Provost8 days2-0/+25
| | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* ncurses: readd "bsdpads"Baptiste Daroussin8 days1-1/+1
| | | | | | | | | | | | | During the import of ncurses 6.5 some bsd specifics configuration where lost and reintroduce quickly after the import, unfortunatly there was a typo in this fix which caused the "bsdpads" to not be enabled in ncurses. Fortunatly only very old programs may be affected by this change, unfortunatly Nethack (in the ports tree is one of them.) PR: 287358 MFC After: 3 days
* pmc: add alderlaken modelAnaëlle CAZUC9 days11-0/+1865
| | | | | | | | | | This commit adds alderlaken CPU model to hwpmc/libpmc. JSON event definitions are imported from Intel perfmon version 1.16. Reviewed by: mhorne MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D49229
* pmc: add emerald rapids modelAnaëlle CAZUC9 days14-0/+23297
| | | | | | | | | | This commit adds emerald rapids CPU model to hwpmc/libpmc. JSON event definitions are imported from Intel perfmon version 1.06. Reviewed by: mhorne MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D49228
* libc/stdc_has_single_bit.c: fix gcc warning (-Wparentheses)Robert Clausecker10 days1-5/+5
| | | | | | | | | | | | gcc14 is concerned that the operator precedence between - and & might be confusing. Throw in some redundant parentheses to make it shut up. The LLVM build was fine before this change. Reported by: Martin Filla <freebsd@sysctl.cz> Approved by: markj (mentor) MFC after: 1 month Fixes: 6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64 Differential Revision: https://reviews.freebsd.org/D54057
* libpcap: Fix dependency definitions for libpcapMark Johnston10 days1-0/+1
| | | | | | | | | | | Commit 35dd53a9e132 ("librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping") causes a build failure, since src.libnames.mk declares a depencency on libbnxtre.so, but the libpcap Makefile and prebuild lib dependencies were not updated accordingly. Fix the declarations. Fixes: 35dd53a9e132 ("librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping") Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54048
* ofed: Define SUBDIR_DEPEND_libbnxtreMark Johnston10 days1-0/+1
| | | | Fixes: b42fda6be3fd ("share/mk: Include libbnxtre entry in bsd.libnames.mk")
* share/mk: Include libbnxtre entry in bsd.libnames.mkSumit Saxena10 days1-0/+1
| | | | | | | | Add libbnxtre entry in bsd.libnames.mk file. MFC-After: 3 days Reviewed-by: sumit.saxena@broadcom.com Differential-Revision: https://reviews.freebsd.org/D49603
* libuvmem: provide man page mostly as a pointer to vmem(9)Konstantin Belousov12 days2-0/+73
| | | | | | | Reviewed by: bnovkov, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27220
* libuvmem: usermode port of vmem(9)Konstantin Belousov12 days3-0/+33
| | | | | | | | | | | | The quantum cache is disabled, there is no uma. Intent is to use this for resource allocation in bhyve(8), for start. Addition of -luvmem to bhyve linking was done to test changes to share/mk. Reviewed by: bnovkov, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27220
* libc: Fix TESTSDIR for new stdbit testsJessica Clarke12 days1-0/+2
| | | | | | | | | | Otherwise the directory created by etc/mtree/BSD.tests.dist, which is where these belong, and referred to by the generated Kyuafile for /usr/tests/lib/libc (via stdbit's existence in TESTS_SUBDIRS), ends up empty with no Kyuafile, which is an error for kyua. Reported by: kp Fixes: 2fb8cbc6ef1b ("libc/tests: add stdbit test framework and unit tests")
* man/man3: add cross references to stdbit(3)Robert Clausecker13 days1-0/+2
| | | | | | | | Add cross references to relevant stdbit man pages Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53661
* libc/tests: add stdbit test framework and unit testsRobert Clausecker13 days18-0/+511
| | | | | | | | | | | | This adds unit tests for all 70 functions in <stdbit.h>. I'm sorry for the test framework, but it makes it so I don't have to write 70 unit tests by hand. Reviewed by: adrian, des Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53660
* libc/stdbit: add man pages for stdbit functionsRobert Clausecker13 days15-0/+1283
| | | | | | | | | | | | This adds man pages for each group of functions in <stdbit.h>. The man pages have cross references to one-another. Cross references from external man pages to these will be added in a later commit. Reviewed by: pauamma@gundo.com, kib Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53659
* libc: implement C23 <stdbit.h> functionsRobert Clausecker13 days17-0/+847
| | | | | | | | | | | | | | This new header complies with ISO/IEC 9899:2024 (C23). Contrary to glibc, we do not provide inline definitions in <stdbit.h> as we expect our system compiler to soon recognise these as builtins anyway. Relnotes: yes MFC after: 1 month Reviewed by: adrian Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D53657
* libc/tests: add test for *_MAX, *_MIN, and *_WIDTHRobert Clausecker13 days2-0/+102
| | | | | | | | | | This file checks the correctness of the various _MAX, _MIN, and _WIDTH macros defined for the libc types. It assumes that none of the types have padding bits. Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D53831
* libsys: remove armv6 hackMinsoo Choo2025-11-291-6/+2
| | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
* clang: remove armv6 commentMinsoo Choo2025-11-291-2/+2
| | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
* libc: remove ARMv5/6 from man pageMinsoo Choo2025-11-291-4/+1
| | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
* Remove TableGen objects from libllvm, fixing bad option registrationsDimitry Andric2025-11-281-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | In 986e05bc2a18 I revamped the build for all the llvm subprojects. Among others I added objects under contrib/llvm-project/llvm/lib/TableGen, but I missed that upstream explicitly removes these when building the shared llvm library: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm/tools/llvm-shlib/CMakeLists.txt#L23 In 2e47f35be5dc I converted libllvm to a shared library. From that point onwards, some of the global command line option objects registered in llvm/lib/TableGen/Main.cpp conflict with similar objects in tools like llvm-cov, llvm-as, etc. This results in an error when running these tools: "CommandLine Error: Option 'o' registered more than once!", followed by a fatal exit. Fix this by removing the TableGen objects from libllvm. Note that we no longer install any of the tblgen binaries, these are only used during buildworld, and then in a statically linked form. PR: 291233 MFC after: 3 days
* libsecureboot: do further checks on files without manifestsKa Ho Ng2025-11-271-1/+1
| | | | | | | | | | | verify_prep can return VE_FINGERPRINT_NONE. Consider such scenario so the VE_GEUSS heuristics works with files that likely will not have fingerprints in the manifest file. Obtained from: Hewlett Packard Enterprise Reviewed by: sjg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53940
* strfmon: Fix negative sign handling for C localeJose Luis Duran2025-11-262-4/+4
| | | | | | | | | | | | | | | | | | | If the locale's positive_sign and negative_sign values would both be returned by localeconv() as empty strings, strfmon() shall behave as if the negative_sign value was the string "-". This occurs with the C locale. The implementation previously assigned "0" to sign_posn (parentheses around the entire string); now it assigns it to "1" (sign before the string) when it is undefined (CHAR_MAX). Austin Group Defect 1199[1] is applied, changing the requirements for the '+' and '(' flags. [1]: https://www.austingroupbugs.net/view.php?id=1199 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53913
* strfmon: EINVAL if the '+' flag and both signs are emptyJose Luis Duran2025-11-263-6/+18
| | | | | | | | | | | | | | | | According to the Open Group Base Specifications Issue 8[1], strfmon(3) should return EINVAL when the '+' flag was included in a conversion specification and the locale's positive_sign and negative_sign values would both be returned by localeconv(3) as empty strings. Austin Group Defect 1199[2] is applied, adding the [EINVAL] error. [1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html [2]: https://www.austingroupbugs.net/view.php?id=1199 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53912
* strfmon: Add tests for Austin Group Defect 1199Jose Luis Duran2025-11-261-23/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for The Open Group Base Specifications Issue 8[1], Austin Group Defect 1199[2]. Items marked with XXX represent an invalid output. These items will be fixed in subsequent commits. Notice that an existing test is now considered invalid. Our locale definitions do not include int_p_sep_by_space nor int_n_sep_by_space[3]. Those will be addressed in a subsequent commit. However, the CLDR project defines them as "0", which causes the output to appear as "USD123.45". If our locale definitions were to set the international {n,p}_sep_by_space to "1", the output would display as the expected "USD 123.45". While here, use the SPDX license identifier and add my name to the file. [1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html [2]: https://www.austingroupbugs.net/view.php?id=1199 [3]: https://unicode-org.atlassian.net/browse/CLDR-237 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53911
* libc: Simplify __get_locale()Dag-Erling Smørgrav2025-11-261-4/+2
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: fuz Differential Revision: https://reviews.freebsd.org/D53908
* strfmon: Fix typo s/poistion/position/Jose Luis Duran2025-11-261-1/+1
| | | | MFC after: 1 week
* jemalloc: apply freebsd changes to jemalloc 5.3.0 man pageMinsoo Choo2025-11-251-1/+31
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890
* jemalloc: import jemalloc 5.3.0 man pageMinsoo Choo2025-11-251-52/+180
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1890
* lseek.2: SEEK_HOLE, SEEK_DATA & ENXIO conform to POSIX 2024Ricardo Branco2025-11-251-1/+2
| | | | | | Signed-off-by: Ricardo Branco <rbranco@suse.de> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1891
* libefivar: Apply uncrustify changesJose Luis Duran2025-11-251-50/+52
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Note that the link above no longer exists. The commit message was kept verbatim. An original copy of the bug report can be found at: https://web.archive.org/web/20241008121707/https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Obtained from: https://github.com/tianocore/edk2/commit/2f88bd3a1296c522317f1c21377876de63de5be7 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Change OPTIONAL keyword usage styleJose Luis Duran2025-11-251-5/+5
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Note that the link above no longer exists. The commit message was kept verbatim. An archive of the bug report can be found at: https://web.archive.org/web/20240714185609/https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Obtained from: https://github.com/tianocore/edk2/commit/d0e2f8232a26453fc0191629ed44ff2a46ea073e Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Support UefiDevicePathLib under StandaloneMmJose Luis Duran2025-11-251-33/+0
| | | | | | | | | | | | | | | This change added an instance of UefiDevicePathLib for StandaloneMm. It abstracts DevicePathFromHandle function into different files for Standalone MM and other instances to avoid linking gBS into MM_STANDALONE drivers. No functional change intended, as this function and its invocation are ifdefd out. Obtained from: https://github.com/tianocore/edk2/commit/14a746bb6a92d59669c67a970479558734cf2383 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Replace BSD License with BSD+Patent LicenseJose Luis Duran2025-11-251-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Note that the link above no longer exists. The commit message was kept verbatim. An archive of the bug report can be found at: https://web.archive.org/web/20240714192319/https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Obtained from: https://github.com/tianocore/edk2/commit/9344f0921518309295da89c221d10cbead8531aa Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Add sanity check for FilePath device pathJose Luis Duran2025-11-251-1/+10
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497 Current implementation of IsDevicePathValid() is not enough for type of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device path. This patch add a simple NULL character check at Length position. Note that the link above no longer exists. The commit message was kept verbatim. An archived version of the bug report can be found at: https://web.archive.org/web/20240714191428/https://bugzilla.tianocore.org/show_bug.cgi?id=1497 Add the const keyword to avoid errors/warnings about dropping a const qualifier. Obtained from: https://github.com/tianocore/edk2/commit/2f7a96d6ec13b292d6f31295f3195913921173e1 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Add a checking stepJose Luis Duran2025-11-251-10/+9
| | | | | | | | | | | | | | | | | Add a checking step in DevicePathUtilities.c to verify DevicePath. https://bugzilla.tianocore.org/show_bug.cgi?id=1372 v2: Remove ASSERT() and the redundant checking step. Update related description. Note that the link above no longer exists. The commit message was kept verbatim. An archived version of the bug report can be found at: https://web.archive.org/web/20240714192353/bugzilla.tianocore.org/show_bug.cgi?id=1372 Obtained from: https://github.com/tianocore/edk2/commit/fd02394228ee1dc2378cccfde6098c461f96dd42 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: MdePkg: Clean up source filesJose Luis Duran2025-11-251-38/+38
| | | | | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF No functional change. Obtained from: https://github.com/tianocore/edk2/commit/9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Add and comment out unused functionsJose Luis Duran2025-11-251-2/+320
| | | | | | | | | | | This commit introduces gratuitous white space and unused functions. This functionality is guarded/commented out. This change is necessary to reduce the differences with the reference file in subsequent commits. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Move functions to match reference fileJose Luis Duran2025-11-251-101/+99
| | | | | | | | Move a few functions to match their locations in the reference file. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Standardize #ifndef __FreeBSD__Jose Luis Duran2025-11-252-3/+1
| | | | | | | | | | Standardize preprocessor directives that comment out unused functions (essentially #if 0). No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libefivar: Fix (some) typosJose Luis Duran2025-11-254-8/+8
| | | | | | | | | | | | | | | Fix typos in the files that are owned by the project. Bring back a "duplicate word" removal (node node), which should have been "node Node", the second "node" is not capitalized in the reference file (yet). We'll bring it back capitalized to avoid it from triggering automated checking scripts and possibly reverting this change again. A few other typos were not fixed, as we strive to keep as close to the reference files as possible, these fixes should be submitted to the reference project (tianocore/edk2) in the not so distant future. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
* libpfctl: improve error handlingKristof Provost2025-11-251-2/+2
| | | | | | | | If we fail to open /dev/pf don't try to close it again. That would result in errno getting overwritten by close(), hiding potentially useful information. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate")
* Use ZFSTOP more broadlyJohn Baldwin2025-11-244-16/+15
| | | | | | Reviewed by: brooks Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D53791