Commit Graph
304046 Commits
Author SHA1 Message Date
Michael Tuexen 4ee0ddae1d sockstat: fix column length for PROTO
The computation of the length was not taking into account that IPv6
endpoints, which are not IPv6 only, have a suffix of 46.
For UDP and TCP this bug was not relevant, since tcp46 and udp46
has the same length as PROTO, but sctp46 is longer. Upcoming
udplite support will also be affected.

Reviewed by:		asomers
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D53212
2025-10-20 16:26:52 +02:00
Dmitry Luhtionov a2838e818c ehci(4): Add ID for Realtek RTL811x USB 2.0 controller 2025-10-20 10:05:05 -04:00
Dmitry Luhtionov 4c66761537 snd_hda: Add device ID for ATI Raven 2025-10-20 09:59:57 -04:00
Ed Maste b0c64ce0ea bsdinstall: Use pkgbase release URL for BETA/RC
PR:		290238
Reviewed by:	ivy
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53214
2025-10-20 09:28:49 -04:00
Martin Matuska 6e6cde8f2b zfs: merge openzfs/zfs@6ae99d269
Notable upstream pull request merges:
 #17750 6e5b836e9 FreeBSD: Correct _PC_MIN_HOLE_SIZE
 #17803 1861a329f zvol: verify IO type is supported
 #17826 51de2d76f Explicit set ashift for non-leaf vdevs
 #17830 f4276479c Suppress some ashift warnings
 #17843 6ae99d269 mmap_seek: print error code and text on failure

Obtained from:	OpenZFS
OpenZFS commit:	6ae99d2692
2025-10-20 12:30:00 +02:00
Dave Cottlehuber 81d807a906 release: split up Oracle Cloudware tools
Sometimes one or the other but not both tools are present; this ensures
that all cases are correctly handled.

Reported by:	cperciva
Approved by:	cperciva (re)
Sponsored by:	SkunkWerks, GmbH

Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D53186

MFC after:	2 days
2025-10-20 09:37:01 +00:00
Zhenlei Huang 0a2fb63b49 mrsas: Migrate to use macro LINUX_IOCTL_SET to register linux ioctl handler
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:43 +08:00
Zhenlei Huang d12ce84b0d mfi: Migrate to use macro LINUX_IOCTL_SET to register linux ioctl handler
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:42 +08:00
Zhenlei Huang cb0116af7a ipmi: Migrate to use macro LINUX_IOCTL_SET to register linux ioctl handler
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:42 +08:00
Zhenlei Huang ff29e5bc53 aacraid: Migrate to use macro LINUX_IOCTL_SET to register linux ioctl handler
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:42 +08:00
Zhenlei Huang db1844a0e1 aac: Migrate to use macro LINUX_IOCTL_SET to register linux ioctl handler
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:42 +08:00
Zhenlei Huang 8350f46d98 sgx: Migrate to use macro LINUX_IOCTL_SET to register linux ioctl handler
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:41 +08:00
Zhenlei Huang 790c27317e linux: Make the macro LINUX_IOCTL_SET public
There're some other drivers want to register and unregister linux
ioctl handler. Move the macro LINUX_IOCTL_SET from tdfx_linux.h to
linux_ioctl.h so that they can also benefit it.

While here, rename the declaration of linux ioctl function to be
consistent with the name of the handler.

Meanwhile, drop a comment about the macro, since its function is
obvious.

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53158
2025-10-20 12:28:41 +08:00
Brad Davis 2f461ddd78 geom: fix glabel status not showing components
Also fix some typos and move a couple NULL checks earlier.

Reviewed by:	mckusick, Johan Söllvander, markj, kevans, adrian
Fixes:		0d4642a67e
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53180
2025-10-19 20:35:06 -06:00
Alan Somers f6d767fe86 find: fix pathnames printed by the SIGINFO handler
Don't duplicate the last component.

PR:		290362
Reported by:	John F. Carr <[email protected]>
Fixes:		d06a00963b
MFC after:	3 days
Reviewed by:	jilles, Goran Mekić <[email protected]>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1878
2025-10-19 17:26:53 -06:00
Bjoern A. Zeeb af445e1dd9 mfc-candidates.lua: add -F fmt option
Add -F fmt option to give a free format string to git show --pretty=.
It can be used, for example, as:
  ./tools/tools/git/mfc-candidates.lua -F "%h %cD %s"
to see which commits have passed the minimum 3 days of waiting before
MFCing, or to see which group of commits belong together.

MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D53172
2025-10-19 23:24:25 +00:00
Kristof Provost cb36bfee25 pf: fix 'no rdr'
Ensure we always have a non-NULL rule pointer (ctx.rm).
It might have gotten set to NULL by pf_get_translation().

