]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 months agosqlite3: Vendor import of sqlite3 3.45.0
Cy Schubert [Mon, 22 Jan 2024 15:35:06 +0000 (07:35 -0800)]
sqlite3: Vendor import of sqlite3 3.45.0

Release notes at https://www.sqlite.org/releaselog/3_45_0.html

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz

MFC after: 2 weeks
Merge commit 'cdad538768db9e2c8258d19e9282fb5aaae80e46'

4 months agosqlite3: Vendor import of sqlite3 3.45.0
Cy Schubert [Mon, 22 Jan 2024 15:10:03 +0000 (07:10 -0800)]
sqlite3: Vendor import of sqlite3 3.45.0

Release notes at https://www.sqlite.org/releaselog/3_45_0.html

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz

4 months agopf tests: test ICMP6 packet too big with binat
Kristof Provost [Wed, 17 Jan 2024 17:03:56 +0000 (18:03 +0100)]
pf tests: test ICMP6 packet too big with binat

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43500

4 months agopf: work around icmp6 packet-too-big not being sent when binat-ing
Kristof Provost [Wed, 17 Jan 2024 17:11:27 +0000 (18:11 +0100)]
pf: work around icmp6 packet-too-big not being sent when binat-ing

If we're applying NPTv6 we pass a packet with a modified source and/or
destination address to the network stack.

If that packet then turns out to be larger than the MTU of the sending
interface the stack will attempt to generate an icmp6 packet-too-big
error, but may fail to look up the appropriate source address for that
error message. Even if it does, pf would still have to undo the binat
operation inside the icmp6 packet so the sending host can make sense of
the error.

We can avoid both problems entirely by having pf also perform the MTU
check (taking the potential refragmentation into account), and
generating the icmp6 error directly in pf.

See also: https://redmine.pfsense.org/issues/14290
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43499

4 months agosound: use device_set_descf() to set device descriptions
Christos Margiolis [Mon, 22 Jan 2024 09:44:51 +0000 (11:44 +0200)]
sound: use device_set_descf() to set device descriptions

Commit 6b6914c1e21b introduced a printf-like version of
device_set_desc(), so use it to simplify device description setting in
the audio stack.

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

4 months agonewfs_msdos.8: example for specific cluster size
Alexander Ziaee [Fri, 12 Jan 2024 22:12:48 +0000 (17:12 -0500)]
newfs_msdos.8: example for specific cluster size

The usual use case in 2024 for newfs_msdosfs is creating filesystems on SD cards
for older hardware. In most tutorials, they call the cluster size "allocation
size". Therefore, add a small note next to cluster size that it is also called
allocation size, and add an example for how to do this.

Reviewed by: jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1045

4 months agonetlink.h: s/typeof/__typeof
Lexi Winter [Thu, 18 Jan 2024 02:34:39 +0000 (02:34 +0000)]
netlink.h: s/typeof/__typeof

typeof() does not exist in -std=c99 mode and the relevant #define is
only for _KERNEL, so use __typeof here instead.

Reviewed by: jhb
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1070

4 months agofind: Add -readable, -writable & -executable options
Ricardo Branco [Sun, 21 Jan 2024 19:53:05 +0000 (20:53 +0100)]
find: Add -readable, -writable & -executable options

Reviewed by: jhb, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1080

4 months agorc.d/kdc: Support start of MIT krb5kdc
Cy Schubert [Sat, 20 Jan 2024 13:52:35 +0000 (05:52 -0800)]
rc.d/kdc: Support start of MIT krb5kdc

Some users wishing to use the MIT krb5kdc have discovered the
kdc script workaround applied to the MIT krb5 ports is insufficient.
Let's build into this rc script the smarts to determine whether
base or ports Hiemdal kdc is being invoked or the MIT krb5kdc.

While at it, remove kdc_start_precmd(). This will simplify a future
jail patch.

Suggested by: netchild
Original patch: netchild
Reviewed by: emaste, netchild
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43523

4 months agoaltq: Remove stale driver references
Warner Losh [Sun, 21 Jan 2024 17:00:49 +0000 (10:00 -0700)]
altq: Remove stale driver references

Remove xr to an(4) and npe(4) since they no longer exist in the tree.

Sponsored by: Netflix

4 months agofirmware(9): Update example
Warner Losh [Sat, 20 Jan 2024 04:32:16 +0000 (21:32 -0700)]
firmware(9): Update example

Update the example to include a firmware module in the kernel from npe
to iwn. Npe was deleted 6 years ago so makes a poor example of how to
embed firmware in the kernel.

Sponsored by: Netflix

4 months agojail: make sure jail.conf parse errors exit, and not crash.
Jamie Gritton [Sun, 21 Jan 2024 05:20:59 +0000 (21:20 -0800)]
jail: make sure jail.conf parse errors exit, and not crash.
Reported by: Mason Loring Bliss

4 months agofsck_msdosfs: do not call checksize() if the cluster is bad
John F. Carr [Sat, 20 Jan 2024 23:18:18 +0000 (01:18 +0200)]
fsck_msdosfs: do not call checksize() if the cluster is bad

PR: 276464
MFC after: 1 week

4 months agotools/build/make.py: Add missing comma to fix tinderbox and worlds
Jessica Clarke [Sat, 20 Jan 2024 22:07:48 +0000 (22:07 +0000)]
tools/build/make.py: Add missing comma to fix tinderbox and worlds

The missing comma meant this was interpreted as a single target called
"tinderboxworlds", and so neither tinderbox nor worlds were recognised
as being MI targets (i.e. still required TARGET(_ARCH) to be given).

