Commit Graph

306152 Commits

Author SHA1 Message Date
Viacheslav Chimishuk 0a5535d1c5 grep: add testcase to test color when matches is greater than MAX_MATCHES
Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/1442
2026-01-09 16:22:48 -07:00
Krzysztof Galazka a3d472219c ixl(4): Enable building driver on ARM64
For consistency with other drivers enable building ixl
on ARM64 target.

Please be advised that it is only compile tested.
Intel will continue to test Ethernet drivers only on x86-64
platforms, and is not going to provide support for issues,
which cannot be reproduced in such environment.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Suggested by:	Dave Cottlehuber <dch@FreeBSD.org>
Reviewed by:	manu
Approved by:	kbowling (mentor)
MFC after:	2 weeks
Sponsored by:   Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D54289
2026-01-09 23:43:22 +01:00
Dmitry Borisov 247d24a694 ata-serverworks: Fix incorrect port count for BCM5770 SATA controller
The 1166:0241 PCI device has 8 ports instead of 4.

Signed-off-by: Dmitry Borisov <di.sean@protonmail.com>
Reviewed by: imp, jlduran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1883
2026-01-09 14:23:42 -07:00
Alex S d5e5fed1ed linux: add hidraw ioctl handler
First step towards getting the Linux version of SDL with HIDAPI gamepad
drivers to work. Not quite complte as SDL expects to find some
information in sysfs as well.

Signed-off-by: Alex S <iwtcex@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1938
2026-01-09 14:18:16 -07:00
kitkat1424 7b3fb3caef loader.efi(8): clarify UEFI boot path and boot1.efi usage
Reorganise and clarify the legacy role of boot1.efi in DESCRIPTION to
improve clarity.

Add a minor missing word in the BUGS section ["...caution is required*..."].

See also - PR: 290794

Signed-off-by: Aaditya Singh <aadityavksingh@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1939
2026-01-09 14:16:24 -07:00
Simon Wollwage 54ce6b2c4c login.conf.5: Remove mention of login copyright setting
PR: 291649
Fixes: 905571c031 ("Remove copyright strings printed at login time via login(1) or sshd(8).")
Signed-off-by: Simon Wollwage rootnode+freebsd@wollwage.com
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1926
2026-01-09 14:13:37 -07:00
Simon Wollwage 4b2a8aab43 getopt(3): be more explicit about :: extension
Make it possible to search for literal two colons (::) and actually
find something.  Make the "x"/"x:"/"x::" examples more explicit and
more visibile.

Signed-off-by: Simon Wollwage <rootnode+freebsd@wollwage.com>
Obtained from:	NetBSD, nbuwe <uwe@stderr.spb.ru>, 856d5b6
PR: 291374
Reviewed by: imp, jlduran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1923
2026-01-09 14:02:23 -07:00
mothcompute 85bf328868 linux: support termios2 ioctls
Signed-off-by: mothcompute <mothcompute@protonmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1949
2026-01-09 13:58:25 -07:00
Quentin Thébault e881b8ee0b acpi_ibm: register all appropriate sysctls as uint
All sysctls except thermal sensor readings and the handlerevents
whitelist-separated string are bitmasks or small integers. This avoids some
bitmasks being erroneously displayed as negative values.

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1824
2026-01-09 13:54:27 -07:00
Alexey Sukhoguzov f0d44ee06b nvme: Add APST payload overriding
The apst_data tunable allows APST configuration to be adjusted
during controller initialization.  It accepts an array of encoded
integers, each defining specific transition parameters.

Relnotes: YES
Signed-off-by: Alexey Sukhoguzov <sap@eseipi.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1444
2026-01-09 13:32:59 -07:00
Alexey Sukhoguzov a24932dcec nvme: Support Autonomous Power State Transition (APST)
APST is an optional NVMe power-saving feature that allows devices
to autonomously enter higher non-operational power states after a
certain amount of idle time, reducing the controller's overall power
consumption.

