]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 months agocxgbe: Don't leak memory resource if t4iov attach fails.
John Baldwin [Wed, 15 Feb 2023 21:34:00 +0000 (13:34 -0800)]
cxgbe: Don't leak memory resource if t4iov attach fails.

Co-authored by: np
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D38580

(cherry picked from commit d2070e5fa983281e94a338d6e87eb29c7dd28505)

12 months agoaio: Fix more synchronization issues in aio_biowakeup.
John Baldwin [Wed, 15 Feb 2023 21:32:52 +0000 (13:32 -0800)]
aio: Fix more synchronization issues in aio_biowakeup.

- Use atomic_store to set job->error.  atomic_set does an or
  operation, not assignment.

- Use refcount_* to manage job->nbio.

  This ensures proper memory barriers are present so that the last bio
  won't see a possibly stale value of job->error.

- Don't re-read job->error after reading it via atomic_load.

Reported by: markj (1)
Reviewed by: mjg, markj
Differential Revision: https://reviews.freebsd.org/D38611

(cherry picked from commit 98844e99d40a90ae89d84762e07150af3a8f89bd)

12 months agoaio_biowakeup: Various style fixes.
John Baldwin [Wed, 15 Feb 2023 18:57:08 +0000 (10:57 -0800)]
aio_biowakeup: Various style fixes.

(cherry picked from commit cca6d6160f14a6a8dcb1e3caa0759ddbd0f68555)

12 months agoaio: Fix a test and set race in aio_biowakeup.
Keith Reynolds [Wed, 15 Feb 2023 18:56:39 +0000 (10:56 -0800)]
aio: Fix a test and set race in aio_biowakeup.

Use atomic_fetchadd in place of separate atomic_subtract / atomic_load.

Reviewed by: markj
Sponsored by: HPE TidalScale
Differential Revision: https://reviews.freebsd.org/D38559

(cherry picked from commit 40734fc57ec0158690e9f03284229553b050b8ea)

12 months agoaio: whack "set but not used" warnings
Mateusz Guzik [Sun, 14 Nov 2021 16:59:53 +0000 (16:59 +0000)]
aio: whack "set but not used" warnings

(cherry picked from commit e9c7ec22877f461f530dfe1cb8e17086300c0ee8)

12 months agoaio: Fix up the opcode in aiocb32_copyin()
Mark Johnston [Sat, 11 Sep 2021 16:55:32 +0000 (12:55 -0400)]
aio: Fix up the opcode in aiocb32_copyin()

With lio_listio(2), the opcode is specified by userspace rather than
being hard-coded by the system call (e.g., aio_readv() -> LIO_READV).
kern_lio_listio() calls aio_aqueue() with an opcode of LIO_NOP, which
gets fixed up when the aiocb is copied in.

When copying in a job request for vectored I/O, we need to dynamically
allocate a uio to wrap an iovec.  So aiocb_copyin() needs to get the
opcode from the aiocb and then decide whether an allocation is required.
We failed to do this in the COMPAT_FREEBSD32 case.  Fix it.

Reported by: syzbot+27eab6f2c2162f2885ee@syzkaller.appspotmail.com
Reviewed by: kib, asomers
Fixes: f30a1ae8d529 ("lio_listio(2):  Allow LIO_READV and LIO_WRITEV.")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31914

(cherry picked from commit 2884918c73389bebfc8025bfb267adae086ee0bd)

12 months agolio_listio(2): Allow LIO_READV and LIO_WRITEV.
Thomas Munro [Sun, 22 Aug 2021 09:48:59 +0000 (21:48 +1200)]
lio_listio(2):  Allow LIO_READV and LIO_WRITEV.

Allow multiple vector IOs to be started with one system call.
aio_readv() and aio_writev() already used these opcodes under the
covers.  This commit makes them available to user space.

Being non-standard extensions, they're only visible if __BSD_VISIBLE is
defined, like the functions.

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

(cherry picked from commit f30a1ae8d5290a52e898279bafc38556bf16bed8)

12 months agoccr: Retire ccr_softc member in struct adapter.
John Baldwin [Thu, 29 Dec 2022 19:39:28 +0000 (11:39 -0800)]
ccr: Retire ccr_softc member in struct adapter.

Prior to Conrad's changes to replace session integer IDs with a
pointer to the driver-specific state in commit 1b0909d51a8aa, the
driver had to find the softc pointer from the adapter before it could
locate the ccr_session structure for a completed request.  Since
Conrad's changes, the ccr_session pointer can now be obtained directly
from the crp.  Add a backpoint from ccr_session back to ccr_softc and
use this in place of the ccr_softc member in cxgbe's struct adapter.

Sponsored by: Chelsio Communications

(cherry picked from commit 7063b9974f8a39d860b7abd03884324e71994f65)

12 months agoh_resolv: Fix a buffer overflow in load().
John Baldwin [Wed, 28 Dec 2022 17:39:18 +0000 (09:39 -0800)]
h_resolv: Fix a buffer overflow in load().

fgetln() returns a pointer to an array of characters that is 'len'
characters long, not 'len + 1'.  While here, overwriting the contents
of the buffer returned by fgetln isn't really safe, so switch to using
getline() instead.

Note that these fixes are a subset of those applied to a
near-identical copy of this function in libc's resolv_test.c in commit
2afeaad315ac19450389b8f2befdbe7c91c37818.

Reviewed by: ngie
Reported by: CHERI (buffer overflow)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D37886

(cherry picked from commit d131218534977f1b2ed590380e70d59a3b20b333)

12 months agoMultiple fixes to the zfsd test suite
Alan Somers [Mon, 3 Apr 2023 21:43:17 +0000 (15:43 -0600)]
Multiple fixes to the zfsd test suite

* Wait for gnop devices to disappear after "gnop destroy".

  Apparently that process is asynchronous now, or maybe it's just slower
  than it used to be.  Also, after removing a gnop wait for its pool to
  be degraded.  That isn't instant.

* The zfsd tests no longer require camcontrol.

  This was a harmless oversight from
  11ed0a95bfa76791dc6428eb2d47a986c0c6f8a3

