1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00
Commit Graph

295119 Commits

Author SHA1 Message Date
Cy Schubert
46d2f61818 unbound: Vendor import 1.22.0
Release notes at
	https://nlnetlabs.nl/news/2024/Oct/17/unbound-1.22.0-released/

MFC after:	1 week

Merge commit '0a6d797cf6eb751d7eb613900cd19803e05d905f' into main
2024-10-18 07:14:21 -07:00
Cy Schubert
0a6d797cf6 unbound: Vendor import 1.20.0
Release notes at
	https://nlnetlabs.nl/news/2024/Oct/17/unbound-1.22.0-released/
2024-10-18 06:52:55 -07:00
Jessica Clarke
7aa6667623 lib/clang: Commit cleaned-up workaround for building on RISC-V
There is a long-standing issue on RISC-V around --gc-sections when
statically linking, which affects the bootstrap build of LLVM. Since
fixing this properly has remained a TODO for years, commit the
workaround with documentation so that building natively from source
works out of the box.

PR:		258358
MFC after:	1 week
2024-10-18 13:59:48 +01:00
Keith White
167bfde705 ftime.3: fix typo in spelling of libutil
PR:	282171
MFC after:	3 days
2024-10-18 15:50:24 +03:00
Christos Margiolis
f57efe95cc mididump(1): Initial revision
A new utility which dumps MIDI 1.0 events in real-time.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46418
2024-10-18 10:42:12 +02:00
Christos Margiolis
9ad2891558 vmm.4: Add ppt device detach example
Showcase how to detach ppt from a PCI device and attach a host driver,
and vice-versa.

MFC after:	2 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46811
2024-10-18 10:42:05 +02:00
Christos Margiolis
6f96ef84b3 onyx: Remove unreachable if condition
Both conditions are the same, so the second one is unreachable.

PR:		229550
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	andreast, markj
Differential Revision:	https://reviews.freebsd.org/D47167
2024-10-18 10:41:55 +02:00
Jani Salonen
d643e82356 snd_hda: Identify NVIDIA GM204
PR:		228615
MFC after:	2 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47166
2024-10-18 10:41:44 +02:00
Christos Margiolis
de009cf68b snd_hda: Remove duplicate HDA_INTEL_CMLK* entries
No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D47152
2024-10-18 10:41:36 +02:00
Christos Margiolis
0ff0a8234f sound: Improve /dev/sndstat channel info readability
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, zlei
Differential Revision:	https://reviews.freebsd.org/D46857
2024-10-18 10:41:23 +02:00
Christos Margiolis
aaf84d0e96 sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D46846
2024-10-18 10:41:16 +02:00
Christos Margiolis
5e33eca8e8 sound: Use M_WAITOK where possible
These malloc(9) calls are in contexts where sleeping is permitted.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, zlei, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D46845
2024-10-18 10:41:05 +02:00
Christos Margiolis
3cc01caa26 sound: Do not cast return value of malloc(9)
No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, zlei, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D46844
2024-10-18 10:40:57 +02:00
Christos Margiolis
c30f531ddb sound: Shorten channel names
The current channel naming convention is:
pcmX:[virtual_]play|record:dspX.[v]p|rY

- pcmX and dspX share the same unit numbers
- "[v]p|r" gives us the same information as "[virtual_]play|record"

Remove the redundant information, so that the channel names become more
readable: dspX.[virtual_]play|record.Y

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46836
2024-10-18 10:40:50 +02:00
Christos Margiolis
9263f854e9 sound: Simplify channel creation and deletion process
Currently we create and destroy channels with the following consistent
pattern:

- chn_init() -> pcm_chn_add()
- pcm_chn_remove() -> chn_kill()

Instead of calling two separate functions, merge pcm_chn_add() with
chn_init(), and pcm_chn_remove() with chn_kill().

Another benefit of this change is that we avoid the confusion caused by
having pcm_chn_add(), as well as pcm_addchan().

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D46835
2024-10-18 10:40:41 +02:00
Christos Margiolis
f3092614bc sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate()
feeder_rate_min functions as the lower boundary.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D46834
2024-10-18 10:40:33 +02:00
Christos Margiolis
3cab66d12d sound: Simplify vchan_create() error paths
Instead of checking the value of "ret" multiple times, just set a goto
label and jump there immediately in case of an error.

