1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
Commit Graph

24863 Commits

Author SHA1 Message Date
Simon J. Gerraty
45fe5580cd Updated and new Makefile.depend files
Reviewd by:	stevek
2024-10-16 09:26:29 -07:00
Mitchell Horne
23cb03d145 thr_kill(2): fix title
Mandoc emits a STYLE warning due to the lowercase letters.
2024-10-15 17:44:52 -03:00
Graham Percival
a51584a2d2 manuals: Fix some "missing section argument"
These were reported by `mandoc -T lint ...` as warnings.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1467
2024-10-15 17:20:55 -03:00
Graham Percival
6e1fc01180 manuals: Fix "unusual .Xr" warnings with a script
These were reported by `mandoc -T lint ...` as warnings:
- unusual Xr order
- unusual Xr punctuation

Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1464
2024-10-15 17:18:14 -03:00
Kristof Provost
9c12533672 pf: convert DIOCGETSRCNODES to netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-10-15 16:29:11 +02:00
Strahinja Stanišić
7bedae81ad lib/libc/tests/string: add test for strnlen()
Tests for strnlen, checks alignments from up to 16 and buffer sizes up
to 64, also checks that passing SIZE_MAX as maxlen works, because it can
cause a wraparound error if strnlen is incorrect.

Reviewed by:	fuz, emaste (GSoC mentors), kib
Sponsored by:	Google LLC (GSoC 2024)
Differential Revision:	https://reviews.freebsd.org/D46275
2024-10-15 13:34:45 +02:00
Robert Clausecker
18b226ea08 lib/geom: remove redundant libraries and objects
Do not link lib/geom/raid with libmd, it is not required for the module.
Do not include the sha256/sha512 code in lib/geom/eli, it is provided by
libmd.  Remove ${.CURDIR:H:H}/misc from .PATH for all modules.  This
path has stopped being valid when the GEOM modules were moved from
sbin/geom to lib/geom.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D47061
2024-10-15 13:34:45 +02:00
Simon J. Gerraty
a64729f507 Update Makefile.depend files
After building packages we have a number of new
and updated Makefile.depend files

Reviewed by:	stevek
2024-10-14 10:26:17 -07:00
Kristof Provost
48f5bf8be6 pf: convert DIOCGETRULESET to netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46938
2024-10-10 14:10:41 +02:00
Kristof Provost
25e0f8f99f pf: convert DIOCGETRULESETS to netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46930
2024-10-10 14:10:40 +02:00
Ka Ho Ng
50c64df2a1 Revert "libkldelf: add a private library for kernel/kld-related ELF parsing"
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-12, /usr/lib/llvm-12/bin, ubuntu-20.04, bmake libarchive-dev clang-12 lld-12, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-13, /opt/homebrew/opt/llvm@13/bin, macos-latest, bmake libarchive llvm@13, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
This reverts commit 0a2cfd653e.
2024-10-08 19:40:20 +00:00
Ka Ho Ng
7007de7d10 Revert "libkldelf: add elf_lookup_symbol function"
This reverts commit 2c7d847956.
2024-10-08 19:40:13 +00:00
Ka Ho Ng
6df3a2d1bf Revert "libkldelf: use warnx instead of printf"
This reverts commit 550ee2d03c.
2024-10-08 19:39:36 +00:00
Graham Percival
8b92fa1ceb manuals: Misc syntax fixes
These were reported by `mandoc -T lint ...` as errors.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1453
2024-10-08 16:13:39 -03:00
Gleb Popov
e3ebc5f534 procctl(2): Clarify the ESRCH error code case
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D47010
2024-10-08 19:58:17 +03:00
Ka Ho Ng
550ee2d03c libkldelf: use warnx instead of printf
Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46893
2024-10-08 04:29:10 +00:00
Ka Ho Ng
2c7d847956 libkldelf: add elf_lookup_symbol function
The elf_lookup_symbol function looks up the symbol with a given symbol
name. A pointer to the GElf_Sym of the symbol is returned if the symbol
exists in the opened ELF file.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46764
2024-10-08 04:29:10 +00:00
Ka Ho Ng
0a2cfd653e libkldelf: add a private library for kernel/kld-related ELF parsing
The libkldelf library was originally a part of kldxref(8). It exposed
ELF parsing helpers specialized in parsing KLDs and the kernel
executable. The library can be used to read metadata such as linker_set,
mod_depend, mod_version and PNP match info, and raw data from the ELF.

To promote the reuse of the facilities the ELF parsing code is separated
from kldxref(8) into a new private library.

kldxref(8) is modified to link against the libkldelf library.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46719
2024-10-08 04:24:07 +00:00
Graham Percival
c8b31033c3 manuals: Misc syntax fixes
These were reported by `mandoc -T lint ...` as errors.

The rendered output (in ascii and html) is not affected by this commit.

