Commit graph

292458 commits

Author SHA1 Message Date
Mark Johnston
0ae0226cd1 libdtrace: Fix an off-by-one in CPU ID handling
The illumos-specific _SC_CPUID_MAX is the largest CPU ID in the system.  This
was mapped to _SC_NPROCESSORS_CONF, which is the total number of CPUs recognized
by the kernel.  If CPU IDs are contiguous, as is the case on amd64 and arm64,
this value is one greater than the maximum ID.   As a result, when consuming
per-CPU dtrace buffers, libdtrace tries to fetch from a non-existent CPU.  This
is mostly harmless in practice, but still wrong.

As we don't have a sysconf value for the maximum CPU ID, add a wrapper which
fetches it using the kern.smp.maxid sysctl.

MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D49243

(cherry picked from commit 9a30c8d347bf9aaa89277b6e5a275f737be8edce)
2025-04-02 15:14:37 +00:00
Mark Johnston
294cda7e4e dtrace/arm64: Fix dtrace_gethrtime()
This routine returns a monotonic count of the number of nanoseconds elapsed
since the previous call.  On arm64 it uses the generic system timer.  The
implementation multiplies the counter value by 10**9 then divides by the counter
frequency, but this multiplication can overflow.  This can result in trace
records with non-monotonic timestamps, which breaks libdtrace's temporal
ordering algorithm.

An easy fix is to reverse the order of operations, since the counter frequency
will in general be smaller than 10**9.  (In fact, it's mandated to be 1Ghz in
ARMv9, which makes life simple.)  However, this can give a fair bit of error.
Adopt the calculation used on amd64, with tweaks to handle frequencies as low as
1MHz: the ARM generic timer documentation suggests that ARMv8 timers are
typically in the 1MHz-50MHz range, which is true on arm64 systems that I have
access to.

MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D49244

(cherry picked from commit 36ae5ce2f2fda35763c2655a19bf1b0ee22fdf3c)
2025-04-02 15:14:37 +00:00
Mark Johnston
1cbe878164 libdtrace: Fix an off-by-one in the priority queue implementation
The zero'th index in the array is unused, so a priority queue of N elements
needs N+1 array slots.  Fix the allocation.

Also fix the assertion in dt_pq_insert(): the assertion needs to be checked
after incrementing the count of items in the priority queue, otherwise it can
miss an overflow.

Reported by:	CHERI
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D49242

(cherry picked from commit 7ee1bdd094d376fdc547e8ca33e472f1d37a7d79)
2025-04-02 15:14:36 +00:00
Andrey V. Elsukov
5b6d576d22 tests: fix test for NULL encription
After 04207850a9b9 it is required that key length is not zero.
Add some key to avoid error.

Reported by:	markj

(cherry picked from commit b6708045590712930c533e916e3d6fdfe48ec5ba)
2025-04-02 10:52:32 +03:00
Colin Percival
a64357f31b acpi_pci: Add quirk for PSTAT_PME-before-detach
In order to signal to Graviton [123] systems that a device is ready
to be "ejected" (after a detach request is made via the EC2 API) we
need to set PCIM_PSTAT_PME to 1 and PCIM_PSTAT_PMEENABLE to 0.  We are
not aware of any rationale for this requirement beyond "another OS
kernel happens to do this", i.e. this is effectively bug-for-bug
compatibility.

Arguably this should be done by the ACPI _EJ0 method on these systems,
but it is not.

Create a new ACPI_Q_CLEAR_PME_ON_DETACH quirk and set it in EC2 AMIs,
and add the PCI register write to acpi_pci_device_notify_handler when
that quirk is set.

Reviewed by:	jhb
MFC after:	1 month
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D49146

(cherry picked from commit d70bac252d30adec4feba0c866dabe2c16a756d9)
2025-04-01 10:43:58 -07:00
Andrew Turner
423362c3d8 pci: Only claim to support PCI ASPM on x86
We claim to support Active State Power Management, but don't appear to
do anything different in the kernel when it's enabled other than tell
the firmware we do.

This breaks VMware Fusion on Apple Silicon when it's enabled as it
expects the kernel to enable the ports. As it is reported to be needed
on some x86 servers keep it enabled there, but disable on non-x86
architectures.

Reported by:	kp, tuexen
Reviewed by:	tuexen, mav, imp, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48303

