]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 months agogve: Make LRO work for jumbo packets
Shailend Chand [Thu, 7 Sep 2023 13:28:26 +0000 (09:28 -0400)]
gve: Make LRO work for jumbo packets

Each Rx descriptor points to a packet buffer of size 2K, which means
that MTUs greater than 2K see multi-descriptor packets. The TCP-hood of
such packets was being incorrectly determined by looking for a flag on
the last descriptor instead of the first descriptor.

Also fixed and progressed the version number.

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

(cherry picked from commit 5f62584a9adb7887bae33af617cfa4f43017abf8)

9 months agoxhci: Add support for 64-bit DMA in generic XHCI controller driver
Stephen J. Kiernan [Fri, 11 Aug 2023 16:06:02 +0000 (12:06 -0400)]
xhci: Add support for 64-bit DMA in generic XHCI controller driver

The XHCI controller on 64-bit SoCs need to use 64-bit DMA.
Add a quirk to tell the generic XHCI driver that 32-bit DMA needs
to be used, if there are any that may need to use 32-bit DMA only.

PR: 274237
Reviewed by: andrew
Obtained from: Juniper Networks, Inc.

(cherry picked from commit 332af8c25dfc9857e997817281d7b7fa406783ef)

9 months agolocal-unbound: remove stray config.h.in backup
Mina Galic [Wed, 20 Sep 2023 14:39:37 +0000 (07:39 -0700)]
local-unbound: remove stray config.h.in backup

despite being ignored in our main .gitignore, such files can still be
merged from vendor branches.

Reviewed by: cy
Fixes: 8f76bb7dad (unbound: Vendor import 1.18.0)
MFC after: 2 weeks
X-MFC with: 8f76bb7dad
Differential Revision: https://reviews.freebsd.org/D41920

(cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe)

9 months agounbound: Vendor import 1.18.0
Cy Schubert [Tue, 19 Sep 2023 04:17:09 +0000 (21:17 -0700)]
unbound: Vendor import 1.18.0

Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/

Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main

(cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5)

9 months agosqlite3: Vendor import of sqlite3 3.43.1
Cy Schubert [Tue, 19 Sep 2023 15:06:50 +0000 (08:06 -0700)]
sqlite3: Vendor import of sqlite3 3.43.1

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

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz

Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main

(cherry picked from commit ec994981447e8a974426660b5071bc405280af73)

9 months agostyle.Makefile.5: Stop documenting NO_MAN
Mateusz Piotrowski [Mon, 17 Jul 2023 12:50:33 +0000 (14:50 +0200)]
style.Makefile.5: Stop documenting NO_MAN

NO_MAN has been an error since 2020 according to UPDATING.

PR: 231357
MFC after: 3 days

(cherry picked from commit 73fb7a7a7342bb590ba53e406b564df0d90c3304)

9 months agostyle.Makefile.5: Wordsmith .PATH description
Mateusz Piotrowski [Mon, 17 Jul 2023 13:06:02 +0000 (15:06 +0200)]
style.Makefile.5: Wordsmith .PATH description

MFC after: 3 days
Fixes: 1ac5586c6d86 style.Makefile.5: Do not require $FreeBSD$ SCM IDs

(cherry picked from commit 9e850513daf9cd1db7980f1f38ef7051331293fd)

9 months agostyle.Makefile.5: Remove $FreeBSD$ from examples
Mateusz Piotrowski [Mon, 17 Jul 2023 13:01:52 +0000 (15:01 +0200)]
style.Makefile.5: Remove $FreeBSD$ from examples

MFC after: 3 days

(cherry picked from commit 22faf70d7e137f39b6afe7da967679a7cdbe3507)

9 months agoObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries
Dimitry Andric [Fri, 29 Sep 2023 18:41:52 +0000 (20:41 +0200)]
ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries

PR: 273776
MFC after: 3 days

(cherry picked from commit e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3)

9 months agoUntie strchrnul() from gdb.
Alexander Motin [Sun, 24 Sep 2023 03:17:29 +0000 (23:17 -0400)]
Untie strchrnul() from gdb.

MFC after: 10 days

(cherry picked from commit 2373e704aa1a5dcb7609badfdb0be4ceb4966d74)

9 months agocopy_file_range: require CAP_SEEK capability
Mariusz Zaborski [Thu, 28 Sep 2023 13:24:39 +0000 (15:24 +0200)]
copy_file_range: require CAP_SEEK capability

When using copy_file_range(2) with an offset parameter,
the CAP_SEEK capability should be required.
This requirement is similar to the behavior observed with
pread(2)/pwrite(2).

Reported by: theraven
Reviewed by:    emaste, theraven, kib, markj
Approved by: secteam
Differential Revision:  https://reviews.freebsd.org/D41967

(cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6)

9 months agopf: only create sctp multihome states if we pass the packet
Kristof Provost [Fri, 29 Sep 2023 07:23:43 +0000 (09:23 +0200)]
pf: only create sctp multihome states if we pass the packet

If we've decided to drop the packet we shouldn't create additional
states based off it.

MFC after: 3 days
Sponsored by: Orange Business Services

(cherry picked from commit 480f62ccd8d998e4db9dc13c354a60f8f5e32a33)

9 months agopf: ensure 'off' is always set before use
Kristof Provost [Thu, 28 Sep 2023 07:04:32 +0000 (09:04 +0200)]
pf: ensure 'off' is always set before use

If we bail out early from pf_test(6)() we still need to clean up/finish
SCTP multihome work, which requires the 'off' value to be set. Set it
early enough.

