]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 months agohwpmc: remove remaining UCP event definitions
Mitchell Horne [Fri, 5 May 2023 21:56:34 +0000 (18:56 -0300)]
hwpmc: remove remaining UCP event definitions

Although this block has remained in __PMC_EVENTS(), there is no handling
of UCP in libpmc/libpmc.c, so it is not possible to select one of these
events. It should therefore be impossible to trigger the code removed
from ucp_start_pmc(). Note that the GQ_SNOOP_MSF MSR exists only for
Nehalem and Westmere architectures, and the related events do not exist
for later generations.

The Uncore support in hwpmc has severely atrophied in general. We have
uncore event definitions in pmu-events, but the kernel support was
written against Intel Performance Measurement Architecture version 2,
and is disabled for processor generations later than Westmere. Nehalem
and Westmere lack uncore event definitions in pmu-events. I'd be
surprised if Uncore support is usable on any machine in its current
state.

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

(cherry picked from commit d71a439020721a9abea5c353b9e03b5dc29d253e)

14 months agohwpmc: drop vestigial IAP event definitions
Mitchell Horne [Fri, 5 May 2023 21:55:54 +0000 (18:55 -0300)]
hwpmc: drop vestigial IAP event definitions

These are maintained elsewhere. No functional change.

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

(cherry picked from commit 1be8ef26794dcf93e2f4851474808dc3b34dbcbd)

14 months agoprintf(9): clarify the description of %b
Mitchell Horne [Tue, 25 Apr 2023 20:26:36 +0000 (17:26 -0300)]
printf(9): clarify the description of %b

The bit values are numbers given in octal representation, not decimal,
as one might assume from the description. Same goes for the base,
although this has an example.

Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39815

(cherry picked from commit 82bc33d5ad2e00179ea7026c496a35b00550da15)

14 months agoarm64/disassem.c: Fix typo sxts to sxts and amount for TYPE_02
Mykola Hohsadze [Tue, 18 Apr 2023 15:50:58 +0000 (12:50 -0300)]
arm64/disassem.c: Fix typo sxts to sxts and amount for TYPE_02

The current implementation is wrong, since it unconditionally sets the
amount equal to the <size> field of the instruction. However, when the
<S> bit (scale) is not set, it must be zero.

Also fix a typo, sxts to sxtx, according to the Arm64 documentation.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39334

(cherry picked from commit cb923f03faa068f0c8ed5ffa7c3485ad7918be10)

14 months agoarm64/disassem.c: Add support str/strb/strh instructions
Mykola Hohsadze [Tue, 18 Apr 2023 15:51:15 +0000 (12:51 -0300)]
arm64/disassem.c: Add support str/strb/strh instructions

Added disassembly support for each type of str/strb/strh instruction
encoding.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39336

(cherry picked from commit 7edb7adf8c8b0615c6d845ca789d4f527f8b18a3)

14 months agoarm64/disassem.c: style and formatting
Mykola Hohsadze [Tue, 18 Apr 2023 15:50:33 +0000 (12:50 -0300)]
arm64/disassem.c: style and formatting

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38899

(cherry picked from commit 5b61ad4b005d73b497537fcb41e3557314d18ddd)

14 months agotop: Use a cpuset_t to represent a CPU mask
Mark Johnston [Fri, 26 May 2023 19:14:21 +0000 (15:14 -0400)]
top: Use a cpuset_t to represent a CPU mask

The code attempts to detect holes in the CPU ID space, but previously
this would only work for up to sizeof(long)*8 CPUs.

MFC after: 2 weeks

(cherry picked from commit e96ed177465ee59fcc43dd0696106e5342e28c27)

14 months agoktrace: Make sys/ktrace.h self-contained
Mark Johnston [Thu, 1 Jun 2023 21:10:44 +0000 (17:10 -0400)]
ktrace: Make sys/ktrace.h self-contained

MFC after: 2 weeks

(cherry picked from commit c8a383396888d897d057088d7f84fb57de40807e)

14 months agosysarch: Add includes required for ktrcapfail() calls to be compiled
Mark Johnston [Thu, 1 Jun 2023 21:13:09 +0000 (17:13 -0400)]
sysarch: Add includes required for ktrcapfail() calls to be compiled

Reported by: jfree
MFC after: 1 week

(cherry picked from commit 18282c4772fb68a0e076d17f30de9749190542f4)

14 months agox86: Mark the CPU idle function table as const
Mark Johnston [Fri, 2 Jun 2023 17:22:32 +0000 (13:22 -0400)]
x86: Mark the CPU idle function table as const

No functional change intended.

MFC after: 1 week

(cherry picked from commit 7266f5249848512b99d4dc78256af148f9df986e)

14 months agoipsec: Make algorithm tables read-only
Mark Johnston [Fri, 2 Jun 2023 17:22:56 +0000 (13:22 -0400)]
ipsec: Make algorithm tables read-only

No functional change intended.

MFC after: 1 week

(cherry picked from commit 056305d3aa2bdb93e57c7a3d369e5742b1b404b8)

14 months agontp: import ntp-4.2.8p17
Cy Schubert [Tue, 6 Jun 2023 12:43:04 +0000 (05:43 -0700)]
ntp: import ntp-4.2.8p17

Fixes two small bugs including one regression.

Merge commit 'ab1f1aa8333369a83ff284848fc3fc2e52d5f29f'

(cherry picked from commit e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)

ntp: Fix build

Two files used to obtain time from reference clocks did not include
ntp_types.h resulting in an undefined NONEMPTY_TRANSLATION_UNIT.

Fixes: e6bfd18d21b2

(cherry picked from commit 82aa1470c94c55db31c0168d65f8a08fa1d41378)

