From nobody Mon Jan 27 17:22:27 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 4YhZwz2C20z5m08N; Mon, 27 Jan 2025 17:22:27 +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 4YhZwz1dRFz3dd7; Mon, 27 Jan 2025 17:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737998547; 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=b/Ot7z4m5zwbxzJaDhl4YcEhkr/IehVKblr2jm3b2Rk=; b=v3ymGzPYxnQt8rOlVNkgw95cgsDoqfWQkUEUaSzlDvVnteRwlaQ2lu5GIYJrNSUciOxFge LtQL/sVpWQj5n4EC0wafEOjtTYflsO3vA3MLcnHXkIyTqxChjr11FM3MYpG1/ofzOJ+bT6 Zdb4KkFOz4g81OGITiz9m3oklQnHV3VMT1yA9/vfLj+FX7AZvp8AJPksXhcs8tk+uardP6 Um2inXHVXv5uH9FfHBusUs8FyPzPAXSeamZ3s496vjBKmO4e1E3BdqvQYsmkhr9tA6BNmg laoQHL5HIoQHIgljyBwghthAYBDhTKVpq1E1fMOBnmX6B7/6HwDn/FiTvlvJuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737998547; 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=b/Ot7z4m5zwbxzJaDhl4YcEhkr/IehVKblr2jm3b2Rk=; b=EYlT0ZLnGhpl4sXkQkBr8f6k/zpojAjrAJX3GGoFCq1b8JKnUkIBSfgIf9ozVqhNKTz6oo sVHvFHLF5oBD+Lck++q8+i7xDQ9PF7f+J4iADy8z1c8AVo9K+uWGv3+FZ/iPwGWgpO/YIO ozsPbgVTUK6OVFIXnrPGdflFHtxPuOZ0vY3gT46o4HjWYXGT9c3gkYXEZ+AONoheRr716H vanhcydn190uu383RBzT6mc4NrlTndw0w0N/lAf3s70v3IEmsX6fpvsYIBmVsSKKWFixlz kwjZgm3yL8atrCo5oaSENrGOHxOe7blrDkPc6782iOOMrneusJyiBv0GkbWSpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737998547; a=rsa-sha256; cv=none; b=MyRVbGAIM2aZNEt/EgIa7hMxhp3gbOO5ppsspJF58GnwyPspS4WQQwffdSJkqhn2JEY0Vs rTTnnF3PLTKXYbfmG4D8Y7PhHSEqa2qy+MdxzZKz8k19gdV+/FjRgUlgUV4Tz2O+wSltmW 1vuRP1H/vPjUb+0zs7lSwdwL3VyG7+K8y/fd/4NlnmJDrM64f6VlV3+9Y1ngyU1a5FM1l3 FpWbVwEzIoaaoLdCJF3qiEwEnuJ82lKC3tVCFHW26fP9k8UPVwEXCm4nDaQZfSNmyHw+A4 EWljdWe79oCyXgfuX/GFhmc18xzX/zB9FIal7R83GaBJehR7RudIrJo3oEmhuA== 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 4YhZwz1DF6zfFB; Mon, 27 Jan 2025 17:22:27 +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 50RHMRRs096365; Mon, 27 Jan 2025 17:22:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RHMRcW096362; Mon, 27 Jan 2025 17:22:27 GMT (envelope-from git) Date: Mon, 27 Jan 2025 17:22:27 GMT Message-Id: <202501271722.50RHMRcW096362@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: 1c465e529208 - stable/13 - netinet: enter epoch in garp_rexmit() 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: 1c465e52920848dec6a76f0672fa209db7d5e5b5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1c465e52920848dec6a76f0672fa209db7d5e5b5 commit 1c465e52920848dec6a76f0672fa209db7d5e5b5 Author: Kristof Provost AuthorDate: 2025-01-20 13:24:48 +0000 Commit: Kristof Provost CommitDate: 2025-01-27 09:04:31 +0000 netinet: enter epoch in garp_rexmit() garp_rexmit() is a callback, so is not in net_epoch, which arprequest_internal() expects. Enter and exit the net_epoch. PR: 284073 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 38fdcca05d09b4d5426a253d3c484f9481a73ac2) --- sys/netinet/if_ether.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index ac3dbfaa4a65..e0cb3031f546 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1361,6 +1361,7 @@ sysctl_garp_rexmit(SYSCTL_HANDLER_ARGS) static void garp_rexmit(void *arg) { + struct epoch_tracker et; struct in_ifaddr *ia = arg; if (callout_pending(&ia->ia_garp_timer) || @@ -1370,6 +1371,7 @@ garp_rexmit(void *arg) return; } + NET_EPOCH_ENTER(et); CURVNET_SET(ia->ia_ifa.ifa_ifp->if_vnet); /* @@ -1401,6 +1403,7 @@ garp_rexmit(void *arg) } CURVNET_RESTORE(); + NET_EPOCH_EXIT(et); } /* From nobody Mon Jan 27 17:22:28 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 4YhZx13Jbqz5m0Dj; Mon, 27 Jan 2025 17:22:29 +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 4YhZx06Dccz3f3n; Mon, 27 Jan 2025 17:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737998548; 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=0vAC43Mg2GUTzkOTKbtX8YUAevQ5y+CWySMJSNiF1fk=; b=c1xgzuNk7kqZ0GdKMbB/OrU0wJitnFut9jBxyUVcHwOK5ymQLktVTlcoVXoPaHgpS8wZMv bbBQYODGuUTlB4ireOulhEda9tE80YXvlL4juCEmsoU493BwXd45VuKiz1YNXYzWnltEWE f6cc3CSH2nCjgFWqdCp72skanKUQXAwz4mUz8JdLjwssbpoGVjHtcIIj9kVu/gqBOufdKE DZAk2m+KfHjcY69NAerrEA7tkOLv9jFV89MGaDgQFtLhmAAQIDG0Qc22qYN2/L1irYKVFW MouWzCbcX+opLTuUGgj0gZiGWxT11NqVmNRC8xeFqsGhBVx0hMqsYZATkwH/vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737998548; 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=0vAC43Mg2GUTzkOTKbtX8YUAevQ5y+CWySMJSNiF1fk=; b=I98ZCjIG9O7D1VwA+BUJq0IqJdpFAEBLXqnQGqr8FnTZ3gX3nLPhPm6K3ZVAukj73oIvdK XDZXoQkXMkMW5mTbaxc5uDWasW/tPTax3LYb6UWfVoxkxTcmqoE0pmmh3AjLhuUzPzY7xh DxfO7H3as+L9QTvLan48FHkGvzpnDqEnkT6Qhun0eamy4qWcs1ua6xbA9jRwmwlKtU8G0M SqmHmiHB5u77WyiCmlejfq8NBxtn0E0H/V55InExpzBnSB+9pK6v6stZZerYzH8BrRKBMn Ghgr53NwCBltSYk1YdyYSwziKXt0pBDe43nUkAJy3rmRMPtV6RXSNiHj+x9YAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737998548; a=rsa-sha256; cv=none; b=pPYaiMk4QDUymSkQjk3+FRVxupkgKEM4b/WUYbfmksiGeOFkuU7P5si087lF0sepxm50JC D3fqYlYUvJOTb10sffq+1JqiQiUDWWzHnxUfN0XCLiyuC9EmSJc5UxxgRWQo+2mXYPIHAb jA/2cPRawpVsAcZZ+DfUQ048yUtACu932i+HaWmc7jQKRBE5zBG6BT2TEDmpXKoW1RTC1S gJ71u5ZCumTVp+fb1LIsg+bNz1k/V+9cE55apoA/O3yOk06vXygYJgl4CpHGYgTQ+SNv+U l8XkvBtjCBXAFU3EJT2HNehP2kcBaYvM5KbL3qjXrzcVSSaQH0ysiReZg7eCyw== 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 4YhZx05nn4zfFC; Mon, 27 Jan 2025 17:22:28 +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 50RHMSX5096488; Mon, 27 Jan 2025 17:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RHMSBH096485; Mon, 27 Jan 2025 17:22:28 GMT (envelope-from git) Date: Mon, 27 Jan 2025 17:22:28 GMT Message-Id: <202501271722.50RHMSBH096485@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: e69309223199 - stable/14 - netinet: enter epoch in garp_rexmit() 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: e69309223199e56397df3b6f750f012eb729d904 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e69309223199e56397df3b6f750f012eb729d904 commit e69309223199e56397df3b6f750f012eb729d904 Author: Kristof Provost AuthorDate: 2025-01-20 13:24:48 +0000 Commit: Kristof Provost CommitDate: 2025-01-27 09:04:34 +0000 netinet: enter epoch in garp_rexmit() garp_rexmit() is a callback, so is not in net_epoch, which arprequest_internal() expects. Enter and exit the net_epoch. PR: 284073 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 38fdcca05d09b4d5426a253d3c484f9481a73ac2) --- sys/netinet/if_ether.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 0e4f28a06342..5b69520a12d3 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1354,6 +1354,7 @@ sysctl_garp_rexmit(SYSCTL_HANDLER_ARGS) static void garp_rexmit(void *arg) { + struct epoch_tracker et; struct in_ifaddr *ia = arg; if (callout_pending(&ia->ia_garp_timer) || @@ -1363,6 +1364,7 @@ garp_rexmit(void *arg) return; } + NET_EPOCH_ENTER(et); CURVNET_SET(ia->ia_ifa.ifa_ifp->if_vnet); /* @@ -1394,6 +1396,7 @@ garp_rexmit(void *arg) } CURVNET_RESTORE(); + NET_EPOCH_EXIT(et); } /* From nobody Mon Jan 27 18:17: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 4Yhc8n0S3Wz5m3YS; Mon, 27 Jan 2025 18:17:45 +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 4Yhc8m5LXrz3pnx; Mon, 27 Jan 2025 18:17:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001864; 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=Tr7IjBNMiPmO1Du7kt+kLGpv3YJR3nbHFne7dClny6Q=; b=PjnKHDlAj3+EIrXrsNDcgIdJkRR93r7xxIeZOKUbyalZSiaMdcyKf24m2T91Y0I3ohB+OO e5L/TlDQGVYG5W0rinDNoNsEuUOUG9E3hwwvh3sI23PjEDZXxsXxwbgQzvYvQ8ugJn/ydG bqQpknjLu1NU/t+mBgtJrGoEXVMuoKjMW2fckPqeW9a9tH1c/UCrIhqNOdXn0K5WPGUz6t z3g0w2ayOG9IrRX/wR1EI4AKjAWswB90YSBJ/utRwDqa/5wDCLqcgcv5Bya8IVx1GQNQ5H +d4qpiSSoJwlrIjGZAg8pZKWyWm6ylMQnwhGDmFUGE58GIDQJnwcjt9VAZFVKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001864; 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=Tr7IjBNMiPmO1Du7kt+kLGpv3YJR3nbHFne7dClny6Q=; b=gsaT0JRRx2Hmde77H3xKXwWGPrgDNut75bY7oJhB4Ifqfglhd5lOMesrLOjOLwSql7VlDp zFWZ+twIYRwQsd+yg/evupXqFM34zUCWNPzIecqAG2yyNx1xsyiWKO/b5RPm0qv2n1Hmqk REbwHVu3XDA2ktD2+RpUj2FtFkEAXK7PH/7rSr8IZDzK1+aOK+49mSDrAMuaqUXIXuB2oI /OXKFd4jEHKTLt5UWZjYX2hYhPx/KIJLxVXaPUeh5o8/T1ZBQlippA+dSiE0WHcYdvjUAU g4UxeYSwN2hJNV0pDFWPg5I8J7GdjDoTO4Qnf0RXfgrwBYO5pDhT1or/NdOCiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738001864; a=rsa-sha256; cv=none; b=g2zzXzbHgtZKkPQDH0CjjtjXJGJTVQK39axLdoB+z1kRzpvrQKpkomEVLcOekOw6JAWbCA oXNnYzlt5zyhPncUAUqLaS0hOmyLfezPpiF6c+hWV3tdOKbA6iIgaPnwAqlJayMTU2SHiZ Spc47M9QReDkVLZ31npFVF0lugmmesMwlB/+RAVJs4dymsx4V+lz9bnIWVBSCPMJM+AN3u DZIFaL9bwImJc1dWQp2molbRHgDWIOWziYFI/Nm/90WqpKa7e+uCgXis7y9ccbwoLEKQHG Jw2ITuWjmTzs82Lfha5xOwzykhR4z549dblkha7Ea+gN0eJetZMJkTARuWF0yw== 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 4Yhc8m4QFlzg2p; Mon, 27 Jan 2025 18:17: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 50RIHi2S092272; Mon, 27 Jan 2025 18:17:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIHijt092269; Mon, 27 Jan 2025 18:17:44 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:17:44 GMT Message-Id: <202501271817.50RIHijt092269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 176599b58779 - stable/13 - atomic: Avoid casting the return value of atomic_load_ptr to void * 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 176599b58779b0062b50a5813654eefa5ec78869 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=176599b58779b0062b50a5813654eefa5ec78869 commit 176599b58779b0062b50a5813654eefa5ec78869 Author: Mark Johnston AuthorDate: 2024-08-28 18:51:06 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:17:11 +0000 atomic: Avoid casting the return value of atomic_load_ptr to void * Otherwise a cast is needed to load a uintptr_t value. Fixes: e1f4d623779d ("rangelocks: remove unneeded cast of the atomic_load_ptr() result") MFC after: 1 week (cherry picked from commit c7a7e997d25d0b33769252d002b16839c864c83d) --- sys/sys/atomic_san.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 22a8faa9e24e..4d503e22dcd2 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -266,7 +266,8 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); #define atomic_fcmpset_rel_ptr ATOMIC_SAN(fcmpset_rel_ptr) #define atomic_fetchadd_ptr ATOMIC_SAN(fetchadd_ptr) #define atomic_load_ptr(x) \ - ((void *)ATOMIC_SAN(load_ptr)(__DECONST(volatile uintptr_t *, (x)))) + ((__typeof(*x))ATOMIC_SAN(load_ptr)( \ + __DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ ((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x))) From nobody Mon Jan 27 18:17:45 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 4Yhc8n6bL5z5m3W7; Mon, 27 Jan 2025 18:17:45 +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 4Yhc8n4t7fz3ph1; Mon, 27 Jan 2025 18:17:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001865; 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=mZXgnJy9Yyxb6kO4F5TpWbLid2PJd3bkX4DMuhH0Jw8=; b=p/KT8KnmmDNgBDSaXaHOivCUCz3W7Gmut79s7OD3URcUPZbYgfdw22XGVJEBCYujISYTD2 4w3MUGNuvY86EtHpndQeRtAFnJui6ZKVPB2heZBDHjSJ9gt+19RilqbyaBsD1jfBU+byhd o/JuAA9iivlok+6IwnzCfuLCRtHwYCc5EOykY1a0/IcO/2EIoHxojTFjU/kJhvwd8EaOWM jX9P//205SY/gUxo0kF0RILCxVgD4+rANhJ5wkSysH3+MbZ4gxOgZ+jFA3p5nqxx+wgTaE b/g7h4LVlZmjlDjDHFFgBhSVPZ4NrX2pR/i6gJc3aa3uXVf2OnvIfvlfWAcg5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001865; 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=mZXgnJy9Yyxb6kO4F5TpWbLid2PJd3bkX4DMuhH0Jw8=; b=tB2RwRfiXhqNumwh5NDWZbRpVpMAkC7jPzzf+qBz6Y7FVsNgWjwQR0kL3fQkAbDthJ0yU9 d4S4++5TuwMw5mJ6tgI1w6enYR5qmCh0sELBZNBAApLPs1dG0w5mITZJ2+fD69rX5LeAK/ TINmst4EHu7DooFYudqBjT+UsR97NskmR3dHSpUrdF7qVnHDA4Ca/iOLqYuiohTgTAC7Rw djAW2noVizYMod0fZX0JqpW5UDndTDCCyuSwB/4K5RiamxhDdE/0ITEiJIgr03n9PEF1Ix kOwX7iYXx0VbxgmG+cibm6i5LSfagM8G6X/Gt+RB9xZK2/tTcgrgy9SctFT+qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738001865; a=rsa-sha256; cv=none; b=oVo7ekk2ktfv9M6TSYsd9tQM5o/yr23X5q5gJgAD+Q033NrN0AAPDde/9jQOa15iw6Itby K4Xtvy39M9eJjsemtKIZcrwJ0zHVdfwZCkEut1oIgjd9j/YpQDTjPPxfvbCT4Jqfg5js1D fDHuKxe1xlCvauJQ4m9LShC0fS8sramX9hjeuN9jV5W2x4UpzCX/b4OkDeysHlOPNt9YBJ bPnZlMxJ9jCQyZrMaXTgbRMqsktVN63bRUUfOJqI/2/0reoOSsXD4wojFfY7ydzL0ZwuBf zasWtmR6spgsU5mZG6u0U859eZVSHaTDOIix/VjjUPWUlPTCMtDQeBbJekfWKA== 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 4Yhc8n4PrPzgHZ; Mon, 27 Jan 2025 18:17:45 +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 50RIHjDr092306; Mon, 27 Jan 2025 18:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIHjsQ092303; Mon, 27 Jan 2025 18:17:45 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:17:45 GMT Message-Id: <202501271817.50RIHjsQ092303@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 4463da0fa365 - stable/13 - atomic: Fix the cast in the atomic_load_consume() interceptor 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4463da0fa365b8ec484068d8d2a58bf0c88317d9 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4463da0fa365b8ec484068d8d2a58bf0c88317d9 commit 4463da0fa365b8ec484068d8d2a58bf0c88317d9 Author: Mark Johnston AuthorDate: 2024-08-28 19:25:11 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:17:16 +0000 atomic: Fix the cast in the atomic_load_consume() interceptor As in commit c7a7e997d25d0, we should permit loading from a pointer to uintptr_t. Note that the other atomic_*_ptr() interfaces currently require casting regardless, only those defined in atomic_common.h try to be generic. Reported by: jrtc27 MFC after: 1 week (cherry picked from commit cb91dc50950ffdfd49337e844e231b69b8b5c634) --- sys/sys/atomic_san.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 4d503e22dcd2..93a9bfcbf593 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -270,7 +270,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); __DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ - ((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x))) + ((__typeof(*x))atomic_load_acq_ptr((volatile uintptr_t *)(x))) #define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr) #define atomic_set_ptr ATOMIC_SAN(set_ptr) #define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr) From nobody Mon Jan 27 18:17:46 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 4Yhc8p6jR6z5m3b0; Mon, 27 Jan 2025 18:17:46 +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 4Yhc8p5jZMz3pdJ; Mon, 27 Jan 2025 18:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001866; 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=V/rZ78J1ecJGY2z8cSefvHSDtlOX9R1Nk7TCixuV1k4=; b=lCfUyKgpC5Ti7L0FakSMbOp6OWFYOyulpK4QHpbnbjSI8173Ggv/+41h5Age2xt+dc4Flw zv/piuOGdojG6l0l+Q54SeMQBy/SP3wM9PDwJQHydlm1iHBHTgfAawH//RzF8W/j6MoO1s N3glTVck76tn6Jq4wItmEy6CaARuYrdhJrb0HMBPqBTg8VGIEN1RJAsAI+V5V7lXd/E+Ku ZltKEi5X8JmWkm/un61sBnncpFQTd3pgnUQ4txyqSmo8rEWg2oYZ4TJWcaAXGJnhcVN+ex 7YZ160Pq0CT9VLfMl3pY/HXU66wQdJWpfsMShxPvi9JeB1wM5ryFyzLP7hzaxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001866; 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=V/rZ78J1ecJGY2z8cSefvHSDtlOX9R1Nk7TCixuV1k4=; b=SsWDCRY6EtBU9seQx0BbDTtkLifSb787gH2YLc49rWj6hT/ummP8PmM7gSMYXqhahdqmQ4 Px1bydu7RlpjAaOvH33JR4eAMqgj4clKIMXBIKgilPyhMKDS0qc9sOQ9F9mHzqZSFfje7c v8mWb8xf9fm14lBArUUuuzV8yGazxJv3AL67N/7RUXnCcpH5IGPUfmW6CqVCUNHkjravUA M5PaKsspw35qiBCYx1rXM8BmHEV+raBsC5akl3KrHeMLGRSfdBzM5WVNVcbVdNi75E5AXt 7bc+UTDM5vpytt7gIJddFSmqDs9ef51ZMA6zXMp6OnValb+R7IciMuvReL0oWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738001866; a=rsa-sha256; cv=none; b=gXVvIZ5OTLBU87Dul9IWUnDbPL71wfAxfOxxD2Dur9Lg8GJzJIUKEYnq0tLEE9yikwPQta KByYlju8+8b5v+FKqujBk9E4LqG6U36XZ7XzWIov0NR1tJkg+FZdiDZJeXxzvJeHIv3vcl l7wN9DvpPgAq7I4dqc2wGb32YJCq5rTASaIVl7YVAWeonjYIdLlPz6k1Rig+64xkgQKsPR X7sQZCa5TXO7cmsKP4L+99C+82p8KPVFZBGV1+x3yPlRWBuKbwtXw3x6I7kSJMGKNami91 GuiQ6aPkQuZiIMqCDau8rn5ZjQt7gigGHRkFdDI8gVAz2lBWku+XyswtnxGWJA== 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 4Yhc8p5K2nzgKp; Mon, 27 Jan 2025 18:17:46 +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 50RIHkUv092339; Mon, 27 Jan 2025 18:17:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIHk7B092336; Mon, 27 Jan 2025 18:17:46 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:17:46 GMT Message-Id: <202501271817.50RIHk7B092336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: ced9fa71eaf9 - stable/13 - atomics: Constify loads: riscv: Convert missed atomic_load_acq_64() 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ced9fa71eaf95a27d5672c3419d7d9ca6c189168 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ced9fa71eaf95a27d5672c3419d7d9ca6c189168 commit ced9fa71eaf95a27d5672c3419d7d9ca6c189168 Author: Olivier Certner AuthorDate: 2025-01-20 12:53:13 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:17:16 +0000 atomics: Constify loads: riscv: Convert missed atomic_load_acq_64() Reviewed by: kib Fixes: 5e9a82e898d5 ("atomics: Constify loads") MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 5bd31ad86adb5255e40e7d8ecfddd9e49c7004af) --- sys/riscv/include/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 32ceb9a6341d..d304f1d5e5a3 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -494,7 +494,7 @@ ATOMIC_CMPSET_ACQ_REL(64); ATOMIC_FCMPSET_ACQ_REL(64); static __inline uint64_t -atomic_load_acq_64(volatile uint64_t *p) +atomic_load_acq_64(const volatile uint64_t *p) { uint64_t ret; From nobody Mon Jan 27 18:17:47 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 4Yhc8r4xFHz5m3WC; Mon, 27 Jan 2025 18:17:48 +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 4Yhc8q6jwzz3pjs; Mon, 27 Jan 2025 18:17:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001867; 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=bPFP9nKgQoNXu1bfiJ2JQBIeLrmpAZekZLW+Ggg115o=; b=qeKgB/2LDJerJZBEwp/1NXrsNa7OePwlbKBEnSF2VRYqqjh5w5scIh+/nXeGDPg6G/Juxy l5BmQHZJoV7b4bn/aK6OZaWGBlsbMOQWdKHEBVtSvUvHYwQ673T1BtmiZ4awpVDCROqY3X 4Oz7d80B1S89kQTlnYapZdBz2CCXhKQqQ8MB40STxz/1JoCDjXLxdCp8JPYAeTvu2BK5zJ LXoOo3WEfvaBk8cyUlsrIjq72AyX3dYpWiIIORmXO13RvmFY2J11gkzScBNgzfWQsa+jhr aZLO/MfZYZXjn40I+qZ3LtzSRgI50Ktp/aCghQrVKjweGGrYHzSYCufLm7OSPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001867; 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=bPFP9nKgQoNXu1bfiJ2JQBIeLrmpAZekZLW+Ggg115o=; b=TYbTfDQSGQF7syUIPkGrXgiz44jOGPE0xDWFcrAo9xh3AUdWCcb1md896yZPBn/ILYJddU fJUmQJ8XM+ZngUu1ucLkzUdqADayqJISj3WxwL05snPDJfv8s8aRUeX2HVuAwu0qJ7WE6b ble6moQ+5psx2hjFurF5g4pQ+Hzg4Fjwf7NsHYrRvVNVpehZOj4tAwKtTAgCwXiIpr1Hua l58Sa49nelqy4Ng7NNZbjMpacAsZgSZcpKGxc+AHFkGcdkacpbbAlYkz3/55kE7IZ6T4gt O66bwZR7PAIv4loL1plLw4wodkXmVGQQW+4hKilpJbdisB2WLXRTYfeAHlUNdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738001867; a=rsa-sha256; cv=none; b=X5gyXYLpIziACJl1/J+CtnbXVGSNcFMgfJciiNFhSCtT+Xd4Qe9VgwN3wgKYyOYMbZlwf7 ACAjNDNusbYhubCsPxTADNcMwAziUV6xYVQKoc/YCRUWaEJO/1N+T5Jh3itw0D9MPKdoaT t3b5H/VrAT8+8T/aswEdZTgt4N7heIJYzCQaWHRHKKq2GxNpPdH6DW6wS/zCMTV9g2ltB0 HUZCJjDMhniMl4dcTcl8pUZKsXnfvZPBCr45Lym2pDXH0obcuNIZhlh2+1KcpXZjJ0rWQS QFkHFUZDbXzmwQqIh8xJEonE1T/zwsHYXQf2PPqfwe2GiYAjHGTC1hqXQN3nvQ== 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 4Yhc8q6GsKzfyN; Mon, 27 Jan 2025 18:17:47 +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 50RIHlGC092372; Mon, 27 Jan 2025 18:17:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIHlnq092369; Mon, 27 Jan 2025 18:17:47 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:17:47 GMT Message-Id: <202501271817.50RIHlnq092369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: eb6edafe8f48 - stable/13 - atomics: atomic_load_consume_ptr(): Accept pointers to const 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb6edafe8f484a69ff074018e5b93e481787923e Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=eb6edafe8f484a69ff074018e5b93e481787923e commit eb6edafe8f484a69ff074018e5b93e481787923e Author: Olivier Certner AuthorDate: 2025-01-20 13:53:35 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:17:17 +0000 atomics: atomic_load_consume_ptr(): Accept pointers to const Now that all directly-implemented loads (with acquire semantics or not) accept pointers to const, ensure that atomic_load_consume_ptr(), built on atomic_load_acq_ptr(), does so too, in the common atomics header as well as *SAN interceptors. Reviewed by: kib Fixes: 5e9a82e898d5 ("atomics: Constify loads") MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 8dd436fca1149ec7e56f6f06abde50a2e8796ad6) --- sys/sys/atomic_common.h | 2 +- sys/sys/atomic_san.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/atomic_common.h b/sys/sys/atomic_common.h index e03cd93c2d4a..e802b2a99630 100644 --- a/sys/sys/atomic_common.h +++ b/sys/sys/atomic_common.h @@ -133,7 +133,7 @@ * openly resorting to the stronger acquire fence, to be sorted out. */ #define atomic_load_consume_ptr(p) \ - ((__typeof(*p)) atomic_load_acq_ptr((uintptr_t *)p)) + ((__typeof(*p)) atomic_load_acq_ptr((const volatile uintptr_t *)p)) #define atomic_interrupt_fence() __compiler_membar() diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 93a9bfcbf593..06c6c98ec8a8 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -270,7 +270,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); __DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ - ((__typeof(*x))atomic_load_acq_ptr((volatile uintptr_t *)(x))) + ((__typeof(*x))atomic_load_acq_ptr((const volatile uintptr_t *)(x))) #define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr) #define atomic_set_ptr ATOMIC_SAN(set_ptr) #define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr) From nobody Mon Jan 27 18:17:48 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 4Yhc8s3tC9z5m3SR; Mon, 27 Jan 2025 18:17:49 +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 4Yhc8s0Znpz3pmR; Mon, 27 Jan 2025 18:17:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001869; 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=PDP3trh+BpKn+RDFevkIJAW35P6SeX8OjKCYMJtNbs0=; b=NFdz9ZlcRDRkspmSHrxEng1MBEOWo3xCpU4H4P0dz0FHiQO/A8qWfLDF9eydl9DDuitJk3 Zx3UhZw3osQBKkE6IhAsffqP5asDJ7pwxeTvLo/Fq1bIiwWYtAqlC/oIENu0pvc5gUMAE4 MQVKN76I5EmVtuSI1/LzahhdqRyTU+gRTaamx+8O0DUR2J9vX5w79Cw+vdMc8VakCv4z26 M1RkqyHBjWvaYXhBAJd2c+KHqbfu79ebO/fpg2ySm0/LTm/Om6aiJPxLb/w+90WMVtwhHA 8BNWaIZ6l9EITc7WpZaI0GqJk8DHOCvR/krXNm3pdgosuGVuGLbUSOP0jIvKNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001869; 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=PDP3trh+BpKn+RDFevkIJAW35P6SeX8OjKCYMJtNbs0=; b=ScFF7by3FZy/NFrvg/YamLCHX0ls/nGTBxbzmQ+BR0KkwNF9/a4dpu6hvmBgjgnfkR48pa qB+fQ+g2NUPLP952sJSE6wLY0VzgRQ7SMWcX250d6rF7WSOGrZQP4V5UkKY/j2QbSI7ZgB xcfn/SRxSYp2qa9Oo7G74ULkk0WNtNZzA7fUlUOr6/di71qKXVIH1NG7N88DIZaGM82vph qWlIN5vh7uXF121W6Qp/aaslpDJLWhJYOeuK+mLR/Q9Sz9LuRd2aSLVKIuQWqpGmZc7pLg nHGbPXdmHgLNlDV0Lvgjo/q8jjj6GGVI7c/n4LqBJdjB9b9T0QxJjzsxD+SZdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738001869; a=rsa-sha256; cv=none; b=c6bQLQdCft7uDxsQEcyQSFN2xjoSRwDFkhB3nw6s29IoJbLTrXWWf+enpdhvJvYdX7aLER 392OtRhfhjJYQCvNsHGOeVDYDxXLSKesl8u0+N1NNxap1lEXUTs9U//ZJzjEjSIu1rnKC1 wMSUVtR7lGpTGj0HAI5gjwlrF85qHJNDrd70z+KzxMEdUI7SUnEUG98yGw2xT8xB90ysGE b84KUXeclJzJw/X+9Vu0ku1r9RRn9FU9v3JWFsFs/FG+MF9KgPniKIqhuVSuvUHVeL62J3 h9OgM05qW6IHWQ/zIWQ0NcI/8emcOpqWz1n+4YaKbhjnUdaZcHXx8D8/GKZ6mg== 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 4Yhc8s09JhzgW5; Mon, 27 Jan 2025 18:17:49 +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 50RIHmTQ092405; Mon, 27 Jan 2025 18:17:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIHmYv092402; Mon, 27 Jan 2025 18:17:48 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:17:48 GMT Message-Id: <202501271817.50RIHmYv092402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 213406054e46 - stable/13 - atomics: Constify loads: Remove now superfluous uses of DECONST() 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 213406054e46b50d5df6d28b01a0a3410132b322 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=213406054e46b50d5df6d28b01a0a3410132b322 commit 213406054e46b50d5df6d28b01a0a3410132b322 Author: Olivier Certner AuthorDate: 2025-01-20 14:28:37 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:17:17 +0000 atomics: Constify loads: Remove now superfluous uses of DECONST() No functional change (intended). Reviewed by: kib MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 9b7157c690723279d448fc7ea9c1f9374ad4511a) During MFC, the change to: 'sys/compat/linuxkpi/common/include/linux/seqlock.h' was elided as lkpi_seqprop_sequence() has never been MFCed to stable/13. --- sys/sys/atomic_san.h | 3 +-- sys/sys/seqc.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 06c6c98ec8a8..9a82ff6762c6 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -266,8 +266,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); #define atomic_fcmpset_rel_ptr ATOMIC_SAN(fcmpset_rel_ptr) #define atomic_fetchadd_ptr ATOMIC_SAN(fetchadd_ptr) #define atomic_load_ptr(x) \ - ((__typeof(*x))ATOMIC_SAN(load_ptr)( \ - __DECONST(volatile uintptr_t *, (x)))) + ((__typeof(*x))ATOMIC_SAN(load_ptr)((const volatile uintptr_t *)(x))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ ((__typeof(*x))atomic_load_acq_ptr((const volatile uintptr_t *)(x))) diff --git a/sys/sys/seqc.h b/sys/sys/seqc.h index 3f1c4efa7252..a0c030cecfc7 100644 --- a/sys/sys/seqc.h +++ b/sys/sys/seqc.h @@ -78,14 +78,14 @@ static __inline seqc_t seqc_read_any(const seqc_t *seqcp) { - return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp))); + return (atomic_load_acq_int(seqcp)); } static __inline seqc_t seqc_read_notmodify(const seqc_t *seqcp) { - return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)) & ~SEQC_MOD); + return (atomic_load_acq_int(seqcp) & ~SEQC_MOD); } static __inline seqc_t From nobody Mon Jan 27 18:17:50 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 4Yhc8v0CjJz5m3b3; Mon, 27 Jan 2025 18:17: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 4Yhc8t1Vkcz3pmf; Mon, 27 Jan 2025 18:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001870; 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=ILQf+OAfFwK9aFnVIPr72PUS06rcQWjOhUWWgV/OxVk=; b=mi8SfPbiBgeLX+ZbwLor7YxtIWnXRbG+GUvjD18ZSlv2PUrh2dMzGxYq9QF3HbeK2ivDWT EuuR8ccHLQ2qLry/tHADTyPuMOuSBCW4GOfxJdeydK+YCxip6ZSW8pDxvYUOZbsqFD+BrQ +nMDT6kzzvaYNKFemX0H6gVB9+77bSbip+1erLYr1lOYtAS/uIR+BP3qbjeLev8d2wZ6xb 8DGaAznzUB3NllXdUkjBEHVvK0NymaPAnyaThDDKRTNfLCzyglBxtKGgToEe2rwIKXYpJm iN3z7iOXuT9U32fh6BeGrRCmoakceO1g19URy2711u9IPsrxf4h48EWwQ9zzEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738001870; 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=ILQf+OAfFwK9aFnVIPr72PUS06rcQWjOhUWWgV/OxVk=; b=J+U0x2YRbvb1uqr/5bsTEqjVS6SZ8ZEJ6WRbk7HiXd/GSdCe6vfk3bgoJoMzQ43vCq34yu VBxDtIcDRMnvBV8FcPB6huMJ0qpPLDtnfILoqvkFZ6FQgZ6C+7VuUTr5IfCqGj0Q5Z5J24 fQBdcbx5BLkt3+E072E45IVq07MZKQtRcbokE3lmJGFo09b8ozw5KXUx0EGivqiwNYO1Ad mX1ccfQg6dggBTLObDyFzlVhT/P572BiMb1ng/qRxEXIIst6F33QOzKzpwF1KDr9jd/NQ4 f1UwaNX6z+LsdTA/poPxrNHXuqJh43rGm7NMz5DgOs+AZnnBMH+06tghs1yYPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738001870; a=rsa-sha256; cv=none; b=WASpFivKIzsSivrgPIwO50yRNq0xhpD4TjsXEp+8bIf5fIzeBKeApiigXTGdDF+pueaGGU R/z6wSp1BnjSXRH05KM3Fl87ft0380YVBqylZ7EXNkkliRk1rJXd/leqf8vWL0eQl/GuJo g0oDBO7qPSLRxTHjcv0tp7X/s+vDI+2jYv1RAWBY8QQuz2Fle3WxloFIpLZ0qeLkHPBuOS 0/eSfGRryjPSoKZVXYSvTCH0/1PTOvVzRpl7vQTaF57/QICKpF94zOoF0O9VRHY7J78Ndm eRri0OKHrqfGIMyJPHv9W/aYWop2DUVqSBwCPMW+gZgXMDijqaKspi/iFRYa0Q== 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 4Yhc8t15cvzg2q; Mon, 27 Jan 2025 18:17:50 +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 50RIHosp092446; Mon, 27 Jan 2025 18:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIHoRa092442; Mon, 27 Jan 2025 18:17:50 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:17:50 GMT Message-Id: <202501271817.50RIHoRa092442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: fb4bc4c325ec - stable/13 - smr: Load to accept pointers to const pointers 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fb4bc4c325eca15247a2e21ded0a70f92ec15488 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=fb4bc4c325eca15247a2e21ded0a70f92ec15488 commit fb4bc4c325eca15247a2e21ded0a70f92ec15488 Author: Olivier Certner AuthorDate: 2025-01-20 14:38:42 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:17:17 +0000 smr: Load to accept pointers to const pointers Pointers passed to the smr_entered_load() and smr_serialized_load() macros are in the end used as arguments to atomic_load_*ptr(), so convert them to the now acceptable 'const uintptr_t *' ones (instead of 'uintptr_tr *'), making these macros accept pointers to constant pointers. Reviewed by: kib MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 1ac0afaa962bc847294d5e6bf1e749b7ffa78cfd) --- sys/sys/smr_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys/smr_types.h b/sys/sys/smr_types.h index 9da4a73c568c..0257236f7314 100644 --- a/sys/sys/smr_types.h +++ b/sys/sys/smr_types.h @@ -60,7 +60,8 @@ struct { \ */ #define smr_entered_load(p, smr) ({ \ SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ - (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ + (__typeof((p)->__ptr))atomic_load_acq_ptr( \ + (const uintptr_t *)&(p)->__ptr); \ }) /* @@ -70,7 +71,8 @@ struct { \ */ #define smr_serialized_load(p, ex) ({ \ SMR_ASSERT(ex, "smr_serialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ + (__typeof((p)->__ptr))atomic_load_ptr( \ + (const uintptr_t *)&(p)->__ptr); \ }) /* From nobody Mon Jan 27 18:20: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 4YhcCt2NJdz5m3pr; Mon, 27 Jan 2025 18:20: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 4YhcCt1hMxz3rQg; Mon, 27 Jan 2025 18:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002026; 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=raHW6/IFh7RnGSgqfNooiml1xtVMkxp5lBgtd55VL3Y=; b=mw2PNVgWy7EENMTk0ahxU5UdTzTkZCKyPgp1fdtoupfSSaGkDLLvcm3YhvDMwU8145FmnZ 1lDKCnOy/tGXLuVIi3/K+X7KVuTELnlqrAxeNR4zJR3DwEDM377Rk3pkv8UKmdcMrHa/T/ rFPKKG4Z+0pk8lSeZ/5K+buQChRI7uOwATUOTaQqMs8yplnyxeTUsxlUHK52Xtu3JOk8g3 dnFwefIF4QwX4ucVf1gtj7N7n9AP3QTRa90L5iLxEWj6EdqGQJAmnYgAnEfIC0T5Q1M49N D3jmRMeV2WuqJRC45X/YIG5I2/1A/jFL2LHb2tQboVhqlIuGINjLT+ipG6yUGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002026; 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=raHW6/IFh7RnGSgqfNooiml1xtVMkxp5lBgtd55VL3Y=; b=JzF+BH/V5j7kZNqD53CSPYg/rT5Xbx8GVZ3P07Q+WftbfKtbpsBS/Bdq4KcKPrwTQOWuhX 7eBjuF7W6BX/4l+ffw4NOpzT/HM4pvdMVTGaZaQ0Q6Ztic9IsiuEDAKpFxXS7+KJlqs4t6 T+giZRpqZq9XIzhoPcmBz03CfiSpPTBHu0FqL0kHbOCt6U+kqHvttHWiQSK0PbgREBbJ6j nlRyp8W3dHEOF1TEpFE0x4awoBRl55OAXuq+pKqN77cI3YKL0hLfvVeYcP2xSxTK9O7WjE O0juy5c5YsuvrmJNQAsisuCKtmxcFICth0ZlMu7Nr1qONxohM+n3crSNEWIBLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002026; a=rsa-sha256; cv=none; b=QWyRaja4kWbbRSwPpWV+RZrWKcX240VhrDsH1wX5X++kAzcwzqx70pc5g9mkgTHNGAeFtt 5FqjFtYCVzyjF5aiD2xjdtV2/U3upwmsm9H2kZJVU0n+RiGRGtHZapWGAVLg52mNPW1juU /FDwhOjMXIf40N6ZZaP0jla2xylULabhPHC7dVUDGpeYcnvIuPF1PFms4uEUitWybJqIte 4s+rVGgTyfhLOWPvIc+WoPPQdAlYlcl46gsOKalUIR5GL3Rs/PXQVv2t/ifOu6b1ZjYK96 WwiqT2ewiGxsOllNhKYxBjljwcSuFRsXx/XOaJ8oeZuEEfh8q6gzNdJZKuz1+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 4YhcCt1CJqzgKq; Mon, 27 Jan 2025 18:20: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 50RIKQsN002120; Mon, 27 Jan 2025 18:20:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIKQhu002117; Mon, 27 Jan 2025 18:20:26 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:20:26 GMT Message-Id: <202501271820.50RIKQhu002117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: d034ff89b84f - stable/14 - atomics: Constify loads: riscv: Convert missed atomic_load_acq_64() 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d034ff89b84f8470eb5bbcbb65c64c762e07f0bd Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d034ff89b84f8470eb5bbcbb65c64c762e07f0bd commit d034ff89b84f8470eb5bbcbb65c64c762e07f0bd Author: Olivier Certner AuthorDate: 2025-01-20 12:53:13 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:19:52 +0000 atomics: Constify loads: riscv: Convert missed atomic_load_acq_64() Reviewed by: kib Fixes: 5e9a82e898d5 ("atomics: Constify loads") MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 5bd31ad86adb5255e40e7d8ecfddd9e49c7004af) --- sys/riscv/include/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index bf9c42453d8b..74ffc171b028 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -569,7 +569,7 @@ ATOMIC_CMPSET_ACQ_REL(64); ATOMIC_FCMPSET_ACQ_REL(64); static __inline uint64_t -atomic_load_acq_64(volatile uint64_t *p) +atomic_load_acq_64(const volatile uint64_t *p) { uint64_t ret; From nobody Mon Jan 27 18:20:27 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 4YhcCv533zz5m3mb; Mon, 27 Jan 2025 18:20:27 +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 4YhcCv3drqz3rN0; Mon, 27 Jan 2025 18:20:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002027; 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=gZ7ktpJ5qmWuutzXUIg7Aynm5E+aqUmmj9GfkNoJ480=; b=lMuhfWh/2KSDWkJrWAv7yN8spZLndEfvludd/GS9BySDZ2CKlPd4dozRHPnjrUvNFz9Zm8 HCi5uzAPDG7aDvH/8BjLTWaK0ChCGhkm5kQVbwTrjfVokC1R8e/3oFYc6qk7fPzgseBM6v Ojwai7f39gPhOGCOT4IkmCG/zwpopj5fG7DyttSeuF597IQoNMWQ6lp2oJWI+qCH61cDIW JLsurTkORC2zkXFgY2osKvjYL/1/sB8l026ugsvHQUnQG1BE45nRJjqA3NSVUcY5LL4Htz VbQyoq8vaY9h/vLw2usmAyrJQq1DJgD5y+gOZ473MrxngkLDerz9rkYTk3EfnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002027; 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=gZ7ktpJ5qmWuutzXUIg7Aynm5E+aqUmmj9GfkNoJ480=; b=qHv+anPklWHwrGsalHfeWzu6FigN+okHMu5f88M3B1dEAAYy+wRFEbWi2S3n8hy9lYcqNW E5whlh/IMHi9Rbdsu9Zd/GhLnKBChzqaF9d4RysBL5eiPOMnFC8Vj8lgjJ8U7JJ+oZzhwo 6DruyRPu1ZPeBubzmmQds88YSRxLvW8pFoFi09b61XXXbYK8f72AW3Byyo9xC/l69koTTo wQ0hUy3TjMofuBiHH9/kaIdcaBVtysolZYnAPNBxhrNY8JJdqe/Golvk6fwSbYXen6sNVs iFbkQHnfAviz9u8Op52jLeFnG8WprHcqj6spT8F2FOU0yazcTt38VjsJkJHzyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002027; a=rsa-sha256; cv=none; b=tf4oqkdOKUGqSDbWrpfFEXAzSg6aQvBWkelpQK3jb19X8tF9M5aBQJd+rrQGzzOazO56BG tc9Jk03uBm6boAIJmGLGota3Zjnfg5SyU97PI1DVvWFieg08eno48avxbc8ud3hCmzX2s/ pWsi7WyQofE1QwyDMgl1JDgOFglXnFCgEDIjRki41Z9Joz3WD37LcqmBm7exa6+dE4mKHX VEgw/rOkc4VDGToutp7aYJjar2Dj8eipscWArQr0DI7Px5N40VVRn5ZSSkb6g7Qs1Dn2ln ahFxA6XL7iOOwWJElVRsqwjym5gb6ivfqGDfWSMd96+MeZo2VhxWun19rBuk9Q== 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 4YhcCv2858zgFp; Mon, 27 Jan 2025 18:20:27 +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 50RIKReb002153; Mon, 27 Jan 2025 18:20:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIKRCd002150; Mon, 27 Jan 2025 18:20:27 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:20:27 GMT Message-Id: <202501271820.50RIKRCd002150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 19f7b2bbc4e4 - stable/14 - atomics: atomic_load_consume_ptr(): Accept pointers to const 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 19f7b2bbc4e4fec33b7e8d546dd05a79533ca8e4 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=19f7b2bbc4e4fec33b7e8d546dd05a79533ca8e4 commit 19f7b2bbc4e4fec33b7e8d546dd05a79533ca8e4 Author: Olivier Certner AuthorDate: 2025-01-20 13:53:35 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:19:57 +0000 atomics: atomic_load_consume_ptr(): Accept pointers to const Now that all directly-implemented loads (with acquire semantics or not) accept pointers to const, ensure that atomic_load_consume_ptr(), built on atomic_load_acq_ptr(), does so too, in the common atomics header as well as *SAN interceptors. Reviewed by: kib Fixes: 5e9a82e898d5 ("atomics: Constify loads") MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 8dd436fca1149ec7e56f6f06abde50a2e8796ad6) --- sys/sys/atomic_common.h | 2 +- sys/sys/atomic_san.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/atomic_common.h b/sys/sys/atomic_common.h index e03cd93c2d4a..e802b2a99630 100644 --- a/sys/sys/atomic_common.h +++ b/sys/sys/atomic_common.h @@ -133,7 +133,7 @@ * openly resorting to the stronger acquire fence, to be sorted out. */ #define atomic_load_consume_ptr(p) \ - ((__typeof(*p)) atomic_load_acq_ptr((uintptr_t *)p)) + ((__typeof(*p)) atomic_load_acq_ptr((const volatile uintptr_t *)p)) #define atomic_interrupt_fence() __compiler_membar() diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 93a9bfcbf593..06c6c98ec8a8 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -270,7 +270,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); __DECONST(volatile uintptr_t *, (x)))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ - ((__typeof(*x))atomic_load_acq_ptr((volatile uintptr_t *)(x))) + ((__typeof(*x))atomic_load_acq_ptr((const volatile uintptr_t *)(x))) #define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr) #define atomic_set_ptr ATOMIC_SAN(set_ptr) #define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr) From nobody Mon Jan 27 18:20:28 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 4YhcCw5KBqz5m3St; Mon, 27 Jan 2025 18:20:28 +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 4YhcCw46Rzz3rT9; Mon, 27 Jan 2025 18:20:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002028; 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=ggbJtHEHeLkOSkeT6URU7bnISHvRyylupLG1KwJaGYo=; b=LOtNczpQyxCcTPetlKzppNwhDXHxejttXj18p9qSxsfVTGNpE1iBM0y+4qvpKGzclccYln L8CJ72stZ7K271mhUcLpeg6d5mL/Qj7ITI12e+NOVuLc6QfOM7nULFIBy+7o2B2etKnau+ q6+PU6U8fYlOfQPcDswzNxlSIOqV+cZ4jt2uBCJ8V4vqq2SPCdBNw4qRScBiCJu3F9MTY7 h5/wZlw/I4svHM01BuJgwzH9rwTrUY5sLQuw9ZETqilYuRTTWUmFQPJgbyyTHwybc3YlU8 2uvKWHaRLvCvMq7LJwKPwyyIjV8pvEfYG8Yd5ceWIRPZhvq+iTIIBugbvMuQ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002028; 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=ggbJtHEHeLkOSkeT6URU7bnISHvRyylupLG1KwJaGYo=; b=Y8dE3piqSBQXGv9HRxtJwzeQDyo9L/ZeBtI3jM4uH1lOtm0cOWzXzU6OQNtVdMK4WeeW8Y x3gT3r04Uk9lhQ6S2zudMQzmsgUdORWbcrkJkoTG2ozopuAK2THaXs0x2C+suk55YTeaOx KiEwY2Wqwt6cRy6b8O7ydUVHj4ZHs7LEzZdISrjNCOgdAsiIzzylB9U5lRrzjqwF4Cz44R F+u/sJwxl1aruxPSz/TWyRmEMwu80Mbof68GcPx0I08jwlRTth1wDwr9RZr+97eaxpaMrV E2RRzFrOzjdujAOIqQA2Laei+4aW16iZ0MnaB5Oa5Kzme2d1g2eZqALgAy+4IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002028; a=rsa-sha256; cv=none; b=qt9e8xuboRKVLYzMB4QpITYSdW2BaAWOmI2YeY7jLjg0qNpUdcOMALAwnF6vIChTdyLXwc bwp6ptNgZu/tqwkUciyE98Vyci2/Jv+LWUev137MEyv+Yyqek4axWr0kxeE9gOts/TjUWX ud1AoAH1bj2k6iF9OM6yFxD9m3Go7LmYDma5NNvpgit3kPpAYlbgYUx73VZJ44/oDGkTUG hbjqVwq//dkHoXtqXtdMwmK0S4lUTEBHVu0dg2j9roRksa7SLUVFm8nKZLAJtJWP0g1g+a DpBmDahuaxyA1DrG+GVtAGdyuLv8Vi4+ZXXMsBT7sGmtPcDus4L24KDDYvIeOg== 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 4YhcCw3179zgFq; Mon, 27 Jan 2025 18:20:28 +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 50RIKSlb002189; Mon, 27 Jan 2025 18:20:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIKSrk002186; Mon, 27 Jan 2025 18:20:28 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:20:28 GMT Message-Id: <202501271820.50RIKSrk002186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 11dde2c8b715 - stable/14 - atomics: Constify loads: Remove now superfluous uses of DECONST() 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 11dde2c8b7156a7d2072589c22c2f3c0de6880d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=11dde2c8b7156a7d2072589c22c2f3c0de6880d8 commit 11dde2c8b7156a7d2072589c22c2f3c0de6880d8 Author: Olivier Certner AuthorDate: 2025-01-20 14:28:37 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:19:57 +0000 atomics: Constify loads: Remove now superfluous uses of DECONST() No functional change (intended). Reviewed by: kib MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 9b7157c690723279d448fc7ea9c1f9374ad4511a) --- sys/compat/linuxkpi/common/include/linux/seqlock.h | 2 +- sys/sys/atomic_san.h | 3 +-- sys/sys/seqc.h | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/seqlock.h b/sys/compat/linuxkpi/common/include/linux/seqlock.h index 48e42efc10fe..554fdfd6e202 100644 --- a/sys/compat/linuxkpi/common/include/linux/seqlock.h +++ b/sys/compat/linuxkpi/common/include/linux/seqlock.h @@ -99,7 +99,7 @@ lkpi_write_seqcount_invalidate(seqc_t *seqcp) static inline seqc_t lkpi_seqprop_sequence(const seqc_t *seqcp) { - return (atomic_load_int(__DECONST(seqc_t *, seqcp))); + return (atomic_load_int(seqcp)); } #define seqprop_sequence(s) lkpi_seqprop_sequence(&(s)->seqc) diff --git a/sys/sys/atomic_san.h b/sys/sys/atomic_san.h index 06c6c98ec8a8..9a82ff6762c6 100644 --- a/sys/sys/atomic_san.h +++ b/sys/sys/atomic_san.h @@ -266,8 +266,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX); #define atomic_fcmpset_rel_ptr ATOMIC_SAN(fcmpset_rel_ptr) #define atomic_fetchadd_ptr ATOMIC_SAN(fetchadd_ptr) #define atomic_load_ptr(x) \ - ((__typeof(*x))ATOMIC_SAN(load_ptr)( \ - __DECONST(volatile uintptr_t *, (x)))) + ((__typeof(*x))ATOMIC_SAN(load_ptr)((const volatile uintptr_t *)(x))) #define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr) #define atomic_load_consume_ptr(x) \ ((__typeof(*x))atomic_load_acq_ptr((const volatile uintptr_t *)(x))) diff --git a/sys/sys/seqc.h b/sys/sys/seqc.h index 6472c2e3cfd7..17854b6f4adb 100644 --- a/sys/sys/seqc.h +++ b/sys/sys/seqc.h @@ -78,14 +78,14 @@ static __inline seqc_t seqc_read_any(const seqc_t *seqcp) { - return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp))); + return (atomic_load_acq_int(seqcp)); } static __inline seqc_t seqc_read_notmodify(const seqc_t *seqcp) { - return (atomic_load_acq_int(__DECONST(seqc_t *, seqcp)) & ~SEQC_MOD); + return (atomic_load_acq_int(seqcp) & ~SEQC_MOD); } static __inline seqc_t From nobody Mon Jan 27 18:20:29 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 4YhcCx60dnz5m3s8; Mon, 27 Jan 2025 18:20:29 +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 4YhcCx4M7Gz3r9D; Mon, 27 Jan 2025 18:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002029; 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=YSA0X3yML4eqxkFJ7TjKbAEKaJsB3tmBXLHMLkMyUjQ=; b=PYkAI7bahjUfip3r6tvTuHm95k4AWZYElrQdKnEIkchNLSYt/zjOmaHQWfRThQjqXNPqvw 3wEemJceoYAwqVbAfQ1NEPAjkJFhvfMW5SPO3iZEeyT96WTyv5pgBXeHYy1QLuVpIj1ePQ V8pzf29vdpgbzLEiLNNMqLEOcyNaUHj6BgNPd2UGhMfEGZ9KlsSPfMxotNzd02tPFaAGQ6 ZBfdhOAB5Hvt9bFqjSlRx7qmdyFJq7ypDibTX8jEzFqxskNqIuI2Pv709CBd806XPR9oV/ elYS/qGazdAUBNBzLFVfiTD4y6SUIEmpB5NeozcIAeA+z+rQcE7/SmS7BWmJnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002029; 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=YSA0X3yML4eqxkFJ7TjKbAEKaJsB3tmBXLHMLkMyUjQ=; b=l6gf476Nvu7+Cv4QAQGZi7+Md1qz++FHO2Rsi3r4nzR2JWHuMvk1ySwZr8uLjJ0hcvTqS3 Kqx1qkFSYPjwH40rvyNCWPyZLhwUB734jD2qrx9pzIJLOUHycWZprvTWzrUVm9GifsbWB/ 3oFltvXZvk6nEZvbbTFhzGtheKdEpIzi/1SqgX5VDtkyPeFNT6PDtmaMHrc62jz+wq1e/w 5eFxOcHnb6vDSuYaJsTkMAk5zUx3bEU7ceWPKZs/IjEQ+zxyXvDUu9WV3oG/V9zEwZdtyp N6i1UhB6g7ocRYU09/M3pY7hfvlExev9cdxZVE8jW0euZL4MG/zKKIk3+peBEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002029; a=rsa-sha256; cv=none; b=Z0loQqd0eTWP9aBQTW2n+0c0iqXuPa10+iIRSbYkiT5ILwnvKYdQa8xustU68OO1fEdLJ0 bcJFX0yrjGIF1CIdFlNfJ3AdWkjrX0RVQhaoOfRQkv/z2pQcPgfs2821gnuraOAoTik7ou TGnuDTJ8gPxm3qIhFXmJ4al4JzgvKqOqN+wtEnJUTMjKLF0AgaZ40r1cjNXm3rehw9KKZP 3IUqWWsU4HvcAeFt6NBfksEFwih26WAU3EWnartYPKqKfuFhA4qmIq5OsMdCexHQ1c4twG 2KXYeKwPsHQE4wvMEPkPCQJprMoSgEWLtaS6dpCNwIuoteOx1+auu7zDyl3sdw== 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 4YhcCx3yNczgW8; Mon, 27 Jan 2025 18:20:29 +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 50RIKTrW002222; Mon, 27 Jan 2025 18:20:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIKTKf002219; Mon, 27 Jan 2025 18:20:29 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:20:29 GMT Message-Id: <202501271820.50RIKTKf002219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: aab45924bdb1 - stable/14 - smr: Load to accept pointers to const pointers 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aab45924bdb10338654e25ab9ecec106b7eb368b Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=aab45924bdb10338654e25ab9ecec106b7eb368b commit aab45924bdb10338654e25ab9ecec106b7eb368b Author: Olivier Certner AuthorDate: 2025-01-20 14:38:42 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 18:19:57 +0000 smr: Load to accept pointers to const pointers Pointers passed to the smr_entered_load() and smr_serialized_load() macros are in the end used as arguments to atomic_load_*ptr(), so convert them to the now acceptable 'const uintptr_t *' ones (instead of 'uintptr_tr *'), making these macros accept pointers to constant pointers. Reviewed by: kib MFC after: 4 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48497 (cherry picked from commit 1ac0afaa962bc847294d5e6bf1e749b7ffa78cfd) --- sys/sys/smr_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys/smr_types.h b/sys/sys/smr_types.h index 9da4a73c568c..0257236f7314 100644 --- a/sys/sys/smr_types.h +++ b/sys/sys/smr_types.h @@ -60,7 +60,8 @@ struct { \ */ #define smr_entered_load(p, smr) ({ \ SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ - (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ + (__typeof((p)->__ptr))atomic_load_acq_ptr( \ + (const uintptr_t *)&(p)->__ptr); \ }) /* @@ -70,7 +71,8 @@ struct { \ */ #define smr_serialized_load(p, ex) ({ \ SMR_ASSERT(ex, "smr_serialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ + (__typeof((p)->__ptr))atomic_load_ptr( \ + (const uintptr_t *)&(p)->__ptr); \ }) /* From nobody Mon Jan 27 18:36:05 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 4YhcYy0qSsz5m4qM; Mon, 27 Jan 2025 18:36:06 +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 4YhcYy054cz3wT9; Mon, 27 Jan 2025 18:36:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002966; 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=O5VxrLZt1IFm++shQusqT0WdJsz4od3FdzgbRhh2LLY=; b=VwWWoQa74BX4d4ct43aCb9JsDGZACVTvAmNdIt5F7/DMyzNL2IVTikE2GxalNWuw5ODaCy jTMu3DG0ikPZiryqnfefFI9RQJK7d6KK0PPUv7HtFeiuAx0yAitvUPgFHoZ7A0rXLWN6of dARtkJyIw4ZV6E4btR4BONfx7ftc+MLclO1zdPBM2N3zhrqjsQIQ0jAzLPpUGi4UCrcJ1p +3FI2P3f6CoTGNhLXpHthK7HltjPa7RdNoaCXlImwPTTFwFi4gFhCI9j2id9EZBPkhhp89 TYibD1TH/V90bNXl+Aop9vlDxH+VvOTqcsnBY1Q2osQqxCl4RqNJ34C61drbLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002966; 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=O5VxrLZt1IFm++shQusqT0WdJsz4od3FdzgbRhh2LLY=; b=Db/9M7SmgT1Sxnsn4tDU+/Boh9zR+y0CwmlZUe8elfrjRqj1EZPa+qr0aV4PSLxoIUHHfo NBuz6vFtgKKfw0oalf23m15EBYdqNaRCHKpKSqYRO261Ns2HTVrKMHXR85q8jRfd7MVWe/ IPEMOzElv+zwOK9QLHeQtcj7tq4l2QPESAX5kHutwD73M7wolYyNyqmb2FYjvTYdAa7Xn6 jLbMaY/9oPivBsc8eSyh5HUL+/X0wReSYJdvL/3eXcGiWCj1s68NiI7BPgvBl2kXor/RlG ZcHh50anFW9LVGnTE8QU8gBOWyh9JoDgggoa3ozsEvuW86nw0g6Ol2blCSsmVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002966; a=rsa-sha256; cv=none; b=G1pDxJ+okfrPp6TS3JD6FZBCFywQIe5oFtqTyhX34kQR/IxUdwt14CvgxX5HsUWgbspLBR pEGi9khOqYv1WAt9n3k0PWrjFI3IjBTdQjgir5tAotWeW6GvNQb+0AVPn+ChP/aj50XRMJ 2EY9JKxiKKlRczxFZcJxmD+2Su1KUBdVxHAMqQ8e0tQqfCkGx1VLsn/p1e+K63NKP2zHIt vWSFLczBBxdhvkvVNVl/k69DVeYHCT5+2A4BBWUTSzLnqjaHv0HP9mVQq8SWMax3nq/TSQ PK30MnPQJvm3gjhFIxUpwSSkkSpW2uMPGgJeWbqyaDNNL2VL/GR1owb4q8syXQ== 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 4YhcYx6j0Wzgmr; Mon, 27 Jan 2025 18:36:05 +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 50RIa5a6029703; Mon, 27 Jan 2025 18:36:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIa5ZO029700; Mon, 27 Jan 2025 18:36:05 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:36:05 GMT Message-Id: <202501271836.50RIa5ZO029700@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: d2a999c2e0a0 - stable/13 - sysctl(9): Enable vnet sysctl variables to be loader tunable 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: d2a999c2e0a0dbceb6d2b0a434b7de5bc88afe97 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d2a999c2e0a0dbceb6d2b0a434b7de5bc88afe97 commit d2a999c2e0a0dbceb6d2b0a434b7de5bc88afe97 Author: Zhenlei Huang AuthorDate: 2023-09-09 08:06:23 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-27 18:32:59 +0000 sysctl(9): Enable vnet sysctl variables to be loader tunable Complete phase two of 3da1cf1e88f8. In 3da1cf1e88f8, the meaning of the flag CTLFLAG_TUN is extended to automatically check if there is a kernel environment variable which shall initialize the SYSCTL during early boot. It works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTLs which belong to VNETs. This change extends the meaning further, to allow it also works for the SYSCTLs which belong to VNETs. A typical usage is ``` VNET_DEFINE_STATIC(int, foo) = 0; SYSCTL_INT(_net, OID_AUTO, foo, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(foo), 0, "Description of the foo loader tunable"); ``` Note that the implementation has a limitation. It behaves the same way as that of non-vnet loader tunables. That is, after the kernel or modules being initialized, any changes (e.g. via kenv) to kernel environment variable will not affect the corresponding vnet variable of subsequently created VNETs. To overcome it, we can use TUNABLE_XXX_FETCH to fetch the kernel environment variable into those vnet variables during vnet constructing. This change will fix the following SYSCTLs those belong to VNETs and have CTLFLAG_TUN flag: ``` net.add_addr_allfibs net.bpf.optimize_writers net.inet.tcp.fastopen.ccache_buckets net.link.bridge.inherit_mac net.link.bridge.ipfw_arp net.link.bridge.log_stp net.link.bridge.pfil_bridge net.link.bridge.pfil_local_phys net.link.bridge.pfil_member net.link.bridge.pfil_onlyip net.link.lagg.default_use_flowid net.link.lagg.default_use_numa net.link.lagg.default_flowid_shift net.link.lagg.lacp.debug net.link.lagg.lacp.default_strict_mode ``` Although the following vnet SYSCTLs have CTLFLAG_TUN flag, theirs values are re-fetched via TUNABLE_XXX_FETCH, thus are not affected by this change. ``` net.inet.ip.reass_hashsize net.inet.tcp.hostcache.cachelimit net.inet.tcp.hostcache.hashsize net.inet.tcp.hostcache.bucketlimit net.inet.tcp.syncache.bucketlimit net.inet.tcp.syncache.cachelimit net.inet.tcp.syncache.hashsize net.key.spdcache.maxentries net.key.spdcache.threshold ``` In memoriam: hselasky Discussed with: hselasky, glebius Fixes: 3da1cf1e88f8 Extend the meaning of the CTLFLAG_TUN flag ... MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D39638 (cherry picked from commit 110113bc086f5df1a9b6547edb1ab0cec698c55c) (cherry picked from commit 894efae09de43a38b0ff667c4b7195dc377640e4) --- sys/kern/kern_linker.c | 3 +++ sys/kern/kern_sysctl.c | 3 --- sys/kern/link_elf.c | 20 ++++++++++++++++++++ sys/kern/link_elf_obj.c | 30 +++++++++++++++++++++++++++++- sys/kern/linker_if.m | 9 +++++++++ 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 4f573018e18f..4655e3f296c2 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -459,6 +459,9 @@ linker_load_file(const char *filename, linker_file_t *result) } modules = !TAILQ_EMPTY(&lf->modules); linker_file_register_sysctls(lf, false); +#ifdef VIMAGE + LINKER_PROPAGATE_VNETS(lf); +#endif linker_file_sysinit(lf); lf->flags |= LINKER_FILE_LINKED; diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index a19f3a5ab27b..dd71b2880ae5 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -524,9 +524,6 @@ retry: SLIST_INSERT_HEAD(parent, oidp, oid_link); if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE && -#ifdef VIMAGE - (oidp->oid_kind & CTLFLAG_VNET) == 0 && -#endif (oidp->oid_kind & CTLFLAG_TUN) != 0 && (oidp->oid_kind & CTLFLAG_NOFETCH) == 0) { /* only fetch value once */ diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index eb521b020f59..52e9324f7193 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -162,6 +162,9 @@ static int link_elf_each_function_nameval(linker_file_t, static void link_elf_reloc_local(linker_file_t); static long link_elf_symtab_get(linker_file_t, const Elf_Sym **); static long link_elf_strtab_get(linker_file_t, caddr_t *); +#ifdef VIMAGE +static void link_elf_propagate_vnets(linker_file_t); +#endif static int elf_lookup(linker_file_t, Elf_Size, int, Elf_Addr *); static kobj_method_t link_elf_methods[] = { @@ -180,6 +183,9 @@ static kobj_method_t link_elf_methods[] = { KOBJMETHOD(linker_ctf_get, link_elf_ctf_get), KOBJMETHOD(linker_symtab_get, link_elf_symtab_get), KOBJMETHOD(linker_strtab_get, link_elf_strtab_get), +#ifdef VIMAGE + KOBJMETHOD(linker_propagate_vnets, link_elf_propagate_vnets), +#endif KOBJMETHOD_END }; @@ -1929,6 +1935,20 @@ link_elf_strtab_get(linker_file_t lf, caddr_t *strtab) return (ef->ddbstrcnt); } +#ifdef VIMAGE +static void +link_elf_propagate_vnets(linker_file_t lf) +{ + elf_file_t ef = (elf_file_t)lf; + int size; + + if (ef->vnet_base != 0) { + size = (uintptr_t)ef->vnet_stop - (uintptr_t)ef->vnet_start; + vnet_data_copy((void *)ef->vnet_base, size); + } +} +#endif + #if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) || defined(__powerpc__) /* * Use this lookup routine when performing relocations early during boot. diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 684d5971c5bb..d02a6b2acb61 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -150,6 +150,9 @@ static int link_elf_each_function_nameval(linker_file_t, static int link_elf_reloc_local(linker_file_t, bool); static long link_elf_symtab_get(linker_file_t, const Elf_Sym **); static long link_elf_strtab_get(linker_file_t, caddr_t *); +#ifdef VIMAGE +static void link_elf_propagate_vnets(linker_file_t); +#endif static int elf_obj_lookup(linker_file_t lf, Elf_Size symidx, int deps, Elf_Addr *); @@ -170,6 +173,9 @@ static kobj_method_t link_elf_methods[] = { KOBJMETHOD(linker_ctf_get, link_elf_ctf_get), KOBJMETHOD(linker_symtab_get, link_elf_symtab_get), KOBJMETHOD(linker_strtab_get, link_elf_strtab_get), +#ifdef VIMAGE + KOBJMETHOD(linker_propagate_vnets, link_elf_propagate_vnets), +#endif KOBJMETHOD_END }; @@ -1848,7 +1854,7 @@ link_elf_symtab_get(linker_file_t lf, const Elf_Sym **symtab) return (0); return (ef->ddbsymcnt); } - + static long link_elf_strtab_get(linker_file_t lf, caddr_t *strtab) { @@ -1859,3 +1865,25 @@ link_elf_strtab_get(linker_file_t lf, caddr_t *strtab) return (0); return (ef->ddbstrcnt); } + +#ifdef VIMAGE +static void +link_elf_propagate_vnets(linker_file_t lf) +{ + elf_file_t ef = (elf_file_t) lf; + + if (ef->progtab) { + for (int i = 0; i < ef->nprogtab; i++) { + if (ef->progtab[i].size == 0) + continue; + if (ef->progtab[i].name == NULL) + continue; + if (strcmp(ef->progtab[i].name, VNET_SETNAME) == 0) { + vnet_data_copy(ef->progtab[i].addr, + ef->progtab[i].size); + break; + } + } + } +} +#endif diff --git a/sys/kern/linker_if.m b/sys/kern/linker_if.m index 0722390d4e20..a50ed1ea84a3 100644 --- a/sys/kern/linker_if.m +++ b/sys/kern/linker_if.m @@ -154,3 +154,12 @@ STATICMETHOD int link_preload { METHOD int link_preload_finish { linker_file_t file; }; + +#ifdef VIMAGE +# +# Propagate system tunable values to all vnets. +# +METHOD void propagate_vnets { + linker_file_t file; +}; +#endif From nobody Mon Jan 27 18: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 4YhcYz3QhTz5m4vN; Mon, 27 Jan 2025 18: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 4YhcYz0n49z3wWb; Mon, 27 Jan 2025 18: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=1738002967; 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=wjqO9O15OtYxF0hW7rv8QF2+oHqiosvkDBOaTt5pAAo=; b=BWobNcJUPNQP6OhJOCPdfNnsJ+zt4v65y6em0fBg7MCrDcQxVlSNlrtO2SLXwgvqFDugOu l154MqBblKKlYH6ADYEoJQjXXugytv0fz5rhLQq2R6M8MOHNEO2ZUJNJYs3d1b9+Egfs5o eBWbjyIV6bMinaPeQ+22BsXs7huYNEvtMnq8yMUnmNHQDPhbt18xpeDjmeHwV8RAp1KgIT rnjqP3pIxdlRqHTgdxpmPyzPixjjDP/bXAHlJFzl7NQ5Isw0Vrf6jP0AqsjhPU2LK+RbdD 6+kJKkYdSSkfW2T0YlPZyoWSrUmbt1kEXSA5LnFoBTTqrLE1F+XrUgek2n5lDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002967; 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=wjqO9O15OtYxF0hW7rv8QF2+oHqiosvkDBOaTt5pAAo=; b=PFuU1UeU/47rQoITuOdkWuqpb0fvY2fKbBofZbR/06f7I5Uk3L0hkYmrWz1rApqx6P8utM Ox0x0wzBY1TaSa4OXcoZDgbYUZsDl5xJUxFnZ4l3Gp2XjcGbYBzB/SvYKodpGNZ+RDt6RM /8aJWWcYq+Ps7GWfVSlj5skIrliLmFw5xJ7PPtZ4h4ZIm3YxPiU8EVCWJP2KTVAwIRjb/0 u1WJ7xREmZ70Yk66shlGqXvgsV/paATHqPu+IfWj8XOX6R0yi7fOgmsQGg3uXzI36tctyl alHgx18TDVpBmBxvLERfwIkEId/mvgeWhfriSrLv4+urdaHkdlINmn6E1KofBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002967; a=rsa-sha256; cv=none; b=q731kwodKw+L/AGA5AKF/Ux2EIJTxX8wOx4Q9Sg8/mygySqqhNMO+bozXWIMTyY/4tZgtb aexGHkH6vXZvXH/fCV2lVzWrBTMsFLPWyg/jrvXqUBDBESGjtWW1+COZBScyqvrsVTjeX8 ceABtBDe5Cbi4EA0QMmHvvvCN6eSLRiiUJ84qIA17vvuXwLJG8wFnS+68fYX3lafdPFnSz liM1+FIadWg2wRSZovAehwx0cd8UJAWr8i7wFoTdAXJH+PjOqreA1Tnw0/xA8FDC9e0Ctt xyJSkKUIUdJKBkuC0ydWD/86zdJPCpbfv1TAqnSDLx4QBAw02Naqy/1uVpyhFg== 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 4YhcYz0BXXzgms; Mon, 27 Jan 2025 18:36: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 50RIa6GM029736; Mon, 27 Jan 2025 18: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 50RIa6Eb029733; Mon, 27 Jan 2025 18:36:06 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:36:06 GMT Message-Id: <202501271836.50RIa6Eb029733@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: 353cf44d828c - stable/13 - carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH 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: 353cf44d828c0b43ad34dab7ab4572186087a331 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=353cf44d828c0b43ad34dab7ab4572186087a331 commit 353cf44d828c0b43ad34dab7ab4572186087a331 Author: Zhenlei Huang AuthorDate: 2023-09-09 08:10:32 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-27 18:32:59 +0000 carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH With recent change 110113bc086f, a vnet tunable can be initialized when there is a corresponding kernel environment variable unless it is marked with the flag CTLFLAG_NOFETCH. The initialization may happen during early boot(linker preload), at that time vnet0 has not been created. The hander carp_allow_sysctl() for the tunable net.inet.carp.allow requires vnet, thus invoking it during early boot will cause kernel panic. The tunnable is initialized by vnet sysinit routine ipcarp_sysinit() so let's just mark it with flag CTLFLAG_NOFETCH. No functional change intended. Fixes: 110113bc086f sysctl(9): Enable vnet sysctl variables to be loader tunable MFC after: 2 week Differential Revision: https://reviews.freebsd.org/D41525 (cherry picked from commit 242fa308f3c3def32b2e61e0b78c11b3697e4492) (cherry picked from commit d67b1748ea34ad6f66072694fd8b623ab0ea72b1) --- sys/netinet/ip_carp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index cc7add7c3d64..9b651ac2eba1 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -219,7 +219,7 @@ static int carp_demote_adj_sysctl(SYSCTL_HANDLER_ARGS); SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "CARP"); SYSCTL_PROC(_net_inet_carp, OID_AUTO, allow, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, &VNET_NAME(carp_allow), 0, carp_allow_sysctl, "I", "Accept incoming CARP packets"); SYSCTL_PROC(_net_inet_carp, OID_AUTO, dscp, From nobody Mon Jan 27 18:36:08 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 4YhcZ04dnbz5m4d6; Mon, 27 Jan 2025 18:36:08 +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 4YhcZ02HgHz3wTR; Mon, 27 Jan 2025 18:36:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002968; 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=acYe1JCrOgLciIYL/TCAuLYszykRAJfk8Asi795Dy/c=; b=tZyxAj9Kdrzm+F6sE4jPBxhTbESQU56PNpfd7nyZf5/58nPaPCET+8zAiwQywJufFt01+O FYwOvLARAS8+AGep3sLnvmvGxOHGowHKPamy7OrovJVdIJ+M8gQwlAeR2Jtb9ssSf36o27 PFgCxmEm2qc2CmUqNEWAz40FYahEVpGIIRQ5d54bdc38+4OM0fEGXX/G3uLtBhNonAo/jq MZwh1LEAbgjOx0G9KjaL358YyXD6IwPCkeou8AEX4Nwy/JQp84omgHgdsaetFt3YksVgo3 vdsonL5SQjPPnP3c1pnkqDWU5G17DxwisXNPW0eVjLArIiM4yB5hTZ3YtdnUcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738002968; 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=acYe1JCrOgLciIYL/TCAuLYszykRAJfk8Asi795Dy/c=; b=DxQg3DFmwa5ZsWu6AYZ0wNafV9HD226+NxPJdJZmPSaOvdjaNmXu18QcKK2a33+TQn5y4w ohS2Rz2P/T1Tdrirod+kMicjO7VNkMU/AyeI2aukSuwlt3JlU1DPdrbikRIh2Trt22uomq 2LCqbVFlfg0byXtkI4Ru6SepmEJ5DoLioGmzIbTmKIXK+OrWbjietI+9VHOA1g1NiWQgG/ cIR0CHIP2Lz58rsPg8tTnPB6Auqk4XKdvmGP9PcDelsd/NppIWZ4CEj23eCrzUfnRQZUgn QGlGlurkLq06yozJ7is4osH7K6bjQ2WjNyYQGvigCAVhPV0Q0rQvWCxL9jJnuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738002968; a=rsa-sha256; cv=none; b=hsZZbvMS9YbRuUpCsN7t32zcVkGrt/PVEaEq5Ht7GZ9e7IoKlsYMEsI0+La+tVkRN/KnkR o00DV5w1/TcCSX5Xl3cvltc+Jy8JQbtt5GUq4I6CHanhFe00CuTappHyJ0x+jVMmJWJ+te sH0cSjfFzB+wND0shj22c1l6oqTql/XvXTkempKRTW5nQ7z+hdn0OKlDX3C5/9k+acVKCc 9oDUq+KRSkBtxPlmutS8doskadooefCTpA++PFgg5KRFwrf4I+ps5rBiMvpYR31eE0j0/C UjZDFM7uogNU7xgP+BP7nHMkbUS00O5gK9rUkr29csxAnZfXRQ+tlfYZr02U2A== 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 4YhcZ00sz5zgmt; Mon, 27 Jan 2025 18:36:08 +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 50RIa8Zh029769; Mon, 27 Jan 2025 18:36:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RIa8w2029766; Mon, 27 Jan 2025 18:36:08 GMT (envelope-from git) Date: Mon, 27 Jan 2025 18:36:08 GMT Message-Id: <202501271836.50RIa8w2029766@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: cb162f659578 - stable/13 - pf: Convert PF_DEFAULT_TO_DROP into a vnet loader tunable 'net.pf.default_to_drop' 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: cb162f6595789590c79a1a5da144cb6595e71b3d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=cb162f6595789590c79a1a5da144cb6595e71b3d commit cb162f6595789590c79a1a5da144cb6595e71b3d Author: Zhenlei Huang AuthorDate: 2023-09-22 10:05:02 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-27 18:32:59 +0000 pf: Convert PF_DEFAULT_TO_DROP into a vnet loader tunable 'net.pf.default_to_drop' 7f7ef494f11d introduced a compile time option PF_DEFAULT_TO_DROP to make the pf(4) default rule to drop. While this change exposes a vnet loader tunable 'net.pf.default_to_drop' so that users can change the default rule without re-compiling the pf(4) module. This change is similiar to that for IPFW [1]. 1. 5f17ebf94db5 Convert IPFW_DEFAULT_TO_ACCEPT into a loader tunable 'net.inet.ip.fw.default_to_accept' Reviewed by: #network, kp MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D39866 (cherry picked from commit c531c1d1462c45f7ce5de4f9913226801f3073bd) (cherry picked from commit 3965be101c434437ce8819250e9e6b3e5c3d702e) --- share/man/man4/pf.4 | 4 ++++ sys/netpfil/pf/pf_ioctl.c | 16 +++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index b757376e0183..ccd9e2db0baf 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -87,6 +87,10 @@ Default value is 131072. Size of hash table that store source nodes. Should be power of 2. Default value is 32768. +.It Va net.pf.default_to_drop +This value overrides +.Cd "options PF_DEFAULT_TO_DROP" +from kernel configuration file. .El .Pp Read only diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 2ddb84642b7d..6fe84b1be489 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -188,6 +188,16 @@ SYSCTL_BOOL(_net_pf, OID_AUTO, filter_local, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(pf_filter_local), false, "Enable filtering for packets delivered to local network stack"); +#ifdef PF_DEFAULT_TO_DROP +VNET_DEFINE_STATIC(bool, default_to_drop) = true; +#else +VNET_DEFINE_STATIC(bool, default_to_drop); +#endif +#define V_default_to_drop VNET(default_to_drop) +SYSCTL_BOOL(_net_pf, OID_AUTO, default_to_drop, CTLFLAG_RDTUN | CTLFLAG_VNET, + &VNET_NAME(default_to_drop), false, + "Make the default rule drop all packets."); + static void pf_init_tagset(struct pf_tagset *, unsigned int *, unsigned int); static void pf_cleanup_tagset(struct pf_tagset *); @@ -319,11 +329,7 @@ pfattach_vnet(void) /* default rule should never be garbage collected */ V_pf_default_rule.entries.tqe_prev = &V_pf_default_rule.entries.tqe_next; -#ifdef PF_DEFAULT_TO_DROP - V_pf_default_rule.action = PF_DROP; -#else - V_pf_default_rule.action = PF_PASS; -#endif + V_pf_default_rule.action = V_default_to_drop ? PF_DROP : PF_PASS; V_pf_default_rule.nr = -1; V_pf_default_rule.rtableid = -1; From nobody Mon Jan 27 21:12:34 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 4Yhh2V4rC4z5mHr1; Mon, 27 Jan 2025 21:12:34 +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 4Yhh2V43FFz3Tv8; Mon, 27 Jan 2025 21:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738012354; 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=0C27zVl8yTLa64j5570jbcT9KPFYW/oLR10dBoNPxsY=; b=Lvzty/RVEazwL9YIIgjgfZvk4gqMEKGtVVlt6CUT6upOC0CRgttQwHIncK74lneSliC5XP sBHmVJwJ4aLAS1EBJJSp9fyI6XbHAktt2l4olcfVG8QcMqBllwGchNFrP4d9yKunh6mxkc YA8A9gYIc7ZdviabtV1Cvf8IWDId4jnaTftupzmSExwGRgoNjh+qVo9P8wcHXoIT5V8QGk buOlPcNLXK0GKSecapURVJGa20SgHp6Md8k4p/XiG9dzdk2iuxz4IBERjy97oLeGzE2PC+ d88UtEFN9nuyr2XDNE2RchED70iWLHZuprVJEgs6r/qeoa8HDt1/HwdyQtZRNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738012354; 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=0C27zVl8yTLa64j5570jbcT9KPFYW/oLR10dBoNPxsY=; b=H4P6h89mBk7aStQSUnrf8VjceFrwoq348Jn0qW9og025oTISdtFkkzCAald6gOrj0uPZkB hXo0hCTvdkpAbqbvkU3TGdBMDiD2fDosiNa/0cAMwF6kLlqrZoERWaCIq8Up+KsN0CZ+jY LBri+xtT4lZA7o1CBbfh4U9x7dnQbVHrMkW5jzjt10ug1d80a7M4KU8dA8EKzbjho+Md5B yicJwLmrFnyOxd8kzjhyZ+79mZpifgJ3aqS6mb4mTrUDdVMxKOqM86yqG3VGXrMFaIPjn0 LdtZ/pSqgU8VvYmy/miEo6K1G5ZFtUkbKGgbW8KYxNbhjHpxw1SMV5RaXhnScg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738012354; a=rsa-sha256; cv=none; b=Zc5j2sf6ghStl+p0yBTVBxjAcRz3I6k5T7bvCaZQ+S1twISVY9IRG2h4JnZ9MNykmE9Vjd 2G8F3x1uYwFaI+yWNnbptUc7P2GGS0pxv1Cw8n1kMNZhEqPLCYUZ2RIiq8jPHyF9tdRaJf jM4pgEsMusjgThTEy0DeIP9ZSxyQSiKi1EU9lpTBlADSY6ybGU7e6Z4fzLIbhIaFLxdqcd FcCfAqXOrc/Tf2AcJ+ZYLn1/IrFqyrt7kuXQxtwROo1M32OlbVBPFDPxTsXlb3M7atPbPV WDaTI+O4iNqhALHxdWWwqdiKPOOoXhAyjCLtRThHr0aMFY+iKaLX5KjljenvUA== 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 4Yhh2V3dNXzm7W; Mon, 27 Jan 2025 21:12:34 +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 50RLCYVa030033; Mon, 27 Jan 2025 21:12:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50RLCYMY030030; Mon, 27 Jan 2025 21:12:34 GMT (envelope-from git) Date: Mon, 27 Jan 2025 21:12:34 GMT Message-Id: <202501272112.50RLCYMY030030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 118a280569d3 - stable/13 - atomics: Constify loads: mips 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 118a280569d3baaee11d1766bf87fbb93cf0a6d0 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=118a280569d3baaee11d1766bf87fbb93cf0a6d0 commit 118a280569d3baaee11d1766bf87fbb93cf0a6d0 Author: Olivier Certner AuthorDate: 2025-01-27 20:49:48 +0000 Commit: Olivier Certner CommitDate: 2025-01-27 21:12:16 +0000 atomics: Constify loads: mips I had forgotten that mips had been removed starting from stable/14, and didn't compile stable/13 on this architecture... Consequently, this is a direct commit to stable/13, irrelevant to other branches. It fixes the compile error observed there only, caused by the MFC of additional constification commits, including SMR and the sanitizers. Reported by: Jenkins --- sys/mips/include/atomic.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/mips/include/atomic.h b/sys/mips/include/atomic.h index f14fa3de65f2..900924a8809e 100644 --- a/sys/mips/include/atomic.h +++ b/sys/mips/include/atomic.h @@ -329,22 +329,22 @@ ATOMIC_ACQ_REL(subtract, 64) /* * We assume that a = b will do atomic loads and stores. */ -#define ATOMIC_STORE_LOAD(WIDTH) \ -static __inline uint##WIDTH##_t \ -atomic_load_acq_##WIDTH(__volatile uint##WIDTH##_t *p) \ -{ \ - uint##WIDTH##_t v; \ - \ - v = *p; \ - mips_sync(); \ - return (v); \ -} \ - \ -static __inline void \ -atomic_store_rel_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v)\ -{ \ - mips_sync(); \ - *p = v; \ +#define ATOMIC_STORE_LOAD(WIDTH) \ +static __inline uint##WIDTH##_t \ +atomic_load_acq_##WIDTH(const __volatile uint##WIDTH##_t *p) \ +{ \ + uint##WIDTH##_t v; \ + \ + v = *p; \ + mips_sync(); \ + return (v); \ +} \ + \ +static __inline void \ +atomic_store_rel_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v) \ +{ \ + mips_sync(); \ + *p = v; \ } ATOMIC_STORE_LOAD(32) @@ -745,7 +745,7 @@ atomic_thread_fence_seq_cst(void) atomic_fcmpset_rel_32((volatile u_int *)(p), (u_int *)(cmpval), \ (u_int)(newval)) #define atomic_load_acq_long(p) \ - (u_long)atomic_load_acq_32((volatile u_int *)(p)) + (u_long)atomic_load_acq_32((const volatile u_int *)(p)) #define atomic_store_rel_long(p, v) \ atomic_store_rel_32((volatile u_int *)(p), (u_int)(v)) #define atomic_fetchadd_long(p, v) \ From nobody Tue Jan 28 14:05:05 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 4Yj6Vn25NGz5lVBb; Tue, 28 Jan 2025 14:05:05 +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 4Yj6Vn1mLvz3Swf; Tue, 28 Jan 2025 14:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073105; 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=+px+bPWVe+COSTVTJjrwzwDrEewWKznUTBHS5mbW4oQ=; b=IWM4IoJ+FPTdJEXaw7b11Lu96R7PVFixBPjMjq173+FxdoQDnlKLcC8nMwTcp8g+vRqwW9 eToKQBzdRp6tlCW8KZgP9mk/uRE18yAaTu+qAnca0hSl2e/OtKaBl6lm+T4N+QwLeOt6dG QVnDgRO0avu7I+uUB8Snuh0wSRN2PKi8MofrkN4gkgnzgdn9vPJCG9HBVSpF64xTHD/8x+ jGtaMtoJMj1lek5DJtgM4Stl69nhGuUhjYWQUHYR4xyFhw0154uVCBJVERUIq0FXjdK2Ff vOKrE4ZjHy8vfykdHpg7n+5Q9JD4TTb2dvShTQdBpZrs7wYlIIY4EFbwoQj5Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073105; 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=+px+bPWVe+COSTVTJjrwzwDrEewWKznUTBHS5mbW4oQ=; b=cCo2mTj4iKbdCf7U68DbZFCtH0fBi3+yLWsmR9cncNq+nQK9AK1CoE4msXrzJc4XvrQ13K wkqrjtarAoHms43hIvziomvDUMzGR/pS09s8KPBUYRloivuWF5TmD79i2wsSL9qzjC3AtX HocrhwBLkWd6roKGgulOlEba/j+0xx1Y9VSftURyjCvh9H6YONhxxLunO4UEooT3DhQBKd SBlu8oTBQEVHlOpwYC3TVKRFDaA6TP2xjf57ZHBwV4X75repj9R/daGgX+IH/d2S2QT2gP O0N3LcdJNsZW6Y9GgHtWJiiiW1M7RT6zg/g8pCYWYA4g3CHaD4ZzPDi+n8KtIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738073105; a=rsa-sha256; cv=none; b=O3wox/K2J+bBYaVB7vaMlZmUE2NxFtz49ltugF5pJrPv90gt5u3hSb+8Ca696tEJ9RP6nL ED04ROpkcg0Y8ugNGAznyvEXKjREH30LqL4A+PY7hqQvtkaOB4ymf3icIYBCzGKug6OCEQ 7Scskoz4srhUKg9ymxVpASBASNHUR4YDrBZ3zZiiL0XbChlyuuedzshZ2yAqBJBT6gt6KK kCPMDU5V5F53ZeO+kKiouYpZarasXsg/5cUI6OPDy/PcXp/0+qICU5WTskuDseo3Gi5p0u VUZHyh8BtNt+IKEVuzk6+ncVLLiMDY0TSyOiZqfsws+aBphm7UxQCLD4S619hw== 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 4Yj6Vn0zssz35y; Tue, 28 Jan 2025 14:05:05 +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 50SE55he020748; Tue, 28 Jan 2025 14:05:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SE55s0020745; Tue, 28 Jan 2025 14:05:05 GMT (envelope-from git) Date: Tue, 28 Jan 2025 14:05:05 GMT Message-Id: <202501281405.50SE55s0020745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 5edda2488cc5 - stable/14 - sound: Unit test the pcm sample read and write macros 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5edda2488cc5b9603920908f9fed734b7a1bfb79 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5edda2488cc5b9603920908f9fed734b7a1bfb79 commit 5edda2488cc5b9603920908f9fed734b7a1bfb79 Author: Florian Walpen AuthorDate: 2025-01-21 11:58:05 +0000 Commit: Christos Margiolis CommitDate: 2025-01-28 14:04:52 +0000 sound: Unit test the pcm sample read and write macros Main goal is to have a unit test, with sample test data that is verified against the current macro implementation of pcm sample read and write functions. With a test in place, we can proceed on a planned refactoring of the sample read and write code, and confidently check the new code for regressions. Implementation of the unit test itself has to avoid any cast or conversion affected by endianness, to make the tests compatible with all machine architectures. MFC after: 1 week Reviewed by: christos, markj Differential Revision: https://reviews.freebsd.org/D48330 (cherry picked from commit 27ef5d48c729defb83a8822143dc71ab17f9d68b) --- sys/dev/sound/pcm/sound.h | 128 +++++----- tests/sys/sound/Makefile | 4 + tests/sys/sound/pcm_read_write.c | 509 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 577 insertions(+), 64 deletions(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 59d9930712b3..f0dc454ac131 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -147,70 +147,6 @@ struct snd_mixer; #define RANGE(var, low, high) (var) = \ (((var)<(low))? (low) : ((var)>(high))? (high) : (var)) -/* make figuring out what a format is easier. got AFMT_STEREO already */ -#define AFMT_32BIT (AFMT_S32_LE | AFMT_S32_BE | AFMT_U32_LE | AFMT_U32_BE) -#define AFMT_24BIT (AFMT_S24_LE | AFMT_S24_BE | AFMT_U24_LE | AFMT_U24_BE) -#define AFMT_16BIT (AFMT_S16_LE | AFMT_S16_BE | AFMT_U16_LE | AFMT_U16_BE) -#define AFMT_G711 (AFMT_MU_LAW | AFMT_A_LAW) -#define AFMT_8BIT (AFMT_G711 | AFMT_U8 | AFMT_S8) -#define AFMT_SIGNED (AFMT_S32_LE | AFMT_S32_BE | AFMT_S24_LE | AFMT_S24_BE | \ - AFMT_S16_LE | AFMT_S16_BE | AFMT_S8) -#define AFMT_BIGENDIAN (AFMT_S32_BE | AFMT_U32_BE | AFMT_S24_BE | AFMT_U24_BE | \ - AFMT_S16_BE | AFMT_U16_BE) - -#define AFMT_CONVERTIBLE (AFMT_8BIT | AFMT_16BIT | AFMT_24BIT | \ - AFMT_32BIT) - -/* Supported vchan mixing formats */ -#define AFMT_VCHAN (AFMT_CONVERTIBLE & ~AFMT_G711) - -#define AFMT_PASSTHROUGH AFMT_AC3 -#define AFMT_PASSTHROUGH_RATE 48000 -#define AFMT_PASSTHROUGH_CHANNEL 2 -#define AFMT_PASSTHROUGH_EXTCHANNEL 0 - -/* - * We're simply using unused, contiguous bits from various AFMT_ definitions. - * ~(0xb00ff7ff) - */ -#define AFMT_ENCODING_MASK 0xf00fffff -#define AFMT_CHANNEL_MASK 0x07f00000 -#define AFMT_CHANNEL_SHIFT 20 -#define AFMT_CHANNEL_MAX 0x7f -#define AFMT_EXTCHANNEL_MASK 0x08000000 -#define AFMT_EXTCHANNEL_SHIFT 27 -#define AFMT_EXTCHANNEL_MAX 1 - -#define AFMT_ENCODING(v) ((v) & AFMT_ENCODING_MASK) - -#define AFMT_EXTCHANNEL(v) (((v) & AFMT_EXTCHANNEL_MASK) >> \ - AFMT_EXTCHANNEL_SHIFT) - -#define AFMT_CHANNEL(v) (((v) & AFMT_CHANNEL_MASK) >> \ - AFMT_CHANNEL_SHIFT) - -#define AFMT_BIT(v) (((v) & AFMT_32BIT) ? 32 : \ - (((v) & AFMT_24BIT) ? 24 : \ - ((((v) & AFMT_16BIT) || \ - ((v) & AFMT_PASSTHROUGH)) ? 16 : 8))) - -#define AFMT_BPS(v) (AFMT_BIT(v) >> 3) -#define AFMT_ALIGN(v) (AFMT_BPS(v) * AFMT_CHANNEL(v)) - -#define SND_FORMAT(f, c, e) (AFMT_ENCODING(f) | \ - (((c) << AFMT_CHANNEL_SHIFT) & \ - AFMT_CHANNEL_MASK) | \ - (((e) << AFMT_EXTCHANNEL_SHIFT) & \ - AFMT_EXTCHANNEL_MASK)) - -#define AFMT_U8_NE AFMT_U8 -#define AFMT_S8_NE AFMT_S8 - -#define AFMT_SIGNED_NE (AFMT_S8_NE | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE) - -#define AFMT_NE (AFMT_SIGNED_NE | AFMT_U8_NE | AFMT_U16_NE | \ - AFMT_U24_NE | AFMT_U32_NE) - enum { SND_DEV_CTL = 0, /* Control port /dev/mixer */ SND_DEV_SEQ, /* Sequencer /dev/sequencer */ @@ -508,4 +444,68 @@ int sound_oss_card_info(oss_card_info *); #endif /* _KERNEL */ +/* make figuring out what a format is easier. got AFMT_STEREO already */ +#define AFMT_32BIT (AFMT_S32_LE | AFMT_S32_BE | AFMT_U32_LE | AFMT_U32_BE) +#define AFMT_24BIT (AFMT_S24_LE | AFMT_S24_BE | AFMT_U24_LE | AFMT_U24_BE) +#define AFMT_16BIT (AFMT_S16_LE | AFMT_S16_BE | AFMT_U16_LE | AFMT_U16_BE) +#define AFMT_G711 (AFMT_MU_LAW | AFMT_A_LAW) +#define AFMT_8BIT (AFMT_G711 | AFMT_U8 | AFMT_S8) +#define AFMT_SIGNED (AFMT_S32_LE | AFMT_S32_BE | AFMT_S24_LE | AFMT_S24_BE | \ + AFMT_S16_LE | AFMT_S16_BE | AFMT_S8) +#define AFMT_BIGENDIAN (AFMT_S32_BE | AFMT_U32_BE | AFMT_S24_BE | AFMT_U24_BE | \ + AFMT_S16_BE | AFMT_U16_BE) + +#define AFMT_CONVERTIBLE (AFMT_8BIT | AFMT_16BIT | AFMT_24BIT | \ + AFMT_32BIT) + +/* Supported vchan mixing formats */ +#define AFMT_VCHAN (AFMT_CONVERTIBLE & ~AFMT_G711) + +#define AFMT_PASSTHROUGH AFMT_AC3 +#define AFMT_PASSTHROUGH_RATE 48000 +#define AFMT_PASSTHROUGH_CHANNEL 2 +#define AFMT_PASSTHROUGH_EXTCHANNEL 0 + +/* + * We're simply using unused, contiguous bits from various AFMT_ definitions. + * ~(0xb00ff7ff) + */ +#define AFMT_ENCODING_MASK 0xf00fffff +#define AFMT_CHANNEL_MASK 0x07f00000 +#define AFMT_CHANNEL_SHIFT 20 +#define AFMT_CHANNEL_MAX 0x7f +#define AFMT_EXTCHANNEL_MASK 0x08000000 +#define AFMT_EXTCHANNEL_SHIFT 27 +#define AFMT_EXTCHANNEL_MAX 1 + +#define AFMT_ENCODING(v) ((v) & AFMT_ENCODING_MASK) + +#define AFMT_EXTCHANNEL(v) (((v) & AFMT_EXTCHANNEL_MASK) >> \ + AFMT_EXTCHANNEL_SHIFT) + +#define AFMT_CHANNEL(v) (((v) & AFMT_CHANNEL_MASK) >> \ + AFMT_CHANNEL_SHIFT) + +#define AFMT_BIT(v) (((v) & AFMT_32BIT) ? 32 : \ + (((v) & AFMT_24BIT) ? 24 : \ + ((((v) & AFMT_16BIT) || \ + ((v) & AFMT_PASSTHROUGH)) ? 16 : 8))) + +#define AFMT_BPS(v) (AFMT_BIT(v) >> 3) +#define AFMT_ALIGN(v) (AFMT_BPS(v) * AFMT_CHANNEL(v)) + +#define SND_FORMAT(f, c, e) (AFMT_ENCODING(f) | \ + (((c) << AFMT_CHANNEL_SHIFT) & \ + AFMT_CHANNEL_MASK) | \ + (((e) << AFMT_EXTCHANNEL_SHIFT) & \ + AFMT_EXTCHANNEL_MASK)) + +#define AFMT_U8_NE AFMT_U8 +#define AFMT_S8_NE AFMT_S8 + +#define AFMT_SIGNED_NE (AFMT_S8_NE | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE) + +#define AFMT_NE (AFMT_SIGNED_NE | AFMT_U8_NE | AFMT_U16_NE | \ + AFMT_U24_NE | AFMT_U32_NE) + #endif /* _OS_H_ */ diff --git a/tests/sys/sound/Makefile b/tests/sys/sound/Makefile index fb731fb8ab61..74a0765a0540 100644 --- a/tests/sys/sound/Makefile +++ b/tests/sys/sound/Makefile @@ -2,8 +2,12 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/sound +ATF_TESTS_C+= pcm_read_write ATF_TESTS_C+= sndstat +CFLAGS+= -I${SRCTOP}/sys LDFLAGS+= -lnv +CFLAGS.pcm_read_write.c+= -Wno-cast-align + .include diff --git a/tests/sys/sound/pcm_read_write.c b/tests/sys/sound/pcm_read_write.c new file mode 100644 index 000000000000..6bdc578615b5 --- /dev/null +++ b/tests/sys/sound/pcm_read_write.c @@ -0,0 +1,509 @@ +/*- + * Copyright (c) 2025 Florian Walpen + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * These tests exercise conversion functions of the sound module, used to read + * pcm samples from a buffer, and write pcm samples to a buffer. The test cases + * are non-exhaustive, but should detect systematic errors in conversion of the + * various sample formats supported. In particular, the test cases establish + * correctness independent of the machine's endianness, making them suitable to + * check for architecture-specific problems. + */ + +#include +#include + +#include +#include +#include + +#include +#include +#include + +/* Generic test data, with buffer content matching the sample values. */ +struct afmt_test_data { + const char *label; + uint8_t buffer[4]; + size_t size; + int format; + intpcm_t value; + _Static_assert((sizeof(intpcm_t) == 4), + "Test data assumes 32bit, adjust negative values to new size."); +} static const afmt_tests[] = { + /* 8 bit sample formats. */ + {"s8_1", {0x01, 0x00, 0x00, 0x00}, 1, AFMT_S8, 0x00000001}, + {"s8_2", {0x81, 0x00, 0x00, 0x00}, 1, AFMT_S8, 0xffffff81}, + {"u8_1", {0x01, 0x00, 0x00, 0x00}, 1, AFMT_U8, 0xffffff81}, + {"u8_2", {0x81, 0x00, 0x00, 0x00}, 1, AFMT_U8, 0x00000001}, + + /* 16 bit sample formats. */ + {"s16le_1", {0x01, 0x02, 0x00, 0x00}, 2, AFMT_S16_LE, 0x00000201}, + {"s16le_2", {0x81, 0x82, 0x00, 0x00}, 2, AFMT_S16_LE, 0xffff8281}, + {"s16be_1", {0x01, 0x02, 0x00, 0x00}, 2, AFMT_S16_BE, 0x00000102}, + {"s16be_2", {0x81, 0x82, 0x00, 0x00}, 2, AFMT_S16_BE, 0xffff8182}, + {"u16le_1", {0x01, 0x02, 0x00, 0x00}, 2, AFMT_U16_LE, 0xffff8201}, + {"u16le_2", {0x81, 0x82, 0x00, 0x00}, 2, AFMT_U16_LE, 0x00000281}, + {"u16be_1", {0x01, 0x02, 0x00, 0x00}, 2, AFMT_U16_BE, 0xffff8102}, + {"u16be_2", {0x81, 0x82, 0x00, 0x00}, 2, AFMT_U16_BE, 0x00000182}, + + /* 24 bit sample formats. */ + {"s24le_1", {0x01, 0x02, 0x03, 0x00}, 3, AFMT_S24_LE, 0x00030201}, + {"s24le_2", {0x81, 0x82, 0x83, 0x00}, 3, AFMT_S24_LE, 0xff838281}, + {"s24be_1", {0x01, 0x02, 0x03, 0x00}, 3, AFMT_S24_BE, 0x00010203}, + {"s24be_2", {0x81, 0x82, 0x83, 0x00}, 3, AFMT_S24_BE, 0xff818283}, + {"u24le_1", {0x01, 0x02, 0x03, 0x00}, 3, AFMT_U24_LE, 0xff830201}, + {"u24le_2", {0x81, 0x82, 0x83, 0x00}, 3, AFMT_U24_LE, 0x00038281}, + {"u24be_1", {0x01, 0x02, 0x03, 0x00}, 3, AFMT_U24_BE, 0xff810203}, + {"u24be_2", {0x81, 0x82, 0x83, 0x00}, 3, AFMT_U24_BE, 0x00018283}, + + /* 32 bit sample formats. */ + {"s32le_1", {0x01, 0x02, 0x03, 0x04}, 4, AFMT_S32_LE, 0x04030201}, + {"s32le_2", {0x81, 0x82, 0x83, 0x84}, 4, AFMT_S32_LE, 0x84838281}, + {"s32be_1", {0x01, 0x02, 0x03, 0x04}, 4, AFMT_S32_BE, 0x01020304}, + {"s32be_2", {0x81, 0x82, 0x83, 0x84}, 4, AFMT_S32_BE, 0x81828384}, + {"u32le_1", {0x01, 0x02, 0x03, 0x04}, 4, AFMT_U32_LE, 0x84030201}, + {"u32le_2", {0x81, 0x82, 0x83, 0x84}, 4, AFMT_U32_LE, 0x04838281}, + {"u32be_1", {0x01, 0x02, 0x03, 0x04}, 4, AFMT_U32_BE, 0x81020304}, + {"u32be_2", {0x81, 0x82, 0x83, 0x84}, 4, AFMT_U32_BE, 0x01828384}, + + /* u-law and A-law sample formats. */ + {"mulaw_1", {0x01, 0x00, 0x00, 0x00}, 1, AFMT_MU_LAW, 0xffffff87}, + {"mulaw_2", {0x81, 0x00, 0x00, 0x00}, 1, AFMT_MU_LAW, 0x00000079}, + {"alaw_1", {0x2a, 0x00, 0x00, 0x00}, 1, AFMT_A_LAW, 0xffffff83}, + {"alaw_2", {0xab, 0x00, 0x00, 0x00}, 1, AFMT_A_LAW, 0x00000079} +}; + +/* Normalize sample values in strictly correct (but slow) c. */ +static intpcm_t +local_normalize(intpcm_t value, int val_bits, int norm_bits) +{ + /* Avoid undefined or implementation defined behavior. */ + if (val_bits < norm_bits) + /* Multiply instead of left shift (value may be negative). */ + return (value * (1 << (norm_bits - val_bits))); + else if (val_bits > norm_bits) + /* Divide instead of right shift (value may be negative). */ + return (value / (1 << (val_bits - norm_bits))); + return value; +} + +/* Restrict magnitude of sample value to 24bit for 32bit calculations. */ +static intpcm_t +local_calc_limit(intpcm_t value, int val_bits) +{ + /* Avoid implementation defined behavior. */ + if (sizeof(intpcm32_t) == 32 && val_bits == 32) + /* Divide instead of right shift (value may be negative). */ + return (value / (1 << 8)); + return value; +} + +/* Lookup tables to read u-law and A-law sample formats. */ +static const uint8_t ulaw_to_u8[G711_TABLE_SIZE] = ULAW_TO_U8; +static const uint8_t alaw_to_u8[G711_TABLE_SIZE] = ALAW_TO_U8; + +/* Helper function to read one sample value from a buffer. */ +static intpcm_t +local_pcm_read(uint8_t *src, uint32_t format) +{ + intpcm_t value; + + switch (format) { + case AFMT_S8: + value = _PCM_READ_S8_NE(src); + break; + case AFMT_U8: + value = _PCM_READ_U8_NE(src); + break; + case AFMT_S16_LE: + value = _PCM_READ_S16_LE(src); + break; + case AFMT_S16_BE: + value = _PCM_READ_S16_BE(src); + break; + case AFMT_U16_LE: + value = _PCM_READ_U16_LE(src); + break; + case AFMT_U16_BE: + value = _PCM_READ_U16_BE(src); + break; + case AFMT_S24_LE: + value = _PCM_READ_S24_LE(src); + break; + case AFMT_S24_BE: + value = _PCM_READ_S24_BE(src); + break; + case AFMT_U24_LE: + value = _PCM_READ_U24_LE(src); + break; + case AFMT_U24_BE: + value = _PCM_READ_U24_BE(src); + break; + case AFMT_S32_LE: + value = _PCM_READ_S32_LE(src); + break; + case AFMT_S32_BE: + value = _PCM_READ_S32_BE(src); + break; + case AFMT_U32_LE: + value = _PCM_READ_U32_LE(src); + break; + case AFMT_U32_BE: + value = _PCM_READ_U32_BE(src); + break; + case AFMT_MU_LAW: + value = _G711_TO_INTPCM(ulaw_to_u8, *src); + break; + case AFMT_A_LAW: + value = _G711_TO_INTPCM(alaw_to_u8, *src); + break; + default: + value = 0; + } + + return (value); +} + +/* Helper function to read one sample value from a buffer for calculations. */ +static intpcm_t +local_pcm_read_calc(uint8_t *src, uint32_t format) +{ + intpcm_t value; + + switch (format) { + case AFMT_S8: + value = PCM_READ_S8_NE(src); + break; + case AFMT_U8: + value = PCM_READ_U8_NE(src); + break; + case AFMT_S16_LE: + value = PCM_READ_S16_LE(src); + break; + case AFMT_S16_BE: + value = PCM_READ_S16_BE(src); + break; + case AFMT_U16_LE: + value = PCM_READ_U16_LE(src); + break; + case AFMT_U16_BE: + value = PCM_READ_U16_BE(src); + break; + case AFMT_S24_LE: + value = PCM_READ_S24_LE(src); + break; + case AFMT_S24_BE: + value = PCM_READ_S24_BE(src); + break; + case AFMT_U24_LE: + value = PCM_READ_U24_LE(src); + break; + case AFMT_U24_BE: + value = PCM_READ_U24_BE(src); + break; + case AFMT_S32_LE: + value = PCM_READ_S32_LE(src); + break; + case AFMT_S32_BE: + value = PCM_READ_S32_BE(src); + break; + case AFMT_U32_LE: + value = PCM_READ_U32_LE(src); + break; + case AFMT_U32_BE: + value = PCM_READ_U32_BE(src); + break; + case AFMT_MU_LAW: + value = _G711_TO_INTPCM(ulaw_to_u8, *src); + break; + case AFMT_A_LAW: + value = _G711_TO_INTPCM(alaw_to_u8, *src); + break; + default: + value = 0; + } + + return (value); +} + +/* Helper function to read one normalized sample from a buffer. */ +static intpcm_t +local_pcm_read_norm(uint8_t *src, uint32_t format) +{ + intpcm_t value; + + value = local_pcm_read(src, format); + value <<= (32 - AFMT_BIT(format)); + return (value); +} + +/* Lookup tables to write u-law and A-law sample formats. */ +static const uint8_t u8_to_ulaw[G711_TABLE_SIZE] = U8_TO_ULAW; +static const uint8_t u8_to_alaw[G711_TABLE_SIZE] = U8_TO_ALAW; + +/* Helper function to write one sample value to a buffer. */ +static void +local_pcm_write(uint8_t *dst, intpcm_t value, uint32_t format) +{ + switch (format) { + case AFMT_S8: + _PCM_WRITE_S8_NE(dst, value); + break; + case AFMT_U8: + _PCM_WRITE_U8_NE(dst, value); + break; + case AFMT_S16_LE: + _PCM_WRITE_S16_LE(dst, value); + break; + case AFMT_S16_BE: + _PCM_WRITE_S16_BE(dst, value); + break; + case AFMT_U16_LE: + _PCM_WRITE_U16_LE(dst, value); + break; + case AFMT_U16_BE: + _PCM_WRITE_U16_BE(dst, value); + break; + case AFMT_S24_LE: + _PCM_WRITE_S24_LE(dst, value); + break; + case AFMT_S24_BE: + _PCM_WRITE_S24_BE(dst, value); + break; + case AFMT_U24_LE: + _PCM_WRITE_U24_LE(dst, value); + break; + case AFMT_U24_BE: + _PCM_WRITE_U24_BE(dst, value); + break; + case AFMT_S32_LE: + _PCM_WRITE_S32_LE(dst, value); + break; + case AFMT_S32_BE: + _PCM_WRITE_S32_BE(dst, value); + break; + case AFMT_U32_LE: + _PCM_WRITE_U32_LE(dst, value); + break; + case AFMT_U32_BE: + _PCM_WRITE_U32_BE(dst, value); + break; + case AFMT_MU_LAW: + *dst = _INTPCM_TO_G711(u8_to_ulaw, value); + break; + case AFMT_A_LAW: + *dst = _INTPCM_TO_G711(u8_to_alaw, value); + break; + default: + value = 0; + } +} + +/* Helper function to write one calculation sample value to a buffer. */ +static void +local_pcm_write_calc(uint8_t *dst, intpcm_t value, uint32_t format) +{ + switch (format) { + case AFMT_S8: + PCM_WRITE_S8_NE(dst, value); + break; + case AFMT_U8: + PCM_WRITE_U8_NE(dst, value); + break; + case AFMT_S16_LE: + PCM_WRITE_S16_LE(dst, value); + break; + case AFMT_S16_BE: + PCM_WRITE_S16_BE(dst, value); + break; + case AFMT_U16_LE: + PCM_WRITE_U16_LE(dst, value); + break; + case AFMT_U16_BE: + PCM_WRITE_U16_BE(dst, value); + break; + case AFMT_S24_LE: + PCM_WRITE_S24_LE(dst, value); + break; + case AFMT_S24_BE: + PCM_WRITE_S24_BE(dst, value); + break; + case AFMT_U24_LE: + PCM_WRITE_U24_LE(dst, value); + break; + case AFMT_U24_BE: + PCM_WRITE_U24_BE(dst, value); + break; + case AFMT_S32_LE: + PCM_WRITE_S32_LE(dst, value); + break; + case AFMT_S32_BE: + PCM_WRITE_S32_BE(dst, value); + break; + case AFMT_U32_LE: + PCM_WRITE_U32_LE(dst, value); + break; + case AFMT_U32_BE: + PCM_WRITE_U32_BE(dst, value); + break; + case AFMT_MU_LAW: + *dst = _INTPCM_TO_G711(u8_to_ulaw, value); + break; + case AFMT_A_LAW: + *dst = _INTPCM_TO_G711(u8_to_alaw, value); + break; + default: + value = 0; + } +} + +/* Helper function to write one normalized sample to a buffer. */ +static void +local_pcm_write_norm(uint8_t *dst, intpcm_t value, uint32_t format) +{ + local_pcm_write(dst, value >> (32 - AFMT_BIT(format)), format); +} + +ATF_TC(pcm_read); +ATF_TC_HEAD(pcm_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Read and verify different pcm sample formats."); +} +ATF_TC_BODY(pcm_read, tc) +{ + const struct afmt_test_data *test; + uint8_t src[4]; + intpcm_t expected, result; + size_t i; + + for (i = 0; i < nitems(afmt_tests); i++) { + test = &afmt_tests[i]; + + /* Copy byte representation, fill with distinctive pattern. */ + memset(src, 0x66, sizeof(src)); + memcpy(src, test->buffer, test->size); + + /* Read sample at format magnitude. */ + expected = test->value; + result = local_pcm_read(src, test->format); + ATF_CHECK_MSG(result == expected, + "pcm_read[\"%s\"].value: expected=0x%08x, result=0x%08x", + test->label, expected, result); + + /* Read sample at format magnitude, for calculations. */ + expected = local_calc_limit(test->value, test->size * 8); + result = local_pcm_read_calc(src, test->format); + ATF_CHECK_MSG(result == expected, + "pcm_read[\"%s\"].calc: expected=0x%08x, result=0x%08x", + test->label, expected, result); + + /* Read sample at full 32 bit magnitude. */ + expected = local_normalize(test->value, test->size * 8, 32); + result = local_pcm_read_norm(src, test->format); + ATF_CHECK_MSG(result == expected, + "pcm_read[\"%s\"].norm: expected=0x%08x, result=0x%08x", + test->label, expected, result); + } +} + +ATF_TC(pcm_write); +ATF_TC_HEAD(pcm_write, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Write and verify different pcm sample formats."); +} +ATF_TC_BODY(pcm_write, tc) +{ + const struct afmt_test_data *test; + uint8_t expected[4]; + uint8_t dst[4]; + intpcm_t value; + size_t i; + + for (i = 0; i < nitems(afmt_tests); i++) { + test = &afmt_tests[i]; + + /* Write sample of format specific magnitude. */ + memcpy(expected, test->buffer, sizeof(expected)); + memset(dst, 0x00, sizeof(dst)); + value = test->value; + local_pcm_write(dst, value, test->format); + ATF_CHECK_MSG(memcmp(dst, expected, sizeof(dst)) == 0, + "pcm_write[\"%s\"].value: " + "expected={0x%02x, 0x%02x, 0x%02x, 0x%02x}, " + "result={0x%02x, 0x%02x, 0x%02x, 0x%02x}, ", test->label, + expected[0], expected[1], expected[2], expected[3], + dst[0], dst[1], dst[2], dst[3]); + + /* Write sample of format specific, calculation magnitude. */ + memcpy(expected, test->buffer, sizeof(expected)); + memset(dst, 0x00, sizeof(dst)); + value = local_calc_limit(test->value, test->size * 8); + if (value != test->value) { + /* + * 32 bit sample was reduced to 24 bit resolution + * for calculation, least significant byte is lost. + */ + if (test->format & AFMT_BIGENDIAN) + expected[3] = 0x00; + else + expected[0] = 0x00; + } + local_pcm_write_calc(dst, value, test->format); + ATF_CHECK_MSG(memcmp(dst, expected, sizeof(dst)) == 0, + "pcm_write[\"%s\"].value: " + "expected={0x%02x, 0x%02x, 0x%02x, 0x%02x}, " + "result={0x%02x, 0x%02x, 0x%02x, 0x%02x}, ", test->label, + expected[0], expected[1], expected[2], expected[3], + dst[0], dst[1], dst[2], dst[3]); + + /* Write normalized sample of full 32 bit magnitude. */ + memcpy(expected, test->buffer, sizeof(expected)); + memset(dst, 0x00, sizeof(dst)); + value = local_normalize(test->value, test->size * 8, 32); + local_pcm_write_norm(dst, value, test->format); + ATF_CHECK_MSG(memcmp(dst, expected, sizeof(dst)) == 0, + "pcm_write[\"%s\"].norm: " + "expected={0x%02x, 0x%02x, 0x%02x, 0x%02x}, " + "result={0x%02x, 0x%02x, 0x%02x, 0x%02x}, ", test->label, + expected[0], expected[1], expected[2], expected[3], + dst[0], dst[1], dst[2], dst[3]); + } +} + +ATF_TC(pcm_format_bits); +ATF_TC_HEAD(pcm_format_bits, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify bit width of different pcm sample formats."); +} +ATF_TC_BODY(pcm_format_bits, tc) +{ + const struct afmt_test_data *test; + size_t bits; + size_t i; + + for (i = 0; i < nitems(afmt_tests); i++) { + test = &afmt_tests[i]; + + /* Check bit width determined for given sample format. */ + bits = AFMT_BIT(test->format); + ATF_CHECK_MSG(bits == test->size * 8, + "format_bits[%zu].size: expected=%zu, result=%zu", + i, test->size * 8, bits); + } +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, pcm_read); + ATF_TP_ADD_TC(tp, pcm_write); + ATF_TP_ADD_TC(tp, pcm_format_bits); + + return atf_no_error(); +} From nobody Tue Jan 28 14:05: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 4Yj6Vp3Hbgz5lVBj; Tue, 28 Jan 2025 14:05:06 +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 4Yj6Vp1q8xz3Swg; Tue, 28 Jan 2025 14:05:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073106; 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=6VYu/Xwzu6RTZKYvhDl/In48b5asbxR48LneOvNiszg=; b=f+rnBdEPTyXfVJXQvS7ZKBZThO/KRx2D6O4v1Kq26Rhcg/9L4qwi/WF1Rxnjw4ZRzv/JIG 5x9EJpEyeUnS0IwyzwLZJf0C9E70a41IgtBBYQYwtp4tj67g458KfhjNjmBPE61NUcrecL Bts6Ti3oQg72yrjyUJ0p1rGvu3REYv0XGww5ISN9WBwEJhX5msz+jFJY/Berqp+TaXt7m8 a9lPSRn83IIPYoEKeg+m9wf2faPie0rfRZDm0CEQQNJ5Asl4ZUx2/eK6eJUZhEaHeRURPl WUzDohwOV9rdtVLUeNc806gXRGXV6Z3SVWjQyCOlKTCbQ7+PUlmjvK+Mcb82fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073106; 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=6VYu/Xwzu6RTZKYvhDl/In48b5asbxR48LneOvNiszg=; b=tdVAtyt9fzP4YEl0t1DOuAx+shvU2ZloyleLSPU/XWYmReZLYwGrfdMGYZ1hKQnGnnGBYM WzSt1n56S/p8AI8Zo9vWN2Ktqk86QujuZ9W/sxcrEhvyauR2FDpIeShmiMMCrsk9o/bbTi KppzrRKhVep+RvrOLDCuaR8LHW0s1CBloJtL+hp9n+XR08k6LydzOMbqX7h8EHVy1fkRLO ZlVVUWeZ3RrDS+5j+V/DDGzwNSe+GbxGfNzxznFTE+EN2SusYgwJBjzGFA1lYm2ZOJ+rX6 EXKNl8ssMYkgKgBSII0c0K2T1CulNH/7aOcgMKbdlKcHunIRkyCX6PiMUsPyCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738073106; a=rsa-sha256; cv=none; b=yx/eBq2NoJav19aMpkjcTNdt8MqtKRnidX1eF90oT4frONyzpibTfugOJ/V21AMRcgHYw8 IH3QscSEmyizRmlfxL3A4F0hStPSkThsR4rYbHaKms4bIFSsx2xs4R1+X3x4RaA2JjgTMK I4KxC3gthYsNs1UjlhK0we056drg4hlRvrzHwfTJyLodwdbYJSrRiMVgEY2I4tUZFEdyyb WM/Ql10RFQ7aRqcYlIfJUZmk/mM6+hXcGBR2BOZgSYx9S9gINuEGR8i42CdzlPNJjHHpuy n5ZGmP7TrrKZ9/Mih/N80I/JskRu5dO+Dgv1Z/v8Y52w5w5x5ae8xeBVc0mUMQ== 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 4Yj6Vp1FDQz3HM; Tue, 28 Jan 2025 14:05: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 50SE56DH020787; Tue, 28 Jan 2025 14:05:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SE566L020784; Tue, 28 Jan 2025 14:05:06 GMT (envelope-from git) Date: Tue, 28 Jan 2025 14:05:06 GMT Message-Id: <202501281405.50SE566L020784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6819621ec999 - stable/14 - sound: Safely remove channel from list in one pass 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6819621ec9994689cd8626af3e935fbbaa20cd5a Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6819621ec9994689cd8626af3e935fbbaa20cd5a commit 6819621ec9994689cd8626af3e935fbbaa20cd5a Author: Florian Walpen AuthorDate: 2025-01-21 11:59:12 +0000 Commit: Christos Margiolis CommitDate: 2025-01-28 14:04:52 +0000 sound: Safely remove channel from list in one pass The CHN_REMOVE_SAFE() macro did two traversals of the channel list to remove a channel, one to check whether the channel is an element of the list, and a second traversal through SLIST_REMOVE(). Reduce this to one traversal, while still preventing a NULL dereference in case the channel in question is not present in the list. While here, rename the macro arguments to something more descriptive. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D48207 (cherry picked from commit 27b932e32faba1137ff307d05b787d837ccadda8) --- sys/dev/sound/pcm/channel.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 67f5019f4727..58fedd284ecb 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -175,6 +175,7 @@ struct pcm_channel { #define CHN_LINK(y) y.link #define CHN_EMPTY(x, y) SLIST_EMPTY(CHN_HEAD(x, y)) #define CHN_FIRST(x, y) SLIST_FIRST(CHN_HEAD(x, y)) +#define CHN_NEXT(elm, list) SLIST_NEXT((elm), CHN_LINK(list)) #define CHN_FOREACH(x, y, z) \ SLIST_FOREACH(x, CHN_HEAD(y, z), CHN_LINK(z)) @@ -188,8 +189,8 @@ struct pcm_channel { #define CHN_INSERT_AFTER(x, y, z) \ SLIST_INSERT_AFTER(x, y, CHN_LINK(z)) -#define CHN_REMOVE(x, y, z) \ - SLIST_REMOVE(CHN_HEAD(x, z), y, pcm_channel, CHN_LINK(z)) +#define CHN_REMOVE(holder, elm, list) \ + SLIST_REMOVE(CHN_HEAD(holder, list), elm, pcm_channel, CHN_LINK(list)) #define CHN_INSERT_HEAD_SAFE(x, y, z) do { \ struct pcm_channel *t = NULL; \ @@ -211,14 +212,18 @@ struct pcm_channel { CHN_INSERT_AFTER(x, y, z); \ } while (0) -#define CHN_REMOVE_SAFE(x, y, z) do { \ - struct pcm_channel *t = NULL; \ - CHN_FOREACH(t, x, z) { \ - if (t == y) \ - break; \ - } \ - if (t == y) \ - CHN_REMOVE(x, y, z); \ +#define CHN_REMOVE_SAFE(holder, elm, list) do { \ + if (CHN_FIRST(holder, list) == (elm)) { \ + SLIST_REMOVE_HEAD(CHN_HEAD(holder, list), CHN_LINK(list)); \ + } else { \ + struct pcm_channel *t = NULL; \ + CHN_FOREACH(t, holder, list) { \ + if (CHN_NEXT(t, list) == (elm)) { \ + SLIST_REMOVE_AFTER(t, CHN_LINK(list)); \ + break; \ + } \ + } \ + } \ } while (0) #define CHN_INSERT_SORT(w, x, y, z) do { \ From nobody Tue Jan 28 14:05: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 4Yj6Vq6YHvz5lVHG; Tue, 28 Jan 2025 14:05: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 4Yj6Vq3ZYpz3Sj8; Tue, 28 Jan 2025 14:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073107; 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=kuAeCHuUtrtsY7shEc3mcmU+jVBEOii/OABrZVPAiN0=; b=IMUhp9I8hMtTnvByWpQ1GxU0VHVfAzbCUt1XVJIAvrIaoNYTe5twVtJLPfdsLCnsyvAjMi xq8r/GVsXnezmCKN2WQ/cvBbgBDgrGvWwt0aRTtaEUMGPbktJxGy20HWlJWK+AsG6wekkL IRCbP7dOxutwk4jzNpBi00Enwifdw44F65485SeGAgn74lkYballl6G9pfdX8dWF9Wc7fj UqOSSYfzKgRfUkUcGqhJsQvYgGpFe98ALhp5oBUJuQ87hI3osYjgDuY3c7WdERZNXFEGNk P64Vj4ncuiWAGzaOZMBscM5xmUlCGBykU7C56yoZ14R6FjYZGNRRR72tI+Q+dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073107; 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=kuAeCHuUtrtsY7shEc3mcmU+jVBEOii/OABrZVPAiN0=; b=k9uCDk/8FOczLqUYfxpBgCQOtr/gK3bEhszBB+xWmL8JAVxG1GK5H9E+QnQlbcMgizBxTe ONiq+oSEUe6L2Yf0HybwfH7hjGvm5WAIY/hREXv/Rhqv6SReelmoesuw0te0hG+fkPirue 9Jj9fpQKRb00919zV7U3ywHmrbpNblYf5Ld+miopbp2fE0/A0pM20lw+KrwCoAeO1gZPr8 4f4YfM91yjRtCxMcAWfYGSggbi68z1JnEz9W3pxyzGmyMrd1VmWf46TDMsnA83HXBPszsJ SitdH2m09uZuuYSmBB5wAeISZLQfhHsO/Lv3ETPgxnhPh0RZ+fr7v37BGejcug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738073107; a=rsa-sha256; cv=none; b=JkZKRsPucCfRALIec8sRD6mn1xo7iA+yOwvnMSiZH1MBZHjdPmqDKV8NlUR7MSI9HnYf6B /coL1kx7Xf6HXx9sQX3jz/JftpkRVdnfszVBHAeJReRh43xeCXQA3TnmXAxkNVdVPkXAna eplB4sVsGJ38MAZIdYqJWbj8MRCws8DVbsGY9ij8pFMGLJwe82YsiVmMTSZeCOATo3dycL BLH6fKE7CZXZPEPxcu+bVz5T8yEvjeOdu7jfohjHBp56HnYbm6qkBJ/0fZqGc6KNfnpJ2A SMM9l2ZYgc9eodcp06ILD56G3QeyZcQUQXpGLADM7zvNUg1ShVBHvDBa8/IJnQ== 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 4Yj6Vq1yR9z2Zf; Tue, 28 Jan 2025 14:05: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 50SE57Rl020821; Tue, 28 Jan 2025 14:05:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SE57Aa020818; Tue, 28 Jan 2025 14:05:07 GMT (envelope-from git) Date: Tue, 28 Jan 2025 14:05:07 GMT Message-Id: <202501281405.50SE57Aa020818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e4458d4d71c4 - stable/14 - sound: Make CHN_REMOVE_SAFE() the default 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e4458d4d71c4c533712ca8417251f0dff6d3168e Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e4458d4d71c4c533712ca8417251f0dff6d3168e commit e4458d4d71c4c533712ca8417251f0dff6d3168e Author: Christos Margiolis AuthorDate: 2025-01-21 12:00:17 +0000 Commit: Christos Margiolis CommitDate: 2025-01-28 14:04:52 +0000 sound: Make CHN_REMOVE_SAFE() the default Commit 27b932e32fab ("sound: Safely remove channel from list in one pass") optimized CHN_REMOVE_SAFE() to perform almost equally to CHN_REMOVE(), so we can turn CHN_REMOVE_SAFE() into CHN_REMOVE() without fears of performance regressions, while also being more robust. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D48249 (cherry picked from commit ffcefe5310e084415a2f292a00f4637d4059c40f) --- sys/dev/sound/pcm/channel.c | 2 +- sys/dev/sound/pcm/channel.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 925a82bb170f..4b0ca128391b 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2291,7 +2291,7 @@ chn_trigger(struct pcm_channel *c, int go) break; case PCMTRIG_STOP: case PCMTRIG_ABORT: - CHN_REMOVE_SAFE(d, c, channels.pcm.busy); + CHN_REMOVE(d, c, channels.pcm.busy); PCM_UNLOCK(d); break; default: diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 58fedd284ecb..6eaad8cc2c0b 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -189,9 +189,6 @@ struct pcm_channel { #define CHN_INSERT_AFTER(x, y, z) \ SLIST_INSERT_AFTER(x, y, CHN_LINK(z)) -#define CHN_REMOVE(holder, elm, list) \ - SLIST_REMOVE(CHN_HEAD(holder, list), elm, pcm_channel, CHN_LINK(list)) - #define CHN_INSERT_HEAD_SAFE(x, y, z) do { \ struct pcm_channel *t = NULL; \ CHN_FOREACH(t, x, z) { \ @@ -212,7 +209,7 @@ struct pcm_channel { CHN_INSERT_AFTER(x, y, z); \ } while (0) -#define CHN_REMOVE_SAFE(holder, elm, list) do { \ +#define CHN_REMOVE(holder, elm, list) do { \ if (CHN_FIRST(holder, list) == (elm)) { \ SLIST_REMOVE_HEAD(CHN_HEAD(holder, list), CHN_LINK(list)); \ } else { \ From nobody Tue Jan 28 14:05:08 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 4Yj6Vs1XKmz5lTvp; Tue, 28 Jan 2025 14:05: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 4Yj6Vr3rxWz3T0C; Tue, 28 Jan 2025 14:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073108; 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=SCkCOKcVCmOR/J5/WHlX4lJb6gJkjLdCQicWnkkrkFE=; b=Jv9vGPdF7YVbVkIhTtAzdm9blysJBmvMYt4vO2hbR/10MowK+VVRlTx0gnkEU/AtGPT0AX 4CajhgiIZMbGBFu9oLGnJ2oXtX+ZC1Wmmv25EXbXLRTDXcLaHZcpaThLTzgHeMprNqeiB+ N5OdDCSHY7CtJYoWgNpI8jDwxL2DV20dBAN//g5gOSmlCLeJ/XuMcPejUHQkOPVwxEtLUg 00LKXteTgzUc1eJ3X6qRSxFrnesUCCZZHO8ig32uYs4w1NuAmq4tbWYa6ynkZ2plPO7RQZ XCLBzMO+2q6MTSDRC3bgnvubSt4S9zR+gh9uUE2CoVx0w9VC6/GHEav2SNCEjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073108; 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=SCkCOKcVCmOR/J5/WHlX4lJb6gJkjLdCQicWnkkrkFE=; b=gw7XjLtdhhjXU6YaqVnWa16BWe5rxv0LCCPWDesLj5agcWu61rHTKVPATSwClZGoEx1jK9 GGHSqgmTMYiHwYmvm6Ew4egTVIfU25LyAhZLUQrDpObDmyZr7NXMZNyMQ1Lm/BV5aflkLy 8GFkmDJjaLSFATGkG6wm7m7Hb2WTKuOZWo3012MHFllcuTS7soAaMLjWN6n+hvhKzsRxX3 HkxsxdnzisfKflVYLmEK7Je6+Ym+PoGfT9mIuWA+0MVzhReDT/j+c2nqGs1yZtkV82sjJi fn1fQkc5LXAVHCUSGanpDsnF3CcAMInB/Ggz2hExAWUVp1GkHIxmHdgDhbbKOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738073108; a=rsa-sha256; cv=none; b=coRd7uRBTlSECqnFYd3pMl3eacLyldZe5JjRIGgKl8AOB6h9ionqxfgsJewtp3vSHHdMhD eVezmIDt0hjdc5QcVlcRGIWcBwRqP0Zs/qpkgYQGsboIh6rqIOa3VYcICchzsJH2+9bjCJ jfaFT7PsWgsO7uYuygmzQ2IVpDXscLm9UNK5G2HVtq4EplImaPxhZ9nUsjuJB/S6k8JMlH IUT//SlZrDuSVWBoVImHLQJbYmjrV1LGQ1Zn1xNDwb++WaTHs5ah3gNi7UW6Mis4436CI5 TU9G67Y/KMZ6UjYQ2ONuw2amafJ7mh6OkBog6fSuOaYHJrdJodScYiJMZcvt4Q== 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 4Yj6Vr3Frcz2Zg; Tue, 28 Jan 2025 14:05:08 +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 50SE582F020854; Tue, 28 Jan 2025 14:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SE58k0020851; Tue, 28 Jan 2025 14:05:08 GMT (envelope-from git) Date: Tue, 28 Jan 2025 14:05:08 GMT Message-Id: <202501281405.50SE58k0020851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: afa1ba3b9c7a - stable/14 - sound tests: Fix gcc build 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: afa1ba3b9c7a5076f8d981f8491740eed3ad9e78 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=afa1ba3b9c7a5076f8d981f8491740eed3ad9e78 commit afa1ba3b9c7a5076f8d981f8491740eed3ad9e78 Author: Christos Margiolis AuthorDate: 2025-01-22 12:09:54 +0000 Commit: Christos Margiolis CommitDate: 2025-01-28 14:04:52 +0000 sound tests: Fix gcc build /workspace/src/tests/sys/sound/pcm_read_write.c:36:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 36 | } static const afmt_tests[] = { | ^ Reported by: CI Fixes: 27ef5d48c729 ("sound: Unit test the pcm sample read and write macros") Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit f6631da0b581b28c2bfeea1199b52013bb46aa41) --- tests/sys/sound/pcm_read_write.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/sound/pcm_read_write.c b/tests/sys/sound/pcm_read_write.c index 6bdc578615b5..e40ce52b67cc 100644 --- a/tests/sys/sound/pcm_read_write.c +++ b/tests/sys/sound/pcm_read_write.c @@ -25,7 +25,7 @@ #include /* Generic test data, with buffer content matching the sample values. */ -struct afmt_test_data { +static struct afmt_test_data { const char *label; uint8_t buffer[4]; size_t size; @@ -33,7 +33,7 @@ struct afmt_test_data { intpcm_t value; _Static_assert((sizeof(intpcm_t) == 4), "Test data assumes 32bit, adjust negative values to new size."); -} static const afmt_tests[] = { +} const afmt_tests[] = { /* 8 bit sample formats. */ {"s8_1", {0x01, 0x00, 0x00, 0x00}, 1, AFMT_S8, 0x00000001}, {"s8_2", {0x81, 0x00, 0x00, 0x00}, 1, AFMT_S8, 0xffffff81}, From nobody Tue Jan 28 14:05: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 4Yj6Vt0ZcZz5lTpN; Tue, 28 Jan 2025 14:05: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 4Yj6Vs50Gfz3SXG; Tue, 28 Jan 2025 14:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073109; 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=RGqvQULUbwzaHWl7+GWypByhG7iLkg8W9AZF+hVHZJ8=; b=W46uFhERrg/BjIUlRJd415PPVypUbdbcSRYivy3Ij7NuibzBzweV2V0pv+1LtxB5W+elZY 5h5cqGvqXy3QtnlJARFPWqVGaXVlBuqZP5ISoQ/qgo/rzlOyRNhpjv167ylrjh9XoCrszO c9lIEQdTAr5IpQ9owATywg8CmZXw/Cu21hoXawpcfMnLQOVHP5xuxxWcyrrwfUJe5IGUtp I1m4mlGWUUOn3mT9OyT/0szVrMtoYSyw8YeWnTOBmq9j0+xU+48BJ8m1U81CXKC0mjGXB6 iPEfFfD8NJjQ3nju9gzrloNSI3LLUlMBqw/ElwqplEyEYM+TIR6E2ZnegmJcfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738073109; 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=RGqvQULUbwzaHWl7+GWypByhG7iLkg8W9AZF+hVHZJ8=; b=OGwLHaNSAWj5ae9h+s+JJ3AErlgJuhJB7z0jcIf6WC2ke0G7w/qvJBnQ9mzDhOmxI+Wahz fzyAu8C07CWEP+HsoaTlrXariwOFhFfZlC8GBo+7A53On/XYCHHJJtf241lJgK0hC38AH8 d5JgBQnzU5CTlSQ8SOfZsLhqyoNkiS2SNMp9oZJHk3tWXYgwBDtqVUNbmdFM3R97JAHDgB ckJ6szFGPrHQl/xQgFME4AHUuI32SY+S8EbY+HBFKxqG5sXHj1bimq12ryk7Zyf+aN01x3 9SY5qdpEx3zQYdfRBuuNqzeR+O2/6Jb3ZqWOyY2sL/7Ud60KLpB2x4A80vpv5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738073109; a=rsa-sha256; cv=none; b=QqB+h4CabwrIiJDCqFIhThidj1cOHbvNKWBYG2ISo5OaaM9NEW08TX3c5KFhTH9xb48ocq BDr6s57kVkrhPUF5B4VSz572pibPyOYY3b+Hz5S6/FavQPR2YQ/cG2d561fMV3gXNubLhW iHGSPvImvO8xIoIZgB5U4wGlRulCSnVnMdJLKd5ubKlJ/k4V1oFwa9h22Q+8TGk2Y70tXF Gk5vaeR/VxmN6xaBLj37KoPpX31TMtV+wKfC9mrXIuFxbAzkPxAg7gepb8txT1jUljZTIn vTJpUMAR63yG7qzVjmr0Ilp5l684/xth09zA+tZrBlHpI5KvCeqORdDx+gkuPA== 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 4Yj6Vs4C27z2Zh; Tue, 28 Jan 2025 14:05: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 50SE59WE020886; Tue, 28 Jan 2025 14:05:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SE594x020883; Tue, 28 Jan 2025 14:05:09 GMT (envelope-from git) Date: Tue, 28 Jan 2025 14:05:09 GMT Message-Id: <202501281405.50SE594x020883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e92226873681 - stable/14 - sound tests: Fix 32bit calculation detection in pcm_read_write 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e922268736817e6fe8146f46093a0153af949041 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e922268736817e6fe8146f46093a0153af949041 commit e922268736817e6fe8146f46093a0153af949041 Author: Florian Walpen AuthorDate: 2025-01-23 12:38:00 +0000 Commit: Christos Margiolis CommitDate: 2025-01-28 14:04:52 +0000 sound tests: Fix 32bit calculation detection in pcm_read_write Fix a mistake in the pcm_read_write test that would result in not properly detecting 32bit calculation on 32bit architectures like i386. As a consequence, the wrong values would be checked, thus failing the test. Reported by: CI Fixes: 27ef5d48c729 ("sound: Unit test the pcm sample read and write macros") MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D48617 (cherry picked from commit e02b579b537998495b06d02be6aa07f03db3a42a) --- tests/sys/sound/pcm_read_write.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/sys/sound/pcm_read_write.c b/tests/sys/sound/pcm_read_write.c index e40ce52b67cc..7ef310a35c25 100644 --- a/tests/sys/sound/pcm_read_write.c +++ b/tests/sys/sound/pcm_read_write.c @@ -95,8 +95,14 @@ local_normalize(intpcm_t value, int val_bits, int norm_bits) static intpcm_t local_calc_limit(intpcm_t value, int val_bits) { - /* Avoid implementation defined behavior. */ - if (sizeof(intpcm32_t) == 32 && val_bits == 32) + /* + * When intpcm32_t is defined to be 32bit, calculations for mixing and + * volume changes use 32bit integers instead of 64bit. To get some + * headroom for calculations, 32bit sample values are restricted to + * 24bit magnitude in that case. Also avoid implementation defined + * behavior here. + */ + if (sizeof(intpcm32_t) == (32 / 8) && val_bits == 32) /* Divide instead of right shift (value may be negative). */ return (value / (1 << 8)); return value; @@ -456,7 +462,7 @@ ATF_TC_BODY(pcm_write, tc) } local_pcm_write_calc(dst, value, test->format); ATF_CHECK_MSG(memcmp(dst, expected, sizeof(dst)) == 0, - "pcm_write[\"%s\"].value: " + "pcm_write[\"%s\"].calc: " "expected={0x%02x, 0x%02x, 0x%02x, 0x%02x}, " "result={0x%02x, 0x%02x, 0x%02x, 0x%02x}, ", test->label, expected[0], expected[1], expected[2], expected[3], From nobody Tue Jan 28 15:23: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 4Yj8Dx4fgQz5lc8d; Tue, 28 Jan 2025 15:23: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 4Yj8Dx430Zz3jHD; Tue, 28 Jan 2025 15:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738077793; 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=iG1lcuIe2NMlCd+L6SxkrtZzRK7G/SVdOohzc0YoeQE=; b=nbVodl+p6TwP/2eHBwPvclrTLzkzne1UfKrk2PJCJYQehBovP3GBHefPGcYBCO+LHeUzA2 n9gRD3HQN4o2RsiR4TpOwgZ9ObW7+I1twUnaNezq3ozh/7BqUtNBKW8AjuEm8ANgDepin5 8F+nwJo93mEKIUb2NvaD2mO9dlmlDm/bFKun5fCJ2RBk/6rdx4DjEuBU4/Pxze00Uomx4B Mf/s3isSlR6zrDW79zgQPkOB/73LeFBcZpSNT7793/QuG0vfqpt705U/AvJFDPmsy+XyQK GI+H4LpjIOT+iDjllFzafbc3/sIb6JgG2mIFTTf3QwUubHDkUlGxYLRS6R4JCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738077793; 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=iG1lcuIe2NMlCd+L6SxkrtZzRK7G/SVdOohzc0YoeQE=; b=RCSwqFe0iln1L++wUJRgnJRjJuRpyqeb9S7kMbkfjqwpjP8G7Q7j/Krqq2f5rhEW6+LmLn jZV+GYLGiFqe6lJ5eua8YXKW+mIh/CUxP+QCgvMX6Sv1P/j+MUbvgV1lhPp+LlCrHVRwWP qEO7xPNsstDXu291sf1G9zqlRR749ZGSy2AoTXhpedoTXbSriOnI9ganROJ9Hb/ui9KjEq EXdLgcMUUnk9zFvo5TVAYpFJyP2cql0okvwLWisV9RUIExM09vibSQgH2uMaZ+wFezpawQ fosy+xT9ZeIP5KuOD7GaE9IDRk/D/f5gu+Mu32p8fHFnPZwYnx+zQlJTagjLfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738077793; a=rsa-sha256; cv=none; b=iqcVVW2QK1/Yb98fuVbr+2yrzMN2HZJWupK6ssViVucD8UTRSPP2v/JZmGVr8sBbKPSRik KxAzmAXhT6VCydY8bUU+FtGn7p0kPpYRtk/aLy3TO5mGlhCL2eKQg0w/l8WM2BFWS/ek51 3bCt4d+fWfBLuwbCK51llFoedU07Zfnh23wimCXRUcYlF8ZmgijwO7GYaMOAJcF3aN0j78 R4+wuWdCj/8DhCEanJ1SdwhAAD7ywpb2N0bcI0YQI/dVooU/uUYriZewH4Sf0Dvm0O/fHw vKWUzmpD1BQvlG2M96JyiKdIdl7IlSMnn3mJyH883SZKQx8CJ51r6UHKwBL15w== 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 4Yj8Dx3f9Sz55m; Tue, 28 Jan 2025 15:23: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 50SFND2c070815; Tue, 28 Jan 2025 15:23:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SFNDW6070812; Tue, 28 Jan 2025 15:23:13 GMT (envelope-from git) Date: Tue, 28 Jan 2025 15:23:13 GMT Message-Id: <202501281523.50SFNDW6070812@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: aa79996e6057 - stable/14 - if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured 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: aa79996e605735dcd9b1bf83d6affefa404530d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=aa79996e605735dcd9b1bf83d6affefa404530d1 commit aa79996e605735dcd9b1bf83d6affefa404530d1 Author: Zhenlei Huang AuthorDate: 2025-01-21 15:02:13 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-28 15:22:15 +0000 if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured It is harmless but pointless to invoke vxlan_stop event handler when the interface was not previously configured. This change will also prevent an assert panic from t4_vxlan_stop_handler(). Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48494 (cherry picked from commit 960c5bb0f6bf44aeb09fa14fd0f82c2e82ebe2e2) --- sys/net/if_vxlan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 2bde1d894a3b..0bbb3e0bcf9c 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1814,6 +1814,7 @@ vxlan_teardown_locked(struct vxlan_softc *sc) { struct ifnet *ifp; struct vxlan_socket *vso; + bool running; sx_assert(&vxlan_sx, SA_XLOCKED); VXLAN_LOCK_WASSERT(sc); @@ -1821,6 +1822,7 @@ vxlan_teardown_locked(struct vxlan_softc *sc) ifp = sc->vxl_ifp; ifp->if_flags &= ~IFF_UP; + running = (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; callout_stop(&sc->vxl_callout); vso = sc->vxl_sock; @@ -1828,8 +1830,10 @@ vxlan_teardown_locked(struct vxlan_softc *sc) VXLAN_WUNLOCK(sc); if_link_state_change(ifp, LINK_STATE_DOWN); - EVENTHANDLER_INVOKE(vxlan_stop, ifp, sc->vxl_src_addr.in4.sin_family, - ntohs(sc->vxl_src_addr.in4.sin_port)); + if (running) + EVENTHANDLER_INVOKE(vxlan_stop, ifp, + sc->vxl_src_addr.in4.sin_family, + ntohs(sc->vxl_src_addr.in4.sin_port)); if (vso != NULL) { vxlan_socket_remove_softc(vso, sc); From nobody Tue Jan 28 15:23: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 4Yj8Dz0TPZz5lcT7; Tue, 28 Jan 2025 15:23: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 4Yj8Dy50y9z3jVp; Tue, 28 Jan 2025 15:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738077794; 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=o7qz6YxzdNvkJOxH/6yCj/3qX0wkFsW5O5LIxm9YyIE=; b=UizTrcSJrRoW+mhBRcklx/DpUllfzLtLy8irWDrOD0jLSf+2IdV31LY9chD/U/hjAhmMGl Kvr7352//JjEceUmSWt5tB+ueFN6IBajF+8kt6M29k6YvHK4ivf9j++uy3aW1+qTtiePM5 9PuURYhfI9rdhU8u4WFwzIxgfrefj7TPQmD4cBQNuf+r84DPVvph3o39Bg3ev4th5xmibw IABM6QQkZ/taG6OLlMIoPw4As8j3pQtHfjlmP0q6tKlX6uIDFL7rPwRBxkjiPsTDk1SFL1 6Zyj0zvYdi1lzTWJ/pOfXXxc3IGLiHjCj+hRHOCai2+Ux3Ba4JxJvtmEkqJLSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738077794; 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=o7qz6YxzdNvkJOxH/6yCj/3qX0wkFsW5O5LIxm9YyIE=; b=DbLYfd4NG5ci4rSrsX33c5Xn+I8AzyHHmFqV+A4fkYo7NHRDN5rZdWH86uojgg/Ub8iCIP wJas8Qt8dQz2gLnTKvuWheVrOyUcbTGqXIbmAyD3xzImefqDAmhXzmfP++w2eyMMiRx0GM aSdO85zEGIetF0A9Sawa3kF6d7OdnyaVbkXOqaWAbkyiMzhzaD/GK2b8pi88zamKxz2Yxb dw+W2CPEg3aH87VXQVG9FZqYiQ5cPhytfljoKJcKBVSh0cvQZiXQlZFabsJU65I/udlZW7 ek10bGZ16/Sq6Oe4VIAKSO2qJAQMrRB91vFej+jr99d2JM2deehqUWzM42YkaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738077794; a=rsa-sha256; cv=none; b=pcf5Ybkqy9wWNDuxN1jlt7AhTfPgJXnLlSlDQzq8w2KYHgfwWWwxmm97I67y5g7B/nRNzm tC/coci1gmJ8lo4MRD6HUZon9p4bDMHKwSD7X+AXbwBSwFaHc9mA+kHVLRNI0bFD+4pksA g71bhZLOo2P0mraOLyJU96SOjFKY0MgtKguX5981EcIvvSPCu4ZPD7o4pipv33MsV0DTok YDkyVvJaVJmeHZ/RarsILTz0YiIxQStdjA2bEU7yez2LfNoeaFoYq+jav/I/BdHX13a9BV wMC8qFApG2BbpD5p0VpCjmUS/cmFjS/2TPO9xEdLG/muPvPLWhDvN+xXJp7kdw== 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 4Yj8Dy4SlHz5Tn; Tue, 28 Jan 2025 15:23: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 50SFNELs070847; Tue, 28 Jan 2025 15:23:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SFNEIb070844; Tue, 28 Jan 2025 15:23:14 GMT (envelope-from git) Date: Tue, 28 Jan 2025 15:23:14 GMT Message-Id: <202501281523.50SFNEIb070844@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: 719fb5a37731 - stable/14 - kern_sysctl: Fix printing function name in the re-use sysctl leaf warning 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: 719fb5a37731f6e69f2ba2b67fb3e19f2f007100 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=719fb5a37731f6e69f2ba2b67fb3e19f2f007100 commit 719fb5a37731f6e69f2ba2b67fb3e19f2f007100 Author: Zhenlei Huang AuthorDate: 2025-01-25 17:59:33 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-28 15:22:15 +0000 kern_sysctl: Fix printing function name in the re-use sysctl leaf warning The helper function sysctl_warn_reuse() is intended to print the name of the caller rather than that of itself. PR: 221853 Fixes: 4ae2ade11426 Enhance debugibility of sysctl leaf re-use warnings MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D48645 (cherry picked from commit faa845aab6113190ba8c75a171b2cca8673a6214) --- sys/kern/kern_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 9f340404f9b3..3d66de0b18bb 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -413,7 +413,7 @@ sysctl_warn_reuse(const char *func, struct sysctl_oid *leaf) (void)sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN | SBUF_INCLUDENUL); sbuf_set_drain(&sb, sbuf_printf_drain, NULL); - sbuf_printf(&sb, "%s: can't re-use a leaf (", __func__); + sbuf_printf(&sb, "%s: can't re-use a leaf (", func); rc = sysctl_search_oid(nodes, leaf); if (rc > 0) { From nobody Tue Jan 28 15:27: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 4Yj8L13K16z5lcdH; Tue, 28 Jan 2025 15:27: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 4Yj8L12ksnz3k0D; Tue, 28 Jan 2025 15:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738078057; 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=FgArqTbnKCSQfP0grz0b3l5UpNSG0LZ3mU0IpraSTmY=; b=pyi/htCfkWBfpxD4UBIvnd4Kbz9GNJxzApULmQMP6Hp41R9poGf0YIWgLwbP+q2r3g841u zR8xThtnPujRkCpd9rrn3IESiGCaTLc4T6mMbnd61pVR0/0thmXoLzK2hEz9D4OnhqPaXw elSCfeooWzwtQyF2FQcskwO/RMQa41n1FH214ml2LwbP3Gja+Tnx30vkUpdkoYexptusAX bNYzXSudqcy8z3qAL/5Qg7nAu6iqqw7zbWmeQU/sryJYmoKR7w4MNYNSGeQvJ7yoYvnBOJ GSyjXdKW3gR9UiIvgGN6axiihr2wLIeuYR6y+EXlgmiuzJBsIss699UNqu5gTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738078057; 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=FgArqTbnKCSQfP0grz0b3l5UpNSG0LZ3mU0IpraSTmY=; b=rRA0rUSf08N/TBVElqobW/bSPdcyfhnNfM2X3EdmskxdDFbiddmOeahPmcJ+uKQkSl2LoT YJCeKrF36DYzWlvKKEt00Cfplue8XaVU/1yzloK1iLgzn8zDz04RlD6aAu6zM8swmKWWlG MJdTjLwGPk5AnCQhAXtbmGOwv9c7jZGEXQbz+xtw2O9RsF3UWm1yZ8ykmzhavTfvwA6tYw P+xRzpZNuizOsUkIjV6Kmdcan62wEyD7DdpxSjxkl3xcGQFk5sDuZ2U4Odb7r+F++AYIRG BL3nJoRpp+xFLhSVeTtan15yPR6EtgDtmtRBsQZ2DolBABuRyHvuBcBkoX3usw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738078057; a=rsa-sha256; cv=none; b=r7STzJ2IPju/5zDC41KAuqFw+qCeDO7N+zwNd25bJfmY84hgADkN6PXPT06gEkrlU5Nc7D iBZD9a+TJSFf6WLGPkmnFnTcrhK/NfrsQeyaIWvNq3+qjkKkyjXOva5F0+YozuMN/ZI7if ivx6ohUD35NDuOXQfR+NKo6P2iRHNdTvjKMajJccHh4ulXlXc+WdEpM6Uoc3GSjMGvw1x3 k7JNgPAlsiyd3wwmLagoePyo7SysHdRKZQ8AzAiCY+FMy5JYywAs/znOuHNqi0xYqTE59Q avMEaJK46ZOgsulwg+nAHg1cDRnq630nyZaR/dwRizaI638cTDz9PQu1pIEmiQ== 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 4Yj8L11zm1z59G; Tue, 28 Jan 2025 15:27: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 50SFRbHv072217; Tue, 28 Jan 2025 15:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SFRboV072213; Tue, 28 Jan 2025 15:27:37 GMT (envelope-from git) Date: Tue, 28 Jan 2025 15:27:37 GMT Message-Id: <202501281527.50SFRboV072213@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: 20374abf0ce8 - stable/13 - if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured 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: 20374abf0ce8228972f54795bf7ac6266be190ef Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=20374abf0ce8228972f54795bf7ac6266be190ef commit 20374abf0ce8228972f54795bf7ac6266be190ef Author: Zhenlei Huang AuthorDate: 2025-01-21 15:02:13 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-28 15:26:49 +0000 if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured It is harmless but pointless to invoke vxlan_stop event handler when the interface was not previously configured. This change will also prevent an assert panic from t4_vxlan_stop_handler(). Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48494 (cherry picked from commit 960c5bb0f6bf44aeb09fa14fd0f82c2e82ebe2e2) (cherry picked from commit aa79996e605735dcd9b1bf83d6affefa404530d1) --- sys/net/if_vxlan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 2c1bfcc2e4da..827772063ede 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1812,6 +1812,7 @@ vxlan_teardown_locked(struct vxlan_softc *sc) { struct ifnet *ifp; struct vxlan_socket *vso; + bool running; sx_assert(&vxlan_sx, SA_XLOCKED); VXLAN_LOCK_WASSERT(sc); @@ -1819,6 +1820,7 @@ vxlan_teardown_locked(struct vxlan_softc *sc) ifp = sc->vxl_ifp; ifp->if_flags &= ~IFF_UP; + running = (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; callout_stop(&sc->vxl_callout); vso = sc->vxl_sock; @@ -1826,8 +1828,10 @@ vxlan_teardown_locked(struct vxlan_softc *sc) VXLAN_WUNLOCK(sc); if_link_state_change(ifp, LINK_STATE_DOWN); - EVENTHANDLER_INVOKE(vxlan_stop, ifp, sc->vxl_src_addr.in4.sin_family, - ntohs(sc->vxl_src_addr.in4.sin_port)); + if (running) + EVENTHANDLER_INVOKE(vxlan_stop, ifp, + sc->vxl_src_addr.in4.sin_family, + ntohs(sc->vxl_src_addr.in4.sin_port)); if (vso != NULL) { vxlan_socket_remove_softc(vso, sc); From nobody Tue Jan 28 15:27: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 4Yj8L24gvkz5lcgZ; Tue, 28 Jan 2025 15:27:38 +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 4Yj8L22S6nz3k5k; Tue, 28 Jan 2025 15:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738078058; 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=J02I9Ft2GRuOB04AUKghjUDsWhKeJkXa2Kgq/ZD3Aac=; b=Yh94KBD/pevwXqa1NxSTwDkiHPEZpMUX0zBYm1fAzGsPkrlyKUyJEkQxX7FmN9vTjfC5lp NkIRbuYjec3k2AfPgYz/mD1Yo7d/9w4uLuBSRiSPYwWgAp1LupZIQ5rsBtyHY/vgv7ZbRq w67PTRKrcfsqoogNNyEINUjy83nayNNRn27iEdqN4OJZvv0h7+R+4eXAXinOq2uxql0TkQ Q438StIva1w5h/X/3RtDaJcUJlQjajhbLKjBKZiRbT2InAAtk3BMdbgxoOsMqUmEVPvxpe 0YogDIZ1UZr4DadT3mhiNqLOYE0HKkZfbxplzEOgEh7fCdf6YjLEen3mXoC2JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738078058; 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=J02I9Ft2GRuOB04AUKghjUDsWhKeJkXa2Kgq/ZD3Aac=; b=mhCHmla3q2R64pWwVthTOigQvKP724SVQvSXZUSKS/1LH0UpWk53ib/69o8AJF1iPMArk2 smxseB1or87xQ+TNqoW/RGyfEq3hXPWnbwBmJEgI6Lo6qhSdpowhRbQV5vq3bbwOXCtIEG /LTnYPBrAQFTeVXX7lRARy0ITeA9Ttnsx9dHXjQc+pOfaSkV8DopWiw5bHDex9fpjhwZfJ o8bcEwQUPVXzagxKL45ReEm6rzxPeS7Mg057xIviAJ2OSsywsCe6xCBEcKZYW+OWnvsbJR 2qV71kcHBj0leMisF+shJsRBYejG5NqRCy5fcFAuUIipsWploNCk5TLhs6rthg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738078058; a=rsa-sha256; cv=none; b=OE3N47GWXdsQHLN2gHX6dVJVcxJ95PheTxe0bTGPUEQT7xPPxjWkxNICPHVYXhENNXQoa1 KQ5sgS08C5DlxVTa1yEvGc60YsZKMrnrzpAwZLuM9R29KKiQe2vLMYeap/rdCqk1ELG7YW 74jCBHAyht5YlNVRR7vZSIKQ1VrOGg4v6ie2FXoiwXZw2OBvcykisxAnBDDrkLsPrC+WLd YkVuRp1dPYk0G4poA9q8yVFjGzTnME4sjbZQp4QXW5XP67/YC70L/pIXuJ9WK21YGj5VZD gLJrTU5zTokPwGTPybWSVltnj4Fq+fkC8/Kci5kqLku5ig8JYB0Ch4X2wSwvEA== 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 4Yj8L21s1Vz59H; Tue, 28 Jan 2025 15:27: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 50SFRcfj072251; Tue, 28 Jan 2025 15:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SFRcxm072248; Tue, 28 Jan 2025 15:27:38 GMT (envelope-from git) Date: Tue, 28 Jan 2025 15:27:38 GMT Message-Id: <202501281527.50SFRcxm072248@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: 477403117f06 - stable/13 - kern_sysctl: Fix printing function name in the re-use sysctl leaf warning 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: 477403117f06ce5b1de006925fc35d1fbec8dc76 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=477403117f06ce5b1de006925fc35d1fbec8dc76 commit 477403117f06ce5b1de006925fc35d1fbec8dc76 Author: Zhenlei Huang AuthorDate: 2025-01-25 17:59:33 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-28 15:26:49 +0000 kern_sysctl: Fix printing function name in the re-use sysctl leaf warning The helper function sysctl_warn_reuse() is intended to print the name of the caller rather than that of itself. PR: 221853 Fixes: 4ae2ade11426 Enhance debugibility of sysctl leaf re-use warnings MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D48645 (cherry picked from commit faa845aab6113190ba8c75a171b2cca8673a6214) (cherry picked from commit 719fb5a37731f6e69f2ba2b67fb3e19f2f007100) --- sys/kern/kern_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index dd71b2880ae5..371d521d8850 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -403,7 +403,7 @@ sysctl_warn_reuse(const char *func, struct sysctl_oid *leaf) (void)sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN | SBUF_INCLUDENUL); sbuf_set_drain(&sb, sbuf_printf_drain, NULL); - sbuf_printf(&sb, "%s: can't re-use a leaf (", __func__); + sbuf_printf(&sb, "%s: can't re-use a leaf (", func); memset(nodes, 0, sizeof(nodes)); rc = sysctl_search_oid(nodes, leaf); From nobody Tue Jan 28 16:00: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 4Yj94S5xwnz5lfmr; Tue, 28 Jan 2025 16:00: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 4Yj94S42kYz3mPv; Tue, 28 Jan 2025 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080056; 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=fhvGMRVV9G0ucV0JyLfKysQZPJQE6nZTHzQdJhAMEpo=; b=EPWKaamBFi/5gNxic2vto3FIf4A7UAk1GJLl3L+W042CEK0NCPbFPm6duZvMisDH8i551y gcIZHcy4uRquSkGpHj+y7mS35vnyr4p/bdlyLrxU3apsq8l9Q0stj0fzPrAuZfzAKQWUsN eWxfyQuhDqoF3fq5LMwb1QFsRYNW2naD4t7qm2V0b94Q4N8MKa3s3joTy1GOweQseErOCI z5FPe6PpPcxhL2T6Su3P5F4pTnUttqLV+PHOCYivxONjuSsthniNDLuAk2lU8LYjvas1tM AzGkBDtohLbObBl+6tBZhj0YZwWXiw+TtbW7dRVqnPNf6GoxquK7Yu0wHov1CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080056; 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=fhvGMRVV9G0ucV0JyLfKysQZPJQE6nZTHzQdJhAMEpo=; b=x3DXSRzO+/n1Iydir/29+gpFJ82u7Mylud8C4vPkyWH+HfAHh/L1+6+H5KbP5Q5XE7mrTL ypEle3dJ5/lGj6w1bBMqcYjXu72B75tuBjGxlVWA/xGMlLiOu4MqxnzdgBAYszPjRlFDxP IRw4yr4Lou2wYnxdgcityChy4CxnGHJ94l/NGdALpOnjPycWBWRc3EmG1NNDgAF7t2obiT OqZrvX8ThQbOlFxwGnuSGUgtsMhoxpB+2rlA6gAzsqi7bDmolabDMTDrZggQIN2sO685Md w/RK9tYu2zzpMwWWkroI4ay8LqucQiBFQ1XgS2WL8H6yLOEpx62UZExjl+ZuaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738080056; a=rsa-sha256; cv=none; b=x4xGh4wuMzBRMKdBI60QGUhca80TaVnibOiq/rrN5LYT0k0L/Q3qFHwreRgYs4dWKyOWrb ys+fb0AVQToGz8Z3KjkWvEf++mfx5vOKMUaMkkIa8AvoilGgEfMkUFXDXtV4E14cbczX+C V/5WpNinAByMiQ3sLTzVlX0LgfXpZexC16m8St20xiSWXGw4HwX9rrRSN7oN/2znxXdH7e 7P/As+K8pwkoSNDQvtqdbdkDbiSGPYdlQCJCjMsknpoYelcMhg6vNYEH7Xp4QI9wE7rs3r lvkpgFT52PV25fHUJoPnDtgmKyeQdYDrHqte2r9VbNM1AZx0nTcFtBtmlLI2gA== 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 4Yj94S3fNXz5sB; Tue, 28 Jan 2025 16:00: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 50SG0uQY038084; Tue, 28 Jan 2025 16:00:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SG0uM0038081; Tue, 28 Jan 2025 16:00:56 GMT (envelope-from git) Date: Tue, 28 Jan 2025 16:00:56 GMT Message-Id: <202501281600.50SG0uM0038081@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: 66ff03065def - stable/14 - ls: Release resources before returning from traverse() 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: 66ff03065defb26bc2cdec5874c0be88343541c8 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66ff03065defb26bc2cdec5874c0be88343541c8 commit 66ff03065defb26bc2cdec5874c0be88343541c8 Author: Mark Johnston AuthorDate: 2025-01-14 14:20:26 +0000 Commit: Mark Johnston CommitDate: 2025-01-28 16:00:12 +0000 ls: Release resources before returning from traverse() PR: 278476 MFC after: 2 weeks Reported by: valgrind (cherry picked from commit e6c9c463384d11a44af3e5f2cc947fb69f3a1968) --- bin/ls/ls.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 1ad346440f02..51cd45b84d63 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -655,8 +655,10 @@ traverse(int argc, char *argv[], int options) chp = fts_children(ftsp, 0); if (chp != NULL) display(NULL, chp, options); - if (f_listdir) + if (f_listdir) { + fts_close(ftsp); return; + } /* * If not recursing down this tree and don't need stat info, just get @@ -705,6 +707,7 @@ traverse(int argc, char *argv[], int options) } if (errno) err(1, "fts_read"); + fts_close(ftsp); } /* From nobody Tue Jan 28 16:00: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 4Yj94V18Ybz5lfvQ; Tue, 28 Jan 2025 16:00: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 4Yj94T5Bqdz3mXJ; Tue, 28 Jan 2025 16:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080057; 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=iv50+H660EjeOo0aI0PULy50Kxr4NrrrvF7BmLHEKfM=; b=to7Uuq/Xs6bnmSVT8QTqTyY2s42lwU680SmRtcOmbQBrc1xrf0Tg0m69txyLdS4ujQiHlL BCbFzpLV0SwvsBbGhxD73hD7rclxMdPd+yr+5Ip1eRjkee+cKkP3eyGmwBqHS9apmx0KPy Xwj8U8fr4guKaQa+yYNz7/LAE5+2mMO4bXAogQEnUe+ipdvnnBWfekjX1nXes0ux3i/drW HdPoWx9oJoxGbVUxc1iSx9+gmYuOLYn/2zTDcc5wkKQYi+fgHxB38EBarQhwZIOyC8n7Y3 OEokNI2H9WGW3DQ1AwRj9oosihrVNxyYjUTiqEi6IYnG/dt+/xRWuh7z3Ys/yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080057; 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=iv50+H660EjeOo0aI0PULy50Kxr4NrrrvF7BmLHEKfM=; b=iSo98xN4i4+1GJ1u/+jZTCrBl/gdCDN2Blv1DnD/xHlRZ0mkjkw4RJUsh88RogRnV0x6Wq FdKV2jbReNfy8zwNCUw/5txAU+S1Nvz7goBDftZu22XZPCkuNXRCqNF/MG9WfOU1LDITiN AH1aIFVSqaspltgkq15VcD9DDbje2aqXJeOxVu+hPpQE6h7fO7n4uRnmWXwC7GMMysdxEU I9JYmRgwu1FP4H95U8NfqkSCKmm+m74sheNynzDthbWlNy1bkLrRl1Ve5WJxQcWt1AXHq0 +6uDoBdbtVqp8n6/CfnmT5UnzVYFHOPQ9fxF42JaySfTre9gMNPaFPODxN0lzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738080057; a=rsa-sha256; cv=none; b=SiTNE3sCYxne//+4cfF3ttpGBmwm/pu6MgNdE7uYPMd/AuOkQlqOwhmUNXOas7TemMJuXl f97YjINoaN/VsQ4NiY5BpYtSNltpMtsRTRj7UFSKH/wXoOHt09+Icl8X/kMgBOjNPQAlX4 4JgE0RjJd1RbBdEbXdx/D9Op5rJKnyal7Qy4LKQssFTHl4hSrwCNDHvQ2eKrzNZXnfDmPo V0XWjbBDiQTtCyldhiKqaJ949WRuTuWm/sM/Qa0VmX0cgdtZ73MHZZK76BAyzrnOgzcDmH bYyPrKAuhF6dmXYUBZsDr3R/x6LaJ9DD5xqpF2NYSgVI28BOfVpiAOfzGFyQug== 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 4Yj94T4bHwz50k; Tue, 28 Jan 2025 16:00: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 50SG0vBs038126; Tue, 28 Jan 2025 16:00:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SG0v6j038122; Tue, 28 Jan 2025 16:00:57 GMT (envelope-from git) Date: Tue, 28 Jan 2025 16:00:57 GMT Message-Id: <202501281600.50SG0v6j038122@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: cd1f435f4819 - stable/14 - rtsold: Further usage message updates 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: cd1f435f4819935155d660aca97b6967d7992846 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd1f435f4819935155d660aca97b6967d7992846 commit cd1f435f4819935155d660aca97b6967d7992846 Author: Mark Johnston AuthorDate: 2025-01-24 14:06:59 +0000 Commit: Mark Johnston CommitDate: 2025-01-28 16:00:34 +0000 rtsold: Further usage message updates Add -u, remove -p from the rtsol(8) usage message. PR: 266634 MFC after: 1 week (cherry picked from commit 5db50a3167ac7a4f18088a5cfdaac64aa925c32e) --- usr.sbin/rtsold/rtsold.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index e0b168a379bf..63f20e3032a7 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -792,19 +792,19 @@ usage(const char *progname) { if (strcmp(progname, "rtsold") == 0) { - fprintf(stderr, "usage: rtsold [-dDfFim1] [-O script-name] " + fprintf(stderr, "usage: rtsold [-dDfFimu1] [-O script-name] " "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); - fprintf(stderr, "usage: rtsold [-dDfFim1] [-O script-name] " + fprintf(stderr, "usage: rtsold [-dDfFimu1] [-O script-name] " "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } else { - fprintf(stderr, "usage: rtsol [-dDFi] [-O script-name] " + fprintf(stderr, "usage: rtsol [-dDFiu] [-O script-name] " "[-M script-name ] [-A script-name ] " - "[-p pidfile] [-R script-name] interface ...\n"); - fprintf(stderr, "usage: rtsol [-dDFi] [-O script-name] " + "[-R script-name] interface ...\n"); + fprintf(stderr, "usage: rtsol [-dDFiu] [-O script-name] " "[-M script-name ] [-A script-name ] " - "[-p pidfile] [-R script-name] -a\n"); + "[-R script-name] -a\n"); } exit(1); } From nobody Tue Jan 28 16:00:55 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 4Yj94S1JLhz5lfmq; Tue, 28 Jan 2025 16:00: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 4Yj94R4Zdsz3mDh; Tue, 28 Jan 2025 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080055; 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=JhuE5nDhjkQqAaipk75pxinxyGFzSJK3tdT6jPQLipQ=; b=TP0F/bVmCbXtZzZrhrsuno35EAstlKUxY4cR2q5/ByZ/W31z1LgSuL8g1QTy3Wn8dnObpB 0cv42l7QnTS91f1JMpsl/VdqNkmYQHzQ6naZd7nb0VefZIi9KOfmX4nkF+PVZXNzTmIo3u x75xcteQhO/G4OGsbMiRMVyZFkmW7houhT5QZpNiVgkVRIuPyIUhp5N3Vp7zA87ueCFAHT rb7zpC2fs2XiwmC6yD97690Q7liZkGez4Xxad9rd0f775DoyOIE7DnQciJqqfVEMrt8/p6 +jn5MBxKyglkLnF7ginbgg0IPPhGy6byHExkvoo1t77fwX2hG1uCGUge1h/2/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080055; 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=JhuE5nDhjkQqAaipk75pxinxyGFzSJK3tdT6jPQLipQ=; b=WzcENlMIfJqQzhDppIoSO0J7n/Gn1AaFK4Yf06ue5jcteQhCmjxNHCjq+Lb5KUGYrqeyXY yhuD5+ElYa7IoXEgVo8jov0uw2wTns1qMfrbhjkwGd0bls0/E3BSP/un4z/xzGppjHl2q6 NOREUB9BNCKAgHCd73GIEITULHHpPpZzVRlJsm1/FPBcHKo5K+i7dH9rKjBD9dNK8VAdWr uasQ0iwBK0OPju6R6YESocKehoKJhHLJO2wEeElYTSqvN8AmkSRjChN4TZcC2Sl7O4i8Mi FQhFvRSmHwe6mEaQZrJScEbfIuBrqzpX0wJVL1LfWdTnt83QrazEtTDjF/dXVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738080055; a=rsa-sha256; cv=none; b=PkPKGtZnKCEpf920y5l1uec+rgvSGIL3UYTW9hVuS96bi69x+tpyMZQZKPSuNrR+5KcZa6 crPB8TUnnG+GNnSFK5Pv6HSbtrWN1cn0QWT5XZL05UuQXWQsvybLCf/ZIm7G5EIFZdI/Ee BLcwAIBe+r3jqk9+sEFuXu8sIYyPv+Xuxwlx/G9D2UKoPSDvLEHpZQQbm90d6ydzfK4Fu5 441NLAPskWJr1V1eCKwDhQUb+hvPR4ElJydJh8kltLIlU4E8AV5DN/REd55Slg+6tcN+xy a4nq3sARjG84EC6jATWi65GspXU0i3a2t5GCXIVwMUqMepi2xLas0eDqy8Hnxg== 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 4Yj94R31z1z50j; Tue, 28 Jan 2025 16:00:55 +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 50SG0taD038045; Tue, 28 Jan 2025 16:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SG0tc5038042; Tue, 28 Jan 2025 16:00:55 GMT (envelope-from git) Date: Tue, 28 Jan 2025 16:00:55 GMT Message-Id: <202501281600.50SG0tc5038042@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: be53f732663c - stable/14 - bsdinstall: hook up help line and prompt for ZFS disk selection 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: be53f732663cbe9c1c4f3e7310cfa82bbe32da90 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=be53f732663cbe9c1c4f3e7310cfa82bbe32da90 commit be53f732663cbe9c1c4f3e7310cfa82bbe32da90 Author: Franco Fichtner AuthorDate: 2025-01-23 11:27:09 +0000 Commit: Mark Johnston CommitDate: 2025-01-28 16:00:12 +0000 bsdinstall: hook up help line and prompt for ZFS disk selection Previously we were passing the wrong variable names for the prompt and help line, so the intended action wasn't clear to the user. Reviewed by: jhb, markj MFC after: 3 days See also: https://github.com/opnsense/installer/issues/22 Pull Request: https://github.com/freebsd/freebsd-src/pull/1579 (cherry picked from commit d726bc286325dd7093b83c6ebcbaa768c687d825) --- usr.sbin/bsdinstall/scripts/zfsboot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 4f3c9719dde0..2b118e33ba36 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -689,17 +689,17 @@ dialog_menu_layout() done eval f_dialog_checklist_size height width rows \ - \"\$title\" \"\$btitle\" \"\$prompt\" \ - \"\$hline\" $disk_check_list + \"\$title\" \"\$btitle\" \"\$disk_prompt\" \ + \"\$disk_hline\" $disk_check_list selections=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --separate-output \ - --hline \"\$hline\" \ + --hline \"\$disk_hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_back\" \ - --checklist \"\$prompt\" \ + --checklist \"\$disk_prompt\" \ $height $width $rows \ $disk_check_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD From nobody Tue Jan 28 16:00: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 4Yj94Q3QRTz5lg0p; Tue, 28 Jan 2025 16:00: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 4Yj94Q2dVqz3mXD; Tue, 28 Jan 2025 16:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080054; 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=CbGVnucIIRIZI29wf/8+vMoQx68q8neygh7BSAbhdGg=; b=nn/+TdRYYFkzPW2Psiu079KZguZvPxorsaNgbtQw3HE4mRnLS+jmCos9qUedJUw8t1UjU1 UEPkZroX/l+mMtgcqe3yYFtKngyE3g7I73HIbXla5bOe18zngq6ydd+AIwgfSpTDd35Xng FhMrnmKBU/w80eQzgGlGl9Y3vm87YK+RRRe+dUJzlXcXeJnoMwbcg6znk6exbnUKvmg3oe 5PYCCsjKqizmLD6lj0VEIrqjOQIehWHfl0FyERCDLG1K02hb7wclltHMIHLvvdM2oZJJp6 dj8RNEe3WQEiDv1UPsjIol/cD22YAwKxEomuewtR66Lej2utKn9F+rgKqEN+0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080054; 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=CbGVnucIIRIZI29wf/8+vMoQx68q8neygh7BSAbhdGg=; b=QrfXS3DKPHFfmxxdNI8xGeiLOYyvVUl/ybrvCShFIMg8mLv7ZoSjNeROwcnB+1PwZxdeTG 4YxEzIxuDqPU6bmk9GS3nTcHYNqNuOUEYd8/vmzoFwQb7xXsTQs0vdPSRAzEycn+lvjszk CDy2lyGeYNPUAi1OS+tTSE1DP1jHv1YOHYauhhuRb5i2lN+jvUMOnOf//14xp9aID/aLBY +0toqkPuZvcy4bcR0ooteiM1oXNda+eKRfpkKqw41TcyO5Esk+S3UAhK4K7s2aYkSNkUvz ICj1jZy3X5/av5r0sgQ1zLZsCKh+f2fX6iBsFSX5uPceYGFXeCIdh22PotGJMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738080054; a=rsa-sha256; cv=none; b=yraRNcCpYHCeImmnhDEWkiEXf57AyNm5okZMOmEREXcfBM+Onig8oIMK5zBSOKP3iR5yDW MpSiB2bz56UVPtxrkpWy4zBn8BQPMDjABofmdiQ0aS7AZVlnZle2myjkpaYm4hTSt8dQZl Ofywfs004w2Q6wxq8Q7uI/47O1NzCTzml2paSUJl7fj2pRm7tBHmUG9KQ0eSfZ2HO6OLWX r4h83ozxidbRfFTPBPH5bcdW4y+1hWDQMtSQOzT3sEEmTwbAC9jjzQAbybL4438V2xR2H7 2KoA7IMl2EAyTJTKNe53m1vnve+4Ab6+8DwzjFN52gZlW54+0w2wLK85hJReSg== 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 4Yj94Q280jz6C2; Tue, 28 Jan 2025 16:00: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 50SG0s6j038011; Tue, 28 Jan 2025 16:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SG0sQU038008; Tue, 28 Jan 2025 16:00:54 GMT (envelope-from git) Date: Tue, 28 Jan 2025 16:00:54 GMT Message-Id: <202501281600.50SG0sQU038008@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: 3ba946aebf74 - stable/14 - rtsold: Add -i to the usage message 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: 3ba946aebf747e12da4fb22ee0e45ee0e3a233ee Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3ba946aebf747e12da4fb22ee0e45ee0e3a233ee commit 3ba946aebf747e12da4fb22ee0e45ee0e3a233ee Author: Mark Johnston AuthorDate: 2025-01-17 15:14:22 +0000 Commit: Mark Johnston CommitDate: 2025-01-28 16:00:12 +0000 rtsold: Add -i to the usage message PR: 266634 Fixes: 231bac4ccc43 ("rtsol/rtsold: Add option to skip random delay") MFC after: 1 week (cherry picked from commit 9e9e64b693ab1e08cca46e26e468160542c33f3a) (cherry picked from commit c4380d5b9383e2a062840573b36ab643b65b2610) --- usr.sbin/rtsold/rtsold.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index 91c80d178bc7..e0b168a379bf 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -792,17 +792,17 @@ usage(const char *progname) { if (strcmp(progname, "rtsold") == 0) { - fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] " + fprintf(stderr, "usage: rtsold [-dDfFim1] [-O script-name] " "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); - fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] " + fprintf(stderr, "usage: rtsold [-dDfFim1] [-O script-name] " "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } else { - fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] " + fprintf(stderr, "usage: rtsol [-dDFi] [-O script-name] " "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); - fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] " + fprintf(stderr, "usage: rtsol [-dDFi] [-O script-name] " "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } From nobody Tue Jan 28 16:07: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 4Yj9Cp6Dzhz5lggx; Tue, 28 Jan 2025 16:07: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 4Yj9Cp3Mrqz3r6H; Tue, 28 Jan 2025 16:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080438; 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=1nc+e1wW7OCXnHXWfu3xxaoT1+o3Pv7u5pMkTIiLUHg=; b=FKiaE1+Hqdax8aWO7nXAnwOaCJerZ/JNK2pmo7S4v4BKIOiTMOLtZZ/nvgeq4wsNFoHH13 sRqPgLXXroAx4UmZdAv7Z8eOxBjGHaE7BL15BiLCJdhdpLRPjFDVMcva/IgHVmhGta3iRF dV3cEoEyo4oZyKwCx8Nzd7GNN8FMMFLD9qJ+BNwLbPGt8L4DIbLaZkdoj6MBtuSuurHvIN TrQrmQLpwXxR/cY2EddwAYGnUaFTlr/mXguPpVR+ZIWi+yynyvqnzd1q+b9cUuPOHIP++K D9+rM/yBU/vqOQK14fMMpabVyp/U6dMkX3oT8RHwC8gAsoDxujIQQbUbsL1UPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080438; 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=1nc+e1wW7OCXnHXWfu3xxaoT1+o3Pv7u5pMkTIiLUHg=; b=Aj4YR76FrdDMjNLifKEoameZL0qggdkymDupeQP2oOgCwZIexrzbQSWNR8LFJ//D4BnuOO G03tX9Ddj0epDuyHg2ccu5aolZUUrWtz7zKr9WydqU+mN5zV5y6XdnXc9YEmbRTm4NIjTL aKP2vWSQuH8EQbeN4AeDUPGnR3HGvhuHF2907aarSvxPnE2xfl5wAmxLX4S4wPDGzhwgdw 9gPE+ecgvVxUxX15QJA+CfEFn3CA1a+Cdbkg1YqjeNJYsrnF1s0Q1CPODJj+KNQQxjqsl4 rKDJLS8ECA2FExdnTGPjNI0xGbQOUnJl5ikLprRaZ9OmdW7Sr66mQ4Ghj4IWGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738080438; a=rsa-sha256; cv=none; b=kZB4KP8kgZz7DRmtbzvyCpBvZiH4ZYeqIshGe/rgypZrAKCJAXRix5dHt9zOfkPXMHNh3b LXBYpZ1xSGeov8HQ1VEDyuCIkEZFYZAAw4JqB+sEu4FiF1rXz8ELBvXDdZsVJBjKY041pY vIpzUBYHNyZOfrpOOOdn+4Sf3Z6WP33m6FnYkrdC3x6z/L9DSglQIOituIJk9lZQMtqhGu LXj6qRpv7/bOE+LgpkJWPbJWVGZkJenSRJC7S5/Pq/XzovNXpn8f2J2IWK7rPbP0ht7GdR tDH3Mem+Fy5Nx267xSlG2Mb/DftCS3dHXDnoMbCGi3wKtMKw/DvzCQ421f9m/w== 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 4Yj9Cp2zTsz5KH; Tue, 28 Jan 2025 16:07: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 50SG7IB9047681; Tue, 28 Jan 2025 16:07:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SG7Ifx047678; Tue, 28 Jan 2025 16:07:18 GMT (envelope-from git) Date: Tue, 28 Jan 2025 16:07:18 GMT Message-Id: <202501281607.50SG7Ifx047678@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: 93836ff92be8 - stable/14 - etcupdate: Restrict access to the conflicts directory 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: 93836ff92be84a1d4e7611577ffe116a0e30d008 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=93836ff92be84a1d4e7611577ffe116a0e30d008 commit 93836ff92be84a1d4e7611577ffe116a0e30d008 Author: Mark Johnston AuthorDate: 2025-01-28 14:23:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-28 16:07:11 +0000 etcupdate: Restrict access to the conflicts directory In the window during conflict resolution, copies of installed files with conflicts are added here with the default mode. Restrict access. PR: 277470 Reviewed by: philip, jhb, emaste Differential Revision: https://reviews.freebsd.org/D48576 (cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1) --- usr.sbin/etcupdate/etcupdate.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 39d1f9e56a54..7bddd6593b56 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1611,6 +1611,9 @@ EOF # Initialize conflicts and warnings handling. rm -f $WARNINGS mkdir -p $CONFLICTS + if ! chmod 0700 ${CONFLICTS}; then + panic "Unable to set permissions on conflicts directory" + fi # Ignore removed files for the pre-world case. A pre-world # update uses a stripped-down tree. From nobody Tue Jan 28 16:07:34 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 4Yj9D62BMlz5lgh2; Tue, 28 Jan 2025 16:07:34 +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 4Yj9D61dFzz3rM3; Tue, 28 Jan 2025 16:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080454; 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=oA5nNAVWCxYXcV1TkZIs16aItrd3q3FJWr+pRswJqLc=; b=r7ZWjT73ImRlINWHXkTn1dwWeKpKvH820pO3bzrir8mewKkqHc9JhRnxh21khlZmoBOisG oaNjLlxzrmx3CL1z/MPscBNAzxTlFIqaFSQFIKOQIjgyGbPUzSF7tQBpBQdwnzSy/8WCek NxETuxMaqheIdxM9ufEkjjLsDuw+XtoNzxJj2T0Hds9GEfa5mlj5dWKAKwPdF0I0w1yMHF QQGFLMJ4ZSwHfYfMwCctIx1TFJ/SUGv4V2y8AcE7u0t8r97fVDDPtr2Y3RX3zJ8vd+S7Y9 lcSoIzs9hddWh7ayQGnLDkc+xytgeWVHCh6NOcuqFtP28jWvgnqZmVxw7bkNUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738080454; 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=oA5nNAVWCxYXcV1TkZIs16aItrd3q3FJWr+pRswJqLc=; b=nXMOVWnUAaZp6IYxLB3JREJ4B3R16RkzM7c1sA5CQ2iP4aQrWg75fW8lS1zbhTlKtmcmr8 F1eo0kJfs464euaQy163qeEfXCS51i4AvIIBNegC0RNjqtejgS0g9q52vcmpFDnBxOLHdm epqkOxPE+LP4ZDhU/a17jZR1vWTK1EPLMqwls7pkNk6GJv5jBXDdt3B951lsYrCZeMt2Wf tG0nn2tCOHabQtgJDdmBIk9iiYNqLffgJjHgEJIMkW1KUqYT6Cd49vAj4Xr2P+DNb+abr6 C0N+cOLHdYlgamJcbO3A9LqX34eDd8ngoeF8rm0y6Mu+goEXvRfFS/N/0tBLng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738080454; a=rsa-sha256; cv=none; b=KvnylHHXK+abx/MDCFuAD6QzjU4oxoSLJTPO4vq3FuCovQirua7bdPaOLkx8JOhUrBMArd 7K4b6ZZGkRKfPSsqD36YJ5sRlcjFIwOar7iESlOfzEcAfHFZ3lmZLSH3m1II89pByqoX9P jnR3eiqW8SEB34Ebk9Sh9Y4qX/dQ9MeroNe+UVL6RXhHC7mW+bLPyKNUEaO58/0XQWM6oV pCSb/QnN2eDOryghfwy94P0CPL9WBdS4v13b1slgCuRLUQmaA5aaMyoyKkp9/wpaBB459H PqbD5z0zuFJxVW3sBOAhxK68DesdMNIskXjMZiLraxlMtMYyFoFS2GoPFr46GQ== 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 4Yj9D61Ddsz5sb; Tue, 28 Jan 2025 16:07:34 +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 50SG7YSY047882; Tue, 28 Jan 2025 16:07:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SG7Ypt047879; Tue, 28 Jan 2025 16:07:34 GMT (envelope-from git) Date: Tue, 28 Jan 2025 16:07:34 GMT Message-Id: <202501281607.50SG7Ypt047879@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: 17e935f1f327 - stable/13 - etcupdate: Restrict access to the conflicts directory 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/13 X-Git-Reftype: branch X-Git-Commit: 17e935f1f327d7d4464e53f4f3d2347a51623f82 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=17e935f1f327d7d4464e53f4f3d2347a51623f82 commit 17e935f1f327d7d4464e53f4f3d2347a51623f82 Author: Mark Johnston AuthorDate: 2025-01-28 14:23:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-28 16:07:26 +0000 etcupdate: Restrict access to the conflicts directory In the window during conflict resolution, copies of installed files with conflicts are added here with the default mode. Restrict access. PR: 277470 Reviewed by: philip, jhb, emaste Differential Revision: https://reviews.freebsd.org/D48576 (cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1) --- usr.sbin/etcupdate/etcupdate.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 6d8f58d39c54..ed259da7420f 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1561,6 +1561,9 @@ EOF # Initialize conflicts and warnings handling. rm -f $WARNINGS mkdir -p $CONFLICTS + if ! chmod 0700 ${CONFLICTS}; then + panic "Unable to set permissions on conflicts directory" + fi # Ignore removed files for the pre-world case. A pre-world # update uses a stripped-down tree. From nobody Tue Jan 28 22:39:49 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 4YjKwj3dTcz5mGkm; Tue, 28 Jan 2025 22:39:49 +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 4YjKwj2wgXz3Jbp; Tue, 28 Jan 2025 22:39:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738103989; 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=ey9rliZGasBb3equzNOZIebWHvQU1WOPrgF1WJ4lhG8=; b=EtZw68crYwyCBwCPcxemy94NOiXS85srT9g7O0qAGET/GDZN3b0YgWC4wODNoyfRsjI1xM oPa4EqRq6gX+ps+TdO0h+smkDbiv93XhPG/vkHvVhbL3wNqZDK2WOefm3hieSkoGRPYN2t N7DfeIZgPTxcHvNvqQ8GuQX7ploxn95QKfQYEh6WSfrFcHMb0nYf7AftkiU7gXHVWIm8pQ 6LIg1rQCrk3N3nJ1dssEJWeBHR19vnwcEk0zyZ8jC87murRNX8NyBqeRml7Vper9sxA/rv QVg9IXiMhCWcZmMsjDOQ1VSm6W6ONbqH0/bjgK8EMAzFfOZ/WnCs9U+umKzaBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738103989; 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=ey9rliZGasBb3equzNOZIebWHvQU1WOPrgF1WJ4lhG8=; b=Qh5HkdABJINxl7gK/Fo/p6jhIDXDE3aSvrHFa+4DzQuvgKS3TFRLft6yC2llvcFmQ2J88o YBENJvs9+1QrohUjZH/j9v4u+XOsfWDOmFBkkkPKOWAtEhe/skR5pd0FAd790KUR5lYz6w 6bOZfjVpd3eUSoqdPu/2km+hD+EqSZ2R2MG7+L1PTgIqB4eBeff25hFUd5PBd40xR12rs4 X+XhCxT+nFqGNI7XU5Yha/8351/XmEmbJOaEmwtpV1gucB0++T5tzl2GoZYtU8J7rxTLIU ysOe5OZdZ95FyKHm1fx6rVUnmGgMQb7j+7DrqMaTKcyeBn00ymmvkv2Klf7AtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738103989; a=rsa-sha256; cv=none; b=VjQ+UXTwBRsiJVrNqfDikNQv5sKdQIRdl2JfL2wCjYndzlTsHgIF/AxSeDit9FmzxcqXXU Qt5i51IEvjRh0Ob/4DB27ZmFz4nY5wsEtLDf/tpH8UtRAjuXDZnKw49c3/Bq5T23+/6CSh alQegE8tSK+Lie2+TUPQL6BrtVZ/oyM36Wa0x8DJik2gt0xdhbFI/naefE2Wq/uE2iDTbn 4mlSZvziB6I7p2MjZ8kNXo4GDwnevRHyIseW4w27s16NKK5U/DybQ3/VY/q99nCle2g1ab 2L8o9QZT2VKPBXtpVQjAMACXdLpm3HeHsMpLGARBDyG7bBILL0RGoV7FUL5rnQ== 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 4YjKwj2TPYzblW; Tue, 28 Jan 2025 22:39:49 +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 50SMdnLo083595; Tue, 28 Jan 2025 22:39:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SMdndA083592; Tue, 28 Jan 2025 22:39:49 GMT (envelope-from git) Date: Tue, 28 Jan 2025 22:39:49 GMT Message-Id: <202501282239.50SMdndA083592@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: 7773d509d823 - stable/14 - fs: Add new VFCF_xxx flags for va_filerev 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: 7773d509d823c2620abb831e2a2ff7ffe174904f Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=7773d509d823c2620abb831e2a2ff7ffe174904f commit 7773d509d823c2620abb831e2a2ff7ffe174904f Author: Rick Macklem AuthorDate: 2025-01-14 22:11:06 +0000 Commit: Rick Macklem CommitDate: 2025-01-28 22:38:52 +0000 fs: Add new VFCF_xxx flags for va_filerev Richard Kojedzinszky reported a problem via email, where the Linux NFSv4.2 client did not detect a change in a directory on a FreeBSD NFSv4.2 server. Adding support for the NFSv4.2 change_attr_type attribute seems to have fixed the problem. This requires that the server file system indicate if it increments va_filerev by one, since that file attribute is used for the NFSv4.2 change attribute. Fuse requires an indication that va_filerev is based on ctime. This patch adds VFCF_FILEREVINC and VFCF_FILEREVCT to indicate this. A future patch to the NFS server will use these flags. (cherry picked from commit 1cd455f39d886f27c33f7726f79fc4cc566da7b3) --- sys/sys/mount.h | 2 ++ sys/ufs/ffs/ffs_vfsops.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 7a85d94cb4f2..efe230f518f8 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -687,6 +687,8 @@ struct ovfsconf { #define VFCF_SBDRY 0x01000000 /* Stop at Boundary: defer stop requests to kernel->user (AST) transition */ #define VFCF_FILEMOUNT 0x02000000 /* allow mounting files */ +#define VFCF_FILEREVINC 0x04000000 /* va_filerev is incr. by one */ +#define VFCF_FILEREVCT 0x08000000 /* va_filerev is set to ctime */ typedef uint32_t fsctlop_t; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 16a955bc7f6d..be24ba1e733a 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -117,7 +117,7 @@ static struct vfsops ufs_vfsops = { .vfs_susp_clean = process_deferred_inactive, }; -VFS_SET(ufs_vfsops, ufs, 0); +VFS_SET(ufs_vfsops, ufs, VFCF_FILEREVINC); MODULE_VERSION(ufs, 1); static b_strategy_t ffs_geom_strategy; From nobody Tue Jan 28 22:43:55 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 4YjL1R2pkDz5mH3V; Tue, 28 Jan 2025 22:43:55 +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 4YjL1R1y8bz3KJ5; Tue, 28 Jan 2025 22:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738104235; 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=E4whhopDHXiK/67SCIiNDTerMje62unH6RLdxMlGm9g=; b=fbKcncpEDVdxXkuskrfJImbqBfGW8RsZFk3DXVQyCAzV4yVbQWNM4Yvpz0sxA2IBI2Uxsf xEWyeP85hUCTIz/gVjNzubSBKL9EmZG1BEh5UhjxoF9zxzlNLOZVo6ywvWjPA4RLnohvPZ Jba7fk/trFE+sYTi4yFkaAuT9a+dKB9MnJwbdFcFQ2pxi1w1F3h1YggBwz9m+rYnli2V8e BnDkye8ZI2fWpSRlx1uyt+5W27Nwk/Eu17CYeB5qNqT2yr6/TtOK9dWLm883bT0cZq1WPI XdPPcljKIcS0Q0ATQ5PjHqs3xDPdqfp+c2HyjYX/HWkd1+0LWBRES6J4sGXU5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738104235; 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=E4whhopDHXiK/67SCIiNDTerMje62unH6RLdxMlGm9g=; b=iBEXxvtQ2qoV4zDEs/q5/IX1OVCi57i9ZKHq+YkR7zVtSxNYHQ5JHs6gqTir29T7RHZRSc to941khgKDUjpgou7D02/R0ULHwvAfJBi90BkmkRcc1T2141oVixiyhCp1DNI+HpDOm3d8 yGg0uJTa4zAoOQKFG73PIW471aX93NEk2hR0EzgLltulDQoRemEgJDQQFgW3Po7IPeH27X QBRQXO0ugEwlqgZQSGFztyK0Pi4J39K2XE+j5lTD89/TB4I6+EfwCpDWFjtT2bt2tMXh/v oo40NrxAa86VkHQsUBlt3T+Pq33WhpdjCrbc5K38tJPQpfxZNUw8VihVhtSTWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738104235; a=rsa-sha256; cv=none; b=tiYWDZnqtt51xL9FK4Sn0THUD9AwQORVENTosMpvFN5Wb/VmBYSrw3nXReV4y/d5sT3D8c gOqu29EAhzQcsEd97uEEpZcDjD/77K+j0d43h49DhzWsSOHUpFOoEJtPMi3qL8mqDpcdie 8rWZT9YgogFV0l3vfTB5VVVhCFDTAxDydUTHTj5afVHq4iAbkhzdh1KUF6E/aOrDByarUT QlAOfC+pWXnpLKd4VM6cMA3/QCQlGjIPBxzpbrbfV+VnBTISROnQXzg8Mh9Zd0nq94qSAm 2grP3dpX195CigkHyAhS6ugFDWkYmwnWKc7dzf/8Za/4+YOpGxLXyP0e2cNJMA== 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 4YjL1R1S4rzbbh; Tue, 28 Jan 2025 22:43:55 +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 50SMhtDw099975; Tue, 28 Jan 2025 22:43:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SMhttg099972; Tue, 28 Jan 2025 22:43:55 GMT (envelope-from git) Date: Tue, 28 Jan 2025 22:43:55 GMT Message-Id: <202501282243.50SMhttg099972@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: 0f1f6d18d722 - stable/13 - fs: Add new VFCF_xxx flags for va_filerev 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/13 X-Git-Reftype: branch X-Git-Commit: 0f1f6d18d722834bc90b701dbcf4d924f2075310 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0f1f6d18d722834bc90b701dbcf4d924f2075310 commit 0f1f6d18d722834bc90b701dbcf4d924f2075310 Author: Rick Macklem AuthorDate: 2025-01-14 22:11:06 +0000 Commit: Rick Macklem CommitDate: 2025-01-28 22:43:21 +0000 fs: Add new VFCF_xxx flags for va_filerev Richard Kojedzinszky reported a problem via email, where the Linux NFSv4.2 client did not detect a change in a directory on a FreeBSD NFSv4.2 server. Adding support for the NFSv4.2 change_attr_type attribute seems to have fixed the problem. This requires that the server file system indicate if it increments va_filerev by one, since that file attribute is used for the NFSv4.2 change attribute. Fuse requires an indication that va_filerev is based on ctime. This patch adds VFCF_FILEREVINC and VFCF_FILEREVCT to indicate this. A future patch to the NFS server will use these flags. (cherry picked from commit 1cd455f39d886f27c33f7726f79fc4cc566da7b3) --- sys/sys/mount.h | 2 ++ sys/ufs/ffs/ffs_vfsops.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 90e68e560b2f..6e1da7ad12fe 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -653,6 +653,8 @@ struct ovfsconf { #define VFCF_SBDRY 0x01000000 /* Stop at Boundary: defer stop requests to kernel->user (AST) transition */ #define VFCF_FILEMOUNT 0x02000000 /* allow mounting files */ +#define VFCF_FILEREVINC 0x04000000 /* va_filerev is incr. by one */ +#define VFCF_FILEREVCT 0x08000000 /* va_filerev is set to ctime */ typedef uint32_t fsctlop_t; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 62d63210531a..a77784b32d78 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -117,7 +117,7 @@ static struct vfsops ufs_vfsops = { .vfs_susp_clean = process_deferred_inactive, }; -VFS_SET(ufs_vfsops, ufs, 0); +VFS_SET(ufs_vfsops, ufs, VFCF_FILEREVINC); MODULE_VERSION(ufs, 1); static b_strategy_t ffs_geom_strategy; From nobody Wed Jan 29 05:58: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 4YjWfn1zbLz5m8Mm; Wed, 29 Jan 2025 05:58: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 4YjWfn0yY7z3Ns8; Wed, 29 Jan 2025 05:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130305; 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=IINMikoQddSuAr74whSUi4v6RzoZ/uWGHDK7Ofz2DGU=; b=KeQaGFSF+M7osKS4hncUOzf2C/d888FrfWvu7ysg/vBqSS8PX/Es9kMquCxaJnW2ljqrpq /wI6Mf8tSon2GPwZ3Ppz4qgyQ2+P9lIqZiIxgLUO1zn3S5zNbozOlmFj5AesVFB1Z7Atq0 yyA7J3MjzEo08MwCcZKwUjTLMMxkJuvQRqrJ1GPVkJ3w9TTBohLHNcshwLSmjRN7V4f0fk ASKLLjH+sRJNKSPHMHln/6LNV5HfvejkkWHuvStChiq8HvT4quT3lBfqtDSKF8VnIbz6Vr wezvu43A4Acejx8O7rcDxcURFX6la+UqwPDpkdwYNuZ9WQYWMu2O/z4n0A2eTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130305; 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=IINMikoQddSuAr74whSUi4v6RzoZ/uWGHDK7Ofz2DGU=; b=Oi/QXT5XnHoRYfVuxr4aS5bay5XDeuVKmu3SUIrwy9U8Xw1lxVAruM7y1AccXRwpdXRgjL i2kRG5BifQcBB8t84zwnEJNJT6gHEGSR/WP61vPNJ7F0t5f6v+uzMFhosVWR+oTq+52hvw OTCGvK5pq5tWZQlHcWp5ZrxsmpllIUAws1VNlk2m3aq9wWoX0hBJfQRVP33cpFvz7JdAL6 oCSOHXRan71SaGnemTQdD7L6OBKQvR/r2VH8fs0ONETTz6rcLnfuaCNT0jw7cXcAoCzbjL uaWIqtJojcB8NXVEHuTsJeXRu5cPkk2cUfqwbE81IQZm/UU6taVgGxLoiurtZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738130305; a=rsa-sha256; cv=none; b=yo/0N3EMl3bvJ6Ne2w0HWh+tP/RfQhAR7CbFoxupQRiaatj31Gqcsq5/zd0Q0s9pO6GL1a VK5xvWJ/4RK0d9Ur6+CevXwKfjQ/XKzwCqqC6i1jsu6jtZIL7M58hd/IWufR62DWCRSY0n C6MQc4fat3e0W3WnM5Q4xvFmUfSRszhUqUAQdvtpJ03hCxEAxmXy8G676bVQsvG488C7qU 1gXBSEpTp/gYp0XnZZ1kdYDaLqhzK0LoRaGvtz/mPMFZzfpo5WUbEx4YKIyOSEccebjjh1 4C2Z675BXm1qeQTULo3jxR9pQ5N+MQqWNgGxOOVmNUnSaHMBV8vfrV9NyLBCUA== 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 4YjWfn0Ft9zq34; Wed, 29 Jan 2025 05:58: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 50T5wOkR004491; Wed, 29 Jan 2025 05:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50T5wOsl004488; Wed, 29 Jan 2025 05:58:24 GMT (envelope-from git) Date: Wed, 29 Jan 2025 05:58:24 GMT Message-Id: <202501290558.50T5wOsl004488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 75a7424428f5 - stable/14 - net80211: Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 75a7424428f540172826348ffe61e97a7701f030 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=75a7424428f540172826348ffe61e97a7701f030 commit 75a7424428f540172826348ffe61e97a7701f030 Author: Gordon Bergling AuthorDate: 2025-01-26 12:10:14 +0000 Commit: Gordon Bergling CommitDate: 2025-01-29 05:56:16 +0000 net80211: Fix a typo in a source code comment - s/isnt/isn’t/ (cherry picked from commit abcbde5d68f1fb6fa21fe2c24e04901a53f15798) --- sys/net80211/ieee80211_sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index e48c6e084eb3..bb3e6fb86a9d 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1378,7 +1378,7 @@ startbgscan(struct ieee80211vap *vap) /* * Compare two quiet IEs and return if they are equivalent. * - * The tbttcount isnt checked - that's not part of the configuration. + * The tbttcount isn't checked - that's not part of the configuration. */ static int compare_quiet_ie(const struct ieee80211_quiet_ie *q1, From nobody Wed Jan 29 05:58: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 4YjWfp2Wfqz5m8KN; Wed, 29 Jan 2025 05:58: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 4YjWfp1bndz3Npl; Wed, 29 Jan 2025 05:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130306; 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=A0NCKUuTAhkTJOv6VPfEo/V0nD89PRPGKDWqhoCHqYA=; b=SPFthxcEGKA+3LjT0c6w6TYG1VOMrcjrA02HUeDNQcIYGGyOkhDrxpqk0DoRgkwhJ2+QMX 2n1ifOvPC2Zg5h6Z2q6M/k56W1vsrtXRM1P3fMjIe5RdSNpqk3MJJh7xRO9KUaZBIi2TXK 6zLIHjBFgBcYxXYdun2P+Kmcll4FdxX4Zk/KvxoAjkRP7wcg8pK4VONjSygjrquZeajl13 d+5mN0LWIAlQmNdbZhlrWq6TtPROpWrBOPXW4ybGfXMuyrCxgN4DI4JwGLuk5eHcf2Fpwo 8kXq/o6Jqst2DvyRbbKF0JBDQ3ouk/JpVlV1SoNpNz0EdPkGejWzX9BIHZkFxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130306; 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=A0NCKUuTAhkTJOv6VPfEo/V0nD89PRPGKDWqhoCHqYA=; b=nqCTUE1AR6XNBADgEZ+9nZVPGVfB/uKPvJkWT+Fjo+aMAeo1jA9csTQfO8dLue/zXX8TZm w11esNhU4E27X9R8iKVBmZLic9gvnGAAFipQckji3+BzavR4l7S/a3OlWs7LYRH8FB2zJl x9VYim1f7x9ddfT+ywrrwzWF754iVmK1fwLMkZ+q/bd6NcwDXvx/6vGjPP2cY2NEc+TqUs uxzy07LIOSVYTrzqiEkrWySVhXy/44fHBtHJXLubYYKl092d2D021J+V5HK3qsulmzOrO2 yLvNFDOT+IEsxMtvzHpAC7TSH83drySGyP/oOUhQxVGqXFPIdeuVL0rc8EWlqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738130306; a=rsa-sha256; cv=none; b=J5P4AwELcJyJgMOoalR5cRsIft0brM5VByDjg/hoPQq/nYNz5hw/S2R9TEH+O2vGsrervl 2hY/V0HB7OEFKQ4M5t42dEpHsV+tdodywdYATdn3M67puARNxSk5WV9nuZb7BYSxU2Vmfb 8gpGNKTrnlCFwBOhipi+9GKwdQOT/W5hw40XWOW71tUYGXff4Vh9kqlNxOqBn1q1Mw/8bz H7B7N3IbGpElmf2peQ61GVgDFlzynHq7jNhhzGje51A3fsPA1TsobVNi6K/ynRAPMiHfdI FJWKBPcI+pzIAU74lIvit0wxqNsLlKnLUtgUI50vijScXXftI99Ni2yykEMNow== 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 4YjWfp1BJwzpqD; Wed, 29 Jan 2025 05:58: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 50T5wQ30004527; Wed, 29 Jan 2025 05:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50T5wQw9004524; Wed, 29 Jan 2025 05:58:26 GMT (envelope-from git) Date: Wed, 29 Jan 2025 05:58:26 GMT Message-Id: <202501290558.50T5wQw9004524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 676794ac4b6e - stable/14 - bootptest: Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 676794ac4b6e18449e81abf627f8db8caa2f4910 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=676794ac4b6e18449e81abf627f8db8caa2f4910 commit 676794ac4b6e18449e81abf627f8db8caa2f4910 Author: Gordon Bergling AuthorDate: 2025-01-26 12:06:55 +0000 Commit: Gordon Bergling CommitDate: 2025-01-29 05:56:40 +0000 bootptest: Fix a typo in a source code comment - s/tralier/trailer/ (cherry picked from commit 5da0eee3d842bd0bef2c95553e75e462cda27ee6) --- libexec/bootpd/tools/bootptest/print-bootp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/bootpd/tools/bootptest/print-bootp.c b/libexec/bootpd/tools/bootptest/print-bootp.c index ba1c02563ab0..dabab8115313 100644 --- a/libexec/bootpd/tools/bootptest/print-bootp.c +++ b/libexec/bootpd/tools/bootptest/print-bootp.c @@ -242,7 +242,7 @@ rfc1048_opts[] = { "iIP-routes", /* 33: IP static routes (dst,router) */ /* Link Layer parameters, per-interface (RFC-1533, sect. 6) */ - "bLL-trailer", /* 34: do tralier encapsulation */ + "bLL-trailer", /* 34: do trailer encapsulation */ "lLL-arp-tmo", /* 35: ARP cache timeout */ "bLL-ether2", /* 36: Ethernet version 2 (IEEE 802.3) */ From nobody Wed Jan 29 05:58:27 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 4YjWfr0mM3z5m8Mq; Wed, 29 Jan 2025 05:58:28 +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 4YjWfq2hv6z3P0x; Wed, 29 Jan 2025 05:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130307; 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=Rq4ylFJ5MzfwBghLvHtU1PBvdmq/ckjcCOopaCvABpU=; b=eNqJtpF+HSZfWT4f4dN7q69mf657WrLAJEWNY4tX1rIk++rnnHN+BEi/Pbb6zOZ/jr9Lkh cKG0x2TIUhXuHNLMMWqmoVbemTD/woChYCHbYDJrvQPUTn1oNte3FWt5yrJflRW97Dm4Ay He72fixIxp06xRVUDFRspY0IZstsi4992zG14E6EL3TN1wPZ1CH6zlTtBAaQ80W9CFUNkw xsVRK9BQzZjVz0a8MqSPfuqiDJFllEPQcl/iz5snJRY+oqj5iSvDC4pRsni2PtVUSHiHCr lPQtLrM2EglBbQI0kmmi0pktoadE3mHEk87jkD36gOS1lK5lqEb0Iza4ka1L1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130307; 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=Rq4ylFJ5MzfwBghLvHtU1PBvdmq/ckjcCOopaCvABpU=; b=rh49+8glJvIbQ4VBcAtrVUdmvDY7M/OfaK8KCmKkfZYVwKtlJa3yEqlJeD4ZogkyXQNJYg 7LF5devWzj8g/tnUY/gj/KqrirrTJMO18runTefYJ2DXkrDRrBUYLc4rsaXSWb3bdEmbtF gcXzn6zgtLOqrAeqyR3O0gEYoBq9Wls2cOlrKuH/Q/PBhIhuvCklhF0qEZvDw1uZ/l43Yi Pt+k8Uv5761lQlXOxg4P2PEIqgZVcJHx+YWDKm9vE7xgS7BcXhJmCWgKFc0cr/m/dDGJGp F8wVrrGNcJPmZWblbZEQvqqrpp2COmAlfaoECenL3lCZKnZeS9Wvto/1fxI1xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738130307; a=rsa-sha256; cv=none; b=G5mA3OPSMLcwwtjsn/UrNmAq3guKYjfY/kwc64qw6D0RGrOfiTJhkzvfbuOeQ219FLDq1q 7hhgLpt0EYVD5KldlYFa5uxqdDMBBS1f2zUGnMYme5Ab0ZR0u6QKhKHsk5YieqSwA4VhjX Lh7YDz+uhq+cD21vlink7UD+oi+NKLUMbPolimlnJkRVDsg7RqHHzxot29MQHpXf9ZZO5w mX/YBp0nNkXK+GqHvhRRbIXmAeSq/wX5NClr6s2QQYn4JAve1KSNtcyTrhl5pahLsXa1jY wD8tqVlE8vRLdy3YvBXh4oGAaxjxoVqpCfB9iTqRrgDEAAGmKfk/J9vqlZ8EGQ== 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 4YjWfq288DzpqF; Wed, 29 Jan 2025 05:58:27 +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 50T5wRUT004565; Wed, 29 Jan 2025 05:58:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50T5wRFT004562; Wed, 29 Jan 2025 05:58:27 GMT (envelope-from git) Date: Wed, 29 Jan 2025 05:58:27 GMT Message-Id: <202501290558.50T5wRFT004562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 2239ae77990d - stable/14 - ath(4): Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2239ae77990dfb94958e49e0abbcd4834b8d3d2b Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=2239ae77990dfb94958e49e0abbcd4834b8d3d2b commit 2239ae77990dfb94958e49e0abbcd4834b8d3d2b Author: Gordon Bergling AuthorDate: 2025-01-26 12:08:23 +0000 Commit: Gordon Bergling CommitDate: 2025-01-29 05:56:59 +0000 ath(4): Fix a typo in a source code comment - s/isnt/isn’t/ (cherry picked from commit 6fbf8502a5004a99847bda57b4875b567c7ca018) --- sys/dev/ath/if_ath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 094517da5689..934024ddfbcf 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -2446,7 +2446,7 @@ ath_bmiss_vap(struct ieee80211vap *vap) * against the next beacon. * * This handles three common beacon miss cases in STA powersave mode - - * (a) the beacon TBTT isnt a multiple of bintval; + * (a) the beacon TBTT isn't a multiple of bintval; * (b) the beacon was missed; and * (c) the beacons are being delayed because the AP is busy and * isn't reliably able to meet its TBTT. From nobody Wed Jan 29 06:00:43 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 4YjWjR6Sxxz5m8Z8; Wed, 29 Jan 2025 06:00:43 +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 4YjWjR61Lbz3QGx; Wed, 29 Jan 2025 06:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130443; 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=7OrwoXIf5RZd0lTKMrnIFapFwBBcL12cHaqKHqIbrwY=; b=GKg+c+PBjNnGYAmFYlo0nQghIIwsgmeXysVJIdZA7I9zhSlqHNl2FUISgRncG0I7BAmY7r x6XjfUxRkpRC3d4ZtFX6V8Ey69il++xt4N73AzF4k0AzxATmFqDaGiwY5DcpzwjkFhzPVu TapK1IWOBaFFIDzyl8UwgsabyCcidpLiB1ZJnKm1gY40Z97GtDXOFHxfWbswxOgu+mRy0G wSV5YKKHAFluz2B8V2FU+K2htQdBHNUWlCopw7YLfez3tEtBB56r0URb3YdLmsJfr79A8a FjEBxvJxu0tUJ8ukESzAZE1GFF6oNaQGhbcdK2SQkGX1xJH4bSPutqVs8rP0ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130443; 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=7OrwoXIf5RZd0lTKMrnIFapFwBBcL12cHaqKHqIbrwY=; b=nsjxWYTfKYKFLjEIEEfMqKzbhcM2sLm0Sz8dzYnqviH3AbyoBIiJHTN+m/+a2r+FWPhflG hmCoDbp7RJoQQudKHSinkLewwy9mNkwFJhNr8MhsB0OO+Hn5FMTUw0MK1V4/GzJhy5zZef suHMhx2PduGyLORtRfP5PVjy4B0FdA/l2LLjRzy3VNkJs9txpzEs2odh8dlx79x2zqfAhu SZaSJ7lR6Yw5V+2662iaFEuKwFqjUkWZW18+GMriCybPZ2dz+y3G7F5uXwB1eOUC4ODPMq mko1Ae48GOhuZYIMqIpwgrdjvLQ1Kal/GUWsafX9tjrPzLt2PubfJCg37Jx1dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738130443; a=rsa-sha256; cv=none; b=kpunhfEfQZlxskjVQOcKNA+5h8FFVfZL7NiSvx37mhzQLpwvJBK+dJXtnLZO8+fP4+TVL2 e8SVBR45mIuB8g/KGKVau1yo/FebePgtXwYzuqihLQM/oz9ogEfIQ6Niq7FhclH4Sj9QS/ /jEP2v38kNKqkMe2b8/7yiKZReth401ZrxAVw9kwYKgaBxRPTK4lwbKqr7KNHvdGx1XCZR yrjtSC+UaLwFA0NY2cMNqastwvkOZgxXHDMGWg3WNxNrpkA0y8PLWiGpZz5qoK8ngPPvYM mcXYwVo5aF9HqpwLDOX02oODdAvUGsb831sHxoHoDrHiY/RGfLA0AVhJEOTBZQ== 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 4YjWjR5QlJzpb9; Wed, 29 Jan 2025 06:00:43 +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 50T60hXI015088; Wed, 29 Jan 2025 06:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50T60hGu015085; Wed, 29 Jan 2025 06:00:43 GMT (envelope-from git) Date: Wed, 29 Jan 2025 06:00:43 GMT Message-Id: <202501290600.50T60hGu015085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 3dc41ab651d5 - stable/13 - net80211: Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3dc41ab651d5a960e3e6547f261d2e75da2708d7 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3dc41ab651d5a960e3e6547f261d2e75da2708d7 commit 3dc41ab651d5a960e3e6547f261d2e75da2708d7 Author: Gordon Bergling AuthorDate: 2025-01-26 12:10:14 +0000 Commit: Gordon Bergling CommitDate: 2025-01-29 05:58:56 +0000 net80211: Fix a typo in a source code comment - s/isnt/isn’t/ (cherry picked from commit abcbde5d68f1fb6fa21fe2c24e04901a53f15798) --- sys/net80211/ieee80211_sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 70079f6bcfcc..227e9d8a83ba 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1377,7 +1377,7 @@ startbgscan(struct ieee80211vap *vap) /* * Compare two quiet IEs and return if they are equivalent. * - * The tbttcount isnt checked - that's not part of the configuration. + * The tbttcount isn't checked - that's not part of the configuration. */ static int compare_quiet_ie(const struct ieee80211_quiet_ie *q1, From nobody Wed Jan 29 06:00: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 4YjWjT0ZHLz5m8RH; Wed, 29 Jan 2025 06:00:45 +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 4YjWjS6fqyz3Q8V; Wed, 29 Jan 2025 06:00:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130445; 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=tiGq2Z8/6eBAIPbq5ytYlVzJ0yFXYV10ls3GHRcqmu0=; b=IzMu7Vcyiiw08QFH6sbTczyHLYwVEUaUPCEg0zDLetEfQagrWKvTYIVyw5pThNiDu1I4/c yabbEu3og4gbAo21Nk/tH+kieIiHwpx7QGu/HMim6rftCzvo2lBkITTFFiWOs0mLiWwrXO LmJNR5rZA8dWJOVV2Myn/tLoo9Rl2Y9TFdjiF1Y02a8kwUsWpB74wcZOJg9onokmOCE37y NTV4yomdYkA5eMHga/POsiTSDR5SUp5nnUKkQ5nE9kIkWp6KMa3+i4CbJR0H066Qg6PvXo 9W5Ut/wDPUEKVT4WOcNKhhUdzJTj1XEEioJ2FWG5zJAzvlJb5vF0B1/+JfbhXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130444; 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=tiGq2Z8/6eBAIPbq5ytYlVzJ0yFXYV10ls3GHRcqmu0=; b=oLE3tSoerlWJG/4TI7v5hFfgmhWL19Sdk6HAPZo8ddP0hhfcqsU0kVTPwO/yI2r9DIMmsH u/1OV8rOTiFHrT/CxR7Wj32517W5PCkelMH8BugkL8h0TcCmem4XLz/Pu6HkMk1Qtuvb53 RW5LnORjqFEc9HsRmwAFcuRdzwuKit13PFyQ5kKqXBX5SJaNw06KrZ6Ksaft0p5zpMGlnm /MFmcRy1OLPAazVDREaqXmVrXGPVGLssAGFwWJMMxIvho2+VWgs+IY5rKNkQwQz+a80KBm OIct6IIOomfST77Jtz1SYPa+0ihgL+AF/nIzGDSIUhbr8xB+5xVISK9G0AUQKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738130444; a=rsa-sha256; cv=none; b=L+8WInTOAlMZKNuie5X5BQP4c7VFsQgHjlMav71l15rslaI9FRjJ7UR0EZfl0ewQ32KNhy ZVKeY1yzvV0W/EZ5V9gyonMc+mV4f9GpMwZrPWeuopkGOD4Vsvy3Gk11CMY8Z6U5sDv2BR lItW/Cpnk6h2smh7RheAii385kpVqXYll2QN1S66jqmGPDTitpFWmnViiYZIzjBpqG9HHi UFE7FgB3xcVJIDPPMoexeQBeRs3hwDUtT8DQwjE8282huIjRM3xpEGhmNsFFc9W1GbSi6K cCGU1yT9/bjwQCPH+hHdiSsN+YuEh5vEJIsXA2jzrDyDYP1naSGVOAkD7/uzSQ== 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 4YjWjS61Ffzq1r; Wed, 29 Jan 2025 06:00: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 50T60i1J015121; Wed, 29 Jan 2025 06:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50T60iEL015118; Wed, 29 Jan 2025 06:00:44 GMT (envelope-from git) Date: Wed, 29 Jan 2025 06:00:44 GMT Message-Id: <202501290600.50T60iEL015118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 59e4c0204165 - stable/13 - bootptest: Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 59e4c0204165b09131d56ef3e7b6946f59514ad8 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=59e4c0204165b09131d56ef3e7b6946f59514ad8 commit 59e4c0204165b09131d56ef3e7b6946f59514ad8 Author: Gordon Bergling AuthorDate: 2025-01-26 12:06:55 +0000 Commit: Gordon Bergling CommitDate: 2025-01-29 05:59:07 +0000 bootptest: Fix a typo in a source code comment - s/tralier/trailer/ (cherry picked from commit 5da0eee3d842bd0bef2c95553e75e462cda27ee6) --- libexec/bootpd/tools/bootptest/print-bootp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/bootpd/tools/bootptest/print-bootp.c b/libexec/bootpd/tools/bootptest/print-bootp.c index 90a1bd88d233..176feba07205 100644 --- a/libexec/bootpd/tools/bootptest/print-bootp.c +++ b/libexec/bootpd/tools/bootptest/print-bootp.c @@ -245,7 +245,7 @@ rfc1048_opts[] = { "iIP-routes", /* 33: IP static routes (dst,router) */ /* Link Layer parameters, per-interface (RFC-1533, sect. 6) */ - "bLL-trailer", /* 34: do tralier encapsulation */ + "bLL-trailer", /* 34: do trailer encapsulation */ "lLL-arp-tmo", /* 35: ARP cache timeout */ "bLL-ether2", /* 36: Ethernet version 2 (IEEE 802.3) */ From nobody Wed Jan 29 06:00:45 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 4YjWjV27bLz5m8dD; Wed, 29 Jan 2025 06:00:46 +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 4YjWjV0Mgcz3Q8Y; Wed, 29 Jan 2025 06:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130446; 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=yf7aHJwzCKYk0whTkYmLb7EbfAU0F08k+5GFAMYNNqs=; b=jPYi8rM3/dv/R9DzQiRq4xDFiBCXyj11/dOr/YLFMlvFVrfUChSmYhnCnaxGDjnNrL6mXo hBk5B1s3c/0vlEiExvfYWcYbGzzhdvmFYMRmbvOS5xulb+hxJOSl4ExQHXjkxFmpxX8+Lc PnzwIDj7LUf9NI6bTwlrQjAR0KtVL9FQON94tgIgdd9oseMrvDEyauQ98RzRMzN/dPSjQz Kgz0lD9lZFHhc/kDjyzWWR9ns8ceAr8PM2SWL7FuVCUrw6ifcNBMOQvZ0TFgRsGyG5idDv GbvrV3zTQTAnWay9mj/FOuehwguV0d13itEG83o7tKZM8gaXBi6KiMOup7hh+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738130446; 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=yf7aHJwzCKYk0whTkYmLb7EbfAU0F08k+5GFAMYNNqs=; b=KTB8axuWhEveTNjzfgMKcDn5xWXbRcr5zlXtle6bwemdyDw4ZhSykCdJvsmQRLqb5AKpaI hwZfqNevUQmZmVKKUsxRESutUb3iuSKDrT3crjMqIj9Qgf69gOBXN90r92SfD91Pr/j5Gi 1udj0cnFUY2rTkSc8FBRkJEp2Y7XWJVdo3EjUIbly1bQ5qdptZglKwTelKxW+98+s9CigY 4bou0i/XKYrqc4CBC4fVH+BN2Ex5t2yhIx/8pwGUFBSD6fZ6HoFCI9TMKubinByia4BIuJ L3CdcSnntUofiN2j71heG0XrmmcrWFUFEGj1gbYRf0wh57SZ/HzQ3Pigg0e46A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738130446; a=rsa-sha256; cv=none; b=baXT+XlUfQLjhwsxI/nkntuPp/iaQvblwZdvJgm2lh+JvmsxiT574oCzWIJt/ipA00T/v6 TJyfy/+bxy+TL9xVG7a2GVV0e1Fx+kSEOpkgUF3+tcLKGscOV1CHG0CTgJQW8aRR4SaoWT eTiW51lvZG8xZyzB6Fkz+eIypaao6Jwf/NTnYrplyhyGxGdKZoNAzALOvGXae5JefrLpt+ qUgLTApJss6AZEwBhOSs3i6GBP26cOSjgOWI1l9F7EtOgDQCY8HO71AhiDP2OF/a1NbUg+ D58kdA7oCdqsQ512tDtmJTvFQDtJuzZBlrIunE8bRvbZFecTPYq3opqrnavuLQ== 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 4YjWjT70Cqzq1s; Wed, 29 Jan 2025 06:00:45 +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 50T60jv8015154; Wed, 29 Jan 2025 06:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50T60juC015151; Wed, 29 Jan 2025 06:00:45 GMT (envelope-from git) Date: Wed, 29 Jan 2025 06:00:45 GMT Message-Id: <202501290600.50T60juC015151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 73e80499b948 - stable/13 - ath(4): Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 73e80499b948269f83ee95cc2a310cc04ae092d3 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=73e80499b948269f83ee95cc2a310cc04ae092d3 commit 73e80499b948269f83ee95cc2a310cc04ae092d3 Author: Gordon Bergling AuthorDate: 2025-01-26 12:08:23 +0000 Commit: Gordon Bergling CommitDate: 2025-01-29 05:59:19 +0000 ath(4): Fix a typo in a source code comment - s/isnt/isn’t/ (cherry picked from commit 6fbf8502a5004a99847bda57b4875b567c7ca018) --- sys/dev/ath/if_ath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index fa04167ee0c8..d105e6a2bf06 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -2432,7 +2432,7 @@ ath_bmiss_vap(struct ieee80211vap *vap) * against the next beacon. * * This handles three common beacon miss cases in STA powersave mode - - * (a) the beacon TBTT isnt a multiple of bintval; + * (a) the beacon TBTT isn't a multiple of bintval; * (b) the beacon was missed; and * (c) the beacons are being delayed because the AP is busy and * isn't reliably able to meet its TBTT. From nobody Wed Jan 29 12:35: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 4YjhTP0n9cz5mgdP; Wed, 29 Jan 2025 12:35: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 4YjhTP0GWkz4JHd; Wed, 29 Jan 2025 12:35:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154153; 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=543ClobAozbmfb4GZK4QOOnzVNOfnxatYu5znZf+6WM=; b=QnAXNd3VmXG71DSjr5EVeXcEW8qHlRHzxKKYPVbTU944heUMH1O3yapdnvkRL3t5ozxje4 kzFBWXjl7V1idODIlgzmBx+3Vl1sgyOykYaZXRlYZmLe13d6B6vtV4tD45JSeXpf66k0d+ yvqXIEWkRFo0IMKToFCp98HE0JGIHCA7UYL6EqasB7qzP7uq5Pa+zz0IIfjFuKeO8HV0Kb VlTklNg3Ie6owWeU8XMs0bh+kYd9/rxLzefJN3hV4aWKASTK7XJUOJjtNEYF8fCGdqTjPg txeSEAxAGkDUo9/C3OHzy8lolKe6amCPE5RGkzVwjibhu1e+rUsIXoNuMEpXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154153; 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=543ClobAozbmfb4GZK4QOOnzVNOfnxatYu5znZf+6WM=; b=Y9wD7mBzIHu7uYfHAf8L45aSUr5veXlgHB57RI5DbSoojlOdVcyZCJoVhw17xA82DDT2Jv OCoXmKv0wsbhF/1kBsSBVijvEdlL8f8/B8Mp6X+08aaoXTSP/7ddwgsrA08O6i08UYUe2M V7oQAL+GvrCRzMyrTVXXhAUUOkLfgvYZfJNpZXcUGh+bqdNhxXpE0UwnTsSUK+CAerW82i 3NIWGJT0XlhHdJDXh7bBdpjvoRhYxFumJKlXw5/jud8kG5A1/uVYTJzIZQxQ1CEYRnTqxF c3R9/fjUg8qV6pnHYWHuj2kWxZcCCoEguWKoCO4bceiG1T5SiQRZ7OnkfRCRFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154153; a=rsa-sha256; cv=none; b=RYx6FQ2m3Rq0QsAeIq+4KQtMdTatZZ47Wcg9EV/xJOXCR6lpgYfgY1DlyyNx3MWn0FaS2a MvD72nshOU2CHTFOpKgG71kvdVzFDFojjLncnpEcJdiUCBsFoHdhUXszF97H1Qgeytbo3U UdgjYRllfpW1cMS3/F/EsV43EifUkK8wy10El7IMNV+A4pGAeL8sYrC7B7DbLEjFnM5IH1 YfxTBHQtamz+Nq2GRt0k3u5H59gBiwS7r9KhZu1d5bmRUzhYwQ9vR/QZE70XNwhay5J4ZJ 77NJ5ubgp4pZTrxc+oZ/9hMMGuL7U15iOwzPTwCgCvOvSMqi3AIi1K3OSxoE4A== 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 4YjhTN6yK2z11vm; Wed, 29 Jan 2025 12:35: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 50TCZqjP051186; Wed, 29 Jan 2025 12:35:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZq7Y051183; Wed, 29 Jan 2025 12:35:52 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:52 GMT Message-Id: <202501291235.50TCZq7Y051183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: a7a1b235501c - stable/14 - colrm(1): Capsicumise 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a7a1b235501c2daac8fec2e4249c25aa4a888e75 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=a7a1b235501c2daac8fec2e4249c25aa4a888e75 commit a7a1b235501c2daac8fec2e4249c25aa4a888e75 Author: Faraz Vahedi AuthorDate: 2024-10-27 09:01:01 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:08 +0000 colrm(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1496 (cherry picked from commit 95498a5acc0888ed2e73237b82a1e90f109473f9) --- usr.bin/colrm/colrm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c index 06b5e817f618..6886a6644bf5 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -53,6 +53,8 @@ static char sccsid[] = "@(#)colrm.c 8.2 (Berkeley) 5/4/95"; #include #include +#include + #define TAB 8 void check(FILE *); @@ -67,6 +69,10 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': From nobody Wed Jan 29 12:35: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 4YjhTQ2fQVz5mgqM; Wed, 29 Jan 2025 12:35: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 4YjhTQ1j0mz4JFL; Wed, 29 Jan 2025 12:35:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154154; 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=x7VKATc2AAffHQzmLCIcb9B8AXIToZF4+HYtrzC9C7o=; b=cRIOy6dTMiISIZAsjsxHSJg9Pnn7yg0KNkhoa8/i2lDfCclVA75btc+9dJ6lYba2LH84SC p98m9Zlp4NJrveWreFWipxKhANv8ektu+T/su9cT3diYj8hnHmD+X1fmyPsPCc9eAWvrgN 8IHrUiPHhd/efnic0AgZiTPZqTAHOSz87tBGT2MFMj/aIlfMAhHeAvXCDbc7Izyp78HzbC rr1VjTohu4Dy9161ha13pirVmP99Knoh99ukqvmBoWiBSA15dtGZCMEJTaggHtTvreQqjX NHjJ1IRy+f3sPlsTqZAtWMRs065q0ZFzZ7km+jIeZIxZjxarYlJquBTO0b/0Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154154; 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=x7VKATc2AAffHQzmLCIcb9B8AXIToZF4+HYtrzC9C7o=; b=p9akKYtoEKjQR42P+LqGQMAKOOzplsdUTyhx6duLVvd5mKf/+gToTPO9Vxw+BBi659oQZ3 xO/zM5RnRAImE8hyBD4HvOTkuOgX7ZpnSVO2+L/j1WofDKKU2qfchxBwaqbicKXcuZTS9Z PnVtwOMwFdIJkSg5CkNh4frRNNAHAsWm/gDpnn5YeXxvJ/d5q1V/T/l3Ceb2z0GjysAKgh 7ldPoRJsaxa8nlITsYIMTndW6kGU5H60E2twIjkpGHQ9jXG9DoIT+ZvCE3rcOucSvUUKhY uarlPGF2rl3SgGN4wBmM7KCz6kHiN6znsywL6TOg1dfAHoumi8rZ4NzYnJFmyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154154; a=rsa-sha256; cv=none; b=cotg7hl1J3Rc1uJMLR/bbLOI1bim5hdnn5wTmw7xQa8DFREtwcPUokocPRVFgmPg058lbb EvNft9xz4glbHyYJXel+mz+JOZAiGwY54d6OKEwCjPGUBp+OSgq9uD0u5beHuIxrvKEth/ G4UTdG5jvbXF+nG0Y5QEth3llaHfiPZiPBieXphB0OCLzaKL5sbr0bKoeYFDCor7xLO6I8 RL3P90rqLJ1RFgaM+D2BC27+za2YuQ/mzmI+APcy7Jc1quSK+bn4qys9Hl1dGRG16hjnNF BPqlFkMypibsFWOxhXPhT8e+fuwQ5+WRAiEFkJ2qpP/wwEtUeAyjuJYKVU4UhA== 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 4YjhTQ14ZCz123H; Wed, 29 Jan 2025 12:35: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 50TCZsGY051221; Wed, 29 Jan 2025 12:35:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZsTg051218; Wed, 29 Jan 2025 12:35:54 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:54 GMT Message-Id: <202501291235.50TCZsTg051218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: ac068edaa804 - stable/14 - perror(1): Capsicumise 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac068edaa804922e708af99c32a69cb2e68c0388 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=ac068edaa804922e708af99c32a69cb2e68c0388 commit ac068edaa804922e708af99c32a69cb2e68c0388 Author: Faraz Vahedi AuthorDate: 2024-10-26 18:38:08 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:10 +0000 perror(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1492 (cherry picked from commit adc02d5e3cfad9c9d7e12f776cad651795d9ad78) --- usr.bin/perror/perror.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index 2ef65adf56e2..bdf19e2423cf 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -35,6 +35,8 @@ #include #include +#include + static void usage(void) __dead2; int @@ -45,6 +47,11 @@ main(int argc, char **argv) long errnum; (void) setlocale(LC_MESSAGES, ""); + + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + if (argc != 2) usage(); From nobody Wed Jan 29 12:35:55 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 4YjhTR5NGtz5mgh6; Wed, 29 Jan 2025 12:35:55 +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 4YjhTR2BWcz4JMS; Wed, 29 Jan 2025 12:35:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154155; 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=Obdz0I+Q1Y+pGLbiv2yMm1uP1LFYbbcUi4znA5HWaQE=; b=I85HejLUct7SAuzMq34UgiqyXtS/Ign0nHV7EA256uDWGlFaYzgBW5IngTko2EV7wEvWtv NTnqJmjgE4yLPA8/CB5v64hDbQrgZ+72WCY3sMkWjTd0PyMFiVjxJx+3adjWViC5LwWp88 L1CdwsWScbFGE85O9DU0zY9/fuJg0N8HXNNw8ZnwfipyRU+rhUAPaUIv6Lxo7stZmi+irA kud1Mfh9fLxwk7owg73HcQGe0SaZrvt2GaoV3Msdla2mE9Ifxxq42AnemWq1tOmgS50jKi SGupQ8+cXWLbmvg1RvX8UjWKDTHwMYHtV+OX5JGagtYN3rLLNedcJkcg01+ohw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154155; 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=Obdz0I+Q1Y+pGLbiv2yMm1uP1LFYbbcUi4znA5HWaQE=; b=HrKF/I9KRE+8zgJzN+pPQO/jEIRSXpQvg3s1JT0Ycm0J40gFg/HijS18JBF97R82bKI7z7 SsizbPR2L2X4SMQ8VormGyWSPYg6FE09z+GSRTYbYr4lvb/S76JsuUbg2t8xpQiNCL22WU 2FTK1vjJfYFw9yJQJPqy4UGn4u1jlJdjzdw+SfcrXg+6ULbr4T0DriSMko8ZY3WoaEh/56 n5iqn9AN34KjxP0cyjeGTpgvzN0I25sHeYfqPQ8q1lPFR3il0LRVYne9vVD2aR20XYnOgw U5X7gGwMLHcAfCt9iWmY6HA7PZT2efoCkr7KfvS9pevUGCmZQewFrFOkBYI+fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154155; a=rsa-sha256; cv=none; b=XbsO95jxit1qxtj/ndDFjrRwLwvGnoTDdDcQiCfMoIHqLJR7+dXmQxONu/N2P4cPBqf+gW 6S910YEb5fH9Jsb+5+7QBMXzqN1GA7R0GGyFRmznklJMN0RkyqVAvFcDyo5Z7LGxOJKGgT 2hUaXMYdyLiUoY1jAiC9nUr+XpBgdbctfHhM+Atc8HrHkzmyor66MdSl5t7wYR3qDATb8S hoqVY1HzAXBrtCKAXLkfi9MUOYZpxbfJL+kyAdPQZr+5pWB+9SydhwrbSr7L8G0O6cK6ZF oup8mDZvRQ/vXZdh5rRFh6m6jPM5Yhncx05Ma2cyqVUSb0xVYXER/hIxC1YTlg== 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 4YjhTR1hDBz11xN; Wed, 29 Jan 2025 12:35:55 +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 50TCZtqp051255; Wed, 29 Jan 2025 12:35:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZtSf051252; Wed, 29 Jan 2025 12:35:55 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:55 GMT Message-Id: <202501291235.50TCZtSf051252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 15261be6003c - stable/14 - leave(1): Capsicumise 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15261be6003cd73e43848e805b893bbd1fe542bb Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=15261be6003cd73e43848e805b893bbd1fe542bb commit 15261be6003cd73e43848e805b893bbd1fe542bb Author: Faraz Vahedi AuthorDate: 2024-10-27 16:34:33 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:15 +0000 leave(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1499 (cherry picked from commit 24a7303821ad2343b9239ab3d12a569a70a2b99a) --- usr.bin/leave/leave.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index f9e40be124a0..ccea5d93d460 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -49,6 +49,8 @@ static char sccsid[] = "@(#)leave.c 8.1 (Berkeley) 6/6/93"; #include #include +#include + static void doalarm(u_int); static void usage(void) __dead2; @@ -73,6 +75,10 @@ main(int argc, char **argv) if (setlocale(LC_TIME, "") == NULL) warn("setlocale"); + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + if (argc < 2) { #define MSG1 "When do you have to leave? " (void)write(STDOUT_FILENO, MSG1, sizeof(MSG1) - 1); From nobody Wed Jan 29 12:35: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 4YjhTS6mR3z5mgn8; Wed, 29 Jan 2025 12:35: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 4YjhTS2Y42z4JFZ; Wed, 29 Jan 2025 12:35:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154156; 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=MkqeNHLOqGb+GeXUbFJvSjybaZpbPzObQQOf/boGjgM=; b=bMjIvBNHYL/iEG8Hihq59R4NEsrxn/eYOqflMyHGCRG4BPRQ1T3O/1sGGaOYNiFy6M0/CN KCzvNzOo8R0KoL4diexqtLTIOb5IOpcHKXX41IbsmbyOwieLiTD8dHnYYl9LVAbylPR5qL ZCx8E1i+8n/Nzos/F/uugTqFooJlEbj4pMjUxsj+jrde89EbykRzNg8ZocuVJYZ98/8ajQ Os+2xZGkH566cfgO8VASvoKbIvinFtgObnKpJ+fKKMw5Q60qvoHGhJq5zyLe2VJ0mgp31M TsOujUr22oo98Dy7wjf6HVdIQsgLtlFOKZi9xLGAmlXSRMyU3CSowC/v5fqMwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154156; 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=MkqeNHLOqGb+GeXUbFJvSjybaZpbPzObQQOf/boGjgM=; b=Dj3TqdoD1lxn62TrlFICqol6RN1miQ8wGRMFrUfnxxMFqSMyplmKgsEsVJ2PT/fXqvf3E6 T/OCnmGc0j8aNhPqxL+nfDOr9BSpMNG88ipj0bvtX9bRam1jwSC3eheCV2x20qPH1BcDrO 6CnMXVfbey0Bc86aT5WQagKGnOOEtCFqdkKWJOsbwzmfONapDghkJ4t66FABRhfbo32/Ni pK+iY33LPGGp1ZYzkHG+UFlXJvWPpY+KfIUbIY9jMmPAcVlwZzwiuYlnKSuK44K1LG00wV fpGmatehCcTVuMN7wKPWZlKsgIwOp5Kwt8X3zBRcIUJmdzV33cTnF1nYVVJBQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154156; a=rsa-sha256; cv=none; b=Y4XyqzF5/5R+bQlQfwhdK5pW0/LxmLExOXM5xZ24FmpKiKsluXGJc588XArHL38TCWqY0W AFcc8mnYTszsJicKVn1rYMtrTMH0xbSEhZ4x/qdhPQEDNKTMZCttafbvcJ4tyZc1BcONix k1sPjykVOip7GNkXWX2F3DO1dqc8cgCF5ZQPxofnwvoQP1DFxiI8LvAXnOPZcriiGuVrV4 LKx00o1LB19kGG4qGMFuxxD6oowkpB8UKWxJsSlhuWGhqINjhWfskA3zQKSZPrXH10dsTK VfxP31ZyljQN7cS6a/CwARRWjjAQNDyEDol86Kusd+FbCrXVrJhsaQ+bAtFJng== 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 4YjhTS23b0z12FB; Wed, 29 Jan 2025 12:35: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 50TCZuHV051290; Wed, 29 Jan 2025 12:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZulQ051287; Wed, 29 Jan 2025 12:35:56 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:56 GMT Message-Id: <202501291235.50TCZulQ051287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: ef3914a56110 - stable/14 - leave(1): Replace magic exit codes with standard macros 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ef3914a561102b9ad8330ea88bfa8c32b79a5582 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=ef3914a561102b9ad8330ea88bfa8c32b79a5582 commit ef3914a561102b9ad8330ea88bfa8c32b79a5582 Author: Faraz Vahedi AuthorDate: 2024-10-27 16:33:05 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:18 +0000 leave(1): Replace magic exit codes with standard macros Signed-off-by: Faraz Vahedi Reviewed by: oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1499 (cherry picked from commit f7a6cf3a020600b77795729d1c01780dae8e6d2e) --- usr.bin/leave/leave.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index ccea5d93d460..78bc17be2501 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -41,8 +41,8 @@ static char sccsid[] = "@(#)leave.c 8.1 (Berkeley) 6/6/93"; #endif #endif /* not lint */ #include -#include #include +#include #include #include #include @@ -84,7 +84,7 @@ main(int argc, char **argv) (void)write(STDOUT_FILENO, MSG1, sizeof(MSG1) - 1); cp = fgets(buf, sizeof(buf), stdin); if (cp == NULL || *cp == '\n') - exit(0); + exit(EXIT_SUCCESS); } else if (argc > 2) usage(); else @@ -135,7 +135,7 @@ main(int argc, char **argv) secs -= now % 60; /* truncate (now + secs) to min */ } doalarm(secs); - exit(0); + exit(EXIT_SUCCESS); } void @@ -151,7 +151,7 @@ doalarm(u_int secs) daytime += secs; strftime(tb, sizeof(tb), "%+", localtime(&daytime)); printf("Alarm set for %s. (pid %d)\n", tb, pid); - exit(0); + exit(EXIT_SUCCESS); } sleep((u_int)2); /* let parent print set message */ if (secs >= 2) @@ -166,7 +166,7 @@ doalarm(u_int secs) if (secs >= FIVEMIN) { sleep(secs - FIVEMIN); if (write(STDOUT_FILENO, MSG2, sizeof(MSG2) - 1) != sizeof(MSG2) - 1) - exit(0); + exit(EXIT_SUCCESS); secs = FIVEMIN; } @@ -175,24 +175,24 @@ doalarm(u_int secs) if (secs >= ONEMIN) { sleep(secs - ONEMIN); if (write(STDOUT_FILENO, MSG3, sizeof(MSG3) - 1) != sizeof(MSG3) - 1) - exit(0); + exit(EXIT_SUCCESS); } #define MSG4 "\07\07Time to leave!\n" for (bother = 10; bother--;) { sleep((u_int)ONEMIN); if (write(STDOUT_FILENO, MSG4, sizeof(MSG4) - 1) != sizeof(MSG4) - 1) - exit(0); + exit(EXIT_SUCCESS); } #define MSG5 "\07\07That was the last time I'll tell you. Bye.\n" (void)write(STDOUT_FILENO, MSG5, sizeof(MSG5) - 1); - exit(0); + exit(EXIT_SUCCESS); } static void usage(void) { fprintf(stderr, "usage: leave [[+]hhmm]\n"); - exit(1); + exit(EXIT_FAILURE); } From nobody Wed Jan 29 12:35: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 4YjhTV1MSNz5mgkw; Wed, 29 Jan 2025 12:35: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 4YjhTT3llKz4JVX; Wed, 29 Jan 2025 12:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154157; 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=fvheFs34KopU/WBiN1jVq4pzs+GEsC08xK/S/wtrYsE=; b=aszBV5DLq48QQtdNgXofhxj5Z10uccAJu649sxYgIkpbah1+GzKYDdkUMUEOFrjFFZXID2 XCLp4GrvYvHFhu61RiOXOk9rVoK2q0nDrilVm2213w4Su/NRELKXR1xMKnaPHs4+UvkYm7 l6yxHR9zRji3NgHB69vv8VWqT/4zDUDzqVjXGSey2TOxHBnA4cd57Vc0xNZm2hebrIdFkJ RDPExv6UwsEW48XzJKbeRWM8VU6yoAZhP+yeqolUED8uyXDEx5aYN9CiZeWuaqx/C0zsme lVSr8NH9THv3HX1iWdZZVgFoaKuvaUDlvYPEkdv+WgQW8P5Og+AF5FwLfdmzNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154157; 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=fvheFs34KopU/WBiN1jVq4pzs+GEsC08xK/S/wtrYsE=; b=YQLIa5WXnoWa9MJSrz5DdiWk9d/I+J2PTUuAwVQFOjzzm//2A2buLbCX+DT3PUcv5FjcbG Zn9xX14OlGJ5iL8yaCyU9oT9yZbMBo08+QPKq3QRA3lz+tWeBehk5XYf6vMdBvkn7WpdrZ cXKbmPNg0HzCeoBztWoQPHMsAz07Tq2E+KT27/JdnYDDN5tARbCt/QrA2MAU461rfxM2sc 1n088ZJYjX1YcIbuYW2nu2lJXJxR8Xu/gM5k0KGGk3qmlf0hLT4mOlh7ns+BeXmH0mpnlA iU+057H370Cdl7uJfCPY+ctXaa8+Eq3M07AH9bHV0tBebvIoxX5iyHTv2KRubA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154157; a=rsa-sha256; cv=none; b=hv5KAEWGZJY50wwtKTznmOSvoLz8x0HiIjCcepQlhydXWmdjMnciIzNBqAFxTi1dMaFVEK EmJ6udEUM90cqmqBhXIvMdCMXyKdEzDI/rsDuq9zVTwQ+hiRaADygSPGwxSqstRth5+5g7 7ayb6hugSSg2erOVb3k2N+n5/XSi4fJEMpmFc6Rr4hprj3SWuFhV2SxVLawy2lES8yN5Ul jR7jx5zDpq1EtzxHRsfS4J4Cp2sMlhyEiJxCZsmkk7SWTea3yMYqkh09rvINqdY8A/JvEN Gd+KA++Z8iDgmOm7bjbTNq9pFaBQpOoq6ESIFe4e7KiU/EanCwIK4ZbyD8ACXQ== 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 4YjhTT3FBfz120q; Wed, 29 Jan 2025 12:35: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 50TCZvk9051331; Wed, 29 Jan 2025 12:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZv2k051328; Wed, 29 Jan 2025 12:35:57 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:57 GMT Message-Id: <202501291235.50TCZv2k051328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 75c8e113e687 - stable/14 - leave: we should also cache time zone 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 75c8e113e687c4b3d8a284a94b6ec577bd20f791 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=75c8e113e687c4b3d8a284a94b6ec577bd20f791 commit 75c8e113e687c4b3d8a284a94b6ec577bd20f791 Author: Mariusz Zaborski AuthorDate: 2024-11-27 14:17:07 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:22 +0000 leave: we should also cache time zone MFC after: 1 week (cherry picked from commit 08a38bb098e96f2ec77b26fab3b22bc4be89332a) --- usr.bin/leave/leave.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index 78bc17be2501..e6792a50e5ee 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -75,6 +75,7 @@ main(int argc, char **argv) if (setlocale(LC_TIME, "") == NULL) warn("setlocale"); + caph_cache_tzdata(); caph_cache_catpages(); if (caph_limit_stdio() < 0 || caph_enter() < 0) err(EXIT_FAILURE, "capsicum"); From nobody Wed Jan 29 12:36: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 4YjhTY45zQz5mh50; Wed, 29 Jan 2025 12:36: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 4YjhTY28Q6z4Jf0; Wed, 29 Jan 2025 12:36:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154161; 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=uWYT+yf0VKuBRVkoX3AMEfm+wjjSNRTKxVsYnZ+CBiI=; b=FAQt2dyvfSS7hOI+q4BuJc6HDBMQsRRosZf7TVaR43g/DqJ2H/GPDpxOC+HR3CE68PKSfT N6z/Mymc4yBNR8K9Uq0dmbK+LlwJ637KsjZWm6NHks0JrnhuOSj4CmLdedmMUEcNAnUArS 4h9ztfgtqy/Y+EzqBlPa4JA+dn0x9+Ns5KqjU5231csGLokExAMeTRDxtqPLNh/Qpfmd3e Dq4heoTX112iESzn5qGiK0qXudLKr1hcIZfUcf6A6uA2NM0c/gfWgMd62ocBq+PNpmp3HZ zzy90m2mniRKVsMeuBERlXu+RrKMHaG3KTpiGfV/P+vNRgj/TIu6LAmZDOcPMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154161; 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=uWYT+yf0VKuBRVkoX3AMEfm+wjjSNRTKxVsYnZ+CBiI=; b=MACXAfbILGRw7pR47a38rHm3/yh+mz1SeuDZLdu96XPWwvstobcYhcTmhBf5GOOfP+cV0h 2afd8BuAC1hJ+k+kV0Fr6+0XWx9I88gtKPrN2PQFJbDW6X+lt7DRAyYYjzNW8YCZalpqxG RkGo0XcKtIQO6eJv9Scq1cdSj65ff1jd9pI3XUCSVmGhBaaJGEs9oNRwlZYnniJk8Onmwe o4VNJNF0rRupVnr6g8sMMEkQI25ekITcSsrjyTMIDa+uyXLN18/XpypPybpUWpOCMegGHy ISumvUsPNz+KtQW8bpCTskRBoIBpiowsMIgxxfqAcLZR0Mbp8K3E7s1Vh/OIjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154161; a=rsa-sha256; cv=none; b=iVVudfLXy6kgmEi4frYjkleth6mA7Tmh6pXdmiUiccjnQx0qkFlQIzTcPyEQTMpApkpzxr fgPX7BR4K5DcYPYPFjqCNuiU9TX9LBL8lqjwRgdo9RNVhrRqhaWTgqkDpXebMUqdJWbhpo 8nF7XvPEojCRFDh3ZfO+Ji0670IE0Z2xy/b+T6aU59Bkhh75TnD/o2TxPtHBpfU9BD1R+r UvQ3pNZYhv+A8Nd0euGbXBngi980iVGxhmMFc44yYJzXw9x+FmVCLRyEo2ed+y5J2uQxyi 96Xp6PY+Zat3Hr8KaQfqC03YQ+uwAb1vAbjJMMXRZ7KfNqCMv+f7a8gg0/jdAg== 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 4YjhTX68Rdz11Qd; Wed, 29 Jan 2025 12:36: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 50TCa0mZ051441; Wed, 29 Jan 2025 12:36:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCa00T051438; Wed, 29 Jan 2025 12:36:00 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:36:00 GMT Message-Id: <202501291236.50TCa00T051438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 6285abfcf3c2 - stable/14 - nl(1): Capsicumise the utility 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6285abfcf3c2ba5faefed44a38604823f7ced9b1 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=6285abfcf3c2ba5faefed44a38604823f7ced9b1 commit 6285abfcf3c2ba5faefed44a38604823f7ced9b1 Author: Faraz Vahedi AuthorDate: 2024-10-13 20:03:25 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:31 +0000 nl(1): Capsicumise the utility Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1465 (cherry picked from commit dfd52321b7beba716fa2bdd4f54e57e9ac806e96) --- usr.bin/nl/nl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.bin/nl/nl.c b/usr.bin/nl/nl.c index de4314155ff1..e0c9f21b45d4 100644 --- a/usr.bin/nl/nl.c +++ b/usr.bin/nl/nl.c @@ -49,6 +49,8 @@ __COPYRIGHT( #include #include +#include + typedef enum { number_all, /* number all lines */ number_nonempty, /* number non-empty lines */ @@ -251,6 +253,11 @@ main(int argc, char *argv[]) /* NOTREACHED */ } + /* Limit standard descriptors and enter capability mode */ + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + /* Generate the delimiter sequence */ memcpy(delim, delim1, delim1len); memcpy(delim + delim1len, delim2, delim2len); From nobody Wed Jan 29 12:35: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 4YjhTX1ZwKz5mh6C; Wed, 29 Jan 2025 12:36:00 +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 4YjhTW5hyBz4JYL; Wed, 29 Jan 2025 12:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154159; 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=LaB6tbUBbUeH49D0eYUa5ceHxUthqCnfgMlNhArqGXA=; b=v+9AzYSnxFiNpAhtrcGpCaDRjq1tN3WfmqYjL6kbi2TdXmDCzlzW7IxzKcA0elWDxskUVs EDLSszsIxnkhdDYUr6Njp35suNtNbUvig2iywd3t7+25/qBTHCPMCZNKJNqXVSfNlq+GSc QvpH1/IZRbGEI78rlFcXnfFiuN5Sv0fWPJYSHoIe/2V3EKW9l1D4UHkTtaF7wGZ26WvMo9 El2bxKCUfJdJ20FFjG+HD6hgB9AywlP2z8hvAe2sV1PKBHIuZreTROhFIaOMIQTXxxj38/ Nrpdb8ApyBrGhrVlGKU7JXyRn4BdC89eaDOW64FVXd/IjmApWEHgB/ll8UbAIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154159; 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=LaB6tbUBbUeH49D0eYUa5ceHxUthqCnfgMlNhArqGXA=; b=qGJyGI6W1Dy+gCkBXI45eVu5CT3Rwkm8Q4p2LgV7Vy5wwJy+NNoZQYCd12+hhKdhyhGhyK c/5B2Hd79EvOm1LpF4hn11W4xvmruJWMXmOAXke34cROQEfAf2WOapbKbYo7ozplBqItKQ yCurRWTX4c0buur+DC3mo70bZHIFskQdc8cd8a4pxlM6IdgkC8w1wB1nGGvLcAAk+oFhAq ENVLqHDaSt+fIAQ+RQW4Hc+mvtwGSxfarzaFpgkln/1bh24NeMovyy2dfrlbRC88fEPUgN v61n/QHeTuyXj76D0OlfVwsRjLI4azfth7x/Ly7jYkRzR/2PBaLWOtEgU73aiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154159; a=rsa-sha256; cv=none; b=W5dCXL31F6Y8bmdPNf4nTyFUrWLYN4DG0Digocp8q/49sjMHo5ZaKdotYxRS3YJgd2FGl9 SMMt6D5rPOU+/gbS88RY6utqrgNY1gBDBbpPYyytokAHklBYCLhdhxTxo4rvFzXdcs022V ibN1SKwpIC2l91KIyb/QVPm/qiMFK/yT9SSuTTsONNLFDy1flVkVtriQO12Saru/3eKg83 sA3Z98MJTbX4fZuA0AFsONa9ip+OiRX7ef+Mmh8LYqbIGw8eXSsjdf1rvL69wDJ59PqoTE amLqBMxIeohAe8fhAuBby+UGpPQOZF4gYqSPQlpCpaSnZ6I1VDZXH1vDMOKKNQ== 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 4YjhTW5CgDz12FC; Wed, 29 Jan 2025 12:35: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 50TCZx51051401; Wed, 29 Jan 2025 12:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZxUC051398; Wed, 29 Jan 2025 12:35:59 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:59 GMT Message-Id: <202501291235.50TCZxUC051398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: a6d0bc7065d8 - stable/14 - perror(1): Replace magic exit codes with standard macros 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a6d0bc7065d84b63b221979f9e80e28fadf0d6b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d0bc7065d84b63b221979f9e80e28fadf0d6b2 commit a6d0bc7065d84b63b221979f9e80e28fadf0d6b2 Author: Faraz Vahedi AuthorDate: 2024-10-26 18:21:20 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:28 +0000 perror(1): Replace magic exit codes with standard macros Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1492 (cherry picked from commit 4dd6597a56f8c7ff03d4f451b612a9e45442c549) --- usr.bin/perror/perror.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index caf0972e9c50..6341928e9024 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -61,20 +61,20 @@ main(int argc, char **argv) errnum = strtol(argv[1], &cp, 0); if (errno != 0) - err(1, NULL); + err(EXIT_FAILURE, NULL); if ((errstr = strerror(errnum)) == NULL) - err(1, NULL); + err(EXIT_FAILURE, NULL); printf("%s\n", errstr); - exit(0); + exit(EXIT_SUCCESS); } static void usage(void) { fprintf(stderr, "usage: perror number\n"); - exit(1); + exit(EXIT_FAILURE); } From nobody Wed Jan 29 12:35: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 4YjhTW39ctz5mgqY; Wed, 29 Jan 2025 12:35: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 4YjhTV5YYgz4JMx; Wed, 29 Jan 2025 12:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154158; 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=hAr3zZXrSFNEgE/M3yrNgO50bgmHsah9qaKZ5deEB+o=; b=NjxZDIa+AxAty8f6SRagWMrZgcoqsPwZqdtpQRcUod5NOXNsIQiHKm2LgFwuhWbWxq0q/B GxHlGof3Gog/tc3+Agnz8AJ8iMvennwvlyAgR2F57n1UXqqeesPApvHAbWVhdDpCBc9oP0 JEvXmBj2tiwnW3ws/jk3LErdjBzliWNYocD6Lidlj4kAgPCXK+h3OtLM2hpFAlyFYemNqs SHI8MrpoDcfBp1I/AqGn1OspogF60xNA0t4J3COzklLsYi+YeyPO4X4fO24Zz5dwFrNcAa WD5m2aZxfh1Vrvr+oEmC7N5d0eIs7Ua91JlWh2YgJC9+TPquX5CRmHLFTI27Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154158; 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=hAr3zZXrSFNEgE/M3yrNgO50bgmHsah9qaKZ5deEB+o=; b=JOWQd98F/VcGy6eOyY3m26zEtcH9LKzVR/bEQ0MUuAk+yvyKDAEMatbNDQJxDO8RBbjIkL 24Dpi46/+poq8AQ/waRhvGeC7grI5kP9ZQlvKUi7N/RUb1ssvk1503I1uzyLQ9f5tRuQDD qp4S8hKt8QcRUDVx1Z4cViT5CQ+IKhBGXSHIOp+MIRjkvcUkZYWwzJzZJVDIlJp1QKhsBm qjaYgfIiNNgKKHx0Y33TtGpF0TxHaXKisxDTyXPb2n0BfpmlvqY203EYEp7lwmg27NRErH rKZIMV6raHbJ3WD3/yrdNjYeQ8OgTtzKg1eUIqRuwQmB+9W8QhrxgLc7Wlwg/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154158; a=rsa-sha256; cv=none; b=d86AWA67ZWMAU5EznCVdk7KFl45cnvxGi6SWS8H1gXMhHlLGzAP8A8q5PvV081/zfsgROM CTXbKU+KCSrwFh5M1Tab5Cdh7aAfR6Uj4nG6GNEj7/fr5af445qXggXzORMfqpaFtVC8Z5 lWASBM27DtJpuIFqnL1GXfNGNSjVufJTu53DAZlAtXBU1pnX0NM7OntkM2p82rLHAEVAAK TD7HcWhHIwtsv06bHRahZQ9pzdTVP/6DHuitW28ncEhbTpgtBsThjexfrHLRGhvwo8pJbY 8tSzyLaLEdNFHYnrWgGXobouD1rFR6/D4GB1hk9EO5kUQhGBn5Q+oFDbZHqcaw== 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 4YjhTV3w4Sz11k8; Wed, 29 Jan 2025 12:35: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 50TCZw64051366; Wed, 29 Jan 2025 12:35:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCZwwE051363; Wed, 29 Jan 2025 12:35:58 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:35:58 GMT Message-Id: <202501291235.50TCZwwE051363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 8cf0915c1901 - stable/14 - perror(1): Reorder headers alphabetically to meet style(9) compliance 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8cf0915c1901207ef3d7297c07eeb8127d3b0544 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=8cf0915c1901207ef3d7297c07eeb8127d3b0544 commit 8cf0915c1901207ef3d7297c07eeb8127d3b0544 Author: Faraz Vahedi AuthorDate: 2024-10-26 18:34:07 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:24 +0000 perror(1): Reorder headers alphabetically to meet style(9) compliance Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1492 (cherry picked from commit 82e9f8c2d19ba5d132438a764352eb3b4826fc58) --- usr.bin/perror/perror.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index bdf19e2423cf..caf0972e9c50 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -28,12 +28,13 @@ */ #include +#include + +#include +#include #include #include #include -#include -#include -#include #include From nobody Wed Jan 29 12:36:01 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 4YjhTZ6rLnz5mh6K; Wed, 29 Jan 2025 12:36:02 +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 4YjhTZ0J0Vz4JR0; Wed, 29 Jan 2025 12:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154162; 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=TIf9kUgTfwhLu6GRINRCFuYHYxG1kK+uBdf+Z8vm72Y=; b=JcZFKxsufWr7yXeg/qESGgS62/YefGVnq8AyjBdN+52rLwpoxndaePiMEeOQ0hXrLn9Rji YORpzbV9fBw0zZGdxNJ0wmvJSF/WFav5ZTs8NPXJFhky7G9dNoIVHniYheywjnd4hoxvbs pplM6XRPkE1jc7FHDgQe8pVY7KK5Px+VNrT2fzyraEg34sJThteDbyppxjwSSD2p6yqGh/ dgr5U+bd+jMmz0QdSr+EAYjMDUGc7nQqkFK/590PXuLKhoeFykQgONWrfSuAf85944574p Ih5K5fRemmf9jFQD76409t+aN5szszqDkp0qH9kEZ7ZRdI5suLFKdeJB978noA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738154162; 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=TIf9kUgTfwhLu6GRINRCFuYHYxG1kK+uBdf+Z8vm72Y=; b=ySycFz3h3VDd7FGZierxOY+GEEWeaPE/3iNCyzDyW2To8hZ0cllExbqNkAySsmpdu1gE2A a6k/vr0RoXqxgKUBDNzY5wCI0vNzesfFsRhdSrIEagDiBFGioqungoP41XHwl1aN6bZ+b3 ufTHjKnQi0+XW3K8rdjIcKFwSNIF05+U1stUFXp8kkyxZLTM5QMItP+B7qUlM3iYLNfVpE AGNG7R4I1wxR3AdCyzAIkCsM97qIaeQubkaaWGSz5froHS1VckISs202Gewg3ata7vtsPh nYkwIpT7fMUFCg+4dGDIIRXnW3+VEODhDvtuy6GQ3SxQz0MLtBVVKqNEjd6V/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738154162; a=rsa-sha256; cv=none; b=T9Tlvml5U+CYH2YHH8+a2bznqw/Cun3WgzsB+sgrJ8nTiNVGc7Qi5a2YyfgVH9H731OMoZ SM6MXQjxlVYhBwXInp3Wd/7WXno0ELuaCSjqnJoAhgadSp9O538VREpZATiTwPUSinqXDN HPA1k1P2TC8ZCzkkmZFUUfCVANcQ8R7+iIGabrbhdH7UJFcfBZEvvMrbG5rNCTHl4QTYpQ QlO2vgf9aqyTOYQdw2f2SAHlDBnsGIRvM7oBGZEJ1FFbbqT86qpnx5JBRMeAx5Sf/cS2JS x7M7wcz4qSvySry0CTiaORy9SOqpdDq2SqyQL46R45c5ZvtUwzPMoSyKUqXl4A== 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 4YjhTY6zGvz120r; Wed, 29 Jan 2025 12:36:01 +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 50TCa1ff051479; Wed, 29 Jan 2025 12:36:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TCa1b3051475; Wed, 29 Jan 2025 12:36:01 GMT (envelope-from git) Date: Wed, 29 Jan 2025 12:36:01 GMT Message-Id: <202501291236.50TCa1b3051475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 6f34788b4e24 - stable/14 - colrm(1): Replace magic exit codes with standard macros 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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f34788b4e24ecbd6026e2dd9fa213290f31f8d5 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=6f34788b4e24ecbd6026e2dd9fa213290f31f8d5 commit 6f34788b4e24ecbd6026e2dd9fa213290f31f8d5 Author: Faraz Vahedi AuthorDate: 2024-10-27 08:59:39 +0000 Commit: Mariusz Zaborski CommitDate: 2025-01-29 09:51:34 +0000 colrm(1): Replace magic exit codes with standard macros Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1496 (cherry picked from commit fc26f24b3ef276b2a9f73c9778aecff7377b1aeb) --- usr.bin/colrm/colrm.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c index 6886a6644bf5..b199e052a3a5 100644 --- a/usr.bin/colrm/colrm.c +++ b/usr.bin/colrm/colrm.c @@ -87,12 +87,12 @@ main(int argc, char *argv[]) case 2: stop = strtol(argv[1], &p, 10); if (stop <= 0 || *p) - errx(1, "illegal column -- %s", argv[1]); + errx(EXIT_FAILURE, "illegal column -- %s", argv[1]); /* FALLTHROUGH */ case 1: start = strtol(argv[0], &p, 10); if (start <= 0 || *p) - errx(1, "illegal column -- %s", argv[0]); + errx(EXIT_FAILURE, "illegal column -- %s", argv[0]); break; case 0: break; @@ -101,7 +101,7 @@ main(int argc, char *argv[]) } if (stop && start > stop) - errx(1, "illegal start and stop columns"); + errx(EXIT_FAILURE, "illegal start and stop columns"); for (column = 0;;) { switch (ch = getwchar()) { @@ -134,15 +134,14 @@ void check(FILE *stream) { if (feof(stream)) - exit(0); + exit(EXIT_SUCCESS); if (ferror(stream)) - err(1, "%s", stream == stdin ? "stdin" : "stdout"); + err(EXIT_FAILURE, "%s", stream == stdin ? "stdin" : "stdout"); } void usage(void) { (void)fprintf(stderr, "usage: colrm [start [stop]]\n"); - exit(1); + exit(EXIT_FAILURE); } - From nobody Wed Jan 29 18:34:46 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 4YjrRW0LDFz5lkKT; Wed, 29 Jan 2025 18:34:47 +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 4YjrRV6dcrz47Pc; Wed, 29 Jan 2025 18:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738175687; 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=+eg3xNXaw7cOAgFi4PlShEufeDgs5QS007MDCCR0Imk=; b=lsT9+/KqnF5GrRDb77I8Xy+Z/l8LP2zyMu7cYlKdUhGlvT80vLr79vkYoQbIctUDTREdyc 0iWlRoeJVDB2dagQw3gAtGU5KtANDhZsz4k50zMVNrNv4JpyeBk72oYuYvwqRXJ0pGgsJO 6qUpWSya1m1/Xm9tqo7Sv7Jiq6jq7MCFYCZcjN8QP4YIcCDtXc12u9u+OsACOZgIL6PWmj du1L/WYwwrqEws9RrC+6X8AnMarYRfEt6ODTQ4dT9Q4hdph5tUCV2wefvy5TLqkXx2cePF loduDvSbQx3fJ79ho9vpKfWHjZyVTH7ffPCUfqKw11wk18OfiGwW2d9iiN6GXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738175687; 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=+eg3xNXaw7cOAgFi4PlShEufeDgs5QS007MDCCR0Imk=; b=F7AePqkCzDZhGrSahmcfhv/wyDHpVD2WruRRTOwqYgiDgDBxNfBXG55TiEM4FYCocFpZJr y9kGgRWsovsy7MASR12OB1dnFXFEhx12sh5WnJIGiEwYxTmcgt2DK/y1L8uYtKr9m9Ft/a Jvx2Ymzqk9SMwtqztKKvGxCzmV96m5FzigU+R/tyo9FiMJlLWkdgRpJO6nuzawUBNCuweJ buONoFR4DHPDjWzDJ3pswkA8Suje7njqo9CyxZJ4fevpw0bh1i7igb6f1r24wVBWwSinTU xldspOPi5PWW8aEHq83hSG1BTcs5iLW4L5ncT3XHJSzIYFEGmQRgFgvztxty3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738175687; a=rsa-sha256; cv=none; b=xZxp0VAHxU0CjYl9kq+pgxTQ5eOuUbQjEyIs33XM/Qop/VHyPu/sSvyPD8tutFy/g22IIf 4CGeuPd+oxrmk1ubPMXNmMW8GDC4zIrHeZso5wI84kkAFRgrPZkJ0cjt0m5FWaM0Iyf4fC 0c1ZpHgv/cWT1W8deY0prIaf00HQ0RjMmaq2dJLBBnzh/dXG5lu+0ZeZRMwx12UHR9Thgf cNLb+JJIyDOUGZTgBBNdjGiNPV/1xRt/JV/Bk7q1J0nZ5HcZ+4yqJ5OM2aEDZszJigEhPT GPuRM6TKGr3vglkeszUyf+R5OhvUSZB5TGlCvKrMhgHbRPWwjYbxp1jm2YGUyg== 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 4YjrRV6DHlz1CMr; Wed, 29 Jan 2025 18:34:46 +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 50TIYkP5026321; Wed, 29 Jan 2025 18:34:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIYkt0026318; Wed, 29 Jan 2025 18:34:46 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:34:46 GMT Message-Id: <202501291834.50TIYkt0026318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Maxim Konovalov Subject: git: 9c72da889424 - stable/14 - genl: typo fixes 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: maxim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c72da889424ced8cfd906f834b7d35c4403437c Auto-Submitted: auto-generated The branch stable/14 has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=9c72da889424ced8cfd906f834b7d35c4403437c commit 9c72da889424ced8cfd906f834b7d35c4403437c Author: Maxim Konovalov AuthorDate: 2025-01-13 00:40:47 +0000 Commit: Maxim Konovalov CommitDate: 2025-01-29 18:33:13 +0000 genl: typo fixes PR: 284017 (cherry picked from commit 8b5058ec78a6fad972f48e6cd5613c2750f43ad6) --- usr.bin/genl/genl.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/genl/genl.1 b/usr.bin/genl/genl.1 index 5a32d69dd482..696634fdef9e 100644 --- a/usr.bin/genl/genl.1 +++ b/usr.bin/genl/genl.1 @@ -56,7 +56,7 @@ Id of the available multicast group if any and it associated name Connect to the .Ar family protocol and subscribe to the -.Ar mulicast group +.Ar multicast group then print the received messages in a readable format if the protocol is known. So far only .Qq nlctrl @@ -64,7 +64,7 @@ and .Qq nlsysevent are known. If no .Ar multicast group -are provided then all the groups are subsribed to. +are provided then all the groups are subscribed to. .El .Sh SEE ALSO .Xr genetlink 4 , From nobody Wed Jan 29 18:54:50 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 4Yjrtg16Mpz5lmH0; Wed, 29 Jan 2025 18:54: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 4Yjrtg0NTlz49nV; Wed, 29 Jan 2025 18:54:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176891; 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=7r1G4PnRZFPFa5XB2KFI0IzUjGfdu+cNDzPzoCUnZHQ=; b=Nodd751doFxl7lehhM1xpaX3oXsgmFJp1ya0iHCx9FwAk7Iwr7iN3GKDbP+sLqEpfL13Um rnd9FvlEHl/GL5wkNSoHen9kN3EjcwzhDn7XSWEIpLT8dGP4Qfqpr/phScfCasofc8cVp9 AOYF08+4nKo3VBsZGhzZud55ESd6kTKbVyvEWEgp+E3PQLE2YvV1YWY6j5OlS8WU6s06wk WHhOz7FCmWVIN7b56MjGjklAdZa5cR+i3RTb435BfaQ0ez4BudesHLtwpBIuVUhhNtyLzn 7Lgoqt0erbeQkOMDt6XvVGytG9nKrcExErd8zuFrNl/hiFQNMdtitUBkNbAgvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176891; 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=7r1G4PnRZFPFa5XB2KFI0IzUjGfdu+cNDzPzoCUnZHQ=; b=n2CK1VBRafAV/L9Nk+Qh2Rxzu2pU/J1kMWMNHdaXvAUxKC3/3alXnIKT3vuJ46BbQYF27m NRoQUVDC3Rl8huuUiUObrJfZ1GJNlBE8O/t4yyE9C+sdqMozrp9uRFB//qJex9Z9lrp90e dFX4XXMspK54AMRCTE2/IMrGShsm7i3BDgqoLu7ip0It+gNBLVOCijMmU6JpyBh85OJdN7 gVuHeXo95m5A3ZMEv8KdeBraPKF1qCh3tLotslnGCrL3wyDGaPfOBYG4qcuuxT6xwjTVfX zZh1tcqIk8IBu70JDYudFGbstgnLB6oiKcxiGUPGl5PvytzkgSqFFTUHhFe0gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176891; a=rsa-sha256; cv=none; b=ObKy+j4t0qIhC5nruIvyrJ649/+EZuGkvTsidzk5lqtpx0qYzypWSPf4H30jPx0TiiSpuv iIcL0Uye/4bZwgwOMPkzbvYLl4DWZBD2dK3C8eH7Ex3/EERrYZE/wdpen7ywhhiqqUVy44 Y6d2YSu0D9NBXQdFUiIXQ4I6Z+ufpTQR8GORx606C8lMoU3E05O/7r66ObPYkYlCf7aUUq pyp5s3os80IKw5LFat+/FIqbxf8rCCcHvqGUcJIlb/kEJ6x4a617y/CNVDWgbShJN6UiiX M7u/H89bjSKKdXi72KE46W1d4tpxHSLTyMizztmeeXfUXJXM+e8KlHMEUc+AWg== 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 4Yjrtf6nHfz1Cdm; Wed, 29 Jan 2025 18:54:50 +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 50TIsoLP063894; Wed, 29 Jan 2025 18:54:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIso2T063891; Wed, 29 Jan 2025 18:54:50 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:50 GMT Message-Id: <202501291854.50TIso2T063891@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: 10f8a9df522f - releng/14.2 - ktrace: Fix uninitialized memory disclosure 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 10f8a9df522f9a5e5fb9a3a97d1d76949fe4ebc3 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=10f8a9df522f9a5e5fb9a3a97d1d76949fe4ebc3 commit 10f8a9df522f9a5e5fb9a3a97d1d76949fe4ebc3 Author: Mark Johnston AuthorDate: 2025-01-20 13:50:04 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:26:14 +0000 ktrace: Fix uninitialized memory disclosure The sockaddr passed to ktrcapfail() may be smaller than sizeof(struct sockaddr), and the trailing bytes in the sockaddr structure will be uninitialized, whereupon they get copied out to userspace. Approved by: so Security: FreeBSD-SA-25:04.ktrace PR: 283673 Reviewed by: jfree, emaste Reported by: Yichen Chai Reported by: Zhuo Ying Jiang Li Fixes: 9bec84131215 ("ktrace: Record detailed ECAPMODE violations") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D48499 (cherry picked from commit 5b86888bae651e54ccc0adde0ed897ec1c1e0d45) (cherry picked from commit 99d5ee8738a354e0d8f12453a82ed87e47bd62f1) --- sys/kern/kern_ktrace.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 1c6a2ae01f3d..2b311f2d36dc 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -958,9 +958,16 @@ ktrcapfail(enum ktr_cap_violation type, const void *data) case CAPFAIL_PROTO: kcd->cap_int = *(const int *)data; break; - case CAPFAIL_SOCKADDR: - kcd->cap_sockaddr = *(const struct sockaddr *)data; + case CAPFAIL_SOCKADDR: { + size_t len; + + len = MIN(((const struct sockaddr *)data)->sa_len, + sizeof(kcd->cap_sockaddr)); + memset(&kcd->cap_sockaddr, 0, + sizeof(kcd->cap_sockaddr)); + memcpy(&kcd->cap_sockaddr, data, len); break; + } case CAPFAIL_NAMEI: strlcpy(kcd->cap_path, data, MAXPATHLEN); break; From nobody Wed Jan 29 18:54: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 4Yjrth1glyz5lm5V; Wed, 29 Jan 2025 18:54: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 4Yjrth12g6z4B8b; Wed, 29 Jan 2025 18:54:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176892; 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=5a8hKqSCE2oGhd5B0dSYdoH2AqHDU5Zx57DRadMkv+o=; b=RgOUR4e2o5/E/F881DD0OlCuHtHEy8uqC4WZNjReIA6eOp3xCVG9KgLqJLGBCC5RGZFVK8 qNTqh47d9pqMMqREvJMMWSIVwxLTB7qJUA9pCLAhZpdafjOXjyWxizlx6Y2NK3lU3djEFP gy3nPqXudXs14W2HiFEDqTELxzixqoPPs+K7+8xC1U2h208VZR7eMOKMbtrExn7S70gGwo c/2Hd8SxsAKmiPgEH8K8IIULv60nk1x2GH7ZtQ8RbJNcsqfKfAkZUOQQ6l0O1Mp+ZCD+GJ 76das+dvNGPozlzfCB0fGcf5N1VnCNCYDmQu4BR2bykYEyyCz7goLWFjDAivEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176892; 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=5a8hKqSCE2oGhd5B0dSYdoH2AqHDU5Zx57DRadMkv+o=; b=FhLCCWbLDh7wMW6GaD2Ke8zEmGBnc2NfkGDmHX/V0rRlHYJ5oxdBDCah+J7nM5y8/qamp5 l+i33amd/ESzgL2wnBzwbdJOG5+Fwzb2EbJBKDtuTy4+tm8jnoBa5h/Rh4jurmo8B63emN CSJBQYlOZm39cYjGTB+wtwENmyo3KdFxqppZ4wdXl7nWPX7XKyHJdBDvxdIJ0DsqmJD2eo 2MoRuiKm6ZpSclCeIBe3BcN/2Ky+s1rQhbiNah0RsjsVLZ1dPQ1HgkAhdu8lVKH1FDNR+L Ru0Kj+xC3NlI1tL4aXKEPP/f+kGYn3vlV4j3e5aVxQqlgGJF5Yh4UPmWuC1New== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176892; a=rsa-sha256; cv=none; b=x15Tj/+gcsLYH3RlTB47iViFcU0xwxa1A98GO92I4t6k3NrxFW5VU4m86kkUl1Y2UWSaju xheFWGIlXwKYuigQCqmmkAJGglzlqyQYDedGJyw8Eokx9RVZjx0kqkrf3q2RJ8beZoc0J5 +pAtJXN63xRwuQH1PRyvpSdLK8sxEU2a4CsxoJWM/GAxemWpsHaE4rb5zhYs6xCcCXC6+V DPBBHkAGKj1yYO/+jy8cDbk0qKUIO7BPKymRMydQivdNMn+n2MzHGp/1NAa62nG60SJ47R UBkRRP7GD8aaREFiUKyku9rSM/ChdhLRLtTBJ3rYqDQUn7yYhaORqh8LHphg9w== 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 4Yjrth0bthz1CQF; Wed, 29 Jan 2025 18:54: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 50TIspfc063929; Wed, 29 Jan 2025 18:54:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIsp7d063926; Wed, 29 Jan 2025 18:54:51 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:51 GMT Message-Id: <202501291854.50TIsp7d063926@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: 71bf983f92ba - releng/14.2 - audit: Fix short-circuiting in syscallenter() 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 71bf983f92ba5f0d8f44ffe33067998dc1a2a8e2 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=71bf983f92ba5f0d8f44ffe33067998dc1a2a8e2 commit 71bf983f92ba5f0d8f44ffe33067998dc1a2a8e2 Author: Mark Johnston AuthorDate: 2025-01-14 14:19:24 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:26:27 +0000 audit: Fix short-circuiting in syscallenter() syscallenter() has a slow path to handle syscall auditing and dtrace syscall tracing. It uses AUDIT_SYSCALL_ENTER() to check whether to take the slow path, but this macro also has side effects: it writes the audit log entry. When systrace (dtrace syscall tracing) is enabled, this would get short-circuited, and we end up not writing audit log entries. Introduce a pure macro to check whether auditing is enabled, use it in syscallenter() instead of AUDIT_SYSCALL_ENTER(). Approved by: so Security: FreeBSD-EN-25:02.audit Reviewed by: kib Reported by: Joe Duin Fixes: 2f7292437d0c ("Merge audit and systrace checks") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48448 (cherry picked from commit f78fe930854cac6eed55859b45e0a7b5d87189d6) (cherry picked from commit 4b9ba274d736de74676051c8f13e7d3dd536334b) --- sys/kern/subr_syscall.c | 8 +++++--- sys/security/audit/audit.h | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index 725467e1215f..25843eec3754 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -143,9 +143,8 @@ syscallenter(struct thread *td) sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; - if (__predict_false(SYSTRACE_ENABLED() || - AUDIT_SYSCALL_ENTER(sa->code, td) || - !sy_thr_static)) { + if (__predict_false(AUDIT_SYSCALL_ENABLED() || + SYSTRACE_ENABLED() || !sy_thr_static)) { if (!sy_thr_static) { error = syscall_thread_enter(td, &se); sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; @@ -160,6 +159,9 @@ syscallenter(struct thread *td) if (__predict_false(se->sy_entry != 0)) (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); #endif + + AUDIT_SYSCALL_ENTER(sa->code, td); + error = (se->sy_call)(td, sa->args); /* Save the latest error return value. */ if (__predict_false((td->td_pflags & TDP_NERRNO) != 0)) diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index e7a9c83afbb3..3c8419a54ccc 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -389,9 +389,11 @@ void audit_thread_free(struct thread *td); audit_arg_vnode2((vp)); \ } while (0) +#define AUDIT_SYSCALL_ENABLED() audit_syscalls_enabled + #define AUDIT_SYSCALL_ENTER(code, td) ({ \ bool _audit_entered = false; \ - if (__predict_false(audit_syscalls_enabled)) { \ + if (audit_syscalls_enabled) { \ audit_syscall_enter(code, td); \ _audit_entered = true; \ } \ @@ -468,6 +470,7 @@ void audit_thread_free(struct thread *td); #define AUDITING_TD(td) 0 +#define AUDIT_SYSCALL_ENABLED() 0 #define AUDIT_SYSCALL_ENTER(code, td) 0 #define AUDIT_SYSCALL_EXIT(error, td) From nobody Wed Jan 29 18:54: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 4Yjrtj6Sgrz5lm9V; Wed, 29 Jan 2025 18:54: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 4Yjrtj20zNz3Bvf; Wed, 29 Jan 2025 18:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176893; 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=ZhYu8jpzrm3ckTDemzN3iaKcCMTKqFWLYw4hx5sCOpc=; b=FlRgbDUoGWfiNT5K2X+iRwMY3eRNWBnIhbkHjnMNKSg3tsjsRznHRat+d9lOqyRsz477jz 45QiNExMRrNLI0TCg8El7dSsEKJLao0V12smSBvbAghafvb/tMhUC1nPMcXs76rmeykmhY o12aWbcB6VClOqhTrh84oq5ZC1ddMipEtHwjrjKyrmU0jNJy0cfbqcm2Ph1j3yxmW8oGyQ Lf//j3AvCvYnMLPMtf3fzITl0897Vo32FBmao7FcbqHvX+rLaJzVhWDnTUE1t/rI2cBZih i6hakO5dGBM4l7q3Qrub2AymMGhB0Y3Ld6h4Cv1pWNNtYAjbUVfwIi81BrhAXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176893; 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=ZhYu8jpzrm3ckTDemzN3iaKcCMTKqFWLYw4hx5sCOpc=; b=PpNV2zJF2ZJQPbw0MTt3H9zfKFLptAK+GWxP9pWvC4YHP4ku12PU3mnd0OKZah43+V+DCQ 7L3sN6eQSpDh6ZfTHHNKB8K/DIMFT3IS90qYPWF6EZPNqpe3sHVpf4oAARPMJ8+eUlz5nx Z+fin8IC4gq/C1zT8w24QO8k2vBcClD5P9VlrHBBR2DZEX0DkePIJiSZY+KrQvnGGqC9XI z4xAOTsuZ0BbVjo58CPvikhwIPHqug9OTgS7I/HG8fh/GEXrqg7oY3sbZBb8XkgL/NIpWE Nl7lpFui/fFB/NcNQ7PvE68V9mSn0HPuE8b1CYcEaL3PURox8dBW6DFpp7v3nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176893; a=rsa-sha256; cv=none; b=lUTZRgNHwFRtStcZnElbCPcwGcMfZGFbcmj6nNrXW5n4ki/zhVrReCFVxY68E4xS0JeA3b 1yQa127bdOzPvI8o3AUazQv2uaawoOoE8cee/8Lrmy4Mn7LACndQJXieWE13Gnf9uuUv+1 +ZwKxOGrq4YAopV0lr9o+YMba8M/jR5c9+EktbKcoMwgLAFjRTk4PTqqCTCXo3vtzq3WTL qibS6kfUz68q9hsnXix4b8bwRkWi0Hg8RD/XQmLjlglm+L3rtNG9v/Xqb68FuDADkM3D8w 6Reo4AtrYmNKonNw8QcF5cHx9B+WgM2bKvXp9adnyhPNXcrLVwNmI9v++3hIfA== 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 4Yjrtj1VBqz1h; Wed, 29 Jan 2025 18:54: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 50TIsrKf063966; Wed, 29 Jan 2025 18:54:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIsrvu063964; Wed, 29 Jan 2025 18:54:53 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:53 GMT Message-Id: <202501291854.50TIsrvu063964@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: b9149a3af722 - releng/14.2 - 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: b9149a3af72202820f5ba6e53d44e53a5206b115 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b9149a3af72202820f5ba6e53d44e53a5206b115 commit b9149a3af72202820f5ba6e53d44e53a5206b115 Author: Philip Paeps AuthorDate: 2025-01-17 01:33:46 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:26:38 +0000 contrib/tzdata: import tzdata 2025a Changes: https://github.com/eggert/tz/blob/2025a/NEWS Approved by: so Security: FreeBSD-EN-25:03.tzdata (cherry picked from commit 46226b0162ba03986b1de2c790804b37dd8e64d6) (cherry picked from commit a158d26e89f2e3274ba1064e3fd6b341c6fcb07c) --- 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 *** 22 LINES SKIPPED *** From nobody Wed Jan 29 18:54: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 4Yjrtl1NRrz5lm73; Wed, 29 Jan 2025 18:54:55 +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 4Yjrtk2wg9z49qj; Wed, 29 Jan 2025 18:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176894; 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=gWbeF+QqFrx63tuuEbBYrln+31GZPau6m4RDXgbN3hc=; b=SDpU3BBfWGJh5YnDooutIvlA52aegZ2f/vzOkYolg9zVVKY60tkkQv8+a+GxxmFSM8/d3Q b0efcMly8c3poLQhXCY1T7jleIZN1WvsJM+evHnmTQZjflYz3wp2xU+dY4RBluNdqUOnGh SSVZGYbI7q1oQOHW0my5LlpBi0BtyZsoK01KfTIa7/mUOikon+K/2c/9b+L+VgG0VWnBVx F9GluOgNO0C5rGUtrc/r5VAHzUlyCXgTkciZkZy/Ps7B8GvX03gLiPXMdC+oowYp3wdiVI XWFD1Mr54Uc6LryCLzqT2W962/9VtZ+7s+5mkO8L+YW5LfsV9NSxpfDpgD5vsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176894; 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=gWbeF+QqFrx63tuuEbBYrln+31GZPau6m4RDXgbN3hc=; b=mDbEf6lbj6TUAE4SL8/FK48DjxIoEklnAslXpXPFCJrpmxnF1AuLdyqeYA8PHxv6l3O2gh VAHfPpNvxD+KWY8hVE/nQm4h1Le1CigKQizDbD3mhX0SQy81kduLFe1hVFBnKeyqC+kPQo dCs1bt5BiIVacv1lOLP4MNAiST9/kL+d1pCj/zUOhX+yxqqsf7fqPsf0jOBEQXKAuWxX4+ j5pH9sVp9fqcLI7oBL7TA/wD/AoLyEJtnVuuRtwH8xMNnPWXBgr0LBZp7OMfzgj0OQ7rzi 9WekdG1vWjbO3lAISD45LZ9a7EIIiYye1YLtusoW0GBazHU599jwCyv54P/qeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176894; a=rsa-sha256; cv=none; b=GDuhTpRIHenoy0ZSjpgLhIJCMcTnoZpcE3bILeCJ33Wb/5V9amCWlowwf9OW0S624bwDSc 3q3XYfbB2epL80YaKzWSuf5nqOvI2rci+6cTBG1WJYXBV9Wj1QbVOyQYJF0fJTbmmqSuSs ooJ1SKT6xiPyY1NVtVge19gcHSUYMQn2nUNK2MpzhScXNAwOC/WIHt6J+Spbam4Wi//50Z sTmL7S257UncKIsnugyuCjiAPBS6A1ISUaXgOxtjGi+RgCluW6gmiBnp45UeNomX+Ixxnl nyXzAiXHWOFp9hMqYh50YP2wb3U9qLTKwjN4GSbJVsmsgLgcbX4KZkAZ719j8A== 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 4Yjrtk2PzJz1Cdn; Wed, 29 Jan 2025 18:54: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 50TIssSA064003; Wed, 29 Jan 2025 18:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIss55064000; Wed, 29 Jan 2025 18:54:54 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:54 GMT Message-Id: <202501291854.50TIss55064000@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: 498561509061 - releng/14.2 - cd9660: Make sure that struct ifid fits in generic filehandle structure 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 4985615090614d698db22b3478652d33955cf116 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4985615090614d698db22b3478652d33955cf116 commit 4985615090614d698db22b3478652d33955cf116 Author: Mark Johnston AuthorDate: 2024-12-06 02:03:59 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:26:51 +0000 cd9660: Make sure that struct ifid fits in generic filehandle structure File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packs the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reported by: Kevin Miller Reviewed by: olce, imp, kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47879 (cherry picked from commit 205659c43d87bd42c4a0819fde8f81e8ebba068e) (cherry picked from commit 54974e731f279941ef7aebd7d30ba2e9299a4056) --- sys/fs/cd9660/cd9660_vnops.c | 3 +++ sys/fs/cd9660/iso.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index cb619379e2cc..31dacb392a6b 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -761,6 +761,9 @@ cd9660_pathconf(struct vop_pathconf_args *ap) /* NOTREACHED */ } +_Static_assert(sizeof(struct ifid) <= sizeof(struct fid), + "struct ifid must be no larger than struct fid"); + /* * Vnode pointer to File handle */ diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index bf98e75c42d9..b54f5f8e5cf4 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -269,7 +269,7 @@ struct ifid { u_short ifid_pad; cd_ino_t ifid_ino; long ifid_start; -}; +} __packed; #define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)->mnt_data)) From nobody Wed Jan 29 18:54: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 4Yjrtn3zMKz5lmbh; Wed, 29 Jan 2025 18:54: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 4Yjrtm4cSPz49r2; Wed, 29 Jan 2025 18:54:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176896; 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=y1PCEgxK4JVd9zTDZbccVxYFeKfhRvNm4yq8CljTRpo=; b=Vp2m3CL1dPKGEbRtqwEb9KIUHVf2HbAXca2+QTjTPPKPMnpdC9XY3MLa3w5zBz9xYcRlvQ RC5T8vyJpXWVC6ayVQqTUeQkPGgthMjxFaZ9Nve+Z3QR4ECsD0yorpBIbbEvw4DtF0PeLn bqkA4E1OeZlKKY5KcmghFyMgQC4dNiPC9CZ1U6kPAtL6Lu5OAJKlbjQVmDp9n6cS4IllkA nOosVv38Ot432uGGd61GrV8Ui89hGVlOxXZlpGl0mF21mJw441zzq7AEwRAKaOPir9u3BY 5y/TTz/ZUwtKTRHMt2iYOdiL01+fxXDnqLw+vu9tI6OBSFq9ls5gjkGNzs3wdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176896; 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=y1PCEgxK4JVd9zTDZbccVxYFeKfhRvNm4yq8CljTRpo=; b=WKxi75G8OoT1xwphJ2y6inyewzJY/9H8donzwVhoo4pthw9MOlTHgcI7yU25azUorMdHze acGRVrt66sHR9mlffgwi7643044s7oL4NIsy2L1HFtZUmq2TZ/q7vFyp0Rs30c1WQBbwL/ +UP2SwOJPyO5/31POsE5JggjB7v6TsuKza2vpgEfxCcBgjfHm+K4rSBQt8nn3/LibfTSaP mKmCFYPliPAdfd9NbZmvOdlZJCB7mgujQXJmL485aVrB9emwmSdO6z9jX57L22BiaSb4tA 07S0tDWv+8vtcMwEVy/4Q7LqnvG05cxnw5p+Y+Pa6RjRyVqK3U5j/M7wJzuVBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176896; a=rsa-sha256; cv=none; b=YX0j2Zq7Keuez5MQHkw/7hkLY3pmDsrHVE7zij3nYpu9PAGwLGKbkM3LQWc+NIYvaB+4Gk 6kQvRbySojAMvATFg05jF7TXC/iDy2tprpk9yDxF2UJnn68B05Wn2iSue1L8ZefKfpfyVb qmpjUyOaDfO0mmeT4OrE2pCrMG4fB1n3RplWbaHgj6XRkcCSsfFxHiGsNzEp5/JR4NPG7W M55C3N4OX3cRq/zzkrRGUD8gHW39ea22t5VAHaj/phXwYESnguR0PBI0RbY7YDcOMEpTYB LSc/hZgy2Totv3cnilx4qJwQu7ielP2D7uJ55N4PWxEZUqQs7OnwRBKny+Flww== 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 4Yjrtm499Qz1ChL; Wed, 29 Jan 2025 18:54: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 50TIsuIh064085; Wed, 29 Jan 2025 18:54:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIsuC1064082; Wed, 29 Jan 2025 18:54:56 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:56 GMT Message-Id: <202501291854.50TIsuC1064082@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: faa47d299a0e - releng/14.2 - tarfs: Fix the size of struct tarfs_fid and add a static assert 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: faa47d299a0ed3af49989495bd1debd469dc54e2 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=faa47d299a0ed3af49989495bd1debd469dc54e2 commit faa47d299a0ed3af49989495bd1debd469dc54e2 Author: Rick Macklem AuthorDate: 2024-12-06 02:09:27 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:27:27 +0000 tarfs: Fix the size of struct tarfs_fid and add a static assert File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packs the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reviewed by: markj MFC after: 2 weeks (cherry picked from commit 4db1b113b15158c7d134df83e7a7201cf46d459b) (cherry picked from commit 155987e2019089a5bd2eef77ed7bcc5cc26c362e) --- sys/fs/tarfs/tarfs.h | 2 +- sys/fs/tarfs/tarfs_vnops.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/tarfs/tarfs.h b/sys/fs/tarfs/tarfs.h index ff1985e488cd..ffb95d2c0ac5 100644 --- a/sys/fs/tarfs/tarfs.h +++ b/sys/fs/tarfs/tarfs.h @@ -165,7 +165,7 @@ struct tarfs_fid { u_short data0; /* force alignment */ ino_t ino; unsigned long gen; -}; +} __packed; #define TARFS_NODE_LOCK(tnp) \ mtx_lock(&(tnp)->lock) diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c index f2828c60f8a7..4bc923ed8f9c 100644 --- a/sys/fs/tarfs/tarfs_vnops.c +++ b/sys/fs/tarfs/tarfs_vnops.c @@ -668,6 +668,8 @@ tarfs_vptofh(struct vop_vptofh_args *ap) { struct tarfs_fid *tfp; struct tarfs_node *tnp; + _Static_assert(sizeof(struct tarfs_fid) <= sizeof(struct fid), + "struct tarfs_fid cannot be larger than struct fid"); tfp = (struct tarfs_fid *)ap->a_fhp; tnp = VP_TO_TARFS_NODE(ap->a_vp); From nobody Wed Jan 29 18:54:55 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 4Yjrtm6RbGz5lm5b; Wed, 29 Jan 2025 18:54: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 4Yjrtl4Cm9z49qv; Wed, 29 Jan 2025 18:54:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176895; 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=V+cQCPpQSyPmgvnxl1Rg+CU4fUfALTUA1RKguIVM1AQ=; b=oXWIRp9Z41AvTyR+O/psz9UHfjEd0tc6clVaxpFGLuMySm9knua8fmrVuY/wP/Uu3PUCuy 0MAuMq6EYVTWORXqHpzh4ozk69/8y9lx5d8ZGk8YmY8/ZLInD/O/MiCgRKE7uijDhiXBeI mgccpeAXyV+vXVvkEcRETZyXJToT3NClmIuBDyQhuj3ec73CpU4CGkdw7Mhltt8k4aUJX5 Z6/LpBwJkT6ig3kpG14dV/lncEHT/iIJz4W/NfUrN7VMNiMJBGC/o2koXdzR0hEaNCvhXl TFXbVUiQtxT7tSPFovgRx8Q4m706SGL5FsyJ+GUGRMb/KNjPpd59we6GwYf2Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176895; 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=V+cQCPpQSyPmgvnxl1Rg+CU4fUfALTUA1RKguIVM1AQ=; b=EX9LqzEgnkEH2sco2qOdyhJLgPgh/7y8jw3tlAnpvL9QYviW2g3l7kbI7JBTtnUrECWy5N CesTniwxAx/9q47x5kJT2qlX32I+pA1/zJhGU/sFG7ld9jyAd6r6radsSUmmOgx4EsaDXz Fa8S+oHMD0KqmN2uugFJjrwR0t6E4G03U7q/ONOIaXFDcBQZG/vbVxiPYn+qVXIrhGduO0 r7cq2c1/y6kH3LI+0NfjnqMI/v1faqnqab7dkrAMq1L/3GJlTXBegAXAfU9VCnpwzv0iFW /6/cgeSCzn49A9B/d/D1n3YfFLoqLqLfmtaidhKfMhrxRScoAWtBa0o0i1jUQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176895; a=rsa-sha256; cv=none; b=Q4KLbA9ksQ6CfhAZ4h3XhevGkBzvfvn2p8SPIJu6/ABLf0oXFu8cfx4ZT2bAZU4J1wI6nC eBnF7TApWFDnsiFjcihug3U5SF00Nd09zJU1f9gwkuEbLe5+8aJppka0ZLIXHZfuWo+HGV D/T8NuvQN98sHrVDP25T0uQaV3lVVOJBE9rpKWnaneWXrLJHipxlh9eeiRzow3k1HR/mzq r3EfNbWTbYOQuIfJAhu79fJg1NjbnnhyKjIwisWtYtWfULODsA15KKYHaAwpr2lrNwunRj 14zTNjK9OVfrgVKLPpxfvAdlNX8gTG4eE4EyMNTnDj3H/qWe6CEl1dC5+WDwXw== 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 4Yjrtl3P2xz1j; Wed, 29 Jan 2025 18:54:55 +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 50TIst29064044; Wed, 29 Jan 2025 18:54:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIstZJ064041; Wed, 29 Jan 2025 18:54:55 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:55 GMT Message-Id: <202501291854.50TIstZJ064041@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: 1f3cea9cc12c - releng/14.2 - ext2fs: Fix the size of struct ufid and add a static assert 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 1f3cea9cc12c881273c5cae89b299a431b498902 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1f3cea9cc12c881273c5cae89b299a431b498902 commit 1f3cea9cc12c881273c5cae89b299a431b498902 Author: Rick Macklem AuthorDate: 2024-12-06 02:05:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:27:11 +0000 ext2fs: Fix the size of struct ufid and add a static assert File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packed the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reviewed by: markj MFC after: 2 weeks (cherry picked from commit bfc8e3308bee23d0f7836d57f32ed8d47da02627) (cherry picked from commit 7a3a0402aeb626a7379addd344cbfd8900e83baa) --- sys/fs/ext2fs/ext2_vnops.c | 2 ++ sys/fs/ext2fs/inode.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 1c4b62bb4086..79d50a6a64cb 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -1892,6 +1892,8 @@ ext2_vptofh(struct vop_vptofh_args *ap) { struct inode *ip; struct ufid *ufhp; + _Static_assert(sizeof(struct ufid) <= sizeof(struct fid), + "struct ufid cannot be larger than struct fid"); ip = VTOI(ap->a_vp); ufhp = (struct ufid *)ap->a_fhp; diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 46e6215aff6f..14d2d6454737 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -193,7 +193,7 @@ struct ufid { uint16_t ufid_pad; /* Force 32-bit alignment. */ ino_t ufid_ino; /* File number (ino). */ uint32_t ufid_gen; /* Generation number. */ -}; +} __packed; #endif /* _KERNEL */ #endif /* !_FS_EXT2FS_INODE_H_ */ From nobody Wed Jan 29 18:54: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 4Yjrtq365Dz5lmZQ; Wed, 29 Jan 2025 18:54: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 4Yjrtp6Wjkz3C27; Wed, 29 Jan 2025 18:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176898; 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=3Bl4+ezTNbrk/8W8dS678ghIteUj3PZ8izoQtwL95r4=; b=N3fLw9hrsjm9MypCE93IocGlEMibbIeb3l07yR0oV4MI/sJYa/SrzaTWKyElKA8hKrHRvP dF1wkwlz/d82gw87VtzkKKxBMpJ3800DjF/ShW8JjviefrGI3EmqP95EnwoxdUaEdt9rAW /ADWhdM7/f4TxHeze1s3Tl6NUHvU8tqtkJlqaNT4wTChcArftFXGtrCgipKn7u5hZrdOFv 0NEztBfLRNTu3tSiJapggKVGmIWbupFCoCWEDTvv/TofFXm/0abxP+Sp5vInS7vBXdnpAv Gsi2ea1YQl27GsMSYLMmr+SGvISq/N3AvDE372F3wVHtsQ+DjgI1at1TIF2E8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176898; 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=3Bl4+ezTNbrk/8W8dS678ghIteUj3PZ8izoQtwL95r4=; b=x5SwMYKytm0bAs93Fa946A0GOC1fQ/YzTlhl8BdQZU2MRimvmvHFnmrKJ/uSg0tPY000Nd YlwJr5RaQ93wfTjcT46ZArOYkTq/Z8kfAqTCi6V0rv6RyrTcDnP7tiSi5qTb1aaONznubH sUNEkZBagqnE/0UaDirjtfMOGoOl1WOCLXwNncgeeehQkEtOj+cbxNZOLI6tmeKW3cxBwO v9GLxEtyZAvkQIWVaYRz5Dhf6gFsKz8sdt8E/8x+mhwUEwHscNBbJe/GPlqafSCng/iTAP hKeqFzb7f78ppASqmNW+8ZHgvEXKsqmbtRWcwWrLG9JK3SLt40tHk6RtkE1ZMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176898; a=rsa-sha256; cv=none; b=YoK0EBjN4PXEkpTAfHOIHI4/+3Kqth26xOU5doyMCuH4xX76pxKTg6fpD+Izo/+TF5eKMw 9YzfTKDRIPcpcV9Dd/OO6UR6vn3rMklbWEkBAaVJ+x+Kb7kWVI8nHbIkQLNlsEV8OwQxQd U5xsF+ag/sFgpRIfpeFtsja4ZkQAqVhXSI30F846uxV/ZIXuoDOg+3/K4IyVEtUhItAtMN hxGgNFFdtSCaEYfD76FxZqTDXOC2wbDABajkQIRsf+9tUAcVMVisdd3gnE8k3+1fjFcPmB y6aqHCz3qVjyauGTRGn8vLNrnlRE91ofD5CXawheSbO1jMfe6MdWR+AbpxIv+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 4Yjrtp64N3z1Cdp; Wed, 29 Jan 2025 18:54: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 50TIswtU064154; Wed, 29 Jan 2025 18:54:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIswMJ064151; Wed, 29 Jan 2025 18:54:58 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:58 GMT Message-Id: <202501291854.50TIswMJ064151@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: a1e3ff6580de - releng/14.2 - Add UPDATING entries and bump version 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: a1e3ff6580de176e7b5e989ae7b345ee0797af0d Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1e3ff6580de176e7b5e989ae7b345ee0797af0d commit a1e3ff6580de176e7b5e989ae7b345ee0797af0d Author: Mark Johnston AuthorDate: 2025-01-29 17:34:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:34:06 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 17 +++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 3a644b8feaf2..90037d45bd19 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,23 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20250129: + 14.2-RELEASE-p1 SA-25:02.fs + SA-25:03.etcupdate + SA-25:04.ktrace + EN-25:02.audit + EN-25:03.tzdata + + Buffer overflow in some filesystems via NFS [SA-25:02.fs] + + Unprivileged access to system files [SA-25:03.etcupdate] + + Uninitialized kernel memory disclosure via ktrace(2) [SA-25:04.ktrace] + + System call auditing disabled by DTrace [EN-25:02.audit] + + Timezone database information update [EN-25:03.tzdata] + 20241203: 14.2-RELEASE. diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 8afaa8ccd571..9bfa4bd5853f 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.2" -BRANCH="RELEASE" +BRANCH="RELEASE-p1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Jan 29 18:54: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 4Yjrtp5c5qz5lmbj; Wed, 29 Jan 2025 18:54: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 4Yjrtn5cd1z3Byl; Wed, 29 Jan 2025 18:54:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176897; 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=HxspITxlx/+XbNo//kw++8Qids2yanH/0N5QwrVN9Ao=; b=K7Z9XaHdcT6eTgT8Q+1Trykxprf8fv9TdU+jcXfd7btNY1hJjL+mf25kcboMk2mnxdmzur exjLi+Xsd9lDKZF14JSkiWhsA9Zt9nrVqn4+x1jqzR41UbilGMhvoYk06qS6SGnpnnMUz7 VCoOmqgQXa/KtiznJI43gMnKi4IBo/WuXd23Ool4yMdeaEP7Nm8nniv8CErt2URzJIAqzL gtmlmgp1/hCxyLesp+9MJlOL3yt8dlojTSlWqCkVFAooa0wb/DzYYlR/ZK8A77KpMrDxvR p+fB0P6aBOmEdtApEyGi5B2rK1alv6uZS79gcR/Z/VfQhuOYcvT4Jqj4lI9YMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176897; 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=HxspITxlx/+XbNo//kw++8Qids2yanH/0N5QwrVN9Ao=; b=iw+uvC+5obTuQ4Zb7kkKnYv+HRS7YifSEqq9pZYCzig6ot6tMCR3Ep4rr+mBXsk7KEUlva 82OimKqQdeuScd0JboN1Vv4lbu0gTd+nVEEIgOSPr3gcOFUDta0GCKmy5ILG8AVXQC5s3l AolTYc5tcWLZ/MXBfr6xy/uDpoTs3z1SbFLUUS/FO6joLhaa0vIa8Cnczdf68eyqpueyk5 CKaMnfdt3JnaYCvnk1d6Q8tNmSVErmQ1V5DdGLLrdIPgOtR/kbuMqLH2Q+7mJW0iqpvPcK svKrQiboL2i6hTSHSsQA3l9laeRvO3j3cvPCKiyWSyyGwgbTF3KzOCkS35/uQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176897; a=rsa-sha256; cv=none; b=CgJGRlfbyp7qK+qwEKPY5sBdsx6T1p16FY8/m7P5gnzqbl+F1uzHfljhtxFAY+66UHkIxW GbIk80YUZ7JH6kyYNEhk3F6wKxzOY5h6ZNE8Uy36ULxOhhinjHGOPlXXFuuXAdBkFZw3sU w8+qjRn2/oqLUAqaOZ4I42M1xCgv99C+uodk56jfkEAVM++UcxIVyRDlW2xb69XY3P/gTn Ejptx8rxgm/nxn74oQOdFg2uU9B/ldSTjlte8MBl0uooTFP2+tzuPmHnYo0AglosPKxkRc p3LTp2DXfd9fjFRJkwtlbaRPg2Rv3G4LLaQ3cudRfA+owvdcrXaSoTYjiLQPtg== 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 4Yjrtn594Cz1CbM; Wed, 29 Jan 2025 18:54: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 50TIsv91064120; Wed, 29 Jan 2025 18:54:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TIsvIO064117; Wed, 29 Jan 2025 18:54:57 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:54:57 GMT Message-Id: <202501291854.50TIsvIO064117@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: c55000e7c233 - releng/14.2 - etcupdate: Restrict access to the conflicts directory 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: c55000e7c233573bae396df6099dcfc564abdcb7 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c55000e7c233573bae396df6099dcfc564abdcb7 commit c55000e7c233573bae396df6099dcfc564abdcb7 Author: Mark Johnston AuthorDate: 2025-01-28 14:23:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:27:37 +0000 etcupdate: Restrict access to the conflicts directory In the window during conflict resolution, copies of installed files with conflicts are added here with the default mode. Restrict access. Approved by: so Security: FreeBSD-SA-25:03.etcupdate PR: 277470 Reviewed by: philip, jhb, emaste Differential Revision: https://reviews.freebsd.org/D48576 (cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1) (cherry picked from commit 93836ff92be84a1d4e7611577ffe116a0e30d008) --- usr.sbin/etcupdate/etcupdate.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 39d1f9e56a54..7bddd6593b56 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1611,6 +1611,9 @@ EOF # Initialize conflicts and warnings handling. rm -f $WARNINGS mkdir -p $CONFLICTS + if ! chmod 0700 ${CONFLICTS}; then + panic "Unable to set permissions on conflicts directory" + fi # Ignore removed files for the pre-world case. A pre-world # update uses a stripped-down tree. From nobody Wed Jan 29 18:55: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 4YjrvD41Dmz5lmnZ; Wed, 29 Jan 2025 18:55:20 +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 4YjrvC05NLz3CTB; Wed, 29 Jan 2025 18:55:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176919; 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=xo3z1QipZpeQyqXtZ9hYqKS9VlaDDPENi4TI0PdhA3Q=; b=t2pP4CKo78EhTVnbFB+9Tqlh0lwnHYmOUl794KAiEbaMGah6UB9xbEpFqGPgpLBmFrRvvZ fXs9sDMuOF6vElO5gKof3ONwWUUW87SVVmjIaHFjyyfhxRbJx17OqJ9wIpIzNHlX+o6Ig2 8Lfq9lSdnKwikglOKLHKDm0dRJlQ3EBmTad8UpTgYvU7kPa7dnAezzbMeN265xlYTbB/Fe bTOa8zeaVEk3dE0DDXcmsfO5mvBeBNh1HOo8b1nFwMO9+L4gE0aTgc/WrN7EqSjLHYoZaA pbKfAQj2TYMplKsPj6zspEWvSuB7pWdq4PqRi1p5glAAYJxwRTPBmfTYPv5fOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176919; 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=xo3z1QipZpeQyqXtZ9hYqKS9VlaDDPENi4TI0PdhA3Q=; b=SCdPVGpB9NgA0F3NzFVW2NbwjFkP1v7G57ikxtv2sc80to8OUwx1yCG1ds8lz1o+LMy+P9 HQBmuGQgQIBhMj3cubwzVXa/0LLeEp+9n1Lf5JoJeILACuNZ4tRNFjxOT8n/xGSrK06Ovn t98zVfXBSPP5MxSC/toSaV45mXlvEDRkGNQU0ze/Jzo3KEBXuZw4wyoRznFWsW5HNhZvFR rxncrEnFghv+mK+U7ieH1Y7R/MOVcp//eQcbc1Gm45dS683Op6Qf5x6JFo6iIwOzuaS3To hp6EIxw9MGaJ60vrMwO76OmbQsJE4keX0GZBKWQcTn9X7PIQyX9oGsSRKTFHZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176919; a=rsa-sha256; cv=none; b=oCZwKA3FLadn+S+4Cb3P7qjDcHfOy/m+fxKRu3hEd/lX7KVkw2KTRfqkitY+XDm0dRCs1D POhmoJN9ozzQ1t3nIkPU3fgFs241IsRqlPGFR+btv+mKOIvj+tcVsuqYkGgYuTkXl+6Y13 bwKUwwtLE1KMGX1MFuMIvOP92X9V42TJH9ag2xOAwA+kK0TevRjmj8vmrZLtBRhIl5O/Cq uwN3/Dqu5vjwyXTGka8NXoeu77vK/sk8odS932judtbZJlrdbCd4IZfYAJ+Zj5/d8cKGpo GkMCxROISBng6Y0WijM1nrptZI2sHROSc4E6qhj2RWwtTyALxN+ephNogwQgyg== 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 4YjrvB6nWZz1Cl4; Wed, 29 Jan 2025 18:55: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 50TItI4U064510; Wed, 29 Jan 2025 18:55:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItIpi064507; Wed, 29 Jan 2025 18:55:18 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:18 GMT Message-Id: <202501291855.50TItIpi064507@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: 1574c53178e9 - releng/14.1 - audit: Fix short-circuiting in syscallenter() 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 1574c53178e98cbe65019b04e726dcac980a0bb8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1574c53178e98cbe65019b04e726dcac980a0bb8 commit 1574c53178e98cbe65019b04e726dcac980a0bb8 Author: Mark Johnston AuthorDate: 2025-01-14 14:19:24 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:11:43 +0000 audit: Fix short-circuiting in syscallenter() syscallenter() has a slow path to handle syscall auditing and dtrace syscall tracing. It uses AUDIT_SYSCALL_ENTER() to check whether to take the slow path, but this macro also has side effects: it writes the audit log entry. When systrace (dtrace syscall tracing) is enabled, this would get short-circuited, and we end up not writing audit log entries. Introduce a pure macro to check whether auditing is enabled, use it in syscallenter() instead of AUDIT_SYSCALL_ENTER(). Approved by: so Security: FreeBSD-EN-25:02.audit Reviewed by: kib Reported by: Joe Duin Fixes: 2f7292437d0c ("Merge audit and systrace checks") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48448 (cherry picked from commit f78fe930854cac6eed55859b45e0a7b5d87189d6) (cherry picked from commit 4b9ba274d736de74676051c8f13e7d3dd536334b) --- sys/kern/subr_syscall.c | 8 +++++--- sys/security/audit/audit.h | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index ff13672501b2..9b66cbe5c5fc 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -140,9 +140,8 @@ syscallenter(struct thread *td) sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; - if (__predict_false(SYSTRACE_ENABLED() || - AUDIT_SYSCALL_ENTER(sa->code, td) || - !sy_thr_static)) { + if (__predict_false(AUDIT_SYSCALL_ENABLED() || + SYSTRACE_ENABLED() || !sy_thr_static)) { if (!sy_thr_static) { error = syscall_thread_enter(td, &se); sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; @@ -157,6 +156,9 @@ syscallenter(struct thread *td) if (__predict_false(se->sy_entry != 0)) (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); #endif + + AUDIT_SYSCALL_ENTER(sa->code, td); + error = (se->sy_call)(td, sa->args); /* Save the latest error return value. */ if (__predict_false((td->td_pflags & TDP_NERRNO) != 0)) diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index e7a9c83afbb3..3c8419a54ccc 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -389,9 +389,11 @@ void audit_thread_free(struct thread *td); audit_arg_vnode2((vp)); \ } while (0) +#define AUDIT_SYSCALL_ENABLED() audit_syscalls_enabled + #define AUDIT_SYSCALL_ENTER(code, td) ({ \ bool _audit_entered = false; \ - if (__predict_false(audit_syscalls_enabled)) { \ + if (audit_syscalls_enabled) { \ audit_syscall_enter(code, td); \ _audit_entered = true; \ } \ @@ -468,6 +470,7 @@ void audit_thread_free(struct thread *td); #define AUDITING_TD(td) 0 +#define AUDIT_SYSCALL_ENABLED() 0 #define AUDIT_SYSCALL_ENTER(code, td) 0 #define AUDIT_SYSCALL_EXIT(error, td) From nobody Wed Jan 29 18:55:19 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 4YjrvF2pR4z5lmdR; Wed, 29 Jan 2025 18:55:21 +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 4YjrvD1QSwz3C8X; Wed, 29 Jan 2025 18:55:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176920; 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=6+2GgoVW3xwa9lYt8ZNozSDxLK+k2r9NmxnR0H+2Eq4=; b=tITahBCxXDYSK2U+9CYHm+9Mk+et1Ipf8Oq5ELD9H7Qi3vGIFfPaW4udhtojJpCyNJpExP WXBZU62WDQgIghd62xRoZninWivJy1TCkg/W75QB2iQLet7umYbB2qzHc3P6sELtBdLsSO BaE1u9QmMGfWk3yXnEJlNfoAl3ExUVJ21R91FFWdamSVxuey3la7NPnPYsx3QUWjXALRfK JRpq6rGuhS/C52o5t+ZjxUTpy/J9yqHA5uT1Vcec8+fy2C1eFmMyczwqHFeIiSz+eT9jqX 6zb9ECk4wtL3ZGVrcX6U+cre/kXVYiQS5BX20B8AdXcWnQ8oHzkO7LkpzwrLIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176920; 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=6+2GgoVW3xwa9lYt8ZNozSDxLK+k2r9NmxnR0H+2Eq4=; b=Wj5p39TvyE4mcAOwB6WlgTMeKqFA4LFaQmu8vQQTBB3Bw9WACVtQ+R0sRXHLAnbS0nR8v7 y9KchF++ht9KBbKU19r59oRN+cQM8tQFe5RazqBVwDVukRRq/DuEoE0vgpJxfjFNeSezRT TDEHshYP/sozkxw9kk4o5fNvw7o9yOJ6fki/Ity+xu5YNY4B1F8zRJRlYWTGN4OnrmNopN enBeeyoAbIGU09ew/Dk6rbE5+l6TPpIUnvJ7FxNZcWquyLIZnSDl+KFMyC/M+ZndOJhRlZ HU3oHWz3sYZJNAcZkyh8RPLJjlt+7r3XjEe87ZVQYIsaBR56fLm3YNJO5XybuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176920; a=rsa-sha256; cv=none; b=ix7dNc7uKqcI2nRwy0Z7yiohVNdDJYBDBINaWpth6d4jIhFmfs3bIOMOL85wDOVYciCnQR MRdc5XLiD58S9ycN+DN2dXVZ89faJIgMgq4cjbsCSm56dTzI6vOalcsGoOKryIEBDSZAup rl+KkG2X2EtJSGykxLVC1Bdko7AC0ZolEeH+MMt4C3BhOrc602Kzjvv6jabfxZsScxIvg7 ctv91CuC9N3JH6vzI6RYeg/jC1XS2h4D69MN7OUHsZJyHG4/SJFfW0vTk+sankJKrq5iT8 X0dodwN15JH32siwuRQWkKOBpK5g7LBIJCLln8msVuTTkSCNzB4E6+mfpx8s1Q== 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 4YjrvD0TwQz1CqW; Wed, 29 Jan 2025 18:55:20 +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 50TItJh1064544; Wed, 29 Jan 2025 18:55:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItJem064541; Wed, 29 Jan 2025 18:55:19 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:19 GMT Message-Id: <202501291855.50TItJem064541@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: d8083f5425fd - releng/14.1 - cd9660: Make sure that struct ifid fits in generic filehandle structure 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: d8083f5425fd486aad2d6178ce8c0545f0cb6957 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d8083f5425fd486aad2d6178ce8c0545f0cb6957 commit d8083f5425fd486aad2d6178ce8c0545f0cb6957 Author: Mark Johnston AuthorDate: 2024-12-06 02:03:59 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:11:57 +0000 cd9660: Make sure that struct ifid fits in generic filehandle structure File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packs the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reported by: Kevin Miller Reviewed by: olce, imp, kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47879 (cherry picked from commit 205659c43d87bd42c4a0819fde8f81e8ebba068e) (cherry picked from commit 54974e731f279941ef7aebd7d30ba2e9299a4056) --- sys/fs/cd9660/cd9660_vnops.c | 3 +++ sys/fs/cd9660/iso.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index cb619379e2cc..31dacb392a6b 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -761,6 +761,9 @@ cd9660_pathconf(struct vop_pathconf_args *ap) /* NOTREACHED */ } +_Static_assert(sizeof(struct ifid) <= sizeof(struct fid), + "struct ifid must be no larger than struct fid"); + /* * Vnode pointer to File handle */ diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index bf98e75c42d9..b54f5f8e5cf4 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -269,7 +269,7 @@ struct ifid { u_short ifid_pad; cd_ino_t ifid_ino; long ifid_start; -}; +} __packed; #define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)->mnt_data)) From nobody Wed Jan 29 18:55: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 4YjrvB5cZBz5lmbP; Wed, 29 Jan 2025 18:55: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 4Yjrv966f2z3C8G; Wed, 29 Jan 2025 18:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176917; 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=jcGzatMaJSlNM70DKNjitjubWHb3A88WYb1upPj5Hcc=; b=atf+yjGhJb0ykASWcnyqctvow5qtIeAtmlKBO3vKExOkCLdM5Ps3Ba+iydAncVpl7qMR+p dtKurSABzHHR6DZETydzSZ6Qd8ZnXWyQbITeOAVcg3UDGvAj0zv6PtV/cU0rFwQlZTtn/q j06sayEz8u72bfq6bvQVPuzO/X6zaOcClJnHXn8H2tqBtoYlJIJctP8hz27UktYJWb1mnK R/tB0+r4gSVbYMcFH9V6X6YQTOVRKdHqGGeZGi1tM741zmzY8ZLiW2mlLLHPgeCCQn0Bcp mgs95ka01IROA9kjN0QH1iiuwOO8O1tWHiW9a5YJIO4iKQdwZ0oGDr9z/lTLJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176917; 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=jcGzatMaJSlNM70DKNjitjubWHb3A88WYb1upPj5Hcc=; b=f+p73a3rhQyRh4Jz/NY/Fd7rJlz0r6e93E5wGszGp/sWlC/lgze5qoc11AB0PBoSsa9GOV 5J8iSNsWA6RLPlP98YMRQfoLxlrOESAMS2mKFGSeUiUouzyK9z1wnrjM8VR4LiGBjcpSXD OHQA7UMpCN9/xKFDzwNjSBYcSBN0CvYU15BJti1kRVZHGBPb7BYRCuRbeR1aHXqzNiWSFW p+2iqnF4P+XqB3jrBa5AXrqhvQsTjXeTAC41lIx6HUGlsaB0V/oY+m7LPK+HcV21X0tLxj +GRj49MiOa5Uh9O00ebt+vDhXo7sSuo6NceU1FenPbwLbWAuW6eWGVayXsgNOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176917; a=rsa-sha256; cv=none; b=i4U44UyWnQKjcj7a1lcPl0cUzN8Mqr8tEZtnsNec4lKh1pOFGU+pB+1FhTmzEiK3x+zUu3 MDoFHm/SrVXf7Ma/10VH9LaHqqip5Ceao+azeXyEz1TPatpUt0YdZzt+jOrErzTPskobE7 UXZ+ElIHlxzHCPiz6c9j05UD0Ok9tnNZG0y/GTJZmt+nJEZNj7B4fGb9Axug/fzUgLRB+m 7b2EncCyLwwZOJdb8cLxquNNU2puW1BZgOYpjE2n8wnQkmvsn8oWq2qdZhVfK9vmLo81tA 6tDxtcsQ27rVkfpUxeaHi4WPyEkbl5931PH0x/xJDmDEqc3LKQhm+aCVg4fYMw== 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 4Yjrv95kPdz1ChM; Wed, 29 Jan 2025 18:55: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 50TItHZO064472; Wed, 29 Jan 2025 18:55:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItHKD064469; Wed, 29 Jan 2025 18:55:17 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:17 GMT Message-Id: <202501291855.50TItHKD064469@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: 4fdb8d1ab316 - releng/14.1 - svc.c: Check for a non-NULL xp_socket 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 4fdb8d1ab316c5b80abc0c566b5d05d605e38b12 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4fdb8d1ab316c5b80abc0c566b5d05d605e38b12 commit 4fdb8d1ab316c5b80abc0c566b5d05d605e38b12 Author: Rick Macklem AuthorDate: 2024-05-28 02:22:04 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:11:29 +0000 svc.c: Check for a non-NULL xp_socket Commit a16ff32f04b5 added support to the kernel RPC to set TCP_USE_DDP. However, for the unusual case of a NFSv4.1/4.2 non-NULL callback, the xp_socket field of SVCXPRT is NULL, since it uses the same socket as the client->server connection. This patch adds the check for this to avoid crashes. This only affects NFSv4.1/4.2 mounts where either pNFS or delegations are in use. Approved by: so Security: FreeBSD-EN-25:01.rpc (cherry picked from commit 6c9170e0afc4ebec81ba88a6370ebf6cb55520ba) (cherry picked from commit 4c136aad80e6da1c9aa99de863642fe64a54f9a8) --- sys/rpc/svc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c index 6d19a0b1ea7d..1e0e02c23cc1 100644 --- a/sys/rpc/svc.c +++ b/sys/rpc/svc.c @@ -1000,6 +1000,7 @@ svc_getreq(SVCXPRT *xprt, struct svc_req **rqstp_ret) * enable TLS offload first. */ if (xprt->xp_doneddp == 0 && r->rq_proc != NULLPROC && + xprt->xp_socket != NULL && atomic_cmpset_int(&xprt->xp_doneddp, 0, 1)) { if (xprt->xp_socket->so_proto->pr_protocol == IPPROTO_TCP) { From nobody Wed Jan 29 18:55:21 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 4YjrvF5T8Vz5lmnm; Wed, 29 Jan 2025 18:55:21 +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 4YjrvF1zqpz3CRF; Wed, 29 Jan 2025 18:55:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176921; 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=4XIIIBKEonSgDPzmaKsGJCQ+jfrbE0B6YguKz3OqWrw=; b=Y5rwKKwXoC30kHRDBI0g8RYF9P9UHM3jZHupvAWk1UE7o+hyCZo9yT0hWBX3czdzfPS5SW jKRjIavYs0KWbqiy8gj3Akm0hmUNa62adtlmNRjhgVN8ipFDvchpJoeUje82uqTZCeSO8p 7IfPKlJilIMBWTVSoOS/0hCMCylvH+nBprjNqwtoDNjxpOz8lFPCJagmX9hzf6mtSVUR2C LJGqx0ySy+0C05X1gw76Kt+qckVrf1e0rxFwUecboCionZbLnJGL89HwZLF3EofQT9Frg2 bDmAT4a1NGEMtiHHzy3uM8tGbuR6yGRbe+AxGMuh2kxYnbbjWrDkmmcMNl5AEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176921; 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=4XIIIBKEonSgDPzmaKsGJCQ+jfrbE0B6YguKz3OqWrw=; b=H0z//IG2H4vhTNmfx8PtGfdWWUm9p2LZF1U3mWpCBITvw3qfcicLFsUBiW0ovK2wXMCLkH chjPTQWs/dfTppZSNyStSwfkFa923CtxTyxkF5tJ2M8UcxmQCAw0e4DrrPGe6wJSDpLkeR T8yYpmpyAIHWniAV13Gnmu9BKL91yBQ9ew2nDWZ1qGMMmtQTwKH0clLNP3EHsT4nPR0qOE Uzy042onI/08TPg8s78De6DQLGgILxi9LUIf+2fO9mi98Qz08DXyDjKUkntvciC+krbJN9 esiwb/OBplH9PNX0FBR5d8XMU8yWSUlmXFTFh0pZ+pdzRla9QWeNO5PCMQrYBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176921; a=rsa-sha256; cv=none; b=SRWQfX49GfkYfi8C4ipNADOr3JBWUeO6BlJ9qMSmC5pM6Ql9VqJHInHkCbESlrdF+SAwiN XSfHtVLTFtTAeQTRIiMVbVH9eRvbmLeL+dpjAMb1iPeohVhfkQUNpBAHEIeE8yN4bAXx32 gvRl+TrxelujH5gJYibaFSIbYGqA8eaXKhAwpYUvTcuHBekkxffs+tRrMvsqoT2yt1jXYh UE6J/luejMYQdHr9WiVa+GsniSqg4aLtH/+7jvU6vdyHchASQOsEAIulj3cQ6ywTGlanCa /KJcZ90oQ7DFsqXyXgevCuu770PMT4Wr8q93sC97TLEQdCQuBtSbsFpWbq/UvA== 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 4YjrvF1Rc4z1Cl5; Wed, 29 Jan 2025 18:55:21 +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 50TItLPX064579; Wed, 29 Jan 2025 18:55:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItLiv064576; Wed, 29 Jan 2025 18:55:21 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:21 GMT Message-Id: <202501291855.50TItLiv064576@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: f2cc3336ad40 - releng/14.1 - ext2fs: Fix the size of struct ufid and add a static assert 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: f2cc3336ad40603980d9ff0234c47cfdced03eca Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f2cc3336ad40603980d9ff0234c47cfdced03eca commit f2cc3336ad40603980d9ff0234c47cfdced03eca Author: Rick Macklem AuthorDate: 2024-12-06 02:05:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:12:14 +0000 ext2fs: Fix the size of struct ufid and add a static assert File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packed the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reviewed by: markj MFC after: 2 weeks (cherry picked from commit bfc8e3308bee23d0f7836d57f32ed8d47da02627) (cherry picked from commit 7a3a0402aeb626a7379addd344cbfd8900e83baa) --- sys/fs/ext2fs/ext2_vnops.c | 2 ++ sys/fs/ext2fs/inode.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 1c4b62bb4086..79d50a6a64cb 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -1892,6 +1892,8 @@ ext2_vptofh(struct vop_vptofh_args *ap) { struct inode *ip; struct ufid *ufhp; + _Static_assert(sizeof(struct ufid) <= sizeof(struct fid), + "struct ufid cannot be larger than struct fid"); ip = VTOI(ap->a_vp); ufhp = (struct ufid *)ap->a_fhp; diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 46e6215aff6f..14d2d6454737 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -193,7 +193,7 @@ struct ufid { uint16_t ufid_pad; /* Force 32-bit alignment. */ ino_t ufid_ino; /* File number (ino). */ uint32_t ufid_gen; /* Generation number. */ -}; +} __packed; #endif /* _KERNEL */ #endif /* !_FS_EXT2FS_INODE_H_ */ From nobody Wed Jan 29 18:55:22 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 4YjrvH0BQPz5lmkL; Wed, 29 Jan 2025 18:55:23 +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 4YjrvG2rPHz3CFP; Wed, 29 Jan 2025 18:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176922; 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=S0qPP9KgDi+vLhWGv4jNXzFoNDfFWGReauhz2PNOQ10=; b=avgl6lC1WVQHku0dBSElAN5i+0gLIz2ZA8CKManJq53ApWqGTuh+ZuSpyTctOnvk00wa26 5Lc/T6ewgoVHZxzowmGZ9cAsZZqoxkeUw4d2VlV8zOTVO1jM0SnyJOaEEQaBj578Krfw/7 E/ZDuFg1n9udP8UUHVFOECMAILmjz2OG9LL11bxROSrCosd7G8IsrgiE0aD1cxF9HDXxfm CvAa9xY/Spi2++uq3caRTUh30sAI8ParZiTYnKENmsEG34TpVfcAWHbvejByHGFS5oQEY6 7OEGGIqH1eZgNgJN+Un0LnvG8N4unKfsFL0pkn0O78AJJ2CAqagOL3fsLG+wUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176922; 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=S0qPP9KgDi+vLhWGv4jNXzFoNDfFWGReauhz2PNOQ10=; b=ayEu+jzCOc3PhejPQ24Qls55iVjVX5JGHcEIrFA7ntC1avzAv+Sv4UCl85BHuWWl9cWGfv ynoz4rhu2lWvh3kHAUZT6HfFRnEoWp2OgWit8gg+SVHDFejNgwluOt1KSuloszo47Wfsa+ id/vps+podJxz+Tu8a+/vZl6u3c6onc7a/dBdcsGVwxK/dY0Kc3nbRPQ2eQ7EhvqdXx72c h3rrnAigg4CYaPnwkbK+Vwm6K6mzW6f+mdkYKXp/1pY8G2n2ZXC4EoaRTnrprjQWXX412t nfjEkR2xPK/jlfbeLPfcsLGXGE/ESQWHhbhMP3IgxJFJGJuvIz+0yGqS1UPOzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176922; a=rsa-sha256; cv=none; b=cwubH16VuIC2031pIvY3V5NtWqDNxM6so/czff2dALMb19hIWw60rJvWtNuZ/2i3m6rMu/ IGlQBIIC3kt+z+sFR4aU6qc7On4WyCRg4sjPbnEQtRR+oiVTzB5nPSDBP0FbwXk3AAh+Py 8DDYH/TCP27+ofKi6IsM8OuAfYh1wSl+EJ0vWCmjPsu4+oS255b4CvF3uqgte/oDUMkcTV +CvlvDCg1Rj+q3KYR1ZYtuKWfi7tq3aJ0NeEIRS0A8rVGqt2cmlXStsC1fgsqKXXAhnDlt FCkcwpwUwS2uqxNJmLvuU4l8zry2GTvqMSyKfBzjvzNq8ethJ3tqlnvNnSXcDA== 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 4YjrvG2NGgz1ChN; Wed, 29 Jan 2025 18:55:22 +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 50TItMnW064612; Wed, 29 Jan 2025 18:55:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItMXL064609; Wed, 29 Jan 2025 18:55:22 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:22 GMT Message-Id: <202501291855.50TItMXL064609@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: c90866090517 - releng/14.1 - tarfs: Fix the size of struct tarfs_fid and add a static assert 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: c908660905174eff289a9f06e69c125ee414409d Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c908660905174eff289a9f06e69c125ee414409d commit c908660905174eff289a9f06e69c125ee414409d Author: Rick Macklem AuthorDate: 2024-12-06 02:09:27 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:12:27 +0000 tarfs: Fix the size of struct tarfs_fid and add a static assert File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packs the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reviewed by: markj MFC after: 2 weeks (cherry picked from commit 4db1b113b15158c7d134df83e7a7201cf46d459b) (cherry picked from commit 155987e2019089a5bd2eef77ed7bcc5cc26c362e) --- sys/fs/tarfs/tarfs.h | 2 +- sys/fs/tarfs/tarfs_vnops.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/tarfs/tarfs.h b/sys/fs/tarfs/tarfs.h index ff1985e488cd..ffb95d2c0ac5 100644 --- a/sys/fs/tarfs/tarfs.h +++ b/sys/fs/tarfs/tarfs.h @@ -165,7 +165,7 @@ struct tarfs_fid { u_short data0; /* force alignment */ ino_t ino; unsigned long gen; -}; +} __packed; #define TARFS_NODE_LOCK(tnp) \ mtx_lock(&(tnp)->lock) diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c index f2828c60f8a7..4bc923ed8f9c 100644 --- a/sys/fs/tarfs/tarfs_vnops.c +++ b/sys/fs/tarfs/tarfs_vnops.c @@ -668,6 +668,8 @@ tarfs_vptofh(struct vop_vptofh_args *ap) { struct tarfs_fid *tfp; struct tarfs_node *tnp; + _Static_assert(sizeof(struct tarfs_fid) <= sizeof(struct fid), + "struct tarfs_fid cannot be larger than struct fid"); tfp = (struct tarfs_fid *)ap->a_fhp; tnp = VP_TO_TARFS_NODE(ap->a_vp); From nobody Wed Jan 29 18:55:23 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 4YjrvJ4LT4z5lmwn; Wed, 29 Jan 2025 18:55:24 +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 4YjrvH3clrz3CXp; Wed, 29 Jan 2025 18:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176923; 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=tkpEuoAHGL5XUgSxEAAMapDUo0DMBJjbN210aiAcR5U=; b=VnAAFxAY8LJgYMo8z16SiSVK+ih7+ZAl52SDlxlmy8zPlIexgTpmF0lekq4lqDTC+pR3zF FRwBd+mYXs8bcq54ONs80BDSOaSba4o7cUij7dNwTK3Uk6npUhVzOdtSCv8aseSAjrSA4i o7Ck5MrD5gFakg6HXXEmHrmCmXipfA407pH9JFhETz30v6tqNlQwSdluerA3R//CETmNqo trIkK277eTv2RvIfCRqYVRAIn99ulPdatGFx8LNcChLMcyIxeBXhwhp72W14Pa33MF1/fC 8j+jv+0hX5lLdXrWRdQUL0ECS82AHJpIVTJBO19/PufNEyOSMtEgpP+Lxbm54w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176923; 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=tkpEuoAHGL5XUgSxEAAMapDUo0DMBJjbN210aiAcR5U=; b=Qf3SLcGV1F44/C3gkBJuF5kuL6k9spWmyNZad5P8bld6wwXhYDfAPFCneqGrjF2G7dirv6 llsBqFrB/3gW1DpVu1SgaemUmHXkbSE+F2r4BspY81UnJRdD8GlLvHDWGDXc4ZwuMd8Yo/ CaSKg5xhRQukRldchaW6+pEzeuwcHbeRlhzKQrH8drmzjulvlcqzpiRRHXWIf38vSd7B6Z MdCl9BUZPZJt+uMNffewaoF1WtNKVsISHv11YP3F5fqF7fJzx++9Z5imPsl/cI0T6c3t1O Y8OqBVxPYdOUJIrNlCN34erkJf/aVbMt0Sxc3LYmDi2J+fWQPowo9NUOnxDh4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176923; a=rsa-sha256; cv=none; b=ObbVopugziLVH8H53hKBfyw50S+VpCcRyGDzQYh7rEpEyssHmPFh/LbQmhr1cfvQC2pMzL mfA8imjxeaMRt5zSuPPDS5LvVp/DEfMFCMl0kSKY6c2MYjDUnAGT2cpq9Hh1EpkZe+3p1T UtzyD03qbFeL4QUIhdh5c8a6r3tnCTBQkZ0fm02F3OBfHEJrT2oIuIZeAgwCwMx3b9Z+O5 vtdyjoDROkCK4yMN+Arh39x8ug1TkHNw2wnRYRIoFuTuzidKf5ArdZt9SX6ubn/HjNYQud Iz7Al1KrySgwIcIOItPdZKXRwAa6IjR2XDtvpRfdeTDDoTO/W5bCVktX09nIuw== 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 4YjrvH3BK8z1Cl6; Wed, 29 Jan 2025 18:55:23 +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 50TItN9c064646; Wed, 29 Jan 2025 18:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItN52064643; Wed, 29 Jan 2025 18:55:23 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:23 GMT Message-Id: <202501291855.50TItN52064643@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: 8635fea6ed9f - releng/14.1 - contrib/tzdata: import tzdata 2024b 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8635fea6ed9fab17b41ef01ccc8929820c4f896f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8635fea6ed9fab17b41ef01ccc8929820c4f896f commit 8635fea6ed9fab17b41ef01ccc8929820c4f896f Author: Philip Paeps AuthorDate: 2024-09-06 01:37:36 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:12:35 +0000 contrib/tzdata: import tzdata 2024b Changes: https://github.com/eggert/tz/blob/2024b/NEWS Approved by: so Security: FreeBSD-EN-25:03.tzdata (cherry picked from commit e273650f2c538034b45f78e670a89cbf333ab6db) (cherry picked from commit 7eb0b02bc4eddee6c916ab6a01ec92e0b9dc867e) --- contrib/tzdata/CONTRIBUTING | 18 +- contrib/tzdata/Makefile | 412 +++++++++++----------- contrib/tzdata/NEWS | 124 ++++++- contrib/tzdata/africa | 73 ++-- contrib/tzdata/antarctica | 58 ++-- contrib/tzdata/asia | 442 ++++++++++++------------ contrib/tzdata/australasia | 130 +++---- contrib/tzdata/backward | 15 +- contrib/tzdata/backzone | 35 +- contrib/tzdata/checknow.awk | 4 +- contrib/tzdata/etcetera | 54 +-- contrib/tzdata/europe | 713 ++++++++++++++++++++++++--------------- contrib/tzdata/leap-seconds.list | 30 +- contrib/tzdata/leapseconds | 8 +- contrib/tzdata/northamerica | 145 +++++--- contrib/tzdata/southamerica | 486 +++++++++++++------------- contrib/tzdata/theory.html | 214 ++++++++---- contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 32 +- contrib/tzdata/zone.tab | 3 +- contrib/tzdata/zone1970.tab | 3 +- contrib/tzdata/zonenow.tab | 8 +- 22 files changed, 1768 insertions(+), 1241 deletions(-) diff --git a/contrib/tzdata/CONTRIBUTING b/contrib/tzdata/CONTRIBUTING index 6d800e4c03a3..f6edbd3be7d3 100644 --- a/contrib/tzdata/CONTRIBUTING +++ b/contrib/tzdata/CONTRIBUTING @@ -23,10 +23,10 @@ such as renaming, adding or removing zones, please read "Theory and pragmatics of the tz code and data" . It is also good to browse the mailing list archives - for examples of patches that tend -to work well. Additions to data should contain commentary citing -reliable sources as justification. Citations should use "https:" URLs -if available. + +for examples of patches that tend to work well. +Changes should contain commentary citing reliable sources. +Citations should use "https:" URLs if available. For changes that fix sensitive security-related bugs, please see the distribution's 'SECURITY' file. @@ -63,12 +63,16 @@ If you use Git the following workflow may be helpful: * Edit source files. Include commentary that justifies the changes by citing reliable sources. - * Debug the changes, e.g.: + * Debug the changes locally, e.g.: - make check - make install + make TOPDIR=$PWD/tz clean check install ./zdump -v America/Los_Angeles + Although builds assume only basic POSIX, they use extra features + if available. 'make check' accesses validator.w3.org unless you + lack 'curl' or use 'make CURL=:'. If you have the latest GCC, + "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. + * For each separable change, commit it in the new branch, e.g.: git add northamerica diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index d48354c72df4..0087b4596515 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -3,17 +3,17 @@ # 2009-05-17 by Arthur David Olson. # Request POSIX conformance; this must be the first non-comment line. .POSIX: -# On older platforms you may need to scrounge for a POSIX-conforming 'make'. -# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or -# /usr/xpg4/bin/make, not /usr/ccs/bin/make. +# On older platforms you may need to scrounge for POSIX conformance. +# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), +# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. # To affect how this Makefile works, you can run a shell script like this: # # #!/bin/sh -# make CC='gcc -std=gnu11' "$@" +# make CC='gcc -std=gnu23' "$@" # -# This example script is appropriate for a pre-2017 GNU/Linux system -# where a non-default setting is needed to support this package's use of C99. +# This example script is appropriate for a circa 2024 GNU/Linux system +# where a non-default setting enables this package's optional use of C23. # # Alternatively, you can simply edit this Makefile to tailor the following # macro definitions. @@ -53,7 +53,7 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ +# The POSIXRULES macro controls interpretation of POSIX-like TZ # settings like TZ='EET-2EEST' that lack DST transition rules. # If POSIXRULES is '-', no template is installed; this is the default. # Any other value for POSIXRULES is obsolete and should not be relied on, as: @@ -132,8 +132,9 @@ LIBDIR = $(TOPDIR)/$(USRDIR)/lib # Types to try, as an alternative to time_t. TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) -TIME_T_ALTERNATIVES_HEAD = int_least64_t -TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t +TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck +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.) @@ -219,6 +220,7 @@ LDLIBS= # than what POSIX specifies, assuming local time is UT. # For example, N is 252460800 on AmigaOS. # -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# on POSIX platforms predating POSIX.1-2024 # -DHAVE_DECL_ENVIRON if declares 'environ' # -DHAVE_DECL_TIMEGM=0 if does not declare timegm # -DHAVE_DIRECT_H if mkdir needs (MS-Windows) @@ -229,7 +231,7 @@ LDLIBS= # where LDLIBS also needs to contain -lintl on some hosts; # -DHAVE_GETTEXT=0 to avoid using gettext # -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares -# ctime_r and asctime_r incompatibly with the POSIX standard +# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier # (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). # -DHAVE_INTTYPES_H=0 if does not work*+ # -DHAVE_LINK=0 if your system lacks a link function @@ -261,8 +263,11 @@ LDLIBS= # -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 -# -DSUPPORT_C89 if the tzcode library should support C89 callers+ -# However, this might trigger latent bugs in C99-or-later callers. +# -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. +# -DSUPPORT_POSIX2008 if the library should support older POSIX callers+ +# However, this might cause problems in POSIX.1-2024-or-later callers. # -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has # security implications and is not recommended for general use # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; @@ -274,7 +279,7 @@ LDLIBS= # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for POSIX.1-2017-style TZ strings lacking them, +# DST transitions for proleptic format TZ strings lacking them, # in the usual case where POSIXRULES is '-'. If not specified, # TZDEFRULESTRING defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. @@ -302,23 +307,25 @@ LDLIBS= # # * Options marked "*" can be omitted if your compiler is C23 compatible. # * Options marked "+" are obsolescent and are planned to be removed -# once the code assumes C99 or later, say in the year 2029. +# once the code assumes C99 or later (say in the year 2029) +# and POSIX.1-2024 or later (say in the year 2034). # # Select instrumentation via "make GCC_INSTRUMENT='whatever'". GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. -GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ +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 \ -Wdeclaration-after-statement -Wdouble-promotion \ - -Wduplicated-branches -Wduplicated-cond \ + -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ - -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wmissing-declarations -Wmissing-prototypes \ + -Wmissing-variable-declarations -Wnested-externs \ -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ @@ -327,10 +334,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ - -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ - -Wno-type-limits + -Wno-format-nonliteral -Wno-sign-compare # # 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), @@ -341,9 +347,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # Similarly, if your system has a "zone abbreviation" field, define # -DTM_ZONE=tm_zone # and define NO_TM_ZONE to suppress any guessing. -# Although these two fields are not required by POSIX.1-2017, -# POSIX 202x/D4 requires them and they are widely available -# on GNU/Linux and BSD systems. +# Although POSIX.1-2024 requires these fields and they are widely available +# on GNU/Linux and BSD systems, some older systems lack them. # # The next batch of options control support for external variables # exported by tzcode. In practice these variables are less useful @@ -353,7 +358,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DHAVE_TZNAME=0 # do not support "tzname" # # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library # # -DHAVE_TZNAME=2 # support and define "tzname" -# # to the "CFLAGS=" line. "tzname" is required by POSIX.1-1988 and later. +# # to the "CFLAGS=" line. Although "tzname" is required by POSIX.1-1988 +# # and later, its contents are unspecified if you use a geographical TZ +# # and the variable is planned to be removed in a future POSIX edition. # # If not defined, the code attempts to guess HAVE_TZNAME from other macros. # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause # # crashes when combined with some platforms' standard libraries, @@ -364,7 +371,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DUSG_COMPAT=1 # support, and variables are defined by system library # # -DUSG_COMPAT=2 # support and define variables # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix -# # Systems Group code and are required by POSIX.1-2008 and later (with XSI). +# # Systems Group code and are required by POSIX.1-2008 and later (with XSI), +# # although their contents are unspecified if you use a geographical TZ +# # and the variables are planned to be removed in a future edition of POSIX. # # If not defined, the code attempts to guess USG_COMPAT from other macros. # # # # To support the external variable "altzone", add @@ -428,18 +437,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # The name of a POSIX-like library archiver, its flags, C compiler, # linker flags, and 'make' utility. Ordinarily the defaults suffice. -# The commented-out values are the defaults specified by POSIX.1-202x/D4. +# The commented-out values are the defaults specified by POSIX.1-2024. #AR = ar #ARFLAGS = -rv #CC = c17 #LDFLAGS = #MAKE = make -# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in -# submake command lines. The default is no leap seconds. - -LEAPSECONDS= - # Where to fetch leap-seconds.list from. leaplist_URI = \ https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list @@ -461,7 +465,7 @@ ZFLAGS= # How to use zic to install TZif files. -ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' # The name of a POSIX-compliant 'awk' on your system. # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. @@ -480,6 +484,7 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation # and to fetch leap-seconds.list from upstream. +# Set CURL=: to disable use of the Internet. CURL= curl # Name of GNU Privacy Guard , used to sign distributions. @@ -533,21 +538,28 @@ OK_LINE= '^'$(OK_CHAR)'*$$' # Flags to give 'tar' when making a distribution. # Try to use flags appropriate for GNU tar. -GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \ +GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \ --numeric-owner --owner=0 --group=0 \ --mode=go+u,go-w --sort=name -TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ - then echo $(GNUTARFLAGS); \ - else :; \ - fi` +SETUP_TAR= \ + export LC_ALL=C && \ + if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \ + TAR='tar $(GNUTARFLAGS)'; \ + else \ + TAR=tar; \ + fi # Flags to give 'gzip' when making a distribution. GZIPFLAGS= -9n # When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. # This makes it easier to see which Zone has been affected. -DIFF_TZS= diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \ - || echo ' -F^TZ=') +SETUP_DIFF_TZS = \ + if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \ + DIFF_TZS='diff -u -F^TZ='; \ + else \ + DIFF_TZS='diff -u'; \ + fi # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. RANLIB= : @@ -561,8 +573,8 @@ RANLIB= : TZCOBJS= zic.o -TZDOBJS= zdump.o localtime.o asctime.o strftime.o -DATEOBJS= date.o localtime.o strftime.o asctime.o +TZDOBJS= zdump.o localtime.o strftime.o +DATEOBJS= date.o localtime.o strftime.o LIBSRCS= localtime.c asctime.c difftime.c strftime.c LIBOBJS= localtime.o asctime.o difftime.o strftime.o HEADERS= tzfile.h private.h @@ -579,8 +591,7 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README SECURITY theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ - check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -641,8 +652,7 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ - ` $(POSIXRULES) \ + -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -665,10 +675,10 @@ INSTALL: ALL install date.1 # and append "-dirty" if the contents do not already end in "-dirty". version: $(VERSION_DEPS) { (type git) >/dev/null 2>&1 && \ - V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ - --abbrev=7 --dirty` || \ - if test '$(VERSION)' = unknown && V=`cat $@`; then \ - case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ + V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty) || \ + if test '$(VERSION)' = unknown && read -r V <$@; then \ + V=$${V%-dirty}-dirty; \ else \ V='$(VERSION)'; \ fi; } && \ @@ -678,7 +688,7 @@ version: $(VERSION_DEPS) # These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) \ - -v DATAFORM=`expr $@ : '\(.*\).zi'` \ + -v DATAFORM=$(@:.zi=) \ -v PACKRATDATA='$(PACKRATDATA)' \ -v PACKRATLIST='$(PACKRATLIST)' \ -f ziguard.awk \ @@ -687,7 +697,7 @@ vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) # This file has a version comment that attempts to capture any tailoring # via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. tzdata.zi: $(DATAFORM).zi version zishrink.awk - version=`sed 1q version` && \ + read -r version $@ + ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@ TZS_NEW_DEPS = tzdata.zi zdump zic $(TZS_NEW): $(TZS_NEW_DEPS) @@ -812,20 +815,19 @@ $(TZS_NEW): $(TZS_NEW_DEPS) $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out - wd=`pwd` && \ - x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ tzdata.zi \ - | LC_ALL=C sort -t . -k 2,2` && \ + | LC_ALL=C sort -t . -k 2,2) && \ set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ ZDS="$$ZDS" $$ZDS && \ sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): touch $@ @@ -842,7 +844,7 @@ date: $(DATEOBJS) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) tzselect: tzselect.ksh version - VERSION=`cat version` && sed \ + read -r VERSION /dev/null 2>&1 \ - || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; } + || { export LC_ALL='$(UTF8_LOCALE)'; false; }; } -check_character_set: $(ENCHILADA) +character-set.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ sharp='#' && \ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ @@ -882,48 +884,55 @@ check_character_set: $(ENCHILADA) } touch $@ -check_white_space: $(ENCHILADA) +white-space.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ - patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ + enchilada='$(ENCHILADA)' && \ + patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ ! grep -En "$$pat|[$s]\$$" \ - $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \ + $${enchilada%leap-seconds.list*} \ + $${enchilada#*leap-seconds.list}; \ } touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+ FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15} -check_name_lengths: $(TDATA_TO_CHECK) backzone - ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ +name-lengths.ck: $(TDATA_TO_CHECK) backzone + :;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone touch $@ +mainguard.ck: main.zi + test '$(PACKRATLIST)' || \ + cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi + touch $@ + PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+ STDOFF = [-+]?[0-9:.]+ RULELESS_SAVE = (-|$(STDOFF)[sd]?) RULELESS_SLASHED_ABBRS = \ $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/ -check_slashed_abbrs: $(TDATA_TO_CHECK) - ! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) +slashed-abbrs.ck: $(TDATA_TO_CHECK) + :;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } -check_sorted: backward backzone +sorted.ck: backward backzone $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ backward | LC_ALL=C sort -cu - $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu touch $@ -check_back: checklinks.awk $(TDATA_TO_CHECK) +back.ck: checklinks.awk $(TDATA_TO_CHECK) $(AWK) \ -v DATAFORM=$(DATAFORM) \ -v backcheck=backward \ -f checklinks.awk $(TDATA_TO_CHECK) touch $@ -check_links: checklinks.awk tzdata.zi +links.ck: checklinks.awk tzdata.zi $(AWK) \ -v DATAFORM=$(DATAFORM) \ -f checklinks.awk tzdata.zi @@ -932,26 +941,36 @@ check_links: checklinks.awk tzdata.zi # Check timestamps from now through 28 years from now, to make sure # that zonenow.tab contains all sequences of planned timestamps, # without any duplicate sequences. In theory this might require -# 2800 years but that would take a long time to check. -CHECK_NOW_TIMESTAMP = `./date +%s` +# 2800+ years but that would take a long time to check. +CHECK_NOW_TIMESTAMP = $$(./date +%s) CHECK_NOW_FUTURE_YEARS = 28 -CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60 -check_now: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab - rm -fr $@.dir - mkdir $@.dir - ./zic -d $@.dir tzdata.zi +CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60 +now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab + rm -fr $@d + mkdir $@d + ./zic -d $@d tzdata.zi now=$(CHECK_NOW_TIMESTAMP) && \ - future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \ + future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \ ./zdump -i -t $$now,$$future \ - $$(find $$PWD/$@.dir/????*/ -type f) \ - >$@.dir/zdump.tab + $$(find "$$PWD/$@d"/????*/ -type f) \ + >$@d/zdump-now.tab && \ + ./zdump -i -t 0,$$future \ + $$(find "$$PWD/$@d" -name Etc -prune \ + -o -type f ! -name '*.tab' -print) \ + >$@d/zdump-1970.tab $(AWK) \ - -v zdump_table=$@.dir/zdump.tab \ + -v zdump_table=$@d/zdump-now.tab \ -f checknow.awk zonenow.tab - rm -fr $@.dir + $(AWK) \ + 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \ + $(PRIMARY_YDATA) backward factory | \ + $(AWK) \ + -v zdump_table=$@d/zdump-1970.tab \ + -f checknow.awk + rm -fr $@d touch $@ -check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab +tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab for tab in $(ZONETABLES); do \ test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ @@ -959,26 +978,24 @@ check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab done touch $@ -check_tzs: $(TZS) $(TZS_NEW) +tzs.ck: $(TZS) $(TZS_NEW) if test -s $(TZS); then \ - $(DIFF_TZS) $(TZS) $(TZS_NEW); \ + $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \ else \ cp $(TZS_NEW) $(TZS); \ fi touch $@ check_web: $(CHECK_WEB_PAGES) -check_theory.html: theory.html -check_tz-art.html: tz-art.html -check_tz-how-to.html: tz-how-to.html -check_tz-link.html: tz-link.html -check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: - $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ - -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ +.SUFFIXES: .ck .html +.html.ck: + { ! ($(CURL) --version) >/dev/null 2>&1 || \ + $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ + -F file=@$<; } >$@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } mv $@.out $@ -check_ziguard: rearguard.zi vanguard.zi ziguard.awk +ziguard.ck: rearguard.zi vanguard.zi ziguard.awk $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \ diff -u rearguard.zi - $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \ @@ -987,36 +1004,35 @@ check_ziguard: rearguard.zi vanguard.zi ziguard.awk # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: check_zishrink_posix check_zishrink_right -check_zishrink_posix check_zishrink_right: \ +check_zishrink: zishrink-posix.ck zishrink-right.ck +zishrink-posix.ck zishrink-right.ck: \ zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \ $(TDATA) $(DATAFORM).zi tzdata.zi - rm -fr $@.dir $@-t.dir $@-shrunk.dir - mkdir $@.dir $@-t.dir $@-shrunk.dir + rm -fr $@d t-$@d shrunk-$@d + mkdir $@d t-$@d shrunk-$@d case $@ in \ - *_right) leap='-L leapseconds';; \ + *right*) leap='-L leapseconds';; \ *) leap=;; \ esac && \ - $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ - $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ + $(ZIC) $$leap -d $@d $(DATAFORM).zi && \ + $(ZIC) $$leap -d shrunk-$@d tzdata.zi && \ case $(DATAFORM),$(PACKRATLIST) in \ main,) \ - $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ + $(ZIC) $$leap -d t-$@d $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ - diff -r $@.dir $@-t.dir;; \ + $(ZIC) $$leap -d t-$@d - $(PACKRATDATA) && \ + diff -r $@d t-$@d;; \ esac - diff -r $@.dir $@-shrunk.dir - rm -fr $@.dir $@-t.dir $@-shrunk.dir + diff -r $@d shrunk-$@d + rm -fr $@d t-$@d shrunk-$@d touch $@ clean_misc: - rm -fr check_*.dir typecheck_*.dir - rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ - check_* core typecheck_* \ + rm -fr *.ckd *.dir + rm -f *.ck *.core *.o *.out core core.* \ date tzdir.h tzselect version.h zdump zic libtz.a clean: clean_misc - rm -fr *.dir tzdb-*/ + rm -fr tzdb-*/ rm -f *.zi $(TZS_NEW) maintainer-clean: clean @@ -1027,7 +1043,7 @@ maintainer-clean: clean names: @echo $(ENCHILADA) -public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ +public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \ tarballs signatures date.1.txt: date.1 @@ -1041,7 +1057,7 @@ zdump.8.txt: zdump.8 zic.8.txt: zic.8 $(MANTXTS): workman.sh - LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + LC_ALL=C sh workman.sh $(@:.txt=) >$@.out mv $@.out $@ # Set file timestamps deterministically if possible, @@ -1054,13 +1070,13 @@ SET_TIMESTAMP_N = sh -c '\ n=$$0 dest=$$1; shift; \ <"$$dest" && \ if test $$n != 0 && \ - lsout=`ls -nt --time-style="+%s" "$$@" 2>/dev/null`; then \ + lsout=$$(ls -nt --time-style="+%s" "$$@" 2>/dev/null); then \ set x $$lsout && \ - timestamp=`expr $$7 + $$n` && \ + timestamp=$$(($$7 + $$n)) && \ echo "+ touch -md @$$timestamp $$dest" && \ touch -md @$$timestamp "$$dest"; \ else \ - newest=`ls -t "$$@" | sed 1q` && \ + newest=$$(ls -t "$$@" | sed 1q) && \ echo "+ touch -mr $$newest $$dest" && \ touch -mr "$$newest" "$$dest"; \ fi' @@ -1083,15 +1099,15 @@ SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1 set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(EIGHT_YARDS)` && \ + files=$$(git ls-files $(EIGHT_YARDS)) && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ if git diff --quiet $$file; then \ - time=`TZ=UTC0 git log -1 \ + time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ --date='format:%Y-%m-%dT%H:%M:%SZ' \ - $$file` && \ + $$file) && \ echo "+ touch -md $$time $$file" && \ touch -md $$time $$file; \ else \ @@ -1100,8 +1116,8 @@ set-timestamps.out: $(EIGHT_YARDS) done; \ fi $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) - for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ - $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ + for file in $(MANTXTS); do \ + $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \ exit; \ done $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) @@ -1114,30 +1130,29 @@ set-tzs-timestamp.out: $(TZS) # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: $(VERSION_DEPS) - rm -fr public.dir - mkdir public.dir - ln $(VERSION_DEPS) public.dir - cd public.dir \ +public.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d \ && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ - public.dir/vanguard.zi public.dir/main.zi \ - public.dir/rearguard.zi; \ + for i in $(TDATA_TO_CHECK) \ + tzdata.zi vanguard.zi main.zi rearguard.zi; \ do \ - public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ + $@d/zic -v -d $@d/zoneinfo $@d/$$i || exit; \ done - public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) + $@d/zic -v -d $@d/zoneinfo-all $(TDATA_TO_CHECK) : : Also check 'backzone' syntax. - rm public.dir/main.zi - cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi - public.dir/zic -d public.dir/zoneinfo main.zi - rm public.dir/main.zi - cd public.dir && \ + rm $@d/main.zi + cd $@d && $(MAKE) PACKRATDATA=backzone main.zi + $@d/zic -d $@d/zoneinfo main.zi + rm $@d/main.zi + cd $@d && \ $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi - public.dir/zic -d public.dir/zoneinfo main.zi + $@d/zic -d $@d/zoneinfo main.zi : - rm -fr public.dir + rm -fr $@d touch $@ # Check that the code works under various alternative @@ -1145,46 +1160,47 @@ check_public: $(VERSION_DEPS) check_time_t_alternatives: $(TIME_T_ALTERNATIVES) $(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES): $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d case $@ in \ - int*32_t) range=-2147483648,2147483648;; \ + *32_t*) range=-2147483648,2147483648;; \ u*) range=0,4294967296;; \ *) range=-4294967296,4294967296;; \ esac && \ - wd=`pwd` && \ - zones=`$(AWK) '/^[^#]/ { print $$3 }' /dev/null; then \ quiet_option='-q'; \ else \ quiet_option=''; \ fi && \ - diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ - $@.dir/etc && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \ + $@d/etc && \ diff $$quiet_option -r \ - $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ - $@.dir/usr/share; \ + $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \ + $@d/usr/share; \ } touch $@ @@ -1199,7 +1215,7 @@ ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ signatures rearguard_signatures traditional_signatures: \ version set-timestamps.out rearguard.zi vanguard.zi - VERSION=`cat version` && \ + read -r VERSION $@.out mv $@.out $@ tzdata$(VERSION).tar.gz: set-timestamps.out - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \ + $(SETUP_TAR) && \ + $$TAR -cf - $(TZDATA_DIST) | \ gzip $(GZIPFLAGS) >$@.out mv $@.out $@ @@ -1251,9 +1267,9 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. $(CREATE_EMPTY) $@.dir/pacificnew touch -mr version $@.dir/version - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - \ + $$TAR -cf - \ $(TZDATA_DIST) pacificnew | \ gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ @@ -1269,9 +1285,14 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out rm -fr $@.dir mkdir $@.dir : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. + if test $(DATAFORM) = vanguard; then \ + pacificnew=; \ + else \ + pacificnew=pacificnew; \ + fi && \ cd $@.dir && \ $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ - `test $(DATAFORM) = vanguard || echo pacificnew` + $$pacificnew (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ >$@.dir/etcetera touch -mr tzdata.zi $@.dir/etcetera @@ -1291,9 +1312,9 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out test -f $@.dir/$$file || links="$$links $$file"; \ done && \ ln $$links $@.dir - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@.out + $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out @@ -1301,8 +1322,8 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out + $(SETUP_TAR) && \ + $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out mv $@.out $@ tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz @@ -1313,22 +1334,21 @@ $(ALL_ASC): $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T -typecheck: typecheck_long_long typecheck_unsigned -typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir - cd $@.dir && \ +typecheck: long-long.ck unsigned.ck +long-long.ck unsigned.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d && \ case $@ in \ - *_long_long) i="long long";; \ - *_unsigned ) i="unsigned" ;; \ + long-long.*) i="long long";; \ + unsigned.* ) i="unsigned" ;; \ esac && \ *** 4281 LINES SKIPPED *** From nobody Wed Jan 29 18:55: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 4YjrvK2qwpz5lmtv; Wed, 29 Jan 2025 18:55: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 4YjrvJ5jHgz3Cdq; Wed, 29 Jan 2025 18:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176924; 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=9sq/eWhNABsoVhs4O2C8AP2u+pbkrEckC/AoPGg9D34=; b=Kh4OVF07vcj1hV/kTvUywAXN/5jwg25P8NsV+TYz5TUzok/Yt3j+vLzuQF4aL81+YlToJY bbWY9HCtOwSwLO8B7l6+Bxib1MkkMO36D8TIjb5p/8+K/A2YD20THfKL3gQV117ziHG0Tq ADQFqvpXt9yIekTBl3HeQpiNH0tscTstmq8ejCd/99+W2zk6MuPFAA3cSXOEUVZDdBHfri WGNbbAN0cCgSM2Qm0Ov4tjGQOk070UKh/sG4TJSmowdZ+V2pzsjYnUV/My21jm8abMFaiF vbeXL9d5KyhMxfek+oMUDQ9A0o5EkXCRhxjjSmD9zKIpZUltKkgAX617wWyujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176924; 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=9sq/eWhNABsoVhs4O2C8AP2u+pbkrEckC/AoPGg9D34=; b=pMzpa7QMOT4ZXg1H4/s2LIqC0ZoUhKG3c0BKHWRrSI1b4ShpTUGuU5xxUEKdV0rWR7igdc dVHJuT0ZMc8tUmTX1A1PLd0vdCrsgbIP2U1uRD+RQQuK4TnoGmTbC8b/sX05mBW0Owz2BE xqcTptaUvhp0ZkI4oBVoMxnrj1Z85eoqJwT0YbnATVJ9+REweECAOq/SQ4qUN52gG3QhVR ey/ERAj30Fa/jQIdHy/BYpM1Ol5uqNtLptKkL0Cnv4fdh/b8xsQ0hywPZJAWmN4nGsMVyp 4HTrjdrjSsxYZAnMBtJyVxsHgVU4T+G2bQSeRRppVB+2T3hj7iaCwSGecanStQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176924; a=rsa-sha256; cv=none; b=fLnDv1mTSjRcOmoUbnbiJUshaOLcxe2SWsJWBNlr3pmKOv76Unfr9VLMtsuYwJR9lxxe8Z CGuBKEbl0nA1uoXBA+/HzG/7F3HG5XDhVi+FFSJkHD+gfIwzD8JOhGlkiRt8ZtrBfZnfv2 bceKElvV7efHyWYKCvS7+SAyM1ioO9xSSMsQuKa5D+iSH7A1VfHzErAWk3v+ftp56/m55Y nJctLozBOrgbvnfaJgQDqWrGz6NKdSkoHJCDmxvq3/o1acYK454M3lU659SO1iiA67M3Q5 9rz3QRPKmTjwCDh1FH9z3nSSjs5RnABgyhgYpRUchJWw3CA40WhzdPv7Pjhe0A== 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 4YjrvJ56yyz1ChQ; Wed, 29 Jan 2025 18:55:24 +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 50TItOBe064800; Wed, 29 Jan 2025 18:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItO5W064797; Wed, 29 Jan 2025 18:55:24 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:24 GMT Message-Id: <202501291855.50TItO5W064797@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: f7b9cd733c39 - releng/13.4 - audit: Fix short-circuiting in syscallenter() 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: f7b9cd733c39c86be258b60ba644df8ff7f6a1f5 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f7b9cd733c39c86be258b60ba644df8ff7f6a1f5 commit f7b9cd733c39c86be258b60ba644df8ff7f6a1f5 Author: Mark Johnston AuthorDate: 2025-01-14 14:19:24 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 16:50:08 +0000 audit: Fix short-circuiting in syscallenter() syscallenter() has a slow path to handle syscall auditing and dtrace syscall tracing. It uses AUDIT_SYSCALL_ENTER() to check whether to take the slow path, but this macro also has side effects: it writes the audit log entry. When systrace (dtrace syscall tracing) is enabled, this would get short-circuited, and we end up not writing audit log entries. Introduce a pure macro to check whether auditing is enabled, use it in syscallenter() instead of AUDIT_SYSCALL_ENTER(). Approved by: so Security: FreeBSD-EN-25:02.audit Reviewed by: kib Reported by: Joe Duin Fixes: 2f7292437d0c ("Merge audit and systrace checks") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48448 (cherry picked from commit f78fe930854cac6eed55859b45e0a7b5d87189d6) (cherry picked from commit 1bf531bcd791794a39511359fbab612944a9e7b2) --- sys/kern/subr_syscall.c | 8 +++++--- sys/security/audit/audit.h | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index 67ec87d2d563..9ad11b81b6fa 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -140,9 +140,8 @@ syscallenter(struct thread *td) sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; - if (__predict_false(SYSTRACE_ENABLED() || - AUDIT_SYSCALL_ENTER(sa->code, td) || - !sy_thr_static)) { + if (__predict_false(AUDIT_SYSCALL_ENABLED() || + SYSTRACE_ENABLED() || !sy_thr_static)) { if (!sy_thr_static) { error = syscall_thread_enter(td, &se); sy_thr_static = (se->sy_thrcnt & SY_THR_STATIC) != 0; @@ -157,6 +156,9 @@ syscallenter(struct thread *td) if (__predict_false(se->sy_entry != 0)) (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); #endif + + AUDIT_SYSCALL_ENTER(sa->code, td); + error = (se->sy_call)(td, sa->args); /* Save the latest error return value. */ if (__predict_false((td->td_pflags & TDP_NERRNO) != 0)) diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index e7a9c83afbb3..3c8419a54ccc 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -389,9 +389,11 @@ void audit_thread_free(struct thread *td); audit_arg_vnode2((vp)); \ } while (0) +#define AUDIT_SYSCALL_ENABLED() audit_syscalls_enabled + #define AUDIT_SYSCALL_ENTER(code, td) ({ \ bool _audit_entered = false; \ - if (__predict_false(audit_syscalls_enabled)) { \ + if (audit_syscalls_enabled) { \ audit_syscall_enter(code, td); \ _audit_entered = true; \ } \ @@ -468,6 +470,7 @@ void audit_thread_free(struct thread *td); #define AUDITING_TD(td) 0 +#define AUDIT_SYSCALL_ENABLED() 0 #define AUDIT_SYSCALL_ENTER(code, td) 0 #define AUDIT_SYSCALL_EXIT(error, td) From nobody Wed Jan 29 18:55: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 4YjrvK2sd0z5lmtw; Wed, 29 Jan 2025 18:55: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 4YjrvJ57c0z3ChN; Wed, 29 Jan 2025 18:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176924; 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=AdfNLGMRDUmilo5NYXl3526fTh39SRfKun2KVkhaV7A=; b=Kahd0KNlAH1jiI65OrzKBR5gdpX3+RaS0hsrXdDHSj+NgzP3xPjQLSCyYWpt8SovQaTTT0 0VWjFj6M0TAE0oSpYmXAmk24iMGW3xJf0yUa2WQH+B8wEbkYlecb956KUm0J7bbcpLgOkj lgUN1RNARGzEoc17u+h7Tk0qPuw0dFCAnmvqWCG/0Fphyrmwl/JAD8S31wCi2zZiICQ+74 2+hK0epU/TszD4kcE5TaXpg5/o3S4in8IrUtHDjCrXJ98GeWjiWhUh3b/OGynnYc/q5Y3a +a1LTAdSPBZ4Feo/+ZSmSFs8nMqZHHprhW1gPbQJf+sclSu+qTHBvkg7XJ+O3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176924; 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=AdfNLGMRDUmilo5NYXl3526fTh39SRfKun2KVkhaV7A=; b=IV5yzGHzLGIZ+I4OhKGaoiSPUP23q2va1jX+fQSdbCwy9J9BQ42C3iEUAHGtw8/D48Y7WF a/fIORXbue1eMG1+W7UE4Pjkh6v57KyE505J/d8PT5JfRbVThGaxwKX9l4uXI+jN3mzgms zB1RwHSTNNw6aEkEql+qG9jv8iWtp0nKMFOs9utFPsZ5/fgze59ECS7Olm+Pf1FPL7HQF6 yetf5d70ftEFaXu6yzMwqcHg22ubQ3zfLdDZooUsQ5/+5ecJYdRBrmDbN7axHeZhem6Tum GF5MgUfbBVRnRpLxkYQfa4t4qZzvcBi0DDjcsEeGH+2KhgNOndtiioj3fapZiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176924; a=rsa-sha256; cv=none; b=cDcz0c8ezvw+N0LvQxz+dg8yqwZF+p4Pwg8slvkYSZwmzyIKdxiIQhHL24yI2FJEE751ra mP3HMugJm5j9c6lkEAK65unU2iUWbN7vzYmWcB6GY682Kg6kE/94eONVZhu/1kmRNf32/h uKGdDeBm5LdZtR/JPM6WGrczufDTCDQ6EFDN4bPVs1/XjpO//ipZpf2AuUUNrvkub4aH/f P7Dw9EsxXKf05cZzET00LLv4+E3lx+Lzx3ow2F0a9nIqN/0pBEZf+Gdu7kqmKEJhpUSogj oHI+JDbdG3ZNK1kfURc7nMtGIA2cGDmTdvZPxY8wQcxdtKdD1cbyH3TdtT7+cQ== 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 4YjrvJ3x7Cz1ChP; Wed, 29 Jan 2025 18:55:24 +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 50TItOcE064736; Wed, 29 Jan 2025 18:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItOws064710; Wed, 29 Jan 2025 18:55:24 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:24 GMT Message-Id: <202501291855.50TItOws064710@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: 40928c124157 - releng/14.1 - 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 40928c124157ac113d6a2fcb67619e664c106a27 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=40928c124157ac113d6a2fcb67619e664c106a27 commit 40928c124157ac113d6a2fcb67619e664c106a27 Author: Philip Paeps AuthorDate: 2025-01-17 01:33:46 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:12:52 +0000 contrib/tzdata: import tzdata 2025a Changes: https://github.com/eggert/tz/blob/2025a/NEWS Approved by: so Security: FreeBSD-EN-25:03.tzdata (cherry picked from commit 46226b0162ba03986b1de2c790804b37dd8e64d6) (cherry picked from commit a158d26e89f2e3274ba1064e3fd6b341c6fcb07c) --- 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 *** 22 LINES SKIPPED *** From nobody Wed Jan 29 18:55: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 4YjrvL4cvNz5lmkk; Wed, 29 Jan 2025 18:55: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 4YjrvK6V4jz3CYF; Wed, 29 Jan 2025 18:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176926; 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=py2XbaQag19u9UIg1rKsnc3sDoYv/27DwXaoL4yuniU=; b=lmxw85cOKGuSHoODaCsnWzZfQ00TveISHt+KaB/3FLDntgFzMs49cH6ky7cpkbTOEdztgF CR2dysAioHNE/mnGPKPMJ6anXnUE7IjgXWhgMqiLlrDks+Jt/NXLw6d0AsiJjz+OvIjOF+ XgZZGBtXDcFFLWnDSXrQaRkiuLgMf4/QdHyf0saaE4XzxM8Kh+VTbGcwF8FjHaEVUKiu9i Hk7bh5PaJZAaE2O9oFVeKeKB0ABFpikvQ5iRhOiyptuInIeH2ooBZ8kcSIZizY8S3nhzTS SJt9y5nYKs0KBKec4yFwrZQYK6Qu83yhfDFyTyckVuvNfRd5EkP/6c5pIctYSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176926; 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=py2XbaQag19u9UIg1rKsnc3sDoYv/27DwXaoL4yuniU=; b=U62WT8GVwW89uQJynY+5pWp6grOJ9STyoHPcq+VrwqM3p/4x+rPp5xrl/fqt1GiedeZqjR RoVIr40Ahc31Kty4iw3SQ4gB+23dho/8eYPtMDUdOMWK5vgOXhzSW0PYuExKp+96w342rO gpcZHj5lSJ9vpoLVI4JdPfVvD0uSY5YBvCeQP9M3v9mrvDIt2PyAJ60pJKxGa+b+kIaNm0 x9CJDehmJSCEJRfAmR7SSMJO/ZaJ71F0Vz80McEgZsG8QRcq4JItj1uQKDkms4ggALhPVY CYvTulNTLm8Z2Z9ZWQf4zaELF+8cRRJue/6zI58uogXMsU5K8RL+KW12r9ZBrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176926; a=rsa-sha256; cv=none; b=ErJ84f61G+6oXYB4J78hmZPwqTcS4Ur1ZDljUNE1x3XKt0C3+VLzlj4aj4HDkVEwe+yYy9 adWCcHr7ni/1V/FOw508nk5jjs5bOvt/ckAd+8DHB2xbGSj1Y/LVP1G59EJJ/nAvm1n+0H Tj3gWnWHHnxj7NQGYT8+5LJRV3dKsuY0kAlGZ0oW/muQ7IZ1q51XxHRS1Gmsf0viAtjRq2 Bvo5y/ogFD1mPVJR5W+Jl7QJ/ytHEdiySZiqnqYKof8hnJw2bWi2fPcm9yssKd4buyXIQA ce0WoT7lut6l1fFZDQ0grh1fuprZbQmOht0qcQt20WN/0EunVkSURPA8JewpSA== 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 4YjrvK5jKVz1ChR; Wed, 29 Jan 2025 18:55: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 50TItPoS064869; Wed, 29 Jan 2025 18:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItP0l064866; Wed, 29 Jan 2025 18:55:25 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:25 GMT Message-Id: <202501291855.50TItP0l064866@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: e2bb7b33daa5 - releng/13.4 - contrib/tzdata: import tzdata 2024b 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: e2bb7b33daa56440e212773aeb33dc7687486138 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e2bb7b33daa56440e212773aeb33dc7687486138 commit e2bb7b33daa56440e212773aeb33dc7687486138 Author: Philip Paeps AuthorDate: 2024-09-06 01:37:36 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 16:50:50 +0000 contrib/tzdata: import tzdata 2024b Changes: https://github.com/eggert/tz/blob/2024b/NEWS Approved by: so (cherry picked from commit e273650f2c538034b45f78e670a89cbf333ab6db) (cherry picked from commit 59ffae6c0c7a8360a49a7db93199f5c19a522ecc) --- contrib/tzdata/CONTRIBUTING | 18 +- contrib/tzdata/Makefile | 412 +++++++++++----------- contrib/tzdata/NEWS | 124 ++++++- contrib/tzdata/africa | 73 ++-- contrib/tzdata/antarctica | 58 ++-- contrib/tzdata/asia | 442 ++++++++++++------------ contrib/tzdata/australasia | 130 +++---- contrib/tzdata/backward | 15 +- contrib/tzdata/backzone | 35 +- contrib/tzdata/checknow.awk | 4 +- contrib/tzdata/etcetera | 54 +-- contrib/tzdata/europe | 713 ++++++++++++++++++++++++--------------- contrib/tzdata/leap-seconds.list | 30 +- contrib/tzdata/leapseconds | 8 +- contrib/tzdata/northamerica | 145 +++++--- contrib/tzdata/southamerica | 486 +++++++++++++------------- contrib/tzdata/theory.html | 214 ++++++++---- contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 32 +- contrib/tzdata/zone.tab | 3 +- contrib/tzdata/zone1970.tab | 3 +- contrib/tzdata/zonenow.tab | 8 +- 22 files changed, 1768 insertions(+), 1241 deletions(-) diff --git a/contrib/tzdata/CONTRIBUTING b/contrib/tzdata/CONTRIBUTING index 6d800e4c03a3..f6edbd3be7d3 100644 --- a/contrib/tzdata/CONTRIBUTING +++ b/contrib/tzdata/CONTRIBUTING @@ -23,10 +23,10 @@ such as renaming, adding or removing zones, please read "Theory and pragmatics of the tz code and data" . It is also good to browse the mailing list archives - for examples of patches that tend -to work well. Additions to data should contain commentary citing -reliable sources as justification. Citations should use "https:" URLs -if available. + +for examples of patches that tend to work well. +Changes should contain commentary citing reliable sources. +Citations should use "https:" URLs if available. For changes that fix sensitive security-related bugs, please see the distribution's 'SECURITY' file. @@ -63,12 +63,16 @@ If you use Git the following workflow may be helpful: * Edit source files. Include commentary that justifies the changes by citing reliable sources. - * Debug the changes, e.g.: + * Debug the changes locally, e.g.: - make check - make install + make TOPDIR=$PWD/tz clean check install ./zdump -v America/Los_Angeles + Although builds assume only basic POSIX, they use extra features + if available. 'make check' accesses validator.w3.org unless you + lack 'curl' or use 'make CURL=:'. If you have the latest GCC, + "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. + * For each separable change, commit it in the new branch, e.g.: git add northamerica diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index d48354c72df4..0087b4596515 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -3,17 +3,17 @@ # 2009-05-17 by Arthur David Olson. # Request POSIX conformance; this must be the first non-comment line. .POSIX: -# On older platforms you may need to scrounge for a POSIX-conforming 'make'. -# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or -# /usr/xpg4/bin/make, not /usr/ccs/bin/make. +# On older platforms you may need to scrounge for POSIX conformance. +# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), +# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. # To affect how this Makefile works, you can run a shell script like this: # # #!/bin/sh -# make CC='gcc -std=gnu11' "$@" +# make CC='gcc -std=gnu23' "$@" # -# This example script is appropriate for a pre-2017 GNU/Linux system -# where a non-default setting is needed to support this package's use of C99. +# This example script is appropriate for a circa 2024 GNU/Linux system +# where a non-default setting enables this package's optional use of C23. # # Alternatively, you can simply edit this Makefile to tailor the following # macro definitions. @@ -53,7 +53,7 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ +# The POSIXRULES macro controls interpretation of POSIX-like TZ # settings like TZ='EET-2EEST' that lack DST transition rules. # If POSIXRULES is '-', no template is installed; this is the default. # Any other value for POSIXRULES is obsolete and should not be relied on, as: @@ -132,8 +132,9 @@ LIBDIR = $(TOPDIR)/$(USRDIR)/lib # Types to try, as an alternative to time_t. TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) -TIME_T_ALTERNATIVES_HEAD = int_least64_t -TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t +TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck +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.) @@ -219,6 +220,7 @@ LDLIBS= # than what POSIX specifies, assuming local time is UT. # For example, N is 252460800 on AmigaOS. # -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# on POSIX platforms predating POSIX.1-2024 # -DHAVE_DECL_ENVIRON if declares 'environ' # -DHAVE_DECL_TIMEGM=0 if does not declare timegm # -DHAVE_DIRECT_H if mkdir needs (MS-Windows) @@ -229,7 +231,7 @@ LDLIBS= # where LDLIBS also needs to contain -lintl on some hosts; # -DHAVE_GETTEXT=0 to avoid using gettext # -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares -# ctime_r and asctime_r incompatibly with the POSIX standard +# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier # (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). # -DHAVE_INTTYPES_H=0 if does not work*+ # -DHAVE_LINK=0 if your system lacks a link function @@ -261,8 +263,11 @@ LDLIBS= # -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 -# -DSUPPORT_C89 if the tzcode library should support C89 callers+ -# However, this might trigger latent bugs in C99-or-later callers. +# -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. +# -DSUPPORT_POSIX2008 if the library should support older POSIX callers+ +# However, this might cause problems in POSIX.1-2024-or-later callers. # -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has # security implications and is not recommended for general use # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; @@ -274,7 +279,7 @@ LDLIBS= # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for POSIX.1-2017-style TZ strings lacking them, +# DST transitions for proleptic format TZ strings lacking them, # in the usual case where POSIXRULES is '-'. If not specified, # TZDEFRULESTRING defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. @@ -302,23 +307,25 @@ LDLIBS= # # * Options marked "*" can be omitted if your compiler is C23 compatible. # * Options marked "+" are obsolescent and are planned to be removed -# once the code assumes C99 or later, say in the year 2029. +# once the code assumes C99 or later (say in the year 2029) +# and POSIX.1-2024 or later (say in the year 2034). # # Select instrumentation via "make GCC_INSTRUMENT='whatever'". GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. -GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ +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 \ -Wdeclaration-after-statement -Wdouble-promotion \ - -Wduplicated-branches -Wduplicated-cond \ + -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ - -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wmissing-declarations -Wmissing-prototypes \ + -Wmissing-variable-declarations -Wnested-externs \ -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ @@ -327,10 +334,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ - -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ - -Wno-type-limits + -Wno-format-nonliteral -Wno-sign-compare # # 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), @@ -341,9 +347,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # Similarly, if your system has a "zone abbreviation" field, define # -DTM_ZONE=tm_zone # and define NO_TM_ZONE to suppress any guessing. -# Although these two fields are not required by POSIX.1-2017, -# POSIX 202x/D4 requires them and they are widely available -# on GNU/Linux and BSD systems. +# Although POSIX.1-2024 requires these fields and they are widely available +# on GNU/Linux and BSD systems, some older systems lack them. # # The next batch of options control support for external variables # exported by tzcode. In practice these variables are less useful @@ -353,7 +358,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DHAVE_TZNAME=0 # do not support "tzname" # # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library # # -DHAVE_TZNAME=2 # support and define "tzname" -# # to the "CFLAGS=" line. "tzname" is required by POSIX.1-1988 and later. +# # to the "CFLAGS=" line. Although "tzname" is required by POSIX.1-1988 +# # and later, its contents are unspecified if you use a geographical TZ +# # and the variable is planned to be removed in a future POSIX edition. # # If not defined, the code attempts to guess HAVE_TZNAME from other macros. # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause # # crashes when combined with some platforms' standard libraries, @@ -364,7 +371,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # -DUSG_COMPAT=1 # support, and variables are defined by system library # # -DUSG_COMPAT=2 # support and define variables # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix -# # Systems Group code and are required by POSIX.1-2008 and later (with XSI). +# # Systems Group code and are required by POSIX.1-2008 and later (with XSI), +# # although their contents are unspecified if you use a geographical TZ +# # and the variables are planned to be removed in a future edition of POSIX. # # If not defined, the code attempts to guess USG_COMPAT from other macros. # # # # To support the external variable "altzone", add @@ -428,18 +437,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # The name of a POSIX-like library archiver, its flags, C compiler, # linker flags, and 'make' utility. Ordinarily the defaults suffice. -# The commented-out values are the defaults specified by POSIX.1-202x/D4. +# The commented-out values are the defaults specified by POSIX.1-2024. #AR = ar #ARFLAGS = -rv #CC = c17 #LDFLAGS = #MAKE = make -# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in -# submake command lines. The default is no leap seconds. - -LEAPSECONDS= - # Where to fetch leap-seconds.list from. leaplist_URI = \ https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list @@ -461,7 +465,7 @@ ZFLAGS= # How to use zic to install TZif files. -ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' # The name of a POSIX-compliant 'awk' on your system. # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. @@ -480,6 +484,7 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation # and to fetch leap-seconds.list from upstream. +# Set CURL=: to disable use of the Internet. CURL= curl # Name of GNU Privacy Guard , used to sign distributions. @@ -533,21 +538,28 @@ OK_LINE= '^'$(OK_CHAR)'*$$' # Flags to give 'tar' when making a distribution. # Try to use flags appropriate for GNU tar. -GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \ +GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \ --numeric-owner --owner=0 --group=0 \ --mode=go+u,go-w --sort=name -TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ - then echo $(GNUTARFLAGS); \ - else :; \ - fi` +SETUP_TAR= \ + export LC_ALL=C && \ + if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \ + TAR='tar $(GNUTARFLAGS)'; \ + else \ + TAR=tar; \ + fi # Flags to give 'gzip' when making a distribution. GZIPFLAGS= -9n # When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. # This makes it easier to see which Zone has been affected. -DIFF_TZS= diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \ - || echo ' -F^TZ=') +SETUP_DIFF_TZS = \ + if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \ + DIFF_TZS='diff -u -F^TZ='; \ + else \ + DIFF_TZS='diff -u'; \ + fi # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. RANLIB= : @@ -561,8 +573,8 @@ RANLIB= : TZCOBJS= zic.o -TZDOBJS= zdump.o localtime.o asctime.o strftime.o -DATEOBJS= date.o localtime.o strftime.o asctime.o +TZDOBJS= zdump.o localtime.o strftime.o +DATEOBJS= date.o localtime.o strftime.o LIBSRCS= localtime.c asctime.c difftime.c strftime.c LIBOBJS= localtime.o asctime.o difftime.o strftime.o HEADERS= tzfile.h private.h @@ -579,8 +591,7 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README SECURITY theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ - check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -641,8 +652,7 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ - ` $(POSIXRULES) \ + -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -665,10 +675,10 @@ INSTALL: ALL install date.1 # and append "-dirty" if the contents do not already end in "-dirty". version: $(VERSION_DEPS) { (type git) >/dev/null 2>&1 && \ - V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ - --abbrev=7 --dirty` || \ - if test '$(VERSION)' = unknown && V=`cat $@`; then \ - case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ + V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty) || \ + if test '$(VERSION)' = unknown && read -r V <$@; then \ + V=$${V%-dirty}-dirty; \ else \ V='$(VERSION)'; \ fi; } && \ @@ -678,7 +688,7 @@ version: $(VERSION_DEPS) # These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) \ - -v DATAFORM=`expr $@ : '\(.*\).zi'` \ + -v DATAFORM=$(@:.zi=) \ -v PACKRATDATA='$(PACKRATDATA)' \ -v PACKRATLIST='$(PACKRATLIST)' \ -f ziguard.awk \ @@ -687,7 +697,7 @@ vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) # This file has a version comment that attempts to capture any tailoring # via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. tzdata.zi: $(DATAFORM).zi version zishrink.awk - version=`sed 1q version` && \ + read -r version $@ + ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@ TZS_NEW_DEPS = tzdata.zi zdump zic $(TZS_NEW): $(TZS_NEW_DEPS) @@ -812,20 +815,19 @@ $(TZS_NEW): $(TZS_NEW_DEPS) $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out - wd=`pwd` && \ - x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ tzdata.zi \ - | LC_ALL=C sort -t . -k 2,2` && \ + | LC_ALL=C sort -t . -k 2,2) && \ set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ ZDS="$$ZDS" $$ZDS && \ sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): touch $@ @@ -842,7 +844,7 @@ date: $(DATEOBJS) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) tzselect: tzselect.ksh version - VERSION=`cat version` && sed \ + read -r VERSION /dev/null 2>&1 \ - || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; } + || { export LC_ALL='$(UTF8_LOCALE)'; false; }; } -check_character_set: $(ENCHILADA) +character-set.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ sharp='#' && \ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ @@ -882,48 +884,55 @@ check_character_set: $(ENCHILADA) } touch $@ -check_white_space: $(ENCHILADA) +white-space.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ - patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ + enchilada='$(ENCHILADA)' && \ + patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ ! grep -En "$$pat|[$s]\$$" \ - $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \ + $${enchilada%leap-seconds.list*} \ + $${enchilada#*leap-seconds.list}; \ } touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+ FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15} -check_name_lengths: $(TDATA_TO_CHECK) backzone - ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ +name-lengths.ck: $(TDATA_TO_CHECK) backzone + :;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone touch $@ +mainguard.ck: main.zi + test '$(PACKRATLIST)' || \ + cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi + touch $@ + PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+ STDOFF = [-+]?[0-9:.]+ RULELESS_SAVE = (-|$(STDOFF)[sd]?) RULELESS_SLASHED_ABBRS = \ $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/ -check_slashed_abbrs: $(TDATA_TO_CHECK) - ! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) +slashed-abbrs.ck: $(TDATA_TO_CHECK) + :;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } -check_sorted: backward backzone +sorted.ck: backward backzone $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ backward | LC_ALL=C sort -cu - $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu + $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu touch $@ -check_back: checklinks.awk $(TDATA_TO_CHECK) +back.ck: checklinks.awk $(TDATA_TO_CHECK) $(AWK) \ -v DATAFORM=$(DATAFORM) \ -v backcheck=backward \ -f checklinks.awk $(TDATA_TO_CHECK) touch $@ -check_links: checklinks.awk tzdata.zi +links.ck: checklinks.awk tzdata.zi $(AWK) \ -v DATAFORM=$(DATAFORM) \ -f checklinks.awk tzdata.zi @@ -932,26 +941,36 @@ check_links: checklinks.awk tzdata.zi # Check timestamps from now through 28 years from now, to make sure # that zonenow.tab contains all sequences of planned timestamps, # without any duplicate sequences. In theory this might require -# 2800 years but that would take a long time to check. -CHECK_NOW_TIMESTAMP = `./date +%s` +# 2800+ years but that would take a long time to check. +CHECK_NOW_TIMESTAMP = $$(./date +%s) CHECK_NOW_FUTURE_YEARS = 28 -CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60 -check_now: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab - rm -fr $@.dir - mkdir $@.dir - ./zic -d $@.dir tzdata.zi +CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60 +now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab + rm -fr $@d + mkdir $@d + ./zic -d $@d tzdata.zi now=$(CHECK_NOW_TIMESTAMP) && \ - future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \ + future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \ ./zdump -i -t $$now,$$future \ - $$(find $$PWD/$@.dir/????*/ -type f) \ - >$@.dir/zdump.tab + $$(find "$$PWD/$@d"/????*/ -type f) \ + >$@d/zdump-now.tab && \ + ./zdump -i -t 0,$$future \ + $$(find "$$PWD/$@d" -name Etc -prune \ + -o -type f ! -name '*.tab' -print) \ + >$@d/zdump-1970.tab $(AWK) \ - -v zdump_table=$@.dir/zdump.tab \ + -v zdump_table=$@d/zdump-now.tab \ -f checknow.awk zonenow.tab - rm -fr $@.dir + $(AWK) \ + 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \ + $(PRIMARY_YDATA) backward factory | \ + $(AWK) \ + -v zdump_table=$@d/zdump-1970.tab \ + -f checknow.awk + rm -fr $@d touch $@ -check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab +tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab for tab in $(ZONETABLES); do \ test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ @@ -959,26 +978,24 @@ check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab done touch $@ -check_tzs: $(TZS) $(TZS_NEW) +tzs.ck: $(TZS) $(TZS_NEW) if test -s $(TZS); then \ - $(DIFF_TZS) $(TZS) $(TZS_NEW); \ + $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \ else \ cp $(TZS_NEW) $(TZS); \ fi touch $@ check_web: $(CHECK_WEB_PAGES) -check_theory.html: theory.html -check_tz-art.html: tz-art.html -check_tz-how-to.html: tz-how-to.html -check_tz-link.html: tz-link.html -check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: - $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ - -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ +.SUFFIXES: .ck .html +.html.ck: + { ! ($(CURL) --version) >/dev/null 2>&1 || \ + $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ + -F file=@$<; } >$@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } mv $@.out $@ -check_ziguard: rearguard.zi vanguard.zi ziguard.awk +ziguard.ck: rearguard.zi vanguard.zi ziguard.awk $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \ diff -u rearguard.zi - $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \ @@ -987,36 +1004,35 @@ check_ziguard: rearguard.zi vanguard.zi ziguard.awk # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: check_zishrink_posix check_zishrink_right -check_zishrink_posix check_zishrink_right: \ +check_zishrink: zishrink-posix.ck zishrink-right.ck +zishrink-posix.ck zishrink-right.ck: \ zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \ $(TDATA) $(DATAFORM).zi tzdata.zi - rm -fr $@.dir $@-t.dir $@-shrunk.dir - mkdir $@.dir $@-t.dir $@-shrunk.dir + rm -fr $@d t-$@d shrunk-$@d + mkdir $@d t-$@d shrunk-$@d case $@ in \ - *_right) leap='-L leapseconds';; \ + *right*) leap='-L leapseconds';; \ *) leap=;; \ esac && \ - $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ - $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ + $(ZIC) $$leap -d $@d $(DATAFORM).zi && \ + $(ZIC) $$leap -d shrunk-$@d tzdata.zi && \ case $(DATAFORM),$(PACKRATLIST) in \ main,) \ - $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ + $(ZIC) $$leap -d t-$@d $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ - diff -r $@.dir $@-t.dir;; \ + $(ZIC) $$leap -d t-$@d - $(PACKRATDATA) && \ + diff -r $@d t-$@d;; \ esac - diff -r $@.dir $@-shrunk.dir - rm -fr $@.dir $@-t.dir $@-shrunk.dir + diff -r $@d shrunk-$@d + rm -fr $@d t-$@d shrunk-$@d touch $@ clean_misc: - rm -fr check_*.dir typecheck_*.dir - rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ - check_* core typecheck_* \ + rm -fr *.ckd *.dir + rm -f *.ck *.core *.o *.out core core.* \ date tzdir.h tzselect version.h zdump zic libtz.a clean: clean_misc - rm -fr *.dir tzdb-*/ + rm -fr tzdb-*/ rm -f *.zi $(TZS_NEW) maintainer-clean: clean @@ -1027,7 +1043,7 @@ maintainer-clean: clean names: @echo $(ENCHILADA) -public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ +public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \ tarballs signatures date.1.txt: date.1 @@ -1041,7 +1057,7 @@ zdump.8.txt: zdump.8 zic.8.txt: zic.8 $(MANTXTS): workman.sh - LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out + LC_ALL=C sh workman.sh $(@:.txt=) >$@.out mv $@.out $@ # Set file timestamps deterministically if possible, @@ -1054,13 +1070,13 @@ SET_TIMESTAMP_N = sh -c '\ n=$$0 dest=$$1; shift; \ <"$$dest" && \ if test $$n != 0 && \ - lsout=`ls -nt --time-style="+%s" "$$@" 2>/dev/null`; then \ + lsout=$$(ls -nt --time-style="+%s" "$$@" 2>/dev/null); then \ set x $$lsout && \ - timestamp=`expr $$7 + $$n` && \ + timestamp=$$(($$7 + $$n)) && \ echo "+ touch -md @$$timestamp $$dest" && \ touch -md @$$timestamp "$$dest"; \ else \ - newest=`ls -t "$$@" | sed 1q` && \ + newest=$$(ls -t "$$@" | sed 1q) && \ echo "+ touch -mr $$newest $$dest" && \ touch -mr "$$newest" "$$dest"; \ fi' @@ -1083,15 +1099,15 @@ SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1 set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(EIGHT_YARDS)` && \ + files=$$(git ls-files $(EIGHT_YARDS)) && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ if git diff --quiet $$file; then \ - time=`TZ=UTC0 git log -1 \ + time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ --date='format:%Y-%m-%dT%H:%M:%SZ' \ - $$file` && \ + $$file) && \ echo "+ touch -md $$time $$file" && \ touch -md $$time $$file; \ else \ @@ -1100,8 +1116,8 @@ set-timestamps.out: $(EIGHT_YARDS) done; \ fi $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) - for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ - $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ + for file in $(MANTXTS); do \ + $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \ exit; \ done $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) @@ -1114,30 +1130,29 @@ set-tzs-timestamp.out: $(TZS) # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: $(VERSION_DEPS) - rm -fr public.dir - mkdir public.dir - ln $(VERSION_DEPS) public.dir - cd public.dir \ +public.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d \ && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ - public.dir/vanguard.zi public.dir/main.zi \ - public.dir/rearguard.zi; \ + for i in $(TDATA_TO_CHECK) \ + tzdata.zi vanguard.zi main.zi rearguard.zi; \ do \ - public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ + $@d/zic -v -d $@d/zoneinfo $@d/$$i || exit; \ done - public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) + $@d/zic -v -d $@d/zoneinfo-all $(TDATA_TO_CHECK) : : Also check 'backzone' syntax. - rm public.dir/main.zi - cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi - public.dir/zic -d public.dir/zoneinfo main.zi - rm public.dir/main.zi - cd public.dir && \ + rm $@d/main.zi + cd $@d && $(MAKE) PACKRATDATA=backzone main.zi + $@d/zic -d $@d/zoneinfo main.zi + rm $@d/main.zi + cd $@d && \ $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi - public.dir/zic -d public.dir/zoneinfo main.zi + $@d/zic -d $@d/zoneinfo main.zi : - rm -fr public.dir + rm -fr $@d touch $@ # Check that the code works under various alternative @@ -1145,46 +1160,47 @@ check_public: $(VERSION_DEPS) check_time_t_alternatives: $(TIME_T_ALTERNATIVES) $(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES): $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d case $@ in \ - int*32_t) range=-2147483648,2147483648;; \ + *32_t*) range=-2147483648,2147483648;; \ u*) range=0,4294967296;; \ *) range=-4294967296,4294967296;; \ esac && \ - wd=`pwd` && \ - zones=`$(AWK) '/^[^#]/ { print $$3 }' /dev/null; then \ quiet_option='-q'; \ else \ quiet_option=''; \ fi && \ - diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ - $@.dir/etc && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \ + $@d/etc && \ diff $$quiet_option -r \ - $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ - $@.dir/usr/share; \ + $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \ + $@d/usr/share; \ } touch $@ @@ -1199,7 +1215,7 @@ ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ signatures rearguard_signatures traditional_signatures: \ version set-timestamps.out rearguard.zi vanguard.zi - VERSION=`cat version` && \ + read -r VERSION $@.out mv $@.out $@ tzdata$(VERSION).tar.gz: set-timestamps.out - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \ + $(SETUP_TAR) && \ + $$TAR -cf - $(TZDATA_DIST) | \ gzip $(GZIPFLAGS) >$@.out mv $@.out $@ @@ -1251,9 +1267,9 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. $(CREATE_EMPTY) $@.dir/pacificnew touch -mr version $@.dir/version - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - \ + $$TAR -cf - \ $(TZDATA_DIST) pacificnew | \ gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ @@ -1269,9 +1285,14 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out rm -fr $@.dir mkdir $@.dir : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. + if test $(DATAFORM) = vanguard; then \ + pacificnew=; \ + else \ + pacificnew=pacificnew; \ + fi && \ cd $@.dir && \ $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ - `test $(DATAFORM) = vanguard || echo pacificnew` + $$pacificnew (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ >$@.dir/etcetera touch -mr tzdata.zi $@.dir/etcetera @@ -1291,9 +1312,9 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out test -f $@.dir/$$file || links="$$links $$file"; \ done && \ ln $$links $@.dir - LC_ALL=C && export LC_ALL && \ + $(SETUP_TAR) && \ (cd $@.dir && \ - tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@.out + $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out @@ -1301,8 +1322,8 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* - LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out + $(SETUP_TAR) && \ + $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out mv $@.out $@ tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz @@ -1313,22 +1334,21 @@ $(ALL_ASC): $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T -typecheck: typecheck_long_long typecheck_unsigned -typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) - rm -fr $@.dir - mkdir $@.dir - ln $(VERSION_DEPS) $@.dir - cd $@.dir && \ +typecheck: long-long.ck unsigned.ck +long-long.ck unsigned.ck: $(VERSION_DEPS) + rm -fr $@d + mkdir $@d + ln $(VERSION_DEPS) $@d + cd $@d && \ case $@ in \ - *_long_long) i="long long";; \ - *_unsigned ) i="unsigned" ;; \ + long-long.*) i="long long";; \ + unsigned.* ) i="unsigned" ;; \ esac && \ - typecheck_cflags='' && \ *** 4280 LINES SKIPPED *** From nobody Wed Jan 29 18:55:27 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 4YjrvN3hr1z5lmpW; Wed, 29 Jan 2025 18:55:28 +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 4YjrvN11HWz3CjB; Wed, 29 Jan 2025 18:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176928; 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=mdqtpw+Vo6f1eKZN22ByMw1PRRI55hg3qYk7ZesocaY=; b=gz/zXyIYLVggPgRZT8CRBqZ3TPlGhHkCzzPBk0I6nFtw+7/RyJKfTqISYVAK3zX1fQUKaX A9Z6Y+wEfX/oI39fHev7vgPSSzON1HBRPsejqW4KoJwQph6zKy24SODmYxaGCs+lnamWGo zHFxvTPT8zNxbyvMLgyt19lzq7+YMrqJtp6TlKphv7vbmQzzYa0Usiq01mtPZI0yXzg7+i /cltXarBdpksvxSr+OO0sVMOcN0KWOWS5ST6ajdFj26jIKYKfmqO8vlOIh/yz6XQj4mOvg HWHOBJvwsVn/pmNHhpTENl2BM0vmi74UC1h8pRtUotiZeywWcpORrIS5kb3oig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176928; 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=mdqtpw+Vo6f1eKZN22ByMw1PRRI55hg3qYk7ZesocaY=; b=N12XwzDPAff4ZZOGgwAERjNC3mGTgBWNFSRL6+3auPC53YA1GHAzWbInE0nFeVC+Fe4u9x 5fwP+snetSsbixqteHxhuwomkDZAf4vAZ+Fg3iZH5FTPN+nWGA+RxTRhGC4A8/ZHz7Gy+6 3GHyFtCTPwJMDAb02jZxmiZIQ+sxtgx5yJiQ98wZp0pdVGZLxE46/qCworX54cZWi0TIQf WorX8iGNfaAB/y9hXsExhfb05EEtSoQPdW9ycLmd50H0GmjLhGCU4fIbhuM8kgBjleH9ha c2KG4G7avlLflqVWeD1sV1N4kLKR4RM699US75VphzeOttoG+C8N52vGSf3R6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176928; a=rsa-sha256; cv=none; b=oa0qIEocESCv4i7OAHacgWALIQ3k5g8J1J3RMa9Vv+/cMzvYvvU5E8a/cghdNisrqNMsOj WoX+8WDWhlqxtb6D1H2jyACLuRm4VO52Ousyj16lCvwYWh04JVo1D0j5qufw/MfCsXKtoC o1FYZFQPNgiNRLjomdBvG3/4CpKlB15u3gxknCQpzYSVAE70Yb4REUKGBHrM+VOzleQxdQ 5/tL66OFXG/iP1n4OlqXspAmnvWKAGxegfr9/vBCgPtdHLLC5L53AnWssIBOeqdz2Ww8R3 v83EQtC1gK04vqAkeHirLPMjRNLtG/lrCTOzZhfu0IxNBoWLLJpC/N2G68Rtdg== 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 4YjrvN0ctGz1ChV; Wed, 29 Jan 2025 18:55:28 +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 50TItRPH064995; Wed, 29 Jan 2025 18:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItRhT064992; Wed, 29 Jan 2025 18:55:27 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:27 GMT Message-Id: <202501291855.50TItRhT064992@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: bb48aba6244c - releng/13.4 - cd9660: Make sure that struct ifid fits in generic filehandle structure 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: bb48aba6244c10236590b49e43fe90daab6a55fa Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bb48aba6244c10236590b49e43fe90daab6a55fa commit bb48aba6244c10236590b49e43fe90daab6a55fa Author: Mark Johnston AuthorDate: 2024-12-06 02:03:59 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:01:33 +0000 cd9660: Make sure that struct ifid fits in generic filehandle structure File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packs the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reported by: Kevin Miller Reviewed by: olce, imp, kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47879 (cherry picked from commit 205659c43d87bd42c4a0819fde8f81e8ebba068e) (cherry picked from commit cd597b4bb194f7a0bd756b5299b40ad3607b1baf) --- sys/fs/cd9660/cd9660_vnops.c | 3 +++ sys/fs/cd9660/iso.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 9598ecdd7712..60b33fa9a493 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -826,6 +826,9 @@ cd9660_pathconf(ap) /* NOTREACHED */ } +_Static_assert(sizeof(struct ifid) <= sizeof(struct fid), + "struct ifid must be no larger than struct fid"); + /* * Vnode pointer to File handle */ diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index bf98e75c42d9..b54f5f8e5cf4 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -269,7 +269,7 @@ struct ifid { u_short ifid_pad; cd_ino_t ifid_ino; long ifid_start; -}; +} __packed; #define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)->mnt_data)) From nobody Wed Jan 29 18:55:31 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 4YjrvS2pNdz5lmvB; Wed, 29 Jan 2025 18:55:32 +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 4YjrvR3C0hz3CZ0; Wed, 29 Jan 2025 18:55:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176931; 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=5J7s07uLXYePz/gpJ2sikfIkTPkG263nn6G/Tlaj7yk=; b=OFQw0MzzBojopPdV4XEFerYWR4tTLQug+QP4TuD52TWoFEGnetsorJiM2fPLsaU1IYQLo5 YHNgVityPj/imIEYhpbCO8+7dKePlsQoPRNlk7mvRuJFzWncj/etsb1bH7EOahkTlhcqk8 L//DSJectvIQDkL35PgdIdl9yJBdhi+dZPIaPkMQCaSsJ+w+DEmoJZ9Iw/hJ31gIzYmCXK NwMJmHObr78UtWHR2P6utrMlo13JXvQOypUtvvFTc79clk9X4SyBzEnE0J0cLr9hdXr0Bz g6VE5J/ZCmTNuzWdWnEk0u58oLuoV0nUXoJXPhWCywTeqomr7ExAPM1nM0wfvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176931; 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=5J7s07uLXYePz/gpJ2sikfIkTPkG263nn6G/Tlaj7yk=; b=FJbI7GrLmaF+kGo4QEsyoExjfI6B3nC8eQFUdoJVlL12gPVI18niZUSuSODl+9ehITS5Bk 7XlZQ8+PJlWFFqtN8FkJcJWZfngVbBPmW5LCUjtZ35QaSLxs2+LJ7CJA7/FKOPt+rQFRUk zzyRdLxZDUzP+7h2kDGlJkk3eZsf4iJDFPaP/AsB2s5in8hGRGUbujsjC+n6m3Tb0/Jzac tH4pQ6K8d7zI4oOw6oJFdrRaJ+FVNwkzxZ8ZiIF9zpu/c84kkzEyCo8cOXmfhUiraXQy7a dhA6r5vY3c1oVEN+3svgyeDWmVRGWl2jMDK4/+v5Wu0tuTknDVNbwXpJKiN1OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176931; a=rsa-sha256; cv=none; b=A2a2IvG54NzsKl7HwwO/QDrvERPqYO2ViHUnKJQo0EzFL3JqOgSeA8mUlcw7owF74xRwn4 94YvGmgULZMi+MMBGSfw1GQlephMYsjzHM/mVTjtdVUVdHayhXE0sLjz5JfDo/i7mC1of8 iNXNjAW/2HiIODF+D9D+8cjdnSLKChyASTsOoeZgZO2OPcZE3/olxP9asbQqItoyECJMSi lVXy0NmQuOXIU9/91Gm6Gp0pD2X49sifVzhBsIJNmvrZT8uQGvBqQuCo/dZIUC4dlwQerw eaXDrqSUlOv9E2LN9V5cWD1DPOOriql15w54YAyVhALZxSZC5jZswb6vmSE04w== 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 4YjrvR2nwnz1CbN; Wed, 29 Jan 2025 18:55:31 +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 50TItVVf065176; Wed, 29 Jan 2025 18:55:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItVQx065173; Wed, 29 Jan 2025 18:55:31 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:31 GMT Message-Id: <202501291855.50TItVQx065173@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: aef6b5321eea - releng/13.4 - Add updating entries and bump version 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: aef6b5321eead428ac7cc25142d14a1d4b875df0 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aef6b5321eead428ac7cc25142d14a1d4b875df0 commit aef6b5321eead428ac7cc25142d14a1d4b875df0 Author: Mark Johnston AuthorDate: 2025-01-29 17:08:56 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:08:56 +0000 Add updating entries and bump version Approved by: so --- UPDATING | 14 ++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 2951c149d61e..0e6b2e1ebb53 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,20 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20250129: + 13.4-RELEASE-p3 SA-25:02.fs + SA-25:03.etcupdate + EN-25:02.audit + EN-25:03.tzdata + + Buffer overflow in some filesystems via NFS [SA-25:02.fs] + + Unprivileged access to system files [SA-25:03.etcupdate] + + System call auditing disabled by DTrace [EN-25:02.audit] + + Timezone database information update [EN-25:03.tzdata] + 20241029: 13.4-RELEASE-p2 SA-24:17.bhyve SA-24:18.ctl diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index a59fe0f17d4b..8654f15c500f 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.4" -BRANCH="RELEASE-p2" +BRANCH="RELEASE-p3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Jan 29 18:55:27 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 4YjrvN3gcZz5ln17; Wed, 29 Jan 2025 18:55:28 +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 4YjrvN0403z3Cbf; Wed, 29 Jan 2025 18:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176928; 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=BPNPfplQ26X2TkDrkAfRj8Idcwma/hIPFzzYZtaZ4N0=; b=cDLgXWsHs8nOckDfyb262E4KMjFsn56/eF3VNzomvccVyo0iINDPO4dJXh4bqDN74/bCRo 525hTVaWUPExQB3OaALfjZIU3dzp+ulH8aeQF2EGyJJstGr4d/h1Lslnt0vlAIktMj2amt L2cu85HrkreOhXR+IlpTuEZIXOqzRBONpZraWhIeC7OUATiKcI0gg76nk7jb8lTipqLOhQ gCsx+NOXpiSyVOJNRNsO2KUhyusvxTP+cdtwLH8qfzmzRJ6yEX+MNwOUP5YS0jbK3+/TlN bXnajoeyc+zN5MS/+0r5h8jVHL12STh8fgBWSMxZxhqeA6nmpigxXETKr5/P9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176928; 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=BPNPfplQ26X2TkDrkAfRj8Idcwma/hIPFzzYZtaZ4N0=; b=FpvUJQyC0NloYykYz2G2/usuUkbKyroQDF1deluQzqYSK4Tdj2XBmwrolEOXmYn0WeFPfe mA5SpO7ERKwH5DTMUqCLFBgO1qY9AeittCHzafbqvdx5JKlJPC9TdE2WvO4AGtK+82DrUq GL3V+R3kNqHU/GeIt8Vq7OqOP1H2vPvP+XMyz+Pl5iWxYh4HHlaMjnrKO0OSgI7N76cmHM IA6HcPYDrjHcPxRFlwGgVmbtf6UCVlrgem58kP7czosOQKKMWS/WeB+agD9z7NSPLnDU0Y h7tFswf3k99cFIwomllPhoZPCfRqABx9SqVTH8fzEDSTnwh1QcDe8WVG28JtjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176928; a=rsa-sha256; cv=none; b=pDQL3M5kBCkGpM0UYJ3ew4Z7W2AWqFmQEXtpxvd7FwzZ2nnzIjw5BAXJEifw70JWiZxyP2 pVuclhskE4sJXzC5pJ/JAkfeTXr1VMyMe9dca+OsJojF9cI0Yr+tjHimA4oxdsmF/qFckg h33RvqXWOw3nJv3H2aecc7EGveTqA9RosVRtlHCHJBON/C9nobXjjBV9ivEaWKIyhhMCs7 +O17LDxIHOpvhOz/yP649xDjo6CBr6knGLybD/c/6nMvg3+P2tb4/DhRrhtEqNq2nl/e3a q6LjS421jzrNb7+jC4rM2UlurUZ+qyqvWMSPYuSX3PU311kOPXm794j4GFQzUA== 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 4YjrvM6mzfz1ChT; Wed, 29 Jan 2025 18:55:27 +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 50TItRYg064965; Wed, 29 Jan 2025 18:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItRn0064962; Wed, 29 Jan 2025 18:55:27 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:27 GMT Message-Id: <202501291855.50TItRn0064962@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: 89321a8f5707 - releng/14.1 - Add UPDATING entries and bump version 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 89321a8f570708e0cfd744ef3b934f53da4e04c8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=89321a8f570708e0cfd744ef3b934f53da4e04c8 commit 89321a8f570708e0cfd744ef3b934f53da4e04c8 Author: Mark Johnston AuthorDate: 2025-01-29 17:23:53 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 18:46:31 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 20 ++++++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 7db8d96d692e..7d2136381614 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,26 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20250129: + 14.1-RELEASE-p7 SA-25:01.openssh + SA-25:02.fs + SA-25:03.etcupdate + EN-25:01.rpc + EN-25:02.audit + EN-25:03.tzdata + + OpenSSH Keystroke Obfuscation Bypass [SA-25:01.openssh] + + Buffer overflow in some filesystems via NFS [SA-25:02.fs] + + Unprivileged access to system files [SA-25:03.etcupdate] + + NULL pointer dereference in the NFSv4 client [EN-25:01.rpc] + + System call auditing disabled by DTrace [EN-25:02.audit] + + Timezone database information update [EN-25:03.tzdata] + 20241029: 14.1-RELEASE-p6 EN-24:17.pam_xdg SA-24:17.bhyve diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index c8fcd643c0b9..388b566b79b0 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.1" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Jan 29 18:55: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 4YjrvM62Vyz5lmm0; Wed, 29 Jan 2025 18:55:27 +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 4YjrvM0jKCz3CYP; Wed, 29 Jan 2025 18:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176927; 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=bBCxLJQ2FtQI8/j+BfZBgIi6v1mGZcfjW66hSkkj/XE=; b=rgTXVZnM31pqWDIauKcg9WAWFduZxQ85CRjL8XiH0cXDrmyWv+IANJ/JD/YUM6sl6Wl+GB UGcJ/CbByX6l+CDEokIz9BgGD7sGGa5kpMGJJeFSpTy8WMolF5jJwXhXyvJJhmw6WZGLm2 HSzILlPRfgAOCM0o2OH7BCxGWa3ViWx5oX6nXYoHi134m/GlJ64eepy+8MBkHTRAYjeQfB vN3hS2D/qSorMA268ypYHKEOkprJ0p7xzoF/HAerXHpIvmthR04y8NhCdlvFaeAAvLM0sE bleLOeKgBA2bXy1MVarlzeBQudPDVxeHJJJ71WA3uALQ5IrMNHLasVqUrIP3NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176927; 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=bBCxLJQ2FtQI8/j+BfZBgIi6v1mGZcfjW66hSkkj/XE=; b=HLcU2AJJ+HhYDs+uux1NoDVUjUzupeb3xby3+G1U432s30fVvoRmlb0hAFMNu/aW/cJuM/ TWJ5Jx6531CsvmR7l+aNkIbuobNnAP8K0pZjYMZwGlEOF6BTRUtYaGxtUCI0SkhNGNKeQC aSM/zcuUkSl2BtfoJ/qu57+qeMxaZy555n0ubvPzBGH1/KTED4BqZ57yCaUNEFdiCnFxBV /L/RjoH8LfgWekz/P9sj0uj6Qd/hXrtNJi1m+dVt4Pxq9Mkpio1HGvP5QpCjStLNLDXcb3 w5XnMnzDIPO3r3PzhYmuRFSneJPT2gRYppwlJF3vhada4/LPQWrCMTDxzNddsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176927; a=rsa-sha256; cv=none; b=LxL2NO9LoGufMbF1A7E57ptJCg9QpEH+65T663h+5bT1Lost/SNqspQR5nV6JiXxZgTeAS 1XSdu8Elnz35h6v2NySQh0XAr0TRUiF0P4rGq9Pw0rdckABYrMGCb396OJBIS8YyY9Eevn HPR5VTc1UId1j9GFUkd+PDOr7LXcWWcWVSo0tg709ikYZ4vBxcmfZQePV4pkwUp4VwCeyW 6iSEBAOLAwUoPwOqaAW3KEpT8wlIkAZ3SwZDyIVsS2W3Wo25rX2kyoHdLy7aV6F07JNzuh r/TOeo64t/NXsj3qcWb2UPNe/cFZ68xA5BygzQfL3lIGXBTf1QrOW9uqYXw6vw== 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 4YjrvL6sDwz1ChS; Wed, 29 Jan 2025 18:55: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 50TItQAM064932; Wed, 29 Jan 2025 18:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItQGx064929; Wed, 29 Jan 2025 18:55:26 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:26 GMT Message-Id: <202501291855.50TItQGx064929@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: eb9d8bafa485 - releng/13.4 - 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: eb9d8bafa485988afe8005cc5fc818dfa39a01d9 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eb9d8bafa485988afe8005cc5fc818dfa39a01d9 commit eb9d8bafa485988afe8005cc5fc818dfa39a01d9 Author: Philip Paeps AuthorDate: 2025-01-17 01:33:46 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 16:51:01 +0000 contrib/tzdata: import tzdata 2025a Changes: https://github.com/eggert/tz/blob/2025a/NEWS Approved by: so Security: FreeBSD-EN-25:03.tzdata (cherry picked from commit 46226b0162ba03986b1de2c790804b37dd8e64d6) (cherry picked from commit 2d6dcb4f97f89376189f39b700459c72fe7a2678) --- 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 *** 22 LINES SKIPPED *** From nobody Wed Jan 29 18:55: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 4YjrvM40Xcz5lmkl; Wed, 29 Jan 2025 18:55:27 +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 4YjrvL6SHsz3CYN; Wed, 29 Jan 2025 18:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176927; 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=cOUqPwt0pjpFSwwY2FrsDyFThHhqPhdiaKRvG2ET2FU=; b=iI8oImSLj8o/9i/jdhkVoe4WF9zqZedzJs44xYoyVtKrY4IT7K79ZgCyXPcKrzp2BA4loW k63mJYcQn0m8Ko2FvNVLFR8nFeIVZqmzsoF2LBnlWoSi+fP8frYqyvHP+Xi1l9/yo5APoU uJarcBL1HoAIq2azQXDtS/zLyORXXgGpK+poZZOgmaVMehXLNWwPsIakOh/vaCoVw5xDGD 4e2D2GQ3AuzLzbOO24c5G3v71q/HGcp31rsAcUBe2oB3Y4ZA6j/ppTwbHC19TytpYPkiXL 5I9w5IfkJBsf4El+JggVMM+57xzlg7qNQHwXqbNVw8XpGcZxAC/gxORU4fp1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176927; 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=cOUqPwt0pjpFSwwY2FrsDyFThHhqPhdiaKRvG2ET2FU=; b=rUuAaXCXyJSl7wKZllP4xKAujVAFgBWMONYVNDk5Hw7W9SKVcMs+UqdPm7E4jjzsNDQekK etCG5VWMT4Pw3jnafrWgwXH6cPEBSKWFSQf+tuEu0iSffsMj0BVLX40ZsFOibTttZ5Abrm brA2QDN7nS5wQLh8KEWDILXDbxgakF5dlsrcEBpf5QcpmN1BiENNWeCbVNtlz0MpDtaWij XQVbxYNbl73p5JIoGs4WJ8NdWIVPIQyiJcoz2Uyo/GGOtiDDCAp6G+KRAScn6kzjJRJDNb 8TDihwAwyOszGRAhI3hgjdg5hbNf01alBmRaryypzCgFlea67PQjxKHd6V/now== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176927; a=rsa-sha256; cv=none; b=KKi8ENjLX8uTRstmucWPCZVq7m1xNoQIpIxThyhbt1bfcBRD8L+zw+Q37BhBV+vSiPpNeL E5dccB60ydGmS3+4buTsy9SzUXiL+Z6BPgyT7Fp/ShI7WM+4EZw/dLOpuR8o9JWEr1tQYw JYcKmfJjnG0LbOnZxb6dtLXKIuCE5woyvbcRPnYh8SqMLLBDFtsAELO//H8kIU0pAqoA/h Ev9ocv1ovwjW8mCm7vSoRr+eZSo+zX6Putbj2h5c61q262+HrigFnqkN7iXF4x8baklo1T zi9blD9eGot9yo0ePq6AlufRYEBis7QCMy4YvostWbdVS7UK5dnlqZmvsdIEbQ== 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 4YjrvL5r2rz1k; Wed, 29 Jan 2025 18:55: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 50TItQEE064900; Wed, 29 Jan 2025 18:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItQgu064896; Wed, 29 Jan 2025 18:55:26 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:26 GMT Message-Id: <202501291855.50TItQgu064896@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: b8945a926a2f - releng/14.1 - etcupdate: Restrict access to the conflicts directory 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: b8945a926a2f10ebac7458b44e81acdc84413a91 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b8945a926a2f10ebac7458b44e81acdc84413a91 commit b8945a926a2f10ebac7458b44e81acdc84413a91 Author: Mark Johnston AuthorDate: 2025-01-28 14:23:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:13:21 +0000 etcupdate: Restrict access to the conflicts directory In the window during conflict resolution, copies of installed files with conflicts are added here with the default mode. Restrict access. Approved by: so Security: FreeBSD-SA-25:03.etcupdate PR: 277470 Reviewed by: philip, jhb, emaste Differential Revision: https://reviews.freebsd.org/D48576 (cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1) (cherry picked from commit 93836ff92be84a1d4e7611577ffe116a0e30d008) --- usr.sbin/etcupdate/etcupdate.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 39d1f9e56a54..7bddd6593b56 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1611,6 +1611,9 @@ EOF # Initialize conflicts and warnings handling. rm -f $WARNINGS mkdir -p $CONFLICTS + if ! chmod 0700 ${CONFLICTS}; then + panic "Unable to set permissions on conflicts directory" + fi # Ignore removed files for the pre-world case. A pre-world # update uses a stripped-down tree. From nobody Wed Jan 29 18:55: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 4YjrvL4fZgz5lmty; Wed, 29 Jan 2025 18:55: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 4YjrvK67hVz3CYD; Wed, 29 Jan 2025 18:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176926; 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=tHQnDegg7e1mpf+8Wpg5NpbrIfkDdEQsVvroVzz8UJs=; b=dtTBSC3mykFTzG38r9PQb9By4S4v8J0V/SFAj8uBNh4GTWHU09rVTRION7TzT+ireFvdAT 9ibu0uxExrqsaoVVO8W4DbgWe8vPZdJE9i8mzSc7we2lDvD20AHrdG5pPOSoNnV7PPHMx6 rT8X7cy0ucJRt60fl4MBgSD2MNEc3MtEEGzih23doC5yjdBEhS1iRD+6nDZIm3nqgQ/g6r riueblIQDdBDO97lJkNnDArwV/i2rytkTu9lcjyAQWugR5coCPOH7NYi9k8dApyiaVNnbV ln0ZG4rixL+hdeTkby8hOQdCOou1TCwOHJ0BRZUURVP5IvzU/huWqc6DJLZw1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176925; 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=tHQnDegg7e1mpf+8Wpg5NpbrIfkDdEQsVvroVzz8UJs=; b=ON4gWFhDc+rrXFnYIvQX+V9ybAZV5dVrdLvr8pPZ/jb0vWRbH1ZogM4fHk1doHZZitfTtH 55icuyAn6CqEKIM0Bphoqjny/IWrx/f9XROPRbcqaLksR8qAE7S1MSruhmGI+d8PJUZYwp slTy+Fwaux2OndnMRrwrISqC7rltosnd4wgU+DtD5Q3LTWBrNGNNB7S6u/+HTeIFydsBEE ++Rx5U60EZuqQyo0sbOnoNcXbl9C2IWRPF1iWRZDmVvGDRHfySx8PqpqUcdjcCejrCCf4Y tZycPeMUUI6BTY0lhfIdl6xYS3fhceMvhpo86wIkYHu8XFLJ3TaEE1ktV8uTeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176925; a=rsa-sha256; cv=none; b=Sho3ev6z/npBcqtSRvsphDBW0L7hREdalNzLInviYJVxHnPAfcv8cxTaXbbtp78/g3NedB u72cRH7qba5F1z+CPJzUHhZIX7Gscj4WRDm4vF1+r90FnKiMRiHgJVz1yC2neSm0rpdaKm RymzlDY/jTRfFsDfonwXPZCq3/E4mHZBp7WHNC5og2DL6snAOMsVOgj1rUII8WCOBAfFxq YJDf+CRCFHY5V6fNipV5LHb7rPUY2Pfk60TRESN4k73WkIre+EsjdvS35aMtoXKPYrohGO vv5+bRMJK6gYeyNkMfxc5roa3qFD3HHWP3Hlo/bIw3opeMRUzYY3fKtSUFFChQ== 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 4YjrvK4vNYz1Cl7; Wed, 29 Jan 2025 18:55: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 50TItPxe064836; Wed, 29 Jan 2025 18:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItPw0064833; Wed, 29 Jan 2025 18:55:25 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:25 GMT Message-Id: <202501291855.50TItPw0064833@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: 88d5d8108711 - releng/14.1 - OpenSSH: correct logic error in ObscureKeystrokeTiming 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 88d5d81087113112fcafff109b14ae21d7e3a687 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=88d5d81087113112fcafff109b14ae21d7e3a687 commit 88d5d81087113112fcafff109b14ae21d7e3a687 Author: Ed Maste AuthorDate: 2024-07-01 13:14:15 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:13:08 +0000 OpenSSH: correct logic error in ObscureKeystrokeTiming Cherry-pick fix: upstream: when sending ObscureKeystrokeTiming chaff packets, we can't rely on channel_did_enqueue to tell that there is data to send. This flag indicates that the channels code enqueued a packet on _this_ ppoll() iteration, not that data was enqueued in _any_ ppoll() iteration in the timeslice. ok markus@ OpenBSD-Commit-ID: 009b74fd2769b36b5284a0188ade182f00564136 Approved by: so Security: FreeBSD-SA-25:01.openssh Obtained from: openssh-portable 146c420d29d0 Reviewed by: gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45823 (cherry picked from commit b81424adf7181d816c10b1345aaa3305ab0ec304) (cherry picked from commit bf9a275b24f6655616cc691555fe1a36ed5e4338) --- crypto/openssh/clientloop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/clientloop.c b/crypto/openssh/clientloop.c index 8ec36af94b3f..6dcd6c8535aa 100644 --- a/crypto/openssh/clientloop.c +++ b/crypto/openssh/clientloop.c @@ -608,8 +608,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout, if (timespeccmp(&now, &chaff_until, >=)) { /* Stop if there have been no keystrokes for a while */ stop_reason = "chaff time expired"; - } else if (timespeccmp(&now, &next_interval, >=)) { - /* Otherwise if we were due to send, then send chaff */ + } else if (timespeccmp(&now, &next_interval, >=) && + !ssh_packet_have_data_to_write(ssh)) { + /* If due to send but have no data, then send chaff */ if (send_chaff(ssh)) nchaff++; } From nobody Wed Jan 29 18:55:29 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 4YjrvQ0TJGz5lmm7; Wed, 29 Jan 2025 18:55:30 +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 4YjrvP1HGvz3CjS; Wed, 29 Jan 2025 18:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176929; 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=UuyTv+vxrQ4yBZGKoa5fAthq3pQCRj+3vcs2OebbrfU=; b=YeTsfE2RWaarAIiv062K+k5HD4e8STX+J9Ygt/fkt6TBeaijiDa8kixdLeX1wiw20LZWMv JFJ1ySLideaZqCpPpRDFf6R8aIhA4y2t2Ku/4CdS/RNUUQXsR1CEbtPbtKh39lrd5s00uZ NFODjJ7zHSS97AXz0DG9kHJ4FT0H7rKx7AVI1jpE2UMGs1UV+X4eYXzvWtDnP5VSGCskOx zxB6nbSb6SBTdi7ergYJUxopVk3SLdisTIPVX+YXVcBROKAeX8ahEr4Vtlt9lamwjvoUUh LNrh2FDMBtDDtmhpwqOgkKCe01W/X3S63Mdt0BdpQD3VO4mApbJtwjrZzY+Njg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176929; 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=UuyTv+vxrQ4yBZGKoa5fAthq3pQCRj+3vcs2OebbrfU=; b=ma6V5rm1Fhs5+XoPiZoDjZ5mcf73IoQtW87+D91LeT52DIo1cGkX8oe3AgGHf0JrFu58jV ULLlyXIhtEz1v+ORRqQaT+niYWz09xEQ6Dsxjd/dHKC9x6QeCqhd362vnFl2+oiAYJ6Yhh jcytci4glcqLHT1onz/S0pQMYWG2ZmLUbcRTneMqUq5Zob7RRjSkQxH02cg4kT5XAk3Kfj x7DDT85L1G7qzwKEVwi6q16sR6pZmJ6kFFIXVPrw6cKQZ0DupeqLfIPl05Wqu6G8uy+Mk+ vuLG7hBaHZAznO6VQdX5ra3TBpmONZJTUO2lZoWtcHZqr9PexRmeLWU3sPSC/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176929; a=rsa-sha256; cv=none; b=jy0e8FVm+rPfFu8VHhJZ1plLRjtoZGfkX/UAq74LCPHbY2zV4QELinOcV6J3vf+chLz1aE eEWN0FT7ae4mF04vKiliwm68sWB8OP16MnaPZXKck6PF0SbC6fWMoPzFVTC30n8ypq2+/0 hin+kMCOOaqjyxpGriOUweb575dcNLfvHMaHB40BOV4UfGaqaTSFo6UwVqpM/R+k0OezJC uyBwG25+95bN5H1rr030vnavQ6zTbpTGmmdzLodxC1EfjFLaOaFrVvkAgeZ7b5swVTuHNY mWvQ9LgIyI9yyVS/ruaMDzYUBKM8CBf7/Bd+C/at7HKuPT+K5rgtY/UzNsq7qQ== 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 4YjrvP0tbDz1Cl8; Wed, 29 Jan 2025 18:55:29 +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 50TItTai065097; Wed, 29 Jan 2025 18:55:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItTWC065080; Wed, 29 Jan 2025 18:55:29 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:29 GMT Message-Id: <202501291855.50TItTWC065080@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: 0365b776f1b1 - releng/13.4 - ext2fs: Fix the size of struct ufid and add a static assert 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: 0365b776f1b189855c67bdfa2be38955039f8ed6 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0365b776f1b189855c67bdfa2be38955039f8ed6 commit 0365b776f1b189855c67bdfa2be38955039f8ed6 Author: Rick Macklem AuthorDate: 2024-12-06 02:05:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:02:12 +0000 ext2fs: Fix the size of struct ufid and add a static assert File system specific *fid structures are copied into the generic struct fid defined in sys/mount.h. As such, they cannot be larger than struct fid. This patch packed the structure and checks via a __Static_assert(). Approved by: so Security: FreeBSD-SA-25:02.fs Reviewed by: markj MFC after: 2 weeks (cherry picked from commit bfc8e3308bee23d0f7836d57f32ed8d47da02627) (cherry picked from commit ee931cf4a49c90487c938fa14b856401582a045c) --- sys/fs/ext2fs/ext2_vnops.c | 2 ++ sys/fs/ext2fs/inode.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 01b94abf6cd5..63c4830b95be 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -1884,6 +1884,8 @@ ext2_vptofh(struct vop_vptofh_args *ap) { struct inode *ip; struct ufid *ufhp; + _Static_assert(sizeof(struct ufid) <= sizeof(struct fid), + "struct ufid cannot be larger than struct fid"); ip = VTOI(ap->a_vp); ufhp = (struct ufid *)ap->a_fhp; diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 6b8b23ccab14..c29a64be12e0 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -189,7 +189,7 @@ struct ufid { uint16_t ufid_pad; /* Force 32-bit alignment. */ ino_t ufid_ino; /* File number (ino). */ uint32_t ufid_gen; /* Generation number. */ -}; +} __packed; #endif /* _KERNEL */ #endif /* !_FS_EXT2FS_INODE_H_ */ From nobody Wed Jan 29 18:55:30 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 4YjrvQ5rxYz5lmpX; Wed, 29 Jan 2025 18:55:30 +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 4YjrvQ2GWMz3Cbw; Wed, 29 Jan 2025 18:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176930; 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=vd5Qwfy9nMKh2uYILLUlWyFMB74IvTRm0fQFyLcohl8=; b=sOUmiW0W68+iLd8t7D/J9wOcN94lKlDnyP85CPwHykXo1qXDZAc6i7vSrrEpqa5piyD1yd 2MnNsbXDj9Zwt68QXH1XNGr55ccrw2Nz50ABSX8pis0baPggaiv4L6IzMSzzVv86UcUCVC pxNH3ZvA+Ah7+w99tZ2FI4g5aDNNwF85NUtnQ8LaE+GqpL9xXcp6sjq7wYIKqjCZlJXCEn LWutRiw30YrstniHPqyZWaC09PbMyAPf1BuulJv7SNKX7g+HKg1WXp0mona7Yhbprx46K8 rcWhpqnanUNmMGTXwsmk8YdQNKgGPdfmXdEf40zj1GQSHFtN0FTjpQX9UQUZ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738176930; 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=vd5Qwfy9nMKh2uYILLUlWyFMB74IvTRm0fQFyLcohl8=; b=aY6f99xXwj59j2LgqOUAxOPE6z7QCA+8dCQ4CA4zxB/RFlbmTvUhWjLrYjOGDlkTmo+c1w v6Ulf1vbKoKhsqeIXsICaMW9yUIFnpPQVHpdcfVVbidRIcAno6E13gzJxvtCGYdmgBi11w vVITk4xS9wc43BZInX6j9/c32xPwpi434obwwd9ImqkzQjMXmy6JdM3WfOGMGt9cu8N4CW EkQf4nY/Pk8wehO1yMenyKpNH9txoVekc5JowYXVKhvPbU4tKbaGzxm308Qyf8sy38Pq4i i8XC5fZl9gtF2IHp7kfK7zERxFxUVKY8zKZ8+spwU3Yh6w3C0o0hImRcMsbKyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738176930; a=rsa-sha256; cv=none; b=p9gTnZuzr1nMZYwMSjG5Hj5SFJ1+onCyroC88tR9RsbX2YBWVlJRirzftMHDvf8SaJ8q9r 6BlNgE29kznKCjgAHs/sfZoeaV60sgKEcOsVUVNNyBb7ASYGghJKWzGTLuFWnr62+C/1f2 mgeIZQgTmVvgxYCbJbD3vn6pv30/rgaPrVznNkJW3l3K/7N+fFKVaZUM2LCQ6nPaUqzsIp u7fu/Ujdk4chROVNEWM57f51XPEgx0z4E/8c/E59OtJKxzEJ1oe6fC21NfzZejfS3qBgSl BS/24sylzjAguNSEaG6tL+mJRIgAZvXFAuONCDcGmoyCZJ04/Y1eBDw4I12xdg== 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 4YjrvQ1rdqz1ChW; Wed, 29 Jan 2025 18:55:30 +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 50TItUsJ065137; Wed, 29 Jan 2025 18:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TItUs6065134; Wed, 29 Jan 2025 18:55:30 GMT (envelope-from git) Date: Wed, 29 Jan 2025 18:55:30 GMT Message-Id: <202501291855.50TItUs6065134@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: c1c180910d46 - releng/13.4 - etcupdate: Restrict access to the conflicts directory 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/releng/13.4 X-Git-Reftype: branch X-Git-Commit: c1c180910d4677b00c7651d72b13f63f8f1c646c Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c1c180910d4677b00c7651d72b13f63f8f1c646c commit c1c180910d4677b00c7651d72b13f63f8f1c646c Author: Mark Johnston AuthorDate: 2025-01-28 14:23:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:02:44 +0000 etcupdate: Restrict access to the conflicts directory In the window during conflict resolution, copies of installed files with conflicts are added here with the default mode. Restrict access. Approved by: so Security: FreeBSD-SA-25:03.etcupdate PR: 277470 Reviewed by: philip, jhb, emaste Differential Revision: https://reviews.freebsd.org/D48576 (cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1) (cherry picked from commit 17e935f1f327d7d4464e53f4f3d2347a51623f82) --- usr.sbin/etcupdate/etcupdate.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 6d8f58d39c54..ed259da7420f 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1561,6 +1561,9 @@ EOF # Initialize conflicts and warnings handling. rm -f $WARNINGS mkdir -p $CONFLICTS + if ! chmod 0700 ${CONFLICTS}; then + panic "Unable to set permissions on conflicts directory" + fi # Ignore removed files for the pre-world case. A pre-world # update uses a stripped-down tree. From nobody Wed Jan 29 19:33:27 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 4YjslD03dFz5lrS8; Wed, 29 Jan 2025 19:33:28 +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 4YjslC6tGcz3R3N; Wed, 29 Jan 2025 19:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179207; 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=EM5RqJQaT4HUXru90OR1lwEoTMwldAtcYv2hua+r22E=; b=uExP2RtYr1Rf1VbnsYkRbLi6RBasiMjjZFTgabFVVCm4r/bOgY8Dx2ozeIy+Tf3sEDZ0BH yFUkwigShT7gx3XWLaPRoH5rw071Ff92BJjCvv+cDX63GgMO5byeW/b1ncaeuBT+AJF4Q5 uVUzKLBBTvNmv2p+FpRoMcVRbWXvucgxLLCuFhcTDJAcN+XnLPAddAC8mm9MLQmvz/wRBV gZkv5zrFmFOQFyqlmuMFHL8ediuCwyFPqli2hw3DuQ5qJPPq4phPiOUb1etOjMzOZyKCOe Mce71/DBZoWM5GIJCFb3074S65a2CFbEj5J13DYQ/asSjecBNmiW1p3VwvL0EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179207; 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=EM5RqJQaT4HUXru90OR1lwEoTMwldAtcYv2hua+r22E=; b=PUMbfFL+y4ymHcnTScCEmEgRMokl0+SdQpMVan6rbtsXtE532ewjQlUSMkKJ5OpZQgOqT1 HW9TTx/BFpCXFNHOB05+ajm7t+f2K5SipRifqqkLjctvtpNUY/zfE3f+R300pnQG+lZgXv 3b7Hrv/xPmQfWI/DpqW5SEdJjQFDPXTQaRXCpRahxKthx027NwuZtN3SRkp+4ipiiapaBv hM/rcwrWNOQFsIW6yrKGwTH0QDRkh2HVBr7NwrMgUaDMrE9vTI3GmbuFhgagAG7lx5bWci Pu7XK7DP9ZyD9U4HBNYMBJOND0CgivqfrD2fKqv4dYY7E7KGt8ZVr/HvMJZpTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179207; a=rsa-sha256; cv=none; b=EZ0Lb/vehR1nK7yVOj3UrOXXMpSlQvDn9/Bb4ERu9T38ui1r1Ya6sRQVOjx7wxFdyPWhcW ZjyYUnP7epREgJwvZ//5dmEES0fW8T1GLzYZbCYng8mTqtbihYDr+qZW0qHWzUGWbeY4If 5jfd0111VsH/I2BZmRM/lhw1L0Z/0WfBUOJo1e4T6aa4LaoATvKIjoRNJHs++Khdf9b+nq aX6lKiA4CkLvvFhALgfNEDLniYF400lBmIdKI4jUAByDutC50DCiAct6H0JFav5pDA+yh0 WrAKBbz0MtFd6gpfAiZfqwsbLgQfHOyfhAURkIRBYcOV43I2aZySsXNnGqq3dw== 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 4YjslC6CsVzms; Wed, 29 Jan 2025 19:33:27 +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 50TJXRSO039634; Wed, 29 Jan 2025 19:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXRGr039628; Wed, 29 Jan 2025 19:33:27 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:27 GMT Message-Id: <202501291933.50TJXRGr039628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: 7aedea868535 - stable/13 - libpcap: Update to 1.10.3 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7aedea8685359fa5e914a7341ef0ef33b8227d7c Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=7aedea8685359fa5e914a7341ef0ef33b8227d7c commit 7aedea8685359fa5e914a7341ef0ef33b8227d7c Author: Joseph Mingrone AuthorDate: 2023-02-13 22:06:51 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:28 +0000 libpcap: Update to 1.10.3 Prior to this MFC, the stable/13 libpcap was at version 1.9.1, which was released over five years ago. Several CVEs have been identified in that version. For a detailed list, see https://www.tcpdump.org/public-cve-list.txt. Reviewed by: kp (pf changes) Sponsored by: The FreeBSD Foundation (cherry picked from commit 6d1c946e916845d01062e146aad5395410da1e54) (cherry picked from commit 0c59e0b4e5817f139ce28486085b2f196351c7a3) (cherry picked from commit 512c553671bef26e93342d4ae1ec5f60d8ae112b) (cherry picked from commit 6f9cba8f8b5efd16249633e52483ea351876b67b) (cherry picked from commit 437f05885047c533cadf15b564729cfd0273d2fe) Commit 437f05885047c533cadf15b564729cfd0273d2fe has been adapted to only include the changes for the libpcap 1.10.3 update. --- ObsoleteFiles.inc | 3 + contrib/libpcap/CHANGES | 448 +- contrib/libpcap/CMakeLists.txt | 1627 ++++- contrib/libpcap/CONTRIBUTING.md | 6 +- contrib/libpcap/CREDITS | 83 +- contrib/libpcap/INSTALL.md | 481 +- contrib/libpcap/Makefile-devel-adds | 4 +- contrib/libpcap/Makefile.in | 175 +- contrib/libpcap/README.md | 73 +- contrib/libpcap/TODO | 2 - contrib/libpcap/VERSION | 2 +- contrib/libpcap/Win32/Prj/wpcap.sln | 28 - contrib/libpcap/Win32/Prj/wpcap.vcxproj | 233 - contrib/libpcap/Win32/Prj/wpcap.vcxproj.filters | 107 - contrib/libpcap/aclocal.m4 | 585 +- contrib/libpcap/atmuni31.h | 2 +- contrib/libpcap/bpf_filter.c | 86 +- contrib/libpcap/bpf_image.c | 156 +- contrib/libpcap/charconv.c | 217 + contrib/libpcap/charconv.h | 44 + contrib/libpcap/cmake/Modules/FindAirPcap.cmake | 69 + contrib/libpcap/cmake/Modules/FindDAG.cmake | 7 + contrib/libpcap/cmake/Modules/FindPacket.cmake | 63 +- contrib/libpcap/cmake/Modules/FindSNF.cmake | 6 + contrib/libpcap/cmake/Modules/Finddpdk.cmake | 118 + contrib/libpcap/cmakeconfig.h.in | 85 +- contrib/libpcap/config.guess | 1510 +++-- contrib/libpcap/config.h.in | 96 +- contrib/libpcap/config.sub | 1686 ++--- contrib/libpcap/configure | 6968 ++++++++++++++------ contrib/libpcap/configure.ac | 1684 +++-- contrib/libpcap/diag-control.h | 241 +- contrib/libpcap/dlpisubs.c | 31 +- contrib/libpcap/doc/DLT_ALLOCATE_HOWTO.md | 29 - contrib/libpcap/doc/README.Win32.md | 199 +- contrib/libpcap/doc/README.aix | 24 +- contrib/libpcap/doc/README.dag | 6 +- contrib/libpcap/doc/README.hpux | 10 +- contrib/libpcap/doc/README.linux | 36 + contrib/libpcap/doc/README.linux.md | 108 - contrib/libpcap/doc/README.septel | 4 +- contrib/libpcap/doc/README.sita | 13 +- contrib/libpcap/doc/README.solaris.md | 58 + contrib/libpcap/doc/README.tru64 | 49 - contrib/libpcap/etherent.c | 20 +- contrib/libpcap/ethertype.h | 38 +- contrib/libpcap/extract.h | 302 +- contrib/libpcap/fad-getad.c | 3 +- contrib/libpcap/fad-gifc.c | 10 +- contrib/libpcap/fad-glifc.c | 3 +- contrib/libpcap/fmtutils.c | 308 +- contrib/libpcap/fmtutils.h | 8 + contrib/libpcap/ftmacros.h | 28 +- contrib/libpcap/gencode.c | 1045 ++- contrib/libpcap/gencode.h | 82 +- contrib/libpcap/{grammar.y => grammar.y.in} | 246 +- contrib/libpcap/ieee80211.h | 2 +- contrib/libpcap/lbl/os-osf4.h | 4 +- contrib/libpcap/lbl/os-osf5.h | 6 +- contrib/libpcap/lbl/os-solaris2.h | 2 +- contrib/libpcap/lbl/os-sunos4.h | 2 +- contrib/libpcap/libpcap.pc.in | 5 +- contrib/libpcap/missing/asprintf.c | 2 +- contrib/libpcap/missing/getopt.c | 17 +- contrib/libpcap/missing/snprintf.c | 631 -- contrib/libpcap/missing/win_asprintf.c | 4 +- contrib/libpcap/missing/win_snprintf.c | 43 - contrib/libpcap/mkdep | 53 +- contrib/libpcap/msdos/readme.dos | 8 +- contrib/libpcap/nametoaddr.c | 66 +- contrib/libpcap/nomkdep | 0 contrib/libpcap/optimize.c | 677 +- contrib/libpcap/org.tcpdump.chmod_bpf.plist | 2 +- contrib/libpcap/pcap-airpcap.c | 1054 +++ contrib/libpcap/pcap-airpcap.h | 36 + contrib/libpcap/pcap-bpf.c | 688 +- contrib/libpcap/pcap-bt-linux.c | 54 +- contrib/libpcap/pcap-bt-monitor-linux.c | 31 +- contrib/libpcap/pcap-common.c | 450 +- contrib/libpcap/pcap-common.h | 25 - contrib/libpcap/pcap-config.1 | 4 +- contrib/libpcap/pcap-config.in | 98 +- contrib/libpcap/pcap-dag.c | 93 +- contrib/libpcap/pcap-dbus.c | 28 +- contrib/libpcap/pcap-dll.rc | 6 +- contrib/libpcap/pcap-dlpi.c | 148 +- contrib/libpcap/pcap-dos.c | 50 +- contrib/libpcap/pcap-dpdk.c | 1086 +++ contrib/libpcap/pcap-dpdk.h | 28 + contrib/libpcap/pcap-enet.c | 4 +- contrib/libpcap/pcap-filter.manmisc.in | 651 +- contrib/libpcap/pcap-haiku.cpp | 305 + contrib/libpcap/pcap-int.h | 177 +- contrib/libpcap/pcap-libdlpi.c | 52 +- contrib/libpcap/pcap-linktype.manmisc.in | 8 +- contrib/libpcap/pcap-linux.c | 5447 +++++---------- contrib/libpcap/pcap-netfilter-linux.c | 74 +- contrib/libpcap/pcap-netmap.c | 7 +- contrib/libpcap/pcap-new.c | 54 +- contrib/libpcap/pcap-nit.c | 12 +- contrib/libpcap/pcap-npf.c | 803 ++- contrib/libpcap/pcap-pf.c | 26 +- contrib/libpcap/pcap-rdmasniff.c | 63 +- contrib/libpcap/pcap-rpcap.c | 767 ++- contrib/libpcap/pcap-savefile.manfile.in | 8 +- contrib/libpcap/pcap-septel.c | 40 +- contrib/libpcap/pcap-sita.c | 61 +- contrib/libpcap/pcap-sita.html | 28 +- contrib/libpcap/pcap-snf.c | 62 +- contrib/libpcap/pcap-snit.c | 22 +- contrib/libpcap/pcap-snoop.c | 8 +- contrib/libpcap/pcap-tc.c | 178 +- contrib/libpcap/pcap-tstamp.manmisc.in | 61 +- contrib/libpcap/pcap-types.h | 1 - contrib/libpcap/pcap-usb-linux-common.c | 130 + contrib/libpcap/pcap-usb-linux-common.h | 26 + contrib/libpcap/pcap-usb-linux.c | 877 +-- contrib/libpcap/pcap-util.c | 474 ++ contrib/libpcap/pcap-util.h | 55 + contrib/libpcap/pcap.3pcap.in | 136 +- contrib/libpcap/pcap.c | 783 ++- contrib/libpcap/pcap/bpf.h | 60 +- contrib/libpcap/pcap/can_socketcan.h | 7 +- contrib/libpcap/pcap/compiler-tests.h | 52 +- contrib/libpcap/pcap/dlt.h | 210 +- contrib/libpcap/pcap/funcattrs.h | 130 +- contrib/libpcap/pcap/namedb.h | 4 +- contrib/libpcap/pcap/pcap-inttypes.h | 85 +- contrib/libpcap/pcap/pcap.h | 332 +- contrib/libpcap/pcap/socket.h | 9 - contrib/libpcap/pcap_activate.3pcap | 35 +- contrib/libpcap/pcap_breakloop.3pcap | 101 +- contrib/libpcap/pcap_can_set_rfmon.3pcap | 28 +- contrib/libpcap/pcap_close.3pcap | 4 +- contrib/libpcap/pcap_compile.3pcap.in | 26 +- contrib/libpcap/pcap_create.3pcap | 8 +- contrib/libpcap/pcap_datalink.3pcap.in | 15 +- contrib/libpcap/pcap_datalink_name_to_val.3pcap | 8 +- contrib/libpcap/pcap_datalink_val_to_name.3pcap | 22 +- contrib/libpcap/pcap_dump.3pcap | 12 +- contrib/libpcap/pcap_dump_close.3pcap | 6 +- contrib/libpcap/pcap_dump_file.3pcap | 6 +- contrib/libpcap/pcap_dump_flush.3pcap | 13 +- contrib/libpcap/pcap_dump_ftell.3pcap | 16 +- contrib/libpcap/pcap_dump_open.3pcap.in | 51 +- contrib/libpcap/pcap_file.3pcap | 20 +- contrib/libpcap/pcap_fileno.3pcap | 20 +- contrib/libpcap/pcap_findalldevs.3pcap | 30 +- contrib/libpcap/pcap_freecode.3pcap | 8 +- .../libpcap/pcap_get_required_select_timeout.3pcap | 156 +- contrib/libpcap/pcap_get_selectable_fd.3pcap | 77 +- contrib/libpcap/pcap_get_tstamp_precision.3pcap.in | 12 +- contrib/libpcap/pcap_geterr.3pcap | 6 +- contrib/libpcap/pcap_init.3pcap | 99 + contrib/libpcap/pcap_inject.3pcap | 46 +- contrib/libpcap/pcap_is_swapped.3pcap | 16 +- contrib/libpcap/pcap_lib_version.3pcap | 4 +- contrib/libpcap/pcap_list_datalinks.3pcap.in | 22 +- contrib/libpcap/pcap_list_tstamp_types.3pcap.in | 21 +- contrib/libpcap/pcap_lookupdev.3pcap | 33 +- contrib/libpcap/pcap_lookupnet.3pcap | 10 +- contrib/libpcap/pcap_loop.3pcap | 102 +- contrib/libpcap/pcap_major_version.3pcap | 10 +- contrib/libpcap/pcap_next_ex.3pcap | 65 +- contrib/libpcap/pcap_offline_filter.3pcap | 8 +- contrib/libpcap/pcap_open_dead.3pcap.in | 25 +- contrib/libpcap/pcap_open_live.3pcap | 16 +- contrib/libpcap/pcap_open_offline.3pcap.in | 31 +- contrib/libpcap/pcap_set_buffer_size.3pcap | 12 +- contrib/libpcap/pcap_set_datalink.3pcap | 21 +- contrib/libpcap/pcap_set_immediate_mode.3pcap.in | 32 +- contrib/libpcap/pcap_set_promisc.3pcap | 12 +- contrib/libpcap/pcap_set_protocol_linux.3pcap | 20 +- contrib/libpcap/pcap_set_rfmon.3pcap | 14 +- contrib/libpcap/pcap_set_snaplen.3pcap | 12 +- contrib/libpcap/pcap_set_timeout.3pcap | 13 +- contrib/libpcap/pcap_set_tstamp_precision.3pcap.in | 20 +- contrib/libpcap/pcap_set_tstamp_type.3pcap.in | 22 +- contrib/libpcap/pcap_setdirection.3pcap | 22 +- contrib/libpcap/pcap_setfilter.3pcap | 22 +- contrib/libpcap/pcap_setnonblock.3pcap | 55 +- contrib/libpcap/pcap_snapshot.3pcap | 14 +- contrib/libpcap/pcap_stats.3pcap | 23 +- contrib/libpcap/pcap_statustostr.3pcap | 4 +- contrib/libpcap/pcap_strerror.3pcap | 4 +- contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap | 7 +- contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap | 7 +- contrib/libpcap/pflog.h | 157 + contrib/libpcap/portability.h | 70 +- contrib/libpcap/rpcap-protocol.c | 6 +- contrib/libpcap/rpcap-protocol.h | 56 +- contrib/libpcap/rpcapd/CMakeLists.txt | 39 +- contrib/libpcap/rpcapd/Makefile.in | 5 +- contrib/libpcap/rpcapd/daemon.c | 803 ++- contrib/libpcap/rpcapd/daemon.h | 8 +- contrib/libpcap/rpcapd/fileconf.c | 32 +- contrib/libpcap/rpcapd/log.c | 2 +- contrib/libpcap/rpcapd/org.tcpdump.rpcapd.plist | 2 +- contrib/libpcap/rpcapd/rpcapd-config.manfile.in | 8 +- contrib/libpcap/rpcapd/rpcapd.c | 172 +- contrib/libpcap/rpcapd/rpcapd.manadmin.in | 91 +- contrib/libpcap/rpcapd/win32-svc.c | 13 +- contrib/libpcap/rpcapd/win32-svc.h | 2 +- contrib/libpcap/savefile.c | 249 +- contrib/libpcap/scanner.l | 255 +- contrib/libpcap/sf-pcap.c | 147 +- contrib/libpcap/sf-pcapng.c | 114 +- contrib/libpcap/sockutils.c | 817 ++- contrib/libpcap/sockutils.h | 31 +- contrib/libpcap/sslutils.c | 239 + contrib/libpcap/sslutils.h | 66 + contrib/libpcap/testprogs/CMakeLists.txt | 13 +- contrib/libpcap/testprogs/Makefile.in | 54 +- contrib/libpcap/testprogs/can_set_rfmon_test.c | 1 - contrib/libpcap/testprogs/capturetest.c | 89 +- contrib/libpcap/testprogs/filtertest.c | 44 +- contrib/libpcap/testprogs/findalldevstest-perf.c | 97 + contrib/libpcap/testprogs/findalldevstest.c | 29 +- contrib/libpcap/testprogs/fuzz/CMakeLists.txt | 43 + contrib/libpcap/testprogs/fuzz/fuzz_both.c | 101 + contrib/libpcap/testprogs/fuzz/fuzz_both.options | 2 + contrib/libpcap/testprogs/fuzz/fuzz_filter.c | 43 + contrib/libpcap/testprogs/fuzz/fuzz_filter.options | 2 + contrib/libpcap/testprogs/fuzz/fuzz_pcap.c | 80 + contrib/libpcap/testprogs/fuzz/fuzz_pcap.options | 2 + contrib/libpcap/testprogs/fuzz/onefile.c | 54 + contrib/libpcap/testprogs/nonblocktest.c | 187 + contrib/libpcap/testprogs/opentest.c | 19 +- contrib/libpcap/testprogs/reactivatetest.c | 1 - contrib/libpcap/testprogs/selpolltest.c | 66 +- contrib/libpcap/testprogs/threadsignaltest.c | 58 +- contrib/libpcap/testprogs/valgrindtest.c | 34 +- contrib/libpcap/testprogs/visopts.py | 317 + contrib/libpcap/testprogs/writecaptest.c | 556 ++ contrib/libpcap/tests/pcap-invalid-version-1.pcap | Bin 0 -> 530 bytes contrib/libpcap/tests/pcap-invalid-version-2.pcap | Bin 0 -> 530 bytes contrib/libpcap/tests/pcapng-invalid-vers-1.pcapng | Bin 0 -> 260 bytes contrib/libpcap/tests/pcapng-invalid-vers-2.pcapng | Bin 0 -> 260 bytes contrib/pf/pflogd/pflogd.c | 2 +- contrib/tcpdump/interface.h | 6 + lib/libpcap/Makefile | 11 +- sys/net/dlt.h | 260 +- 242 files changed, 29090 insertions(+), 15236 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 2d18851051d8..0e7060eedd52 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -2126,6 +2126,9 @@ OLD_FILES+=usr/include/c++/v1/__nullptr OLD_FILES+=usr/include/c++/v1/__string OLD_FILES+=usr/include/c++/v1/experimental/filesystem +# 20230331: libpcap updated to 1.10.3 +OLD_FILES+=usr/include/fmtutils.h + # 20230320: vcount.9 removed OLD_FILES+=usr/share/man/man9/count_dev.9.gz OLD_FILES+=usr/share/man/man9/vcount.9.gz diff --git a/contrib/libpcap/CHANGES b/contrib/libpcap/CHANGES index 89e739c46fa2..d174cd5e1a9c 100644 --- a/contrib/libpcap/CHANGES +++ b/contrib/libpcap/CHANGES @@ -1,3 +1,432 @@ +Thursday, January 12, 2023 / The Tcpdump Group + Summary for 1.10.3 libpcap release + Source code: + Sort the PUBHDR variable in Makefile.in in "ls" order. + Fix typo in comment in pflog.h. + Remove two no-longer-present files from .gitignore. + Update code and comments for handling failure to set promiscuous + mode based on new information. + Building and testing: + install: Fixed not to install the non-public pcap-util.h header. + pcap-config: add a --version flag. + Makefile.in: Add some missing files in the distclean target. + +Saturday, December 31, 2022 / The Tcpdump Group + Summary for 1.10.2 libpcap release + Source code: + Use __builtin_unreachable() in PCAP_UNREACHABLE. + Use AS_HELP_STRING macro instead of AC_HELP_STRING in the + configure scripts, to avoid deprecation warnings. + Change availability tags in pcap.h to make it easier to + arrange for it to be used in Darwin releases. + Use AS_HELP_STRING for --enable-remote. + Fix some formatting string issues found by cppcheck. + Various small code and comment cleanups. + Use PCAP_ERROR (defined as -1) rather than explicit -1 for + functions the documentation says return PCAP_ERROR. + Remove unused code from the filter compiler. + Use _declspec(deprecated(msg)) rather than __pragma(deprecated) + for Windows deprecation warnings, so the message that was + specified shows up. + diag-control.h: define PCAP_DO_PRAGMA() iff we're going to use it. + Use "%d" to print some signed ints. + Use the Wayback Machine for a removed document in a comment. + Add some const qualifiers. + RDMA: Use PRIu64 to print a uint64_t. + "Dead" pcap_ts from pcap_open_dead() and ..._with_tstamp_precision(): + Don't crash if pcap_breakloop() is called. + Savefiles: + Fix pcap_dispatch() to return number of packets processed, rather + than 0, even at EOF. + If we get an error writing the packet header, don't write the + packet data. + Put PFLOG UID and PID values in the header into host byte order + when reading a LINKTYPE_PFLOG file. + Put CAN ID field in CAN pseudo-headers for LINUX_SLL2, as we do + for LINUX_SLL. + Fix inorrectly-computed "real" length for isochronous USB + transfers when reading savefiles. + Don't crash if pcap_can_set_rfmon() is called. + Fix pcap_offline_read() loop. + Capture: + Never process more than INT_MAX packets in a pcap_dispatch() call, + to avoid integer overflow (issue #1087). + Improve error messages for "no such device" and "permission + denied" errors. + SITA: Fix a typo in a variable name. + Packet filtering: + Get PFLOG header length from the length value in the header. + Support all the direction, reason, and action types supported by + all systems that support PFLOG. + Don't require PFLOG support on the target machine in order to + support PFLOG filtering (also fixes issue #1076). + Expand abbreviations into "proto X" properly. + gencode.c: Update a comment about the VLAN TPID test. + Add the minimum and maximum matching DLTs to an error message. + Linux: + Fix memory leak in capture device open (pull request #1038). + Fix detection of CAN/CAN FD packets in direction check (issue + #1051). + Fix double-free crashes on errors such as running on a kernel with + CONFIG_PACKET_MMAP not configured (issue #1054). + Use DLT_CAN_SOCKETCAN for CANbus interfaces (issue #1052; includes + changes from pull request #1035). + Make sure the CANFD_FDF can be relied on to indicate whether a + CANbus packet is a CAN frame or a CAN FD frame + Improve error message for "out of memory" errors for kernel + filters (see issue #1089). + Fix pcap_findalldevs() to find usbmon devices. + Fix handling of VLAN tagged packets if the link-layer type is + changed from DLT_LINUX_SLL to DLT_LINUX_SLL2 (see issue #1105). + Always turn on PACKET_AUXDATA (see issue #1105). + We require 2.6.27 or later, so PACKET_RESERVE is available. + Make sure there's reserved space for a DLT_LINUX_SLL2 header + when capturing. + Correctly compute the "real" length for isochronous USB transfers. + Don't have an eventfd descriptor open in non-blocking mode, so as + not to waste descriptors. + netfilter: Squelch a narrowing warning (To be look at before 2038). + BPF capture (*BSD, macOS, AIX, Solaris 11): + Fix case where a device open might fail, rather than falling back + to a smaller buffer size, when the initial buffer size is too + big. + Use an unsigned device number to iterate over BPF devices, to + squelch a compiler warning. + NetBSD: + Fix handling of LINKTYPE_HDLC/DLT_HDLC. + rpcap: + Fix unaligned accesses in rpcapd (pull request #1037). + Fix code to process port number. + Clean up findalldevs code in rpcapd. + Clean up bufferizing code. + Fix a file descriptor/handle leak in pcap_findalldevs_ex() + (Coverity CID 1507240). + Improve error messages for host and port resolution errors. + Fix connect code not to fail if both IPv4 and IPv6 addresses are + tried. + Improve connect failure error message. + Provide an error message for a bad authentication reply size. + For link-layer types with host-endian fields in the header, fix + those fields if capturing from a server with a different byte + order. + Suppress temporarily the warnings with "enable remote packet capture". + Windows: + Add support for NdisMediumIP (pull request #1027). + Don't require applications using pcap to be built with VS 2015 or + later. + Use the correct string for the DLL VersionInfo. + Remove unnecessary DllMain() function. + Correctly handle ERROR_INVALID_FUNCTION from + PacketGetTimestampModes() (indicate that WinPcap or an older + version of Npcap is probably installed). + Fix use-after-free in some cases when a pcap_t is closed. + Make sure an error is returned by pcap_create_interface() if + PacketOpenAdapter() fails. + Return an error if the driver reports 0 timestamp modes supported. + Close the ADAPTER handle for some errors in + pcap_create_interface(). + Get rid of old umaintained VS project files. + Fix deprecation warning for pcap_handle(). + Npcap is now at npcap.com, not npcap.org. + Make sure "no such device" and "no permission to open device" + errors show up in pcap_activate(), not pcap_create() (fixes, + among other things, tcpdump -i ). + npcap: squelch deprecation warnings for kernel dump mode. + Haiku: + Implement pcap_lib_version(), as now required. + Handle negative or too-large snaplen values. + Fix various build issues and warnings. + Building and testing: + Update configure-time universal build checks for macOS. + Update config.guess and config.sub. + If we look for an SSL library with pkg-config in configure script, + try pkg-config first. + If we have pkg-config and Homebrew, try to set pkg-config up to + find Homebrew packages. + Handle some Autoconf/make errors better. + Use "git archive" for the "make releasetar" process. + Remove the release candidate rcX targets. + Fix compiling on Solaris 9/SPARC and 11/AMD64. + Address assorted compiler warnings. + Fix cross-building on Linux for Windows with mingw32 for Win64 + (pull request #1031). + Properly set installation directory on Windows when not compiling + with MSVC. + Fix configure script checks for compiler flags. + Give more details if check for usable (F)Lex fails. + Fix compiling with GCC 4.6.4. + Don't use add_compile_options() with CMake, as we currently don't + require 2.8.12, where it first appeared. + Don't provide -L/usr/lib for pkg-config --libs in pkg-config. + Fix error message for inadequate Bison/Berkeley YACC. + configure: correctly do some DPDK checks. + Only use pkg-config when checking for DPDK. + Allow the path in which DPDK is installed to be specified. + Use pkg-config first when checking for libibverbs. + CMake: fix check for libibverbs with Sun's C compiler. + Have CMake warn if no capture mechanism can be found. + Don't do stuff requiring 3.19 or later on earlier CMakes. + Squelch some CMake warnings. + Fix diag-control.h to handle compiling with clang-cl (issues + #1101 and #1115). + Cleanup various leftover cruft in the configure script. + Fix building without protochain support. (GH #852) + Check for a usable YACC (or Bison) and {F}lex in CMake, as we do + in autotools. + Only check for a C++ compiler on Haiku, as that's the only + platform with C++ code, and make sure they generate code for + the same instruction set bit-width (both 32-bit or both 64-bit) + (issue #1112). + On Solaris, check the target bit-width and set PKG_CONFIG_PATH + appropriately, to handle the mess that is the D-Bus library + package (issue #1112). + Fix generation of pcap-config and libpcap.pc files (issue #1062). + pcap-config: don't assume the system library directory is /usr/lib. + pcap-config: add a --static-pcap-only flag. + Cirrus CI: Use the same configuration as for the main branch. + Add four libpcap test files. + Update Npcap SDK to 1.13. + Makefile.in: Use TEST_DIST, like for tcpdump. + Remove awk code from mkdep. + Cirrus CI: Add the libssl-dev package in the Linux task. + Cirrus CI: Add the openssl@3 brew package in the macOS task. + Get "make shellcheck" to pass again. + CMake: Build valgrindtest only if Autoconf would. + CMake: use ${CMAKE_INSTALL_SBINDIR} rather than just sbin. + CMake: use NUL: as the null device on Windows. + autoconf: fix typo in test of macOS version. + Makefile.in: Add two missing files in EXTRA_DIST. + autotools, cmake: provide an rpath option if necessary. + configure: get rid of the attempt to auto-run PKG_PROG_PKG_CONFIG. + configure: use PKG_CHECK_MODULES to run pkg-config. + Documentation: + Add README.solaris.md. + Add SCTP to pcap-filter(7). + Note that = and == are the same operator in filters (issue #1044). + Update INSTALL.md, README.md, and README.solaris.md. + Update and clean up CONTRIBUTING.md. + Trim documentation of support for now-dead UN*Xe and older + versions of other UN*Xes. + Move the "how to allocate a LINKTYPE_/DLT_ value" documentation to + the web site. + Clean up man pages. + Move README.capture-module to the web site. + Improve some protocol details in pcap-filter(7). + Refine "relop" notes in pcap-filter(7). + In pcap-filter(7) "domain" is an id. + Discuss backward compatibility in pcap-filter(7). + Other improvements to pcap-filter(7). + Document pcap_breakloop(3PCAP) interaction with threads better. + Document PCAP_ERROR_NOT_ACTIVATED for more routines. + +Wednesday, June 9, 2021: + Summary for 1.10.1 libpcap release: + Packet filtering: + Fix "type XXX subtype YYY" giving a parse error + Source code: + Add PCAP_AVAILABLE_1_11. + Building and testing: + Rename struct bpf_aux_data to avoid NetBSD compile errors + Squelch some compiler warnings + Squelch some Bison warnings + Fix cross-builds with older kernels lacking BPF_MOD and BPF_XOR + Fix Bison detection for minor version 0. + Fix parallel build with FreeBSD make. + Get DLT_MATCHING_MAX right in gencode.c on NetBSD. + Define timeradd() and timersub() if necessary. + Fix Cygwin/MSYS target directories. + Fix symlinking with DESTDIR. + Fix generation of libpcap.pc with CMake when not building a shared + library. + Check for Arm64 as well as x86-64 when looking for packet.lib on + Windows. + Documentation: + Refine Markdown in README.md. + Improve the description of portrange in filters. + README.linux.md isn't Markdown, rename it just README.linux. + pcapng: + Support reading version 1.2, which some writers produce, and which + is the same as 1.0 (some new block types were added, but + that's not sufficient reason to bump the minor version number, + as code that understands those new block types can handle them + in a 1.0 file) + Linux: + Drop support for text-mode USB captures, as we require a 2.6.27 + or later kernel (credit to Chaoyuan Peng for noting the + sscanf vulnerabilities in the text-mode code that got me to + realize that we didn't need this code any more) + Bluetooth: fix non-blocking mode. + Don't assume that all compilers used to build for Linux support + the __atomic builtins + Windows: + Add more information in "interface disappeared" error messages, in + the hopes of trying to figure out the cause. + Treat ERROR_DEVICE_REMOVED as "device was removed". + Indicate in the error message which "device was removed" error + occurred. + Report the Windows error status if PacketSendPacket() fails. + Use %lu for ULONGs in error message formats. + Don't treat the inability to find airpcap.dll as an error. + Ignore spurious error reports by Microsoft Surface mobile + telephony modem driver + rpcap: + Clean up error checking and error messages for server address + lookup. + +Tuesday, December 29, 2020 + Summary for 1.10.0 libpcap release + Add support for capturing on DPDK devices + Label most APIs by the first release in which they're available + Fix some memory leaks, including in pcap_compile() + Add pcap_datalink_val_to_description_or_dlt() + Handle the pcap private data in a fashion that makes fewer + assumptions about memory layouts (might fix GitHub issue #940 + on ARM) + Fix some thread safety issues + pcap_findalldevs(): don't sort interfaces by unit number + Always return a list of supported time-stamp types, even if only + host time stamps are supported + Increase the maximum snaplen for LINKTYPE_USBPCAP/DLT_USBPCAP + Report the DLT description in error messages + Add pcap_init() for first-time initialization and global option + setting; it's not required, but may be used + Remove (unused) SITA support + Capture file reading: + Correctly handle pcapng captures with more than one IDB with a + snspshot length greater than the supported maximum + Capture file writing: + Create the file in pcap_dump_open_append() if it doesn't exist + Packet filtering: + Fix "unknown ether proto 'aarp'" + Add a new filter "ifindex" for DLT_LINUX_SLL2 files on all + platforms and live Linux captures + Add a hack to the optimizer to try to catch certain optimizer + loops (should prevent GitHub issue #112) + Show special Linux BPF offsets symbolically in bpf_image() and + bpf_dump() + Added support for ICMPv6 types 1-4 as tokens with names + Remove undocumented and rather old "ether proto" protocols + Catch invalid IPv4 addresses in filters + Don't assume ARM supports unaligned accesses + Security and other issues found by analysis: + Fix various security issues reported by Charles Smith at Tangible + Security + Fix various security issues reported by Include Security + Fix some issues found by cppcheck. + Add some overflow checks in the optimizer + rpcap: + Support rpcap-over-TLS + Redo protocol version negotiation to avoid problems with old + servers (it still works with servers using the old negotiation, + as well as servers not supporting negotiation) + Error handling cleanups + Add some new authentication libpcap error codes for specific + errors + Fix some inetd issues in rpcapd + Fix rpcapd core dumps with invalid configuration file + On UN*X, don't have rpcapd tell the client why authentication + failed, so a brute-force attacker can't distinguish between + "unknown user name" and "known user name, wrong password" + Allow rpcapd to rebind more rapidly (GitHub issue #765) + Documentation: + Improve man pages, including adding backward compatibility notes + Building and testing: + Require, and assume, some level of C99 support in the C compiler + Require Visual Studio 2015 or later if using Visual Studio + Fix configure script issues, including with libnl on Linux + Fix CMake issues + Squelch complaints from Bison about "%define api.pure" being + deprecated + Fix compilation of pcap-tc.c + Linux: + Require PF_PACKET support, and kernel 2.6.27 or later + Handle systems without AF_INET or AF_UNIX socket support + Get rid of Wireless Extensions for turning monitor mode on + Proper memory sync for PACKET_MMAP (may prevent GitHub issue + #898) + Drop support for libnl 1 and 2. + Return error on interface going away, but not if it just went + down but is still present + Set socket protocol only after packet ring configured, + reducing bogus packet drop reports + Get ifdrop stats from sysfs. + When adjusting BPF programs, do not subtract the + SLL[2]_HDR_LEN if the location is negative (special metadata + offset), to preserve references to metadata; see + https://github.com/the-tcpdump-group/tcpdump/issues/480#issuecomment-486827278 + Report a warning for unknown ARPHRD types + Have pcap_breakloop() forcibly break out of a sleeping + capture loop + Add support for DSA data link types + For raw USB bus capture, use the snapshot length to set the + buffer size, and set the len field to reflect the length + in the URB (GitHub issue #808) + With a timeout of zero, wait indefinitely + Clean up support for some non-GNU libc C libraries + Add DLT_LINUX_SLL2 for cooked-mode captures + Probe CONFIGURATION descriptor of connected USB devices + Treat EPERM on ethtool ioctls as meaning "not supported", as + permissions checks are done before checking whether the + ioctl is supported at all + macOS: + Cope with getting EPWROFF from SIOCGIFMEDIA + Treat EPERM on SIOCGIFMEDIA as meaning "not supported", as + permissions checks are done before checking whether the + ioctl is supported at all + Treat ENXIO when reading packets as meaning "the interface + was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + FreeBSD: + Treat ENXIO as meaning "the interface was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + NetBSD: + Treat ENXIO as meaning "the interface was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + OpenBSD: + Treat EIO as meaning "the interface was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + DragonFly BSD: + Treat ENXIO as meaning "the interface was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + Solaris: + Treat ENXIO as meaning "the interface was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + AIX: + Fix loading of BPF kernel extension + Treat ENXIO as meaning "the interface was removed" + Report "the interface disappeared", not "the interface went + down", if the interface was removed during a capture + Windows: + Make the snapshot length work even if pcap_setfilter() + isn't called + Fix compilation on Cygwin/MSYS + Add pcap_handle(), and deprecate pcap_fileno() + Report PCAP_ERROR_NO_SUCH_DEVICE for a non-existent device + Return an appropriate error message for device removed or + device unusable due to a suspend/resume + Report a warning for unknown NdisMedium types + Have pcap_breakloop() forcibly break out of a sleeping + capture loop + Clean up building DLL + Handle CRT mismatch for pcap_dump_fopen() + Map NdisMediumWirelessWan to DLT_RAW + Add AirPcap support in a module, rather than using + WinPcap/Npcap's support for it + Report the system error for PacketSetHwFilter() failures + Add support for getting and setting packet time stamp types + with Npcap + Have pcap_init() allow selecting whether the API should use + local code page strings or UTF-8 strings (including error + messages) + Haiku: + Add capture support + Sunday, July 22, 2018 Summary for 1.9.1 libpcap release Mention pcap_get_required_select_timeout() in the main pcap man page @@ -26,7 +455,7 @@ Sunday, July 22, 2018 need to be Fix reading of capture statistics for Linux USB Fix packet size values for Linux USB packets (GitHub issue #808) - Check only VID in VLAN test in filterss (GitHub issue #461) + Check only VID in VLAN test in filters (GitHub issue #461) Fix pcap_list_datalinks on 802.11 devices on macOS Fix overflows with very large snapshot length in pcap file Improve parsing of rpcapd configuration file (GitHub issue #767) @@ -67,7 +496,6 @@ Sunday, July 22, 2018 Boost the TPACKET_V3 timeout to the maximum if a timeout of 0 was specified Five CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165 - Fixes for CVE-2018-16301, errors in pcapng reading. PCAPNG reader applies some sanity checks before doing malloc(). Sunday, June 24, 2018, by mcr@sandelman.ca @@ -75,7 +503,7 @@ Sunday, June 24, 2018, by mcr@sandelman.ca Added testing system to libpcap, independent of tcpdump Changes to how pcap_t is activated Adding support for Large stream buffers on Endace DAG cards - Changes to BSD 3-clause license to 2-clause licence + Changes to BSD 3-clause license to 2-clause license Additions to TCP header parsing, per RFC3168 Add CMake build process (extensive number of changes) Assign a value for OpenBSD DLT_OPENFLOW. @@ -93,7 +521,7 @@ Sunday, June 24, 2018, by mcr@sandelman.ca Make VLAN filter handle both metadata and inline tags D-Bus captures can now be up to 128MB in size Added LORATAP DLT value - Added DLT_VSOCK for http://qemu-project.org/Features/VirtioVsock + Added DLT_VSOCK for https://qemu-project.org/Features/VirtioVsock probe_devices() fixes not to overrun buffer for name of device Add linux-specific pcap_set_protocol_linux() to allow specifying a specific capture protocol. RDMA sniffing support for pcap @@ -275,7 +703,7 @@ Summary for 1.5.0 libpcap release than the mcr repository Checks added for malloc()/realloc()/etc. failures Fixed build on Solaris 11 - Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A + Support filtering E1 SS7 traffic on MTP2 layer Annex A Use "ln -s" to link man pages by default Add support for getting nanosecond-resolution time stamps when capturing and reading capture files @@ -336,7 +764,7 @@ Summary for 1.3.0 libpcap release Friday December 9, 2011. guy@alum.mit.edu. Summary for 1.2.1 libpcap release Update README file. - Fix typoes in README.linux file. + Fix typos in README.linux file. Clean up some compiler warnings. Fix Linux compile problems and tests for ethtool.h. Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU @@ -369,7 +797,7 @@ Summary for 1.2 libpcap release Noted real nature of LINKTYPE_ARCNET. Add a link-layer type for DVB-CI. Fix configure-script discovery of VLAN acceleration support. - see http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html + see https://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html Linux, HP-UX, AIX, NetBSD and OpenBSD compilation/conflict fixes. Protect against including AIX 5.x's having been included. Add DLT_DBUS, for raw D-Bus messages. @@ -568,7 +996,7 @@ Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release beginning+link-layer Add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay Fix allocation of buffer for list of link-layer types - Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communcation Messages + Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communication Messages Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the right value for CAN). Added definition for DLT_A429 and LINKTYPE_A429 as #184. @@ -682,7 +1110,7 @@ Tuesday January 9, 2001. guy@alum.mit.edu. Summary for 0.6 release Header files fixed to allow use in C++ programs. - Removed dependancy on native headers for packet layout. + Removed dependency on native headers for packet layout. Removed Linux specific headers that were shipped. Security fixes: Strcpy replaced with strlcpy, sprintf replaced @@ -820,7 +1248,7 @@ v0.3 Sat Nov 30 20:56:27 PST 1996 v0.2.1 Sun Jul 14 03:02:26 PDT 1996 -- Fixes for HP-UX 10. Thanks in part to to Thomas Wolfram +- Fixes for HP-UX 10. Thanks in part to Thomas Wolfram (wolf@prz.tu-berlin.de) and Rick Jones (raj@hpisrdq.cup.hp.com) - Added support for SINIX. Thanks to Andrej Borsenkow diff --git a/contrib/libpcap/CMakeLists.txt b/contrib/libpcap/CMakeLists.txt index 55b93f14d74c..58c5159905d0 100644 --- a/contrib/libpcap/CMakeLists.txt +++ b/contrib/libpcap/CMakeLists.txt @@ -1,4 +1,11 @@ -cmake_minimum_required(VERSION 2.8.6) +if(WIN32) + # + # We need 3.12 or later, so that we can set policy CMP0074; see + # below. + cmake_minimum_required(VERSION 3.12) +else(WIN32) + cmake_minimum_required(VERSION 2.8.6) +endif(WIN32) # # Apple doesn't build with an install_name starting with @rpath, and @@ -9,44 +16,308 @@ if(POLICY CMP0042) cmake_policy(SET CMP0042 OLD) endif() +# +# Squelch noise about quoted strings in if() statements. +# WE KNOW WHAT WE'RE DOING, WE'RE DOING EVERYTHING THE WAY THAT NEWER +# VERSIONS OF CMAKE EXPECT BY DEFAULT, DON'T WASTE OUR TIME WITH NOISE. +# +if(POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif() + +# +# We want find_file() and find_library() to honor {packagename}_ROOT, +# as that appears to be the only way, with the Visual Studio 2019 IDE +# and its CMake support, to tell CMake where to look for the Npcap +# or WinPcap SDK. +# +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +# +# We want check_include_file() to honor CMAKE_REQUIRED_LIBRARIES; see +# the big comment before the check_include_file() test for +# infiniband/verbs.h for the reason. +# +if(POLICY CMP0075) + cmake_policy(SET CMP0075 NEW) +endif() + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) -project(pcap) +# +# We only need a C++ compiler for Haiku; all code except for its +# pcap module is in C. +# +# We do that by specifying just C in the project() call and, after +# that finishes, checking for Haiku and, if we're building for +# Haiku, use enable_language() to check for C++. This means that +# we don't require a C++ compiler on platforms other than Haiku. +# +# CMAKE_SYSTEM_NAME is set by project(), so we can't do this by +# testing CMAKE_SYSTEM_NAME and then passing different language +# lists to project() based on the system. +# +project(pcap C) # -# Try to enable as many C99 features as we can. -# At minimum, we want C++/C99-style // comments. +# For getting raw lists of --libs and --libs --static information from a +# pkg-config module. # -# Newer versions of compilers might default to supporting C99, but older -# versions may require a special flag. +# In CMake up to 2.8.12, pkg_check_modules() sets: # -# Prior to CMake 3.1, setting CMAKE_C_STANDARD will not have any effect, -# so, unless and until we require CMake 3.1 or later, we have to do it -# ourselves on pre-3.1 CMake, so we just do it ourselves on all versions -# of CMake. +# _LIBRARIES, which is a list of library names to which, on +# a UN*X, -l can be prefixed - i.e., names, without extensions, +# rather than full paths to the file. +# _LIBRARY_DIRS, which is a list of paths to directories +# containing the libraries, to which, on a UN*X, -L can be +# prefixed. +# _LDFLAGS, which is a list of *all* required linker flags +# _LDFLAGS_OTHER, which is a list of all linker flags other +# than -l and -L flags # -# Note: with CMake 3.1 through 3.5, the only compilers for which CMake -# handles CMAKE_C_STANDARD are GCC and Clang. 3.6 adds support only -# for Intel C; 3.9 adds support for PGI C, Sun C, and IBM XL C, and -# 3.10 adds support for Cray C and IAR C, but no version of CMake has -# support for HP C. Therefore, even if we use CMAKE_C_STANDARD with -# compilers for which CMake supports it, we may still have to do it -# ourselves on other compilers. +# In 3.0 (at least as of 3.0.2), it also sets: # -# See the CMake documentation for the CMAKE__COMPILER_ID variables -# for a list of compiler IDs. +# _LINK_LIBRARIES, which is a list of full paths to the +# library files. # -# We don't worry about MSVC; it doesn't have such a flag - either it -# doesn't support the C99 features we need at all, or it supports them -# regardless of the compiler flag. +# but if is _STATIC, _LINK_LIBRARIES is +# currently not set by CMake. # -# XXX - this just tests whether the option works and adds it if it does. -# We don't test whether it's necessary in order to get the C99 features -# that we use; if we ever have a user who tries to compile with a compiler -# that can't be made to support those features, we can add a test to make -# sure we actually *have* C99 support. +# Unfortunately, pkg_check_modules() sets the +# PKG_CONFIG_ALLOW_SYSTEM_LIBS environment variable when running +# pkg-config, so the output of --libs, etc. may include a -L for the +# system library, which we do *NOT* want to put in our libpcap.pc and +# pcap-config files. # +# So we just run pkg-config ourselves, so that we get its output +# directly without any processing by CMake. +# +macro(pkg_get_link_info _prefix _package) + if (PKG_CONFIG_EXECUTABLE) + # + # Get the --libs information. + # + # We force PKG_CONFIG_ALLOW_SYSTEM_LIBS to be undefined, as + # at least some versions of CMake appear to define it in + # pkg_check_modules() before running pkg-config and *not* undefine + # it after running it. + # + unset(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS}) + set(_pkg_config_result "") + execute_process( + COMMAND ${PKG_CONFIG_EXECUTABLE} "--libs" ${_package} + OUTPUT_VARIABLE _pkg_config_result + RESULT_VARIABLE _pkg_config_failed + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if (_pkg_config_failed) + # + # pkg-config failed; assume that means that there is no such + # package for it to find. XXX - what do we do here? + # + set(${_prefix}_FOUND_WITH_PKG_CONFIG FALSE) + else() + # + # pkg-config succeeded; replace CR and LF with spaces. + # + string(REGEX REPLACE "[\r\n]" " " ${_prefix}_LIBS "${_pkg_config_result}") + + # + # Now get the --libs --static information. + # + set(_pkg_config_result "") + execute_process( + COMMAND ${PKG_CONFIG_EXECUTABLE} "--libs" "--static" ${_package} + OUTPUT_VARIABLE _pkg_config_result + RESULT_VARIABLE _pkg_config_failed + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if (_pkg_config_failed) + # + # pkg-config failed; assume that means that there is no such + # package for it to find. XXX - what do we do here? + # + set(${_prefix}_FOUND_WITH_PKG_CONFIG FALSE) + else() + # + # pkg-config succeeded; replace CR and LF with spaces. *** 67527 LINES SKIPPED *** From nobody Wed Jan 29 19:33:28 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 4YjslF3p3Nz5lrPf; Wed, 29 Jan 2025 19:33:29 +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 4YjslF0Tjtz3Qsm; Wed, 29 Jan 2025 19:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179209; 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=0rJTfiKJHF351GBY5aHte8Oz/gswHpiqc+wyfw6Qnd0=; b=To7b055ZJ43NoLFHDVpiwi6VTScheSlGk4rY/BOeF/tNa1PNvMY31uFkqjV72UPOZgc3UK 4136EDpgaZGMtn9jXgR600AUQvq9zbl6inMytXVwnx3H3VcUUcJMwKNkBDABl1v+S+j1rX D+40ZYYe139JqhRnnddoyhHKPHco33AMcVXOcYiBXoBXK0gJqz7C69tyhVhAkJlu6GkPAS Y12UTxa3dnzv0lBQySaL1X8c6WyX632zD17qo44oe9bAWzL3Km0Dnj/Qx6ULQaTISiEIVx l+NUl1v+YhN4wUZYdIvsurGifHpXNRV9MkFOYQrlkTNiGvEPVPtj9Nc9ooOTig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179209; 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=0rJTfiKJHF351GBY5aHte8Oz/gswHpiqc+wyfw6Qnd0=; b=NFWP7FBmeoE2SMgTJy0JyLGWzQ3by9xznHrFHLjCc39YN3OnMuMg/4aTOhd/oduXVL7PAu cxtN+/9y5GoXNOjtxAE3wtUX1r5ley3rw368iIeC2aYzcGZAL5dncLZssI6xTqq0OivRuQ 9Jj4B5ESBRoTxglOvcgfsNUG7exwRWKqJ2f4OaFTAMI5goUKZkn9hyGu8fcJ5CqEM4B2im OIJI72Ezu5+RLzYaaokq4epmZQupVQtDcAFCeZElAhDCEmpy+rqUyfbGlPOArme0LNkceJ 7Tn9WZTbwNnvqhD/Jukut5SD0pSUWALu29uDqkLciTl+JsfIZdN28Tq6e6HkFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179209; a=rsa-sha256; cv=none; b=uTtudi1le3yaWUOUDZ+zw/NCMAhYb4dkURjs0gFEHqnnAaHCSeVwQ/xOPMDgFuE1aG6I/S pkwG2z+avhgLT7rgpKcUlsI30FCH/k5nGZwLnCOxaQp0nuX9VUy4OMRXHIBl4FhqxPRhYp HOqLhhrcaoxPXf6unduM35G8tfAcUwenot3yDtoexEHiS/dbup3x52+colZ/tlVFTu1Gq2 5n+tuD8qem3RWGCx7Uw6ns0hhNlRWgNH0e4ZrljZDdEuz/xeL25h781B5ZDcB+nuD1jw8V JBDt7q/krXw914TEgBda5Nss1pgwiN/obWihmumyQJQaxzLnZbqKbReGKyw0lA== 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 4YjslF03fHz16m; Wed, 29 Jan 2025 19:33:29 +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 50TJXSB8039670; Wed, 29 Jan 2025 19:33:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXSIY039667; Wed, 29 Jan 2025 19:33:28 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:28 GMT Message-Id: <202501291933.50TJXSIY039667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: f904cde2ea10 - stable/13 - tcpdump: add missing pf reasons and actions 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f904cde2ea104ca5b0a0af880a9094793fd8f4ef Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=f904cde2ea104ca5b0a0af880a9094793fd8f4ef commit f904cde2ea104ca5b0a0af880a9094793fd8f4ef Author: Kajetan Staszkiewicz AuthorDate: 2023-04-18 07:33:33 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:28 +0000 tcpdump: add missing pf reasons and actions Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D39586 (cherry picked from commit 56cd7716b63d84190e6308d50717ec8bbbdfe1c0) --- contrib/tcpdump/print-pflog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/tcpdump/print-pflog.c b/contrib/tcpdump/print-pflog.c index 49994507e728..31f25ded6915 100644 --- a/contrib/tcpdump/print-pflog.c +++ b/contrib/tcpdump/print-pflog.c @@ -57,6 +57,7 @@ static const struct tok pf_reasons[] = { { 12, "12(state-limit)" }, { 13, "13(src-limit)" }, { 14, "14(synproxy)" }, + { 15, "15(map-failed)" }, { 0, NULL } }; @@ -64,6 +65,7 @@ static const struct tok pf_actions[] = { { PF_PASS, "pass" }, { PF_DROP, "block" }, { PF_SCRUB, "scrub" }, + { PF_NOSCRUB, "scrub" }, { PF_NAT, "nat" }, { PF_NONAT, "nat" }, { PF_BINAT, "binat" }, @@ -71,6 +73,8 @@ static const struct tok pf_actions[] = { { PF_RDR, "rdr" }, { PF_NORDR, "rdr" }, { PF_SYNPROXY_DROP, "synproxy-drop" }, + { PF_DEFER, "pfsync-defer" }, + { PF_MATCH, "match" }, { 0, NULL } }; From nobody Wed Jan 29 19:33:30 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 4YjslG3gW8z5lrMP; Wed, 29 Jan 2025 19:33:30 +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 4YjslG1Q7Xz3R3S; Wed, 29 Jan 2025 19:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179210; 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=PPEgZ5LD+QCROYzmUBO8mkChsQmIIX8oADENmnlPd7Q=; b=QAlLcvdw0Oqgj1QZLbLHxFEbLlNsy/VdyN6FXg8YlTECvGo5v0/SOw/2yQZM4GmCOsv+c+ +670pnlhRbyvrkS+D/ANMAZ7EZ7ffWYqwHVT6kRH/mH7/HXqwSmoRFZpayAtrlieAHjBo8 wWW/titZ59mKkc7qF4KRLQC1tnhEBPxsgq4o6BcTuVRTNlJmPbIJif+Mu7a2v+ZTuN4c9L tEWzF3UMLRUrhKhuf2KNpI0G3lkfgJzK2i4vLzYX5aXGamK1SFK0xWGBbuAF0eD/ywRQSc nvsazXEgwKlWl7CzVUezveHaN3Fbwbj5wRW4ZovfqqWMvOdy4f5TGIzd2RpSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179210; 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=PPEgZ5LD+QCROYzmUBO8mkChsQmIIX8oADENmnlPd7Q=; b=FJRksBpcHAFREGqE1pjk+6AO819nRGzagEJqO7gaSuZkY6KPY+Fgui5kUxxi6PI98AiYoZ 5f57510s1uyZF7MbGJiVBfChIYTS2fBsp8/k5w+wH7F3W/5FwG6Ri0XPGtVuCK/QgHTE+K jXCizLwzMsjrGduwTSmtC723YEVgXuPyRYCjnBMyE1FzFp/mTMeUVEkzffFiL9PzPWkBhm n9gt2soPbBOqLF5+Ak6PXLtJtgxqEOrvFLyK8XODqz1ILC4afKW7byVekhvu1l41oGya6W 5uWnrOs5WhZnMXzYDNKLeBnp7O85TosWBjowZwxKRNwfN5NO/RO5FD+6ym991w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179210; a=rsa-sha256; cv=none; b=ngV1tIEf6mY/bfJGAV6EFu6d7hlM63STN7hJbS7rm2uqeQtH3iYwBw/m26QfLniF0me7Y1 sZtSdug7nPGIL2VPzN7QG/n5+J3AuBDxvo3Jt4StQh/6hEwPoby/t0QVzLKTmpdmeeNuXo FMJVAK0oKmVsfYdwltxSjQUP2XbKcLVoNnfuEFlb1uQqHnlZmaekrBMWl7kNIh8Fiv7rjK i6RadyRy3vz4gUyHjj8etFJAXnoOcMkLyjvLauXBueP+StdE5RIGT7AZF79CaSfRxU3ocJ D7SZqaW4VdkSCxd7dgEG/J2bEmjh/ieh9p7vqMOvheAwzI+dzL8QuivWLBZHxQ== 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 4YjslG0y5tzpv; Wed, 29 Jan 2025 19:33:30 +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 50TJXUk1039703; Wed, 29 Jan 2025 19:33:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXUK1039700; Wed, 29 Jan 2025 19:33:30 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:30 GMT Message-Id: <202501291933.50TJXUK1039700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: e6efc827e47a - stable/13 - libpcap: Update to 1.10.4 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6efc827e47a5b3ddbaedc4aa9783ffeb986abc9 Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=e6efc827e47a5b3ddbaedc4aa9783ffeb986abc9 commit e6efc827e47a5b3ddbaedc4aa9783ffeb986abc9 Author: Joseph Mingrone AuthorDate: 2023-05-05 13:56:10 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:28 +0000 libpcap: Update to 1.10.4 Sponsored by: The FreeBSD Foundation (cherry picked from commit dd744a896be358d6f001766188da6aed80e00378) (cherry picked from commit 270d20ce91c898c532ebaff76bb5b71c8544e928) (cherry picked from commit 67c802c948abf6955c3d8b53f4a41293a9caea24) (cherry picked from commit b1538e8fc488409113b833dd1c53aab1057b0568) --- contrib/libpcap/CHANGES | 38 ++++++++++----- contrib/libpcap/Makefile.in | 4 +- contrib/libpcap/README.md | 2 +- contrib/libpcap/VERSION | 2 +- contrib/libpcap/aclocal.m4 | 13 +++-- contrib/libpcap/config.guess | 12 +++-- contrib/libpcap/config.sub | 33 +++++++++---- contrib/libpcap/configure | 64 ++++++++++++------------- contrib/libpcap/configure.ac | 26 +++++----- contrib/libpcap/gencode.c | 16 +++---- contrib/libpcap/mkdep | 2 +- contrib/libpcap/msdos/makefile | 8 ++-- contrib/libpcap/nametoaddr.c | 40 ++++++++-------- contrib/libpcap/optimize.c | 16 +++---- contrib/libpcap/pcap-bt-linux.c | 6 +-- contrib/libpcap/pcap-common.c | 4 +- contrib/libpcap/pcap-libdlpi.c | 2 +- contrib/libpcap/pcap-linux.c | 8 ++-- contrib/libpcap/pcap-netfilter-linux.c | 4 +- contrib/libpcap/pcap-npf.c | 6 +-- contrib/libpcap/pcap-sita.c | 2 +- contrib/libpcap/pcap-sita.html | 22 ++++----- contrib/libpcap/pcap-snf.c | 20 ++++---- contrib/libpcap/pcap-usb-linux.c | 14 +++--- contrib/libpcap/pcap/bpf.h | 6 +-- contrib/libpcap/pcap/dlt.h | 4 +- contrib/libpcap/pcap/pcap.h | 4 +- contrib/libpcap/rpcapd/Makefile.in | 2 +- contrib/libpcap/rpcapd/org.tcpdump.rpcapd.plist | 2 +- contrib/libpcap/rpcapd/rpcapd.manadmin.in | 42 +++++++++++++++- contrib/libpcap/sockutils.c | 2 +- contrib/libpcap/testprogs/Makefile.in | 2 +- lib/libpcap/Makefile.depend | 1 - lib/libpcap/Makefile.depend.options | 2 +- lib/libpcap/config.h | 4 +- 35 files changed, 255 insertions(+), 180 deletions(-) diff --git a/contrib/libpcap/CHANGES b/contrib/libpcap/CHANGES index d174cd5e1a9c..c574a278064f 100644 --- a/contrib/libpcap/CHANGES +++ b/contrib/libpcap/CHANGES @@ -1,3 +1,17 @@ +Friday, April 7, 2023 / The Tcpdump Group + Summary for 1.10.4 libpcap release + Source code: + Fix spaces before tabs in indentation. + rpcap: + Fix name of launchd service. + Documentation: + Document use of rpcapd with systemd, launchd, inetd, and xinetd. + Building and testing: + Require at least pkg-config 0.17.0, as we use --static. + Get rid of the remains of gnuc.h. + Require at least autoconf 2.69. + Update config.{guess,sub}, timestamps 2023-01-01,2023-01-21. + Thursday, January 12, 2023 / The Tcpdump Group Summary for 1.10.3 libpcap release Source code: @@ -1010,7 +1024,7 @@ Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release Add support to build libpcap.lib and wpcap.dll under Cygnus and MingW32. -Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release +Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release Support for radiotap on Linux (Mike Kershaw) Fixes for HP-UX @@ -1021,7 +1035,7 @@ Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release parts of the filter expression to look at the PPP headers and headers in the PPP payload -Tue. July 5, 2005. ken@xelerance.com. Summary for 0.9.3 libpcap release +Tue. July 5, 2005. ken@xelerance.com. Summary for 0.9.3 libpcap release Fixes for compiling on nearly every platform, including improved 64bit support @@ -1060,16 +1074,16 @@ Wed. November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 0.8 release Tuesday, February 25, 2003. fenner@research.att.com. 0.7.2 release - Support link types that use 802.2 always, never, and sometimes. - Don't decrease the size of the BPF buffer from the default. - Support frame relay. - Handle 32-bit timestamps in DLPI, and pass the right buffer size. - Handle Linux systems with modern kernel but without - SOL_PACKET in the userland headers. - Linux support for ARPHRD_RAWHDLC. - Handle 32-bit timestamps in snoop. - Support eg (Octane/O2xxx/O3xxx Gigabit) devices. - Add new reserved DLT types. + Support link types that use 802.2 always, never, and sometimes. + Don't decrease the size of the BPF buffer from the default. + Support frame relay. + Handle 32-bit timestamps in DLPI, and pass the right buffer size. + Handle Linux systems with modern kernel but without + SOL_PACKET in the userland headers. + Linux support for ARPHRD_RAWHDLC. + Handle 32-bit timestamps in snoop. + Support eg (Octane/O2xxx/O3xxx Gigabit) devices. + Add new reserved DLT types. Monday October 23, 2001. mcr@sandelman.ottawa.on.ca. Summary for 0.7 release diff --git a/contrib/libpcap/Makefile.in b/contrib/libpcap/Makefile.in index 54246586828d..3468e204c756 100644 --- a/contrib/libpcap/Makefile.in +++ b/contrib/libpcap/Makefile.in @@ -1,5 +1,5 @@ # Copyright (c) 1993, 1994, 1995, 1996 -# The Regents of the University of California. All rights reserved. +# The Regents of the University of California. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that: (1) source code distributions @@ -810,7 +810,7 @@ clean: distclean: clean rm -f Makefile grammar.y config.cache config.log config.status \ config.h config.h.in~ configure~ configure.ac~ \ - gnuc.h net os-proto.h libpcap.pc pcap-config stamp-h stamp-h.in + net os-proto.h libpcap.pc pcap-config stamp-h stamp-h.in rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=) rm -rf autom4te.cache (cd rpcapd; $(MAKE) distclean) diff --git a/contrib/libpcap/README.md b/contrib/libpcap/README.md index 46c33c24125e..e38b9a15d6b3 100644 --- a/contrib/libpcap/README.md +++ b/contrib/libpcap/README.md @@ -24,7 +24,7 @@ to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application. ```text -formerly from Lawrence Berkeley National Laboratory +formerly from Lawrence Berkeley National Laboratory Network Research Group ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z ``` diff --git a/contrib/libpcap/VERSION b/contrib/libpcap/VERSION index 587c5f0c7309..18b311420650 100644 --- a/contrib/libpcap/VERSION +++ b/contrib/libpcap/VERSION @@ -1 +1 @@ -1.10.3 +1.10.4 diff --git a/contrib/libpcap/aclocal.m4 b/contrib/libpcap/aclocal.m4 index 502a3711f677..9ec93c28d5e5 100644 --- a/contrib/libpcap/aclocal.m4 +++ b/contrib/libpcap/aclocal.m4 @@ -1103,9 +1103,8 @@ dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.17.0 is +dnl used since that's the first version where --static was supported. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -1118,7 +1117,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) + _pkg_min_version=m4_default([$1], [0.17.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) @@ -1205,8 +1204,8 @@ See the pkg-config man page for more details.]) # # That failed - report an error. # - AC_MSG_RESULT([error]) - _PKG_SHORT_ERRORS_SUPPORTED + AC_MSG_RESULT([error]) + _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else @@ -1229,7 +1228,7 @@ _PKG_TEXT])[]dnl # # We don't have pkg-config, so it didn't work. # - AC_MSG_RESULT([not found (pkg-config not found)]) + AC_MSG_RESULT([not found (pkg-config not found)]) else # # We found the package. diff --git a/contrib/libpcap/config.guess b/contrib/libpcap/config.guess index a419d8643b62..69188da73d74 100755 --- a/contrib/libpcap/config.guess +++ b/contrib/libpcap/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-08-01' +timestamp='2023-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -966,6 +966,12 @@ EOF GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; diff --git a/contrib/libpcap/config.sub b/contrib/libpcap/config.sub index fbaa37f2352d..de4259e40479 100755 --- a/contrib/libpcap/config.sub +++ b/contrib/libpcap/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-08-01' +timestamp='2023-01-21' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -76,7 +76,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +145,7 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) basic_machine=$field1 basic_os=$maybe_os ;; @@ -1075,7 +1075,7 @@ case $cpu-$vendor in pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) @@ -1341,6 +1341,10 @@ EOF kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1754,7 +1758,7 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* ) + | fiwix* | mlibc* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1762,6 +1766,9 @@ case $os in ;; none) ;; + kernel* ) + # Restricted further below + ;; *) echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 exit 1 @@ -1772,16 +1779,26 @@ esac # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) + | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) ;; uclinux-uclibc* ) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + managarm-mlibc* | managarm-kernel* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 exit 1 ;; + -kernel* ) + echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel* ) + echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2 + exit 1 + ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) diff --git a/contrib/libpcap/configure b/contrib/libpcap/configure index 91fd1806e8a4..4f8fd5ac4a96 100755 --- a/contrib/libpcap/configure +++ b/contrib/libpcap/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for pcap 1.10.3. +# Generated by GNU Autoconf 2.69 for pcap 1.10.4. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pcap' PACKAGE_TARNAME='pcap' -PACKAGE_VERSION='1.10.3' -PACKAGE_STRING='pcap 1.10.3' +PACKAGE_VERSION='1.10.4' +PACKAGE_STRING='pcap 1.10.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1354,7 +1354,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pcap 1.10.3 to adapt to many kinds of systems. +\`configure' configures pcap 1.10.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1420,7 +1420,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pcap 1.10.3:";; + short | recursive ) echo "Configuration of pcap 1.10.4:";; esac cat <<\_ACEOF @@ -1584,7 +1584,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pcap configure 1.10.3 +pcap configure 1.10.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2506,7 +2506,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pcap $as_me 1.10.3, which was +It was created by pcap $as_me 1.10.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -6110,7 +6110,7 @@ main(void) _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - # GNU-style + # GNU-style { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -7343,9 +7343,9 @@ done V_PCAP=linux VALGRINDTEST_SRC=valgrindtest.c elif test "$ac_cv_header_net_pfilt_h" = yes; then - # - # DEC OSF/1, Digital UNIX, Tru64 UNIX - # + # + # DEC OSF/1, Digital UNIX, Tru64 UNIX + # V_PCAP=pf elif test "$ac_cv_header_net_enet_h" = yes; then # @@ -7505,7 +7505,7 @@ fi fi if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 + _pkg_min_version=0.17.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then @@ -7784,14 +7784,14 @@ enet) # # Capture module # - PLATFORM_C_SRC="pcap-enet.c" + PLATFORM_C_SRC="pcap-enet.c" ;; haiku) # # Capture module # - PLATFORM_CXX_SRC="pcap-haiku.cpp" + PLATFORM_CXX_SRC="pcap-haiku.cpp" # # Just for the sake of it. @@ -7815,7 +7815,7 @@ linux) # # Capture module # - PLATFORM_C_SRC="pcap-linux.c" + PLATFORM_C_SRC="pcap-linux.c" # # Do we have the wireless extensions? @@ -7938,7 +7938,7 @@ fi # # That failed - report an error. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 $as_echo "error" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -7969,7 +7969,7 @@ See the pkg-config man page for more details." "$LINENO" 5 # # We don't have pkg-config, so it didn't work. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 $as_echo "not found (pkg-config not found)" >&6; } else # @@ -8115,7 +8115,7 @@ bpf) # # Capture module # - PLATFORM_C_SRC="pcap-bpf.c" + PLATFORM_C_SRC="pcap-bpf.c" # # Check whether we have the *BSD-style ioctls. @@ -8160,21 +8160,21 @@ pf) # # Capture module # - PLATFORM_C_SRC="pcap-pf.c" + PLATFORM_C_SRC="pcap-pf.c" ;; snit) # # Capture module # - PLATFORM_C_SRC="pcap-snit.c" + PLATFORM_C_SRC="pcap-snit.c" ;; snoop) # # Capture module # - PLATFORM_C_SRC="pcap-snoop.c" + PLATFORM_C_SRC="pcap-snoop.c" ;; dag) @@ -8221,7 +8221,7 @@ null) # # Capture module # - PLATFORM_C_SRC="pcap-null.c" + PLATFORM_C_SRC="pcap-null.c" ;; *) @@ -9387,7 +9387,7 @@ fi # # That failed - report an error. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 $as_echo "error" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -9418,7 +9418,7 @@ See the pkg-config man page for more details." "$LINENO" 5 # # We don't have pkg-config, so it didn't work. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 $as_echo "not found (pkg-config not found)" >&6; } else # @@ -12879,7 +12879,7 @@ fi # # That failed - report an error. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 $as_echo "error" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -12910,7 +12910,7 @@ See the pkg-config man page for more details." "$LINENO" 5 # # We don't have pkg-config, so it didn't work. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 $as_echo "not found (pkg-config not found)" >&6; } else # @@ -13350,7 +13350,7 @@ fi # # That failed - report an error. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 $as_echo "error" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -13375,7 +13375,7 @@ fi # # We don't have pkg-config, so it didn't work. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 $as_echo "not found (pkg-config not found)" >&6; } else # @@ -13549,7 +13549,7 @@ fi # # That failed - report an error. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 $as_echo "error" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -13580,7 +13580,7 @@ See the pkg-config man page for more details." "$LINENO" 5 # # We don't have pkg-config, so it didn't work. # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5 $as_echo "not found (pkg-config not found)" >&6; } else # @@ -14428,7 +14428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pcap $as_me 1.10.3, which was +This file was extended by pcap $as_me 1.10.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14494,7 +14494,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -pcap config.status 1.10.3 +pcap config.status 1.10.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/libpcap/configure.ac b/contrib/libpcap/configure.ac index ff7e49066fb7..ec601c8445e9 100644 --- a/contrib/libpcap/configure.ac +++ b/contrib/libpcap/configure.ac @@ -14,7 +14,7 @@ dnl # config.sub. # -AC_PREREQ(2.64) +AC_PREREQ(2.69) AC_INIT(pcap, m4_esyscmd_s([cat VERSION])) AC_CONFIG_SRCDIR(pcap.c) @@ -220,7 +220,7 @@ main(void) ) ], [ - # GNU-style + # GNU-style AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GNU_STRERROR_R,, [Define to 1 if you have a GNU-style `strerror_r' function.]) @@ -783,9 +783,9 @@ else V_PCAP=linux VALGRINDTEST_SRC=valgrindtest.c elif test "$ac_cv_header_net_pfilt_h" = yes; then - # - # DEC OSF/1, Digital UNIX, Tru64 UNIX - # + # + # DEC OSF/1, Digital UNIX, Tru64 UNIX + # V_PCAP=pf elif test "$ac_cv_header_net_enet_h" = yes; then # @@ -982,14 +982,14 @@ enet) # # Capture module # - PLATFORM_C_SRC="pcap-enet.c" + PLATFORM_C_SRC="pcap-enet.c" ;; haiku) # # Capture module # - PLATFORM_CXX_SRC="pcap-haiku.cpp" + PLATFORM_CXX_SRC="pcap-haiku.cpp" # # Just for the sake of it. @@ -1001,7 +1001,7 @@ linux) # # Capture module # - PLATFORM_C_SRC="pcap-linux.c" + PLATFORM_C_SRC="pcap-linux.c" # # Do we have the wireless extensions? @@ -1102,7 +1102,7 @@ bpf) # # Capture module # - PLATFORM_C_SRC="pcap-bpf.c" + PLATFORM_C_SRC="pcap-bpf.c" # # Check whether we have the *BSD-style ioctls. @@ -1127,21 +1127,21 @@ pf) # # Capture module # - PLATFORM_C_SRC="pcap-pf.c" + PLATFORM_C_SRC="pcap-pf.c" ;; snit) # # Capture module # - PLATFORM_C_SRC="pcap-snit.c" + PLATFORM_C_SRC="pcap-snit.c" ;; snoop) # # Capture module # - PLATFORM_C_SRC="pcap-snoop.c" + PLATFORM_C_SRC="pcap-snoop.c" ;; dag) @@ -1188,7 +1188,7 @@ null) # # Capture module # - PLATFORM_C_SRC="pcap-null.c" + PLATFORM_C_SRC="pcap-null.c" ;; *) diff --git a/contrib/libpcap/gencode.c b/contrib/libpcap/gencode.c index 87a6e962b012..496e02f377e6 100644 --- a/contrib/libpcap/gencode.c +++ b/contrib/libpcap/gencode.c @@ -7990,7 +7990,7 @@ gen_broadcast(compiler_state_t *cstate, int proto) default: bpf_error(cstate, "not a broadcast link"); } - /*NOTREACHED*/ + /*NOTREACHED*/ case Q_IP: /* @@ -8655,7 +8655,7 @@ gen_acode(compiler_state_t *cstate, const char *s, struct qual q) return (b); } else bpf_error(cstate, "ARCnet address used in non-arc expression"); - /*NOTREACHED*/ + /*NOTREACHED*/ default: bpf_error(cstate, "aid supported only on ARCnet"); @@ -8691,27 +8691,27 @@ gen_ahostop(compiler_state_t *cstate, const u_char *eaddr, int dir) case Q_ADDR1: bpf_error(cstate, "'addr1' and 'address1' are only supported on 802.11"); - /*NOTREACHED*/ + /*NOTREACHED*/ case Q_ADDR2: bpf_error(cstate, "'addr2' and 'address2' are only supported on 802.11"); - /*NOTREACHED*/ + /*NOTREACHED*/ case Q_ADDR3: bpf_error(cstate, "'addr3' and 'address3' are only supported on 802.11"); - /*NOTREACHED*/ + /*NOTREACHED*/ case Q_ADDR4: bpf_error(cstate, "'addr4' and 'address4' are only supported on 802.11"); - /*NOTREACHED*/ + /*NOTREACHED*/ case Q_RA: bpf_error(cstate, "'ra' is only supported on 802.11"); - /*NOTREACHED*/ + /*NOTREACHED*/ case Q_TA: bpf_error(cstate, "'ta' is only supported on 802.11"); - /*NOTREACHED*/ + /*NOTREACHED*/ } abort(); /*NOTREACHED*/ diff --git a/contrib/libpcap/mkdep b/contrib/libpcap/mkdep index ef120bdb2b3a..f85a447a79c6 100755 --- a/contrib/libpcap/mkdep +++ b/contrib/libpcap/mkdep @@ -92,7 +92,7 @@ _EOF_ # hack can't deal with anything that requires a search path, and doesn't # even try for anything using bracket (<>) syntax. # -# egrep '^#include[ ]*".*"' /dev/null $* | +# grep -E '^#include[[:blank:]]*".*"' /dev/null $* | # sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' | # diff --git a/contrib/libpcap/msdos/makefile b/contrib/libpcap/msdos/makefile index 599a619f402e..84819aae3f0c 100644 --- a/contrib/libpcap/msdos/makefile +++ b/contrib/libpcap/msdos/makefile @@ -104,7 +104,7 @@ clean: # pkt_rx0.obj: msdos\pkt_rx0.asm -bpf_filt.obj: bpf_filt.c pcap-int.h pcap.h pcap-bpf.h gnuc.h +bpf_filt.obj: bpf_filt.c pcap-int.h pcap.h pcap-bpf.h bpf_imag.obj: bpf_imag.c pcap-int.h pcap.h pcap-bpf.h @@ -134,7 +134,7 @@ nametoad.obj: nametoad.c pcap-int.h pcap.h pcap-bpf.h gencode.h \ pcap-dos.obj: pcap-dos.c pcap.h pcap-bpf.h pcap-dos.h pcap-int.h \ msdos\pktdrvr.h -pktdrvr.obj: msdos\pktdrvr.c gnuc.h pcap-dos.h pcap-int.h \ +pktdrvr.obj: msdos\pktdrvr.c pcap-dos.h pcap-int.h \ pcap.h pcap-bpf.h msdos\pktdrvr.h msdos\pkt_stub.inc ndis2.obj: msdos\ndis2.c pcap-dos.h pcap-int.h pcap.h pcap-bpf.h \ @@ -142,7 +142,7 @@ ndis2.obj: msdos\ndis2.c pcap-dos.h pcap-int.h pcap.h pcap-bpf.h \ pkt_rx0.o32: msdos\pkt_rx0.asm -bpf_filt.o32: bpf_filt.c pcap-int.h pcap.h pcap-bpf.h gnuc.h +bpf_filt.o32: bpf_filt.c pcap-int.h pcap.h pcap-bpf.h bpf_imag.o32: bpf_imag.c pcap-int.h pcap.h pcap-bpf.h @@ -172,7 +172,7 @@ nametoad.o32: nametoad.c pcap-int.h pcap.h pcap-bpf.h gencode.h \ pcap-dos.o32: pcap-dos.c pcap.h pcap-bpf.h pcap-dos.h pcap-int.h \ msdos\pktdrvr.h -pktdrvr.o32: msdos\pktdrvr.c gnuc.h pcap-dos.h pcap-int.h \ +pktdrvr.o32: msdos\pktdrvr.c pcap-dos.h pcap-int.h \ pcap.h pcap-bpf.h msdos\pktdrvr.h msdos\pkt_stub.inc ndis2.o32: msdos\ndis2.c pcap-dos.h pcap-int.h pcap.h pcap-bpf.h \ diff --git a/contrib/libpcap/nametoaddr.c b/contrib/libpcap/nametoaddr.c index 55f93897b9f8..7a04a61dbd6c 100644 --- a/contrib/libpcap/nametoaddr.c +++ b/contrib/libpcap/nametoaddr.c @@ -267,7 +267,7 @@ pcap_nametonetaddr(const char *name) * *not* always get set if getnetbyname_r() succeeds. */ np = NULL; - err = getnetbyname_r(name, &result_buf, buf, sizeof buf, &np, + err = getnetbyname_r(name, &result_buf, buf, sizeof buf, &np, &h_errnoval); if (err != 0) { /* @@ -296,16 +296,16 @@ pcap_nametonetaddr(const char *name) else np = &result_buf; #else - /* - * We don't have any getnetbyname_r(); either we have a - * getnetbyname() that uses thread-specific data, in which - * case we're thread-safe (sufficiently recent FreeBSD, - * sufficiently recent Darwin-based OS, sufficiently recent - * HP-UX, sufficiently recent Tru64 UNIX), or we have the - * traditional getnetbyname() (everything else, including - * current NetBSD and OpenBSD), in which case we're not - * thread-safe. - */ + /* + * We don't have any getnetbyname_r(); either we have a + * getnetbyname() that uses thread-specific data, in which + * case we're thread-safe (sufficiently recent FreeBSD, + * sufficiently recent Darwin-based OS, sufficiently recent + * HP-UX, sufficiently recent Tru64 UNIX), or we have the + * traditional getnetbyname() (everything else, including + * current NetBSD and OpenBSD), in which case we're not + * thread-safe. + */ np = getnetbyname(name); #endif if (np != NULL) @@ -552,16 +552,16 @@ pcap_nametoproto(const char *str) else p = &result_buf; #else - /* - * We don't have any getprotobyname_r(); either we have a - * getprotobyname() that uses thread-specific data, in which - * case we're thread-safe (sufficiently recent FreeBSD, - * sufficiently recent Darwin-based OS, sufficiently recent - * HP-UX, sufficiently recent Tru64 UNIX, Windows), or we have + /* + * We don't have any getprotobyname_r(); either we have a + * getprotobyname() that uses thread-specific data, in which + * case we're thread-safe (sufficiently recent FreeBSD, + * sufficiently recent Darwin-based OS, sufficiently recent + * HP-UX, sufficiently recent Tru64 UNIX, Windows), or we have * the traditional getprotobyname() (everything else, including - * current NetBSD and OpenBSD), in which case we're not - * thread-safe. - */ + * current NetBSD and OpenBSD), in which case we're not + * thread-safe. + */ p = getprotobyname(str); #endif if (p != 0) diff --git a/contrib/libpcap/optimize.c b/contrib/libpcap/optimize.c index 0ad0c4163bb0..9af4c15d2ca7 100644 --- a/contrib/libpcap/optimize.c +++ b/contrib/libpcap/optimize.c @@ -3029,14 +3029,14 @@ dot_dump_edge(struct icode *ic, struct block *block, FILE *out) * * example DOT for BPF `ip src host 1.1.1.1' is: digraph BPF { - block0 [shape=ellipse, id="block-0" label="BLOCK0\n\n(000) ldh [12]\n(001) jeq #0x800 jt 2 jf 5" tooltip="val[A]=0 val[X]=0"]; - block1 [shape=ellipse, id="block-1" label="BLOCK1\n\n(002) ld [26]\n(003) jeq #0x1010101 jt 4 jf 5" tooltip="val[A]=0 val[X]=0"]; - block2 [shape=ellipse, id="block-2" label="BLOCK2\n\n(004) ret #68" tooltip="val[A]=0 val[X]=0", peripheries=2]; - block3 [shape=ellipse, id="block-3" label="BLOCK3\n\n(005) ret #0" tooltip="val[A]=0 val[X]=0", peripheries=2]; - "block0":se -> "block1":n [label="T"]; - "block0":sw -> "block3":n [label="F"]; - "block1":se -> "block2":n [label="T"]; - "block1":sw -> "block3":n [label="F"]; + block0 [shape=ellipse, id="block-0" label="BLOCK0\n\n(000) ldh [12]\n(001) jeq #0x800 jt 2 jf 5" tooltip="val[A]=0 val[X]=0"]; + block1 [shape=ellipse, id="block-1" label="BLOCK1\n\n(002) ld [26]\n(003) jeq #0x1010101 jt 4 jf 5" tooltip="val[A]=0 val[X]=0"]; + block2 [shape=ellipse, id="block-2" label="BLOCK2\n\n(004) ret #68" tooltip="val[A]=0 val[X]=0", peripheries=2]; + block3 [shape=ellipse, id="block-3" label="BLOCK3\n\n(005) ret #0" tooltip="val[A]=0 val[X]=0", peripheries=2]; + "block0":se -> "block1":n [label="T"]; + "block0":sw -> "block3":n [label="F"]; + "block1":se -> "block2":n [label="T"]; + "block1":sw -> "block3":n [label="F"]; } * * After install graphviz on https://www.graphviz.org/, save it as bpf.dot diff --git a/contrib/libpcap/pcap-bt-linux.c b/contrib/libpcap/pcap-bt-linux.c index 37c805658253..c7bfef1dfad7 100644 --- a/contrib/libpcap/pcap-bt-linux.c +++ b/contrib/libpcap/pcap-bt-linux.c @@ -367,9 +367,9 @@ bt_read_linux(pcap_t *handle, int max_packets _U_, pcap_handler callback, u_char case HCI_CMSG_DIR: memcpy(&in, CMSG_DATA(cmsg), sizeof in); break; - case HCI_CMSG_TSTAMP: - memcpy(&pkth.ts, CMSG_DATA(cmsg), - sizeof pkth.ts); + case HCI_CMSG_TSTAMP: + memcpy(&pkth.ts, CMSG_DATA(cmsg), + sizeof pkth.ts); break; } cmsg = CMSG_NXTHDR(&msg, cmsg); diff --git a/contrib/libpcap/pcap-common.c b/contrib/libpcap/pcap-common.c index 4f12d8abb18e..75461b12cf26 100644 --- a/contrib/libpcap/pcap-common.c +++ b/contrib/libpcap/pcap-common.c @@ -964,7 +964,7 @@ * which is stored with each packet: * * EXP_PDU_TAG_DISSECTOR_NAME the name of the Wireshark dissector - * that can make sense of the data stored. + * that can make sense of the data stored. * * EXP_PDU_TAG_HEUR_DISSECTOR_NAME the name of the Wireshark heuristic * dissector that can make sense of the @@ -1240,7 +1240,7 @@ static struct linktype_map { { DLT_FR, LINKTYPE_FRELAY }, #endif - { DLT_ATM_RFC1483, LINKTYPE_ATM_RFC1483 }, + { DLT_ATM_RFC1483, LINKTYPE_ATM_RFC1483 }, { DLT_RAW, LINKTYPE_RAW }, { DLT_SLIP_BSDOS, LINKTYPE_SLIP_BSDOS }, { DLT_PPP_BSDOS, LINKTYPE_PPP_BSDOS }, diff --git a/contrib/libpcap/pcap-libdlpi.c b/contrib/libpcap/pcap-libdlpi.c index 70cb5d45f77f..f281fb93393b 100644 --- a/contrib/libpcap/pcap-libdlpi.c +++ b/contrib/libpcap/pcap-libdlpi.c @@ -344,7 +344,7 @@ pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf) linknamelist_t *entry, *next; linkwalk_t lw = {NULL, 0}; - int save_errno; + int save_errno; /* * Get the list of regular interfaces first. diff --git a/contrib/libpcap/pcap-linux.c b/contrib/libpcap/pcap-linux.c index 43d2a9f0eec6..13bd8529f65c 100644 --- a/contrib/libpcap/pcap-linux.c +++ b/contrib/libpcap/pcap-linux.c @@ -2,7 +2,7 @@ * pcap-linux.c: Packet capture interface to the Linux kernel * * Copyright (c) 2000 Torsten Landschoff - * Sebastian Krahmer + * Sebastian Krahmer * * License: BSD *** 430 LINES SKIPPED *** From nobody Wed Jan 29 19:33:31 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 4YjslH56lwz5lrPt; Wed, 29 Jan 2025 19:33:31 +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 4YjslH2h1Wz3R3h; Wed, 29 Jan 2025 19:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179211; 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=ieq/LuN+e3JB26RXNJXNW7uvjVRVvcIQqimwqKbgAQA=; b=XV57Ea+b/MbRoj5ZRHyL8+AylJ7NDWn9WF/aGdaXE0c8RcUllarAyDvH/Hd4piEJaVRoG8 95CUpL/D2p4ILC2c5WlvRUtstg3e+Gy4kEsbwJc1t/fn3afF+ih9VPMwYISfAvpSyMCjO5 5r5WJnIntzv3SDLSXakKamcWfnDUQimyjGlUj+zqQDzIApJA3crGrhTAA68zt2cTEzuDD3 6eUhsdCF/SaXygzgd9SCDIy5w0sR98X/CIdT4E3NK6WJlWt6VQBQlyoCgz1+k6hWPZVz0G bl89sS9YHviAG1jtIcHEsqjDYQ+QYacpbiw38msQWmkLLLN/HgsTA3kEubPD0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179211; 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=ieq/LuN+e3JB26RXNJXNW7uvjVRVvcIQqimwqKbgAQA=; b=fhewakIQjxu5h6njt2f78k4XDXzaR9GITlJ8ZklX10VwvSOeY6ZmwKA/WBs2kdEtJdPIJk zVGBRL/TUvgqzCRJcDUNxjY7Tkif0Ffz/dT23zT3JUxsMi2lFvfrVZOp7VBXoWUqyMd+Iy 1PWlvrfsFVIVdTpvEWo+u6X6NPZcQQKLLsZq5MMez9v9fjFF8UYzj3BnfQCeM0yJsRCNkz pj8fqXlmhiC35Vqs/uDSt5v5hdYYo5566SHzNis5gbmfh1FgBsvi7sce5IZHvB+L1Y2g9S U//pDk1zTiPGmEUD4KnxNfB3uc0vHg9vVjX1lYrgbBNfxVkJtOV4OLG4uDBvCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179211; a=rsa-sha256; cv=none; b=xSUrWhjuixHJiz1esMsWPLEDoM/2uCh6dcVVmzJQgDMeWxULnXk33EnUDTaqBMA9kf7TYp v2BRo5AhQ0oFDUlq1jbwmkYkoAOqpcHkZtvkQpqPVDFQYEZKK60+7S8VAEiexf/3nIlWh/ L8j/MuxoqcT6QUG/Bhz6U7dr+fIYWhzbsRGdOLqYN3O21H1pRnCz1HB6/tNJR2KVqnpqhQ N/4rfVSsB4eokqThjG1Qm8oPUDDFsHLH+vESkw+Y73mzUasPtp1/30CJ7Da/2Q48aZQeyd GHvgHkyDs+22TF171J4sgvPYeD6dC810Ld3pm3w61LGF1dSiYntaT5lJjJLOJw== 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 4YjslH1kCzzYj; Wed, 29 Jan 2025 19:33:31 +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 50TJXVZq039740; Wed, 29 Jan 2025 19:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXVlZ039737; Wed, 29 Jan 2025 19:33:31 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:31 GMT Message-Id: <202501291933.50TJXVlZ039737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: 33c859c48732 - stable/13 - tcpdump: specify OpenSSL 1.1 APIs 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33c859c48732471ba9d331e4f758aebe819d604b Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=33c859c48732471ba9d331e4f758aebe819d604b commit 33c859c48732471ba9d331e4f758aebe819d604b Author: Pierre Pronchery AuthorDate: 2023-05-09 13:04:45 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:28 +0000 tcpdump: specify OpenSSL 1.1 APIs OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in use for the purpose of hiding deprecated interfaces and enabling the appropriate deprecation notices. This change is a NFC while we're still using OpenSSL 1.1.1 but will avoid deprecation warnings upon the switch to OpenSSL 3.0. A future update should migrate to use the OpenSSL 3.0 APIs. PR: 271615 Reviewed by: emaste Event: Kitchener-Waterloo Hackathon 202305 Sponsored by: The FreeBSD Foundation (cherry picked from commit baef3a5b585f462d9256f3b5a771ab5508ef6fd2) --- usr.sbin/tcpdump/tcpdump/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile index 9d9ae2559e10..b9c835226a46 100644 --- a/usr.sbin/tcpdump/tcpdump/Makefile +++ b/usr.sbin/tcpdump/tcpdump/Makefile @@ -195,6 +195,7 @@ CFLAGS+=-DHAVE_CASPER LIBADD+= crypto CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/openssl CFLAGS+= -DHAVE_LIBCRYPTO -DHAVE_OPENSSL_EVP_H +CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L .endif .if ${MK_PF} != "no" From nobody Wed Jan 29 19:33:32 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 4YjslL1L9nz5lrPv; Wed, 29 Jan 2025 19:33:34 +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 4YjslK3tkGz3QnS; Wed, 29 Jan 2025 19:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179213; 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=orDTNq2zwKzzaJ8QVekIZAZ5uKUGMpUUQlBW07TGICU=; b=pUPcK85rEjtiPp9GbiD02yTqjOmDF/ZcEASmIiTAlmQgmkk+0hItoBFSCLoVymuRMaWCeU 8XRUHbIhGXdsxbMTAL+4ogys+39jgDCyAPbalIT5ys3a1chELmMpbwgs7Q2iV/pIg1JBqH k8V9cP9c0gh1d/np1SN6g8SnfrjNzvVZ15Mh6YC32vACQJj84h4PhT1Q65PqOER8UpzQzg LIprErNPAoziPVNyiBuSrSU/59Bpo1XwuNPKz7T7dpldp2eKGbgZmNPM67afBHeFQ+/5UK 8yjWYpbuoVnPHJep5UZn/yZb3Izi3z9V/dnwNhRMmjqI90Nqr7WroKpLzjVK3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179213; 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=orDTNq2zwKzzaJ8QVekIZAZ5uKUGMpUUQlBW07TGICU=; b=VUut07P0+cKQuZbEHnqlechVRqHpuG9nvg6YQYg82EQxIiOvRwA/ziRWCSRJLvARxTLliw RCWosvF5XZXot3MhhK00jUmUj86Nel9x7itKmHYmY99sXzJqA9dUMN8DrffkxfEUMamPVR wDdDrgtzttOt7Jg7AC4OVfOB9T/usdRO+5vGVCJ3o0jJ1zFvF14bueYiCH1WUYclBv8sko gkvmi+nTNeHbGF/u/rNSnPTk6XBoHknyjE1HOTdF4SL9ciDzu9H4ajgcNdKsQvGD5Rlhl5 hUZLo0uqaaD3Zr7AkOLv2lXtkxVa58vCoTKJhvetCuBlFBYKkPxvrH23qTRLww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179213; a=rsa-sha256; cv=none; b=NqJkgOwi4j6MtBVeCmRbWLWH/Ms0S2kuQ6/R9gtCF7MwpBlOjKQDOZ+RM1CygSbjRI64Cg 5fpddCm76IDeLhwSZkUKSIE0Ra8qhDqE0JFgwkXDLq5YEl9vA538BcdeAlLUeH6943LrlR 6U3yHzVJuKZ7ubDBtRYmALqtErsLtcZ4IojL9fYttxN4uxFLwhghsGKdms4fE8pnj84CNC PnxMK3+rloV+3bEHxUi/HiBhzxQiZ12M7vEEznrJtYVQFOCbHasoNYF4q7LS79p8+p/qEz 8LQMhtdPu0YSu1ZGeKycn+m/4Y59EKomNTSVAcH9jHTlcP9UQExz68BQ7vv6RQ== 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 4YjslK3R16zwR; Wed, 29 Jan 2025 19:33:33 +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 50TJXXHs039783; Wed, 29 Jan 2025 19:33:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXWCH039771; Wed, 29 Jan 2025 19:33:32 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:32 GMT Message-Id: <202501291933.50TJXWCH039771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: e5258a079df3 - stable/13 - tpcdump: Update to 4.99.4 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5258a079df39bc40ccfd96e107784f9252170ac Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=e5258a079df39bc40ccfd96e107784f9252170ac commit e5258a079df39bc40ccfd96e107784f9252170ac Author: Joseph Mingrone AuthorDate: 2023-06-07 02:21:27 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:29 +0000 tpcdump: Update to 4.99.4 Prior to this MFC, the stable/13 tcpdump was at version 4.9.3, which was released over five years ago. Several CVEs have been identified in that version. For a detailed list, see https://www.tcpdump.org/public-cve-list.txt. Reviewed by: kp (print-pf changes) Sponsored by: The FreeBSD Foundation (cherry picked from commit 1cdec2832d051ddcb1417f3f2601e6212aff2613) (cherry picked from commit ee67461e56828dd1f8de165947ba83f6d9148a87) (cherry picked from commit a75d93a74d55d371876f5444075de4ecd685297f) (cherry picked from commit 171a7bbfc04885150401ab64d96793373a8b2061) (cherry picked from commit 1ad8d2ee1f7dec1d747ec955a68fbbb362958315) (cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6) (cherry picked from commit 85247ee6a2ba1c2dd0053e9be9055efa4be1438e) Commit 1cdec2832d051ddcb1417f3f2601e6212aff2613 has been adapted for stable/13. Changes to usr.sbin/ndp/ndp_netlink.c have been omitted because 91fbe0819bb9 (ndp: convert ndp(8) to netlink) has not been MFCed. Commit ee67461e56828dd1f8de165947ba83f6d9148a87 has been adapted for stable/13. Most modifications were required because 4bf98559d9d6fa7c3571d26ed6f2b18823e3a30b was not MFCed to stable/13. Also incorporate a small change from 4848eb3af2a91b133c4b70cb9b71dd92ffec7f46 to fix the build. --- contrib/tcpdump/CHANGES | 289 +- contrib/tcpdump/CMakeLists.txt | 1371 ++++++++ contrib/tcpdump/CONTRIBUTING | 151 - contrib/tcpdump/CONTRIBUTING.md | 191 ++ contrib/tcpdump/CREDITS | 149 +- contrib/tcpdump/{INSTALL.txt => INSTALL.md} | 61 +- contrib/tcpdump/LICENSE | 6 +- contrib/tcpdump/Makefile.in | 230 +- contrib/tcpdump/PLATFORMS | 16 - contrib/tcpdump/README | 1 - contrib/tcpdump/README.md | 100 +- contrib/tcpdump/VERSION | 2 +- contrib/tcpdump/addrtoname.c | 493 +-- contrib/tcpdump/addrtoname.h | 86 +- contrib/tcpdump/addrtostr.c | 12 +- contrib/tcpdump/af.c | 4 +- contrib/tcpdump/af.h | 2 +- contrib/tcpdump/ah.h | 46 +- contrib/tcpdump/appletalk.h | 60 +- contrib/tcpdump/ascii_strcasecmp.c | 6 +- contrib/tcpdump/atime.awk | 2 +- contrib/tcpdump/bpf_dump.c | 5 +- contrib/tcpdump/chdlc.h | 2 +- contrib/tcpdump/checksum.c | 10 +- contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake | 24 + contrib/tcpdump/cmake/Modules/FindPCAP.cmake | 462 +++ contrib/tcpdump/cmake/Modules/FindSMI.cmake | 24 + contrib/tcpdump/cmake_uninstall.cmake.in | 21 + contrib/tcpdump/cmakeconfig.h.in | 290 ++ contrib/tcpdump/compiler-tests.h | 196 ++ contrib/tcpdump/config.guess | 1516 +++++---- contrib/tcpdump/config.h.in | 170 +- contrib/tcpdump/config.sub | 1705 +++++----- contrib/tcpdump/configure | 3794 +++++++++++---------- contrib/tcpdump/configure.ac | 508 +-- contrib/tcpdump/cpack.c | 103 +- contrib/tcpdump/cpack.h | 33 +- contrib/tcpdump/diag-control.h | 186 + contrib/tcpdump/doc/README.NetBSD.md | 22 + contrib/tcpdump/doc/README.Win32.md | 200 ++ contrib/tcpdump/doc/README.aix.md | 17 + contrib/tcpdump/doc/README.solaris.md | 41 + contrib/tcpdump/ethertype.h | 32 +- contrib/tcpdump/extract.h | 754 ++++- contrib/tcpdump/{ether.h => fptype.c} | 35 +- contrib/tcpdump/fptype.h | 34 + contrib/tcpdump/ftmacros.h | 127 + contrib/tcpdump/funcattrs.h | 110 +- contrib/tcpdump/getservent.h | 67 + contrib/tcpdump/gmpls.c | 4 +- contrib/tcpdump/gmt2local.c | 66 - contrib/tcpdump/gmt2local.h | 25 - contrib/tcpdump/in_cksum.c | 12 +- contrib/tcpdump/interface.h | 18 +- contrib/tcpdump/ip.h | 6 +- contrib/tcpdump/ip6.h | 91 +- contrib/tcpdump/ipproto.c | 10 +- contrib/tcpdump/ipproto.h | 15 +- contrib/tcpdump/l2vpn.c | 8 +- contrib/tcpdump/machdep.c | 24 +- contrib/tcpdump/missing/datalinks.c | 2 +- contrib/tcpdump/missing/dlnames.c | 5 +- contrib/tcpdump/missing/getopt_long.c | 30 +- contrib/tcpdump/{ => missing}/getopt_long.h | 6 +- contrib/tcpdump/missing/getservent.c | 143 + contrib/tcpdump/missing/pcap_dump_ftell.c | 46 + contrib/tcpdump/missing/snprintf.c | 119 +- contrib/tcpdump/missing/strlcat.c | 8 +- contrib/tcpdump/missing/strlcpy.c | 8 +- contrib/tcpdump/missing/strsep.c | 6 +- contrib/tcpdump/mkdep | 50 +- contrib/tcpdump/mpls.h | 6 +- contrib/tcpdump/nameser.h | 187 +- contrib/tcpdump/netdissect-alloc.c | 64 + contrib/tcpdump/netdissect-alloc.h | 32 + contrib/tcpdump/netdissect-ctype.h | 56 + contrib/tcpdump/netdissect-stdinc.h | 375 +- contrib/tcpdump/netdissect.c | 159 +- contrib/tcpdump/netdissect.h | 599 ++-- contrib/tcpdump/nfs.h | 169 +- contrib/tcpdump/nfsfh.h | 2 +- contrib/tcpdump/nlpid.c | 4 +- contrib/tcpdump/ntp.c | 74 + contrib/tcpdump/{vfprintf.c => ntp.h} | 58 +- contrib/tcpdump/openflow.h | 51 +- contrib/tcpdump/ospf.h | 154 +- contrib/tcpdump/oui.c | 33 +- contrib/tcpdump/oui.h | 32 +- contrib/tcpdump/parsenfsfh.c | 162 +- contrib/tcpdump/pcap_dump_ftell.c | 31 - contrib/tcpdump/pflog.h | 152 + contrib/tcpdump/ppp.h | 8 +- contrib/tcpdump/print-802_11.c | 1769 +++++----- contrib/tcpdump/print-802_15_4.c | 2603 +++++++++++++- contrib/tcpdump/print-ah.c | 57 +- contrib/tcpdump/print-ahcp.c | 283 +- contrib/tcpdump/print-aodv.c | 388 ++- contrib/tcpdump/print-aoe.c | 257 +- contrib/tcpdump/print-ap1394.c | 46 +- contrib/tcpdump/print-arcnet.c | 162 +- contrib/tcpdump/print-arista.c | 165 + contrib/tcpdump/print-arp.c | 261 +- contrib/tcpdump/print-ascii.c | 126 +- contrib/tcpdump/print-atalk.c | 462 +-- contrib/tcpdump/print-atm.c | 193 +- contrib/tcpdump/print-babel.c | 504 ++- contrib/tcpdump/print-bcm-li.c | 130 + contrib/tcpdump/print-beep.c | 23 +- contrib/tcpdump/print-bfd.c | 215 +- contrib/tcpdump/print-bgp.c | 4326 +++++++++++++----------- contrib/tcpdump/print-bootp.c | 569 ++-- contrib/tcpdump/print-brcmtag.c | 151 + contrib/tcpdump/print-bt.c | 44 +- contrib/tcpdump/print-calm-fast.c | 52 +- contrib/tcpdump/print-carp.c | 37 +- contrib/tcpdump/print-cdp.c | 596 ++-- contrib/tcpdump/print-cfm.c | 310 +- contrib/tcpdump/print-chdlc.c | 94 +- contrib/tcpdump/print-cip.c | 47 +- contrib/tcpdump/print-cnfp.c | 456 +-- contrib/tcpdump/print-dccp.c | 365 +- contrib/tcpdump/print-decnet.c | 680 ++-- contrib/tcpdump/print-dhcp6.c | 373 +- contrib/tcpdump/print-domain.c | 941 ++++-- contrib/tcpdump/print-dsa.c | 219 ++ contrib/tcpdump/print-dtp.c | 86 +- contrib/tcpdump/print-dvmrp.c | 341 +- contrib/tcpdump/print-eap.c | 277 +- contrib/tcpdump/print-egp.c | 224 +- contrib/tcpdump/print-eigrp.c | 472 +-- contrib/tcpdump/print-enc.c | 94 +- contrib/tcpdump/print-esp.c | 544 +-- contrib/tcpdump/print-ether.c | 496 ++- contrib/tcpdump/print-fddi.c | 93 +- contrib/tcpdump/print-forces.c | 761 ++--- contrib/tcpdump/print-fr.c | 386 +-- contrib/tcpdump/print-frag6.c | 38 +- contrib/tcpdump/print-ftp.c | 11 +- contrib/tcpdump/print-geneve.c | 81 +- contrib/tcpdump/print-geonet.c | 123 +- contrib/tcpdump/print-gre.c | 210 +- contrib/tcpdump/print-hncp.c | 331 +- contrib/tcpdump/print-hsrp.c | 88 +- contrib/tcpdump/print-http.c | 11 +- contrib/tcpdump/print-icmp.c | 523 +-- contrib/tcpdump/print-icmp6.c | 1383 ++++---- contrib/tcpdump/print-igmp.c | 232 +- contrib/tcpdump/print-igrp.c | 126 +- contrib/tcpdump/print-ip-demux.c | 237 ++ contrib/tcpdump/print-ip.c | 575 +--- contrib/tcpdump/print-ip6.c | 413 ++- contrib/tcpdump/print-ip6opts.c | 188 +- contrib/tcpdump/print-ipcomp.c | 31 +- contrib/tcpdump/print-ipfc.c | 50 +- contrib/tcpdump/print-ipnet.c | 51 +- contrib/tcpdump/print-ipoib.c | 125 + contrib/tcpdump/print-ipx.c | 193 +- contrib/tcpdump/print-isakmp.c | 1425 ++++---- contrib/tcpdump/print-isoclns.c | 2757 ++++++++------- contrib/tcpdump/print-juniper.c | 823 +++-- contrib/tcpdump/print-krb.c | 113 +- contrib/tcpdump/print-l2tp.c | 303 +- contrib/tcpdump/print-lane.c | 52 +- contrib/tcpdump/print-ldp.c | 304 +- contrib/tcpdump/print-lisp.c | 158 +- contrib/tcpdump/print-llc.c | 124 +- contrib/tcpdump/print-lldp.c | 651 ++-- contrib/tcpdump/print-lmp.c | 601 ++-- contrib/tcpdump/print-loopback.c | 81 +- contrib/tcpdump/print-lspping.c | 546 ++- contrib/tcpdump/print-lwapp.c | 172 +- contrib/tcpdump/print-lwres.c | 428 ++- contrib/tcpdump/print-m3ua.c | 96 +- contrib/tcpdump/print-macsec.c | 256 ++ contrib/tcpdump/print-medsa.c | 196 -- contrib/tcpdump/print-mobile.c | 35 +- contrib/tcpdump/print-mobility.c | 170 +- contrib/tcpdump/print-mpcp.c | 146 +- contrib/tcpdump/print-mpls.c | 108 +- contrib/tcpdump/print-mptcp.c | 279 +- contrib/tcpdump/print-msdp.c | 64 +- contrib/tcpdump/print-msnlb.c | 27 +- contrib/tcpdump/print-nflog.c | 177 +- contrib/tcpdump/print-nfs.c | 1419 ++++---- contrib/tcpdump/print-nsh.c | 233 +- contrib/tcpdump/print-ntp.c | 473 ++- contrib/tcpdump/print-null.c | 45 +- contrib/tcpdump/print-olsr.c | 285 +- contrib/tcpdump/print-openflow-1.0.c | 2478 ++++++-------- contrib/tcpdump/print-openflow-1.3.c | 1209 +++++++ contrib/tcpdump/print-openflow.c | 214 +- contrib/tcpdump/print-ospf.c | 773 ++--- contrib/tcpdump/print-ospf6.c | 515 ++- contrib/tcpdump/print-otv.c | 36 +- contrib/tcpdump/print-pflog.c | 188 +- contrib/tcpdump/print-pfsync.c | 140 +- contrib/tcpdump/print-pgm.c | 543 ++- contrib/tcpdump/print-pim.c | 667 ++-- contrib/tcpdump/print-pktap.c | 94 +- contrib/tcpdump/print-ppi.c | 108 +- contrib/tcpdump/print-ppp.c | 869 ++--- contrib/tcpdump/print-pppoe.c | 81 +- contrib/tcpdump/print-pptp.c | 731 ++-- contrib/tcpdump/print-ptp.c | 634 ++++ contrib/tcpdump/print-radius.c | 881 ++++- contrib/tcpdump/print-raw.c | 12 +- contrib/tcpdump/print-realtek.c | 248 ++ contrib/tcpdump/print-resp.c | 114 +- contrib/tcpdump/print-rip.c | 425 ++- contrib/tcpdump/print-ripng.c | 125 +- contrib/tcpdump/print-rpki-rtr.c | 147 +- contrib/tcpdump/print-rrcp.c | 129 - contrib/tcpdump/print-rsvp.c | 1179 ++++--- contrib/tcpdump/print-rt6.c | 96 +- contrib/tcpdump/print-rtsp.c | 11 +- contrib/tcpdump/print-rx.c | 1411 ++++---- contrib/tcpdump/print-sctp.c | 382 +-- contrib/tcpdump/print-sflow.c | 725 ++-- contrib/tcpdump/print-sip.c | 8 +- contrib/tcpdump/print-sl.c | 161 +- contrib/tcpdump/print-sll.c | 316 +- contrib/tcpdump/print-slow.c | 363 +- contrib/tcpdump/print-smb.c | 759 ++--- contrib/tcpdump/print-smtp.c | 11 +- contrib/tcpdump/print-snmp.c | 399 ++- contrib/tcpdump/print-someip.c | 142 + contrib/tcpdump/print-ssh.c | 99 + contrib/tcpdump/print-stp.c | 349 +- contrib/tcpdump/print-sunatm.c | 26 +- contrib/tcpdump/print-sunrpc.c | 85 +- contrib/tcpdump/print-symantec.c | 52 +- contrib/tcpdump/print-syslog.c | 72 +- contrib/tcpdump/print-tcp.c | 508 +-- contrib/tcpdump/print-telnet.c | 81 +- contrib/tcpdump/print-tftp.c | 71 +- contrib/tcpdump/print-timed.c | 111 +- contrib/tcpdump/print-tipc.c | 181 +- contrib/tcpdump/print-token.c | 94 +- contrib/tcpdump/print-udld.c | 115 +- contrib/tcpdump/print-udp.c | 563 +-- contrib/tcpdump/print-unsupported.c | 34 + contrib/tcpdump/print-usb.c | 186 +- contrib/tcpdump/print-vjc.c | 34 +- contrib/tcpdump/print-vqp.c | 107 +- contrib/tcpdump/print-vrrp.c | 101 +- contrib/tcpdump/print-vsock.c | 262 ++ contrib/tcpdump/print-vtp.c | 181 +- contrib/tcpdump/print-vxlan-gpe.c | 67 +- contrib/tcpdump/print-vxlan.c | 41 +- contrib/tcpdump/print-wb.c | 365 +- contrib/tcpdump/print-whois.c | 31 + contrib/tcpdump/print-zep.c | 181 + contrib/tcpdump/print-zephyr.c | 128 +- contrib/tcpdump/print-zeromq.c | 83 +- contrib/tcpdump/print.c | 414 ++- contrib/tcpdump/print.h | 5 +- contrib/tcpdump/rpc_auth.h | 11 +- contrib/tcpdump/rpc_msg.h | 24 +- contrib/tcpdump/rpl.h | 174 - contrib/tcpdump/setsignal.c | 90 - contrib/tcpdump/setsignal.h | 25 - contrib/tcpdump/signature.c | 26 +- contrib/tcpdump/slcompress.h | 4 +- contrib/tcpdump/smb.h | 6 +- contrib/tcpdump/smbutil.c | 535 +-- contrib/tcpdump/status-exit-codes.h | 32 + contrib/tcpdump/stime.awk | 2 +- contrib/tcpdump/strtoaddr.c | 20 +- contrib/tcpdump/tcp.h | 29 +- contrib/tcpdump/tcpdump.1.in | 364 +- contrib/tcpdump/tcpdump.c | 1234 +++++-- contrib/tcpdump/timeval-operations.h | 23 +- contrib/tcpdump/udp.h | 118 +- contrib/tcpdump/util-print.c | 614 ++-- contrib/tcpdump/varattrs.h | 59 + usr.sbin/ndp/Makefile | 6 +- usr.sbin/ndp/ndp.c | 20 +- usr.sbin/tcpdump/tcpdump/Makefile | 25 +- usr.sbin/tcpdump/tcpdump/config.h | 205 +- 279 files changed, 47721 insertions(+), 32997 deletions(-) diff --git a/contrib/tcpdump/CHANGES b/contrib/tcpdump/CHANGES index f09be3446a62..33ced66dd826 100644 --- a/contrib/tcpdump/CHANGES +++ b/contrib/tcpdump/CHANGES @@ -1,3 +1,264 @@ +Friday, April 7, 2023 / The Tcpdump Group + Summary for 4.99.4 tcpdump release + Source code: + Fix spaces before tabs in indentation. + Updated printers: + LSP ping: Fix "Unused value" warnings from Coverity. + CVE-2023-1801: Fix an out-of-bounds write in the SMB printer. + DNS: sync resource types with IANA. + ICMPv6: Update the output to show a RPL DAO field name. + Geneve: Fix the Geneve UDP port test. + Building and testing: + Require at least autoconf 2.69. + Don't check for strftime(), as it's in C90 and beyond. + Update config.{guess,sub}, timestamps 2023-01-01,2023-01-21. + Documentation: + man: Document TCP flag names better. + +Thursday, January 12, 2023 / The Tcpdump Group + Summary for 4.99.3 tcpdump release + Updated printers: + PTP: Use the proper values for the control field and print un-allocated + values for the message field as "Reserved" instead of "none". + Source code: + smbutil.c: Replace obsolete function call (asctime) + Building and testing: + cmake: Update the minimum required version to 2.8.12 (except Windows). + CI: Introduce and use TCPDUMP_CMAKE_TAINTED. + Makefile.in: Add the releasecheck target. + Makefile.in: Add "make -s install" in the releasecheck target. + Cirrus CI: Run the "make releasecheck" command in the Linux task. + Makefile.in: Add the whitespacecheck target. + Cirrus CI: Run the "make whitespacecheck" command in the Linux task. + Address all shellcheck warnings in update-test.sh. + Makefile.in: Get rid of a remain of gnuc.h. + Documentation: + Reformat the installation notes (INSTALL.txt) in Markdown. + Convert CONTRIBUTING to Markdown. + CONTRIBUTING.md: Document the use of "protocol: " in a commit summary. + Add a README file for NetBSD. + Fix CMake build to set man page section numbers in tcpdump.1 + +Saturday, December 31, 2022 / The Tcpdump Group + Summary for 4.99.2 tcpdump release + Updated printers: + BGP: Update cease notification decoding to RFC 9003. + BGP: decode BGP link-bandwidth extended community properly. + BGP: Fix parsing the AIGP attribute + BGP: make sure the path attributes don't go past the end of the packet. + BGP: Shutdown message can be up to 255 bytes length according to rfc9003 + DSA: correctly determine VID. + EAP: fix some length checks and output issues. + 802.11: Fix the misleading comment regarding "From DS", "To DS" Frame + Control Flags. + 802.11: Fetch the CF and TIM IEs a field at a time. + 802.15.4, BGP, LISP: fix some length checks, compiler warnings, + and undefined behavior warnings. + PFLOG: handle LINKTYPE_PFLOG/DLT_PFLOG files from all OSes on all + OSes. + RRCP: support more Realtek protocols than just RRCP. + MPLS: show the EXP field as TC, as per RFC 5462. + ICMP: redo MPLS Extension code as general ICMP Extension code. + VQP: Do not print unknown error codes twice. + Juniper: Add some bounds checks. + Juniper: Don't treat known DLT_ types as "Unknown". + lwres: Fix a length check, update a variable type. + EAP: Fix some undefined behaviors at runtime. + Ethernet: Rework the length checks, add a length check. + IPX: Add two length checks. + Zephyr: Avoid printing non-ASCII characters. + VRRP: Print the protocol name before any GET_(). + DCCP: Get rid of trailing commas in lists. + Juniper: Report invalid packets as invalid, not truncated. + IPv6: Remove an obsolete code in an always-false #if wrapper. + ISAKMP: Use GET_U_1() to replace a direct dereference. + RADIUS: Use GET_U_1() to replace a direct dereference. + TCP: Fix an invalid check. + RESP: Fix an invalid check. + RESP: Remove an unnecessary test. + Arista: Refine the output format and print HwInfo. + sFlow: add support for IPv6 agent, add a length check. + VRRP: add support for IPv6. + OSPF: Update to match the Router Properties registry. + OSPF: Remove two unnecessary dereferences. + OSPF: Add support bit Nt RFC3101. + OSPFv3: Remove two unnecessary dereferences. + ICMPv6: Fix output for Router Renumbering messages. + ICMPv6: Fix the Node Information flags. + ICMPv6: Remove an unused macro and extra blank lines. + ICMPv6: Add a length check in the rpl_dio_print() function. + ICMPv6: Use GET_IP6ADDR_STRING() in the rpl_dio_print() function. + IPv6: Add some checks for the Hop-by-Hop Options header + IPv6: Add a check for the Jumbo Payload Hop-by-Hop option. + NFS: Fix the format for printing an unsigned int + PTP: fix printing of the correction fields + PTP: Use ND_LCHECK_U for checking invalid length. + WHOIS: Add its own printer source file and printer function + MPTCP: print length before subtype inside MPTCP options + ESP: Add a workaround to a "use-of-uninitialized-value". + PPP: Add tests to avoid incorrectly re-entering ppp_hdlc(). + PPP: Don't process further if protocol is unknown (-e option). + PPP: Change the pointer to packet data. + ZEP: Add three length checks. + Add some const qualifiers. + Building and testing: + Update config.guess and config.sub. + Use AS_HELP_STRING macro instead of AC_HELP_STRING. + Handle some Autoconf/make errors better. + Fix an error when cross-compiling. + Use "git archive" for the "make releasetar" process. + Remove the release candidate rcX targets. + Mend "make check" on Solaris 9 with Autoconf. + Address assorted compiler warnings. + Fix auto-enabling of Capsicum on FreeBSD with Autoconf. + Treat "msys" as Windows for test exit statuses. + Clean up some help messages in configure. + Use unified diff by default. + Remove awk code from mkdep. + Fix configure test errors with Clang 15 + CMake: Prevent stripping of the RPATH on installation. + AppVeyor CI: update Npcap site, update to 1.12 SDK. + Cirrus CI: Use the same configuration as for the main branch. + CI: Add back running tcpdump -J/-L and capture, now with Cirrus VMs. + Remove four test files (They are now in the libpcap tests directory). + On Solaris, for 64-bit builds, use the 64-bit pcap-config. + Tell CMake not to check for a C++ compiler. + CMake: Add a way to request -Werror and equivalents. + configure: Special-case macOS /usr/bin/pcap-config as we do in CMake. + configure: Use pcap-config --static-pcap-only if available. + configure: Use ac_c_werror_flag to force unknown compiler flags to fail. + configure: Use AC_COMPILE_IFELSE() and AC_LANG_SOURCE() for testing + flags. + Run the test that fails on OpenBSD only if we're not on OpenBSD. + Source code: + Fix some snapend-changing routines to protect against pointer + underflow. + Use __func__ from C99 in some function calls. + Memory allocator: Update nd_add_alloc_list() to a static function. + addrtoname.c: Fix two invalid tests. + Use more S_SUCCESS and S_ERR_HOST_PROGRAM in main(). + Add some comments about "don't use GET_IP6ADDR_STRING()". + Assign ndo->ndo_packetp in pretty_print_packet(). + Add ND_LCHECKMSG_U, ND_LCHECK_U, ND_LCHECKMSG_ZU and ND_LCHECK_ZU macros. + Update tok2strbuf() to a static function. + netdissect.h: Keep the link-layer dissectors names sorted. + setsignal(): Set SA_RESTART on non-lethal signals (REQ_INFO, FLUSH_PCAP) + to avoid corrupting binary pcap output. + Use __builtin_unreachable(). + Fail if nd_push_buffer() or nd_push_snaplen() fails. + Improve code style and fix many typos. + Documentation: + Some man page cleanups. + Update the print interface for the packet count to stdout. + Note that we require compilers to support at least some of C99. + Update AIX and Solaris-related specifics. + INSTALL.txt: Add doc/README.*, delete the deleted win32 directory. + Update README.md and README.Win32.md. + Update some comments with new RFC numbers. + +Wednesday, June 9, 2021 by gharris + Summary for 4.99.1 tcpdump release + Source code: + Squelch some compiler warnings + ICMP: Update the snapend for some nested IP packets. + MACsec: Update the snapend thus the ICV field is not payload + for the caller. + EIGRP: Fix packet header fields + SMB: Disable printer by default in CMake builds + OLSR: Print the protocol name even if the packet is invalid + MSDP: Print ": " before the protocol name + ESP: Remove padding, padding length and next header from the buffer + DHCPv6: Update the snapend for nested DHCPv6 packets + OpenFlow 1.0: Get snapend right for nested frames. + TCP: Update the snapend before decoding a MPTCP option + Ethernet, IEEE 802.15.4, IP, L2TP, TCP, ZEP: Add bounds checks + ForCES: Refine SPARSEDATA-TLV length check. + ASCII/hex: Use nd_trunc_longjmp() in truncation cases + GeoNet: Add a ND_TCHECK_LEN() call + Replace ND_TCHECK_/memcpy() pairs with GET_CPY_BYTES(). + BGP: Fix overwrites of global 'astostr' temporary buffer + ARP: fix overwrites of static buffer in q922_string(). + Frame Relay: have q922_string() handle errors better. + Building and testing: + Rebuild configure script when building release + Fix "make clean" for out-of-tree autotools builds + CMake: add stuff from CMAKE_PREFIX_PATH to PKG_CONFIG_PATH. + Documentation: + man: Update a reference as www.cifs.org is gone. [skip ci] + man: Update DNS sections + Solaris: + Fix a compile error with Sun C + +Wednesday, December 30, 2020, by mcr@sandelman.ca, denis and fxl. + Summary for 4.99.0 tcpdump release + CVE-2018-16301: For the -F option handle large input files safely. + Improve the contents, wording and formatting of the man page. + Print unsupported link-layer protocol packets in hex. + Add support for new network protocols and DLTs: Arista, Autosar SOME/IP, + Broadcom LI and Ethernet switches tag, IEEE 802.15.9, IP-over-InfiniBand + (IPoIB), Linux SLL2, Linux vsockmon, MACsec, Marvell Distributed Switch + Architecture, OpenFlow 1.3, Precision Time Protocol (PTP), SSH, WHOIS, + ZigBee Encapsulation Protocol (ZEP). + Make protocol-specific updates for: AH, DHCP, DNS, ESP, FRF.16, HNCP, + ICMP6, IEEE 802.15.4, IPv6, IS-IS, Linux SLL, LLDP, LSP ping, MPTCP, NFS, + NSH, NTP, OSPF, OSPF6, PGM, PIM, PPTP, RADIUS, RSVP, Rx, SMB, UDLD, + VXLAN-GPE. + User interface: + Make SLL2 the default for Linux "any" pseudo-device. + Add --micro and --nano shorthands. + Add --count to print a counter only instead of decoding. + Add --print, to cause packet printing even with -w. + Add support for remote capture if libpcap supports it. + Display the "wireless" flag and connection status. + Flush the output packet buffer on a SIGUSR2. + Add the snapshot length to the "reading from file ..." message. + Fix local time printing (DST offset in timestamps). + Allow -C arguments > 2^31-1 GB if they can fit into a long. + Handle very large -f files by rejecting them. + Report periodic stats only when safe to do so. + Print the number of packets captured only as often as necessary. + With no -s, or with -s 0, don't specify the snapshot length with newer + versions of libpcap. + Improve version and usage message printing. + Building and testing: + Install into bindir, not sbindir. + autoconf: replace --with-system-libpcap with --disable-local-libpcap. + Require the compiler to support C99. + Better detect and use various C compilers and their features. + Add CMake as the second build system. + Make out-of-tree builds more reliable. + Use pkg-config to detect libpcap if available. + Improve Windows support. + Add more tests and improve the scripts that run them. + Test both with "normal" and "x87" floating-point. + Eliminate dependency on libdnet. + FreeBSD: + Print a proper error message about monitor mode VAP. + Use libcasper if available. + Fix failure to capture on RDMA device. + Include the correct capsicum header. + Source code: + Start the transition to longjmp() for packet truncation handling. + Introduce new helper functions, including GET_*(), nd_print_protocol(), + nd_print_invalid(), nd_print_trunc(), nd_trunc_longjmp() and others. + Put integer signedness right in many cases. + Introduce nd_uint*, nd_mac_addr, nd_ipv4 and nd_ipv6 types to fix + alignment issues, especially on SPARC. + Fix many C compiler, Coverity, UBSan and cppcheck warnings. + Fix issues detected with AddressSanitizer. + Remove many workarounds for older compilers and OSes. + Add a sanity check on packet header length. + Add and remove plenty of bounds checks. + Clean up pcap_findalldevs() call to find the first interface. + Use a short timeout, rather than immediate mode, for text output. + Handle DLT_ENC files *not* written on the same OS and byte-order host. + Add, and use, macros to do locale-independent case mapping. + Use a table instead of getprotobynumber(). + Get rid of ND_UNALIGNED and ND_TCHECK(). + Make roundup2() generally available. + Resync SMI list against Wireshark. + Fix many typos. + Friday, September 20, 2019, by mcr@sandelman.ca A huge thank you to Denis, Francois-Xavier and Guy who did much of the heavy lifting. Summary for 4.9.3 tcpdump release @@ -21,7 +282,6 @@ Friday, September 20, 2019, by mcr@sandelman.ca CVE-2018-14882 (RPL) CVE-2018-16227 (802.11) CVE-2018-16229 (DCCP) - CVE-2018-16301 (was fixed in libpcap) CVE-2018-16230 (BGP) CVE-2018-16452 (SMB) CVE-2018-16300 (BGP) @@ -66,8 +326,6 @@ Sunday September 3, 2017 denis@ovsienko.info CVE-2017-12991 (BGP) CVE-2017-12992 (RIPng) CVE-2017-12993 (Juniper) - CVE-2017-11542 (PIMv1) - CVE-2017-11541 (safeputs) CVE-2017-12994 (BGP) CVE-2017-12996 (PIMv2) CVE-2017-12998 (ISO IS-IS) @@ -393,7 +651,7 @@ Wednesday Jul. 2, 2014 mcr@sandelman.ca a number of unaligned access faults fixed -A flag does not consider CR to be printable anymore fx.lebail took over coverity baby sitting - default snapshot size increased to 256K for accomodate USB captures + default snapshot size increased to 256K for accommodate USB captures WARNING: this release contains a lot of very worthwhile code churn. Wednesday Jan. 15, 2014 guy@alum.mit.edu @@ -533,7 +791,7 @@ Tue. July 20, 2010. guy@alum.mit.edu. Summary for 4.1.2 tcpdump release If -U is specified, flush the file after creating it, so it's not zero-length - Fix TCP flags output description, and some typoes, in the man + Fix TCP flags output description, and some typos, in the man page Add a -h flag, and only attempt to recognize 802.11s mesh headers if it's set @@ -617,7 +875,7 @@ Mon. September 10, 2007. ken@xelerance.com. Summary for 3.9.8 tcpdump relea Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release - NFS: Print unsigned values as such. + NFS: Print unsigned values as such. RX: parse safely. BGP: fixes for IPv6-less builds. 801.1ag: use standard codepoint. @@ -628,7 +886,7 @@ Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release NFS: from NetBSD; don't interpret the reply as a possible NFS reply if it got MSG_DENIED. BGP: don't print TLV values that didn't fit, from www.digit-labs.org. - revised INSTALL.txt about libpcap dependancy. + revised INSTALL.txt about libpcap dependency. Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release Update man page to reflect changes to libpcap @@ -648,7 +906,7 @@ Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release Add support for CFM Link-trace msg, Link-trace-Reply msg, Sender-ID tlv, private tlv, port, interface status Add support for unidirectional link detection as per - http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt + https://tools.ietf.org/id/draft-foschiano-udld-02.txt Add support for the olsr protocol as per RFC 3626 plus the LQ extensions from olsr.org Add support for variable-length checksum in DCCP, as per section 9 of @@ -689,7 +947,7 @@ Tue. September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release Lots of minor cosmetic changes to output printers -Mon. September 19, 2005. ken@xelerance.com. Summary for 3.9.4 tcpdump release +Mon. September 19, 2005. ken@xelerance.com. Summary for 3.9.4 tcpdump release Decoder support for more Juniper link-layer types Fix a potential buffer overflow (although it can't occur in practice). @@ -708,14 +966,14 @@ Mon. September 19, 2005. ken@xelerance.com. Summary for 3.9.4 tcpdump release those TLVs as system IDs, not as node IDs. Support for DCCP. -Tue. July 5, 2005. ken@xelerance.com. Summary for 3.9.3 tcpdump release +Tue. July 5, 2005. ken@xelerance.com. Summary for 3.9.3 tcpdump release Option to chroot() when dropping privs Fixes for compiling on nearly every platform, including improved 64bit support Many new testcases Support for sending packets - Many compliation fixes on most platforms + Many compilation fixes on most platforms Fixes for recent version of GCC to eliminate warnings Improved Unicode support @@ -753,7 +1011,7 @@ Tue. March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release Mon. March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release Fixes for print-isakmp.c CVE: CAN-2004-0183, CAN-2004-0184 - http://www.rapid7.com/advisories/R7-0017.html + https://web.archive.org/web/20160328035955/https://www.rapid7.com/resources/advisories/R7-0017.jsp IP-over-IEEE1394 printing. some MINGW32 changes. updates for autoconf 2.5 @@ -826,7 +1084,6 @@ Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release 2.100.3 to be misrepresented as 4.20.3 . Monday, January 21, 2002. mcr@sandelman.ottawa.on.ca. Summary for 3.7 release -see http://www.tcpdump.org/cvs-log/2002-01-21.10:16:48.html for commit log. keyword "ipx" added. Better OSI/802.2 support on Linux. IEEE 802.11 support, from clenahan@fortresstech.com, achirica@ttd.net. @@ -894,7 +1151,7 @@ Tuesday January 9, 2001. mcr@sandelman.ottawa.on.ca. Summary for 3.6 release libpcap changes provide for exchanging capture files between systems. Save files now have well known PACKET_ values instead of - depending upon system dependant mappings of DLT_* types. + depending upon system dependent mappings of DLT_* types. Support for computing/checking IP and UDP/TCP checksums. @@ -1205,7 +1462,7 @@ v3.1 Thu Jun 13 20:59:32 PDT 1996 - Print out a little more information for sun rpc packets. -- Add suport for Kerberos 4 thanks to John Hawkinson (jhawk@mit.edu). +- Add support for Kerberos 4 thanks to John Hawkinson (jhawk@mit.edu). - Fixed the Fix EXTRACT_SHORT() and EXTRACT_LONG() macros (which were wrong on little endian machines). @@ -1370,7 +1627,7 @@ v2.2 Fri May 22 17:19:41 PDT 1992 v2.1 Tue Jan 28 11:00:14 PST 1992 -- Internal release (never publically exported). +- Internal release (never publicly exported). v2.0.1 Sun Jan 26 21:10:10 PDT diff --git a/contrib/tcpdump/CMakeLists.txt b/contrib/tcpdump/CMakeLists.txt new file mode 100644 index 000000000000..9495b5d4c234 --- /dev/null +++ b/contrib/tcpdump/CMakeLists.txt @@ -0,0 +1,1371 @@ +if(WIN32) + # + # We need 3.12 or later, so that we can set policy CMP0074; see + # below. + cmake_minimum_required(VERSION 3.12) +else(WIN32) + # + # For now, require only 2.8.6, just in case somebody is + # configuring with CMake on a "long-term support" version + # of some OS and that version supplies an older version of + # CMake. + # + # If this is ever updated to CMake 3.1 or later, remove the + # stuff in cmake/Modules/FindPCAP.cmake that appends subdirectories + # of directories from CMAKE_PREFIX_PATH to the PKG_CONFIG_PATH + # environment variable when running pkg-config, to make sure + # it finds any .pc file from there. + # + cmake_minimum_required(VERSION 2.8.12) +endif(WIN32) + +# +# We want find_path() and find_library() to honor {packagename}_ROOT, +# as that appears to be the standard way to say "hey, look here for +# this package" from the command line. +# +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +endif() + +# +# OK, this is a pain. +# +# When building on NetBSD, with a libpcap installed from pkgsrc, +# a -Wl,-rpath,/usr/pkg/lib option is added to the options when +# linking tcpdump. This puts /usr/pkg/lib into the run-time path. +# +# However, by default, CMake adds a rule to the install CMake script +# a CMake command (using an undocumented subcommand of file()) that +# strips /usr/pkg/lib *out* of the run-time path; the message in the +# output for the "install" target is +# +# -- Set runtime path of "{target-directory}/tcpdump" to "" +# +# I am not certain what the rationale is for doing this, but a +# *consequence* of this is that, when you run the installed tcpdump, +# it fails to find libpcap.so: +# +# $ {target-directory}/tcpdump -h +# {target-directory}/tcpdump: Shared object "libpcap.so.0" not found +# +# It also appears to be the case that, on Ubuntu 22.04, FreeBSD 12, +# DragonFly BSD 5.8, OpenBSD 6.6, and Solaris 11.4, +# +# On Ubuntu and Solaris, even if you have a libpcap in /usr/local, you +# have to provide not only -I/usr/local/include and -L/usr/local/lib, +# you also must provide -Wl,-rpath,/usr/local/lib in order to have +# the run-time linker look in /usr/local/lib for libpcap. If it's not +# specified, then, if the shared library major version number of the +# libpcap in /usr/lib is the same as the shared major version number +# of the libpcap in /usr/local/lib, the run-time linker will find the +# libpcap in /usr/lib; if the versions are different, the run-time +# linker will fail to find the libpcap in /usr/lib, so the program will +# fail to run. +# +# We suppress this by setting CMAKE_INSTALL_RPATH_USE_LINK_PATH to TRUE; +# as the documentation for that variable says: +# +# Add paths to linker search and installed rpath. +# +# CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to True +# will append to the runtime search path (rpath) of installed +# binaries any directories outside the project that are in the linker +# search path or contain linked library files. The directories are +# appended after the value of the INSTALL_RPATH target property. +# +# If, for whatever reason, directories in which we search for external +# libraries, other than the standard system library directories, are +# added to the executable's rpath in the build process, we most +# defintely want them in the installed image's rpath if they are +# necessary in order to find the libraries at run time. +# +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) + +# +# OK, this is a royal pain. +# +# CMake will try to determine the sizes of some data types, including +# void *, early in the process of configuration; apparently, it's done +# as part of processing the project() command. +# +# At least as of CMake 2.8.6, it does so by checking the size of +# "void *" in C, setting CMAKE_C_SIZEOF_DATA_PTR based on that, +# setting CMAKE_SIZEOF_VOID_P to that, and then checking the size +# of "void *" in C++, setting CMAKE_CXX_SIZEOF_DATA_PTR based on +# that, and then setting CMAKE_SIZEOF_VOID_P to *that*. +# +# The compile tests include whatever C flags may have been provided +# to CMake in the CFLAGS and CXXFLAGS environment variables. +# +# If you set an architecture flag such as -m32 or -m64 in CFLAGS +# but *not* in CXXFLAGS, the size for C++ will win, and hilarity +# will ensue. +# +# Or if, at least on Solaris, you have a newer version of GCC +# installed, but *not* a newer version of G++, and you have Oracle +# Studio installed, it will find GCC, which will default to building +# 64-bit, and Oracle Studio's C++ compiler, which will default to +# building 32-bit, the size for C++ will win, and, again, hilarity +# will ensue. +# +# So we *explicitly* state that only C is used; there is currently no +# C++ code in tcpdump. +# +project(tcpdump C) + +# +# For checking if a compiler flag works and adding it if it does. +# +include(CheckCCompilerFlag) +macro(check_and_add_compiler_option _option) + message(STATUS "Checking C compiler flag ${_option}") + string(REPLACE "=" "-" _temp_option_variable ${_option}) + string(REGEX REPLACE "^-" "" _option_variable ${_temp_option_variable}) + check_c_compiler_flag("${_option}" ${_option_variable}) + if(${${_option_variable}}) + set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} ${_option}") + endif() +endmacro() + +# +# If we're building with Visual Studio, we require Visual Studio 2015, +# in order to get sufficient C99 compatibility. Check for that. +# +# If not, try the appropriate flag for the compiler to enable C99 +# features. +# +set(C_ADDITIONAL_FLAGS "") +if(MSVC) + if(MSVC_VERSION LESS 1900) + message(FATAL_ERROR "Visual Studio 2015 or later is required") + endif() + + # + # Treat source files as being in UTF-8 with MSVC if it's not using + # the Clang front end. + # We assume that UTF-8 source is OK with other compilers and with + # MSVC if it's using the Clang front end. + # + if(NOT ${CMAKE_C_COMPILER} MATCHES "clang*") + set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} /utf-8") + endif(NOT ${CMAKE_C_COMPILER} MATCHES "clang*") +else(MSVC) + # + # Try to enable as many C99 features as we can. + # At minimum, we want C++/C99-style // comments. + # + # Newer versions of compilers might default to supporting C99, but + # older versions may require a special flag. + # + # Prior to CMake 3.1, setting CMAKE_C_STANDARD will not have any effect, + # so, unless and until we require CMake 3.1 or later, we have to do it + # ourselves on pre-3.1 CMake, so we just do it ourselves on all versions + # of CMake. + # + # Note: with CMake 3.1 through 3.5, the only compilers for which CMake + # handles CMAKE_C_STANDARD are GCC and Clang. 3.6 adds support only + # for Intel C; 3.9 adds support for PGI C, Sun C, and IBM XL C, and + # 3.10 adds support for Cray C and IAR C, but no version of CMake has + # support for HP C. Therefore, even if we use CMAKE_C_STANDARD with + # compilers for which CMake supports it, we may still have to do it + # ourselves on other compilers. + # + # See the CMake documentation for the CMAKE__COMPILER_ID variables + # for a list of compiler IDs. + # + # XXX - this just tests whether the option works and adds it if it does. + # We don't test whether it's necessary in order to get the C99 features + # that we use; if we ever have a user who tries to compile with a compiler + # that can't be made to support those features, we can add a test to make + # sure we actually *have* C99 support. + # + if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR + CMAKE_C_COMPILER_ID MATCHES "Clang") + check_and_add_compiler_option("-std=gnu99") + elseif(CMAKE_C_COMPILER_ID MATCHES "XL") + # + # We want support for extensions picked up for GNU C compatibility, + # so we use -qlanglvl=extc99. + # + check_and_add_compiler_option("-qlanglvl=extc99") + elseif(CMAKE_C_COMPILER_ID MATCHES "HP") + check_and_add_compiler_option("-AC99") + elseif(CMAKE_C_COMPILER_ID MATCHES "Sun") + check_and_add_compiler_option("-xc99") + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + check_and_add_compiler_option("-c99") + endif() +endif(MSVC) + +set(LIBRARY_NAME netdissect) + +################################################################### +# Parameters +################################################################### + +option(WITH_SMI "Build with libsmi, if available" ON) +option(WITH_CRYPTO "Build with OpenSSL/libressl libcrypto, if available" ON) +option(WITH_CAPSICUM "Build with Capsicum security functions, if available" ON) +option(WITH_CAP_NG "Use libcap-ng, if available" ON) +option(ENABLE_SMB "Build with the SMB dissector" OFF) + +# +# String parameters. Neither of them are set, initially; only if the +# user explicitly configures them are they set. +# +# WITH_CHROOT is STRING, not PATH, as the directory need not exist +# when CMake is run. +# +set(WITH_CHROOT CACHE STRING + "Directory to which to chroot when dropping privileges") +set(WITH_USER CACHE STRING + "User to whom to set the UID when dropping privileges") + +# +# By default, build universal with the appropriate set of architectures +# for the OS on which we're doing the build. +# +if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "") + # + # Get the major version of Darwin. + # + string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MAJOR "${CMAKE_SYSTEM_VERSION}") + + if(SYSTEM_VERSION_MAJOR EQUAL 9) + # + # Leopard. Build for x86 and 32-bit PowerPC, with + # x86 first. (That's what Apple does.) + # + set(CMAKE_OSX_ARCHITECTURES "i386;ppc") + elseif(SYSTEM_VERSION_MAJOR EQUAL 10) + # + # Snow Leopard. Build for x86-64 and x86, with + # x86-64 first. (That's what Apple does.) + # + set(CMAKE_OSX_ARCHITECTURES "x86_64;i386") + endif() +endif() + +################################################################### +# Versioning +################################################################### + +# Get, parse, format and set tcpdump's version string from +# [tcpdump_root]/VERSION for later use. + +# Get MAJOR, MINOR, PATCH & SUFFIX +file(STRINGS ${tcpdump_SOURCE_DIR}/VERSION *** 126631 LINES SKIPPED *** From nobody Wed Jan 29 19:33:34 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 4YjslM1CVtz5lrPy; Wed, 29 Jan 2025 19:33: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 4YjslL6Cbcz3QrT; Wed, 29 Jan 2025 19:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179214; 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=vn5kerF7LZ1iKgic7v140wBUzHfOGXn2n0mX0bPI7H8=; b=IzwE6IU0fqLqLBeRvwdGTOlS3jkgGBxYfNd3oBaCnQwjF03dvOt4utzgEdi5p+IkG6DbUM PBWcrN8I//k8qjEUFkRdT9/biq5V1U9BvSWRhhAqM+fF2/rnRFCewDWYqIilI/cBjv73RR 7glGqID8q3jEsxmB8G2ZmIIl7e28zy4iUXUpo+huFSzvvWqNhZbFCsakbqvnNLPstDcBpy Pbtud1B+DFg2h8Rfrw384Om8tldVUMAFsHRlsWG8YgMmgHo65juUtItoB41l1rgyqJqwSc Icg6aLYI9nirixr3ahHqIyFFZfn686Y6MNO/Vcgfq8qcmCOen/3StUEYcfmC5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179214; 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=vn5kerF7LZ1iKgic7v140wBUzHfOGXn2n0mX0bPI7H8=; b=V5UzZxh+MDGLISErkdBNZjWGea/g0lkXG4bcVtf+W2wzMzAwQp4Fo8akqANyq9ksq/qbF+ mEkUDlPjexjI29Y26h9HN7rmqBh4s5TuaObsbP0eFMwpfCVU6/e6lXLrLqPWpNMRQvJHmX BEcIInL4vavR7mKNhplvRyspdbc+1bx1hzxxOjvOMYGm5geEvkrNMxcO0K85lUIcYpiyDM H0F2vnZUNhq2985PNF/ZozUtLDQxhSS4ChoYzh0ZwDCKDNWvqZ0OVIT+3dRFeSp2A3eedA z8ckM+uQbtRIb4Z167dJ/ZqwhiqhTYyrOvaTYIMMczcv8xPAajs1DU0DEuKZrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179214; a=rsa-sha256; cv=none; b=Od7ACiylUY7hWTLtP8LfRe8mFFVeqOdKwK+1IGdoYihb1AeWruA2W35mRAIdBTBWduC8so 3XBbItwjwh9cU0XfJlI26FS0YMci1IhZ2rPPXPYJL5SwQhrB8iKnv+ysRYVEUN5yM4KX2T gx3XBWusV/y7pmjS0Ev0OM6fWqREJrswZ3hHxjrTxDHQoWUJUz967od1x7eq5zs5ZxW3j6 vHupWOAWeiu4sFnIXl7azNIbmzXsVhi/lfvNpBZ1khsPUtmEgBzglQuy+f2b+7iA16FKi1 EGsjrYuVUQCC4sdgkVUW4PVxppa8cMuW902sz7CLHbkj0DjbVzMz5tEaK99rtA== 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 4YjslL4TPpzpw; Wed, 29 Jan 2025 19:33:34 +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 50TJXYLP039818; Wed, 29 Jan 2025 19:33:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXY6R039815; Wed, 29 Jan 2025 19:33:34 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:34 GMT Message-Id: <202501291933.50TJXY6R039815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: f68d1f3ef23f - stable/13 - tcpdump: ppp: Use the buffer stack for the de-escaping buffer 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f68d1f3ef23f4a409535051d541e8e97f45eae3c Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=f68d1f3ef23f4a409535051d541e8e97f45eae3c commit f68d1f3ef23f4a409535051d541e8e97f45eae3c Author: Guy Harris AuthorDate: 2024-09-03 17:11:16 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:29 +0000 tcpdump: ppp: Use the buffer stack for the de-escaping buffer This both saves the buffer for freeing later and saves the packet pointer and snapend to be restored when packet processing is complete, even if an exception is thrown with longjmp. This means that the hex/ASCII printing in pretty_print_packet() processes the packet data as captured or read from the savefile, rather than as modified by the PPP printer, so that the bounds checking is correct. That fixes CVE-2024-2397, which was caused by an exception being thrown by the hex/ASCII printer (which should only happen if those routines are called by a packet printer, not if they're called for the -X/-x/-A flag), which jumps back to the setjmp() that surrounds the packet printer. Hilarity^Winfinite looping ensues. Also, restore ndo->ndo_packetp before calling the hex/ASCII printing routine, in case nd_pop_all_packet_info() didn't restore it. Reviewed by: emaste (cherry picked from commit f8860353d4f4c25bacdae5bc1cfb7a95edc9bfe0) --- contrib/tcpdump/print-ppp.c | 31 +++++++++++++++++-------------- contrib/tcpdump/print.c | 8 ++++++-- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/contrib/tcpdump/print-ppp.c b/contrib/tcpdump/print-ppp.c index aba243ddb6f2..e5ae0646ebae 100644 --- a/contrib/tcpdump/print-ppp.c +++ b/contrib/tcpdump/print-ppp.c @@ -42,6 +42,8 @@ #include #endif +#include + #include "netdissect.h" #include "extract.h" #include "addrtoname.h" @@ -1363,7 +1365,6 @@ ppp_hdlc(netdissect_options *ndo, u_char *b, *t, c; const u_char *s; u_int i, proto; - const void *sb, *se; if (caplen == 0) return; @@ -1371,9 +1372,11 @@ ppp_hdlc(netdissect_options *ndo, if (length == 0) return; - b = (u_char *)nd_malloc(ndo, caplen); - if (b == NULL) - return; + b = (u_char *)malloc(caplen); + if (b == NULL) { + (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, + "%s: malloc", __func__); + } /* * Unescape all the data into a temporary, private, buffer. @@ -1394,13 +1397,15 @@ ppp_hdlc(netdissect_options *ndo, } /* - * Change the end pointer, so bounds checks work. - * Change the pointer to packet data to help debugging. + * Switch to the output buffer for dissection, and save it + * on the buffer stack so it can be freed; our caller must + * pop it when done. */ - sb = ndo->ndo_packetp; - se = ndo->ndo_snapend; - ndo->ndo_packetp = b; - ndo->ndo_snapend = t; + if (!nd_push_buffer(ndo, b, b, (u_int)(t - b))) { + free(b); + (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, + "%s: can't push buffer on buffer stack", __func__); + } length = ND_BYTES_AVAILABLE_AFTER(b); /* now lets guess about the payload codepoint format */ @@ -1442,13 +1447,11 @@ ppp_hdlc(netdissect_options *ndo, } cleanup: - ndo->ndo_packetp = sb; - ndo->ndo_snapend = se; + nd_pop_packet_info(ndo); return; trunc: - ndo->ndo_packetp = sb; - ndo->ndo_snapend = se; + nd_pop_packet_info(ndo); nd_print_trunc(ndo); } diff --git a/contrib/tcpdump/print.c b/contrib/tcpdump/print.c index 41a6b524fbf8..96d34b772f08 100644 --- a/contrib/tcpdump/print.c +++ b/contrib/tcpdump/print.c @@ -434,10 +434,14 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h, nd_pop_all_packet_info(ndo); /* - * Restore the original snapend, as a printer might have - * changed it. + * Restore the originals snapend and packetp, as a printer + * might have changed them. + * + * XXX - nd_pop_all_packet_info() should have restored the + * original values, but, just in case.... */ ndo->ndo_snapend = sp + h->caplen; + ndo->ndo_packetp = sp; if (ndo->ndo_Xflag) { /* * Print the raw packet data in hex and ASCII. From nobody Wed Jan 29 19:33: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 4YjslN5548z5lrGh; Wed, 29 Jan 2025 19:33: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 4YjslN2V5Pz3QtW; Wed, 29 Jan 2025 19:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179216; 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=Sf8UO8yN2jrgdVuAviRMwf0lLaCmfKZ41iPeEsCG3Bw=; b=EQcKK+P360k1nOY5xlLK/hCAPqWCMvY3HUiEPujgGNx48lNiNHsbC92TVsUUvQ1CPrcIXk sMwmA2vmrfs2s4IJVjiwwRAVj/KcaYeOYTJMfsf0ZEjmNdG61IG3clFWhNHoUOqWu6aDjD p+FHb0b/u6knDWO41CU+b40Xi4dAlGr6SbBhIjGuZT16VKtbdrT94BVgseFpqsYs8VLMY8 Ut1uq28UCk6bzdGklP2nhJED8I5WG2SSYaCat3vR04C9MB9Tlvd0i3kYmtCCyNU4icuW50 D2p3zi2+a4weU2PVR3Ge3h/Xum/euYPVkHfSFXaqm5aAuQ+eCoZGa2NNx+yMLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179216; 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=Sf8UO8yN2jrgdVuAviRMwf0lLaCmfKZ41iPeEsCG3Bw=; b=O/3D9IL9+I1cyiih+cBDqiwPp370IFhfRjpdNBm9Ka4KA4PA77y0KHls09fNczc4KxwCLD c4cNSNM+HxuDjKdMlz1ii5T2vjMJnMvmDVOcCg03EOE86Ac4yjVeluRi7lTrSiBJ5AXIdD ZmMDXIVhQo5XJ0bN957r6kxoQKbYYiIK7Gd6E0cfE/KBX1uhYBxwW9YMHFQRtrxvUA5gkT xHZWIVARfUgczEALDfieGoOKnWykTwmYzRjOCsKvWrhNgcrvjlHMaTWw7k/55KvD/6EjrZ a1QQS4KWxrI/F5hn+Um3744VYj6qL68jKit9AGjQc00eocZjzjMplcyDL10AiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179216; a=rsa-sha256; cv=none; b=WLxcoCy9XMIRxfB9cJWxgJ/FrN1RhUdhoZ/Phwryu/WjVYLavzvS22lVIAQ5ZWgkqcujvh /ChMxCkge9u2b1uKkJiI+a022m7ctVPfFH6kliPIb8IiRfL9KQ1/yG9rP/o77oX60xzu4n 7AqL0S0KomVSf3HoZs67ouGDqOaVASiH/wlZUQ5PuV8+7S2/iQuTbfheKCKa7LYlLdXTSF 0wA2mc+3zXbY7qIOhyUUwQklE96yGYAKwhb1FdoZ8JUKLgzGhHt2DRskLuE58yxPuk0uHO d5FUrgdwdM4e4gIWkv4J3zC4z4cXnkTWTGrlus854vh0bRiJfx4yZV79qRsjow== 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 4YjslN0md2zYk; Wed, 29 Jan 2025 19:33: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 50TJXaeM039855; Wed, 29 Jan 2025 19:33:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXZla039852; Wed, 29 Jan 2025 19:33:35 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:35 GMT Message-Id: <202501291933.50TJXZla039852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: 68ddf72800f8 - stable/13 - libpcap: Update to 1.10.5 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 68ddf72800f81ea725785848e9919a4a23acf411 Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=68ddf72800f81ea725785848e9919a4a23acf411 commit 68ddf72800f81ea725785848e9919a4a23acf411 Author: Joseph Mingrone AuthorDate: 2024-09-14 17:09:34 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:29 +0000 libpcap: Update to 1.10.5 Reviewed by: kp (pflogd changes) Sponsored by: The FreeBSD Foundation (cherry picked from commit afdbf109c6a661a729938f68211054a0a50d38ac) (cherry picked from commit ecb75be376a3e18d3e4836b6ee07015264784694) (cherry picked from commit f0bcebe67ef6cf9f104535d6cd9f151c1b61dd6a) (cherry picked from commit 34aa6f2c2db5cc9655f201a1ef01adbb9fb484d5) --- contrib/libpcap/CHANGES | 181 +- contrib/libpcap/CMakeLists.txt | 1021 +- contrib/libpcap/CREDITS | 17 + contrib/libpcap/INSTALL.md | 84 +- contrib/libpcap/Makefile.in | 168 +- contrib/libpcap/TODO | 5 - contrib/libpcap/VERSION | 2 +- contrib/libpcap/aclocal.m4 | 227 +- contrib/libpcap/atmuni31.h | 2 +- contrib/libpcap/autogen.sh | 25 + contrib/libpcap/bpf_dump.c | 2 - contrib/libpcap/bpf_filter.c | 16 +- contrib/libpcap/bpf_image.c | 6 +- contrib/libpcap/charconv.c | 4 +- contrib/libpcap/cmake/Modules/Finddpdk.cmake | 2 +- contrib/libpcap/cmakeconfig.h.in | 6 +- contrib/libpcap/config.guess | 62 +- contrib/libpcap/config.h.in | 28 +- contrib/libpcap/config.sub | 230 +- contrib/libpcap/configure | 10815 ++++++++++--------- contrib/libpcap/configure.ac | 145 +- contrib/libpcap/diag-control.h | 174 +- contrib/libpcap/dlpisubs.c | 22 +- contrib/libpcap/doc/README.haiku.md | 57 + contrib/libpcap/doc/README.hpux | 2 +- .../doc/{README.Win32.md => README.windows.md} | 0 contrib/libpcap/etherent.c | 6 +- contrib/libpcap/extract.h | 2 +- contrib/libpcap/fad-getad.c | 30 +- contrib/libpcap/fad-gifc.c | 24 +- contrib/libpcap/fad-glifc.c | 28 +- contrib/libpcap/fmtutils.c | 59 +- contrib/libpcap/fmtutils.h | 10 +- contrib/libpcap/ftmacros.h | 4 +- contrib/libpcap/gencode.c | 596 +- contrib/libpcap/gencode.h | 4 +- contrib/libpcap/grammar.y.in | 140 +- contrib/libpcap/install-sh | 689 +- contrib/libpcap/missing/asprintf.c | 8 +- contrib/libpcap/missing/strlcat.c | 6 +- contrib/libpcap/missing/strlcpy.c | 6 +- contrib/libpcap/missing/strtok_r.c | 4 +- contrib/libpcap/missing/win_asprintf.c | 6 +- contrib/libpcap/mkdep | 28 +- contrib/libpcap/msdos/makefile | 2 +- contrib/libpcap/msdos/makefile.dj | 4 +- contrib/libpcap/msdos/makefile.wc | 6 +- contrib/libpcap/msdos/pktdrvr.c | 2 +- contrib/libpcap/msdos/pktdrvr.h | 2 +- contrib/libpcap/msdos/readme.dos | 4 +- contrib/libpcap/nametoaddr.c | 57 +- contrib/libpcap/nlpid.h | 2 +- contrib/libpcap/optimize.c | 34 +- contrib/libpcap/pcap-airpcap.c | 53 +- contrib/libpcap/pcap-bpf.c | 417 +- contrib/libpcap/pcap-bt-linux.c | 56 +- contrib/libpcap/pcap-bt-monitor-linux.c | 38 +- contrib/libpcap/pcap-common.c | 405 +- contrib/libpcap/pcap-config.1 | 108 +- contrib/libpcap/pcap-config.in | 11 +- contrib/libpcap/pcap-dag.c | 103 +- contrib/libpcap/pcap-dbus.c | 12 +- contrib/libpcap/pcap-dlpi.c | 72 +- contrib/libpcap/pcap-dos.c | 22 +- contrib/libpcap/pcap-dpdk.c | 32 +- contrib/libpcap/pcap-enet.c | 6 +- contrib/libpcap/pcap-filter.manmisc.in | 15 +- contrib/libpcap/pcap-haiku.c | 504 + contrib/libpcap/pcap-haiku.cpp | 305 - contrib/libpcap/pcap-int.h | 187 +- contrib/libpcap/pcap-libdlpi.c | 26 +- contrib/libpcap/pcap-linux.c | 654 +- contrib/libpcap/pcap-netfilter-linux.c | 61 +- contrib/libpcap/pcap-netmap.c | 24 +- contrib/libpcap/pcap-new.c | 31 +- contrib/libpcap/pcap-nit.c | 44 +- contrib/libpcap/pcap-npf.c | 296 +- contrib/libpcap/pcap-null.c | 10 +- contrib/libpcap/pcap-pf.c | 59 +- contrib/libpcap/pcap-rdmasniff.c | 16 +- contrib/libpcap/pcap-rpcap-int.h | 75 - contrib/libpcap/pcap-rpcap.c | 199 +- contrib/libpcap/pcap-savefile.manfile.in | 64 +- contrib/libpcap/pcap-septel.c | 14 +- contrib/libpcap/pcap-sita.c | 42 +- contrib/libpcap/pcap-sita.html | 4 +- contrib/libpcap/pcap-snf.c | 46 +- contrib/libpcap/pcap-snit.c | 57 +- contrib/libpcap/pcap-snoop.c | 54 +- contrib/libpcap/pcap-tc.c | 66 +- contrib/libpcap/pcap-tstamp.manmisc.in | 7 +- contrib/libpcap/pcap-usb-linux-common.c | 130 - contrib/libpcap/pcap-usb-linux-common.h | 107 +- contrib/libpcap/pcap-usb-linux.c | 95 +- contrib/libpcap/pcap-util.c | 287 +- contrib/libpcap/pcap-util.h | 6 +- contrib/libpcap/pcap.3pcap.in | 24 +- contrib/libpcap/pcap.c | 439 +- contrib/libpcap/pcap/can_socketcan.h | 25 +- contrib/libpcap/pcap/dlt.h | 75 +- contrib/libpcap/pcap/funcattrs.h | 106 +- contrib/libpcap/pcap/namedb.h | 27 +- contrib/libpcap/pcap/nflog.h | 2 +- contrib/libpcap/pcap/pcap-inttypes.h | 2 +- contrib/libpcap/pcap/pcap.h | 89 +- contrib/libpcap/pcap/sll.h | 1 + contrib/libpcap/pcap/socket.h | 56 +- contrib/libpcap/pcap/usb.h | 6 + contrib/libpcap/pcap_activate.3pcap | 12 +- contrib/libpcap/pcap_breakloop.3pcap | 2 +- contrib/libpcap/pcap_compile.3pcap.in | 3 +- contrib/libpcap/pcap_create.3pcap | 12 +- contrib/libpcap/pcap_dump.3pcap | 3 +- contrib/libpcap/pcap_findalldevs.3pcap | 43 +- contrib/libpcap/pcap_init.3pcap | 15 +- contrib/libpcap/pcap_lookupdev.3pcap | 10 +- contrib/libpcap/pcap_lookupnet.3pcap | 21 +- contrib/libpcap/pcap_loop.3pcap | 24 +- contrib/libpcap/pcap_next_ex.3pcap | 11 +- contrib/libpcap/pcap_offline_filter.3pcap | 3 +- contrib/libpcap/pcap_open_live.3pcap | 30 +- contrib/libpcap/pcap_open_offline.3pcap.in | 13 +- contrib/libpcap/pcap_set_tstamp_precision.3pcap.in | 3 +- contrib/libpcap/pcap_setnonblock.3pcap | 40 +- contrib/libpcap/pcap_strerror.3pcap | 14 +- contrib/libpcap/portability.h | 27 +- contrib/libpcap/ppp.h | 2 +- contrib/libpcap/rpcap-protocol.c | 4 +- contrib/libpcap/rpcap-protocol.h | 6 +- contrib/libpcap/rpcapd/CMakeLists.txt | 29 +- contrib/libpcap/rpcapd/Makefile.in | 4 +- contrib/libpcap/rpcapd/config_params.h | 2 +- contrib/libpcap/rpcapd/daemon.c | 70 +- contrib/libpcap/rpcapd/daemon.h | 4 +- contrib/libpcap/rpcapd/fileconf.c | 18 +- contrib/libpcap/rpcapd/log.c | 2 - contrib/libpcap/rpcapd/rpcapd-config.manfile.in | 12 +- contrib/libpcap/rpcapd/rpcapd.c | 62 +- contrib/libpcap/rpcapd/rpcapd.manadmin.in | 54 +- contrib/libpcap/rpcapd/win32-svc.c | 2 +- contrib/libpcap/savefile.c | 38 +- contrib/libpcap/scanner.l | 171 +- contrib/libpcap/sf-pcap.c | 150 +- contrib/libpcap/sf-pcapng.c | 24 +- contrib/libpcap/sockutils.c | 123 +- contrib/libpcap/sockutils.h | 26 +- contrib/libpcap/sslutils.c | 4 +- contrib/libpcap/sslutils.h | 10 +- contrib/libpcap/testprogs/Makefile.in | 2 +- contrib/libpcap/testprogs/filtertest.c | 6 +- contrib/libpcap/testprogs/findalldevstest-perf.c | 2 - contrib/libpcap/testprogs/findalldevstest.c | 8 +- contrib/libpcap/testprogs/valgrindtest.c | 4 +- contrib/libpcap/thread-local.h | 72 + contrib/pf/pflogd/pflogd.c | 11 + lib/libpcap/Makefile | 1 - lib/libpcap/config.h | 4 +- 157 files changed, 12381 insertions(+), 9570 deletions(-) diff --git a/contrib/libpcap/CHANGES b/contrib/libpcap/CHANGES index c574a278064f..bf8701c829a0 100644 --- a/contrib/libpcap/CHANGES +++ b/contrib/libpcap/CHANGES @@ -1,3 +1,168 @@ +Friday, August 30, 2024 / The Tcpdump Group + Summary for 1.10.5 libpcap release + Source code: + Spell WirelessHART details properly. + Mark pcap_vasprintf() as printf-like. + Finalize moving of bpf_filter.c. (GH #1166) + Remove an unneeded argument from gen_mcode6(). + Don't do some Berkeley YACC workarounds with YACC releases not + requiring them. + Use correct data types rather than int in some cases. + Squelch compiler warning in grammar.c. + Fix findalldevtest compilation if IPv6 isn't enabled. + Rename helper routines for pcap modules to have names beginning with + pcapint_, to avoid namespace collisions for code linking statically + with libpcap. + Avoid casting hack for the Windows cleanup-on-exit routine. + Use %zu format for one case of printing a size_t. + Fix some Coverity errors. + Fix availabilities of some functions to match reality. + pcap: make the seconds and microseconds/nanoseconds fields unsigned. + Remove the unused pcap-rpcap-int.h header file. + Thread safety: + Make some static variables thread-local; fixes issue #1174. + Packet filtering: + Improve reporting of some invalid filter expressions. + Return an error from pcap_compile() if the scanner fails to initialize. + Optimizer fix from Archit Shah to recompute dominators after + moving code (#976); fixes #945 (although the resulting filter + isn't empty). + Optimizer fix from Archit Shah to mark value as unknown when store + of that value is deleted (#972); fixes #143, #434, #436, #437, + and #1076. + Linux: + Properly return warnings. + Don't use DLT_LINUX_SLL2 for anything other than the "any" device. + Avoid 32-bit unsigned integer overflow in USB captures. Fixes + issues #1134 and #1205. + Fix a file descriptor leak. + Properly report warnings about unknown ARPHRD_ types. + Fix DLT_CAN_SOCKETCAN handling of CAN FD. + Add CAN XL support to DLT_CAN_SOCKETCAN. + Clean up the code that sets the "real" ("original") length for + isochronous USB transfers. + Avoid unnecessary blocking on recvmsg() in the Bluetooth monitor and + Bluetoth modules. + Solaris: + Handle BPF returning ESRCH for unknown devices. + List the "any" device if it's supported. + Report {non-existent zone}/{interface} errors appropriately. + Allow attaching to links owned by a non-global zone. (Based on + pull request #1202.) + Fix AF_LINK handling on illumos. + macOS: + Redid the availability macros to be closer to what Apple's doing + in recent SDKs, including tagging pcap-namedb.h routines. + Fix the install name of the installed shared library to have a + full path when building with CMake. + Fix universal builds. + Haiku: + Convert the module to C. Fixes issue #1114. + Address a few compiler warnings. Fixes issue #1114. + Fix various build problems. Fixes issue #1114. + Report non-existent devices correctly. + Fix handling of packet statistics. + Fix packet timestamping. + Fix packet filtering with low snaplen. + Improve connection status reporting. + Add support for promiscuous mode. + Detect DLTs and loopback capture support at run time. + Report IEEE 802.11 as PCAP_IF_WIRELESS. + Windows: + Fix internal handling of "not supported" error codes from NPF. + Work around a bug in Npcap 1.00 in case of driver version mismatch. + Don't call WSACleanup() when handling a failed WSAStartup(). + BSD, macOS, AIX, Solaris 11, Linux: + Add a new error PCAP_ERROR_CAPTURE_NOTSUP, for use if a capture + mechanism is not present, in the hopes that, for example, + attempts to capture on Windows Services for Linux 1, in which + the NT kernel attempts to simulate Linux system calls but does + not support packet sockets, can get an error that better + indicates the underlying problem. + AirPcap: + Format an error message if we run out of memory. + nflog: + Fix count of dropped packets. + Make sure we don't overflow when rounding up the TLV length. + rpcap: + Handle routines removed in at least some OpenSSL libraries. + CVE-2023-7256: Clean up sock_initaddress() and its callers to avoid + double frees in some cases. + Don't define SOCKET ourselves; instead, define PCAP_SOCKET as int + on UN*Xes and as SOCKET on Windows. + CVE-2024-8006: Fix pcap_findalldevs_ex() not to crash if passed a + file:// URL with a path to a directory that cannot be opened. + Savefiles: + Handle DLT_/LINKTYPE_ mapping better, to handle some + OpenBSD-specific link types better. + Treat if_tsoffset as signed in pcapng files, as the spec says. + Don't try to fix the "real" length for isochronous USB + transfers if the number of USB descriptors is too large. + Reject pcap files where one of the reserved fields in the + "link-layer type plus other stuff" is non-zero. + Building and testing: + Add a configure option to help debugging (--enable-instrument-functions). + Improved tests and error reporting for uses of pkg-config, and + improve help message. + Fix Haiku build. + With CMake, install headers in CMAKE_INSTALL_INCLUDEDIR rather + than just include. + Build libpcap.a before building test programs. + Print address family numerically, as well as symbolically, + in findalldevstest. + Fail with suggestions, rather than failing over to no capture + support, if no capture mechanism was found. Fixes issue #1016. + Don't indent comments in Make, as that may cause them not to be + recognized as comments. + Don't check for libssl if we aren't going to use it. + Better handle enabling and disabling of sanitizers. Fixes issue + #1171. + CMakeLists.txt: Print "Symlinking: /some/path to ..." conditionally. + Evaluate CMAKE_INSTALL_PREFIX at install time. + cmake: Update the minimum required version to 2.8.12 (except Windows). + cmake: suppress CMP0042 OLD deprecated warning. + Makefile.in: Add the releasecheck target. + Cirrus CI: Add the "make releasecheck" command in the Linux task. + Makefile.in: Add the whitespacecheck target. + Cirrus CI: Run the "make whitespacecheck" command in the Linux task. + Autoconf: Update config.{guess,sub}, timestamps 2024-01-01. + Autoconf: Update the install-sh script to the 2020-11-14.01 version. + Compile with '-Wnull-pointer-subtraction', + '-Wunused-but-set-parameter', and '-Wunused-but-set-variable' in + devel mode if supported. + Don't ignore spaces between CMAKE_C_FLAGS and DPDK_C_FLAGS with + CMake. + Use noreturn and __format__ with XL C 7.0 and later. + Check for the same -W flags in autotools and CMake. + Autoconf: Add autogen.sh, remove configure and config.h.in and put + these generated files in the release tarball. + Autoconf: Get the size of a time_t. + Fix propagation of cc_werr_cflags() output. + Makefile.in(s): Fix the depend target. + mkdep: Exit with a non-zero status if a command fails. + Fix HCI_CHANNEL_MONITOR detection with musl libc. + Extend "make shellcheck" onto mkdep too. + Add initial support for building with TinyCC. + Address all known compiler warnings specific to illumos, Linux, NetBSD, + Solaris and Sun C; in CI expect warnings specific to TinyCC only. + Documentation: + Update and fix pcap-filter man page. + Add a README.haiku.md file. + Document pcap-config better. + Man page formatting and prose fixes. + Rename doc/README.Win32.md to doc/README.windows.md. + Update pcap-savefile man page to match the Internet-Draft for + pcap. + Fix CMake issues for target used by other projects. + Explain "any" device better in pcap_open_live(3PCAP). + Update INSTALL.md. + Note in man pages that errbuf arguments must point to an error + buffer. + Note that if pcap_findalldevs() fails it sets *alldevsp to NULL; + there's no devices list to free. + Explain "other addresses" in pcap_findalldevs(3PCAP). + Document pcap_lookupnet(3PCAP) a bit better. + Friday, April 7, 2023 / The Tcpdump Group Summary for 1.10.4 libpcap release Source code: @@ -58,7 +223,7 @@ Saturday, December 31, 2022 / The Tcpdump Group when reading a LINKTYPE_PFLOG file. Put CAN ID field in CAN pseudo-headers for LINUX_SLL2, as we do for LINUX_SLL. - Fix inorrectly-computed "real" length for isochronous USB + Fix incorrectly-computed "real" length for isochronous USB transfers when reading savefiles. Don't crash if pcap_can_set_rfmon() is called. Fix pcap_offline_read() loop. @@ -139,7 +304,7 @@ Saturday, December 31, 2022 / The Tcpdump Group Return an error if the driver reports 0 timestamp modes supported. Close the ADAPTER handle for some errors in pcap_create_interface(). - Get rid of old umaintained VS project files. + Get rid of old unmaintained VS project files. Fix deprecation warning for pcap_handle(). Npcap is now at npcap.com, not npcap.org. Make sure "no such device" and "no permission to open device" @@ -307,7 +472,7 @@ Tuesday, December 29, 2020 Remove (unused) SITA support Capture file reading: Correctly handle pcapng captures with more than one IDB with a - snspshot length greater than the supported maximum + snapshot length greater than the supported maximum Capture file writing: Create the file in pcap_dump_open_append() if it doesn't exist Packet filtering: @@ -421,7 +586,7 @@ Tuesday, December 29, 2020 isn't called Fix compilation on Cygwin/MSYS Add pcap_handle(), and deprecate pcap_fileno() - Report PCAP_ERROR_NO_SUCH_DEVICE for a non-existent device + Report PCAP_ERROR_NO_SUCH_DEVICE for a nonexistent device Return an appropriate error message for device removed or device unusable due to a suspend/resume Report a warning for unknown NdisMedium types @@ -503,7 +668,7 @@ Sunday, July 22, 2018 Windows with WinPcap/Npcap (GitHub issue #824) Have pcap_dump_open_append() create the dump file if it doesn't exists (GitHub issue #247) - Fix the maxmum snapshot length for DLT_USBPCAP + Fix the maximum snapshot length for DLT_USBPCAP Use -fPIC when building for 64-bit SPARC on Linux (GitHub issue #837) Fix CMake 64-bit library installation directory on some Linux distributions @@ -668,7 +833,7 @@ Wednesday Nov. 12, 2014 guy@alum.mit.edu/mcr@sandelman.ca Monday Aug. 12, 2014 guy@alum.mit.edu Summary for 1.6.2 libpcap release - Don't crash on filters testing a non-existent link-layer type + Don't crash on filters testing a nonexistent link-layer type field. Fix sending in non-blocking mode on Linux with memory-mapped capture. @@ -956,7 +1121,7 @@ Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap rele Autogenerate VERSION numbers better Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 libpcap release - Change build process to put public libpcap headers into pcap subir + Change build process to put public libpcap headers into pcap subdir DLT: Add value for IPMI IPMB packets DLT: Add value for u10 Networks boards Require for pf definitions - allows reading of pflog formatted @@ -1285,7 +1450,7 @@ v0.2.1 Sun Jul 14 03:02:26 PDT 1996 (steve@research.oknet.com) - Fixed to handle raw ip addresses such as 0.0.0.1 without "left - justifing" + justifying" - Add "sca" keyword (for DEC cluster services) as suggested by Terry Kennedy (terry@spcvxa.spc.edu) diff --git a/contrib/libpcap/CMakeLists.txt b/contrib/libpcap/CMakeLists.txt index 58c5159905d0..9012ef41769f 100644 --- a/contrib/libpcap/CMakeLists.txt +++ b/contrib/libpcap/CMakeLists.txt @@ -2,9 +2,26 @@ if(WIN32) # # We need 3.12 or later, so that we can set policy CMP0074; see # below. + # cmake_minimum_required(VERSION 3.12) else(WIN32) - cmake_minimum_required(VERSION 2.8.6) + # + # For now: + # + # if this is a version of CMake less than 3.5, require only + # 2.8.12, just in case somebody is configuring with CMake + # on a "long-term support" version # of some OS and that + # version supplies an older version of CMake; + # + # otherwise, require 3.5, so we don't get messages warning + # that support for versions of CMake lower than 3.5 is + # deprecated. + # + if(CMAKE_VERSION VERSION_LESS "3.5") + cmake_minimum_required(VERSION 2.8.12) + else() + cmake_minimum_required(VERSION 3.5) + endif() endif(WIN32) # @@ -12,8 +29,15 @@ endif(WIN32) # neither do we with autotools; don't do so with CMake, either, and # suppress warnings about that. # +# Setting CMAKE_MACOSX_RPATH to FALSE uses the old behavior, +# but removes the POLICY CMP0042 OLD deprecated warning. +# See https://cmake.org/cmake/help/latest/policy/CMP0042.html +# +if (NOT DEFINED CMAKE_MACOSX_RPATH) + set(CMAKE_MACOSX_RPATH FALSE) +endif() if(POLICY CMP0042) - cmake_policy(SET CMP0042 OLD) + cmake_policy(SET CMP0042 NEW) endif() # @@ -47,20 +71,52 @@ endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) # -# We only need a C++ compiler for Haiku; all code except for its -# pcap module is in C. +# We explicitly indicate what languages are used in libpcap to avoid +# checking for a C++ compiler. +# +# One reason to avoid that check is that there's no need to waste +# configuration time performing it. +# +# Another reason is that: +# +# CMake will try to determine the sizes of some data types, including +# void *, early in the process of configuration; apparently, it's done +# as part of processing the project() command. # -# We do that by specifying just C in the project() call and, after -# that finishes, checking for Haiku and, if we're building for -# Haiku, use enable_language() to check for C++. This means that -# we don't require a C++ compiler on platforms other than Haiku. +# At least as of CMake 2.8.6, it does so by checking the size of +# "void *" in C, setting CMAKE_C_SIZEOF_DATA_PTR based on that, +# setting CMAKE_SIZEOF_VOID_P to that, and then checking the size +# of "void *" in C++, setting CMAKE_CXX_SIZEOF_DATA_PTR based on +# that, and then setting CMAKE_SIZEOF_VOID_P to *that*. # -# CMAKE_SYSTEM_NAME is set by project(), so we can't do this by -# testing CMAKE_SYSTEM_NAME and then passing different language -# lists to project() based on the system. +# The compile tests include whatever C flags may have been provided +# to CMake in the CFLAGS and CXXFLAGS environment variables. +# +# If you set an architecture flag such as -m32 or -m64 in CFLAGS +# but *not* in CXXFLAGS, the size for C++ will win, and hilarity +# will ensue. +# +# Or if, at least on Solaris, you have a newer version of GCC +# installed, but *not* a newer version of G++, and you have Oracle +# Studio installed, it will find GCC, which will default to building +# 64-bit, and Oracle Studio's C++ compiler, which will default to +# building 32-bit, the size for C++ will win, and, again, hilarity +# will ensue. # project(pcap C) +# +# Setting CMAKE_MACOSX_RPATH to FALSE causes the installed +# libpcap.A.dylib to have just libpcap.A.dylib as the install +# name; Apple built libpcap with an install_name of /usr/lib/libpcap.A.dylib +# (back when they still shipped individual system dylibs rather than +# shipping a pre-built shared library cache, at least), and we do the +# same with autotools; do the same with CMake. +# +if (NOT DEFINED CMAKE_INSTALL_NAME_DIR) + set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib) +endif() + # # For getting raw lists of --libs and --libs --static information from a # pkg-config module. @@ -190,55 +246,6 @@ macro(get_link_info_from_library_path _library_prefix _library_name) endif() endmacro() -if(CMAKE_SYSTEM_NAME STREQUAL "Haiku") - enable_language(CXX) - - # - # OK, this is a royal pain. - # - # CMake will try to determine the sizes of some data types, including - # void *, early in the process of configuration; apparently, it's done - # as part of processing the project() command. - # - # At least as of CMake 2.8.6, it does so by checking the size of - # "void *" in C, setting CMAKE_C_SIZEOF_DATA_PTR based on that, - # setting CMAKE_SIZEOF_VOID_P to that, and then checking the size - # of "void *" in C++, setting CMAKE_CXX_SIZEOF_DATA_PTR based on - # that, and then setting CMAKE_SIZEOF_VOID_P to *that*. - # - # The compile tests include whatever C flags may have been provided - # to CMake in the CFLAGS and CXXFLAGS environment variables. - # - # If you set an architecture flag such as -m32 or -m64 in CFLAGS - # but *not* in CXXFLAGS, the size for C++ will win, and hilarity - # will ensue. - # - # Or if, at least on Solaris, you have a newer version of GCC - # installed, but *not* a newer version of G++, and you have Oracle - # Studio installed, it will find GCC, which will default to building - # 64-bit, and Oracle Studio's C++ compiler, which will default to - # building 32-bit, the size for C++ will win, and, again, hilarity - # will ensue. - # - # So we make sure both languages have the same pointer sizes with - # the flags they're given; if they don't, it means that the - # compilers for the languages will, with those flags, not produce - # code that can be linked together. - # - # This is unlikely to happen on Haiku, but it *has* happened on - # Solaris; we do this for future-proofing, in case we ever need - # C++ on a platform where that can happen. - # - if(NOT ${CMAKE_C_SIZEOF_DATA_PTR} EQUAL ${CMAKE_CXX_SIZEOF_DATA_PTR}) - message(FATAL_ERROR -"C compiler ${CMAKE_C_COMPILER} produces code with \ -${CMAKE_C_SIZEOF_DATA_PTR}-byte pointers while C++ compiler \ -${CMAKE_CXX_COMPILER} produces code with \ -${CMAKE_CXX_SIZEOF_DATA_PTR}-byte pointers. \ -This prevents code in these languages from being combined.") - endif() -endif() - # # Show the bit width for which we're compiling. # This can help debug problems if you're dealing with a compiler that @@ -256,7 +263,7 @@ endif() # Solaris pkg-config is annoying. For at least one package (D-Bus, I'm # looking at *you*!), there are separate include files for 32-bit and # 64-bit builds (I guess using "unsigned long long" as a 64-bit integer -# type on a 64-bit build is like crossing the beams or soething), and +# type on a 64-bit build is like crossing the beams or something), and # there are two separate .pc files, so if we're doing a 32-bit build we # should make sure we look in /usr/lib/pkgconfig for .pc files and if # we're doing a 64-bit build we should make sure we look in @@ -563,8 +570,6 @@ set(PACKAGE_STRING "${LIBRARY_NAME} ${PACKAGE_VERSION}") # Project settings ###################################### -add_definitions(-DHAVE_CONFIG_H) - include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${pcap_SOURCE_DIR} @@ -615,9 +620,7 @@ if(USE_STATIC_RT) if(MSVC) foreach(RT_FLAG CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) + CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) string(REGEX REPLACE "/MD" "/MT" ${RT_FLAG} "${${RT_FLAG}}") endforeach(RT_FLAG) elseif(MINGW) @@ -699,7 +702,6 @@ main(void) # # Now check for various system functions. # -check_function_exists(strerror HAVE_STRERROR) check_function_exists(strerror_r HAVE_STRERROR_R) if(HAVE_STRERROR_R) # @@ -755,29 +757,26 @@ if(NOT WIN32) endif() # -# These tests are for network applications that need socket functions -# and getaddrinfo()/getnameinfo()-ish functions. We now require -# getaddrinfo() and getnameinfo(). On UN*X systems, we also prefer -# versions of recvmsg() that conform to the Single UNIX Specification, -# so that we can check whether a datagram received with recvmsg() was -# truncated when received due to the buffer being too small. +# Look for various networking-related libraries that we may need. # -# On Windows, getaddrinfo() is in the ws2_32 library. - -# On most UN*X systems, they're available in the system library. +# We need getaddrinfo() to translate host names in filters to IP +# addresses. We use getaddrinfo() because we want a portable +# thread-safe way of getting information for a host name or port; +# there exist _r versions of gethostbyname() and getservbyname() on +# some platforms, but not on all platforms. # -# Under Solaris, we need to link with libsocket and libnsl to get -# getaddrinfo() and getnameinfo() and, if we have libxnet, we need to -# link with libxnet before libsocket to get a version of recvmsg() -# that conforms to the Single UNIX Specification. +# We may also need socket() and other socket functions to support: # -# We use getaddrinfo() because we want a portable thread-safe way -# of getting information for a host name or port; there exist _r -# versions of gethostbyname() and getservbyname() on some platforms, -# but not on all platforms. +# Local packet capture with capture mechanisms that use sockets. # -# NOTE: if you hand check_library_exists as its last argument a variable -# that's been set, it skips the test, so we need different variables. +# Local capture device enumeration if a socket call is needed to +# enumerate devices or get device attributes. +# +# Packet capture from services that put captured packets on the +# network, such as rpcap servers. +# +# We may also need getnameinfo() for packet capture from services +# that put packets on the network. # set(PCAP_LINK_LIBRARIES "") set(LIBS "") @@ -786,9 +785,13 @@ set(REQUIRES_PRIVATE "") set(LIBS_PRIVATE "") include(CheckLibraryExists) if(WIN32) + # + # Windows. # # We need winsock2.h and ws2tcpip.h. # + # On Windows, getaddrinfo() is in the ws2_32 library. + # cmake_push_check_state() set(CMAKE_REQUIRED_LIBRARIES ws2_32) check_symbol_exists(getaddrinfo "winsock2.h;ws2tcpip.h" LIBWS2_32_HAS_GETADDRINFO) @@ -800,16 +803,28 @@ if(WIN32) endif(LIBWS2_32_HAS_GETADDRINFO) else(WIN32) # - # UN*X. First try the system libraries, then try the libraries - # for Solaris and possibly other systems that picked up the - # System V library split. + # UN*X. + # + # Most UN*Xes have getaddrinfo(), and the other routines we may + # need, in the default searched libraries (e.g., libc). + # Check there first. + # + # NOTE: if you hand check_library_exists as its last argument a + # variable that's been set, it skips the test, so we need different + # variables for different libraries. # check_function_exists(getaddrinfo STDLIBS_HAVE_GETADDRINFO) if(NOT STDLIBS_HAVE_GETADDRINFO) - # - # Not found in the standard system libraries. - # Try libsocket, which requires libnsl. - # + # + # Not found in the standard system libraries. + # + # In some versions of Solaris, we need to link with libsocket + # and libnsl, so check in libsocket and also link with liblnsl + # when doing this test. + # + # Linking with libsocket and libnsl will find all the routines + # we need. + # cmake_push_check_state() set(CMAKE_REQUIRED_LIBRARIES nsl) check_library_exists(socket getaddrinfo "" LIBSOCKET_HAS_GETADDRINFO) @@ -823,10 +838,17 @@ else(WIN32) set(LIBS_STATIC "-lsocket -lnsl ${LIBS_STATIC}") set(LIBS_PRIVATE "-lsocket -lnsl ${LIBS_PRIVATE}") else(LIBSOCKET_HAS_GETADDRINFO) + # + # Not found in libsocket; test for it in libnetwork, which + # is where it is in Haiku. + # + # Linking with libnetwork will find all the routines we + # need. + # check_library_exists(network getaddrinfo "" LIBNETWORK_HAS_GETADDRINFO) if(LIBNETWORK_HAS_GETADDRINFO) # - # OK, we found it in libnetwork (Haiku). + # OK, we found it in libnetwork. # set(PCAP_LINK_LIBRARIES network ${PCAP_LINK_LIBRARIES}) set(LIBS "-lnetwork ${LIBS}") @@ -840,17 +862,32 @@ else(WIN32) endif(LIBNETWORK_HAS_GETADDRINFO) endif(LIBSOCKET_HAS_GETADDRINFO) - # - # OK, do we have recvmsg() in libxnet? - # We also link with libsocket and libnsl. - # + # + # We require a version of recvmsg() that conforms to the Single + # UNIX Specification, so that we can check whether a datagram + # received with recvmsg() was truncated when received due to the + # buffer being too small. + # + # On most systems, the version of recvmsg() in the libraries + # found above conforms to the SUS. + # + # On at least some versions of Solaris, it does not conform to + # the SUS, and we need the version in libxnet, which does + # conform. + # + # Check whether libxnet exists and has a version of recvmsg(); + # if it does, link with libxnet before we link with libsocket, + # to get that version. + # + # This test also links with libsocket and libnsl. + # cmake_push_check_state() set(CMAKE_REQUIRED_LIBRARIES socket nsl) check_library_exists(xnet recvmsg "" LIBXNET_HAS_RECVMSG) cmake_pop_check_state() if(LIBXNET_HAS_RECVMSG) # - # Yes - link with it as well. + # libxnet has recvmsg(); link with it as well. # set(PCAP_LINK_LIBRARIES xnet ${PCAP_LINK_LIBRARIES}) set(LIBSC "-lxnet ${LIBS_LIBS}") @@ -859,7 +896,9 @@ else(WIN32) endif(LIBXNET_HAS_RECVMSG) endif(NOT STDLIBS_HAVE_GETADDRINFO) - # DLPI needs putmsg under HPUX so test for -lstr while we're at it + # + # DLPI needs putmsg under HP-UX, so test for -lstr while we're at it. + # check_function_exists(putmsg STDLIBS_HAVE_PUTMSG) if(NOT STDLIBS_HAVE_PUTMSG) check_library_exists(str putmsg "" LIBSTR_HAS_PUTMSG) @@ -1231,7 +1270,6 @@ endif(NOT WIN32) if(ENABLE_PROFILING) if(NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") endif() endif() @@ -1264,7 +1302,7 @@ endif() # # Test if the each of the sanitizers in the ENABLE_SANITIZERS list are # supported by the compiler, and, if so, adds the appropriate flags to -# CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, and SANITIZER_FLAGS. If not, it fails. +# CMAKE_C_FLAGS, and SANITIZER_FLAGS. If not, it fails. # # Do this last, in the hope that it will prevent configuration on Linux # from somehow deciding it doesn't need -lpthread when building rpcapd @@ -1272,17 +1310,25 @@ endif() # obvious CMake debugging flag reveals, it doesn't realize that if we # turn sanitizer stuff on). # -set(SANITIZER_FLAGS "") -foreach(sanitizer IN LISTS ENABLE_SANITIZERS) +# Note: apparently, some projects have decided that ENABLE_SANITIZERS +# is a Boolean, with OFF meaning "no sanitizers" and ON meaning "all +# sanitizers". Whoever decided that didn't put it up as a common +# CMake idiom, as far as I can tell; we only discovered this because +# JetBrains' CLion "helpfully" appears to pass -DENABLE_SANITIZERS=OFF +# to CMake by default, which causes CMake to fail on libpcap. Thanks! +# +# We thus also allow a setting of OFF to mean "no sanitizers" and ON to +# mean "all supported sanitizers that we know about and that can all +# be used together". +# +macro(test_sanitizer _sanitizer _sanitizer_flag) + message(STATUS "Checking sanitizer ${_sanitizer}") + set(sanitizer_variable "sanitize_${_sanitizer}") # Set -Werror to catch "argument unused during compilation" warnings - - message(STATUS "Checking sanitizer ${sanitizer}") - set(sanitizer_variable "sanitize_${sanitizer}") - set(CMAKE_REQUIRED_FLAGS "-Werror -fsanitize=${sanitizer}") - check_c_compiler_flag("-fsanitize=${sanitizer}" ${sanitizer_variable}) + set(CMAKE_REQUIRED_FLAGS "-Werror -fsanitize=${_sanitizer}") + check_c_compiler_flag("-fsanitize=${_sanitizer}" ${sanitizer_variable}) if(${${sanitizer_variable}}) - set(SANITIZER_FLAGS "${SANITIZER_FLAGS} -fsanitize=${sanitizer}") - message(STATUS "${sanitizer} sanitizer supported using -fsanitizer=${sanitizer}") + set(${_sanitizer_flag} "-fsanitize=${_sanitizer}") else() # # Try the versions supported prior to Clang 3.2. @@ -1291,119 +1337,397 @@ foreach(sanitizer IN LISTS ENABLE_SANITIZERS) # Otherwise, give up. # set(sanitizer_variable "OLD_${sanitizer_variable}") - if ("${sanitizer}" STREQUAL "address") + if ("${_sanitizer}" STREQUAL "address") set(CMAKE_REQUIRED_FLAGS "-Werror -fsanitize-address") check_c_compiler_flag("-fsanitize-address" ${sanitizer_variable}) if(${${sanitizer_variable}}) - set(SANITIZER_FLAGS "${SANITIZER_FLAGS} -fsanitize-address") - message(STATUS "${sanitizer} sanitizer supported using -fsanitize-address") - else() - message(FATAL_ERROR "${sanitizer} isn't a supported sanitizer") + set(${_sanitizer_flag} "-fsanitize-address") endif() - elseif("${sanitizer}" STREQUAL "undefined") + elseif("${_sanitizer}" STREQUAL "undefined") set(CMAKE_REQUIRED_FLAGS "-Werror -fcatch-undefined-behavior") check_c_compiler_flag("-fcatch-undefined-behavior" ${sanitizer_variable}) if(${${sanitizer_variable}}) - set(SANITIZER_FLAGS "${SANITIZER_FLAGS} -fcatch-undefined-behavior") - message(STATUS "${sanitizer} sanitizer supported using catch-undefined-behavior") - else() - message(FATAL_ERROR "${sanitizer} isn't a supported sanitizer") + set(${_sanitizer_flag} "-fcatch-undefined-behavior") endif() - else() - message(FATAL_ERROR "${sanitizer} isn't a supported sanitizer") endif() endif() - unset(CMAKE_REQUIRED_FLAGS) -endforeach() +endmacro(test_sanitizer) + +set(SANITIZER_FLAGS "") +if("${ENABLE_SANITIZERS}") + # + # This appears to indicate that ENABLE_SANITIZERS was set to a + # string value that is "one of the true constants", meaning + # "1, ON, YES, TRUE, Y, or a non-zero number". + # + # It does not appear to happen for other settings, including + # setting it to a list of one or more sanitizers. + # + # This setting means "enable all sanitizers that the compiler + # supports". + # + foreach(sanitizer "address" "undefined") + unset(SANITIZER_FLAG) + test_sanitizer(${sanitizer} SANITIZER_FLAG) + if(SANITIZER_FLAG) + message(STATUS "${sanitizer} sanitizer supported using ${SANITIZER_FLAG}") + set(SANITIZER_FLAGS "${SANITIZER_FLAGS} ${SANITIZER_FLAG}") + else() + message(STATUS "${sanitizer} isn't a supported sanitizer") + endif() + endforeach() + if("${SANITIZER_FLAGS}" STREQUAL "") + message(FATAL_ERROR "No supported sanitizers found") + endif() +else() + # + # This appears to indicate that ENABLE_SANITIZERS was either: + # + # not set; + # set to a set to a string value that is not "one of the true + # constants", meaning "1, ON, YES, TRUE, Y, or a non-zero number". + # + # The latter includes setting it to "one of the false constants", + # meaning the string "is 0, OFF, NO, FALSE, N, IGNORE, NOTFOUND, + # the empty string, or ends in the suffix -NOTFOUND." + # + # It also includes setting it to a list of one or more sanitizers. + # + # We want to treat "not set" and "set to one of the false constants" + # as meaning "do not enable any sanitizers". + # + # We want to treat "set to a list of one or more sanitizers" as + # meaning "enable all the sanitizers in the list". + # + # This requires that we distinguish between those two cases. + # + if(ENABLE_SANITIZERS) + # + # This appears to indicate that ENABLE_SANITIZERS was set to + # a string value that is "not one of the false constants". + # + # We already know it's "not one of the true constants", so + # we treat it as a list of sanitizers. + # + foreach(sanitizer IN LISTS ENABLE_SANITIZERS) + unset(SANITIZER_FLAG) + test_sanitizer(${sanitizer} SANITIZER_FLAG) + if(SANITIZER_FLAG) + message(STATUS "${sanitizer} sanitizer supported using ${SANITIZER_FLAG}") + set(SANITIZER_FLAGS "${SANITIZER_FLAGS} ${SANITIZER_FLAG}") + else() + message(FATAL_ERROR "${sanitizer} isn't a supported sanitizer") + endif() + endforeach() + else() + # + # This appears to indicate that ENABLE_SANITIZERS was either: + # + # not set; + # set to a value that's "one of the false constants"; + # + # so we don't enable any sanitizers. + # + message(STATUS "Not enabling sanitizers") + endif() +endif() if(NOT "${SANITIZER_FLAGS}" STREQUAL "") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O1 -g ${SANITIZER_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g ${SANITIZER_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls") endif() -# -# OpenSSL/libressl. -# -find_package(OpenSSL) -if(OPENSSL_FOUND) +if(ENABLE_REMOTE) # - # We have OpenSSL. + # OpenSSL/libressl. # - include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) - set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${OPENSSL_LIBRARIES}) + find_package(OpenSSL) + if(OPENSSL_FOUND) + # + # We have OpenSSL. + # + include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) + set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${OPENSSL_LIBRARIES}) - # - # The find_package() module CMake provides for OpenSSL uses does not - # give us a defined indication of whether it found OpenSSL with - # pkg-config or not. We need to know that as, if it was found with *** 38672 LINES SKIPPED *** From nobody Wed Jan 29 19:33: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 4YjslP4XfKz5lrk7; Wed, 29 Jan 2025 19:33: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 4YjslP3dYqz3QjS; Wed, 29 Jan 2025 19:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179217; 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=hgt3xC6QFWp5xpIfIFhWlVCjj69Z7no+P+6Hj6eKhaU=; b=nv7655OJPpJ9bkA/bryjDaJekO8fpeL54vGkrTYiFWy11v9uF3a96587WXey3Pllq+YpUt X+V1tuL2ghKDgX3rt/qVJ7D7y509ylI/UST8JYKgBN00Jh2KnjCvUPt8Q2k4qfGDZwWAFV t4rfEgRvcnki9f2lFoQvKUiEmJn2ndtzW31k/0f/PO3nudevH0eUhWlr8MJfHDzGFrkjGX 6RYe0/iCWUiOtAViwqiHLe1BY98aFXBnLeX7k8u3tGFNd70w8A04gV2wujHZ1k+g8foc2n gVhDO0/yKBwKYWVPhyNzpkrObokY/Sg/cALaZhNh+sxMPILcZP50tsd7iOAw7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738179217; 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=hgt3xC6QFWp5xpIfIFhWlVCjj69Z7no+P+6Hj6eKhaU=; b=jPYmIPpp7bMHHAKv5PPzSFkdNoCB/KVqCLZg4XU+gJQlRCdYBLh4d4PtRMHWjN7OvaiYD6 PWdVx7Ig0YTVg+Uo4Iqa1XZfPqfX89b0FH5fOQxzI4z0vRze9E35p5nO8Wna29VyXORHXc b0JzfmvWAadEeFKzoacdziAeP4pKTjdqy+5cjNTjQz1A8pXt+uI/k+BAUoqEqLsnt9aE+i 9KoTIzH+eaHT/rhJJ5vCC8MUgiQvx3wW1RQRqk8Z25wUC+TvX7Qht7iqFH93J/qKYY4MUp 6WMtUBzBtuUB9g18o0c8drZX0+3xM25OYijpkUVEQLy+8gAMKNimJc9/dirj6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738179217; a=rsa-sha256; cv=none; b=GP3kYMSjL4Ne6qWHxwayKOjik3lKLLTg2a9rh3E13JST2PyiGHVEUeOs6jWUwDKRISyeSl /rZHPcijL9JNOrmxiqY387uA6J4kdPztY3Hm8smNj5499ePcw/GZCBsI6JVCTA9ymRgub0 syLEdLTtsm+gYBj47nHSaFjNKTtDwGcAOhriNlQ/gCtbkuSRJdr6lGtmxSk7cGs28/sgT6 2RwKDhkdynUqQNuzt2zcfCTnWYnKr6qvcliz1HGqBuKb27Ct5R5NmHyfB4NLjgG1zURNtl xVhLbfpbuNBYqUfVwzRysPh03m3VLwkF8qWicAA+pbdWPztGRAjYuXPJ+RPuzg== 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 4YjslP2zhszlL; Wed, 29 Jan 2025 19:33: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 50TJXb0t039893; Wed, 29 Jan 2025 19:33:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50TJXbM7039886; Wed, 29 Jan 2025 19:33:37 GMT (envelope-from git) Date: Wed, 29 Jan 2025 19:33:37 GMT Message-Id: <202501291933.50TJXbM7039886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Joseph Mingrone Subject: git: 094f44ea0358 - stable/13 - tcpdump: Update to 4.99.5 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 094f44ea03589a64a831627ae10980697cc66423 Auto-Submitted: auto-generated The branch stable/13 has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=094f44ea03589a64a831627ae10980697cc66423 commit 094f44ea03589a64a831627ae10980697cc66423 Author: Joseph Mingrone AuthorDate: 2024-09-23 19:23:25 +0000 Commit: Joseph Mingrone CommitDate: 2025-01-29 19:29:29 +0000 tcpdump: Update to 4.99.5 Reviewed by: kp (changes related to pf) Sponsored by: The FreeBSD Foundation (cherry picked from commit 0a7e5f1f02aad2ff5fff1c60f44c6975fd07e1d9) (cherry picked from commit d72f87c0fd1418bdb814594ea8fc76a202f7d5c6) --- contrib/tcpdump/CHANGES | 131 +- contrib/tcpdump/CMakeLists.txt | 301 +- contrib/tcpdump/CONTRIBUTING.md | 269 +- contrib/tcpdump/CREDITS | 34 +- contrib/tcpdump/INSTALL.md | 35 +- contrib/tcpdump/Makefile.in | 98 +- contrib/tcpdump/VERSION | 2 +- contrib/tcpdump/addrtoname.c | 7 +- contrib/tcpdump/addrtostr.c | 24 +- contrib/tcpdump/af.c | 2 - contrib/tcpdump/autogen.sh | 25 + contrib/tcpdump/bpf_dump.c | 2 - contrib/tcpdump/checksum.c | 39 +- contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake | 185 +- contrib/tcpdump/cmakeconfig.h.in | 14 +- contrib/tcpdump/config.guess | 62 +- contrib/tcpdump/config.h.in | 27 +- contrib/tcpdump/config.sub | 230 +- contrib/tcpdump/configure | 7188 ++++++++++++++---------- contrib/tcpdump/configure.ac | 476 +- contrib/tcpdump/cpack.c | 2 - contrib/tcpdump/diag-control.h | 95 +- contrib/tcpdump/doc/README.Win32.md | 200 - contrib/tcpdump/doc/README.haiku.md | 33 + contrib/tcpdump/doc/README.solaris.md | 5 + contrib/tcpdump/extract.h | 2 +- contrib/tcpdump/ftmacros.h | 2 +- contrib/tcpdump/funcattrs.h | 5 +- contrib/tcpdump/gmpls.c | 2 - contrib/tcpdump/in_cksum.c | 2 - contrib/tcpdump/install-sh | 689 ++- contrib/tcpdump/instrument-functions.c | 250 + contrib/tcpdump/interface.h | 2 +- contrib/tcpdump/ip.h | 1 - contrib/tcpdump/ipproto.c | 2 - contrib/tcpdump/l2vpn.c | 2 - contrib/tcpdump/machdep.c | 2 - contrib/tcpdump/makemib | 2 +- contrib/tcpdump/mib.h | 12 +- contrib/tcpdump/missing/datalinks.c | 2 - contrib/tcpdump/missing/dlnames.c | 2 - contrib/tcpdump/missing/getopt_long.c | 3 +- contrib/tcpdump/missing/getservent.c | 2 - contrib/tcpdump/missing/snprintf.c | 2 - contrib/tcpdump/missing/strlcat.c | 2 - contrib/tcpdump/missing/strlcpy.c | 2 - contrib/tcpdump/missing/strsep.c | 2 - contrib/tcpdump/mkdep | 28 +- contrib/tcpdump/nameser.h | 8 +- contrib/tcpdump/netdissect-alloc.c | 2 - contrib/tcpdump/netdissect.c | 16 +- contrib/tcpdump/netdissect.h | 75 +- contrib/tcpdump/nlpid.c | 2 - contrib/tcpdump/ntp.c | 2 - contrib/tcpdump/oui.c | 2 - contrib/tcpdump/parsenfsfh.c | 53 +- contrib/tcpdump/pflog.h | 45 +- contrib/tcpdump/print-802_11.c | 62 +- contrib/tcpdump/print-802_15_4.c | 32 +- contrib/tcpdump/print-ah.c | 2 - contrib/tcpdump/print-ahcp.c | 2 - contrib/tcpdump/print-aodv.c | 2 - contrib/tcpdump/print-aoe.c | 2 - contrib/tcpdump/print-ap1394.c | 2 - contrib/tcpdump/print-arcnet.c | 2 - contrib/tcpdump/print-arista.c | 2 - contrib/tcpdump/print-arp.c | 2 - contrib/tcpdump/print-ascii.c | 8 +- contrib/tcpdump/print-atalk.c | 2 - contrib/tcpdump/print-atm.c | 4 +- contrib/tcpdump/print-babel.c | 2 - contrib/tcpdump/print-bcm-li.c | 2 - contrib/tcpdump/print-beep.c | 2 - contrib/tcpdump/print-bfd.c | 8 +- contrib/tcpdump/print-bgp.c | 23 +- contrib/tcpdump/print-bootp.c | 43 +- contrib/tcpdump/print-brcmtag.c | 3 - contrib/tcpdump/print-bt.c | 2 - contrib/tcpdump/print-calm-fast.c | 2 - contrib/tcpdump/print-carp.c | 5 +- contrib/tcpdump/print-cdp.c | 10 +- contrib/tcpdump/print-cfm.c | 2 - contrib/tcpdump/print-chdlc.c | 2 - contrib/tcpdump/print-cip.c | 2 - contrib/tcpdump/print-cnfp.c | 2 - contrib/tcpdump/print-dccp.c | 2 - contrib/tcpdump/print-decnet.c | 2 - contrib/tcpdump/print-dhcp6.c | 70 +- contrib/tcpdump/print-domain.c | 12 +- contrib/tcpdump/print-dsa.c | 2 - contrib/tcpdump/print-dtp.c | 4 +- contrib/tcpdump/print-dvmrp.c | 4 +- contrib/tcpdump/print-eap.c | 3 +- contrib/tcpdump/print-egp.c | 2 - contrib/tcpdump/print-eigrp.c | 2 - contrib/tcpdump/print-enc.c | 2 - contrib/tcpdump/print-esp.c | 29 +- contrib/tcpdump/print-ether.c | 6 +- contrib/tcpdump/print-fddi.c | 5 +- contrib/tcpdump/print-forces.c | 2 - contrib/tcpdump/print-fr.c | 18 +- contrib/tcpdump/print-frag6.c | 26 +- contrib/tcpdump/print-ftp.c | 2 - contrib/tcpdump/print-geneve.c | 2 - contrib/tcpdump/print-geonet.c | 2 - contrib/tcpdump/print-gre.c | 2 - contrib/tcpdump/print-hncp.c | 2 - contrib/tcpdump/print-hsrp.c | 2 - contrib/tcpdump/print-http.c | 2 - contrib/tcpdump/print-icmp.c | 2 - contrib/tcpdump/print-icmp6.c | 15 +- contrib/tcpdump/print-igmp.c | 2 - contrib/tcpdump/print-igrp.c | 2 - contrib/tcpdump/print-ip-demux.c | 2 - contrib/tcpdump/print-ip.c | 68 +- contrib/tcpdump/print-ip6.c | 45 +- contrib/tcpdump/print-ip6opts.c | 2 - contrib/tcpdump/print-ipcomp.c | 2 - contrib/tcpdump/print-ipfc.c | 2 - contrib/tcpdump/print-ipnet.c | 2 - contrib/tcpdump/print-ipoib.c | 2 - contrib/tcpdump/print-ipx.c | 6 +- contrib/tcpdump/print-isakmp.c | 25 +- contrib/tcpdump/print-isoclns.c | 34 +- contrib/tcpdump/print-juniper.c | 5 +- contrib/tcpdump/print-krb.c | 11 +- contrib/tcpdump/print-l2tp.c | 2 - contrib/tcpdump/print-lane.c | 2 - contrib/tcpdump/print-ldp.c | 20 +- contrib/tcpdump/print-lisp.c | 14 +- contrib/tcpdump/print-llc.c | 2 - contrib/tcpdump/print-lldp.c | 4 +- contrib/tcpdump/print-lmp.c | 2 - contrib/tcpdump/print-loopback.c | 5 +- contrib/tcpdump/print-lspping.c | 2 - contrib/tcpdump/print-lwapp.c | 2 - contrib/tcpdump/print-lwres.c | 10 +- contrib/tcpdump/print-m3ua.c | 2 - contrib/tcpdump/print-macsec.c | 3 - contrib/tcpdump/print-mobile.c | 2 - contrib/tcpdump/print-mobility.c | 5 +- contrib/tcpdump/print-mpcp.c | 2 - contrib/tcpdump/print-mpls.c | 2 - contrib/tcpdump/print-mptcp.c | 2 - contrib/tcpdump/print-msdp.c | 2 - contrib/tcpdump/print-msnlb.c | 2 - contrib/tcpdump/print-nflog.c | 22 +- contrib/tcpdump/print-nfs.c | 29 +- contrib/tcpdump/print-nsh.c | 7 +- contrib/tcpdump/print-ntp.c | 4 - contrib/tcpdump/print-null.c | 2 - contrib/tcpdump/print-olsr.c | 16 +- contrib/tcpdump/print-openflow-1.0.c | 143 +- contrib/tcpdump/print-openflow-1.3.c | 15 +- contrib/tcpdump/print-openflow.c | 2 - contrib/tcpdump/print-ospf.c | 10 +- contrib/tcpdump/print-ospf6.c | 15 +- contrib/tcpdump/print-otv.c | 2 - contrib/tcpdump/print-pflog.c | 30 +- contrib/tcpdump/print-pgm.c | 2 - contrib/tcpdump/print-pim.c | 8 +- contrib/tcpdump/print-pktap.c | 2 - contrib/tcpdump/print-ppi.c | 2 - contrib/tcpdump/print-ppp.c | 11 +- contrib/tcpdump/print-pppoe.c | 2 - contrib/tcpdump/print-pptp.c | 2 - contrib/tcpdump/print-ptp.c | 45 +- contrib/tcpdump/print-radius.c | 173 +- contrib/tcpdump/print-raw.c | 2 - contrib/tcpdump/print-realtek.c | 2 - contrib/tcpdump/print-resp.c | 6 +- contrib/tcpdump/print-rip.c | 46 +- contrib/tcpdump/print-ripng.c | 2 - contrib/tcpdump/print-rpki-rtr.c | 40 +- contrib/tcpdump/print-rsvp.c | 2 - contrib/tcpdump/print-rt6.c | 4 +- contrib/tcpdump/print-rtsp.c | 2 - contrib/tcpdump/print-rx.c | 4 +- contrib/tcpdump/print-sctp.c | 7 +- contrib/tcpdump/print-sflow.c | 8 +- contrib/tcpdump/print-sip.c | 2 - contrib/tcpdump/print-sl.c | 2 - contrib/tcpdump/print-sll.c | 2 - contrib/tcpdump/print-slow.c | 2 - contrib/tcpdump/print-smb.c | 20 +- contrib/tcpdump/print-smtp.c | 2 - contrib/tcpdump/print-snmp.c | 12 +- contrib/tcpdump/print-someip.c | 3 - contrib/tcpdump/print-ssh.c | 2 - contrib/tcpdump/print-stp.c | 5 +- contrib/tcpdump/print-sunatm.c | 2 - contrib/tcpdump/print-sunrpc.c | 2 - contrib/tcpdump/print-symantec.c | 2 - contrib/tcpdump/print-syslog.c | 5 +- contrib/tcpdump/print-tcp.c | 64 +- contrib/tcpdump/print-telnet.c | 4 +- contrib/tcpdump/print-tftp.c | 2 - contrib/tcpdump/print-timed.c | 2 - contrib/tcpdump/print-tipc.c | 6 +- contrib/tcpdump/print-token.c | 2 - contrib/tcpdump/print-udld.c | 2 - contrib/tcpdump/print-udp.c | 101 +- contrib/tcpdump/print-unsupported.c | 2 - contrib/tcpdump/print-usb.c | 14 +- contrib/tcpdump/print-vjc.c | 2 - contrib/tcpdump/print-vqp.c | 2 - contrib/tcpdump/print-vrrp.c | 2 - contrib/tcpdump/print-vsock.c | 2 - contrib/tcpdump/print-vtp.c | 6 +- contrib/tcpdump/print-vxlan-gpe.c | 2 - contrib/tcpdump/print-vxlan.c | 2 - contrib/tcpdump/print-wb.c | 2 - contrib/tcpdump/print-whois.c | 2 - contrib/tcpdump/print-zep.c | 10 +- contrib/tcpdump/print-zephyr.c | 2 - contrib/tcpdump/print-zeromq.c | 26 +- contrib/tcpdump/print.c | 18 +- contrib/tcpdump/signature.c | 2 - contrib/tcpdump/smbutil.c | 19 +- contrib/tcpdump/status-exit-codes.h | 1 - contrib/tcpdump/strtoaddr.c | 2 - contrib/tcpdump/tcp.h | 6 +- contrib/tcpdump/tcpdump.1.in | 87 +- contrib/tcpdump/tcpdump.c | 107 +- contrib/tcpdump/udp.h | 14 +- contrib/tcpdump/util-print.c | 67 +- usr.sbin/tcpdump/tcpdump/config.h | 4 +- 227 files changed, 7690 insertions(+), 5092 deletions(-) diff --git a/contrib/tcpdump/CHANGES b/contrib/tcpdump/CHANGES index 33ced66dd826..b63d1eb658d3 100644 --- a/contrib/tcpdump/CHANGES +++ b/contrib/tcpdump/CHANGES @@ -1,3 +1,128 @@ +Friday, August 30, 2024 / The Tcpdump Group + Summary for 4.99.5 tcpdump release + Refine protocol decoding for: + Arista: Use the test .pcap file from pull request #955 (HwInfo). + BGP: Fix an undefined behavior when it tries to parse a too-short packet. + CARP: Print the protocol name before any GET_(). + CDP: only hex-dump unknown TLVs in verbose mode. + DHCP: parse the SZTP redirect tag. + DHCPv6: client-id/server-id DUID type 2 correction; parse the user class, + boot file URL, and SZTP redirect options; add DUID-UUID printing + (RFC6355). + DNS: Detect and correctly handle too-short URI RRs. + EAP: Assign ndo_protocol in the eap_print() function. + ESP: Don't use EVP_add_cipher_alias() (fixes building on OpenBSD 7.5). + Frame Relay (Multilink): Fix the Timestamp Information Element printing. + ICMPv6: Fix printing the Home Agent Address Discovery Reply Message. + IEEE 802.11: no need for an element ID in the structures for IEs, make + the length in the IE structures a u_int, include the "TA" field while + printing Block Ack Control frame. + IP: Enable TSO (TCP Segmentation Offload) support; fix printing invalid + cases as invalid, not truncated; use ND_ICHECKMSG_ZU() to test the + header length. + IPv6: Fix printing invalid cases as invalid, not truncated; use + ND_ICHECKMSG_U() to print an invalid version. + IPv6: Fix invalid 32-bit versus 64-bit printouts of fragment headers. + ISAKMP: Fix printing Delete payload SPI when size is zero. + Kerberos: Print the protocol name, remove a redundant bounds check. + lwres: Fix an undefined behavior in pointer arithmetic. + OpenFlow 1.0: Fix indentation of PORT_MOD, improve handling of + some lengths, and fix handling of snapend. + TCP: Test ports < 1024 in port order to select the printer. + UDP: Move source port equal BCM_LI_PORT to bottom of long if else chain. + UDP: Test ports < 1024 in port order to select the printer. + LDP: Add missing fields of the Common Session Parameters TLV and fix the + offset for the A&D bits. + NFLOG: Use correct AF code points on all OSes. + NFS: Avoid printing non-ASCII characters. + OSPF: Pad TLVs in LS_OPAQUE_TYPE_RI to multiples of 4 bytes. + OSPF: Update LS-Ack printing not to run off the end of the packet. + OSPF6: Fix an undefined behavior. + pflog: use nd_ types in struct pfloghdr. + PPP: Check if there is some data to hexdump. + PPP: Remove an extra colon before LCP Callback Operation. + Use the buffer stack for de-escaping PPP; fixes CVE-2024-2397; + Note: This problem does not affect any tcpdump release. + PTP: Fix spelling of type SIGNALING, Parse major and minor version + correctly, Print majorSdoId field instead of just the first bit. + RIP: Make a couple trivial protocol updates. + RPKI-Router: Refine length and bounds checks. + RX: Use the "%Y-%m-%d" date format. + smbutil.c: Use the "%Y-%m-%d" date format. + SNMP: Fix two undefined behaviors. + Text protocols: Fix printing truncation if it is not the case. + ZEP: Use the "%Y-%m-%d" date format. + ZMTP: Replace custom code with bittok2str(). + User interface: + Print the supported time stamp types (-J) to stdout instead of stderr. + Print the list of data link types (-L) to stdout instead of stderr. + Use symmetrical quotation characters in error messages. + Update --version option to print 32/64-bit build and time_t size. + Improve error messages for invalid interface indexes specified + with -i. + Support "3des" as an alias for "des_ede3_cbc" even if the crypto + library doesn't support adding aliases. + Source code: + tcpdump: Fix a memory leak. + child_cleanup: reap as many child processes as possible. + Ignore failures when setting the default "any" device DLL to LINUX_SLL2. + Fix for backends which doesn't support capsicum. + Update ND_BYTES_BETWEEN() macro for better accuracy. + Update ND_BYTES_AVAILABLE_AFTER() macro for better accuracy. + Introduce new ND_ICHECK*() macros to deduplicate more code. + Skip privilege dropping when using -Z root on --with-user builds. + Add a nd_printjn() function. + Make nd_trunc_longjmp() not static inline. + Include from netdissect.h. + Remove init_crc10_table() and the entourage. + Initialize tzcode early. + Capsicum support: Fix a 'not defined' macro error. + Update the "Error converting time" tests for packet times. + Fix warnings when building for 32-bit and defining _TIME_BITS=64. + Free interface list just before exiting where it wasn't being + freed. + Building and testing: + Add a configure option to help debugging (--enable-instrument-functions). + At build time require a proof of suitable snprintf(3) implementation in + libc (and document Solaris 9 as unsupported because of that). + Makefile.in: Add two "touch .devel" commands in the releasecheck target. + Autoconf: Get --with-user and --with-chroot right. + Autoconf: Fix --static-pcap-only test on Solaris 10. + Autoconf: Add some warning flags for clang 13 or newer. + Autoconf: Update config.{guess,sub}, timestamps 2024-01-01. + Autoconf: Add autogen.sh, remove configure and config.h.in and put + these generated files in the release tarball. + Autoconf: Update the install-sh script to the 2020-11-14.01 version. + configure: Apply autoupdate 2.69. + CMake: improve the comment before project(tcpdump C). + Do not require vsnprintf(). + tests: Use the -tttt option, by default, for the tests. + Autoconf, CMake: Get the size of a void * and a time_t. + Fix propagation of cc_werr_cflags() output. + Makefile.in: Fix the depend target. + mkdep: Exit with a non-zero status if a command fails. + Autoconf: use V_INCLS to update the list of include search paths. + Autoconf: don't put anything before -I and -L flags for local libpcap. + Autoconf, CMake: work around an Xcode 15+ issue. + Autoconf, CMake: use pkg-config and Homebrew when looking for + libcrypto. + Fix Sun C invocation from CMake. + mkdep: Use TMPDIR if it is set and not null. + Add initial support for building with TinyCC. + Makefile.in: Use the variable MAKE instead of the make command. + Makefile.in: Add instrumentation configuration in releasecheck target. + Make various improvements to the TESTrun script. + Untangle detection of pcap_findalldevs(). + Autoconf: don't use egrep, use $EGREP. + Autoconf: check for gethostbyaddr(), not gethostbyname(). + Autoconf, CMake: search for gethostbyaddr() in libnetwork. + Make illumos build warning-free. + Documentation: + Fixed errors in doc/README.Win32.md and renamed it to README.windows.md. + Make various improvements to the man page. + Add initial README file for Haiku. + Make various improvements to CONTRIBUTING.md. + Friday, April 7, 2023 / The Tcpdump Group Summary for 4.99.4 tcpdump release Source code: @@ -184,7 +309,7 @@ Wednesday, June 9, 2021 by gharris Fix "make clean" for out-of-tree autotools builds CMake: add stuff from CMAKE_PREFIX_PATH to PKG_CONFIG_PATH. Documentation: - man: Update a reference as www.cifs.org is gone. [skip ci] + man: Update a reference as www.cifs.org is gone. man: Update DNS sections Solaris: Fix a compile error with Sun C @@ -913,7 +1038,7 @@ Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release RFC 4340. Add support for per-VLAN spanning tree and per-VLAN rapid spanning tree Add support for Multiple-STP as per 802.1s - Add support for the cisco propriatry 'dynamic trunking protocol' + Add support for the cisco proprietary 'dynamic trunking protocol' Add support for the cisco proprietary VTP protocol Update dhcp6 options table as per IETF standardization activities @@ -1687,7 +1812,7 @@ v2.0.1 Sun Jan 26 21:10:10 PDT - Ultrix 4.0 is supported (also thanks to Jeff Mogul). - IBM RT and Stanford Enetfilter support has been added by - Rayan Zachariassen . Tcpdump has been tested under + Rayan Zachariassen . tcpdump has been tested under both the vanilla Enetfilter interface, and the extended interface (#ifdef'd by IBMRTPC) present in the MERIT version of the Enetfilter. diff --git a/contrib/tcpdump/CMakeLists.txt b/contrib/tcpdump/CMakeLists.txt index 9495b5d4c234..f9071295eff1 100644 --- a/contrib/tcpdump/CMakeLists.txt +++ b/contrib/tcpdump/CMakeLists.txt @@ -2,21 +2,26 @@ if(WIN32) # # We need 3.12 or later, so that we can set policy CMP0074; see # below. + # cmake_minimum_required(VERSION 3.12) else(WIN32) # - # For now, require only 2.8.6, just in case somebody is - # configuring with CMake on a "long-term support" version - # of some OS and that version supplies an older version of - # CMake. + # For now: + # + # if this is a version of CMake less than 3.5, require only + # 2.8.12, just in case somebody is configuring with CMake + # on a "long-term support" version # of some OS and that + # version supplies an older version of CMake; # - # If this is ever updated to CMake 3.1 or later, remove the - # stuff in cmake/Modules/FindPCAP.cmake that appends subdirectories - # of directories from CMAKE_PREFIX_PATH to the PKG_CONFIG_PATH - # environment variable when running pkg-config, to make sure - # it finds any .pc file from there. + # otherwise, require 3.5, so we don't get messages warning + # that support for versions of CMake lower than 3.5 is + # deprecated. # - cmake_minimum_required(VERSION 2.8.12) + if(CMAKE_VERSION VERSION_LESS "3.5") + cmake_minimum_required(VERSION 2.8.12) + else() + cmake_minimum_required(VERSION 3.5) + endif() endif(WIN32) # @@ -77,7 +82,7 @@ endif() # If, for whatever reason, directories in which we search for external # libraries, other than the standard system library directories, are # added to the executable's rpath in the build process, we most -# defintely want them in the installed image's rpath if they are +# definitely want them in the installed image's rpath if they are # necessary in order to find the libraries at run time. # set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) @@ -85,7 +90,13 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) # -# OK, this is a royal pain. +# We explicitly indicate what languages are used in tcpdump to avoid +# checking for a C++ compiler. +# +# One reason to avoid that check is that there's no need to waste +# configuration time performing it. +# +# Another reason is that: # # CMake will try to determine the sizes of some data types, including # void *, early in the process of configuration; apparently, it's done @@ -111,11 +122,88 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) # building 32-bit, the size for C++ will win, and, again, hilarity # will ensue. # -# So we *explicitly* state that only C is used; there is currently no -# C++ code in tcpdump. -# project(tcpdump C) +# +# Export the size of void * as SIZEOF_VOID_P so that it can be +# tested with #if. +# +set(SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") + +# +# Show the bit width for which we're compiling. +# This can help debug problems if you're dealing with a compiler that +# defaults to generating 32-bit code even when running on a 64-bit +# platform, and where that platform may provide only 64-bit versions of +# libraries that we might use (looking at *you*, Oracle Studio!). +# +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + message(STATUS "Building 32-bit") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) + message(STATUS "Building 64-bit") +endif() + +# +# Solaris pkg-config is annoying. For at least one package (D-Bus, I'm +# looking at *you*!), there are separate include files for 32-bit and +# 64-bit builds (I guess using "unsigned long long" as a 64-bit integer +# type on a 64-bit build is like crossing the beams or something), and +# there are two separate .pc files, so if we're doing a 32-bit build we +# should make sure we look in /usr/lib/pkgconfig for .pc files and if +# we're doing a 64-bit build we should make sure we look in +# /usr/lib/amd64/pkgconfig for .pc files. +# +if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*") + # + # Note: string(REPLACE) does not appear to support using ENV{...} + # as an argument, so we set a variable and then use set() to set + # the environment variable. + # + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # + # 64-bit build. If /usr/lib/pkgconfig appears in the path, + # prepend /usr/lib/amd64/pkgconfig to it; otherwise, + # put /usr/lib/amd64 at the end. + # + if((NOT DEFINED ENV{PKG_CONFIG_PATH}) OR "$ENV{PKG_CONFIG_PATH}" EQUAL "") + # + # Not set, or empty. Set it to /usr/lib/amd64/pkgconfig. + # + set(fixed_path "/usr/lib/amd64/pkgconfig") + elseif("$ENV{PKG_CONFIG_PATH}" MATCHES "/usr/lib/pkgconfig") + # + # It contains /usr/lib/pkgconfig. Prepend + # /usr/lib/amd64/pkgconfig to /usr/lib/pkgconfig. + # + string(REPLACE "/usr/lib/pkgconfig" + "/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig" + fixed_path "$ENV{PKG_CONFIG_PATH}") + else() + # + # Not empty, but doesn't contain /usr/lib/pkgconfig. + # Append /usr/lib/amd64/pkgconfig to it. + # + set(fixed_path "$ENV{PKG_CONFIG_PATH}:/usr/lib/amd64/pkgconfig") + endif() + set(ENV{PKG_CONFIG_PATH} "${fixed_path}") + elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + # + # 32-bit build. If /usr/amd64/lib/pkgconfig appears in the path, + # prepend /usr/lib/pkgconfig to it. + # + if("$ENV{PKG_CONFIG_PATH}" MATCHES "/usr/lib/amd64/pkgconfig") + # + # It contains /usr/lib/amd64/pkgconfig. Prepend + # /usr/lib/pkgconfig to /usr/lib/amd64/pkgconfig. + # + string(REPLACE "/usr/lib/amd64/pkgconfig" + "/usr/lib/pkgconfig:/usr/lib/amd64/pkgconfig" + fixed_path "$ENV{PKG_CONFIG_PATH}") + set(ENV{PKG_CONFIG_PATH} "${fixed_path}") + endif() + endif() +endif() + # # For checking if a compiler flag works and adding it if it does. # @@ -266,8 +354,6 @@ file(STRINGS ${tcpdump_SOURCE_DIR}/VERSION # Project settings ###################################### -add_definitions(-DHAVE_CONFIG_H) - include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${tcpdump_SOURCE_DIR} @@ -320,10 +406,17 @@ include(CheckStructHasMember) include(CheckVariableExists) include(CheckTypeSize) +# +# Get the size of a time_t, to know whether it's 32-bit or 64-bit. +# +cmake_push_check_state() +set(CMAKE_EXTRA_INCLUDE_FILES time.h) +check_type_size("time_t" SIZEOF_TIME_T) +cmake_pop_check_state() + # # Header files. # -check_include_file(fcntl.h HAVE_FCNTL_H) check_include_file(rpc/rpc.h HAVE_RPC_RPC_H) check_include_file(net/if.h HAVE_NET_IF_H) if(HAVE_RPC_RPC_H) @@ -368,7 +461,12 @@ else(WIN32) if(LIBNSL_HAS_GETHOSTBYADDR) set(TCPDUMP_LINK_LIBRARIES ${TCPDUMP_LINK_LIBRARIES} nsl) else(LIBNSL_HAS_GETHOSTBYADDR) - message(FATAL_ERROR "gethostbyaddr is required, but wasn't found") + check_library_exists(network gethostbyaddr "" LIBNETWORK_HAS_GETHOSTBYADDR) + if(LIBNETWORK_HAS_GETHOSTBYADDR) + set(TCPDUMP_LINK_LIBRARIES ${TCPDUMP_LINK_LIBRARIES} network) + else(LIBNETWORK_HAS_GETHOSTBYADDR) + message(FATAL_ERROR "gethostbyaddr is required, but wasn't found") + endif(LIBNETWORK_HAS_GETHOSTBYADDR) endif(LIBNSL_HAS_GETHOSTBYADDR) endif(LIBSOCKET_HAS_GETHOSTBYADDR) endif(NOT STDLIBS_HAVE_GETHOSTBYADDR) @@ -396,20 +494,68 @@ endif(STDLIBS_HAVE_GETSERVENT) cmake_pop_check_state() # -# Make sure we have vsnprintf() and snprintf(); we require them. -# We use check_symbol_exists(), as they aren't necessarily external -# functions - in Visual Studio, for example, they're inline functions -# calling a common external function. +# Make sure we have snprintf(); we require it. +# We use check_symbol_exists(), as it isn't necessarily an external +# function - in Visual Studio, for example, it is an inline function +# calling an external function. # -check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF) -if(NOT HAVE_VSNPRINTF) - message(FATAL_ERROR "vsnprintf() is required but wasn't found") -endif(NOT HAVE_VSNPRINTF) check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF) if(NOT HAVE_SNPRINTF) message(FATAL_ERROR "snprintf() is required but wasn't found") endif() +# +# Require a proof of suitable snprintf(3), same as in Autoconf. +# +include(CheckCSourceRuns) +check_c_source_runs(" +#include +#include +#include +#include + +int main() +{ + char buf[100]; + uint64_t t = (uint64_t)1 << 32; + + snprintf(buf, sizeof(buf), \"%zu\", sizeof(buf)); + if (strncmp(buf, \"100\", sizeof(buf))) + return 1; + + snprintf(buf, sizeof(buf), \"%zd\", -sizeof(buf)); + if (strncmp(buf, \"-100\", sizeof(buf))) + return 2; + + snprintf(buf, sizeof(buf), \"%\" PRId64, -t); + if (strncmp(buf, \"-4294967296\", sizeof(buf))) + return 3; + + snprintf(buf, sizeof(buf), \"0o%\" PRIo64, t); + if (strncmp(buf, \"0o40000000000\", sizeof(buf))) + return 4; + + snprintf(buf, sizeof(buf), \"0x%\" PRIx64, t); + if (strncmp(buf, \"0x100000000\", sizeof(buf))) + return 5; + + snprintf(buf, sizeof(buf), \"%\" PRIu64, t); + if (strncmp(buf, \"4294967296\", sizeof(buf))) + return 6; + + return 0; +} + +" + SUITABLE_SNPRINTF +) +if(NOT SUITABLE_SNPRINTF) + message(FATAL_ERROR +"The snprintf(3) implementation in this libc is not suitable, +tcpdump would not work correctly even if it managed to compile." + ) +endif() + check_function_exists(getopt_long HAVE_GETOPT_LONG) check_function_exists(setlinebuf HAVE_SETLINEBUF) # @@ -618,6 +764,14 @@ set(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS}) # check_include_file(pcap/pcap-inttypes.h HAVE_PCAP_PCAP_INTTYPES_H) +# +# At compile time HAVE_PCAP_FINDALLDEVS depends on HAVE_PCAP_IF_T. +# +cmake_push_check_state() +set(CMAKE_EXTRA_INCLUDE_FILES pcap.h) +check_type_size(pcap_if_t PCAP_IF_T) +cmake_pop_check_state() + # # Check for various functions in libpcap/WinPcap/Npcap. # @@ -707,19 +861,6 @@ endif(HAVE_PCAP_CREATE) # if we have them. # check_function_exists(pcap_findalldevs HAVE_PCAP_FINDALLDEVS) -if(HAVE_PCAP_FINDALLDEVS) - # - # Check for libpcap having pcap_findalldevs() but the pcap.h header - # not having pcap_if_t; some versions of Mac OS X shipped with pcap.h - # from 0.6 and libpcap 0.8, so that libpcap had pcap_findalldevs but - # pcap.h didn't have pcap_if_t. - # - cmake_push_check_state() - set(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS}) - set(CMAKE_EXTRA_INCLUDE_FILES pcap.h) - check_type_size(pcap_if_t PCAP_IF_T) - cmake_pop_check_state() -endif(HAVE_PCAP_FINDALLDEVS) check_function_exists(pcap_dump_flush HAVE_PCAP_DUMP_FLUSH) check_function_exists(pcap_lib_version HAVE_PCAP_LIB_VERSION) if(NOT HAVE_PCAP_LIB_VERSION) @@ -728,8 +869,56 @@ endif(NOT HAVE_PCAP_LIB_VERSION) check_function_exists(pcap_setdirection HAVE_PCAP_SETDIRECTION) check_function_exists(pcap_set_immediate_mode HAVE_PCAP_SET_IMMEDIATE_MODE) check_function_exists(pcap_dump_ftell64 HAVE_PCAP_DUMP_FTELL64) -check_function_exists(pcap_open HAVE_PCAP_OPEN) -check_function_exists(pcap_findalldevs_ex HAVE_PCAP_FINDALLDEVS_EX) +# +# macOS Sonoma's libpcap includes stub versions of the remote- +# capture APIs. They are exported as "weakly linked symbols". +# +# Xcode 15 offers only a macOS Sonoma SDK, which has a .tbd +# file for libpcap that claims it includes those APIs. (Newer +# versions of macOS don't provide the system shared libraries, +# they only provide the dyld shared cache containing those +# libraries, so the OS provides SDKs that include a .tbd file +# to use when linking.) +# +# This means that check_function_exists() will think that +# the remote-capture APIs are present, including pcap_open() +# and pcap_findalldevs_ex(). +# +# However, they are *not* present in macOS Ventura and earlier, +# which means that building on Ventura with Xcode 15 produces +# executables that fail to start because one of those APIs +# isn't found in the system libpcap. +# +# Protecting calls to those APIs with __builtin_available() +# does not prevent this, because the libpcap header files +# in the Sonoma SDK mark them as being first available +# in macOS 10.13, just like all the other routines introduced +# in libpcap 1.9, even though they're only available if libpcap +# is built with remote capture enabled or stub routines are +# provided. (A fix to enable this has been checked into the +# libpcap repository, and may end up in a later version of +# the SDK.) +# +# Given all that, and given that the versions of the +# remote-capture APIs in Sonoma are stubs that always fail, +# there doesn't seem to be any point in checking for pcap_open() +# and pcap_findalldevs_ex() if we're linking against the Apple libpcap. +# +# However, if we're *not* linking against the Apple libpcap, +# we should check for it, so that we can use it if it's present. +# +# So we check for pcap_open() and pcap_findalldevs_ex() if 1) this isn't +# macOS or 2) the the libpcap we found is not a system library, meaning +# that its path begins neither with /usr/lib (meaning it's a system +# dylib) nor /Application/Xcode.app (meaning it's a file in +# the Xcode SDK). +# +if(NOT APPLE OR NOT + (PCAP_LIBRARIES MATCHES "/usr/lib/.*" OR + PCAP_LIBRARIES MATCHES "/Application/Xcode.app/.*")) + check_function_exists(pcap_open HAVE_PCAP_OPEN) + check_function_exists(pcap_findalldevs_ex HAVE_PCAP_FINDALLDEVS_EX) +endif() # # On Windows, check for pcap_wsockinit(); if we don't have it, check for @@ -787,11 +976,6 @@ endif(WITH_SMI) if(WITH_CRYPTO) find_package(CRYPTO) if(CRYPTO_FOUND) - # - # Check for some headers and functions. - # - check_include_file(openssl/evp.h HAVE_OPENSSL_EVP_H) - # # 1) do we have EVP_CIPHER_CTX_new? # If so, we use it to allocate an EVP_CIPHER_CTX, as @@ -958,9 +1142,9 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel) # We do *not* care whether a structure had padding added at # the end because of __declspec(align) - *we* don't use # __declspec(align), because the only structures whose layout - # we precisely specify are those that get overlayed on packet + # we precisely specify are those that get overlaid on packet # data, and in those every element is an array of octets so - # that we have full control over the size and aligmnet, and, + # that we have full control over the size and alignment, and, # apparently, jmp_buf has such a declaration on x86, meaning # that everything that includes netdissect.h, i.e. almost every # file in tcpdump, gets a warning. @@ -979,12 +1163,19 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel) check_and_add_compiler_option(-Wmissing-prototypes) check_and_add_compiler_option(-Wmissing-variable-declarations) check_and_add_compiler_option(-Wold-style-definition) - check_and_add_compiler_option(-Wpedantic) + if(NOT CMAKE_C_COMPILER_ID MATCHES "Sun") + # In Sun C versions that implement GCC compatibility "-Wpedantic" + # means the same as "-pedantic". The latter is mutually exclusive + # with several other options. One of those is "-xc99", which has + # already been set for Sun C above. + check_and_add_compiler_option(-Wpedantic) + endif() check_and_add_compiler_option(-Wpointer-arith) check_and_add_compiler_option(-Wpointer-sign) check_and_add_compiler_option(-Wshadow) check_and_add_compiler_option(-Wsign-compare) check_and_add_compiler_option(-Wstrict-prototypes) + check_and_add_compiler_option(-Wundef) check_and_add_compiler_option(-Wunreachable-code-return) check_and_add_compiler_option(-Wused-but-marked-unused) check_and_add_compiler_option(-Wwrite-strings) @@ -998,9 +1189,13 @@ endif() # usage: cmake -DEXTRA_CFLAGS='-Wall -Wextra -Werror' ... # if(NOT "${EXTRA_CFLAGS}" STREQUAL "") - foreach(_extra_cflag ${EXTRA_CFLAGS}) - check_and_add_compiler_option("${_extra_cflag}") - endforeach(_extra_cflag) + # The meaning of EXTRA_CFLAGS is "use the exact specified options, or the + # build risks failing to fail", not "try every specified option, omit those + # that do not work and use the rest". Thus use add_compile_options(), not + # foreach()/check_and_add_compiler_option(). Another reason to do that is + # that the effect lasts in testprogs/ and testprogs/fuzz/. + string(REPLACE " " ";" _extra_cflags_list ${EXTRA_CFLAGS}) + add_compile_options(${_extra_cflags_list}) message(STATUS "Added extra compile options (${EXTRA_CFLAGS})") endif() diff --git a/contrib/tcpdump/CONTRIBUTING.md b/contrib/tcpdump/CONTRIBUTING.md index 26f226ebd973..215e4c6831c4 100644 --- a/contrib/tcpdump/CONTRIBUTING.md +++ b/contrib/tcpdump/CONTRIBUTING.md @@ -36,17 +36,17 @@ and ask! ## How to add new code and to update existing code -0) Check that there isn't a pull request already opened for the changes you +1) Check that there isn't a pull request already opened for the changes you intend to make. -1) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump +2) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump [repository](https://github.com/the-tcpdump-group/tcpdump). -2) The easiest way to test your changes on multiple operating systems and +3) The easiest way to test your changes on multiple operating systems and architectures is to let the upstream CI test your pull request (more on this below). -3) Setup your git working copy +4) Setup your git working copy ``` git clone https://github.com//tcpdump.git cd tcpdump @@ -54,19 +54,19 @@ and ask! git fetch upstream ``` -4) Do a `touch .devel` in your working directory. +5) Do a `touch .devel` in your working directory. Currently, the effect is * add (via `configure`, in `Makefile`) some warnings options (`-Wall`, `-Wmissing-prototypes`, `-Wstrict-prototypes`, ...) to the compiler if it supports these options, * have the `Makefile` support `make depend` and the `configure` script run it. -5) Configure and build +6) Configure and build ``` ./configure && make -s && make check ``` -6) Add/update tests +7) Add/update tests The `tests` directory contains regression tests of the dissection of captured packets. Those captured packets were saved running tcpdump with option `-w sample.pcap`. Additional options, such as `-n`, are used to create relevant @@ -96,12 +96,12 @@ and ask! It is often useful to have test outputs with different verbosity levels (none, `-v`, `-vv`, `-vvv`, etc.) depending on the code. -7) Test using `make check` (current build options) and `./build_matrix.sh` +8) Test using `make check` (current build options) and `./build_matrix.sh` (a multitude of build options, build systems and compilers). If you can, test on more than one operating system. Don't send a pull request until all tests pass. -8) Try to rebase your commits to keep the history simple. +9) Try to rebase your commits to keep the history simple. ``` git fetch upstream git rebase upstream/master @@ -109,32 +109,76 @@ and ask! (If the rebase fails and you cannot resolve, issue `git rebase --abort` and ask for help in the pull request comment.) -9) Once 100% happy, put your work into your forked repository using `git push`. +10) Once 100% happy, put your work into your forked repository using `git push`. -10) [Initiate and send](https://help.github.com/articles/using-pull-requests/) +11) [Initiate and send](https://help.github.com/articles/using-pull-requests/) a pull request. This will trigger the upstream repository CI tests. ## Code style and generic remarks -* A thorough reading of some other printers code is useful. +1) A thorough reading of some other printers code is useful. -* Put the normative reference if any as comments (RFC, etc.). +2) To help learn how tcpdump works or to help debugging: + You can configure and build tcpdump with the instrumentation of functions: + ``` + $ ./configure --enable-instrument-functions + $ make -s clean all + ``` + + This generates instrumentation calls for entry and exit to functions. + Just after function entry and just before function exit, these + profiling functions are called and print the function names with + indentation and call level. + + If entering in a function, it prints also the calling function name with + file name and line number. There may be a small shift in the line number. + + In some cases, with Clang 11, the file number is unknown (printed '??') + or the line number is unknown (printed '?'). In this case, use GCC. + + If the environment variable INSTRUMENT is + - unset or set to an empty string, print nothing, like with no + instrumentation + - set to "all" or "a", print all the functions names + - set to "global" or "g", print only the global functions names + + This allows to run: + ``` + $ INSTRUMENT=a ./tcpdump ... + $ INSTRUMENT=g ./tcpdump ... + $ INSTRUMENT= ./tcpdump ... + ``` + or + ``` + $ export INSTRUMENT=global + $ ./tcpdump ... + ``` + + The library libbfd is used, therefore the binutils-dev package is required. -* Put the format of packets/headers/options as comments if there is no +3) Put the normative reference if any as comments (RFC, etc.). + +4) Put the format of packets/headers/options as comments if there is no published normative reference. -* The printer may receive incomplete packet in the buffer, truncated at any +5) The printer may receive incomplete packet in the buffer, truncated at any random position, for example by capturing with `-s size` option. + This means that an attempt to fetch packet data based on the expected + format of the packet may run the risk of overrunning the buffer. + + Furthermore, if the packet is complete, but is not correctly formed, + that can also cause a printer to overrun the buffer, as it will be + fetching packet data based on the expected format of the packet. + + Therefore, integral, IPv4 address, and octet sequence values should + be fetched using the `GET_*()` macros, which are defined in + `extract.h`. + If your code reads and decodes every byte of the protocol packet, then to ensure proper and complete bounds checks it would be sufficient to read all - packet data using the `GET_*()` macros, typically: - ``` - GET_U_1(p) - GET_S_1(p) - GET_BE_U_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } - GET_BE_S_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } *** 22507 LINES SKIPPED *** From nobody Thu Jan 30 06:01: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 4Yk7hR6b9xz5mjCg; Thu, 30 Jan 2025 06:01: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 4Yk7hR5xX2z4G4c; Thu, 30 Jan 2025 06:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738216919; 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=ptmkkgGQnigUMr6gyPj7NLH7vT+0K5aUl3un89zm5eY=; b=Z0SL81rDYQp4wJ83btIuZcuNYAFt/YObVwycEX+vTd/nPUqzcURCe3m0et984GD6Vd50E4 w2lgbbPG0KD3sXb00OCDgF/qz7WAuy2oM60iHUu3gSYA2/yPcFiFpPuiRfkXdsKBmOKHyS 1L3zePfF6LCHvLpM7mgrud7S22qUKTTRdChGDHnoo8KwdQPkOKDY6pCpQYg9yB4GDEE2sk a7fsudzmurdPLJDGXk30DVMFr39gl6LNJnzRmrHnK9q1us4j8RMNzXHM7Xf+vD6V1I1Xya aEyr8W2OtSLlz/1o39F8PDp0Z3QeomH9+7RsQ1kuPeapNYjrfMK9FmkvA7mw+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738216919; 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=ptmkkgGQnigUMr6gyPj7NLH7vT+0K5aUl3un89zm5eY=; b=teHGWVYqOWL6ALrTXMflNsxwrvFX/eev4pVW6b2+wQqwGpgTKatnfHq2r7cShWNu8WkJbd SJT3h/NimBAhrFDkqJi4efsOt3bT0/X8+xXKyor5qDSiwsg76tI5G7nTASusmFkibm60C1 9cnO3Yh00E8a0jzShklicJuADwLKjSDlX4LibY/hI6pdlNPgt1f6l0NA6Wp0sCTwH2nnet V08TAPvY+Dcb8ksVGaJvU5+GZMZk8ANYoaKlfCNGNjg6P9opj3r86468gE1sfoOrJfD7VC GJqPeHaeaGCRvdaQKbJh9f3dzXpcgwohFNGevSwJyUTCztYPmMGpZmNInZS0+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738216919; a=rsa-sha256; cv=none; b=Dncq5IjOuS8mIFVAgXCcfujx2IU4t+5iYNsL+toGqFJpuG9wXO8M4iCfJUeX2Bk/iia5NW zyNw5Lz4sa7eJY2yyaxSW4+pFSAeRe9ooSnJntQ8RAmnOi+il1c07jPW6d8aDDWtGO10ic B5xpRkPZ/ZGZSB6rKG5gExwsAsJDxnCxxodWOoT2ucTPJi3rU15Ij4mMyu+YIQRaOIGT+w PxcDNA/eLJ5SmmOobBCbPjXheWqt+ZQH18FuEL5ZAY0lTP5TcyxBChXqqshPkGJMpzschN YkwW+O17z6qNiEUGiGV+driPxAZM0CvHktwwXUmNJhPzYi+urpxLMtLxaq3r6Q== 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 4Yk7hR5XKLzc8g; Thu, 30 Jan 2025 06:01: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 50U61xp3014828; Thu, 30 Jan 2025 06:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50U61xlG014827; Thu, 30 Jan 2025 06:01:59 GMT (envelope-from git) Date: Thu, 30 Jan 2025 06:01:59 GMT Message-Id: <202501300601.50U61xlG014827@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: 99cba402b5ae - Create tag release/14.2.0-p1 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/tags/release/14.2.0-p1 X-Git-Reftype: annotated tag X-Git-Commit: 99cba402b5ae027c33378d994c161f2b3b5afd8b Auto-Submitted: auto-generated The annotated tag release/14.2.0-p1 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.2.0-p1 tag release/14.2.0-p1 Tagger: Philip Paeps TaggerDate: 2025-01-30 05:56:24 +0000 Tag FreeBSD 14.2-RELEASE-p1 commit a1e3ff6580de176e7b5e989ae7b345ee0797af0d Author: Mark Johnston AuthorDate: 2025-01-29 17:34:06 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:34:06 +0000 Add UPDATING entries and bump version Approved by: so From nobody Thu Jan 30 06:04:20 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 4Yk7l852Shz5mkTD; Thu, 30 Jan 2025 06:04:20 +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 4Yk7l84Fvrz4GYj; Thu, 30 Jan 2025 06:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738217060; 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=OJ97YiEJtY6BN52VEK8p/BmTWINjpBRN1d4ayjORfwk=; b=sTJC2ziaDDQv5//MPZx62WSieoVqbekPEnnZNU1GwiOzMhqrJL7WeelA5nLkcsU895jBwH 18LVQsCo23kaCUe/PnJrEr0KcsmgMHqc1dknVzBBvO9aCCAJPqQiefVqHo9QGB3h1bEUbM sqKpZdDWua+RF/Oq0QDq5EXBLhQF/zrJMvilHKJ2y7PLfQ9tjaM5sCC2wv25+iSojRFZ2A XfQpqfE+9QKi84YcGnScrDkqPG4GrNp2GqifX55ENE+lv+tfMNayRuFelyqHL/6VKD664p 8MnK+5OHIgQE7qfEwEQ4+Zyblkg/V9/m5QrbZ121vnEKM4oxE5hB+ZRR+QYlTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738217060; 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=OJ97YiEJtY6BN52VEK8p/BmTWINjpBRN1d4ayjORfwk=; b=WbOEDHSFiXASbTygXDVsEl9/0LjMWfaPypkL7kZWFAwAQlr4QrSgbcxvllpnR13q76Qj8K lzSwpFZIUu3+iRZtZIhFqoQ+MnUy2+v9Y1aocltAyTgCUk7wqiMkA7dhtYQwqOgZWXBsQC 4s4HD/0h26sffSe7OFAxVhoVJzgIMlTZaRD5tornbdY/03rDQH+YxWQxP/KfNL16hxsG3N HeyR5JnrFKDHBHRf7SgZV1XdPoR38OEx2BOwvrpIxlczZkquyAlMN7Ili/MWslrhL9vyHz hmdcCTuWP+3NFu1fPtMu7oIU/AVX5+zm+8OHoxiMLq7ggEecDoR04kOZSNcRug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738217060; a=rsa-sha256; cv=none; b=Ej5aJAX8tU9eaozEgSvie9zvMwlco+42WqaKGP+aDTShhM2BemY7u9ZpYn0JHIY0qX7wlP K6/GWrphQn2v+SN49+6tzsgCFjsQT+uo0cVOXYi473R57m8WQlAWm86y6RhC+iCjvcW9EW pk5uijX+G//q5Y41PpVKMgyIzivJalmfrKPoPz+uqlS2Jh4S+hpV9rf70U5sFuwLE2rGwd Vu2inBEmMMxMfAJjWi1F1f+5wElNeP1TNmR4CZrWdw8oAePmB+2v31JD7ThhFHryhCzN8y 4RwNMrIoF+qAwb50LCEVuguuqMUGRymv+09LWrrZo4qTutZzCLnfqJSC9+zm6w== 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 4Yk7l83sKRzbQ2; Thu, 30 Jan 2025 06:04:20 +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 50U64KK3018778; Thu, 30 Jan 2025 06:04:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50U64KJh018777; Thu, 30 Jan 2025 06:04:20 GMT (envelope-from git) Date: Thu, 30 Jan 2025 06:04:20 GMT Message-Id: <202501300604.50U64KJh018777@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: fc590d297475 - Create tag release/14.1.0-p7 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/tags/release/14.1.0-p7 X-Git-Reftype: annotated tag X-Git-Commit: fc590d297475f70d7af4b5c85ee063a790d0ba65 Auto-Submitted: auto-generated The annotated tag release/14.1.0-p7 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.1.0-p7 tag release/14.1.0-p7 Tagger: Philip Paeps TaggerDate: 2025-01-30 06:03:25 +0000 Tag FreeBSD 14.1-RELEASE-p7 commit 89321a8f570708e0cfd744ef3b934f53da4e04c8 Author: Mark Johnston AuthorDate: 2025-01-29 17:23:53 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 18:46:31 +0000 Add UPDATING entries and bump version Approved by: so From nobody Thu Jan 30 06:06:32 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 4Yk7nh6Mjxz5mkFt; Thu, 30 Jan 2025 06:06:32 +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 4Yk7nh5k6sz4H1Z; Thu, 30 Jan 2025 06:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738217192; 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=uVQJj5gV9dU6NIMX51czvK2GQEuCBSr+GGRPkKb2qBs=; b=t+NUqN0aYfWcgNld5T7nxB0LPVzuKUtFnlPqeubbxYIykyFs8Ud+uvRT03LzIYB2Hqysub rJ3OwJbk8HQ06docQ0HrQbA9jaCwgouk4opGIRDZhKXkbj1U4qMv5nNew2gJSdj6cW3JHi Ax0sqgLw6saEAtHxZyqH3JmFZPJOlnoHa68NY/LqHHQNx/pxxjMGH9QhL+vrkaYI31ORZT K+nQB/gIGUGQqd11KnxhmRu33jH4PeY5jcvt6elzvlwqC7uaofF88UkARDTtkvVImOwpPK uy0RlkdAdE2O9Bo+zcuysmDdxGXnaDfczeLGs8oNQx+Kr2C8BjktuLpMhajt0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738217192; 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=uVQJj5gV9dU6NIMX51czvK2GQEuCBSr+GGRPkKb2qBs=; b=LUJ0I0UQYTblP/PF5eFN/neudM9NGqqTACFJ3PoS1qfKuiKhb30oqguW5fZ4kS7UT7SXoy rhaU2uZDYQv+sQ/06niGUf7MD48BJgt0Ad+DFxclRSePKqs/F6885SFMzUWJHdDF21veqj CCwAPndGuP6OqHK8SmPBvAhVQM6BGf3PyzTo0F+H5ga6G0/pl9DeQHja1g6hSS12MbykPn sD+cwSkcbQ+bMhRgpa/V/1Zq13+AumVBRZLGL5xAkLYytdapvl9c0f/FNrzLdT4SIfzSHF /oTzr9vZx2262fm1dGiRj3/0YEBiBdSmqvPgrw+0MCfElincfFaQz6ZQlyVdqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738217192; a=rsa-sha256; cv=none; b=UR6E8AAxi8+6FMbUMJwYxKvoAR4FZxHQDQnLSEs8Xr7mB8QIB8C/55WDWndcB3zA+qmO3P tw87FZhJ82q/fx4dj0GalXGYug1LtGss8ahn5P/AD2FMytkFdJWNUx0QToaL6ZtR5cIriK SK1WYQRVoWVY1FBVY0QftezkmWDxTxpqH3PWv4iLECVe3pAGn+NjLTphYxnqr9x/L3M/pg 9hqF+LJ1uzoxUK8wtogmKtFpdtwcIbcdc69maI4m5zO0pS95/De0pzDEGSFgynQsz5ifCP GWNlExwG+pH97z+5naQ+gyVMjSlcnWw2K/Z1SPOVCbcltNZ13Viq0AtYURwb7w== 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 4Yk7nh56fLzc8t; Thu, 30 Jan 2025 06:06:32 +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 50U66We9019520; Thu, 30 Jan 2025 06:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50U66WvE019519; Thu, 30 Jan 2025 06:06:32 GMT (envelope-from git) Date: Thu, 30 Jan 2025 06:06:32 GMT Message-Id: <202501300606.50U66WvE019519@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: c41dd2ab4030 - Create tag release/13.4.0-p3 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/tags/release/13.4.0-p3 X-Git-Reftype: annotated tag X-Git-Commit: c41dd2ab4030c97fccd638a35963faca4e39c018 Auto-Submitted: auto-generated The annotated tag release/13.4.0-p3 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/13.4.0-p3 tag release/13.4.0-p3 Tagger: Philip Paeps TaggerDate: 2025-01-30 06:06:10 +0000 Tag FreeBSD 13.4-RELEASE-p3 commit aef6b5321eead428ac7cc25142d14a1d4b875df0 Author: Mark Johnston AuthorDate: 2025-01-29 17:08:56 +0000 Commit: Mark Johnston CommitDate: 2025-01-29 17:08:56 +0000 Add updating entries and bump version Approved by: so From nobody Thu Jan 30 09:12:20 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 4YkCw45VzWz5nLMC; Thu, 30 Jan 2025 09:12:20 +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 4YkCw452npz3Ps0; Thu, 30 Jan 2025 09:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738228340; 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=BhynY0h+PbXQuxsUFl7MnpMvKUrk6tIpOQkMU9ry/c8=; b=Mel7nwczBO7LL29YYyArKbq/2EEbBlFtzfq+EIwxWtrS7a9AxB2J+R7qev1Pr8BF7bWUrw zEgl6CgWcQwtw4bKFuOZwJ8BkY/CeK6MwsHqW9m3Hr+Xout//NmB6XSajVvXqEUn514jkZ WLnCrTZIKZch0kuJDyqMMSUGgeWuzyNHciFRemVdMkKf3NM509dUiCQ+Gb5jlv15ryGRad oxviP5K/7CxMMnKs4SR/H7styLdClyrZ2/2BbnmN/YfQS4L7EdcvpGXvP74boo3sAg8UoK b5h70tel1VAip5heyMhkf2pFimiNMrrHRj894o8nP3nMSOS2fBBVSieq55VoWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738228340; 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=BhynY0h+PbXQuxsUFl7MnpMvKUrk6tIpOQkMU9ry/c8=; b=UkFBlfhhbFvv2XvNk7zF7zsI4EhrwdDMujXQEDi2l/efFe9VqkBZKGzLOruiiqCto00uJV cEmIm9IwS6hGxzpraBThiuf3VZOYwhiP8wH9q9OJWNwyaLMzcWru0WGQUmbV8imfxV5m6t +/pvYlQ/vIBaCARRTnqYMaiqnuYQsap/zE9IcHBao9mYM33l3N6BcVO8ose6cBGm1MNO00 Lvgyty38/rm0ygOJlGsoVm+qRN2IPZBGePT83SgpXfEhWxXX0AxD8Y8bHO0bKJY4VMq4HF g7leSy14tafP2k8nLXzqv9SR+yC3pXJxwpssPqydud4a/YglMfYKTkdjOCwH5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738228340; a=rsa-sha256; cv=none; b=HOCRXlJAOza/42pj6oyekzf0i4CqLNtkjVFlRL4IOzLh+6WYgyOqC1+5UA3SgBl7fECb42 8M0i99uQy/6LiG8lrh5fBEdTNkikVRbHAC/mwu/xq3Dz9iU3JEm5Vojqr8Bhg/JAIldAtP /JVa+fm0BGzefEWZi8ssTFR0dVDypcH3jM4rDfSOVbzQ/2nW5Stlwy3A1Ee1Zx4NaV4Hn+ Bqh2V5jocbd++ZuW+5kHytQNRZSGSCL3idmYBPimA62Lm6UC3yDrZFX5KxNPVlPFCCHXpd XNTj8V3T7fWYGxDBM1n9mykatdFmLoXfpEYOuY5kKqys3vEGsCQQr46l6bgyog== 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 4YkCw44f6vzhvf; Thu, 30 Jan 2025 09:12:20 +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 50U9CK1v074308; Thu, 30 Jan 2025 09:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50U9CKkp074305; Thu, 30 Jan 2025 09:12:20 GMT (envelope-from git) Date: Thu, 30 Jan 2025 09:12:20 GMT Message-Id: <202501300912.50U9CKkp074305@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: af699d966661 - stable/14 - csu: add the "Retain" flag to notes sections flag 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: af699d9666613141e5eddfe1099a9741615a81db Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=af699d9666613141e5eddfe1099a9741615a81db commit af699d9666613141e5eddfe1099a9741615a81db Author: Konstantin Belousov AuthorDate: 2025-01-24 11:32:53 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-30 09:12:05 +0000 csu: add the "Retain" flag to notes sections flag (cherry picked from commit 6700e2d963ff0475cc5cd444e92ce40855643084) --- lib/csu/common/crtbrand.S | 2 +- lib/csu/common/feature_note.S | 2 +- lib/csu/common/ignore_init_note.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/csu/common/crtbrand.S b/lib/csu/common/crtbrand.S index b59e2fd8056b..a06f72daa99d 100644 --- a/lib/csu/common/crtbrand.S +++ b/lib/csu/common/crtbrand.S @@ -36,7 +36,7 @@ * for more information. */ - .section .note.tag,"aG",%note,.freebsd.noteG,comdat + .section .note.tag,"aGR",%note,.freebsd.noteG,comdat .p2align 2 .4byte 2f-1f .4byte 4f-3f diff --git a/lib/csu/common/feature_note.S b/lib/csu/common/feature_note.S index 5c1d56d4cde1..fb9f6141699e 100644 --- a/lib/csu/common/feature_note.S +++ b/lib/csu/common/feature_note.S @@ -29,7 +29,7 @@ #include #include "notes.h" - .section .note.tag,"a",%note + .section .note.tag,"aR",%note .p2align 2 .4byte 2f-1f .4byte 4f-3f diff --git a/lib/csu/common/ignore_init_note.S b/lib/csu/common/ignore_init_note.S index 57fb4e8f4d51..d78be61f17a9 100644 --- a/lib/csu/common/ignore_init_note.S +++ b/lib/csu/common/ignore_init_note.S @@ -30,7 +30,7 @@ #include "notes.h" - .section .note.tag,"a",%note + .section .note.tag,"aR",%note .p2align 2 .4byte 2f-1f .4byte 4f-3f From nobody Thu Jan 30 11:01: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 4YkGLc0qg9z5lysk; Thu, 30 Jan 2025 11:02:00 +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 4YkGLc0Cqtz3gvN; Thu, 30 Jan 2025 11:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234920; 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=or0dIPTLiQ1aTkWJGVDiiwUzyBrny6rvPsSfKcKDoBM=; b=x1QhLTORzzgfqNXxUp2ax0wWBi+80X/3maDeD59/KYpzAtAzIqpC9wOFl3oid8Vy5zsZhU vCIVUZ41/jrtFoqqm1FAc+byLeMd93IhoNkbKNGqozZUxrz54IZmGcYanCePAEShrxtdKM p0BJQyHSFinQPwaP9gpcEcjM+gZxN62lEY8hir9FRz4FqovivjXrT1NgYAmMDPfLEuoC/K 0R1LZfwfTzpzaV/4ZessXkWrswOqaGiQaJLQVLxrZuLpb+kIBnlYVRMv88LXheZ+dXZK9f I0xCJ5lTE2ZQxdz06Jx7DBPgjCCtnEO6CIK7gJFOTqS08mhOjP6fPVZsVIpNPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234920; 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=or0dIPTLiQ1aTkWJGVDiiwUzyBrny6rvPsSfKcKDoBM=; b=ud2AyOtmb7PJ9eoSnGEqo6U/KtruyN/nNgpUymBF3lcMXXwQJRNy76dSdBg1Z88zkzltli 0tZ4iHSxlZsYsuD1picVgL6/GfX8ROqTyYbprmlNr5a5zmmBgbQOkpziatKF+k0Ku3PmKp Mn4MKiNOfM6TbhYRViY/Oc6IaKoyjVw+hy81ygC/eIuF00ocTtIhVD9cezcZZEwaQ1+7It jXQ4qu5RRf12SsQvfcUcOtWC07l+tof54GVcfOMgtQLzEf3GiMOKv3KZvSR2b9PAeGbbOg BK/yAFL3HKhqNBpvHx+qT+c+zHkCduMh1XDIoeEaAI/dvI8WNZmvikeJpKdo1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738234920; a=rsa-sha256; cv=none; b=PkATZTEbBcFnD+ZuXuTBVJndgLGgSqHahGkXJJL9AmlWP+e901LK0jIJZSIxhDxHmYOZuZ NNik9nsFJckAYVlhxrCeKyy/JgWy9dcPeWweZW5WCfyoQ3Nz0nmXFyBT6cVFWjUSQ6+3t5 M+R0mFYGcgSdMnPi36nsX8NGZEkzy0oTvoq+Sl+BUPPQrU21n6MVcXn5csCO25ZhhBU27U P0d2M2rCo4M2Nu1hHSqmpPMrTlRslZmdfgssenFxi1Bf1io0S1UYyo3KKxzXXljH14xfW2 QH0tkwuS/BUVxOuoRD48nnLqd4NoIP3KA/2NPNEhcCj8fhUcNt0xiJIaRSZu3g== 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 4YkGLb6ZXLzllT; Thu, 30 Jan 2025 11:01: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 50UB1xmR077872; Thu, 30 Jan 2025 11:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UB1xeQ077869; Thu, 30 Jan 2025 11:01:59 GMT (envelope-from git) Date: Thu, 30 Jan 2025 11:01:59 GMT Message-Id: <202501301101.50UB1xeQ077869@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: d467e667dfcc - stable/14 - pf: add extra SCTP multihoming probe points 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: d467e667dfcc26712f10491b6734c79689c41d5b Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d467e667dfcc26712f10491b6734c79689c41d5b commit d467e667dfcc26712f10491b6734c79689c41d5b Author: Kristof Provost AuthorDate: 2025-01-08 21:23:17 +0000 Commit: Kristof Provost CommitDate: 2025-01-30 11:00:30 +0000 pf: add extra SCTP multihoming probe points Add probe points in the SCTP multihome parsing code. This is intended to help debug a multihome issue, and is expected to be generally useful, so will be included for everyone. MFC after: 2 weeks Sponsored by: Orange Business Services (cherry picked from commit 2d2481c35f5a53322e982e47a2bb8f9085f525b7) --- sys/netpfil/pf/pf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 31c3dd8009de..255d85440fa5 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -132,6 +132,13 @@ SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", "struct pf_sctp_source *"); SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", "struct pf_kstate *", "struct pf_sctp_source *"); +SDT_PROBE_DEFINE4(pf, sctp, multihome_scan, entry, "int", + "int", "struct pf_pdesc *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome_scan, param, "uint16_t", "uint16_t"); +SDT_PROBE_DEFINE2(pf, sctp, multihome_scan, ipv4, "struct in_addr *", + "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome_scan, ipv6, "struct in_addr6 *", + "int"); SDT_PROBE_DEFINE3(pf, eth, test_rule, entry, "int", "struct ifnet *", "struct mbuf *"); @@ -6533,6 +6540,8 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, int off = 0; struct pf_sctp_multihome_job *job; + SDT_PROBE4(pf, sctp, multihome_scan, entry, start, len, pd, op); + while (off < len) { struct sctp_paramhdr h; @@ -6544,6 +6553,9 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, if (ntohs(h.param_length) < 4) return (PF_DROP); + SDT_PROBE2(pf, sctp, multihome_scan, param, ntohs(h.param_type), + ntohs(h.param_length)); + switch (ntohs(h.param_type)) { case SCTP_IPV4_ADDRESS: { struct in_addr t; @@ -6573,6 +6585,8 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, if (! job) return (PF_DROP); + SDT_PROBE2(pf, sctp, multihome_scan, ipv4, &t, op); + memcpy(&job->pd, pd, sizeof(*pd)); // New source address! @@ -6606,6 +6620,8 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, if (! job) return (PF_DROP); + SDT_PROBE2(pf, sctp, multihome_scan, ipv6, &t, op); + memcpy(&job->pd, pd, sizeof(*pd)); memcpy(&job->src, &t, sizeof(t)); job->pd.src = &job->src; @@ -6656,6 +6672,7 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, return (PF_PASS); } + int pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, struct pfi_kkif *kif) From nobody Thu Jan 30 11:02: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 4YkGLd4bpHz5lyW0; Thu, 30 Jan 2025 11:02: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 4YkGLd0nb0z3gpd; Thu, 30 Jan 2025 11:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234921; 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=ICHm74rZ5L9aQnsmHPjLTndgOPaUaZvT+GD5brLGVzs=; b=k3KUWxTs0Wy3wuQC78/LH/nev4tOyyXnKwu4K87a662bRBtSEQuje0kuObw2dZA4t0Z6RT OFsSlLSDnMy//HYSTSDRXlxFAM1Qsw+ZY8FnuIJLxjVmf68sL9+ICfPphwx0E/bGRcXB/9 cJrfR3nQJt4LPtNj4zDv9TMthdgAeJySoBHYKEiGTuEeUx0l+LeJep32ef0Z1zQrfKkjBc CAozZUi4rndg9i+0M6tSNzwvhcEsDGeXsCOLRSBbJx0Ns6CCL7LiI1c7szOML2GkNCspi3 VKtvd8SK41sCtPWrgUqYem0Dg2ytow8UyerhwcBXllcX39zThmZLOnu6PrdQfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234921; 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=ICHm74rZ5L9aQnsmHPjLTndgOPaUaZvT+GD5brLGVzs=; b=PYgh6ie5GGGzxd6Wo3pcdVQRu1mNBHfRSJut+qW1EDzRtUxtd7mdfLneEd81NpqHpQfLUQ zUampr1Mat++EInCo7Ko0ijGzlNOc9419ged+seTKvlHIHnQQ+KiVgKEKclX76kyC4yA4p F0M4I79tiW2kN82ixQ8w7b0XolVMamLdNnmuXxt+ABFcs55jMLODc94MQEYR8yfMZUryoz A3nXk+eBwKrykQOSCWAtiQegMpTTuCKyOEXYjm6kGlqnQVjyjNaB5LG1gKPEkZ0Ewjo7Zn bicvLqb9w0f5BmKKqSwLJri2sYorF23VhZ9maXVEamDXSE5vG3ZQj0lVqJb2ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738234921; a=rsa-sha256; cv=none; b=fjGwMmj1PeUp9pa1WXxwWo3ghtdosZHyOpTXUeXKPcChqhiF5/qPiLpbT/7UNN10P5cRZo 2pfb2N44lF89TlagY2L3NiHenz+wVk+vl6lAe9r8x6uqeo5GiYogVYWEF7cKApx5i1oKoQ 2J3c+uapUSM5W6mhnsfguC9j9BUTggb3w2Cvm7zcd9uHBdRmxU8b4ItxnKm8E6v/LGTvCv ln3YgjEEgj/NvDYw2b7aKa16VRnx30fsZHfWVwWgkVoBbFHwQy/Yua/BRnZtj5m8V2t8Dc danulhQx0n8OXswGSzbMlMOcmEZyGwK5zotaQaZdebceccjL78buyjFYIQXmxw== 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 4YkGLd0NvvzlKw; Thu, 30 Jan 2025 11:02:01 +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 50UB20Oi077913; Thu, 30 Jan 2025 11:02:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UB20wX077910; Thu, 30 Jan 2025 11:02:00 GMT (envelope-from git) Date: Thu, 30 Jan 2025 11:02:00 GMT Message-Id: <202501301102.50UB20wX077910@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: fc167e91313c - stable/14 - pf: verify that ABORT chunks are not mixed with DATA chunks 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: fc167e91313c7c544119f524ae5cbb2439734352 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc167e91313c7c544119f524ae5cbb2439734352 commit fc167e91313c7c544119f524ae5cbb2439734352 Author: Kristof Provost AuthorDate: 2025-01-06 09:06:01 +0000 Commit: Kristof Provost CommitDate: 2025-01-30 11:00:30 +0000 pf: verify that ABORT chunks are not mixed with DATA chunks RFC4960 3.3.7: DATA chunks MUST NOT be bundled with ABORT. MFC after: 2 weeks Sponsored by: Orange Business Services (cherry picked from commit 541ea3d7828e0ede161ac2d8ef3e8419657ef5cb) --- sys/netpfil/pf/pf_norm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index a92462c53f15..de4df7ebf4de 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2171,6 +2171,14 @@ pf_scan_sctp(struct mbuf *m, int ipoff, int off, struct pf_pdesc *pd, if ((pd->sctp_flags & PFDESC_SCTP_SHUTDOWN_COMPLETE) && (pd->sctp_flags & ~PFDESC_SCTP_SHUTDOWN_COMPLETE)) return (PF_DROP); + if ((pd->sctp_flags & PFDESC_SCTP_ABORT) && + (pd->sctp_flags & PFDESC_SCTP_DATA)) { + /* + * RFC4960 3.3.7: DATA chunks MUST NOT be + * bundled with ABORT. + */ + return (PF_DROP); + } return (PF_PASS); } From nobody Thu Jan 30 11:02:02 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 4YkGLf3cCbz5lyqW; Thu, 30 Jan 2025 11:02:02 +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 4YkGLf1mg4z3gjl; Thu, 30 Jan 2025 11:02:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234922; 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=zI2n1mPCq1/3GhVDZFa+yaAvjq+1xAulDjIsda7YfR4=; b=N5IoCtCkYCiHfhXQjZ00UFhauZH/T/plPQGEh4PC7EV0pO9WEcyo5y4nHicAaoa+cxf+rq nWWlvllK5NH9w/xzjz80RYIBcW9180YIPR5nH2vPiCFVWXEYNeLHop0CbWUnii6g8Ov28C /LXvTXkduolGssDMwuZvC4idf2cHc1rzTZKdQ8BwNdiwrJ0dt66r/7UT2Gp+/UXhCWq2ow c87krdwLXEab1Uo2efT/FstcnOv0kIka5/tGFGwApzj2lAbvJ34zINXvidkhm+jmqbMvwQ jeg4n/uQWele1pdgHTo0r4lHh1u7ZLrmVpuinZICHTSul7h77ypbkhyVKPqzbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234922; 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=zI2n1mPCq1/3GhVDZFa+yaAvjq+1xAulDjIsda7YfR4=; b=ae0q8SPFDeJ6hhZwmhzfRov0dw+O3JAgBERTVlxMXjeUH03UqCbxHq02tWIsBYKj4/4EUt 0UCLcpMC0TGWEaX07umCPDfOSIy2zOoNS7BfIT3O1rn6jf1+BZaGtyctfN7n2qJ/xxdtA0 Vj64q2jXw1HuBckPa5k1e+CtQ3Kj8EiqazLsWVqHgkmkWu7cY/VIb+3Ka/pqX/tIRAqmAP dR06UG7raFyK8uZpY6W3+OiI1RICzdAd3uyGjV4bfMKVcR6StFtqnnkcJWZeWmcNbhOyYL 4L/LuE6KdGIIpBZF3pM4D1/DRNoOcr77nMd2YWmoLLQhe43FrXF11qtXobuBtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738234922; a=rsa-sha256; cv=none; b=GQEj1TfvSl/WcdMOoAV/KpfmYb7AljJEE+yzS0hWtcdo2IC4N6EusHJvirQBUP5Err9RDX paqc0RXkNMUbLaYu/CExHHo6aruKNe9wJ8LqXtTrkU+/hydL3TG4FJ7BlM3ggzquubVomv KmxisDZzBQq3BufwlLNOpTn9jSMZZjhdSzpF0g6J+PPTocKZ82Eq7e56d3n0hYzT9HY3N/ NHgbQDVCSxr/wBwQ5tgm/4CCBulB3vvl7hQ9wruob0kCL0W1aqhlrTM1RC/TX8g6zdka5d sgSXto/UHbXqIj2ed6b6kvceVFI/R/K08Vg/xfmungoVuqy6g8W1sUQG99sx6Q== 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 4YkGLf1MznzlW5; Thu, 30 Jan 2025 11:02:02 +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 50UB220l077953; Thu, 30 Jan 2025 11:02:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UB22JX077950; Thu, 30 Jan 2025 11:02:02 GMT (envelope-from git) Date: Thu, 30 Jan 2025 11:02:02 GMT Message-Id: <202501301102.50UB22JX077950@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: 4557b1693a11 - stable/14 - pf: verify SCTP v_tag before updating connection state 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: 4557b1693a11246d2ae9adcf03bd2a4a35d79aa0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4557b1693a11246d2ae9adcf03bd2a4a35d79aa0 commit 4557b1693a11246d2ae9adcf03bd2a4a35d79aa0 Author: Kristof Provost AuthorDate: 2025-01-06 09:06:58 +0000 Commit: Kristof Provost CommitDate: 2025-01-30 11:00:30 +0000 pf: verify SCTP v_tag before updating connection state Make it harder to manipulate the firewall state by verifying the v tag before we update states. MFC after: 2 weeks Sponsored by: Orange Business Services (cherry picked from commit 4713d2fd5663eb64aa582dabced21d253c901a66) --- sys/netpfil/pf/pf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 255d85440fa5..15569a294f98 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6200,6 +6200,13 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } + if (src->scrub != NULL) { + if (src->scrub->pfss_v_tag == 0) { + src->scrub->pfss_v_tag = pd->hdr.sctp.v_tag; + } else if (src->scrub->pfss_v_tag != pd->hdr.sctp.v_tag) + return (PF_DROP); + } + /* Track state. */ if (pd->sctp_flags & PFDESC_SCTP_INIT) { if (src->state < SCTP_COOKIE_WAIT) { @@ -6231,13 +6238,6 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, (*state)->timeout = PFTM_SCTP_CLOSED; } - if (src->scrub != NULL) { - if (src->scrub->pfss_v_tag == 0) { - src->scrub->pfss_v_tag = pd->hdr.sctp.v_tag; - } else if (src->scrub->pfss_v_tag != pd->hdr.sctp.v_tag) - return (PF_DROP); - } - (*state)->expire = time_uptime; /* translate source/destination address, if necessary */ From nobody Thu Jan 30 11:02:03 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 4YkGLg4rkVz5lybT; Thu, 30 Jan 2025 11:02:03 +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 4YkGLg2tNDz3gpk; Thu, 30 Jan 2025 11:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234923; 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=Ep6AfEjNyxC4jIYPl3md/z1agIKgNsCsjQtd5gqwEFE=; b=iduALwqbY7Xs0a3KpXE/UfLrBl6FSdB7i2TqmoXDYppI2UC4RgjjFT4FkoF5MtfvyIqnxF bVMsPx4ddchKpLNxt9lOhp7PPLqtFcGCmS5lNgHxQW18G7+il6iMvbUoAJERktT2XHiomt Alb0nXBd81X4E3341iWz2mezQX0WdjxNsXybHuj9o5mExTUdFPYsMr52dnKflLlQKcWglA fSWIwx7vDThN+dFxfOpIXZTKZTPxKJDpf3FTuRNG1zMyGXzoxj/QuJpV59MMZ0oxzhSuuu thbgSL5lKMoU2AjCkywC0chDJ6pNGWMw2b5SknLESlTXJwHTToYONrq7hAja0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738234923; 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=Ep6AfEjNyxC4jIYPl3md/z1agIKgNsCsjQtd5gqwEFE=; b=pLi/mzdw0nO+5sMsBKCaK0+mtfcf4lPXcAtm9iQbIqoJygoHWmGGDeC33auZFHdFmIxcTw z2+z2hYERPWiBk7QytGwT9Qrl/jLETgbvYxur1halNxzDKv15I+G68gxLM0g3oYFlUkuLs RQmYefxF9JT0l4woDfCsJbUWu6TfTn2T/pwQi9Hs3uRcH1igZPsd4Hz0xvY1C0Eth55YGw XnVSRZkO8TPImg6Vz+RX+OLLMLSGMNYAUgfkiiLpmkGeHVOeAWe5EkQO4BPtkGZsDRi4r0 74WCA1Dsy6AhwOJUqVr+XxXMAh0jauRqJX+Q60ppUXIgkiceM9nbujNMIUvaoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738234923; a=rsa-sha256; cv=none; b=V4ZvbcsDXV3Z+a/7/1dmuoDviFSjz7nPH7Q955HamdYD082PL2bnG7uh0kaaiSNMGel+r+ 8uAg7mfS2JnoVDxH7eINQJZLa/r16fZBPqwLWWph2QuPpNyni4M4XzfaNMe/3wdPWi82QG mK+1L1Z1aA0VR34/Qc0LT7MfqpgyrZuQc6dNrX0rBtJHBwFFFyF91UqFOo5SfYUD3dpBPZ wQEyo0Y0EcZMLFbbx9uHff+qyiStE7Lj01h3ww6Nqkd3VAwz1hUaGaTCCeUfn7iHxwy9qr 9cBZswt/BBD436WhPELrDSv0WgtBI1NpQiA0f1d82VKAx7ISjeYfQAy4Ol8TNQ== 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 4YkGLg2T5qzkYQ; Thu, 30 Jan 2025 11:02:03 +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 50UB23cW077987; Thu, 30 Jan 2025 11:02:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UB23lQ077984; Thu, 30 Jan 2025 11:02:03 GMT (envelope-from git) Date: Thu, 30 Jan 2025 11:02:03 GMT Message-Id: <202501301102.50UB23lQ077984@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: 491f5e37ae45 - stable/14 - pf: add 'allow-related' to always allow SCTP multihome extra connections 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: 491f5e37ae45deae613b52729bf521a91dc38292 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=491f5e37ae45deae613b52729bf521a91dc38292 commit 491f5e37ae45deae613b52729bf521a91dc38292 Author: Kristof Provost AuthorDate: 2025-01-09 20:28:46 +0000 Commit: Kristof Provost CommitDate: 2025-01-30 11:00:31 +0000 pf: add 'allow-related' to always allow SCTP multihome extra connections Allow users to choose to allow permitted SCTP connections to set up additional multihomed connections regardless of the ruleset. That is, allow an already established connection to set up flows that would otherwise be disallowed. In case of if-bound connections we initially set the extra associations to be floating, because we don't know what path they'll be taking when they're created. Once we see the first traffic we can bind them. MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D48453 (cherry picked from commit e4f2733df8c9d2fd0c5e8fdc8bec002bf39811f3) --- sbin/pfctl/parse.y | 22 +++++++++++-- share/man/man5/pf.conf.5 | 6 +++- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf.c | 37 +++++++++++++++++++-- sys/netpfil/pf/pf.h | 1 + tests/sys/netpfil/pf/sctp.py | 76 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 137 insertions(+), 6 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 17227b674814..ddee0bda8b9a 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -172,7 +172,8 @@ enum { PF_STATE_OPT_MAX, PF_STATE_OPT_NOSYNC, PF_STATE_OPT_SRCTRACK, PF_STATE_OPT_MAX_SRC_STATES, PF_STATE_OPT_MAX_SRC_CONN, PF_STATE_OPT_MAX_SRC_CONN_RATE, PF_STATE_OPT_MAX_SRC_NODES, PF_STATE_OPT_OVERLOAD, PF_STATE_OPT_STATELOCK, - PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY, }; + PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY, + PF_STATE_OPT_ALLOW_RELATED }; enum { PF_SRCTRACK_NONE, PF_SRCTRACK, PF_SRCTRACK_GLOBAL, PF_SRCTRACK_RULE }; @@ -512,7 +513,7 @@ int parseport(char *, struct range *r, int); %token DNPIPE DNQUEUE RIDENTIFIER %token LOAD RULESET_OPTIMIZATION PRIO %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE -%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY +%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY ALLOW_RELATED %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS %token DIVERTTO DIVERTREPLY BRIDGE_TO %token STRING @@ -2615,6 +2616,14 @@ pfrule : action dir logquick interface route af proto fromto } r.rule_flag |= PFRULE_STATESLOPPY; break; + case PF_STATE_OPT_ALLOW_RELATED: + if (r.rule_flag & PFRULE_ALLOW_RELATED) { + yyerror("state allow-related option: " + "multiple definitions"); + YYERROR; + } + r.rule_flag |= PFRULE_ALLOW_RELATED; + break; case PF_STATE_OPT_TIMEOUT: if (o->data.timeout.number == PFTM_ADAPTIVE_START || @@ -4368,6 +4377,14 @@ state_opt_item : MAXIMUM NUMBER { $$->next = NULL; $$->tail = $$; } + | ALLOW_RELATED { + $$ = calloc(1, sizeof(struct node_state_opt)); + if ($$ == NULL) + err(1, "state_opt_item: calloc"); + $$->type = PF_STATE_OPT_ALLOW_RELATED; + $$->next = NULL; + $$->tail = $$; + } | STRING NUMBER { int i; @@ -6240,6 +6257,7 @@ lookup(char *s) static const struct keywords keywords[] = { { "all", ALL}, { "allow-opts", ALLOWOPTS}, + { "allow-related", ALLOW_RELATED}, { "altq", ALTQ}, { "anchor", ANCHOR}, { "antispoof", ANTISPOOF}, diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 935a70301d88..96deca5788c8 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 24, 2024 +.Dd January 10, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -2438,6 +2438,10 @@ easier. This is intended to be used in situations where one does not see all packets of a connection, e.g. in asymmetric routing situations. Cannot be used with modulate or synproxy state. +.It Ar allow-related +Automatically allow connections related to this one, regardless of rules that +might otherwise affect them. +This currently only applies to SCTP multihomed connection. .El .Pp Multiple options can be specified, separated by commas: diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 465e47b940b3..30050896b44e 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1592,6 +1592,7 @@ struct pf_pdesc { #define PFDESC_SCTP_ADD_IP 0x1000 u_int16_t sctp_flags; u_int32_t sctp_initiate_tag; + struct pf_krule *related_rule; struct pf_sctp_multihome_jobs sctp_multihome_jobs; }; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 15569a294f98..81e942085ad2 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -434,8 +434,23 @@ enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI_LINK }; return (PF_PASS); \ } while (0) -#define BOUND_IFACE(r, k) \ - ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : V_pfi_all +static struct pfi_kkif * +BOUND_IFACE(struct pf_krule *rule, struct pfi_kkif *k, struct pf_pdesc *pd) +{ + /* Floating unless otherwise specified. */ + if (! (rule->rule_flag & PFRULE_IFBOUND)) + return (V_pfi_all); + + /* + * If this state is created based on another state (e.g. SCTP + * multihome) always set it floating initially. We can't know for sure + * what interface the actual traffic for this state will come in on. + */ + if (pd->related_rule) + return (V_pfi_all); + + return (k); +} #define STATE_INC_COUNTERS(s) \ do { \ @@ -4895,6 +4910,10 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, } while (r != NULL) { + if (pd->related_rule) { + *rm = pd->related_rule; + break; + } pf_counter_u64_add(&r->evaluations, 1); if (pfi_kkif_match(r->kif, kif) == r->ifnot) r = r->skip[PF_SKIP_IFP].ptr; @@ -5257,7 +5276,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, __func__, nr, sk, nk)); /* Swap sk/nk for PF_OUT. */ - if (pf_state_insert(BOUND_IFACE(r, kif), kif, + if (pf_state_insert(BOUND_IFACE(r, kif, pd), kif, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { REASON_SET(&reason, PFRES_STATEINS); @@ -6220,6 +6239,15 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, dst->scrub->pfss_v_tag = pd->sctp_initiate_tag; } + /* + * Bind to the correct interface if we're if-bound. For multihomed + * extra associations we don't know which interface that will be until + * here, so we've inserted the state on V_pf_all. Fix that now. + */ + if ((*state)->kif == V_pfi_all && + (*state)->rule.ptr->rule_flag & PFRULE_IFBOUND) + (*state)->kif = kif; + if (pd->sctp_flags & (PFDESC_SCTP_COOKIE | PFDESC_SCTP_HEARTBEAT_ACK)) { if (src->state < SCTP_ESTABLISHED) { pf_set_protostate(*state, psrc, SCTP_ESTABLISHED); @@ -6416,6 +6444,9 @@ again: j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; PF_RULES_RLOCK(); sm = NULL; + if (s->rule.ptr->rule_flag & PFRULE_ALLOW_RELATED) { + j->pd.related_rule = s->rule.ptr; + } ret = pf_test_rule(&r, &sm, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index dd9796b59ce9..cb122763b4a1 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -614,6 +614,7 @@ struct pf_rule { #define PFRULE_SET_TOS 0x00002000 #define PFRULE_IFBOUND 0x00010000 /* if-bound */ #define PFRULE_STATESLOPPY 0x00020000 /* sloppy state tracking */ +#define PFRULE_ALLOW_RELATED 0x00080000 #ifdef _KERNEL #define PFRULE_REFS 0x0080 /* rule has references */ diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index 38bb9f2dff74..230dbae0d327 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -426,6 +426,82 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"all sctp 192.0.2.4:.*192.0.2.3:1234", states) assert re.search(r"all sctp 192.0.2.4:.*192.0.2.2:1234", states) + @pytest.mark.require_user("root") + def test_disallow_related(self): + srv_vnet = self.vnet_map["vnet2"] + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "block proto sctp", + "pass inet proto sctp to 192.0.2.3", + "pass on lo"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("192.0.2.3", 1234) + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + # This shouldn't work + success=False + try: + client.newpeer("192.0.2.2") + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + success=True + except: + success=False + assert not success + + # Check that we have a state for 192.0.2.3, but not 192.0.2.2 to 192.0.2.1 + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert not re.search(r"all sctp 192.0.2.1:.*192.0.2.2:1234", states) + + @pytest.mark.require_user("root") + def test_allow_related(self): + srv_vnet = self.vnet_map["vnet2"] + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "set state-policy if-bound", + "block proto sctp", + "pass inet proto sctp to 192.0.2.3 keep state (allow-related)", + "pass on lo"]) + + # Sanity check, we can communicate with the primary address. + client = SCTPClient("192.0.2.3", 1234) + client.send(b"hello", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "hello" + + success=False + try: + client.newpeer("192.0.2.2") + client.send(b"world", 0) + rcvd = self.wait_object(srv_vnet.pipe) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "world" + success=True + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss") + ToolsHelper.print_output("/sbin/pfctl -sr -vv") + assert success + + # Check that we have a state for 192.0.2.3 and 192.0.2.2 to 192.0.2.1 + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.3:1234", states) + assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.2:1234", states) + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { From nobody Thu Jan 30 16:08:41 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 4YkP8V3Bnjz5ldDF; Thu, 30 Jan 2025 16:08:42 +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 4YkP8V2XsVz3btV; Thu, 30 Jan 2025 16:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253322; 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=vXcfVZriE7GJcWU2PgAVWF2imk52ngtYLcBTmhQcYTo=; b=fJLGTfuqVMjM5u5xZRJxX1CfcoGb9DIxVq+CUNNSX8j03nAHr61DoW4xw6I4tuMptj/Sy0 6t7uFIkr68RRT2yzLJbull4DxRoOXFzqH76nZX4DlF5tlvf3bEMoxe4Mf4AunZxICAvLqd noPzJuDB7Mq94lfjglXogVN6P4Imszo5/DT018W7KRX1fOi1BvbNMAso4+Dm9kWEvUneXl gPTizbSzcqz77lEdTr9x3i65dhvdgVvCytRTxWS+wlzb3c2HYsdcz5mmOprGd2WYge8hNb 1x95gCd0z8Rxw74/A03cxP5uradR+Wo3yl0qTy3TFvQot+xUiOdLqBrorNF/Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253322; 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=vXcfVZriE7GJcWU2PgAVWF2imk52ngtYLcBTmhQcYTo=; b=VhrwERg/D6twnyGq5bA4o2/T8oViaRFrhT0pqQ5WJRFCiAHhscvnIcojWd6yiSYOtMAf5j wBg9r/PUVthpU1gw6Qi9QHWiCAYlwclo2fsvPsigM5DdROdLh1wb3/Bynp9F8VW8/6eLDu NMOjeICdm8G5UyGAR9hCXyypT5lV5UkZbfNz4ce/xmPqnPvArappx8IGJLZhOeKc1/rw+h h2d2+/tFrsmqRJBnYrfoSk8lBMGKXv0zkqMOzbrIHoWtMCrKELw++madw1P8SyN42xzVw4 yYR0XyF643EOW1D36WLuGvlJhzltAQdYf1pX31JSo4snr+ouG/YOfQFJlzwOZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253322; a=rsa-sha256; cv=none; b=bwRKZPbpL7nxFXNOEfAFNKTqju+M6TlK3e/+0un/pszIYp/mdbHBVenKb9IC9DG5P5g19e E7pY/tZXFCz+X5JaX2YHNeX8/B9bQD4+1z5JqElDXQNvsJYfBvUyKO8FWyNuGQxlY5IXD4 Kj4JuaxazIZ55Q2tAT3TK2LcaikRClbYikrA3Ju8eSnf+Mxb0aJ2okb6Td5SkvzfuNe6O+ fKmrPH27tgjV1pCjLRXHnSnCmDA1SrnbTmxLdmNdesrptCR2HB2WB5MMKhd1Z9/YdpWeQK du4XCy1WxhJSNyqUlXEMq9HD01Fvigg78hZHyCUI4h8BXGRtzCH2Wl+GDJBXOw== 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 4YkP8V27tdzvF0; Thu, 30 Jan 2025 16:08:42 +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 50UG8fdp044510; Thu, 30 Jan 2025 16:08:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8fS5044507; Thu, 30 Jan 2025 16:08:41 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:41 GMT Message-Id: <202501301608.50UG8fS5044507@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: d603868ddcd9 - stable/14 - libdtrace: Use C99 designated initializers for dt_idops_t 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: d603868ddcd9ae013c4f7f5bd629d3f1a9d07079 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d603868ddcd9ae013c4f7f5bd629d3f1a9d07079 commit d603868ddcd9ae013c4f7f5bd629d3f1a9d07079 Author: Mark Johnston AuthorDate: 2025-01-22 14:37:55 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:04 +0000 libdtrace: Use C99 designated initializers for dt_idops_t No functional change intended. MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 61c4ac2df7b2b866c8ee5e944aedc96aa79bd315) --- .../opensolaris/lib/libdtrace/common/dt_ident.c | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c index 5ff772be041d..d03347d0e7c1 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c @@ -577,51 +577,51 @@ dt_idsize_none(dt_ident_t *idp) } const dt_idops_t dt_idops_assc = { - dt_idcook_assc, - dt_iddtor_sign, - dt_idsize_none, + .di_cook = dt_idcook_assc, + .di_dtor = dt_iddtor_sign, + .di_size = dt_idsize_none, }; const dt_idops_t dt_idops_func = { - dt_idcook_func, - dt_iddtor_sign, - dt_idsize_none, + .di_cook = dt_idcook_func, + .di_dtor = dt_iddtor_sign, + .di_size = dt_idsize_none, }; const dt_idops_t dt_idops_args = { - dt_idcook_args, - dt_iddtor_none, - dt_idsize_none, + .di_cook = dt_idcook_args, + .di_dtor = dt_iddtor_none, + .di_size = dt_idsize_none, }; const dt_idops_t dt_idops_regs = { - dt_idcook_regs, - dt_iddtor_free, - dt_idsize_none, + .di_cook = dt_idcook_regs, + .di_dtor = dt_iddtor_free, + .di_size = dt_idsize_none, }; const dt_idops_t dt_idops_type = { - dt_idcook_type, - dt_iddtor_free, - dt_idsize_type, + .di_cook = dt_idcook_type, + .di_dtor = dt_iddtor_free, + .di_size = dt_idsize_type, }; const dt_idops_t dt_idops_thaw = { - dt_idcook_thaw, - dt_iddtor_free, - dt_idsize_type, + .di_cook = dt_idcook_thaw, + .di_dtor = dt_iddtor_free, + .di_size = dt_idsize_type, }; const dt_idops_t dt_idops_inline = { - dt_idcook_inline, - dt_iddtor_inline, - dt_idsize_type, + .di_cook = dt_idcook_inline, + .di_dtor = dt_iddtor_inline, + .di_size = dt_idsize_type, }; const dt_idops_t dt_idops_probe = { - dt_idcook_thaw, - dt_iddtor_probe, - dt_idsize_none, + .di_cook = dt_idcook_thaw, + .di_dtor = dt_iddtor_probe, + .di_size = dt_idsize_none, }; static void From nobody Thu Jan 30 16:08:43 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 4YkP8W24zCz5ldDG; Thu, 30 Jan 2025 16:08:43 +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 4YkP8W1RGXz3bjL; Thu, 30 Jan 2025 16:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253323; 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=63Uc5QUlUcDftWr3dOOm8keFqZ/AEpGSGMeQmjY1Bgc=; b=otUsRhlm1MvtTJ+NbGjgNnbzpYZ3rYYGsZmRIMpdrAV2kFxfmYLLG0oljllLB8PL3mf0ft fmoyKhWlLUu7LQJqz5g+YeyNHlRHiGJ19PHawNvDyNC6tVknEbowugEQlna1xj72+cxUBN T/FtDq2t6peRmJUTks47diPrdiFBECsNu/gPgNOkB6WdWpgLVwsQtOkkW3/I5sobI8o6WR 2Bki+c0dJq/IdS40y/FBugrPHa9xoU9NEm7hNSFTeKQjwYF2sff2mdyPfe3o+sVfIX7Ppa 6TK7Y0r9LCPGHxm7oAqg71qxsFAnxcfDcr73DyacPBQ/sYtwLCUuTcOqtd23Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253323; 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=63Uc5QUlUcDftWr3dOOm8keFqZ/AEpGSGMeQmjY1Bgc=; b=Poam8sK5YwGP9eiAZlphwTVcWYxeqpPkt+e4DuBIP99Z0p/N4v1fsXJRwg1T0q4gLhQ09i 05GAm+5UyfgVzY0AVZ413fhDPnL2OyonDBiJHBfb6TzmAqAO+x9TkHmweroAd6YLTcrsrP t75FxmpVOn/Nl41FC/qRUDF0OqrIDXgQLrh0/pNPAczeJJUXPuGVj+CuhOGqrGtcbLHLT7 9KxUW1YhJzNUWVQ5Ssq5X5FgAG40L/RhU4BEuvNejbHfcvYYtmcM2vwtayOUOVwQTMe4/6 qZUFT6nI+LC1xRnHkBleaWIsLq8OgeKS6yX5vfFG1A0r5O4K6I1H97UEpzONwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253323; a=rsa-sha256; cv=none; b=vmXzx9psAySQ1gMJdWi1QSlCRiQkbQV05TJ/QuQ+HNPYJPA6WYUlonLd2NVIPy1FnixuI4 CjxMdsvrx4sCx3rjdhsDm3IBsdz0N3vbio9+cvQxLpfHIvJpp1gnSNpo+asWZBf5ChqkD7 88l+zyEKVTHareY3bb51yj7h1iJ3SPm6IBtuWWohMeMDZFDMjRd+6fPJfLFU4lGkHds7dY 4A5Yasvkiix9x6E23QcnjG+BRdyCV3TDcHCgjeboZmDBz6s5/FrFwr+IoOLTM7SwfRGHtM XvZX3TWQ5ZCy4AqBgrpk9aT3yyw1gG1whgtlERtYQjlDktyD4y3vNgqg/Ubqig== 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 4YkP8W0qqDzvTR; Thu, 30 Jan 2025 16:08:43 +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 50UG8haQ044550; Thu, 30 Jan 2025 16:08:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8hTF044545; Thu, 30 Jan 2025 16:08:43 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:43 GMT Message-Id: <202501301608.50UG8hTF044545@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: 2e0d595651b4 - stable/14 - dtrace/arm64: Simplify variable declarations in the invop handler 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: 2e0d595651b4e49132e7eb387204aae41750893b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e0d595651b4e49132e7eb387204aae41750893b commit 2e0d595651b4e49132e7eb387204aae41750893b Author: Mark Johnston AuthorDate: 2025-01-22 15:15:18 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:04 +0000 dtrace/arm64: Simplify variable declarations in the invop handler Remove some unused variables and reduce the scope of some others. No functional change intended. MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 8384a19adc88ef31794f5aed1d8c5621b7dff8c9) --- sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c index b4dae1cba539..20418e3a475b 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c @@ -262,17 +262,15 @@ dtrace_store64(uint64_t *addr, struct trapframe *frame, u_int reg) static int dtrace_invop_start(struct trapframe *frame) { - int data, invop, reg, update_sp; - register_t arg1, arg2; - register_t *sp; - int offs; - int tmp; - int i; + int data, invop, tmp; invop = dtrace_invop(frame->tf_elr, frame, frame->tf_x[0]); tmp = (invop & LDP_STP_MASK); if (tmp == STP_64 || tmp == LDP_64) { + register_t arg1, arg2, *sp; + int offs; + sp = (register_t *)frame->tf_sp; data = invop; arg1 = (data >> ARG1_SHIFT) & ARG1_MASK; From nobody Thu Jan 30 16:08: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 4YkP8X3lyFz5ldL1; Thu, 30 Jan 2025 16:08: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 4YkP8X206jz3bwY; Thu, 30 Jan 2025 16:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253324; 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=w1gtnf340E4OQz0z+2/c2SIgxS3IETRp8z20wCZlVQM=; b=EsFenWzzF+c6wMLugTXSJQiK+9XdqBrPXx217scRyQtoOVvpWywglRvxU61k8lOsUTYXwJ 5g8i8GBJIQQuVCf+e5BovENFhfI7ox7wPPyVjGMWq00r+VuBAjBFZnOsY1JO2boI4qocEE ot7lk7uUzy9R/cGjhx36OyQP3fENcQStwrEcaIgb/Iiwm9cDG4UJiB4z4g2zY7ZRUs/URi z6f3YFjQcwkRT6ZKZLMvs0jJNLWiuCLKpyxD0N6xEGPyZV27ZvFycQIfTlrCjRG0O3Dr4n OSKQEphlxrI85VDv4Ovp64RHeWirASFgSOStq8OM6aX3QWqIY4Q0YY0FpORDzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253324; 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=w1gtnf340E4OQz0z+2/c2SIgxS3IETRp8z20wCZlVQM=; b=OKPaJ/DUHezj1URoIL2VQRlaLdk0Mws13U/QbmtW2aB1+IFo+FG4grJLnJ3pV06BcJl5DX ZMW8uzkG8WOxMTGDzHmVU6dLjY91G9IFM7/4ShBGJ5hGxA+CSvcNqSpl7U6++BTETt1I8R ehYQMSB5+wsMdtpUIea5wJSzj8+wPBzmsUZk6iHkKoRusYJoOgC8aXCN3LHTOoDBy5zjyf G3NjjjsICK5txruropPU9olEAP+twmJ+n4DzFzzi54k1NiMCSLn3HRjJKT85R217MRnycL ExwvfMTPzKEmG9q72dOp8obqVtslRolQBhksT+TcE4N/wECGpRVHFeVq8JfptA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253324; a=rsa-sha256; cv=none; b=KBL2IReZ9pAvIEFclclcfe4hWjg0kdfybAcCVeYyYg6KsD2ie0ksulZr6hTHCTlRC38hHh efawi4zJIyrmSkwQ5zohiNBCXfIZdLyBxxZAG3eNDj8QCyMGQRU32p3L6+2s91uPYBGl2Y V9yaOg3O6ebQicBnRbDBKuid5TxjCXdOKrqqmjakhBqAqGEVFvNwlKkBjv02kA7P30LcBe f31lz/BXiUczPZAxBduaxJnh7ax36o5qWx4GjWm+G4lOFw5Yl5WiSNQ+QAA5Q9ngJVbP8n eUb2YmFX1XF8Jf9TMZ0fOuvJUfswo7p4EQRQiQ7ISIxG2Yt/5CxV+GNaIQNRzg== 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 4YkP8X1VtWzvR6; Thu, 30 Jan 2025 16:08: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 50UG8imU044583; Thu, 30 Jan 2025 16:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8iSg044580; Thu, 30 Jan 2025 16:08:44 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:44 GMT Message-Id: <202501301608.50UG8iSg044580@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: 18a39dedbdd3 - stable/14 - dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured 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: 18a39dedbdd3905dba4c5165f4839b332ffb2741 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=18a39dedbdd3905dba4c5165f4839b332ffb2741 commit 18a39dedbdd3905dba4c5165f4839b332ffb2741 Author: Mark Johnston AuthorDate: 2025-01-22 21:26:07 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:04 +0000 dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 1e734f15c7099408f45d3b1ea433868d0468916f) --- sys/modules/dtrace/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/modules/dtrace/Makefile b/sys/modules/dtrace/Makefile index 73c71c5bd1fb..1ea2864ca103 100644 --- a/sys/modules/dtrace/Makefile +++ b/sys/modules/dtrace/Makefile @@ -29,7 +29,9 @@ SUBDIR+= fasttrap .if ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_ARCH} == "powerpc64" +.if !empty(COMPAT_FREEBSD32_ENABLED) SUBDIR+= systrace_freebsd32 .endif +.endif .include From nobody Thu Jan 30 16:08:45 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 4YkP8Y5pnFz5ldCH; Thu, 30 Jan 2025 16:08:45 +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 4YkP8Y2gm1z3c0H; Thu, 30 Jan 2025 16:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253325; 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=57clLLQG4+YioEUalH8Y6N/Q5Vd+3oidNO5qQR3ilEE=; b=sU5TnSNSV43EY8g+7iAtJmw33AAAzxmOSiD4MQ2/sxFECkPRFyAOHhzKxpKCgLxODr1MzB GNSdIODwQODaOLZ3yUeGAZF4PJjd/Tv+U4PrwW40rxqic5IyH64mGZsQZXTN9HJlC5JQeI VqLpx++aSODJc0znV+f9PIzTtuwvyMMZOqoKCYFcrlYicYljuKgNo9tlXEXkxAn4yOraYh O4lX4p0MYr+neMKgNN2wpnMMO6MLRJTE+MVM9qfWtsysJRYqelUm0dcjTYOm7OYIjH/uwW Lt/oWw4uKXqdYDKW/mOVzlh6CbN3tsT1DWdc+ozNSopNmB8axzRP7H0kq7Glyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253325; 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=57clLLQG4+YioEUalH8Y6N/Q5Vd+3oidNO5qQR3ilEE=; b=wVwoX0zp9Lc3C88ojbN+6VAdpeyXRHFqLkWy3gd3GBDK+oclcvcv5vTAZ09pIyAHjWz1SE TRGJflFiDVIaObfddBhJmJj2jxVlHXs65PfSPEhY4ChAuBYZPrqMI/13KUljTq7QETMQes JyhfMEXeWMhXH5D3jCfCcbE0WjNjp4eN6iXIQ4hNL88XoQPumXc7zkA8h7l6MEfARbWmw1 K9o1QZY75fymgFe8SauAESYfez9JqU7I0FZhwUd835jyZGLGG+vd/6yRuza8re27nRdBkN CE0ZYvENL/zhIOsm8lRD0rVRLourSU2KWuyScuOUxiM3zPAL2YQ5aSM4rQO0JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253325; a=rsa-sha256; cv=none; b=gC6vHlUKTASNBLX8MNT0X622CDJ6HnNM4n8kP/xnyHd1UYYpyy+rcm5ODyhtOslpRndEGG 7Ao+zgYvNPPJAE0n7fE1U5Tl1Fxurl+Sdky4VsJOdVTkqBEWJjUqwlNsTlY9FGpU3/la7z ot3DTlc4wGgw3+PAv0wPR7HoCEIFiGpu2rHUErrlJiSrQpG95Ap2G9dJSc1riZbkM+n1q0 PA8r6WkHWwZoiPg1am9pNNvmAbthL/E/NdkAy5x6UzX35pcqaIbRrKOwb/A1J8H69S9Fgw yowReVZlwEhnDOZQgZdZqyuk9aq60NZmdhG+F/cTfAAW8Eqy+Xt0wBeVQ22myQ== 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 4YkP8Y26y9zvR7; Thu, 30 Jan 2025 16:08:45 +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 50UG8j6L044623; Thu, 30 Jan 2025 16:08:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8jde044620; Thu, 30 Jan 2025 16:08:45 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:45 GMT Message-Id: <202501301608.50UG8jde044620@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: 89073e0ad444 - stable/14 - dtrace: Fix the definition of pc_t 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: 89073e0ad444b931cb3ca277daac99f83bb6e4c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=89073e0ad444b931cb3ca277daac99f83bb6e4c7 commit 89073e0ad444b931cb3ca277daac99f83bb6e4c7 Author: Mark Johnston AuthorDate: 2025-01-22 14:34:29 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:04 +0000 dtrace: Fix the definition of pc_t This type is used only to store PC values corresponding to a thread stack trace, so a pointer type is not quite right. Switch to vm_offset_t, as in struct stack, to simplify a port of DTrace to CHERI. No functional change intended. MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 8ce6b4f2c48eca758fac90b58924f9b2e38fbc49) --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h index 45201447024e..cfb97c71f262 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h @@ -51,7 +51,7 @@ extern "C" { #include #ifndef illumos -typedef uintptr_t pc_t; +typedef vm_offset_t pc_t; typedef u_long greg_t; #endif From nobody Thu Jan 30 16:08:47 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 4YkP8c1C8Rz5ldGy; Thu, 30 Jan 2025 16:08:48 +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 4YkP8b3plMz3bm8; Thu, 30 Jan 2025 16:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253327; 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=L+UgVyaKQP7IC8PGQuqBcR8iGwCEXRv62/uvpO0CP4g=; b=Fkune4eqBbfDQY8X96LVpkZdRi0tSoAkan1sEBUh48bME+2odRYJHIjQqEiHpMAvEcN7Sq gM1+pUmYJNtbrT+2jC6vQY2aITnMWcUhcmMDaoPlV6mQ8wk6tM6YOv1DmfKHmfrQRou5aF 7IWhUuVbuM2FKIN0Y0tbsj0RNh1ADM4HfZzhAcefMGON+T59ym9wy4XNhedXT13dy2wZ8U p1O2juGGex6rNAf7cg7IvN+9CAlhCnAwc5nnKh9QSL2JLoH8vOtj861Ur7p2pzE35YTl/F 8zMltijMDSsTtEjQkRM2rWB3vI2KeSZAww+6mt3xG3ok3r8fHLSffS7PtJ3PKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253327; 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=L+UgVyaKQP7IC8PGQuqBcR8iGwCEXRv62/uvpO0CP4g=; b=pGfMC6E6hE43BlrpboWv/5+xeOM5gMm7dQb7Bia//7nXrEel3JIZEJ+6L9HPW4pvE9tYSs sm89noUqdoUCKOjbIrj8FcWTh2kvCVBYThl9drwW/++aQtjWPcPlmwztVq5C7BuXBgr5g3 R2p0mCO/sVbmPf4NsyEGs20CsEwS+j5Ofddg8IKToMnnAzSv0zrbDbeb3eVvL8QESLwWYs 6AC+CIZc+w7V5y9k7uVW0QYeEencs7BnadWaApInjtiEPzz+s1LmOzLxxxgM9OYEc+5dhi Y/JFBL858LMd8Xk0FZeOIUQNG9/vuy/MVD8FfLmEwei+plZVF+KPb7kPfh2LEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253327; a=rsa-sha256; cv=none; b=kKbnGPqctI5SnIMRP2t+9qsUcsf4FOw1O9eIv8+sKnR8oeDwm3buyT6RqMynLUlGL/Qhge /cDxsPX/+vMFs82em8SemZGZcch5TNTMTUmtQbii45kkP75PmU8Jl7kTdzBET8/sjSyL85 iLwjk8JmT1Tt+zBPAC9TA6zsZjqW5pismS4SX5HGgZE48E3X89hY+L8NFS8LGzm89f/RM4 QmvN7TdNMDXSbTlt4tnXgmB0QU6YHvJyp2PH6LkwdOa0u5nl4WUh7AgLwW+ukrSFyzr5bw 8vn1VIqX9V1cybdew07SiM4r7Zu9bmOloMLwgcUwxA9JuLRNKQAazyvUnBxtyQ== 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 4YkP8b3LTbzvTS; Thu, 30 Jan 2025 16:08:47 +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 50UG8lSU044690; Thu, 30 Jan 2025 16:08:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8l1F044687; Thu, 30 Jan 2025 16:08:47 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:47 GMT Message-Id: <202501301608.50UG8l1F044687@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: b4da6ed899d7 - stable/14 - dtrace tests: Fix the ATF config variable name 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: b4da6ed899d78439edb5b60206d8124b20594002 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b4da6ed899d78439edb5b60206d8124b20594002 commit b4da6ed899d78439edb5b60206d8124b20594002 Author: Mark Johnston AuthorDate: 2025-01-23 19:09:56 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:05 +0000 dtrace tests: Fix the ATF config variable name Fixes: 6e6a67e98652 ("dtrace tests: Avoid hard-coding paths to required programs") Sponsored by: Innovate UK (cherry picked from commit fed08c59b7bf2cb4d05bacadadde2dcef4dc6c46) --- cddl/usr.sbin/dtrace/tests/dtrace.test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk index da7c3a440be0..54e2aec68dcc 100644 --- a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk +++ b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk @@ -12,7 +12,7 @@ ${TESTGROUP}EXEPACKAGE= ${PACKAGE} TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} -TEST_METADATA.t_dtrace_contrib+= required_progs="ksh jq perl xmllint" +TEST_METADATA.t_dtrace_contrib+= required_programs="ksh jq perl xmllint" TEST_METADATA.t_dtrace_contrib+= required_user="root" GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh From nobody Thu Jan 30 16:08:46 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 4YkP8b0Q5lz5ld6X; Thu, 30 Jan 2025 16:08:47 +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 4YkP8Z33zSz3btt; Thu, 30 Jan 2025 16:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253326; 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=aMBZrvbeTu75rfsCKzVuzdV5wfcJ9ZP+Unn/r7GVtOs=; b=vRDqjoifRCVJN2KnMWmdwMIMk5xPXvg7pB+/X6nmLHJpZTC+XJs6QS7w5iQOE1iLUhpydH XgMctxzvbFbjinVvcdZM02/FWqwjkwDyaO0bA5YlSiNRzFlIsTIkIacmo5rgs642tJQUjz 42jopXjo3XJ5kfWPbI4PX/DcevPe0xf+LqlZ23BKQdbdmjKJEROa08jNBWh+/3VP+w57Ky aKlxfZFtVvXYnarsEX+NYRv/eDroSFjwMHuPgElQW3rYnBKbC/+uCe0NTWGuL9t7mRMtUD 6+qsOc9kkcDLRlECOIAF/FpTQthzzVECHrggHBJrx22N4ha3/gUkVXVHXa+31Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253326; 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=aMBZrvbeTu75rfsCKzVuzdV5wfcJ9ZP+Unn/r7GVtOs=; b=g8GsKqGmcb7LwNrRAlRM7iGrQLgsiNeltL5WDAqbzgNcbgSt0cJvB/3Utb8Mc/ZTIorR3N 2BBMsH0D50LM1K5yWSJtMFBljfAI0p13WkelBfzcI9EV/5Vg2oRz7Sm7CHXKkbWkbA9ZIi K2SJi9HBgaUO/5ChBEUpYo3U0n9usMaQ25Kl9lmGd2ILQ0fjKVVRWqQKG/L1B1jqiGloeV EB6nPeRHxdDroNiyZlxd7ElaLE+XjGOPl07T0u122Elrpl4nL4OG292M9+jyiF677mHUGF 7yHgNgO85AsOoDjlvhAOdewtQ914K0On0wRV8WXS9L8V/rjfV/rn8Svi/pGQkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253326; a=rsa-sha256; cv=none; b=khtYn4CJDIuD+JPg+B1GKhEGfYGxN2cFhXh+nFEGNkYsavOTAfRgDIFdePsCjsjypoCWPq tYN9RCJuU6C3m8wYYq4FH1AVJdH9FP4zprzWafgoUieMafuc7uzmE+9TTEWtDs8wppX9qz K3MUOW9x4JB2QKEUiChbg6ApISKX4acX5uWRmYISSFQN34OfOIgf+atCv3PzV6GqoIn+kX fct4s3ckaP/1mvB2oTpVeb/XfENhe49M6xN3yc2brdPzw9jmW6NjscU3s3FsnAtqVV3HT4 sYYS3X2cVyt88uNA2D7QpOawJ0fnTuVN1U4K7WKhfYFACTiWGIaAnDjSlvE+5Q== 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 4YkP8Z2g5JzvJC; Thu, 30 Jan 2025 16:08:46 +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 50UG8k2t044657; Thu, 30 Jan 2025 16:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8kaQ044654; Thu, 30 Jan 2025 16:08:46 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:46 GMT Message-Id: <202501301608.50UG8kaQ044654@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: 9c60e4e4e721 - stable/14 - dtrace tests: Avoid hard-coding paths to required programs 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: 9c60e4e4e721e274e7d0d7d8c26afc624b82580a Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9c60e4e4e721e274e7d0d7d8c26afc624b82580a commit 9c60e4e4e721e274e7d0d7d8c26afc624b82580a Author: Mark Johnston AuthorDate: 2025-01-22 14:20:33 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:05 +0000 dtrace tests: Avoid hard-coding paths to required programs MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 6e6a67e98652e1477973d031b27ce085d7f200c2) --- cddl/usr.sbin/dtrace/tests/dtrace.test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk index 001dc6253f82..da7c3a440be0 100644 --- a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk +++ b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk @@ -12,7 +12,7 @@ ${TESTGROUP}EXEPACKAGE= ${PACKAGE} TESTWRAPPER= t_dtrace_contrib ATF_TESTS_SH+= ${TESTWRAPPER} -TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh /usr/local/bin/jq /usr/local/bin/perl /usr/local/bin/xmllint" +TEST_METADATA.t_dtrace_contrib+= required_progs="ksh jq perl xmllint" TEST_METADATA.t_dtrace_contrib+= required_user="root" GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh From nobody Thu Jan 30 16:08:48 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 4YkP8c6KkMz5ldCR; Thu, 30 Jan 2025 16:08:48 +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 4YkP8c4yKWz3c4c; Thu, 30 Jan 2025 16:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253328; 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=8NxKZIy8oGQO8hfSroOlzbi/r9Crv+vJ0g1sAQDRnYc=; b=wtkpHNPY6UopnFfQYkvhaiTljTMzc+PFLMSOZI2VSH43IxjZVDL/1NCm4O347EfsYTolyQ kn4QHmywL4Vle0VYte1N3Q+qVNa4CZbkW0esxAHwDw2OzUglD0bfKx9tUKwOQth3lQI2NV t/vfHnv2wr1HzUwyPjz5KJ8tJXIJVTxQLYBkHENM+VdWECB/vDLprDM1k/WsnVvFvi1Ol4 ZpY1N5hYTiaPlBPbJQfzr7u7jVrgk6ReoeGGtoQL1iInhcIfvNTnSM+JfrWu+hDNYHH1zS ZqGiccMECbH6Vrwm7GIN/UUV8yYgtnUd6coXl1/HCP5fYhehTobEDC7ugwudHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253328; 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=8NxKZIy8oGQO8hfSroOlzbi/r9Crv+vJ0g1sAQDRnYc=; b=trSndsCxBPxhzm7zjCcWjaAHOyhTONAsy535uHseCXdZH+Jx3Oq9J3e/JhDYsTYJpOjjAJ kToZU8e8LVmbw8v53c5TarI92zQwopZ+JDMXWpooNT2ET+zEkZm22oFto7VZkC5ZNX4lGc 0YkAu9hyGdJSezESA/UqW6WDZiiKzLRvVqFZNZknSmUM1/pMaQ2nOZ/h6707wFfHz+ytB/ V/FOSIbD1NxowVuRdPX8mEZZwJLpR1/DT2iGC708iGAzkEe533q0DfSicGwYPzzG7XMW2L hdfZH+GyCm4kC7+pTygFg/XaVPZrYZCnZoKpFNrC3QLNNb9rJsnLB6+Fh94EJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253328; a=rsa-sha256; cv=none; b=klN8oQ/a2CqIfpZye1JWRWYM3bD5ZX79TYxB0r5QanSHLBa1YtI7zNmZheqsBxJsBZfwjk MVLT9RPBxOlgP5ewqEwnaHcM/RmXxW2hJrVJlFG22r4s9rBVjVbPmQUVz4VFixxYGbzxoG QxKJLWKbALSJiul7kZotjRWwzT1X67uLSZFtgBJ7GzdagC5vZYpFDYQrxMQjfRG6BFpr7h JF1RBDNFNnOcT/SDM/GIS8GmQi5gxHC3Jk1pAiyXZR7oiwof+fdqcuZleFb5fbgozk+ZLw HRkZPQi/GYIPKTCzhO+AdgYBSH7AKU2tmMm9U/IKVO8HPbE9KmpF/cY7othGCg== 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 4YkP8c4YTmzvBl; Thu, 30 Jan 2025 16:08:48 +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 50UG8mLP044723; Thu, 30 Jan 2025 16:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8mfF044720; Thu, 30 Jan 2025 16:08:48 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:48 GMT Message-Id: <202501301608.50UG8mfF044720@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: 2839e32a597e - stable/14 - hwpstate_amd: add amd pstate for zen4 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: 2839e32a597ef11d257ad8ec690aae6dcd139a5f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2839e32a597ef11d257ad8ec690aae6dcd139a5f commit 2839e32a597ef11d257ad8ec690aae6dcd139a5f Author: SHENGYI HONG AuthorDate: 2025-01-15 11:18:34 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:12 +0000 hwpstate_amd: add amd pstate for zen4 Co-authored-by: Daniel Schaefer Reviewed by: markj MFC after: 2 weeks Sponsored by: Framework Computer Inc Differential Revision: https://reviews.freebsd.org/D48461 (cherry picked from commit 621569254cd0b0639488aa5d7b8143cef7c90a18) --- sys/x86/cpufreq/hwpstate_amd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c index 85feb5287e3e..00c5066335d8 100644 --- a/sys/x86/cpufreq/hwpstate_amd.c +++ b/sys/x86/cpufreq/hwpstate_amd.c @@ -462,6 +462,7 @@ hwpstate_get_info_from_msr(device_t dev) break; case 0x17: case 0x18: + case 0x19: did = AMD_17H_CUR_DID(msr); if (did == 0) { HWPSTATE_DEBUG(dev, "unexpected did: 0\n"); From nobody Thu Jan 30 16:08:49 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 4YkP8f68dlz5ldCV; Thu, 30 Jan 2025 16:08:50 +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 4YkP8d61HGz3c0w; Thu, 30 Jan 2025 16:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253329; 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=QR9Zy1kJc1kOl4H7pftVvUeToE03b5cfM7YBjov6PKE=; b=SZ9ltKOMjC9e77dgLjD5/G4elkGMGSx0Z2Aay2p7CAJlJ7tZsDNgPo5idBgeZqTsghy2bQ QhkJ6WaxNBl+7I0Ov/LPOFaDsnn1+JSPRoqLFDBmR13qNR3aMv/9KCa22BiXo3bleviRqi V86JoNH3+Up4aU8VfPH8lQPmDDW3SZDj44iwe89del6uzdzJgi7tMf20ycIeV+PoYgjh/8 nvc6C37G38BL5yBLnPMd/U2HaQ3J7N0T9ijf2UzCJZ+HMgGPBiDGg9KNpKlAZ+xsL3zA84 d8hwYeoKl1EepAPBaeOxvJDtdF80r32yJ3BpFi2bhTgWFzwY1fKz5g+wSexugg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253329; 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=QR9Zy1kJc1kOl4H7pftVvUeToE03b5cfM7YBjov6PKE=; b=jxrwAtYp8Sbkmb+HFXGW53w6mmj/f1x4Cm6gsFUhSrHhEr7sFufD4jGoua7k5a5LsWoY3T DrXjvQxF5oR0h+o2wHNR1XX+YPdLjF9T4eD1RffpIy81gm24O5Xka7+3idW5TC+uE47C6r hrMWlAqDkCtKk7V1g8ACwzOgWNWjOr7Aj/+tKKAyC3u37C4nlPPE4iSSrA9ZV/R+9i0erG PimN7TnRzZWmy4cTKPlgEOP40Tr9qKZlhPa+s9XrbFAWxfkvGSfok3KTZZjRiVL07iVhtQ cewSregIZ/bOEmn0oOkAmnz8pGDVHDPmLsa8dtH6pQjv4pJ4vmV1oqRWFH25kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253329; a=rsa-sha256; cv=none; b=r5mpMmOdH/XRNmkHTYj3fOEp+jIHZz/sI5cbQu55UDoqlW/a/9LkLSvLJUyalmpmU1MUht KnxI8H+iWbeaPulHXVtv2wbVeo7zp89LwxquhY3vS6Hpga/4V8sJSn9ekrLShbGUZ8qYT+ P3Kk0deX3lWKlvt0ElInCO3DZWJ3r65h0G9Pv8FuvnaLZoKvTW2Ir6ob8JbSxr5+kzEWqi C3v/13tVbBCAA9vduxUlQWFaOqiF5pcUct4EHyrl8ky6qCeXRwvn5+mQ+NHckqfRe0M+3o VA/+U8MKza8Pr4JDCcOZ8ML3BON7S7VOPrCcFwF1vHH4GwaLfLqOYD2C6+/vCw== 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 4YkP8d5VzDzvL2; Thu, 30 Jan 2025 16:08:49 +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 50UG8ni1044757; Thu, 30 Jan 2025 16:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8nRc044754; Thu, 30 Jan 2025 16:08:49 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:49 GMT Message-Id: <202501301608.50UG8nRc044754@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: d45326bfeab7 - stable/14 - hwpstate_amd: add amd pstate for zen5 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: d45326bfeab79e409acf7afac5556879fc5705c3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d45326bfeab79e409acf7afac5556879fc5705c3 commit d45326bfeab79e409acf7afac5556879fc5705c3 Author: SHENGYI HONG AuthorDate: 2024-12-09 03:18:18 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:23:23 +0000 hwpstate_amd: add amd pstate for zen5 Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47985 (cherry picked from commit 0e6e1f14f0a7cfabec38106e41cb2f7a39363e55) --- sys/x86/cpufreq/hwpstate_amd.c | 62 +++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c index 00c5066335d8..70f8726dd4da 100644 --- a/sys/x86/cpufreq/hwpstate_amd.c +++ b/sys/x86/cpufreq/hwpstate_amd.c @@ -43,6 +43,8 @@ * 31116 Rev 3.20 February 04, 2009 * BIOS and Kernel Developer's Guide(BKDG) for AMD Family 11h Processors * 41256 Rev 3.00 - July 07, 2008 + * Processor Programming Reference (PPR) for AMD Family 1Ah Model 02h, + * Revision C1 Processors Volume 1 of 7 - Sep 29, 2024 */ #include @@ -89,6 +91,8 @@ #define AMD_17H_CUR_DID(msr) (((msr) >> 8) & 0x3F) #define AMD_17H_CUR_FID(msr) ((msr) & 0xFF) +#define AMD_1AH_CUR_FID(msr) ((msr) & 0xFFF) + #define HWPSTATE_DEBUG(dev, msg...) \ do { \ if (hwpstate_verbose) \ @@ -164,6 +168,23 @@ static driver_t hwpstate_driver = { DRIVER_MODULE(hwpstate, cpu, hwpstate_driver, 0, 0); +static int +hwpstate_amd_iscale(int val, int div) +{ + switch (div) { + case 3: /* divide by 1000 */ + val /= 10; + case 2: /* divide by 100 */ + val /= 10; + case 1: /* divide by 10 */ + val /= 10; + case 0: /* divide by 1 */ + ; + } + + return (val); +} + /* * Go to Px-state on all cpus, considering the limit register (if so * configured). @@ -463,13 +484,30 @@ hwpstate_get_info_from_msr(device_t dev) case 0x17: case 0x18: case 0x19: - did = AMD_17H_CUR_DID(msr); - if (did == 0) { - HWPSTATE_DEBUG(dev, "unexpected did: 0\n"); - did = 1; + case 0x1A: + /* calculate freq */ + if (family == 0x1A) { + fid = AMD_1AH_CUR_FID(msr); + /* 1Ah CPU don't use a divisor */ + hwpstate_set[i].freq = fid; + if (fid > 0x0f) + hwpstate_set[i].freq *= 5; + else { + HWPSTATE_DEBUG(dev, + "unexpected fid: %d\n", fid); + return (ENXIO); + } + } else { + did = AMD_17H_CUR_DID(msr); + if (did == 0) { + HWPSTATE_DEBUG(dev, + "unexpected did: 0\n"); + did = 1; + } + fid = AMD_17H_CUR_FID(msr); + hwpstate_set[i].freq = (200 * fid) / did; } - fid = AMD_17H_CUR_FID(msr); - hwpstate_set[i].freq = (200 * fid) / did; + /* Vid step is 6.25mV, so scale by 100. */ hwpstate_set[i].volts = (155000 - (625 * AMD_17H_CUR_VID(msr))) / 100; @@ -480,16 +518,8 @@ hwpstate_get_info_from_msr(device_t dev) * section 2.5.2.1.6. */ hwpstate_set[i].power = AMD_17H_CUR_IDD(msr) * 1000; - switch (AMD_17H_CUR_IDIV(msr)) { - case 3: /* divide by 1000 */ - hwpstate_set[i].power /= 10; - case 2: /* divide by 100 */ - hwpstate_set[i].power /= 10; - case 1: /* divide by 10 */ - hwpstate_set[i].power /= 10; - case 0: /* divide by 1 */ - ; - } + hwpstate_set[i].power = hwpstate_amd_iscale( + hwpstate_set[i].power, AMD_17H_CUR_IDIV(msr)); hwpstate_set[i].power *= hwpstate_set[i].volts; /* Milli amps * milli volts to milli watts. */ hwpstate_set[i].power /= 1000; From nobody Thu Jan 30 16:08:50 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 4YkP8h4Bgzz5ldCc; Thu, 30 Jan 2025 16:08: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 4YkP8f6mb4z3c2n; Thu, 30 Jan 2025 16:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253330; 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=V9oiqTWDHSNEwNHYgy6T87NeqrsxHqp0CW/Ibdu9J9s=; b=ernViyZTqGqHKV0pNhq7ZjQCOyzBNJafoHJAdsm2JKyKLcxMdtIOCAAa3c/74Q8IAlIHg7 17WST/HBBEk651SLKiNzkh/aP3l6iGgsSoXv6d7QsKXu10AWS2vN25tb/baLVlOu6D1uHY VR5h5syhPjOBM3iXptsfSoR5Ar3xQ+eCzD5iclfU90ISa0GJnKEva2PD/Mu4iWdeC9aLOQ n9ThZDCCwjQ1hiPfctco1UW8rLTVOKRmo++MXp/bqDXW36UYP4ixd4DypH5bhD2TfeDn2B 0pVRCvbaO8siZb1h+6j12gIZIAnoRJxD3QLE1RruH6TekGVWL2wiM7z0Xbn8zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738253330; 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=V9oiqTWDHSNEwNHYgy6T87NeqrsxHqp0CW/Ibdu9J9s=; b=QXJf9zQMkgCXt9FLWu+cJamJjso5UMjQD/dIurl8mFRO+rj/QhDIr2afwjJR2sjNJa8lLJ XlaOkse1na6tLOXD+COslTdAPceEoxpbj/srcTyvhjRg15kpustovsoIF+BeiEaGfOyQ8a pM7WdPRd0qjT8eliDu53oDu6aOThw6xqy+0+bM85Tf6eVDO51BimlljkrmZKY4Zbee45AO sO9GiUvHQNuUkK3jDB7PHAEYQ83BpVJZUKZ1/d8ysbksa7tHK6KXYvmDQhbmPgYeUbAiA6 HvpD3+dw6ZJnC5jgfAjXCpzwAkqP6Gxtfbfypoc2HNpIUSt9U+eWCrEM0OmW2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738253331; a=rsa-sha256; cv=none; b=mXkXD8IofJCinfO8yU54/S36EbQSstH4UEdJefrcWdd8KoMMLemfCeGxeOIO5Bp/zKSEIt wQzobyA8hjnaWEAbteJs82AeuGsLUc5IRrQD6eG4eKahsFaCaULG/gX+6xe+YXiTOeMNFX okeh8JflGx+TJAkXS0wSkXnlCtRFb6uAwBhG/n5CSLBIq0hrLSOF9VGps0fI0UdLEmdjc7 IicfXKH/utv51a2cZMx8qwuiigrHPxWl+qxi3u3p+SYPF/7r7hL7mwGoxL8IKrjwPNJZpy WmbjQJWIYn1FgnYgfkjFxT81OXCoxR+DTjMI7JU/EH5vBelghmnHSaxoKNZK3A== 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 4YkP8f69l3zvL3; Thu, 30 Jan 2025 16:08:50 +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 50UG8oj2044795; Thu, 30 Jan 2025 16:08:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50UG8oIg044792; Thu, 30 Jan 2025 16:08:50 GMT (envelope-from git) Date: Thu, 30 Jan 2025 16:08:50 GMT Message-Id: <202501301608.50UG8oIg044792@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: 3d30774f0056 - stable/14 - pf: Force logging if pf_create_state() fails 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: 3d30774f0056b4d1d5eaaf4b560b850eddf1b670 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3d30774f0056b4d1d5eaaf4b560b850eddf1b670 commit 3d30774f0056b4d1d5eaaf4b560b850eddf1b670 Author: Mark Johnston AuthorDate: 2025-01-16 15:44:40 +0000 Commit: Mark Johnston CommitDate: 2025-01-30 15:28:15 +0000 pf: Force logging if pf_create_state() fails Currently packets are logged before pf_create_state() is called, so we might log a packet as passed that is subsequently dropped due to state creation failure. In particular, the drop is not logged, which is wrong. Improve the situation a bit: force logging if state creation fails. This isn't totally right as we'll end up logging the packet twice in this case, but it's better than not logging the drop at all. Add a regression test. Discussed with: kp, ks Co-authored-by: Franco Fichtner MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: OPNsense Differential Revision: https://reviews.freebsd.org/D47953 (cherry picked from commit 886396f1b1a727c642071965612e2c2c9dd11d6c) --- sys/netpfil/pf/pf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 81e942085ad2..064277082475 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5055,6 +5055,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, sport, dport, &rewrite, kif, sm, tag, bproto_sum, bip_sum, hdrlen, &match_rules); if (action != PF_PASS) { + pd->act.log |= PF_LOG_FORCE; if (action == PF_DROP && (r->rule_flag & PFRULE_RETURN)) pf_return(r, nr, pd, sk, off, m, th, kif, From nobody Fri Jan 31 19:18:27 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 4Yl5K02KhZz5msN9; Fri, 31 Jan 2025 19:18:28 +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 4Yl5K01X1gz3HNV; Fri, 31 Jan 2025 19:18:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738351108; 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=UzmwkqTL1qz+XK5CFfjhpdDTPebGioiEEX7oNhMQ/RE=; b=kXF6UuH6LJcSjwq2BuUGO43j5512qcejU6wUs6yQ7eZgX9MJbkGbeuAnfDczOWaomE9Ikq 8wekcri5xJgXaEZyZ2u2AJ6XDXFuH8UiN0QrqXetTfaudSAcMfIi6uGxH48+35N6IRDw7L vtAse8ZjfjeMXXQ4i93/7KqOEf73eRfo0HOfVO/pQW5blKDkDPtLl9hf43fCNXMNshnXVD McbcRNC534QqatjBW6BEHEGF1ekZSKMta6DvrsbdEosRFVRgamIaVfgRCt+2PMVVaLOfdD Y1im1m8WT4bzSuJeOX8HenvNLnJTw5VGjdgnxnWDdhaBNufRxFL+7zE+hOWyHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738351108; 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=UzmwkqTL1qz+XK5CFfjhpdDTPebGioiEEX7oNhMQ/RE=; b=LMIvHoNHz1p9P9tWXb/+Mp91Tz0YPogqf3kaJmWYcy5KxY0KUTA4d3gFCNVnLWO3L/YwZD kukJDvCKCHe+lrGyFfYqTrdMpiDgSIpT8vWToc4KNjeet1wwX6SIrJ/PxpsClHtB8noO0S ws1VX763lFprzr7dF2RvvdYhc59kn+famcORfbDRdh9XrAfdk0vXkM0tBpoWj5OuwEI0UJ M6Y0wjZw2DXeajGi/nbysgyKy5XxqQ/lw2TUxu+gjNY04HuS8+DWhvR7VnO4S0CQ74l0qR 35zqvOKoU3Fvlti8p00WOPDvH7RQArkQfUgbAXPDqF8h15Yq3V3pTjRrJPYaBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738351108; a=rsa-sha256; cv=none; b=NW217/EP0zVrm6UfFhOEq1FsxN9OGXlda+WEhDiQIi8y5OvSPbAXRfShjYMOaGI8l2Xglv xAoTKSMVxTD1B5cU56s4lKDa/fXIwoGE90yhcwUsOc8gWCcyy2UvAxEA0x2ME3RRmuHkIe YjplUyNYg568RWmrucJQKojfBeF5jGvnu5QdFxZUlFrbzRg77Rrz336YPA+9pMiTBYObgp o1NKGOQSAmnTJ4HdyRK4Mdd0MJBTHJeYKk32k4xDMtk+4UH1CZw4ezlwUGrmIADlmVXUIB In16vUEnmtN8M1CUVVXsPizpkcEWh4qlCKgav7zMf8v2cLMGNp849pX56G+xVw== 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 4Yl5K00jbLzWrN; Fri, 31 Jan 2025 19:18:28 +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 50VJIRGL094764; Fri, 31 Jan 2025 19:18:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VJIR8E094761; Fri, 31 Jan 2025 19:18:27 GMT (envelope-from git) Date: Fri, 31 Jan 2025 19:18:27 GMT Message-Id: <202501311918.50VJIR8E094761@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: c55f457df678 - stable/14 - ip: Defer checks for an unspecified dstaddr until after pfil hooks 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: c55f457df6788fdaae244ab8ba87069bf5f2373f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c55f457df6788fdaae244ab8ba87069bf5f2373f commit c55f457df6788fdaae244ab8ba87069bf5f2373f Author: Mark Johnston AuthorDate: 2025-01-16 15:46:37 +0000 Commit: Mark Johnston CommitDate: 2025-01-31 19:18:01 +0000 ip: Defer checks for an unspecified dstaddr until after pfil hooks To comply with Common Criteria certification requirements, it may be necessary to ensure that packets to 0.0.0.0/::0 are dropped and logged by the system firewall. Currently, such packets are dropped by ip_input() and ip6_input() before reaching pfil hooks; let's defer the checks slightly to give firewalls a chance to drop the packets themselves, as this gives better observability. Add some regression tests for this with pf+pflog. Note that prior to commit 713264f6b8b, v4 packets to the unspecified address were not dropped by the IP stack at all. Note that ip_forward() and ip6_forward() ensure that such packets are not forwarded; they are passed back unmodified. Add a regression test which ensures that such packets are visible to pflog. Reviewed by: glebius MFC after: 3 weeks Sponsored by: Klara, Inc. Sponsored by: OPNsense Differential Revision: https://reviews.freebsd.org/D48163 (cherry picked from commit 40faf87894ff67ffdf8126fce9bb438ddf61a26f) --- sys/netinet/ip_input.c | 16 +++++++++++----- sys/netinet6/ip6_fastfwd.c | 1 + sys/netinet6/ip6_input.c | 17 ++++++++++++++--- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 1b080aa65e4e..6d8165003950 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -523,11 +523,6 @@ ip_input(struct mbuf *m) goto bad; } } - /* The unspecified address can appear only as a src address - RFC1122 */ - if (__predict_false(ntohl(ip->ip_dst.s_addr) == INADDR_ANY)) { - IPSTAT_INC(ips_badaddr); - goto bad; - } if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) { sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); @@ -645,6 +640,17 @@ tooshort: } } passin: + /* + * The unspecified address can appear only as a src address - RFC1122. + * + * The check is deferred to here to give firewalls a chance to block + * (and log) such packets. ip_tryforward() will not process such + * packets. + */ + if (__predict_false(ntohl(ip->ip_dst.s_addr) == INADDR_ANY)) { + IPSTAT_INC(ips_badaddr); + goto bad; + } /* * Process options and, if not destined for us, diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c index 08531cee05bf..0ed313bd49a5 100644 --- a/sys/netinet6/ip6_fastfwd.c +++ b/sys/netinet6/ip6_fastfwd.c @@ -107,6 +107,7 @@ ip6_tryforward(struct mbuf *m) IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst) || IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src) || + IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) || in6_localip(&ip6->ip6_dst)) return (m); diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index c5b9f9202cea..b3f10ddc5ea7 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -623,10 +623,10 @@ ip6_input(struct mbuf *m) IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6); /* - * Check against address spoofing/corruption. + * Check against address spoofing/corruption. The unspecified address + * is checked further below. */ - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) || - IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) { + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { /* * XXX: "badscope" is not very suitable for a multicast source. */ @@ -751,6 +751,17 @@ ip6_input(struct mbuf *m) } passin: + /* + * The check is deferred to here to give firewalls a chance to block + * (and log) such packets. ip6_tryforward() will not process such + * packets. + */ + if (__predict_false(IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst))) { + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(rcvif, ifs6_in_addrerr); + goto bad; + } + /* * Disambiguate address scope zones (if there is ambiguity). * We first make sure that the original source or destination address From nobody Fri Jan 31 21:35: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 4Yl8Md4t4Vz5lRG9; Fri, 31 Jan 2025 21:35: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 4Yl8Md490Zz3fdt; Fri, 31 Jan 2025 21:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359357; 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=zCI0BcCOsRyuvdWC8jjtc+2PQcMmVl3XEY9Nfyp2NP0=; b=f2SJcbzqY3NsTYRQMZYroFj+fXop5N00KcBfk966BVLA+v+3sgrpL1Ht0PK3LwDQaRfdV1 FbJR9U3Si/1kwPH6KwQEFFvfLfLCqssRf4DGiQxmO6mbjC9xYTZ+CZy+vKZTqsqaiGB9he LdTKTao5FrpLSs93WGY64cJ5DdSEBS7H5djD2ruBEdDtNk54BcSi+ToRBSxHLrgBnL+lZe fPFqB+LaKJzqWTv0cUTahjXjKkjOKmL7cZ+9E9rB0EO2xrr0Wb7eYq/IMl91f/D490zbmV 63nm0CWD6K3E6YdXCTkA2vx4MsbXjxtp8SbdgjkR9RoECmeK1e36vc2lCifQ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359357; 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=zCI0BcCOsRyuvdWC8jjtc+2PQcMmVl3XEY9Nfyp2NP0=; b=b6duy5Z9yxgvcB+Sy5GAhFXHVvqlBOph140F1/8ZonKJlKOCah2Fkq5R4lE60/mBXR8QaP eooukuFilts7eZuUaNZDPUxIl+NSoGAQxRkf2A/KftfT+HXRfuMP7kcgQNNyDQh6yayQjm IE8NK1ZMJU7RWGdYJIGJ905QVZ09u8YpTz0mLFU2u5clW3WdzIO9AYUYQ18hgDFo2aPsiN zwcGdCpDHlzEfJmANdi8Otkk0PywdSIBSzJq7yxEIMAA/QF8+SYGkn13kv04Vi/+3oCIvE 5zZDjG2j9CxvylsLGvLfFTvVKL7ecbfieplA2za8L1iMjqMw4nFDbCltfPuc/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738359357; a=rsa-sha256; cv=none; b=EfqjBtPi3rZPPigggWRckSmXmbw3T7kNePqBn/aWKW6pJ9flS5a3Przi9CPS5zPDZ78n62 NRAE8KsfvcDZbKosO1lRpDWwyeGQzVetSKsPvfoRvVknJjoOxzwfXOfKVGN/ob0uOnX+/x B+d5pvrlpHSZma0p8Nz9MsJjDHNip/Ya9Krvez4cEL9TDTN8xMBnNQv1t3/JbaMndTMCqr p8vLBckGn7p8da27sFKVbGvkkbnsu9zUA2fOn7tDMFk2XsjIW5JjrJP/YJ3C4Hn3IRjrSD Bvq64eEY8e9Bhk5fEtssvMFwsc11OPazA2CMqAtzCsmJTnocYTwNXSty3bK1/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 4Yl8Md3bPlzbvV; Fri, 31 Jan 2025 21:35: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 50VLZv0p056190; Fri, 31 Jan 2025 21:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VLZvwj056187; Fri, 31 Jan 2025 21:35:57 GMT (envelope-from git) Date: Fri, 31 Jan 2025 21:35:57 GMT Message-Id: <202501312135.50VLZvwj056187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dec497a9fcbf - stable/14 - gvinum.8: Update deprecation warning to note that this is removed in 15.0 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dec497a9fcbfcf264bbdcacaebb1d32cb31f4676 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dec497a9fcbfcf264bbdcacaebb1d32cb31f4676 commit dec497a9fcbfcf264bbdcacaebb1d32cb31f4676 Author: John Baldwin AuthorDate: 2025-01-23 15:27:44 +0000 Commit: John Baldwin CommitDate: 2025-01-31 21:31:25 +0000 gvinum.8: Update deprecation warning to note that this is removed in 15.0 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48592 (cherry picked from commit 916f6e6dd3a95145c70e1c2c55467dd4979a0118) --- sbin/gvinum/gvinum.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/gvinum/gvinum.8 b/sbin/gvinum/gvinum.8 index 28e4cd7d76db..54c6f119a051 100644 --- a/sbin/gvinum/gvinum.8 +++ b/sbin/gvinum/gvinum.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 28, 2021 +.Dd January 23, 2025 .Dt GVINUM 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nm and associated .Xr geom 4 -kernel support is deprecated, and may not be available in +kernel support is deprecated, and is not available in .Fx 15.0 and later. Users are advised to migrate to From nobody Fri Jan 31 21:35: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 4Yl8Mf6f1jz5lRJQ; Fri, 31 Jan 2025 21:35: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 4Yl8Mf56vxz3frf; Fri, 31 Jan 2025 21:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359358; 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=o5ylM+lC+/I/oICvSv+GEy1Zt42KnlMJzSnXoNjcDPU=; b=ygGbU8+nlbKz9YrG2cZCPZ34BDVWbxUUY6pGTZObk6m4xDgIkOcIiEW8qJsWO45CPNd79s cUYHIwQJa9+Nt9vKcb5xPp8wjsOh3UIMtXEIP0awebIEKVgmUl1LVgvK+D69r1rQv9sEYT QRJy3d/mE3qm3XsofVapzrcnJhhZJu0SsMtw7xqp9SLiKyIolD8590bhvX4QVUExWbB6hV szcb1bowQwWzxiRhDcW9hoTKWgpbL+bZUOx76Q4aX/LPw70VcgCSv/bKgOsZICfSmSTHQk 1XoAs64z4ebHExAyV2D5RoyLQOjwVpmUETKQDXr47xyj+McekPQCu+TVBwhiAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359358; 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=o5ylM+lC+/I/oICvSv+GEy1Zt42KnlMJzSnXoNjcDPU=; b=u5Fq/L3NFwVxOSIAWzS9gkQi2OB8hLR5hibwN3kMdcgTmzVmcv1ISXNKzw0oLHc2D61AsX sLKxb8NGo4p0hPHOVyHYQazucN7vxgaABaBkKp+WSU+67sGFkUmgeRbHGOzTo5XTdOkP1F wsR1Ok8FGwPKO3xKDB7oxdbwMtq5cjZMMCnCLFC5vZfbwj3jncAp/9M2k02Sfmd9QYzX1E xuKwSyPsOqBzDocQJIIkXyfc6jIYJAcwbUNW+HdThqZrQ37u6j6lZpn4D5znMt+HzgMyUJ nuHzKK4pLtzI3UkY7SwYkNtRCeyXHV5T/HsGOXVcQXiCZhCb+BkPHFgvklZ4PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738359358; a=rsa-sha256; cv=none; b=YOWeSvLu9Fi0dA3KftcNGLz0ofYyHRMSHb9ceh/9Pp9sfquyeRIeaEBxgylbFobYxOdzbb Q6Ki+YLSvf9unR7q97FDmBv9FSFK4B1cGUGQoJFeaOXN1ErOSx9qpzKIIJalZd6LYtszEk QG/8YwJ91yJaN+tliXX7BOg8YWpgjiQ7+SSE/BSIDyx4SbJGq2jLypZW0nV/Pm3FIpZuU1 bP0P1W6yu93vaWrvhKVA/yz5luB+p1qCrGGp0xp621ma00GYKq8NFuWVVf0CgBC4uy1jCW P4zCzRbHrKGuYawhhPNQFV4pR0y/jxr+1aZQVNIOo+xKVjb2smDJZQt/Ew9wYA== 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 4Yl8Mf4Z2LzbvW; Fri, 31 Jan 2025 21:35: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 50VLZw3F056224; Fri, 31 Jan 2025 21:35:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VLZwBn056221; Fri, 31 Jan 2025 21:35:58 GMT (envelope-from git) Date: Fri, 31 Jan 2025 21:35:58 GMT Message-Id: <202501312135.50VLZwBn056221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 55cb3a33d920 - stable/14 - ccdconfig.8: Refer to graid(8) and zfs(8) instead of gvinum(8) 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55cb3a33d9200544b2b6578b7b6c40825daaea5a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=55cb3a33d9200544b2b6578b7b6c40825daaea5a commit 55cb3a33d9200544b2b6578b7b6c40825daaea5a Author: John Baldwin AuthorDate: 2025-01-23 15:28:27 +0000 Commit: John Baldwin CommitDate: 2025-01-31 21:35:27 +0000 ccdconfig.8: Refer to graid(8) and zfs(8) instead of gvinum(8) Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D48536 (cherry picked from commit 86116ab256c476191e2fc1fffd79f94382960362) (cherry picked from commit 8432ddac21b3da5fa45b4f934e90e80deaa9cabf) --- sbin/ccdconfig/ccdconfig.8 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sbin/ccdconfig/ccdconfig.8 b/sbin/ccdconfig/ccdconfig.8 index 07fa3e6348fc..5acfeb6df179 100644 --- a/sbin/ccdconfig/ccdconfig.8 +++ b/sbin/ccdconfig/ccdconfig.8 @@ -27,7 +27,7 @@ .\" .\" $NetBSD: ccdconfig.8,v 1.4 1996/02/28 01:01:17 thorpej Exp $ .\" -.Dd March 22, 2024 +.Dd January 23, 2025 .Dt CCDCONFIG 8 .Os .Sh NAME @@ -199,15 +199,16 @@ If you need more than this you should look into external hardware RAID SCSI boxes, RAID controllers (see GENERIC), or software RAID systems such as -.Xr geom 8 -and -.Xr gvinum 8 . +.Xr graid 8 +or +.Xr zfs 8 . .Sh SEE ALSO .Xr dd 1 , .Xr ccd 4 , .Xr gpart 8 , -.Xr gvinum 8 , -.Xr rc 8 +.Xr graid 8 , +.Xr rc 8 , +.Xr zfs 8 .Sh HISTORY The .Nm From nobody Fri Jan 31 21:36:01 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 4Yl8Mk0swLz5lRP8; Fri, 31 Jan 2025 21:36:02 +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 4Yl8Mj6B0bz3fck; Fri, 31 Jan 2025 21:36:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359361; 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=CtToXYgml1tdV6pNTqL3r0SeuPywcDYOrduceOKaV3s=; b=q+/2io5CBqk8s52tRnx7L3j66Fkt2fC6SjRoTYjsZZ+tgXE1lk77WoI1up6020813r2csn Cw5DyMkAIe2ldFmbCoyY/z5+vknWl84cPlHrFdYaWiAEbMQtDmWtzCTey2wpIayB0IaEAf Qp6uHtTC23jNUmP2UeuB5qZh3K5aHnU6Vps0RjKYjfeYhOj/ohdnHpZKPpgNdU+/j1B43m 3dBrnfECOXpBOiBGjdp4J0gYnR4eQmpOkV9KAWg1Sbbcj9anzci4X2rW+myb+/lSFpTfog EY8OpLGXomSsc9K1pANVGcn728nnoZ1Vjc9oQGhE/UYt5MfLKhxGeTlReuEfSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359361; 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=CtToXYgml1tdV6pNTqL3r0SeuPywcDYOrduceOKaV3s=; b=ByjkGR0QfM2LpKZ2+GJA18qrapHfHnytVZx0zhctkSekCfq1himtpefVyzEyM358zQKRTQ 5kA/L4OCFoqKi2bVoQ2NyeOOrkrSgortguZjrt5GRCThoYNeMOhOIiTbPS1fnWnBiG+D7j f/upCXrpwpiWIBMn3CW/c5aao9WwNdJrO4CXZnw4GdqF1FH3QDSeaJ8bmTZllM+IJiuhvY s8XLTAuGvJdbaixMl4WQa7Urs0Y3ZVvovkPJfO18DM8yzMLLIvkBslfCK8TLSPtDDiPyeZ DeHzhg4gw2lbImc3m2UGwrKPGjIRaHCh2t8LN01Mx8X627tkfHrCtgl0Iib8nA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738359361; a=rsa-sha256; cv=none; b=qCltfrTppQ4Om+77cdFdnGliH7XG5K+eSFxnY4KZWeej7YUGffrN/qvnZoKqRKV1r5+7uT 661uAPJT4g21jAfAJa6caoXLEAoEpdE47QBzFyQDQrRwF3LTBNBVbcR3hDvu/+aF+PyVYH W7H7O2xos7teuEpsr/zIkj4nc2FW8wE0J9lbOruDQhqzLelbTKKL9NhjKQcoKyv85rEFFY kIPEDs9G9Girv87A+HOVy0hhO5KCdyE4MfDLu0w0f6ih1t5xHobcmhklF/gUxhS714E6Ve hKKYy++19XU6yNx/yl7a9YDhvytGYSRZSduw+AQkyRDmwS53Cod7lX+c4x+Qrw== 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 4Yl8Mj5fBMzcLX; Fri, 31 Jan 2025 21:36:01 +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 50VLa1g3056380; Fri, 31 Jan 2025 21:36:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VLa18X056377; Fri, 31 Jan 2025 21:36:01 GMT (envelope-from git) Date: Fri, 31 Jan 2025 21:36:01 GMT Message-Id: <202501312136.50VLa18X056377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8126ed28bda6 - stable/13 - gvinum.8: Update deprecation warning to note that this is removed in 15.0 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8126ed28bda6b1b93b2e9a59db4a22e2dc115597 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8126ed28bda6b1b93b2e9a59db4a22e2dc115597 commit 8126ed28bda6b1b93b2e9a59db4a22e2dc115597 Author: John Baldwin AuthorDate: 2025-01-23 15:27:44 +0000 Commit: John Baldwin CommitDate: 2025-01-31 21:33:26 +0000 gvinum.8: Update deprecation warning to note that this is removed in 15.0 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48592 (cherry picked from commit 916f6e6dd3a95145c70e1c2c55467dd4979a0118) --- sbin/gvinum/gvinum.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/gvinum/gvinum.8 b/sbin/gvinum/gvinum.8 index e634379f7b51..60ac005a7af6 100644 --- a/sbin/gvinum/gvinum.8 +++ b/sbin/gvinum/gvinum.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 28, 2021 +.Dd January 23, 2025 .Dt GVINUM 8 .Os .Sh NAME @@ -36,8 +36,8 @@ .Nm and associated .Xr geom 4 -kernel support is deprecated, and may not be available in -.Fx 14.0 +kernel support is deprecated, and is not available in +.Fx 15.0 and later. Users are advised to migrate to .Xr gconcat 8 , From nobody Fri Jan 31 21:36:02 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 4Yl8Ml2jS6z5lRjZ; Fri, 31 Jan 2025 21:36:03 +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 4Yl8Mk70KNz3g24; Fri, 31 Jan 2025 21:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359363; 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=YDyNWDo0E9x0R8L9yCWB3dKcz0yBZqazFaqdomUAq+Y=; b=nLbpbbhGxa9l9Gp4csWo63lg3nsNHpryLVU6CTGYXXoCUC60JWk20/WNLiGduJb5H+s9Gp VABiVaOkql7Nsr95qQKAtmtztKepYTA6M2jVLazdzficrblr1MRXBFW11Roc27wq4XI5yT +QpL5Qy8wFkfrDpBj37P1rINLKHgogqEfeOr1s1R278nYUovnKkOq1kJv8KtC3Ex94OsM2 cB6+cmjhEL0eJbwsNA+jbXPxve5MbzvdD8R3oki6qVIl/tMi8nIYios/avTS0GGUljoC5D ZoPV5Zt0X6jOAfv/U5w8f/2mnhVYA0AzH5IC3hL3tp+1sBbjB9h5/BGy8OHZ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738359363; 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=YDyNWDo0E9x0R8L9yCWB3dKcz0yBZqazFaqdomUAq+Y=; b=dl3ndFFXTlWu0VOTMs+8wnHvcbzdq6ybj1nyfkO4BW6ddRbmjcJn6HzLLd/wyOBdIPqmTD wduXq3iHd+8A1VTzf0eHdFXwKzSSufTvshI8z2Qwd9UkZYpmVksCeYPk6vSe7M3XgmplOi N+2ajX1l45NNhRyfRAH5CiCLTJBGkFb6GTKWaXzC5qQZxmMb5st2z2ptrMCky3bRKoNoSM gnCQT6wkfdq6x/FMbrz7LwbVTyBJKwpkYUtdvKq5Qmb8ZKnRa5VVpy39kW9o+vCVu2CEj/ zGHonSd74/c0wCKdSDepd34EdOan5uM/MATZRuci14umfMnlFuRURr1klNczDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738359363; a=rsa-sha256; cv=none; b=gu+FdaCtLhC44C8SBcUZ0fJh1kh4FjswvQ+k815GQTjetoy5RlDUVTQDwEiPRjosrGlD/5 THeD+Pku8I/KEQ3iTI+yKI/ISdOB+sKgusrQ/atV2IhQ+oTa5D7RHV03MbXz5flIVNjtFh DOiOGFghL0t10ojsRBXGcmf23Lo/ePGAx7PMHpR3IZ/866ftwdfYZ+/WG+Fc+WIUtV0qSu P2JHfXzD3DgCdbN5w8DIaNjlxE9Y5QxqaEHvt5BDqjz8/rLjXGJrev5lfVXylu2/DH3s6c 30LYC15mKeO9wyd9Fv4eemhMKBaq5toDTfjCajf4rOrKJcjcQ+nsVRECcymKrw== 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 4Yl8Mk6bvLzbff; Fri, 31 Jan 2025 21:36:02 +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 50VLa2f1056414; Fri, 31 Jan 2025 21:36:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50VLa2FF056411; Fri, 31 Jan 2025 21:36:02 GMT (envelope-from git) Date: Fri, 31 Jan 2025 21:36:02 GMT Message-Id: <202501312136.50VLa2FF056411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9e3c356f11a9 - stable/13 - ccdconfig.8: Refer to graid(8) and zfs(8) instead of gvinum(8) 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9e3c356f11a92ed9fa9f029391c5e613f295c0d8 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9e3c356f11a92ed9fa9f029391c5e613f295c0d8 commit 9e3c356f11a92ed9fa9f029391c5e613f295c0d8 Author: John Baldwin AuthorDate: 2025-01-23 15:28:27 +0000 Commit: John Baldwin CommitDate: 2025-01-31 21:34:58 +0000 ccdconfig.8: Refer to graid(8) and zfs(8) instead of gvinum(8) Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D48536 (cherry picked from commit 86116ab256c476191e2fc1fffd79f94382960362) (cherry picked from commit 8432ddac21b3da5fa45b4f934e90e80deaa9cabf) --- sbin/ccdconfig/ccdconfig.8 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sbin/ccdconfig/ccdconfig.8 b/sbin/ccdconfig/ccdconfig.8 index 07fa3e6348fc..5acfeb6df179 100644 --- a/sbin/ccdconfig/ccdconfig.8 +++ b/sbin/ccdconfig/ccdconfig.8 @@ -27,7 +27,7 @@ .\" .\" $NetBSD: ccdconfig.8,v 1.4 1996/02/28 01:01:17 thorpej Exp $ .\" -.Dd March 22, 2024 +.Dd January 23, 2025 .Dt CCDCONFIG 8 .Os .Sh NAME @@ -199,15 +199,16 @@ If you need more than this you should look into external hardware RAID SCSI boxes, RAID controllers (see GENERIC), or software RAID systems such as -.Xr geom 8 -and -.Xr gvinum 8 . +.Xr graid 8 +or +.Xr zfs 8 . .Sh SEE ALSO .Xr dd 1 , .Xr ccd 4 , .Xr gpart 8 , -.Xr gvinum 8 , -.Xr rc 8 +.Xr graid 8 , +.Xr rc 8 , +.Xr zfs 8 .Sh HISTORY The .Nm From nobody Sat Feb 1 03:25:30 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 4YlJ6z2yvVz5mWd0; Sat, 01 Feb 2025 03:25:31 +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 4YlJ6z1YLDz3T32; Sat, 01 Feb 2025 03:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738380331; 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=dk/6Dzj8qIunAmeZZjQUx227gBtzKCpzAAsWNJmgAh0=; b=K2KxsnAZMyqgnuMFvZOw94686lcjkfpjdazC2HmbWEGLFuzinFwB2Ma3VtbzB0ixrY2NIe zrLA/VqVKSz8ZzLzw3xIXsqiubrD0wKRlS+fIIbwW4La3eFBDQ3WrRRRZC+Y7MxTm/V//P 6//EXkXi0hqdQkd7KmhSS1Tg4QI7o+5/XENc/XKpR5aBXDhAUmfFc5o6hBs8U4wbgaW8YB PlRileJwhmAlC9ddF9B83W+K/1cKI/91s7REwqQG+nWWIHNKF061q6LJHpxT8AbdpUbRj0 1jMbAriHX++RQ8vOIpnfsPPLdWXikcWxAKBV8IMuTNZLLhUpHhfJwpqaq1awww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738380331; 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=dk/6Dzj8qIunAmeZZjQUx227gBtzKCpzAAsWNJmgAh0=; b=atv9P/ndkjT+P2l3JXQZPeoLaf26QkZhUx0l0oyVqI+Lv0Q3aiutYP44QxeLXDzGaeHHYF 45As21JmCGVs4gVsQDnWOCbRoU5PLy8LvzfXXhOTlYsIFRkF4BP+zj13B8FiRCkVFsb1Hz dwGkdBbEodjh+TNSEBcT859NKaiBnofMi1h4U2KbSpK1uz7KdpNCJOZ2SxQ8OkD56L5MFY POn/neyoPPfcuGbndqkBeRJQMYawBsl1p6bmDm67qRd1zI9jqoyAVch0U7Kr3162vefg2s Ta0y7qZMGTlvZjLjoTjLpjsWrpQ43MCGnm0LB7aQ9I4Rwbq+0ax7jDP/5EECUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738380331; a=rsa-sha256; cv=none; b=EB3OeY+6BgCKp+gbCICAnOtO5dExrXqIZCwMDkRax84Er3crhC2XmmBB2QHR7VM/mt5HV5 xIS6hNKBvvALHMJ5JFPtsZACnN32DF5XlVQUkw97hjFI4MJY6HrpoCw+m0Nb6ipIcqSDHO Ws28FKAXRW1nGclqvrFgKNx4j6UxLBBrJT7f0Gu+KpB0Dj1N/SdpBC2oJmyOkZEiOGQ8+0 CD/uY8AwIe2b/uZsZd7abP9HJ9YbTDWKPPIxxAjFiWuKBlcQ6S+cOID5XBlmInGR9y5PmW pWctLFW5udPegPB4HcExolNT8fYjiYofNCtXjLgCpSAVOqlbntDM2iPP8vwrQg== 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 4YlJ6z0d3PznHH; Sat, 01 Feb 2025 03:25:31 +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 5113PUcM013031; Sat, 1 Feb 2025 03:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5113PUIR013028; Sat, 1 Feb 2025 03:25:30 GMT (envelope-from git) Date: Sat, 1 Feb 2025 03:25:30 GMT Message-Id: <202502010325.5113PUIR013028@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: a6b4af5e07af - stable/14 - nfsd: Add support for the NFSv4.2 change_attr_type attribute 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: a6b4af5e07af3309695de49207f9edba524e748f Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a6b4af5e07af3309695de49207f9edba524e748f commit a6b4af5e07af3309695de49207f9edba524e748f Author: Rick Macklem AuthorDate: 2025-01-20 21:51:33 +0000 Commit: Rick Macklem CommitDate: 2025-02-01 03:23:15 +0000 nfsd: Add support for the NFSv4.2 change_attr_type attribute Richard Kojedzinszky reported an intermittent problem where the Linux NFSv4.2 client would sometimes not see changes done to a directory by another client, although the change attribute for the directory had changed. A test patch that added the change_attr_type attribute to the server and always returned NFS4_CHANGE_TYPE_VERSION_COUNTER_NOPNFS seems to have resolved the issue. Somewhat oddly, the Linux knfsd server does not support this attribute but does not seem to exhibit the stale caching problem. This patch uses the VFCF_FILEREVINC flag on a file system (UFS, ZFS) to return NFS4_CHANGE_TYPE_VERSION_COUNTER_NOPNFS. It also returns NFS4_CHANGE_TYPE_TIME_METADATA if VFCF_FILEREVCT is set, which may be useful for exported fuse file systems. PR: 284186 (cherry picked from commit 709c18911ad70978d47198556c0fb1c0e703fb68) --- sys/fs/nfs/nfs_commonsubs.c | 32 ++++++++++++++++++++++++++++++++ sys/fs/nfs/nfsproto.h | 11 ++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 510e497bce2e..9e10bba28c90 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -2307,6 +2307,23 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, if (compare && !(*retcmpp) && i != nfs_srvmaxio) *retcmpp = NFSERR_NOTSAME; break; + case NFSATTRBIT_CHANGEATTRTYPE: + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + if (compare) { + if (!(*retcmpp)) { + tuint = NFSV4CHANGETYPE_UNDEFINED; + if ((vp->v_mount->mnt_vfc->vfc_flags & + VFCF_FILEREVINC) != 0) + tuint = NFSV4CHANGETYPE_VERS_COUNTER_NOPNFS; + else if ((vp->v_mount->mnt_vfc->vfc_flags & + VFCF_FILEREVCT) != 0) + tuint = NFSV4CHANGETYPE_TIME_METADATA; + if (fxdr_unsigned(uint32_t, *tl) != tuint) + *retcmpp = NFSERR_NOTSAME; + } + } + attrsum += NFSX_UNSIGNED; + break; default: printf("EEK! nfsv4_loadattr unknown attr=%d\n", bitpos); @@ -3131,6 +3148,21 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, *tl = 0; retnum += 2 * NFSX_UNSIGNED; break; + case NFSATTRBIT_CHANGEATTRTYPE: + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4CHANGETYPE_UNDEFINED); + if (mp != NULL) { + if ((mp->mnt_vfc->vfc_flags & + VFCF_FILEREVINC) != 0) + *tl = txdr_unsigned( + NFSV4CHANGETYPE_VERS_COUNTER_NOPNFS); + else if ((mp->mnt_vfc->vfc_flags & + VFCF_FILEREVCT) != 0) + *tl = txdr_unsigned( + NFSV4CHANGETYPE_TIME_METADATA); + } + retnum += NFSX_UNSIGNED; + break; default: printf("EEK! Bad V4 attribute bitpos=%d\n", bitpos); } diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index ce7acf102d41..323746ebbb6c 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -1176,6 +1176,7 @@ struct nfsv3_sattr { NFSATTRBM_LAYOUTBLKSIZE | \ NFSATTRBM_LAYOUTALIGNMENT | \ NFSATTRBM_SUPPATTREXCLCREAT | \ + NFSATTRBM_CHANGEATTRTYPE | \ NFSATTRBM_XATTRSUPPORT) /* @@ -1221,7 +1222,8 @@ struct nfsv3_sattr { * NFSATTRBIT_NFSV42 - Attributes only supported by NFSv4.2. */ #define NFSATTRBIT_NFSV42_2 \ - (NFSATTRBM_XATTRSUPPORT | \ + (NFSATTRBM_CHANGEATTRTYPE | \ + NFSATTRBM_XATTRSUPPORT | \ NFSATTRBM_MODEUMASK) /* @@ -1657,4 +1659,11 @@ typedef struct nfsv4stateid nfsv4stateid_t; #define NFSV4SXATTR_CREATE 1 #define NFSV4SXATTR_REPLACE 2 +/* Values for ChangeAttrType (RFC-7862). */ +#define NFSV4CHANGETYPE_MONOTONIC_INCR 0 +#define NFSV4CHANGETYPE_VERS_COUNTER 1 +#define NFSV4CHANGETYPE_VERS_COUNTER_NOPNFS 2 +#define NFSV4CHANGETYPE_TIME_METADATA 3 +#define NFSV4CHANGETYPE_UNDEFINED 4 + #endif /* _NFS_NFSPROTO_H_ */ From nobody Sat Feb 1 03:35:01 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 4YlJKx5STRz5mXgh; Sat, 01 Feb 2025 03:35: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 4YlJKx4mr4z3V6p; Sat, 01 Feb 2025 03:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738380901; 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=LVg6FHmYHC/zrdm/o/u2gk6n/JDSDf03sxjsR0IiGoc=; b=Vbh82iK19rgp9fGb3C0BlkX3zgTV93Fr5t5TwX94/gCxRAcB8yZbTFr4M2P+L/FGqE/zTi Mhvi2G2UDwI4ez1wySeC+vcE8jdLnJAgckNrd8cuPVDA9veYqYrJMhyMAJuWo2PwWo6YKg DCYk2EdTIz62txL1jBPFFxrW3/v2Xj6Z3pHwM+EOI7DSYgo/Mb3DjrxsUDHvsjyvV3/3zZ pPnA4riuNIliLaGGXkbtX1UvZN46+++iCzaqpud4BvIC9IKfl20764/ITrBleIXls89Oy2 E3mbA64Dn+YafoSeTP/CMws4KxTEgJXqA8HB13Sqg1IHdsYJjI1w0dkGpFJxGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738380901; 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=LVg6FHmYHC/zrdm/o/u2gk6n/JDSDf03sxjsR0IiGoc=; b=wH2YCSLQBowaawIvshlcUrHsMJq45xcnVkQ+M0FXcXZcRQe9CSmsOhDXfWPqF5K5UEkbE1 h/pIAddb8k9ZBHj5MHx+B3T0ANZh2JlUuvi0S2Y4tLhMy/ynG5MG6C64dY2POL++DmNBlu i5+VyiYWtPAt6FReIArqG47AOCEHIqiT3iyOXOHYyK3qp0ovSR5avmLZINjD+zRYbN4pZZ YSHeC+/ouTcEdDDIP0lZ71mKyQbDNtmmfTGHHniLldEoOnKsKVl1LsyILa5+QlDUevbgo3 pd+GVYaa3BLSP618kbEFVYm25p0uTC25vQBhiglRsQ6zQjUSM6c+vhD9zSl0GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738380901; a=rsa-sha256; cv=none; b=UC8XCCkl24lsIWRuQhSFT5s2EYo4dKRFPq3nBmPFXYaV1tBkuyZsKg+BDIXL3KfoDnFyWh lESpkqKGizpYmOlYCVXbBmM0tOi2P5I0RfSdKPH56emGsHtPJZYel4scYalBhCRB4qg8HO trDMCljQsa+jxPprtUcSg3Jv4imakeLIOnM+WgIK6fVbAEP8vhmoUFz6dIV+2rqh57bAcF cKGpQI9PMv1wj85tQYzhTW3RFLrIzBQNFkpQGxHUw+4jCSmmXM4PYAgjA2Wgx0tWURSbc/ c0zchChY3cjQs/tkeTGK7EJR6WeHOmijkHOTsYZVc6VESRyW6Qe6qSVZJa+4Hw== 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 4YlJKx48PgznbP; Sat, 01 Feb 2025 03:35:01 +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 5113Z1fv032233; Sat, 1 Feb 2025 03:35:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5113Z1SP032230; Sat, 1 Feb 2025 03:35:01 GMT (envelope-from git) Date: Sat, 1 Feb 2025 03:35:01 GMT Message-Id: <202502010335.5113Z1SP032230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 81a8f67a5b55 - stable/14 - mtree: TESTSBASE directory always starts with a / 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 81a8f67a5b55905320233cbfdae321173a92a172 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=81a8f67a5b55905320233cbfdae321173a92a172 commit 81a8f67a5b55905320233cbfdae321173a92a172 Author: Jose Luis Duran AuthorDate: 2025-01-24 23:10:05 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-01 03:32:32 +0000 mtree: TESTSBASE directory always starts with a / Remove the extra forward slash ("/"), otherwise the mtree specification file will have the double slash and will not be parsed by makefs when attempting to build NanoBSD with NO_ROOT privileges. Fixes: 07670b30fa43 ("Create /usr/tests *.debug file directory hierarchy") Reviewed by: emaste Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D47722 (cherry picked from commit 01ff67f4bdf5959a719a6511a855f6a60c0e3a93) --- Makefile.inc1 | 2 +- etc/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 94f74392f4fb..b1a882a042a6 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1469,7 +1469,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null .if ${MK_DEBUG_FILES} != "no" ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ - -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/${TESTSBASE} >/dev/null + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug${TESTSBASE} >/dev/null .endif .endif .if defined(NO_ROOT) diff --git a/etc/Makefile b/etc/Makefile index bd6d692e5316..27070e726943 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -113,7 +113,7 @@ MTREES+= mtree/BSD.lib${libcompat}.dist /usr/lib/debug/usr .endfor .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist ${TESTSBASE} -MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE} +MTREES+= mtree/BSD.tests.dist /usr/lib/debug${TESTSBASE} .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / From nobody Sat Feb 1 03:35: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 4YlJLG2C6tz5mXfW; Sat, 01 Feb 2025 03:35: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 4YlJLF5Jbxz3V5m; Sat, 01 Feb 2025 03:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738380917; 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=TW+mnF2jUUmd/S9GH52Lp0Rfmujexy9LFBVKpKNBqUw=; b=Pxb2Ib41BwZIdc5bYYSbuF1Wia4VVgfJG424yOK6b/a+2AslgjkegMmwaJRZMSXH/1IfgM tUdCUpuXJT42GX1WPPhvWEoZR6e8NUVTi2tRsTfQDqi7Z3XeH1jW1xtBDkDqFl7ZqE1Fro 5S8+XNe9147oBdgKeBvz1Rw5fk7Po67Af6QerSjTeMypTLtS7k3ojNqMXX1U69WMMR/V4Z vSKTFLWHlVpem5kHIwNGbbtTXNCuaNC9vlhhk83hm0Mk4xtloWqxFrA97L9ziq4V2DrNIS sQxk3kxzNqtAIG+6aCaH0RmpgOkr7go/0Yw/94mTkkKJKccqLSjxzJKC+rrYZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738380917; 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=TW+mnF2jUUmd/S9GH52Lp0Rfmujexy9LFBVKpKNBqUw=; b=LbUxAqasysdkddNVn8++bXqpIzhNUT0zX2gPEII8EnDK1jTsDw/YKzDsLgIynYrpQyRb5K 9SUbPZ6rDwe6MSolmRUmsCao6u61Zy5M61tacDRiriJ3vKjcjzyZ0G72FPK55oP5u0INNa U0svLfQffpoNdT03T08/KQwparLwlEBK2ldDGCOAM3UdEgLXqL/0YEseamob3Xp3Pl6JtC CsiD37IBmLhcglwcUCj5LgaRV3XHw2vgE3U7eQlsAA00d8Zq8SzjwTAFA/sEkij7ybr3+I 7j+z5hJjTqMerdLN7nO6qykMN5I0sBqqmJ2A83t45bjZDSr6I9IjMcGfto/uCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738380917; a=rsa-sha256; cv=none; b=CJwESqy9krI4uy+Nwqggao5GEntWBa1pY2LTwYdBkcUxCUMnpcVOLPnwYhfVa8X+rJ0tNd RlBd56BOfLJFaZdMi0cH6e2opZGrcEVbjfyZmrrJ6Dr8P5RXBAhooAAGQquYDuF2JJO7sT 9mPtRZ3iQfidNl9CDe8jMnrBJMLGPQG7V3Iyo9Kxl8n6/Mr6AFcbpbK4BhLTAVziTm+Kpr KMcBykL1DFnCz60zoWyGN3vhyW7WE22UsQnhBTsE5CwbGuejoMb0e8L1HSLsKpH07jTqQE FIEeCf2FTEtvTg34Z/FieDElYFRrvFyLk4cCLav/tPDe21CvEW69oz9lHOFyaQ== 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 4YlJLF4p3bznNN; Sat, 01 Feb 2025 03:35: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 5113ZHnB032419; Sat, 1 Feb 2025 03:35:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5113ZHFO032416; Sat, 1 Feb 2025 03:35:17 GMT (envelope-from git) Date: Sat, 1 Feb 2025 03:35:17 GMT Message-Id: <202502010335.5113ZHFO032416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: d9753f86679d - stable/13 - mtree: TESTSBASE directory always starts with a / 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d9753f86679d0659137b5ee38b1df31cf509f640 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=d9753f86679d0659137b5ee38b1df31cf509f640 commit d9753f86679d0659137b5ee38b1df31cf509f640 Author: Jose Luis Duran AuthorDate: 2025-01-24 23:10:05 +0000 Commit: Jose Luis Duran CommitDate: 2025-02-01 03:33:22 +0000 mtree: TESTSBASE directory always starts with a / Remove the extra forward slash ("/"), otherwise the mtree specification file will have the double slash and will not be parsed by makefs when attempting to build NanoBSD with NO_ROOT privileges. Fixes: 07670b30fa43 ("Create /usr/tests *.debug file directory hierarchy") Reviewed by: emaste Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D47722 (cherry picked from commit 01ff67f4bdf5959a719a6511a855f6a60c0e3a93) --- Makefile.inc1 | 2 +- etc/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 65a5aa203aa3..d5c7eee442b0 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1450,7 +1450,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null .if ${MK_DEBUG_FILES} != "no" ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ - -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/${TESTSBASE} >/dev/null + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug${TESTSBASE} >/dev/null .endif .endif .if defined(NO_ROOT) diff --git a/etc/Makefile b/etc/Makefile index 6d53b64a79eb..42d9e4763da0 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -108,7 +108,7 @@ MTREES+= mtree/BSD.libsoft.dist /usr/lib/debug/usr .endif .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist ${TESTSBASE} -MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE} +MTREES+= mtree/BSD.tests.dist /usr/lib/debug${TESTSBASE} .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / From nobody Sun Feb 2 20:38: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 4YmM0N2Wjrz5mwNw for ; Sun, 02 Feb 2025 20:38:28 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YmM0M23y7z3dMl for ; Sun, 02 Feb 2025 20:38:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-436345cc17bso27483655e9.0 for ; Sun, 02 Feb 2025 12:38:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738528705; x=1739133505; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4Xnmw6Nv8fi0Z0KJQYnRiFh7J19j5hBCN/foa7UDkJ4=; b=eWByUALOt9qEu4a+kVdM4KCITRlcq2xJM4FaoYKswEjM8Rbbn4n9i0EJ/s52ukTHtJ ++cBnBelTLZ0d31tnCJjV2uOEhCj2YR2NyLX2NPyP7ReI0eVUETmg8DQ3ANEZ6A3hGSu cMHCvKOlual94z9tQ8crv1ipZU1lS15Nn9oc0dbR26fcky0IjUL26WuT/kr4P004i1H0 hOQWWVmg/aR+BRNftUBrJ4ICZgv+h4Lo9Q+9K7RiHSogQhbjm+P6fbZ1HRYesO21N2iF OzYBlQv795LiC4oSE4+sciqeP2F2vJ+X31b03OuqwnXstbNVfS43rrztCj5nqLRTZvdl Ejag== X-Forwarded-Encrypted: i=1; AJvYcCUkLMO3hdKDiSuiCkaHyIqlByT/e7r8zjUc3/vRdFi4rwSd3B1lNMGfuNcf8tcJ1cOvi8fBm9/TpW0l8vbn38U96Q8P2m20lsc=@freebsd.org X-Gm-Message-State: AOJu0YwFVq0sGBO6RmF/wcJpcZ5LCGVxXWcrIyuE6KyfI6a6R7sKOuei I1NAaSVswUakSEegClCiUVi2IRcjeXPPJVkbeIrQG1XA60vhg7cFKIHxeXB3174= X-Gm-Gg: ASbGncvnUov3O4n1zXaPDHKXd7Zd+5keTgXj6XssMHLG3ZcUd8JWZbycR9IXpNieaQe Q8905cNC+kE6r0rKlqm4wsP9DVkLe7oA0nw1v+I5yrXAynmgUhEkkAIklQwSGUy/AO5jsmLYmml AYR2uW6rAayXQybpnYh+v1faRok+3ayIeusaA5nd3C+hJJ8NOf5hkwQa4qNmLs/9/oEzQjgxsru Eu/HpMAzpYTdNwdhDr3UGfdniRdSJgTAN23Z8W77islPzvAJ7x4CZlU4HwfTxh3Lq3I0+JsfT+M knswsh6hO6CDpDZrFzUnFrJ8gpS10Q== X-Google-Smtp-Source: AGHT+IE/270rZzCieUNr6i6w4Hr3BLrMuVFPAlYbLv3xixTevc+rYaYRR0ko572QTsk2Q919INfWWw== X-Received: by 2002:a05:600c:3511:b0:434:f3a1:b214 with SMTP id 5b1f17b1804b1-438dc41ef52mr140137165e9.28.1738528704946; Sun, 02 Feb 2025 12:38:24 -0800 (PST) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c5c1b5136sm11044701f8f.65.2025.02.02.12.38.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Feb 2025 12:38:23 -0800 (PST) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: git: 15f6edf20e4e - stable/14 - bsdinstall: add menu to install firmware From: Jessica Clarke In-Reply-To: <202411210005.4AL05Tjg087697@gitrepo.freebsd.org> Date: Sun, 2 Feb 2025 20:38:13 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <564A369C-8ABC-494F-8955-949237FEA1C7@freebsd.org> References: <202411210005.4AL05Tjg087697@gitrepo.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.3826.300.87.4.3) X-Spamd-Result: default: False [-1.63 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; NEURAL_HAM_SHORT(-0.83)[-0.831]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.42)[-0.417]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; TO_DN_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RBL_SENDERSCORE_REPUT_8(0.00)[209.85.128.54:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-branches@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-branches@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.54:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.54:from] X-Spamd-Bar: - X-Rspamd-Queue-Id: 4YmM0M23y7z3dMl On 21 Nov 2024, at 00:05, Bjoern A. Zeeb wrote: >=20 > The branch stable/14 has been updated by bz: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D15f6edf20e4e1542f2385a9cbd6e996e= 23252858 >=20 > commit 15f6edf20e4e1542f2385a9cbd6e996e23252858 > Author: Bjoern A. Zeeb > AuthorDate: 2024-11-09 01:10:33 +0000 > Commit: Bjoern A. Zeeb > CommitDate: 2024-11-21 00:04:57 +0000 >=20 > bsdinstall: add menu to install firmware >=20 > Add a menu to the installer to run fwget(8) inside the newly = installed > system to install firmware known to be needed. > This requires working netowrking. >=20 > This is needed at least for wireless currently for when we entirely > stop shipping new firmware in src.git to have working networking on > the installed system (we already do need this for at least rtw89). >=20 > Sponsored by: The FreeBSD Foundation > Tested with: 4 different iwlwifi chipsets in a system (earlier = version) > Suggested improvments by: jrtc27 > Differential Revision: https://reviews.freebsd.org/D47491 >=20 > (cherry picked from commit = bbe2a1da2df639c616869aa838244c8094779bd4) This MFC lost the finalconfig hunk, so there=E2=80=99s no option to = revisit the firmware step as there is in main. Presumably this happened because finalconfig isn=E2=80=99t a separate script in 14 and below, but it does = still exist, just as a function in auto, so that conflict should have been resolved by applying the hunk there instead. Jess > --- > usr.sbin/bsdinstall/bsdinstall.8 | 19 +++++- > usr.sbin/bsdinstall/scripts/Makefile | 1 + > usr.sbin/bsdinstall/scripts/auto | 1 + > usr.sbin/bsdinstall/scripts/firmware | 125 = +++++++++++++++++++++++++++++++++++ > 4 files changed, 145 insertions(+), 1 deletion(-) >=20 > diff --git a/usr.sbin/bsdinstall/bsdinstall.8 = b/usr.sbin/bsdinstall/bsdinstall.8 > index c8bf143322ae..50c8948a7989 100644 > --- a/usr.sbin/bsdinstall/bsdinstall.8 > +++ b/usr.sbin/bsdinstall/bsdinstall.8 > @@ -1,6 +1,10 @@ > .\"- > .\" Copyright (c) 2011-2013 Nathan Whitehorn = All rights reserved. > .\" Copyright (c) 2018 Roberto Fernandez Cueto > +.\" Copyright (c) 2024 The FreeBSD Foundation > +.\" > +.\" Portions of this documentation were written by Bj=C3=B6rn Zeeb > +.\" under sponsorship from the FreeBSD Foundation. > .\" > .\" Redistribution and use in source and binary forms, with or without > .\" modification, are permitted provided that the following conditions > @@ -23,7 +27,7 @@ > .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > .\" POSSIBILITY OF SUCH DAMAGE. > .\" > -.Dd November 18, 2023 > +.Dd November 4, 2024 > .Dt BSDINSTALL 8 > .Os > .Sh NAME > @@ -240,6 +244,12 @@ Extracts the distributions listed in > .Ev DISTRIBUTIONS > into > .Ev BSDINSTALL_CHROOT . > +.It Cm firmware > +executes > +.Xr fwget 8 > +inside the > +.Ev BSDINSTALL_CHROOT > +to install any needed and available firmware for the new system. > .It Cm rootpass > Interactively invokes > .Xr passwd 1 > @@ -323,6 +333,13 @@ Default: > Path to a log file for the installation. > Default: > .Dq Pa $TMPDIR/bsdinstall_log > +.It Ev BSDINSTALL_SKIP_FIRMWARE > +If not empty, the > +.Cm auto > +target > +will not invoke the > +.Cm firmware > +target. > .It Ev BSDINSTALL_SKIP_HARDENING > If not empty, the > .Cm auto > diff --git a/usr.sbin/bsdinstall/scripts/Makefile = b/usr.sbin/bsdinstall/scripts/Makefile > index 2d226f418783..cbe190d85f12 100644 > --- a/usr.sbin/bsdinstall/scripts/Makefile > +++ b/usr.sbin/bsdinstall/scripts/Makefile > @@ -7,6 +7,7 @@ SCRIPTS=3Dauto \ > docsinstall \ > entropy \ > fetchmissingdists \ > + firmware \ > hardening \ > hostname \ > jail \ > diff --git a/usr.sbin/bsdinstall/scripts/auto = b/usr.sbin/bsdinstall/scripts/auto > index fd5b634696ae..6a89b3dfdd81 100755 > --- a/usr.sbin/bsdinstall/scripts/auto > +++ b/usr.sbin/bsdinstall/scripts/auto > @@ -364,6 +364,7 @@ fi > [ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time > [ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services > [ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening > +[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware >=20 > [ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME = Installer" \ > --title "Add User Accounts" --yesno \ > diff --git a/usr.sbin/bsdinstall/scripts/firmware = b/usr.sbin/bsdinstall/scripts/firmware > new file mode 100644 > index 000000000000..a563f0e578e4 > --- /dev/null > +++ b/usr.sbin/bsdinstall/scripts/firmware > @@ -0,0 +1,125 @@ > +#!/bin/sh > +#- > +# SPDX-License-Identifier: BSD-2-Clause > +# > +# Copyright (c) 2024 The FreeBSD Foundation > +# > +# This software was developed by Bj=C3=B6rn Zeeb > +# under sponsorship from the FreeBSD Foundation. > +# > + > +BSDCFG_SHARE=3D"/usr/share/bsdconfig" > +. $BSDCFG_SHARE/common.subr || exit 1 > + > +f_dprintf "%s: loading includes..." "$0" > +f_include $BSDCFG_SHARE/dialog.subr > +f_include $BSDCFG_SHARE/mustberoot.subr > +f_include $BSDCFG_SHARE/packages/packages.subr > + > +msg_freebsd_firmware_installation=3D"$OSNAME Firmware Installation" > +msg_freebsd_installer=3D"$OSNAME Installer" > +msg_firmware_menu_text=3D"This menu allows you to install firmware = packages for your system" > +hline_arrows_space_tab_enter=3D"Use arrows, SPACE, TAB or ENTER" > +hline_ok=3D"Press OK to continue" > + > +dialog_menu_main() > +{ > + local title=3D"$DIALOG_TITLE" > + local btitle=3D"$DIALOG_BACKTITLE" > + local prompt=3D"$msg_firmware_menu_text" > + local hline > + local check_list=3D # Empty; filled below > + local fwlist _fw > + > + fwlist=3D`chroot $BSDINSTALL_CHROOT fwget -q -n` > + case "${fwlist}" in > + "") # No firmware to install > + # Print a dialog with OK and a 3 line timeout bar. > + local height width rows msg > + > + msg=3D"No firmware to install, continuing..." > + hline=3D"$hline_ok" > + > + eval f_dialog_checklist_size height width rows \ > + \"\$title\" \ > + \"\$btitle\" \ > + \"\$msg\" \ > + \"-\" \ > + \"n\" \ > + \"-\" \ > + \"\$hline\" > + > + ${DIALOG} --title "${title}" --backtitle "${btitle}" \ > + --hline "${hline}" \ > + --nocancel --pause "${msg}" $height $width 5 > + f_dialog_menutag_store -s "" > + return $DIALOG_OK > + ;; > + *) > + local desc status height width rows selected retval > + hline=3D"$hline_arrows_space_tab_enter" > + > + for _fw in ${fwlist}; do > + desc=3D"${_fw}" > + f_shell_escape "$desc" desc > + # install each firmware package by default. > + check_list=3D"$check_list > + '$_fw' '$desc' 'on' > + " > + done > + > + eval f_dialog_checklist_size height width rows \ > + \"\$title\" \ > + \"\$btitle\" \ > + \"\$prompt\" \ > + \"\$hline\" \ > + $check_list > + > + selected=3D$( eval $DIALOG \ > + --title \"\$title\" \ > + --backtitle \"\$btitle\" \ > + --separate-output \ > + --hline \"\$hline\" \ > + --ok-label \"\$msg_ok\" \ > + --cancel-label \"\$msg_cancel\" \ > + --checklist \"\$prompt\" \ > + $height $width $rows \ > + $check_list \ > + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD > + ) > + retval=3D$? > + f_dialog_menutag_store -s "$selected" > + return $retval > + ;; > + esac > +} > + > +# Initialize > +f_dialog_title "$msg_freebsd_firmware_installation" > +f_dialog_backtitle "$msg_freebsd_installer" > + > +# Gather the firmware files and present them to the user > +dialog_menu_main || f_die > +f_dialog_menutag_fetch selected > + > +# Nothing to install? > +if [ "${selected}" =3D=3D "" ]; then > + exit 0 > +fi > + > +f_mustberoot_init > + > +# pkg(8) needs name servers (unless we could use a local repo in the = future). > +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf = $BSDINSTALL_CHROOT/etc/ > + > +${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \ > + --infobox "Installing firmware. This may take a moment." 0 0 > + > +# Install each of the selected firmware packages > +for fw in ${selected}; do > + # We install one at a time in case one is not avail. > + # pkg-install.8 needs an option to skip unavail. > + ASSUME_ALWAYS_YES=3DYES chroot $BSDINSTALL_CHROOT pkg install -qy = ${fw} > +done > + > +# end