Signed-off-by: Alexey Sukhoguzov <sap@eseipi.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1444
2026-01-09 13:32:49 -07:00
Alexey Sukhoguzov 4c18ec0e75 nvme: Handle get/set feature payloads
Signed-off-by: Alexey Sukhoguzov <sap@eseipi.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1444
2026-01-09 13:32:48 -07:00
Jack Bendtsen 7631790422 Fix NULL deref segfault in bhyve's usb_mouse.c
Some of the cases inside umouse_request() (usr.sbin/bhyve/usb_mouse.c)
use the data component of an event, while only partially checking if
it's NULL. 'data' has a NULL check, but then 'data' is immediately
deferenced anyway after the check regardless of if it's NULL or not.

For example:
	case UREQ(UR_GET_STATUS, UT_READ_INTERFACE):
	case UREQ(UR_GET_STATUS, UT_READ_ENDPOINT):
		DPRINTF(("umouse: (UR_GET_STATUS, UT_READ_INTERFACE)"));
		if (data != NULL && len > 1) {
			USETW(udata, 0);
			data->blen = len - 2;
			data->bdone += 2;
		}
		eshort = data->blen > 0;
		break;

There are actually four occurrences of this same bug, each in a
different case in this switch block.

Signed-off-by: Jack Bendtsen <jackdbendtsen@gmail.com>
PR: 282237
Reviewed by: imp, jhb, vexeduxr
MFC After: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1728
2026-01-09 13:17:13 -07:00
Lakshmikanth Ayyadevara 3e72ce4081 Cron: add CC and BCC option for crontab variables
Signed-off-by: Lakshmikanth Ayyadevara <lakshmikanth.a.ayyadevara@oracle.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1865
2026-01-09 13:17:12 -07:00
Ankush Mondal 5395471516 df: Fix -k flag consistency with other BLOCKSIZE flags
This patch resolves inconsistent behavior between the -k option and
other related flags, including -P. Previously, using -k resulted in
output displayed in 1024-byte blocks, which did not align with the
behavior of similar options such as -m and -g, where output is shown in
1M-blocks and 1G-blocks respectively.

The updated implementation ensures that -k now correctly displays sizes
in 1K-blocks. In addition, the patch incorporates the POSIX requirement
that when both -k -P are specified, the block size must be explicitly
forced to 1024-blocks.

Together, these changes make the behavior of -k consistent, predictable,
and compliant with the standard.

Signed-off-by: Ankush Mondal <mondalankush9851@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1906
2026-01-09 13:17:12 -07:00
Minsoo Choo 2727bdebb3 sdio: add sdio_{read,write}_2
This is equivalent of sdio_readw and sdio_writew in linuxkpi

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1951
2026-01-09 13:17:12 -07:00
AZero13 930a1341d6 device_delete_child should be destroying the child, not the dev
MFC After: 1 week
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1934
2026-01-09 13:17:12 -07:00
Minsoo Choo 9cdb2eb668 lib: remove powerpcspe
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1914
(cherry picked from commit 907cf3e4378f9d114af41d05a59ef4a075d3efb0)
2026-01-09 15:11:23 -05:00
Minsoo Choo c5d4a124d0 conf: remove powerpcspe
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1914
(cherry picked from commit 4a5a1c17ac43356fae053524187bb16f8fc1ac70)
2026-01-09 15:11:22 -05:00
Minsoo Choo f69fb0f830 conf: remove MPC85XXSPE
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1914
(cherry picked from commit 40a49bccf388494f9685a81cfa781050f5f8bb1f)
2026-01-09 15:11:22 -05:00
Minsoo Choo 81516ef418 param.h: remove powerpcspe
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1914
(cherry picked from commit 1bfae8b50814697ac12bc8879ad8013e7ffd77b2)
2026-01-09 15:11:22 -05:00
Minsoo Choo fa6736526e stand: remove powerpcspe linker script
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1914
(cherry picked from commit 9c72e8e3500408f7ce5fc7be500dd3efc0307674)
2026-01-09 15:11:22 -05:00
John Hall c558eca479 smartpqi: update to version 4660.0.2002
This updates the smartpqi driver to Microchip's
latest available public release.

Reviewed by: imp
Approved by: imp

Sponsored by: Microchip Technology Inc.

