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

9 months agoWhen parsing a rule to rotate log files on a specific week day,
Garance A Drosehn [Thu, 30 Dec 2021 20:45:13 +0000 (20:45 +0000)]
When parsing a rule to rotate log files on a specific week day,
parseDWM() can advance the time to the next week. If the next week is
in the next month, then tm_mon is incremented. However, the increment
was failing to handle the wraparound from December to January, so when
parsing a rule during the last week of the December, the month would
advance to month 12. This triggered an out-of-bounds read of the
mtab[] array in days_pmonth() after parseDWM() returned.  To fix,
this change resets the month to January and increment the year when
the month increment wraps.

The default rule for /var/log/weekly.log triggers this during the
last week of December each year.
Reported by: CHERI
Obtained from: CheriBSD
Reviewed by: jhb
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: <https://reviews.freebsd.org/D33687>

(cherry picked from commit b7b447fd4ca327faa99b2f16e6cbd61c86c75f04)

9 months agoirdma(4): remove artificial completion generator
Bartosz Sobczak [Mon, 21 Aug 2023 11:28:58 +0000 (13:28 +0200)]
irdma(4): remove artificial completion generator

Removing artificial completion generator as there had been no indication
of the code being required for E810 cards.  Further more it was found
that the code may have unpleasant side effects on user experience when
using ucmatose tool.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41593

(cherry picked from commit ffafa6a4d157e49e6b12567958c4ab0c9151c080)

9 months agoirdma(4): use related vnet for searching netdev
Bartosz Sobczak [Mon, 21 Aug 2023 11:56:57 +0000 (13:56 +0200)]
irdma(4): use related vnet for searching netdev

It was found through testing that when ULP uses individual vnet, the
search for the correct vlan_id may failing because of no proper
interface with given address.

The solution is to use vnet associated to the connection whenever
possible.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41592

(cherry picked from commit bc3a013ccd23c50bb48f17211ffc36fe85d11e18)

9 months agoice(4): Match irdma interface changes
Bartosz Sobczak [Mon, 24 Jul 2023 15:46:31 +0000 (17:46 +0200)]
ice(4): Match irdma interface changes

(This is a direct commit to stable/13)

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Sponsored by: Intel Corporation

9 months agoirdma(4): upgrade to 1.2.17-k
Bartosz Sobczak [Wed, 5 Jul 2023 14:23:06 +0000 (16:23 +0200)]
irdma(4): upgrade to 1.2.17-k

Update Intel irdma driver to version 1.2.17-k

Notable changes:
- pf-reset handling improvements, including fixes in communication with if_ice(4)
- avoid racing when handling various events
- adding sw stats sysctls
- hand over pe_criterr handling from ice(4) to irdma(4)
- debug prints adjustments
- fix crash after changes in irdma_add_mqh_ifa_cb

Additional fixes in stable/13 but not in original cherry-picked commit:
- code appearance improvements
- bug fixes in fbsd_kcompat.c
- avoid waiting procedures under lock in irdma_add_mqh_ifa_cb
- busy wait for manage_qhash
- stats don't need to be RDTUN, RD is enough

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41425

(cherry picked from commit 01fbb86991d524288a785b544c29d9c5ea1b61fb)

9 months agoirdma(4): Upgrade the driver to 1.1.11-k
Bartosz Sobczak [Tue, 28 Mar 2023 21:15:15 +0000 (14:15 -0700)]
irdma(4): Upgrade the driver to 1.1.11-k

Summary of changes:
- postpone mtu size assignment during load to avoid race condition
- refactor some of the debug prints
- add request reset handler
- refactor flush scheduler to increase efficiency and avoid racing
- put correct vlan_tag for UD traffic with PFC
- suspend QP before going to ERROR state to avoid CQP timout
- fix arithmetic error on irdma_debug_bugf
- allow debug flag to be settable during driver load
- introduce meaningful default values for DCQCN algorithm
- interrupt naming convention improvements
- skip unsignaled completions in poll_cmpl

Signed-off-by: Bartosz Sobczak bartosz.sobczak@intel.com
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: hselasky@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D39173

(cherry picked from commit 35105900c65bb5adcde05d37ae34ad006970d4f9)

9 months agoObsoleteFiles: cleanup more old libclang_rt files for powerpc64le
Dimitry Andric [Tue, 19 Sep 2023 11:45:57 +0000 (13:45 +0200)]
ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le

PR: 273776
MFC after: 3 days

(cherry picked from commit 8a99263e9da1f04ede967cfa1ea6d52d258dcbe5)
(cherry picked from commit 237b0c5b22c95683c2367ef0a82f54c309309db4)

9 months agoObsoleteFiles: cleanup old libclang_rt files for powerpc64le
Dimitry Andric [Sat, 16 Sep 2023 07:47:19 +0000 (09:47 +0200)]
ObsoleteFiles: cleanup old libclang_rt files for powerpc64le

PR: 273776
MFC after: 3 days

(cherry picked from commit cadbf320b352b3691cdfa90ad8ba818efca4ea68)

9 months agoObsoleteFiles: cleanup old libclang_rt files for powerpc64
Dimitry Andric [Thu, 14 Sep 2023 16:39:31 +0000 (18:39 +0200)]
ObsoleteFiles: cleanup old libclang_rt files for powerpc64

PR:             273776
MFC after:      3 days

(cherry picked from commit b9c012a60b6e98f7c3e765859195302cf3ae7f6c)