While here, remove a redundant assignment to "d".

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D46833
2024-10-18 10:40:23 +02:00
Christos Margiolis
248aced26e sound: Retire SND_MAXHWCHAN
No longer used.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46522
2024-10-18 10:40:16 +02:00
Christos Margiolis
e42c826782 snd_dummy: Drain callout during detach
If we do not enter dummy_chan_trigger() before detaching, we'll get a
use-after-free since the callout(9) callback might be called after
having been detached.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D46715
2024-10-18 10:40:08 +02:00
Christos Margiolis
97570db05c sound: Move root feeder initialization to separate function
feeder_register() is currently a SYSINIT in order to create the root
feeder, which happens only when feedercnt is 0. Separating the root
feeder registration makes the code more readable.

No functional change intended.

While here, fix some style errors.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, zlei, markj
Differential Revision:	https://reviews.freebsd.org/D46821
2024-10-18 10:39:58 +02:00
Christos Margiolis
0a0301deb5 sound: Move global variable initialization to sound_modevent()
There is no reason to initialize global variables in feeder_register(),
as these variables are unrelated to what the function does. Instead,
initialize them during sound(4) load.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D46749
2024-10-18 10:39:46 +02:00
Christos Margiolis
41ff417761 sound: Fix indendation in sound_modevent() switch statement
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D46856
2024-10-18 10:39:15 +02:00
Christos Margiolis
ad4c8671bd sound: Use unr(9) to produce unique channel unit numbers
Currently it is possible to assign a unit number that already exists.
Suppose the following channel list:

[vp2]

If we create 3 channels, we'll end up with the following list:

[vp0, vp1, vp2, vp2]

This happens because chn_init() does not check if the unit number we are
assigning already exists. While fixing this is trivial when the channel
list is sorted in ascending order, it is way more involved when sorted
in descending order. Even though sorting the list in descending order
would require deliberately modifying pcm_chn_add(), and is most likely
not going to happen, make the mechanism more robust by using a unr(9)
allocator for each channel type.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46680
2024-10-18 10:39:08 +02:00
Christos Margiolis
142aca25b0 sound: Sort channels by unit number as well
Refactor CHN_INSERT_SORT() to also take into account the unit number of
each channel, while still prioritizing the type, to make the channel
list easier to work with.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46549
2024-10-18 10:39:00 +02:00
Christos Margiolis
b973a14d35 sound: Simplify pcm_chnalloc() and fix infinite loop bug
Simplify logic to execute the following algorithm:

1. Search for a free (i.e not busy) channel and return successfully.
2. If no channel was found, either return an ENOTSUP if no VCHAN can be
   created (disabled or we reached the limit), or create one more VCHAN
   and scan for it again.
3. If the second scan failed again, return EBUSY.

This patch also solves a bug where we'd end up in an infinite loop,
calling vchan_setnew() with the same `newcnt` value indefinitely, after
the following scenario:

1. Plug device.
2. Spawn X channels.
3. Kill all channels except _last_ opened.
4. Clean up all unused VCHANs.
5. Spawn X+1 channels.
6. Infinite loop in pcm_chnalloc().

I am not exactly sure which part of pcm_chnalloc() caused this bug, but
the patch fixes it at least...

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46548
2024-10-18 10:38:50 +02:00
Christos Margiolis
de8ee33338 sound: Get rid of pnum and max variables in chn_init()
The VCHAN count is checked in vchan_setnew(), and there is no reason to
cap the hardware channels in the first place.

This is part of a series of follow-up patches.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46521
2024-10-18 10:38:41 +02:00
Christos Margiolis
998de46c51 sound: Remove KASSERT from vchan_setnew()
This check is not really useful, and can in fact break things, if
sysctl_dev_pcm_vchans() calls vchan_setnew() with a value that will not
satisfy the KASSERT condition.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, emaste
Differential Revision:	https://reviews.freebsd.org/D46545
2024-10-18 10:38:31 +02:00
Alexander Ziaee
fa573868f1 wpi.4: move hardware to HARDWARE + minor cleanup
Add devices supported by this driver to a HARDWARE section
for generation in the Hardware Compatibility Notes.