Differential Revision: https://reviews.freebsd.org/D52507
2026-01-09 10:39:58 -07:00
Ali Mashtizadeh bae8324870 libpmc: Import AMD Zen 5 PMU events.
Sponsored by:		Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1954
2026-01-09 10:37:36 -07:00
Olivier Certner 67599eef01 sys/x86/NOTES: Add vt_efifb
Contrary to what is stated in commit f224591746 ("Add ASMC_DEBUG make
option"), the various NOTES files should list all available options.

Since vt_efifb is supported also on i386, add it back to x86/NOTES
instead of amd64/NOTES.

Fixes:          f224591746 ("Add ASMC_DEBUG make option")
Sponsored by:   The FreeBSD Foundation
2026-01-09 17:34:56 +01:00
Olivier Certner fde9fe1821 i386: Fix kernel compilation after introduction of ASMC_DEBUG option
Fixes:          f224591746 ("Add ASMC_DEBUG make option")
Sponsored by:   The FreeBSD Foundation
2026-01-09 17:34:56 +01:00
Olivier Certner 730b3e2006 ps(1): Sort headers
Found these changes by chance in an old patch file.  Should have been
committed along with the ps(1) modifications done in March 2025.

No functional change (intended).

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
2026-01-09 17:34:51 +01:00
Minsoo Choo 7a00382beb release: remove powerpcspe
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	jhibbits, emaste
Pull request:	https://github.com/freebsd/freebsd-src/pull/1914
2026-01-09 11:29:43 -05:00
Minsoo Choo 94d1731e73 Makefile*: remove powerpcspe
As reported on the freebsd-announce mailing list[1] FreeBSD is
continuing to retire 32-bit support.  Remove powerpcspe from build
infrastructure.

[1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	jhibbits, emaste
Pull request:	https://github.com/freebsd/freebsd-src/pull/1914
2026-01-09 11:28:43 -05:00
Minsoo Choo 0f937f171a tools: remove powerpcspe
As reported on the freebsd-announce mailing list[1] FreeBSD is
continuing to retire 32-bit support.  Remove powerpcspe from boot test
tools.

[1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by:	jhibbits, emaste
Pull request:	698d3c98d8f5814f705908d5bc6d930e3d4c4eda
2026-01-09 11:28:33 -05:00
Brooks Davis 0a64d16cef sys/_types.h: avoid use of __has_feature()
Only fairly recent GCC versions support and sys/_types.h must work with
quite old compilers and without sys/cdef.h being included.  The prior
workaround works fine, but we can have the same effect with compiler
macro definitions.  In this specific case, compilers that define the
__intcap_t builtin type will define __SIZEOF_INTCAP__.

This reverts commit 029a09f180
This reverts commit 19728f31ae

Reviewed by:	imp, des, kib, emaste
Effort:		CHERI upstreaming
Fixes:		85ab981a8e ("sys/_types.h: define fallback __(u)intcap_t")
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D54009
2026-01-09 14:42:00 +00:00
Brooks Davis 31e7dc6b9a iflib: remove convoluted custom zeroing code
Replace a collection of aliasing violations and ifdefs with memset
(which now expands to __builtin_memset and should be quite reliably
inlined.)  The old code is hard to maintain as evidenced by the most
recent change to if_pkt_info_t updating the defines, but not the zeroing
code.

Reviewed by:	gallatin, erj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Fixes:		43d7ee540e ("iflib: support for transmit side nic KTLS offload")
Differential Revision:	https://reviews.freebsd.org/D54605
2026-01-09 14:19:49 +00:00
Brooks Davis 1b425afa8d cache: avoid hardcoded CACHE_PATH_CUTOFF
Compute the cutoff at compile time instead which will avoid the need
for a CHERI case.

Correct the comment about CACHE_PATH_CUTOFF.  It dates to 5.2.0 not 4.4
BSD.  Historic values are:

32 - introduced (c2935410f6)
35 - NUL terminated and bumped (5d5c174869)
39 - sized to alignment (bb48255cf5)
45 - bumped to improve efficency on 64-bit (3862838921)

No functional change.

Reviewed by:	markj
Suggested by:	jhb
Effort:		CHERI upstreaming
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D54554
2026-01-09 14:15:43 +00:00
Brooks Davis 258ad80092 cache: avoid hardcoded cache padding
Replace CACHE_LARGE_PAD with rounding up to the alignment of struct
namecache_ts.

No functional change.

Reviewed by:	olce, markj
Suggested by:	jhb
Effort:		CHERI upstreaming
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D54553
2026-01-09 14:15:35 +00:00
Brooks Davis fb0bdbea2e cache: avoid hardcoded zone alignment
Previously, this was underaligned on CHERI system where pointers are
larger than time_t.

Use the alignment of struct namecache_ts which picks up time_t via strut
timespec and pointers via struct namecache.  This arguably overaligns
cache_zone_small and cache_zone_large on i386 kernels, but I suspect the
actual microarchitectures most i386 binaries are run on do better with
64-bit alignment.

Reviewed by:	olce, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Fixes:		cf8ac0de81 ("cache: reduce zone alignment to 8 bytes")
Differential Revision:	https://reviews.freebsd.org/D54376
2026-01-09 14:15:22 +00:00
Sreekanth Reddy 821c6c43a3 librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure
Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA
provider library.

This change:

 -Registers libbnxtre in src.libnames.mk so it is built and installed as part
  of the OFED libraries.
 -Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled.
 -Declares proper dependency mappings for bnxtre (ibverbs, pthread).
 -Introduces LIBBNXTREDIR for consistent object directory handling.
 -Updates libibverbs and librdmacm build rules to link against libbnxtre,
  enabling Broadcom RoCE device support at runtime.
 -libbnxtre library uses below constructor to register with the libibverbs,
  static attribute((constructor)) void bnxt_re_register_driver(void)

These updates ensure that applications using libibverbs and librdmacm can
discover and use Broadcom bnxt RDMA devices on FreeBSD.

Reviewed by: markj, ssaxena
Differential Revision: https://reviews.freebsd.org/D54368
MFC after: 3 days
2026-01-09 12:34:02 +00:00
Sumit Saxena 702b3a9a03 Revert "librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping"
The commit message has to be rewritten as it is not clear and lacks
some key details about the change.

This reverts commit 35dd53a9e1.

Reported by: jrtc27
2026-01-09 12:33:45 +00:00
Sumit Saxena d53d7b4660 bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN
The driver and applications currently use hard-coded numeric ioctl command
opcodes. These opcodes are interpreted as having the IOC_IN direction (data
copied from the user application to the driver), regardless of the actual packet
size. Consequently, when the packet size is zero and the direction is set to
IOC_IN, the kernel fails these ioctls if COMPAT is disabled.

While the driver and applications should ideally set the direction correctly—
for example, using IOC_VOID when the packet size is zero—the driver will now
be updated to define ioctl opcodes using the _IOC macro to support both
IOC_VOID and IOC_IN. This change ensures backward compatibility with older
applications that exclusively use IOC_IN.

Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D54601
MFC after: 3 days
2026-01-09 10:40:18 +00:00
Juraj Lutter a556feb997 freebsd-base.7: Fix stray -r
Remote stray "-r" from the example of installing a toolchain
to alternate root.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D54611
2026-01-09 10:41:21 +01:00
Baptiste Daroussin d64db8892f release: make sh the default shell
The default shell for root has been changed to sh(1) followup changing
in release images sh(1) the shell for the "freebsd" user.

MFC After:	1 week
Reviewed by:	manu, emaste (re)
Approved by:	manu, emaste (re)
Differential Revision:	https://reviews.freebsd.org/D54602
2026-01-09 09:07:20 +01:00
Warner Losh 92f251f36b cam: Dtrace scripts to help diagnose weird things
These are sample dtrace scripts that likely need to be modified for
whatever problem you are chasing. Unfortuneately, you have to read the
driver extensively to understand them or how to use them. But studying
the completion routine of mpr/mps will help understand many of the error
and recovery paths.

Sponsored by:		Netflix
2026-01-08 23:11:10 -07:00
Warner Losh 0e80273f0d mpr: Add a probe on completion
cam::mpr:complete(union ccb *, struct mpr_command *, u_int, u32);
    Where u_int is scsas->flags u32 is the device_info.

This can't be done as an fbt because the data needed for it isn't
present out a function boundary.

Sponsored by:		Netflix
2026-01-08 23:03:38 -07:00
Warner Losh 6f8e117e5d mps: Add a probe on completion
cam::mps:complete(union ccb *, struct mps_command *, u_int, u32);
    Where u_int is scsas->flags u32 is the device_info.

This can't be done as an fbt because the data needed for it isn't
present out a function boundary.

Sponsored by:		Netflix
2026-01-08 22:55:32 -07:00
Warner Losh d650b2ceda mps/mpr: Remove bogus sys/cdefs.h includes
These are left over from the $FreeBSD$ stuff.

Sponsored by:		Netflix
2026-01-08 22:54:44 -07:00
Graham Perrin d1f93ea2e1 pkgbase.7: Show pkg upgrade to apply updates
MFC after:	3 days
Reviewed by:	ziaee
Closes:		https://github.com/freebsd/freebsd-src/pull/1945
2026-01-08 23:49:40 -05:00
Warner Losh b258282ecc kshim/usb: Prefer memset to bzero
Replace bzero with the equivalent memset(x,0,x) since the latter is
available in the kshim environment and we have a soft goal of migrating
to standard interfaces when there's a reason...

Sponsored by:		Netflix
2026-01-08 21:42:34 -07:00
Rick Macklem a6d57f312f nfsd: Fix handling of hidden/system during Open/Create
When an NFSv4.n client specifies settings for the archive,
hidden and/or system attributes during a Open/Create, the
Open/Create fails for ZFS.  This is caused by ZFS doing
a secpolicy_xvattr() call, which fails for non-root.
If this check is bypassed, ZFS panics.

This patch resolves the problem by disabling va_flags
for the VOP_CREATE() call in the NFSv4.n server and
then setting the flags with a subsequent VOP_SETATTR().

This problem only affects FreeBSD-15 and main, since the
archive, system and hidden attributes are not enabled
for FreeBSD-14.

I think a similar problem exists for the NFSv4.n
Open/Create/Exclusive_41, but that will be resolved
in a future commit.

Note that the Linux, Solaris and FreeBSD clients
do not set archive, hidden or system for Open/Create,
so the bug does not affect mounts from those clients.

PR:	292283
Reported by:	Aurelien Couderc <aurelien.couderc2002@gmail.com>
Tested by:	Aurelien Couderc <aurelien.couderc2002@gmail.com>
MFC after:	2 weeks
2026-01-08 08:27:32 -08:00
Mark Johnston 0aaa95ae02 vmm: Add an include to vmm_ktr.h for vm_name()
Required when KTR is configured.

Remove the pcpu.h include while here, as it seems to be unneeded.

Reported by:	Jenkins
Fixes:		5f13d6b607 ("vmm: Move common accessors and vm_eventinfo into sys/dev/vmm")
2026-01-08 23:29:06 +00:00
Mark Johnston 5f13d6b607 vmm: Move common accessors and vm_eventinfo into sys/dev/vmm
Now that struct vm and struct vcpu are defined in headers, provide
inline accessors.  We could just remove the accessors outright, but they
don't hurt and it would result in unneeded churn.

As a part of this, consolidate definitions related to struct
vm_eventinfo as well.  I'm not sure if struct vm_eventinfo is really
needed anymore, now that vmmops_run implementations can directly access
vm and vcpu fields, but this can be resolved later.

No functional change intended.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53586
2026-01-08 21:54:16 +00:00
Mark Johnston ed85203fb7 vmm: Deduplicate VM and vCPU state management code
Now that the machine-independent fields of struct vm and struct vcpu are
available in a header, we can move lots of duplicated code into
sys/dev/vmm/vmm_vm.c.  This change does exactly that.

No functional change intended.

MFC after:	2 months
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53585
2026-01-08 21:54:06 +00:00