9 months agoObsoleteFiles.inc: Add libclang_rt libraries for riscv64 for LLVM 14/15.
John Baldwin [Tue, 5 Sep 2023 16:12:12 +0000 (09:12 -0700)]
ObsoleteFiles.inc: Add libclang_rt libraries for riscv64 for LLVM 14/15.

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D41701

(cherry picked from commit 25b58f9a4a69012b5c1729a3895f9fb3369e2b5d)

9 months agotmpfs.5: Document option export
Mateusz Piotrowski [Mon, 18 Sep 2023 21:58:08 +0000 (23:58 +0200)]
tmpfs.5: Document option export

This is a no-op option supported for the sake of NFS.

MFC after: 7 days

(cherry picked from commit b2bd87bb01a97b5b025614a6bfccb8e109c201cd)

9 months agotmpfs.5: Document option union
Mateusz Piotrowski [Mon, 18 Sep 2023 20:29:09 +0000 (21:29 +0100)]
tmpfs.5: Document option union

As noted in 59169d915600333b7d9187097f157865ba642256,
tmpfs(5) supports the union option just fine.

MFC after: 7 days

(cherry picked from commit 1d225179fd5d7eb932486a94abb8b76be7e44241)

9 months agotmpfs.5: Document option nomtime
Mateusz Piotrowski [Mon, 18 Sep 2023 19:51:50 +0000 (20:51 +0100)]
tmpfs.5: Document option nomtime

Fixes: c1e84733ac7e tmpfs: add nomtime mount option,
MFC after: 7 days

(cherry picked from commit 6a1de1912d5216512a73dd97c4ee454d44b8fffb)

9 months agotmpfs.5: Document option nosymfollow
Mateusz Piotrowski [Mon, 18 Sep 2023 19:43:15 +0000 (20:43 +0100)]
tmpfs.5: Document option nosymfollow

Fixes: 15df90218bb6 tmpfs: support the nosymfollow mount option
MFC after: 7 days

(cherry picked from commit 942cc861f2cb5af287f15aa9b1bd56527f113032)

9 months agotmpfs.5: Document option pgread
Mateusz Piotrowski [Mon, 18 Sep 2023 19:38:53 +0000 (20:38 +0100)]
tmpfs.5: Document option pgread

Fixes: 765ad5b28d3f tmpfs: add the "pgread" mount option
MFC after: 7 days

(cherry picked from commit fade2298889d588c15705b44e336ff02cc96f956)

9 months agotmpfs.5: Sort option descriptions
Mateusz Piotrowski [Mon, 18 Sep 2023 19:31:24 +0000 (20:31 +0100)]
tmpfs.5: Sort option descriptions

MFC after:  3 days

(cherry picked from commit e69a5788273b4f531a49054e0238424826375633)

9 months agotmpfs.5: Keep the style of option descriptions consistent
Mateusz Piotrowski [Mon, 18 Sep 2023 19:29:42 +0000 (20:29 +0100)]
tmpfs.5: Keep the style of option descriptions consistent

MFC after: 3 days

(cherry picked from commit 0789d988a95eba5bd45fbe82a4ebd4dc7e957797)

9 months agotmpfs.5: Fix the use of Bl
Mateusz Piotrowski [Mon, 18 Sep 2023 19:24:22 +0000 (20:24 +0100)]
tmpfs.5: Fix the use of Bl

MFC after: 3 days

(cherry picked from commit adbc93c4cc862b6fc6e7992f6e8c78745d0d36eb)

9 months agoat.man: Move examples to the EXAMPLES section
Mateusz Piotrowski [Mon, 18 Sep 2023 19:17:52 +0000 (20:17 +0100)]
at.man: Move examples to the EXAMPLES section

MFC after: 3 days

(cherry picked from commit cd056e3cd4e421fd50245bb2aa6f989b23e861bc)

9 months agoat.man: Fix mdoc(7) macro usage
Mateusz Piotrowski [Mon, 18 Sep 2023 19:12:31 +0000 (20:12 +0100)]
at.man: Fix mdoc(7) macro usage

MFC after: 3 days

(cherry picked from commit d13b8b3e7255ad01b25ab512983af88d78fc1e53)

9 months agorc.conf.5: Pet mdoc linters
Mateusz Piotrowski [Mon, 18 Sep 2023 18:47:10 +0000 (19:47 +0100)]
rc.conf.5: Pet mdoc linters

MFC after: 3 days

(cherry picked from commit b7961dba30e60fb0d1a5383cf03e5ea2fd2ff607)

9 months agodaemon.8: Document -u sets HOME, USER, and SHELL
Mateusz Piotrowski [Mon, 18 Sep 2023 18:17:55 +0000 (19:17 +0100)]
daemon.8: Document -u sets HOME, USER, and SHELL

Fixes: 6b3ad1d73732 When -u option is used also set USER, HOME and SHELL
MFC after: 3 days

(cherry picked from commit c1207678f7ebd546a0705dabc3218e49abe06a99)

9 months agodaemon.8: Sort options in DESCRIPTION
Mateusz Piotrowski [Mon, 18 Sep 2023 18:40:23 +0000 (19:40 +0100)]
daemon.8: Sort options in DESCRIPTION

MFC after: 3 days

(cherry picked from commit ee23e1e49666e2c6edd0e5d749d3562587dcb9a7)

9 months agodaemon.8: Use Cm where appropriate
Mateusz Piotrowski [Mon, 18 Sep 2023 18:36:33 +0000 (19:36 +0100)]
daemon.8: Use Cm where appropriate

MFC after: 3 days

