]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 months agounbound: Import upstream 0ee44ef3 when ENOBUFS is returned
Cy Schubert [Fri, 13 Oct 2023 00:04:25 +0000 (17:04 -0700)]
unbound: Import upstream 0ee44ef3 when ENOBUFS is returned

From upstream 0ee44ef3:

- Fix send of udp retries when ENOBUFS is returned. It stops looping
  and also waits for the condition to go away. Reported by Florian
  Obser.

PR: 274352

Merge commit '292d51198aa319c58f534549851e9c28486abdf4'

(cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a)

7 months agofusefs: sanitize FUSE_READLINK results for embedded NULs
Alan Somers [Wed, 4 Oct 2023 18:48:01 +0000 (12:48 -0600)]
fusefs: sanitize FUSE_READLINK results for embedded NULs

If VOP_READLINK returns a path that contains a NUL, it will trigger an
assertion in vfs_lookup.  Sanitize such paths in fusefs, rejecting any
and warning the user about the misbehaving server.

PR: 274268
Sponsored by: Axcient
Reviewed by: mjg, markj
Differential Revision: https://reviews.freebsd.org/D42081

(cherry picked from commit 662ec2f781521c36b76af748d74bb0a3c2e27a76)

7 months agomrsas: Fix callout locking in mrsas_complete_cmd()
Mark Johnston [Sat, 7 Oct 2023 00:31:03 +0000 (20:31 -0400)]
mrsas: Fix callout locking in mrsas_complete_cmd()

callout_stop() requires the associated lock to be held.

This is a bit hacky, but I believe it's safe since the subsequent
mrsas_cmd_done() call will also acquire the SIM lock to stop a different
callout.

PR: 265484
Reviewed by: imp
Tested by: Jérémie Jourdin <jeremie.jourdin@advens.fr>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39559

(cherry picked from commit 4640df1b0a49697840b81f6bcd269a483514c6aa)

7 months agovfs cache: s/vfs.cache_fast_lookup/vfs.cache.param.fast_lookup
Mateusz Guzik [Tue, 3 Oct 2023 13:34:32 +0000 (13:34 +0000)]
vfs cache: s/vfs.cache_fast_lookup/vfs.cache.param.fast_lookup

(cherry picked from commit 38a375c472d295df41adf73c5ddd50543f9d877c)

7 months agovfs: convert recycles_count and recycles_free_count to mere u_long
Mateusz Guzik [Thu, 12 Oct 2023 06:57:59 +0000 (06:57 +0000)]
vfs: convert recycles_count and recycles_free_count to mere u_long

Only vnlru ever updates them.

This also removes recycles_count updates from hand-rolled debug vnode
recycling via sysctl.

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

(cherry picked from commit 37544d9768110fd67527db7f2a3f7bb6fc977582)

7 months agovfs: count recycles by vnlru and by vn_alloc separately
Mateusz Guzik [Thu, 12 Oct 2023 06:47:45 +0000 (06:47 +0000)]
vfs: count recycles by vnlru and by vn_alloc separately

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

(cherry picked from commit a92fc3122d2becfbf5a627af6eda5cedfac57c31)

7 months agovfs: count calls to uma_reclaim in vnlru
Mateusz Guzik [Wed, 11 Oct 2023 22:48:03 +0000 (22:48 +0000)]
vfs: count calls to uma_reclaim in vnlru

(cherry picked from commit bb679b0c49094757f2aef3d8fe46c41dc8192fea)

7 months agovfs: add max_vnlru_free to the vfs.vnode.vnlru tree
Mateusz Guzik [Wed, 11 Oct 2023 13:05:43 +0000 (13:05 +0000)]
vfs: add max_vnlru_free to the vfs.vnode.vnlru tree

While here rename the var internally.

(cherry picked from commit 281a9715b582861fe4097c2f27eb27b208d752b1)

7 months agovfs: further speed up continuous free vnode recycle
Mateusz Guzik [Wed, 11 Oct 2023 09:42:12 +0000 (09:42 +0000)]
vfs: further speed up continuous free vnode recycle

The primary bottleneck *was* vnode_list mtx, which got artificially
worsened due to the following work done with the lock held:
1. the global heavily modified numvnodes counter was being read,
   inducing massive cache line ping pong
2. should the value fit limits (which it normally did) there would be an
   avoidable write to vn_alloc_cyclecount, which is being read outside
   of the lock, once more inducing traffic

But if vn_alloc_cyclecount is 0, which it normally is even when facing
vnode shortage, there is no need to check numvnodes nor set it to 0 again.

Another problem was numvnodes adjustment (which made the locked read
much worse). While it fundamentally does not scale as it is not
distributed in any fashion, it was avoidably slow. When bumping over the
vnode limit, it would be modified with atomics 3 times: inc + dec to
backpedal in vn_alloc, then final inc in vn_alloc_hard.

One can let some slop persist over calls to vnlru_free instead.

In principle each thread in the system could get here and bump it, so a
limit is put in place to keep things sane.

Bench setup same as in prior commits: zfs, 20 separate directory trees
each with 1 million files in total and 20 find(1) processes stating them
in parallel (one per each tree).

Total run time (in seconds) goes down as follows:
vnode limit 8388608 400000
before ~20 ~35
after ~8 ~15

With this in place the primary bottleneck is now ZFS.

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

(cherry picked from commit 054f45e026d898bdc8f974d33dd748937dee1d6b)

7 months agovfs: don't recycle transiently excess vnodes
Mateusz Guzik [Wed, 11 Oct 2023 06:39:48 +0000 (06:39 +0000)]
vfs: don't recycle transiently excess vnodes

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

(cherry picked from commit a4f753e812d8913e9be481c6dfa1574c7f032a56)

7 months agovfs: prefix regular vnlru with a special case for free vnodes
Mateusz Guzik [Thu, 14 Sep 2023 19:08:40 +0000 (19:08 +0000)]
vfs: prefix regular vnlru with a special case for free vnodes

Works around severe performance problems in certain corner cases, see
the commentary added.

Modifying vnlru logic has proven rather error prone in the past and a
release is near, thus take the easy way out and fix it without having to
dig into the current machinery.

(cherry picked from commit 90a008e94bb205e5b8f3c41d57e155b59a6be95d)

7 months agovfs: consult freevnodes in vnlru_kick_cond
Mateusz Guzik [Tue, 10 Oct 2023 16:19:53 +0000 (16:19 +0000)]
vfs: consult freevnodes in vnlru_kick_cond

If the count is high enough there is no point trying to produce more.
Not going there reduces traffic on the vnode_list mtx.