While here also restore the previous rdr behaviour be re-adding the incorrectly
removed 'break' in pf_match_translation_rule.

PR:		290177
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D53191
2025-10-19 23:07:43 +02:00
Elliott Mitchell a6369fb9e4 nfscommon: Update the nfs_bigreply array
The variable is simply a long series of flags.  Mark as boolean to allow
the compiler to use smaller types.

Convert to designated initializer to better indicate which operations it
is set for.  Without this the array is kind of long and sparse.

nfsv4_setsequence() is no longer used outside nfs_commonsubs.c, so now
mark it as static.  The fourth argument is true/false, so convert to
boolean.

No semantics change is made by this commit.

Discussed with:	jrtc27
MFC after:	2 weeks
2025-10-19 13:29:08 -07:00
Colin Percival 012014403b vmimage.subr: Fix when/where we fix up METALOG
We only need to check for unMETALOGed directories and sort the METALOG
file if we're using it, i.e. if we're doing a NO_ROOT build.  This
non-NO_ROOT builds by no longer bogusly writing to /METALOG*.

We only need to add databases (spwd.db etc) to METALOG if we're doing
a pkgbase-enabled NO_ROOT build; but we should always do this before
creating the filesystem, not only if we installed extra packages (in
vm_extra_install_packages, where that code was erroneously placed).
This fixes non-cloud VM images, which in 15.0-BETA2 shipped without
password databases.

Reviewed by:	ivy
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D53194
2025-10-19 09:21:56 -07:00
Randall Stewart bcdef9d68a inline most of the considered lost condensation.
This is a small cleanup to consolidate the considered lost reduction and marking to an
inline function. There are two places where we are using hookery in SACK processing where
we can't use it. All other places we move to the function. This code in theory changes nothing
and just makes things a bit more readable and consistent.

Reviewed by:tuexen
Differential Revision:	<https://reviews.freebsd.org/D53021>
2025-10-19 07:45:23 -04:00
David E. O'Brien 7d6221ff14 Match style in 3613896
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D53193
2025-10-18 22:54:02 -07:00
Brad Davis 6fa18fe744 mkimg: Add a -h option and improve usage output to be more expressive
Reviewed by:	imp, kp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D52906
2025-10-18 13:08:36 -06:00
Jose Luis Duran 4ee348e271 bsdinstall: Fix typos
Reviewed by:	emaste
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53170
2025-10-18 17:13:16 +00:00
Jose Luis Duran edadbc6ee9 rc: dmesg: Allow umask to be configurable
Allow umask to be configurable.

Being able to set the umask via an rc variable is useful when setting:

    security.bsd.unprivileged_read_msgbuf=0

As it allows a user to configure:

    dmesg_umask="066"

Without modifying the rc script, and preventing the contents of the
$dmesg_file (/var/run/dmesg.boot) from being publicly readable.

PR:		272552
Reviewed by:	netchild
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53169
2025-10-18 17:11:49 +00:00
Jose Luis Duran 982d70ca2e rc.conf: Fix typo interferring -> interfering
Reviewed by:	emaste
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53168
2025-10-18 17:04:25 +00:00
Zhenlei Huang 301e6c4712 imgact: Mark brandinfo and note structures as const
No functional change intended.

Reviewed by:	kib
MFC after:	10 days
MFC with:	80336636b6
Differential Revision:	https://reviews.freebsd.org/D53173
2025-10-19 00:11:30 +08:00
Lexi Winter 8f4a0d2f7b libc: Import OpenBSD's inet_net_{ntop,pton}
Our versions of these functions (originally taken from BIND) simply
don't work correctly for AF_INET6.  These were removed from BIND itself
quite a while ago, but OpenBSD has made several fixes in the mean time,
so import their code.

Add tests for both functions.

