Commit graph

291850 commits

Author SHA1 Message Date
Ed Maste f52481f3b8 vt(4): add note about sc/UEFI incompatibility
syscons is not compatible with UEFI boot.  This is noted in syscons(4),
but not mentioned in vt(4) where the kern.vty tunable (used to select vt
or sc) is documented.  Add a note so that if someone reads vt(4) but not
sc(4) they are not surprised by having no usable console.

PR:		276206
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45357
2024-05-24 19:55:10 -04:00
Ed Maste 61639bb3fc libc: move NIS xdr_* symbols from rpc's to yp's Symbol.map
To fix WITHOUT_NIS build.  Building yp_xdr.c is gated by MK_NIS.

PR:		279270
Reported by:	peterj
Reported by:	matteo
Reported by:	Michael Dexter's Build Option Survey run
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45347
2024-05-24 16:47:37 -04:00
Dimitry Andric 3a0793336e Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67.

PR:		276104
MFC after:	3 days
2024-05-24 17:58:04 +02:00
Ryan Libby a216e311a7 vm_pageout_scan_inactive: take a lock break
In vm_pageout_scan_inactive, release the object lock when we go to
refill the scan batch queue so that someone else has a chance to acquire
it.  This improves access latency to the object when the pagedaemon is
processing many consecutive pages from a single object, and also in any
case avoids a hiccup during refill for the last touched object.

Reviewed by:	alc, markj (previous version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D45288
2024-05-24 08:52:58 -07:00
Warner Losh d09ee08f10 nvme: Count number of alginment splits
When possible, we split up I/Os to NVMe drives that advertise a
preferred alignment. Add a counter for this.

Sponsored by:		Netflix
Reviewed by:		chuck, mav
Differential Revision:	https://reviews.freebsd.org/D45311
2024-05-24 08:32:47 -06:00
Warner Losh 99c14fb99f cam: Drop periph lock when completing I/O with ENOMEM status
When biofinish calls g_io_deliver with an error of ENOMEM, that kicks
off the slowdown protocol, forcing I/O to go through g_down rather than
be directly dispatch. One of the side effects is that the I/O is
resubmitted, so the start routines get called recursively, leading to a
recursive lock panic. Rather than make the periph lock recursive, drop
and reacquire the lock around such calls to biofinish.

For nda, this happens only when we can't allocate space to construct a
TRIM. For ada and da, this is only for certain ZONE operations.

Sponsored by:		Netflix
Reviewed by:		gallatin
Differential Revision:	https://reviews.freebsd.org/D45310
2024-05-24 08:32:04 -06:00
Warner Losh 6d83b38186 geom_io: Shift to pause_sbt to eliminate bogus min and update comment.
Update to eliminate bogus min to ensure 0 was never passed to
pause. Instead, requrest 1ms with an 'infinite' precision, which
defaults to whatever the underlying time counter can do. This should
ensure we run fairly quickly to start processing done events, while
still giving a small pause for the system to catch its breath. This rate
limiter still is less than ideal, and this commit doesn't change
that. It should really have no functional change: it just uses a better
interface to express the desired sleep.

Sponsored by:		Netflix
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D45316
2024-05-24 08:31:55 -06:00
Warner Losh 32f40fc983 geom: Add counts for enomem and pausing
Add counts for the number of requests that complete with the ENOMEM as
kern.geom.nomem_count and the number of times we pause the g_down thread
to let the system recover as kern.geom.pause_count.

Sponsored by:		Netflix
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D45309
2024-05-24 08:31:15 -06:00
Mitchell Horne 1d3c23676d arm64, riscv: remove unused declaration
It is inherited from arm, where the global exists and is used. No
functional change.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D45323
2024-05-24 10:55:24 -03:00
Mitchell Horne b5e17840de arm64, riscv: removed unused struct pv_addr
No functional change.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D45322
2024-05-24 10:55:24 -03:00
Val Packett 59aa64914a cross: Move Solaris API64 defines to common
off64_t is needed for both Linux (musl) and MacOS, so move them to the
common area. Somehow glibc provides the definition, but defining it
doesn't hurt and hels in the musl case.

Reviewed by: allanjude, jrtc27
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
2024-05-23 20:03:18 -06:00
Colin Percival f81c0904f7 Add rtw88 firmware to DVD package set
Add net/wifi-firmware-rtw88-kmod since it is no longer included in
the base system on 15.x.  (It is present in 14.x, so this change will
not be MFCed.)
2024-05-23 17:02:40 -07:00
Colin Percival d31ed58b9f Modernize DVD package set in preparation for 14.1
Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old
and unlikely to be useful without other linux packages being installed),
ports-mgmt/portmaster (now largely obsolete and discouraged in favour
of using pkg and binary packages) and x11-drivers/xf86-video-vmware
(questionably useful).