This further shaves total real time in a test mentioned in:
74be676d87745eb7 ("vfs: drop one vnode list lock trip during vnlru free
recycle") -- 20 instances of find each creating 1 million vnodes, while
total limit is set to 400k.

Time goes down from ~41 to ~35 seconds.

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

(cherry picked from commit 23ef25d25d989e7213bc1d3ef32b0f48a9eb2537)

7 months agovfs: be less eager to call uma_reclaim(UMA_RECLAIM_DRAIN)
Mateusz Guzik [Tue, 10 Oct 2023 16:15:53 +0000 (16:15 +0000)]
vfs: be less eager to call uma_reclaim(UMA_RECLAIM_DRAIN)

In face of vnode shortage the count very easily can go few units above
the limit before going back down.

Calling uma_reclaim results in massive amount of work which in this case
is not warranted.

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

(cherry picked from commit 1bf55a739e754765fa2dc15ab6481fe411084be3)

7 months agovfs: don't provoke recycling non-free vnodes without a good reason
Mateusz Guzik [Thu, 14 Sep 2023 16:13:01 +0000 (16:13 +0000)]
vfs: don't provoke recycling non-free vnodes without a good reason

If the total number of free vnodes is at or above target, there is no
point creating more of them.

Tested by: pho (in a bigger patch)

(cherry picked from commit 8733bc277a383cf59f38a83956f4f523869cfc90)

7 months agovfs cache: denote a known bug in cache_remove_cnp
Mateusz Guzik [Thu, 5 Oct 2023 12:32:29 +0000 (12:32 +0000)]
vfs cache: denote a known bug in cache_remove_cnp

(cherry picked from commit cd2105d691f446f7dbddf5965d82b9e9103bc8d2)

7 months agovfs cache: plug a hypothetical corner case when freeing
Mateusz Guzik [Sat, 23 Sep 2023 02:04:06 +0000 (02:04 +0000)]
vfs cache: plug a hypothetical corner case when freeing

cache_zap_unlocked_bucket is called with a bunch of addresses and
without any locks held, forcing it to revalidate everything from
scratch.

It did not account for a case where the entry is reallocated with
everything the same except for the target vnode.

Should the target use a different lock than the one expected, freeing
would proceed without being properly synchronized.

Note this is almost impossible to happen in practice.

(cherry picked from commit 0f15054f7990f9c772bea34778a8838aa05ebed8)

7 months agovfs cache: sanitize debug counters
Mateusz Guzik [Thu, 5 Oct 2023 12:16:18 +0000 (12:16 +0000)]
vfs cache: sanitize debug counters

They are very rarely triggered, so no need for per-cpu distribution.

At the same time the non-cpu ones still should use atomics to not lose
any updates.

(cherry picked from commit 2749c222da8a6325d39c0571f72b1dbed2f7d583)

7 months agovfs cache: retire dothits and dotdothits counters
Mateusz Guzik [Sat, 23 Sep 2023 00:08:49 +0000 (00:08 +0000)]
vfs cache: retire dothits and dotdothits counters

They demonstrate nothing, and in case of dotdot they are not even hits.
This is just a count of lookups with "..", which are not worth
mentioniong.

(cherry picked from commit bb124a0f611a1288c8496e3b33494f23ba929ca1)

7 months agovfs cache: mark vfs.cache.param.size as read-only
Mateusz Guzik [Fri, 22 Sep 2023 21:32:23 +0000 (21:32 +0000)]
vfs cache: mark vfs.cache.param.size as read-only

It was not meant to be writable and writes don't work correctly as they
fail to resize the hash.

(cherry picked from commit 33fdf1afaea931eaa5dd14e6c097d7ffafe2fb1a)

7 months agovfs cache: Drop known argument of internal cache_recalc_neg_min()
Olivier Certner [Fri, 22 Sep 2023 21:25:41 +0000 (21:25 +0000)]
vfs cache: Drop known argument of internal cache_recalc_neg_min()

'ncnegminpct' is to be passed always, so just drop the unneeded parameter.

Sponsored by:   The FreeBSD Foundation
Reviewed by: mjg

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

(cherry picked from commit 02ef039c284b8a7b1ea40f5f9a851a3cb6af5b31)

7 months agoktrace.2: correct kern.ktrace.genio_size sysctl name
Ed Maste [Wed, 11 Oct 2023 01:18:36 +0000 (21:18 -0400)]
ktrace.2: correct kern.ktrace.genio_size sysctl name

The man page had `kern.ktrace.geniosize` but the sysctl node contains an
underscore.

PR: 274274
Reported by: Ivan Rozhuk
Sponsored by: The FreeBSD Foundation

(cherry picked from commit a572dfa1bfe00cec93b27d8848ca49562cab5e3c)
(cherry picked from commit 2fe06dda0a8abced5851188ed2cb76d1759efa19)

7 months agofreebsd-update: add a note about when files may be deleted
Ed Maste [Fri, 29 Sep 2023 15:47:41 +0000 (11:47 -0400)]
freebsd-update: add a note about when files may be deleted

Files under /var/db/freebsd-update are required during the upgrade
process, and to support rollback.  They may be deleted if no upgrade is
in progress and rollback will not be required.

PR: 273601
Reviewed by: bcr
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42022

(cherry picked from commit 30beebe444f5f415a388be9df91107246bd32674)
(cherry picked from commit ffe4456d7d9f2c6bb14e9b747766adc3042f0b9e)

7 months agoif_re: add Realtek Killer Ethernet E2600 IDs
Sk Razee [Fri, 6 Oct 2023 06:08:16 +0000 (08:08 +0200)]
if_re: add Realtek Killer Ethernet E2600 IDs

PR: 274292
MFC after: 1 week
Reviewed by: kp
Event: Oslo Hackathon at Modirum

(cherry picked from commit 3c871489cdd6c5606b2b1125f66b0e9b8f39561f)

7 months agopf: fix SCTP SDT probe
Kristof Provost [Thu, 5 Oct 2023 14:57:50 +0000 (16:57 +0200)]
pf: fix SCTP SDT probe

We want the return value of pf_test_rule(), i.e. the result of the
evaluation of the new state, not the result of the evaluation of the
original packet/state.

MFC after: 1 week
Sponsored by: Orange Business Services

(cherry picked from commit b00dbe851c66f26a16219d31c76b7fb411ace94c)

7 months agobuf: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Mon, 9 Oct 2023 10:30:22 +0000 (18:30 +0800)]
buf: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable 'vfs.unmapped_buf_allowed' is actually a loader
tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will
report it correctly.

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 31b94065300a76e52c26b8caec7256574d64a777)
(cherry picked from commit 8c4eaac1534e0486bd0fc6816ccb59fc348a5707)

