Commit graph

4856 commits

Author SHA1 Message Date
Martin Matuska
d27c973264 zfs: merge openzfs/zfs@33174af15 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.5

Notable upstream pull request merges:
 #15609 566841171 Only provide execvpe(3) when needed
 #15940 9edf6af4a Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN
 #16038 0f1e8ba2f L2ARC: Cleanup buffer re-compression
 #16104 b474dfad0 Refactor dbuf_read() for safer decryption
 #16118 938d1588e Make more taskq parameters writable
 #16131 672474659 Slightly improve dnode hash
 #16138 4c0fbd8d6 FreeBSD: Add zfs_link_create() error handling
 #16159 fa4b1a404 ZAP: Fix leaf references on zap_expand_leaf() errors
 #16162 41f2a9c81 Fix scn_queue races on very old pools
 #16165 4c484d66b Fix ZIL clone records for legacy holes
 #16206 27cc6df76 Use memset to zero stack allocations containing unions
 #16207 2eab4f7b3 Fix assertion in Persistent L2ARC
 #16214 13ccbbb47 Some improvements to metaslabs eviction
 #16216 ba3c7692c Destroy ARC buffer in case of fill error
 #16258 4d2f7f983 vdev_open: clear async fault flag after reopen
 #16264 ef08cb26d Fix long_free_dirty accounting for small files
 #16273 54ef0fdf6 head_errlog: fix use-after-free
 #16284 14cce09a6 FreeBSD: Use a statement expression to implement
                  SET_ERROR()
 #16406 6f27c4cad Make 'rmmod zfs' work after zfs-2.2.4

Obtained from:	OpenZFS
OpenZFS commit:	33174af151
OpenZFS tag:	zfs-2.2.5
2024-08-13 09:52:28 +02:00
Vladimir Kondratyev
59d36b8969 LinuxKPI: update linuxkpi_video to Linux 6.6
disable hdmi_audio_infoframe_pack_for_dp function for now as it depends
on not imported yet drm sources and is not used by drm-kmod.

Reviewed by:	manu
Sponsored by:	Serenity CyberSecurity, LLC
Differential Revision:	https://reviews.freebsd.org/D46224

(cherry picked from commit c89d94ad5d95fd15e891b2723caae8a6104ee153)
2024-08-11 13:12:38 +03:00
Mark Johnston
096cb89033 dtrace: Avoid including dtrace_isa.c directly into dtrace.c
This was done in the original DTrace import, presumably because that
made it a bit easier to handle includes.  However, this can cause
dtrace_getpcstack() to be inlined into dtrace_probe(), resulting in a
missing frame in stack traces since dtrace_getpcstack() takes care to
bump "aframes" to account for its own stack frame.

To avoid this, compile dtrace_isa.c separately on all platforms.  Add
requisite includes.

MFC after:	2 weeks
Sponsored by:	Innovate UK

(cherry picked from commit 82283cad12a417abfb1469d899b2d7cfb1d38f77)
2024-08-08 15:53:50 +00:00
Christos Margiolis
1ff260a6e1 sound: Implement dummy driver
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D45967

(cherry picked from commit c15c9315b2cb7601cc337f7d5a8e124f4b2d5861)
2024-07-29 18:34:54 +03:00
John Baldwin
24687a65dd sys: Enable NVMe drivers on all architectures
The NVMe drivers are portable and are already included statically in
GENERIC on other architectures such as aarch64 and riscv64.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44690

(cherry picked from commit 16e846fa1ed3c97419b55b292f77b0f4209f0875)
2024-07-18 13:19:18 -04:00
Warner Losh
125a2a6b67 MFC: linux: Make module standalone-buildable
Add opt_inet.h and opt_usb.h to make linux module buildable standalone.

(cherry picked from commit c5f906d32d2bc8e37f1e1911382e27af7e6240ff)
2024-07-04 02:37:57 +07:00
Souradeep Chakrabarti
7ece5993b7 Hyper-V: TLB flush enlightment using hypercall
Currently FreeBSD uses IPI based TLB flushing for remote
TLB flushing. Hyper-V allows hypercalls to flush local and
remote TLB. The use of Hyper-V hypercalls gives significant
performance improvement in TLB operations.

This patch set during test has shown near to 40 percent
TLB performance improvement.

Also this patch adds rep hypercall implementation as well.

Reviewed by:	whu, kib
Tested by:	whu
Authored-by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Co-Authored-by:	Erni Sri Satya Vennela <ernis@microsoft.com>
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D45521