Fixes: 5157b451c654 ("tools/build/make.py: Grow the list of MI targets")

4 months agonetipsec: fix LINT-NOINET build
Kristof Provost [Sat, 20 Jan 2024 14:37:40 +0000 (15:37 +0100)]
netipsec: fix LINT-NOINET build

udp_ipsec_input() is used for INET6, so we need it even in NOINET
builds. Build the relevant file if either of INET or INET6 are set.

4 months agoaic7xxx: Fix a typo in a kernel message
Gordon Bergling [Sat, 20 Jan 2024 21:01:10 +0000 (22:01 +0100)]
aic7xxx: Fix a typo in a kernel message

- s/recevied/received/

MFC after: 5 days

4 months agoif_llatbl: Fix a typo in a KASSERT message
Gordon Bergling [Sat, 20 Jan 2024 20:00:22 +0000 (21:00 +0100)]
if_llatbl: Fix a typo in a KASSERT message

- s/entires/entries/

MFC after: 5 days

4 months agogjournal(8): Fix a typo in a sysctl description
Gordon Bergling [Sat, 20 Jan 2024 19:58:08 +0000 (20:58 +0100)]
gjournal(8): Fix a typo in a sysctl description

- s/entires/entries/

MFC after: 5 days

4 months agoPCI_IOV_INIT.9: Fix a typo in the manual page
Gordon Bergling [Sat, 20 Jan 2024 19:20:32 +0000 (20:20 +0100)]
PCI_IOV_INIT.9: Fix a typo in the manual page

- s/infrastucture/infrastructure/

MFC after: 3 days

4 months agobce(4): Fix a typo in a kernel message
Gordon Bergling [Sat, 20 Jan 2024 19:10:21 +0000 (20:10 +0100)]
bce(4): Fix a typo in a kernel message

- s/adddress/address/

MFC after: 5 days

4 months agopkru.3: Fix a typo in the manual page
Gordon Bergling [Sat, 20 Jan 2024 18:55:08 +0000 (19:55 +0100)]
pkru.3: Fix a typo in the manual page

- s/successfull/successful/

MFC after: 3 days

4 months agosigfastblock.2: Fix a typo in the manual page
Gordon Bergling [Sat, 20 Jan 2024 18:54:33 +0000 (19:54 +0100)]
sigfastblock.2: Fix a typo in the manual page

- s/successfull/successful/

MFC after: 3 days

4 months agoatse(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 20 Jan 2024 16:35:51 +0000 (17:35 +0100)]
atse(4): Fix a typo in a source code comment

- s/addresss/address/

MFC after: 3 days

4 months agociss(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 20 Jan 2024 16:34:25 +0000 (17:34 +0100)]
ciss(4): Fix a typo in a source code comment

- s/strucutre/structure/

MFC after: 3 days

4 months agovmware: Fix a typo in a source code comment
Gordon Bergling [Sat, 20 Jan 2024 16:33:27 +0000 (17:33 +0100)]
vmware: Fix a typo in a source code comment

- s/withing/within/

MFC after: 3 days

4 months agousb: Fix two typos in source code comments
Gordon Bergling [Sat, 20 Jan 2024 16:32:20 +0000 (17:32 +0100)]
usb: Fix two typos in source code comments

- s/bascially/basically/
- s/assistence/assistance/

MFC after: 3 days

4 months agonetpfil: Fix two typos in source code comments
Gordon Bergling [Sat, 20 Jan 2024 16:30:57 +0000 (17:30 +0100)]
netpfil: Fix two typos in source code comments

- s/withing/within/

MFC after: 3 days

4 months agotcp_hpts: Fix a typo of a function name in a comment
Gordon Bergling [Sat, 20 Jan 2024 16:29:28 +0000 (17:29 +0100)]
tcp_hpts: Fix a typo of a function name in a comment

- s/tcp_ouput/tcp_output/

MFC after: 3 days

4 months agonet: Fix two typos in source code comments
Gordon Bergling [Sat, 20 Jan 2024 16:28:12 +0000 (17:28 +0100)]
net: Fix two typos in source code comments

- s/strucutres/structures/

MFC after: 3 days

4 months ago_umtx_op.2: Fix a typo in the manual page
Gordon Bergling [Sat, 20 Jan 2024 16:26:34 +0000 (17:26 +0100)]
_umtx_op.2: Fix a typo in the manual page

- s/interpeted/interpreted/

MFC after: 3 days

4 months agodevfs(5): Fix a typo in a source code comment
Gordon Bergling [Sat, 20 Jan 2024 16:25:45 +0000 (17:25 +0100)]
devfs(5): Fix a typo in a source code comment

- s/interpeted/interpreted/

MFC after: 3 days

4 months agofusefs(5): Fix a typo in a SDT probe
Gordon Bergling [Sat, 20 Jan 2024 16:24:22 +0000 (17:24 +0100)]
fusefs(5): Fix a typo in a SDT probe

- s/userpace/userspace/

MFC after: 5 days

4 months agonetgraph: Fix two typos in source code comments
Gordon Bergling [Sat, 20 Jan 2024 16:22:28 +0000 (17:22 +0100)]
netgraph: Fix two typos in source code comments

- s/bascially/basically/
- s/simpliest/simplest/

MFC after: 3 days

4 months agomsdosfs_remount_ro(): correct vfs_unbusy() loop
Konstantin Belousov [Fri, 19 Jan 2024 23:50:48 +0000 (01:50 +0200)]
msdosfs_remount_ro(): correct vfs_unbusy() loop