(cherry picked from commit 143dff0f9ce9a6f03ae5701368c7144b30e2dc39)
2025-04-01 10:43:58 -07:00
Andrew Turner
355f02cddb conf: Add acpi_pci.c to the arm64 build
Reviewed by:	jhb, emaste, cperciva
Relnotes:	yes (Support PCIe hotplug on arm64)
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48049

(cherry picked from commit 38cb1ba8637d08ce3f6b3c614f39698db153cd4d)
2025-04-01 10:43:58 -07:00
Andrew Turner
3c9eae3c11 pci_host_generic:Add pcib_request_feature on ACPI
In the ACPI attachment add support for the pcib_request_feature method.
This uses the common _OSC handling.

Reviewed by:	imp, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48048

(cherry picked from commit 1f5c50a8617355758510675cb9412f56fed12efc)
2025-04-01 10:43:57 -07:00
Andrew Turner
479872ce91 pci_host_generic: Support ACPI_IVAR_HANDLE
In the ACPI attachment support the ACPI_IVAR_HANDLE ivar. While here
use the common ivar function to support the common ivars.

Reviewed by:	imp, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48047

(cherry picked from commit deb36d0c65436d16b04f99cc2a27bd0f3980a6f0)
2025-04-01 10:43:57 -07:00
Andrew Turner
506e41a151 pci: Make generic_pcie_read_ivar non static
Allow this to be called from attachments to allow more ivars to be
implemented.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48046

(cherry picked from commit 7cafe75c8c52deffcb3e64200eb4187a52cf202d)
2025-04-01 10:43:57 -07:00
Andrew Turner
d3916945e4 pci: Use a switch statement when reading ivars
In pci_host_generic.c use a switch statement rather than a series
of if statements.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48045

(cherry picked from commit fafb43abd0dcaf2d36ec7344f46e7e19c42be888)
2025-04-01 10:43:57 -07:00
Andrew Turner
3af851edd0 acpica: Extract _OSC parsing to a common file
This will be used by pci_host_generic_acpi.c so needs to be in a
common location.

Reviewed by:	imp, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48044

(cherry picked from commit ba1904937d9ae0539e39001467a1519b17177118)
2025-04-01 10:43:57 -07:00
Christos Margiolis
e431b38b0f snd_hda: Patch Framework 16 AMD
Reported by:	jrm
Tested by:	jrm
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	jrm
Differential Revision:	https://reviews.freebsd.org/D49416

(cherry picked from commit 2f1f523a45fb7f9fddd36a3402edbf7b111996c3)
2025-04-01 15:20:05 +02:00
Ed Maste
e683e7e0f8 usr.bin/Makefile: always build ELF Tool Chain strings(1)
strings(1) is not conditional on WITH_/WITHOUT_TOOLCHAIN, as it is a
small utility that is also useful outside of the toolchain context.
As of commit 1cae7121c667 we switched to WITH_LLVM_BINUTILS by default.

After this change building world with default options but installing
WITHOUT_TOOLCHAIN failed, because we would build LLVM's strings but
attempt to install ELF Tool Chain's version, which did not exist.
Address this by always including ELF Tool Chain strings in non-install
make targets, so that it will be available if options are changed at
install time.

PR:		285556
Reported by:	Michael Butler
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49425

(cherry picked from commit fdc4db57224ce19b867c60fce4c410068be40c27)
2025-04-01 08:52:53 -04:00
Baptiste Daroussin
9157372d3e devd: raise the maximum allowed client to 50
since the creation of libudev-devd, but also with powerd, recent libusb
changes etc. 10 client is not enough anymore to cover the desktop needs

and end users often ends up with:
sonewconn: pcb 0xfffff8004dd43780 (local:/var/run/devd.seqpacket.pipe)...

raise the maximum allowed client to 50, which should be enough to cover
user requirements.

MFC After:	1 week

(cherry picked from commit 5682eee1efd35fb65751641181ae2a50d86efaab)
2025-04-01 14:31:59 +02:00
Gleb Smirnoff
39775a21ad tests/netlink: mark a test that requires tun(4)
(cherry picked from commit effa0f6c0aad54a07917af6986d71cd0a57223b8)
2025-03-31 19:02:20 -07:00
Mark Johnston
bcd9c0cfb6 getentropy tests: Update after commit 473681a1a506da
- Use GETENTROPY_MAX instead of hard-coding the value.
- Check for EINVAL instead of EIO