While here:
- describe more consistently with product doc and rest of manual
- consolidate basics in first paragraph of description
- mention boot time configuration
- cross-ref networking(7) quick start guide
- zap deprecated Tn, macro in list width, and "Dq Li" => "Ql"
- markup some unmarked elements
- add SPDX tag

MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D47170
2024-10-17 19:48:16 +00:00
Alexander Ziaee
545dbf9d5f iwn.4: move hardware to HARDWARE + minor cleanup
Add devices supported by this driver to a HARDWARE section
for inclusion in the release Hardware Compatibility Notes.
While here:
- add SPDX tag
- add networking(7) cross-ref quick start guide
- tweak examples for consistency

MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D47168
2024-10-17 19:48:16 +00:00
Warner Losh
f11c79fc00 Revert "modules: Add missing opt_*.h files for stand-alone compile"
This reverts commit 1a37caeb07.

I'd overlooked 06c07e1203 when I updated a
branch I'd previously committed but not updated. My search for this in
my tree before the commit was to a stale file...

Sponsored by:		Netflix
2024-10-17 12:52:32 -06:00
Navdeep Parhar
f48fb131c2 cxgbe/t4_tom: Change stid allocation strategy to be more IPv6 friendly.
A hardware IPv6 server needs 2 consecutive stids (server tids) starting
from a 2-aligned stid whereas an IPv4 server needs only 1 stid without
any constraint.  The allocator used to grab the first free stid(s) for
both but this can fragment the stid space leaving nothing suitable for
IPv6 even when lots of stids are available.  Change the allocator to
prefer stids for IPv4 from the ones that cannot be used for IPv6.

Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D47042
2024-10-17 10:40:38 -07:00
Bjoern A. Zeeb
96190b4fef LinuxKPI based WiFi drivers: scripts to extract fwget(8) and port details
Add a "zzz_fw_ports_fwget.sh" script to each LinuxKPI based wireless
driver which in essential are all the same and in detail all different.
The scripts have been referenced in fwget(8) sources since d33f5a0afa
but were never committed.

The scripts do the full job compared to `single-line-scripts` I tried to
use before to ease maintainance life.  Some use hacks like calling cpp
and extracting bits from the output to piece them together over multiple
files.  It will be left as an exercise for the future to see if what was
done (a longer while ago) for iwlwifi(4) would be a good idea for some
other drivers too, to have a FreeBSD-specific sysctl to export some of
the accumulated data in an easily processable way.
The scripts are written in the "perl spirit" -- "to get the job done" --
and not to be nice or neat or efficient.  For that we do not need them
often enough or in any critical path.  People are welcome to improve
them if they feel like.
I've used them for two version updates now and even if ports enforce
some other (manual) editing to keep support for multiple branches for
now they worked extremly well.

For the most the scripts extract 2 parts: PCI IDs and firmware name;
then they add "flavor"s to both and put the information together.

That output is then separated into:
- fwget(8) lines of PCI ID to port/package
  wifi-firmware-${name}-kmod-${flavor} mappings and
- distfiles per flavor for the ports.
- For iwlwififw(4) we also generate the tables for the man page
  (and the wiki) and hopefully the .Sh HARDWARE section for iwlwifi.4
  soon too.

Depending on driver various other checks are done, e.g.,
- does the PCI ID have one or more firmware files/flavors associated,
- does the referenced firmware exist in the linux-firmware.git repo,
- are there duplicates,
- find the latest version of the firmware API.

Sponsored by:	The FreeBSD Foundation
Suggested by:	imp (to have automation in D44918)
MFC after:	3 days
2024-10-17 17:26:28 +00:00
Bjoern A. Zeeb
b4c8f251d6 iwlwifi: FreeBSD specific sysctl export update
Update the sysctl export (also adding a mapping function) to also
print (1) for all lines the "flavor" (device_family) name and (2)
also print lines where we only have the trans cfg and not iwl cfg
as with the flavor we can match PCI IDs to firmware package and so
we can have an increased number of matches.
A side effect is that we can also have fwget(8) PCI ID matches for
firmware (flavors) not yet (publicly) existing.  That will allow
us to add them at a later point while a previous release already
supports the chipsets and knows how to get the firmware for them.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-10-17 17:26:24 +00:00
John Baldwin
d1516ec33e nvmf: Fail pass through commands while a controller is not associated
Previously this just dereferenced NULL qp pointers and panicked.
Instead, use a shared lock on the connection lock to protect access to
the qp pointers and allocate a request.  If the controller is not
associated, fail the request with ECONNABORTED.

