From nobody Mon Jan 20 00:01:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybr8t6N6Zz5ltt6;
Mon, 20 Jan 2025 00:01:18 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybr8t5crSz3bRp;
Mon, 20 Jan 2025 00:01:18 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737331278;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Q/wUkgvEu197+KUMXQfIY4/c6wyQVxbgBk8gywqV/H4=;
b=yW6kBq+Yp07mDsNC2WoEDCm4bFx5chOzUc3GvSrABK+qf2Z2nGm5K9Z1aNCJEcT/A2j4vb
Xf2/s/5VqVz5mBwZ85fyf7UMa8zg9MNNPY28ivYZCnO7K5IOuEN3K131GZ4CP+bwvv5KpI
FOMh0VsuvOkxEjf8iNdeYIx5TM8v6iI1rZRKbeWf0rVXL523plHtkFIyXgWWu6zJ3m/EVX
2+v0Ge46fJ9uCRy/Do17+z7wU7hOQokatWgNFGHZ64R7SIqBSFy3YCSmmYxrXj72kGLz6S
QXUvI17T2VC9+lm3cCSBoKEnubVL1soFSdl7hHOzCrgHaJ2XQ6NKVYHuMXZBtw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737331278;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Q/wUkgvEu197+KUMXQfIY4/c6wyQVxbgBk8gywqV/H4=;
b=H5psnzO5Ooka9waa4TcT3UDELZYAIXQVu30J9vD64IGO2OPfnmweypKl9PlJeROMdqp4tt
CvLV3FDNECCVD1rNStgAvq0RBlcTmxVOCi53xbdpyn/2YAXwLEX5ZQFDm5de3Nn0Pwqa9L
oBFtQ1Zz7l79U+/yk9stxvqLQTOSzNG//g6IyzamXHLydeXzvuT3lWv78pMovQ3vW4k/rp
YIfv02RbZUXKDrOA9dKRzQi2uNhqxCTEptxzUQJPwHQ2wtbv8E/eZLPCfHcpbMG5qklJrA
o+E3uOzalw8SA1ua66tDECNOES6NXm7U5uo9mKuhQ9sX+74A9J8aSQzllz+sVw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737331278; a=rsa-sha256; cv=none;
b=e9YD69AezeLfFvQSYpMFkdLzUsocpFJxeWIzDDRYtdlUHy4JmULAkEBD8Nkg6R2S22MiMO
kkVewqxM2YwMbXtQlL41i2Zwz8uaSaPTiuFOUmottKrHXoNYG7p27RSK78YWpOAGdsk1FU
QkzC9O/+Sl3YGrKZYuEDwxi6vEYETveXI17AwVijT4y/w/p8l0ASMVqfJbFf/UHio2fSuN
mflLNDvYBO6IvRxNAOgh1QthA4RzPI0IouoFV7WMulF0nbWPUCz/vnX9ttEGnYmHqz2zXA
A6dkGYaQzAHtNfXB/64CRjJEJGaBQ5giizRqLxAyr7hJ0VXzdubZDImUl90ekQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybr8t57tCz19nN;
Mon, 20 Jan 2025 00:01:18 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K01IJw075772;
Mon, 20 Jan 2025 00:01:18 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K01IZn075769;
Mon, 20 Jan 2025 00:01:18 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:01:18 GMT
Message-Id: <202501200001.50K01IZn075769@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Rick Macklem
Subject: git: 2cd9a4f0c229 - stable/14 - exports.5: Document the
current behavior of -alldirs
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rmacklem
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 2cd9a4f0c229626f7422187b30723772336e8896
Auto-Submitted: auto-generated
The branch stable/14 has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=2cd9a4f0c229626f7422187b30723772336e8896
commit 2cd9a4f0c229626f7422187b30723772336e8896
Author: Rick Macklem
AuthorDate: 2024-12-28 21:51:08 +0000
Commit: Rick Macklem
CommitDate: 2025-01-20 00:00:35 +0000
exports.5: Document the current behavior of -alldirs
Commit 07cd69e272da adds a new "-a" mountd option,
which changes the behavior of mountd when file systems
are exported via -alldirs.
This patch updates the man page to reflect the actual
behavior when -alldirs is used when mountd is started
with/without -a. Prior to the above commit, exports(5)
documented that, when -alldirs was specified, the exports
line would fail unless the directory was a server file
system mount point. This behavior was only documented
in the Examples section and has not been implemented
since a change between FreeBSD 1 and FreeBSD 2 was done.
This is a contents change.
PR: 282995
(cherry picked from commit 295934eaa92cd917ae42a446899c0d527ad9c0c9)
---
usr.sbin/mountd/exports.5 | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/usr.sbin/mountd/exports.5 b/usr.sbin/mountd/exports.5
index 6c18e910c116..b8f0e93aec8a 100644
--- a/usr.sbin/mountd/exports.5
+++ b/usr.sbin/mountd/exports.5
@@ -27,7 +27,7 @@
.\"
.\" @(#)exports.5 8.3 (Berkeley) 3/29/95
.\"
-.Dd October 08, 2024
+.Dd December 16, 2024
.Dt EXPORTS 5
.Os
.Sh NAME
@@ -86,6 +86,15 @@ to limit exported directories to server local file system mount points.
When exporting ZFS datasets with the
.Sy sharenfs
property, this is auomatically the case.
+If the
+.Fl alldirs
+flag is specified and
+the
+.Fl a
+command line option is specified for
+.Xr mountd 8 ,
+the export will fail if the directory path is not a local file system
+mount point.
.Pp
There are three forms of the directory path specification.
The first is to list all mount points as absolute
@@ -552,12 +561,18 @@ will be exported read-only to the entire network 192.168.33.0/24, including
all its subdirectories.
Since
.Pa /cdrom
-is the conventional mountpoint for a CD-ROM device, this export will
-fail if no CD-ROM medium is currently mounted there since that line
+is the conventional mountpoint for a CD-ROM device,
+for the case where the
+.Fl a
+option has been specified for
+.Xr mountd 8 ,
+this export will
+fail if no CD-ROM medium is currently mounted there
+since that line
would then attempt to export a subdirectory of the root file system
with the
.Fl alldirs
-option which is not allowed.
+option.
The
.Fl quiet
option will then suppress the error message for this condition that
From nobody Mon Jan 20 00:11:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YbrP96JMrz5lvRR;
Mon, 20 Jan 2025 00:11:57 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YbrP95SPHz3cLp;
Mon, 20 Jan 2025 00:11:57 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737331917;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=lH9wpVDyW5/xUzlFZf3SoenLYLfGq/eldATm74mjroc=;
b=su8jfQwHeYZhToL/H34S4yNqPA1hiADS7GRbeWbLbdS9LD6Px77irb6n2An+t+dCUVAGjJ
MO0i9MLU44mR0MBabeQ2bhrkaCE0CXk05aDUHnFD98JO2Lndo1X8l2xU3xPbsV5PSQ480d
zU6RN3UtWfVDPfhaY8AZUQtm8574wyBV7LF3uIx4H2Pux1U/iiauEVxnHkWkfio+WVkBU/
5wm1a2TdKuXZjbAukHzI2S9d9g7qsF7n4qatsRwkLy8v4GrV29dCjrilUwvLVkMiTGd1pS
Q038UjKuTFA3wt2TB7snpZVhpm/nJ35mapFbl3LTvJAuAATYHRx0YDSACmNNLA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737331917;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=lH9wpVDyW5/xUzlFZf3SoenLYLfGq/eldATm74mjroc=;
b=yndRd5hgS+J1vd5iC0QJbmAyqGJ1fMIF/e+czcgVHlAAnCl15B/WBbol/rgwLTa4TMy4/z
jdFnLLshy/59b6ZabGb/Q45mjYlPKwcxAhpl47TavJvp/MX5z49IObt5/Dl2pfahNqZuxV
CYPvdSuY6EXkcw56O/vzZmCjfRre+mzgmXg07OS7p4lBqBJ7o2Ooz8AB9tMCj5ZQnO0KBN
y8GRLp2iwODxtgbhd2CHbO8ymcBX5v2d8nopzYUDNQPRIYeWDW0xnkfwnQ2HvYORChLpAd
tXxnn/Gz+8YfmdFZV7sfIsE6UuwFtCvgY6uo60fRxC4Z+Mz6mIa3xhsOBp7BdA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737331917; a=rsa-sha256; cv=none;
b=n3fPHWtUWGBUDM0HEAMUriVlF7kTMSKPnFa1j+SGpY98o9FEIf+ztsxpmspqnJvSKkbFWU
DLSRbidv41I3KvHnB1xeaHxl0f6J5htnOeIYDnBav6YIRKqrCVdwVJ3gwMslUOQTakQFew
tcrE8ifxCXY+fenVFYNuZTSSztWLkrfzXf4PcOhnSUMreHoLiyr9zYddxSvdRHnILwgt13
zyAgj/05Jja1uKtpcXvGQkQo/AkSMZYXIWeuD4z6lQtBvGgNo6ZEsfbORM1E7QmaxKJ9Ae
XI6CAFAFGcUycSG8b0Hqbs2aUZ/Xz1hHT7YTgEB/jobg/jCxdQqqdC1f9/dngQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YbrP954CSz1Bx0;
Mon, 20 Jan 2025 00:11:57 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K0Bv6i093078;
Mon, 20 Jan 2025 00:11:57 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K0BvFW093075;
Mon, 20 Jan 2025 00:11:57 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:11:57 GMT
Message-Id: <202501200011.50K0BvFW093075@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Rick Macklem
Subject: git: 22d2336252c9 - stable/14 - RELNOTES: Add entry for
commit ead3cd3ef628
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rmacklem
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 22d2336252c9af8e58b19444e2308a98946f3246
Auto-Submitted: auto-generated
The branch stable/14 has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=22d2336252c9af8e58b19444e2308a98946f3246
commit 22d2336252c9af8e58b19444e2308a98946f3246
Author: Rick Macklem
AuthorDate: 2025-01-20 00:10:06 +0000
Commit: Rick Macklem
CommitDate: 2025-01-20 00:10:06 +0000
RELNOTES: Add entry for commit ead3cd3ef628
---
RELNOTES | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/RELNOTES b/RELNOTES
index 515ba162b440..812dc613957b 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -10,6 +10,12 @@ newline. Entries should be separated by a newline.
Changes to this file should not be MFCed.
+ead3cd3ef628:
+ Add a new -a command line option to mountd(8).
+ If this command line option is specified, when
+ a line in exports(5) has the -alldirs export option,
+ the directory must be a server file system mount point.
+
54974e731f27, 155987e20190, 4634282f8908, 7a3a0402aeb6, 6b1a5d3535d9:
The layout of NFS file handles for the tarfs, cd9660, and ext2fs
file systems has changed. An NFS server that exports any of these file
From nobody Mon Jan 20 00:25:35 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybrhw0LFBz5lwC0;
Mon, 20 Jan 2025 00:25:36 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybrhv6ZVCz3dLJ;
Mon, 20 Jan 2025 00:25:35 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737332735;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=cLQsh2C31AuJCgFRHwjsQ/XDlBgQo5bez2IdUL4Jz2U=;
b=dDUJCbcSrhS7VDtvRYQ/WJSdlCJXzte11+3XtQfWTWhKYr3RWW+H6esfRhpgRTOjCf7O5C
MBKWY157A/Rtv1duRtax4pQ4tcXBBXJg6eMNhIdyQJoCEMjtt9RKYCLAGrmSMm4rs/92/D
2AFgvoQf4I3VwQBe2o/aNKodo/GVVwbhbDCjpJ9cVkg87YNg9p74kFeso/xHkWltkFyXKT
KKl/o/jWfx2JpgyPCJUw9mav4I4F3wbSKUaKOuhFyvP1thgcLBpwCQAzvml399XDyUqR3N
++hCp7MWW8030vpdBa0pe+ng+uLppn8j4ufua8tySk0B58jkJz8E0sPE/CIV6Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737332735;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=cLQsh2C31AuJCgFRHwjsQ/XDlBgQo5bez2IdUL4Jz2U=;
b=Y3aXP7008P9YhJv3zRSrurqkx5DWlQq7NVSBAladz4TQB03XK4P14vkyV6UU+fu1BBe7VW
cXU6f6npamSjj610bdZ0pdduRvE1HkH4poRurKdLccx27JMxJOOu3Qz61YtLooGkZfV7tr
1ovchgcn2yfp4fqG/q9KZNvMVdKgNmOA4nwbNElGgfUTECXfjb8eHKG9hAhyPy2b9P0DMH
GlbksI1qksnyzkipj96TqMEzL7O/bk9AIaa40JUKM1D3G+srgyH1P7Uufw2aY+H1PkCtRN
qzezE8HSKEFUDgA/F27cJvbJBhtmyKI7JXQ8BSS+hDZgMFBDmBCng7gID5CZKw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737332735; a=rsa-sha256; cv=none;
b=hpIFIIh0tddvaxpV8oItlMMwP/pA65lzHf2ZBvfKAl66631/2frd9SU2UFq0taUBhnrQyV
TU3KdrbVY+jVuXWSrlZnTDsQgBUBfM6Ti63fgw1uWMX0i1mmn42Sy5ZvbEiKiU+b0CGpgx
36iFpAzOTvlP8DY+s0XXOVomae+nGBxvpCT+XBWTLUoyU3UwMigYyAysa2p9lInIfy+OBr
0ZTohwhoRrObdlJKt5BqaEr3N3VJU7HpS0EkuswWOICBo+ABTAreWcBMKjjtW+dkoediMb
Qnl0sGXZkMI3NRsN5YydE72bM5GO/iX3jMY55a1najEgkaxBolsZNk14Ab7jBA==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybrhv5zd7z1Bpx;
Mon, 20 Jan 2025 00:25:35 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K0PZ2I018076;
Mon, 20 Jan 2025 00:25:35 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K0PZYg018073;
Mon, 20 Jan 2025 00:25:35 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:25:35 GMT
Message-Id: <202501200025.50K0PZYg018073@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Philip Paeps
Subject: git: a158d26e89f2 - stable/14 - contrib/tzdata: import
tzdata 2025a
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: philip
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: a158d26e89f2e3274ba1064e3fd6b341c6fcb07c
Auto-Submitted: auto-generated
The branch stable/14 has been updated by philip:
URL: https://cgit.FreeBSD.org/src/commit/?id=a158d26e89f2e3274ba1064e3fd6b341c6fcb07c
commit a158d26e89f2e3274ba1064e3fd6b341c6fcb07c
Author: Philip Paeps
AuthorDate: 2025-01-17 01:33:46 +0000
Commit: Philip Paeps
CommitDate: 2025-01-20 00:23:58 +0000
contrib/tzdata: import tzdata 2025a
Changes: https://github.com/eggert/tz/blob/2025a/NEWS
(cherry picked from commit 46226b0162ba03986b1de2c790804b37dd8e64d6)
---
contrib/tzdata/Makefile | 32 +++++------
contrib/tzdata/NEWS | 84 +++++++++++++++++++++++++++--
contrib/tzdata/antarctica | 2 +
contrib/tzdata/asia | 113 ++++++++++++++++++++++++++++-----------
contrib/tzdata/australasia | 113 +++++++++++++++++++++------------------
contrib/tzdata/checknow.awk | 2 +-
contrib/tzdata/checktab.awk | 39 +++++++++++++-
contrib/tzdata/etcetera | 4 ++
contrib/tzdata/europe | 2 +-
contrib/tzdata/factory | 10 ++++
contrib/tzdata/leap-seconds.list | 8 +--
contrib/tzdata/leapseconds | 8 +--
contrib/tzdata/northamerica | 9 ++--
contrib/tzdata/southamerica | 27 ++++++++--
contrib/tzdata/theory.html | 40 +++++++++-----
contrib/tzdata/version | 2 +-
contrib/tzdata/zone.tab | 2 +-
contrib/tzdata/zone1970.tab | 6 +--
contrib/tzdata/zonenow.tab | 9 ++--
19 files changed, 369 insertions(+), 143 deletions(-)
diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile
index 0087b4596515..2130582c2deb 100644
--- a/contrib/tzdata/Makefile
+++ b/contrib/tzdata/Makefile
@@ -137,7 +137,7 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
uint_least64_t.ck
# What kind of TZif data files to generate. (TZif is the binary time
-# zone data format that zic generates; see Internet RFC 8536.)
+# zone data format that zic generates; see Internet RFC 9636.)
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
# REDO= posix_only
@@ -255,6 +255,7 @@ LDLIBS=
# -DHAVE_UNISTD_H=0 if does not work*
# -DHAVE_UTMPX_H=0 if does not work*
# -Dlocale_t=XXX if your system uses XXX instead of locale_t
+# -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
# -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
# Typically it is better to use a later standard. For example,
# with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
@@ -262,7 +263,7 @@ LDLIBS=
# feature (integers at least 64 bits wide) and maybe more.
# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
# with external linkage, e.g., applications cannot define 'localtime'.
-# -Dssize_t=long on hosts like MS-Windows that lack ssize_t
+# -Dssize_t=int on hosts like MS-Windows that lack ssize_t
# -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
# Although -DSUPPORT_C89=0 might work around latent bugs in callers,
# it does not conform to POSIX.
@@ -285,7 +286,7 @@ LDLIBS=
# This mishandles some past timestamps, as US DST rules have changed.
# It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
# as Europe and US DST rules differ.
-# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
+# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
# -DUNINIT_TRAP if reading uninitialized storage can cause problems
# other than simply getting garbage data
# -DUSE_LTZ=0 to build zdump with the system time zone library
@@ -319,7 +320,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
$(GCC_INSTRUMENT) \
-Wall -Wextra \
-Walloc-size-larger-than=100000 -Warray-bounds=2 \
- -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
+ -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
+ -Wdate-time \
-Wdeclaration-after-statement -Wdouble-promotion \
-Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
-Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
@@ -336,7 +338,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
-Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
-Wvariadic-macros -Wvla -Wwrite-strings \
- -Wno-format-nonliteral -Wno-sign-compare
+ -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
@@ -614,8 +616,8 @@ TZS_YEAR= 2050
TZS_CUTOFF_FLAG= -c $(TZS_YEAR)
TZS= to$(TZS_YEAR).tzs
TZS_NEW= to$(TZS_YEAR)new.tzs
-TZS_DEPS= $(YDATA) asctime.c localtime.c \
- private.h tzfile.h zdump.c zic.c
+TZS_DEPS= $(YDATA) localtime.c private.h \
+ strftime.c tzfile.h zdump.c zic.c
TZDATA_DIST = $(COMMON) $(DATA) $(MISC)
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi
@@ -855,10 +857,10 @@ tzselect: tzselect.ksh version
chmod +x $@.out
mv $@.out $@
-check: check_mild back.ck
+check: check_mild back.ck now.ck
check_mild: check_web check_zishrink \
character-set.ck white-space.ck links.ck mainguard.ck \
- name-lengths.ck now.ck slashed-abbrs.ck sorted.ck \
+ name-lengths.ck slashed-abbrs.ck sorted.ck \
tables.ck ziguard.ck tzs.ck
# True if UTF8_LOCALE does not work;
@@ -1103,7 +1105,7 @@ set-timestamps.out: $(EIGHT_YARDS)
touch -md @1 test.out; then \
rm -f test.out && \
for file in $$files; do \
- if git diff --quiet $$file; then \
+ if git diff --quiet HEAD $$file; then \
time=$$(TZ=UTC0 git log -1 \
--format='tformat:%cd' \
--date='format:%Y-%m-%dT%H:%M:%SZ' \
@@ -1354,13 +1356,13 @@ long-long.ck unsigned.ck: $(VERSION_DEPS)
zonenames: tzdata.zi
@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
-asctime.o: private.h tzfile.h
+asctime.o: private.h
date.o: private.h
difftime.o: private.h
-localtime.o: private.h tzfile.h tzdir.h
-strftime.o: private.h tzfile.h
-zdump.o: version.h
-zic.o: private.h tzfile.h tzdir.h version.h
+localtime.o: private.h tzdir.h tzfile.h
+strftime.o: localtime.c private.h tzdir.h tzfile.h
+zdump.o: private.h version.h
+zic.o: private.h tzdir.h tzfile.h version.h
.PHONY: ALL INSTALL all
.PHONY: check check_mild check_time_t_alternatives
diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS
index 83b8b8c8d39c..a5d7ea89204e 100644
--- a/contrib/tzdata/NEWS
+++ b/contrib/tzdata/NEWS
@@ -1,5 +1,83 @@
News for the tz database
+Release 2025a - 2025-01-15 10:47:24 -0800
+
+ Briefly:
+ Paraguay adopts permanent -03 starting spring 2024.
+ Improve pre-1991 data for the Philippines.
+ Etc/Unknown is now reserved.
+
+ Changes to future timestamps
+
+ Paraguay will stop changing its clocks after the spring-forward
+ transition on 2024-10-06, so it is now permanently at -03.
+ (Thanks to Heitor David Pinto and Even Scharning.)
+ This affects timestamps starting 2025-03-22, as well as the
+ obsolescent tm_isdst flags starting 2024-10-15.
+
+ Changes to past timestamps
+
+ Correct timestamps for the Philippines before 1900, and from 1937
+ through 1990. (Thanks to P Chan for the heads-up and citations.)
+ This includes adjusting local mean time before 1899; fixing
+ transitions in September 1899, January 1937, and June 1954; adding
+ transitions in December 1941, November 1945, March and September
+ 1977, and May and July 1990; and removing incorrect transitions in
+ March and September 1978.
+
+ Changes to data
+
+ Add zone1970.tab lines for the Concordia and Eyre Bird Observatory
+ research stations. (Thanks to Derick Rethans and Jule Dabars.)
+
+ Changes to code
+
+ strftime %s now generates the correct numeric string even when the
+ represented number does not fit into time_t. This is better than
+ generating the numeric equivalent of (time_t) -1, as strftime did
+ in TZDB releases 96a (when %s was introduced) through 2020a and in
+ releases 2022b through 2024b. It is also better than failing and
+ returning 0, as strftime did in releases 2020b through 2022a.
+
+ strftime now outputs an invalid conversion specifier as-is,
+ instead of eliding the leading '%', which confused debugging.
+
+ An invalid TZ now generates the time zone abbreviation "-00", not
+ "UTC", to help the user see that an error has occurred. (Thanks
+ to Arthur David Olson for suggesting a "wrong result".)
+
+ mktime and timeoff no longer incorrectly fail merely because a
+ struct tm component near INT_MIN or INT_MAX overflows when a
+ lower-order component carries into it.
+
+ TZNAME_MAXIMUM, the maximum number of bytes in a proleptic TZ
+ string's time zone abbreviation, now defaults to 254 not 255.
+ This helps reduce the size of internal state from 25480 to 21384
+ on common platforms. This change should not be a problem, as
+ nobody uses such long "abbreviations" and the longstanding tzcode
+ maximum was 16 until release 2023a. For those who prefer no
+ arbitrary limits, you can now specify TZNAME_MAXIMUM values up to
+ PTRDIFF_MAX, a limit forced by C anyway; formerly tzcode silently
+ misbehaved unless TZNAME_MAXIMUM was less than INT_MAX.
+
+ tzset and related functions no longer leak a file descriptor if
+ another thread forks or execs at about the same time and if the
+ platform has O_CLOFORK and O_CLOEXEC respectively. Also, the
+ functions no longer let a TZif file become a controlling terminal.
+
+ 'zdump -' now reads TZif data from /dev/stdin.
+ (From a question by Arthur David Olson.)
+
+ Changes to documentation
+
+ The name Etc/Unknown is now reserved: it will not be used by TZDB.
+ This is for compatibility with CLDR, which uses the string
+ "Etc/Unknown" for an unknown or invalid timezone. (Thanks to
+ Justin Grant, Mark Davis, and Guy Harris.)
+
+ Cite Internet RFC 9636, which obsoletes RFC 8536 for TZif format.
+
+
Release 2024b - 2024-09-04 12:27:47 -0700
Briefly:
@@ -116,7 +194,7 @@ Release 2024b - 2024-09-04 12:27:47 -0700
Changes to commentary
Commentary about historical transitions in Portugal and her former
- colonies has been expanded with links to many relevant legislation.
+ colonies has been expanded with links to relevant legislation.
(Thanks to Tim Parenti.)
@@ -204,10 +282,10 @@ Release 2023d - 2023-12-21 20:02:24 -0800
changing its time zone from -01/+00 to -02/-01 at the same moment
as the spring-forward transition. Its clocks will therefore not
spring forward as previously scheduled. The time zone change
- reverts to its common practice before 1981.
+ reverts to its common practice before 1981. (Thanks to Jule Dabars.)
Fix predictions for DST transitions in Palestine in 2072-2075,
- correcting a typo introduced in 2023a.
+ correcting a typo introduced in 2023a. (Thanks to Jule Dabars.)
Changes to past and future timestamps
diff --git a/contrib/tzdata/antarctica b/contrib/tzdata/antarctica
index 8d5d6cd1cdd0..2e90a5e09d17 100644
--- a/contrib/tzdata/antarctica
+++ b/contrib/tzdata/antarctica
@@ -174,6 +174,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13
# France & Italy - year-round base
# Concordia, -750600+1232000, since 2005
+# https://en.wikipedia.org/wiki/Concordia_Station
+# Can use Asia/Singapore, which it has agreed with since inception.
# Germany - year-round base
# Neumayer III, -704080-0081602, since 2009
diff --git a/contrib/tzdata/asia b/contrib/tzdata/asia
index a2480b021225..d4eb058053ed 100644
--- a/contrib/tzdata/asia
+++ b/contrib/tzdata/asia
@@ -3665,21 +3665,70 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# be immediately followed by 1845-01-01; see R.H. van Gent's
# History of the International Date Line
# https://webspace.science.uu.nl/~gent0113/idl/idl_philippines.htm
-# The rest of the data entries are from Shanks & Pottenger.
-
-# From Jesper Nørgaard Welen (2006-04-26):
-# ... claims that Philippines had DST last time in 1990:
-# http://story.philippinetimes.com/p.x/ct/9/id/145be20cc6b121c0/cid/3e5bbccc730d258c/
-# [a story dated 2006-04-25 by Cris Larano of Dow Jones Newswires,
-# but no details]
-
-# From Paul Eggert (2014-08-14):
-# The following source says DST may be instituted November-January and again
-# March-June, but this is not definite. It also says DST was last proclaimed
-# during the Ramos administration (1992-1998); but again, no details.
-# Carcamo D. PNoy urged to declare use of daylight saving time.
-# Philippine Star 2014-08-05
-# http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time
+
+# From P Chan (2021-05-10):
+# Here's a fairly comprehensive article in Japanese:
+# https://wiki.suikawiki.org/n/Philippine%20Time
+# (2021-05-16):
+# According to the references listed in the article,
+# the periods that the Philippines (Manila) observed DST or used +9 are:
+#
+# 1936-10-31 24:00 to 1937-01-15 24:00
+# (Proclamation No. 104, Proclamation No. 126)
+# 1941-12-15 24:00 to 1945-11-30 24:00
+# (Proclamation No. 789, Proclamation No. 20)
+# 1954-04-11 24:00 to 1954-06-04 24:00
+# (Proclamation No. 13, Proclamation No. 33)
+# 1977-03-27 24:00 to 1977-09-21 24:00
+# (Proclamation No. 1629, Proclamation No. 1641)
+# 1990-05-21 00:00 to 1990-07-28 24:00
+# (National Emergency Memorandum Order No. 17, Executive Order No. 415)
+#
+# Proclamation No. 104 ... October 30, 1936
+# https://www.officialgazette.gov.ph/1936/10/30/proclamation-no-104-s-1936/
+# Proclamation No. 126 ... January 15, 1937
+# https://www.officialgazette.gov.ph/1937/01/15/proclamation-no-126-s-1937/
+# Proclamation No. 789 ... December 13, 1941
+# https://www.officialgazette.gov.ph/1941/12/13/proclamation-no-789-s-1941/
+# Proclamation No. 20 ... November 11, 1945
+# https://www.officialgazette.gov.ph/1945/11/11/proclamation-no-20-s-1945/
+# Proclamation No. 13 ... April 6, 1954
+# https://www.officialgazette.gov.ph/1954/04/06/proclamation-no-13-s-1954/
+# Proclamation No. 33 ... June 3, 1954
+# https://www.officialgazette.gov.ph/1954/06/03/proclamation-no-33-s-1954/
+# Proclamation No. 1629 ... March 25, 1977
+# https://www.officialgazette.gov.ph/1977/03/25/proclamation-no-1629-s-1977/
+# Proclamation No. 1641 ...May 26, 1977
+# https://www.officialgazette.gov.ph/1977/05/26/proclamation-no-1641-s-1977/
+# National Emergency Memorandum Order No. 17 ... May 2, 1990
+# https://www.officialgazette.gov.ph/1990/05/02/national-emergency-memorandum-order-no-17-s-1990/
+# Executive Order No. 415 ... July 20, 1990
+# https://www.officialgazette.gov.ph/1990/07/20/executive-order-no-415-s-1990/
+#
+# During WWII, Proclamation No. 789 fixed two periods of DST. The first period
+# was set to continue only until January 31, 1942. But Manila was occupied by
+# the Japanese earlier in the month....
+#
+# For the date of the adoption of standard time, Shank[s] gives 1899-05-11.
+# The article is not able to state the basis of that. I guess it was based on
+# a US War Department Circular issued on that date.
+# https://books.google.com/books?id=JZ1PAAAAYAAJ&pg=RA3-PA8
+#
+# However, according to other sources, standard time was adopted on
+# 1899-09-06. Also, the LMT was GMT+8:03:52
+# https://books.google.com/books?id=MOYIAQAAIAAJ&pg=PA521
+# https://books.google.com/books?id=lSnqqatpYikC&pg=PA21
+#
+# From Paul Eggert (2024-09-05):
+# The penultimate URL in P Chan's email refers to page 521 of
+# Selga M, The Time Service in the Philippines.
+# Proc Pan-Pacific Science Congress. Vol. 1 (1923), 519-532.
+# It says, "The change from the meridian 120° 58' 04" to the 120th implied a
+# change of 3 min. 52s.26 in time; consequently on 6th September, 1899,
+# Manila Observatory gave the noon signal 3 min. 52s.26 later than before".
+#
+# Wikipedia says the US declared Manila liberated on March 4, 1945;
+# this doesn't affect clocks, just our time zone abbreviation and DST flag.
# From Paul Goyette (2018-06-15) with URLs updated by Guy Harris (2024-02-15):
# In the Philippines, there is a national law, Republic Act No. 10535
@@ -3697,24 +3746,26 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# influence of the sources. There is no current abbreviation for DST,
# so use "PDT", the usual American style.
-# From P Chan (2021-05-10):
-# Here's a fairly comprehensive article in Japanese:
-# https://wiki.suikawiki.org/n/Philippine%20Time
-# From Paul Eggert (2021-05-10):
-# The info in the Japanese table has not been absorbed (yet) below.
-
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Phil 1936 only - Nov 1 0:00 1:00 D
-Rule Phil 1937 only - Feb 1 0:00 0 S
-Rule Phil 1954 only - Apr 12 0:00 1:00 D
-Rule Phil 1954 only - Jul 1 0:00 0 S
-Rule Phil 1978 only - Mar 22 0:00 1:00 D
-Rule Phil 1978 only - Sep 21 0:00 0 S
+Rule Phil 1936 only - Oct 31 24:00 1:00 D
+Rule Phil 1937 only - Jan 15 24:00 0 S
+Rule Phil 1941 only - Dec 15 24:00 1:00 D
+# The following three rules were canceled by Japan:
+#Rule Phil 1942 only - Jan 31 24:00 0 S
+#Rule Phil 1942 only - Mar 1 0:00 1:00 D
+#Rule Phil 1942 only - Jun 30 24:00 0 S
+Rule Phil 1945 only - Nov 30 24:00 0 S
+Rule Phil 1954 only - Apr 11 24:00 1:00 D
+Rule Phil 1954 only - Jun 4 24:00 0 S
+Rule Phil 1977 only - Mar 27 24:00 1:00 D
+Rule Phil 1977 only - Sep 21 24:00 0 S
+Rule Phil 1990 only - May 21 0:00 1:00 D
+Rule Phil 1990 only - Jul 28 24:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
- 8:04:00 - LMT 1899 May 11
- 8:00 Phil P%sT 1942 May
- 9:00 - JST 1944 Nov
+Zone Asia/Manila -15:56:08 - LMT 1844 Dec 31
+ 8:03:52 - LMT 1899 Sep 6 4:00u
+ 8:00 Phil P%sT 1942 Feb 11 24:00
+ 9:00 - JST 1945 Mar 4
8:00 Phil P%sT
# Bahrain
diff --git a/contrib/tzdata/australasia b/contrib/tzdata/australasia
index 359f9c1f1e10..405944536cd3 100644
--- a/contrib/tzdata/australasia
+++ b/contrib/tzdata/australasia
@@ -1239,10 +1239,10 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# The 1992 ending date used in the rules is a best guess;
# it matches what was used in the past.
-# The Australian Bureau of Meteorology FAQ
-# http://www.bom.gov.au/faq/faqgen.htm
-# (1999-09-27) writes that Giles Meteorological Station uses
-# South Australian time even though it's located in Western Australia.
+# From Christopher Hunt (2006-11-21), after an advance warning
+# from Jesper Nørgaard Welen (2006-11-01):
+# WA are trialing DST for three years.
+# http://www.parliament.wa.gov.au/parliament/bills.nsf/9A1B183144403DA54825721200088DF1/$File/Bill175-1B.pdf
# From Paul Eggert (2018-04-01):
# The Guardian Express of Perth, Australia reported today that the
@@ -1254,54 +1254,10 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# https://www.communitynews.com.au/guardian-express/news/exclusive-daylight-savings-coming-wa-summer-2018/
# [The article ends with "Today's date is April 1."]
-# Queensland
-
-# From Paul Eggert (2018-02-26):
-# I lack access to the following source for Queensland DST:
-# Pearce C. History of daylight saving time in Queensland.
-# Queensland Hist J. 2017 Aug;23(6):389-403
-# https://search.informit.com.au/documentSummary;dn=994682348436426;res=IELHSS
-
-# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
-# # The state of QUEENSLAND.. [ Courtesy Qld. Dept Premier Econ&Trade Devel ]
-# # [ Dec 1990 ]
-# ...
-# Zone Australia/Queensland 10:00 AQ %sST
-# ...
-# Rule AQ 1971 only - Oct lastSun 2:00 1:00 D
-# Rule AQ 1972 only - Feb lastSun 3:00 0 E
-# Rule AQ 1989 max - Oct lastSun 2:00 1:00 D
-# Rule AQ 1990 max - Mar Sun>=1 3:00 0 E
-
-# From Bradley White (1989-12-24):
-# "Australia/Queensland" now observes daylight time (i.e. from
-# October 1989).
-
-# From Bradley White (1991-03-04):
-# A recent excerpt from an Australian newspaper...
-# ...Queensland...[has] agreed to end daylight saving
-# at 3am tomorrow (March 3)...
-
-# From John Mackin (1991-03-06):
-# I can certainly confirm for my part that Daylight Saving in NSW did in fact
-# end on Sunday, 3 March. I don't know at what hour, though. (It surprised
-# me.)
-
-# From Bradley White (1992-03-08):
-# ...there was recently a referendum in Queensland which resulted
-# in the experimental daylight saving system being abandoned. So, ...
-# ...
-# Rule QLD 1989 1991 - Oct lastSun 2:00 1:00 D
-# Rule QLD 1990 1992 - Mar Sun>=1 3:00 0 S
-# ...
-
-# From Arthur David Olson (1992-03-08):
-# The chosen rules the union of the 1971/1972 change and the 1989-1992 changes.
-
-# From Christopher Hunt (2006-11-21), after an advance warning
-# from Jesper Nørgaard Welen (2006-11-01):
-# WA are trialing DST for three years.
-# http://www.parliament.wa.gov.au/parliament/bills.nsf/9A1B183144403DA54825721200088DF1/$File/Bill175-1B.pdf
+# The Australian Bureau of Meteorology FAQ
+# http://www.bom.gov.au/faq/faqgen.htm
+# (1999-09-27) writes that Giles Meteorological Station uses
+# South Australian time even though it's located in Western Australia.
# From Rives McDow (2002-04-09):
# The most interesting region I have found consists of three towns on the
@@ -1359,6 +1315,59 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# For lack of better info, assume the tradition dates back to the
# introduction of standard time in 1895.
+# From Stuart Bishop (2024-11-12):
+# An article discussing the in-use but technically unofficial timezones
+# in the Western Australian portion of the Nullarbor Plain.
+# https://www.abc.net.au/news/2024-11-22/outback-wa-properties-strange-time-zones/104542494
+# From Paul Eggert (2024-11-12):
+# As the article says, the Eyre Bird Observatory and nearby sheep stations
+# can use Tokyo time. Other possibilities include Asia/Chita, Asia/Seoul,
+# and Asia/Jayapura.
+
+# Queensland
+
+# From Paul Eggert (2018-02-26):
+# I lack access to the following source for Queensland DST:
+# Pearce C. History of daylight saving time in Queensland.
+# Queensland Hist J. 2017 Aug;23(6):389-403
+# https://search.informit.com.au/documentSummary;dn=994682348436426;res=IELHSS
+
+# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
+# # The state of QUEENSLAND.. [ Courtesy Qld. Dept Premier Econ&Trade Devel ]
+# # [ Dec 1990 ]
+# ...
+# Zone Australia/Queensland 10:00 AQ %sST
+# ...
+# Rule AQ 1971 only - Oct lastSun 2:00 1:00 D
+# Rule AQ 1972 only - Feb lastSun 3:00 0 E
+# Rule AQ 1989 max - Oct lastSun 2:00 1:00 D
+# Rule AQ 1990 max - Mar Sun>=1 3:00 0 E
+
+# From Bradley White (1989-12-24):
+# "Australia/Queensland" now observes daylight time (i.e. from
+# October 1989).
+
+# From Bradley White (1991-03-04):
+# A recent excerpt from an Australian newspaper...
+# ...Queensland...[has] agreed to end daylight saving
+# at 3am tomorrow (March 3)...
+
+# From John Mackin (1991-03-06):
+# I can certainly confirm for my part that Daylight Saving in NSW did in fact
+# end on Sunday, 3 March. I don't know at what hour, though. (It surprised
+# me.)
+
+# From Bradley White (1992-03-08):
+# ...there was recently a referendum in Queensland which resulted
+# in the experimental daylight saving system being abandoned. So, ...
+# ...
+# Rule QLD 1989 1991 - Oct lastSun 2:00 1:00 D
+# Rule QLD 1990 1992 - Mar Sun>=1 3:00 0 S
+# ...
+
+# From Arthur David Olson (1992-03-08):
+# The chosen rules the union of the 1971/1972 change and the 1989-1992 changes.
+
# southeast Australia
#
diff --git a/contrib/tzdata/checknow.awk b/contrib/tzdata/checknow.awk
index 8b7881d2e27f..450490ee3768 100644
--- a/contrib/tzdata/checknow.awk
+++ b/contrib/tzdata/checknow.awk
@@ -44,7 +44,7 @@ BEGIN {
END {
for (zone in zone_data) {
data = zone_data[zone]
- if (!zonenow[data]) {
+ if (data && !zonenow[data]) {
printf "Zone table should have one of:%s\n", zones[data]
zonenow[data] = zone # This suppresses duplicate diagnostics.
status = 1
diff --git a/contrib/tzdata/checktab.awk b/contrib/tzdata/checktab.awk
index 9a26e4655ddb..5fa60556be13 100644
--- a/contrib/tzdata/checktab.awk
+++ b/contrib/tzdata/checktab.awk
@@ -9,6 +9,19 @@ BEGIN {
if (!zone_table) zone_table = "zone1970.tab"
if (!want_warnings) want_warnings = -1
+ monthabbr["Jan"] = 1
+ monthabbr["Feb"] = 1
+ monthabbr["Mar"] = 1
+ monthabbr["Apr"] = 1
+ monthabbr["May"] = 1
+ monthabbr["Jun"] = 1
+ monthabbr["Jul"] = 1
+ monthabbr["Aug"] = 1
+ monthabbr["Sep"] = 1
+ monthabbr["Oct"] = 1
+ monthabbr["Nov"] = 1
+ monthabbr["Dec"] = 1
+
while (getline >"/dev/stderr"
+ status = 1
+ }
} else {
+ stdoff = $1
ruleUsed[$2] = 1
if ($3 ~ /%/) rulePercentUsed[$2] = 1
}
+
+ if (stdoff && stdoff !~ /^\-?1?[0-9](:[0-5][0-9](:[0-5][0-9])?)?$/) {
+ printf "%s:%d: unlikely STDOFF: %s\n", FILENAME, FNR, stdoff \
+ >>"/dev/stderr"
+ status = 1
+ }
+
if (tz && tz ~ /\// && tz !~ /^Etc\//) {
if (!tztab[tz] && FILENAME != "backward" \
&& zone_table != "zonenow.tab") {
diff --git a/contrib/tzdata/etcetera b/contrib/tzdata/etcetera
index a5ecd6de1f6e..948531c8d862 100644
--- a/contrib/tzdata/etcetera
+++ b/contrib/tzdata/etcetera
@@ -51,6 +51,10 @@ Link Etc/GMT GMT
# so we moved the names into the Etc subdirectory.
# Also, the time zone abbreviations are now compatible with %z.
+# There is no "Etc/Unknown" entry, as CLDR says that "Etc/Unknown"
+# corresponds to an unknown or invalid time zone, and things would get
+# confusing if Etc/Unknown were made valid here.
+
Zone Etc/GMT-14 14 - %z
Zone Etc/GMT-13 13 - %z
Zone Etc/GMT-12 12 - %z
diff --git a/contrib/tzdata/europe b/contrib/tzdata/europe
index f9063949eb83..df334fc27c1d 100644
--- a/contrib/tzdata/europe
+++ b/contrib/tzdata/europe
@@ -1147,7 +1147,7 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn
# However, Greenland will change to Daylight Saving Time again in 2024
# and onwards.
-# From a contributor who wishes to remain anonymous for now (2023-10-29):
+# From Jule Dabars (2023-10-29):
# https://www.dr.dk/nyheder/seneste/i-nat-skal-uret-stilles-en-time-tilbage-men-foerste-gang-sker-det-ikke-i-groenland
# with a link to that page:
# https://naalakkersuisut.gl/Nyheder/2023/10/2710_sommertid
diff --git a/contrib/tzdata/factory b/contrib/tzdata/factory
index d116a115990e..14faf52a792e 100644
--- a/contrib/tzdata/factory
+++ b/contrib/tzdata/factory
@@ -8,5 +8,15 @@
# time zone abbreviation "-00", indicating that the actual time zone
# is unknown.
+# TZ="Factory" was added to TZDB in 1989, and in 2016 its abbreviation
+# was changed to "-00" from a longish English-language error message.
+# Around 2010, CLDR added "Etc/Unknown" for use with TZDB, to stand
+# for an unknown or invalid time zone. These two notions differ:
+# TZ="Factory" is a valid timezone, so tzalloc("Factory") succeeds, whereas
+# TZ="Etc/Unknown" is invalid and tzalloc("Etc/Unknown") fails.
+# Also, a downstream distributor could modify Factory to be a
+# default timezone suitable for the devices it manufactures,
+# whereas that cannot happen for Etc/Unknown.
+
# Zone NAME STDOFF RULES FORMAT
Zone Factory 0 - "Local time zone must be set--use tzsetup"
diff --git a/contrib/tzdata/leap-seconds.list b/contrib/tzdata/leap-seconds.list
index da0efc8c8566..6f861c888d75 100644
--- a/contrib/tzdata/leap-seconds.list
+++ b/contrib/tzdata/leap-seconds.list
@@ -60,15 +60,15 @@
#
# The following line shows the last update of this file in NTP timestamp:
#
-#$ 3929093563
+#$ 3945196800
#
# 2) Expiration date of the file given on a semi-annual basis: last June or last December
#
-# File expires on 28 June 2025
+# File expires on 28 December 2025
#
# Expire date in NTP timestamp:
#
-#@ 3960057600
+#@ 3975868800
#
#
# LIST OF LEAP SECONDS
@@ -117,4 +117,4 @@
# please see the readme file in the 'source' directory :
# https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README
#
-#h be738595 57b0cf1b b0218343 fb77062f 5a775e7
+#h 848434d5 570f7ea8 d79ba227 a00fc821 f608e2d4
diff --git a/contrib/tzdata/leapseconds b/contrib/tzdata/leapseconds
index 6c715cb20b01..76f771427f25 100644
--- a/contrib/tzdata/leapseconds
+++ b/contrib/tzdata/leapseconds
@@ -69,11 +69,11 @@ Leap 2016 Dec 31 23:59:60 + S
# Any additional leap seconds will come after this.
# This Expires line is commented out for now,
# so that pre-2020a zic implementations do not reject this file.
-#Expires 2025 Jun 28 00:00:00
+#Expires 2025 Dec 28 00:00:00
# POSIX timestamps for the data in this file:
-#updated 1720104763 (2024-07-04 14:52:43 UTC)
-#expires 1751068800 (2025-06-28 00:00:00 UTC)
+#updated 1736208000 (2025-01-07 00:00:00 UTC)
+#expires 1766880000 (2025-12-28 00:00:00 UTC)
# Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat)
-# File expires on 28 June 2025
+# File expires on 28 December 2025
diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica
index 01f392e0e6a4..8d356aa0069d 100644
--- a/contrib/tzdata/northamerica
+++ b/contrib/tzdata/northamerica
@@ -27,9 +27,12 @@
# in New York City (1869-10). His 1870 proposal was based on Washington, DC,
# but in 1872-05 he moved the proposed origin to Greenwich.
-# From Paul Eggert (2018-03-20):
+# From Paul Eggert (2024-11-18):
# Dowd's proposal left many details unresolved, such as where to draw
-# lines between time zones. The key individual who made time zones
+# lines between time zones. Sandford Fleming of the Canadian Pacific Railway
+# argued for Dowd's proposal in 1876, and Cleveland Abbe of the American
+# Meteorology Society published a report in 1879 recommending four US time
+# zones based on GMT. However, the key individual who made time zones
# work in the US was William Frederick Allen - railway engineer,
# managing editor of the Travelers' Guide, and secretary of the
# General Time Convention, a railway standardization group. Allen
@@ -2631,7 +2634,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# http://puentelibre.mx/noticia/ciudad_juarez_cambio_horario_noviembre_2022/
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Mexico 1931 only - April 30 0:00 1:00 D
+Rule Mexico 1931 only - Apr 30 0:00 1:00 D
Rule Mexico 1931 only - Oct 1 0:00 0 S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
Rule Mexico 1939 only - Jun 25 0:00 0 S
diff --git a/contrib/tzdata/southamerica b/contrib/tzdata/southamerica
index c8d9097aeb14..1fcf65146785 100644
--- a/contrib/tzdata/southamerica
+++ b/contrib/tzdata/southamerica
@@ -1687,7 +1687,7 @@ Rule Para 2005 2009 - Mar Sun>=8 0:00 0 -
# and that on the first Sunday of the month of October, it is to be set
# forward 60 minutes, in all the territory of the Paraguayan Republic.
# ...
-Rule Para 2010 max - Oct Sun>=1 0:00 1:00 -
+Rule Para 2010 2024 - Oct Sun>=1 0:00 1:00 -
Rule Para 2010 2012 - Apr Sun>=8 0:00 0 -
#
# From Steffen Thorsen (2013-03-07):
@@ -1706,14 +1706,35 @@ Rule Para 2010 2012 - Apr Sun>=8 0:00 0 -
# https://www.abc.com.py/politica/2023/07/12/promulgacion-el-cambio-de-hora-sera-por-ley/
# From Carlos Raúl Perasso (2023-07-27):
# http://silpy.congreso.gov.py/descarga/ley-144138
-Rule Para 2013 max - Mar Sun>=22 0:00 0 -
+Rule Para 2013 2024 - Mar Sun>=22 0:00 0 -
+#
+# From Heitor David Pinto (2024-09-24):
+# Today the Congress of Paraguay passed a bill to observe UTC-3 permanently....
+# The text of the bill says that it would enter into force on the first
+# Sunday in October 2024, the same date currently scheduled to start DST....
+# https://silpy.congreso.gov.py/web/expediente/132531
+# (2024-10-14):
+# The president approved the law on 11 October 2024,
+# and it was officially published on 14 October 2024.
+# https://www.gacetaoficial.gov.py/index/detalle_publicacion/89723
+# The text of the law says that it enters into force on the first
+# Sunday in October 2024 (6 October 2024). But the constitution
+# prohibits retroactive effect, and the civil code says that laws
+# enter into force on the day after their publication or on the day
+# that they specify, and it also says that they don't have retroactive
+# effect. So I think that the time change on 6 October 2024 should
+# still be considered as DST according to the previous law, and
+# permanently UTC-3 from 15 October 2024 according to the new law....
+# https://www.constituteproject.org/constitution/Paraguay_2011
+# https://www.oas.org/dil/esp/codigo_civil_paraguay.pdf
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Asuncion -3:50:40 - LMT 1890
-3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time
-4:00 - %z 1972 Oct
-3:00 - %z 1974 Apr
- -4:00 Para %z
+ -4:00 Para %z 2024 Oct 15
+ -3:00 - %z
# Peru
#
diff --git a/contrib/tzdata/theory.html b/contrib/tzdata/theory.html
index d3573ede0dfb..352a3d87078f 100644
--- a/contrib/tzdata/theory.html
+++ b/contrib/tzdata/theory.html
@@ -123,8 +123,9 @@ If geolocation information is available, a selection interface can
locate the user on a timezone map or prioritize names that are
geographically close. For an example selection interface, see the
tzselect
program in the tz
code.
-The Unicode Common Locale Data
-Repository contains data that may be useful for other selection
+Unicode's Common Locale Data
+Repository (CLDR)
+contains data that may be useful for other selection
interfaces; it maps timezone names like Europe/Prague
to
locale-dependent strings like "Prague", "Praha", "Прага", and "布拉格".
@@ -200,6 +201,8 @@ in decreasing order of importance:
A name must not be empty, or contain '//
', or
start or end with '/
'.
+ Also, a name must not be 'Etc/Unknown
', as
+ CLDR uses that string for an unknown or invalid timezone.
Do not use names that differ only in case.
@@ -220,10 +223,18 @@ in decreasing order of importance:
do not need locations, since local time is not defined there.
- If all the clocks in a timezone have agreed since 1970,
- do not bother to include more than one timezone
- even if some of the clocks disagreed before 1970.
+ If all clocks in a region have agreed since 1970,
+ give them just one name even if some of the clocks disagreed before 1970,
+ or reside in different countries or in notable or faraway locations.
Otherwise these tables would become annoyingly large.
+ For example, do not create a name Indian/Crozet
+ as a near-duplicate or alias of Asia/Dubai
+ merely because they are different countries or territories,
+ or their clocks disagreed before 1970, or the
+ Crozet Islands
+ are notable in their own right,
+ or the Crozet Islands are not adjacent to other locations
+ that use Asia/Dubai
.
If boundaries between regions are fluid, such as during a war or
@@ -579,10 +590,10 @@ in decreasing order of importance:
locations while uninhabited.
The leading '-
' is a flag that the UT offset is in
some sense undefined; this notation is derived
- from Internet
+ from Internet
RFC 3339.
(The abbreviation 'Z' that
- Internet
+ Internet
RFC 9557 uses for this concept
would violate the POSIX requirement
of at least three characters in an abbreviation.)
@@ -1115,8 +1126,8 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations:
the name of a file from which time-related information is read.
The file's format is TZif,
a timezone information format that contains binary data; see
- Internet
- RFC 8536.
+ Internet
+ RFC 9636.
The daylight saving time rules to be used for a
particular timezone are encoded in the
TZif file; the format of the file allows US,
@@ -1201,12 +1212,15 @@ The vestigial APIs are:
The tm_isdst
member is almost never needed and most of
its uses should be discouraged in favor of the abovementioned
APIs.
+ It was intended as an index into the tzname
variable,
+ but as mentioned previously that usage is obsolete.
Although it can still be used in arguments to
mktime
to disambiguate timestamps near
a DST transition when the clock jumps back on
platforms lacking tm_gmtoff
, this
- disambiguation does not work when standard time itself jumps back,
- which can occur when a location changes to a time zone with a
+ disambiguation works only for proleptic TZ
strings;
+ it does not work in general for geographical timezones,
+ such as when a location changes to a time zone with a
lesser UT offset.
@@ -1223,8 +1237,8 @@ The vestigial APIs are:
Programs that in the past used the timezone
function
may now examine localtime(&clock)->tm_zone
(if TM_ZONE
is defined) or
- tzname[localtime(&clock)->tm_isdst]
- (if HAVE_TZNAME
is nonzero) to learn the correct time
+ use strftime
with a %Z
conversion specification
+ to learn the correct time
zone abbreviation to use.
diff --git a/contrib/tzdata/version b/contrib/tzdata/version
index 699e50d4d38e..0846b7f265fa 100644
--- a/contrib/tzdata/version
+++ b/contrib/tzdata/version
@@ -1 +1 @@
-2024b
+2025a
diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab
index bfc0b5933044..d2be66359f3b 100644
--- a/contrib/tzdata/zone.tab
+++ b/contrib/tzdata/zone.tab
@@ -310,7 +310,7 @@ PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
PG -0930+14710 Pacific/Port_Moresby most of Papua New Guinea
PG -0613+15534 Pacific/Bougainville Bougainville
-PH +1435+12100 Asia/Manila
+PH +143512+1205804 Asia/Manila
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
PM +4703-05620 America/Miquelon
diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab
index 764215888efa..3a5a71c508d4 100644
--- a/contrib/tzdata/zone1970.tab
+++ b/contrib/tzdata/zone1970.tab
@@ -184,7 +184,7 @@ IR +3540+05126 Asia/Tehran
IT,SM,VA +4154+01229 Europe/Rome
JM +175805-0764736 America/Jamaica
JO +3157+03556 Asia/Amman
-JP +353916+1394441 Asia/Tokyo
+JP,AU +353916+1394441 Asia/Tokyo Eyre Bird Observatory
KE,DJ,ER,ET,KM,MG,SO,TZ,UG,YT -0117+03649 Africa/Nairobi
KG +4254+07436 Asia/Bishkek
KI,MH,TV,UM,WF +0125+17300 Pacific/Tarawa Gilberts, Marshalls, Wake
@@ -247,7 +247,7 @@ PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
PG,AQ,FM -0930+14710 Pacific/Port_Moresby Papua New Guinea (most areas), Chuuk, Yap, Dumont d'Urville
PG -0613+15534 Pacific/Bougainville Bougainville
-PH +1435+12100 Asia/Manila
+PH +143512+1205804 Asia/Manila
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
PM +4703-05620 America/Miquelon
@@ -294,7 +294,7 @@ RU +6445+17729 Asia/Anadyr MSK+09 - Bering Sea
SA,AQ,KW,YE +2438+04643 Asia/Riyadh Syowa
SB,FM -0932+16012 Pacific/Guadalcanal Pohnpei
SD +1536+03232 Africa/Khartoum
-SG,MY +0117+10351 Asia/Singapore peninsular Malaysia
+SG,AQ,MY +0117+10351 Asia/Singapore peninsular Malaysia, Concordia
SR +0550-05510 America/Paramaribo
SS +0451+03137 Africa/Juba
ST +0020+00644 Africa/Sao_Tome
diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab
index 01f536b3ba38..d2c1e48584f8 100644
--- a/contrib/tzdata/zonenow.tab
+++ b/contrib/tzdata/zonenow.tab
@@ -97,9 +97,6 @@ XX +1828-06954 America/Santo_Domingo Atlantic Standard ("AST") - eastern Caribbe
# -04/-03 (Chile DST)
XX -3327-07040 America/Santiago most of Chile
#
-# -04/-03 (Paraguay DST)
-XX -2516-05740 America/Asuncion Paraguay
-#
# -04/-03 - AST/ADT (North America DST)
XX +4439-06336 America/Halifax Atlantic ("AST/ADT") - Canada; Bermuda
#
@@ -224,7 +221,7 @@ XX +1345+10031 Asia/Bangkok Russia; Indochina; Christmas Island
XX -0610+10648 Asia/Jakarta Indonesia ("WIB")
#
# +08
-XX +0117+10351 Asia/Singapore Russia; Brunei; Malaysia; Singapore
+XX +0117+10351 Asia/Singapore Russia; Brunei; Malaysia; Singapore; Concordia
#
# +08 - AWST
XX -3157+11551 Australia/Perth Western Australia ("AWST")
*** 18 LINES SKIPPED ***
From nobody Mon Jan 20 00:26:44 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YbrkD3mdtz5lvyX;
Mon, 20 Jan 2025 00:26:44 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YbrkD2rJSz3dNB;
Mon, 20 Jan 2025 00:26:44 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737332804;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=o6tqkhbKoSAj7/uJCtDyMudSuAVvg/8mDUHT+q0jbfE=;
b=RS4YMwvymyholJkWYAV9ZEJQiDd/kiUXSb7Nm9PMQIs2dDQPcZevmD5b5JymigYivUvEwe
nV/79zVSLEaw2zJEpNs+viW8yKMNuRmdk7Yy5nNPztWPjN37OrXiEXepbjAhm1sy88PuZh
0JdU7DokLtqZZGpolqze88fwIlOUJ0tzikfRxNieqL2OtZlK0NYICzNVfZOskx4uIAqkPL
uLd7ijpZ/jTVa0Nza5mNBM3DrKyJ2P+lwtG6l4eMYvLk8tBo/UBtdIbtLEWLLT5+vtoaq4
V9kGcP6Y3CzOiiO8ra7OOGbTLGG5hf1P+BQIHF785mB3ZPXkV4ifqbQnS34Pxw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737332804;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=o6tqkhbKoSAj7/uJCtDyMudSuAVvg/8mDUHT+q0jbfE=;
b=IbewTKrqsWeRrllB+NG+Zv3kPIO66ASptwhcXBTJtrdFIOnzj2Orr9M+0lIpUDns9ohwir
vlmBsXqiWRIZb+qXnP181gqDGdDFtNxLelmPsxOceyd+6RBXkUBr3H3Lf/JArY50/3RaNb
dnuKoAq1bOQunbFiE28PTPjg7X2mwPr664bj/xmzMt6O3InbkywPcWfifBWa6FI4XNcEzt
jxQWM/MqyQS9XHfjI79suNUuiPgyjNW/wwylnVGUAhP2Ncl36k2ngvyDSQUThpAJSEg68M
Dthe0UJq8/8lyddLh6FIbIzyig2ppffQc2a8gEz3MeGmu1MJFEGk8kaklDPDBw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737332804; a=rsa-sha256; cv=none;
b=rG3YLek953EhAQzTtxo069rKEGh5mwVj545L1wm9M+Pi5f2Y/l7bpptyYSbY3/zJP3ts2N
Ad59/ZPs6un8hMzwc3czwH8/SjsPeaNFmsMKQDt6uTZV80aQxE4AprDDG9rl4ckgvGM8Nm
GW2+gykNPIfq75iUyPFbTObOOjogfURAmTkDBnS1+Yt9Ef8S0y/oemeGSGSPj6tMh6Rcam
GYXYMBY2pALwmLg7EfxH459GNbXHoDubRK4N6Oc6GToSx2e437nWLeoz4Y68i5z+CtEse4
1taAxT6eH3ExzxlMlwMPRj9TbTmiVXy+pp33LF2EmpxJ/Gj0luvjEZV3IVIdEg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YbrkD2NMfz1Bcw;
Mon, 20 Jan 2025 00:26:44 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K0QiUN018524;
Mon, 20 Jan 2025 00:26:44 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K0Qi4a018520;
Mon, 20 Jan 2025 00:26:44 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:26:44 GMT
Message-Id: <202501200026.50K0Qi4a018520@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Philip Paeps
Subject: git: 2d6dcb4f97f8 - stable/13 - contrib/tzdata: import
tzdata 2025a
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: philip
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 2d6dcb4f97f89376189f39b700459c72fe7a2678
Auto-Submitted: auto-generated
The branch stable/13 has been updated by philip:
URL: https://cgit.FreeBSD.org/src/commit/?id=2d6dcb4f97f89376189f39b700459c72fe7a2678
commit 2d6dcb4f97f89376189f39b700459c72fe7a2678
Author: Philip Paeps
AuthorDate: 2025-01-17 01:33:46 +0000
Commit: Philip Paeps
CommitDate: 2025-01-20 00:26:07 +0000
contrib/tzdata: import tzdata 2025a
Changes: https://github.com/eggert/tz/blob/2025a/NEWS
(cherry picked from commit 46226b0162ba03986b1de2c790804b37dd8e64d6)
---
contrib/tzdata/Makefile | 32 +++++------
contrib/tzdata/NEWS | 84 +++++++++++++++++++++++++++--
contrib/tzdata/antarctica | 2 +
contrib/tzdata/asia | 113 ++++++++++++++++++++++++++++-----------
contrib/tzdata/australasia | 113 +++++++++++++++++++++------------------
contrib/tzdata/checknow.awk | 2 +-
contrib/tzdata/checktab.awk | 39 +++++++++++++-
contrib/tzdata/etcetera | 4 ++
contrib/tzdata/europe | 2 +-
contrib/tzdata/factory | 10 ++++
contrib/tzdata/leap-seconds.list | 8 +--
contrib/tzdata/leapseconds | 8 +--
contrib/tzdata/northamerica | 9 ++--
contrib/tzdata/southamerica | 27 ++++++++--
contrib/tzdata/theory.html | 40 +++++++++-----
contrib/tzdata/version | 2 +-
contrib/tzdata/zone.tab | 2 +-
contrib/tzdata/zone1970.tab | 6 +--
contrib/tzdata/zonenow.tab | 9 ++--
19 files changed, 369 insertions(+), 143 deletions(-)
diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile
index 0087b4596515..2130582c2deb 100644
--- a/contrib/tzdata/Makefile
+++ b/contrib/tzdata/Makefile
@@ -137,7 +137,7 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
uint_least64_t.ck
# What kind of TZif data files to generate. (TZif is the binary time
-# zone data format that zic generates; see Internet RFC 8536.)
+# zone data format that zic generates; see Internet RFC 9636.)
# If you want only POSIX time, with time values interpreted as
# seconds since the epoch (not counting leap seconds), use
# REDO= posix_only
@@ -255,6 +255,7 @@ LDLIBS=
# -DHAVE_UNISTD_H=0 if does not work*
# -DHAVE_UTMPX_H=0 if does not work*
# -Dlocale_t=XXX if your system uses XXX instead of locale_t
+# -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
# -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
# Typically it is better to use a later standard. For example,
# with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
@@ -262,7 +263,7 @@ LDLIBS=
# feature (integers at least 64 bits wide) and maybe more.
# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
# with external linkage, e.g., applications cannot define 'localtime'.
-# -Dssize_t=long on hosts like MS-Windows that lack ssize_t
+# -Dssize_t=int on hosts like MS-Windows that lack ssize_t
# -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
# Although -DSUPPORT_C89=0 might work around latent bugs in callers,
# it does not conform to POSIX.
@@ -285,7 +286,7 @@ LDLIBS=
# This mishandles some past timestamps, as US DST rules have changed.
# It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
# as Europe and US DST rules differ.
-# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255)
+# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254)
# -DUNINIT_TRAP if reading uninitialized storage can cause problems
# other than simply getting garbage data
# -DUSE_LTZ=0 to build zdump with the system time zone library
@@ -319,7 +320,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
$(GCC_INSTRUMENT) \
-Wall -Wextra \
-Walloc-size-larger-than=100000 -Warray-bounds=2 \
- -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
+ -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \
+ -Wdate-time \
-Wdeclaration-after-statement -Wdouble-promotion \
-Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
-Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
@@ -336,7 +338,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
-Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
-Wvariadic-macros -Wvla -Wwrite-strings \
- -Wno-format-nonliteral -Wno-sign-compare
+ -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
@@ -614,8 +616,8 @@ TZS_YEAR= 2050
TZS_CUTOFF_FLAG= -c $(TZS_YEAR)
TZS= to$(TZS_YEAR).tzs
TZS_NEW= to$(TZS_YEAR)new.tzs
-TZS_DEPS= $(YDATA) asctime.c localtime.c \
- private.h tzfile.h zdump.c zic.c
+TZS_DEPS= $(YDATA) localtime.c private.h \
+ strftime.c tzfile.h zdump.c zic.c
TZDATA_DIST = $(COMMON) $(DATA) $(MISC)
# EIGHT_YARDS is just a yard short of the whole ENCHILADA.
EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi
@@ -855,10 +857,10 @@ tzselect: tzselect.ksh version
chmod +x $@.out
mv $@.out $@
-check: check_mild back.ck
+check: check_mild back.ck now.ck
check_mild: check_web check_zishrink \
character-set.ck white-space.ck links.ck mainguard.ck \
- name-lengths.ck now.ck slashed-abbrs.ck sorted.ck \
+ name-lengths.ck slashed-abbrs.ck sorted.ck \
tables.ck ziguard.ck tzs.ck
# True if UTF8_LOCALE does not work;
@@ -1103,7 +1105,7 @@ set-timestamps.out: $(EIGHT_YARDS)
touch -md @1 test.out; then \
rm -f test.out && \
for file in $$files; do \
- if git diff --quiet $$file; then \
+ if git diff --quiet HEAD $$file; then \
time=$$(TZ=UTC0 git log -1 \
--format='tformat:%cd' \
--date='format:%Y-%m-%dT%H:%M:%SZ' \
@@ -1354,13 +1356,13 @@ long-long.ck unsigned.ck: $(VERSION_DEPS)
zonenames: tzdata.zi
@$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
-asctime.o: private.h tzfile.h
+asctime.o: private.h
date.o: private.h
difftime.o: private.h
-localtime.o: private.h tzfile.h tzdir.h
-strftime.o: private.h tzfile.h
-zdump.o: version.h
-zic.o: private.h tzfile.h tzdir.h version.h
+localtime.o: private.h tzdir.h tzfile.h
+strftime.o: localtime.c private.h tzdir.h tzfile.h
+zdump.o: private.h version.h
+zic.o: private.h tzdir.h tzfile.h version.h
.PHONY: ALL INSTALL all
.PHONY: check check_mild check_time_t_alternatives
diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS
index 83b8b8c8d39c..a5d7ea89204e 100644
--- a/contrib/tzdata/NEWS
+++ b/contrib/tzdata/NEWS
@@ -1,5 +1,83 @@
News for the tz database
+Release 2025a - 2025-01-15 10:47:24 -0800
+
+ Briefly:
+ Paraguay adopts permanent -03 starting spring 2024.
+ Improve pre-1991 data for the Philippines.
+ Etc/Unknown is now reserved.
+
+ Changes to future timestamps
+
+ Paraguay will stop changing its clocks after the spring-forward
+ transition on 2024-10-06, so it is now permanently at -03.
+ (Thanks to Heitor David Pinto and Even Scharning.)
+ This affects timestamps starting 2025-03-22, as well as the
+ obsolescent tm_isdst flags starting 2024-10-15.
+
+ Changes to past timestamps
+
+ Correct timestamps for the Philippines before 1900, and from 1937
+ through 1990. (Thanks to P Chan for the heads-up and citations.)
+ This includes adjusting local mean time before 1899; fixing
+ transitions in September 1899, January 1937, and June 1954; adding
+ transitions in December 1941, November 1945, March and September
+ 1977, and May and July 1990; and removing incorrect transitions in
+ March and September 1978.
+
+ Changes to data
+
+ Add zone1970.tab lines for the Concordia and Eyre Bird Observatory
+ research stations. (Thanks to Derick Rethans and Jule Dabars.)
+
+ Changes to code
+
+ strftime %s now generates the correct numeric string even when the
+ represented number does not fit into time_t. This is better than
+ generating the numeric equivalent of (time_t) -1, as strftime did
+ in TZDB releases 96a (when %s was introduced) through 2020a and in
+ releases 2022b through 2024b. It is also better than failing and
+ returning 0, as strftime did in releases 2020b through 2022a.
+
+ strftime now outputs an invalid conversion specifier as-is,
+ instead of eliding the leading '%', which confused debugging.
+
+ An invalid TZ now generates the time zone abbreviation "-00", not
+ "UTC", to help the user see that an error has occurred. (Thanks
+ to Arthur David Olson for suggesting a "wrong result".)
+
+ mktime and timeoff no longer incorrectly fail merely because a
+ struct tm component near INT_MIN or INT_MAX overflows when a
+ lower-order component carries into it.
+
+ TZNAME_MAXIMUM, the maximum number of bytes in a proleptic TZ
+ string's time zone abbreviation, now defaults to 254 not 255.
+ This helps reduce the size of internal state from 25480 to 21384
+ on common platforms. This change should not be a problem, as
+ nobody uses such long "abbreviations" and the longstanding tzcode
+ maximum was 16 until release 2023a. For those who prefer no
+ arbitrary limits, you can now specify TZNAME_MAXIMUM values up to
+ PTRDIFF_MAX, a limit forced by C anyway; formerly tzcode silently
+ misbehaved unless TZNAME_MAXIMUM was less than INT_MAX.
+
+ tzset and related functions no longer leak a file descriptor if
+ another thread forks or execs at about the same time and if the
+ platform has O_CLOFORK and O_CLOEXEC respectively. Also, the
+ functions no longer let a TZif file become a controlling terminal.
+
+ 'zdump -' now reads TZif data from /dev/stdin.
+ (From a question by Arthur David Olson.)
+
+ Changes to documentation
+
+ The name Etc/Unknown is now reserved: it will not be used by TZDB.
+ This is for compatibility with CLDR, which uses the string
+ "Etc/Unknown" for an unknown or invalid timezone. (Thanks to
+ Justin Grant, Mark Davis, and Guy Harris.)
+
+ Cite Internet RFC 9636, which obsoletes RFC 8536 for TZif format.
+
+
Release 2024b - 2024-09-04 12:27:47 -0700
Briefly:
@@ -116,7 +194,7 @@ Release 2024b - 2024-09-04 12:27:47 -0700
Changes to commentary
Commentary about historical transitions in Portugal and her former
- colonies has been expanded with links to many relevant legislation.
+ colonies has been expanded with links to relevant legislation.
(Thanks to Tim Parenti.)
@@ -204,10 +282,10 @@ Release 2023d - 2023-12-21 20:02:24 -0800
changing its time zone from -01/+00 to -02/-01 at the same moment
as the spring-forward transition. Its clocks will therefore not
spring forward as previously scheduled. The time zone change
- reverts to its common practice before 1981.
+ reverts to its common practice before 1981. (Thanks to Jule Dabars.)
Fix predictions for DST transitions in Palestine in 2072-2075,
- correcting a typo introduced in 2023a.
+ correcting a typo introduced in 2023a. (Thanks to Jule Dabars.)
Changes to past and future timestamps
diff --git a/contrib/tzdata/antarctica b/contrib/tzdata/antarctica
index 8d5d6cd1cdd0..2e90a5e09d17 100644
--- a/contrib/tzdata/antarctica
+++ b/contrib/tzdata/antarctica
@@ -174,6 +174,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13
# France & Italy - year-round base
# Concordia, -750600+1232000, since 2005
+# https://en.wikipedia.org/wiki/Concordia_Station
+# Can use Asia/Singapore, which it has agreed with since inception.
# Germany - year-round base
# Neumayer III, -704080-0081602, since 2009
diff --git a/contrib/tzdata/asia b/contrib/tzdata/asia
index a2480b021225..d4eb058053ed 100644
--- a/contrib/tzdata/asia
+++ b/contrib/tzdata/asia
@@ -3665,21 +3665,70 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# be immediately followed by 1845-01-01; see R.H. van Gent's
# History of the International Date Line
# https://webspace.science.uu.nl/~gent0113/idl/idl_philippines.htm
-# The rest of the data entries are from Shanks & Pottenger.
-
-# From Jesper Nørgaard Welen (2006-04-26):
-# ... claims that Philippines had DST last time in 1990:
-# http://story.philippinetimes.com/p.x/ct/9/id/145be20cc6b121c0/cid/3e5bbccc730d258c/
-# [a story dated 2006-04-25 by Cris Larano of Dow Jones Newswires,
-# but no details]
-
-# From Paul Eggert (2014-08-14):
-# The following source says DST may be instituted November-January and again
-# March-June, but this is not definite. It also says DST was last proclaimed
-# during the Ramos administration (1992-1998); but again, no details.
-# Carcamo D. PNoy urged to declare use of daylight saving time.
-# Philippine Star 2014-08-05
-# http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time
+
+# From P Chan (2021-05-10):
+# Here's a fairly comprehensive article in Japanese:
+# https://wiki.suikawiki.org/n/Philippine%20Time
+# (2021-05-16):
+# According to the references listed in the article,
+# the periods that the Philippines (Manila) observed DST or used +9 are:
+#
+# 1936-10-31 24:00 to 1937-01-15 24:00
+# (Proclamation No. 104, Proclamation No. 126)
+# 1941-12-15 24:00 to 1945-11-30 24:00
+# (Proclamation No. 789, Proclamation No. 20)
+# 1954-04-11 24:00 to 1954-06-04 24:00
+# (Proclamation No. 13, Proclamation No. 33)
+# 1977-03-27 24:00 to 1977-09-21 24:00
+# (Proclamation No. 1629, Proclamation No. 1641)
+# 1990-05-21 00:00 to 1990-07-28 24:00
+# (National Emergency Memorandum Order No. 17, Executive Order No. 415)
+#
+# Proclamation No. 104 ... October 30, 1936
+# https://www.officialgazette.gov.ph/1936/10/30/proclamation-no-104-s-1936/
+# Proclamation No. 126 ... January 15, 1937
+# https://www.officialgazette.gov.ph/1937/01/15/proclamation-no-126-s-1937/
+# Proclamation No. 789 ... December 13, 1941
+# https://www.officialgazette.gov.ph/1941/12/13/proclamation-no-789-s-1941/
+# Proclamation No. 20 ... November 11, 1945
+# https://www.officialgazette.gov.ph/1945/11/11/proclamation-no-20-s-1945/
+# Proclamation No. 13 ... April 6, 1954
+# https://www.officialgazette.gov.ph/1954/04/06/proclamation-no-13-s-1954/
+# Proclamation No. 33 ... June 3, 1954
+# https://www.officialgazette.gov.ph/1954/06/03/proclamation-no-33-s-1954/
+# Proclamation No. 1629 ... March 25, 1977
+# https://www.officialgazette.gov.ph/1977/03/25/proclamation-no-1629-s-1977/
+# Proclamation No. 1641 ...May 26, 1977
+# https://www.officialgazette.gov.ph/1977/05/26/proclamation-no-1641-s-1977/
+# National Emergency Memorandum Order No. 17 ... May 2, 1990
+# https://www.officialgazette.gov.ph/1990/05/02/national-emergency-memorandum-order-no-17-s-1990/
+# Executive Order No. 415 ... July 20, 1990
+# https://www.officialgazette.gov.ph/1990/07/20/executive-order-no-415-s-1990/
+#
+# During WWII, Proclamation No. 789 fixed two periods of DST. The first period
+# was set to continue only until January 31, 1942. But Manila was occupied by
+# the Japanese earlier in the month....
+#
+# For the date of the adoption of standard time, Shank[s] gives 1899-05-11.
+# The article is not able to state the basis of that. I guess it was based on
+# a US War Department Circular issued on that date.
+# https://books.google.com/books?id=JZ1PAAAAYAAJ&pg=RA3-PA8
+#
+# However, according to other sources, standard time was adopted on
+# 1899-09-06. Also, the LMT was GMT+8:03:52
+# https://books.google.com/books?id=MOYIAQAAIAAJ&pg=PA521
+# https://books.google.com/books?id=lSnqqatpYikC&pg=PA21
+#
+# From Paul Eggert (2024-09-05):
+# The penultimate URL in P Chan's email refers to page 521 of
+# Selga M, The Time Service in the Philippines.
+# Proc Pan-Pacific Science Congress. Vol. 1 (1923), 519-532.
+# It says, "The change from the meridian 120° 58' 04" to the 120th implied a
+# change of 3 min. 52s.26 in time; consequently on 6th September, 1899,
+# Manila Observatory gave the noon signal 3 min. 52s.26 later than before".
+#
+# Wikipedia says the US declared Manila liberated on March 4, 1945;
+# this doesn't affect clocks, just our time zone abbreviation and DST flag.
# From Paul Goyette (2018-06-15) with URLs updated by Guy Harris (2024-02-15):
# In the Philippines, there is a national law, Republic Act No. 10535
@@ -3697,24 +3746,26 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# influence of the sources. There is no current abbreviation for DST,
# so use "PDT", the usual American style.
-# From P Chan (2021-05-10):
-# Here's a fairly comprehensive article in Japanese:
-# https://wiki.suikawiki.org/n/Philippine%20Time
-# From Paul Eggert (2021-05-10):
-# The info in the Japanese table has not been absorbed (yet) below.
-
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Phil 1936 only - Nov 1 0:00 1:00 D
-Rule Phil 1937 only - Feb 1 0:00 0 S
-Rule Phil 1954 only - Apr 12 0:00 1:00 D
-Rule Phil 1954 only - Jul 1 0:00 0 S
-Rule Phil 1978 only - Mar 22 0:00 1:00 D
-Rule Phil 1978 only - Sep 21 0:00 0 S
+Rule Phil 1936 only - Oct 31 24:00 1:00 D
+Rule Phil 1937 only - Jan 15 24:00 0 S
+Rule Phil 1941 only - Dec 15 24:00 1:00 D
+# The following three rules were canceled by Japan:
+#Rule Phil 1942 only - Jan 31 24:00 0 S
+#Rule Phil 1942 only - Mar 1 0:00 1:00 D
+#Rule Phil 1942 only - Jun 30 24:00 0 S
+Rule Phil 1945 only - Nov 30 24:00 0 S
+Rule Phil 1954 only - Apr 11 24:00 1:00 D
+Rule Phil 1954 only - Jun 4 24:00 0 S
+Rule Phil 1977 only - Mar 27 24:00 1:00 D
+Rule Phil 1977 only - Sep 21 24:00 0 S
+Rule Phil 1990 only - May 21 0:00 1:00 D
+Rule Phil 1990 only - Jul 28 24:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
- 8:04:00 - LMT 1899 May 11
- 8:00 Phil P%sT 1942 May
- 9:00 - JST 1944 Nov
+Zone Asia/Manila -15:56:08 - LMT 1844 Dec 31
+ 8:03:52 - LMT 1899 Sep 6 4:00u
+ 8:00 Phil P%sT 1942 Feb 11 24:00
+ 9:00 - JST 1945 Mar 4
8:00 Phil P%sT
# Bahrain
diff --git a/contrib/tzdata/australasia b/contrib/tzdata/australasia
index 359f9c1f1e10..405944536cd3 100644
--- a/contrib/tzdata/australasia
+++ b/contrib/tzdata/australasia
@@ -1239,10 +1239,10 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# The 1992 ending date used in the rules is a best guess;
# it matches what was used in the past.
-# The Australian Bureau of Meteorology FAQ
-# http://www.bom.gov.au/faq/faqgen.htm
-# (1999-09-27) writes that Giles Meteorological Station uses
-# South Australian time even though it's located in Western Australia.
+# From Christopher Hunt (2006-11-21), after an advance warning
+# from Jesper Nørgaard Welen (2006-11-01):
+# WA are trialing DST for three years.
+# http://www.parliament.wa.gov.au/parliament/bills.nsf/9A1B183144403DA54825721200088DF1/$File/Bill175-1B.pdf
# From Paul Eggert (2018-04-01):
# The Guardian Express of Perth, Australia reported today that the
@@ -1254,54 +1254,10 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# https://www.communitynews.com.au/guardian-express/news/exclusive-daylight-savings-coming-wa-summer-2018/
# [The article ends with "Today's date is April 1."]
-# Queensland
-
-# From Paul Eggert (2018-02-26):
-# I lack access to the following source for Queensland DST:
-# Pearce C. History of daylight saving time in Queensland.
-# Queensland Hist J. 2017 Aug;23(6):389-403
-# https://search.informit.com.au/documentSummary;dn=994682348436426;res=IELHSS
-
-# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
-# # The state of QUEENSLAND.. [ Courtesy Qld. Dept Premier Econ&Trade Devel ]
-# # [ Dec 1990 ]
-# ...
-# Zone Australia/Queensland 10:00 AQ %sST
-# ...
-# Rule AQ 1971 only - Oct lastSun 2:00 1:00 D
-# Rule AQ 1972 only - Feb lastSun 3:00 0 E
-# Rule AQ 1989 max - Oct lastSun 2:00 1:00 D
-# Rule AQ 1990 max - Mar Sun>=1 3:00 0 E
-
-# From Bradley White (1989-12-24):
-# "Australia/Queensland" now observes daylight time (i.e. from
-# October 1989).
-
-# From Bradley White (1991-03-04):
-# A recent excerpt from an Australian newspaper...
-# ...Queensland...[has] agreed to end daylight saving
-# at 3am tomorrow (March 3)...
-
-# From John Mackin (1991-03-06):
-# I can certainly confirm for my part that Daylight Saving in NSW did in fact
-# end on Sunday, 3 March. I don't know at what hour, though. (It surprised
-# me.)
-
-# From Bradley White (1992-03-08):
-# ...there was recently a referendum in Queensland which resulted
-# in the experimental daylight saving system being abandoned. So, ...
-# ...
-# Rule QLD 1989 1991 - Oct lastSun 2:00 1:00 D
-# Rule QLD 1990 1992 - Mar Sun>=1 3:00 0 S
-# ...
-
-# From Arthur David Olson (1992-03-08):
-# The chosen rules the union of the 1971/1972 change and the 1989-1992 changes.
-
-# From Christopher Hunt (2006-11-21), after an advance warning
-# from Jesper Nørgaard Welen (2006-11-01):
-# WA are trialing DST for three years.
-# http://www.parliament.wa.gov.au/parliament/bills.nsf/9A1B183144403DA54825721200088DF1/$File/Bill175-1B.pdf
+# The Australian Bureau of Meteorology FAQ
+# http://www.bom.gov.au/faq/faqgen.htm
+# (1999-09-27) writes that Giles Meteorological Station uses
+# South Australian time even though it's located in Western Australia.
# From Rives McDow (2002-04-09):
# The most interesting region I have found consists of three towns on the
@@ -1359,6 +1315,59 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# For lack of better info, assume the tradition dates back to the
# introduction of standard time in 1895.
+# From Stuart Bishop (2024-11-12):
+# An article discussing the in-use but technically unofficial timezones
+# in the Western Australian portion of the Nullarbor Plain.
+# https://www.abc.net.au/news/2024-11-22/outback-wa-properties-strange-time-zones/104542494
+# From Paul Eggert (2024-11-12):
+# As the article says, the Eyre Bird Observatory and nearby sheep stations
+# can use Tokyo time. Other possibilities include Asia/Chita, Asia/Seoul,
+# and Asia/Jayapura.
+
+# Queensland
+
+# From Paul Eggert (2018-02-26):
+# I lack access to the following source for Queensland DST:
+# Pearce C. History of daylight saving time in Queensland.
+# Queensland Hist J. 2017 Aug;23(6):389-403
+# https://search.informit.com.au/documentSummary;dn=994682348436426;res=IELHSS
+
+# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
+# # The state of QUEENSLAND.. [ Courtesy Qld. Dept Premier Econ&Trade Devel ]
+# # [ Dec 1990 ]
+# ...
+# Zone Australia/Queensland 10:00 AQ %sST
+# ...
+# Rule AQ 1971 only - Oct lastSun 2:00 1:00 D
+# Rule AQ 1972 only - Feb lastSun 3:00 0 E
+# Rule AQ 1989 max - Oct lastSun 2:00 1:00 D
+# Rule AQ 1990 max - Mar Sun>=1 3:00 0 E
+
+# From Bradley White (1989-12-24):
+# "Australia/Queensland" now observes daylight time (i.e. from
+# October 1989).
+
+# From Bradley White (1991-03-04):
+# A recent excerpt from an Australian newspaper...
+# ...Queensland...[has] agreed to end daylight saving
+# at 3am tomorrow (March 3)...
+
+# From John Mackin (1991-03-06):
+# I can certainly confirm for my part that Daylight Saving in NSW did in fact
+# end on Sunday, 3 March. I don't know at what hour, though. (It surprised
+# me.)
+
+# From Bradley White (1992-03-08):
+# ...there was recently a referendum in Queensland which resulted
+# in the experimental daylight saving system being abandoned. So, ...
+# ...
+# Rule QLD 1989 1991 - Oct lastSun 2:00 1:00 D
+# Rule QLD 1990 1992 - Mar Sun>=1 3:00 0 S
+# ...
+
+# From Arthur David Olson (1992-03-08):
+# The chosen rules the union of the 1971/1972 change and the 1989-1992 changes.
+
# southeast Australia
#
diff --git a/contrib/tzdata/checknow.awk b/contrib/tzdata/checknow.awk
index 8b7881d2e27f..450490ee3768 100644
--- a/contrib/tzdata/checknow.awk
+++ b/contrib/tzdata/checknow.awk
@@ -44,7 +44,7 @@ BEGIN {
END {
for (zone in zone_data) {
data = zone_data[zone]
- if (!zonenow[data]) {
+ if (data && !zonenow[data]) {
printf "Zone table should have one of:%s\n", zones[data]
zonenow[data] = zone # This suppresses duplicate diagnostics.
status = 1
diff --git a/contrib/tzdata/checktab.awk b/contrib/tzdata/checktab.awk
index 9a26e4655ddb..5fa60556be13 100644
--- a/contrib/tzdata/checktab.awk
+++ b/contrib/tzdata/checktab.awk
@@ -9,6 +9,19 @@ BEGIN {
if (!zone_table) zone_table = "zone1970.tab"
if (!want_warnings) want_warnings = -1
+ monthabbr["Jan"] = 1
+ monthabbr["Feb"] = 1
+ monthabbr["Mar"] = 1
+ monthabbr["Apr"] = 1
+ monthabbr["May"] = 1
+ monthabbr["Jun"] = 1
+ monthabbr["Jul"] = 1
+ monthabbr["Aug"] = 1
+ monthabbr["Sep"] = 1
+ monthabbr["Oct"] = 1
+ monthabbr["Nov"] = 1
+ monthabbr["Dec"] = 1
+
while (getline >"/dev/stderr"
+ status = 1
+ }
} else {
+ stdoff = $1
ruleUsed[$2] = 1
if ($3 ~ /%/) rulePercentUsed[$2] = 1
}
+
+ if (stdoff && stdoff !~ /^\-?1?[0-9](:[0-5][0-9](:[0-5][0-9])?)?$/) {
+ printf "%s:%d: unlikely STDOFF: %s\n", FILENAME, FNR, stdoff \
+ >>"/dev/stderr"
+ status = 1
+ }
+
if (tz && tz ~ /\// && tz !~ /^Etc\//) {
if (!tztab[tz] && FILENAME != "backward" \
&& zone_table != "zonenow.tab") {
diff --git a/contrib/tzdata/etcetera b/contrib/tzdata/etcetera
index a5ecd6de1f6e..948531c8d862 100644
--- a/contrib/tzdata/etcetera
+++ b/contrib/tzdata/etcetera
@@ -51,6 +51,10 @@ Link Etc/GMT GMT
# so we moved the names into the Etc subdirectory.
# Also, the time zone abbreviations are now compatible with %z.
+# There is no "Etc/Unknown" entry, as CLDR says that "Etc/Unknown"
+# corresponds to an unknown or invalid time zone, and things would get
+# confusing if Etc/Unknown were made valid here.
+
Zone Etc/GMT-14 14 - %z
Zone Etc/GMT-13 13 - %z
Zone Etc/GMT-12 12 - %z
diff --git a/contrib/tzdata/europe b/contrib/tzdata/europe
index f9063949eb83..df334fc27c1d 100644
--- a/contrib/tzdata/europe
+++ b/contrib/tzdata/europe
@@ -1147,7 +1147,7 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn
# However, Greenland will change to Daylight Saving Time again in 2024
# and onwards.
-# From a contributor who wishes to remain anonymous for now (2023-10-29):
+# From Jule Dabars (2023-10-29):
# https://www.dr.dk/nyheder/seneste/i-nat-skal-uret-stilles-en-time-tilbage-men-foerste-gang-sker-det-ikke-i-groenland
# with a link to that page:
# https://naalakkersuisut.gl/Nyheder/2023/10/2710_sommertid
diff --git a/contrib/tzdata/factory b/contrib/tzdata/factory
index d116a115990e..14faf52a792e 100644
--- a/contrib/tzdata/factory
+++ b/contrib/tzdata/factory
@@ -8,5 +8,15 @@
# time zone abbreviation "-00", indicating that the actual time zone
# is unknown.
+# TZ="Factory" was added to TZDB in 1989, and in 2016 its abbreviation
+# was changed to "-00" from a longish English-language error message.
+# Around 2010, CLDR added "Etc/Unknown" for use with TZDB, to stand
+# for an unknown or invalid time zone. These two notions differ:
+# TZ="Factory" is a valid timezone, so tzalloc("Factory") succeeds, whereas
+# TZ="Etc/Unknown" is invalid and tzalloc("Etc/Unknown") fails.
+# Also, a downstream distributor could modify Factory to be a
+# default timezone suitable for the devices it manufactures,
+# whereas that cannot happen for Etc/Unknown.
+
# Zone NAME STDOFF RULES FORMAT
Zone Factory 0 - "Local time zone must be set--use tzsetup"
diff --git a/contrib/tzdata/leap-seconds.list b/contrib/tzdata/leap-seconds.list
index da0efc8c8566..6f861c888d75 100644
--- a/contrib/tzdata/leap-seconds.list
+++ b/contrib/tzdata/leap-seconds.list
@@ -60,15 +60,15 @@
#
# The following line shows the last update of this file in NTP timestamp:
#
-#$ 3929093563
+#$ 3945196800
#
# 2) Expiration date of the file given on a semi-annual basis: last June or last December
#
-# File expires on 28 June 2025
+# File expires on 28 December 2025
#
# Expire date in NTP timestamp:
#
-#@ 3960057600
+#@ 3975868800
#
#
# LIST OF LEAP SECONDS
@@ -117,4 +117,4 @@
# please see the readme file in the 'source' directory :
# https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README
#
-#h be738595 57b0cf1b b0218343 fb77062f 5a775e7
+#h 848434d5 570f7ea8 d79ba227 a00fc821 f608e2d4
diff --git a/contrib/tzdata/leapseconds b/contrib/tzdata/leapseconds
index 6c715cb20b01..76f771427f25 100644
--- a/contrib/tzdata/leapseconds
+++ b/contrib/tzdata/leapseconds
@@ -69,11 +69,11 @@ Leap 2016 Dec 31 23:59:60 + S
# Any additional leap seconds will come after this.
# This Expires line is commented out for now,
# so that pre-2020a zic implementations do not reject this file.
-#Expires 2025 Jun 28 00:00:00
+#Expires 2025 Dec 28 00:00:00
# POSIX timestamps for the data in this file:
-#updated 1720104763 (2024-07-04 14:52:43 UTC)
-#expires 1751068800 (2025-06-28 00:00:00 UTC)
+#updated 1736208000 (2025-01-07 00:00:00 UTC)
+#expires 1766880000 (2025-12-28 00:00:00 UTC)
# Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat)
-# File expires on 28 June 2025
+# File expires on 28 December 2025
diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica
index 01f392e0e6a4..8d356aa0069d 100644
--- a/contrib/tzdata/northamerica
+++ b/contrib/tzdata/northamerica
@@ -27,9 +27,12 @@
# in New York City (1869-10). His 1870 proposal was based on Washington, DC,
# but in 1872-05 he moved the proposed origin to Greenwich.
-# From Paul Eggert (2018-03-20):
+# From Paul Eggert (2024-11-18):
# Dowd's proposal left many details unresolved, such as where to draw
-# lines between time zones. The key individual who made time zones
+# lines between time zones. Sandford Fleming of the Canadian Pacific Railway
+# argued for Dowd's proposal in 1876, and Cleveland Abbe of the American
+# Meteorology Society published a report in 1879 recommending four US time
+# zones based on GMT. However, the key individual who made time zones
# work in the US was William Frederick Allen - railway engineer,
# managing editor of the Travelers' Guide, and secretary of the
# General Time Convention, a railway standardization group. Allen
@@ -2631,7 +2634,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# http://puentelibre.mx/noticia/ciudad_juarez_cambio_horario_noviembre_2022/
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Mexico 1931 only - April 30 0:00 1:00 D
+Rule Mexico 1931 only - Apr 30 0:00 1:00 D
Rule Mexico 1931 only - Oct 1 0:00 0 S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
Rule Mexico 1939 only - Jun 25 0:00 0 S
diff --git a/contrib/tzdata/southamerica b/contrib/tzdata/southamerica
index c8d9097aeb14..1fcf65146785 100644
--- a/contrib/tzdata/southamerica
+++ b/contrib/tzdata/southamerica
@@ -1687,7 +1687,7 @@ Rule Para 2005 2009 - Mar Sun>=8 0:00 0 -
# and that on the first Sunday of the month of October, it is to be set
# forward 60 minutes, in all the territory of the Paraguayan Republic.
# ...
-Rule Para 2010 max - Oct Sun>=1 0:00 1:00 -
+Rule Para 2010 2024 - Oct Sun>=1 0:00 1:00 -
Rule Para 2010 2012 - Apr Sun>=8 0:00 0 -
#
# From Steffen Thorsen (2013-03-07):
@@ -1706,14 +1706,35 @@ Rule Para 2010 2012 - Apr Sun>=8 0:00 0 -
# https://www.abc.com.py/politica/2023/07/12/promulgacion-el-cambio-de-hora-sera-por-ley/
# From Carlos Raúl Perasso (2023-07-27):
# http://silpy.congreso.gov.py/descarga/ley-144138
-Rule Para 2013 max - Mar Sun>=22 0:00 0 -
+Rule Para 2013 2024 - Mar Sun>=22 0:00 0 -
+#
+# From Heitor David Pinto (2024-09-24):
+# Today the Congress of Paraguay passed a bill to observe UTC-3 permanently....
+# The text of the bill says that it would enter into force on the first
+# Sunday in October 2024, the same date currently scheduled to start DST....
+# https://silpy.congreso.gov.py/web/expediente/132531
+# (2024-10-14):
+# The president approved the law on 11 October 2024,
+# and it was officially published on 14 October 2024.
+# https://www.gacetaoficial.gov.py/index/detalle_publicacion/89723
+# The text of the law says that it enters into force on the first
+# Sunday in October 2024 (6 October 2024). But the constitution
+# prohibits retroactive effect, and the civil code says that laws
+# enter into force on the day after their publication or on the day
+# that they specify, and it also says that they don't have retroactive
+# effect. So I think that the time change on 6 October 2024 should
+# still be considered as DST according to the previous law, and
+# permanently UTC-3 from 15 October 2024 according to the new law....
+# https://www.constituteproject.org/constitution/Paraguay_2011
+# https://www.oas.org/dil/esp/codigo_civil_paraguay.pdf
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Asuncion -3:50:40 - LMT 1890
-3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time
-4:00 - %z 1972 Oct
-3:00 - %z 1974 Apr
- -4:00 Para %z
+ -4:00 Para %z 2024 Oct 15
+ -3:00 - %z
# Peru
#
diff --git a/contrib/tzdata/theory.html b/contrib/tzdata/theory.html
index d3573ede0dfb..352a3d87078f 100644
--- a/contrib/tzdata/theory.html
+++ b/contrib/tzdata/theory.html
@@ -123,8 +123,9 @@ If geolocation information is available, a selection interface can
locate the user on a timezone map or prioritize names that are
geographically close. For an example selection interface, see the
tzselect
program in the tz
code.
-The Unicode Common Locale Data
-Repository contains data that may be useful for other selection
+Unicode's Common Locale Data
+Repository (CLDR)
+contains data that may be useful for other selection
interfaces; it maps timezone names like Europe/Prague
to
locale-dependent strings like "Prague", "Praha", "Прага", and "布拉格".
@@ -200,6 +201,8 @@ in decreasing order of importance:
A name must not be empty, or contain '//
', or
start or end with '/
'.
+ Also, a name must not be 'Etc/Unknown
', as
+ CLDR uses that string for an unknown or invalid timezone.
Do not use names that differ only in case.
@@ -220,10 +223,18 @@ in decreasing order of importance:
do not need locations, since local time is not defined there.
- If all the clocks in a timezone have agreed since 1970,
- do not bother to include more than one timezone
- even if some of the clocks disagreed before 1970.
+ If all clocks in a region have agreed since 1970,
+ give them just one name even if some of the clocks disagreed before 1970,
+ or reside in different countries or in notable or faraway locations.
Otherwise these tables would become annoyingly large.
+ For example, do not create a name Indian/Crozet
+ as a near-duplicate or alias of Asia/Dubai
+ merely because they are different countries or territories,
+ or their clocks disagreed before 1970, or the
+ Crozet Islands
+ are notable in their own right,
+ or the Crozet Islands are not adjacent to other locations
+ that use Asia/Dubai
.
If boundaries between regions are fluid, such as during a war or
@@ -579,10 +590,10 @@ in decreasing order of importance:
locations while uninhabited.
The leading '-
' is a flag that the UT offset is in
some sense undefined; this notation is derived
- from Internet
+ from Internet
RFC 3339.
(The abbreviation 'Z' that
- Internet
+ Internet
RFC 9557 uses for this concept
would violate the POSIX requirement
of at least three characters in an abbreviation.)
@@ -1115,8 +1126,8 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations:
the name of a file from which time-related information is read.
The file's format is TZif,
a timezone information format that contains binary data; see
- Internet
- RFC 8536.
+ Internet
+ RFC 9636.
The daylight saving time rules to be used for a
particular timezone are encoded in the
TZif file; the format of the file allows US,
@@ -1201,12 +1212,15 @@ The vestigial APIs are:
The tm_isdst
member is almost never needed and most of
its uses should be discouraged in favor of the abovementioned
APIs.
+ It was intended as an index into the tzname
variable,
+ but as mentioned previously that usage is obsolete.
Although it can still be used in arguments to
mktime
to disambiguate timestamps near
a DST transition when the clock jumps back on
platforms lacking tm_gmtoff
, this
- disambiguation does not work when standard time itself jumps back,
- which can occur when a location changes to a time zone with a
+ disambiguation works only for proleptic TZ
strings;
+ it does not work in general for geographical timezones,
+ such as when a location changes to a time zone with a
lesser UT offset.
@@ -1223,8 +1237,8 @@ The vestigial APIs are:
Programs that in the past used the timezone
function
may now examine localtime(&clock)->tm_zone
(if TM_ZONE
is defined) or
- tzname[localtime(&clock)->tm_isdst]
- (if HAVE_TZNAME
is nonzero) to learn the correct time
+ use strftime
with a %Z
conversion specification
+ to learn the correct time
zone abbreviation to use.
diff --git a/contrib/tzdata/version b/contrib/tzdata/version
index 699e50d4d38e..0846b7f265fa 100644
--- a/contrib/tzdata/version
+++ b/contrib/tzdata/version
@@ -1 +1 @@
-2024b
+2025a
diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab
index bfc0b5933044..d2be66359f3b 100644
--- a/contrib/tzdata/zone.tab
+++ b/contrib/tzdata/zone.tab
@@ -310,7 +310,7 @@ PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
PG -0930+14710 Pacific/Port_Moresby most of Papua New Guinea
PG -0613+15534 Pacific/Bougainville Bougainville
-PH +1435+12100 Asia/Manila
+PH +143512+1205804 Asia/Manila
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
PM +4703-05620 America/Miquelon
diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab
index 764215888efa..3a5a71c508d4 100644
--- a/contrib/tzdata/zone1970.tab
+++ b/contrib/tzdata/zone1970.tab
@@ -184,7 +184,7 @@ IR +3540+05126 Asia/Tehran
IT,SM,VA +4154+01229 Europe/Rome
JM +175805-0764736 America/Jamaica
JO +3157+03556 Asia/Amman
-JP +353916+1394441 Asia/Tokyo
+JP,AU +353916+1394441 Asia/Tokyo Eyre Bird Observatory
KE,DJ,ER,ET,KM,MG,SO,TZ,UG,YT -0117+03649 Africa/Nairobi
KG +4254+07436 Asia/Bishkek
KI,MH,TV,UM,WF +0125+17300 Pacific/Tarawa Gilberts, Marshalls, Wake
@@ -247,7 +247,7 @@ PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
PG,AQ,FM -0930+14710 Pacific/Port_Moresby Papua New Guinea (most areas), Chuuk, Yap, Dumont d'Urville
PG -0613+15534 Pacific/Bougainville Bougainville
-PH +1435+12100 Asia/Manila
+PH +143512+1205804 Asia/Manila
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
PM +4703-05620 America/Miquelon
@@ -294,7 +294,7 @@ RU +6445+17729 Asia/Anadyr MSK+09 - Bering Sea
SA,AQ,KW,YE +2438+04643 Asia/Riyadh Syowa
SB,FM -0932+16012 Pacific/Guadalcanal Pohnpei
SD +1536+03232 Africa/Khartoum
-SG,MY +0117+10351 Asia/Singapore peninsular Malaysia
+SG,AQ,MY +0117+10351 Asia/Singapore peninsular Malaysia, Concordia
SR +0550-05510 America/Paramaribo
SS +0451+03137 Africa/Juba
ST +0020+00644 Africa/Sao_Tome
diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab
index 01f536b3ba38..d2c1e48584f8 100644
--- a/contrib/tzdata/zonenow.tab
+++ b/contrib/tzdata/zonenow.tab
@@ -97,9 +97,6 @@ XX +1828-06954 America/Santo_Domingo Atlantic Standard ("AST") - eastern Caribbe
# -04/-03 (Chile DST)
XX -3327-07040 America/Santiago most of Chile
#
-# -04/-03 (Paraguay DST)
-XX -2516-05740 America/Asuncion Paraguay
-#
# -04/-03 - AST/ADT (North America DST)
XX +4439-06336 America/Halifax Atlantic ("AST/ADT") - Canada; Bermuda
#
@@ -224,7 +221,7 @@ XX +1345+10031 Asia/Bangkok Russia; Indochina; Christmas Island
XX -0610+10648 Asia/Jakarta Indonesia ("WIB")
#
# +08
-XX +0117+10351 Asia/Singapore Russia; Brunei; Malaysia; Singapore
+XX +0117+10351 Asia/Singapore Russia; Brunei; Malaysia; Singapore; Concordia
#
# +08 - AWST
XX -3157+11551 Australia/Perth Western Australia ("AWST")
*** 18 LINES SKIPPED ***
From nobody Mon Jan 20 00:27:58 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybrlf3wYwz5lw9V;
Mon, 20 Jan 2025 00:27:58 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybrlf3GRzz3djM;
Mon, 20 Jan 2025 00:27:58 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737332878;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=RoyQEvpCyRxopGiTiXBfaho2IpAhqFWiWZEcCKgD2YY=;
b=YdvW+tEAxvpnBpYT/Y2Ou2xpldCchun34R9pfSk3xLTPBPNWnD+L1iTEd/xzC761QZTtn/
CTNkYa86fWIkJ4TNX9nU7HV1mED4IngC+3QhCsG340fKwUYCMJ8JEOs82TESEoDaw4NKvN
zZFr+cxZikV5QSJPvWcS1wkAjUWX1MTAIaqLTqqxEKlufYfmEHjkqXWT8SWuKiTj2IHL6n
66ziEQAV/urnBJwfOhhbFpJIXJcxAK52fEorGkGAX0YMUX6CE6BKc4UNKOu7QJgXuSvnaO
8wu4GR59Dd+WT/3A6DdC0+6jyQfOYHnhETZpCO7Ii04Na3a2u4H3SJ2EWsak3A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737332878;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=RoyQEvpCyRxopGiTiXBfaho2IpAhqFWiWZEcCKgD2YY=;
b=JnbhOAiW8NjwTM+D5McXqLk7jgOMAT+IoBG5CiAwqWShgdryVVSdwVhzEWvGjBVUzMhXJB
lmFuQCpaOxS5sdn3wrp5lT2/CRqm6wHPwoWytk5mvAVbYxRBd9MYPG4q/Sb00+HI7f5Vb9
9KXwzI2jPW6VNvg62C+UByYXNC81MJAAdQl2d2xpRCBxMn8KJx4oz81TaYu5lqOpHHxh1F
UJxObjTdFuPbqNtQtY+uY9wOGr7CRkpzkXigJOe1wD2g3dttx51+f3LC4TH9arf1aJ2OTO
66NAtpBf/RbDOifboOdur/cw26J5pPXosAA7fTV9FbaW2jyODHDM2V6nQzKzIA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737332878; a=rsa-sha256; cv=none;
b=MrW/FgoHmjmnIydq7QYS/0rLHpv+4LvKns33cIElCtXF+zf8BEa1dCyRhp4L7Rv4aRUniA
RCHrHFshagHAJHuQjJviD4UWbW0T3BHXRFMySa/bxr9gmomndpW/N/PGGCZSWBvqL5CTO1
LyVXsOsn3zCG+2QNitfDcUY9wihZ20m7sRdek4JKBO7nPBTlCV0wdbov+DcV4jRcojD/5G
61RfbWfirYTKiqaJ9SolCldgZCphErpjFN44RcXfJwRgRdH5e81F0tASNFvtI9sHM4K4Tx
ypD9QMN6QIokckerx6hWapYPpbfdRbjarzY+jYEfPl6ubpiF6Ln3Dbn3UZa5uQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybrlf2qMTz1Bpy;
Mon, 20 Jan 2025 00:27:58 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K0Rwot019006;
Mon, 20 Jan 2025 00:27:58 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K0RwdY019003;
Mon, 20 Jan 2025 00:27:58 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:27:58 GMT
Message-Id: <202501200027.50K0RwdY019003@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Mark Johnston
Subject: git: 8373644ee2c8 - stable/14 - unix: Be consistent about
error handling for unconnected sockets
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: markj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 8373644ee2c848bab47d87d24b31d673e6515bce
Auto-Submitted: auto-generated
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=8373644ee2c848bab47d87d24b31d673e6515bce
commit 8373644ee2c848bab47d87d24b31d673e6515bce
Author: Mark Johnston
AuthorDate: 2025-01-06 22:55:38 +0000
Commit: Mark Johnston
CommitDate: 2025-01-20 00:26:27 +0000
unix: Be consistent about error handling for unconnected sockets
SOCK_STREAM and SOCK_SEQPACKET sockets should get the same treatment
here.
PR: 176420
MFC after: 2 weeks
(cherry picked from commit 1c933f464fdbb630f9663751f04c29cdcda38902)
---
sys/kern/uipc_usrreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 78469adcd84d..80ac5cc0b775 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1779,7 +1779,7 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt)
if (unp->unp_flags & UNP_HAVEPC)
xu = unp->unp_peercred;
else {
- if (so->so_type == SOCK_STREAM)
+ if (so->so_proto->pr_flags & PR_CONNREQUIRED)
error = ENOTCONN;
else
error = EINVAL;
From nobody Mon Jan 20 00:27:59 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybrlg6mXJz5jxYW;
Mon, 20 Jan 2025 00:27:59 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybrlg4NNMz3dlQ;
Mon, 20 Jan 2025 00:27:59 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737332879;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=+S/BGzCn3b2P9TPqXu3bx9KGJ7xFKZRAOV2DXZJIv4s=;
b=W9V7AC3M7485aQc9w6j22c/MljLGupXUOXjNo3CuqxuI0qmuour9X2y614X+ohToUtONxm
7h7oAq8dEa8+QiNK2a++McQO9DguCAg55L4rwLsG/NIy9ZZX4YIC8d4ksfv1Ah1z24VClV
dpukCsZW3MWzBYsbiT22A/mkyurs7jujW1H76N3UcFUQlVx8NU3r/oR13j3lDNvrEAT623
cKUhvDh6tjGzLlqFcWCkrhB6dMvbGgSUOZWOdvg44PH/d7VFXAO7H2jiujQUmGqdfz/rZ3
j9ZlbI79LkD0wvQ1nLlKlwc1we+WGpj+hBNWmyUGeg/hly6FFSYqfekX+ir7EA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737332879;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=+S/BGzCn3b2P9TPqXu3bx9KGJ7xFKZRAOV2DXZJIv4s=;
b=O/ziKlV3VfE3dsSh3S0zj9hlcrR6Ib6pUKjlJFPypQFxTYrPiqFdTuDzQaU6BV3DfuKCyq
vgJ5wuL6GRd3LLkpNRSAMe9X1HL3uBg7BvA4bQWZ/XicchXLvIL91AR0NkdDU8UZ0IqtXw
9DZywxn/3+2xrrNyJy8q4g/NkiYKAzTqNY28F38UGU6rQl80k3zc/iPyKjo95GSZY451js
fdqgSQB78arpHrsIAhQVvO58GRSitSF+X3uLNFvaBDHe1d64a225KxqkicBaEIf/tv6zTs
tmchbm7Ay/8LDHe1t0W4QCx1b0GgyXpzAIqpir5V8TwJ0gfoWeKFQaOeWfqcGQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737332879; a=rsa-sha256; cv=none;
b=PGAARJEHJVcUgntmByt/30tqqma8OERiYNQ27m+IBzn+oxsizfYEYAyzfuCJIIUpQjY3oR
BJY1c+5jjbKIiyMm17fy7dx2qhZhdxAn6OYHi1FxwlUfD1BNfyIRFCKYtLhhZpjzTFUVU7
dw+KIplvElntQ77y6o6VToVx6cH/5FcHEMs11HRVRs0UjKgyT0iH854ujduPEph76xWKdi
DjtKHyEZYVQP//HKQVq5/U2uPgQTTACNYwxnEGGrpm4VP/ifQzVjnakAE5T1f+aaoE5Vz3
mcG3BifOZjcJGrxlLj0mguKJBm89dSNOsEkaz9oH63aH2Hd/KSeNYxDaTnBzUA==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybrlg3kcYz1Bq0;
Mon, 20 Jan 2025 00:27:59 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K0RxdJ019043;
Mon, 20 Jan 2025 00:27:59 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K0Rxjb019040;
Mon, 20 Jan 2025 00:27:59 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:27:59 GMT
Message-Id: <202501200027.50K0Rxjb019040@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Mark Johnston
Subject: git: 65da23709d20 - stable/14 - netipsec: Pass the right
mbuf up
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: markj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 65da23709d2047c996fb9434e68c2ce90ecdc1bb
Auto-Submitted: auto-generated
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=65da23709d2047c996fb9434e68c2ce90ecdc1bb
commit 65da23709d2047c996fb9434e68c2ce90ecdc1bb
Author: Mark Johnston
AuthorDate: 2025-01-06 23:20:08 +0000
Commit: Mark Johnston
CommitDate: 2025-01-20 00:26:35 +0000
netipsec: Pass the right mbuf up
Note that key_spdacquire() is dead code, as the SADB_X_SPDACQUIRE
message handler is not set.
PR: 243057
MFC after: 2 weeks
(cherry picked from commit 378a2b155aaf853933df5b53e174b3880826488c)
---
sys/netipsec/key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index 772602eeea90..5458d189c7bf 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -2519,7 +2519,7 @@ key_spdacquire(struct secpolicy *sp)
mtod(result, struct sadb_msg *)->sadb_msg_len =
PFKEY_UNIT64(result->m_pkthdr.len);
- return key_sendup_mbuf(NULL, m, KEY_SENDUP_REGISTERED);
+ return key_sendup_mbuf(NULL, result, KEY_SENDUP_REGISTERED);
}
/*
From nobody Mon Jan 20 00:28:00 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybrlj1tQRz5jxZt;
Mon, 20 Jan 2025 00:28:01 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybrlh55Ftz3dpC;
Mon, 20 Jan 2025 00:28:00 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737332880;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=YQBNE3EkhmuUpH/M6Qv/7lbiAfQ9jn5zPkTMDF3jD5o=;
b=OxiShi0M83nnlxclcIc7Jxo+UMbq3+970pa0ndRSOQ8UkN00/sSoZG+BVVOsLu9fbr68F1
ahODvLiFo/b0WFTj3YWISGYtrnGoNc9h6QTqnjV0D1b3yP5jbw99wndFZVgw9JWyyAuXr3
JjihczWNlXOAqCS6TfzPqLaR+zQUwpS0VV1JkJl7YDdg+nPMu5fq61cfTaRx4ECaUftvcy
9Wr6R+lFRZGxK2T4KwCntWnwquojxQ4if7YB943R+XOsKl0DY3lbWSODhQ5JgRrG6IsNTM
2C9DM10dLJYRLJ7cLsmkMSkHgcFUQqDtIuNoO1oV/R60vQ0baY/RHN3f0W+Dmw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737332880;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=YQBNE3EkhmuUpH/M6Qv/7lbiAfQ9jn5zPkTMDF3jD5o=;
b=iOygzJcE4zk9Ksx4+wpN38p2FVQFWyNqKg2koeooh4gzGgj9vrS2H/9BjIUWfXj58tdxHI
gQ61lDuLNL/ebUyjtlxGjjdBQlvM4vgMNffNhJOicBThObXcHs0BMM7a9Y+Zno2INrq3xZ
B4ywGd+ferqWOACSf2mUI+PGqFHr5lfHKVgFzWwZd3m9R7nGbav5O/x8e2Q3ks3CkyURml
wHV06BRosSqrRUa7jnORTy9aZkfAYAUakROZhaDxiYy/oR2ChHxs9PeVP9dtA4V61RKmc6
ri/H0GpGUcSsyvsG32O9CbCHaFff7aL8NYNtC4YHhN6L/6M9BTmNbPD+HPVJ/g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737332880; a=rsa-sha256; cv=none;
b=A7/QETDrXi7MQMjA0GHYtcGH7E5tvPw1K/F8PgLwoVsEninTh7TVMZxb2d5PQ/hDJ8Yli7
JOtCclee3H1KPSJDdE+wwpsw8uiwOrn1JqCER3Qp5QwVc2j+6rATMpJ1Zsa2tk/crXffg6
+PzGoZfG9kGfwI1wSfp+nr69XJmJ813qtpRn4zKG40Xk3mHsvomZ5VXyS888ugS6lUYfFf
NJFll4oDFDsE67Ln+8BWytnz3mjiED4ks41faquAx4yyXY9uLR3cGOoWuYPvjoFGX87NXf
60ZQAQfnkEoZHck1FTc1CXVAFXRB5EzRubgHu/HrkfDm9l7434nKBfsKO0/Z+g==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybrlh4gT8z1Bjm;
Mon, 20 Jan 2025 00:28:00 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K0S0LU019083;
Mon, 20 Jan 2025 00:28:00 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K0S0YU019080;
Mon, 20 Jan 2025 00:28:00 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 00:28:00 GMT
Message-Id: <202501200028.50K0S0YU019080@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Mark Johnston
Subject: git: bd40a5abb1f8 - stable/14 - jail: Avoid a potential
use-after-free when destroying jails
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: markj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: bd40a5abb1f8810310a8841c34e469019002993f
Auto-Submitted: auto-generated
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=bd40a5abb1f8810310a8841c34e469019002993f
commit bd40a5abb1f8810310a8841c34e469019002993f
Author: Mark Johnston
AuthorDate: 2025-01-06 22:53:38 +0000
Commit: Mark Johnston
CommitDate: 2025-01-20 00:26:43 +0000
jail: Avoid a potential use-after-free when destroying jails
prison_deref() and prison_deref_kill() have to handle the case where
destruction of a jail will release the final reference on the jail's
parent, resulting in destruction of the parent jail. They thus maintain
a list of jails whose references have gone away; the loop at the end of
prison_deref() then goes through the list and deallocates resources
associated with each jail. In particular, if a jail's VNET is not the
same as that of its parent, this loop destroys the VNET.
Suppose prison_deref() removes the last reference on a jail, releasing a
reference to its parent and causing the jail to be placed in the
"freeprison" list. Suppose then that the parent jail is destroyed
before the "freeprison" list is processed. When destroying the
now-orphaned child jail, prison_deref() derefences its parent to see
whether the child jail's VNET needs to be freed, but if this race
occurs, this is a use-after-free.
Fix the problem by using PR_VNET to decide whether the jail's VNET is to
be destroyed, rather than dereferencing the parent jail pointer. Set it
earlier so that a subsequent failure in kern_jail_set() cleans up the
nascent VNET.
Reviewed by: zlei (previous version), jamie
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47992
(cherry picked from commit 8c75c15d43e4123bc51f24f5bf99319289c45a6c)
---
sys/kern/kern_jail.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 6f2b4f7fc336..103b44cc00b9 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -1701,9 +1701,18 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
sizeof(pr->pr_osrelease));
#ifdef VIMAGE
- /* Allocate a new vnet if specified. */
- pr->pr_vnet = (pr_flags & PR_VNET)
- ? vnet_alloc() : ppr->pr_vnet;
+ /*
+ * Allocate a new vnet if specified.
+ *
+ * Set PR_VNET now if so, so that the vnet is disposed of
+ * properly when the jail is destroyed.
+ */
+ if (pr_flags & PR_VNET) {
+ pr->pr_flags |= PR_VNET;
+ pr->pr_vnet = vnet_alloc();
+ } else {
+ pr->pr_vnet = ppr->pr_vnet;
+ }
#endif
/*
* Allocate a dedicated cpuset for each jail.
@@ -3173,9 +3182,12 @@ prison_deref(struct prison *pr, int flags)
* Removing a prison frees references
* from its parent.
*/
+ ppr = pr->pr_parent;
+ pr->pr_parent = NULL;
mtx_unlock(&pr->pr_mtx);
+
+ pr = ppr;
flags &= ~PD_LOCKED;
- pr = pr->pr_parent;
flags |= PD_DEREF | PD_DEUREF;
continue;
}
@@ -3202,7 +3214,7 @@ prison_deref(struct prison *pr, int flags)
*/
TAILQ_FOREACH_SAFE(rpr, &freeprison, pr_list, tpr) {
#ifdef VIMAGE
- if (rpr->pr_vnet != rpr->pr_parent->pr_vnet)
+ if (rpr->pr_flags & PR_VNET)
vnet_destroy(rpr->pr_vnet);
#endif
if (rpr->pr_root != NULL)
From nobody Mon Jan 20 01:59:24 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybtn933JLz5k46x;
Mon, 20 Jan 2025 01:59:25 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybtn90V0pz3l8H;
Mon, 20 Jan 2025 01:59:25 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737338365;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=3H5C+wIKHbpqpJkkOGRgetIXkz+Ks7bS94vEMbGTs6c=;
b=vPQoufBM1PjcZ/6Kf2+Q2uNBvstNCsHHeZUH9fZNlGkx0E/b4wELAAzkdmZZII8EVZD/dj
aT5nvDSunqN/9l2EQFIUrMNt747BndUuBde3VKUsB5taZZywRmNWaR+6IXexh7+BFkhShz
rPLUdunHYbgc+oWjJcAyeegAFFqA/7+ci1C2Bt0ME5iub/Tn7/R8g+ytpvi8/l69qLWpSB
mg3/nU6DBtgzbpN/tZLgffMiBh89Lb/XGta8vEsElbkUgOdtteeQRkqXQBqpPmtOv9rCcn
ZL/RgLJt8f1g3RH41v9Fjmn2Iyo9Doy5ual5V4AhLPYyHJs3A+UEF/ArOm4JtA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737338365;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=3H5C+wIKHbpqpJkkOGRgetIXkz+Ks7bS94vEMbGTs6c=;
b=d6vnMxMIArI1BlBqNkJyzahKcRdhLhR8xTqDpysJvubABzPGv31UQf5GrXJHUp7hGSS7C/
ulP6wUJe6maz5nKB2mGywCSfVbcPXJVnnkDZsqBZAJmN33ZmRoB776qNAV5x6cpxBE7Onb
C0IE5X85VoV/vyv8oC5BmN/+UrYES/w2rLUBDp5pfwEvfoBHf+zB6BpW4jcPZxR6oVxy+e
gLkrjyQIDhUqWKZiXxyHuDj2hfm5phodVH1DCt2iZxWzZQeJnOz9VSrAFQhhVScgBRwkrG
vq37a/vRKJSf5x/jNX1l9eQzIqGdfX+CRtJhouJ7Vv3bgSfALhS2ZYybiZI3iQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737338365; a=rsa-sha256; cv=none;
b=qcm0hY1G9RS6vUoD0AwX9GP6U2LgGv/2WsmdO31yEaBUNcAQDYScdgSUqLfS9ZHGrYwLbF
eooOV3nupYd0b7BeZVSnSsWGcjedxuI2OAPcxItOtwDAvw8JBY45mkFPrdh/0LidBsjE8t
v5HRyEJ5+LbSc3xBZtHKVfNsfBHDnFqQaxuTyaJHP/0aCYPSzm+cGWluGnOQWksOOS8QXt
SuPjijaeLylUSxYdYR8BzendoBCPO+hOwmW9QqCqmJ7pEnbCHIs1wm/qBq4/1W8U/SJrE2
ZRumqI5VUP6kCgmLuMxpTt+bQJgbqk2nvUsXMf+ag9lmadHLdAWX1Isv8MpnMw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybtn904zhz1FPf;
Mon, 20 Jan 2025 01:59:25 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K1xOtc085864;
Mon, 20 Jan 2025 01:59:24 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K1xOHO085861;
Mon, 20 Jan 2025 01:59:24 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 01:59:24 GMT
Message-Id: <202501200159.50K1xOHO085861@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Cy Schubert
Subject: git: 6404a5a7fe13 - stable/14 - genl.1: Improve grammar
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 6404a5a7fe1341c641c29299bdf7bf43e9d7094e
Auto-Submitted: auto-generated
The branch stable/14 has been updated by cy:
URL: https://cgit.FreeBSD.org/src/commit/?id=6404a5a7fe1341c641c29299bdf7bf43e9d7094e
commit 6404a5a7fe1341c641c29299bdf7bf43e9d7094e
Author: Cy Schubert
AuthorDate: 2025-01-17 04:18:24 +0000
Commit: Cy Schubert
CommitDate: 2025-01-20 01:59:16 +0000
genl.1: Improve grammar
Make the first sentence read more smoothly.
(cherry picked from commit 13d81ef632ec6ca5e6936ab77e8ac67a8c430033)
---
usr.bin/genl/genl.1 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/usr.bin/genl/genl.1 b/usr.bin/genl/genl.1
index af0c6360ad83..5a32d69dd482 100644
--- a/usr.bin/genl/genl.1
+++ b/usr.bin/genl/genl.1
@@ -40,8 +40,7 @@
.Sh DESCRIPTION
The
.Nm
-utility is design to provide access to the user to generic netlink
-protocols.
+utility provides user access to generic netlink protocols.
.Pp
The following commands are available:
.Bl -tag -width indent
From nobody Mon Jan 20 02:40:36 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybvhh2DVXz5k6Y8;
Mon, 20 Jan 2025 02:40:36 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybvhh1XNNz3pMG;
Mon, 20 Jan 2025 02:40:36 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737340836;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=671cz/R2LJnV1lPdzrfNGoP2GQe1KQDsu6S8KCuukN4=;
b=A3tViV00eiuVWk5eMtHB+zoKUrfDnQ6ktd1dtxRyFHYbBNQj63If3zYAuxOkPHZ89MLnt3
zEeRGtd1UC1alt2GktKb/O4Co48NbX9WNWbGIrcgl75kd0CwEmPJLTW5xN+OVD3iX35fFf
SPiU7oRREwpVSV4gsAxFHaMlzpYdMBUQHZ5sONTwNmx0nlzosageV6NfqYdjiQULxkPREA
kMfsu9uGy/vh+53v9ECFOMQ3FaRNFS7lhTacwOzfbPSR97F4PMU3UBf5QPsNLVleOrG43W
HusLLtUU/nyJqa3QV+j0kaju0NjJgRNDSw+j0r4khQ4+ggx9S/J7pvKAgbi+PQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737340836;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=671cz/R2LJnV1lPdzrfNGoP2GQe1KQDsu6S8KCuukN4=;
b=xzJQZ3F/0Zh6omP0TlwEB1nkc9y+YOssExSsNa0/bWNPWuBjc956VjIF0knTk7iecgqMWo
QQlxzny7nzUhncxz8CsVhOo+Gphz8viQFlGcb0gysBTfDQBnmPW5jMQloCIRFPA1bYMAqr
MEWuFctl68ODbc48rtma2teFTkAmS+UCHT0PaCR2S5MlHxaXLp1ycUwVMSA2sJ0zY6ayws
p6oQvpygR95zNrtVNxayeQYIKMjbtAXPSfuZsSe5F7Q8wOYWjrZnwvGo4N2sJH4ce2gBZV
YV0990JKU0+9CkGUaTc4KB/x0jSj4F49/qWJDVZW0Igy2pdCHcgoY+Ti77A8mQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737340836; a=rsa-sha256; cv=none;
b=Y8OYvbZpiHVBStXoRfDwaCT9m/1YePkZz8+J7Uqn1x6YX2lbrMjK4hihawv4bZvI3CX3CF
NRu/KuWPb/ETPWrPxbRKJyNhAPaatV/VyGarhIUAv8gtfsXzp0YQviMQ6EUMrA1WfjuqvZ
prL9eZn3Hlf8AyIh6p8jWUbkTWVj8i9KkcrnLSTC57Y99bqUMN2BoceGNEY8D6z9bWkmwz
XwWPsHYTVpaMyk9peWRgxuICNqkWBc4QmRvXJP8OpaPkJFBsLO3imaatf7gdcpuHa6Nn8F
9bHy0yCcH9yERGG6NEwq5fpGSt35mVYomAxTYai5XhbuIY8kGRJ1FcQvDHRfeA==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybvhh0sW8z1GJC;
Mon, 20 Jan 2025 02:40:36 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K2eaDq069485;
Mon, 20 Jan 2025 02:40:36 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K2eanF069482;
Mon, 20 Jan 2025 02:40:36 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 02:40:36 GMT
Message-Id: <202501200240.50K2eanF069482@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov
Subject: git: 97eaa1218f77 - stable/14 - ffs_blkpref_ufsX(): do not
iterate over startcg twice
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 97eaa1218f7752556801105899620954a8f98bc3
Auto-Submitted: auto-generated
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=97eaa1218f7752556801105899620954a8f98bc3
commit 97eaa1218f7752556801105899620954a8f98bc3
Author: Konstantin Belousov
AuthorDate: 2025-01-05 23:00:10 +0000
Commit: Konstantin Belousov
CommitDate: 2025-01-20 02:40:09 +0000
ffs_blkpref_ufsX(): do not iterate over startcg twice
(cherry picked from commit a57a2c01aacc5e2a29fa33d50aecc516e37cecd0)
---
sys/ufs/ffs/ffs_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 690df0c12793..d08a51264fdb 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1498,7 +1498,7 @@ ffs_blkpref_ufs1(struct inode *ip,
fs->fs_cgrotor = cg;
return (cgdata(fs, cg));
}
- for (cg = 0; cg <= startcg; cg++)
+ for (cg = 0; cg < startcg; cg++)
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
fs->fs_cgrotor = cg;
return (cgdata(fs, cg));
@@ -1610,7 +1610,7 @@ ffs_blkpref_ufs2(struct inode *ip,
fs->fs_cgrotor = cg;
return (cgdata(fs, cg));
}
- for (cg = 0; cg <= startcg; cg++)
+ for (cg = 0; cg < startcg; cg++)
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
fs->fs_cgrotor = cg;
return (cgdata(fs, cg));
From nobody Mon Jan 20 02:40:37 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybvhj3JVbz5k6pb;
Mon, 20 Jan 2025 02:40:37 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybvhj28qNz3p13;
Mon, 20 Jan 2025 02:40:37 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737340837;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=xLLwKh+1QMyrDSwPpftDcmXMUVKloqqAjK6KQvDh31A=;
b=aPHrlF4fGS17XsgoXTeh8q/GuHIsek5Z+kZ1RjQ/Ke0oLiEwTz9LgnFEh03MeKeK+VBsV0
39H0NmYYFxa/b9eCdXIUcapm9L5yI+TMYhcsmBnFBuUI+rOleTeM2kNnyLM8UsnBcwUmZn
nTVlmoTsKO0hfkl+vQ3GW98vSN3GeB8TYND8tj26MGlpx8WeY6N6Amt2HmOxgO89ZR92F3
ueagsJEjbidbkgZZjbsdX20v6u4fKVMyY23WJg1ifBFUyQ7CWhXQjF4rWiA6Hlma6WY4qK
Bm+bYc/aEV13TvlmXCff3yNMBa/hTS0eLfyG/YsmHmocM5s03U4JV1Jrl/pQ3Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737340837;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=xLLwKh+1QMyrDSwPpftDcmXMUVKloqqAjK6KQvDh31A=;
b=UsVE45LVMV464hGXE1J0eqNw9fxUnkbDpBBKYcGnBf2If0ypyprF/Qo26+0fUMkp1RL8G0
QVWgqnyUZMm3NOGoql0nRFsezYNGCJaBD6jwyXa4vEafB/60+QuJBKGP2zOkX2O6d5YTgk
RTitUH5QROI7vx0/H5jSdWlZzm9KA33ymlXBxmDt9ZcWyHEyswxhPCRnpfxWsYDlJ7agVO
4TqKDwwrAXByKdRG6jpKhI8iWZDR4Ip69suy+J0hIdQlx++E3nvdI3iev6LvS61DVNayaX
dH9Il/vnPESYTdTDNw7XgR/Go0ttH5UcvZuAKv+oTftLXxHieiwJcmyqsXy+MA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737340837; a=rsa-sha256; cv=none;
b=WDCPvndWq3BxuR53LaGh5VcIkjGswo/BHIKbtcsOeGND5BjP8Fn5h7DNB6+lWEBIKkDE2A
aomdZse5AImtDczDnx0hkJR+kngZHoobfm4NurSUpxTnfJGW96BCgRCi3TsAubXeMybkDD
W0yvBpLahlFC21tjWx1bv6PAokrieEJDCCR2PUK6GOFnyGjeLiFscGm06POnAkepi5pIoM
3DZK02kQRoJzD3eBI+oowC+Qw2C98WOs7CKpOrPkCArsjIS1AE9i52C/ef20Fklnkn7hSz
U+hoSZD8EzsIKoDA0qr0ea9zlYBeRJGJdWuL8fljBYbAl+12NBMO5AI5DRIVXg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybvhj1Prmz1Fxj;
Mon, 20 Jan 2025 02:40:37 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K2ebFv069541;
Mon, 20 Jan 2025 02:40:37 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K2eb44069534;
Mon, 20 Jan 2025 02:40:37 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 02:40:37 GMT
Message-Id: <202501200240.50K2eb44069534@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov
Subject: git: 6149261d549b - stable/14 - ffs_reallocblks(): ensure
that pref cg is valid
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 6149261d549b3b5072fe69b498f26e8172de1623
Auto-Submitted: auto-generated
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=6149261d549b3b5072fe69b498f26e8172de1623
commit 6149261d549b3b5072fe69b498f26e8172de1623
Author: Konstantin Belousov
AuthorDate: 2025-01-05 22:51:23 +0000
Commit: Konstantin Belousov
CommitDate: 2025-01-20 02:40:09 +0000
ffs_reallocblks(): ensure that pref cg is valid
(cherry picked from commit dc37121d3210d08c96a883ebfed780660e7e2b39)
---
sys/ufs/ffs/ffs_alloc.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index d08a51264fdb..b586ab8e126a 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -683,6 +683,7 @@ ffs_reallocblks_ufs1(
* groups that we will search.
*/
cg = dtog(fs, pref);
+ MPASS(cg < fs->fs_ncg);
for (i = min(maxclustersearch, fs->fs_ncg); i > 0; i--) {
if ((newblk = ffs_clusteralloc(ip, cg, pref, len)) != 0)
break;
@@ -949,6 +950,7 @@ ffs_reallocblks_ufs2(
* groups that we will search.
*/
cg = dtog(fs, pref);
+ MPASS(cg < fs->fs_ncg);
for (i = min(maxclustersearch, fs->fs_ncg); i > 0; i--) {
if ((newblk = ffs_clusteralloc(ip, cg, pref, len)) != 0)
break;
@@ -1440,8 +1442,11 @@ ffs_blkpref_ufs1(struct inode *ip,
* place it immediately following the last direct block.
*/
if (indx == -1 && lbn < UFS_NDADDR + NINDIR(fs) &&
- ip->i_din1->di_db[UFS_NDADDR - 1] != 0)
+ ip->i_din1->di_db[UFS_NDADDR - 1] != 0) {
pref = ip->i_din1->di_db[UFS_NDADDR - 1] + fs->fs_frag;
+ if (dtog(fs, pref) >= fs->fs_ncg)
+ pref = 0;
+ }
return (pref);
}
/*
@@ -1452,8 +1457,11 @@ ffs_blkpref_ufs1(struct inode *ip,
if (lbn == UFS_NDADDR) {
pref = ip->i_din1->di_ib[0];
if (pref != 0 && pref >= cgdata(fs, inocg) &&
- pref < cgbase(fs, inocg + 1))
+ pref < cgbase(fs, inocg + 1)) {
+ if (dtog(fs, pref + fs->fs_frag) >= fs->fs_ncg)
+ return (0);
return (pref + fs->fs_frag);
+ }
}
/*
* If we are at the beginning of a file, or we have already allocated
@@ -1508,6 +1516,8 @@ ffs_blkpref_ufs1(struct inode *ip,
/*
* Otherwise, we just always try to lay things out contiguously.
*/
+ if (dtog(fs, prevbn + fs->fs_frag) >= fs->fs_ncg)
+ return (0);
return (prevbn + fs->fs_frag);
}
@@ -1552,8 +1562,11 @@ ffs_blkpref_ufs2(struct inode *ip,
* place it immediately following the last direct block.
*/
if (indx == -1 && lbn < UFS_NDADDR + NINDIR(fs) &&
- ip->i_din2->di_db[UFS_NDADDR - 1] != 0)
+ ip->i_din2->di_db[UFS_NDADDR - 1] != 0) {
pref = ip->i_din2->di_db[UFS_NDADDR - 1] + fs->fs_frag;
+ if (dtog(fs, pref) >= fs->fs_ncg)
+ pref = 0;
+ }
return (pref);
}
/*
@@ -1564,8 +1577,11 @@ ffs_blkpref_ufs2(struct inode *ip,
if (lbn == UFS_NDADDR) {
pref = ip->i_din2->di_ib[0];
if (pref != 0 && pref >= cgdata(fs, inocg) &&
- pref < cgbase(fs, inocg + 1))
+ pref < cgbase(fs, inocg + 1)) {
+ if (dtog(fs, pref + fs->fs_frag) >= fs->fs_ncg)
+ return (0);
return (pref + fs->fs_frag);
+ }
}
/*
* If we are at the beginning of a file, or we have already allocated
@@ -1620,6 +1636,8 @@ ffs_blkpref_ufs2(struct inode *ip,
/*
* Otherwise, we just always try to lay things out contiguously.
*/
+ if (dtog(fs, prevbn + fs->fs_frag) >= fs->fs_ncg)
+ return (0);
return (prevbn + fs->fs_frag);
}
@@ -1970,6 +1988,7 @@ ffs_clusteralloc(struct inode *ip,
ump = ITOUMP(ip);
fs = ump->um_fs;
+ MPASS(cg < fs->fs_ncg);
if (fs->fs_maxcluster[cg] < len)
return (0);
UFS_UNLOCK(ump);
From nobody Mon Jan 20 02:40:38 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybvhm0c5sz5k6dB;
Mon, 20 Jan 2025 02:40:40 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybvhk5Fx4z3pPr;
Mon, 20 Jan 2025 02:40:38 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737340838;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=VbDCCV8ICSUrdrvLxgX7T2pZLZlIYxVPyygrlSc8O7c=;
b=wTRXMN7U4PIpLkvmkc51wv3l6jP/ELxKdg6ylw9HcU1Ro5zKqksRNpBE4kjxH2ocdMUaBB
W0+OUQaE0ipIlUMLMEmJZDN6uBEmiZE7mqXcoFi8fMZzpzLp0Rfsny3GzNDan5yBFw53lZ
QYSNwcAiap8hFshobfT7zP17sSjG918tznPK9eKJxbXt22e2zXTtatgbm4dUFLSOGOL3Ky
EE1c4uVWYgpNAb1JIFafx79roFO3Gy9AGnJ2j3sJ6XN4+JVa8CqmDD/a2ycT5FJzW6pMNA
JjcfTaH22QjYNoWV4AuPyJfQmxptgwFXkskduFNhuUxpMH2mDW4PM2IHi9/3fQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737340838;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=VbDCCV8ICSUrdrvLxgX7T2pZLZlIYxVPyygrlSc8O7c=;
b=a7GYXsIzwIrgx/TsmSEpF5lKpH9TTRcjunS+bkrDi1uNDnMmJ91m2cbQ6hBXIIFvIXlOE8
s/vWLmU/HUBcb19nl9ZSXwMye0uRtQCo6wmEUj++md/OWWYr+BByTN6aGmE4on8ioMNgQe
Gzq/4yus/CXmPQ7q6Tka9+DDQb57Ff8yRIgDv5UT6+7aUrDiwP+s0iepv4RdCf0LV+ZyCG
LQcQ561R5okInhaELOL8A4A2UzJT1kcoFvTM+K4x7Z87Pl6G+r+ES4FIhrG2JIMTtRFQw0
azWZQ8elfHFuHCtgj2hzuDPmeUt0wKoZLk0O5dSoa+/XkINIMudnmU/m7Usbzg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737340838; a=rsa-sha256; cv=none;
b=XC1c3ieUH4CA7PKML8E8Db9ZQFPgWMWNnfvyvGZb2/S12XJyiEmnAo1dV8IlbFjemka6Cs
E/NTxNke3n4FKSeUierJL0CXKy2UA3jYkqE+Ry0LY6fFsm7kBj+flXwxoiJWirhzjrb2LY
7aU78O9Fk8ZSnU8KD3u120A9J3Cbt0OtI4LB6ZsPDtZ7Y8+hN3xib3gyV1qJm8VyqO0J4y
tgoxF9aH51Bvlq5v16dqXPrIxaPtQx4NEn3RdjkNvch/kpMh1+07u+Ne0T8Mm8mu9norWR
r4RRq2OushDPevWlUA63OlUHZfXBXpEKrHmV2llO0g+1r5F2sdqWZMWkbUylUw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybvhk1mlBz1Fxk;
Mon, 20 Jan 2025 02:40:38 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K2ecAV071038;
Mon, 20 Jan 2025 02:40:38 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K2ecB3071024;
Mon, 20 Jan 2025 02:40:38 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 02:40:38 GMT
Message-Id: <202501200240.50K2ecB3071024@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov
Subject: git: 6e9b6e5dbb84 - stable/14 - mb_unmapped_to_ext():
return error code on error
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 6e9b6e5dbb84c0c44930448b7da169a6a351d670
Auto-Submitted: auto-generated
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=6e9b6e5dbb84c0c44930448b7da169a6a351d670
commit 6e9b6e5dbb84c0c44930448b7da169a6a351d670
Author: Konstantin Belousov
AuthorDate: 2024-12-28 08:30:01 +0000
Commit: Konstantin Belousov
CommitDate: 2025-01-20 02:40:09 +0000
mb_unmapped_to_ext(): return error code on error
(cherry picked from commit cf322978d73a3ed4958cb64cc4f1b47ceb53a03e)
---
sys/kern/kern_mbuf.c | 41 +++++++++++++++++++++++++++--------------
sys/sys/mbuf.h | 2 +-
2 files changed, 28 insertions(+), 15 deletions(-)
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index 002e508e91cc..0a9cb72222c2 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -936,8 +936,8 @@ mb_unmapped_free_mext(struct mbuf *m)
mb_free_extpg(old_m);
}
-static struct mbuf *
-_mb_unmapped_to_ext(struct mbuf *m)
+static int
+_mb_unmapped_to_ext(struct mbuf *m, struct mbuf **mres)
{
struct mbuf *m_new, *top, *prev, *mref;
struct sf_buf *sf;
@@ -947,9 +947,15 @@ _mb_unmapped_to_ext(struct mbuf *m)
u_int ref_inc = 0;
M_ASSERTEXTPG(m);
+
+ if (m->m_epg_tls != NULL) {
+ /* can't convert TLS mbuf */
+ m_freem(m);
+ *mres = NULL;
+ return (EINVAL);
+ }
+
len = m->m_len;
- KASSERT(m->m_epg_tls == NULL, ("%s: can't convert TLS mbuf %p",
- __func__, m));
/* See if this is the mbuf that holds the embedded refcount. */
if (m->m_ext.ext_flags & EXT_FLAG_EMBREF) {
@@ -1047,7 +1053,8 @@ _mb_unmapped_to_ext(struct mbuf *m)
atomic_add_int(refcnt, ref_inc);
}
m_free(m);
- return (top);
+ *mres = top;
+ return (0);
fail:
if (ref_inc != 0) {
@@ -1064,13 +1071,15 @@ fail:
}
m_free(m);
m_freem(top);
- return (NULL);
+ *mres = NULL;
+ return (ENOMEM);
}
-struct mbuf *
-mb_unmapped_to_ext(struct mbuf *top)
+int
+mb_unmapped_to_ext(struct mbuf *top, struct mbuf **mres)
{
- struct mbuf *m, *next, *prev = NULL;
+ struct mbuf *m, *m1, *next, *prev = NULL;
+ int error;
prev = NULL;
for (m = top; m != NULL; m = next) {
@@ -1086,12 +1095,15 @@ mb_unmapped_to_ext(struct mbuf *top)
*/
prev->m_next = NULL;
}
- m = _mb_unmapped_to_ext(m);
- if (m == NULL) {
- m_freem(top);
+ error = _mb_unmapped_to_ext(m, &m1);
+ if (error != 0) {
+ if (top != m)
+ m_free(top);
m_freem(next);
- return (NULL);
+ *mres = NULL;
+ return (error);
}
+ m = m1;
if (prev == NULL) {
top = m;
} else {
@@ -1110,7 +1122,8 @@ mb_unmapped_to_ext(struct mbuf *top)
prev = m;
}
}
- return (top);
+ *mres = top;
+ return (0);
}
/*
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index f7925da795cd..941c907e903b 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -814,7 +814,7 @@ struct mbuf *mb_alloc_ext_plus_pages(int, int);
struct mbuf *mb_mapped_to_unmapped(struct mbuf *, int, int, int,
struct mbuf **);
int mb_unmapped_compress(struct mbuf *m);
-struct mbuf *mb_unmapped_to_ext(struct mbuf *m);
+int mb_unmapped_to_ext(struct mbuf *m, struct mbuf **mres);
void mb_free_notready(struct mbuf *m, int count);
void m_adj(struct mbuf *, int);
void m_adj_decap(struct mbuf *, int);
From nobody Mon Jan 20 02:40:39 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ybvhm0q6jz5k6gp;
Mon, 20 Jan 2025 02:40:40 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Ybvhl2xq4z3nxl;
Mon, 20 Jan 2025 02:40:39 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737340839;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=bYy2IYqzEJmmUcaxePEGUMZGo2aAvnfIyUfXE15uLvg=;
b=PywFhIpwf7Wjv0ogQ92wHULMRLoqRlT4vrCqODPTkmy+E/8sopPahBFnAQHk2hJziMwst4
yWdM3kuijsMh1NPo53wKIMmMQLQ+WoGHljZsYCPD/M+iMbk5vDvnqAFsNtW789xWQUW1b/
5N6A8fyCdvq320eVHDFa/EKhC+KgzWmgRy5tFq6JJvxuNIu18JusgKgLxea3/72nDOYz/Z
kWwtjmd9gMKjFuzhJEUKCVpI8X8qtgkvsqLsXmcrXVv1UhWkzvz6tOTI5Bh1+mpDoOQogD
qbebsX7+NPakrUtWYDP8PZ6yKq0HgjjKHgZxP9toKN2IfbpUDGdLlthhHFIdOQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737340839;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=bYy2IYqzEJmmUcaxePEGUMZGo2aAvnfIyUfXE15uLvg=;
b=jh0VgToyy70rkvOpFCWl9/w4hyt8k6qz+vaQ2SRpftszYPDQdGlQAsPJAmTZBsPO6lazGX
f3TApZFunSnK9S7Fx9/1SUYs42ItnwH4248wcEnc6FyeZIlR/yppo2uO3dKCOqZKMGOsas
+WtDSwNcixqDbSv5tUxEwXbyM0AgGCviA4NnP9ec8OSSXPSJY7LotWPF1nIzlhNu0Fq3HT
eoFI5RFiLo+tPUq8vQlABtgJ5nXsLha+5F2LiyD+AbE3UA7jKi2Z33WeNPhWW541cBJnxu
I6XnJKnw7jat8TpyHiuBUn1dmDKo7+Z7dAs4VAO9cWLPb3D/WBnyhK/pFtzJTw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737340839; a=rsa-sha256; cv=none;
b=UuDecUMZal3ZJw6CjyNRVAE2/iCQmMLTzIhbXdSmaoABbgS+flL3HpYd1VUY/TfRf13Scz
zq+Qddfr5gPIhfzQ0EOTM88y/rCPglM0ICk5mx6Sg9apxE8gov1Ss3b1TMUI7zwU1akLvb
NOFHBybEiOcinnGWz/3iROlempAML3kAvcZjniQQ2+wBNGZlqYb2xjg1G+kysyhKM4DJZt
4nv4DZJBc/j3nqpxaDkZgNArKE6Lhuwf5EmzeMUgl+VvaFmKO+vRMaA+qMi0EVDywjMKiT
j0AAVF76CPZEQIecA8WQ+0c2dwCfmXGamWWeQ06pWBohXoLZSmbgxWcCmXElsw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ybvhl2XYPz1Fxm;
Mon, 20 Jan 2025 02:40:39 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50K2ediF072343;
Mon, 20 Jan 2025 02:40:39 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50K2ed1v072328;
Mon, 20 Jan 2025 02:40:39 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 02:40:39 GMT
Message-Id: <202501200240.50K2ed1v072328@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov
Subject: git: c968d55123fa - stable/14 - ipsec + ktls: cannot
coexists
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: c968d55123faf55a26d769847b603330eb51f67c
Auto-Submitted: auto-generated
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=c968d55123faf55a26d769847b603330eb51f67c
commit c968d55123faf55a26d769847b603330eb51f67c
Author: Konstantin Belousov
AuthorDate: 2024-12-28 08:30:49 +0000
Commit: Konstantin Belousov
CommitDate: 2025-01-20 02:40:09 +0000
ipsec + ktls: cannot coexists
(cherry picked from commit b0e020764aae970545357b0f146dcba7b4b55864)
---
sys/netinet/ip_output.c | 33 +++++++++++++++++++++++++--------
sys/netinet6/ip6_output.c | 34 ++++++++++++++++++++++++++--------
2 files changed, 51 insertions(+), 16 deletions(-)
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index bcd4ed4c94c9..892a54eb628d 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -669,17 +669,25 @@ again:
sendit:
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
if (IPSEC_ENABLED(ipv4)) {
- m = mb_unmapped_to_ext(m);
- if (m == NULL) {
- IPSTAT_INC(ips_odropped);
- error = ENOBUFS;
- goto bad;
+ struct mbuf *m1;
+
+ error = mb_unmapped_to_ext(m, &m1);
+ if (error != 0) {
+ if (error == ENOMEM) {
+ IPSTAT_INC(ips_odropped);
+ error = ENOBUFS;
+ goto bad;
+ }
+ /* XXXKIB */
+ goto no_ipsec;
}
+ m = m1;
if ((error = IPSEC_OUTPUT(ipv4, m, inp)) != 0) {
if (error == EINPROGRESS)
error = 0;
goto done;
}
+no_ipsec:;
}
/*
* Check if there was a route for this packet; return error if not.
@@ -733,11 +741,20 @@ sendit:
/* Ensure the packet data is mapped if the interface requires it. */
if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) {
- m = mb_unmapped_to_ext(m);
- if (m == NULL) {
+ struct mbuf *m1;
+
+ error = mb_unmapped_to_ext(m, &m1);
+ if (error != 0) {
+ if (error == EINVAL) {
+ if_printf(ifp, "TLS packet\n");
+ /* XXXKIB */
+ } else if (error == ENOMEM) {
+ error = ENOBUFS;
+ }
IPSTAT_INC(ips_odropped);
- error = ENOBUFS;
goto bad;
+ } else {
+ m = m1;
}
}
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 3c0e7f37b74f..d98d7c5aa928 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -459,17 +459,25 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
* XXX: need scope argument.
*/
if (IPSEC_ENABLED(ipv6)) {
- m = mb_unmapped_to_ext(m);
- if (m == NULL) {
- IP6STAT_INC(ip6s_odropped);
- error = ENOBUFS;
- goto bad;
+ struct mbuf *m1;
+
+ error = mb_unmapped_to_ext(m, &m1);
+ if (error != 0) {
+ if (error == ENOMEM) {
+ IP6STAT_INC(ip6s_odropped);
+ error = ENOBUFS;
+ goto bad;
+ }
+ /* XXXKIB */
+ goto no_ipsec;
}
+ m = m1;
if ((error = IPSEC_OUTPUT(ipv6, m, inp)) != 0) {
if (error == EINPROGRESS)
error = 0;
goto done;
}
+no_ipsec:;
}
#endif /* IPSEC */
@@ -1102,10 +1110,20 @@ passout:
/* Ensure the packet data is mapped if the interface requires it. */
if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) {
- m = mb_unmapped_to_ext(m);
- if (m == NULL) {
+ struct mbuf *m1;
+
+ error = mb_unmapped_to_ext(m, &m1);
+ if (error != 0) {
+ if (error == EINVAL) {
+ if_printf(ifp, "TLS packet\n");
+ /* XXXKIB */
+ } else if (error == ENOMEM) {
+ error = ENOBUFS;
+ }
IP6STAT_INC(ip6s_odropped);
- return (ENOBUFS);
+ return (error);
+ } else {
+ m = m1;
}
}
From nobody Mon Jan 20 10:15:35 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yc5ng3C0Nz5l7n8;
Mon, 20 Jan 2025 10:15:35 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Yc5ng2Nynz3kMk;
Mon, 20 Jan 2025 10:15:35 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737368135;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=vyP3Rw8szAR7AfRy1I0y0ISgbZ1uGo5X9Smbjbocj84=;
b=m8Ikmy5otqWd+a8bC5dxJ6azvuUEx3NNa8YKuLT1wQGWxhWFTJIa9ybu5uDwaKeu+h/fgy
zuvWhOimc+H4S+ghSdVo1Ko4cewPtg4iABtPzoOBnMJ3W++BnVRUJA006Jswjdutf6jic9
2jl4vFShOYN7aEoFsrY4PHvqdvNHY1ylqBjY/FSyTdiGCAEfQlppkQnF4tifczaQBulpZm
Sm+b7tpm9mUhqCneizHT2+4Jug35WzSlPJnRTvkbb0r+Mk2TRD4FY3qP8WZyVtt6OLLhGf
LsH78eyItMLu2dcluIrT9rwA2Z3EvzTMcLFXu1r2oujRYHzJ7wxHc5czwDdEyA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737368135;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=vyP3Rw8szAR7AfRy1I0y0ISgbZ1uGo5X9Smbjbocj84=;
b=r9uWDZsiOCTTQceV/0Ic4pVc19+CuMnildLmB60RidiGmBqomycgHsoDWd4ot8uigLCH0J
Kh2WKjb37Othsy06qH5mMLq/N5/mh2uKZoRKMXvtqVoVAnSGNlu+EmJpDf/bEXyWyvjQHo
8J/n98TsCd3jSeo0+Dl1laYvfW6CN6aKrfmCHC7gasnrmhCg5hx8ANRthQ7T2lhakO2e+s
6Hq4bm2gaP28FL8N/cMDfwqZvZOyvdfvpxK/bhQ3tOR5EEKuVwSDIqur7xyo2b1Pq9fo54
Czs5r2XnUoOUM8B4VkREpdY6ZUgkZ3bLZkVNaFAaMBmCcjG77dkRqZdFvztr+w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737368135; a=rsa-sha256; cv=none;
b=BJnTwS3WqFVbMn2HpEzcFCIozAB7wiJ8iYbEoQZBIgQtNveLzhqZcw+JLfpopZuveehUN7
c6Jgpi0DT+/zR40IFtI+7eSaSiKkUh3XyLPRFuybUmsfq3B0QoibprxnuKgSQ2r3S4iE8a
3x5m6oPmLT9bfglLH/wVEgsx/MT/mZ6jL2vWAECw0a6beN0DdpJ7R34Tn8D7pefRrspxQE
mUIVX/QkwIDL94vZo7nluYoGCV+BDyTTj0gGFtem/Up6U5qXfso2VhNIPLCDFR2Aa4kJEp
O8bWsMK3FNUqSCWKoFK1I097wYRxGx9+7+RodUBzsV7yyHA0jqPzSlKuTzjShQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yc5ng1z6Dz1TB;
Mon, 20 Jan 2025 10:15:35 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KAFZRB019356;
Mon, 20 Jan 2025 10:15:35 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KAFZot019353;
Mon, 20 Jan 2025 10:15:35 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 10:15:35 GMT
Message-Id: <202501201015.50KAFZot019353@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang
Subject: git: 5094faf5dfa8 - stable/14 - pvscsi: Explicitly mask
out CTS_SAS_VALID_SPEED bit
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 5094faf5dfa860f238f636457563bc0d89013c7a
Auto-Submitted: auto-generated
The branch stable/14 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=5094faf5dfa860f238f636457563bc0d89013c7a
commit 5094faf5dfa860f238f636457563bc0d89013c7a
Author: Zhenlei Huang
AuthorDate: 2025-01-15 04:32:31 +0000
Commit: Zhenlei Huang
CommitDate: 2025-01-20 10:14:43 +0000
pvscsi: Explicitly mask out CTS_SAS_VALID_SPEED bit
This driver prefers connection speed over sas port speed. On stable/13
branch the stack-allocated CCB is not cleared thus the cam layer may
report weird speed on boot.
```
da0: Fixed Direct Access SPC-4 SCSI device
da0: 4294967.295MB/s transfers
```
-current and stable/14 have the change [1] which clears stack-allocated
CCB thus are not affected, but I want -current and stable/14 to have this
fix in to reduce drift between branches.
1. ec5325dbca62 cam: make sure to clear even more CCBs allocated on the stack
Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D48438
(cherry picked from commit 7befd68335a0b34405b6293f30cc47cabc46ab06)
---
sys/dev/vmware/pvscsi/pvscsi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c
index 74c515c9fca0..c8b79485efc7 100644
--- a/sys/dev/vmware/pvscsi/pvscsi.c
+++ b/sys/dev/vmware/pvscsi/pvscsi.c
@@ -1445,6 +1445,10 @@ finish_ccb:
cts->proto_specific.scsi.flags = CTS_SCSI_FLAGS_TAG_ENB;
cts->proto_specific.scsi.valid = CTS_SCSI_VALID_TQ;
+ /* Prefer connection speed over sas port speed */
+ cts->xport_specific.sas.valid &= ~CTS_SAS_VALID_SPEED;
+ cts->xport_specific.sas.bitrate = 0;
+
ccb_h->status = CAM_REQ_CMP;
xpt_done(ccb);
} break;
From nobody Mon Jan 20 12:42:12 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yc92r2FsYz5lJ9q;
Mon, 20 Jan 2025 12:42:12 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Yc92r11VPz3v7G;
Mon, 20 Jan 2025 12:42:12 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737376932;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=sWCf11Jw/Pdnu4fDwho2PclPPZlM2qSfZkagDMLUMHE=;
b=sq3tRJH/vkyw2XonOh6CZeirAuZkd3rj590VjPygVe5nzhs8e9mRZu62C/+b3Tmvtk4TM1
QLMxP2y6sEZGjYgNm4cPBZphaYGplqjBiK1RsRYBd/ZE2AGPu+AizhUj28ypdZwA4zpzRA
kPPJIZjxlGxDzufWm9DF44I3xjZh9qhaGKrnOuQPoyByZVT1oPHMgIGXRAf88iXCfV3wLY
7KUWypD4zkMXJh5CWWgobLPjbFfUycfOthG1sR/RmfOVgM6CMk1Ce0cdSwJZw1Sn9+iint
wcePejAKAWAM0OghSArOloYEYMPm1mTKkhMiVK2jcvQkNQ1dxk/DOydOGToSEQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737376932;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=sWCf11Jw/Pdnu4fDwho2PclPPZlM2qSfZkagDMLUMHE=;
b=bWAFrUb2TtaQpX94xd+RTVBWq3K1ImhFY177n9FidK3Wiuf2E8Uy3lLuLbkWA4JZU7/8Ij
BRkAfDY0sbCB2zpr2ZLTnNIQKPNLxmP1M/9wkuckMn450uYIKZaHQvP0wDKXfpd0Qsi8v0
uH+TfWw1oVdStjYZMLLmEMAecI0MivOCgDqO0alTPTGPxQaI17LQWrSrRBx02jGUtBD9Hr
3hHFrNXPp2KIoYaPw2H/RiXQvztLFKznTuFGTGuv8w7Db7NWlaJbLJL4Giref5GSy79Hol
fsWVjSzITJY6OhktAmqtRyp6hFGC88ZVeyOYzfv7e2jOU3tQQVBys4S2DwShOg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737376932; a=rsa-sha256; cv=none;
b=mVuwP6daaq28/zCA4PABnW+ALETd1zSZzGBOoFruI0e4H4e00tWSVtYLuvIfPtfXC1ICYX
1z5B9KVCpIHBLEGPk+HjRd1/T0mVJlq3NGpl94Y7r17fK7HDlL0ErEKrlxGxn1e1fGn5Vr
FD8sg116dy5doh7FViUJnvvLG5fdrCzuzvX1gF4DlYZ0ncK6YHUZQkBPB2CySSTvdrLLA6
LS7XmLto/0gmd1cNyoCZ8fseFA21Q/bPkIKcQDx5BfbcVvsyFzkBfC/t1XV8cYNBHlrhht
EoUhNjB+BHycgjb+hkKuGbkUFk5exQ1PK7PVHzN7YWJUh5DSyDQVjJu9WcIcjw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yc92r0Z7rz5kr;
Mon, 20 Jan 2025 12:42:12 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KCgC1j098381;
Mon, 20 Jan 2025 12:42:12 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KCgCtq098378;
Mon, 20 Jan 2025 12:42:12 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 12:42:12 GMT
Message-Id: <202501201242.50KCgCtq098378@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang
Subject: git: 25695358d03b - stable/13 - pvscsi: Explicitly mask
out CTS_SAS_VALID_SPEED bit
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 25695358d03b4c60344df5b7dead04085350448d
Auto-Submitted: auto-generated
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=25695358d03b4c60344df5b7dead04085350448d
commit 25695358d03b4c60344df5b7dead04085350448d
Author: Zhenlei Huang
AuthorDate: 2025-01-15 04:32:31 +0000
Commit: Zhenlei Huang
CommitDate: 2025-01-20 12:39:26 +0000
pvscsi: Explicitly mask out CTS_SAS_VALID_SPEED bit
This driver prefers connection speed over sas port speed. On stable/13
branch the stack-allocated CCB is not cleared thus the cam layer may
report weird speed on boot.
```
da0: Fixed Direct Access SPC-4 SCSI device
da0: 4294967.295MB/s transfers
```
-current and stable/14 have the change [1] which clears stack-allocated
CCB thus are not affected, but I want -current and stable/14 to have this
fix in to reduce drift between branches.
1. ec5325dbca62 cam: make sure to clear even more CCBs allocated on the stack
Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D48438
(cherry picked from commit 7befd68335a0b34405b6293f30cc47cabc46ab06)
(cherry picked from commit 5094faf5dfa860f238f636457563bc0d89013c7a)
---
sys/dev/vmware/pvscsi/pvscsi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c
index b3be2280eb5e..e850f6d8dae3 100644
--- a/sys/dev/vmware/pvscsi/pvscsi.c
+++ b/sys/dev/vmware/pvscsi/pvscsi.c
@@ -1445,6 +1445,10 @@ finish_ccb:
cts->proto_specific.scsi.flags = CTS_SCSI_FLAGS_TAG_ENB;
cts->proto_specific.scsi.valid = CTS_SCSI_VALID_TQ;
+ /* Prefer connection speed over sas port speed */
+ cts->xport_specific.sas.valid &= ~CTS_SAS_VALID_SPEED;
+ cts->xport_specific.sas.bitrate = 0;
+
ccb_h->status = CAM_REQ_CMP;
xpt_done(ccb);
} break;
From nobody Mon Jan 20 12:42:13 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yc92s2dfGz5lHyV;
Mon, 20 Jan 2025 12:42:13 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Yc92s1kb5z3v9G;
Mon, 20 Jan 2025 12:42:13 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737376933;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=7iNAy7GZpDHyRKUQcnXHNTljW3UCbAasIVxnTIgcaP4=;
b=B4w3sQ71s97uhxKrdTfhZw9Cus2a/axGMKEwfkYtt5ES23UtHIYEqSWFn3UiTYTeb6Zkd+
4seFGnhVJ2fcncFEG926Z/jS2MDgj8miP0it+VvkHsLLihfPGPT30NzpX5+Jhb1OYOmyVA
lz+R5lANNdfsyW7mr4FVPcAlXEuY6AqAsEA4itRjvP6ZNIwsYsHzRMJhgW04kRp0tqAEuP
H7oTbn1rZi5fnhoPLy+UnL+WA8V/BtjS/Zs0ESqI8/5jJ3ngUNJIFmrDa17ZqE3AjoftyR
fFiYCvuZrDaabKJWLNpVWFsJ/KLqTzCXAjpTaHFOVuK/xmClxym7D/35rSkkzQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737376933;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=7iNAy7GZpDHyRKUQcnXHNTljW3UCbAasIVxnTIgcaP4=;
b=fcx/21EnrF5JMomv2btI6WzQ6YR2LluC+hUePgFs7Y+8ivZDwIFZxVuXkAUryv9K1c3fba
CLofx34r9xN2uFhtndRXhb/E4TcmrMd2lGi1YEkEHj/m9rO0hPdyJULZhSGvlHbFYiTnO2
Rp6VJbGDN7Bihxv8kbhH4P5EOdFuADqbkRx/VhRQmIBCVRE4+vtk6vdjrtdwL71145PSRF
irUKTobNzWk5L28oDahYrwInOjsXg3DmVygQN8mWNSMgvQ7FfHcf96OcTCllq4n795UqS6
uwSemXl8kU5Be6Be6tlqAi0jS36jD7Fhh1xKsdyYoz2usrCeErGXRPalHMghCA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737376933; a=rsa-sha256; cv=none;
b=Ph0k1/LwJPGqWsLEZntF+fjgZ4VCQgGbVbwSgRjwkz5bRjO34VVaN96VBFH3R9GwXKTpHj
RQWSJH/vyMLoL/FOwM+/nbAUH4PGSldiuSAkmq539WVhp+RWQES9KGnRpAVlmxIgnkSq+W
worqSwdXaEaocWYGI45eueovDxTO60eLzjU2ugDhywRckILQ15Rm3YuxHRxLe64koVsiP1
2Hfc3KNhknEEGZOn7bY+Le/yUFziKoUBMu8pHDuuiFDwOFcTgf6TQ1tBxgS0qLOrlWkeAJ
Im0uAkO75C0qd+v9rV9m3w4NYo5QkRr9fAy3QL9uJ1fiLDQefIJyP4AolmYv/A==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yc92s1GW8z5dl;
Mon, 20 Jan 2025 12:42:13 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KCgDre098413;
Mon, 20 Jan 2025 12:42:13 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KCgDFm098410;
Mon, 20 Jan 2025 12:42:13 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 12:42:13 GMT
Message-Id: <202501201242.50KCgDFm098410@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang
Subject: git: 23b90ad00a2a - stable/13 - cam: make sure to clear
CCBs allocated on the stack
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 23b90ad00a2a00e4c4fa25b996de79266ae152a6
Auto-Submitted: auto-generated
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=23b90ad00a2a00e4c4fa25b996de79266ae152a6
commit 23b90ad00a2a00e4c4fa25b996de79266ae152a6
Author: Edward Tomasz Napierala
AuthorDate: 2021-03-30 18:15:11 +0000
Commit: Zhenlei Huang
CommitDate: 2025-01-20 12:39:26 +0000
cam: make sure to clear CCBs allocated on the stack
This is required for small CCBs support, where we need to track
whether the CCB was allocated from an UMA zone or not. There are
no (intended) functional changes with the current source.
Reviewed By: imp
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D29484
(cherry picked from commit 076686fe0703b906a05c9869609dd550bd4ed7ac)
---
sys/cam/cam_periph.c | 6 ++++++
sys/cam/cam_xpt.c | 5 +++++
sys/cam/scsi/scsi_da.c | 3 +++
sys/cam/scsi/scsi_xpt.c | 7 +++++++
4 files changed, 21 insertions(+)
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 21abebc416ae..f609e198921a 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -760,6 +760,7 @@ camperiphfree(struct cam_periph *periph)
union ccb ccb;
void *arg;
+ memset(&ccb, 0, sizeof(ccb));
switch (periph->deferred_ac) {
case AC_FOUND_DEVICE:
ccb.ccb_h.func_code = XPT_GDEV_TYPE;
@@ -1333,6 +1334,7 @@ cam_freeze_devq(struct cam_path *path)
struct ccb_hdr ccb_h;
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("cam_freeze_devq\n"));
+ memset(&ccb_h, 0, sizeof(ccb_h));
xpt_setup_ccb(&ccb_h, path, /*priority*/1);
ccb_h.func_code = XPT_NOOP;
ccb_h.flags = CAM_DEV_QFREEZE;
@@ -1348,6 +1350,7 @@ cam_release_devq(struct cam_path *path, u_int32_t relsim_flags,
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("cam_release_devq(%u, %u, %u, %d)\n",
relsim_flags, openings, arg, getcount_only));
+ memset(&crs, 0, sizeof(crs));
xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
crs.ccb_h.func_code = XPT_REL_SIMQ;
crs.ccb_h.flags = getcount_only ? CAM_DEV_QFREEZE : 0;
@@ -1472,6 +1475,7 @@ cam_periph_bus_settle(struct cam_periph *periph, u_int bus_settle)
{
struct ccb_getdevstats cgds;
+ memset(&cgds, 0, sizeof(cgds));
xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cgds.ccb_h.func_code = XPT_GDEV_STATS;
xpt_action((union ccb *)&cgds);
@@ -1543,6 +1547,7 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **orig_ccb,
* First off, find out what the current
* transaction counts are.
*/
+ memset(&cgds, 0, sizeof(cgds));
xpt_setup_ccb(&cgds.ccb_h,
ccb->ccb_h.path,
CAM_PRIORITY_NORMAL);
@@ -1661,6 +1666,7 @@ camperiphscsisenseerror(union ccb *ccb, union ccb **orig,
/*
* Grab the inquiry data for this device.
*/
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h, ccb->ccb_h.path, CAM_PRIORITY_NORMAL);
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
xpt_action((union ccb *)&cgd);
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 391a5b8ae2a2..25679c705741 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -495,6 +495,7 @@ xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *
* This is an immediate CCB, so it's okay to
* allocate it on the stack.
*/
+ memset(&ccb, 0, sizeof(ccb));
/*
* Create a path using the bus, target, and lun the
@@ -2546,6 +2547,7 @@ xptsetasyncfunc(struct cam_ed *device, void *arg)
if ((device->flags & CAM_DEV_UNCONFIGURED) != 0)
return (1);
+ memset(&cgd, 0, sizeof(cgd));
xpt_compile_path(&path,
NULL,
device->target->bus->path_id,
@@ -5024,6 +5026,7 @@ xpt_start_tags(struct cam_path *path)
sim->max_tagged_dev_openings);
xpt_dev_ccbq_resize(path, newopenings);
xpt_async(AC_GETDEV_CHANGED, path, NULL);
+ memset(&crs, 0, sizeof(crs));
xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
crs.ccb_h.func_code = XPT_REL_SIMQ;
crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
@@ -5049,6 +5052,7 @@ xpt_stop_tags(struct cam_path *path)
device->inq_flags &= ~SID_CmdQue;
xpt_dev_ccbq_resize(path, sim->max_dev_openings);
xpt_async(AC_GETDEV_CHANGED, path, NULL);
+ memset(&crs, 0, sizeof(crs));
xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
crs.ccb_h.func_code = XPT_REL_SIMQ;
crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
@@ -5206,6 +5210,7 @@ xpt_register_async(int event, ac_callback_t *cbfunc, void *cbarg,
xptpath = 1;
}
+ memset(&csa, 0, sizeof(csa));
xpt_setup_ccb(&csa.ccb_h, path, CAM_PRIORITY_NORMAL);
csa.ccb_h.func_code = XPT_SASYNC_CB;
csa.event_enable = event;
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 5782d414bd42..2161e3340ff6 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -4888,6 +4888,7 @@ dadone_proberc(struct cam_periph *periph, union ccb *done_ccb)
/*timeout*/0,
/*getcount_only*/0);
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h, done_ccb->ccb_h.path,
CAM_PRIORITY_NORMAL);
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
@@ -6133,6 +6134,7 @@ dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector,
* up with something that will make this a bootable
* device.
*/
+ memset(&ccg, 0, sizeof(ccg));
xpt_setup_ccb(&ccg.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
ccg.ccb_h.func_code = XPT_CALC_GEOMETRY;
ccg.block_size = dp->secsize;
@@ -6170,6 +6172,7 @@ dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector,
min(sizeof(softc->rcaplong), rcap_len)) != 0)) {
struct ccb_dev_advinfo cdai;
+ memset(&cdai, 0, sizeof(cdai));
xpt_setup_ccb(&cdai.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
cdai.buftype = CDAI_TYPE_RCAPLONG;
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 512d4ad6823a..37d8333e21a8 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -1046,6 +1046,7 @@ proberequestdefaultnegotiation(struct cam_periph *periph)
{
struct ccb_trans_settings cts;
+ memset(&cts, 0, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE);
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
cts.type = CTS_TYPE_USER_SETTINGS;
@@ -2299,6 +2300,7 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path,
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("scsi_scan_lun\n"));
+ memset(&cpi, 0, sizeof(cpi));
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
cpi.ccb_h.func_code = XPT_PATH_INQ;
xpt_action((union ccb *)&cpi);
@@ -2425,6 +2427,7 @@ scsi_devise_transport(struct cam_path *path)
struct scsi_inquiry_data *inq_buf;
/* Get transport information from the SIM */
+ memset(&cpi, 0, sizeof(cpi));
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
cpi.ccb_h.func_code = XPT_PATH_INQ;
xpt_action((union ccb *)&cpi);
@@ -2485,6 +2488,7 @@ scsi_devise_transport(struct cam_path *path)
*/
/* Tell the controller what we think */
+ memset(&cts, 0, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
cts.type = CTS_TYPE_CURRENT_SETTINGS;
@@ -2747,6 +2751,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path
* Perform sanity checking against what the
* controller and device can do.
*/
+ memset(&cur_cts, 0, sizeof(cur_cts));
xpt_setup_ccb(&cur_cts.ccb_h, path, CAM_PRIORITY_NONE);
cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
cur_cts.type = cts->type;
@@ -2930,6 +2935,7 @@ scsi_toggle_tags(struct cam_path *path)
&& (dev->inq_flags & (SID_Sync|SID_WBus16|SID_WBus32)) != 0)) {
struct ccb_trans_settings cts;
+ memset(&cts, 0, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
cts.protocol = PROTO_SCSI;
cts.protocol_version = PROTO_VERSION_UNSPECIFIED;
@@ -3037,6 +3043,7 @@ _scsi_announce_periph(struct cam_periph *periph, u_int *speed, u_int *freq, stru
return;
/* Ask the SIM for its base transfer speed */
+ memset(&cpi, 0, sizeof(cpi));
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
cpi.ccb_h.func_code = XPT_PATH_INQ;
xpt_action((union ccb *)&cpi);
From nobody Mon Jan 20 12:42:14 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yc92v1mZqz5lHyY;
Mon, 20 Jan 2025 12:42:15 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Yc92t3Zyxz3vZB;
Mon, 20 Jan 2025 12:42:14 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737376934;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=o8BwJys7RU9qyHqxlWN3v/xISBFRKRzj1MhCf/AIXf8=;
b=LVaSBN5YvxQNKXCy+gfpF35p4uFOq4FPGObAfGtHRp1k4HgcNZ93HDksT0pWkQ0Bv+xWnX
YZamHTwa3S6xChKzBcG3ZJ0oiZ4FDImHc6gXJ39NWmRh28f8ZXhWvdGuQYSPVSB4trzx4A
hDSvekBCIkHPP0uGiCItY8py2pgv7zRo7emlciFWTVbBvKqL6QdNvKmP2DmlLx5+xLh4f8
7r8romgik1xwCpT57M1Kw+MmO889pc47Uav6YfNyeGrwwSb514QoebkY29kOy4SI384n6v
Ku4NZAKXLZUxNFUtIHu8KkPBh77wN9MHgO/xuLtNvwR2xHpJ6I0JLIOVYhrY6Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737376934;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=o8BwJys7RU9qyHqxlWN3v/xISBFRKRzj1MhCf/AIXf8=;
b=bVhVUpTPPzC37jgZ/Kim4bg/SQrg5WmrPkLbt+VF4QvedZnZYSyLY53MvkzvglWkDYLe+w
cyy92JHXbaJx/9Rqk5BHffiPynyFdGQwrlUEjuFTCH7Q7uren8sjFE1qOtOSurMvDqOmc8
QaeCfFDt6osn4YsZYNbohXmwq0fMCL60v97Xc2r9mYqCrpCHgiy5ViPArNksiHJHfkaYqh
CicB6LEyccFAg2R1gg2dGoKUZYkIkBHho9UW3i8Y/GNDFYgFRLRK4b8KoQYUlOuag7iCRv
k6nwnsk/vTcI4a3nQcPwgRF5H0S5s19rSIRWtKIttyhHc0I9Y6PU6o+XJNzInw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737376934; a=rsa-sha256; cv=none;
b=gs/wsll+Ef2og++Nzwe3pJMGVp7YCK6myOGy9j2XQ3gcP/hlilSGELjVk+h1jO/yovobDK
sZb1uowQBw3W8mu89eW5hbva7+XOE2OHeSfULaVp94/Oljvn1n6FKqAqVuK4U3dYMvnULh
nwXXVPQDbT6NJMUWA6zJ6BO4MLy4pTF+KEVfNfVBZ/cmIoAbC578ITRO2eJzIUrWcMx9dM
pcBJc6HneUSMj1aoWfbrGf8Cdmak2MVtpuMhhAkbqCL+HCIoFGf5VFuKXMLivnGU23SLSJ
wUn05bbvcnQ5vuIWVRkP8Csj5BgzPcCvYy4E8h9KPf1xCaq18XAX/3mBHzD66w==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yc92t2JPGz4yK;
Mon, 20 Jan 2025 12:42:14 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KCgE5k098445;
Mon, 20 Jan 2025 12:42:14 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KCgEvt098442;
Mon, 20 Jan 2025 12:42:14 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 12:42:14 GMT
Message-Id: <202501201242.50KCgEvt098442@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang
Subject: git: ee2a1bc81a17 - stable/13 - cam: make sure to clear
even more CCBs allocated on the stack
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: ee2a1bc81a1782f197053c53cf84b4933e545e47
Auto-Submitted: auto-generated
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=ee2a1bc81a1782f197053c53cf84b4933e545e47
commit ee2a1bc81a1782f197053c53cf84b4933e545e47
Author: Edward Tomasz Napierala
AuthorDate: 2021-04-10 10:25:22 +0000
Commit: Zhenlei Huang
CommitDate: 2025-01-20 12:39:26 +0000
cam: make sure to clear even more CCBs allocated on the stack
This is my second pass, this time over all of CAM except
for the SCSI target bits. There should be no functional
changes.
Reviewed By: imp
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D29549
(cherry picked from commit ec5325dbca629d65179f14f68bbcdb9c014f1523)
---
sys/cam/ata/ata_da.c | 2 ++
sys/cam/ata/ata_xpt.c | 3 +++
sys/cam/mmc/mmc_da.c | 1 +
sys/cam/mmc/mmc_xpt.c | 1 +
sys/cam/nvme/nvme_xpt.c | 2 ++
sys/cam/scsi/scsi_cd.c | 1 +
sys/cam/scsi/scsi_enc_ses.c | 3 +++
sys/cam/scsi/scsi_sa.c | 2 ++
sys/cam/scsi/scsi_xpt.c | 2 ++
9 files changed, 17 insertions(+)
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 4ad82e8e1fc0..38d8b45243bc 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1346,6 +1346,7 @@ adaasync(void *callback_arg, u_int32_t code,
case AC_GETDEV_CHANGED:
{
softc = (struct ada_softc *)periph->softc;
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
xpt_action((union ccb *)&cgd);
@@ -1381,6 +1382,7 @@ adaasync(void *callback_arg, u_int32_t code,
cam_periph_async(periph, code, path, arg);
if (softc->state != ADA_STATE_NORMAL)
break;
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
xpt_action((union ccb *)&cgd);
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 5c8f07dd5e9e..81e6269dfa0d 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -724,6 +724,7 @@ aproberequestdefaultnegotiation(struct cam_periph *periph)
{
struct ccb_trans_settings cts;
+ bzero(&cts, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE);
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
cts.type = CTS_TYPE_USER_SETTINGS;
@@ -1691,6 +1692,7 @@ ata_device_transport(struct cam_path *path)
ata_version(ident_buf->version_major) : cpi.transport_version;
/* Tell the controller what we think */
+ bzero(&cts, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
cts.type = CTS_TYPE_CURRENT_SETTINGS;
@@ -2126,6 +2128,7 @@ ata_announce_periph(struct cam_periph *periph)
struct ccb_trans_settings cts;
u_int speed, mb;
+ bzero(&cts, sizeof(cts));
_ata_announce_periph(periph, &cts, &speed);
if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
return;
diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index 18d686735082..81cbccb62693 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -693,6 +693,7 @@ sddaasync(void *callback_arg, u_int32_t code,
case AC_GETDEV_CHANGED:
{
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("=> AC_GETDEV_CHANGED\n"));
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
xpt_action((union ccb *)&cgd);
diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c
index 127c24e31bf4..c957a1ef5e41 100644
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -386,6 +386,7 @@ mmc_announce_periph(struct cam_periph *periph)
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph"));
+ memset(&cts, 0, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
cts.type = CTS_TYPE_CURRENT_SETTINGS;
diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c
index ec4ffd4b33e7..e55bc09cf35d 100644
--- a/sys/cam/nvme/nvme_xpt.c
+++ b/sys/cam/nvme/nvme_xpt.c
@@ -631,6 +631,7 @@ nvme_device_transport(struct cam_path *path)
path->device->protocol_version = cpi.protocol_version;
/* Tell the controller what we think */
+ memset(&cts, 0, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
cts.type = CTS_TYPE_CURRENT_SETTINGS;
@@ -792,6 +793,7 @@ nvme_announce_periph(struct cam_periph *periph)
cam_periph_assert(periph, MA_OWNED);
/* Ask the SIM for connection details */
+ memset(&cts, 0, sizeof(cts));
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
cts.type = CTS_TYPE_CURRENT_SETTINGS;
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index d5406dc76f6f..b964c59906d3 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -1257,6 +1257,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
status = done_ccb->ccb_h.status;
+ bzero(&cgd, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h,
done_ccb->ccb_h.path,
CAM_PRIORITY_NORMAL);
diff --git a/sys/cam/scsi/scsi_enc_ses.c b/sys/cam/scsi/scsi_enc_ses.c
index df06a8a4c22e..ef71cfb1f0b4 100644
--- a/sys/cam/scsi/scsi_enc_ses.c
+++ b/sys/cam/scsi/scsi_enc_ses.c
@@ -980,6 +980,7 @@ ses_paths_iter(enc_softc_t *enc, enc_element_t *elm,
!= CAM_REQ_CMP)
return;
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h, path, CAM_PRIORITY_NORMAL);
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
xpt_action((union ccb *)&cgd);
@@ -1041,6 +1042,7 @@ ses_setphyspath_callback(enc_softc_t *enc, enc_element_t *elm,
args = (ses_setphyspath_callback_args_t *)arg;
old_physpath = malloc(MAXPATHLEN, M_SCSIENC, M_WAITOK|M_ZERO);
xpt_path_lock(path);
+ memset(&cdai, 0, sizeof(cdai));
xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL);
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
cdai.buftype = CDAI_TYPE_PHYS_PATH;
@@ -1101,6 +1103,7 @@ ses_set_physpath(enc_softc_t *enc, enc_element_t *elm,
* Assemble the components of the physical path starting with
* the device ID of the enclosure itself.
*/
+ memset(&cdai, 0, sizeof(cdai));
xpt_setup_ccb(&cdai.ccb_h, enc->periph->path, CAM_PRIORITY_NORMAL);
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
cdai.flags = CDAI_FLAG_NONE;
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index 2ac4edb48de2..9c596f5523d0 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -2552,6 +2552,7 @@ saregister(struct cam_periph *periph, void *arg)
bzero(&ext_inq, sizeof(ext_inq));
+ memset(&cdai, 0, sizeof(cdai));
xpt_setup_ccb(&cdai.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
@@ -4728,6 +4729,7 @@ saextget(struct cdev *dev, struct cam_periph *periph, struct sbuf *sb,
SASBADDVARSTR(sb, indent, periph->periph_name, %s, periph_name,
strlen(periph->periph_name) + 1);
SASBADDUINT(sb, indent, periph->unit_number, %u, unit_number);
+ memset(&cgd, 0, sizeof(cgd));
xpt_setup_ccb(&cgd.ccb_h,
periph->path,
CAM_PRIORITY_NORMAL);
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 37d8333e21a8..28d6445afac5 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -2730,6 +2730,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path
inq_data = &device->inq_data;
scsi = &cts->proto_specific.scsi;
+ memset(&cpi, 0, sizeof(cpi));
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
cpi.ccb_h.func_code = XPT_PATH_INQ;
xpt_action((union ccb *)&cpi);
@@ -3086,6 +3087,7 @@ scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb)
struct ccb_trans_settings cts;
u_int speed, freq, mb;
+ memset(&cts, 0, sizeof(cts));
_scsi_announce_periph(periph, &speed, &freq, &cts);
if (cam_ccb_status((union ccb *)&cts) != CAM_REQ_CMP)
return;
From nobody Mon Jan 20 12:42:15 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yc92v6cvJz5lHyZ;
Mon, 20 Jan 2025 12:42:15 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Yc92v45h8z3vg2;
Mon, 20 Jan 2025 12:42:15 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737376935;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=A0UdfaMQQAZSLqSIXrPKfcIEa/p07ZY+pkXhVPoENJc=;
b=OvTTPrEb2KbWaNBHBOIGFzHXFKLK6sawNBaDIiwZBkvBk+0OH56WFKwetB4FDZbU1RBbms
LRDX4mXfztNcZcZhSo9RMv8vvtQJYcpv0iQcP5CLtWEtpr7tRnwIxofztfI+0CVMWwG5Vq
VGwmdMvIpGu5GkA83pNsomx3MtVITr1MuBguUJ2x13D0ldDCZuAfDDd9uBnAcNj4Dt5+AI
Iy3QGwq5Az3IiD5OElXVYz8JBPaUQ4jioIgieWZYk05PABa70t/uK3KV1CbCDBZT3eoT/d
Xowx5EDrPwJQPRLS50AOBVgjnx/aXOLgZTtE69qXk3znAIu4kAC0X9+t3NcInw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737376935;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=A0UdfaMQQAZSLqSIXrPKfcIEa/p07ZY+pkXhVPoENJc=;
b=fRO5y+OaYABRrRIzwL+T2Sp9ioLjCfnHznkKIDdu/wUJpQbWTRyCsH8L6h7JVHGcaPfxpV
1Ko+aHzNmQDyUOcZhn+VaieB64ItNbwDHX9ZbNtNTTnnl5BQrAy1m57sm2zz2/LVUfL2hq
e6SMTqZw37bnbg4efBAYuVy+BECszHWs2N0dAyxaTU5CbPRBBsmYMOmcXjBTDllf3g1mWf
8kzZvLi9eOzVQtPsdyvQan/yk3ncyCIeoyeutHa4ylHYBsJoXoFUvuOTu1z6/cbYiuOpk5
jIIxighzDfnWV2j6zkUZ92apR5CC+Aycspu8Ip+sfeUBeGThxsTOTumQFam1Mg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737376935; a=rsa-sha256; cv=none;
b=FWhpP5kuoh0pI8hFF0d+zo4by5jZe4eYSeSwjteEHMASgtmIaTZwMfE1phaQ6SnkYbEjjm
IdDk7lvrJJ1H8VVLHZ8r5ngCvEI4sSqThqCKvexcK2E/JH09kL+giQ1s8SJ5tyQf7STCXC
aQZdtEjSBswa51NOwMeu7au93DicBe7DCBgqC7153Fs5lVmMVAeAZxKscMEhtQy0E4pHTK
5jSnHq+h95FpkM1reP9v/IdUBqWfLaUOu0IcIXAVbWW343BbPQez5BJF8SbZ+uvk5jWqp1
l/4SUQH0knVtMRt6SlJyaCOLwGIxxNQ0hnEaqik2qIvyvGMM0WAY5rlRovaIyg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yc92v3cv1z5dm;
Mon, 20 Jan 2025 12:42:15 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KCgFC7098477;
Mon, 20 Jan 2025 12:42:15 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KCgFBW098474;
Mon, 20 Jan 2025 12:42:15 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 12:42:15 GMT
Message-Id: <202501201242.50KCgFBW098474@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang
Subject: git: cdd9dd5ac768 - stable/13 - cam: add missing zeroing
of a stack-allocated CCB.
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: cdd9dd5ac768675c1e67b6aa33f8f1c0ae56534a
Auto-Submitted: auto-generated
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=cdd9dd5ac768675c1e67b6aa33f8f1c0ae56534a
commit cdd9dd5ac768675c1e67b6aa33f8f1c0ae56534a
Author: Edward Tomasz Napierala
AuthorDate: 2021-05-16 09:28:04 +0000
Commit: Zhenlei Huang
CommitDate: 2025-01-20 12:39:27 +0000
cam: add missing zeroing of a stack-allocated CCB.
This could cause a panic at boot.
Reported By: Shawn Webb
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
(cherry picked from commit 0f206cc91279e630ad9e733eb6e330b7dbe6c70e)
---
sys/cam/ata/ata_xpt.c | 1 +
sys/cam/scsi/scsi_xpt.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 81e6269dfa0d..c20c8626e395 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -2181,6 +2181,7 @@ ata_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb)
struct ccb_trans_settings cts;
u_int speed, mb;
+ bzero(&cts, sizeof(cts));
_ata_announce_periph(periph, &cts, &speed);
if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
return;
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 28d6445afac5..3b3aaabf2968 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -3144,6 +3144,7 @@ scsi_announce_periph(struct cam_periph *periph)
struct ccb_trans_settings cts;
u_int speed, freq, mb;
+ memset(&cts, 0, sizeof(cts));
_scsi_announce_periph(periph, &speed, &freq, &cts);
if (cam_ccb_status((union ccb *)&cts) != CAM_REQ_CMP)
return;
From nobody Mon Jan 20 12:42:16 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yc92w6FR8z5lJ9v;
Mon, 20 Jan 2025 12:42:16 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4Yc92w4ZZdz3vd7;
Mon, 20 Jan 2025 12:42:16 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737376936;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=PnhsoaDeTzCjpwTU0M1eSlclO57vS3Hz5B0BGDLG3LY=;
b=pxDjdrua1nsfRJOJHvO1QkvUdIS5JtjVCVTxkG7TvWJ+C7M1tna/hMom7OTShFkfgXKQyo
oX3TvcNdxzjEJjwLk3nbpaWlWfIHRMld5nTRgidNAo06456AZmNVU0M6I6T28rrw8lAChj
Gj25Zzw71GVL7meQ3F8R0jv6qRVjq/r7SH6Ufz4JZGOYlju6mPWZmDH2cb3rwC3S98uWnK
Shx903cv2Nt7a92CuZXtVs5Wo+s/E/rGXMbuqF7Rmy5W/sicQntpo1AxNVA6p+u//6+/Vc
hyZVFthobzBBHDUtLTCNKnrWVSf/iikPV/MgSR8gg+T3I1lkhJwn8JRvpjd7PA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737376936;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=PnhsoaDeTzCjpwTU0M1eSlclO57vS3Hz5B0BGDLG3LY=;
b=yVaIVM27fNT7bn05gFws/Lu5fPsPZ0RIiIF6G/W6UOopteTF27QWBtPcFnYjoAIelS/8D8
vl1xjE0+0PTR0uGJYut4oTQkIY/LN183QUaG7OX9BiKaGWGFqgjJ0OXsmBsZwPbHZ6hf2Y
3dsTZCIQ9KFjb4KsNgrD9LRUGLK1DQQQTixy+fkHm05iQ4METN4BpyBt1OwcYfdnsSopf7
4GK1VIhDPyqPs2w24tgM819KRmhrRyw3GyOIG7iTemWgDQv9erxNPIWSb66yFGT60rU4YZ
LQLn4zKz0Aq73Hq7yANayLplMbaqUdPuZrlldGZZ15sU1wAaiGn2e1IQhgJdXg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737376936; a=rsa-sha256; cv=none;
b=BUAOxaf05oaBDuLsE7J22vzm6BjTtbHAYcKH+fQIyBIuh9jAJoGc7mEyDID9f7N4toOLnO
qo9cUXqUqPHtjXlpC+GJDwksKY785h9m4uGmMfG9cmGFq3n0ES++1quw7L5ADubXvwE+7q
7WsaN+YDhf4jz6vV2OQGhrlQSeGlb0truqf8DEKqyCR2hoa26RXZV5XHQ+fykIE9EgR+sb
Hsu3cDO+WkWzdvXL25HH70QzTqYtvdbVWhIRd7xPwcCy1O2eC10uJlnhn6hB3S5ZQLFXDw
eDLgUKTPQ0oDd6wEE3DL798EEsqpXVREkpTCMCZ1MN6VP7ild0/RXl9fJCuDog==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yc92w4BBdz5hH;
Mon, 20 Jan 2025 12:42:16 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KCgG5Z098810;
Mon, 20 Jan 2025 12:42:16 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KCgGT2098794;
Mon, 20 Jan 2025 12:42:16 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 12:42:16 GMT
Message-Id: <202501201242.50KCgGT2098794@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang
Subject: git: eeecaa064c8d - stable/13 - cam: clear stack-allocated
CCB in the target layer
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: eeecaa064c8d4ba0f4a17739527ef285ee56fd36
Auto-Submitted: auto-generated
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=eeecaa064c8d4ba0f4a17739527ef285ee56fd36
commit eeecaa064c8d4ba0f4a17739527ef285ee56fd36
Author: Edward Tomasz Napierala
AuthorDate: 2021-07-21 09:18:15 +0000
Commit: Zhenlei Huang
CommitDate: 2025-01-20 12:39:27 +0000
cam: clear stack-allocated CCB in the target layer
Note that, as pointed out by scottl@, this code should really look
a bit different, in that the stack allocations should be replaced
with dynamic allocation, and the periph creation should be moved
to a context where one can use M_WAITOK. See the review for more
details. For now let's go with a minimal fix until we're done with
UMA CCBs.
Reviewed By: mav, imp
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D30298
(cherry picked from commit 616a676a0535eca78ce6b02a6226d0bcb69d7d4e)
---
sys/cam/ctl/scsi_ctl.c | 3 +++
sys/cam/scsi/scsi_targ_bh.c | 7 +++++--
sys/cam/scsi/scsi_target.c | 4 +++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
index 4bc7091337ca..d3a3e299a213 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -477,6 +477,7 @@ ctlferegister(struct cam_periph *periph, void *arg)
/*getcount_only*/1);
}
+ memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE);
ccb.ccb_h.func_code = XPT_EN_LUN;
ccb.cel.grp6_len = 0;
@@ -611,6 +612,7 @@ ctlfeoninvalidate(struct cam_periph *periph)
cam_status status;
/* Abort all ATIOs and INOTs queued to SIM. */
+ memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE);
ccb.ccb_h.func_code = XPT_ABORT;
LIST_FOREACH(hdr, &softc->atio_list, periph_links.le) {
@@ -1850,6 +1852,7 @@ ctlfe_dump_queue(struct ctlfe_lun_softc *softc)
struct ccb_getdevstats cgds;
int num_items;
+ memset(&cgds, 0, sizeof(cgds));
xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
cgds.ccb_h.func_code = XPT_GDEV_STATS;
xpt_action((union ccb *)&cgds);
diff --git a/sys/cam/scsi/scsi_targ_bh.c b/sys/cam/scsi/scsi_targ_bh.c
index ae105ea03356..7b543763c521 100644
--- a/sys/cam/scsi/scsi_targ_bh.c
+++ b/sys/cam/scsi/scsi_targ_bh.c
@@ -239,6 +239,7 @@ targbhenlun(struct cam_periph *periph)
if ((softc->flags & TARGBH_FLAG_LUN_ENABLED) != 0)
return (CAM_REQ_CMP);
+ memset(&immed_ccb, 0, sizeof(immed_ccb));
xpt_setup_ccb(&immed_ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
immed_ccb.ccb_h.func_code = XPT_EN_LUN;
@@ -265,7 +266,7 @@ targbhenlun(struct cam_periph *periph)
struct ccb_accept_tio *atio;
atio = (struct ccb_accept_tio*)malloc(sizeof(*atio), M_SCSIBH,
- M_NOWAIT);
+ M_ZERO | M_NOWAIT);
if (atio == NULL) {
status = CAM_RESRC_UNAVAIL;
break;
@@ -307,7 +308,7 @@ targbhenlun(struct cam_periph *periph)
struct ccb_immediate_notify *inot;
inot = (struct ccb_immediate_notify*)malloc(sizeof(*inot),
- M_SCSIBH, M_NOWAIT);
+ M_SCSIBH, M_ZERO | M_NOWAIT);
if (inot == NULL) {
status = CAM_RESRC_UNAVAIL;
@@ -348,6 +349,8 @@ targbhdislun(struct cam_periph *periph)
if ((softc->flags & TARGBH_FLAG_LUN_ENABLED) == 0)
return CAM_REQ_CMP;
+ memset(&ccb, 0, sizeof(ccb));
+
/* XXX Block for Continue I/O completion */
/* Kill off all ACCECPT and IMMEDIATE CCBs */
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index 4cb8024545e1..dcec777d1604 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -360,6 +360,7 @@ targendislun(struct cam_path *path, int enable, int grp6_len, int grp7_len)
cam_status status;
/* Tell the lun to begin answering selects */
+ memset(&en_ccb, 0, sizeof(en_ccb));
xpt_setup_ccb(&en_ccb.ccb_h, path, CAM_PRIORITY_NORMAL);
en_ccb.ccb_h.func_code = XPT_EN_LUN;
/* Don't need support for any vendor specific commands */
@@ -933,7 +934,7 @@ targgetccb(struct targ_softc *softc, xpt_opcode type, int priority)
int ccb_len;
ccb_len = targccblen(type);
- ccb = malloc(ccb_len, M_TARG, M_NOWAIT);
+ ccb = malloc(ccb_len, M_TARG, M_NOWAIT | M_ZERO);
CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("getccb %p\n", ccb));
if (ccb == NULL) {
return (ccb);
@@ -1030,6 +1031,7 @@ abort_all_pending(struct targ_softc *softc)
* Then abort all pending CCBs.
* targdone() will return the aborted CCB via user_ccb_queue
*/
+ memset(&cab, 0, sizeof(cab));
xpt_setup_ccb(&cab.ccb_h, softc->path, CAM_PRIORITY_NORMAL);
cab.ccb_h.func_code = XPT_ABORT;
cab.ccb_h.status = CAM_REQ_CMP_ERR;
From nobody Mon Jan 20 14:26:25 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCM53ztDz5lPKp;
Mon, 20 Jan 2025 14:26:25 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCM53FpWz4869;
Mon, 20 Jan 2025 14:26:25 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383185;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=BKW1DVsD3v5fnfy+XI1uscpY5akLQb/ME/jlLYRleC0=;
b=lZensxFlzWSEXz+WaxTvG9911XKOiRMjkoUwk5f5L8/KIqLqFZAann3wsaP08EA8P13B6B
cY8yQpIHgULsPl4TAlEtXHRhEroJvGJtEZtF0GtUpDbBRdUZ7bc/9AG9sJ0jT1jLXvDJaK
HXD1mqeKn+UqtmuFO7nwxBKq2w+WPjK/fYz3YmQsfz5IWFym8O0jy/vGlBhaY1dtUG4X2r
RqY/COU4y0pi91I9FLVNRwrO0VeKrjdIXN5Vr1Feye0kz8qPZ3qxtPZuq2oIRePd33KI4y
VoGT0GlZUpMD0iSZAbyAZc2d9+6LAW/bBjvCRDVzmNrtItHKoxTgHYfdQ0Eo5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383185;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=BKW1DVsD3v5fnfy+XI1uscpY5akLQb/ME/jlLYRleC0=;
b=U76BU/0joCJsxxLVMg2HnnPBEy9B9UohK12H4hCAbka7K2jxh8337e0cNAwAhUE43QP/w6
JSKJ7h1x6AnO9PXrpdBEw/4yKyst+NBlFKUynF/zve4f7fmrB8dXWZzSmLs3/pBiVsvcp6
2rWqSDvVn+OFGUaomee65SY1AlJNfHKo22z3w6DU48CLXX7oclUJAInQDrreJhHQMwbePT
3EvZ287S43kjvfj8090on1hNDiFAVrUKGLKro6YtJBk/1ONzq2hg3d0GhQKy6SbXxregNV
KH1qjBk0nKIImM2TbQxJUKnG+2/hv4ro+dpFcPJdzimPeRR6vPpknabiqEoU2A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383185; a=rsa-sha256; cv=none;
b=Secavvy7aCv82ZJE2Wfx63BJU6nCNWABfvjEH9lDVn1+vYi69nty7mC13K80+tdNrmHPRC
pgKr0GirdhHVrgesp2jxi84/XVOZMSANvmcpH+YEDYKiWclyLeb6aAx95j/qSJnWhXnFHm
Qta/deOOrAEllmj8UTRnBPpW7peyS3Wb3TLuLp80eN9lcfe3NqWShrxbNK7P22a1QqCvVi
TfCy0laXXo7KZsatCyt5jfcxtzVC3ZkmIbD1+VpytmZqPIP+sCYHnEuSBjzod3hHsqEDfd
Orx0nQ4L5YbWjmZU4YZx+D29ue4VChNQC4NTCreuNngSSYgM95HOB5KfpTUW/Q==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCM52VH5z7Jw;
Mon, 20 Jan 2025 14:26:25 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KEQPAi086989;
Mon, 20 Jan 2025 14:26:25 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEQPHj086986;
Mon, 20 Jan 2025 14:26:25 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:26:25 GMT
Message-Id: <202501201426.50KEQPHj086986@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: c4cae8cbc337 - stable/14 - libbsnmp: avoid division
by zero with empty password
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: c4cae8cbc337eaf824774fcba88018e42fa31efa
Auto-Submitted: auto-generated
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=c4cae8cbc337eaf824774fcba88018e42fa31efa
commit c4cae8cbc337eaf824774fcba88018e42fa31efa
Author: Gleb Smirnoff
AuthorDate: 2025-01-11 05:08:02 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:25:14 +0000
libbsnmp: avoid division by zero with empty password
PR: 283909
(cherry picked from commit 4dc1820a16b9b6108e0ff8a0265c08c67fa34146)
---
contrib/bsnmp/lib/snmpclient.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c
index ab3ac2d18e64..b312a37ed3ed 100644
--- a/contrib/bsnmp/lib/snmpclient.c
+++ b/contrib/bsnmp/lib/snmpclient.c
@@ -1792,7 +1792,7 @@ snmp_discover_engine(char *passwd)
if (snmp_client.user.auth_proto == SNMP_AUTH_NOAUTH)
return (0);
- if (passwd == NULL ||
+ if (passwd == NULL || strlen(passwd) == 0 ||
snmp_passwd_to_keys(&snmp_client.user, passwd) != SNMP_CODE_OK ||
snmp_get_local_keys(&snmp_client.user, snmp_client.engine.engine_id,
snmp_client.engine.engine_len) != SNMP_CODE_OK)
From nobody Mon Jan 20 14:26:26 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCM642Gjz5lPKq;
Mon, 20 Jan 2025 14:26:26 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCM63CXYz48jP;
Mon, 20 Jan 2025 14:26:26 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383186;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Qnb+3m0uB0w968B1ENQBB5saPPYqASIAeYlnQvWXZ98=;
b=bLQV0lo9CS4zlnIqK+7xYyNS27Ztbtw2ahtREt6s9YaiUQ7jGH0AfRFpHA0Siqe5fdk0Kd
c17COTk4x7XA02ftXrI97LNBRJL3FtLJtKgvXzfxouA6KBq4Oe0NriPIVGjowU14WD9KND
sSZtru+Eb6Xxy1JVgUaxTQlySPRrdo/ATaiXxZbKObTKMsyj7/Bnc25dvpxOHevr5UFUEj
yJMSASuenVTfearSZO3y1Re8SsQkugW/heRgNGkludJcAsLGW1zxkCiy8szKWH1bUZ0CfH
GcEjxnz7nFQ6KGXS+Fw/3x/MZB3Og/90FDr8tLPhT14848hoAlrozBzgTNDoow==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383186;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Qnb+3m0uB0w968B1ENQBB5saPPYqASIAeYlnQvWXZ98=;
b=BK+XW0ARaGn4o45R9OqOpsVrn7R0bZYMMeLKdrpsXVpzqu2RyUmMYDnsb94zdjsMZQ47B5
Ma4KRdrxEl5x4P8C7EzJqdXAuzKGbLKZ1CvKbsYDpdFasGSK069QBBLOoxg2e2QW7OCFaD
U6Nm2ocPKkAwQAd0yU3yag8ew1ZYf7v8Z3g/P1Y2yufNjgZhxNBa2Oi5PqQQbGfUi+/m3O
0q7RHGJcOo0imM3czJOAA+rLy2VapvXNFa/T2xjH4jRB4KDy7mSjH/3CxGkPTp+MopFX/P
UgJt1PDw8i7bKRk1knUZLm6NIpvjjjxHurNDELnhLB6Oyiey4bTouPbM6Psjag==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383186; a=rsa-sha256; cv=none;
b=AV3W/7v+IQuC1jzG+BraAwwSeesy3Cwq5QfKHkdbyc1IxY7IM2hzQWvFrhnaLSN/mAWz+6
PojzVop1SOAOTznty/u6RTtnkZaGXLL1gZTDYlT469xQT3sX9/MxN5bQONZlPcGaOjLnBl
sNNFLJ0yrefEM8EMKW9pVuXuylE5Hgyi7A02bqcjTRsLMiB4oWwZ86JY83eIodyXjgGw0p
jIs5yr0iKB7yFVtyXlKJwKFBPxJlssswwEsWoFPP3hYbeQmGjYlzrwkNQmhhQs3wykIpkp
vk7RHhv5nGLhU/r0BUkRvLRXeJX1mDKKT0G/Vu2znqXqu0k5HdWh5XmMeK5j1Q==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCM62dlTz7sv;
Mon, 20 Jan 2025 14:26:26 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KEQQfV087032;
Mon, 20 Jan 2025 14:26:26 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEQQbb087029;
Mon, 20 Jan 2025 14:26:26 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:26:26 GMT
Message-Id: <202501201426.50KEQQbb087029@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: 0bfbd30663b6 - stable/14 - libbsnmptools: avoid
uninitialized snmptoolctx->passwd with empty password
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 0bfbd30663b68a851ebf24667d121c6891c86827
Auto-Submitted: auto-generated
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=0bfbd30663b68a851ebf24667d121c6891c86827
commit 0bfbd30663b68a851ebf24667d121c6891c86827
Author: Gleb Smirnoff
AuthorDate: 2025-01-11 05:08:02 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:25:14 +0000
libbsnmptools: avoid uninitialized snmptoolctx->passwd with empty password
The removed check left snmptoolctx->passwd pointer to uninitialized
memory. Always calling strlcpy(3) would guarantee that with empty
password it will point to empty string.
Submitted by: markj
PR: 283909
(cherry picked from commit 3999a860d6e899de98b1025317d2d0ef1f83255f)
---
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
index a9d44cee4364..fb09e1ac785e 100644
--- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
+++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
@@ -178,8 +178,7 @@ snmptool_init(struct snmp_toolinfo *snmptoolctx)
warn("malloc() failed");
return (-1);
}
- if (slen > 0)
- strlcpy(snmptoolctx->passwd, str, slen + 1);
+ strlcpy(snmptoolctx->passwd, str, slen + 1);
}
return (0);
From nobody Mon Jan 20 14:26:53 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCMd5vJvz5lPTM;
Mon, 20 Jan 2025 14:26:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCMd5PlTz49g3;
Mon, 20 Jan 2025 14:26:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383213;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=TsFhbBtDxAy97mjIw2FhdHhVgp02lrEurO9NqlwnXY0=;
b=o/evr0ZueMWdOrkaZHy4QCTGvfRJL5rjGwAkS0D7h+mAWzvXqcSnRCZamYBemi1KBL5NQC
yNo0gqp/1scuGyYGFspJBWK8WTnDDtvKmU9lRFuDppSyei27xD2Lr2VXH8q9iw79RwcnUZ
yUXhTj+BOZAHyVW8bLQI6lgUlvEgdS3VtB4ggbqPwmwQKmRfCnJuvCjFVjiFLID7ra3HRD
PZA4QBVquOO1blsTsDw91gdGjkKGLsNfMlUdhDZbX+YTV2ZsoSDvB6gjtzQxZhVkZqvR4N
18EdGwSVm/4wjmG5tZ6/Zly2gtbR6CRYjcrEOWhDcMOmZinosYLaIoyyNENp0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383213;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=TsFhbBtDxAy97mjIw2FhdHhVgp02lrEurO9NqlwnXY0=;
b=bzMassnbruv2V6eOmzU6wXuIQszpWO9DU9wLkLwtMnIm7G9KuQd9d6lvKvVStaulJZL1jX
EBP3cG4jiRXP5dNPDwX7sUt6HmKBunmsscPAsoufJhThl3nL/r0jtdu8naTNmdmNu6vwv5
cLZcvwETK1c7LIiGSnxdNe5dXfwL6/0chBgVObVnPz/CPF5Fwkq+mKRFmygNf+5bBKRjbo
eceea5oavZFLEDuAtAtRotLQH7q57pBW/5TNS0eDJIgVeXu1+PH8beXSkMOHYdPP2mazus
WyUbaqq9fds1HzQyiDurKkCWiThAXaMOTFuPI4Z1nsLbLnv7t+SXA2zfWU+xlQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383213; a=rsa-sha256; cv=none;
b=w39ApYWHKK4sL9CfForw8jkm3beUYK5feTfYbtkTWCpzf9b66kaFPkDYE8klYwgsZpD/gC
VRNA2j3nJsbJvNm2N9KtCUn8SKZLiCzDMPmp7UW3Ag5+mxel1BdN6EI6iWGxyNYhk+CUPN
j5rXGfc9cmOyqxiUIyQYtaVrh9d4Eyf4Dlk/IEcoBxvbWreZ8JuZ4kDHeMPisQJL/IyIrs
jrqZlk8qC5R3ZD9jUOiWQ/OmTqxZrl18tRjUu9Nvvdib0qzZ0AMyApoVaqo6ja07NfIKh1
E+AAi1onUGmGbSu093ehCwWxzHBB2NjscurZffSS3GiOF17PDvwdfxJVWPaUdA==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCMd4jCnz8Hr;
Mon, 20 Jan 2025 14:26:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KEQrdU087299;
Mon, 20 Jan 2025 14:26:53 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEQrab087296;
Mon, 20 Jan 2025 14:26:53 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:26:53 GMT
Message-Id: <202501201426.50KEQrab087296@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: 61c50909354a - stable/14 - munmap.2: Unaligned addresses
do not return error
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 61c50909354ace6f07d0b2113f10965f4546e0ed
Auto-Submitted: auto-generated
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=61c50909354ace6f07d0b2113f10965f4546e0ed
commit 61c50909354ace6f07d0b2113f10965f4546e0ed
Author: Ed Maste
AuthorDate: 2025-01-15 16:52:58 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:25:14 +0000
munmap.2: Unaligned addresses do not return error
We previously claimed that non-page-aligned addresses would return
EINVAL, but the address is in fact rounded down to the page boundary.
Reported by: Harald Eilertsen
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Fixes: dabee6fecc67 ("kern_descrip.c: add fdshare()/fdcopy()")
Differential Revision: https://reviews.freebsd.org/D48465
(cherry picked from commit 9e36aaf0c24cf158e83c69c1d2312c000c3c36f3)
---
lib/libc/sys/munmap.2 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index 8f5cb0c02e2b..cf8d9ec22b1c 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -25,9 +25,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)munmap.2 8.3 (Berkeley) 5/27/94
+.Dd January 15, 2025
.\"
-.Dd June 22, 2017
.Dt MUNMAP 2
.Os
.Sh NAME
@@ -56,8 +55,6 @@ will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
-.Fa addr
-argument was not page aligned, the
.Fa len
argument was zero or negative, or
some part of the region being unmapped is outside the
From nobody Mon Jan 20 14:26:54 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCMf74ZCz5lPZY;
Mon, 20 Jan 2025 14:26:54 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCMf64f6z49jG;
Mon, 20 Jan 2025 14:26:54 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383214;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=tW7TgAty811m8Zgrk0CwPcNwbNp8647qmbC+CpNgO7s=;
b=id96PcKFkUPs+H4RIY38lM2e9/ewASzFsRIPJQ9ImO0Q2MxM0pdO67uQY49wV8H1R76wzV
DMomoUeMAkQknq8cJTlcawI6mQO+mzerR1gmRaNU3rt4Jz1NS+PNC7aDxPCtontH2/hOdW
SSvu97PfGO52RBQi47kq7C6dv1aYAont4BGKdOwpxySX+DklM9NrNH2XVpLjuYBpVJev+x
R6WBebaTxVrSPh8TToNnSvOksynX16n5YUCm8H73xaTRfDdmrRIaknHq/e5x0XHAmTwmx+
0YzcA7iuRfPyq57okdV2mp33n3dfpNd7ODifvT7k+bVooKceVDeOYmMBNWMnIA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383214;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=tW7TgAty811m8Zgrk0CwPcNwbNp8647qmbC+CpNgO7s=;
b=J6hFTw//No3lKPkMUKogaJVJwOPIpUkzZhZ6j2+BoTpfIxYO6xzjWvI3TKVPvUY8z06pc9
TIKW7sBdcEEMO3+EMQ5//2x5ZuiHbk+JuptzxbY97EIGhUPbWO4ufWEnV0WpYZAXEYMaRi
/MfgnVhSObRUVA0IksKZtuyxdTnNq3VH5ZNx8wzvv2isQ7KCGeboqhqx0RysPiiU4ElWQp
/3gUCB4zxthUwcNa4egParT/c3exkX29o8IU6beOJ3rCMoRSwPPwNntOuTxdm0SHCiJOY8
YPASDoMDXW+uCi+zadGGRQuBjevQ7rDmpNcOQ/D5Cf+GPeQpwa8ORU/ImKyMyQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383214; a=rsa-sha256; cv=none;
b=YFg6LDACTbVcNAe4hyNFHhhpTb9ME23y5/a9HTdFRFsJm6zk3TQr7JhPB/I648aiH2PWNd
xZvOl6y3MIERp08vJSZ3yVs7cC2U6oCM2XLx2P0vbwCJCRnCqUuED7Ne9+xktvI4HcmR/k
lmE70B2peUKZF4KBu0p88uOATptdQe7O5GSoYsR3UFaCow8CfM09vrGF7bpkUfVY717IBz
M3Zchr4jvCEtJ01ZYDu15k7ntwtwtaZYgbIdhfDHtiSg2rKmFW0+lla0pRVgbB8h+wN+Xv
UuICgRUmVLdQZhynNvZyAMQHQkpNeJeuVQwqmg+VBwwOlo9RUY8AIo1yKFNSHQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCMf5dJtz8Hs;
Mon, 20 Jan 2025 14:26:54 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KEQsH0087344;
Mon, 20 Jan 2025 14:26:54 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEQs1q087340;
Mon, 20 Jan 2025 14:26:54 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:26:54 GMT
Message-Id: <202501201426.50KEQs1q087340@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: e2cbfa1f5045 - stable/14 - munmap.2: Remove EINVAL
for negative len
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e2cbfa1f5045019d34eb0091db7755c151ea06d5
Auto-Submitted: auto-generated
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=e2cbfa1f5045019d34eb0091db7755c151ea06d5
commit e2cbfa1f5045019d34eb0091db7755c151ea06d5
Author: Ed Maste
AuthorDate: 2025-01-15 21:44:31 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:25:14 +0000
munmap.2: Remove EINVAL for negative len
len is unsigned (it is size_t), so cannot be negative.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fab411c4fd5224e3dd44e0eb288d60b27480e2d1)
---
lib/libc/sys/munmap.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index cf8d9ec22b1c..2411ccb3b0db 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -56,7 +56,7 @@ will fail if:
.It Bq Er EINVAL
The
.Fa len
-argument was zero or negative, or
+argument was zero, or
some part of the region being unmapped is outside the
valid address range for a process.
.El
From nobody Mon Jan 20 14:29:09 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCQF2C7zz5lQ0s;
Mon, 20 Jan 2025 14:29:09 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCQF1k9Fz4B7k;
Mon, 20 Jan 2025 14:29:09 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383349;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=jOaT/dUWZo1h66DLcHsjMQqmlmv3cVUXLjiw6U4XBZs=;
b=ONE1BkJKKZnCzyr692ZEWcDiXC5TAX/8ATmuBh1Xe9i5LzMt6r19wafH0rN1zQiqIL+37e
r2mVf1j/6gwJY8E5Y46sO9ETqnF+t6s3rdYxPTFMx4QIk3uxR20PwyQAhDRa5a8J/liTSo
/sWCKqRvL+zDsjI6dWao/seSVyI4QzSWXCWg48X7r67zX6b7ZYVX7GJKUCUv/5XGMSZ+f2
96DDRdIkDf9laQHePKgjjB4JxqFs7OzwfwEzk+/F/hd4iT31VgP5X5ragN9aoVueNJSEAD
QYiD2Nw/F/w5iXUOt55t1EnRVTG/XG44zoRgkfOs+LwsLq0LKWaYQ7jOwb63+g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383349;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=jOaT/dUWZo1h66DLcHsjMQqmlmv3cVUXLjiw6U4XBZs=;
b=JcnzdmfKaeUJkrOSVQtZnX83cXor4ByUC/AE/MqEyNkulg1sr2AWZ/3k4kYWHLputjZvbP
MZ1zIpPw4qHTbNerbesImyLVkgwN9bfKj+ejrhOH1iXO5l5p6flAnNjAyGTLh7ZrnTH8oq
FkxFB0CT6qJFmxSbFF0dA6EI77MPc78Wqkh/Nob3fE2osN1g2vUT6KNAoShZiOr4Feh8cj
+Y4oJkUzhHzm21o65E9jUhMholGxgYyf2OeVe4mcWyySAiYDEKVa5w8LxDjHmzI0LfA1qM
9KIpJfqa2XYHDvx6MG2VpK/alnHklYhzE/u1QD4KBAZ28TtiI27NQ9p5j6vO7w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383349; a=rsa-sha256; cv=none;
b=ToypiurD0Q4EqQFOSCdLGf/f2tInGdzkt4XoBykiA4gk4E7dshauIyeI/QQ14cF2l96Qmo
T6oA1DSOoLNQSeUtrgywfJXD9mTnBroNHu6WWHcZSffl+j7IJimyf/aibKc4JEntFss81c
hR35hwEs3xX53X15OXeFcXjzH4/6rB26DLgbUbvYEsLOpdmehsy3mrYkhcfsHlK4ef3/Q3
4pZkM8jXrZE3ZYCadI2SDPipK6B7QRmAs5QLqghFe4FqyaepNBvuPsSFEtGCr6BtybXJuS
5ISC6egH4NjfDn5l2T0vMFFghoBK6c2DU12krFLMkrMDg2woVWEcWHEGtkvScg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCQF1Bfgz7sy;
Mon, 20 Jan 2025 14:29:09 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KET9tW088113;
Mon, 20 Jan 2025 14:29:09 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KET92p088110;
Mon, 20 Jan 2025 14:29:09 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:29:09 GMT
Message-Id: <202501201429.50KET92p088110@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: d6fbd34acbbc - stable/13 - libbsnmptools: avoid
uninitialized snmptoolctx->passwd with empty password
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: d6fbd34acbbc90ae106fc1fa08d83d5f25d59039
Auto-Submitted: auto-generated
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=d6fbd34acbbc90ae106fc1fa08d83d5f25d59039
commit d6fbd34acbbc90ae106fc1fa08d83d5f25d59039
Author: Gleb Smirnoff
AuthorDate: 2025-01-11 05:08:02 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:28:54 +0000
libbsnmptools: avoid uninitialized snmptoolctx->passwd with empty password
The removed check left snmptoolctx->passwd pointer to uninitialized
memory. Always calling strlcpy(3) would guarantee that with empty
password it will point to empty string.
Submitted by: markj
PR: 283909
(cherry picked from commit 3999a860d6e899de98b1025317d2d0ef1f83255f)
(cherry picked from commit 0bfbd30663b68a851ebf24667d121c6891c86827)
---
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
index 373e91de06d3..e1339877e945 100644
--- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
+++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
@@ -178,8 +178,7 @@ snmptool_init(struct snmp_toolinfo *snmptoolctx)
warn("malloc() failed");
return (-1);
}
- if (slen > 0)
- strlcpy(snmptoolctx->passwd, str, slen + 1);
+ strlcpy(snmptoolctx->passwd, str, slen + 1);
}
return (0);
From nobody Mon Jan 20 14:29:10 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCQG3bMVz5lPLh;
Mon, 20 Jan 2025 14:29:10 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCQG2S5Wz3Bmm;
Mon, 20 Jan 2025 14:29:10 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383350;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=CZaxG+AOy3FgFYojRR2Icu2dvVGUA6g1+Hsb2YgnKm4=;
b=Ml1Su8JZd49IgzL7sQtdTska+Fwhi2rlrh1Gv+yO3HUurm3ABM20Jmu7ieJPne2RhCX6rA
5Enq+k93yR750S6UKSwI2Fu5BPH4vyiw0nLCIUth8j49QhEq5BLr/yMrCpQotk2PLOHxFA
Ck3FrM15Y6APy4mWzvgAVvzbwIeutVxMwtNjKHN2uvEREGl2OSE+sh1t18b3tEvqEYqLHd
lUbFNHs1DqsaKIAOeZ998BeW676FYdTh+wUOYanfD94cM6ky/ecoHh95BcKuRN8jtpBSVx
XgtrGVXypOhksEBwOcYKOJNYnIsSl7EZUY2eV/cUX7KlUziG5L7H7AX9LgM7Uw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383350;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=CZaxG+AOy3FgFYojRR2Icu2dvVGUA6g1+Hsb2YgnKm4=;
b=tIQUWdVLowF4/3j2sm20ZPbLVo84YV/BvHhlg6S8D13xSZQ3Uu2SZXw51NZhYFrYNIuKIo
hFxxklrNnr3g9uSZlamoF4of4bMJVWj65Mr4zlywukFWoowiDxW0QFJX/tPH4IXtS/dKLa
23Hv4jDGnt/PUfr1JVzQqyh7mzeA/6jWnQ8QIn1FYqw2Lkq4uBZvXnSGFOR58nRyZWr4hI
Q+t1JizV1DSasThP8zu8xDBkfSAxBpNyxSLs60IhT3nHZd5goqe3qfb44Bq4G3xYDjA7lk
1zZBHCU3XXiIL7txtODc7QdwVIfRPFpBEEf9SD4EDfRCMpKXgl5E1rOkouVxWA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383350; a=rsa-sha256; cv=none;
b=lmAZi7FGIyrduDHN0xPfYxeg2ralCTqaTd07Z525o1SOzi/dl/NrXMXxUOOvWl/I+gsXUC
QdanFjf7TcAP+Iudq7Kgx2N6G4YbNlFFhr5V/ang1Et2LGYjU8qVQhDx5m0oYgQ7VVztVI
Di7mYVlxVv6t50oJtajkHsoMQoejGKMBL5TZULRRWBwNpULtxCiIp9IgPXZ5YfXe2h9RQ/
cVm5um7+siNwVYvxKD2oAchthgarfH/I2zZvOAx51iCedSy0nthide2ivrIwt8VEslOczs
sAXRNFsuf9KCy0iIDiz/wyqI3A7SAU4w+koYXp+HqnMYxF/YyBN7orCebYE7HQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCQG1zNFz8Ls;
Mon, 20 Jan 2025 14:29:10 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KETAHu088145;
Mon, 20 Jan 2025 14:29:10 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KETAD3088142;
Mon, 20 Jan 2025 14:29:10 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:29:10 GMT
Message-Id: <202501201429.50KETAD3088142@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: 8ed2e663712c - stable/13 - libbsnmp: avoid division
by zero with empty password
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 8ed2e663712c3749b10af7968a646b9e81b6bcea
Auto-Submitted: auto-generated
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=8ed2e663712c3749b10af7968a646b9e81b6bcea
commit 8ed2e663712c3749b10af7968a646b9e81b6bcea
Author: Gleb Smirnoff
AuthorDate: 2025-01-11 05:08:02 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:28:54 +0000
libbsnmp: avoid division by zero with empty password
PR: 283909
(cherry picked from commit 4dc1820a16b9b6108e0ff8a0265c08c67fa34146)
(cherry picked from commit c4cae8cbc337eaf824774fcba88018e42fa31efa)
---
contrib/bsnmp/lib/snmpclient.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c
index 05711e341fd7..a7556527ad51 100644
--- a/contrib/bsnmp/lib/snmpclient.c
+++ b/contrib/bsnmp/lib/snmpclient.c
@@ -1792,7 +1792,7 @@ snmp_discover_engine(char *passwd)
if (snmp_client.user.auth_proto == SNMP_AUTH_NOAUTH)
return (0);
- if (passwd == NULL ||
+ if (passwd == NULL || strlen(passwd) == 0 ||
snmp_passwd_to_keys(&snmp_client.user, passwd) != SNMP_CODE_OK ||
snmp_get_local_keys(&snmp_client.user, snmp_client.engine.engine_id,
snmp_client.engine.engine_len) != SNMP_CODE_OK)
From nobody Mon Jan 20 14:30:56 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCSJ1qrgz5lPsD;
Mon, 20 Jan 2025 14:30:56 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCSJ19Fkz3CNM;
Mon, 20 Jan 2025 14:30:56 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383456;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=YUpPC8TUDOBbQ9TrAr3Tty3EilHY1wzpTtCTs84L5v0=;
b=TlRLm2Iw8f3SZ4ad+8YiRJarVW/13gBs34zGTpBrYG+cdoRNRJdspJQwwJRH6Vbp7zlO+v
He0id7ev/nlTLtTJVNSQs1UzNUWQG3w+jtaqJFjSaYOGhJ2IyRZYXxMH1EzFmS1ZxHnPbi
7k6olKZEa0yifGVjXzxAdrQgy8ZWHnoB9WfuumnVYVFIXDNAXIwkyXfnneD441gbyLZwY3
WIBMjt95CvQlxLyVX0ooH9C6Sr28pizwH13Kcb2HF8eARhVqTgCltVLl2YXV7XfswCrfAh
eMFnb84K/xZ0GwRH4XdEMVLk2zKc9s6/vMJ3AEbmjqpbv7a5cKLDMIeED9NoJw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383456;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=YUpPC8TUDOBbQ9TrAr3Tty3EilHY1wzpTtCTs84L5v0=;
b=vFz5+Bh9PPlD0aWkNfpIZR+wxGNjxvqC0VvwbtMmQLSrqNWrx5Rsu8SKxfg15NpSE2SFJf
MZFzQ76H46FkoCXL9yBPrTKV8x+KMDLVJbIyHoSqV/q4T2uIK3xAHwtcdahzI2gsipZbyJ
/A0DBRmqU3g1bsAZhvUF5r4mXmkTLb9gvPVIC4RRCTR33m0Cfvk7mS22S+U473w7xK4j+m
gL8jwKEA/GD9kWL2mVJLmoSO62dEFZYO5M3M6Ni3mlUP+iZS+drZUqIuYz9ZrguERpMLIF
nZCidl+zWbKpRGe8MLJjvuqa5WhyWrGQiGaT4suhpCOFRZBlddwE4xFqGnl4Mg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383456; a=rsa-sha256; cv=none;
b=b6KfGkWfGISSbtUtbkrDiXo9qB04gGUpg4937aW808ztnSajA+ofERNTaPuexYgmlwfUCO
IBIwHQiaTPubOjJ71zHgUAZt6TgUIEeogbWVMNansxcVszCtqtQBKxp4mLBOoVA25Ceh4S
18E+xlvku9g9QF/RbOxe+/eDuQmyc+Qggvphgv8W8+UJzWwzlgEYGvwpP8jlV9ul5W+tXJ
G0ol9DNRekb52ABYjxB6iBhl/mxcJ8AkuDURwnW6aEC/+OvM0xCHB8ojTdfZh7O72OfPUy
CmFukJ0w3TGIqPUk96fQNCWzQJpnjiNJoTV/3zBFiQK7fTgzXZKIWXaz84gTZg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCSJ0lP1z8Rl;
Mon, 20 Jan 2025 14:30:56 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KEUuXG002476;
Mon, 20 Jan 2025 14:30:56 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEUuUP002473;
Mon, 20 Jan 2025 14:30:56 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:30:56 GMT
Message-Id: <202501201430.50KEUuUP002473@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: a52b922c05a4 - stable/13 - munmap.2: Unaligned addresses
do not return error
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: a52b922c05a46f594fa604e1af3f17f046aba955
Auto-Submitted: auto-generated
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=a52b922c05a46f594fa604e1af3f17f046aba955
commit a52b922c05a46f594fa604e1af3f17f046aba955
Author: Ed Maste
AuthorDate: 2025-01-15 16:52:58 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:30:43 +0000
munmap.2: Unaligned addresses do not return error
We previously claimed that non-page-aligned addresses would return
EINVAL, but the address is in fact rounded down to the page boundary.
Reported by: Harald Eilertsen
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Fixes: dabee6fecc67 ("kern_descrip.c: add fdshare()/fdcopy()")
Differential Revision: https://reviews.freebsd.org/D48465
(cherry picked from commit 9e36aaf0c24cf158e83c69c1d2312c000c3c36f3)
(cherry picked from commit 61c50909354ace6f07d0b2113f10965f4546e0ed)
---
lib/libc/sys/munmap.2 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index 8f5cb0c02e2b..cf8d9ec22b1c 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -25,9 +25,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)munmap.2 8.3 (Berkeley) 5/27/94
+.Dd January 15, 2025
.\"
-.Dd June 22, 2017
.Dt MUNMAP 2
.Os
.Sh NAME
@@ -56,8 +55,6 @@ will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
-.Fa addr
-argument was not page aligned, the
.Fa len
argument was zero or negative, or
some part of the region being unmapped is outside the
From nobody Mon Jan 20 14:30:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcCSK2p5Jz5lPsF;
Mon, 20 Jan 2025 14:30:57 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcCSK23wbz3CSs;
Mon, 20 Jan 2025 14:30:57 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737383457;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=8qi2OaVI3TtfTlCIgqgo1PJ/h4cfWhyu6cc/mpp7CMc=;
b=aWoqDeSGTLBCHptv0HnYnGHF+rFVHh+SK0cmTxqKUOMtLlchTgCEyWUyD6VbgBCqns05Rz
HBbWyPy35nioY2YcIwU0DltbkXUzANwC0ZQDgvmck2ouPKN83ACAVvDP5RifDsY8Qs6OPF
ija8PHR66UdONPz/C6uOj96FUQrxVcYI2y8yloTqOE3+ndmRWJu2GIjnXYujVR+cYu63PF
MarrEbeXIUMaxVcMDt9tC6gP+Pn7YFePz+o/kRwqG1KmRXRC+9UaMarTBgi7Q/a5krPzik
xNdvPwsx686uVl0cgDxsN0+VVdMzuTpGZMX5lnuCwYzWHUIG/pb377yQNFDBgQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737383457;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=8qi2OaVI3TtfTlCIgqgo1PJ/h4cfWhyu6cc/mpp7CMc=;
b=FWUGDuJLWVUl4hy2Nw8+ckXgE7jAqeOLqcJzzH54H5hobu7AKcP/UneOwtPlFBt74QKliR
3CfKzHBD1rOVpo3x5cYUECtMdvo0QoXAgSahAMF2vGOEcOjGQ9TXPQ04cwVmx9z2sh+JkO
H+nrnbhw/Xj8l50r4gvAwRBJmm5IkxXLg7q37eCoJ6tiM8jXpj/tgRwYJyoeYKcOf72SVW
orgIfKORjrfLXFf7lffVgJRrWG25qbwyIIVucYasKBj4pCq47//DS8UkS6fHwrvKkadrMe
da0jLxjJJfx9yeGEuD4OLQmmJL0wI3KHItiKylvA8c3fsJbuUwqufXwcFwl9Yg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737383457; a=rsa-sha256; cv=none;
b=FNr//JgkVR6Zi1bC2AzOA/JeLZQvAt+daE9g05T/9GVnUyB4qPrfFGPIB3ZzWxCJ+qIQhj
maw0M7wLY8LK/W3sipvzSSeQaFL1eFo0T8N9UQ9kPCL/NxOHjfLCjWSuSAKFYYRkUml1OO
hDcDcdrd5EetrpmEXkLfoHTBTqrnWAs8F3XR98eh10x+tY/rVG79VZKlLEB4sClNhMs9iN
u0gwMGSoSZFHpoKJ3Y+i6w3QxQMTIbuvPvLvV/bKPotqWasUj6+KKMmYGyUGSr/qo/ERSN
zR6C/XcxpDfvVYRaVri5Ep3+Pmqch9xj9zYgvCZIVUloplsAhavr0IpRao0oJQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcCSK1gy6z8PM;
Mon, 20 Jan 2025 14:30:57 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KEUvkr002513;
Mon, 20 Jan 2025 14:30:57 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KEUvh7002510;
Mon, 20 Jan 2025 14:30:57 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 14:30:57 GMT
Message-Id: <202501201430.50KEUvh7002510@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Ed Maste
Subject: git: 8883e8de0559 - stable/13 - munmap.2: Remove EINVAL
for negative len
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 8883e8de05598e475d2ac129dfefd734e06908ab
Auto-Submitted: auto-generated
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=8883e8de05598e475d2ac129dfefd734e06908ab
commit 8883e8de05598e475d2ac129dfefd734e06908ab
Author: Ed Maste
AuthorDate: 2025-01-15 21:44:31 +0000
Commit: Ed Maste
CommitDate: 2025-01-20 14:30:43 +0000
munmap.2: Remove EINVAL for negative len
len is unsigned (it is size_t), so cannot be negative.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fab411c4fd5224e3dd44e0eb288d60b27480e2d1)
(cherry picked from commit e2cbfa1f5045019d34eb0091db7755c151ea06d5)
---
lib/libc/sys/munmap.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index cf8d9ec22b1c..2411ccb3b0db 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -56,7 +56,7 @@ will fail if:
.It Bq Er EINVAL
The
.Fa len
-argument was zero or negative, or
+argument was zero, or
some part of the region being unmapped is outside the
valid address range for a process.
.El
From nobody Mon Jan 20 16:20:40 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcFtx0zGbz5kK4c;
Mon, 20 Jan 2025 16:20:41 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcFtx0DF1z3RRv;
Mon, 20 Jan 2025 16:20:41 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737390041;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=AhUoAeVj0tuBXalptBZU9X2jFfcQmwEo/J4FJ6mG0so=;
b=J7x9hXCoN8TYspCfwu5obrQU7m6eh5K/6NfEJOLdxjU6tkCVvDDqkQUOrIguYxUJN2+nr9
hpKA9XmZ5rRHSijF4LCV+UAZzfqbpoGEh6sjiADm28MBORW+bQjpnFh6xHzZjCtyOdrUnW
/ZYb9CJ+cggjuj222SvBb7IVffQbnNDnpGMBjJfa/VxpAYR5IsGI450CU9AQ78VGiU5rtd
uFGj4OR/U7g9gIAl4Ih6wZVvP9OnvnNUTavRJfO3PPgWwjOYJcBvOrcCm2slBSmYpEuEvA
BsCCcCOktCOwBP/0FYW2e/Pmr3QTpf+ksSqB/XL90kdj96pbt0X/+aHG5Ts4cw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737390041;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=AhUoAeVj0tuBXalptBZU9X2jFfcQmwEo/J4FJ6mG0so=;
b=iglXSmGHGgWC+rTODnsQ+JMM8fXl5EDKjRIR2BmbSXtaoe2KogZmxbYOqhWkLhrB+2EEhE
RhmSuyEm2DCLVDcfN3m7v21zx0kwLKl1vtYWjeAfeFRc1gOlyGkL7E3S6EqfnX5rEYYwP5
ED0lBhyIakSyMc0OJquVPd++QDZPivroq3HxvP7s+jKwtindyYHFbTEWrvx6W/gSR5vko9
NwNuRWGZYWQGIS7fOfiwA/UI1YVRME8RYR+Q3gbksO5RMjRDW9ShO0ehIqPJISE4IBPsI6
S0EUU4SuiYmX52IdPKkWrX/IBFB9F2ELfUTi8phqX2C4D25XwgUde1pe8VmoDw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390041; a=rsa-sha256; cv=none;
b=aUkATB2j8koUIPWY0SFX3B7X6XcpVmg7jBr+qqTed3kYpTOglnoyBhKGguXnY1YQA/jOr3
O7Ke6GyHU32xlpDJU7Bn1fkTUXS/WJJSNRo013TT+g6zO+BsQREGPQFyZupogHDfCJsNNP
8Lu9dPDFMEytOL4y7jmAW+JXlaxk38hAc5MzjGMLgdwv4aJrkvOY1HL19nofoC7Fd80MPz
lCl9rKetBL5NiY6kJTT8moUziatRVN2hNPPD7WXMXQ4SaMGx6lAyxf2zMMrD0SS1ejjfT1
zr5vZsglurz22reGJ8LwGFj4tMxwrdu2CJdy8DMTnNYNadAlDQ6tdfbVBRpGKw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcFtw6xcXzC4M;
Mon, 20 Jan 2025 16:20:40 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGKeNE003691;
Mon, 20 Jan 2025 16:20:40 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGKeiC003686;
Mon, 20 Jan 2025 16:20:40 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:20:40 GMT
Message-Id: <202501201620.50KGKeiC003686@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Alan Somers
Subject: git: 4ea15740a873 - stable/14 - tmpfs: remove duplicate
flags check in tmpfs_rmdir
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 4ea15740a87314302dcb79d48b9280be199b0173
Auto-Submitted: auto-generated
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=4ea15740a87314302dcb79d48b9280be199b0173
commit 4ea15740a87314302dcb79d48b9280be199b0173
Author: Claudiu
AuthorDate: 2024-10-13 20:00:42 +0000
Commit: Alan Somers
CommitDate: 2025-01-20 16:20:20 +0000
tmpfs: remove duplicate flags check in tmpfs_rmdir
Reviewed By: asomers
Differential Revision: https://reviews.freebsd.org/D47100
(cherry picked from commit ec22e705c266ff629cc5ec47b84f67ba02b7b924)
---
sys/fs/tmpfs/tmpfs_vnops.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index 729feb0329a4..a42ada6a5469 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -1327,6 +1327,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v)
goto out;
}
+ /* Check flags to see if we are allowed to remove the directory. */
if ((dnode->tn_flags & APPEND)
|| (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND))) {
error = EPERM;
@@ -1344,13 +1345,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v)
v->a_cnp->cn_nameptr,
v->a_cnp->cn_namelen));
- /* Check flags to see if we are allowed to remove the directory. */
- if ((dnode->tn_flags & APPEND) != 0 ||
- (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) != 0) {
- error = EPERM;
- goto out;
- }
-
/* Detach the directory entry from the directory (dnode). */
tmpfs_dir_detach(dvp, de);
if (v->a_cnp->cn_flags & DOWHITEOUT)
From nobody Mon Jan 20 16:22:51 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcFxR2NGKz5kKX2;
Mon, 20 Jan 2025 16:22:51 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcFxR1cFJz3RnZ;
Mon, 20 Jan 2025 16:22:51 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737390171;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=7QNViSTRw19HDifaYvLn0Fcb7UnjG7RTGfdCCCwVUPU=;
b=PEJgIN++gE7N7Zj/cJ3kqo48qMRftPa4DCgopUheZgO5d2Tzr4vKBweRnpqmF5g2Usfmv/
bSxtcZ1DWvPA5LPypVzokJ55UTBanWpXCYlRV03xv8mhzZH8++oTFd9QLh1xRlWDBvR7TG
4AX9oaVuhXsfug8MOsvur1jA2X/2oIaH1jQsq6HzoQpq0AZ7R3BUJHoWmei3QugSkw7rjj
iHC5ofKPEn1CU5ENOe+u24rPCFNqEYdWIRR+zWW2r6MR3Uw0DxlnpQBNosV7AvdFFGeo9m
BC0hWO5rV+34g2tZbm5SHdozjgeTQqUFiQDsF8Rfy8uyFQukDDoUCivNR7ndgg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737390171;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=7QNViSTRw19HDifaYvLn0Fcb7UnjG7RTGfdCCCwVUPU=;
b=kG1MT75pgjrZfAn2gIbckjO/BAGZHcfH2xA/T2+RioVDHIZwQtwHB5G75wSyYQrcL/CZ9r
7yYJrFAtjL39Fuh6nPWzr7oHc90aPwV7tfzrmJbVgKDOYAwCIHi3Tw8MGZ2lZRkFKl6rI6
obOz+CQ/rpSc1QcHXfeqNq3gvZgy3sh7Y8z1gPDD78+I1gsKo/JosO818alxRYMKBNJ7VV
omdMx8PFpt466527/1fdGsyM0AaB+LXp36kjBFgC3EAnwGk/DssmUy8umkynx4O+nwjqjq
27W73zaz6AcqnJCx/pdkJuMuoyvKfri70z+UicvIaxwoC2WvjgQtjlCg6uMqiQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390171; a=rsa-sha256; cv=none;
b=AV7uKsg7Iotagrskql/hROHI1qkqG1Kw9VuGVkwnQrAMjOKb6mRzbQCG+iQNdgpGULK2Jg
vGurQdADzpgYzf7ikdUn6vQcwOvPQLzmrQOjzW8rcTLNZoVpizC1WxC8L1Kfes0vumD/ob
+pnmWZrq5FZ7Qzms/1bx4RHPcJdnKg6R5pz4pZ91XlVAdBYKiaCAPNPuLamieGNG3Jt72B
MXnDF1/nr3oe9rs2ArmcAXzE2tSEWVabfx+yJCE2uh/mdT95Qx4icCXJrpJSQpuQaPOdpR
2KwsOfU9BujqtOUjiYCtJnTfCc+WGY5sZHNbF5RGC7CPESLY/k1IQMCNxQA57Q==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcFxR15XjzCG9;
Mon, 20 Jan 2025 16:22:51 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGMpiq010887;
Mon, 20 Jan 2025 16:22:51 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGMpG8010884;
Mon, 20 Jan 2025 16:22:51 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:22:51 GMT
Message-Id: <202501201622.50KGMpG8010884@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Alan Somers
Subject: git: 6203d08e7a3a - stable/14 - ktls.4: note that
security/gnutls now supports ktls
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 6203d08e7a3aaaa1e8e4c1e78b26065ec2902d8d
Auto-Submitted: auto-generated
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=6203d08e7a3aaaa1e8e4c1e78b26065ec2902d8d
commit 6203d08e7a3aaaa1e8e4c1e78b26065ec2902d8d
Author: Alan Somers
AuthorDate: 2024-10-28 15:14:06 +0000
Commit: Alan Somers
CommitDate: 2025-01-20 16:22:21 +0000
ktls.4: note that security/gnutls now supports ktls
[skip ci]
PR: 278083
Sponsored by: ConnectWise
Reviewed by: diizzy
Differential Revision: https://reviews.freebsd.org/D47310
(cherry picked from commit 7200d90644ba61d63e6fec33855bba5d3b7eb7bd)
ktls.4: note that there are multiple openssl ports with KTLS knobs
[skip ci]
Reported by: "Herbert J. Skuhra"
Sponsored by: ConnectWise
(cherry picked from commit 1e4da42a36d5cf44bacf0e261626b69a4761f0cc)
---
share/man/man4/ktls.4 | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/share/man/man4/ktls.4 b/share/man/man4/ktls.4
index 46a37d5dd636..56b03d45faf7 100644
--- a/share/man/man4/ktls.4
+++ b/share/man/man4/ktls.4
@@ -29,7 +29,7 @@
.\"
.\" * Other names and brands may be claimed as the property of others.
.\"
-.Dd December 14, 2021
+.Dd October 31, 2024
.Dt KTLS 4
.Os
.Sh NAME
@@ -220,8 +220,10 @@ mode.
OpenSSL 3.0 and later include support for
.Nm .
The
-.Fa security/openssl-devel
-port may also be built with support for
+.Fa security/openssl*
+and
+.Fa security/gnutls
+ports may also be built with support for
.Nm
by enabling the
.Dv KTLS
From nobody Mon Jan 20 16:24:07 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcFyv6f3lz5kKgp;
Mon, 20 Jan 2025 16:24:07 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcFyv5rPxz3S82;
Mon, 20 Jan 2025 16:24:07 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737390247;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=1NqUjmH0fZ9RkN+R7jmcAYegzES9vbVRy7I5a775C3U=;
b=lCWHk7eRBHcF1Kb4bCh8ZRaONf2HjnZCXPHdz55CNJoNwmqHWSyQx6eFBCF939gA++Rb7D
tOQJ10re1Wov8f/vTWJSxsTz+S3HkyQKJ6wRScsR5lVZdla/HW9e1sOQO9S/RG/j8r9kWz
xRk5REMVFpflsiH4BT5vttidE9bqqKf5DBsXvD/6EVwRmykZ1xDeVEJtnXlGsMT0VTNp6a
ZJO3kmpyqDi3bAym3Mg0VHrdrNUrx1mCxTqbPMb3IslzViwQCZFpQps30d+cQQzQdd6DBc
Ncpz6LqcwjraXp0EASp2uTeNE61zAzlV0R2U8Rq5AaXOKhnlDb0C7Z74dnBNFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737390247;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=1NqUjmH0fZ9RkN+R7jmcAYegzES9vbVRy7I5a775C3U=;
b=JyIO4OULJAp+bNwCL+zFySwoZT3rF3TUSou8Z3YBHdJmtiCyzlqj0I3h03yInmUbmbjSFM
kxcAsG0Ry90HuqOGdRdbLGpP7E80GNO32EFHFNH2idE6VT5yws58uZQxOHgQGggFKR1dmp
VXSKlF6CQFVXTnqiOxQolZc62AfPAF49gyeyxPP/hRD8E7SfuHnlrhFD7tlXJz1305kvwY
h4TVNuK0L27q9FnSFwL+tyuc5ORQJEPy+fKRpTFxjYNgluwvhPOBiFX5nw/6fPKf5UV0YY
uaPEghxVFRg9V4YSzrgnbS421bHu0zenbh6GGAreI/1l3tP+mAkNOKwZR8z0EA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390247; a=rsa-sha256; cv=none;
b=Ms4tnLffzbXe8e+gKD2zPlLEJx9wCSmdPdMPWRue2txrFu6tIABX+46M1EA8aZHV0KBfgK
dRQMeiJHt1A8ToPrlyILAeN9BZFVg7ZERzapBM6XQecqjraf1MNgx18Q9PPMO/i6p8ZVnw
3y3cH4iYp3yVXUkzwUpgUdQlV7Ne58ewfMNhWKxT+cDPjlH8agP+uQH5BW4h4BSmv+LaJW
hRuaasc6ieoNSJyWkdh78WIzfQGhJ1148zdZHyXqTpvJW39YgRzzjqyViJYXqyhFYlCY+L
KjMzeqd/EePxKlAKXSaiQXQn4z3xEvoFRE8+O/d+NFDEC7EZcfJP1ZA6Zbx1mw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcFyv5RXXzCD1;
Mon, 20 Jan 2025 16:24:07 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGO7tn011388;
Mon, 20 Jan 2025 16:24:07 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGO7ha011385;
Mon, 20 Jan 2025 16:24:07 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:24:07 GMT
Message-Id: <202501201624.50KGO7ha011385@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Alan Somers
Subject: git: 23b270405951 - stable/14 - Make the CTL tests more
resilient
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 23b2704059512b985bb14b220d92102bc4569b3e
Auto-Submitted: auto-generated
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=23b2704059512b985bb14b220d92102bc4569b3e
commit 23b2704059512b985bb14b220d92102bc4569b3e
Author: Alan Somers
AuthorDate: 2024-11-05 00:26:01 +0000
Commit: Alan Somers
CommitDate: 2025-01-20 16:23:08 +0000
Make the CTL tests more resilient
Fix the find_device function to work regardless of whether "camcontrol
devlist" lists the da device first and the pass device second or vice
versa. On FreeBSD 14 and 15 it apparently always lists da first. But
on 13 it can do it in either order.
Sponsored by: ConnectWise
Reviewed by: emaste, markj, #cam
Differential Revision: https://reviews.freebsd.org/D47446
(cherry picked from commit b032be711c740d2f25b27c92069537edcfac221c)
---
tests/sys/cam/ctl/ctl.subr | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/sys/cam/ctl/ctl.subr b/tests/sys/cam/ctl/ctl.subr
index 18991e0fa144..868b1c809571 100644
--- a/tests/sys/cam/ctl/ctl.subr
+++ b/tests/sys/cam/ctl/ctl.subr
@@ -47,7 +47,14 @@ find_device() {
ctladm port -o on -p 0 >/dev/null
HEXLUN=`printf %x $LUN`
while true; do
- dev=`camcontrol devlist | awk -v lun=$HEXLUN '/FREEBSD CTL/ && $9==lun {split($10, fields, /[,]/); print fields[1];}' | sed 's:[()]::'`
+ dev=`camcontrol devlist | awk -v lun=$HEXLUN '
+ /FREEBSD CTL.*,pass/ && $9==lun {
+ split($10, fields, /[,]/); print fields[1];
+ }
+ /FREEBSD CTL.*\(pass/ && $9==lun {
+ split($10, fields, /[,]/); print fields[2];
+ }
+ ' | sed 's:[()]::'`
if [ -z "$dev" -o ! -c /dev/$dev ]; then
retries=$(( $retries - 1 ))
if [ $retries -eq 0 ]; then
From nobody Mon Jan 20 16:27:52 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcG3D2L86z5kKmq;
Mon, 20 Jan 2025 16:27:52 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcG3D1p1tz3StN;
Mon, 20 Jan 2025 16:27:52 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737390472;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Puheg5tWKDriOHlHV8I++IR49mvsmAdcBmrzHKAt66s=;
b=EJk9BLNy4StThiRh1IGnyLR+KjEzotz5xrtggb1c3eTYEJSzonha7PzVAcecllfhDnagbd
1Hjl5Izyb46BSmA98hV9ISVr64zYF69BbSuFT0aNm+Hm1qbIHQ7r3ERur3oUM3LAUVoAoK
uk9wqjcZSWmYbcvt43Z2izec4FDNEIgN/XroIT3tkj1DpWLcd5DvM0F9++db1Y3of1hCuD
FfdM+orzqnd1LRa+eSH/EB4+s1Oc16J8GZALwTRTSoRyv/X7T8v5gXQ0v58v9tHIG36u4k
B3vtPVaE0Ss2bHdf3MX0mMPQmVxzykPB61nXes2Lnm2OXT4U7veSUnHsuLEfPQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737390472;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Puheg5tWKDriOHlHV8I++IR49mvsmAdcBmrzHKAt66s=;
b=XeOCfHP/ZjrUrxYCclr9xUHbZW/3P3jE6/qaZH7JYKHKwtSxE2KyMlJ+rqeXnxPwCv8b53
yYLs1zyrhGr0TDYbk5c8EBHRsCXSzm1uDE71I5UJrI/WyhwmziKCDhmzr3TGjAa0LduYgo
UwW+8rambzVOgrDN7hrJ21dd2X3Q8xh2B3Wms91TisWZgSlogAUkNLQfbKomlegRddeqH6
S/jKM+Tmb5zjcpwL2G6ypnpCwEz88ZfuTSdWAHZ4nUFG/lglbBRWHO3dCE6CnDiR7qqlvN
xHJzWG3vCSBtRj0GkA1TUBAsdScJZChbKsjhHewrhq4L5xH9b/MgQu0sSYdKOQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390472; a=rsa-sha256; cv=none;
b=npPbxuD4pKjNQewM1bhXCpr5yxgK/VJ0fWeNjWX9M6cS7xQ3kMK34hdd/sHSmTOpSBB34c
qc7R55deYGPZxW7+0TPMDZ+J5uJt0Q51wqWDE/AHvWhgJnFSkcEzLelW0c/Cb7B7pB8M+6
sae3/l9wxk/Tb0C6gqEoZHF5cTgl0fuSJHchAyhsSvH+YDPjInroCThGEioeYfe/sNn5X1
1kt7wX1Jnk7oROEg35B9IoWQzdHyorqBmP9dk7klpKeEMxBgpjRLg8yhrqj1ZZN3X7v4LP
nrb3xQvnSP/r17dRdMRhXe8bU2iCUdDUXOXl88gSf5zD3mHfONb0iXvpMLSINg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcG3D0xCwzCD3;
Mon, 20 Jan 2025 16:27:52 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGRqVj012577;
Mon, 20 Jan 2025 16:27:52 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGRqYc012574;
Mon, 20 Jan 2025 16:27:52 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:27:52 GMT
Message-Id: <202501201627.50KGRqYc012574@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Kristof Provost
Subject: git: 980eedb0cad6 - stable/14 - pf: avoid use-after-free
on reassembly
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kp
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 980eedb0cad684c1e4a64d063df2ee7d28fa693d
Auto-Submitted: auto-generated
The branch stable/14 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=980eedb0cad684c1e4a64d063df2ee7d28fa693d
commit 980eedb0cad684c1e4a64d063df2ee7d28fa693d
Author: Kristof Provost
AuthorDate: 2025-01-06 20:08:04 +0000
Commit: Kristof Provost
CommitDate: 2025-01-20 16:26:49 +0000
pf: avoid use-after-free on reassembly
Ensure we update the mbuf pointer returned by pf_normalize_ip() or
pf_normalize_ip6() even if they fail.
Otherwise we'd risk using a freed mbuf.
PR: 283705
Reported by: Yichen Chai , Zhuo Ying Jiang Li
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 5d28f4cab8d5919aba1365e885a91a96c0655b59)
---
sys/netpfil/pf/pf.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 18b907c45d38..31c3dd8009de 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -8424,6 +8424,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0,
if (mtag != NULL)
m_tag_delete(m, mtag);
} else if (pf_normalize_ip(m0, kif, &reason, &pd) != PF_PASS) {
+ m = *m0;
/* We do IP header normalization and packet reassembly here */
action = PF_DROP;
goto done;
@@ -8629,6 +8630,10 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0,
done:
PF_RULES_RUNLOCK();
+
+ if (m == NULL)
+ goto out;
+
if (action == PF_PASS && h->ip_hl > 5 &&
!((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) {
action = PF_DROP;
@@ -8968,6 +8973,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb
/* We do IP header normalization and packet reassembly here */
if (pf_normalize_ip6(m0, kif, &reason, &pd) != PF_PASS) {
+ m = *m0;
action = PF_DROP;
goto done;
}
@@ -9237,6 +9243,9 @@ done:
n = NULL;
}
+ if (m == NULL)
+ goto out;
+
/* handle dangerous IPv6 extension headers. */
if (action == PF_PASS && rh_cnt &&
!((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) {
From nobody Mon Jan 20 16:27:52 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcG3F1Xj6z5kJyY;
Mon, 20 Jan 2025 16:27:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcG3F0mQYz3SwY;
Mon, 20 Jan 2025 16:27:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737390473;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=w4FnXSwKJghk8Q6ekNWLhBUmMLPG5Xw2P3Yy+QC/JuI=;
b=FMfs610vHf0OQ/xXaXKm1l9xCSiG9mASmYlRSMyMv+VE0eOR300SODIjLCUdCvsXFRfP0h
dTXV53Gcj0orW3EF8MjIhd3aNGdNCjPjTs1B8NXkWSVbyk83xKXBRtFLsEwYfutqn7SrLq
i5MkNqNd/ZLVgMVY4qVDbhUnjcBLCXb1z4ufOtkSF1DUx2EHRB9BPDBVOR8CE4YPRS0y2s
1gq83ZwPC4JQPTTBT90EjoNlNHTL4SMDvTf3yQOGRe0LvpOxw6R80jdon6BrJhQQDn98Ox
kzOzs8ErUwb9RM8uUf8Nd3RnD8nHJ9yBIsv3s3ShiVhiAn/1Kpc+wh2ADVQmGA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737390473;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=w4FnXSwKJghk8Q6ekNWLhBUmMLPG5Xw2P3Yy+QC/JuI=;
b=qtnCtaJm9VGrbvVR2v4UVvv+VrVt/uiWl07hlgIqjTfVU2aiPsylXN+NhjT8gvQOyA7Uio
WdsDElPBoiqZGfFP523IwZhkSJwHQwyxgWg0n1qNbSTyjdfFO9OIn2HuQB1pq+hNV2yE/R
7nu3yqvGXgivIPuVAd6zb5v1SWIby28p7uLTEMYyyTEqBiprPY7FAbpH4/jTh/EzFo7i3U
pyqHRcVBfsnlkCalDuw4zWNtW5l+jYXHt/M9pIlC2l70CA4XCmtP34+eDsIPte45g4Oc1C
XbhdT9ZgQyZLZHrA8+kaFKm2qvssGyEk8PbJoh9wjKdCnos95bqUKPe2eah+MA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390473; a=rsa-sha256; cv=none;
b=T+jy9tKMh/BkG1NQldlMmBF1YqMJhBt/HiNwD4lVsUGDlBDNhnvSend+y4YB1CBixHzhfw
UaAgUZ9c4H0xO70GsyEEdk6AmljfQ2LDO8T+iliyqLrDcpMnLuSybFMeaZZirnZtAqb1R3
GdYUoTYwdeSAe9TLv17w8CKWngcr2zHFJqLMrEP+LNSfLCaWqZhTiZCeXI24/plR+0PrBm
AU3/WawTnAAlNpaSf6M6vN1b8zZ/rBODR8fui1KxuXPDSC6iUT848QkIvGFoyDADXCjFhP
iLbgfzpU1Mbbj3nTMU9329Bw8OnXadpQOVANRPbqvXfj3DEoPjnRa4JxgPX07Q==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcG3F0DdVzC73;
Mon, 20 Jan 2025 16:27:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGRqnM012670;
Mon, 20 Jan 2025 16:27:52 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGRqSL012667;
Mon, 20 Jan 2025 16:27:52 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:27:52 GMT
Message-Id: <202501201627.50KGRqSL012667@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Kristof Provost
Subject: git: faec43a79bf9 - stable/13 - pf: avoid use-after-free
on reassembly
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kp
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: faec43a79bf9a43ac3e2bc3e1de244dd31868dd3
Auto-Submitted: auto-generated
The branch stable/13 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=faec43a79bf9a43ac3e2bc3e1de244dd31868dd3
commit faec43a79bf9a43ac3e2bc3e1de244dd31868dd3
Author: Kristof Provost
AuthorDate: 2025-01-20 07:11:14 +0000
Commit: Kristof Provost
CommitDate: 2025-01-20 16:17:10 +0000
pf: avoid use-after-free on reassembly
Ensure we update the mbuf pointer returned by pf_normalize_ip() or
pf_normalize_ip6() even if they fail.
Otherwise we'd risk using a freed mbuf.
PR: 283705
Reported by: Yichen Chai , Zhuo Ying Jiang Li
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 5d28f4cab8d5919aba1365e885a91a96c0655b59)
---
sys/netpfil/pf/pf.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index e5cd0b83ac0c..b5f872d40b02 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -7468,6 +7468,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *
pd.pf_mtag->flags &= ~PF_FASTFWD_OURS_PRESENT;
}
} else if (pf_normalize_ip(m0, dir, kif, &reason, &pd) != PF_PASS) {
+ m = *m0;
/* We do IP header normalization and packet reassembly here */
action = PF_DROP;
goto done;
@@ -7679,6 +7680,10 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *
done:
PF_RULES_RUNLOCK();
+
+ if (m == NULL)
+ goto out;
+
if (action == PF_PASS && h->ip_hl > 5 &&
!((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) {
action = PF_DROP;
@@ -7936,6 +7941,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb
/* We do IP header normalization and packet reassembly here */
if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) {
+ m = *m0;
action = PF_DROP;
goto done;
}
@@ -8210,6 +8216,9 @@ done:
n = NULL;
}
+ if (m == NULL)
+ goto out;
+
/* handle dangerous IPv6 extension headers. */
if (action == PF_PASS && rh_cnt &&
!((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) {
From nobody Mon Jan 20 16:36:06 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcGDl0mmcz5kLKc;
Mon, 20 Jan 2025 16:36:07 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcGDl015yz3Tmt;
Mon, 20 Jan 2025 16:36:07 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737390967;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=8zJ7hJSkfS8Xdf8UgwvjlNdwd6KmmmqgRuBZ1JPF600=;
b=BwWgNCtBeP/1sw9d5YgIUJbOEMEyVaW3f7mWWyd9VPKC9lTJ/CdhU9Ijq/+ss+HkgWeoIe
ZWF8X6EwWRVGbQTHPOzV36uew7J4EXqeQKkXbleZfCVv2Rcev0D8K1YNd/bUDqxptRqsJA
1FPpFMYSiVh359hmBg9oAvizXLgBwn7obvXzJW6QzBgIKoBDNJ9fLX2DMpUoN7DRWU1R6N
H9EvhLZ3CAj90NWWb8Vj/8Oe+kHWm32WeEoJBW3VhBMl453BcFnFBGPiA7pBdX71kXRrPu
hvGmh0odyySQv0eZ469ZQrbqzFjBRLuk9TMz72prMaQTSc20xlj2XqP9LOlWpw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737390967;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=8zJ7hJSkfS8Xdf8UgwvjlNdwd6KmmmqgRuBZ1JPF600=;
b=bNSbrWEXvZCGeBNg5Uali/bOcmPwar9hxwDpMrsMKHYeEdZS3RNgRDRq2lt6rpR7M+oUP/
LC7Q6dcW9wRWJgIRXbr/fucunThFlSqNQBBHUrPiQYS6xFpyirESH57e5p+hiq2egRKOEp
xZIu9JD91sol1Uz3UPbVAumMUqsF3gSHBbqygIWDLu48ZIno9zARr8x5Vy/37B671NFGUj
ERZ2k+5BVcwDf2bmT6uYtJFtg/sMmrTIAITz5vQ9J0gRAyoO/n3n7DPjsT/ynZpITV9ghP
IedZ5XCK4ajFBj7gcTRARFt0ByMIX9juRxW9tH1JeWsloSBdIfDIKqdPIy4DKg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737390967; a=rsa-sha256; cv=none;
b=GV0gToCk0UpBBmndePlgrbJFxUPNeSVJL213esPEmdZnkWshsOWnAgRiSPnYr52CrBqg88
it0nLCm/wlqfVCKevu3VWLGXY3+R5juI44bYbT6G2jyxbXQL4maiSqd/NSw0J/ne5d2iOY
KLZOOMn99qgja5YuztqWmNfGXiUvRzpVx3GSBlM5Vf5nLw1KU4Jv+8r07iv5PfuzM0qy91
Oy2i9YnG2wx1gdaZqC+78acseaCVNsVmDdmdwtKPyovnUe33+5NhvYoKBz11X2FFEh6OX9
lph3MaQnN/ZtLOHvgRKkYsc7aiHfhA54gNP8sGvisul2qXHrubM3ctOyS0h9YA==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcGDk6X4dzCgb;
Mon, 20 Jan 2025 16:36:06 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGa6lZ031002;
Mon, 20 Jan 2025 16:36:06 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGa6IN030999;
Mon, 20 Jan 2025 16:36:06 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:36:06 GMT
Message-Id: <202501201636.50KGa6IN030999@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Alan Somers
Subject: git: b797d07560a7 - stable/14 - fusefs: FUSE_NOTIFY_INVAL_*
must busy the mountpoint
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: b797d07560a76d790c0256a70d65b2b684ab6ee7
Auto-Submitted: auto-generated
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=b797d07560a76d790c0256a70d65b2b684ab6ee7
commit b797d07560a76d790c0256a70d65b2b684ab6ee7
Author: Alan Somers
AuthorDate: 2024-12-13 14:00:20 +0000
Commit: Alan Somers
CommitDate: 2025-01-20 16:36:02 +0000
fusefs: FUSE_NOTIFY_INVAL_* must busy the mountpoint
Unusually, the FUSE_NOTIFY_INVAL_INODE and FUSE_NOTIFY_INVAL_ENTRY
messages are fully asynchronous. The server sends them to the kernel
unsolicited. That means that unlike every other fuse message coming
from the server, these two arrive to a potentially unbusied mountpoint.
So they must explicitly busy it. Otherwise a page fault could result if
the mountpoint were being unmounted.
Reported by: JSML4ThWwBID69YC@protonmail.com
(cherry picked from commit 989998529387b4d98dfaa6c499ad88b006f78de8)
---
sys/fs/fuse/fuse_device.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sys/fs/fuse/fuse_device.c b/sys/fs/fuse/fuse_device.c
index 5df9be59ce36..2fd43bc742dc 100644
--- a/sys/fs/fuse/fuse_device.c
+++ b/sys/fs/fuse/fuse_device.c
@@ -440,7 +440,6 @@ fuse_device_write(struct cdev *dev, struct uio *uio, int ioflag)
err = devfs_get_cdevpriv((void **)&data);
if (err != 0)
return (err);
- mp = data->mp;
if (uio->uio_resid < sizeof(struct fuse_out_header)) {
SDT_PROBE2(fusefs, , device, trace, 1,
@@ -543,6 +542,13 @@ fuse_device_write(struct cdev *dev, struct uio *uio, int ioflag)
} else if (ohead.unique == 0){
/* unique == 0 means asynchronous notification */
SDT_PROBE1(fusefs, , device, fuse_device_write_notify, &ohead);
+ mp = data->mp;
+ vfs_ref(mp);
+ err = vfs_busy(mp, 0);
+ vfs_rel(mp);
+ if (err)
+ return (err);
+
switch (ohead.error) {
case FUSE_NOTIFY_INVAL_ENTRY:
err = fuse_internal_invalidate_entry(mp, uio);
@@ -567,6 +573,7 @@ fuse_device_write(struct cdev *dev, struct uio *uio, int ioflag)
/* Not implemented */
err = ENOSYS;
}
+ vfs_unbusy(mp);
} else {
/* no callback at all! */
SDT_PROBE1(fusefs, , device, fuse_device_write_missing_ticket,
From nobody Mon Jan 20 16:36:53 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcGFd4zn3z5kLHP;
Mon, 20 Jan 2025 16:36:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcGFd4JZnz3V3C;
Mon, 20 Jan 2025 16:36:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737391013;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Z03LKoRcmGqXNgkSB3yPUwRnLk4aYnaGh0hunpew5A4=;
b=FIPUJKyzEGg3FZg9frC6Ab1iHqQKTtfXyapv5ZzboQQdvc2pz8ESNuBBcix0qTh6Tj248s
X//qcaxwkWsti6chrp0GDAsfAuGausEYCIiyZH5vtrZULFQiH+4erHhLEp0SYS+FtEerSv
HvtoB9+H6AlUYR+2IrQlQBFe46LFeafHL1OHlvAsJKTl7MhHG8IMmm9s7Bp2PdEIUVDrIs
MreG6ePvk53kr7hyeiMUkpb1Copg7AUjvwmSod2Pi57jNyMDx/K2cdXMRDKajUP3OUJbKv
FHfDnfitehVoPwooEOhaz0+2ZyLeoMSd9AFF+BtKGnlQ9Ena2RP3P3xPSN0SYw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737391013;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Z03LKoRcmGqXNgkSB3yPUwRnLk4aYnaGh0hunpew5A4=;
b=CE2oFAlbvJ6VTikqnLgORM8pkbTJXQRYGEhEfj11z7Gy0CsgtoYmhsYyVHCSQUVrGIIcw2
bFV3VvcFEJR4aKl6tDLwnMYGbD0jJ/wGM0zxOCQha45ATmBXJaGXOyq90jUHkTBFGAngfL
dOdV/POBqqKS/3GNMIuNK3FvjbPmGwbNYMkh+L7zBqycBkotLofDE2nW0/dPfsk2B8Qw8d
CLODbiYS8OCs//VEzo1kgO1otF6FRqsr4wGETYeALzw1DT6rCSLXvzTUsmDRD2RJoN+59g
aHCK245it4NLdmUsrakbDGU/H7+qBpghHWTMhiyd3lGZ4rU8KpEix/iIyluOZw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737391013; a=rsa-sha256; cv=none;
b=ZoezsYHdEKwG9evQGvVPtbSgwf3mQ65Q6EZAGqJ/jNwFFm9RF7FGJPHG2NRcJMu7n504jQ
BWcYMv7vI+Kcf9mhYuhNb8pzycq1TBzadKzzmMTVRbVMIvOIef67NFeLlh86jHcQpTTjPX
4KDo4glR5UU4uXP3M7eDjY4vnzMf//i6jsjqhxE2uy5bC60v6arv9TH9z4JESG518hSAyR
YZPnYDo1cjxpkNV1Ba+SbdFqcbiy1DAggcHcMxS6Ufthai77ZIJbn+Jlr+piXqxpKSu67j
W0MgdWhPPM95H9X8pQFib9RGma3u32NpLrKgeCsmssDIHaG9bwlJg3/mcsMHzg==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcGFd3s4qzC65;
Mon, 20 Jan 2025 16:36:53 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGarHw031328;
Mon, 20 Jan 2025 16:36:53 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGarMh031325;
Mon, 20 Jan 2025 16:36:53 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:36:53 GMT
Message-Id: <202501201636.50KGarMh031325@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Alan Somers
Subject: git: 887494153482 - stable/14 - namei: add more detail
about LOCKSHARED's behavior
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 887494153482e4332f90a64a499ee1ed196ff25d
Auto-Submitted: auto-generated
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=887494153482e4332f90a64a499ee1ed196ff25d
commit 887494153482e4332f90a64a499ee1ed196ff25d
Author: Alan Somers
AuthorDate: 2024-12-17 20:10:57 +0000
Commit: Alan Somers
CommitDate: 2025-01-20 16:36:24 +0000
namei: add more detail about LOCKSHARED's behavior
[skip ci]
Sponsored by: ConnectWise
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48125
(cherry picked from commit 22bb70a6b3bb7799276ab480e40665b7d6e4ce25)
---
share/man/man9/namei.9 | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9
index 0be73f68cdda..63a6d3b11f6f 100644
--- a/share/man/man9/namei.9
+++ b/share/man/man9/namei.9
@@ -31,7 +31,7 @@
.\" If you integrate this manpage in another OS, I'd appreciate a note
.\" - eivind@FreeBSD.org
.\"
-.Dd July 8, 2023
+.Dd December 17, 2024
.Dt NAMEI 9
.Os
.Sh NAME
@@ -124,7 +124,6 @@ Lock vnode on return with
unless
.Dv LOCKSHARED
is also set.
-The
.Xr VOP_UNLOCK 9
should be used
to release the lock (or
@@ -153,8 +152,20 @@ and
.Xr vrele 9 .
.It Dv LOCKSHARED
Lock vnode on return with
-.Dv LK_SHARED .
-The
+.Dv LK_SHARED ,
+if permitted by the file system that owns the vnode.
+The file system must explicitly permit this by setting
+.Dv MNTK_LOOKUP_SHARED
+in
+.Dv mp->mnt_kern_flag
+during mount and by calling
+.Fn VN_LOCK_ASHARE
+when allocating the vnode.
+If
+.Dv LOCKLEAF
+is specified but shared locking is not permitted, then the vnode will be
+returned with
+.Dv LK_EXCLUSIVE .
.Xr VOP_UNLOCK 9
should be used
to release the lock (or
From nobody Mon Jan 20 16:52:17 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YcGbP72snz5kMDR;
Mon, 20 Jan 2025 16:52:17 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4YcGbP6Wcfz3Wwd;
Mon, 20 Jan 2025 16:52:17 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1737391937;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=BnIE1+0seA3GBNylb6o/77poARRCiN4NwjGaZbdQ7oU=;
b=AGaDbJhYJQZQoBZ3QA4zTqpzuaQdRKhQDdONUhTkpxtPhk/sAx9uQjqCYSrESiJxH/+LoX
mjXZgX5MXcJsvcGBsyshxIcvJ8tE4kO7JxVjQiCOMvhbSjmL1qBCSEW1PXydKvU90Dga2f
g00SkAqLqAyA9MJG1cjWiTZgs1NaQ/Em1RlCSw+ma1zMahvuWN0uPJYbetqAveoT54zvb8
jaSn28pgyaubzIIAyybRB+Zv8pcZzWGmU5VkEAg61vHNkCdARQrA1bXHgCnWn1c4kgFIGt
8d1UuK38LhlC2s4J6xHYLQl51rWaIQDZbyd/rnzgHUCMeQQRvVVJwuL48Bp1Mw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1737391937;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=BnIE1+0seA3GBNylb6o/77poARRCiN4NwjGaZbdQ7oU=;
b=ttKf+4EKCRfdCK5Lq3YBiv6JK11roRuN8dZ2da0lUmFBzlWIRULF9jQu65nBFis0yI8BDF
3HnJXmdmeVTItn0zRj5gCLSbMWb/Em8IHmx+M0/a8DBK9DRQ5kHWYQQv0taJtVOLgTjHC4
JVD8l+Vf1co5c7FLV5NsYeMvEta52Q5kWAXoxlpYUObSPPxz2S92QmiWvALdztRXLzhwN0
i9s0Qsgm99RuzqlpMDg2zQgIV+rgPCiZDfLKOY4KLE6zrXSdNdgNUC3sU2Xtkw2QZqWJQn
/oITwKlHuZvfm/OVaR/ZxaVG0D5HX2uS8lCMmN/0WtYmI62WiopqH/7q/mgvSw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737391937; a=rsa-sha256; cv=none;
b=QI4Hkxk2YApUt2/XaGKLGnhJEp41NcQwtffdPngco+na01GFMmpRXlxm4oG50EA1EJ/GqX
kQK2DHd2tW+yAhqQxHU94LPjSXEDzZhDY+ijSTJ6qkZ5A/l7dLX4/69nKldV4N0sl6itlJ
gUFtCQJW3cF7otdWt9s9lHBwikDTQ7nzU9VgoQGmyPSat4abcL+SvIQGeJkeKowvh80j3+
3hKrVsr8D9kT5eyLgy4yrMV/gbaEIh59VWaxYGJefrUGIDsRTs43MRzxnoxjHFJUReYmja
gkMS+FwOMII4ip6FE+ffAZhfjBMrUxgmaajT3kaTEuMTLDgfP+3OY9Tt4XeWhw==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YcGbP64BRzCmC;
Mon, 20 Jan 2025 16:52:17 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50KGqHc5065176;
Mon, 20 Jan 2025 16:52:17 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50KGqHOj065158;
Mon, 20 Jan 2025 16:52:17 GMT
(envelope-from git)
Date: Mon, 20 Jan 2025 16:52:17 GMT
Message-Id: <202501201652.50KGqHOj065158@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-branches@FreeBSD.org
From: Alan Somers
Subject: git: b0348117953a - stable/14 - fusefs: More accurately
test the unique tokens in the test suite
List-Id: Commits to the stable branches of the FreeBSD src repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: b0348117953a117244056032e468dd6a742dc678
Auto-Submitted: auto-generated
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=b0348117953a117244056032e468dd6a742dc678
commit b0348117953a117244056032e468dd6a742dc678
Author: Alan Somers
AuthorDate: 2024-12-18 01:38:05 +0000
Commit: Alan Somers
CommitDate: 2025-01-20 16:51:31 +0000
fusefs: More accurately test the unique tokens in the test suite
Every fuse ticket has a "unique" token. As the name implies, they're
supposed to be unique. Previously the fusefs test suite verified their
uniqueness by relying on the fact that they are also sequential. But
they aren't guaranteed to be sequential. Enhance the tests by removing
that convenient assumption.
Sponsored by: Axcient
(cherry picked from commit b1879975794772ee51f0b4865753364c7d7626c3)
---
tests/sys/fs/fusefs/mockfs.cc | 15 ++++++---------
tests/sys/fs/fusefs/mockfs.hh | 6 ++++--
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc
index bd7bd1b663f9..023cecd0276f 100644
--- a/tests/sys/fs/fusefs/mockfs.cc
+++ b/tests/sys/fs/fusefs/mockfs.cc
@@ -421,6 +421,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions,
uint32_t kernel_minor_version, uint32_t max_write, bool async,
bool noclusterr, unsigned time_gran, bool nointr, bool noatime,
const char *fsname, const char *subtype)
+ : m_uniques(new std::unordered_set)
{
struct sigaction sa;
struct iovec *iov = NULL;
@@ -436,7 +437,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions,
m_pm = pm;
m_time_gran = time_gran;
m_quit = false;
- m_last_unique = 0;
+
if (m_pm == KQ)
m_kq = kqueue();
else
@@ -738,14 +739,10 @@ void MockFS::audit_request(const mockfs_buf_in &in, ssize_t buflen) {
default:
FAIL() << "Unknown opcode " << in.header.opcode;
}
- /*
- * Check that the ticket's unique value is sequential. Technically it
- * doesn't need to be sequential, merely unique. But the current
- * fusefs driver _does_ make it sequential, and that's easy to check
- * for.
- */
- if (in.header.unique != ++m_last_unique)
- FAIL() << "Non-sequential unique value";
+ /* Verify that the ticket's unique value is actually unique. */
+ if (m_uniques->find(in.header.unique) != m_uniques->end())
+ FAIL() << "Non-unique \"unique\" value";
+ m_uniques->insert(in.header.unique);
}
void MockFS::init(uint32_t flags) {
diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh
index 958964f769d4..38efcd049a61 100644
--- a/tests/sys/fs/fusefs/mockfs.hh
+++ b/tests/sys/fs/fusefs/mockfs.hh
@@ -36,6 +36,8 @@ extern "C" {
#include "fuse_kernel.h"
}
+#include
+
#include