(cherry picked from commit a5bc8e8a5863c4aea5ed7ebe2ebc2332c287545c)

9 months agodaemon.8: Use Dv for signal names
Mateusz Piotrowski [Mon, 18 Sep 2023 18:28:27 +0000 (19:28 +0100)]
daemon.8: Use Dv for signal names

MFC after: 3 days

(cherry picked from commit 735637f7d68777d0befa4b9a9291f3fc02b5ed00)

9 months agobsdinstall.8: Document BSDINSTALL_SKIP_* variables
Mateusz Piotrowski [Mon, 18 Sep 2023 18:11:30 +0000 (19:11 +0100)]
bsdinstall.8: Document BSDINSTALL_SKIP_* variables

Fixes: 17f4ded55180 bsdinstall: add variables to allow skipping
MFC after: 3 days

(cherry picked from commit fea2cffb8659da1590401e04ce8cbf823c9da66c)

9 months agobsdinstall.8: Set Bl's -width correctly
Mateusz Piotrowski [Mon, 18 Sep 2023 17:49:57 +0000 (18:49 +0100)]
bsdinstall.8: Set Bl's -width correctly

MFC after: 3 days

(cherry picked from commit a8f5c9d3305feb8e846e2ebb6511e350c2702eca)

9 months agolibfido2: update to 1.13.0
Ed Maste [Tue, 19 Sep 2023 17:06:12 +0000 (13:06 -0400)]
libfido2: update to 1.13.0

Some highlights from NEWS entries:

 ** Improved OpenSSL 3.0 compatibility.
 ** Support for hidraw(4) on FreeBSD; gh#597.
 ** Improved support for FIDO 2.1 authenticators.

PR: 273596
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e)
(cherry picked from commit 5bfbde817cdedbd7309c38a361cd1211bdcdd70e)

9 months agolibfido2: backport hidraw(4) support
Ed Maste [Tue, 19 Sep 2023 16:50:13 +0000 (12:50 -0400)]
libfido2: backport hidraw(4) support

PR: 273596
Submitted by: David Horn
Obtained from: libfido2 2c9dfaae2a56930160388700

(cherry picked from commit 1843dfb05ed80149f5a412180af882e3cb8f451b)
(cherry picked from commit 3df74eecfdecbafe55838b45141c275754d526bb)

9 months agoFix zfsd with the device_removal pool feature.
Alan Somers [Tue, 12 Sep 2023 01:20:39 +0000 (19:20 -0600)]
Fix zfsd with the device_removal pool feature.

Previously zfsd would crash in the presence of a pool with a
top-level-vdev that had previously been removed.  The crash happened
because the configuration nvlist of such a TLV contains an empty
ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty
list, which has undefined behavior.

The crash only happened in stable/14 and later, probably do to
differences in libcxx, but the change should be MFCed anyway.

PR: 273663
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Sponsored by: Axcient
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D41818

(cherry picked from commit 0b294a386d34f6584848ed52407687df7ae59861)

9 months agoswapon.2: correct FreeBSD release that introduced swapoff
Ed Maste [Mon, 18 Sep 2023 09:01:38 +0000 (10:01 +0100)]
swapon.2: correct FreeBSD release that introduced swapoff

It was introduced in 92da00bb245b, after 5.0 and beforen 5.1.  Reported
in https://github.com/ziglang/zig/issues/16590.

(cherry picked from commit b15f6400376a90d3b00aa3ac00666f683f975376)
(cherry picked from commit f4bb052a789eae8ddcbfa7a9c00bc781b54e13c4)

9 months agofreebsd-update: do not restart sshd when updating jail/basedir
Ed Maste [Sat, 16 Sep 2023 20:46:16 +0000 (21:46 +0100)]
freebsd-update: do not restart sshd when updating jail/basedir

In 6cd1bc531609 for PR 263489 I changed freebsd-update to restart sshd
after upgrade, to avoid an upgrade-related incompatibility that made it
impossible to login.

This is intended to avoid losing access to remote hosts, and ought not
apply to upgrading jails (from outside).

PR: 263489, 272282
Reported by: otis
Reviewed by: otis, kevans
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Fixes: 6cd1bc531609 ("freebsd-update: restart sshd after upgrade")
Differential Revision: https://reviews.freebsd.org/D41890

(cherry picked from commit 8ee97b1928e75f7f81a870ffb063010778e0a129)
(cherry picked from commit cce342e21357833892083e865710c4a05603b7b5)

9 months agolibc: use separate collate objects for C, POSIX, and C.UTF-8
Yuri Pankov [Tue, 28 Mar 2023 15:10:47 +0000 (17:10 +0200)]
libc: use separate collate objects for C, POSIX, and C.UTF-8

Fix newlocale() overwriting the locale name in collate object
when same instance was used for those locales, and querylocale()
reporting unexpected value for LC_COLLATE_MASK.

PR: 255646, 269375
Reviewed by: markj, bapt (previous version)
Differential Revision: https://reviews.freebsd.org/D30146

(cherry picked from commit 269dea90d6eb32690730b0f6a17fb41170483104)

9 months agonet: Check per-flow priority code point for untagged traffic
Zhenlei Huang [Wed, 6 Sep 2023 10:15:14 +0000 (18:15 +0800)]
net: Check per-flow priority code point for untagged traffic

Commit 868aabb4708d introduced per-flow priority. There's a defect in the
logic for untagged traffic, it does not check M_VLANTAG set in the mbuf
packet header or MTAG_8021Q/MTAG_8021Q_PCP_OUT tag set by firewall, then
can result missing desired priority in the outbound packets.

