Commit Graph

25680 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav c51876a107 libsysdecode: Use consistent include path
mkioctls should look at the same set of headers as mktables does.

MFC after:	1 week
Fixes:          139d114acc ("libsysdecode use MKTABLES_INCLUDEDIR")
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D54106
2025-12-07 14:06:41 +01:00
Siva Mahadevan 27ff0bbcfd libc/limits_test: add no-op testcase to satisfy kyua
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>
2025-12-05 15:12:46 +01:00
Kristof Provost 08f54dfca1 pf: convert DIOCRGETASTATS to netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-12-05 13:24:52 +01:00
Kristof Provost 4aa79010bc pfctl: move astats query into libpfctl
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-12-05 13:24:51 +01:00
Baptiste Daroussin 836a0d4632 ncurses: readd "bsdpads"
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
2025-12-05 11:24:58 +01:00
Anaëlle CAZUC ca3e47b0ea pmc: add alderlaken model
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
2025-12-04 14:01:05 -04:00
Anaëlle CAZUC 51a01f3deb pmc: add emerald rapids model
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
2025-12-04 14:01:00 -04:00
Robert Clausecker 3d71ce92ea libc/stdc_has_single_bit.c: fix gcc warning (-Wparentheses)
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:		6296500a85
Differential Revision:	https://reviews.freebsd.org/D54057
2025-12-03 21:02:06 +01:00
Mark Johnston 73e8fe6246 libpcap: Fix dependency definitions for libpcap
Commit 35dd53a9e1 ("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:	35dd53a9e1 ("librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping")
Reviewed by:	ssaxena
Differential Revision:	https://reviews.freebsd.org/D54048
2025-12-03 14:33:53 +00:00
Mark Johnston 962ad7c198 ofed: Define SUBDIR_DEPEND_libbnxtre
Fixes:	b42fda6be3 ("share/mk: Include libbnxtre entry in bsd.libnames.mk")
2025-12-03 14:21:07 +00:00
Sumit Saxena b42fda6be3 share/mk: Include libbnxtre entry in bsd.libnames.mk
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
2025-12-03 11:33:40 +00:00
Konstantin Belousov 7295aeaf5f libuvmem: provide man page mostly as a pointer to vmem(9)
Reviewed by:	bnovkov, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27220
2025-12-02 05:41:13 +02:00
Konstantin Belousov 1ecf01065b libuvmem: usermode port of vmem(9)
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
2025-12-02 05:41:13 +02:00
Jessica Clarke 5f529f9e29 libc: Fix TESTSDIR for new stdbit tests
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:		2fb8cbc6ef ("libc/tests: add stdbit test framework and unit tests")
2025-12-01 14:06:21 +00:00
Robert Clausecker 5bfdb66ad9 man/man3: add cross references to stdbit(3)
Add cross references to relevant stdbit man pages

Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D53661
2025-11-30 20:21:52 +01:00
Robert Clausecker 2fb8cbc6ef libc/tests: add stdbit test framework and unit tests
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
2025-11-30 20:21:52 +01:00
Robert Clausecker d790b16bbf libc/stdbit: add man pages for stdbit functions
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
2025-11-30 20:21:52 +01:00
Robert Clausecker 6296500a85 libc: implement C23 <stdbit.h> functions
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
2025-11-30 20:21:52 +01:00
Robert Clausecker 4a1c7529c9 libc/tests: add test for *_MAX, *_MIN, and *_WIDTH
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
2025-11-30 20:21:51 +01:00
Minsoo Choo 57c0a337db libsys: remove armv6 hack
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 23:07:12 -07:00
Minsoo Choo f3607f5a7f clang: remove armv6 comment
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 23:07:12 -07:00
Minsoo Choo 53da09369c libc: remove ARMv5/6 from man page
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:38 -07:00
Dimitry Andric 9978553d01 Remove TableGen objects from libllvm, fixing bad option registrations
In 986e05bc2a 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 2e47f35be5 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
2025-11-28 19:14:15 +01:00
Ka Ho Ng 52c0749723 libsecureboot: do further checks on files without manifests
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
2025-11-26 21:18:23 -05:00
Jose Luis Duran cf85e7034a strfmon: Fix negative sign handling for C locale
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
2025-11-26 20:34:56 +00:00
Jose Luis Duran 1fd018972a strfmon: EINVAL if the '+' flag and both signs are empty
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
2025-11-26 20:34:55 +00:00
Jose Luis Duran 19e153004f strfmon: Add tests for Austin Group Defect 1199
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
2025-11-26 20:34:55 +00:00
Dag-Erling Smørgrav 5af240c54b libc: Simplify __get_locale()
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	fuz
Differential Revision:	https://reviews.freebsd.org/D53908
2025-11-26 17:56:42 +01:00
Jose Luis Duran 91e7f19ec4 strfmon: Fix typo s/poistion/position/
MFC after:	1 week
2025-11-26 02:50:49 +00:00
Minsoo Choo 80ec82aba9 jemalloc: apply freebsd changes to jemalloc 5.3.0 man page
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1890
2025-11-25 11:17:26 -07:00
Minsoo Choo bf4c7487f2 jemalloc: import jemalloc 5.3.0 man page
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1890
2025-11-25 11:17:26 -07:00
Ricardo Branco 51f278e685 lseek.2: SEEK_HOLE, SEEK_DATA & ENXIO conform to POSIX 2024
Signed-off-by: Ricardo Branco <rbranco@suse.de>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1891
2025-11-25 11:17:26 -07:00
Jose Luis Duran 8494a3de2c libefivar: Apply uncrustify changes
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
2025-11-25 11:17:25 -07:00
Jose Luis Duran ca6fef2d4b libefivar: Change OPTIONAL keyword usage style
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
2025-11-25 11:17:25 -07:00
Jose Luis Duran 6fa0057f89 libefivar: Support UefiDevicePathLib under StandaloneMm
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
2025-11-25 11:17:25 -07:00
Jose Luis Duran 136ff605bf libefivar: Replace BSD License with BSD+Patent License
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
2025-11-25 11:17:25 -07:00
Jose Luis Duran 5c2ae0a209 libefivar: Add sanity check for FilePath device path
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
2025-11-25 11:17:24 -07:00
Jose Luis Duran fd606b629f libefivar: Add a checking step
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
2025-11-25 11:17:24 -07:00
Jose Luis Duran 9677ae7864 libefivar: MdePkg: Clean up source files
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
2025-11-25 11:17:24 -07:00
Jose Luis Duran 5b7b60af7b libefivar: Add and comment out unused functions
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
2025-11-25 11:17:24 -07:00
Jose Luis Duran ef191142dc libefivar: Move functions to match reference file
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
2025-11-25 11:17:24 -07:00
Jose Luis Duran b38f48d336 libefivar: Standardize #ifndef __FreeBSD__
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
2025-11-25 11:17:23 -07:00
Jose Luis Duran 0e614a4afe libefivar: Fix (some) typos
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
2025-11-25 11:17:23 -07:00
Kristof Provost 238ad591da libpfctl: improve error handling
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")
2025-11-25 14:50:09 +01:00
John Baldwin e928afc531 Use ZFSTOP more broadly
Reviewed by:	brooks
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D53791
2025-11-24 10:47:10 -05:00
Dag-Erling Smørgrav 961b934407 pam_krb5: Fix manual page in MIT case
* Always install the manual page as pam_krb5(8) regardless of which
  version we're using.
* Regenerate it using pod2mdoc instead of pod2man so it doesn't claim
  to be part of “User Contributed Perl Documentation”.
* Put the correct section number in the header and footer.
* Don't cross-reference non-existent pam(7) manual page.

Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D53885
2025-11-24 03:40:49 +01:00
Dimitry Andric 3289bace53 Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):"
[Driver] Enable outline atomics for FreeBSD/aarch64 (#156089)

The compiler_rt helper functions have been built since 12.4, 13.1, 14
and anything newer.

This reverts commit bd27bd1f51.

Only some people (including the release manager, unfortunately) ran into
build issues with the previous iteration of this commit, because they
were bootstrapping the compiler, either via the WITHOUT_SYSTEM_COMPILER
src.conf(5) setting, or because the build system determined that their
base system compiler was out of date.

The bootstrapped compiler would then enable outline atomics and compile
libgcc_s with these, but because libgcc_s is linked with -nodefaultlibs,
it could not find the helper routines in libcompiler_rt.a.

In contrast, people who did not bootstrap the compiler never saw any
issues, because libgcc_s was built using their 'old' base system
compiler, and so libgcc_s would not contain any calls to those helper
routines.

Fix this by ensuring that libgcc_s is linked against libcompiler_rt.a
explicitly, similar to some other binaries and libraries that are built
with -nodefaultlibs.

Also, bump FREEBSD_CC_VERSION to ensure that everybody gets the updated
compiler with outline atomics enabled. (This should have been done in
the first iteration of this commit, because the error would have shown
up right away then.)

MFC after:	3 days
2025-11-23 19:40:00 +01:00
Gordon Bergling 9334fa3ef5 exit.3: Fix a typo in the manual page
- s/avaliable/available/

MFC after:	3 days
2025-11-19 15:17:40 +01:00
Gordon Bergling d76ea20f99 mpool(3): Fix a typo in statistical message
- s/cacheing/caching/

MFC after:	5 days
2025-11-19 15:16:33 +01:00
Martin Matuska 007679a138 libarchive: merge from vendor branch
libarchive 3.8.3

Important bugfixes:
 #2753 lib: Create temporary files in the target directory
 #2768 lha: Fix for an out-of-bounds buffer overrun when using
       p[H_LEVEL_OFFSET]
 #2769 7-zip: Fix a buffer overrun when reading truncated 7zip headers
 #2771 lz4 and zstd: Support both lz4 and zstd data with leading
       skippable frames

Obtained from:	libarchive
Vendor commit:	1368b08875351df8aa268237b882c8f4ceb0882d
MFC after:	1 week
2025-11-19 14:53:24 +01:00