* Fix the zfsd_degrade_001_pos test for recent zfs versions.

  ZFS now rate limits checksum errors to about 20 per second.  But
  zfsd's threshold for degrading a disk is 50 per minute.  So we must
  alternately corrupt and scrub the pool to ensure that checksum errors
  are generated in multiple 1-second windows, so that zfsd will see
  enough of them.

* Fix the zfsd_fault_001_pos test in VMs

  And, for that matter, when using NVME or SATA disks.  As originally
  written, the test used the da driver to inject errors.  Rewrite it to
  use gnop vdevs.  gnop can also inject errors.  It works on top of any
  disk device, and it's also faster than using da.

Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D39437

(cherry picked from commit dba2e89ea7a13469ee2e47a2a1d627ca28bb94c2)

12 months agozfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs
Alan Somers [Mon, 3 Apr 2023 21:45:55 +0000 (15:45 -0600)]
zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs

At some point the names of these devd events changed.  Probably it
happened when importing OpenZFS.  Before that, FreeBSD's sysevent_alloc
method didn't create a "class" nvpair in the event, which led to
log_sysevent using the event's ev_subclass field as its type.

Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D39437

(cherry picked from commit 92642bba4db4bf1719758ac7233468bc09a0bd59)

Fix zfsd unittests after 92642bba4db

At the time we ensured that the more important functional tests were
working, but neglected to update the unit tests.

Sponsored by: Axcient

(cherry picked from commit 2a0c0aea42092f89c2a5345991e6e3ce4cbef99a)

12 months agoixl.4: update link to intel-nvmupdate ports
Alan Somers [Wed, 2 Aug 2023 00:04:12 +0000 (18:04 -0600)]
ixl.4: update link to intel-nvmupdate ports

Sponsored by: Axcient
Reviewed by: pkubaj
Differential Revision: https://reviews.freebsd.org/D41288

(cherry picked from commit ec54a31423544586061c444aa129ccda966e83f0)

12 months agoDuring F_SETFL, don't change file flags on error
Alan Somers [Sun, 9 Jul 2023 20:48:10 +0000 (14:48 -0600)]
During F_SETFL, don't change file flags on error

Previously, even if the FIONBIO or FIOASYNC ioctl failed, the file's
f_flags variable would still be changed.  Now, kern_fcntl will restore
the original flags if the ioctl fails.

PR: 265736
Reported by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40955

(cherry picked from commit 6c049996ec29bad4a913b019a28f211ab84b0d3d)

12 months agoFix the zfsd_autoreplace_001_neg test
Alan Somers [Wed, 5 Jul 2023 22:37:39 +0000 (16:37 -0600)]
Fix the zfsd_autoreplace_001_neg test

It only ever worked by accident.
* Actually set autoreplace=off as stated in the description
* Wait for the removed device to disappear from the pool before
  proceeding.
* In the assertion, verify that the new disk does not get added, as
  described in the description.

Sponsored by: Axcient

(cherry picked from commit be092bcde96bdcfde9013d60e442cca023bfbd1b)

12 months agoImplement GEOM::rotation_rate for gmirror
Alan Somers [Fri, 7 Apr 2023 16:07:50 +0000 (10:07 -0600)]
Implement GEOM::rotation_rate for gmirror

If all of the mirror's children have the same rotation rate, report
that.  But if they have mixed rotation rates, or if any child has an
unknown rotation rate, report "Unknown".

Sponsored by: Axcient
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D39458

(cherry picked from commit 9309a460b23a8cda8d47c5f775da7fc6472d9925)

12 months agosesutil: fix "fault all" with zoned jbods
Alan Somers [Fri, 10 Mar 2023 17:47:08 +0000 (10:47 -0700)]
sesutil: fix "fault all" with zoned jbods

Some SAS JBODs support zoning.  This feature allows individual SAS
targets to be accessible by only some initiator ports.  One application
would be connecting two servers to the same JBOD, but they wouldn't be
able to see each other's disks.

A zoned JBOD should also prohibit initiators from accessing SES elements
corresponding to inaccessible SAS targets.  It reports that by setting
the element's status code to 0x8 (No Access Allowed).

The bug is that when doing "sesutil (fault|locate) all ...", sesutil
will attempt a ENCIOC_SETELMSTAT ioctl for every single element, even
the inaccessible ones.  The enclosure will reject the command, the
kernel will return EINVAL, and sesutil will exit.

The solution is to check the element's status, and skip trying to set it
if the status is 0x8.  But if the user actually supplied a ses ID, then
assume that he knows what he's doing and try to set it anyway.

PR: 270093
Sponsored by: Axcient
Reviewed by: mav, trasz
Differential Revision: https://reviews.freebsd.org/D39017

(cherry picked from commit 57dc6f5e200b10d34ccb97ccc18d06b3f0b9b933)

12 months agotcp: Initialize the maximum number of entries in a client cookie cache bucket
Zhenlei Huang [Sat, 2 Sep 2023 20:34:07 +0000 (04:34 +0800)]
tcp: Initialize the maximum number of entries in a client cookie cache bucket

This vnet loader tunable is defined with SYSCTL_PROC, thus will not be
initialized by kernel on vnet creating and will always have the default
value TCP_FASTOPEN_CCACHE_BUCKET_LIMIT_DEFAULT.

Fix by fetching the value from the corresponding kernel environment during
vnet constructing.

PR: 273509
Reviewed by: #transport, tuexen
Fixes: c560df6f12f1 This is an implementation of the client side of TCP Fast Open (TFO) [RFC7413]
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41691

(cherry picked from commit 224aec05e732bb97a0d3c91142973b98a91238d1)
(cherry picked from commit 144851777edad9522390036d3073ea656d7b648d)

12 months agonet: Remove vlan metadata on pcp / vlan encapsulation
Zhenlei Huang [Wed, 30 Aug 2023 09:36:38 +0000 (17:36 +0800)]
net: Remove vlan metadata on pcp / vlan encapsulation