For mbuf packet with M_VLANTAG in header, some interfaces happen to work
due to bug in the drivers mentioned in D39499. As modern interfaces have
VLAN hardware offloading, the defect is barely noticeable unless the
feature per-flow priority is widely tested.

As a side effect of this defect, the soft padding to work around buggy
bridges is bypassed. That may result in regression if soft padding is
requested.

PR: 273431
Discussed with: kib
Fixes: 868aabb4708d Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39536

(cherry picked from commit 49d6743da15fe378782e43776df8b4fd4f84c8d0)
(cherry picked from commit c750055382f73db964c20f8eba855a9ac9e19591)

9 months agoFix geom build with clang 17 and KTR enabled
Dimitry Andric [Tue, 12 Sep 2023 06:52:31 +0000 (08:52 +0200)]
Fix geom build with clang 17 and KTR enabled

When building a kernel with clang 17 and KTR enabled, such as with the
LINT configurations, a -Werror warning is emitted:

    sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand]
      145 |         if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
          |             ~~~~~~~~~~~~~~~~~~~~~~~~ ^
    sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation
      145 |         if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
          |                                      ^~
          |                                      &
    sys/geom/geom_io.c:145:31: note: remove constant to silence this warning

Replace the multiple uses of the expression with one macro, and in this
macro use "!= 0" to get a logical operand instead of a bitwise one.

Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41823

(cherry picked from commit 479d224efcbf0115f8cd84314fcc46cbac146a1d)

9 months agortld: output rtld errors into the dbg channel
Konstantin Belousov [Fri, 15 Sep 2023 19:26:50 +0000 (22:26 +0300)]
rtld: output rtld errors into the dbg channel

(cherry picked from commit 72d97e1dd9cc72a2acb96e35e56db6f3f51bca7d)

9 months agosysctl(9): Fix typo translatation -> translation
Damien Broka [Mon, 11 Sep 2023 11:15:18 +0000 (12:15 +0100)]
sysctl(9): Fix typo translatation -> translation

MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/839

(cherry picked from commit ff9c4abd9feaf13cf911f4655234da7a62d0c7af)

9 months agousbdi(9): Fix typo to simply -> to simplify
Damien Broka [Mon, 11 Sep 2023 11:12:27 +0000 (12:12 +0100)]
usbdi(9): Fix typo to simply -> to simplify

MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/839

(cherry picked from commit 06bac0da1314907b8de37bbad559777ab418e811)

9 months agonet/bpf: Fix writing of buffer bigger than PAGESIZE
Florian Florensa [Sun, 17 Sep 2023 14:16:07 +0000 (08:16 -0600)]
net/bpf: Fix writing of buffer bigger than PAGESIZE

When allocating the mbuf we used m_get2 which fails
if len is superior to MJUMPAGESIZE, if its the case,
use m_getjcl instead.

Reviewed by: kp@
PR: 205164
Pull Request: https://github.com/freebsd/freebsd-src/pull/131

(cherry picked from commit f13da24715a75ce0fdac31062866877d980aa908)

9 months agomsi: handle error from BUS_REMAP_INTR in msi_assign_cpu
Ed Maste [Mon, 14 Aug 2023 16:56:12 +0000 (12:56 -0400)]
msi: handle error from BUS_REMAP_INTR in msi_assign_cpu

Previously errors from BUS_REMAP_INTR were silently ignored, and we
ended up with non-functional interrupts.

Now we allocate and enable new vectors, but postpone assignment of new
APIC IDs and vectors where we can, until after BUS_REMAP_INTR is
successful.  We then disable and free the old vectors.

If BUS_REMAP_INTR fails we restore the old configuration, and disable
and free the new, unused vectors.

Thanks to AMD for providing hardware (with APIC IDs above 255) for
testing.

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

(cherry picked from commit fa5f94140a83b4704c654ababd67cd9addb7cd29)

9 months agoshmfd: hide direct rangelock(9) use under a wrapper
Konstantin Belousov [Fri, 18 Aug 2023 12:38:28 +0000 (15:38 +0300)]
shmfd: hide direct rangelock(9) use under a wrapper

(cherry picked from commit 6df6facf44f952f64753bee00831fd93f16c99a9)

9 months agomkfile: getopt() returns an int, not a char.
Dag-Erling Smørgrav [Sun, 10 Sep 2023 18:33:18 +0000 (18:33 +0000)]
mkfile: getopt() returns an int, not a char.

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

(cherry picked from commit ef8abddf103d9dfd5660d50d15e6dbfbb2f47f62)

9 months agogrep: Suppress EISDIR when reading.
Dag-Erling Smørgrav [Fri, 8 Sep 2023 18:17:41 +0000 (18:17 +0000)]
grep: Suppress EISDIR when reading.

MFC after: 1 week
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Reviewed by: kevans

(cherry picked from commit caf5283fc92edb83173752b1dafbc6d586e78815)

9 months agotime.h: Fix visibility check for C11 and C23 features.
Dag-Erling Smørgrav [Wed, 6 Sep 2023 01:37:43 +0000 (03:37 +0200)]
time.h: Fix visibility check for C11 and C23 features.

__BSD_VISIBLE is always defined; we need to check if it's true.

Fixes: d02489d11aed 9b5d724cad10
MFC after: 3 days
Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D41733

(cherry picked from commit 8091b82e291642f3034dc3fdc8689a4f4ba027da)

9 months agosplit: Add missing test cases.
Dag-Erling Smørgrav [Wed, 6 Sep 2023 03:28:19 +0000 (03:28 +0000)]
split: Add missing test cases.