Additional clarification: there was a non-breaking space in
lib/libcasper/services/cap_grp/cap_grp.3.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1449
2024-10-07 15:41:14 -03:00
Graham Percival
d21e322d56 manuals: Fix "missing end of block" errors
These were reported by `mandoc -T lint ...` as errors.

The rendered output (in ascii and html) is not affected by this commit.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1448
2024-10-07 15:40:58 -03:00
Ed Maste
8b41e693fc libsys: connect membarrier.2
Sponsored by:	The FreeBSD Foundation
2024-10-07 08:01:34 -04:00
Konstantin Belousov
3670421e21 getrlimitusage.2: add the man page
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:50:08 +03:00
Konstantin Belousov
cdd9629921 sysctl.3: document missing oids from kern.proc. node
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:50:00 +03:00
Konstantin Belousov
4e2803878f sysctl.3: document missing fixed oids from the kern. node
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:49:54 +03:00
Konstantin Belousov
2918dbc1cc sysctl.3: Remove KERN_QUANTUM
It is not present in the sources and 'git log -S KERN_QUANTUM main'
returns nothing.

Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46823
2024-10-07 13:49:46 +03:00
Cy Schubert
5a5c227981 unbound: Vendor import 1.21.1
Release notes at
	https://nlnetlabs.nl/news/2024/Oct/03/unbound-1.21.1-released/

Security:       CVE-2024-8508
MFC After:	3 days

Merge commit '9b8db746ac608ff7cdad3c9ac7ac395319e4ea0f'
2024-10-06 18:45:53 -07:00
Ed Maste
1fc766e3b4 membarrier: Add manual page
Add a minimal membarrier man page that documents the available cmd
values and errors that can be returned.  We can add more information and
iterate on it in the tree.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46967
2024-10-06 19:41:57 -04:00
Brooks Davis
74f6ec6fe3 lib{c,sys}: .note.GNU-stack in syscall stubs
Explicitly disable executable stacks in the syscall stubs on all
architectures.  Previously, aarch64 and riscv64 didn't include the
.note.GNU-stack note due it being disabled by default in those ABIs.

This appears to have been harmless in practice, but better to be clear
in case a different compiler/linker has different defaults.  This also
reduces special cases in the Makefile.

Reported by:	jrtc27
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44883
2024-10-04 23:01:45 +01:00
Graham Percival
4f2ef756a4 manuals: Fix "skipping end of block" .Ed errors
These were reported by `mandoc -T lint ...` as errors; this commit only
handles unnecessary .Ed commands.

The rendered output (in ascii and html) is not affected by this commit.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1435
2024-10-03 14:49:23 -03:00
Brooks Davis
a57e881d32 sysent: regen comments 2024-10-03 18:01:30 +01:00
Brooks Davis
d9d2e3ab7c sysent: regen comments 2024-10-01 18:46:40 +01:00
Kyle Evans
c02bc0aa0b libmd: re-apply masking of _Transform names
Visibility can get complicated when, e.g., ifuncs are involved.  In
particular, SHA256/SHA512 on aarch64 use ifuncs for their _Transform
implementations, which then exposes global symbols of the same name that
break things trying to statically link both libcrypto and libmd.

Revert this part of the _Transform removal to fix the pkg-static build
on aarch64.

Fixes:	81de655acd ("libmd: stop exporting Transform() symbols")
2024-09-30 14:59:31 -05:00
Kyle Evans
0ffebeb08a libmd: quickly switch exported symbols to FBSD_1.8 before anyone notices
This sat in my tree for years, and we've since cut another release
branch.  Oops. =\
2024-09-29 23:42:53 -05:00
Kyle Evans
5190e6341c libmd: stop exporting _version symbols
These are reportedly likely to be specific to SSLeay's implementation
and likely not needed here.  At the very least they shouldn't be used
by consumers, so let's kick them out now while we're already prepared
for a libmd soversion bump.

Requested by:	delphij, fuz
2024-09-29 22:35:23 -05:00
Kyle Evans
442e0975ee Consolidate md4 implementations written in C
We currently have one in libmd and another in the kernel that's almost
completely identical.  Standardize on the kernel version.

PR:		280784 (exp-run)
2024-09-29 22:34:21 -05:00
Kyle Evans
81de655acd libmd: stop exporting Transform() symbols
They're not documented in libmd and we don't have any consumers.  It's
problematic to keep them exported, as we don't currently export their
implementations. Make them all private.

