locking.9: warn about using sleepable lock address as a sleep channel
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D57012
nullfs: do not allow to mount a vnode over itself
This causes recursion in VFS that is not worth handling.
PR: 275570
Reported by: Alex S <iwtcex at gmail.com>
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57043
linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8
For Linux binaries, sopt->sopt_td may be null. And there's also no
need to check it, since struct l_ucred has the same layout on 32-bit
systems as on 64-bit ones.
PR: 295333
Reported by: Miguel Gomes <miguel.dias.gomes at protonmail.com>
Fixes: 1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode")
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D57032
ipfw: treat ipv6 address with zero mask as 'any'
Make the behaviour similar for both IPv4 and IPv6. Also add
the corresponding tests.
PR: 294733
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56618
nfsd: Disable use of callbacks for NFSv4.0
Commit 71ac1ec5c9d9 disabled callbacks for the NFS
client for NFSv4.0. This patch does the same for
the NFSv4.0 server.
The only use for callbacks for NFSv4.0 is delegations
and delegations rarely work well for NFSv4.0 anyhow.
Therefore, this patch disables callbacks for the
NFSv4.0 server. This is the same behavior as
occurs when vfs.nfsd.issue_delegations is 0.
This change allowed the functions called
nfsrv_getclientipaddr() and nfsrv_getipnumber() to be
removed from the kernel.
(cherry picked from commit 457c621add0a531273ee27798c924c6aaeacc4c1)
sys/mount.h: restore KNF_NOKQLOCK in VFS_KNOTE_{,UN}LOCKED() call to KNOTE()
ZFS needs to take internal sleepable lock in its implementation of
VOP_GETATTR(). Due to this, kq must be unlocked around calls to the vfs
filter methods.
Fixes: 1d5e4020e36e ("vnode: add VIRF_KNOTE flag")
Reported and tested by: des
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
x86: remove sys/mount.h from genassym.c
The header is not needed, and causes some issues with build because it
requires vnode_if.h generated due to transient dependency from vnode.h.
While there, remove unneeded explicit sys/cdefs.h and sys/param.h usage.
Reported and tested by: thierry
Fixes: 1d5e4020e36e ("vnode: add VIRF_KNOTE flag")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
rtnetlink: Check for allocation failure in nlattr_get_multipath()
Check for alloction failure on `npt_alloc()` for RTA_MULTIPATH
attributes in `nlattr_get_multipath()`.
Reported by: Joshua Rogers of AISLE Research Team
Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56954
(cherry picked from commit 188631e43a1a5d2985156141c2e244a925670683)
rtnetlink: Align RTA_MULTIPATH length validation in nlattr_get
Fix length validation of RTA_MULTIPATH attributes in
nlattr_get_multipath() by making sure the user request is align.
PR: 295102
Reported by: Robert Morris <rtm at lcs.mit.edu>
Reviewed by: markj
Fixes: 7e5bf68495cc ("netlink: add netlink support")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56963
(cherry picked from commit 4329663a861ef74796b79b6b0872cfe10d31c591)
amd64/ptrace-sce-tamper test: get rid of PT_TRACE_ME
PT_TRACE_ME is only useful in combination with exec and there is no
exec in this test.
Signed-off-by: Alex S <iwtcex at gmail.com>
MFC after: 1 week
EC2: Don't enable firstboot_pkgs in small flavour
The EC2 "base" flavour installs the devel/py-awscli package at boot
time by default; we don't do this in the "small" flavour, so the
default behaviour was to update the FreeBSD-ports repository and
then do nothing with it.
Turn off firstboot_pkgs by default; if someone is using the "small"
flavour of AMIs and wants to install packages at instance launch
time, they simply need to add 'firstboot_pkgs_enable="YES"' to
/etc/rc.conf (which they must already be editing via user-data, in
order to provide the list of packages they want installed).
Sponsored by: Amazon
MFC after: 3 days
MFC to: stable/15
Relnotes: EC2 "small" images now have firstboot_pkgs_enable="NO".
pfctl: relax interface name requirement
The FreeBSD network stack, for better or worse, does not impose any
requirements on interface names. As such it's valid for an interface
name to start with a number (or indeed, be something like '⭐').
Allow this in pfctl, and add a test case for the specific case of
interface names starting with a number.
Note that we don't support UTF-8 names fully, so those may still fail.
PR: 295064
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 4e7c1ff95a5187faee524055f22c4cf4134d1147)
thunderbolt: make code -Wunused clean
This change modifies code paths and uses `__diagused` to address `-Wunused`
issues that occur when `THUNDERBOLT_DEBUG` == `0`.
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D55575
net80211: define a type for rssi values
Due to net80211 keeping values in 0.5dBm relative to the noise floor
an int8_t is not good enough to prevent a double wrap around, which
means the reported rssi values can be wrong (see D50928 or likely
a commit in the future for more information).
In order to address the problem and not break the userspace API,
start by defining a type within the kernel and use that. In a
next step we will then update the int8_t to int16_t to avoid the
problem up to the ioctl code. This will then allow us to work
on the the user space API indepedently (see PR 293016 for possible
impact outside the base system).
No functional changes intended.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57021
wtap: use typed rssi and noise floor values
Adjust the rssi and nf arguments to typed int8_t and adjust the maths
for rssi to be consistant with what net80211 expects.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: lwhsu, adrian
Differential Revision: https://reviews.freebsd.org/D57020
man: iwlwifi/rtw88/rtw89: update man pages for Linux v7.0 based updates
For all:
- harmonize Copyright/license section according to style.9 and used
SPDX only.
- mention that the current generation of the driver is based on
Linux version 7.0.
- make linuxkpi.4 and linuxkpi_wlan.4 .Xr as the man pages do exist
these days.
iwlwifi: update the card/chipset names supported (while we still can)
iwlwififw: leave a comment only that we can no longer update the
man page and it will be removed in the future.
rtw88: update supported chipsets and add note to BUGS sections
rtw89: update supported chipsets and add note to BUGS sections
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: ziaee
Differential Revision: https://reviews.freebsd.org/D57019