14 months agousr.bin/bc: fix build issue of version 6.6.0 on MIPS
Stefan Eßer [Thu, 8 Jun 2023 14:45:11 +0000 (16:45 +0200)]
usr.bin/bc: fix build issue of version 6.6.0 on MIPS

The update removed MIPS and POWERPC64 from the list of architectures
that cannot use LTO to build this software.

Restore the previous exception list and do not use LTO on MIPS,
MIPS64, POWERPC64, and RISCV64. This is necessary due to differences
in compiler support for LTO in -CURRENT vs. 13-STABLE.

14 months agosignal: Make the signal disposition table const
Mark Johnston [Thu, 1 Jun 2023 21:11:55 +0000 (17:11 -0400)]
signal: Make the signal disposition table const

No functional change intended.

MFC after: 1 week

(cherry picked from commit 0d3f1b4f25150c3c5afaa669715421821323ead1)

14 months agoktrace: Make the data lengths table const
Mark Johnston [Thu, 1 Jun 2023 21:12:42 +0000 (17:12 -0400)]
ktrace: Make the data lengths table const

No functional change intended.

MFC after: 1 week

(cherry picked from commit 3080f82b8b644809d8731c4f5c72f1530c400eb3)

14 months agovendor/bc: import version 6.3.1
Stefan Eßer [Fri, 24 Feb 2023 22:14:58 +0000 (23:14 +0100)]
vendor/bc: import version 6.3.1

This version adds a command to dc to query whether extended registers
are enabled or not.

(cherry picked from commit 103d7cdfb7435591049413e1bc39482cb316efb7)

contrib/bc: import version 6.5.0

This release that fixes an infinite loop bug in the (non-standard)
extended math library functions root() and cbrt(), fixes a bug with
BC_LINE_LENGTH=0, and adds the fib() function to the extended math
library to calculate Fibonacci numbers.

(cherry picked from commit 8c48f4c5377ddc3dc55388f181f23111145f7099)

contrib/bc: upgrade to version 6.6.0

This update removes printing of a leading zero in scientific or
engineering output modes (which are an extended feature of this
implementation).

(cherry picked from commit 76238846ad3e9e271a3d1f792f72beab727fd153)

14 months agonfsstat.1: Add a missing argument to -w
Mateusz Piotrowski [Mon, 5 Jun 2023 12:32:46 +0000 (14:32 +0200)]
nfsstat.1: Add a missing argument to -w

MFC after: 3 days
Sponsored by: Klara Inc.

(cherry picked from commit 979754a15ae4c507cd739163331cbaef7b100e23)

14 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Wed, 7 Jun 2023 23:12:12 +0000 (16:12 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Reported-by: Robert Morris
PR:           271351
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit c79a1416955a260424a5dd2013b114ff864bc926)

14 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Mon, 29 May 2023 21:58:20 +0000 (14:58 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271414
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 6a71277c3037df2c3a70464c2e2bf20dec2c128a)

14 months agoCleanups to fsck_ffs(8).
Kirk McKusick [Mon, 29 May 2023 21:54:52 +0000 (14:54 -0700)]
Cleanups to fsck_ffs(8).

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 5267120645fa52eac771c9bd8e28d68620a3bb89)

14 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sun, 28 May 2023 22:23:16 +0000 (15:23 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271383
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit b796bfce48698449470b751de6b0d96ae7047202)

14 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sun, 28 May 2023 00:09:02 +0000 (17:09 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271378
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 101a9ac07128a17d8797cc3e93978d2cfa457e99)

14 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sat, 27 May 2023 23:07:09 +0000 (16:07 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

The last valid inode in the filesystem is maxino - 1, not maxino.
Thus validity checks should ino < maxino, not ino <= maxino.

Reported-by: Robert Morris
PR:           271312
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 11ce203e0535c1c8f520c9bda81ab9326cf5db80)

14 months agoCorrect two bugs in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sat, 27 May 2023 05:41:57 +0000 (22:41 -0700)]
Correct two bugs in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271310
PR:           271354
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 03a8680202ef7d7e68adc70625633c490b4ed637)

14 months agoDo not try to adjust a directory depth when its reconnection is declined.
Kirk McKusick [Sat, 27 May 2023 05:55:11 +0000 (22:55 -0700)]
Do not try to adjust a directory depth when its reconnection is declined.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 49943856eb2710c6a6debdfa40d89d31d3fdb8ea)

14 months agoAdd the ability to adjust directory depths to background fsck_ffs(8).
Kirk McKusick [Fri, 26 May 2023 02:27:04 +0000 (19:27 -0700)]
Add the ability to adjust directory depths to background fsck_ffs(8).

Sponsored by: The FreeBSD Foundation

(cherry picked from commit e4a905d1e0d94ddb8e15de50d37e67f13e058047)

14 months agossh: fix leak and apply style(9) to hostname canonicalization
Ed Maste [Wed, 8 Feb 2023 13:16:53 +0000 (08:16 -0500)]
ssh: fix leak and apply style(9) to hostname canonicalization

Fixes: bf2e2524a2ce ("ssh: canonicize the host name before...")
Fixes: 3e74849a1ee2 ("ssh: canonicize the host name before...")
Reviewed by: rew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38441

(cherry picked from commit 19aba210e1a1b5999bff10cccab5a277060c4d46)

14 months agoCirrus-CI: move arch and toolchain to beginning of task names
Ed Maste [Fri, 26 May 2023 17:58:04 +0000 (13:58 -0400)]
Cirrus-CI: move arch and toolchain to beginning of task names

This is the key difference between the tasks, so make it the most
prominent.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 98c5211847afbfef54cf7446a4a94a6aad6a31bd)