Possibly this should be honoring kern.nvmf.fail_on_disconnection and
block waiting for a reconnect request while disconnected if that
tunable is false.

Reported by:	Suhas Lokesha <suhas@chelsio.com>
Sponsored by:	Chelsio Communications
2024-10-17 12:09:27 -04:00
Konstantin Belousov
b08d332da0 devices: report iommu data for the device in the dev. sysctl tree
Show the iommu unit' device name/unit which translates the device'
requests, if any, as parsed out from the BIOS tables.
Also show the rid value for the device.

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47098
2024-10-17 17:31:50 +03:00
Konstantin Belousov
cb83af64f1 device: add generic named per-device property
The KPI allows to store arbitrary data within struct device, retrieve it
back by name, and update the value.  The data is automatically destroyed
on the device deletion.  Also, the user can request to clear the named
property from all devices.

My need for this interface is due to IOMMU needing to save some
indicator on device, which must survive the re-creation of the domain
context.

Reviewed by:	imp
Discussed with:	emaste
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46605
2024-10-17 17:31:50 +03:00
Konstantin Belousov
ea4e4449b8 apic: add ioapic_get_dev() method
which returns apic device_t by apic_id, if there exists the pci representer

Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-10-17 17:31:50 +03:00
Igor Ostapenko
cc7ec8fe3b ipfw tests: Add basic coverage of divert(4) use cases
Reviewed by:	kp
Approved by:	kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D47163
2024-10-17 14:02:27 +00:00
Bjoern A. Zeeb
157e93e0e8 LinuxKPI: pci: rename PCI_IRQ_LEGACY to PCI_IRQ_INTX
PCI_IRQ_LEGACY was added in 366d68f283 (likely) for rtw88 only.
The define now got renamed and I cannot find any other use but
rtw88 and rtw89.
We keep the old name as comapt while driver updates are in
progress enabling it defining LINUXKPI_VERSION for the two drivers.

Sponsored by;	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46822
2024-10-17 13:27:05 +00:00
Bjoern A. Zeeb
105331f658 LinuxKPI: netdevice: add alloc_netdev_dummy()
Add alloc_netdev_dummy() which is needed by an updated rtw88 driver.
Given we already call linuxkpi_init_dummy_netdev() ourselves allow the
setup function to be NULL to not initialize and start a tasq td twice.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46802
2024-10-17 13:27:05 +00:00
Umer Saleem
27e8f56102
Fix inconsistent mount options for ZFS root
While mounting ZFS root during boot on Linux distributions from initrd,
mount from busybox is effectively used which executes mount system call
directly. This skips the ZFS helper mount.zfs, which checks and enables
the mount options as specified in dataset properties. As a result,
datasets mounted during boot from initrd do not have correct mount
options as specified in ZFS dataset properties.