For oubound traffic, the flag M_VLANTAG is set in mbuf packet header to
indicate the underlaying interface do hardware VLAN tag insertion if
capable, otherwise the net stack will do 802.1Q encapsulation instead.

Commit 868aabb4708d introduced per-flow priority which set the priority ID
in the mbuf packet header. There's a corner case that when the driver is
disabled to do hardware VLAN tag insertion, and the net stack do 802.1Q
encapsulation, then it will result double tagged packets if the driver do
not check the enabled capability (hardware VLAN tag insertion).

Unfortunately some drivers, currently known cxgbe(4) re(4) ure(4) igc(4)
and vmx(4), have this issue. From a quick review for other interface
drivers I believe a lot more drivers have the same issue. It makes more
sense to fix in net stack than to try to change every single driver.

PR: 270736
Reviewed by: kp
Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39499

(cherry picked from commit b22aae410bc7e4e9a6b43e556dc34be72deadb65)
(cherry picked from commit 494de30b63de9ef31587dcc3fb8e7249535e840a)

12 months agogeom_linux_lvm: Check the offset of physical volume header
Zhenlei Huang [Tue, 22 Aug 2023 09:20:10 +0000 (17:20 +0800)]
geom_linux_lvm: Check the offset of physical volume header

The LVM label is stored on any of the first four sectors, and the
PV (physical volume) header is stored within the same sector following
the LVM label. The current implementation does not fully check the
offset of PV header, when attaching a bad formatted LVM PV the kernel
may crash due to out-of-bounds memory read.

PR: 266562
Reviewed by: jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36773

(cherry picked from commit c941b82e1c31a67a025c43cc7bd31f269fa62588)

12 months agogeli tests: Add a regression test for geli setkey -J
Mark Johnston [Mon, 28 Aug 2023 14:58:43 +0000 (10:58 -0400)]
geli tests: Add a regression test for geli setkey -J

Make sure that it can be used to change the passphrase of both attached
and detached providers.

PR: 254966
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 2b7b09ac9675023869fddbae4911c9b674b1155a)

12 months agogeli: Fix geli setkey -J for detached providers
Arjan de Vet [Mon, 28 Aug 2023 14:54:18 +0000 (10:54 -0400)]
geli: Fix geli setkey -J for detached providers

Clear cached_passphrase before generating a new key, otherwise the
operation nonsensically tries to reuse the old passphrase.

PR: 254966
Pull Request: https://github.com/freebsd/freebsd-src/pull/780
MFC after: 1 week

(cherry picked from commit 88d13bf33754bd4b0c5df92eef83d6fadb9b4944)

12 months agoarm: Add missing no-ctfconvert for fw_stub.awk target
Jessica Clarke [Tue, 22 Aug 2023 20:00:37 +0000 (21:00 +0100)]
arm: Add missing no-ctfconvert for fw_stub.awk target

This target produces a C file not an object file, so using ctfconvert on
it should not be attempted. This keeps it in sync with all other uses of
fw_stub.awk, squashes a warning seen during the build of TEGRA124 on
FreeBSD and avoids the same issue failing the build on non-FreeBSD (such
errors are #ifdef'ed into being warnings on FreeBSD in ctfconvert, which
should be revisited in the future).

Reviewed by: manu
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41542

(cherry picked from commit c9b2751d76bd5a212fedab46512abb533e9ea695)

12 months agoFix build for FreeBSD 13.
Xin LI [Sun, 3 Sep 2023 18:49:02 +0000 (11:49 -0700)]
Fix build for FreeBSD 13.

The minigzip utility has been removed in FreeBSD 14 but still
exists in FreeBSD 13. The upstream revision e9d5486e removed
prototype definitions, rendering the code no longer compliant
with WARNS=5.

12 months agoMFC: MFV: zlib 1.3
Xin LI [Sun, 20 Aug 2023 06:06:49 +0000 (23:06 -0700)]
MFC: MFV: zlib 1.3

Relnotes: yes

(cherry picked from commit 4717628ed859513a3262ea68259d0605f39de0b3)

12 months agolibc: fix history for strverscmp(3) and versionsort(3)
Mina Galić [Thu, 31 Aug 2023 11:50:17 +0000 (11:50 +0000)]
libc: fix history for strverscmp(3) and versionsort(3)

PR: 273401

(cherry picked from commit 09ec5e67a7a6605e5a58a2e3e82dab243a90609a)

12 months agonetstat(1): fix manpage date
Doug Rabson [Wed, 16 Aug 2023 14:13:31 +0000 (15:13 +0100)]
netstat(1): fix manpage date

MFC after: 1 week

(cherry picked from commit 3af3571ca5b82a56ae88654ec5cb35acfbe5d12c)

12 months agonetstat(1): teach netstat to attach to jails
Doug Rabson [Mon, 14 Aug 2023 08:01:28 +0000 (09:01 +0100)]
netstat(1): teach netstat to attach to jails

Add -j <jail> flag to netstat(1) to allow access to network information
from a jail.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41446

(cherry picked from commit 182e8ae26d7cad119bcfce7cc788c1f5cb06e226)

12 months agoclk_fixed: reduce and clarify messages due to missing clk-frequency
Mike Karels [Fri, 25 Aug 2023 20:11:46 +0000 (15:11 -0500)]
clk_fixed: reduce and clarify messages due to missing clk-frequency

The current dts for Raspberry 3B+ and 4B have 2 disabled fixed-clock
nodes which have no clock-frequency value.  Such nodes are non-standard.
This results in about 150 messages during autoconfiguration:

    clk_fixed2: <Fixed clock> disabled on ofwbus0
    clk_fixed2: Cannot FDT parameters.
    device_attach: clk_fixed2 attach returned 6

Defensively check for clock-frequency in the probe routine, and if
none, return an error with a more direct error message (1 line per
occurrence, 50 lines total):

    clk_fixed2: clock-fixed has no clock-frequency

Based on a patch by manu.

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

(cherry picked from commit b4ef09b9eb117d622bb274448e5cffcae0ba3488)