PR: 276408
Reported by:  John F. Carr
Fixes: 13ccb04589e2c5c840e19b407a59e44cb70ac28e
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 months agomakefs: Make it possible to silence warnings about duplicate paths
Mark Johnston [Fri, 19 Jan 2024 19:06:16 +0000 (14:06 -0500)]
makefs: Make it possible to silence warnings about duplicate paths

When generating a VM image from an installworld mtree manifest, makefs
spits out several thousand warnings about duplicate paths in the
manifest.  These are harmless and have been around for a long time (see
the phabricator revision for some more details), so let's at least have
a way to make makefs quieter.

Reviewed by: brooks, imp, emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43513

4 months agompi3mr: add missing terminator entry to mpi3mr_identifiers array
Chuck Silvers [Fri, 19 Jan 2024 23:58:41 +0000 (15:58 -0800)]
mpi3mr: add missing terminator entry to mpi3mr_identifiers array

Reported by: KASAN
Sponsored by: Netflix
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43519

4 months agofusefs: fix some memory leaks in the tests
Alan Somers [Wed, 17 Jan 2024 21:13:05 +0000 (14:13 -0700)]
fusefs: fix some memory leaks in the tests

MFC after: 2 weeks

4 months agotcp: remove unused tcp_sack_output_debug() function
Richard Scheffenegger [Fri, 19 Jan 2024 13:48:11 +0000 (14:48 +0100)]
tcp: remove unused tcp_sack_output_debug() function

This debugging code has been lingering for years with
no known use.

No functional change.

Reviewed by:           tuexen, #transport
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43511

4 months agomlx5: Zero DMA memory mlx5_alloc_cmd_msg() and alloc_cmd_page()
Mark Johnston [Thu, 18 Jan 2024 21:47:52 +0000 (16:47 -0500)]
mlx5: Zero DMA memory mlx5_alloc_cmd_msg() and alloc_cmd_page()

These functions may map more memory for DMA than is actually used, since
the allocator operates on multiples of a 4KB page size.  Thus,
bus_dmamap_sync() can trigger KMSAN reports when the unused portion of
a page is not zero-ed.

Reported by: KMSAN
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D43133

4 months agocommitters-ports.dot: add myself (dutra) as a new ports committer
Gabriel M. Dutra [Thu, 18 Jan 2024 21:02:19 +0000 (18:02 -0300)]
committers-ports.dot: add myself (dutra) as a new ports committer

Add entries about new ports committer (dutra)
Update Mentor and Mentee Information

Approved by: dbaio(mentor), garga(mentor)
Differential Revision: https://reviews.freebsd.org/D43502

4 months agoarm64: fix db_read_bytes() for size == 8
Mitchell Horne [Wed, 17 Jan 2024 16:45:41 +0000 (12:45 -0400)]
arm64: fix db_read_bytes() for size == 8

There is a mistake in the cast, resulting in a truncated read to tmp64.
Switch from int to uint64_t, and adjust the other casts for clarity.

Add a comment explaining why we do this at all.

Reported by: dfr
Reviewed by: dfr, mmel, emaste, jhb (all a previous version)
PR: 276406
MFC after: 3 days
Fixes: a67687fcd8f5 ("Use native-sized accesses when accessing memory from kdb")
Differential Revision: https://reviews.freebsd.org/D43479

4 months agoRevert "arm64: fix db_read_bytes() for size == 8"
Mitchell Horne [Thu, 18 Jan 2024 17:20:03 +0000 (13:20 -0400)]
Revert "arm64: fix db_read_bytes() for size == 8"

I forgot to include the phabricator link in the commit message.

This reverts commit 2e297cbb4fc057e1872114ef8a37a41a6669dd5b.

4 months agoarm64: fix db_read_bytes() for size == 8
Mitchell Horne [Wed, 17 Jan 2024 16:45:41 +0000 (12:45 -0400)]
arm64: fix db_read_bytes() for size == 8

There is a mistake in the cast, resulting in a truncated read to tmp64.
Switch from int to uint64_t, and adjust the other casts for clarity.

Add a comment explaining why we do this at all.

Reported by: dfr
Reviewed by: dfr, mmel, emaste, jhb (all a previous version)
PR: 276406
MFC after: 3 days
Fixes: a67687fcd8f5 ("Use native-sized accesses when accessing memory from kdb")

4 months agomsdosfs_integrity_error(): plug possible busy leak
Konstantin Belousov [Thu, 18 Jan 2024 15:35:56 +0000 (17:35 +0200)]
msdosfs_integrity_error(): plug possible busy leak

If taskqueue_enqueue() returned error, unbusy().
Handle parallel calls to msdosfs_integrity_error() by unbusying in
msdosfs_remount_ro() up to pending times.

Noted and reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43482

4 months agomsdosfs_rename(): implement several XXXs about downgrading to ro
Konstantin Belousov [Wed, 17 Jan 2024 23:05:55 +0000 (01:05 +0200)]
msdosfs_rename(): implement several XXXs about downgrading to ro

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43482

4 months agomsdosfs_rename(): handle errors from msdosfs_lookup_ino()
Konstantin Belousov [Wed, 17 Jan 2024 22:55:05 +0000 (00:55 +0200)]
msdosfs_rename(): handle errors from msdosfs_lookup_ino()

Properly working storage and correct filesystem structure indeed only
allow the EJUSTRETURN return code, but since the called function needs
to read directory blocks and (re)parse the content, the assert is not
neccessary hold.

PR: 276408
Reported by: John F. Carr
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43482

4 months agoarm64: fix the handling of DDB symbols in early boot
Doug Rabson [Thu, 18 Jan 2024 16:41:02 +0000 (16:41 +0000)]
arm64: fix the handling of DDB symbols in early boot