There has been an attempt to use mount.zfs in zfs initrd script,
responsible for mounting the ZFS root filesystem (PR#13305). This was
later reverted (PR#14908) after discovering that using mount.zfs breaks
mounting of snapshots on root (/) and other child datasets of root have
the same issue (Issue#9461).

This happens because switching from busybox mount to mount.zfs correctly
parses the mount options but also adds 'mntpoint=/root' to the mount
options, which is then prepended to the snapshot mountpoint in
'.zfs/snapshot'. '/root' is the directory on Debian with initramfs-tools
where root filesystem is mounted before pivot_root. When Linux runtime
is reached, trying to access the snapshots on root results in
automounting the snapshot on '/root/.zfs/*', which fails.

This commit attempts to fix the automounting of snapshots on root, while
using mount.zfs in initrd script. Since the mountpoint of dataset is
stored in vfs_mntpoint field, we can check if current mountpoint of
dataset and vfs_mntpoint are same or not. If they are not same, reset
the vfs_mntpoint field with current mountpoint. This fixes the
mountpoints of root dataset and children in respective vfs_mntpoint
fields when we try to access the snapshots of root dataset or its
children. With correct mountpoint for root dataset and children stored
in vfs_mntpoint, all snapshots of root dataset are mounted correctly
and become accessible.

This fix will come into play only if current process, that is trying to
access the snapshots is not in chroot context. The Linux kernel API
that is used to convert struct path into char format (d_path), returns
the complete path for given struct path. It works in chroot environment
as well and returns the correct path from original filesystem root.

However d_path fails to return the complete path if any directory from
original root filesystem is mounted using --bind flag or --rbind flag
in chroot environment. In this case, if we try to access the snapshot
from outside the chroot environment, d_path returns the path correctly,
i.e. it returns the correct path to the directory that is mounted with
--bind flag. However inside the chroot environment, it only returns the
path inside chroot.

For now, there is not a better way in my understanding that gives the
complete path in char format and handles the case where directories from
root filesystem are mounted with --bind or --rbind on another path which
user will later chroot into. So this fix gets enabled if current
process trying to access the snapshot is not in chroot context.

With the snapshots issue fixed for root filesystem, using mount.zfs in
ZFS initrd script, mounts the datasets with correct mount options.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #16646
2024-10-17 09:09:39 -04:00
Zhenlei Huang
17120e4bc3 ndp: Remove a stray semicolon
MFC after:	1 week
2024-10-17 21:05:29 +08:00
Kristof Provost
9cd6ab45a4 pf tests: disable epsv for the ftp proxy test
The update to py-twisted 24.7.0 broke EPSV mode in twisted's ftp server.
Work around this by disabling EPSV (and thus using PASV).

PR:		282154
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-10-17 10:17:10 +02:00
Pedro F. Giffuni
b88df1e893 Reapply "sbin/ping: allow normal users to specify larger packets"
The ping tests were originally broken by an unrelated isue that
is now fixed ( 2926c25942 ).

THanks to kp@ for fixing the test and Jose Luis Duran for pinting it out.

This reverts commit 7bc0cb91a2.
2024-10-16 13:39:48 -05:00
John Baldwin
60516a51ab devinfo: Output device description in verbose mode
The description is listed in angle brackets after the device name
similar to device probe messages.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47157
2024-10-16 14:09:05 -04:00
John Baldwin
3342afcbaf bus_generic_detach: Remove redundant check
device_detach() checks the device state and only calls a driver's
DEVICE_DETACH method if the device is attached but not busy.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47156
2024-10-16 14:08:49 -04:00
John Baldwin
42078dfb0f device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails
This gives the parent bus driver the opportunity to cleanup any
allocated resources, etc. left behind by a failed attach attempt.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47155
2024-10-16 14:08:35 -04:00
John Baldwin
1ad3351966 device_delete_child: Update comments
This better matches the variable names and the function comment as
well as clarifying the reason for the order of operations.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47154
2024-10-16 14:08:24 -04:00
John Baldwin
47f49dd4bb sdt: Tear down probes in kernel modules during kldunload
Previously only providers in kernel modules were removed leaving
dangling pointers to tracepoints, etc. in unloaded kernel modules.

PR:		281825
Reported by:	Sony Arpita Das <sonyarpitad@chelsio.com>
Reviewed by:	markj
Fixes:		ddf0ed09bd sdt: Implement SDT probes using hot-patching
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D46890
2024-10-16 13:50:37 -04:00
Warner Losh
38a04f0a7c
freebsd: Use compiler.h from FreeBSD's base's linuxkpi
The FreeBSD linux/compiler.h in OpenZFS was copied from a very old
version of FreeBSD's linuxkpi's linux/compiler.h. There's no need for
this duplication. Use FreeBSD's linuxkpi version instead, and provide
zfs_fallthrough to augment it (it's all that's needed). Use #pragma once
to avoid naming issues for guard variables. Since this is a complete
rewrite, use my copyright here (the original code in FreeBSD still
credits everybody). This works back at least to FreeBSD 12.4, which
is not out of support, and all newer releases.

Remove extra copies of macros that were defined elsewhere, but are now
properly defined in LinuxKPI so are redundant.

Sponsored-by: Netflix
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Closes #16650
2024-10-16 13:00:40 -04:00