12 months agobridge.4: Document the net.link.bridge.log_mac_flap sysctl variable
Zhenlei Huang [Mon, 10 Apr 2023 10:07:04 +0000 (18:07 +0800)]
bridge.4: Document the net.link.bridge.log_mac_flap sysctl variable

It was introduced in 2d3614fb132b (bridge: Log MAC address port flapping).

Reviewed by: gbe (manpages)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D39465

(cherry picked from commit 3fdb40d1befe7b561e7e5fa0b5c80aac41adc50d)

12 months agocarp: delete interface routes on link loss.
Andrey V. Elsukov [Wed, 2 Aug 2023 07:40:34 +0000 (10:40 +0300)]
carp: delete interface routes on link loss.

Obtained from: Yandex LLC
MFC after: 10 days
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D41290

(cherry picked from commit 600bf006d3f15f170b9209d5d3a37437bfe0850e)

12 months agosyslogd: Add some basic regression tests
Jake Freeland [Thu, 22 Jun 2023 21:19:51 +0000 (16:19 -0500)]
syslogd: Add some basic regression tests

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

(cherry picked from commit fcace2906ddfae6bee6064b63a6df44be1bdf04b)

12 months agointr: merge interrupt table uses of MAXCOMLEN into INTRNAME_LEN
Elliott Mitchell [Fri, 20 Jan 2023 02:24:32 +0000 (18:24 -0800)]
intr: merge interrupt table uses of MAXCOMLEN into INTRNAME_LEN

The repeated uses of `MAXCOMLEN + 1` seem a bit hazardous.  If there was
a future need to change the size, the repeats will be troublesome.
Merge everything into `#define INTRNAME_LEN` (matches the name used by
INTRNG).

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D38455

(cherry picked from commit 5ad59b91535f2df176c132be10e344c4a302f619)

12 months agorc.d/routing: Correct setting default gateway for each FIB
Andrew Fengler [Mon, 26 Jun 2023 18:40:21 +0000 (18:40 +0000)]
rc.d/routing: Correct setting default gateway for each FIB

There was a mistake in the previous commit, it used the incorrect
spelling of the FIB variable name and was not functional

Also corrects an issue with the IPv6 default route variable name.

Fixes: 30659d1dcbcc ("Add support for adding default routes for other FIBs")
Sponsored-by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D37685

(cherry picked from commit f81be7a8318b178e406c12d98f78cfa2a4229af7)

12 months agonet: Do not overwrite if_vlan's PCP
Zhenlei Huang [Wed, 23 Aug 2023 09:48:12 +0000 (17:48 +0800)]
net: Do not overwrite if_vlan's PCP

In commit c7cffd65c5d8 the function ether_8021q_frame() was slightly
refactored to use pointer of struct ether_8021q_tag as parameter qtag to
include the new option proto.

It is wrong to write to qtag->pcp as it will effectively change the memory
that qtag points to. Unfortunately the transmit routine of if_vlan parses
pointer of the member ifv_qtag of its softc which stores vlan interface's
PCP internally, when transmitting mbufs that contains PCP the vlan
interface's PCP will get overwritten.

Fix by operating on a local copy of qtag->pcp. Also mark 'struct ether_8021q_tag'
as const so that compilers can pick up such kind of bug.

PR: 273304
Reviewed by: kp
Fixes: c7cffd65c5d85 Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39505

(cherry picked from commit 838c8c47860a0203130bd558d507a0565a2eba8f)

12 months agoiir: prevent negative offsets in ioctl
Ed Maste [Mon, 28 Aug 2023 03:38:30 +0000 (23:38 -0400)]
iir: prevent negative offsets in ioctl

Direct commit to stable/13 as this driver has been removed from main in
commit 399188a2c60c ("iir: Remove").

PR: 273328
Reported by: ChenHao Lu
Sponsored by: The FreeBSD Foundation

12 months agopf tests: test syncookies on IPv6
Kristof Provost [Mon, 21 Aug 2023 06:06:50 +0000 (08:06 +0200)]
pf tests: test syncookies on IPv6

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 1fd8c845b8b77f208f481901823fb87df04f8add)

12 months agopf: enable the syncookie feature for IPv6
Kajetan Staszkiewicz [Mon, 21 Aug 2023 06:01:29 +0000 (08:01 +0200)]
pf: enable the syncookie feature for IPv6

When syncookie support was added to pf the relevant work was only done
in pf_test(), not pf_test6(). Do this now.

MFC after: 1 week
Reviewed by: kp
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D41502

(cherry picked from commit 92d4152295bc670b80352b5fbe102565de99a4eb)

12 months agopf: reduce indentation
Kajetan Staszkiewicz [Mon, 21 Aug 2023 05:59:49 +0000 (07:59 +0200)]
pf: reduce indentation

Early-return to reduce syncookie-related indentation.

No functional change.

MFC after: 1 week
Reviewed by: kp
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D41502

(cherry picked from commit 9642d948c08d80a41679f2eaab26e85a8b9e3080)

12 months agopf tests: verify syncookie status report
Kristof Provost [Mon, 31 Oct 2022 11:15:58 +0000 (12:15 +0100)]
pf tests: verify syncookie status report

Verify that pfctl -si -v correctly shows syncookies to be
active/inactive.

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

(cherry picked from commit b0bf4303109a76eb4224015b9abebf88e96116ef)

12 months agopf: expose syncookie active/inactive status
Kristof Provost [Sat, 24 Sep 2022 12:47:17 +0000 (14:47 +0200)]
pf: expose syncookie active/inactive status

When syncookies are in adaptive mode they may be active or inactive.
Expose this status to users.

Suggested by: Guido van Rooij
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 444a77ca85c78d02c19622a83a2798d0c5c2117b)

12 months agoMFC: MFV: less v643.
Xin LI [Sun, 13 Aug 2023 07:13:31 +0000 (00:13 -0700)]
MFC: MFV: less v643.

(cherry picked from commit f80a33ea416e408c490a1f1f031a6abbccbae085)