(cherry picked from commit 2b887687edc25bb4553f0d8a1183f454a85d413d)
2024-07-01 13:21:14 +00:00
Baptiste Daroussin
c333758fca mac_do: add a new MAC/do policy and mdo(1) utility
This policy enables a user to become another user without having to be
root (hence no setuid binary). it is configured via rules using sysctl
security.mac.do.rules

For example:
security.mac.do.rules=uid=1001:80,gid=0:any

The above rule means the user identifier by the uid 1001 is able to
become user 80
Any user of the group 0 are allowed to become any user on the system.

The mdo(1) utility expects the MAC/do policy to be installed and its
rules defined.

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D45145

(cherry picked from commit 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
2024-06-27 10:44:29 +02:00
Emmanuel Vadot
04a191c251 puc: Make kernel module working
We need uart_bus_puc.c in the module for it to work.

Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 304ac69eca623d63510aa61853adc1ea60593323)
2024-06-04 14:23:21 +02:00
Emmanuel Vadot
5080cf0846 linuxkpi: Add linuxkpi_video module
This contain the hdmi code and the aperture code like in linux.

Differential Revision:	https://reviews.freebsd.org/D44925
Reviewed by:		bz
Obtained from:		drm-kmod
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 11d79c4756b7c85faf7c4a268c301a41ce0887b9)
2024-06-04 13:06:45 +02:00
Emmanuel Vadot
13671022eb linuxkpi: hdmi: Split the module declaration to a new file
In order to have a proper linuxkpi_video kmod, move the module declaration
to a new file as linuxkpi_video will also include linux_hdmi.c

Differential Revision:	https://reviews.freebsd.org/D44926
Reviewed by:		bz, emaste, wulf
Sponsored by:		Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 7f84bb34a1d191949ec519a01c0c574f5e827c88)
2024-06-04 13:06:40 +02:00
Warner Losh
eff27c3872 Fix bnxt build in LINT
LINT includes bnxt_re driver. Adjust the path in files, add missing
files and add a new BNXT_C to build (which thinly wraps OFED version
with bnxt specicif stuff).

Sponsored by:		Netflix
Fixes: acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")

(cherry picked from commit 175b2c00a6bcb0c8c1f6b76b6da9bf4879a5848e)
2024-06-03 13:23:15 -06:00
Mark Johnston
bce36dfef8 bnxt: Do not compile on 32-bit platforms
The new bnxt_re driver doesn't compile on any of them (it uses writeq()
from the LinuxKPI, which isn't implemented there), and had already been
disconnected from the build on i386.

Reported by:	Jenkins
Fixes:	acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")

(cherry picked from commit c867ba72889de51b0bd2c6a7049f539abaafd46e)
2024-06-03 13:23:15 -06:00
Mark Johnston
20213402c6 bnxt: Add a module makefile to fix the build
Fixes:	35b53f8c989f ("bnxt_en: Add PFC, ETS & App TLVs protocols support")
(cherry picked from commit bf56e8b9c8639ac4447d223b83cdc128107cc3cd)
2024-06-03 13:23:15 -06:00
Chandrakanth patil
76a34e9d94 bnxt_{en/re}: Update bnxt_en and bnxt_re Makefile
Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45202

(cherry picked from commit faeff3b851dae6e9eb836c59756476e162ea3c40)
2024-06-03 13:23:15 -06:00
Sumit Saxena
93265fb21c RDMA/bnxt_re: Add bnxt_re RoCE driver
This patch introduces the RoCE driver for the
Broadcom NetXtreme-E 10/25/50/100/200G RoCE HCAs.

The RoCE driver is a two part driver that relies
on the bnxt_en NIC driver to operate. The changes
needed in the bnxt_en driver is included through
another patch "L2-RoCE driver communication interface"
in this set.

Presently, There is no user space support, Hence
recommendation to use the krping kernel module for
testing. User space support will be incorporated in
subsequent patch submissions.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45011

(cherry picked from commit acd884dec99adcf8c4cdd0aa8a50be79c216f8e8)
2024-06-03 13:23:15 -06:00
Chandrakanth patil
107e02d706 bnxt_en: L2-RoCE driver communication interface
- Added Aux bus support for RoCE.
- Implemented the ulp ops that are required by RoCE driver.
- Restructure context memory data structures
- DBR pacing support

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45006