14 months agoCirrus-CI: switch to -lite LLVM package for native run
Ed Maste [Wed, 17 May 2023 18:16:06 +0000 (14:16 -0400)]
Cirrus-CI: switch to -lite LLVM package for native run

This reduces CI cycle time (a small amount).

Suggested by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40136

(cherry picked from commit f326a83c857066754cbc92c59e1904a68af37deb)

14 months agoCirrus-CI: hide manual tasks from official runs
Ed Maste [Thu, 11 May 2023 15:16:51 +0000 (11:16 -0400)]
Cirrus-CI: hide manual tasks from official runs

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9244506a1b314d9ad5bcb1bd5cc0b75939464174)

14 months agoCirrus-CI: move QEMU pkg installation to test script
Ed Maste [Wed, 7 Sep 2022 14:12:37 +0000 (10:12 -0400)]
Cirrus-CI: move QEMU pkg installation to test script

Occasionally the QEMU package fails to build and isn't available on
-CURRENT using the Latest package set.  Move the package installation
to the test script, so that if the package isn't available we at least
still perform a build test.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 612f254c82468d037fccb6c26dc0a7e37a73a53e)

14 months agoCirrus-CI: add gcc12 automatic task on primary GitHub mirror
Ed Maste [Tue, 9 May 2023 18:26:47 +0000 (14:26 -0400)]
Cirrus-CI: add gcc12 automatic task on primary GitHub mirror

We want to get GCC coverage via Cirrus-CI, but don't want to trigger
excessive runs across all forks and branches.  Create a duplicate gcc12
task to run automatically for freebsd/freebsd-src.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f5f1b9a9828a4fdf5b0ba51b291e0e1e7ac7b55f)

14 months agonproc.1: Fix "first appeared in" details
Mateusz Piotrowski [Fri, 2 Jun 2023 16:49:36 +0000 (18:49 +0200)]
nproc.1: Fix "first appeared in" details

nproc(1) has been MFC'ed into 13-STABLE and made it into 13.2-RELEASE.

MFC after: 3 days

(cherry picked from commit 1e078fb6021ebb5ccfb092fe9e5befcf4054ac0b)

14 months agops: Add libxo to usage message
Mateusz Piotrowski [Tue, 25 Apr 2023 11:55:17 +0000 (13:55 +0200)]
ps: Add libxo to usage message

MFC after: 1 week
Sponsored by: Klara Inc.

(cherry picked from commit 820ac126795b8b1c55009676fad3dfe5c7834b0b)

14 months agops: Fix synopsis
Mateusz Piotrowski [Tue, 25 Apr 2023 11:38:10 +0000 (13:38 +0200)]
ps: Fix synopsis

In the -L mode, the -L flag is not optional.

MFC after: 3 days
Sponsored by: Klara Inc.

(cherry picked from commit 3f46bf40a1b26c49b53df4ec504757c5d8c9f921)

14 months agocd9660.5: Fix the history section
Mateusz Piotrowski [Tue, 25 Apr 2023 17:36:34 +0000 (19:36 +0200)]
cd9660.5: Fix the history section

MFC after: 7 days
Sponsored by: Klara Inc.

(cherry picked from commit 5212225753e965c87ae4a7fe5f8a7d9a8b6d04af)

14 months agoopen(2): fix typo
Konstantin Belousov [Tue, 30 May 2023 09:17:26 +0000 (12:17 +0300)]
open(2): fix typo

(cherry picked from commit 1fc174cba6e0b949f7499d195dc36bf8df15df4f)

14 months ago__acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors
Konstantin Belousov [Mon, 29 May 2023 15:07:18 +0000 (18:07 +0300)]
__acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors

PR: 271704

(cherry picked from commit 7a292504bad8467915f072f0576b2a07c76de1f5)

14 months agoreapkill: handle possible pid reuse after the pid was recorded as signalled
Konstantin Belousov [Fri, 12 May 2023 22:36:52 +0000 (01:36 +0300)]
reapkill: handle possible pid reuse after the pid was recorded as signalled

(cherry picked from commit 8164032a495b53b9176814f7b08e093961fabdca)

14 months agounr(9): document iterators
Konstantin Belousov [Sun, 14 May 2023 01:40:08 +0000 (04:40 +0300)]
unr(9): document iterators

(cherry picked from commit ea95173dbb3b67019a83155e55f798d4618f18c7)

14 months agounr(9) iterator: add naive test
Konstantin Belousov [Sat, 13 May 2023 01:32:25 +0000 (04:32 +0300)]
unr(9) iterator: add naive test

(cherry picked from commit 12db3c914fe0a985de1e393ee964c9cda5b3e0ca)

14 months agounr(9): add 'show unrhdr_iter' command
Konstantin Belousov [Thu, 25 May 2023 18:09:27 +0000 (21:09 +0300)]
unr(9): add 'show unrhdr_iter' command

(cherry picked from commit c4cc0cab1ea619e07b52ce4c3825e7941996cb49)

14 months agounr(9): add iterator interface
Konstantin Belousov [Fri, 12 May 2023 22:49:29 +0000 (01:49 +0300)]
unr(9): add iterator interface

(cherry picked from commit a014e0a3987a277a0e56c7fa5b9d895f735a8d1e)

14 months agounr(9): add 'show unrhdr' ddb command
Konstantin Belousov [Thu, 25 May 2023 11:14:19 +0000 (14:14 +0300)]
unr(9): add 'show unrhdr' ddb command

(cherry picked from commit f386b27736fe6dee535a530d5c7610d8a9827758)

14 months agounr(9): document clean_unrhdr()
Konstantin Belousov [Sun, 14 May 2023 00:43:54 +0000 (03:43 +0300)]
unr(9): document clean_unrhdr()