Replace devel/git with devel/git@lite (sufficient for most purposes),
and adjust the "ensure the ports exist to sanitize the list" code to
ignore the @lite part when checking that /usr/ports/devel/git exists.

Add sysutils/seatd and x11-wm/sway for wayland support.

MFC after:	1 minute
Differential Revision:	https://reviews.freebsd.org/D45278
2024-05-23 17:01:59 -07:00
Bjoern A. Zeeb 45bce6fa30 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls
Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 triggered) updates calling down into
the driver/firmware.

Sponsored by:	The FreeBSD Foundation (commit)
MFC after:	3 days
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43966
2024-05-23 23:43:29 +00:00
Bjoern A. Zeeb d33f5a0afa fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi
Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925,
QCA ath1xk, and add Intel iwlwifi IDs.

Rather than using a package per driver add fine(r) grained flavors
even though it is a lot more likely to break in certain cases.

For Intel we need a great level of detail to match PCI IDs so also pass
the full pciconf -l line to into the pci_* files as "$2" to have access
to these.

This lines up with ports commit 80f50c9eb66d.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	manu (earlier version)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D44918
2024-05-23 22:26:59 +00:00
Henrich Hartzer 674956e199 sys/netinet/cc: Switch from deprecated random() to prng32()
Related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277655

Signed-off-by: henrichhartzer@tuta.io
Reviewed by: imp, mav
Pull Request: https://github.com/freebsd/freebsd-src/pull/1162
2024-05-23 15:10:09 -06:00
Cy Schubert 380ee9b3c0 sys/netinet/icmp6.h: Fix build
Fix stdint.h file not found.

Fixes: 		4b75afe885
2024-05-23 14:03:55 -07:00
Lexi Winter 4b75afe885 sys/netinet/icmp6.h: use C99 uintX_t constants for new PREF64 struct
Reviewed by: imp, glebius (prior suggetions done)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1206
2024-05-23 14:40:48 -06:00
Lexi Winter 77f06c476c rtadvd(8): support PREF64 (RFC 8781)
PREF64 allows a router to advertise the network's NAT64 prefix, allowing
clients to auto-configure CLAT.  This makes it possible to deploy
IPv6-only or IPv6-mostly client access networks without the need for
DNS64.

Reviewed by: imp, glebius (prior suggetions done)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1206
2024-05-23 14:40:48 -06:00
Lexi Winter 1e8eb413f6 netinet/icmp6: add PREF64 definitions (RFC 8781)
Reviewed by: imp, glebius (prior suggetions done)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1206
2024-05-23 14:40:11 -06:00
Henrich Hartzer 87bf0aaba8 Remove COMPAT_FREEBSD4/5/6/7/9 from MINIMAL and FIRECRACKER kernel configurations
FIRECRACKER is not a legacy config, so remove the really old FreeBSD
versions from it. MINIMAL has a similar history, and limited target
audience which has little to no overlap with really old binaries. Either
of these is really easy to get additional binary compat with the include
directive, so balance things better. Leave GENERIC alone.

PR: 231768
Signed-off-by: Henrich Hartzer <henrichhartzer@tuta.io>
Reviewed by: imp (MINIMAL), cperciva (FIRECRACKER)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1228
2024-05-23 14:30:57 -06:00
Dimitry Andric c6bcacc7c9 Vendor import of llvm-project branch release/18.x llvmorg-18.1.6-0-g1118c2e05e67. 2024-05-23 22:21:31 +02:00
Michael Tuexen fe136aecc2 tcp: improve inp locking in setsockopt
Ensure that the inp is not dropped when starting a stack switch.
While there, clean-up the code by using INP_WLOCK_RECHECK, which
also re-assigns tp.