The code which installs the kernel symbol table wasn't being compiled
because the file did not include opt_ddb.h

Reviewed by: kevans emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43490

4 months agocontrib/kyua: Merge vendor import
Muhammad Moinur Rahman [Thu, 18 Jan 2024 16:26:13 +0000 (17:26 +0100)]
contrib/kyua: Merge vendor import

* commit '5f174897f67783925f4ec69122673f9bad6ee6fe':
  vendor/kyua: Update to snapshot 84c8ec8
  Vendor import of freebsd/kyua@a0d44bb356e0c816
Approved by:    markj
Differential Revision:  https://reviews.freebsd.org/D43475

4 months agokerberos5: Mitigate the possibility of using an old libcrypto
Cy Schubert [Thu, 18 Jan 2024 08:22:20 +0000 (00:22 -0800)]
kerberos5: Mitigate the possibility of using an old libcrypto

By using the full library name (libcrypto.so.30) we avoid the exposure
of using an old, possibly vulnerable, library.

Reported by:  jrtc27
MFC after: 3 days
X-MFC with: 476d63e091c2
Fixes: 476d63e091c2

4 months agocksum(1): Add EXAMPLES to manual page
Fernando Apesteguía [Fri, 8 Sep 2023 12:27:59 +0000 (14:27 +0200)]
cksum(1): Add EXAMPLES to manual page

Approved by: bcr@

4 months agokerberos: Fix numerous segfaults when using weak crypto
Cy Schubert [Wed, 6 Dec 2023 15:30:05 +0000 (07:30 -0800)]
kerberos: Fix numerous segfaults when using weak crypto

Weak crypto is provided by the openssl legacy provider which is
not load by default. Load the legacy providers as needed.

When the legacy provider is loaded into the default context the default
provider will no longer be automatically loaded. Without the default
provider the various kerberos applicaions and functions will abort().

This is the second attempt at this patch. Instead of linking
secure/lib/libcrypto at build time we now link it at runtime, avoiding
buildworld failures under Linux and MacOS. This is because
TARGET_ENDIANNESS is undefined at pre-build time.

PR: 272835
MFC after: 3 days
X-MFC: only to stable/14
Tested by: netchild
Joerg Pulz <Joerg.Pulz@frm2.tum.de> (previous version)

4 months agoif_wg: fix access to noise_local->l_has_identity and l_private
Aaron LI [Wed, 17 Jan 2024 23:29:23 +0000 (23:29 +0000)]
if_wg: fix access to noise_local->l_has_identity and l_private

These members are protected by the identity lock, so rlock it in
noise_remote_alloc() and then assert that we have it held to some extent
in noise_precompute_ss().

PR: 276392

4 months agoif_wg: fix erroneous calculation in calculate_padding() for p_mtu == 0
Aaron LI [Wed, 17 Jan 2024 23:29:23 +0000 (23:29 +0000)]
if_wg: fix erroneous calculation in calculate_padding() for p_mtu == 0

In practice this is harmless; only keepalive packets may realistically have
p_mtu == 0, and they'll also have no payload so the math works out the same
either way.  Still, let's prefer technical accuracy and calculate the amount
of padding needed rather than the padded length...

PR: 276363

4 months agofusefs: prefer new/delete over malloc/free
Alan Somers [Mon, 15 Jan 2024 23:49:47 +0000 (16:49 -0700)]
fusefs: prefer new/delete over malloc/free

MFC after: 2 weeks
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D43464

4 months agozfs: merge openzfs/zfs@a0b2a93c4
Martin Matuska [Wed, 17 Jan 2024 21:08:01 +0000 (22:08 +0100)]
zfs: merge openzfs/zfs@a0b2a93c4

Notable upstream pull request merges:
 #15660 66670ba9f fix(mount): do not truncate shares not zfs mount
 #15719 3bddc4dae spa: Fix FreeBSD sysctl handlers (already merged)
 #15719 5a703d136 spa: Let spa_taskq_param_get()'s addition of a newline
                  be optional
 #15721 6138af86b Stop wasting time on malloc in snprintf_zstd_header
 #15723 1f5bf9600 Make zdb -R a little more sane.
 #15726 20dd16d9f Make zdb -R scale less poorly
 #15737 d9885b377 fix: Uber block label not always found for aux vdevs
 #15737 2df2a58dc Extend aux label to add path information
 #15737 b64be1624 Add path handling for aux vdevs in `label_path`
 #15747 a1771d243 Fix "out of memory" error
 #15752 1a11ad9d2 Fix a potential use-after-free in zfs_setsecattr()
 #15772 f45dd90f3 Fix cloning into mmaped and cached file
 #15781 1494e8fba Autotrim High Load Average Fix

Obtained from: OpenZFS
OpenZFS commit: a0b2a93c41b0b0d7723d1b20eb1eca7a1a63e45b

4 months agoFix the build.
Pawel Jakub Dawidek [Wed, 17 Jan 2024 18:54:43 +0000 (10:54 -0800)]
Fix the build.

MFC after: 1 week
MFC with: f1d0a0cbecf2c688061f35adea85bfb29c9ec893

4 months agobhyve: correct slirp_recv_disable()
Robert Wing [Wed, 17 Jan 2024 18:12:44 +0000 (09:12 -0900)]
bhyve: correct slirp_recv_disable()

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D43472

4 months agojail: Fix information leak.
Pawel Jakub Dawidek [Wed, 17 Jan 2024 17:43:55 +0000 (09:43 -0800)]
jail: Fix information leak.

There is a lack of proper visibility checking in kern.ttys sysctl handler
which leads to information leak about processes outside the current jail.