MFC after: 3 days
Sponsored by: Orange Business Services

(cherry picked from commit aefda9c92da6571d405e1b27c5c68333ad8bbc57)

9 months agopf tests: extend SCTP tests to test state removal through ASCONF
Kristof Provost [Tue, 5 Sep 2023 17:00:49 +0000 (19:00 +0200)]
pf tests: extend SCTP tests to test state removal through ASCONF

pf can now mark shut down multihomed connections shutting down. Verify
that pf does the right thing.

MFC after: 3 weeks
Sponsored by: Orange Business Services

(cherry picked from commit 97340b68d18bbbdebf0f73ed900c5a33894061dd)

9 months agopf: mark removed connections within a multihome association as shutting down
Kristof Provost [Tue, 5 Sep 2023 16:30:42 +0000 (18:30 +0200)]
pf: mark removed connections within a multihome association as shutting down

Parse IP removal in ASCONF chunks, find the affected state(s) and mark
them as shutting down. This will cause them to time out according to
PFTM_TCP_CLOSING timeouts, rather than waiting for the established
session timeout.

MFC after: 3 weeks
Sponsored by: Orange Business Services

(cherry picked from commit 4d3af82f78961180149e8a579b481dc382f76eef)

9 months agopf: inherit v_tag values to multihomed connections
Kristof Provost [Mon, 4 Sep 2023 16:00:08 +0000 (18:00 +0200)]
pf: inherit v_tag values to multihomed connections

When we create a new state for an existing SCTP association inherit the
v_tag values from the original connection.

MFC after: 3 weeks
Sponsored by: Orange Business Services

(cherry picked from commit f1cc29af84475b800df5eb94ff7d5b9484ddbdac)

9 months agopf: improve SCTP state validation
Kristof Provost [Fri, 1 Sep 2023 11:33:56 +0000 (13:33 +0200)]
pf: improve SCTP state validation

Only create new states for INIT chunks, or when we're creating a
secondary state for a multihomed association.

Store and verify verification tag.

MFC after: 3 weeks
Sponsored by: Orange Business Services

(cherry picked from commit 51a78dd2764beabfd19a58b8a8b04387a547f02e)

9 months agopf tests: basic SCTP multihoming test
Kristof Provost [Wed, 2 Aug 2023 08:44:52 +0000 (10:44 +0200)]
pf tests: basic SCTP multihoming test

The SCTP server will announce multiple addresses. Block one of them with
pf, connect to the other have the client use the blocked address. pf
is expected to have created state for all of the addresses announced by
the server.

In a separate test case add the secondary (client) IP after the
connection has been established. The intent is to verify the
functionality of the ASCONF chunk parsing.

MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D41638

(cherry picked from commit 1a28d5fea7edf200c37d14f7ed5865910664ec3d)

9 months agopf: support SCTP multihoming
Kristof Provost [Wed, 2 Aug 2023 17:05:00 +0000 (19:05 +0200)]
pf: support SCTP multihoming

SCTP may announce additional IP addresses it'll use in the INIT/INIT_ACK
chunks, or in ASCONF chunks at any time during the connection. Parse these
parameters, evaluate the ruleset for the new connection and if allowed
create the corresponding states.

MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D41637

(cherry picked from commit 10aa9ddb4d45ab0c8f56b0e91c7e8de213030c0f)