Reviewed by:		glebius
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D45241
2024-05-23 22:19:12 +02:00
Simon J. Gerraty 9d3df31ec0 Merge bmake-20240520
Merge commit '29efb3dcaedd9cbabc6f96f35545baf2c8b28501'
2024-05-23 13:12:43 -07:00
Simon J. Gerraty 29efb3dcae Import bmake-20240520
Intersting/relevant changes since bmake-20240508

ChangeLog since bmake-20240508

2024-05-20  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION):
	Merge with NetBSD make, pick up
	o dir.c: in FindFile restore last search of .CURDIR even for
	includes, as a number of existing makefiles are broken otherwise.

2024-05-19  Simon J Gerraty  <sjg@beast.crufty.net>

	* VERSION (_MAKE_VERSION): 20240519
	Merge with NetBSD make, pick up
	o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR.
	Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty.
	o main.c: no need to set .DOTLAST in sysIncPath
2024-05-23 13:08:58 -07:00
Lexi Winter 2356b60be7 arp(8): allow -i with -s
arp(8) usually disallows adding a static ARP entry for an IP address
which is not configured on a local interface.

Change this to allow such ARP entries to be added if '-i' is provided to
specify the interface the ARP entry relates to.

Due to limitations in the kernel lltable, this still requires that a
host route exists for the target address, but allows static ARP entries
to be configured to proxy ARP for, e.g., local jails which use an IPv4
address with a /32 route.

Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1220
2024-05-23 14:02:57 -06:00
Warner Losh bedbaee805 syscalls: Regen for Linux emulator additions 2024-05-23 13:40:47 -06:00
Ricardo Branco 9a9677ec1c linux: Update linux manpage to mention mqueuefs
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:47 -06:00
Ricardo Branco 97add684f5 linux: Support POSIX message queues
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco e30621d58f mqueue: Introduce kern_kmq_timedreceive & kern_kmq_timedsend
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco 289b2d6a79 mqueue: Export some functions to be used by Linuxulator
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco 86e43b5def linux: Export linux_convert_l_sigevent
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco 9c7b1bf271 linux: Export linux_common_openflags()
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco 427db2c45e linux: Fix linux_mq_notify_args & linux_timer_create_args
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco ddbfb544c6 mqueuefs: Relax restriction that path must begin with a slash
This is needed to support Linux implementation which discards the leading slash when calling mq_open(2)

Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:46 -06:00
Ricardo Branco 04d3f8e539 linprocfs: Add support for proc/sys/fs/mqueue/*
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:45 -06:00
Ricardo Branco acb7a4deb2 mqueue: Add sysctl for default_maxmsg & default_msgsize and fix descriptions
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1248
2024-05-23 13:40:45 -06:00
Gleb Smirnoff 0d37895849 ctl: use socket buffer mutexes in struct socket directly
A mechanical change performed with sed(1) script:

s/SOCKBUF_LOCK\(&so->so_rcv\)/SOCK_RECVBUF_LOCK(so)/
s/SOCKBUF_UNLOCK\(&so->so_rcv\)/SOCK_RECVBUF_UNLOCK(so)/
s/SOCKBUF_MTX\(&so->so_rcv\)/SOCK_RECVBUF_MTX(so)/
s/SOCKBUF_LOCK\(&so->so_snd\)/SOCK_SENDBUF_LOCK(so)/
s/SOCKBUF_UNLOCK\(&so->so_snd\)/SOCK_SENDBUF_UNLOCK(so)/
s/SOCKBUF_MTX\(&so->so_snd\)/SOCK_SENDBUF_MTX(so)/

Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D45190
2024-05-23 12:11:54 -07:00
Pierre Pronchery 3d7c8f0887 cp: avoid a resource leak
In copy_file(), make sure the from_fd file descriptor is closed even
when the operation failed early.

Reported by:	Coverity Scan
CID:		1545036
Sponsored by:	The FreeBSD Foundation

Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1238
2024-05-23 12:04:43 -06:00
Warner Losh a5f03413aa ci: Redirect output for builds.
This target is far too noisy to be at all useful. Save the output ala
make universe in _. files. Also report where to find errors.

Sponsored by:		Netflix
2024-05-23 11:59:40 -06:00
Michael Dexter be3631bc8d option_survey.sh: Bump size to 5GB
Increase image size from 4G to 5G to accommodate growth in OS.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1251
2024-05-23 10:47:38 -06:00
Tom Hukins 083d149224 etherswitch.4: List manual pages alphabetically
Signed-off-by: Tom Hukins <tom@FreeBSD.org>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1253
2024-05-23 10:35:29 -06:00
Tom Hukins 2c9f8518de etherswitch.4: Remove non-existent manual pages
Signed-off-by: Tom Hukins <tom@FreeBSD.org>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1253
2024-05-23 10:35:28 -06:00
Tom Hukins 2ce32ab21a Fix "version introduced" in two manual pages
Signed-off-by: Tom Hukins <tom@FreeBSD.org>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1252
2024-05-23 10:30:32 -06:00
Brooks Davis fcc5fa091e libcompiler_rt: gcc13 doesn't support _Float16 on arm
Don't set CRT_COMMON_F16_ARCH for arm as it's not supported by gcc13.

Differential Revision:	https://reviews.freebsd.org/D45234
2024-05-23 17:27:37 +01:00
Brooks Davis 6729e8a40b libpmc: remove tautological assert
gcc13 whines about this assert than an unsigned integer is >= 0.

Reviewed by:	luporl
Fixes:		b48a2770d4 powerpc64: add Power8 and Power9 PMCs
Differential Revision:	https://reviews.freebsd.org/D45232
2024-05-23 17:27:37 +01:00
Alexander Motin 49086aa35d Fix scn_queue races on very old pools
Code for pools before version 11 uses dmu_objset_find_dp() to scan
for children datasets/clones.  It calls enqueue_clones_cb() and
enqueue_cb() callbacks in parallel from multiple taskq threads.
It ends up bad for scan_ds_queue_insert(), corrupting scn_queue
AVL-tree.  Fix it by introducing a mutex to protect those two
scan_ds_queue_insert() calls.  All other calls are done from the
sync thread and so serialized.

Reviewed-by:	Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by:	Brian Atkinson <batkinson@lanl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes	#16162
PR:	278414
2024-05-23 12:20:37 -04:00
Brooks Davis fb9013f215 pcm: centralize 32-bit ioctl compat
Move all handlng of struct sndstioc_nv_arg(32) to sndstat_ioctl() and
make the functions that actually do the work take a buffer and size or
size pointer.  The 32-bit compat work is minimal so just inline it.

Remove checks that we've got a 32-bit process for 32-bit ioctls.  We
don't check that default ioctls are from 64-bit processes on 64-bit
systems.

Reviewed by:	christos
Differential Revision:	https://reviews.freebsd.org/D45307
2024-05-23 17:15:09 +01:00
Baptiste Daroussin 61b07f8aa5 MAC/do: allow to call setuid if real user id is 0
This fixed sshd not able to call restore_uid when MAC/do policy is
loaded
2024-05-23 12:09:11 +02:00
Pawel Jakub Dawidek 56a8aca83a Stop treating size 0 as unknown size in vnode_create_vobject().
Whenever file is created, the vnode_create_vobject() function will
try to determine its size by calling vn_getsize_locked() as size 0
is ambigious: it means either the file size is 0 or the file size
is unknown.

Introduce special value for the size argument: VNODE_NO_SIZE.
Only when it is given, the vnode_create_vobject() will try to obtain
file's size on its own.

Introduce dedicated vnode_disk_create_vobject() for use by
g_vfs_open(), so we don't have to call vn_isdisk() in the common case
(for regular files).

Handle the case of mediasize==0 in g_vfs_open().

Reviewed by: alc, kib, markj, olce
Approved by: oshogbo (mentor), allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D45244
2024-05-23 06:08:14 +00:00