Fixes:	473681a1a506 ("libc: Fix getentropy POSIX 2024 conformance issues")
(cherry picked from commit c5056a3931b41a803a24b89400d38d5c5f843612)
2025-03-31 18:52:46 -07:00
Mark Johnston
8d95e941d4 netbsd-tests: Update a test case to chase grep symlink handling changes
This test case verifies that grep detects symlink loops when traversing
a directory hierarchy.

Fixes:		fc12c191c087 ("grep: Default to -p instead of -S.")
Reviewed by:	ngie, jhb
Reported by:	Jenkins
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46544

(cherry picked from commit a700bef1e4ee3e6f4e1a86a374bf9b4044f69a70)
2025-03-31 14:27:25 -07:00
Mark Johnston
02324ae827 uma: Avoid excessive per-CPU draining
After commit 389a3fa693, uma_reclaim_domain(UMA_RECLAIM_DRAIN_CPU)
calls uma_zone_reclaim_domain(UMA_RECLAIM_DRAIN_CPU) twice on each zone
in addition to globally draining per-CPU caches. This was unintended
and is unnecessarily slow; in particular, draining per-CPU caches
requires binding to each CPU.

Stop draining per-CPU caches when visiting each zone, just do it once in
pcpu_cache_drain_safe() to minimize the amount of expensive sched_bind()
calls.

Fixes:		389a3fa693 ("uma: Add UMA_ZONE_UNMANAGED")
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	gallatin, kib
Differential Revision:	https://reviews.freebsd.org/D49349

(cherry picked from commit f506d5af50fccc37f5aa9fe090e9a0d5f05506c8)
2025-03-31 18:35:33 +00:00
Dag-Erling Smørgrav
a4251e93f8 top: Make locale issues non-fatal.
If the `setlocale()` call fails, emit a warning and sleep briefly so the
user has a chance to see the warning before we redraw the screen.  Note
that we have no way of knowing exactly what is wrong, but at least we
can suggest that they check their environment.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D49230

(cherry picked from commit 180065eb09e699820a1e1c45d3d00156e0effe29)
2025-03-31 18:35:33 +00:00
Alex S
9e7af40094 linux: Handle IP_RECVTOS cmsg type
This unbreaks apps using GameNetworkingSockets from Valve.

(cherry picked from commit 186dc094cf1ce14b26c6dfa329a445357121238a)
2025-03-31 10:43:06 -07:00
Alex S
a5918bfbf9 linux: Fix a typo in linux_recvmsg_common
We are supposed to check the result of bsd_to_linux_sockopt_level here
rather than its input.

(cherry picked from commit 9f55630b8d72602f6ec86b15b607f5fc5fde911e)
2025-03-31 10:42:56 -07:00
Alex S
eca3c0515b linprocfs: Correct sysfs /proc/<pid>/mountinfo entry
Technically mount source could be an arbitrary string (since it's
effectively ignored), but it's common to repeat fs type there.

(cherry picked from commit b9752d5d1cea30a39e89c83ea3aeb539581418cb)
2025-03-31 10:42:48 -07:00
Gleb Smirnoff
96e6fc517f netlink/route: validate family attribute
PR:			283818
(cherry picked from commit cdacb12065e4d85416655743da5bc6b17a9d9119)
2025-03-31 10:31:21 -07:00
Gleb Smirnoff
f2a49434b5 netlink/route: fix fib number validation in old Linux compat mode
The value passed via old field also needs to be validated.

PR:			283848
Fixes:			f34aca55adef1e28cd68b2e6705a0cac03f0238e
(cherry picked from commit 031fbf8dc962ca8d458b217ba2b4a9e637b7e932)
2025-03-31 10:31:21 -07:00
Gleb Smirnoff
e215460dae netlink/route: fix nlattr_get_multipath() to check length
of supplied nexthop sub-attributes.  While here, use unsigned types for
length calculations and improve style(9).

PR:			283860
(cherry picked from commit 49a6e213416b5c0c9eccdff0af1c6b01f34c3693)
2025-03-31 10:31:21 -07:00
Gleb Smirnoff
886fcbde46 acpi_ibm: pass brightness events to evdev(4)
unless the dev.acpi_ibm.0.handlerevents sysctl is set to process
them internally.  The default for the latter is to ignore them,
so passing to evdev(4) is enabled by default.