9 months agoipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Fri, 29 Sep 2023 00:01:43 +0000 (08:01 +0800)]
ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable `net.inet.ipf.large_nat` 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: cy (for #network)
Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42005

(cherry picked from commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e)
(cherry picked from commit a9359dcde241f17421a71bc8c96dee08625db9dd)

9 months agoip_mroute: Fix sysctl knobs
Zhenlei Huang [Wed, 27 Sep 2023 16:23:22 +0000 (00:23 +0800)]
ip_mroute: Fix sysctl knobs

The loader tunable `net.inet.ip.mfchashsize` does not have corresponding
sysctl MIB entry. Just add it.

While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually
a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T`
will report it correctly.

Reviewed by: kp
Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41997

(cherry picked from commit f549e22901b3a391c76659bee55802b1214112fd)
(cherry picked from commit b0f026435a150933ecb6f2d1359fd1b4898657f1)

9 months agoipfw.8: Adjust section for loader tunables
Zhenlei Huang [Thu, 28 Sep 2023 04:58:44 +0000 (12:58 +0800)]
ipfw.8: Adjust section for loader tunables

Move the descriptions of loader tunables from section 'SYSCTL VARIABLES'
to section 'LOADER TUNABLES'.

See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables).

MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D41981

(cherry picked from commit 12349f38898f231ca803dcf526bac88cb1b5cd2b)
(cherry picked from commit bb6f9a95402a6c3ab8167481b81465f8ad5016fc)

9 months agoipfw: Add sysctl flag CTLFLAG_TUN to loader tunables
Zhenlei Huang [Mon, 25 Sep 2023 10:10:47 +0000 (18:10 +0800)]
ipfw: 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. net.inet.ip.fw.enable
 2. net.inet6.ip6.fw.enable
 3. net.link.ether.ipfw

No functional change intended.

Reviewed by: glebius
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41928

(cherry picked from commit 49197c391b3d49a33bcd08471bf64d533cd10f9d)
(cherry picked from commit f5f6da90597cb65ce55c4f17718a200097f6f78f)

9 months agonetinet6: Add sysctl flag CTLFLAG_TUN to loader tunables
Zhenlei Huang [Mon, 25 Sep 2023 10:10:47 +0000 (18:10 +0800)]
netinet6: 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. net.inet6.ip6.auto_linklocal
 2. net.inet6.ip6.accept_rtadv
 3. net.inet6.ip6.no_radr

No functional change intended.

Reviewed by: glebius
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41928

(cherry picked from commit 03dac3e37993801dab4418087bfedacce0526e66)
(cherry picked from commit da2b630c12ec074673dfc646b2055a31b0d8d6d9)

9 months agortsock: Add sysctl flag CTLFLAG_TUN to loader tunable
Zhenlei Huang [Mon, 25 Sep 2023 10:10:46 +0000 (18:10 +0800)]
rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable

The sysctl variable `net.route.netisr_maxqlen` 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: glebius
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41928

(cherry picked from commit 21a722d9593eb477f4ccdad011a2b4df0727fc62)
(cherry picked from commit bffb01eda9bffc3307ea8bf70f91087ed316e01c)

9 months agofreebsd-update: Allow for upper/lowercase y/n
Juraj Lutter [Sun, 17 Sep 2023 16:15:27 +0000 (18:15 +0200)]
freebsd-update: Allow for upper/lowercase y/n

Allow for upper/lowercase y/n in "Does this look right?" question.

Reviewed by: emaste
Approved by: emaste
Differential revision: https://reviews.freebsd.org/D40434

(cherry picked from commit 39f4633b3d2354c01a290d5f422dce7874061769)

9 months agofreebsd-update: handle file -> directory on upgrade
Ed Maste [Wed, 27 Sep 2023 13:36:33 +0000 (09:36 -0400)]
freebsd-update: handle file -> directory on upgrade

Upgrading from FreeBSD 13.2 to 14.0 failed with
  install: ///usr/include/c++/v1/__string exists but is not a directory
because __string changed from a file to a directory with an LLVM
upgrade.

Now, remove the existing file when the type conflicts.  Note that this
is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA
testing.  This change does not handle the directory -> file case and
further work is needed.

PR: 273661
Reviewed by: dim, gordon
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41893

(cherry picked from commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85)

9 months agozfs: merge openzfs/zfs@eb62221ff (zfs-2.1-release) into stable/13
Martin Matuska [Sat, 30 Sep 2023 06:52:40 +0000 (08:52 +0200)]
zfs: merge openzfs/zfs@eb62221ff (zfs-2.1-release) into stable/13

OpenZFS release 2.1.13

Notable upstream pull request merges:
 #14828 d91778e31 Remove duplicate code in l2arc_evict()
 #14939 425f7895d Fix the L2ARC write size calculating logic
 #14954 c12b5829e Fix the L2ARC write size calculating logic (2)
 #14963 f28cd347c Store the L2ARC device ashift in the vdev label
 #14981 ef2156c66 Shorten arcstat_quiescence sleep time
 #14987 cb549c742 Fix memory leak in zil_parse()
 #15000 6e79bcd35 Fix remount when setting multiple properties
 #15039 e01e3a4e1 Fix raw receive with different indirect block size
 #15084 846a4cc08 zed: Fix zed ASSERT on slot power cycle
 #15094 1abf68b7a zed: Reduce log noise for large JBODs

Obtained from: OpenZFS
OpenZFS tag: zfs-2.1.13
OpenZFS commit: eb62221ff0f9efbc2ab826ec6f1388c5f05fb664
Relnotes: yes

9 months agoregcomp: use unsigned char when testing for escapes
Christos Zoulas [Wed, 30 Aug 2023 20:37:24 +0000 (20:37 +0000)]
regcomp: use unsigned char when testing for escapes

- cast GETNEXT to unsigned where it is being promoted to int to prevent
  sign-extension (really it would have been better for PEEK*() and
  GETNEXT() to return unsigned char; this would have removed a ton of
  (uch) casts, but it is too intrusive for now).
- fix an isalpha that should have been iswalpha

PR: 264275, 274032
Reviewed by: kevans, eugen (previous version)
Obtained from: NetBSD

(cherry picked from commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0)

9 months agopf: add note about changes ported from OpenBSD after 4.5
Ed Maste [Wed, 27 Sep 2023 17:59:30 +0000 (13:59 -0400)]
pf: add note about changes ported from OpenBSD after 4.5

The last comprehensive sync with OpenBSD's pf corresponds to
OpenBSD 4.5, but many changes have been ported over since then.

Reviewed by: kp, gbe, Kajetan Staszkiewicz <vegeta@tuxpowered.net>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42002

(cherry picked from commit 3e609fd481c07802fe837ed834c3710b8c19493c)

9 months agovge: correct pause_frames sysctl description
Priit Trees [Fri, 28 Jul 2023 21:41:22 +0000 (21:41 +0000)]
vge: correct pause_frames sysctl description

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

(cherry picked from commit 0a5d2802b41fd216d9a345f749af1a6ccbe9f382)

9 months agoping: The -C option is also supported for IPv6.
Dag-Erling Smørgrav [Tue, 19 Sep 2023 08:47:11 +0000 (10:47 +0200)]
ping: The -C option is also supported for IPv6.

MFC after: 3 days
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: rscheff, allanjude
Differential Revision: https://reviews.freebsd.org/D41881

(cherry picked from commit a2d1360142f609485c9301df08cc99140743ef2b)

9 months agoRemove mention of defunct mailing list from acl / mac man pages.
Dag-Erling Smørgrav [Fri, 22 Sep 2023 07:42:57 +0000 (09:42 +0200)]
Remove mention of defunct mailing list from acl / mac man pages.

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

(cherry picked from commit b653faaa19c47a4a7e488e5ead738b7ae44ffe8b)

Fix typos in acl_get_entry(3) manual page.

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

(cherry picked from commit c34fce8a039935e06ed84db1395d7d2c551e5a7c)

9 months agovfs_remount_ro(): mnt_lockref should be only accessed after vfs_op_enter()
Konstantin Belousov [Wed, 20 Sep 2023 03:42:31 +0000 (06:42 +0300)]
vfs_remount_ro(): mnt_lockref should be only accessed after vfs_op_enter()

PR: 273953

(cherry picked from commit c584bb9cac16bc200ac45cc8b709e7e7e99e24bb)

9 months agodevfs: add integrity asserts for cdevp_list
Jason A. Harmening [Tue, 19 Sep 2023 13:44:34 +0000 (08:44 -0500)]
devfs: add integrity asserts for cdevp_list

It's possible for misuse of cdev KPIs or for bugs in devfs itself to
result in e.g. a cdev object's container being freed while still on the
global list used to populate each devfs mount; see PR 273418 for a
recent example.

Since a node may be marked inactive well before it is reaped from the
list, add a new flag solely to track list membership, and employ it in
some basic list integrity assertions to catch bad actors.

Discussed with: kib, mjg

(cherry picked from commit 67864268da53b792836f13be10299de8cd62997e)

9 months agosocket tests: Avoid a buffer leak
Mark Johnston [Wed, 27 Sep 2023 12:30:50 +0000 (08:30 -0400)]
socket tests: Avoid a buffer leak

Reported by: Coverity
Fixes: 38426b32e106 ("socket tests: Add a regression test for MSG_WAITALL")

(cherry picked from commit a3074ff2122faf0eaba7d3f989e916b1c7f21912)

9 months agodtrace: Fix a kernel panic in printm()
Domagoj Stolfa [Wed, 6 Sep 2023 13:25:00 +0000 (09:25 -0400)]
dtrace: Fix a kernel panic in printm()

When using printm(), one should always pass a scratch pointer to it.
This is achieved by calling printm with memref

  BEGIN { printm(fixed_len, memref(ptr, var_len)); }

which will return a pointer to the DTrace scratch space of size
sizeof(uintptr_t) * 2. However, one can easily call printm() as follows

  BEGIN { printm(10, (void *)NULL); }

and panic the kernel as a result. This commit does two things:

  (1) adds a new macro DTRACE_INSCRATCHPTR(mstate, ptr, howmany) which
      checks if a certain pointer is in the DTrace scratch space;
  (2) uses DTRACE_INSCRATCHPTR() to implement a check on printm()'s DIFO
      return value in order to avoid the panic and sets CPU_DTRACE_BADADDR
      if the address is not in the scratch space.

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

(cherry picked from commit 8527bb2aee6ca9013c34445de88217a954b6628d)

9 months agosocket tests: Add a regression test for MSG_WAITALL
Mark Johnston [Thu, 31 Aug 2023 17:29:29 +0000 (13:29 -0400)]
socket tests: Add a regression test for MSG_WAITALL

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

(cherry picked from commit 38426b32e106cf251520259b29779372eda7a5f8)

9 months agosockets: re-check socket state after call to pr_rcvd()
Greg Becker [Sat, 9 Sep 2023 23:38:24 +0000 (18:38 -0500)]
sockets: re-check socket state after call to pr_rcvd()

Socket state may have changed after dropping the receive
buffer lock in order to call pr_rcvd().  If the buffer is
empty, re-check the state after reaquiring the lock and
skip calling sbwait() if the socket is in error or the
peer has closed.

PR: 212716
Reviewed by: markj, glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41783

(cherry picked from commit f44102411e1b16363e91a074c9c403069c550e4d)

9 months agoipfilter: Avoid allocating a new ipf token when not needed
Cy Schubert [Tue, 12 Sep 2023 20:29:29 +0000 (13:29 -0700)]
ipfilter: Avoid allocating a new ipf token when not needed

Only allocate a new ipftoken_t if one cannot be found. This eliminates
allocating unnecessary token structures that will never be used when
performing simple lookups for existing token structures.

(cherry picked from commit 7f5e3b9fa3d159b7f061b4d01a767cbe5d0527f3)

9 months agoports(7): Update the default setting of MASTER_SITE_INDEX
Li-Wen Hsu [Sun, 24 Sep 2023 02:58:33 +0000 (10:58 +0800)]
ports(7): Update the default setting of MASTER_SITE_INDEX

MFC after: 3 days

(cherry picked from commit 855e0457396c7addb1df6fc1d14200cc8de286c0)

9 months agolibprocstat: use elf_getphdrnum rather than deprecated elf_getphnum
John Hein [Thu, 21 Sep 2023 23:43:05 +0000 (17:43 -0600)]
libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum

PR:             273966
Reviewed by: emaste

(cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc)
(cherry picked from commit fd8bf2ecc05af841aa7e8369a43861cdc122d404)

9 months agoswitch groff parameter -man to -mandoc for new groff release 1.23.0
Wolfram Schneider [Thu, 7 Sep 2023 14:59:12 +0000 (14:59 +0000)]
switch groff parameter -man to -mandoc for new groff release 1.23.0

PR: 273565

(cherry picked from commit cd89fe3923e92ab090cbdff7eb215c2d85b51718)

9 months agoswitch groff parameter -man to -mandoc
Wolfram Schneider [Thu, 7 Sep 2023 06:28:24 +0000 (06:28 +0000)]
switch groff parameter -man to -mandoc

groff 1.23.0 changed the semantics of the -man parameter, and many
manual pages are not rendered. The -mandoc parameter brings back
the old behavior, as in groff 1.22.4 and earlier.

PR: 273565, 273245

Reviewed by: emaste, bapt
MFC after: 1 week for all supported branches (stable/12, 13, 14)
Differential Revision: https://reviews.freebsd.org/D41737

(cherry picked from commit 035f7c9a3653d91564a5513f1311aa3b6e14a17e)

9 months agoaxge: Skip dummy packet headers
Damien Broka [Wed, 13 Sep 2023 08:23:47 +0000 (09:23 +0100)]
axge: Skip dummy packet headers

Newer versions of the AX88179 interweave dummies alongside valid
packet headers in bulk IN transfer data. This was probably done for
backward compatibility with existing drivers.

However current driver records these dummy headers as dropped frames,
leading to stats misreporting one Ierr per Ipkt.

This skips those dummy headers silently, thereby not generating Ierrs
for them.

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

(cherry picked from commit 70fbcd451b68b7f6038d8a602cd8d5e1bb890f1d)

9 months agobuf.h: Fix declaration of unmapped_buf
Sebastian Huber [Tue, 19 Jul 2022 18:09:43 +0000 (20:09 +0200)]
buf.h: Fix declaration of unmapped_buf

For architectures with a small-data area, the __read_mostly section must
present at the object declaration.

(emaste note: This does not appear to have an affect within FreeBSD, but
may be needed by downstream projects that handle __read_mostly /
__section(".data.read_mostly") differently.)

Pull Request: https://github.com/freebsd/freebsd-src/pull/608

(cherry picked from commit ede6c6c0434a266a1712ffe807f4e31e229948df)

9 months agoRemove "All Rights Reserved" from Foundation copyrights
Ed Maste [Thu, 30 Jun 2022 14:52:29 +0000 (10:52 -0400)]
Remove "All Rights Reserved" from Foundation copyrights

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 7fde0187cc443468561f0a30d589ff0cfe45eef5)
(cherry picked from commit 560e22c8fe460e00d16e5268fe1fbb316ad81101)
(cherry picked from commit 5b5fa75acff11d871d0c90045f8c1a58fed85365)

9 months agopf: fix state leak
Kristof Provost [Wed, 6 Sep 2023 07:58:07 +0000 (09:58 +0200)]
pf: fix state leak

If we hit the csfailed case in pf_create_state() we may have allocated
a state, so we must also free it. While here reduce the amount of
duplicated cleanup code.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D41772

(cherry picked from commit b6ce41118bb11d3db86eae8fbebc8c198e8b330d)

9 months agoarm64: Fix errata workarounds that depend on smccc
Andrew Turner [Mon, 18 Sep 2023 16:34:51 +0000 (17:34 +0100)]
arm64: Fix errata workarounds that depend on smccc

Some arm64 errata depend on calling into the firmware via the SMCCC
interface. This needs to happen after the psci driver has attached
as they share the interface.

Fix this by allowing the workarounds to mark when they depend on
device drivers attaching.

This is only an issue on CPU 0 as the workarounds are applied later
for the non-boot CPUs.

Reviewed by: emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D41916

(cherry picked from commit c643e82dba0b17b2716de4c9d44a3c9c547cbbd5)
(cherry picked from commit 843bea18711d726cd2f0a3c3f9144b218e4de3e8)

9 months agogicv3: Add checks for the device ID
Andrew Turner [Tue, 22 Aug 2023 14:37:19 +0000 (15:37 +0100)]
gicv3: Add checks for the device ID

Add checks that the device ID is supported by the hardware and is
within the range allocated when the driver attaches.

Reviewed by: gallatin, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D41554

(cherry picked from commit 7d2dd08d013d79dc3f2a22747b079628a571cea2)

9 months agogicv3: Add a verbose message for unknown tables
Andrew Turner [Tue, 22 Aug 2023 11:30:50 +0000 (12:30 +0100)]
gicv3: Add a verbose message for unknown tables

Add a message under bootverbose when we find a gicv3 its table type
that is unknown.

Reviewed by: gallatin, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D41553

(cherry picked from commit 629734783de5212ea2a7cdc6a8fb7cf6834b1344)

9 months agogicv3: Stop setting the esize field
Andrew Turner [Tue, 22 Aug 2023 11:29:03 +0000 (12:29 +0100)]
gicv3: Stop setting the esize field

The GITS_BASER esize field is read-only, there is no need to change it.

Reviewed by: gallatin, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D41552

(cherry picked from commit 2f11b2abfc185d3d4f45e6a3dae270b859cdd388)

9 months agogicv3: Split out finding the page size
Andrew Turner [Tue, 22 Aug 2023 10:51:26 +0000 (11:51 +0100)]
gicv3: Split out finding the page size

When adding indirect (2 level) tabled we will need to know the page
size to calculate the size of the level 1 table. To allow for this find
the page size before entering the loop to calculate the final register
value.

Reviewed by: gallatin, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D41551

(cherry picked from commit 3fc4f7c88085dc94c88348839074b8db6f19fae1)

9 months agoarm64: Update the ID_AA64PFR1_EL1 fields
Andrew Turner [Thu, 6 Jul 2023 14:40:01 +0000 (15:40 +0100)]
arm64: Update the ID_AA64PFR1_EL1 fields

While here move to decimal for the _op and _CR definitions to be used
by a future macro to define the register when the assembler doesn't
know about it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40896

(cherry picked from commit 8c111e5b375897bc298b8cdb3095f3c0e29c2307)

9 months agoarm64: Update the ID_AA64PFR0_EL1 fields
Andrew Turner [Thu, 6 Jul 2023 14:02:35 +0000 (15:02 +0100)]
arm64: Update the ID_AA64PFR0_EL1 fields

While here move to decimal for the _op and _CR definitions to be used
by a future macro to define the register when the assembler doesn't
know about it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40895

(cherry picked from commit 0766dde9b5587d04c634eda1ab4666203d32a271)

9 months agoarm64: Don't use hex for ID_AA64MMFR2_EL1_op/CR*
Andrew Turner [Thu, 6 Jul 2023 13:15:12 +0000 (14:15 +0100)]
arm64: Don't use hex for ID_AA64MMFR2_EL1_op/CR*

It breaks a future macro that creates the alternative register name
for old compilers.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40892

(cherry picked from commit 2134cfe793d67e3bc6ec0713862168452f4ad8f0)

9 months agoarm64: Update the ID_AA64MMFR1_EL1 fields
Andrew Turner [Thu, 6 Jul 2023 13:11:29 +0000 (14:11 +0100)]
arm64: Update the ID_AA64MMFR1_EL1 fields

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40891

(cherry picked from commit 284f91de8b43a5d66fbd484d6cb5ab2d86e822d1)

9 months agoarm64: Update the ID_AA64MMFR0_EL1 fields
Andrew Turner [Thu, 6 Jul 2023 12:34:28 +0000 (13:34 +0100)]
arm64: Update the ID_AA64MMFR0_EL1 fields

While here move to decimal for the _op and _CR definitions to be used
by a future macro to define the register when the assembler doesn't
know about it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40890

(cherry picked from commit b21402d058755f4b33a82fa8024fbf4501f5a218)

9 months agoarm64: Update the ID_AA64ISAR1_EL1 fields
Andrew Turner [Thu, 6 Jul 2023 10:01:11 +0000 (11:01 +0100)]
arm64: Update the ID_AA64ISAR1_EL1 fields

While here move to decimal for the _op and _CR definitions to be used
by a future macro to define the register when the assembler doesn't
know about it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40889

(cherry picked from commit de01309926e21e1cff196b6b23cff6c52064aa0e)

9 months agoarm64: Update the ID_AA64ISAR0_EL1 fields
Andrew Turner [Thu, 6 Jul 2023 09:19:21 +0000 (10:19 +0100)]
arm64: Update the ID_AA64ISAR0_EL1 fields

While here move to decimal for the _op and _CR definitions to be used
by a future macro to define the register when the assembler doesn't
know about it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40888

(cherry picked from commit 4182f58172b56f71bfaf2450a0e9cb8b4397bf0a)

9 months agoarm64: Update the ID_AA64DFR0_EL1 fields
Andrew Turner [Mon, 13 Mar 2023 09:17:32 +0000 (09:17 +0000)]
arm64: Update the ID_AA64DFR0_EL1 fields

While here move to decimal for the _op and _CR definitions to be used
by a future macro to define the register when the assembler doesn't
know about it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40887

(cherry picked from commit 6fd44e5f530935a26f58637594ac22719324fb12)

9 months agoarm64: Make register definitions const
Mark Johnston [Wed, 28 Jun 2023 20:13:37 +0000 (16:13 -0400)]
arm64: Make register definitions const

No functional change intended.

Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc. (hardware)
Differential Revision: https://reviews.freebsd.org/D40502

(cherry picked from commit 00bcb77ebcbcb89bd27205b289699d711a0caf3d)

9 months agoContinue searching for an irq map from the start
Andrew Turner [Tue, 27 Jun 2023 08:32:12 +0000 (09:32 +0100)]
Continue searching for an irq map from the start

When searching for a free irq map location continue the search from the
beginning of the list. There may be holes in the map before
irq_map_first_free_idx, e.g. when removing an entries in order will
increase the index past the current free entry.

PR: 271990
Reviewed by: mhorne
Sponsored by: Arm Ltd

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

(cherry picked from commit 9beb195fd9fdc4beb7d5bca865cf5b19ccd7449b)

9 months agoAdd more arm64 special register values
Andrew Turner [Fri, 9 Jun 2023 17:46:58 +0000 (18:46 +0100)]
Add more arm64 special register values

These will be used to simplify the kernel special register handling.

Sponsored by: Arm Ltd

(cherry picked from commit 178747a1586d48a8063014d7b8528ec47205e1bf)

9 months agoAdd more arm64 ID registers to the user_regs array
Andrew Turner [Fri, 9 Jun 2023 08:36:12 +0000 (09:36 +0100)]
Add more arm64 ID registers to the user_regs array

This is a mapping from ID register value to offset in struct cpu_desc.
These registers may be needed with future architecture revisions either
by userspace or by bhyve.

Sponsored by: Arm Ltd

(cherry picked from commit 1dd169af7143db4df613f273e565919c1c2b53f5)

9 months agoarm64: Fix the definition of ID_AA64DFR1_EL1
Andrew Turner [Fri, 2 Jun 2023 15:23:47 +0000 (16:23 +0100)]
arm64: Fix the definition of ID_AA64DFR1_EL1

(cherry picked from commit dd235575283811af73db665a280ac40f8b0a608b)

9 months agoAdd more arm64 ID registers
Andrew Turner [Fri, 2 Jun 2023 14:59:46 +0000 (15:59 +0100)]
Add more arm64 ID registers

These will be used by bhyve to emulate these registers.

Sponsored by: Arm Ltd

(cherry picked from commit 4baf5db06ccfdb616abb6a68be99f297f7377bf4)

9 months agoarm64: Correct a pmap unlock in pmap_stage2_fault
Andrew Turner [Fri, 2 Jun 2023 09:58:56 +0000 (10:58 +0100)]
arm64: Correct a pmap unlock in pmap_stage2_fault

This is used by bhyve so was not an issue as it is still in development.
Sponsored by: Arm Ltd

(cherry picked from commit 8cca8e248fb7f5fb475544a08d8cdb24d26bf4b3)

9 months agoAdd brackets around GICv3 redistributor macros
Andrew Turner [Thu, 25 May 2023 08:35:14 +0000 (09:35 +0100)]
Add brackets around GICv3 redistributor macros

The GICv3 redistributor register access macros take arguments that are
used as variables. Add brackets around them as is the style, and for
safety.

Sponsored by: Arm Ltd

(cherry picked from commit 8b709c88e56dc7e035be6744572bd2978a704338)

9 months agoarm64: Print the spinlock count on panic
Andrew Turner [Wed, 24 May 2023 14:40:30 +0000 (15:40 +0100)]
arm64: Print the spinlock count on panic

When the spinlock count is non-zero while taking a data abort we panic.
Print this count to help debugging.

Sponsored by: Arm Ltd

(cherry picked from commit fa512fcd8fe74d72b7f29a324c8cd3ca20ff25c8)

9 months agoPrint registers on an arm64 spinlock data abort
Andrew Turner [Tue, 23 May 2023 09:21:39 +0000 (10:21 +0100)]
Print registers on an arm64 spinlock data abort

When checking if the spinlock count is correct in a data abort we can
panic without printing the registers. These are useful to debug the
abort, e.g. by giving the fault address register.

Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40228

(cherry picked from commit 0731b0a9f1f9e3b4ec699ec67b6eb24159fa9b05)

9 months agoAdd more arm64 special registers
Andrew Turner [Thu, 4 May 2023 10:30:57 +0000 (11:30 +0100)]
Add more arm64 special registers

These will be used by bhyve

Reviewed by: markj
Sponsored by: Arm Ltd
Sponsored by: Innovate UK
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40128

(cherry picked from commit 419f8fc7fbc8b860df92db58d13ac9c9aafa1c10)

9 months agoSplit out pmap_map_delete on arm64
Andrew Turner [Fri, 28 Apr 2023 10:54:19 +0000 (11:54 +0100)]
Split out pmap_map_delete on arm64

This will be used when supporting some extensions, e.g. Branch Target
Identification (BTI).

Sponsored by: Arm Ltd

(cherry picked from commit 020edaea2ab05c9cea7d83872f28a4e5e65407e2)

9 months agoCreate pmap_mask_set_locked on arm64
Andrew Turner [Wed, 12 Apr 2023 12:09:06 +0000 (13:09 +0100)]
Create pmap_mask_set_locked on arm64

Create a locked version of pmap_mask_set. We will need this for BTI
support.

Sponsored by: Arm Ltd

(cherry picked from commit 421516f25e9cfa91b33841f633a463889bc10af7)

9 months agoMark EENTRY as .text
Andrew Turner [Thu, 6 Apr 2023 15:36:15 +0000 (16:36 +0100)]
Mark EENTRY as .text

To allow it to be used before ENTRY we need to ensure the symbol is
in the .text section. It also needs to be aligned correctly.

While here mark the symbol type as a function as in the ENTRY macro.

Reported by: jrtc27
Sponsored by: Arm Ltd

(cherry picked from commit 04b4655997d2d10e3f3748f3a1a1d84c4ae95740)

9 months agoMove arm64 EENTRY uses before ENTRY
Andrew Turner [Fri, 31 Mar 2023 12:34:51 +0000 (13:34 +0100)]
Move arm64 EENTRY uses before ENTRY

The ENTRY macro adds instructions to the start of a function but not
EENTRY. To use these instructions in both functions move the EENTRY
use before the ENTRY use.

Sponsored by: Arm Ltd

(cherry picked from commit 47ff149afaea6a403b8d044e26673bc3cd605fe4)

9 months agoHandle the arm64 unknown exception separately
Andrew Turner [Fri, 31 Mar 2023 09:15:45 +0000 (10:15 +0100)]
Handle the arm64 unknown exception separately

Rather than falling through to the default case handle the unknown
exception with its own panic message. As ESR_EL1 is zero for this
exception stop printing it.

Sponsored by: Arm Ltd

(cherry picked from commit 3a0cc6fe61ea29334c17dfb71bf24ba9e604ab4c)

9 months agoMark arm64 mair_el1 fields as unsigned long
Andrew Turner [Thu, 16 Mar 2023 16:19:21 +0000 (16:19 +0000)]
Mark arm64 mair_el1 fields as unsigned long

The register is 64-bit so the upper bits could be shifted past the
signed 32-bit size of an int the values were before.

Sponsored by: Arm Ltd

(cherry picked from commit a671f96d9319d63e4a634f88ae277c4d682bba69)

9 months agoAdd PSCI affinity info return values
Andrew Turner [Thu, 16 Mar 2023 12:16:59 +0000 (12:16 +0000)]
Add PSCI affinity info return values

These can be returned from the PSCI AFFINITY_INFO call. This is not
marked as optional so bhyve will need to implement it & can use these
macros.

Sponsored by: Arm Ltd

(cherry picked from commit 7d0b915919665cb43107b36ad103791515eade5b)

9 months agoAdd a psci macro to build a version value
Andrew Turner [Thu, 16 Mar 2023 12:14:01 +0000 (12:14 +0000)]
Add a psci macro to build a version value

Add PSCI_VER that takes a major and minor version and builds the value
returned by the firmware. This will be used by bhyve.

Sponsored by: Arm Ltd

(cherry picked from commit e89be21854b3aa33efd2e06529a181343281659d)

9 months agoAllow psci.h to be used by userspace
Andrew Turner [Thu, 16 Mar 2023 12:08:32 +0000 (12:08 +0000)]
Allow psci.h to be used by userspace

Wrap parts of psci.h that aren't usable by userspace in _KERNEL checks.
This allows it to be used to implement PSCI and SMCCC by bhyve in
userspace.

Sponsored by: Arm Ltd
Sponsored by: Innovate UK
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 473ab212dc1f72c1765f112568237d229d4e0441)

9 months agorc.d/hostid: remove useless cat
наб [Mon, 30 May 2022 23:18:12 +0000 (01:18 +0200)]
rc.d/hostid: remove useless cat

We've already read it and validated it ‒ re-reading is wasteful

PR: 264376
(cherry picked from commit 11bd40d04af59daa7ae7feea0518081a35f07053)

9 months agovt: clarify comments on kbd add/release
Ed Maste [Thu, 24 Feb 2022 15:38:16 +0000 (10:38 -0500)]
vt: clarify comments on kbd add/release

PR: 247498

(cherry picked from commit a2774a9264eb11b26fc6be4127a8c0da1ead297d)

9 months agomemcpy.3: remove BUGS section allowing overlapping strings
Ed Maste [Tue, 24 Aug 2021 13:20:18 +0000 (09:20 -0400)]
memcpy.3: remove BUGS section allowing overlapping strings

The removed text claimed that memcpy is implemented using bcopy and thus
strings may overlap.  Use of bcopy is an implementation detail that is
no longer true, even if the implementation (on some archs) does allow
overlap.

In any case behaviour is undefined per the C standard if memcpy is
called with overlapping objects, and this man page already claimed that
src and dst may not overlap.

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

(cherry picked from commit 37296464defda0aa769c39ab554deb4875aef000)

9 months agorescue: include ping iff at least one of INET & INET6 is enabled
Ed Maste [Fri, 31 Dec 2021 01:11:31 +0000 (20:11 -0500)]
rescue: include ping iff at least one of INET & INET6 is enabled

Ping does not build (and serves no purpose) if neither is enabled
(i.e., building WITHOUT_INET and WITHOUT_INET6).

This is equvalent to a4ef9e58bc0c but for rescue/.

PR: 260082
Fixes: a4ef9e58bc0c ("sbin: build ping if at least one of...")
Sponsored by: The FreeBSD Foundation

(cherry picked from commit daf481f3d508e7497b456e8df7db17c90b623ee0)

9 months agoudl.4: note that "device videomode" is also required
Archimedes Gaviola [Sat, 9 Sep 2023 17:39:17 +0000 (13:39 -0400)]
udl.4: note that "device videomode" is also required

Reviewed by: emaste

(cherry picked from commit 9888a79adad22ba06b5aff17d05abac0029c537a)

9 months agoAdd deprecation notices to publickey(5) tools
Ed Maste [Wed, 20 Sep 2023 11:31:14 +0000 (07:31 -0400)]
Add deprecation notices to publickey(5) tools

Reviewed by: imp, manu
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40144

(cherry picked from commit d5ef73a71f0e2fbc4dc9b907a6e59a15599c50b3)

9 months agorc.subr: don't require service to be enabled for `status`
Daniel Tameling [Sat, 1 Jul 2023 08:43:40 +0000 (10:43 +0200)]
rc.subr: don't require service to be enabled for `status`

For a service that sets an rcvar, there is a check whether it has been
enabled before the actual command is executed. If the check fails, one
gets a message to enable it and the returned exit status is 0.
However, this is usually undesirable for the status command, which is
a) supposed to check whether the service is running anyway and
b) returns a non-zero exit code if that is not the case.
Thus, skip the check for the status command.

PR: 272282
Reviewed by: emaste

(cherry picked from commit ba793728a840041e93e38bcbff4a7233dc63b722)
(cherry picked from commit f701d9da1d94891dd2edad607a989cad6eb10313)

9 months agosrc.conf.5: regen after SSP option description update
Ed Maste [Thu, 7 Sep 2023 15:57:46 +0000 (11:57 -0400)]
src.conf.5: regen after SSP option description update

Also pick up missing note about SSP being disabled for MIPS.

(cherry picked from commit 5449d0144d612d7b7b3b85ab292d514db4e300c3)

9 months agoUpdate WITH_/WITHOUT_SSP descriptions
Ed Maste [Wed, 30 Aug 2023 20:49:44 +0000 (16:49 -0400)]
Update WITH_/WITHOUT_SSP descriptions

ProPolice refers to a specific implementation by Hiroaki Etoh and
Kunikazu Yoda.  The implementation in contemporary Clang and GCC is
somewhat different and newer, so use a generic term in the src.conf
descriptions.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit b461276d75488fe50c1503db85d43cbb8c3c3067)