When the SCTP, TCP, or UDP implementation send a packet, it does not
compute the corresponding checksum but defers that. The network layer
will determine whether the network interface selected for the packet
has the requested capability and computes the checksum in software,
if the selected network interface doesn't have the requested
capability.
Do this not only for packets being sent by the local SCTP, TCP,
and UDP stack, but also when forwarding packets. Furthermore, when
such packets are delivered to a local SCTP, TCP, or UDP stack, do not
compute or validate the checksum, since such packets never have been on
the wire.
This allows to support checksum offloading also in the case of local
virtual machines or jails.
Support for epair, vtnet, and tap interfaces will be added in
separate commits.
Reviewed by: kp, rgrimes, tuexen, manpages
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D51475
As of FreeBSD 15.0, crsetgroups() *only* sets supplementary groups,
while crsetgroups_and_egid() will do both using an array of the same
style that previous versions used for crsetgroups() -- i.e., the first
element is the egid, and the remainder are supplementary groups.
Unlike the previous iteration of crsetgroups(), crsetgroups_and_egid()
is less prone to misuse as the caller must provide a default egid to use
in case the array is empty. This is particularly useful for groups
being set from data provided by userland.
Reviewed by: olce
Suggested by: olce
Differential Revision: https://reviews.freebsd.org/D51647
This is the (mostly) kernel side of de-conflating cr_gid and the
supplemental groups. The pre-existing behavior for getgroups() and
setgroups() is retained to keep the user <-> kernel boundary
functionally the same while we audit use of these syscalls, but we can
remove a lot of the internal special-casing just by reorganizing ucred
like this.
struct xucred has been altered because the cr_gid macro becomes
problematic if ucred has a real cr_gid member but xucred does not. Most
notably, they both also have cr_groups[] members, so the definition
means that we could easily have situations where we end up using the
first supplemental group as the egid in some places. We really can't
change the ABI of xucred, so instead we alias the first member to the
`cr_gid` name and maintain the status quo.
This also fixes the Linux setgroups(2)/getgroups(2) implementation to
more cleanly preserve the group set, now that we don't need to special
case cr_groups[0].
__FreeBSD_version bumped for the `struct ucred` ABI break.
For relnotes: downstreams and out-of-tree modules absolutely must fix
any references to cr_groups[0] in their code. These are almost
exclusively incorrect in the new world, and cr_gid should be used
instead. There is a cr_gid macro available in earlier FreeBSD versions
that can be used to avoid having version-dependant conditionals to refer
to the effective group id. Surrounding code may need adjusted if it
peels off the first element of cr_groups and uses the others as the
supplemental groups, since the supplemental groups start at cr_groups[0]
now if &cr_groups[0] != &cr_gid.
Relnotes: yes (see last paragraph)
Co-authored-by: olce
Differential Revision: https://reviews.freebsd.org/D51489
Enabling and disabling LLVM assertions changes the ABI. There have
been multiple reports on the freebsd-current@ mailing list of broken
'cc'.
Out of caution, you may wish to do a clean build while crossing this
commit after building the reverted commit if you do not set
LLVM_ASSERTIONS in your src.conf.
Discussed with: kevans, jrtc27
This reverts commit 9b3055d0d4.
There is no reason to change the font in order to select a keymap or a
font.
This was done in the syscons(4) era to ensure that a font with the
appropriate character set was used for kbdmap or vidfont's localized
menu, but vt is always UTF-8 and this is no longer necessary.
PR: 235565
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51640
libedit breaks the bootstrap on MacOS and Linux.
Activate libedit only for the regular build not for the bootstrap
tools
While here fix the definition of the dependency chain between
libkrb5ss and libedit (and libtinfow) via src.libnames.mk
Remove a local patch to find the readline compatible header and
find them via proper CFLAGS.
This is based on the description of sysctl -d.
Reviewed by: Timo Völker, bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51604
This describes the current status of the implementation.
While there, be a bit more precise on how long the checksum
computation is delayed.
Reviewed by: Timo Völker, bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51590
This section adds several style guidelines for C++ in FreeBSD's base
system both enumerating some differences relative to the C KNF style
and addressing some unique C++ idioms not addressed by the existing
KNF style.
This section is not exhaustive but does include an initial set of
guidelines.
Reviewed by: ivy, emaste
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D50983
bmake along with /usr/share/mk seems to meet the criteria for being in
its own package: it's self-contained and the majority of users (who are
using binary packages) don't need to install it, so it doesn't belong in
FreeBSD-utilities. Instead, put it in its own package.
Add a dependency on the new package from:
- sendmail (uses make to build its configuration)
- NIS (uses make to build the database).
But not from examples, because while some of the examples do require
make, they are intended as examples rather than something to be used
directly.
Reviewed by: manu, sjg
Differential Revision: https://reviews.freebsd.org/D50149
This change splits the validation and 'struct domainset'-filling logic
from kern_cpuset_setdomain into a separate function - domainset_populate.
This function's main use is to validate user-provided domainset(9)
policies and populate a struct domainset before handing it off
to domainset_create. No functional change intended.
Differential Revision: https://reviews.freebsd.org/D46608
Reviewed by: markj
This noticeably slows down the compiler execution and with the move to
pkgbase is one of the remaining differences that cannot be
administratively controlled; pkg kernels and malloc.conf(5) will allow
quickly testing a snapshot in a configuration closer to stable and
release branches.
dim@ notes that you need to set WITH_LLVM_ASSERTIONS in src.conf(5) if
you want to report an issue with LLVM.
Enabling WITH_LLVM_ASSERTIONS is also a consideration for CI and pkg
builders especially tracking main.
Approved by: dim, kevans
Differential Revision: https://reviews.freebsd.org/D50388
A last-minute change tweaked the prototype because we can just fetch
the compression format from the compressor, but I missed updating the
manpage to match it.
Fixes: ce51f79913 ("kern: abstract away the vnode coredumper [..]")
The default and only stock coredumper will continue to be the
traditional vnode dumper, which will dump to a vnode and issue a devctl
notification. With this change, one can write a kmod that injects custom
handling of user coredumps that offers richer behavior, particularly in
case one wants to add more metadata than we can tap out via devd.
The main motivation here is to pave the way for my usercore daemon to be
able to reroute coredumps before they ever touch the disk. In some
cases they may be discarded and we can avoid the overhead of writing
anything, in others they allow us to capture coredumps that would be
written into an area that's transient in nature (e.g., kyua test work
directories) without having to do more tricks to keep those alive. My
WIP kmod writes the coredump into a shmfd instead of a vnode, then
installs that into ucored(8) with every read(2) of /dev/ucore. This
also allows me to capture more metadata reliably before the process and
jail disappear.
Reviewed by: kib (earlier version), markj
Differential Revision: https://reviews.freebsd.org/D51338
This more cleanly contains the bits that are specifically relevant to
dumping coredumps out to a vnode, which will make future changes a bit
easier to review. This also makes the scope of the relevant sysctls
easier to reason about in the process, as they're not visible outside of
the vnode dumper file -- this will mostly become relevant when we allow
pluggable dumpers.
While we're here, move all of the coredump-related stuff out into its
own kern_ucoredump.c and sys/ucoredump.h. We have enough that it's
useful to separate it out and de-clutter kern_sig.c and sys/exec.h a
bit.
Reviewed by: kib, markj (both earlier version)
Differential Revision: https://reviews.freebsd.org/D51349
At the moment, all the manpages in share/man are in the utilities-man
package. Move some of them to the package they should actually be in,
using the new MANGROUPS feature.
Move all of section 3 to clibs-man. Although some of these are from
/usr/include/sys rather than libc, you can't practically use them
without libc, and clibs-man is where the libc manpages live already.
Move all of sections 4 and 9 to a new kernel-man package, except for
atf-test-case.4 which goes to tests-man. atf-test-case.4 is in the
wrong section, but this needs to be fixed upstream.
kernel-man requires special handling in generate-ucl.lua since it's
got a -man suffix but doesn't want the ' (manual pages)' automatic
suffix. For now, fix this by adding a list of packages that don't
get automatic suffixes.
Reviewed by: ifreund_freebsdfoundation.org, manu, emaste
Differential Revision: https://reviews.freebsd.org/D51504
MANGROUPS allows manpages to be divided into groups with their own
options, analogous to CONFGROUPS. This is mainly used for installing
manpages into the correct package by setting ${<group>PACKAGE}.
Convert the backward-compatibility variables MAN1..MAN9 into man
groups.
Reviewed by: sjg
Differential Revision: https://reviews.freebsd.org/D51490
Replace "cannot mount root" (which is no longer a panic) with a brief
description of the mountroot> prompt, and recommend using "system
install media" rather than the fixit floppy.
Remove "timeout table full" entirely since this panic no longer exists.
MFC after: 3 days
Reviewed by: ziaee
Differential Revision: https://reviews.freebsd.org/D51512
This is a combination of imported information from the out-of-tree
driver's documentation, as well as some all new information:
- Add previously undocumented loader tunables and expand the descriptions
for all of them
- Add references to the iavf and irdma man pages
- Add some documentation for the DDP package (ice_ddp)
- Remove mentions of the ports/packages for the utilities since those are
no longer supported, and update the names of the utilities to match the
names used on the Intel Download Center
- Add information on RDMA and RDMA mirroring sections
- Document QoS capability
And more!
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: ziaee@
Pull Request: https://github.com/freebsd/freebsd-src/pull/1622
Closes: https://github.com/freebsd/freebsd-src/pull/1622
On ZFS, extended attributes with small values
(as in number of bytes) that are created when
xattr is set to "sa" will only be visible via extattr(2)
and not as named attributes.
This man page patch documents the above.
This is a content change.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51444
Although not strictly required, since termino takes priority, we had
obsolete data for the st terminal emulator from 0.8. It won't hurt and
may help some people.
Reviewed by: imp, bapt, markj
Differential Revision: https://reviews.freebsd.org/D51463
This allows the image build to work even if the host's OSVERSION doesn't
match the pkgbase OSVERSION which happens if the host's patch level or
release version isn't the same as pkgbase.
Also fix the image name so that Podman/Buildah will fetch it
automatically, removing the need for users to pull an image and retag it
before using this example.
Reviewed by: dch
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D50596
The patch was originally written by hrs [1], and later modified by meta
to use named flags instead of generic link-layer flags.
[1] https://reviews.freebsd.org/D45854
PR: 280736
Co-authored-by: Hiroki Sato <hrs@FreeBSD.org>
Reviewed by: ae, ziaee, zlei, pauamma
Reported by: Kazuki Shimizu <kazubu@jtime.net>
Approved by: pauamma (manpages)
Approved by: ae
MFC after: 2 weeks
Sponsored by: Cybertrust Japan
Differential Revision: https://reviews.freebsd.org/D51297
Add obiwac@ (myself) as new src committer with mckusick@ and jrm@ as
mentors.
Reviewed by: mckusick (mentor), jrm (mentor)
Approved by: mckusick (mentor), jrm (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51428
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
Obtained from: OpenBSD, naddy <naddy@openbsd.org>, 41ce3b17e7
Sponsored by: Rubicon Communications, LLC ("Netgate")
Multiply the number of states in the example adaptive timeout calculation
by 10 so it works with the numbers in the config, which were previously
multiplied.
ok dlg@
Obtained from: OpenBSD, jmatthew <jmatthew@openbsd.org>, 5642facce3
Sponsored by: Rubicon Communications, LLC ("Netgate")
This lets us pull them automatically into the hardware release notes.
Note the beautiful introductory sentence here, this pattern can maybe
improve the relationship between DESCRIPTION introductory sentence and
HARDWARE.
MFC: never (ufshci does not mfc)
Reviewed by: 0mp, christos, imp
Differential Revision: https://reviews.freebsd.org/D51379
We've done the same in the past to the vnconfig.8->mdconfig.8 link in:
eb5f456981 Remove ancient vnconfig symlink
Reviewed by: bcr, markj, ziaee
Approved by: markj (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27122
Setting multiple pf_fallback_rules in /etc/rc.conf as per the
documentation produces invalid pf syntax due to the lack of echo
quoting $pf_fallback_rules in /etc/rc.d/pf. Adding quotes around
the $pf_fallback_rules echo maintains newlines needed for valid
pfctl syntax. Provided patch resolves the issue
Also updating rc.conf(5) to reflect that multi-line pf_fallback_rules
should not include a trailing backslash (\) as line breaks are
needed when passing rules to pfctl via stdin.
PR: 288197
Reviewed by: kp
MFC after: 2 weeks
Only icmp(4)/icmp6(4) types are required for `icmp-type'/`icmp6-type' rules
while codes are optional.
From Martin Vahlensieck < openbsd at academicsolutions dot ch >, thanks!
Obtained from: OpenBSD, kn <kn@openbsd.org>, 5171218709
Sponsored by: Rubicon Communications, LLC ("Netgate")
Title macros are discouraged in mdoc(7) because they are not portable.
While here, remove a redundant "file". File is still in the title twice.
MFC after: 3 days
Commit 4a3fb7547e ("powerpc: Disconnect 32-bit powerpc from make
universe") changed the default architecture lists. i386 hasn't chanaged
as only the kernels are disabled; i386 is still included in
TARGET_MACHINE_LIST.
Sponsored by: The FreeBSD Foundation
Shorten document description to fit on one line for the beautification
of apropos results, removing only the search keyword "facilities", which
I think is unlikely to cause discoverability regression.
MFC after: No (please mfc if mfc'ing tracing.7)
Reviewed by: 0mp, bcr
Differential Revision: https://reviews.freebsd.org/D51284