12 months agoFix mis-merge
Konstantin Belousov [Mon, 28 Aug 2023 02:44:29 +0000 (05:44 +0300)]
Fix mis-merge

12 months agortld: switch from malloc_aligned() to __crt_aligned_alloc()
Konstantin Belousov [Sun, 30 Jul 2023 01:51:52 +0000 (04:51 +0300)]
rtld: switch from malloc_aligned() to __crt_aligned_alloc()

(cherry picked from commit feaae6ba1ace0091384ac371423976cd15e59e5a)

12 months agortld_malloc: add __crt_aligned_alloc_offset()
Konstantin Belousov [Sat, 22 Jul 2023 04:21:45 +0000 (07:21 +0300)]
rtld_malloc: add __crt_aligned_alloc_offset()

(cherry picked from commit c29ee08204ce4106d4992474005c5f2fb7d5fbf1)

12 months agortld_malloc: increase overhead index to uint16
Konstantin Belousov [Tue, 25 Jul 2023 12:54:45 +0000 (15:54 +0300)]
rtld_malloc: increase overhead index to uint16

(cherry picked from commit d60130bf32a3c35417f276507dcdfa569397dae3)

12 months agortld_malloc.c: change return type of cp2op() to void
Konstantin Belousov [Sun, 30 Jul 2023 01:58:01 +0000 (04:58 +0300)]
rtld_malloc.c: change return type of cp2op() to void

(cherry picked from commit 6bb7f05850efceb01a7050e3c0fd86f9539c0071)

12 months agohwpmc: on process exit, ensure that the owned log is closed
Konstantin Belousov [Sun, 13 Aug 2023 13:42:49 +0000 (16:42 +0300)]
hwpmc: on process exit, ensure that the owned log is closed

(cherry picked from commit 3c872a70b883e4e2b38135bd6bd114ac9d2ea579)

12 months agovfs: retried++ -> retried = true for the boolean
Mateusz Guzik [Thu, 24 Aug 2023 22:49:47 +0000 (22:49 +0000)]
vfs: retried++ -> retried = true for the boolean

No real changes.

Noted by: rpokala

(cherry picked from commit 712806fc4b5470eb7d9ce537e3cdf3b386455d86)

12 months agovfs: try harder to find free vnodes when recycling
Mateusz Guzik [Thu, 24 Aug 2023 05:34:08 +0000 (05:34 +0000)]
vfs: try harder to find free vnodes when recycling

The free vnode marker can slide past eligible entries.

Artificially reducing vnode limit to 300k and spawning 104 workers each
creating a million files results in all of them trying to recycle, which
often fails when it should not have to.

Because of the excessive traffic in this scenario, the trylock to
requeue is virtually guaranteed to fail, meaning nothing gets pushed
forward.

Since no vnodes were found, the most unfortunate sleep for 1 second is
induced (see vn_alloc_hard, the "vlruwk" msleep).

Without the fix the machine is mostly idle with almost everyone stuck
off CPU waiting for the sleep to finish. With the fix it is busy
creating files.

Unrelated to the above problem the marker could have landed in a
similarly problematic spot for because of any failure in vtryrecycle.

Originally reported as poudriere builders stalling in a vnode-count
restricted setup.

Fixes: 138a5dafba31 ("vfs: trylock vnode requeue")
Reported by: Mark Millard

(cherry picked from commit c1d85ac3df82df721e3d33b292579c4de491488e)

12 months agovfs: trylock vnode requeue
Mateusz Guzik [Tue, 21 Mar 2023 04:23:15 +0000 (04:23 +0000)]
vfs: trylock vnode requeue

The quasi-LRU still gets in the way for example when doing an
incremental bzImage build, with vnode_list lock being at the
top of the profile. Further damage control the problem by trylocking.

Note the entire mechanism desperately wants to be reaped out in favor
of something(tm) which both scales in a multicore setting and provides
sensible replacement policy.

With this change everything vfs almost disappears from the on CPU
flamegraph, what is left is tons of contention in the VM.

(cherry picked from commit 138a5dafba312ff39ce0eefdbe34de95519e600d)

12 months agotests: Fix build on mips after 33d7da6b
Dmitry Chagin [Sun, 27 Aug 2023 17:51:49 +0000 (20:51 +0300)]
tests: Fix build on mips after 33d7da6b

12 months agotests: Handle SIGSEGV in the vm stack mprotect exec test
Dmitry Chagin [Thu, 24 Aug 2023 18:02:52 +0000 (21:02 +0300)]
tests: Handle SIGSEGV in the vm stack mprotect exec test

To exit gracefully handle SIGSEGV and mark the test as failed.

MFC after: 3 days

(cherry picked from commit f8bc606aad35daf9853e3198f14d4a7baba36fcb)

12 months agosoxstack: silence GCC warning
Ed Maste [Wed, 9 Aug 2023 01:13:20 +0000 (21:13 -0400)]
soxstack: silence GCC warning

Add parens around _STACK_FLAG_GROWS expression to fix GCC warning about
arithmetic in operand of '|'.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 07d3738b82b6e064288cb1d630a3bde611e30819)

12 months agotests: Fix build after 8920c5f2
Dmitry Chagin [Tue, 8 Aug 2023 21:39:35 +0000 (00:39 +0300)]
tests: Fix build after 8920c5f2

MFC after: 2 weeks

(cherry picked from commit 76f28f656eb5db81b49d6d89e1d43815aeda3128)

12 months agotests: Add stack grows tests
Dmitry Chagin [Tue, 8 Aug 2023 15:12:09 +0000 (18:12 +0300)]
tests: Add stack grows tests

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

(cherry picked from commit 8920c5f2a1175c22631780bd236026d15e2d3d72)

12 months agotests: Also exclude powerpc/powerpcspe from mmap_map_32bit_test
Li-Wen Hsu [Sat, 12 Aug 2023 01:24:15 +0000 (09:24 +0800)]
tests: Also exclude powerpc/powerpcspe from mmap_map_32bit_test

Sponsored by: The FreeBSD Foundation