(cherry picked from commit 050d28e13cdede7528944c0abf8d0455729c63fd)
2024-06-03 13:23:14 -06:00
Chandrakanth patil
ac940a8b92 bnxt_en: Add PFC, ETS & App TLVs protocols support
Created new directory "bnxt_en" in /dev/bnxt and /modules/bnxt
and moved source files and Makefile into respective directory.

ETS support:

   - Added new files bnxt_dcb.c & bnxt_dcb.h
   - Added sysctl node 'dcb' and created handlers 'ets' and
     'dcbx_cap'
   - Add logic to validate user input and configure ETS in
     the firmware
   - Updated makefile to include bnxt_dcb.c & bnxt_dcb.h

PFC support:

   - Created sysctl handlers 'pfc' under node 'dcb'
   - Added logic to validate user input and configure PFC in
     the firmware.

App TLV support:

   - Created 3 new sysctl handlers under node 'dcb'
       - set_apptlv (write only): Sets a specified TLV
       - del_apptlv (write only): Deletes a specified TLV
       - list_apptlv (read only): Lists all APP TLVs configured
   - Added logic to validate user input and configure APP TLVs
     in the firmware.

Added Below DCB ops for management interface:

   - Set PFC, Get PFC, Set ETS, Get ETS, Add App_TLV, Del App_TLV
     Lst App_TLV

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D45005

(cherry picked from commit 35b53f8c989f62286aad075ef2e97bba358144f8)
2024-06-03 13:23:14 -06:00
Lexi Winter
040a7e0dcb sys/modules/dpdk_lpm4: do not build without INET
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1236

(cherry picked from commit 304a03275a65cf811fb6c06fa1c37783d07c99a4)
2024-05-20 21:13:24 -06:00
Christos Margiolis
ad677fb457 sound: Retire unit.*
The unit.* code is largely obsolete and imposes limits that are no
longer needed nowadays.

- Capping the maximum allowed soundcards in a given machine. By default,
  the limit is 512 (snd_max_u() in unit.c), and the maximum possible is
  2048 (SND_UNIT_UMAX in unit.h). It can also be tuned through the
  hw.snd.maxunit loader(8) tunable. Even though these limits are large
  enough that they should never cause problems, there is no need for
  this limit to exist in the first place.
- Capping the available device/channel types. By default, this is 32
  (snd_max_d() in unit.c). However, these types are pre-defined in
  pcm/sound.h (see SND_DEV_*), so the cap is unnecessary when we know
  that their number is constant.
- Capping the number of channels per-device. By default, the limit 1024
  (snd_max_c() in unit.c). This is probably the most problematic of the
  limits mentioned, because this limit can never be reached, as the
  maximum is hard-capped at either hw.snd.maxautovchans (16 by default),
  or SND_MAXHWCHAN and SND_MAXVCHANS.

These limtits are encoded in masks (see SND_U_MASK, SND_D_MASK,
SND_C_MASK in unit.h) and are used to construct a bitfield of the form
[dsp_unit, type, channel_unit] in snd_mkunit() which is assigned to
pcm_channel->unit.

This patch gets rid of everything unit.*-related and makes a slightly
different use of the "unit" field to only contain the channel unit
number. The channel type is stored in a new pcm_channel->type field, and
the DSP unit number need not be stored at all, since we can fetch it
from device_get_unit(pcm_channel->dev). This change has the effect that
we no longer need to impose caps on the number of soundcards,
device/channel types and per-device channels. As a result the code is
noticeably simplified and more readable.

Apart from the fact that the hw.snd.maxunit loader(8) tunable is also
retired as a side-effect of this patch, sound(4)'s behavior remains the
same.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D44912

(cherry picked from commit 25723d66369fe6786e9e4f5f77381b944755f267)
2024-05-17 21:30:25 +02:00
Martin Matuska
9a5f0cb5b6 zfs: merge openzfs/zfs@256659204 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.4