This can be demonstrated with pstat -t: when called from within a jail,
it will output all terminal devices including process groups and
session leader process IDs:

jail# pstat -t | grep pts/ | head
      LINE   INQ  CAN  LIN  LOW  OUTQ  USE  LOW   COL  SESS  PGID STATE
     pts/2  1920    0    0  192  1984    0  199     0  4132 27245 Oi
     pts/3  1920    0    0  192  1984    0  199    16 24890 33627 Oi
     pts/5     0    0    0    0     0    0    0    25 17758     0 G
    pts/16     0    0    0    0     0    0    0     0 52495     0 G
    pts/15     0    0    0    0     0    0    0    25 53446     0 G
    pts/17     0    0    0    0     0    0    0  6702 33230     0 G
    pts/19     0    0    0    0     0    0    0    14  1116     0 G
     pts/0     0    0    0    0     0    0    0     0  2241     0 G
    pts/23     0    0    0    0     0    0    0    20 15639     0 G
     pts/6     0    0    0    0     0    0    0     0 44062 93792 G
jail# pstat -t | grep pts/ | wc -l
      85

Devfs does the filtering correctly and we get only one entry:

jail# ls /dev/pts/
2

Approved by: mzaborski, secteam
MFC after: 1 week
Sponsored by: Fudo Security

4 months agofix: variable type with zfs-tests/cmd/clonefile.c
Tino Reichardt [Wed, 17 Jan 2024 17:06:14 +0000 (18:06 +0100)]
fix: variable type with zfs-tests/cmd/clonefile.c

Compiling on arm64 freebsd-13.2 and arm64 almalinux-8 brings currently
this error:

```
  CC       tests/zfs-tests/cmd/clonefile.o
tests/zfs-tests/cmd/clonefile.c:166:43: error: result of comparison of \
constant -1 with expression of type 'char' is always true \
[-Werror,-Wtautological-constant-out-of-range-compare]
        while ((c = getopt(argc, argv, "crfdq")) != -1) {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
1 error generated.
gmake[2]: *** [Makefile:8675: tests/zfs-tests/cmd/clonefile.o] Error 1
```

Fix: use correct variable type `int`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #15783

4 months agolinux spl: fix typo in top comment of spl-condvar.c
Tino Reichardt [Wed, 17 Jan 2024 17:05:12 +0000 (18:05 +0100)]
linux spl: fix typo in top comment of spl-condvar.c

Credential Implementation -> Condition Variables Implementation

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #15782

4 months agoAutotrim High Load Average Fix
Kevin Jin [Wed, 17 Jan 2024 17:03:58 +0000 (12:03 -0500)]
Autotrim High Load Average Fix

Switch from cv_wait() to cv_wait_idle() in vdev_autotrim_wait_kick(),
which should mitigate the high load average while waiting.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: jxdking <lostking2008@hotmail.com>
Closes #15781

4 months agoFix cloning into mmaped and cached file.
Pawel Jakub Dawidek [Wed, 17 Jan 2024 16:51:07 +0000 (08:51 -0800)]
Fix cloning into mmaped and cached file.

If the destination file is mmaped and the mmaped region was already
read, so it is cached, we need to update mmaped pages after successful
clone using update_pages().

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Pointed out by: Ka Ho Ng <khng@freebsd.org>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #15772

4 months agoRELNOTES: mention ZFS dataset support for jail(8)
Alexander Leidinger [Wed, 17 Jan 2024 12:59:03 +0000 (13:59 +0100)]
RELNOTES: mention ZFS dataset support for jail(8)

4 months agorc.d/jail: add legacy compatibility for zfs.dataset
Alexander Leidinger [Wed, 17 Jan 2024 12:32:39 +0000 (13:32 +0100)]
rc.d/jail: add legacy compatibility for zfs.dataset

Evaluate the jail_${jailname}_zfs_dataset variable for legacy
jail managers.

This variable can take a space separated list of datasets.
The singular was used specially to allow unmaintained jail
managers like ezjail to use this (simply rename
jail_${jailname}_zfs_datasets in the ezjail config to
jail_${jailname}_zfs_dataset).

4 months agofwget: Use versioned packages for RDNA3 firmware
Goran Mekić [Wed, 17 Jan 2024 10:10:49 +0000 (11:10 +0100)]
fwget: Use versioned packages for RDNA3 firmware

Fixes: f59662030254 ("fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID")
Pointy hat to: manu

4 months agofwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID
Goran Mekić [Wed, 17 Jan 2024 09:36:37 +0000 (10:36 +0100)]
fwget: Update for Radeon RX 7900 XT (RDNA3) PCI-ID

Latest DRM/firmware added support for RDNA3 based GPUs,
update fwget with the proper PCI ID.

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

4 months agomana: Fix TX CQE error handling
Wei Hu [Wed, 17 Jan 2024 09:19:35 +0000 (09:19 +0000)]
mana: Fix TX CQE error handling

For an unknown TX CQE error type (probably from a newer hardware),
still free the mbuf, update the queue tail, etc., otherwise the
accounting will be wrong.

Also, TX errors can be triggered by injecting corrupted packets, so
replace the mana_err to mana_dbg logging.

Reported by: NetApp
MFC after: 1 week
Sponsored by: Microsoft

4 months agojail(8): add support for ZFS datasets
Alexander Leidinger [Wed, 17 Jan 2024 07:40:40 +0000 (08:40 +0100)]
jail(8): add support for ZFS datasets

Add zfs.dataset to jail(8) to add a list of ZFS datasets.
Bump FreeBSD version for jail managers to switch to native
dataset support.