(cherry picked from commit b231322dbe9559c2dc43698c3bb1e832cd8bbfa9)

12 months agotests: Add MAP_32BIT flag test
Dmitry Chagin [Tue, 1 Aug 2023 20:23:15 +0000 (23:23 +0300)]
tests: Add MAP_32BIT flag test

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D41236
MFC after: 1 month

(cherry picked from commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a)

12 months agolibc/gen/_pthread_stubs.c: Remove stray whitespaces
Konstantin Belousov [Sun, 20 Aug 2023 22:32:43 +0000 (01:32 +0300)]
libc/gen/_pthread_stubs.c: Remove stray whitespaces

(cherry picked from commit 89e17c6ea03f27dfe4734b024d807d12840db226)

12 months agolibc: export pthread_getname_np stub
Minsoo Choo [Mon, 14 Aug 2023 22:21:24 +0000 (18:21 -0400)]
libc: export pthread_getname_np stub

(cherry picked from commit 0dc52b72108e321a99022785713c58d278696af2)

12 months agortld: unlock bind lock when calling into crt __pthread_distribute_static_tls method
Konstantin Belousov [Fri, 18 Aug 2023 19:52:24 +0000 (22:52 +0300)]
rtld: unlock bind lock when calling into crt __pthread_distribute_static_tls method

(cherry picked from commit b1d3e2b771552af071bf0964233cc5a76ea25542)

12 months agoetc: remove leftover leading empty comments, blank lines
Mike Karels [Tue, 22 Aug 2023 18:03:28 +0000 (13:03 -0500)]
etc: remove leftover leading empty comments, blank lines

Remove leftover empty leading comments/blank lines that had been
spacers between $FreeBSD$ and the following content in config files
in src/etc.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41548

(cherry picked from commit 9d6049d5da8ce70b3f815431bdedcee9c04f60cc)

12 months agovfs: track how many times vn_alloc blocked on hitting the vnode limit
Mateusz Guzik [Fri, 18 Aug 2023 23:56:58 +0000 (23:56 +0000)]
vfs: track how many times vn_alloc blocked on hitting the vnode limit

(cherry picked from commit 64e881f2db968bf10c4aa22668ea270e1b9dd3c1)

12 months agovfs: flip deferred_inact to atomic
Mateusz Guzik [Sat, 25 Mar 2023 13:31:17 +0000 (13:31 +0000)]
vfs: flip deferred_inact to atomic

Turns out it is very rarely triggered, making a per-cpu
counter a waste.

Examples from real life boxes:
uptime counter
135 days 847
138 days 2190
141 days 1

(cherry picked from commit 245767c2782ef2e29340be0a6755be817f16bad4)

12 months agovfs: decouple freevnodes from vnode batching
Mateusz Guzik [Tue, 21 Mar 2023 07:27:25 +0000 (07:27 +0000)]
vfs: decouple freevnodes from vnode batching

In principle one cpu can keep vholding vnodes, while another vdrops
them. In this case it may be the local count will keep growing in an
unbounded manner. Roll it up after a threshold instead.

While here move it out of dpcpu into struct pcpu.

Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D39195

(cherry picked from commit b5d43972e3941d6c03d935dc423385f3c2178d68)

12 months agoixgbe: define IXGBE_LE32_TO_CPUS
Kevin Bowling [Mon, 14 Aug 2023 01:47:09 +0000 (18:47 -0700)]
ixgbe: define IXGBE_LE32_TO_CPUS

Richard Lowe notes in PR 170267 IXGBE_LE32_TO_CPUS was previously
directly defined as le32dec() which is a pure function but the shared
code is expecting an in place conversion.

In SVN r282289 its assignment was removed altogether.

There was some deliberation in the PR on what to define this as, we
just need to do the update in place which is easy enough.

The uintptr_t casts in the shared code were from a DPDK sync and are
unwanted with our new ixgbe_osdep.h implementation.

PR: 170267
Reported by: Richard Lowe <richlowe@richlowe.net>

(cherry picked from commit bef7d49101cdf28830a648f63ff00998fbe54715)

12 months agosubr_unit.c: another attempt to fix the build
Konstantin Belousov [Fri, 18 Aug 2023 15:42:59 +0000 (18:42 +0300)]
subr_unit.c: another attempt to fix the build

(cherry picked from commit 04f683b25a81ad47c998e3e496419c08ae4905eb)

12 months agostd.nodebug: remove DIAGNOSTIC from debug configs
Konstantin Belousov [Fri, 18 Aug 2023 13:39:22 +0000 (16:39 +0300)]
std.nodebug: remove DIAGNOSTIC from debug configs

(cherry picked from commit 431884325075e3532235002fd7e5228b40f16b19)

12 months agokern/subr_unit.c: fix non-debug build
Konstantin Belousov [Fri, 18 Aug 2023 13:36:06 +0000 (16:36 +0300)]
kern/subr_unit.c: fix non-debug build

(cherry picked from commit 1384a0b940e87876d36d50ad58581c24dc642714)

12 months agovm_map.c: fix syntax
Konstantin Belousov [Fri, 18 Aug 2023 13:35:25 +0000 (16:35 +0300)]
vm_map.c: fix syntax

(cherry picked from commit 5f452214f2761b422b1a385865fe4c20265b09fe)

12 months agovm_map.c: plug several more places which might modify entry->offset
Konstantin Belousov [Tue, 15 Aug 2023 19:05:33 +0000 (22:05 +0300)]
vm_map.c: plug several more places which might modify entry->offset

(cherry picked from commit c718009884b3d65528deaff24712cbf98e3be656)

12 months agolinuxolator: implement Linux' PROT_GROWSDOWN
Konstantin Belousov [Sat, 29 Jul 2023 21:00:51 +0000 (00:00 +0300)]
linuxolator: implement Linux' PROT_GROWSDOWN

(cherry picked from commit 9b65fa69407808e710748875b0af98902110f128)

