Commit Graph

306152 Commits

Author SHA1 Message Date
Kyle Evans 92b7366e43 mac: add macros for 5-argument SDT probes
A last-minute change to the jail MAC entry points in D53954 is going to
pass the jail_[gs]et(2) flags to mac_prison_check_[gs]et() so that a
policy can, e.g., reject or allow a change if the intent is to
immediately attach, or disallow some fetching of dying jails.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D54658
2026-01-15 18:23:39 -06:00
Kyle Evans 11d6ea47f0 kern: mac: add a MAC label to struct prison
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D53953
2026-01-15 18:23:39 -06:00
Rick Macklem 4fc11c92d3 nfsd: Fix handling of attributes during Open/Create/Exclusive_41
When an NFSv4.n client specifies settings for attributes other
mode during a Open/Create/Exclusive_41, these other attributes
were not being set.

This patch resolves the problem by calling nfsrv_fixsattr()
after the VOP_CREATE() call in nfsvno_open() for this case.

There is no extant NFSv4.n client that currently does this,
as far as I know.

MFC after:	2 weeks
2026-01-15 15:27:22 -08:00
Gleb Smirnoff 51786cdeb0 sockets: remove unused pr_sosend_notsupp(), pr_soreceive_notsupp() 2026-01-15 13:57:31 -08:00
Gleb Smirnoff 77f453e9f9 tests/if_ovpn: add missing cleanup to the multihome6 test
Fixes:	0bfcfb3cb1
2026-01-15 13:40:33 -08:00
Gleb Smirnoff f9ae08a889 linux: on vnet detach call clean_unrhdr(9) always
The assumption was incorrect, and the current VIMAGE implementation leaves
a possibility for some interfaces still exist in a jail that is going
away.

Fixes:	607f11055d
2026-01-15 13:37:34 -08:00
Jose Luis Duran ce8cd5dab3 mtree: debug: Add missing krb5 entries
Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54681
2026-01-15 19:26:39 +00:00
John Baldwin 5bd84c4f0d acpi: Add a function to deregister all ioctl commands using the same function
This simplifies detach/cleanup for drivers that add multiple ACPI ioctls.

Reviewed by:	imp
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D54420
2026-01-15 13:24:08 -05:00
John Baldwin 6d6bf4a892 rtld: Use a helper variable to simplify a few lines
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54507
2026-01-15 13:23:42 -05:00
John Baldwin 4ba8df2a8b .github: Narrow sys/crypto warning to sys/crypto/skein
This is the only subdirectory of sys/crypto that is a vendor import.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D54719
2026-01-15 13:23:07 -05:00
Christos Margiolis 241a43cf9d virtual_oss: Take MK_CUSE into account
Reported by:	brooks
Fixes:		f74f891581 ("src.opts: Introduce MK_SOUND")
Sponsored by:	The FreeBSD Foundation
MFC after:	4 days
Reviewed by:	brooks, emaste
Differential Revision:	https://reviews.freebsd.org/D54708
2026-01-15 19:54:22 +02:00
Christos Margiolis 37164224ee libexec/rc/rc.d/Makefile: Remove duplicate mixer entry
Fixes:		f74f891581 ("src.opts: Introduce MK_SOUND")
PR:		292436
Sponsored by:	The FreeBSD Foundation
MFC after:	4 days
Reviewed by:	ivy, emaste
Differential Revision:	https://reviews.freebsd.org/D54706
2026-01-15 19:53:55 +02:00
Kristof Provost 21d666a193 if_ovpn: add interface counters
Count input/output packets and bytes on the interface as well, not just
in openvpn-specific counters.

PR:		292464
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-01-15 17:18:27 +01:00
Andrew Turner fb96702a03 depend-cleanup.sh: Clean up the old arm64 memset.S
This has moved from a generated file in objdir to the source tree.
Remove the old file and any .depend files that reference it.

Reviewed by:	bapt (via IRC)
Fixes:	41ccf82b29 ("libc/aarch64: Use MOPS implementations of memcpy/memmove/memset where availble")
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54729
2026-01-15 15:05:28 +00:00
Johan Söllvander faa31fc0e7 netstat: Remove padding from cc and stack fields
Trim white space padding that gets added libxo fields cc and stack when
using -C and -c.

The padding is only visible if you're using multiple stacks or
congestion algorithms.