(cherry picked from commit f8c37080853c13ada935e7fe3d53286c1d9220f1)

14 months agosubr_unit.c: explain first/last special ranges
Konstantin Belousov [Sun, 14 May 2023 23:11:17 +0000 (02:11 +0300)]
subr_unit.c: explain first/last special ranges

(cherry picked from commit d44f477038d3ede5fe62fa19c9301b43455cd8f1)

14 months agokern/subr_unit.c: more uses for is_bitmap()
Konstantin Belousov [Fri, 12 May 2023 22:39:35 +0000 (01:39 +0300)]
kern/subr_unit.c: more uses for is_bitmap()

(cherry picked from commit 36b1f8a81ef96b42ce446efb79cffd577f1819f7)

14 months agokern/subr_unit.c: some style
Konstantin Belousov [Fri, 12 May 2023 22:37:35 +0000 (01:37 +0300)]
kern/subr_unit.c: some style

(cherry picked from commit 042ec55f9df769697feb6cee472959d001a0f033)

14 months agosetkey(8): document NAT-T and NAT-T MTU extensions syntax
Konstantin Belousov [Sat, 27 May 2023 06:00:24 +0000 (09:00 +0300)]
setkey(8): document NAT-T and NAT-T MTU extensions syntax

(cherry picked from commit cf85818e05a9349dfba040fb32e752d3c691ed1f)

14 months agosetkey(8): NAT-T manual configuration support
Konstantin Belousov [Thu, 25 May 2023 10:41:15 +0000 (13:41 +0300)]
setkey(8): NAT-T manual configuration support

(cherry picked from commit 2fa1b8617fdf68d0043efb7ae7c524702afba27c)

14 months agosetkey(8): extract prefixlen calculation info helper
Konstantin Belousov [Thu, 25 May 2023 12:20:00 +0000 (15:20 +0300)]
setkey(8): extract prefixlen calculation info helper

(cherry picked from commit 2c1296a3c5473651aa87eefea25e7b7475e9e16c)

14 months agosetkey(8): ansify parser
Konstantin Belousov [Mon, 3 Apr 2023 02:00:25 +0000 (05:00 +0300)]
setkey(8): ansify parser

(cherry picked from commit bef81bc0aef9dd4cd772b292d81bcc0ff7151d9f)

14 months agosetkey(8): remove redundand returns
Konstantin Belousov [Mon, 3 Apr 2023 01:59:07 +0000 (04:59 +0300)]
setkey(8): remove redundand returns

(cherry picked from commit 462c3d3cf45eca034683d9793b9ce09381346744)

14 months agosqlite3: Vendor import of sqlite3 3.42.0
Cy Schubert [Sun, 28 May 2023 14:31:36 +0000 (07:31 -0700)]
sqlite3: Vendor import of sqlite3 3.42.0

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

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

Merge commit '92b2b066353ddd32e1d59f8c52c430d552d9a9a5' into sqlite3/main

(cherry picked from commit 402cee1f19b613bae844a176156a41cdfa507585)

14 months agoffs: restore backward compatibility of newfs and makefs with older binaries
Chuck Silvers [Tue, 30 May 2023 02:26:28 +0000 (19:26 -0700)]
ffs: restore backward compatibility of newfs and makefs with older binaries

The previous change to CGSIZE had the unintended side-effect of allowing
newfs and makefs to create file systems that would fail validation when
examined by older commands and kernels, by allowing newfs/makefs to pack
slightly more blocks into a CG than those older binaries think is valid.
Fix this by having newfs/makefs artificially restrict the number of blocks
in a CG to the slightly smaller value that those older binaries will accept.
The validation code will continue to accept the slightly larger value
that the current newfs/makefs (before this change) could create.

Fixes: 0a6e34e950cd5889122a199c34519b67569be9cc
Reviewed by: mckusick
MFC after: 3 days
Sponsored by: Netflix

(cherry picked from commit d464a7698de8fe18530ea65fac90dce56b860a59)

14 months agoports(7): '*-list' targets: Add/fix doc on whether they are recursive
Olivier Certner [Sat, 3 Jun 2023 20:27:49 +0000 (14:27 -0600)]
ports(7): '*-list' targets: Add/fix doc on whether they are recursive

Signed-off-by: Olivier Certner <olce.freebsd@certner.fr>
Reviewed-by: imp
Pull-request: https://github.com/freebsd/freebsd-src/pull/691

(cherry picked from commit d0b0bc37a3a5655c4979fbed206cfb6a30210ac0)

14 months agoixgbe: Change if condition for RSS and rxcsum
Przemyslaw Lewandowski [Wed, 24 May 2023 23:24:54 +0000 (16:24 -0700)]
ixgbe: Change if condition for RSS and rxcsum

This patch fixes TCP connection hangs for 1 rxq and 1 txq without rxcsum
enabled. Documentation for 10G cards and other drivers suggest enabling
rxcsum for RSS and disabling otherwise. When PCSD bit is not set then
fragment checksum and IP identification are reported in the rx
descriptor. When PCSD bit is set then RSS hash value is reported in the
rx descriptor. RSS and RX IPP checksum are mutually exclusive.

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

(cherry picked from commit 156424fce98a0240c702da0a918b027d1979bfdb)

14 months agoice(4): Update to 1.37.11-k
Eric Joyner [Wed, 24 May 2023 23:38:02 +0000 (16:38 -0700)]
ice(4): Update to 1.37.11-k

This driver update has no corresponding ice_ddp update, and doesn't
contain very many functional changes:
- Some refactoring for future SR-IOV PF support
- Various minor fixes

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

(cherry picked from commit 9dc2f6e26fc24b88f9046667708a5555c63fb461)