12 months agovm_map_protect(): add VM_MAP_PROTECT_GROWSDOWN flag
Konstantin Belousov [Fri, 28 Jul 2023 00:40:53 +0000 (03:40 +0300)]
vm_map_protect(): add VM_MAP_PROTECT_GROWSDOWN flag

(cherry picked from commit 90049eabcfadf229e3983f04310a8ea28fe3d2b1)

12 months agovm_map_growstack(): restore stack gap data if gap entry was removed
Konstantin Belousov [Tue, 25 Jul 2023 18:52:15 +0000 (21:52 +0300)]
vm_map_growstack(): restore stack gap data if gap entry was removed

(cherry picked from commit b6037edbd17dd3144aa1a7b0814cd5ebe98d765a)

12 months agovm_map: do not allow to merge stack gap entries
Konstantin Belousov [Tue, 25 Jul 2023 18:48:57 +0000 (21:48 +0300)]
vm_map: do not allow to merge stack gap entries

(cherry picked from commit 9d7ea6cff7a7edc0f3d4fa8d54e6345ee027e754)

12 months agovm_map_protect(): handle stack protection stored in the stack guard
Konstantin Belousov [Tue, 25 Jul 2023 13:32:28 +0000 (16:32 +0300)]
vm_map_protect(): handle stack protection stored in the stack guard

(cherry picked from commit 55be6be12cd95552a46feccb42db984c8d3cbc36)

12 months agovm_map_protect(): move guard handling at the last phase into an empty dedicated helper
Konstantin Belousov [Fri, 28 Jul 2023 00:14:07 +0000 (03:14 +0300)]
vm_map_protect(): move guard handling at the last phase into an empty dedicated helper

(cherry picked from commit 79169929f04d00e51a901d1e4cb377d2475bf660)

12 months agovm_map_growstack(): handle max protection for stacks
Konstantin Belousov [Tue, 25 Jul 2023 13:56:29 +0000 (16:56 +0300)]
vm_map_growstack(): handle max protection for stacks

(cherry picked from commit aa928a52164fe57965491d63e57de66e9c078e1a)

12 months agovm_map.c: add CONTAINS_BITS macro
Konstantin Belousov [Sat, 29 Jul 2023 17:52:52 +0000 (20:52 +0300)]
vm_map.c: add CONTAINS_BITS macro

(cherry picked from commit 0fb6aae7f0e19c0628c398bbe30297ef9245030e)

12 months agoAdd vm_map_insert1(9)
Konstantin Belousov [Wed, 19 Jul 2023 16:44:18 +0000 (19:44 +0300)]
Add vm_map_insert1(9)

(cherry picked from commit ba41b0de3ef2b29c5c1155c7550785ed4b491bd8)

12 months agovm_map_insert(): update herald comment
Konstantin Belousov [Thu, 10 Aug 2023 07:59:25 +0000 (10:59 +0300)]
vm_map_insert(): update herald comment

(cherry picked from commit 3b44ee50be815a93d4e2b5d34d1cfc77268f6000)

12 months agovmspace_fork(): do not override offset for the guard entries
Konstantin Belousov [Thu, 20 Jul 2023 17:45:01 +0000 (20:45 +0300)]
vmspace_fork(): do not override offset for the guard entries

(cherry picked from commit db6c7c7f8d870f377fcd1cc98e4832681bb5bdf0)

12 months agommap(MAP_STACK): on stack grow, use original protection
Konstantin Belousov [Wed, 19 Jul 2023 11:05:32 +0000 (14:05 +0300)]
mmap(MAP_STACK): on stack grow, use original protection

PR: 272585

(cherry picked from commit 21e45c30c35c9aa732073f725924caf581c93460)

12 months agoufs: try to elide the interlock in ufs_itimes
Mateusz Guzik [Mon, 12 Sep 2022 23:20:59 +0000 (23:20 +0000)]
ufs: try to elide the interlock in ufs_itimes

Reviewed by: kib, mckusick
Differential Revision: https://reviews.freebsd.org/D36522

(cherry picked from commit 04f095a49165cf4903fda0f21271be5c6bfa5857)

12 months agoufs: always call ufs_itimes on close
Mateusz Guzik [Mon, 12 Sep 2022 23:19:42 +0000 (23:19 +0000)]
ufs: always call ufs_itimes on close

While here dedup code with fifo.

Reviewed by: kib, mckusick
Differential Revision: https://reviews.freebsd.org/D36522

(cherry picked from commit be931de6c99f346cedb7a364602f1cb654a32caf)

12 months agoiflib: Fix white space and reduce some line lengths
Eric Joyner [Fri, 4 Aug 2023 17:53:29 +0000 (10:53 -0700)]
iflib: Fix white space and reduce some line lengths

This helps align some of the code with the rest of the style used in
iflib, but as marius@ points out, this is not style(9).

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: kbowling@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41324

(cherry picked from commit 7f527d48124bd03fcfb946ce2d5d0c7bc71e099d)

12 months agoiflib: Remove redundant variable
Eric Joyner [Fri, 4 Aug 2023 17:57:11 +0000 (10:57 -0700)]
iflib: Remove redundant variable

In iflib_init_locked(), sctx and scctx both point to the same value,
which is the ifc_softc_ctx field in the iflib softc. Remove the
declaration and assignment to sctx since scctx can be used instead, and
the name of scctx follows the naming convention used for local variables
that point to ifc_softc_ctx.

In theory there should be no functional impact with this change.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: kbowling@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41325

(cherry picked from commit d2dd3d5a989d1a2c9ebfbb90a1e682d3ad9db3c3)

12 months agoiflib: Fix panic during driver reload stress test
Przemyslaw Lewandowski [Thu, 27 Jul 2023 22:47:12 +0000 (15:47 -0700)]
iflib: Fix panic during driver reload stress test

During a driver reload stress test, after 50-300 reloads a panic occurs.
After adding sleeps in between loading and unloading the driver, the
issue does not occur.  It's possible that loading/unloading too fast may
cause the gt_taskqueue pointer to be freed earlier than expected;
checking for a null pointer first fixes it.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D39457

(cherry picked from commit 04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd)