Reviewed by:		wulf, imp
Tested on:		Lenovo Thinpad X11 Carbon 7Th Gen
Differential Revision:	https://reviews.freebsd.org/D48174

(cherry picked from commit c21f5751ef0932796676e55953461e0679020e28)
2025-03-31 10:31:21 -07:00
Gleb Smirnoff
1bda3fae78 tcp: don't ever return ECONNRESET on close(2)
The SUS doesn't mention this error code as a possible one [1]. The FreeBSD
manual page specifies a possible ECONNRESET for close(2):

[ECONNRESET]	The underlying object was a stream socket that was
		shut down by the peer before all pending data was
		delivered.

In the past it had been EINVAL (see 21367f630d), and this EINVAL was
added as a safety measure in 623dce13c6.  After conversion to
ECONNRESET it had been documented in the manual page in 78e3a7fdd5, but
I bet wasn't ever tested to actually be ever returned, cause the
tcp-testsuite[2] didn't exist back then.  So documentation is incorrect
since 2006, if my bet wins.  Anyway, in the modern FreeBSD the condition
described above doesn't end up with ECONNRESET error code from close(2).
The error condition is reported via SO_ERROR socket option, though.  This
can be checked using the tcp-testsuite, temporarily disabling the
getsockopt(SO_ERROR) lines using sed command [3].  Most of these
getsockopt(2)s are followed by '+0.00 close(3) = 0', which will confirm
that close(2) doesn't return ECONNRESET even on a socket that has the
error stored, neither it is returned in the case described in the manual
page.  The latter case is covered by multiple tests residing in tcp-
testsuite/state-event-engine/rcv-rst-*.

However, the deleted block of code could be entered in a race condition
between close(2) and processing of incoming packet, when connection had
already been half-closed with shutdown(SHUT_WR) and sits in TCPS_LAST_ACK.
This was reported in the bug 146845.  With the block deleted, we will
continue into tcp_disconnect() which has proper handling of INP_DROPPED.

The race explanation follows.  The connection is in TCPS_LAST_ACK.  The
network input thread acquires the tcpcb lock first, sets INP_DROPPED,
acquires the socket lock in soisdisconnected() and clears SS_ISCONNECTED.
Meanwhile, the syscall thread goes through sodisconnect() which checks for
SS_ISCONNECTED locklessly(!).  The check passes and the thread blocks on
the tcpcb lock in tcp_usr_disconnect().  Once input thread releases the
lock, the syscall thread observes INP_DROPPED and returns ECONNRESET.

- Thread 1: tcp_do_segment()->tcp_close()->in_pcbdrop(),soisdisconnected()
- Thread 2: sys_close()...->soclose()->sodisconnect()->tcp_usr_disconnect()

Note that the lockless operation in sodisconnect() isn't correct, but
enforcing the socket lock there will not fix the problem.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/
[2] https://github.com/freebsd-net/tcp-testsuite
[3] sed -i "" -Ee '/\+0\.00 getsockopt\(3, SOL_SOCKET, SO_ERROR, \[ECONNRESET\]/d' $(grep -lr ECONNRESET tcp-testsuite)

PR:			146845
Reviewed by:		tuexen, rrs, imp
Differential Revision:	https://reviews.freebsd.org/D48148

(cherry picked from commit 053a988497342a6fd0a717cc097d09c23f83e103)
2025-03-31 10:31:21 -07:00
Alexander Ziaee
c541138270
top: Sync usage and synopsis
Switching between io and cpu sorting uses a great example in the usage.
[-m io | cpu]. Use that everywhere.

MFC after:		3 days
Reviewed by:		mhorne
Approved by:		mhorne (mentor)
Differential Revision:	https://reviews.freebsd.org/D49515

(cherry picked from commit 187d954eab94fdcb33609d91966dbd727acfd720)
2025-03-31 13:26:26 -04:00
Alexander Ziaee
1fdca2a3a9
top: Polish key bindings in usage and manual
Organize key bindings by ascii(7) for consistency and maintainability,
mark them as Interactive Commands, wordsmith them, and sync their
organization between the manual and help screen.