Notable upstream pull request merges:
 #15076 fdd97e009 Refactor dmu_prefetch()
 #15225 5972bb856 Use ASSERT0P() to check that a pointer is NULL
 #15381 7ea833100 ZIL: Detect single-threaded workloads
 #15515 8b1a132de ZIO: Optimize zio_flush()
 #15225 d6da6cbd7 Clean up existing VERIFY*() macros
 #15225 5dda8c091 Add VERIFY0P() and ASSERT0P() macros
 #15436 61f3638a3 Add prefetch property
 #15509 6f323353d Add ashift validation when adding devices to a pool
 #15539 ea3f7c12a Extend import_progress kstat with a notes field
 #15635 25ea8ce94 ZIL: Improve next log block size prediction
 #15784 16c223eec Do no use .cfi_negate_ra_state within the assembly on
                  Arm64
 #15839 706307445 vdev probe to slow disk can stall mmp write checker
 #15879 86b39b41a zpool: Fix locale-specific time
 #15927 fa5de0c5c Update resume token at object receive
 #15941 fdd8c0aea BRT: Skip duplicate BRT prefetches
 #15942 889152ce4 Give better message from 'zpool get' with invalid pool
                  name
 #15950 3e91a9c52 BRT: Skip getting length in brt_entry_lookup()
 #15951 19bf54b76 ZAP: Massively switch to _by_dnode() interfaces
 #15954 f7c1db636 BRT: Change brt_pending_tree sorting order
 #15955 457e62d7c BRT: Relax brt_pending_apply() locking
 #15967 c94f73007 BRT: Make BRT block sizes configurable
 #15976 dced953b6 ZAP: Some cleanups/micro-optimizations
 #15983 531572b59 Fix panics when truncating/deleting files
 #15992 5fc134ff2 zvol: use multiple taskq
 #16007 2ea370a4e BRT: Fix holes cloning
 #16008 67995229a zpool: Fix option string, adding -e and fixing order
 #16015 8a5604713 Add support for zfs mount -R <filesystem>
 #16022 026fe7964 Speculative prefetch for reordered requests
 #16040 575872cc3 L2ARC: Relax locking during write
 #16042 d5fb6abd3 Improve dbuf_read() error reporting
 #16051 5d859a2e2 xdr: header cleanup
 #16052 602b5dca7 Fix read errors race after block cloning
 #16057 97d7228f4 Remove db_state DB_NOFILL checks from syncing context
 #16072 f4ce02ae4 Small fix to prefetch ranges aggregation
 #16074 97889c037 return NULL at end of send_progress_thread
 #16086 7aaf6ce9d Add the BTI elf note to the AArch64 SHA2 assembly
 #16094 4d17e200d Add zfetch stats in arcstats
 #16128 3d4d61988 Fix updating the zvol_htable when renaming a zvol
 #16141 b3b37b84e Fix arcstats for FreeBSD after zfetch support

Obtained from:	OpenZFS
OpenZFS commit:	2566592045
OpenZFS tag:	zfs-2.2.4
2024-05-03 23:52:01 +02:00
Eric Joyner
eafd6c26f9
ice_ddp: Update package to 1.3.36.0
This is intended to be used with the upcoming ice 1.39.13-k
driver update, but is still backwards compatible with
previous versions of the driver.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Sponsored by:	Intel Corporation

(cherry picked from commit 768329961dc0c041f7647f1c4549944a2ca168aa)
2024-04-24 15:14:48 -07:00
Christos Margiolis
e6c51f6db8 sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)
Currently the snd_clone framework creates device nodes on-demand for
every channel, through the dsp_clone() callback, and is responsible for
routing audio to the appropriate channel(s). This patch gets rid of the
whole snd_clone framework (including any related sysctls) and instead
uses DEVFS_CDEVPRIV(9) to handle device opening, channel allocation and
audio routing. This results in a significant reduction in code size as
well as complexity.

Behavior that is preserved:

- hw.snd.basename_clone.
- Exclusive access of an audio device (i.e VCHANs disabled).
- Multiple processes can read from/write to the device.
- A device can only be opened as many times as the maximum allowed
  channel number (see SND_MAXHWCHAN in pcm/sound.h).
- OSSv4 compatibility aliases are preserved.

Behavior changes:

Only one /dev/dspX device node is created (on attach) for each audio
device, as opposed to the current /dev/dspX.Y devices created by
snd_clone. According to the sound(4) man page, devices are not meant to
be opened through /dev/dspX.Y anyway, so it is best if we do not create
device nodes for them in the first place. As a result of this, modify
dsp_oss_audioinfo() to print /dev/dspX in the "ai->devnode", instead of
/dev/dspX.Y.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
Reviewed by:	dev_submerge.ch, bapt, markj
Differential Revision:	https://reviews.freebsd.org/D44411

(cherry picked from commit e8c0d15a64fadb4a330f2da7244becaac161bb70)
2024-04-18 14:39:26 +02:00
Pierre-Luc Drouin
d1aff35566 vf_i2c: split up and add ACPI attachments in addition to FDT
Move the code from the arm specific to the iicbus controller directory.
Split up between general logic and bus attachment code.
Add support for ACPI attachment in addition to FDT.