Datasets are attached to the jail after the jail creation and
before the execution of any start command. Unlike current
implementations in jail managers which attach datasets after
the start command, this allows the zfs rc.d script to mount
the datasets on start.

Discussed with: jamie

4 months agosctp: restore missing inpcb lock
Gleb Smirnoff [Wed, 17 Jan 2024 07:11:27 +0000 (23:11 -0800)]
sctp: restore missing inpcb lock

Fixes: 5bba2728079ed4da33f727dbc2b6ae1de02ba897
Reported-by: syzbot+b8636c973dc20fea4a9b@syzkaller.appspotmail.com
Reported-by: syzbot+d76a18ee8bbe6f7d3056@syzkaller.appspotmail.com
4 months agoFix KASSERT in 80044c78 causing build failures
Allan Jude [Tue, 16 Jan 2024 23:12:30 +0000 (23:12 +0000)]
Fix KASSERT in 80044c78 causing build failures

Move the KASSERT to where struct ip6_hdr is populated

Fixes: 80044c785cb040a2cf73779d23f9e1e81a00c6c3
Reported-by: bapt
Reviewed-by: markj
Sponsored-by: Klara, Inc.

4 months agoLinux 6.7 compat: zfs_setattr fix atime update
Rob N [Tue, 16 Jan 2024 22:01:17 +0000 (09:01 +1100)]
Linux 6.7 compat: zfs_setattr fix atime update

In db4fc559c I messed up and changed this bit of code to set the inode
atime to an uninitialised value, when actually it was just supposed to
loading the atime from the inode to be stored in the SA. This changes it
to what it should have been.

Ensure times change by the right amount Previously, we only checked
if the times changed at all, which missed a bug where the atime was
being set to an undefined value.

Now ensure the times change by two seconds (or thereabouts), ensuring
we catch cases where we set the time to something bonkers

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #15762
Closes #15773

4 months agoMake sure all necessary RPM path macros are defined
Lalufu [Tue, 16 Jan 2024 21:32:59 +0000 (22:32 +0100)]
Make sure all necessary RPM path macros are defined

When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ralf Ertzinger <ralf@skytale.net>
Closes #15756

4 months agoMake spl_kmem_cache size check consistent
youzhongyang [Tue, 16 Jan 2024 21:30:58 +0000 (16:30 -0500)]
Make spl_kmem_cache size check consistent

On Linux x86_64, kmem cache can have size up to 4M,
however increasing spl_kmem_cache_slab_limit can lead
to crash due to the size check inconsistency.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Closes #15757

4 months agoAdd path handling for aux vdevs in `label_path`
Ameer Hamza [Thu, 4 Jan 2024 14:35:04 +0000 (19:35 +0500)]
Add path handling for aux vdevs in `label_path`

If the AUX vdev is added using UUID, importing the pool falls back AUX
vdev to open it with disk name instead of UUID due to the absence of
path information for AUX vdevs. Since AUX label now have path
information, this PR adds path handling for it in `label_path`.

Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15737

4 months agoExtend aux label to add path information
Ameer Hamza [Thu, 4 Jan 2024 14:32:53 +0000 (19:32 +0500)]
Extend aux label to add path information

Pool import logic uses vdev paths, so it makes sense to add path
information on AUX vdev as well.

Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15737

4 months agofix: Uber block label not always found for aux vdevs
Ameer Hamza [Thu, 4 Jan 2024 14:02:50 +0000 (19:02 +0500)]
fix: Uber block label not always found for aux vdevs

When spare or l2cache (aux) vdev is added during pool creation,
spa->spa_uberblock is not dumped until that point. Subsequently,
the aux label is never synchronized after its initial creation,
resulting in the uberblock label remaining undumped. The uberblock
is crucial for lib_blkid in identifying the ZFS partition type. To
address this issue, we now ensure sync of the uberblock label once
if it's not dumped initially.

Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15737

4 months agoMake zdb -R a little more sane.
Rich Ercolani [Tue, 16 Jan 2024 21:16:08 +0000 (16:16 -0500)]
Make zdb -R a little more sane.

zdb -R has a minor flaw in which it will not always print the full
output of a decompressed block. Oops.

While I was in there, I also reworked the logic so it won't try
ZLE unless everything else fails, which will hopefully avoid the
problem ZDB_NO_ZLE was intended to mitigate of reporting a lot of
false positives of ZLE compressed blocks...

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #15723

4 months agoZTS: Test for clone, mmap and write for block cloning
Umer Saleem [Tue, 16 Jan 2024 21:15:10 +0000 (02:15 +0500)]
ZTS: Test for clone, mmap and write for block cloning

For block cloning, if we mmap the cloned file and write from the
map into the file, it triggers a panic in dbuf_redirty() on Linux.

The same scenario causes data corruption on FreeBSD. Both these
issues are fixed under PR#15656 and PR#15665.

It would be good to add a test for this scenario in ZTS. The test
program and issue was produced by @robn.

Reviewed-by: Pawel Jakub Dawidek <pawel@dawidek.net>
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 #15717

4 months agosound: Fix OSS API requests for more than 8 channels
Florian Walpen [Sat, 25 Nov 2023 00:04:34 +0000 (01:04 +0100)]
sound: Fix OSS API requests for more than 8 channels

Audio devices with more than 8 channels need bitperfect mode to operate,
the vchan processing chain is limited to 8 channels. For these devices,
let applications properly select a certain number of channels supported
by the driver, instead of mapping the request to a vchan format.

Reviewed by: emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/914

4 months agoAdd UDP encapsulation of ESP in IPv6
Xavier Beaudouin [Tue, 16 Jan 2024 20:44:34 +0000 (20:44 +0000)]
Add UDP encapsulation of ESP in IPv6