12 months agovmm: Fix VM_GET_CPUS compatibility
Mark Johnston [Thu, 17 Aug 2023 18:49:54 +0000 (14:49 -0400)]
vmm: Fix VM_GET_CPUS compatibility

bhyve in a 13.x jail fails to boot guests with more than one vCPU
because they pass too small a buffer to VM_GET_CPUS, causing the ioctl
handler to return ERANGE.  Handle this the same way as cpuset system
calls: make sure that the result can fit in the truncated space, and
relax the check on the cpuset buffer.

As a side effect, fix an insufficient bounds check on "size".  The
signed/unsigned comparison with sizeof(cpuset_t) fails to exclude
negative values, so we can end up allocating impossibly large amounts of
memory.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41496

12 months agoossl: Add missing labels to bsaes-armv7.S
Mark Johnston [Mon, 7 Aug 2023 14:17:16 +0000 (10:17 -0400)]
ossl: Add missing labels to bsaes-armv7.S

There is a bug in the OpenSSL script which generates this file; the bug
is in the process of being fixed upstream.

Specifically, when generating the output, bsaes-armv7.pl strips some
labels that are used when the output asm is compiled with __KERNEL__
defined, resulting in a build error.  As a step towards adding armv7
support to ossl(4), manually patch the generated asm.  The upstream fix
will be imported later.

Reviewed by: andrew, jhb, emaste
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D41303

(cherry picked from commit 454c425dbed1d341025c71a8645011a980e20ccd)

12 months agoarm/unwind: Check stack pointer boundaries before dereferencing
Mark Johnston [Thu, 27 Jul 2023 19:44:00 +0000 (15:44 -0400)]
arm/unwind: Check stack pointer boundaries before dereferencing

If the unwinder somehow ends up with a stack pointer that lies outside
the stack, then an attempt to dereference can lead to a fault, which
causes the kernel to panic again and unwind the stack, which leads to a
fault...

Add kstack_contains() checks at points where we dereference the stack
pointer.  This avoids the aforementioned infinite loop in one case I hit
where some OpenSSL assembly code apparently confuses the unwinder.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D41210

(cherry picked from commit 1be56e0bb1e8bd8373e446ff9386bcdd764935aa)

12 months agoopencrypto: Respect alignment constraints in xor_and_encrypt()
Mark Johnston [Thu, 27 Jul 2023 19:44:52 +0000 (15:44 -0400)]
opencrypto: Respect alignment constraints in xor_and_encrypt()

Copy operands to an aligned buffer before performing operations which
require alignment.  Otherwise it's possible for this code to trigger an
alignment fault on armv7.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D41211

(cherry picked from commit 96c2538121390c872f68ac48f97b35fb973c11dc)

12 months agosh tests: Update $LINENO tests after $FreeBSD$ removal
Mark Johnston [Wed, 23 Aug 2023 17:24:36 +0000 (13:24 -0400)]
sh tests: Update $LINENO tests after $FreeBSD$ removal

Fixes: d0b2dbfa0ecf ("Remove $FreeBSD$: one-line sh pattern")
(cherry picked from commit c903f664780e2df7aff9ca84089d55dec5ff1dae)

12 months agolibcrypto: Don't embed $FreeBSD$ in generated assembly files
John Baldwin [Tue, 22 Aug 2023 04:01:48 +0000 (21:01 -0700)]
libcrypto: Don't embed $FreeBSD$ in generated assembly files

Reviewed by: gallatin, ngie, emaste
Differential Revision: https://reviews.freebsd.org/D41536

(With ppc assembler stuff removed, since that's no in stable/13 yet)

(cherry picked from commit 7a56f5af71851c8b502720ca956629c302821430)

12 months agoFix partially removed comment by removing the rest
Warner Losh [Wed, 16 Aug 2023 20:17:33 +0000 (14:17 -0600)]
Fix partially removed comment by removing the rest

Fixes: 2a63c3be1582
(cherry picked from commit ddb5480ec67a44a28316724397fd6609354c4558)

12 months agoRestore blank line after #include
John Baldwin [Thu, 17 Aug 2023 18:32:14 +0000 (11:32 -0700)]
Restore blank line after #include

(cherry picked from commit ece58eaf500974ba4ab1b56420414bf971a17ef7)

12 months agoshare/examples/tests: fix comments after $FreeBSD$ removal
Ed Maste [Wed, 16 Aug 2023 21:37:21 +0000 (17:37 -0400)]
share/examples/tests: fix comments after $FreeBSD$ removal

Fixes: 2a63c3be1582 ("Remove $FreeBSD$: one-line .c comment pattern")
(cherry picked from commit d1d7a273707a50d4ad1691b2c4dbf645dfa253ea)

12 months agomakefs: clean up some leftovers after $FreeBSD$ tag removal
Ed Maste [Thu, 30 Mar 2023 14:02:02 +0000 (10:02 -0400)]
makefs: clean up some leftovers after $FreeBSD$ tag removal

Fixes: 2a63c3be1582
(cherry picked from commit 90aad5d3e44d137ce80d2ec257de07c7c1367bd3)

12 months agoDelete trailing whitespace from $FreeBSD$ removal
Warner Losh [Tue, 22 Aug 2023 01:34:15 +0000 (19:34 -0600)]
Delete trailing whitespace from $FreeBSD$ removal

Fixes: d4bf8003ee42
Sponsored by: Netflix

(cherry picked from commit 682d5a87e51966939710fb52cc4e8fbb7bff04b5)

12 months agoRemove $FreeBSD$: one-line xdr pattern
Warner Losh [Tue, 22 Aug 2023 01:32:41 +0000 (19:32 -0600)]
Remove $FreeBSD$: one-line xdr pattern

Remove /^\s*%\s*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 9524e274b548)

12 months agoRemove $FreeBSD$: one-line forth tag
Warner Losh [Tue, 22 Aug 2023 01:32:37 +0000 (19:32 -0600)]
Remove $FreeBSD$: one-line forth tag

Remove /^\\[\s*]*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 26a58599a09a)