PR:		289198
Reported by:	Nico Sonack <[email protected]>
MFC after:	1 week
Reviewed by:	des
Obtained from:	OpenBSD (lib/libc/net)
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52629
2025-10-18 15:45:42 +01:00
Christos Margiolis 30a873ee37 virtual_oss(8): Retire unused utils.h
Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53174
2025-10-18 15:17:43 +02:00
Christos Margiolis 56eee77832 devd/snd.conf: Note that any command can be used for the action
Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D53175
2025-10-18 15:17:38 +02:00
Peter Holm d7ff2ded47 stress2: Added kqueuex(KQUEUE_CPONFORK) test scenarios 2025-10-18 09:58:50 +02:00
Konstantin Belousov a4981edede kqueue.2: document KQUEUE_CPONFORK
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:37 +03:00
Konstantin Belousov 3613896984 knotes: kqueue: handle copy for trivial filters
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:37 +03:00
Konstantin Belousov 7a72e88781 kqueue: handle copy for netmap filters
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:  https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov 6b71c4ff69 kqueue: handle copy for vnode filters
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov c0e70e7b97 kern_event.c: support copy for timer events
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov b11289f871 kqueuex(2): add KQUEUE_CPONFORK
The created kqueue is copied on fork, together with the registered
events. This means that a new kqueue is created at the same fd index
as the parent' kqueue, and all registered events are copied into the
new kqueue (when possible). The current active events list is also
duplicated.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov 25cecc4ba2 kern/kern_event.c: extract kqueue_acquire_ref() from kqueue_acquire()
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov 78382caa3e kern/kern_event.c: extract kern_kqueue_alloc() from kern_kqueue()
The new helper function allows to allocate a kqueue and its file,
without also allocating file descriptor.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov 47ed42f3f4 kqueue_fo_release(): print filter with underflow
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov 37ce6052f6 kern_descrip.c: add struct proc argument to fdcopy()
The proc is the owner of the copied filedesc.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:12:36 +03:00
Konstantin Belousov 1265516c5c struct file: add DFLAG_FORK, indicate copying on fork
instead of referencing or ignoring.

The pass to handle copying is performed after all passable files are
installed into the new file descriptor's table, since one of the future
consumers of this interface (kqueue) needs all passable file descriptors
already valid. After all fds are installed, the additional call for each
copyable file is done to copy the underlying object.

[MFC note: use fo_spares for fo_fork]

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D52045
2025-10-18 08:11:40 +03:00
Siva Mahadevan f66068d937 Add glabel tests to mtree
Fixes:		e868a20266: glabel: add a basic test.
Submitted by:	Siva Mahadevan
Pointy hat to:	brd
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1877
2025-10-17 20:55:35 -06:00
Ryan Libby 5bd3ce4ef6 achiem: quiet gcc -Warray-bounds
gcc complains about accessing the byte as ads->common.bytes[3] as that
field is declared as being one byte.

Reviewed by:	mav
Differential Revision:	https://reviews.freebsd.org/D53152
2025-10-17 15:43:06 -07:00
Ryan Libby bf427a09b6 libalias: quiet gcc -Wcalloc-transposed-args
Reviewed by:	phk
Differential Revision:	https://reviews.freebsd.org/D53151
2025-10-17 15:43:06 -07:00
Konstantin Belousov 3c052bec12 include/stdckdint.h: make the header compatible with C++
by removing the cast to _Bool.  The _Bool type is not defined for C++,
and the specification from the gcc info doc states that the return
type of the  __builtin_{add,sub,mul}_overflow() is bool already.

This is done instead of including stdbool.h to avoid namespace
pollution, since defining bool from stdckdint.h simingly is not
sanctioned by ISO/IEC 9899:2024.

PR:	290299
Reviewed by:	des
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53149
2025-10-18 00:48:30 +03:00
Bojan Novković 96d82d2d13 pt: Switch to swi(9)
The pt hwt(4) backend uses NMIs to receive updates about the latest t
racing buffer offsets from the tracing hardware. However, it uses
taskqueue(9) to schedule the bottom-half handler. This can lead to
a panic since the taskqueue(9) code isn't aware it's being called
from an NMI context and uses the regular scheduling interfaces.

Fix this by scheduling the bottom-half handler using swi(9) and the
SWI_FROMNMI flag.

Fixes:	310162ea21
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D52491
2025-10-17 23:20:21 +02:00
Brad Davis e868a20266 glabel: add a basic test
Reviewed by:	asomers
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D53178
2025-10-17 15:01:33 -06:00
Lexi Winter 74a6bb524e Makefile: Don't allow install{world,kernel} with pkgbase
Using these targets on a pkgbase system will cause the installed system
to become out of sync with the package database, which is almost certain
to cause issues the next time pkg(8) is used.

To prevent users doing this accidentally, disallow install* if we detect
that FreeBSD-runtime is installed in the target.  The check can be
overridden with DESTDIR=/ for users who are sure they want to do this.

MFC after:	3 days
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52879
2025-10-17 20:13:13 +01:00
Lexi Winter 09a49cd49b ncurses: Move utilities to the ncurses package
MFC after:	3 days
Reviewed by:	manu, kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53163
2025-10-17 20:13:13 +01:00
Jason A. Harmening 8a1d6d6da5 VOP_OPENCLOSE.9: note that td may be NULL for VOP_CLOSE
MFC after:	3 days
Reviewed by:	asomers, olce
Differential Revision:	https://reviews.freebsd.org/D53137
2025-10-17 13:24:33 -05:00