I forgot to check/update the man page with D54217. While here add
a test for multiple -e flags.
Reviewed by: markj
Approved by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54632
Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA
provider library.
This change:
-Registers libbnxtre in src.libnames.mk so it is built and installed as part
of the OFED libraries.
-Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled.
-Declares proper dependency mappings for bnxtre (ibverbs, pthread).
-Introduces LIBBNXTREDIR for consistent object directory handling.
-Updates libibverbs and librdmacm build rules to link against libbnxtre,
enabling Broadcom RoCE device support at runtime.
-libbnxtre library uses below constructor to register with the libibverbs,
static attribute((constructor)) void bnxt_re_register_driver(void)
These updates ensure that applications using libibverbs and librdmacm can
discover and use Broadcom bnxt RDMA devices on FreeBSD.
Reviewed by: markj, ssaxena
Differential Revision: https://reviews.freebsd.org/D54368
MFC after: 3 days
The commit message has to be rewritten as it is not clear and lacks
some key details about the change.
This reverts commit 35dd53a9e1.
Reported by: jrtc27
Fix a segfault when printing the "protocol" field. The field-format and
encoding-format were expecting different numbers of arguments.
Also, fix the width of the tcp-state field in encoded output.
PR: 292228
Fixes: c2b08c13c2 netstat: add support for UDP-Lite endpoints
MFC after: 1 week
Sponsored by: ConnectWise
Reviewed by: tuexen, js, des
Differential Revision: https://reviews.freebsd.org/D54567
Zstd is a discrete, self-contained system component. To match how we
package zlib, bzip2 and xz, move it to its own package, with a separate
lib package.
Add the new package to the minimal set, since this is a core component
that users expect to be installed.
This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.
MFC after: never
Reviewed by: bapt
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53603
Mark `digits` as `__non_string`, to avoid warnings from clang 21 similar
to:
usr.bin/m4/misc.c:123:27: error: initializer-string for character array is too long, array size is 36 but initializer has size 37 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
123 | static char digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MFC after: 3 days
In commit 2e47f35be5 libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.
However, this also comes at the cost of some performance, since the
dynamic libraries are quite large, and contain lots of long symbols
(mangled C++ identifiers).
Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go
back to the previous behavior: libllvm, libclang and liblldb are built
as internal static libraries, i.e. only available during buildworld, and
fully linked into the various executables such as clang, lld, etc.
PR: 287447
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50956
While command(1) is now classified by POSIX as an intrinsic utility and
no longer required to exist as a standalone program, it turns out that
we still have a use for it (cf. env(1)), so resurrect it.
PR: 291879
Fixes: 4100bd6caa ("usr.bin: Remove intrinsic utilities")
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54341
These utilities can only function correctly if implemented as shell
builtins and exist only because POSIX previously required them. As of
POSIX 2024, they have all been reclassified as intrinsic utilities and
are no longer required to exist in PATH. We can therefore retire them.
Cf. XBD 1.7, XRAT C.1.8, Austin Group bug 854.
Note that kill(1) is also considered an intrinsic utility (because
only the shell can interpret job IDs correctly), but we have a working
standalone implementation, which we will keep.
PR: 291686
Relnotes: yes
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D54239
This change introduces a new per-UID limit for controlling the
number of vmm instances, in anticipation of unprivileged bhyve.
This allows ut to limit the amount of kernel memory allocated
by the vmm driver and prevent potential memory exhaustion attacks.
Differential Revision: https://reviews.freebsd.org/D53728
Reviewed by: markj, olce, corvink
MFC after: 3 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
By default ibv_devices and rping are not statically bound to
libbnxtre.so.1. i.e. 'ldd /usr/bin/rping' command doesn't list
'libbnxtre.so.1' entry. So, statically bound the libbnxtre.so.1
library to rping & ibv_devices utils.
MFC-After: 3 days
Reviewed-by: sumit.saxena@broadcom.com
Differential-Revision: https://reviews.freebsd.org/D49604
This is a manual page update describing the functionality that was added
to mdo(1) in commit 3ca1e69028 ("mdo(1): Add support and shortcuts for
fully specifying users and groups"). Please either refer to that commit
or the new manual page's content for more information.
While here:
- Add to the introduction a description of process credentials and some
specific vocabulary that is used throughout the page, as well as the
relationship between mdo(1) and mac_do(4).
- Update the HISTORY section.
- Add AUTHORS and SECURITY CONSIDERATIONS sections.
Reviewed by: ziaee
MFC after: 1 minute
Sponsored by: The FreeBSD Foundation
Sponsored by: Google LLC (GSoC 2025)
Co-authored-by: Kushagra Srivastava <kushagra1403@gmail.com>
Differential Revision: https://reviews.freebsd.org/D53905
If the basis for supplementary groups are the current ones, we do not
need to fetch them when they are to be replaced entirely (which we
already have been doing), as in the '!start_from_current_groups' case,
but specifically also when they are not going to be touched at all.
This change in passing makes the modified code block's comment saying
that SETCREDF_SUPP_GROUPS need not be set here correct.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53771
Sort usage and man page options, mention possible minimum and maximum
values, fix punctuation marks, and cleanup the man page.
PR: 291092
Reviewed by: pauamma_gundo.com, christos
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53827
Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile. However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.
This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing. If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.
Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.
Minor style adjustment for the previous commit while we're here.
Reported by: cperciva
Discussed with: jrtc27
Reviewed by: des, jlduran
Fixes: 4472fd66d0 ("lam: fail on I/O errors")
MFC after: 3 days (tentative)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53750
In the manual page:
- Fix synopsis and use better argument names
- Improve description of flags.
- In EXAMPLES, list the contents of iguana and chameleon files.
- Use Rs to reference The Cartoon Guide to Statistics
- Fix misc indentation and style issues
- Tag SPDX
MFC after: 1 week
Reviewed by: bcr, ziaee
Differential Revision: https://reviews.freebsd.org/D53710
Add "-F" parameter that, when specified, instructs sockstat(1) to
only display sockets for username/UID specified.
For consistency with "-j", the last occurence of "-F" is used.
Reviewed by: asomers
Approved by: asomers
Differential Revision: https://reviews.freebsd.org/D53458
The first argument to nmount(2) is an nvlist in the form of an iovec,
which truss already knows how to decode. Set the correct flag so
this happens automatically.
MFC after: 1 week
PR: 290667
These options may not be combined with any other options and print the
current or specified user's home directory and shell respectively.
Reviewed by: imp, bcr
Differential Revision: https://reviews.freebsd.org/D53301
We use a pkg(8) trigger to run makewhatis for /usr/share/man when
manpages are updated, but this doesn't cover /usr/share/openssl/man.
Rewrite the trigger to process a list of directories instead of a
single directory, and include /usr/share/openssl/man in the list.
MFC after: 3 days
Reviewed by: emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53064
When producing formatted output, trim leading whitespace and trailing
commas from the human-readable time and uptime before emitting them.
The text output remains unchanged.
PR: 290089
Fixes: 6e6febb54d ("w: Fix idle time in json output, add login/idle times to json output")
Reviewed by: marius.h_lden.org
Differential Revision: https://reviews.freebsd.org/D53167
With this patch UDP-Lite endpoints are also shown per default.
Reviewed by: Nick Banks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53252
With this patch UDP-Lite endpoints are also show per default.
Reviewed by: Peter Lei, Nick Banks
MFC after: 3 days
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D53230
Update vendor/libarchive to 3.8.2
Important bugfixes:
#2477 tar writer: fix replacing a regular file with a dir for
ARCHIVE_EXTRACT_SAFE_WRITES
#2659 lib: improve filter process handling
#2664 zip writer: fix a memory leak if write callback error early
#2665 lib: archive_read_data: handle sparse holes at end of file correctly
#2668 7zip: Fix out of boundary access
#2670 zip writer: fix writing with ZSTD compression
#2672 lib: fix error checking in writing files
#2678 zstd write filter: enable Zstandard's checksum feature
#2679 lib: handle possible errors from system calls
#2707 lib: avoid leaking file descriptors into subprocesses
#2713 RAR5 reader: fix multiple issues in extra field parsing function
#2716 RAR5 reader: early fail when file declares data for a dir entry
#2717 bsdtar: Allow filename to have CRLF endings
#2719 tar reader: fix checking the result of the strftime (CVE-2025-25724)
#2737 tar reader: fix an infinite loop when parsing V headers
#2742 lib: parse_date: handle dates in 2038 and beyond if time_t is big
enough
Obtained from: libarchive
Vendor commit: 7f53fce04e4e672230f4eb80b219af17975e4f83
Security: CVE-2025-25724
PR: 290303 (exp-run)
MFC after: 1 week
The computation of the length was not taking into account that IPv6
endpoints, which are not IPv6 only, have a suffix of 46.
For UDP and TCP this bug was not relevant, since tcp46 and udp46
has the same length as PROTO, but sctp46 is longer. Upcoming
udplite support will also be affected.
Reviewed by: asomers
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53212
tar(1) is not a core runtime utility; in particular, nothing in
/etc/rc.d/* requires it. Move it to utilities, which is also
where cpio(1) lives.
This removes the dependency from runtime to libarchive.
MFC after: 3 days
Reviewed by: manu, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53059
Only suppress the path state column when producing traditional text
output. When generating html output, always include the column.
Please note that when generating json or xml output, optional fields
like the path state are only generated if they is applicable. This
has not been changed.
The changes in this patch were suggested by asomers.
Reviewed by: asomers
Fixes: 746eadecaa ("sockstat: show path state column only when useful")
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D53005
Both usr.bin/sockstat and usr.bin/sockstat/tests build the file
src/usr.bin/sockstat/sockstat.c. Unfortunately, they place the
resulting object file in the same place, but produce different
files due to paths appearing in the .debug files; this results
in different binaries depending on how the race between the two
builds ends.
Use .PATH to tell make to find sockstat.c in the parent directory
but place the object file in the current object directory, rather
than placing '..' into the name of the source file.
Suggested by: bdrewery, emaste, jrtc27
MFC after: 5 minutes (15.0 build fix)
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D53032