This adds test cases for c4f7198f47c1 and ac17fc816e67.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41755

(cherry picked from commit cbea5eddb1b6ae2a101beacf00bf165517f4f2b1)

split: Code cleanup.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41756

(cherry picked from commit 851bf856d1a7ad5427ea9c22639ab6f6c4a3f503)

split: Fix linecount parsing.

The “undocumented kludge” which unfortunately can't be dropped for backward compatibility reasons was prone to segfaulting and would improperly allow a new linecount when one was already set.  Fix these issues and add regression tests.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41757

(cherry picked from commit 117c54a78ccd214c236806721f21da750e512d3e)

9 months agoMark usage function as __dead2 in programs where it does not return
Alfonso Gregory [Fri, 7 Jul 2023 16:39:23 +0000 (10:39 -0600)]
Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735

(cherry picked from commit cccdaf507eee8fb34494b4624eb85bb951e323c8)

9 months agosplit(1): auto-extend suffix length if required
Jan Schaumann [Tue, 30 May 2023 12:55:38 +0000 (15:55 +0300)]
split(1): auto-extend suffix length if required

If the input cannot be split into the number of files resulting from the
default suffix length, automatically extend the suffix length rather
than bailing out with 'too many files'.

Suffixes are extended such that the resulting files continue to sort
lexically and "cat *" would reproduce the input. For example, splitting
a 1M lines file into (default) 1000 lines per file would yield files
named 'xaa', 'xab', ..., 'xyy', 'xyz', 'xzaaa', 'xzaab', ..., 'xzanl'.

If '-a' is specified, the suffix length is not auto-extended.

This behavior matches GNU sort(1) since around version 8.16.

Reviewed by: christos
Approved by: kevans
Different Revision: https://reviews.freebsd.org/D38279

(cherry picked from commit c4f7198f47c15eece849d06e8fdd1fb46ed43bba)

split(1): add '-c' to continue creating files

Currently, split(1) will clobber any existing output files:

$ split file; ls
xaa xab xac xad
$ split second-file; ls
xaa xab xac xad xae xaf

This patch adds a flag "-c" (mnemonic "create, don't overwrite" or
"continue where you left off"):

$ split file; ls
xaa xab xac xad
$ split -c second-file; ls
xaa xab xac xad xae xaf xag xah xai xaj

Reviewed by: christos
Approved by: kevans
Different Revision: https://reviews.freebsd.org/D38553

(cherry picked from commit ac17fc816e67a4e5e2e481b5001577a8d589f8b6)

9 months agosplit: Update synopsis and usage; fix examples
Mateusz Piotrowski [Fri, 14 Apr 2023 11:50:13 +0000 (13:50 +0200)]
split: Update synopsis and usage; fix examples

- Mark -d as an optional flag
- Add a prompt to one of the examples for consistency
- Add -d to the usage message

Sponsored by: Klara Inc.

(cherry picked from commit fb499259997c0bfd724b7b67578035cd977ef60f)

9 months agoiostat: getopt() / usage() cleanup.
Dag-Erling Smørgrav [Tue, 29 Aug 2023 17:23:23 +0000 (17:23 +0000)]
iostat: getopt() / usage() cleanup.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D41636

(cherry picked from commit 09c45b089d2f90ec04153a1b4621dd6bec142959)

9 months agolibipf: fix parser error message.
Dag-Erling Smørgrav [Thu, 31 Aug 2023 20:15:54 +0000 (22:15 +0200)]
libipf: fix parser error message.

MFC after: 1 week
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D41652

(cherry picked from commit 4cd9d804ae8b955d47dfa0bba06e7c254d760cb1)

9 months agoMFC: unbreak BEGEMOT-LM75-MIB.txt
Eugene Grosbein [Thu, 31 Aug 2023 02:47:57 +0000 (09:47 +0700)]
MFC: unbreak BEGEMOT-LM75-MIB.txt

The MIB has several bugs making it unusable. Fix it.

Reported-by: Eugene M. Zheganin <eugene@zhegan.in>

(cherry picked from commit 872e89405684eac984e9004bdfeeb540e818ed74)

9 months agoblackhole(4): disable for locally originated TCP/UDP packets
Gleb Smirnoff [Thu, 28 Oct 2021 15:11:45 +0000 (08:11 -0700)]
blackhole(4): disable for locally originated TCP/UDP packets

In most cases blackholing for locally originated packets is undesired,
leads to different kind of lags and delays. Provide sysctls to enforce
it, e.g. for debugging purposes.

Reviewed by: rrs
Differential revision: https://reviews.freebsd.org/D32718

(cherry picked from commit 3ea9a7cf7b09a355cde3a76824809402b99d0892)
(cherry picked from commit ad3ad06477d013371b95af673a9776c62f49a97f)

9 months agoftpd: add deprecation notice
Ed Maste [Sat, 9 Sep 2023 17:34:14 +0000 (13:34 -0400)]
ftpd: add deprecation notice

Approved by: gordon
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26447

(cherry picked from commit 98b98ec1bc7e961c3d3468b0e481080580c902cf)
(cherry picked from commit cc9347cc79d320cac00ccf5d5f23971de2c887a1)
(cherry picked from commit 01d82151022cb1383e83c331708a787f1907b00f)
(cherry picked from commit 3ea83e94cdfa34745641dfa5f43debfdcd79e229)