MFC after:		3 days
PR:			282734
Fixes:			c8aa5e526 (move command mapping to commands.c)
Reviewed by:		imp, mhorne, Jim Brown <jpb@jimby.name>
Approved by:		mhorne (mentor)
Differential Revision:	https://reviews.freebsd.org/D49462

(cherry picked from commit 0a85254d5a33800600477ce57fbaab64591aa6ea)
2025-03-31 13:26:15 -04:00
Alexander Ziaee
bb9c4de17b
hier.7: Storage partitions are not filesystems
I recommended the incorrect text to the submitter.

MFC after:		3 days
Fixes:			f47cbb29e1c2 (Add /dev/gpt)
Reported by:		Mark Millard <marklmi@yahoo.com>
Reviewed by:		imp, mhorne
Approved by:		mhorne (mentor)
Differential Revision:	https://reviews.freebsd.org/D49523

(cherry picked from commit 50296dccddf1a7734be2aef606cd8e0408ee8780)
2025-03-31 13:24:36 -04:00
Roman Schmidt
18b3e374f5
hier.7: Add /dev/gpt
While here, fix a typo.

MFC after:	3 days
Reviewed by:	mhorne, emaste, ziaee
Approved by:	mhorne (mentor)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1608

(cherry picked from commit f47cbb29e1c2bcb5b5ad838d2d5342a47b0c4692)
2025-03-31 13:24:07 -04:00
Konstantin Belousov
04e4dda94f procstat.1: document local SOCK_SEQPACKET socket display
(cherry picked from commit 03dfb8d0211cf9d7405c4fd7d541dde28047001c)
2025-03-31 05:41:32 +03:00
Konstantin Belousov
a02f377d95 procstat.1: correct local socket types descriptions.
(cherry picked from commit 991329f507a893076a4119c90bb463de0ac15be9)
2025-03-31 05:41:32 +03:00
Konstantin Belousov
fb8c944d2b procstat: decode SOCK_SEQPACKET unix domain socket type
(cherry picked from commit 8011df62f57f021a1b4f62d9beea4c25d9b37a23)
2025-03-31 05:41:32 +03:00
Konstantin Belousov
192aae0a9f libprocstat: constify psc_type_info[]
(cherry picked from commit debcd4c05701be0ff48c6b350ed6b3a80e5f0b1f)
2025-03-31 05:41:32 +03:00
Konstantin Belousov
8056c96491 libprocstat: change psc_type_info array to use designated initializers
(cherry picked from commit ba2fb6b367fd513ea5812a496254d3a05ec380b8)
2025-03-31 05:41:32 +03:00
Warner Losh
25df691800 nvme: Fix hotplug on one of the amazon platforms
Amazon EC2 m7i cloud instances use PCI hotplug rather than ACPI
hotplug. The card is removed and detach is called to remove the drive
from the system. The hardware is no longer present at this point, but
the bridge doesn't translate the now-missing hardware reads to all ff's
leading us to conclude the hardware is there and we need to do a proper
shutdown of it. Fix this oversight by asking the bridge if the device is
still present as well. We need both tests since some systems one cane
remove the card w/o a hotplug event and we want to fail-safe in those
cases.

Convert gone to a bool while I'm here and update a comment about
shutting down the controller and why that's important.

Tested by: cperciva
Sponsored by: Netflix

(cherry picked from commit dc95228d98474aba940e3885164912b419c5579d)
2025-03-30 16:44:57 -07:00
Alexander Ziaee
3cdf03dbfe
intro.5: Crossreference ascii(7)
Since the beginning, Unix has included an ASCII chart. Over the last
half a century to this day, the most common format for lexographical
organization in files is according to ASCII. Consistency is maintainable
and for that reason, crossreference ascii(7) promenently in the
introduction to the File Formats Manual. Additionally, this demonstrates
the often softer style of bullet lists in the manual tradition.

PR:		248562
MFC after:	3 days
Reviewed by:	mhorne
Approved by:	mhorne (mentor)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1534

(cherry picked from commit a6175f28da7018ba9f824f48fe6db732bd9cb501)
2025-03-28 21:32:41 -04:00
Alexander Ziaee
0d35e63973
intro.5: More verbose introductory sentence
Explain a little about everything is a file,
matching the style of earlier intro pages.

PR:		248562
MFC after:	3 days
Approved by:	mhorne (mentor)
Reviewed by:	imp, mhorne, Lexi Winter <lexi@le-fay.org>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1534