14 months agolinuxkpi: Use modern function declarations
Mark Johnston [Fri, 2 Jun 2023 19:03:55 +0000 (15:03 -0400)]
linuxkpi: Use modern function declarations

This is a direct commit to stable/13.

Reported by: Jenkins

14 months agotests: Fix format strings
Mark Johnston [Fri, 26 May 2023 21:38:06 +0000 (17:38 -0400)]
tests: Fix format strings

Reported by: Jenkins
Fixes: 844942888f7d ("tests: Add a simple regression test for ptrace(PT_SC_REMOTE)")

(cherry picked from commit da8c3d21490fe791f8e4405216d5490dbea4dbe5)

14 months agotests: Add a simple regression test for ptrace(PT_SC_REMOTE)
Mark Johnston [Fri, 26 May 2023 19:13:20 +0000 (15:13 -0400)]
tests: Add a simple regression test for ptrace(PT_SC_REMOTE)

MFC after: 1 week

(cherry picked from commit 844942888f7d87885c79d87d808311086c664417)

14 months agonexus: Consistently return a pointer in failure paths
Mark Johnston [Wed, 26 Apr 2023 21:19:28 +0000 (17:19 -0400)]
nexus: Consistently return a pointer in failure paths

No functional change intended.

MFC after: 1 week

(cherry picked from commit ca4c7859009549975229d854888231e48938035e)

14 months agobitset: Remove BITSET_FOREACH_ADVANCE
Mark Johnston [Wed, 24 May 2023 17:05:03 +0000 (13:05 -0400)]
bitset: Remove BITSET_FOREACH_ADVANCE

__BITSET_FOREACH_ADVANCE is a helper macro for
__BITSET_FOREACH_IS(SET|CLR) and wasn't meant to be used directly by
consumers.

While here, fix some whitespace and move a comment back to where it
belongs.

Fixes: 5e04571cf3cf ("sys/bitset.h: reduce visibility of BIT_* macros")
MFC after: 1 week

(cherry picked from commit 44866dfb44178c86b6f380eb713a8f07c3d3b566)

14 months agoposixshmcontrol.1: Document posixshmcontrol create -l
Mark Johnston [Thu, 25 May 2023 21:08:55 +0000 (17:08 -0400)]
posixshmcontrol.1: Document posixshmcontrol create -l

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40270

(cherry picked from commit db289ababf9053236deb945e70167947d36b8692)

14 months agontp: Update version string
Cy Schubert [Thu, 1 Jun 2023 21:40:00 +0000 (14:40 -0700)]
ntp: Update version string

Chase a466cc55373f, updating the version string in the local config.h.

Reported by:  Trond Endrestol <Trond.Endrestol@ximalas.info>
Fixes: a466cc55373f

(cherry picked from commit 4d780613774c28a1efe4dc6272ae5fbc09d999f4)

14 months agoApply clang fixes for crashes compiling ARM/AArch64 CRC intrinsics
Dimitry Andric [Mon, 29 May 2023 14:27:58 +0000 (16:27 +0200)]
Apply clang fixes for crashes compiling ARM/AArch64 CRC intrinsics

Merge commit 069ecd0c6e2c from llvm-project (by Fangrui Song):

  [ARM] Check target feature support for __builtin_arm_crc*

  `__builtin_arm_crc*` requires the target feature crc which is available on armv8
  and above. Calling the fuctions for armv7 leads to a SelectionDAG crash.

  ```
  % clang -c --target=armv7-unknown-linux-gnueabi -c a.c
  fatal error: error in backend: Cannot select: intrinsic %llvm.arm.crc32b
  PLEASE submit a bug report to ...
  ```

  Add `TARGET_BUILTIN` and define required features for these builtins to
  report an error in `CodeGenFunction::checkTargetFeatures`. The problem is quite widespread.
  I will add `TARGET_BUILTIN` for more builtins later.

  Fix https://github.com/llvm/llvm-project/issues/57802

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

Merge commit b2d7a0dcf1ff from llvm-project (by Fangrui Song):

  [AArch64] Check target feature support for __builtin_arm_crc*

  This is the AArch64 counterpart of D134127.
  Daniel Kiss will change more `BUILTIN` to `TARGET_BUILTIN`.

  Fix #57802

Note that programs attempting to use ARM/AArch64 CRC intrinsics, when
they are not supported by the targeted CPU, will still receive a regular
compilation error (instead of a fatal backend error) similar to:

  7zCrc.c:4:10: error: '__builtin_arm_crc32b' needs target feature crc
    return __builtin_arm_crc32b(a, b);
           ^

Reported by: Alastair Hogge <agh@riseup.net>
PR: 271624
MFC after: 3 days

(cherry picked from commit 8792c03886d9e6df10fbac825819603dc059c7ea)

14 months agoApply libc++ fix for compiling <type_traits> with clang 16
Dimitry Andric [Sat, 27 May 2023 16:19:37 +0000 (18:19 +0200)]
Apply libc++ fix for compiling <type_traits> with clang 16

Merge commit 0e7971154ecb from llvm-project (by Christopher Di Bella):

  [libcxx][NFC] utilises compiler builtins for unary transform type-traits

  Depends on D116203

  Reviewed By: #libc, philnik

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

Clang 16 got new builtins that are equivalent to hand-written parts of
<type_traits>. When building world with the devel/llvm16 package
installed and CROSS_TOOLCHAIN=llvm16 set, this would lead to -Werror
warnings about those builtins being overridden.

Reported by: emaste
MFC after: 3 days

(cherry picked from commit 1f571f8767e6e48e7175cdaa27ed11d0c473d4c2)

14 months agontp: import ntp-4.2.8p16
Cy Schubert [Thu, 1 Jun 2023 14:04:37 +0000 (07:04 -0700)]
ntp: import ntp-4.2.8p16