7 months agosockets: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Mon, 9 Oct 2023 10:30:22 +0000 (18:30 +0800)]
sockets: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable 'kern.ipc.maxsockets' is actually a loader tunable.
Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 978be1ee5d5fef983b4163955e15c4269c0ec76d)
(cherry picked from commit e4f97a1ec798d69b8ebf767d0dd2e43fbb1550f6)

7 months agombuf: Add sysctl flag CTLFLAG_TUN to loader tunables
Zhenlei Huang [Mon, 9 Oct 2023 10:30:22 +0000 (18:30 +0800)]
mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables

The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. kern.ipc.mb_use_ext_pgs
 2. kern.ipc.nmbclusters
 3. kern.ipc.nmbjumbop
 4. kern.ipc.nmbjumbo9
 5. kern.ipc.nmbjumbo16
 6. kern.ipc.nmbufs

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 6a88498e53b24d870e066c2a94910ad23dd355eb)
(cherry picked from commit b1456fd6209474410c031e5e82455588e2b656c0)

7 months agofd: Add sysctl flag CTLFLAG_TUN to loader tunables
Zhenlei Huang [Mon, 9 Oct 2023 10:30:21 +0000 (18:30 +0800)]
fd: Add sysctl flag CTLFLAG_TUN to loader tunables

The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. kern.maxfiles
 2. kern.maxfilesperproc

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 2af5ce5b5efb0cf6514acdc4a8b4058221641c39)
(cherry picked from commit d9aa723347825418c742164c3e9a77d1e4b6943d)

7 months agox86: Add sysctl flag CTLFLAG_TUN to loader tunables
Zhenlei Huang [Mon, 9 Oct 2023 10:30:21 +0000 (18:30 +0800)]
x86: Add sysctl flag CTLFLAG_TUN to loader tunables

The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly.

 1. machdep.idle
 2. machdep.idle_apl31

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 149b9c234b00ff902718e1f76c809609a5465198)
(cherry picked from commit 9eac775b415bf54080a98a9cf62524b8a6817595)

7 months agonfscl: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Mon, 9 Oct 2023 10:30:21 +0000 (18:30 +0800)]
nfscl: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable 'vfs.nfs.iodmin' is actually a loader tunable. Add
sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 95c01e9b329406699e89907167b5c3c9effbcbca)
(cherry picked from commit 3133f4d9dec495275120f920c0939b2752ac3d4d)

7 months agoddb: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Mon, 9 Oct 2023 10:30:21 +0000 (18:30 +0800)]
ddb: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable 'debug.ddb.capture.bufsize' is actually a loader
tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will
report it correctly.

No functional change intended.

Reviewed by: kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit 0eb2e197896e2ec8a45730b61eeb77d5431af69f)
(cherry picked from commit 0de3d5316cbc8297c61952c392e4b9d58b538b99)

7 months agocam/scsi: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Mon, 9 Oct 2023 10:30:21 +0000 (18:30 +0800)]
cam/scsi: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable 'kern.cam.scsi_delay' is actually a loader tunable.
Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
correctly.

No functional change intended.