This patch provides UDP encapsulation of ESP packets over IPv6.
Ports the IPv4 code to IPv6 and adds support for IPv6 in udpencap.c
As required by the RFC and unlike in IPv4 encapsulation,
UDP checksums are calculated.

Co-authored-by: Aurelien Cazuc <aurelien.cazuc.external@stormshield.eu>
Sponsored-by: Stormshield
Sponsored-by: Wiktel
Sponsored-by: Klara, Inc.

4 months agosysctl vm.objects/vm.swap_objects: do not fill vnode info if jailed
Konstantin Belousov [Sat, 13 Jan 2024 01:46:04 +0000 (03:46 +0200)]
sysctl vm.objects/vm.swap_objects: do not fill vnode info if jailed

Reported by: Shawn Webb via markj
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 months agosockets: provide correct pr_shutdown for keysock and SDP
Gleb Smirnoff [Tue, 16 Jan 2024 20:00:36 +0000 (12:00 -0800)]
sockets: provide correct pr_shutdown for keysock and SDP

My failure to run all kinds of kernel builds lead to missing the keysock
and incorrectly assuming SDP as not having a shutdown method.

Fixes: 5bba2728079ed4da33f727dbc2b6ae1de02ba897

4 months agoMAINTAINERS: change linuxkpi review Phabricator group.
Bjoern A. Zeeb [Mon, 15 Jan 2024 12:26:45 +0000 (12:26 +0000)]
MAINTAINERS: change linuxkpi review Phabricator group.

Direct the review request to #linuxkpi instead of #x11 as it
also is #wireless these days and possibly others in the future.
I would suggest #x11 reviewers also add themselves to #linuxkpi
instead.

Reviewed by: manu, emaste
Differential Revision: https://reviews.freebsd.org/D43458

4 months agosockets: retire sorflush()
Gleb Smirnoff [Tue, 16 Jan 2024 18:26:10 +0000 (10:26 -0800)]
sockets: retire sorflush()

With removal of dom_dispose method the function boils down to two
meaningful function calls: socantrcvmore() and sbrelease().  The latter is
only relevant for protocols that use generic socket buffers.

The socket I/O sx(9) lock acquisition in sorflush() is not relevant for
shutdown(2) operation as it doesn't do any I/O that may interleave with
read(2) or write(2).  The socket buffer mutex acquisition inside
sbrelease() is what guarantees thread safety.  This sx(9) acquisition in
soshutdown() can be tracked down to 4.4BSD times, where it used to be
sblock(), and it was carried over through the years evolving together with
sockets with no reconsideration of why do we carry it over.  I can't tell
if that sblock() made sense back then, but it doesn't make any today.

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43415

4 months agosockets: remove dom_dispose and PR_RIGHTS
Gleb Smirnoff [Tue, 16 Jan 2024 18:26:10 +0000 (10:26 -0800)]
sockets: remove dom_dispose and PR_RIGHTS

Passing file descriptors (rights) via sockets is a feature specific to
PF_UNIX only, so fully isolate the logic into uipc_usrreq.c.

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43414

4 months agosockets: make pr_shutdown fully protocol specific method
Gleb Smirnoff [Tue, 16 Jan 2024 18:26:10 +0000 (10:26 -0800)]
sockets: make pr_shutdown fully protocol specific method

Disassemble a one-for-all soshutdown() into protocol specific methods.
This creates a small amount of copy & paste, but makes code a lot more
self documented, as protocol specific method would execute only the code
that is relevant to that protocol and nothing else.  This also fixes a
couple recent regressions and reduces risk of future regressions.  The
extended KPI for the new pr_shutdown removes need for the extra pr_flush
which was added for the sake of SCTP which could not perform its shutdown
properly with the old one.  Particularly for SCTP this change streamlines
a lot of code.

Some notes on why certain parts of code were copied or were not to certain
protocols:
* The (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING) check is
  needed only for those protocols that may be connected or disconnected.
* The above reduces into only SS_ISCONNECTED for those protocols that
  always connect instantly.
* The ENOTCONN and continue processing hack is left only for datagram
  protocols.
* The SOLISTENING(so) block is copied to those protocols that listen(2).
* sorflush() on SHUT_RD is copied almost to every protocol, but that
  will be refactored later.
* wakeup(&so->so_timeo) is copied to protocols that can make a non-instant
  connect(2), can SO_LINGER or can accept(2).

There are three protocols (netgraph(4), Bluetooth, SDP) that did not have
pr_shutdown, but old soshutdown() would still perform sorflush() on
SHUT_RD for them and also wakeup(9).  Those protocols partially supported
shutdown(2) returning EOPNOTSUP for SHUT_WR/SHUT_RDWR, now they fully lost
shutdown(2) support.  I'm pretty sure netgraph(4) and Bluetooth are okay
about that and SDP is almost abandoned anyway.

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43413

4 months agosockets: make shutdown(2) how argument a enum
Gleb Smirnoff [Tue, 16 Jan 2024 18:26:10 +0000 (10:26 -0800)]
sockets: make shutdown(2) how argument a enum

Reviwed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43412

4 months agox86/xen: fix HVM guest hypercall page setup
Roger Pau Monné [Tue, 16 Jan 2024 15:32:56 +0000 (16:32 +0100)]
x86/xen: fix HVM guest hypercall page setup

c7368ccb6801 didn't take into account that vm_guest will also get setup by
generic identify CPU code, and hence by the time xen_hvm_init() gets called
vm_guest will always be set if running as a Xen guest, either by the PVH entry
point code, or by generic CPU identification.