PR:             292262
MFC after:      5 days
Reviewed by:    asomers, tuexen
Approved by:    asomers (mentor)
Differential Revision:  https://reviews.freebsd.org/D54709
2026-01-15 15:21:07 +01:00
Mark Johnston 8bc63f01e3 nvme: Fix a typo
Fixes:	73c921ef1d ("nvme: Add ability to override ioq to put the request on")
2026-01-15 14:13:50 +00:00
Mark Johnston 6740cccb1e arm64/iommu: Fix a resource leak in smmu_domain_alloc()
We should free the allocated ASID if smmu_init_cd() fails.

Move the allocation of "domain" to simplify the first error path.

Reported by:	Kevin Day <kevin@your.org>
Reviewed by:	br
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54676
2026-01-15 14:04:19 +00:00
Mark Johnston 6fef0c9ee6 arm64/vgic_v3: Fix an inverted test when reading GICD_I<C|S>ENABLER
On read, these registers' fields return 1 if forwarding of the
corresponding interrupt is enabled, and 0 otherwise.  The test in
read_enabler() was inverted.

Reported by:	Kevin Day <kevin@your.org>
Reviewed by:	andrew
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54678
2026-01-15 14:04:06 +00:00
Mark Johnston 251662e5ab linuxkpi: Clean up linux_shmem_file_setup() a bit
- Free the pointer that was returned by the allocator, instead of the
  address of the first member.  These will be equal in practice, but
  it's sketchy and won't work on CHERI with subobject bounds checking.
- Use an anonymous struct, there's no need to name it.

Reviewed by:	bz, brooks, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54673
2026-01-15 13:51:29 +00:00
Mark Johnston aa1eb62338 linuxkpi: Avoid a potential null pointer dereference in an error path
Reported by:	Kevin Day <kevin@your.org>
Reviewed by:	bz, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54672
2026-01-15 13:51:17 +00:00
Mark Johnston a4955b0143 linuxkpi: Fix an error path in linux_alloc_current()
If the allocation fails we should free the task struct.

While here get rid of a couple of unnecessary assertions.