(cherry picked from commit 37508388d066826d0a36b5ec646c95a9ffb00d28)
2025-03-28 21:32:27 -04:00
Alexander Ziaee
bb28ea49ad
intro.5: Import description table from OpenBSD
Looking around at how everyone else is doing it, this list seems nearly
perfect to me and we should just import it from them. I have added "and
streams" because we have some explanations of those in this section too.

PR:		248562
MFC after:	3 days
Obtained from:	OpenBSD
Approved by:	mhorne (mentor)
Reviewed by:	imp, mhorne, Lexi Winter <lexi@le-fay.org>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1534

(cherry picked from commit 26ec376536622e8fec8f40847aa9b2d1121d585d)
2025-03-28 21:32:10 -04:00
Alexander Ziaee
342fa740cb
intro.5: Add local to files, minor maintenence
New users are sometimes confused about the difference between /etc/ and
/usr/local/etc. Explain this in the manual as we did in intro(1). Link
hier(7) which now lists base system configuration files in /etc/. Add a
section number to HISTORY for clarity.

PR:		248562
MFC after:	3 days
Approved by:	mhorne (mentor)
Reviewed by:	imp, mhorne, Lexi Winter <lexi@le-fay.org>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1534

(cherry picked from commit 8d65152cbfc8861f6920846dea6f540c673ab7b6)
2025-03-28 21:31:48 -04:00
Kirk McKusick
ae15f8ceaa Get consistent updates for UFS superblocks.
Formatting and style cleanups.

Differential Revision: https://reviews.freebsd.org/D49276
Sponsored-by: Netflix

(cherry picked from commit c2cd605e8c8a15e545dfd3e50aef2f660d460b30)
(cherry picked from commit 16649530b7be02a61a32b34d56e6e937734cd247)
2025-03-28 17:41:04 -07:00
Justin Hibbits
ff9c290648 powernv: Explicitly enable the facilities we support
Thus far we've relied on the firmware setting HFSCR correctly, enabling
all facilities.  However, it appears some recent firmwares do not.
Linux explicitly enables all facilities it supports (including
transactional memory, which new firmwares apparently do not enable), so
do the same here, explicitly enable all the facilities FreeBSD supports.

MFC after:	1 week

(cherry picked from commit fe73eb441f1c98fe350f4822c7d2abfeef046bf8)
2025-03-27 22:32:20 -04:00
Justin Hibbits
16caf6a11e powerpc: Add Hypervisor Facility Unavailable handling
Treat Hypervisor Facility Unavailable as an illegal instruction in user
space.  This way programs that use facilities like transactional memory,
which will never be supported as it has been removed from the ISA, will
not crash the kernel.

Tested by:	pkubaj
MFC after:	1 week

(cherry picked from commit 0b663e0cee89dedf5b070ff4e839d5ad95061535)
2025-03-27 22:32:19 -04:00
Konstantin Belousov
4b3d44f3b4 kern/kern_descrip.c: remove unneeded headers
(cherry picked from commit 6eb7cba469d7cf1beccfb18679d1e0bd4a468341)
2025-03-28 02:32:28 +02:00
Konstantin Belousov
4e923ed15e ufs_aclcheck(): accurately dereference vp->v_mount
(cherry picked from commit 5648c1d6f3b0d8f4d67d2e6ec56dd2abcbd8fff5)
2025-03-28 02:32:28 +02:00
Konstantin Belousov
658a4399ea ufs_acl.c: style
(cherry picked from commit d7352b2d57e9fe4b9cfb6ae61fd7cdd18851cdd3)
2025-03-28 02:32:28 +02:00
Konstantin Belousov
09b8745670 kern___acl_aclcheck_path: vrele the vnode after namei()
(cherry picked from commit 7fad17a3e63481ef71b731b0059cb918aec14f17)
2025-03-28 02:32:28 +02:00
Ed Maste
a75dbf4194 tools/sysdoc: Chase sysctl rename
PR:		285591
Reviewed by:	glebius
Fixes: 94df3271d6 ("Rename net.inet.ip.check_interface to rfc1122_strong_es and document it.")
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49486

(cherry picked from commit d45d070e5475466ceac8057f2e7558055267fb1b)
2025-03-27 15:15:04 -04:00