Security:       NtpBUg3767, NtpBug3808, NtpBug3807 (CVE-2023-26555)

(cherry picked from commit a466cc55373fc3cf86837f09da729535b57e69a1)

14 months agoOpenSSL: Regen manual pages for OpenSSL 1.1.1u
Jung-uk Kim [Tue, 30 May 2023 15:03:10 +0000 (11:03 -0400)]
OpenSSL: Regen manual pages for OpenSSL 1.1.1u

(cherry picked from commit 5b1268252c56d96d3858969108a8cd6add9d5776)

14 months agoOpenSSL: Merge OpenSSL 1.1.1u
Jung-uk Kim [Tue, 30 May 2023 15:14:28 +0000 (11:14 -0400)]
OpenSSL: Merge OpenSSL 1.1.1u

(cherry picked from commit 84ffbd7782d2e98e440782b453f4e64cd1026d33)

14 months agoOpenSSL: Merge OpenSSL 1.1.1u
Jung-uk Kim [Tue, 30 May 2023 14:24:15 +0000 (10:24 -0400)]
OpenSSL: Merge OpenSSL 1.1.1u

(cherry picked from commit 8ecb489345f08012fdc92a202a40119891cac330)
(cherry picked from commit 8f1ef87a6b93af292e68f8e33087e2df6325e9bb)

14 months agolisten(2): fix wrong MFC
Eugene Grosbein [Tue, 30 May 2023 09:27:25 +0000 (16:27 +0700)]
listen(2): fix wrong MFC

Direct commit: fix wrong conflict resolution in previous
MFC: listen(2): improve administrator control over logging

Fixes: 773c91ccc8922c047d3632ae5849cd824992c313

14 months agoMFC: listen(2): improve administrator control over logging
Eugene Grosbein [Sun, 30 Apr 2023 20:14:30 +0000 (03:14 +0700)]
MFC: listen(2): improve administrator control over logging

As documented in listen.2 manual page, the kernel emits a LOG_DEBUG
syslog message if a socket listen queue overflows. For some appliances,
it may be desirable to change the priority to some higher value
like LOG_INFO while keeping other debugging suppressed.

OTOH there are cases when such overflows are normal and expected.
Then it may be desirable to suppress overflow logging altogether,
so that dmesg buffer is not flooded over long run.

In addition to existing sysctl kern.ipc.sooverinterval,
introduce new sysctl kern.ipc.sooverprio that defaults to 7 (LOG_DEBUG)
to preserve current behavior. It may be changed to any value
in a range of 0..7 for corresponding priority or to -1 to suppress logging.
Document it in the listen.2 manual page.

(cherry picked from commit 4824d788725987bccff53dec8c103cbac455b3ed)

14 months agogeli: fix typo
Mariusz Zaborski [Mon, 15 May 2023 08:44:17 +0000 (10:44 +0200)]
geli: fix typo

PR: 271396
Reported by: Tim Chase <freebsd@tim.thechases.com>
MFC after: 1 week

(cherry picked from commit 06db6a9dce81ceb696ee9c542637a4d80e0316a7)

14 months agofusefs: Remove an unused pbuf zone
Mark Johnston [Mon, 22 May 2023 13:33:57 +0000 (09:33 -0400)]
fusefs: Remove an unused pbuf zone

The zone has been dead ever since commit
b9e20197551d ("fusefs: rewrite vop_getpages and vop_putpages")

No functional change intended.

Reviewed by: asomers
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40143

(cherry picked from commit e3f7081b1c54fae55cb443a39c2ad44ac3ed4a75)

14 months agoloader.efi: Fix some arm64 PE metadata
Mark Johnston [Tue, 18 Apr 2023 18:32:04 +0000 (14:32 -0400)]
loader.efi: Fix some arm64 PE metadata

- Mark the file as an executable in the COFF header.
- Provide separate .text and .data sections.
- Provide sane file and section alignment values.  These values are the
  defaults defined in the PE specification.
- Set appropriate characteristics for each of .text and .data.

This is required for the MS devkit to load our UEFI image.

Obtained from: OpenBSD via allanjude
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D37765

(cherry picked from commit 21d56b796634bda628b149c717461bf88c23677d)

14 months agolibthr rtld locks: do not leak URWLOCK_READ_WAITERS into child
Konstantin Belousov [Sat, 20 May 2023 08:11:54 +0000 (11:11 +0300)]
libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child

PR: 271490

(cherry picked from commit 6f49eafb056cfa0703dfc97a731cabe4ed2596b8)

14 months agonvmecontrol: Fix power subcommand output.
Alexander Motin [Mon, 15 May 2023 20:48:50 +0000 (16:48 -0400)]
nvmecontrol: Fix power subcommand output.

The returned value consists of two fields.  Report them separately.

MFC after: 2 weeks

(cherry picked from commit f409f11bc556e6da4c4cdb9f20a2ba3b0977fb32)

14 months agoLinuxKPI: Use modern function declarations for kernel_fpu_begin/end.
John Baldwin [Sat, 27 May 2023 19:32:41 +0000 (12:32 -0700)]
LinuxKPI: Use modern function declarations for kernel_fpu_begin/end.

This fixes a -Wstrict-prototype error from GCC 12.

This is a direct commit to stable/13 as it was fixed differently in
main.

14 months agoRevert "LinuxKPI: Make FPU sections thread-safe and use the NOCTX flag."
John Baldwin [Sat, 27 May 2023 19:23:20 +0000 (12:23 -0700)]
Revert "LinuxKPI: Make FPU sections thread-safe and use the NOCTX flag."

This broke part of the KBI used by drm-kmod.