9 months agoahci: add AMD device id in RAID mode
Andrey V. Elsukov [Mon, 4 Sep 2023 12:33:49 +0000 (15:33 +0300)]
ahci: add AMD device id in RAID mode

Found on Asus ROX Strix X570-F Gaming.

MFC after: 1 week

(cherry picked from commit 3afe6b525386af1dda7791ea2a9d718fa634d4fd)

9 months agomountd: do not warn about using class mask with -mask
Mike Karels [Fri, 8 Sep 2023 14:06:42 +0000 (09:06 -0500)]
mountd: do not warn about using class mask with -mask

The previous code would warn that the mask was being defaulted to
an obsolete class mask even if -mask was present after -network.
Import a fix from Peter Much with a little tweaking, deferring the
warning until after all parameters are processed.

PR: 263011
Obtained from: pmc at citilink.dinoex.sub.org
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D41774

(cherry picked from commit 48514c5724cdf3338dd6d220e5deee6178d7ee48)

9 months agogetdirentries.2: Reference dir(5)
Mateusz Piotrowski [Tue, 5 Sep 2023 13:48:57 +0000 (15:48 +0200)]
getdirentries.2: Reference dir(5)

As a note, parts of manual pages getdirentries(2) and dir(5) should
probably be consolidated.

MFC after: 3 days

(cherry picked from commit 5b7a776f481891f10820a0b4838d0e0feb60b8ad)

9 months agogetdirentries.2: Improve readability of dirent members
Mateusz Piotrowski [Tue, 5 Sep 2023 13:41:47 +0000 (15:41 +0200)]
getdirentries.2: Improve readability of dirent members

MFC after: 3 days

(cherry picked from commit 52d374a067002fc42409b32059ec8b8506a70429)

9 months agogetdirentries.2: Reference directory(3)
Mateusz Piotrowski [Tue, 5 Sep 2023 09:37:14 +0000 (11:37 +0200)]
getdirentries.2: Reference directory(3)

MFC after: 3 days

(cherry picked from commit 3a02df5e27d2eeabffd761ff5cb79496a6d796ea)

9 months agohwpmc_armv7: plug memory leak
Mitchell Horne [Thu, 3 Aug 2023 14:10:26 +0000 (11:10 -0300)]
hwpmc_armv7: plug memory leak

Free allocated per-CPU structures in the pcpu_fini and finalize methods.

While here, add debug trace entries to these methods.

Reviewed by: jkoshy, andrew
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41269

(cherry picked from commit 9c0a2d522f3a18fc795a7dd6266d2be2aff4b084)

9 months agohwpmc_arm64: plug memory leak
Mitchell Horne [Thu, 3 Aug 2023 14:09:48 +0000 (11:09 -0300)]
hwpmc_arm64: plug memory leak

Free allocated per-CPU structures in the pcpu_fini and finalize methods.

While here, add debug trace entries to these methods.

Reviewed by: jkoshy, andrew
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41268

(cherry picked from commit 8bdceaecabd91ce5ed23646d91cef878681e19d6)

9 months agointro(9): rewrite from scratch
Mitchell Horne [Thu, 3 Aug 2023 13:48:15 +0000 (10:48 -0300)]
intro(9): rewrite from scratch

This page has existed as a placeholder since its creation in 1995. It
does not provide a useful introduction to the content in this section.

Reimagine it as a top-level overview page containing brief descriptions
and links to existing pages in section 9. It is roughly organized into
sub-sections, grouped by topic or subsystem. In other words, the page is
meant to function as a map to other content.

There is a balance to be found here between providing as many links as
possible and keeping the page concise and searchable. In general the aim
is to reference pages which provide the best entry point to a particular
topic. For example, a link is given to locking(9), but not to the
specific lock pages such as mutex(9) or rwlock(9).

NetBSD has done something similar with their intro(9), so some
inspiration has been taken from there, although their content doesn't
align that closely with what we have.

I have done a thorough review of our existing pages and formed these
subsections around them, but they are meant to evolve.

PR: 270481
Reviewed by: imp, emaste
MFC after: 3 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41104

(cherry picked from commit 84f9f2c5cf7841fffc03ccb1833814892ae15132)

9 months agosys/README.md: Add a section for documentation
Mitchell Horne [Thu, 3 Aug 2023 13:48:17 +0000 (10:48 -0300)]
sys/README.md: Add a section for documentation

Add web links to intro(9) and the Architecture Handbook.

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

(cherry picked from commit 32e47f62724e6cce2df0bc69d6ceba2d058d3585)

9 months agog_bio(9): add link to bio(9)
Mitchell Horne [Thu, 3 Aug 2023 13:48:11 +0000 (10:48 -0300)]
g_bio(9): add link to bio(9)

This page documents 'struct bio', so this can be helpful with finding or
referencing it.

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

(cherry picked from commit d441ec1c218991421d08ac4661878ed5c182cd64)

9 months agovmxnet3: do restart on VLAN changes
Kevin Bowling [Thu, 24 Aug 2023 20:25:21 +0000 (13:25 -0700)]
vmxnet3: do restart on VLAN changes

vmxnet3: Don't restart on VLAN changes

In rS360398, a new iflib device method was added with default of opt out
for VLAN events needing an interface reset.

This re-init is unintentional for vmxnet3(4).

Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D41558

(cherry picked from commit b6b75424c57d6da49967fef39f69080ce6939207)

vmxnet3: do restart on VLAN changes

At least one user reports issues with vmx interfaces after 725e4008ef,
where we default to not resetting the interface on VLAN changes. This
was on an ESXi 7.0.3 setup.