xen_hvm_init() and xen_hvm_init_hypercall_stubs() were relying on xen_domain()
returning false when running as an HVM guest, and used that into order to
figure out whether hypercall page needed to be populated.

Get rid of such assumptions and simplify the code since legacy PVH is no
longer supported.

This fixes booting FreeBSD as a Xen HVM guest.

Fixes: c7368ccb6801 ('xen: remove xen_domain_type enum/variable')
Sponsored by: Cloud Software Group

4 months agopflowclt: fix gcc build error
Kristof Provost [Tue, 16 Jan 2024 16:29:12 +0000 (17:29 +0100)]
pflowclt: fix gcc build error

gcc is unhappy with the nested extern declaration of __progname, so move
it out of the usage() function.

Sponsored by: Rubicon Communications, LLC ("Netgate")

4 months agopflowctl.8: fix copy/paste-o
Kristof Provost [Tue, 16 Jan 2024 15:27:31 +0000 (16:27 +0100)]
pflowctl.8: fix copy/paste-o

The valid values line applies to the proto field, not domain.

Sponsored by: Rubicon Communications, LLC ("Netgate")

4 months agosubr_bus: introduce device_set_descf() and modify allocation logic
Christos Margiolis [Tue, 16 Jan 2024 16:49:15 +0000 (18:49 +0200)]
subr_bus: introduce device_set_descf() and modify allocation logic

device_set_descf() is a printf-like version of device_set_desc().

Allocation code has been transferred from device_set_desc_internal() to
device_set_desc_copy() and device_set_descf() to avoid complicating
device_set_desc_internal(). The "copy" argument in
device_set_desc_internal() has been replaced with a flag which is set
when the description string has been allocated with M_BUS.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D43370

4 months agousb: use only usb_devinfo() in device_set_usb_desc()
Christos Margiolis [Tue, 16 Jan 2024 16:49:08 +0000 (18:49 +0200)]
usb: use only usb_devinfo() in device_set_usb_desc()

device_set_usb_desc() first tries to fetch device information through
the iInterface descriptor, otherwise it falls back to usb_devinfo().
Since usb_devinfo() is both guaranteed to work, and is more verbose, get
rid of the initial iInterface attempt.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D43383

4 months agopcm.4: mention snd_uaudio auto-load
Christos Margiolis [Tue, 16 Jan 2024 16:49:02 +0000 (18:49 +0200)]
pcm.4: mention snd_uaudio auto-load

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D43397

4 months agosound: add missing modules to snd_driver
Christos Margiolis [Tue, 16 Jan 2024 16:48:56 +0000 (18:48 +0200)]
sound: add missing modules to snd_driver

While here, remove unnecessary break.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D43394

4 months agosnd_uaudio: prefix module declaration with "snd_"
Christos Margiolis [Tue, 16 Jan 2024 16:48:49 +0000 (18:48 +0200)]
snd_uaudio: prefix module declaration with "snd_"

Although the module is compiled "snd_uaudio.ko", follow the rest of the
sound modules' naming convention in the declaration as well.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D43396

4 months agosound: remove PCM_KLDSTRING() and fix status strings
Christos Margiolis [Tue, 16 Jan 2024 16:48:14 +0000 (18:48 +0200)]
sound: remove PCM_KLDSTRING() and fix status strings

PCM_KLDSTRING() prints the kernel module associated with a given audio
device only when that module is not compiled in. Get rid of
PCM_KLDSTRING() altogether and print the driver name (even for modules
that are compiled in) instead, as it implies the module as well.

While here, convert all status strings to the following dmesg-like
format:

[<port|mem> <irq>] on <driver>

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj, imp
Differential Revision: https://reviews.freebsd.org/D43349

4 months agosnd_uaudio: provide information about the device name and attached driver
Christos Margiolis [Tue, 16 Jan 2024 16:46:49 +0000 (18:46 +0200)]
snd_uaudio: provide information about the device name and attached driver

Unlike the other sound drivers, snd_uaudio(4) doesn't provide
information about the device's description and the driver it's attached
to. A side-effect of this is that applications such as mixer(8), that
fetch these strings through the OSS API's SNDCTL_CARDINFO ioctl will
show a USB audio device as:

pcm0:mixer: <USB Audio> at ? kld snd_uaudio

This patch replaces the generic "USB Audio" description with the
device's actual manufacturer and product strings, and the "at ?" string
with the driver it's attached to:

pcm0:mixer: <Focusrite Scarlett Solo USB> at uaudio0 kld snd_uaudio

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D43347

4 months agobhyve: return ENOMEM instead of EFAULT and call free() after being used
rilysh [Mon, 8 Jan 2024 06:06:55 +0000 (11:36 +0530)]
bhyve: return ENOMEM instead of EFAULT and call free() after being used

1. In basl_load() function, when allocation fails,
it returns an EFAULT instead of ENOMEM. An EFAULT
can mislead in some scenarios, whereas an ENOMEM
for an allocation function makes much more sense.

2. Call free() on addr, as it's not being used
anymore after the basl_table_append_bytes()
function.

Signed-off-by: rilysh <nightquick@proton.me>
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1016

4 months agomd5: Enter capability mode earlier
Ricardo Branco [Wed, 3 Jan 2024 18:00:47 +0000 (19:00 +0100)]
md5: Enter capability mode earlier

Reviewed by: markj
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/988

4 months agopf tests: test per-rule pflow
Kristof Provost [Thu, 11 Jan 2024 13:54:09 +0000 (14:54 +0100)]
pf tests: test per-rule pflow

Test that we can enable pflow on a per-rule basis.

Sponsored by: Rubicon Communications, LLC ("Netgate")