Reviewed by: kib, imp (for #cam)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42113

(cherry picked from commit e2ad7ce37b1a354750d2dd3567e77f72edeb7e1d)
(cherry picked from commit 4bf38105464ba4dde42a9d3cf223f152aa980a1b)

7 months agocxgbe t4_tls: Call t4_rcvd_locked from do_rx_tls_cmp
John Baldwin [Fri, 8 Sep 2023 23:31:38 +0000 (16:31 -0700)]
cxgbe t4_tls: Call t4_rcvd_locked from do_rx_tls_cmp

Similar to dcfddc8dc091e7688abc8488a0307eba425fa7a2, replace the
simpler, inlined version with the full version.

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D41690

(cherry picked from commit 897e564361624411c4e557e0817642e1477f0af4)

7 months agocxgbe t4_tls: Don't bother returning RX credits for a protocol receive error
John Baldwin [Fri, 8 Sep 2023 23:30:52 +0000 (16:30 -0700)]
cxgbe t4_tls: Don't bother returning RX credits for a protocol receive error

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D41689

(cherry picked from commit 75af2d951cce7d51d2033405f96f083c01f39f04)

7 months agocxgbe tom: Call t4_rcvd_locked from do_rx_data to return RX credits
John Baldwin [Fri, 8 Sep 2023 23:30:35 +0000 (16:30 -0700)]
cxgbe tom: Call t4_rcvd_locked from do_rx_data to return RX credits

In particular, the kernel RPC layer used by the NFS client never
invokes pru_rcvd since it always reads data from the socket upcall
via MSG_SOCALLBCK which avoids calling pru_rcvd.  As a result, on an
NFS client connection managed by t4_tom, RX credits were never
returned to the TOE connection to open the TCP window resulting in
connection hangs.

To fix, expand the set of conditions in do_rx_data where RX credits
are returned to match those in t4_rcvd_locked by calling the function
directly.

Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D41688

(cherry picked from commit dcfddc8dc091e7688abc8488a0307eba425fa7a2)

7 months agox86: Properly align interrupt vectors for MSI
John Hay [Thu, 28 Sep 2023 21:08:08 +0000 (14:08 -0700)]
x86: Properly align interrupt vectors for MSI

MSI (not MSI-X) interrupt vectors must be allocated in groups that are
powers of 2, and the block of IDT vectors must be aligned to the size
of the request.

The code in native_apic_alloc_vectors() does an alignment check in the loop:

    if ((vector & (align - 1)) != 0)
        continue;
    first = vector;

But it adds APIC_IO_INTS to the value it returns:

    return (first + APIC_IO_INTS);

The problem is that APIC_IO_INTS is not a multiple of 32. It is 48:

As a result, a request for 32 vectors (the max supported by MSI), was
not always aligned.  To fix, check the alignment of
'vector + APIC_IO_INTS' in the loop.

PR: 274074
Reviewed by: jhb

(cherry picked from commit d33a4ae8ba5343f555842e6e32321f9cd64dfd09)

7 months agovirtio_random: Pipeline fetching the data
John-Mark Gurney [Tue, 5 Sep 2023 15:59:43 +0000 (08:59 -0700)]
virtio_random: Pipeline fetching the data

Queue an initial fetch of data during attach and after every read
rather than synchronously fetching data and polling for completion.

If data has not been returned from an previous fetch during read,
just return EAGAIN rather than blocking.

Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D41656

(cherry picked from commit f1c5a2e3a625053e2b70d5b1777d849a4d9328f2)

7 months agoamd64 db_trace: Reject unaligned frame pointers
John Baldwin [Fri, 1 Sep 2023 22:55:05 +0000 (15:55 -0700)]
amd64 db_trace: Reject unaligned frame pointers

Switch to using db_addr_t to hold frame pointer values until they are
verified to be suitably aligned.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D41532

(cherry picked from commit 4a9cd9fc22d7f87a27ccd3d41b93a0356cd7061c)

7 months agoefirt_machdep.c: Trim some unused includes
John Baldwin [Mon, 28 Aug 2023 23:22:03 +0000 (16:22 -0700)]
efirt_machdep.c: Trim some unused includes

Reviewed by: imp, kib, markj
Differential Revision: https://reviews.freebsd.org/D41596

(cherry picked from commit d1e4c63d9e93b113f7ef5aef5e0e79a4d7dca144)

7 months agoarm unwind: Reject unaligned stack pointers
John Baldwin [Fri, 25 Aug 2023 19:00:37 +0000 (12:00 -0700)]
arm unwind: Reject unaligned stack pointers

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D41533

(cherry picked from commit 247e8662d2c080c27937ec4d62e80b2358e8c74f)

7 months agoefirt: Move comment about fpu_kern_enter to where it is called
John Baldwin [Fri, 25 Aug 2023 19:33:00 +0000 (12:33 -0700)]
efirt: Move comment about fpu_kern_enter to where it is called

Reviewed by: imp, kib, andrew, markj
Differential Revision: https://reviews.freebsd.org/D41576

(cherry picked from commit 8173fa60ddb7e9a805dec9fef7bf07e74ae4144d)

7 months agoaxge: Add support for AX88179A
Damien Broka [Tue, 19 Sep 2023 16:26:06 +0000 (17:26 +0100)]
axge: Add support for AX88179A

The AX88179A has two firmware modes, one of which is backward
compatible with existing AX88178A/179 driver. The active firmware mode
can be controlled through a register.

Update axge(4) man page to mention 179A support and ensure that, when
bound to a AX88179A, the driver activates the compatible firmware mode.

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

(cherry picked from commit 6962da914dd511349b219241e92b32329be76fc6)

7 months agojexec.8: Add examples section
Danilo G. Baio [Sat, 7 Oct 2023 22:44:44 +0000 (19:44 -0300)]
jexec.8: Add examples section

MFC after: 3 days
Reviewed by: gbe, 0mp, danfe, pauamma_gundo.com
Differential Revision: https://reviews.freebsd.org/D40831

(cherry picked from commit 04c8bfc1761010c36081cf300fa751548d541122)

7 months agojexec man: Explain how PATH is adjusted.
Gleb Popov [Thu, 19 May 2022 05:59:41 +0000 (08:59 +0300)]
jexec man: Explain how PATH is adjusted.

Add a sentence that explains that PATH is set to `/bin:/usr/bin`.
I had to dive into `jexec.c` to find this out.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D35251

(cherry picked from commit 7eb6a92e3f938d419d3edc0399fc4c1d1018da15)

7 months agopkgbase: accommodate pkg < 1.17
Ed Maste [Tue, 27 Jul 2021 16:44:45 +0000 (12:44 -0400)]
pkgbase: accommodate pkg < 1.17

6cafdee71d2b adapted the pkgbase build for 1.17, but broke Cirrus-CI's
use of PKG_FORMAT=tar (the quarterly package set still has pkg 1.16).
Because of this I disabled the pkgbase build and test in 2bfba2a04b05.

Now, check `pkg --version` and use the old logic for < 1.17.

To be reverted once we no longer encounter pkg 1.16 in Cirrus-CI (i.e.,
via GCP cloud images) to avoid keeping this extra complexity around.

PR: 257422
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31324

(cherry picked from commit 4e224e4be7c37052567ec4cd2481f299487fc222)
(cherry picked from commit 4dbac528db6040694cd57c42a64e036daa91db86)
(cherry picked from commit 54247ce1f96f04d16f1429007bac3607c8a0a39e)

7 months agoSpeed up *-old-* make targets by using sed instead of xargs
Ed Maste [Fri, 1 Apr 2022 22:58:00 +0000 (18:58 -0400)]
Speed up *-old-* make targets by using sed instead of xargs

Targets like 'list-old-files' used "xargs -n1" to produce a list with
one file per line.  Using xargs resulted in one fork+exec for each
Argument, resulting in rather long runtime.  Instead, use sed to split
the list.  On one machine `make list-old-files` took 30s wall clock time
with xargs and less than 1s with sed.

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

(cherry picked from commit a8267ecc3df0aa633daa56360d67a24f9b1d3961)

7 months agox86: Add defines for workaround bits in AMD's MSR "Decode Configuration"
Olivier Certner [Mon, 11 Sep 2023 13:10:35 +0000 (15:10 +0200)]
x86: Add defines for workaround bits in AMD's MSR "Decode Configuration"

They are a bit more informative than raw hexadecimal values.

While here, sort existing defines of bits for AMD MSRs to match the address
order.

Reviewed by: kib, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41816

(cherry picked from commit 125bbadf6084ac341673c9eb1979a740d3d5899a)

7 months agotests: Test that SIGSYS is not delivered if kern.signosys knob is off
Dmitry Chagin [Tue, 3 Oct 2023 07:38:02 +0000 (10:38 +0300)]
tests: Test that SIGSYS is not delivered if kern.signosys knob is off

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D41979
MFC after: 1 week

(cherry picked from commit b67c0ba4613861f8245ce835081311aef1c19bae)

7 months agoSIGSYS: add tests
Konstantin Belousov [Mon, 25 Sep 2023 18:40:28 +0000 (21:40 +0300)]
SIGSYS: add tests

(cherry picked from commit 0afcac3e37e911f7e387ebeb2aae19b2b00ca4cc)

7 months agolinuxolator: fix nosys() to not send SIGSYS
Konstantin Belousov [Mon, 25 Sep 2023 16:39:48 +0000 (19:39 +0300)]
linuxolator: fix nosys() to not send SIGSYS

(cherry picked from commit 7acc4240ce00af540093b47ad00be0508310b515)

7 months agonosys(): add kern.signosys tunable/sysctl to control SIGSYS
Konstantin Belousov [Mon, 25 Sep 2023 16:36:04 +0000 (19:36 +0300)]
nosys(): add kern.signosys tunable/sysctl to control SIGSYS

(cherry picked from commit 5804a1623054d865618d77cfac86978f03b8111a)

7 months agosysentvec: add SV_SIGSYS flag
Konstantin Belousov [Mon, 25 Sep 2023 16:33:36 +0000 (19:33 +0300)]
sysentvec: add SV_SIGSYS flag

(cherry picked from commit b82b4ae752501469053979393e33bbfa74fbc9d2)

7 months agosyscalls: fix missing SIGSYS for several ENOSYS errors
Konstantin Belousov [Mon, 25 Sep 2023 16:32:52 +0000 (19:32 +0300)]
syscalls: fix missing SIGSYS for several ENOSYS errors

(cherry picked from commit 39024a89146902ca9aba250130b828ad9aced99d)

7 months agoamd64 cpu_fetch_syscall_args_fallback(): fix whitespace
Konstantin Belousov [Tue, 26 Sep 2023 09:20:30 +0000 (12:20 +0300)]
amd64 cpu_fetch_syscall_args_fallback(): fix whitespace

(cherry picked from commit 6b3bb233cd0c3eeeb70e388a62b142b4f22b62b2)

7 months agonetdump: Check the return value of ifunit_ref()
Mark Johnston [Mon, 2 Oct 2023 12:08:20 +0000 (08:08 -0400)]
netdump: Check the return value of ifunit_ref()

We may fail to match if the specific interface doesn't exist or was
renamed.

PR: 273715
Reported by: grembo
MFC after: 1 week

(cherry picked from commit d94d07d58141dcff48f01c6b3e5a31de9d7a7938)

7 months agoswap_pager: Fix a race in swap_pager_swapoff_object()
Mark Johnston [Mon, 2 Oct 2023 11:49:27 +0000 (07:49 -0400)]
swap_pager: Fix a race in swap_pager_swapoff_object()

When we disable swapping to a device, we scan the full VM object list
looking for objects with swap trie nodes that reference the device in
question.  The pages corresponding to those nodes are paged in.

While paging in, we drop the VM object lock.  Moreover, we do not hold a
reference for the object; swap_pager_swapoff_object() merely bumps the
paging-in-progress counter.  vm_object_terminate() waits for this
counter to drain before proceeding and freeing pages.

However, swap_pager_swapoff_object() decrements the counter before
re-acquiring the VM object lock, which means that vm_object_terminate()
can race to acquire the lock and free the pages.  Then,
swap_pager_swapoff_object() ends up unbusying a freed page.  Fix the
problem by acquiring the lock before waking up sleepers.

PR: 273610
Reported by: Graham Perrin <grahamperrin@gmail.com>
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42029

(cherry picked from commit e61568aeeec7667789e6c9d4837e074edecc990e)

7 months agonvme: Fix memory leak in pt ioctl commands
David Sloan [Thu, 7 Sep 2023 16:22:21 +0000 (10:22 -0600)]
nvme: Fix memory leak in pt ioctl commands

When running nvme passthrough commands through the ioctl interface
memory is mapped with vmapbuf() but not unmapped. This results in leaked
memory whenever a process executes an nvme passthrough command with a
data buffer. This can be replicated with a simple c function (error
checks skipped for brevity):

void leak_memory(int nvme_ns_fd, uint16_t nblocks) {
struct nvme_pt_command pt = {
.cmd = {
.opc = NVME_OPC_READ,
.cdw12 = nblocks - 1,
},
.len = nblocks * 512, // Assumes devices with 512 byte lba
.is_read = 1, // Reads and writes should both trigger leak
}
void *buf;

posix_memalign(&buf, nblocks * 512);
pt.buf = buf;
ioctl(nvme_ns_fd, NVME_PASSTHROUGH_COMMAND, &pt);
free(buf);
}

Signed-off-by: David Sloan <david.sloan@eideticom.com>
PR: 273626
Reviewed by: imp, markj
MFC after: 1 week

(cherry picked from commit 7ea866eb14f8ec869a525442c03228b6701e1dab)

7 months agosbuf.9: Add LIBRARY section
Mateusz Piotrowski [Tue, 3 Oct 2023 17:07:15 +0000 (19:07 +0200)]
sbuf.9: Add LIBRARY section

Sponsored by: Klara, Inc.
MFC after: 3 days

(cherry picked from commit 5a82fc7859f746d95811e43b3a117b8eea297749)

7 months agomprutil: "fix user reply buffer (64)..." warnings
Alan Somers [Wed, 22 Feb 2023 22:06:43 +0000 (15:06 -0700)]
mprutil: "fix user reply buffer (64)..." warnings

Depending on the card's firmware version, it may return different length
responses for MPI2_FUNCTION_IOC_FACTS.  But the first part of the
response contains the length of the rest, so query it first to get the
length and then use that to size the buffer for the full response.

Also, correctly zero-initialize MPI2_IOC_FACTS_REQUEST.  It only worked
by luck before.

PR: 264848
Reported by: Julien Cigar <julien@perdition.city>
Sponsored by: Axcient
Reviewed by: scottl, imp
Differential Revision: https://reviews.freebsd.org/D38739

(cherry picked from commit 7d154c4dc64e61af7ca536c4e9927fa07c675a83)

7 months agofusefs: fix some bugs updating atime during close
Alan Somers [Wed, 20 Sep 2023 21:37:31 +0000 (15:37 -0600)]
fusefs: fix some bugs updating atime during close

When using cached attributes, we must update a file's atime during
close, if it has been read since the last attribute refresh.  But,

* Don't update atime if we lack write permissions to the file or if the
  file system is readonly.
* If the daemon fails our atime update request for any reason, don't
  report this as a failure for VOP_CLOSE.

PR: 270749
Reported by: Jamie Landeg-Jones <jamie@catflap.org>
Sponsored by: Axcient
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D41925

(cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63)

fusefs: fix unused variables from fb619c94c67

PR: 270749
Reported by: cy
Sponsored by: Axcient

(cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02)

7 months agolibfetch: don't rely on ca_root_nss for certificate validation
Michael Osipov [Tue, 3 Oct 2023 05:53:20 +0000 (07:53 +0200)]
libfetch: don't rely on ca_root_nss for certificate validation

Before certctl(8), there was no system trust store, and libfetch
relied on the CA certificate bundle from the ca_root_nss port to
verify peers.

We now have a system trust store and a reliable mechanism for
manipulating it (to explicitly add, remove, or revoke certificates),
but if ca_root_nss is installed, libfetch will still prefer that to
the system trust store.

With this change, unless explicitly overridden, libfetch will rely on
OpenSSL to pick up the default system trust store.

PR: 256902
MFC after: 3 days
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D42059

(cherry picked from commit 09f5c1e118bb4eca77b83a0d08f559b20f60aa59)

7 months agosplit: Further option parsing improvements.
Dag-Erling Smørgrav [Thu, 28 Sep 2023 16:29:52 +0000 (18:29 +0200)]
split: Further option parsing improvements.

* Whenever possible, use strtonum() to parse numeric arguments.
* Improve usefulness and consistency of error messages.
* While here, fix some type and style issues.

Sponsored by: Klara, Inc.
Reviewed by: christos, kevans
Differential Revision: https://reviews.freebsd.org/D42010

(cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45)

split: Improve GNU compatibility.

* Like GNU split, turn autoextend back on if given -a0.
* Add a test case that verifies that -a<non-zero> turns autoextend off.
* Add a test case that verifies that -a0 turns autoextend back on.

Sponsored by: Klara, Inc.
Reviewed by: christos, kevans
Differential Revision: https://reviews.freebsd.org/D42011

(cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615)

7 months agolibc: Rewrite quick_exit() and at_quick_exit() using C11 atomics.
Dag-Erling Smørgrav [Tue, 26 Sep 2023 20:06:27 +0000 (22:06 +0200)]
libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics.

Compiler memory barriers do not prevent the CPU from executing the code
out of order.  Switch to C11 atomics.  This also lets us get rid of the
mutex; instead, loop until the compare_exchange succeeds.

While here, change the return value of at_quick_exit() on failure to
the more traditional -1, matching atexit().

Sponsored by: Klara, Inc.
Reviewed by: Olivier Certner, kevans, kib
Differential Revision: https://reviews.freebsd.org/D41936

(cherry picked from commit 1dc3abb052430279e47c8922d22b30922adcf0f6)

libc: Add a rudimentary test for quick_exit(3).

Sponsored by: Klara, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D41937

(cherry picked from commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe)

7 months agoglabel.8: Warn against using generic labels on a shared device
Mark Johnston [Thu, 26 May 2022 13:48:17 +0000 (09:48 -0400)]
glabel.8: Warn against using generic labels on a shared device

Also suggest against creating a generic label on a device which already
contains a filesystem.

PR: 264166
Reviewed by: imp, delphij, Pau Amma <pauamma@gundo.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35326

(cherry picked from commit 81f36fbc98dd74ca923938e0329919d426811b0c)

7 months agohdac: Defer interrupt allocation in hdac_attach()
Mark Johnston [Wed, 27 Sep 2023 12:23:58 +0000 (08:23 -0400)]
hdac: Defer interrupt allocation in hdac_attach()

hdac_attach() registers an interrupt handler before allocating various
driver resources which are accessed by the interrupt handler.  On some
platforms we observe what appear to be spurious interrupts upon a cold
boot, resulting in panics.

Partially work around the problem by deferring irq allocation until
after other resources are allocated.  I think this is not a complete
solution, but is correct and sufficient to work around the problems
reported in the PR.

PR: 268393
Tested by: Alexander Sherikov <asherikov@yandex.com>
Tested by: Oleh Hushchenkov <o.hushchenkov@gmail.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41883

(cherry picked from commit 015daf5221f7588b9258fe0242cee09bde39fe21)

7 months agovfs cache: garbage collect the fullpathfail2 counter
Mateusz Guzik [Thu, 14 Sep 2023 20:25:54 +0000 (20:25 +0000)]
vfs cache: garbage collect the fullpathfail2 counter

The conditions it checks cannot legally be true (modulo races against
forced unmount), so assert on it instead.

(cherry picked from commit 07f52c4b5a4f7a658bf7ed29eadd5c4d52a4f3b2)

7 months agovfs cache: fix a hang when bumping vnode limit too high
Mateusz Guzik [Sat, 2 Sep 2023 14:27:33 +0000 (14:27 +0000)]
vfs cache: fix a hang when bumping vnode limit too high

Overflow in cache_changesize would make the value flip to 0 and stay
there as 0 << 1 does not do anything.

Note callers limit the outcome to something below u_int.

Also note there entire vnode handling thing both in vfs layer as a whole
and this file can't decide whether to long, u_long or u_int.

(cherry picked from commit 32988c1499f8698b41e15ed40a46d271e757bba3)

7 months agovfs: count how many times vnlru got woken up due to vnode shortage
Mateusz Guzik [Sat, 16 Sep 2023 17:26:39 +0000 (17:26 +0000)]
vfs: count how many times vnlru got woken up due to vnode shortage

(cherry picked from commit 9080190b970c7026695571f90b95fdcf7056ec67)

7 months agovfs: stabilize freevnodes_old
Mateusz Guzik [Sat, 16 Sep 2023 15:41:12 +0000 (15:41 +0000)]
vfs: stabilize freevnodes_old

In face of parallel callers.

(cherry picked from commit ef89b78bb1f60484cc743fa590d623ad896ca8e9)

7 months agovfs: s/u_long vstir/bool vstir/
Mateusz Guzik [Sat, 16 Sep 2023 08:19:24 +0000 (08:19 +0000)]
vfs: s/u_long vstir/bool vstir/

(cherry picked from commit 509d843a982b39a531a558c65794ffffcdf93ae8)

7 months agovfs: group vnode-related sysctls under vfs.vnode
Mateusz Guzik [Fri, 15 Sep 2023 21:08:38 +0000 (21:08 +0000)]
vfs: group vnode-related sysctls under vfs.vnode

Instead of having things scattered through vfs, debug and kern trees.

Old names remain for compatibility.

Sample output of "sysctl vfs.vnode":
vfs.vnode.vnlru.failed_runs: 0
vfs.vnode.vnlru.recycles_free: 0
vfs.vnode.vnlru.recycles: 0
vfs.vnode.stats.alloc_sleeps: 0
vfs.vnode.stats.free: 1310
vfs.vnode.stats.skipped_requeues: 0
vfs.vnode.stats.created: 1686
vfs.vnode.stats.count: 1641
vfs.vnode.param.wantfree: 2097152
vfs.vnode.param.limit: 8388608

(cherry picked from commit d3e6478912431309aad36211b6c39b0d741312dc)

7 months agovfs: retire kern.minvnodes
Mateusz Guzik [Sat, 16 Sep 2023 07:33:36 +0000 (07:33 +0000)]
vfs: retire kern.minvnodes

It was marked as legacy in 2005.

(cherry picked from commit 2a689cadf092a3319d7619c3f4aa242011c20c8e)

7 months agovfs: use vnlru_read_freevnodes for the freevnodes sysctl
Mateusz Guzik [Thu, 14 Sep 2023 23:53:11 +0000 (23:53 +0000)]
vfs: use vnlru_read_freevnodes for the freevnodes sysctl

For a more accurate result.

(cherry picked from commit 03bfee175269960c67cab64d761bbb5eb9ac5878)

7 months agovfs: retire vnlru_under_unlocked
Mateusz Guzik [Thu, 14 Sep 2023 23:05:51 +0000 (23:05 +0000)]
vfs: retire vnlru_under_unlocked

It only looks at the centralized value which in corner cases can end up
being negative.

(cherry picked from commit ba5dc166e0f390c703042910b637a83c705c8af3)

7 months agovfs: fix stale comment about freevnodes management
Mateusz Guzik [Thu, 14 Sep 2023 17:28:32 +0000 (17:28 +0000)]
vfs: fix stale comment about freevnodes management

(cherry picked from commit 9dc0c983b0931f359c2ff10d47ad835ef74e929a)

7 months agovfs: don't kick vnlru if it is already running
Mateusz Guzik [Thu, 14 Sep 2023 16:27:47 +0000 (16:27 +0000)]
vfs: don't kick vnlru if it is already running

Further shaves some lock trips.

(cherry picked from commit 76f1153790b6d2e1a4f0389c3ac24e41d08f9ba6)

7 months agovfs: drop one vnode list lock trip during vnlru free recycle
Mateusz Guzik [Thu, 14 Sep 2023 14:35:40 +0000 (14:35 +0000)]
vfs: drop one vnode list lock trip during vnlru free recycle

vnlru_free_impl would take the lock prior to returning even though most
frequent caller does not need it.

Unsurprisingly vnode_list mtx is the primary bottleneck when recycling
and avoiding the useless lock trip helps.

Setting maxvnodes to 400000 and running 20 parallel finds each with a
dedicated directory tree of 1 million vnodes in total:
before: 4.50s user 1225.71s system 1979% cpu 1:02.14 total
after: 4.20s user 806.23s system 1973% cpu 41.059 total

That's 34% reduction in total real time.

With this the block *remains* the primary bottleneck when running on
ZFS.

(cherry picked from commit 74be676d87745eb727642f6f8329236c848929d5)

7 months agomanpages: Fix use of At macro
Mateusz Piotrowski [Thu, 3 Mar 2022 23:03:44 +0000 (00:03 +0100)]
manpages: Fix use of At macro

The versions for the At macro from 1 to 7 must be prefixed with "v".

MFC after: 3 days

(cherry picked from commit 8b73b57c1b4bae9c9862d7655f86d1610f32f083)

7 months agobasename: fix history
Warner Losh [Mon, 21 Jun 2021 14:23:34 +0000 (08:23 -0600)]
basename: fix history

Basename(1) first appeared in the 7th edition. It was not in the 6th
edition, or PWB releases. It's on all the subsequent descendants.

Dirname(1) first appeared in System III, and was later picked up in
4.3-Reno and 8th edition research unix (though was not in 4.1BSD where
the bulk of 8th edition came from). In System III and V8 it was a shell
script, though the BSD version is in C.

Sponsored by: Netflix

(cherry picked from commit f394c73666ba375cbd6114950b1b1ea5943185a8)

7 months agobanner: Correct history.
Warner Losh [Mon, 21 Jun 2021 14:16:10 +0000 (08:16 -0600)]
banner: Correct history.

Banner appeared in the 6th edition of AT&T Research unit. It was
subsequently on all the Berkeley tapes, as well as PWB, System III and
System V. The PWB/AT&T and BSD banner programs were different, and the
current FreeBSD banner program shares many elements of the 3BSD one,
though the font has changed.

Sponsored by: Netflix

(cherry picked from commit b77e235dd52a682c11ddd93256b3848cdc6f1d72)

7 months agorc.conf.5: Add /etc/rc.conf.d/ to FILES
Mateusz Piotrowski [Thu, 7 Jul 2022 18:07:43 +0000 (20:07 +0200)]
rc.conf.5: Add /etc/rc.conf.d/ to FILES

While here, fix the -width argument.

MFC after: 3 days

(cherry picked from commit a6e734d779b3b5f5679588c1e6f66d0d1533fcbf)

7 months agojail.conf.5: List configuration and example files
Mateusz Piotrowski [Fri, 8 Jul 2022 08:43:37 +0000 (10:43 +0200)]
jail.conf.5: List configuration and example files

MFC after: 3 days

(cherry picked from commit ccee95df52c2477d5580024758ab57ee9775da6a)

7 months agoswapinfo.8: Mention BLOCKSIZE in the ENVIRONMENT section
Felix Johnson [Fri, 8 Jul 2022 19:33:02 +0000 (21:33 +0200)]
swapinfo.8: Mention BLOCKSIZE in the ENVIRONMENT section

Copy the ENVIRONMENT section from df(1) to swapinfo(8), except
that the --si option is removed for swapinfo.

PR: 235225
Reported by: 0mp
MFC after: 3 days

(cherry picked from commit 39ad6e289f062fc8da239c0372f49b21f0911060)

7 months agorc.subr: Fix a typo
Mateusz Piotrowski [Fri, 8 Jul 2022 19:34:34 +0000 (21:34 +0200)]
rc.subr: Fix a typo

MFC after: 3 days

(cherry picked from commit 7f6754d9659183a0c56fe76044d7826ca849675f)

7 months agoclock_gettime.2: Add cross references and fix linter warnings
Mateusz Piotrowski [Fri, 8 Jul 2022 19:51:03 +0000 (21:51 +0200)]
clock_gettime.2: Add cross references and fix linter warnings

MFC after: 3 days

(cherry picked from commit 13a9da7d5550392a754fcc72d8ec74c0ddbec26f)

7 months agovtfontcvt(8): Update usage() to match vtfontcvt.8
Mateusz Piotrowski [Tue, 19 Jul 2022 14:34:29 +0000 (16:34 +0200)]
vtfontcvt(8): Update usage() to match vtfontcvt.8

MFC after: 2 weeks

(cherry picked from commit ef2d0816dd0b28560309612b75b301e7f179db8f)

7 months agovtfontcvt.8: Use D1 instead of Ql for readability
Mateusz Piotrowski [Tue, 19 Jul 2022 14:32:41 +0000 (16:32 +0200)]
vtfontcvt.8: Use D1 instead of Ql for readability

MFC after: 2 weeks

(cherry picked from commit cad64622ca704145f7fe108b3a3f3c52d1796e25)

7 months agovtfontcvt.8: Sort synopsis
Mateusz Piotrowski [Tue, 19 Jul 2022 14:32:26 +0000 (16:32 +0200)]
vtfontcvt.8: Sort synopsis

MFC after: 2 weeks

(cherry picked from commit e0bd2ab2eb4a379e73ebd5ca0fd80c3d6ceee5ee)

7 months agovtfontcvt.8: Improve synopsis and -f documentation
Mateusz Piotrowski [Tue, 19 Jul 2022 14:28:22 +0000 (16:28 +0200)]
vtfontcvt.8: Improve synopsis and -f documentation

MFC after: 2 weeks

(cherry picked from commit b38e3722f5df6260a4ec70c9c3cbc00ecf169129)

7 months agopw.8: Refernece to openssl-passwd(1) and crypt(3)
Mateusz Piotrowski [Thu, 21 Jul 2022 17:59:19 +0000 (19:59 +0200)]
pw.8: Refernece to openssl-passwd(1) and crypt(3)

It may be unclear how to generate an encrypted password hash for -H,
so point users to openssl-passwd(1) and crypt(3).

MFC after: 2 weeks

(cherry picked from commit adf9cd56fa8421ffbf2d9c74ada547bdbfa8b143)

7 months agorelease.7: Remove Subversion references
Mateusz Piotrowski [Thu, 21 Jul 2022 18:25:58 +0000 (20:25 +0200)]
release.7: Remove Subversion references

MFC after: 1 week

(cherry picked from commit d3d60927950be441b05ec9317a23c4cbdd91f3c1)

7 months agorelease.7: Update EMDEDDEDPORTS documentation
Mateusz Piotrowski [Thu, 21 Jul 2022 18:21:44 +0000 (20:21 +0200)]
release.7: Update EMDEDDEDPORTS documentation

EMDEDDEDPORTS does not contain devel/subversion anymore.

Fixes: a03128832c6c In extra_chroot_setup(), use 'uname -U' to determine OSVERSION.
MFC after: 1 week

(cherry picked from commit 6542fd4b959fa2919b39690ea3ea83e55848e091)

7 months agodevelopment.7: Remove CVS and SVN cross-references
Mateusz Piotrowski [Thu, 21 Jul 2022 18:33:47 +0000 (20:33 +0200)]
development.7: Remove CVS and SVN cross-references

Instead, point to the homepages of the projects.

MFC after: 1 week

(cherry picked from commit abfa92dee642a3687aaef107203e69722a16ef8c)

7 months agogmirror.8: Remove references rc.early
Mateusz Piotrowski [Thu, 21 Jul 2022 19:43:14 +0000 (21:43 +0200)]
gmirror.8: Remove references rc.early

The manual page of gmirror describes how gmirror providers can be used
for kernel dumps. Unfortunately, the instruction references
/etc/rc.early, which is no longer a part of rc(8).

Remove references to rc.early and suggest creating an rc(8) service
script instead.

Future work: In the Problem Report on Bugzilla, Lawrence Chen suggested
adding example rc(8) scripts to the gmirror. However, those examples
need to be tested before they become official reference examples in the
base. Also, those scripts should probably land directly to /etc/rc.d,
/usr/share/examples/rc.d, or /usr/share/examples/gmirror instead of the
gmirror manual page.

PR: 178818
Reported by: Lawrence Chen <beastie@tardisi.com>
Fixes: dd2b024a336f Removal of early.sh
MFC after: 1 week

(cherry picked from commit a848315f68047ae46a5d96cbc7a890e645ce646f)

7 months agorc: Start testing the rc(8) framework (beginning with *_oomprotect)
Mateusz Piotrowski [Thu, 7 Jul 2022 18:24:27 +0000 (20:24 +0200)]
rc: Start testing the rc(8) framework (beginning with *_oomprotect)

This change adds 2 tests to make sure that the *_oomprotect variable
sets the protection against OOM killer properly within rc(8) scripts.

This is also adding the first tests for the rc(8) framework. More tests
will be added as we go.

PR: 256148
Approved by: des
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35745

(cherry picked from commit e7437ae907c89bf85a99c5cbb7ddd194a1ff1354)

7 months agoexports.5: Clean up EXAMPLES and STANDARDS
Mateusz Piotrowski [Tue, 16 Aug 2022 13:03:20 +0000 (15:03 +0200)]
exports.5: Clean up EXAMPLES and STANDARDS

There was a missing sentence in the description of the second mount
entry in the example. Fix that and some other bits in the EXAMPLES
section.

Also, make the STANDARDS section a bit more readable.

MFC after: 1 week
Sponsored by: Klara Inc.

(cherry picked from commit f9572577cf5f28d8e7592b4f1fb24c54e8e79783)

7 months agoifconfig.8: Improve readability of vlanproto's description
Mateusz Piotrowski [Fri, 19 Aug 2022 16:17:44 +0000 (18:17 +0200)]
ifconfig.8: Improve readability of vlanproto's description

Sponsored by: Klara Inc.
MFC after: 1 week

(cherry picked from commit 197947e0a3b27b0eb455fdcd29def867efe582e6)

7 months agopowerd.8: Provide a whole path to power_profile for clarity
Mateusz Piotrowski [Sat, 25 Feb 2023 16:28:49 +0000 (17:28 +0100)]
powerd.8: Provide a whole path to power_profile for clarity

MFC after: 3 weeks

(cherry picked from commit 28111ddf9ee6d14eea6941a66168f2aeb361746d)

7 months agodate.1: Examples: Use syntax that is also compatible with csh
Mateusz Piotrowski [Mon, 27 Feb 2023 16:34:00 +0000 (17:34 +0100)]
date.1: Examples: Use syntax that is also compatible with csh

MFC after: 1 month
Sponsored by: Klara Inc.

(cherry picked from commit de7a6b6fd04ee686364883a817a4b707e3567d27)

7 months agodtrace_proc.4: Fix the description of pr_sname
Mateusz Piotrowski [Fri, 3 Mar 2023 10:14:41 +0000 (11:14 +0100)]
dtrace_proc.4: Fix the description of pr_sname

MFC after: 2 weeks
Sponsored by: Klara Inc.
Sponsored by: ELW – Entsorgungsbetriebe der Landeshauptstadt Wiesbaden

(cherry picked from commit 0ea0a371d2e0f821e4bd7e1c90c772781d80975e)