Reported by: Marcos Mendoza <mmendoza@netgate.com>
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 8c1274138a20ee2342c4f217adb605e3abc14042)

9 months agoiflib: invert default restart on VLAN changes
Kevin Bowling [Thu, 24 Aug 2023 20:42:23 +0000 (13:42 -0700)]
iflib: invert default restart on VLAN changes

In rS360398, a new iflib device method was added to opt out of VLAN
events needing an interface reset.

I am switching the default to not requiring a restart for:
* VLAN events
* unknown events

After fixing various bugs, I do not think this would be a common need
of hardware and it is undesirable from the user's perspective causing
link flaps and much slower VLAN configuration. Currently, there are no
other restart events besides VLAN events, and setting the
ifdi_needs_restart default to false will alleviate the need to churn
every driver if an odd event is added in the future for specific
hardware.

markj points out this could cause churn in the other direction; I will
solve that problem with an event registration system as he mentions in
the review should we need it in the future.

These drivers will opt into restart and need further inspection or work:
* ixv (needs code audit, 61a8231 fixed principal issue; re-init probably
not necessary)
* axgbe (needs code audit; re-init probably not necessary)
* iavf - (needs code audit; interaction with Malicious Driver Detection
mentioned in rS360398)
* mgb - no VLAN functions are currently implemented. Left a comment.

Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41558

(cherry picked from commit 725e4008efef32dfbe57b3e21635fa80dde8ee38)

9 months agoice: Don't restart on VLAN changes
Kevin Bowling [Thu, 24 Aug 2023 20:40:35 +0000 (13:40 -0700)]
ice: Don't restart on VLAN changes

In rS360398, a new iflib device method was added with default of opt out
for VLAN events needing an interface reset.

This re-init is unnecessary for ice(4).

Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41558

(cherry picked from commit 14a14e36aee2e6b848c239ac29090ad4cb66fbf7)

9 months agoiavf: Add explicit ifdi_needs_reset for VLAN changes
Kevin Bowling [Thu, 24 Aug 2023 20:36:00 +0000 (13:36 -0700)]
iavf: Add explicit ifdi_needs_reset for VLAN changes

In rS360398, a new iflib device method was added with default of opt out
for VLAN events needing an interface reset.

iavf(4) was the original need for this, because VLAN filter changes
currently have negative interactions with Malicious Driver Detection.

Add iavf_if_needs_restart and explicitly enable VLAN re-init.

Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41558

(cherry picked from commit 1d6c12c511ae2a394d3ca1998a10f3d3bd25d313)

9 months agobnxt: Don't restart on VLAN changes
Kevin Bowling [Thu, 24 Aug 2023 20:16:24 +0000 (13:16 -0700)]
bnxt: Don't restart on VLAN changes

In rS360398, a new iflib device method was added with default of opt out
for VLAN events needing an interface reset.

This is unintentional for bnxt(4) and is causing another bug in its VLAN
initialization code to affect the common case of adding and removing
VLANs on an existing interface.

PR: 269133
Tested by: kp
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41558

(cherry picked from commit bce864d1c274faeb6678028aad1e07e91fe430ac)

9 months agostand: lua: module names should permit more
Kyle Evans [Tue, 5 Sep 2023 02:21:34 +0000 (21:21 -0500)]
stand: lua: module names should permit more

The module entries should generally allow whatever is allowed as an
env_var in the pattern table.  Notably, we're missing periods which
would allow proper entries for .dtb files in loader.conf that don't need
to specify a module_name entry for it.

%d in this expression is actually redundant as %w is actually
"all alphanumerics," but I've included it for now to match the env_var
entry.  We should really remove it from both.

Reported by: "aribi" on the forums via allanjude@

(cherry picked from commit 5bc1e0c2285e73fe8455bb6c72b2b40e33f5477e)

9 months agocaroot: update the root bundle and regenerate with OpenSSL 3
Kyle Evans [Sat, 26 Aug 2023 01:01:47 +0000 (20:01 -0500)]
caroot: update the root bundle and regenerate with OpenSSL 3

Summary:
- Six (6) new roots
- Four (4) distrusted roots

Note that this was intentionally generated with OpenSSL 1.1.1 to avoid
mixing updates and non-functional changes -- there will be some churn
with OpenSSL 3.  The next commit will update the current batch of
trusted certs with the format OpenSSL 3 produces, which I've tested
against OpenSSL 1.1.1 to be sure that that doesn't hurt us in older
branches.

This MFC also regenerates all of the trusted certs with OpenSSL 3 to
reduce the diff of future ENs -- this update has no existing certs
modified, so it's the perfect time.

(cherry picked from commit 65fd80909e196c8be2ce5e948775e9cbda2ef069)
(cherry picked from commit 8ed0ecf8024d10e9cd21f5880723a6cec4fd4ae6)

9 months agocaroot: drop the VERSION tag from already-processed certs
Kyle Evans [Sat, 26 Aug 2023 00:55:32 +0000 (19:55 -0500)]
caroot: drop the VERSION tag from already-processed certs

An update is imminent; drop these now to make it easier to audit the
results.

(cherry picked from commit 3f84d4b0fe1445bca5f3b6a70fc5641b88c31217)

9 months agocaroot: drop VERSION tags from certs
Kyle Evans [Sat, 26 Aug 2023 00:55:32 +0000 (19:55 -0500)]
caroot: drop VERSION tags from certs

With this change, we'll drop the "with $FreeBSD$" lines from trusted/
certs in the next update. untrusted/ will need to be done manually, but
I'll likely just do them all manually, commit, then run the script and
commit any legitimate updates after confirming the output matches what
I did manually.