This reverts commit 8ca78eb03fd4b3c9f514ea6c075fc44dc9c02d27.

Reported by: manu

14 months agoroute.8: mention DXR in FIB_ALGO section
Marko Zec [Sat, 27 May 2023 08:31:42 +0000 (10:31 +0200)]
route.8: mention DXR in FIB_ALGO section

While here, add a sentence describing DPDK DIR24-8 principle of
operation.

MFC after: 7 days

14 months agoRELNOTES: Add an entry for the NFS "syskrb5" mount option
Rick Macklem [Fri, 26 May 2023 23:05:00 +0000 (16:05 -0700)]
RELNOTES: Add an entry for the NFS "syskrb5" mount option

14 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Fri, 26 May 2023 21:37:23 +0000 (14:37 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Reinstall MFC commit 4660b60a00c as it has should now work correctly
with fix for CGSIZE macro in MFC 4a3834e31fd.

14 months agoFix size differences between architectures of the UFS/FFS CGSIZE macro value.
Kirk McKusick [Mon, 15 May 2023 19:56:27 +0000 (12:56 -0700)]
Fix size differences between architectures of the UFS/FFS CGSIZE macro value.

Reported-by: Tijl Coosemans
Tested-by: Tijl Coosemans and Peter Holm
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 0a6e34e950cd5889122a199c34519b67569be9cc)

14 months agoFix typo in sys/conf/kern.mk's InitAll warning message
Dimitry Andric [Tue, 23 May 2023 17:56:41 +0000 (19:56 +0200)]
Fix typo in sys/conf/kern.mk's InitAll warning message

I missed this one in commit 3006f6df025f.

Fixes: 3006f6df025f
MFC after: 3 days

(cherry picked from commit 3741ffdb14ae6915abfa55307f3e964492b272c3)

14 months agoEnable -ftrivial-auto-var-init flags for gcc >= 12
Dimitry Andric [Tue, 23 May 2023 17:43:12 +0000 (19:43 +0200)]
Enable -ftrivial-auto-var-init flags for gcc >= 12

Now that gcc >= 12 supports -ftrivial-auto-var-init, add it to
bsd.compiler.mk's "init-all" feature.

PR: 271047
Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D40208

(cherry picked from commit c32736222cdd92e1497d1154d81c9005757fb308)

14 months agoUpdate -ftrivial-auto-var-init flags for clang >= 16
Dimitry Andric [Tue, 23 May 2023 17:40:36 +0000 (19:40 +0200)]
Update -ftrivial-auto-var-init flags for clang >= 16

As of clang 16, the -ftrivial-auto-var-init=zero option no longer needs
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
to enable the option. Only add it for older clang versions.

PR: 271047
Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D40208

(cherry picked from commit 3006f6df025f3afd0fb3cca1b820cdac1f1ed4c9)

14 months agobsd.compiler.mk: Add a c++20 compiler feature.
John Baldwin [Sat, 19 Nov 2022 04:11:59 +0000 (20:11 -0800)]
bsd.compiler.mk: Add a c++20 compiler feature.

This is enabled for clang versions 10+ and GCC versions 10+.

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

(cherry picked from commit 063b380f54b04eaab8ee26e39d6e8128523d16ad)

14 months agomount_nfs.8: Update man page for the "syskrb5" option
Rick Macklem [Tue, 11 Apr 2023 19:17:09 +0000 (12:17 -0700)]
mount_nfs.8: Update man page for the "syskrb5" option

Commit 896516e54a8c added a new NFS mount option
used for Kerberized NFSv4.1/4.2 mounts. It specifies that
AUTH_SYS be used for state maintenance (also called system)
operations. This allows the mount to be done without the
"gssname" option or a valid Kerberos TGT being held by the
user doing the mount (so it can be specified in fstab(5) for
example).

This is a content change.

(cherry picked from commit 61330e494f63ab60a515e3273668a03a7e8b4fee)

14 months agonfscl: Make coverity happy
Rick Macklem [Wed, 29 Mar 2023 00:08:45 +0000 (17:08 -0700)]
nfscl: Make coverity happy

Coverity does not like code that checks a function's
return value sometimes.  Add "(void)" in front of the
function when the return value does not matter to try
and make it happy.

A recent commit deleted "(void)"s in front of nfsm_fhtom().
This commit puts them back in.

(cherry picked from commit 695d87bae1ec826fcf796f99b9de9cdd8c37fb8c)

15 months agonfscl: Add a new NFSv4.1/4.2 mount option for Kerberized mounts
Rick Macklem [Thu, 16 Mar 2023 22:55:36 +0000 (15:55 -0700)]
nfscl: Add a new NFSv4.1/4.2 mount option for Kerberized mounts

Without this patch, a Kerberized NFSv4.1/4.2 mount must provide
a Kerberos credential for the client at mount time.  This credential
is typically referred to as a "machine credential".  It can be
created one of two ways:
- The user (usually root) has a valid TGT at the time the mount
  is done and this becomes the machine credential.
  There are two problems with this.
  1 - The user doing the mount must have a valid TGT for a user
      principal at mount time.  As such, the mount cannot be put
      in fstab(5) or similar.
  2 - When the TGT expires, the mount breaks.
- The client machine has a service principal in its default keytab
  file and this service principal (typically called a host-based
  initiator credential) is used as the machine credential.
  There are problems with this approach as well:
  1 - There is a certain amount of administrative overhead creating
      the service principal for the NFS client, creating a keytab
      entry for this principal and then copying the keytab entry
      into the client's default keytab file via some secure means.
  2 - The NFS client must have a fixed, well known, DNS name, since
      that FQDN is in the service principal name as the instance.

