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
openssh: Add reference for another local patch
A bug fix was committed locally and submitted upstream. Document it in
our upgrade instructions, as these sometimes take a long time before
getting merged.
Sponsored by: The FreeBSD Foundation
sound: Force-disable hw.snd.compat_linux_mmap by default
Eventually this hack will be removed, so start by disabling it by
default.
Sponsored by: The FreeBSD Foundation
MFC after: 12 months
Reviewed by: emaste
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
sound: Improve hw.snd.compat_linux_mmap
- Reject PROT_EXEC in all cases when Linux support is not compiled in.
- Define sysctl only when Linux support is compiled in.
- Document better.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: emaste
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/29
sound: Fix lock order reversal in dsp_poll()
chn_poll() may hold both rdch and wrch channel locks while calling
chn_trigger(rdch). chn_trigger() switches the lock order from
"channel -> dsp dev" to "dsp dev -> channel" by temporarily dropping
the channel lock before acquiring the dsp lock.
However, only rdch was unlocked during the transition while wrch
remained locked. Since wrch is also a channel lock and witness had
already established the lock order requirement:
dsp dev -> channel
witness reports a lock order reversal when pcm_lock() is acquired while
wrch is still held.
Avoid holding rdch and wrch simultaneously during chn_trigger()
lock-order switching by only keeping the channel locks when needed.
[7 lines not shown]
bhyve.8: Fix formatting of -G's "w" prefix
"w" is a command modifier, not an argument. Use Cm.
Fixes: 2cdff9918e79 byhve: add option to specify IP address for gdb
MFC after: 3 days
linux: Fix some problems with header pollution
- Avoid including sys/proc.h in linux_vdso_gtod.c. It's not needed, but
the implicit inclusion of sys/param.h via sys/ucred.h->bsm/audit.h was
bringing in some required definitions.
- Include a couple of required headers: sys/time.h (for struct bintime),
and limits.h (for INT_MAX).
- Move some helpers from linux.h, which depend on sys/param.h for NODEV,
to the one CU where they're actually used.
No functional change intended.
Reviewed by: imp, kib, emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D56982
Cloud releases: Switch to firstboot_pkg_upgrade
Cloud images are deployed with base system packages. Introduce a
firstboot package auto updater to patch the base system on first boot.
Approved by: re (cperciva)
MFC after: 1 hour
MFC to: stable/15
Reviewed by: cperciva
Sponsored by: Google Cloud
Differential Revision: https://reviews.freebsd.org/D56890
(cherry picked from commit 464a351267dc0d1843b919dd72ad1c70c24815ce)
(cherry picked from commit 0bb2b2a45f3c0c147d7c55e010be45e55af8df87)
Cloud releases: Switch to firstboot_pkg_upgrade
Cloud images are deployed with base system packages. Introduce a
firstboot package auto updater to patch the base system on first boot.
MFC after: 1 hour
MFC to: stable/15
Reviewed by: cperciva
Sponsored by: Google Cloud
Differential Revision: https://reviews.freebsd.org/D56890
(cherry picked from commit 464a351267dc0d1843b919dd72ad1c70c24815ce)
nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes
Without this patch, the maximum setting for
vfs.nfsd.srvmaxio was 1Mbyte. This patch increases
that to 4Mbytes.
The same as for any setting above 128Kbytes, settings up to
4Mbytes require that kern.ipc.maxsockbuf be increased.
(A message generated after setting vfs.nfsd.srvmaxio via
the /etc/rc.conf variable nfs_server_maxio will indicate
the minimum setting, which will be somewhat greater than
four times the setting of vfs.nfsd.srvmaxio.)
Requested by: Cedric Blancher <cedric.blancher at gmail.com>
MFC after: 2 weeks
Fixes: 13d3bd165e22 ("subr_uio.c: Remove a KASSERT() for large NFS server I/O")
subr_uio.c: Remove a KASSERT() for large NFS server I/O
When the NFS server is set to allow an I/O size greater
than 1Mbyte (not allowed in FreeBSD's main yet), a
KASSERT() in allocuio() can fail when:
zfs_freebsd_write()->zfs_write()->zfs_uiocopy()
->cloneuio()->allocuio()
is called for a large NFS server write.
Since the userland API callers to allocuio() already
check that the size does not exceed UIO_MAXIOV,
there does not seem to be a need to a KASSERT()
here.
Removing the KASSERT() allows NFS server writes
of greater than 1Mbyte to work, once the NFS code
is patched to allow them.
Reviewed by: kib
[2 lines not shown]
Cloud releases: More firstboot_pkg_upgrade
Update a couple more cloudware images which I forgot about earlier.
Reviewed by: ziaee
Fixes: 464a351267dc ("Cloud releases: Switch to firstboot_pkg_upgrade")
Differential Revision: https://reviews.freebsd.org/D57006
Cloud releases: Switch to firstboot_pkg_upgrade
Cloud images are deployed with base system packages. Introduce a
firstboot package auto updater to patch the base system on first boot.
MFC after: 1 hour
MFC to: stable/15
Reviewed by: cperciva
Sponsored by: Google Cloud
Differential Revision: https://reviews.freebsd.org/D56890
nuageinit: fix command injection and related issues
- Add shell_escape() helper to safely escape shell arguments
- Apply shell_escape to all user-controlled values in shell commands:
adduser (usershow, useradd, lock, primary_group, groups)
addgroup (groupshow, groupadd, members)
exec_change_password (usermod)
settimezone (tzsetup root and timezone)
install_package (pkg package names)
- Escape double quotes in hostname when writing rc.conf.d/hostname
- Add missing 'local' declaration for resolvconf_command in nameservers()
- Escape interface name in resolvconf -a command
- Change open_resolvconf_conf() from 'w' to 'a' mode to prevent
data loss when nameservers() is called multiple times
- Clean up stale resolvconf.conf at the start of each boot
(skip on postnet to preserve config written by first call)
Approved by: re (cperciva)
MFC After: 1 day
[3 lines not shown]