Reported by: imp
Reviewed by: imp

(cherry picked from commit bbc8585ef557be36b3fda75e3a41d725aedb1c1e)

9 months agoMerge commit 4bb2416d42eb from llvm-project (by Jessica Clarke):
Jessica Clarke [Mon, 4 Sep 2023 08:33:27 +0000 (09:33 +0100)]
Merge commit 4bb2416d42eb from llvm-project (by Jessica Clarke):

  [builtins][AArch64] Implement _sync out-of-line atomics

  Whilst Clang does not use these, recent GCC does, and so on systems such
  as FreeBSD that wish to use compiler-rt as the system runtime library
  but also wish to support building programs with GCC these interfaces are
  needed.

  This is a light adaptation of the code committed to GCC by Sebastian Pop
  <spop@amazon.com>, relicensed with permission for use in compiler-rt.

  Fixes https://github.com/llvm/llvm-project/issues/63483

  Reviewed By: sebpop, MaskRay

  Differential Revision: https://reviews.llvm.org/D158536

Reviewed by: dim
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41716

(cherry picked from commit 8524dc53fd4c6b79d75b82cb82f3ac72fc25e85f)

9 months agouefi(8): Refer to a related manual page
Tom Hukins [Thu, 31 Aug 2023 09:21:40 +0000 (10:21 +0100)]
uefi(8): Refer to a related manual page

PR: 265834
Reviewed by: mhorne
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39577

(cherry picked from commit f49d6f583e9df2839b420f27c44edc5c1fa276c6)

9 months agoOpenSSL: Regen manual pages for OpenSSL 1.1.1w
Jung-uk Kim [Mon, 11 Sep 2023 17:16:21 +0000 (13:16 -0400)]
OpenSSL: Regen manual pages for OpenSSL 1.1.1w

9 months agoOpenSSL: Merge OpenSSL 1.1.1w
Jung-uk Kim [Mon, 11 Sep 2023 16:50:12 +0000 (12:50 -0400)]
OpenSSL: Merge OpenSSL 1.1.1w

(cherry picked from commit a1860b94f62494288804faebb1bf6ea8110ca148)

9 months agolibarchive: merge security fix from vendor branch
Martin Matuska [Thu, 7 Sep 2023 15:18:12 +0000 (17:18 +0200)]
libarchive: merge security fix from vendor branch

This commit fixes a couple of security vulnerabilities in the PAX writer:
1. Heap overflow in url_encode() in archive_write_set_format_pax.c
2. NULL dereference in archive_write_pax_header_xattrs()
3. Another NULL dereference in archive_write_pax_header_xattrs()
4. NULL dereference in archive_write_pax_header_xattr()

Security: No known reference yet
Obtained from: https://github.com/libarchive/libarchive/commit/1b4e0d0f9

(cherry picked from commit f10f65999fe56e92f00b5bc5d27ac342cfea5364)

9 months agorelease: remove inet blackhole sysctls from GCE config
Ed Maste [Wed, 6 Sep 2023 00:03:25 +0000 (20:03 -0400)]
release: remove inet blackhole sysctls from GCE config

Other cloud images do not do this, and it can produce confusing results.

Reviewed by: Jose Luis Duran, delphij
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41751

(cherry picked from commit b7528b16c6039a9f0af28f8f3ccdd6ea4eb7e604)
(cherry picked from commit 5623352ec00532193e9cd44332814f8d482422e4)

9 months ago__crt_aligned_alloc_offset(): fix ov_index for backing allocation address
Konstantin Belousov [Wed, 6 Sep 2023 13:50:27 +0000 (16:50 +0300)]
__crt_aligned_alloc_offset(): fix ov_index for backing allocation address

(cherry picked from commit 03a7c36ddbc0ddb1063d2c8a37c64d83e1519c55)

9 months agokthread_add(): do not allow to attach the thread to a dead or dying process
Konstantin Belousov [Tue, 5 Sep 2023 10:54:36 +0000 (13:54 +0300)]
kthread_add(): do not allow to attach the thread to a dead or dying process

(cherry picked from commit 96362992330894787a4485f0adc5e867879c5893)

9 months agokern_kthread: fork1() does not handle locked Giant
Konstantin Belousov [Sat, 2 Sep 2023 07:16:48 +0000 (10:16 +0300)]
kern_kthread: fork1() does not handle locked Giant

(cherry picked from commit 525bc87f54f288793a95abbcd0a845efddb8c41b)

9 months agokern_kthread.c: some style
Konstantin Belousov [Sat, 2 Sep 2023 07:05:49 +0000 (10:05 +0300)]
kern_kthread.c: some style

(cherry picked from commit ea70866bb15dd707c1a6a729c44e5ae611c83dd1)

9 months agoarcmsr(4): Fix typo: rebulid -> rebuild
Mustafa Ateş Uzun [Thu, 17 Aug 2023 13:45:14 +0000 (16:45 +0300)]
arcmsr(4): Fix typo: rebulid -> rebuild

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

(cherry picked from commit 2f7e72bd1c024e1e8274acbe1ce57514fd444583)

9 months agoscandir.3: Fix several typos
Trond Endrestøl [Fri, 1 Sep 2023 20:48:16 +0000 (16:48 -0400)]
scandir.3: Fix several typos

PR: 273480
Reviewed by: markj
MFC after: 1 week

(cherry picked from commit b7000cadfbf312b6a8acff6b7a3bbbbe55509565)