Tested by:	bz (LS1088a FDT), Pierre-Luc Drouin (Honeycomb, ACPI)
Based on:	D24917 by Val Packett (initial early version)

(cherry picked from commit 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
2024-04-01 23:46:10 +00:00
Mark Johnston
0b9dffed30 ossl: Move arm_arch.h to a common subdirectory
OpenSSL itself keeps only a single copy of this header.  Do the same in
sys/crypto/openssl to avoid the extra maintenance burden.  This requires
adjusting the include paths for generated asm files.

No functional change intended.

Reported by:	jrtc27
Reviewed by:	jhb
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D42866

(cherry picked from commit e655cc70dfcda5cfedb5a1d9bef1e87d55519f64)
2024-03-29 09:53:05 -04:00
Mark Johnston
3166bb7c10 ossl: Add AES-GCM support for NEON-enabled armv7
This provides substantially higher throughput than the fallback
implementation.

Reviewed by:	jhb
MFC after:	3 months
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D41305

(cherry picked from commit 629a72376d51aad812d6f1279403bc81c38c35d2)
2024-03-29 09:53:05 -04:00
Mark Johnston
15e12749ef ossl: Add support for armv7
OpenSSL provides implementations of several AES modes which use
bitslicing and can be accelerated on CPUs which support the NEON
extension.  This patch adds arm platform support to ossl(4) and provides
an AES-CBC implementation, though bsaes_cbc_encrypt() only implements
decryption.  The real goal is to provide an accelerated AES-GCM
implementation; this will be added in a subsequent patch.

Initially derived from https://reviews.freebsd.org/D37420.

Reviewed by:	jhb
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D41304

(cherry picked from commit 44f8e1e8530e1d2e95e84bbbe3d22ac9cb2557fe)
2024-03-29 09:53:05 -04:00
Martin Matuska
81be5a55d9 zfs: merge openzfs/zfs@c883088df (zfs-2.2-release) into stable/14
OpenZFS release 2.2.3

Notable upstream pull request merges:
 #15428 2a59b6bfa ABD: Be more assertive in iterators
 #15486 c34fe8dcb Update the kstat dataset_name when renaming a zvol
 #15495 f13593619 FreeBSD: Optimize large kstat outputs
 #15517 ad47eca19 ZIL: Assert record sizes in different places
 #15519 2e259c6f0 L2ARC: Restrict write size to 1/4 of the device
 #15544 121924575 Allow block cloning across encrypted datasets
 #15553 e48195c81 ZIO: Add overflow checks for linear buffers
 #15612 3b8f22736 ZIL: Remove TX_CLONE_RANGE replay for ZVOLs
 #15617 e11b3eb1c ZIL: Do not clone blocks from the future
 #15625 e09356fa0 BRT: Limit brt_vdev_dump() to only one vdev
 #15629 dea2d3c6c zdb: Dump encrypted write and clone ZIL records
 #15630 3425484eb Fix file descriptor leak on pool import
 #15634 1e1d748ca ZIL: Remove 128K into 2x68K LWB split optimization
 #15644 b13c91bb2 DMU: Fix lock leak on dbuf_hold() error
 #15653 a701548eb dbuf: Handle arcbuf assignment after block cloning
 #15656 9c40ae021 dbuf: Set dr_data when unoverriding after clone
 #15660 4db88c37c fix(mount): do not truncate shares not zfs mount
 #15665 c0c4866f8 dmu: Allow buffer fills to fail
 #15675 db2db50e3 spa: make read/write queues configurable
 #15677 f71c16a66 Don't panic on unencrypted block in encrypted dataset
 #15719 9181e94f0 spa: Fix FreeBSD sysctl handlers
 #15719 a00231a3f spa: Let spa_taskq_param_get()'s addition of a newline be optional
 #15721 4d4972ed9 Stop wasting time on malloc in snprintf_zstd_header
 #15726 7bccf98a7 Make zdb -R scale less poorly
 #15732 ac592318b Fix livelist assertions for dedup and cloning
 #15735 152a775ea Improve block sizes checks during cloning
 #15737 52cee9a3e fix: Uber block label not always found for aux vdevs
 #15737 eb4a36bce Extend aux label to add path information
 #15737 a2e71db66 Add path handling for aux vdevs in `label_path`
 #15747 2006ac1f4 Fix "out of memory" error
 #15752 8b1c6db3d Fix a potential use-after-free in zfs_setsecattr()
 #15769 40e20d808 Add 'zpool status -e' flag to see unhealthy vdevs
 #15772 ef527958c Fix cloning into mmaped and cached file
 #15780 09a796136 FreeBSD: Fix bootstrapping tools under Linux/musl
 #15781 07cf973fe Autotrim High Load Average Fix
 #15783 c1161e285 fix: variable type with zfs-tests/cmd/clonefile.c
 #15816 dd3a0a271 Update vdev devid and physpath if changed between imports
 #15818 ab653603f Don't assert mg_initialized due to device addition race
 #15823 acc7cd8e9 Update man pages to time(1) from time(2)
 #15825 0606ce205 zpool wait: print timestamp before the header
 #15847 d22bf6a9b LUA: Backport CVE-2020-24370's patch
 #15864 36116b461 zfs list: add '-t fs' and '-t vol' options
 #15874 fc3d34bd0 BRT: Fix slop space calculation with block cloning
 #15882 a4978d260 zdb: Fix false leak report for BRT objects

Obtained from:	OpenZFS
OpenZFS commit:	c883088df8
OpenZFS tag:	zfs-2.2.3
2024-02-23 19:37:36 +01:00
Bjoern A. Zeeb
491e4f5c86 iwlwifi: add the d3 (PM) bits to the Makefile (disabled)
Add the logic to conditionally enable PM for iwlwifi.
This should help suspend/resume in the future.
For now leave it disabled until other preconditional problems are
sorted.

Sponsored by:	The FreeBSD Foundation (2023)
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43647

(cherry picked from commit 8f7c32a41a6a6d88e36ce2f588489274193c2c9a)
2024-02-18 18:31:16 +00:00
Bjoern A. Zeeb
bc3ab3badd iwlwififw: add firmware for the Bz/B200 chipset
The iwlwifi driver already supports the chipset as "Bz TBD"
(also in 14.0).  Add the firmware for it.  Successfully tested
for 0x8086/0x272b/0x8086/0x00f4 on arm64 thanks to donated
hardware [1].

    Firmware was obtained from linux-firmware at
    9552083a783e5e48b90de674d4e3bf23bb855ab0 .

Sponsored by:	The FreeBSD Foundation
Sponsored by:	Martin Hoehne / minipci.biz (B200 card) [1]
MFC after:	3 days

(cherry picked from commit b647615ede46af66cd0c8bd5a321d4a2cccdabe0)
2024-02-18 16:41:52 +00:00
Jean-Sébastien Pédron
3b97bdb453 linuxkpi: Move struct kobject code to linux_kobject.c
[Why]
`linux_compat.c` is already too long. I will need to add `struct kset`
in a follow-up commit, so let's move the existing `struct kobject` code
to its own file.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D43019

(cherry picked from commit 80446fc7b5e5d22e2bac28bc0474dbe2fec83e43)
2024-02-17 23:58:35 +03:00
Andriy Gapon
87a7011b09 add allwinner overlays for enabling additional USB ports
For instance, on NanoPi NEO two additional ports are available via a
GPIO header.

(cherry picked from commit 197944948e6229f625306f38403737ed723e544e)
2024-02-17 16:15:10 +02:00
Joerg Pulz
4f30677080 ispfw(4): Update and add firmware
Update 25xx firmware: version 8.8.207
Add 26xx firmware: version 8.8.231
Add 27xx firmware: version 9.12.0
Add 28xx firmware: version 9.12.1

Remove BUGS section from manpage as we now have firmware for
all supported controllers.

PR:		273263
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/877
Sponsored by:	Technical University of Munich

(cherry picked from commit b0c6b06836351b3908ba5b2a847c89c42d1a46c3)
2024-01-19 11:56:17 -05:00
Jessica Clarke
2fbed5e9ea Make kldxref a bootstrap tool and use unconditionally
Now that kldxref is a generic cross tool and can be built on non-FreeBSD
we can bootstrap it during the build and thus remove the condition for
whether it exists. We also need to make sure to add it to the METALOG
for -DNO_ROOT builds.

Reviewed by:	brooks, imp
Differential Revision:	https://reviews.freebsd.org/D43051

(cherry picked from commit ff7c12c1f17e52337169d8ce48433fae96a9c9db)
2024-01-18 14:30:06 -08:00
Marius Strobl
d6ec20a309 geom_map(4): Garbage collect disconnected driver
The last MIPS user has been removed in c09981f1 2 years ago, the last
ARM one in 58d5c511 even 5.5 years ago.

(cherry picked from commit 03e8d25b1f9218dcd52d13819dda14dbbaf622b7)
2024-01-18 21:14:46 +01:00
Gleb Smirnoff
a74aa0e589 lro: separate HPTS specific code into tcp_lro_hpts.c
Put same copyright header as tcp_hpts.c has, since all this code
was developed by Randall Stewart <rrs@FreeBSD.org> as a part of
the HPTS work.  Also copy Mellanox copyright from tcp_lro.c as
Hans Petter Selasky also participated in restructuring the code.

Reviewed by:		imp, tuexen, rrs
Differential Revision:	https://reviews.freebsd.org/D42854

(cherry picked from commit 4f9c93f16c30d553613def0442d8ddbee859e76b)
2024-01-16 10:38:40 -08:00
Gleb Smirnoff
4a32d60207 hpts: install kernel module
It is important to instantly load tcp_rack.ko and tcp_bbr.ko

Reviewed by:		tuexen, imp
Differential Revision:	https://reviews.freebsd.org/D42697

(cherry picked from commit f9030650185622d7cf8a7c81c4b3a3763539de24)
2024-01-16 10:38:40 -08:00
Dag-Erling Smørgrav
123fd2a93e Add the BBR and RACK stacks to the LINT kernel.
While here, drop the EXTRA_TCP_STACKS option, which serves no purpose and
should never have been added.  Instead, build bbr and rack as long as
either or both of INET and INET6 is enabled.  There is no risk to anyone
who doesn't load one or both and then twiddle the relevant sysctls.

Differential Revision:	https://reviews.freebsd.org/D42088

(cherry picked from commit 3a338c534154164504005beb00a3c6feb03756cc)
2024-01-16 10:32:07 -08:00
Osama Abboud
eb29118a2f ena: Update the license dating to 2023
Some of the files are using outdated linceses.
Update the license to be 2023.

Approved by: cperciva (mentor)
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

(cherry picked from commit 246aa273244e91a30d70997a3be790a29f9eb29c)
2024-01-14 21:18:11 +00:00
Navdeep Parhar
c262860578 cxgbe(4): Update firmwares to 1.27.5.0
Version : 1.27.5.0
Date    : 10/10/2023
=====================
Fixes
-----

BASE:
- Fixed handling the Remote Fault with AN, causing the link failure.
=====================

Obtained from:	Chelsio Communications
Sponsored by:	Chelsio Communications

(cherry picked from commit b1e82d33193b83d86d46483b4ddfe295becd80c4)
2024-01-10 21:22:31 -08:00
Rick Macklem
b9410313c6 nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers
During recent testing related to the IETF NFSv4 Bakeathon, it was
discovered that Kerberized NFSv4.1/4.2 mounts to pNFS servers
(sec=krb5[ip],pnfs mount options) was broken.
The FreeBSD client was using the "service principal" for
the MDS to try and establish a rpcsec_gss credential for a DS,
which is incorrect. (A "service principal" looks like
"nfs@<fqdn-of-server>" and the <fqdn-of-server> for the DS is not
the same as the MDS for most pNFS servers.)

To fix this, the rpcsec_gss code needs to be able to do a
reverse DNS lookup of the DS's IP address.  A new kgssapi upcall
to the gssd(8) daemon is added by this patch to do the reverse DNS
along with a new rpcsec_gss function to generate the "service
principal".

A separate patch to the gssd(8) will be committed, so that this
patch will fix the problem.  Without the gssd(8) patch, the new
upcall fails and current/incorrect behaviour remains.

This bug only affects the rare case of a Kerberized (sec=krb5[ip],pnfs)
mount using pNFS.

This patch changes the internal KAPI between the kgssapi and
nfscl modules, but since I did a version bump a few days ago,
I will not do one this time.

(cherry picked from commit dd7d42a1fae5a4879b62689a165238082421f343)
2023-12-23 17:03:58 -08:00
Martin Matuska
62304a0c3b zfs: merge openzfs/zfs@494aaaed8 (zfs-2.2-release) into stable/14
OpenZFS release 2.2.2

Notable upstream pull request merges:

 #15532 e4985bf5a zdb: Fix zdb '-O|-r' options with -e/exported zpool
 #15533 89fcb8c6f Revert "Tune zio buffer caches and their alignments"
 #15541 d702f86ea brt: lift internal definitions into _impl header
 #15543 56a2a0981 ZIL: Do not encrypt block pointers in lr_clone_range_t
 #15551 349fb77f1 FreeBSD: Fix the build on FreeBSD 12
 #15563 522414da3 FreeBSD: Fix ZFS so that snapshots under .zfs/snapshot are
                  NFS visible
 #15566 2a953e0ac dmu_buf_will_clone: fix race in transition back to NOFILL
 #15571 9b9b09f45 dnode_is_dirty: check dnode and its data for dirtiness
 #15603 a8c256046 ZIL: Call brt_pending_add() replaying TX_CLONE_RANGE

Obtained from:	OpenZFS
OpenZFS commit:	494aaaed89
OpenZFS tag:	zfs-2.2.2
2023-12-01 12:31:24 +01:00
Martin Matuska
f7f5c2419e zfs: merge openzfs/zfs@55dd24c4c (zfs-2.2-release) into stable/14
OpenZFS release 2.2.1

Notable upstream pull request merges:

 #14378 6d693e20a Large sync writes perform worse with slog
 #15243 78fd79eac Add zfs_prepare_disk script for disk firmware install
 #15356 b76724ae4 FreeBSD: Improve taskq wrapper
 #15360 f9a9aea12 Add mutex_enter_interruptible() for interruptible
                  sleeping IOCTLs
 #15371 e82e68400 DMU: Do not pre-read holes during write
 #15390 79f7de575 Remove lock from dsl_pool_need_dirty_delay()
 #15397 6e41aca51 Trust ARC_BUF_SHARED() more
 #15402 eaa62d995 Properly pad struct tx_cpu to cache line
 #15405 1cc1bf4fa Set spa_ccw_fail_time=0 when expanding a vdev
 #15416 edebca5df FreeBSD: taskq: Remove unused declaration
 #15451 7aef672b7 Read prefetched buffers from L2ARC
 #15452 bd7a02c25 Tune zio buffer caches and their alignments
 #15456 3ec4ea68d Unify arc_prune_async() code
 #15465 459c99ff2 Fix block cloning between unencrypted and encrypted
                  datasets
 #15478 76663fe37 Fix accounting error for pending sync IO ops in zpool
                  iostat
 #15529 87e9e8286 Add a tunable to disable BRT support

Obtained from:	OpenZFS
OpenZFS commit:	55dd24c4cc
OpenZFS tag:	zfs-2.2.1
2023-11-22 12:43:59 +01:00
Raed Salem
52164cb3bd mlx5: add fs_counters
(cherry picked from commit 35bbcf0916992d77fe1521962db42b3106a701fb)
2023-11-22 03:40:28 +02:00
John Baldwin
bfa1565246 Trim various $FreeBSD$
Approved by:	markj (cddl/contrib changes)
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41961

(cherry picked from commit f53355131f65d64e7643d734dbcd4fb2a5de20ed)
2023-10-24 11:22:23 -07:00
Zhenlei Huang
d8aaf09792 veriexec: Correctly export symbols
There's no symbol named 'mac_veriexec_get_executable_flags', the right
one should be the function 'mac_veriexec_metadata_get_executable_flags()'.

Reviewed by:	stevek
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42133

(cherry picked from commit f34c9c4e3bdc2b8bffae4ac26897e0e847e9f76f)
2023-10-23 18:12:21 +08:00
Emmanuel Vadot
e8d7fd8991 i2c: rtc: Add module for hym8563 driver
It's used in the nanopi-r5s

(cherry picked from commit 03205a8cd57feb95752142d899d026ff8f45f3e6)
2023-10-18 16:33:53 +02:00
Emmanuel Vadot
8cb78c56a6 arm64: dtb: Add rk3568-nanopi-r5s.dts to the build
We can boot on this board.

(cherry picked from commit f9e26e7853399e7b80ea033fa7fd72e8afe6d061)
2023-10-18 16:33:40 +02:00
Emmanuel Vadot
d10e2facd6 arm64: dtb: Add rk3566-quartz64-a.dts to the build
We can boot on this board.

(cherry picked from commit 2303980cfcb1e709c17b108ce66a25a8e7eea337)
2023-10-18 16:33:37 +02:00
Emmanuel Vadot
b4cd14485a i2c: Add Microcrystal RV3032 RTC driver
This is a simple RTC driver for the rv3032 from Microcrystal.
Just the basic functionality is implemented (no timer, alarm etc ..).

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41995

(cherry picked from commit 1d6a6a524409662992ca96bc91ae69b2a2a5ff35)
2023-10-18 16:32:19 +02:00