Reported by:	Kevin Day <kevin@your.org>
Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54671
2026-01-15 13:50:43 +00:00
Mark Johnston 9d015a9167 Remove the DEBUG_VFS_LOCKS kernel option
After commit 3bd8fab241 ("vfs: Move DEBUG_VFS_LOCKS checks to
INVARIANTS"), this option has no effect.  Let's finish the removal.

There are a couple of additional uses in zfs, I will submit a separate
patch upstream for them.

Reviewed by:	mckusick, kib
Differential Revision:	https://reviews.freebsd.org/D54662
2026-01-15 13:50:20 +00:00
Hans Rosenfeld 6a6f230d31 libc/stdlib: Port strtonumx() from Illumos
Add strtonumx(), a companion to strtonum(3) that preserves its safety
and error-reporting semantics while allowing the caller to specify a
conversion base, similar to the strtol(3) family of functions.

Reviewed by:	emaste, kib, ziaee
Obtained from:	https://www.illumos.org/issues/15365
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D54270
2026-01-15 09:45:42 -04:00
Warner Losh 73c921ef1d nvme: Add ability to override ioq to put the request on
Sometimes the client device needs to manage the IOQ the request goes
to. Expand the interface we have for the request to allow it to be set
for this special use case.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D54714
2026-01-15 06:31:53 -07:00
Johan Söllvander 5d844f004f committers-src: add myself (js@) with asomers as mentor
Reviewed by:	asomers
Approved by:	asomers (mentor)
Differential Revision:	https://reviews.freebsd.org/D54715
2026-01-15 09:05:45 +01:00
Baptiste Daroussin ad553bd419 ncurses: fix cross build on MacOS 2026-01-15 07:28:28 +01:00
Jesús Daniel Colmenares Oviedo 5810786791 jexec: Add -e parameter to customize the environment
Currently, to define a new environment variable or modify an existing
one, we need to use env(1), which may or may not be available inside
the jail, especially in OCI containers created with the scratch
layer (i.e., those containers that are only a single static binary,
plus configuration files and related stuff). With this option, we
can specify environment variables of arbitrary length for the
specified process running inside the jail.

Reviewed by:                jamie@
Approved by:                jamie@
Differential Revision:      https://reviews.freebsd.org/D54660
2026-01-15 01:33:25 -04:00
Gleb Smirnoff 008e5703e1 netinet6: garbage collect OSIOCGIFINFO_IN6
This ioctl has been marked as "old" starting with the original KAME export
over 20 years ago and has been hidden under #ifdef _KERNEL since.  There
is no software that uses it.
2026-01-14 18:57:10 -08:00
Yichen Chai 75556c7e99 net80211: fix arguments to IEEE80211_NOTE in ieee80211_fix_rate
Fix the arguments to the debug statement.

(slightly adjusted from the original submission by bz)

PR:		286448
MFC after:	3 days
2026-01-14 18:51:11 +00:00
Bjoern A. Zeeb fa24602ca6 LinuxKPI: pci: fix pcie_get_speed_cap()
pcie_get_speed_cap() has a hard coded skip of 3 devices at the
beginning.  It is either called on a pdev or on a result from
pci_upstream_bridge().  In the latter case skipping another three
devices might get us to acpi0 or nexus, neither of which is a
PCI device still and pci_get_vendor() will panic() on that.

Sponsored by:	The FreeBSD Foundation (commit)
GHI:		https://github.com/freebsd/drm-kmod/issues/393
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D53862
2026-01-14 18:36:09 +00:00
Bjoern A. Zeeb f5a77dc8f8 iwlwifi/rtw89: improve module Makefile dependency on ACPI
In order to compile iwlwifi(4) and rtw89(4) on RISC-V [1] make the
currently manually tracked ACPI support option automatic based on
DEV_ACPI.
rtw89(4) is missing proper CONFIG_ACPI checks in the driver (or the
mandatory dependency on ACPI) even upstream it seems.  We just added
that check to the modules/Makefile until this is fixed.

[1] https://mail-archive.freebsd.org/cgi/getmsg.cgi?fetch=5947+0+archive/2026/freebsd-wireless/20260112.freebsd-wireless

Sponosred by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D54694
2026-01-14 18:08:39 +00:00
Bjoern A. Zeeb 4162a419a4 modules: factor out LinuxKPI based wireless drivers and add RISC-V
The LinuxKPI based wireless drivers are currently limited to amd64 and
arm64 (and until cleaned up i386).  Adding RISC-V now as we have a
report that iwlwifi(4) works on RISC-V [1]. Factor the LinuxKPI based
wireless drivers out into their own block.

Given RISC-V has no ACPI support yet (though we fixed #includes in
order to keep compiling the drivers without further modifications
where possible) we need to take care of rtw89 which fails to compile
without ACPI enabled.  A quick check at the Linux build files indicates
that the depenency is not correctly recorded there either.  Disable
compiling rtw89 without ACPI (on RISC-V) for the moment until this is
fixed.

[1] https://mail-archive.freebsd.org/cgi/getmsg.cgi?fetch=5947+0+archive/2026/freebsd-wireless/20260112.freebsd-wireless

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D54693
2026-01-14 18:08:39 +00:00
Bjoern A. Zeeb c71f18998e LinuxKPI: include acpi headers for RISC-V
In order to compile iwlwifi(4), which is reported to work on RISC-V,
include the ACPI headers to avoid adding further FreeBSD-specific #ifdefs
to the driver.  With this iwlwifi(4) just compiles on RISC-V (at least
if ACPI support is turned off in the module Makefile).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D54692
2026-01-14 18:08:39 +00:00
Bjoern A. Zeeb 0fa7b3bee7 riscv: add (a dummy) acpica_machdep.h
We have reports that iwlwifi(4) works on RISC-V.  While we can turn off
full ACPI-specific files easily, intermittent code still relies on the
header files to be present.  In order to not need to completely #ifdef
everything out we want to include acpi.h from LinuxKPI and as a result
need this file.  With this the iwlwifi(4) code compiles just fine and
will do the right thing (given the functional ACPI parts are disabled/
unavailable).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	mhorne, emaste
Differential Revision: https://reviews.freebsd.org/D54691
2026-01-14 18:08:38 +00:00
John Baldwin 3ea97c9de2 rtld: Switch to using <assert.h> for assert
The stock assert() works because rtld-libc includes a custom
implementation of __assert().

Reviewed by:	imp, kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54712
2026-01-14 12:10:33 -05:00
John Baldwin e96ec1a1eb rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointers
This is a no-op on non-CHERI architectures, but is required for CHERI
where Elf_Addr is only an address and not a complete pointer.

While here, consistently use `uintptr_t *` for arrays of init/fini
function pointers.

Reviewed by:	imp, kib
Effort:		CHERI upstreaming
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54711
2026-01-14 12:10:33 -05:00
John Baldwin 31a440a0e9 rtld: Simplify walking program headers
Store phnum in Obj_Entry instead of phsize and use that to simplify
the terminate expressions when iterating over program headers.

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54710
2026-01-14 12:10:33 -05:00
John Baldwin 2a5c5b8f7c swab: Correctly treat the data as misaligned
The __aligned attribute in the previous version applied to the location
of the pointers, not the data the pointers pointed to.  While this
could be fixed by applying the attribute to a local typedef of uint16_t,
just using memcpy() for the unaligned access is simpler and ISO C.

This fixes the build on CHERI architectures which do not support
misaligned pointers and were thus failing with:

lib/libc/string/swab.c:12:18: error: alignment (1) of 'const uint16_t *' (aka 'const unsigned short *') is less than the required capability alignment (16) [-Werror,-Wcheri-capability-misuse]
   12 |         const uint16_t *f __aligned(1) = from;
      |

Co-authored by:	Jessica Clarke <jrtc27@FreeBSD.org>
Fixes:		02ebbc781f ("swab: Fix implementation to support overlapping copies")
Sponsored by:	AFRL, DARPA

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D54399
2026-01-14 12:10:33 -05:00
Jose Luis Duran fef84fd8ae libexecinfo: tests: Expect failure on aarch64
Add a guard that expects a failure of the test on aarch64.

Reviewed by:	emaste
Fixes:		df1ea58873 ("tests: Test libexecinfo backtrace call througth signal trampoline")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54675
2026-01-14 17:07:56 +00:00
Jose Luis Duran fd26fb8987 CODEOWNERS: Add jlduran as a blocklist CODEOWNER
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D54696
2026-01-14 17:07:56 +00:00
Jonathan T. Looney 9c4a41d33b mca(4): Add man page
Reviewed by:	markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D54115
2026-01-14 16:26:45 +00:00
Konstantin Belousov 6f41575a94 tuning.7: wording fixes
Submitted by:	markj
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54572
2026-01-14 17:38:24 +02:00
Oliver Pinter 8cd687a726 tuning.7: use the correct word for collapsing
Fixes: 457b940bfb
Signed-off-by: Oliver Pinter <oliver.pntr+freebsd@gmail.com>
MFC after:	1 week
2026-01-14 17:38:18 +02:00
Baptiste Daroussin 52d19df19e nvi: import version 2.2.2 2026-01-14 16:28:57 +01:00
Jose Luis Duran b8480379ad mtree: usr: Add missing pkg/triggers entry
Reviewed by:	ivy
Fixes:		ea5e50c298 ("packages: Add a mandoc package")
Differential Revision:	https://reviews.freebsd.org/D54682
2026-01-14 14:29:35 +00:00
Jose Luis Duran 0d9fd06b03 gdb: Add missing mtree debug entry
Reviewed by:	markj
Fixes:		ea675a43f0 ("libexec/kgdb: Add new modules and install them together with debug info")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54680
2026-01-14 14:27:51 +00:00
Baptiste Daroussin 3110ba7750 Vendor import nvi 2.2.2 2026-01-14 14:57:09 +01:00
Baptiste Daroussin 68ad2b0d7a ncurses: merge update to ncurses 6.6
6.6 is ABI compatible with 6.5 (tested with abidiff)
Remove html documentation to ease updates

MFC After:	1 month
2026-01-14 14:48:32 +01:00
Baptiste Daroussin c5a1e08b52 Vendor import ncurses 6.6 2026-01-14 13:37:49 +01:00
Kristof Provost fc353e5e61 pfctl: allow new page character (^L) in pf.conf
PF configuration files can contains many things.

Using the new page characters (i.e. ^L, \014) to mark the beginning
of parts is useful because many editors such as emacs and vim has
facilities to jump next/previous ones.

PR:		86635
MFC after:	2 weeks
Submitted by:	MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
Submitted by:	Simon Wollwage <rootnode+freebsd@wollwage.com>
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-01-14 12:31:58 +01:00