PR:		280784 (exp-run)
Reviewed by:	fuz
Differential Revision:	https://reviews.freebsd.org/D34503
2024-09-29 22:34:20 -05:00
Kyle Evans
fd3ced1507 libmd: export and document *Fd/*FdChunk interfaces
PR:		280784 (exp-run)
Fixes: de13c2427d ("libmd: introduce functions that operate on an fd")
Reviewed by:	manpages (bcr), fuz
Differential Revision:	https://reviews.freebsd.org/D34502
2024-09-29 22:34:20 -05:00
Kyle Evans
01112a1711 libmd: tests: raise WARNS to the default
The drivers just had a small issue, passing a literal string as
non-const.  Fix it and lift WARNS.

PR:		280784 (exp-run)
Reviewed by:	delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D34501
2024-09-29 22:34:20 -05:00
Kyle Evans
e0c51286dd libmd: split tests out into the test infrastructure
Make us a little less reliant on individuals running the tests, we'll
start running them as part of CI.

PR:		280784 (exp-run)
Reviewed by:	delphij
Differential Revision:	https://reviews.freebsd.org/D34500
2024-09-29 22:34:19 -05:00
Kyle Evans
e25527f75f libmd: symbol versioning
The primary benefit sought is exporting _libmd_* symbols in a private
namespace, and avoiding export of some other implementation details that
are shared amongst TUs.

PR:		280784 (exp-run)
Reviewed by:	fuz
Differential Revision:	https://reviews.freebsd.org/D34499
2024-09-29 22:34:19 -05:00
Kyle Evans
d61f4b481f libmd: stop exporting _block symbols
These are needed across compilation units so we can keep the _libmd_
prefixing bits (though I suspect we're not likely to collide), but we
don't need to be exporting the unprefixed versions of these; it's an
implementation detail.

PR:		280784 (exp-run)
Reviewed by:	delphij, fuz
Differential Revision:	https://reviews.freebsd.org/D34498
2024-09-29 22:34:18 -05:00
Kyle Evans
e7a629c851 libmd, kern, stand: consolidate md5 implementations (NFC)
Reduce the number of md5c.c between the three of these from two to one
by just reaching into the kernel build for both userland builds.  The
precedent for this already exists for sha2 in both cases.

_libmd_ symbol privatization bits have been moved to sys/md5.h and
md5.h remains to #include <sys/md5.h> for compatibility.

This stops exporting MD5Pad() in the process because the kernel stopped
exporting it in 502a35d60f.  soversion is bumped accordingly.

This also renames the libc version of stack_protector.c; it previously
only worked by coincidence because .PATH ordering worked out such that
we got the right one, but this is not the case anymore.  Remove the
landmine.

PR:		280784 (exp-run)
Reviewed by:	allanjude, delphij
Differential Revision:	https://reviews.freebsd.org/D34497
2024-09-29 22:34:18 -05:00
Enji Cooper
c284f45dc7 lib/libexpat: update build config for 2.6.3
MFC after:	1 week
MFC with:	ffd294a1f4
Differential Revision:	https://reviews.freebsd.org/D46830
2024-09-28 07:23:32 -07:00
Brooks Davis
1235d276b7 lib{c,sys}: stop exposing errno symbol
Officially since C11 (and in reality FreeBSD since 3.0 with commit
1b46cb523d) errno has been defined to be a macro.  Rename the symbol
to __libsys_errno and move it to FBSDprivate_1.0 and confine it entierly
to libsys for use by libthr.  Add a FBSD_1.0 compat symbol for existing
binaries that were incorrectly linked to the errno symbol during
libc.so.7's lifetime.

This deliberately breaks linking software that directly links to errno.
Such software is broken and will fail in surprising ways if it becomes
threaded (e.g., if it triggers loading of a pam or nss module that
uses threads.)

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D46780
2024-09-27 20:27:46 +01:00
Konstantin Belousov
6126f4ea64 libprocstat: add procstat_getrlimitusage()
Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46747
2024-09-27 18:02:29 +03:00
Konstantin Belousov
927f379180 Regen 2024-09-27 18:02:23 +03:00
Konstantin Belousov
9b29fc89ae Userspace enablement for getrlimitusage(2)
Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46747
2024-09-27 18:02:09 +03:00
Kajetan Staszkiewicz
7fe42038b2 pf: fix max-src-conn when rules are added via netlink
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D46797
2024-09-27 14:29:20 +02:00
Konstantin Belousov
eade2001aa jemalloc: set LG_VADDR to 64 on amd64
and allow to revert it back to 48 with WITHOUT_JEMALLOC_LG_VADDR_WIDE build
option.

Reviewed by:	andrew, emaste
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46686
2024-09-27 01:54:25 +03:00
Dag-Erling Smørgrav
d2c2d5f494 stdio: Disable USE_XPRINTF envar.
As xprintf has not kept up with our standard printf(3) implementation,
it is becoming increasingly dangerous to continue to allow it to take
over if USE_XPRINTF is defined.  Remove that code, while still allowing
applications which know about xprintf to select it.

Reviewed by:	phk
Differential Revision:	https://reviews.freebsd.org/D46765
2024-09-25 19:14:55 +02:00