This patch uses a feature of NFSv4.1/4.2 called SP4_NONE, which
allows the state maintenance operations to be performed by any
authentication mechanism, to do these operations via AUTH_SYS
instead of RPCSEC_GSS (Kerberos).  As such, neither of the above
mechanisms is needed.

It is hoped that this option will encourage adoption of Kerberized
NFS mounts using TLS, to provide a more secure NFS mount.

This new NFSv4.1/4.2 mount option, called "syskrb5" must be used
with "sec=krb5[ip]" to avoid the need for either of the above
Kerberos setups to be done by the client.

Note that all file access/modification operations still require
users on the NFS client to have a valid TGT recognized by the
NFSv4.1/4.2 server.  As such, this option allows, at most, a
malicious client to do some sort of DOS attack.

Although not required, use of "tls" with this new option is
encouraged, since it provides on-the-wire encryption plus,
optionally, client identity verification via a X.509
certificate provided to the server during TLS handshake.
Alternately, "sec=krb5p" does provide on-the-wire
encryption of file data.

A mount_nfs(8) man page update will be done in a separate commit.

(cherry picked from commit 896516e54a8c39c1c8be3ad918f38fbf196b57ed)

15 months agopfsync tests: check for the correct IP address
Kristof Provost [Thu, 18 May 2023 19:37:48 +0000 (21:37 +0200)]
pfsync tests: check for the correct IP address

When checking if the state synced over we should look for
198.51.100.254, not 198.51.100.2. The test worked because the incorrect
address is a substring of the correct one, but we should fix it anyway.

Reported by: Naman Sood <naman@freebsdfoundation.org>
MFC after: 1 week

(cherry picked from commit 0d574d8ba8b244f40c1484123c5042f49ac642b8)

15 months agonfsd.c: Log a more meaningful failure message
Rick Macklem [Wed, 22 Feb 2023 22:09:15 +0000 (14:09 -0800)]
nfsd.c: Log a more meaningful failure message

For the cases where the nfsd(8) daemon is already running or
has failed to start within a prison due to an incorrect prison
configuration, the failure message logged is:
  Can't read stable storage file: operation not permitted

This patch replaces the above with more meaningful messages.
It depends on commit 10dff9da9748 to differentiate between the
above two cases, however even without this commit, the messages
should be an improvement.

(cherry picked from commit fe5c211ba87315b098769a7e6d50b41f00f6fed4)

15 months agonfsd: Return ENXIO instead of EPERM when nfsd(8) already running
Rick Macklem [Wed, 22 Feb 2023 21:19:07 +0000 (13:19 -0800)]
nfsd: Return ENXIO instead of EPERM when nfsd(8) already running

The nfsd(8) daemon generates an error message that does not
indicate that the nfsd daemon is already running when the nfssvc(2)
syscall fails for the NFSSVC_STABLERESTART.  Also, the check for
running nfsd(8) in a vnet prison will return EPERM when it fails.

This patch replaces EPERM with ENXIO so that the nfsd(8) daemon
can generate more reasonable failure messages.  The nfsd(8) daemon
will be patched in a future commit.

(cherry picked from commit 10dff9da9748b0eadd2d02dded3afd2321d15537)

15 months agonfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers
Rick Macklem [Fri, 5 May 2023 22:43:55 +0000 (15:43 -0700)]
nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers

If the i-node number (d_fileno) for a file on the server did
not fit in 32bits, it would be truncated to the low order 32bits
for the NFSv3 Readdir and ReaddirPlus RPC replies.
This is no longer correct, given that ino_t is now 64bits.

This patch fixes this by sending the full 64bits of d_fileno
on the wire in the NFSv3 Readdir/ReaddirPlus RPC reply.

PR: 271174

(cherry picked from commit 648a208ef3a171585f3446464646832f0e0ed3dc)

15 months agoRELNOTES: Add an entry for nfsd running in a vnet jail
Rick Macklem [Mon, 22 May 2023 18:42:39 +0000 (11:42 -0700)]
RELNOTES: Add an entry for nfsd running in a vnet jail

15 months agomountd.8: Update for mountd running in jails
Rick Macklem [Mon, 20 Mar 2023 22:16:03 +0000 (15:16 -0700)]
mountd.8: Update for mountd running in jails

Mountd can now be run in an appropriately
configured vnet jail.

This man page update adds some information
for this case.

This is a content change.

(cherry picked from commit 9432e798fc6daaad341a496e9abcf9e3b760a63b)

15 months agonfsd.8: Update for nfsd running in jails
Rick Macklem [Wed, 29 Mar 2023 21:58:47 +0000 (14:58 -0700)]
nfsd.8: Update for nfsd running in jails

Nfsd can now be run in an appropriately
configured vnet jail.

This man page update adds some information
for this case.

This is a content change.

(cherry picked from commit a1254dcaa869bba20e46d966c53c7473bb24d02b)

15 months agojail.8: Update the allow.nfsd section
Rick Macklem [Tue, 14 Mar 2023 22:28:02 +0000 (15:28 -0700)]
jail.8: Update the allow.nfsd section

This patch updates the information for "allow.nfsd"
and adds configuration information.

This is a content change.

(cherry picked from commit c0f94fee0bdddcc07f216f9723544f78ace5155a)

15 months agojail.8: Update the man page for allow.nfsd
Rick Macklem [Sat, 17 Dec 2022 21:54:33 +0000 (13:54 -0800)]
jail.8: Update the man page for allow.nfsd

Commit bba7a2e89602 added "allow.nfsd" to optionally allow
mountd/nfsd to be run inside a vnet prison when the kernel
is built with "options VNET_NFSD".

This patch updates the man page for this change.

This is a content change.

(cherry picked from commit d4b4f3b9c356938de6140ccea20d502d207b18a7)