tcp: Fix the SO_REUSEPORT_LB check
This needs to happen in tcp_connect() rather than tcp_usr_connect(), as
the latter is reachable by implied connect() via sendto().
Reviewed by: glebius
Reported by: syzbot+eecc86e6952fd9ba9f11 at syzkaller.appspotmail.com
Fixes: c7f803c71dae ("inpcb: fix a panic with SO_REUSEPORT_LB + connect(2) misuse")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50893
loader: Fix loader_brand = none
Setting loader_brand to none in loader.conf now result in a lua error
as we try to get a non-existant table
Defines it
Differential Revision: https://reviews.freebsd.org/D50875
Fixes: bef6d85b6de5 ("lualoader: allow graphical bits to be disabled with loader_gfx")
Reviewed by: kevans, tsoome
Sponsored by: Beckhoff Automation GmbH & Co. KG
Don't include netinet/tcp_timer.h when not needed
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D50889
OptionalObsoleteFiles: Keep common files between MIT and Heimdal
Reported by: "Herbert J. Skuhra" <herbert at gojira.at>
Original by: "Herbert J. Skuhra" <herbert at gojira.at>
Fixes: 7e35117eb07f
uk.kbd: Fix € mapping
We previously emitted the generic currency sign `¤` for Ctrl+4.
Generally speaking the modifer should be AltGr not Ctrl, and this should
be the Euro symbol `€`.
Fixes: eb8f9028fb38 ("Add the Euro symbol mapping to the UK keyboard keymap.")
Fixes: a232c1d130d2 ("Copy country-code .iso syscons keymaps for vt(4)")
Fixes: fdd869bd8a89 ("Another rpund of fixes, after checking keymaps for plausibility and with")
Reviewed by: ivy
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50702
Add a new sysctl in order to diffrentiate UEFI architectures
With the new 32-bit UEFI loader, it's convenient to have a sysctl to
figure out how we booted. Can be accessed at machdep.efi_arch
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
(cherry picked from commit b538d4911004ca541507166b8ec9689d2e87d1aa)
Approved by: imp (mentor)
bsdinstall: Default to pkgbase if media contains base packages
As of commit 62d18f8c4c10 ("release: Add -DPKGBASE option to include
pkgbase packages") we can include base system packages on the install
media instead of dist tarballs.
Set the default for the traditional/pkgbase question to match the
artifact type included in the install image.
Reviewed by: jrm
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50467
libprocstat: Drop zfs_defs.c hack, including its _KERNEL define
Now that we have a _WANT_ZNODE we can use that instead of defining
_KERNEL, and we're able to move the code back into zfs.c using a real
znode_t pointer.
Whilst here, tidy the includes.
Reviewed by: imp, kib, markj
Differential Revision: https://reviews.freebsd.org/D50721
openzfs: Add a _WANT_ZNODE that defines struct znode / znode_t for userspace
Note that ZNODE_OS_FIELDS needs to change to using struct vnode over
vnode_t (matching struct zfsvfs rather than vnode_t) since vnode_t is
only defined in the kernel SPL, not the userspace SPL (libspl).
Whilst here, tidy up the includes and clarify a comment.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D50720
libprocstat: Drop all _KERNEL defines outside of zfs_defs.c
Defining _KERNEL is a historical hack that can often break due to the
environment not actually being that of a kernel build. Now that we have
other targeted macros we can define instead that don't have far-reaching
implications like _KERNEL we can drop this.
Reviewed by: imp, kib, markj
Differential Revision: https://reviews.freebsd.org/D50719
msdosfs: Add _WANT_MSDOSFS_INTERNALS to replace MAKEFS in headers
This lets other bits of userspace expose these various definitions too.
In particular, this will be used by libprocstat so it can stop defining
_KERNEL.
The function prototypes surely won't be useful in other contexts, but
the various types are, and it's not worth hiding the prototypes unless
they end up causing issues, but so long as they aren't called they
shouldn't be a problem.
Note the MAKEFS define continues to exist, but only for use in
newfs_msdos, as those sources are reused by makefs with some changed
behaviour.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D50718
msdosfs: Don't #ifdef out msdosfsmount members
Whilst these aren't used by makefs, they do little harm existing once
the needed headers are included, and having structs change layout based
on defines like this can be fraught. This will be particularly true once
this code is exposed by defines other than _KERNEL and MAKEFS, as any
consumer will be able to opt into exposing this kernel type and all the
definitions should match.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50885
cd9660: Add _WANT_ISO_MNT
This allows struct iso_mnt to be defined for userspace without resorting
to the gross hack of defining _KERNEL. In particular, it will be used by
libprocstat so it can stop defining _KERNEL.
Reviewed by: imp, kib, markj
Differential Revision: https://reviews.freebsd.org/D50717
sys/mount.h: Hoist sys/types.h include
This header uses various types that come from here regardless of whether
_KERNEL is defined, so unconditionally include it rather than relying on
other headers implicitly including it for when _KERNEL is not defined.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D50884
tools/build: Provide extra headers on non-FreeBSD
These will be needed by future changes to continue to allow building
makefs as a bootstrap tool on Linux and macOS. This also requires
defining __sbintime_t in our cross-build sys/_types.
makefs: Implement the collision differentiator for micro ZAPs
In the unlikely event of a hash collision, the collision differentiator
is used to create a unique lookup key for ZAP entries. While the fat
ZAP implementation in makefs implemented this, the micro ZAP
implementation did not, so it's possible to end up with collisions in
directory entries. These are caught deterministically by OpenZFS, but
the result is a panic.
Implement a simple differentiator by simply assigning a unique value to
each ZAP entry. This scheme works since the 16-bit space of
differentiators is larger than the maximum number of entries in a micro
ZAP. (While the on-disk encoding provides 32 bits of space for the
differentiator, the in-memory representation of micro ZAP entries is
smaller.)
PR: 287482
MFC after: 1 week
config.5: Bump .Dd to reflect latest update
MFC with: 1bdf1b818635 ("config.5: Document CONF_CFLAGS under 'makeoptions'")
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 956100d60fa86daebc1bd46ea62f207f6b54d93d)
Fixed the "MFC with" tag (which is wrong in main).
Event: Kitchener-Waterloo Hackathon 202506
config.5: Document CONF_CFLAGS under 'makeoptions'
This variable serves to tweak CFLAGS from the kernel configuration file,
easing some custom kernel builds. It was introduced by bde@ in 1999.
The description has been kept simple on purpose. It does not completely
reflect reality as the build infrastructure actually appends variables
to CFLAGS after CONF_CFLAGS has been processed in a few cases. However,
these cases do not collide with expected common uses of CONF_CFLAGS, so
have not been mentioned.
Reviewed by: markj (older version)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50544
(cherry picked from commit 1bdf1b8186359d4ea26e26de03e03b7c1543b707)
Event: Kitchener-Waterloo Hackathon 202506
mac_do(4): Bump .Dd to reflect latest update
MFC with: 94828b338033 ("mac_do(4): Examples: Fix some descriptions and a typo")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7747d826573a38e6caa06619f5596b792dc5a976)
Event: Kitchener-Waterloo Hackathon 202506
mac_do(4): Examples: Fix some descriptions and a typo
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 94828b33803314b5c8e833b233ca6894a340aa88)
Event: Kitchener-Waterloo Hackathon 202506