From nobody Mon Mar 24 01:41:21 2025 X-Original-To: dev-commits-src-all@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 4ZLbPF6LcNz5s6RV; Mon, 24 Mar 2025 01:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLbPF588Dz3WfM; Mon, 24 Mar 2025 01:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742780481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CU+o/PBYaJFRVkdvWqNI5U4TXTE25n3UUEOQtcRdRXE=; b=EqVDMnC2aJeZVgiGPAIuienK3OhsBVvXgzHztXOqUap5dEK8ia953mycCWLGggMKpSeONt lKwescU6yle5O4TLA37+wKL2IJIF0LQe4wCwn+AtC6uAo1BtRij4exRnfp1ojeM3mjP0m3 3CAVGNNhRYQoeCryaNkcDvd/QHFl40Yo0c6Id59LUs7h7S+uwpv4mdCh/cAR6a3any8/Gh F9u+x2WgJgiwQdyxytPWpdsOGC9DOBe11FbK53Bqit0Na7MWaMwoLGUJxMguw8f92RV1vk IHTyBAIYlAxO1A03ZGBNUJ+aBUISI978clqOZ7VxDzZGL1r+LPcNh4A7xY4GiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742780481; a=rsa-sha256; cv=none; b=OQjtYHccnWitQMZG7wTFXhirxw37LqLb1QBzNMOb3Hhh7WmDFsrWBG4c+/JqkzvRLyl5jh 7nu6QVIAt+Y5Tas5h4zOXy3wFv2Zu1cbbtaPS/u/fulxjqyAIPXhKppwI6fNcJ2NK+1DnZ RwUNwJYyytGEiaq4qL5n1K0af1ZOsYvjXYKB37EWKzX8HprV02xG8iTSG6tdsVskDwWcng TokHd3dKm0WzYbXSw14rELteANp9Sc8PRjnfQbvchNwcSQVrAV3MbsZa30IiH+bCJDrB4v OUljiQh1M/Jz6m3fhvt9d2jQ4Zg9E391co6ccv6rvMs+ji4yHp9+f3dVULAj2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742780481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CU+o/PBYaJFRVkdvWqNI5U4TXTE25n3UUEOQtcRdRXE=; b=NuIMetyr+U5d9XQEUj1svQm0G1lvZYkLx0UXf9rs0FU+KdEgUpkWmzmLJmEceNQlX6c8K+ v3PeqV7lGREPZTqNPLQl8o6L6Oa7MAWoCx92QGY1Nm6CbsvbqZwBfh7sh2xmfoHe7MHTgQ U9BfAcfamvUbzb9/GwOP20TS5aiHWafnTCR7fWlgabRODw65HhwAes4uNL8G0a93NbFMhQ FSYekJfXeUJY/tGmnU0oPW5/d9qKAUyzdXNW6hWTRsdVbV0ps62WRQmt6sstvejIHBtRdm sJt6aouLtZk+d27/v0Qv2wQLyBGDCP6pKoJuuD4D3Qtqd87TD1pklKEmU0kgfA== 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 4ZLbPF4h2BzZ3D; Mon, 24 Mar 2025 01:41: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 52O1fLnl090946; Mon, 24 Mar 2025 01:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O1fLiS090943; Mon, 24 Mar 2025 01:41:21 GMT (envelope-from git) Date: Mon, 24 Mar 2025 01:41:21 GMT Message-Id: <202503240141.52O1fLiS090943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 26a7022d62b8 - stable/14 - ports.7: Update dialog4ports to portconfig List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26a7022d62b88f83b403aa2d7fa1af636cb54be6 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=26a7022d62b88f83b403aa2d7fa1af636cb54be6 commit 26a7022d62b88f83b403aa2d7fa1af636cb54be6 Author: Alexander Ziaee AuthorDate: 2025-03-21 16:31:26 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-24 01:38:08 +0000 ports.7: Update dialog4ports to portconfig dialog4ports has been replaced with portconfig for several years. It was marked as deprecated and broken in ports:61e4a788ecab. While here, tag SPDX. MFC after: 3 days Reported by: Community Discord Reviewed by: bapt (previous version), mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49204 (cherry picked from commit 3bf433f141a5c8987f347c6618bab0482063a66c) --- share/man/man7/ports.7 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index e25da8ebe567..6650399cfc67 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1997 David E. O'Brien .\" .\" All rights reserved. @@ -23,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 24, 2023 +.Dd March 21, 2025 .Dt PORTS 7 .Os .Sh NAME @@ -163,7 +165,7 @@ target. Configure .Va OPTIONS for this port using -.Xr dialog4ports 1 . +.Xr portconfig 1 Pq Pa ports/ports-mgmt/portconfig . .It Cm fetch Fetch all of the files needed to build this port from the sites listed in @@ -245,7 +247,7 @@ configured. Configure .Va OPTIONS for this port and all its dependencies using -.Xr dialog4ports 1 . +.Xr portconfig 1 Pq Pa ports/ports-mgmt/portconfig . .It Cm fetch-list Show the list of files to fetch in order to build the port (but not its dependencies). From nobody Mon Mar 24 01:41:22 2025 X-Original-To: dev-commits-src-all@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 4ZLbPH3lP6z5s6fT; Mon, 24 Mar 2025 01:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLbPG605qz3WZR; Mon, 24 Mar 2025 01:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742780482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Al9JFcVX6QAOJKJs0qt6oidVZxIjY62t0PkeghqcNAk=; b=jKa9NS45lG2NxRZLdKBvq0XwvybP2ko59y+4qDTvGTp2Z/Qu6rWOLNq8pSJ6vYvv2c/aZt fcbVoTpkAYmvmXvQFRffg1L6UbQRFLwBYgIVNz8EIM9l74gPbPm4JBIgWVqLzL+y3c93Ta m+KTEdwZ6HPp6/xSM7y1IlMEjhkkaLO9P9FGPytk2plG6BciF8L3eGghsu2ZWiKKq8/9rD DQ0Kix1Ln46p6V4m6Bc2NSBK0kvAMCXpFSkM+FD5SuWD9tfB9T2r8nBOsdXhJS/eg1z6mA HgugniuDGYmw70DkkYGBGj1bQDptDxhBUhsk0yRea2onhZTJ8fuiYUZJApP1jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742780482; a=rsa-sha256; cv=none; b=yNjC2uSPsRyX1fYWOoIBfSd4+2M62Ss2UhNPQ7j206y/CdFj4pM2NjJh+axm9A6y+cOFSO JDPx79Cy2mtB6BkJshZa806lkCfbVtIpfeGNB/36/QWbT1jzbDyHZmXsaYjp1HsNXsatju uGfcBnx8lLc9yvvmR/w66qcIyTatZck6Mrq+1lMgvSYTxyrRcrCd/Mn3zwafiD0onFhwp2 XLU+qrhuLmYgHQOZlucFdiEsxNRRhS0dR1amppU2BWmDqOD2hdjdIIupY99hWfSHV1b8fP zaP749+Ox3Xrh6stiz8ft8QHaLJtiSDQE75rl4CU5nfcDFlml5aZXjCmuCLbgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742780482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Al9JFcVX6QAOJKJs0qt6oidVZxIjY62t0PkeghqcNAk=; b=esd4jjHw8QIJeypBuLD3/crWX4rdy50PXlWFOCADBolZA8LbXl+F3IVoRUxFEfnnbhBeJm EzJEk0sMJx9pv1p5hjEFt01XNAl2xBHzhMg7ztt2XHKOZLqnVWG1mcOnd6KlPs0ZvzC32V eirsSJYlpHNyWW2TPPu5oBRR8/9t3NpDv9KyhGM99KKBmy2hfLOldG3LskossZKwVHXlpx 30GOw86Se1BMUchSBF8EEyhCmxw1vf8GdhxuXPcsGSfhtQ7jLWe7fO8TWhn+Kua8EOCT2m Jwm669eqIdJlQNJcgRd3flyR/9es6/I9IWel8XfpmrO4aAnTJfbBBjreJk/W2w== 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 4ZLbPG5NYTzYt0; Mon, 24 Mar 2025 01:41: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 52O1fMoE090979; Mon, 24 Mar 2025 01:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O1fMef090976; Mon, 24 Mar 2025 01:41:22 GMT (envelope-from git) Date: Mon, 24 Mar 2025 01:41:22 GMT Message-Id: <202503240141.52O1fMef090976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 4c02b6589e82 - stable/14 - etdump.1: Polish + xref cd9660(5) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c02b6589e8231f0247a6daf83170b1f329aac00 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=4c02b6589e8231f0247a6daf83170b1f329aac00 commit 4c02b6589e8231f0247a6daf83170b1f329aac00 Author: Alexander Ziaee AuthorDate: 2025-01-19 02:04:36 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-24 01:40:28 +0000 etdump.1: Polish + xref cd9660(5) + correct misfile in section 8 + rewrite the document descirption to include -9660 + markup command modifiers as such instead of bold + markup variables as defined variables, enabling apropos + correct option syntax in description section + unwrap list offsets for legibility + fix line wrapping for standard BSD console + crossreference cd9660(5) and vis versa + tag SPDX for both manuals MFC after: 3 days Reviewed by: mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D48513 (cherry picked from commit 283be95ea29abd7f867e4084bafe368c47f6c038) --- share/man/man5/cd9660.5 | 5 ++++- usr.bin/etdump/etdump.1 | 52 ++++++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/share/man/man5/cd9660.5 b/share/man/man5/cd9660.5 index 224816e16c57..33a93ef77431 100644 --- a/share/man/man5/cd9660.5 +++ b/share/man/man5/cd9660.5 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2017 Enji Cooper .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 25, 2023 +.Dd January 18, 2025 .Dt CD9660 5 .Os .Sh NAME @@ -57,6 +59,7 @@ volume located on .Pp .Dl "mount -t cd9660 /dev/cd0 /mnt" .Sh SEE ALSO +.Xr etdump 1 , .Xr nmount 2 , .Xr unmount 2 , .Xr cd 4 , diff --git a/usr.bin/etdump/etdump.1 b/usr.bin/etdump/etdump.1 index bec8d201eb4f..a86a5e24742c 100644 --- a/usr.bin/etdump/etdump.1 +++ b/usr.bin/etdump/etdump.1 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2018 iXsystems, Inc .\" All rights reserved. .\" @@ -22,51 +25,54 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 25, 2018 -.Dt ETDUMP 8 +.Dd January 18, 2025 +.Dt ETDUMP 1 .Os .Sh NAME .Nm etdump -.Nd Dump El Torito boot catalog information from ISO images +.Nd dump ISO-9660 El Torito boot catalog information .Sh SYNOPSIS .Nm .Op Fl f Ar format .Op Fl o Ar file .Ar .Sh DESCRIPTION -This program reads El Torito boot catalog information from an ISO image and -outputs it in various formats. -It can be used to check the catalog in an image or to output catalog data in -a format that can be used by other tools such as shell scripts. +This program reads El Torito boot catalog information +from an ISO-9660 image and outputs it in various formats. +It can be used to check the catalog in an image or +to output catalog data in a format that can be used by other tools +such as shell scripts. .Pp Supported options are: .Bl -tag -width flag -.It Fl f Ar format Fl -format Ar format +.It Fl f Ar format | Fl -format Ar format Select the output format. Supported output formats are: -.Bl -tag -width shell -offset indent -.It Sy text +.Bl -tag -width indent +.It Cm text Human-readable text (default) -.It Sy shell -Each boot entry is emitted as a string suitable for passing to a sh-compatible -eval command. +.It Cm shell +Each boot entry is emitted as a string +suitable for passing to a sh-compatible eval command. The variables emitted are: -.Bl -tag -width et_platform -offset indent -.It et_platform +.Bl -tag -width "et_platform" +.It Dv et_platform The platform ID from the section header. Set to 'default' for the initial (default) entry. -.It et_system +.It Dv et_system The system ID from the boot entry. -.It et_lba +.It Dv et_lba The starting LBA (2048-byte blocks) of the boot image. -.It et_sectors +.It Dv et_sectors The number of sectors (512-byte sectors) that comprise the boot image. .El .El -.It Fl o Ar file Fl -output Ar file +.It Fl o Ar file | Fl -output Ar file Write output to .Ar file . -If '-' is specified then standard out is used. +If +.Ql - +is specified then standard out is used. .El .Sh EXAMPLES To see what entries are in a given boot catalog run @@ -87,14 +93,16 @@ Section header: efi, final Media type: no emulation .Ed .Pp -To use the output in a shell script a for loop can be used to iterate over the -entries returned using eval: +To use the output in a shell script a for loop can be used +to iterate over the entries returned using eval: .Bd -literal -offset indent for entry in `etdump --format shell bootonly.iso`; do eval $entry echo $et_platform $et_system $et_lba $et_sectors done .Ed +.Sh SEE ALSO +.Xr cd9660 4 .Sh HISTORY The .Nm From nobody Mon Mar 24 01:43:57 2025 X-Original-To: dev-commits-src-all@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 4ZLbSH5RZDz5s6kv; Mon, 24 Mar 2025 01:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLbSF6hYdz3Z3r; Mon, 24 Mar 2025 01:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742780637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ae28Qq924U7aUwam4l339BLM1rXuIJ8NlqEDKFXMBk=; b=xkj2z57rj92vSr3D/yAVo696mFs4Cglda4jQPKB1K4oOFlRJORbw/19YVLku24v8nj4D2s 3zq5VZOO2YYIREtuqHQu+HX5lTde0WVJ9Y5/4LN4wVjyqBWoE/+XVMYbahSAAGeF6sdVw/ LEKtZPWj5t034W9rfrMyNVyTVAKk1rfsmiKDZoBmy/nIy+2u0LqncetixJN3fni0Ept1EL 4If5hFCCguECyKY+qKfkTCnEXWUcEXi2f28wHbGW6pEwqSHmQdz/aU5JbZiTqbwu8y5nxq MkSGGQORrtOAS2ehZvwDdjReR4+UXlG1w8qAt33g4PjzSwQueAr6llrVXJdYSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742780637; a=rsa-sha256; cv=none; b=nhfxzNFZELr4E/HVAsFhLpuykzzlccMNEj4XT+0wosdSxgNOtteGOZUa0jZurHyTYW/TeF H1+ev8l6Ej43D+FXjt54U9dOT74nw760NFLvnAjgQsUiW2z6GQWmPMlHos3a8oS/gvixaY XGx7i90XOJW5iT1bZxI9C0y8WMFfH/1K8sSX24Ni0doaKKhVVmSlauazJ/O6ENbiDcUcvf tCYpRDIBMOREdlVWUEo2DYK8yKCRRvLYIIW9xKl4xIIGgmGWNcgikunhSegex1TFn7E06d sDhjqDjfareNaq1/tKyrTRm4V7btU8wlGLXDYsexhhRA3QJH268eUvRS0w7UHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742780637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8ae28Qq924U7aUwam4l339BLM1rXuIJ8NlqEDKFXMBk=; b=hDHKxX1ZUnsikQMmhkt4HHcfAMFSvM1PiC6Pd0C9TZL7HFaFOh+72WKJUK6cqhnrjpCvF2 a0LoczQGtHK8bDkGatV6PJgK4Yk6yMioJtSZYl5RhIV9scLPxoYdQnOI0zBWqs+9Z+RhYs vHw+GS8HSyQZxGzVOTuMpAOE/kL9FvaQLKROPt3GJPZ4lyhaPki3v4jlxWZmMGViTscID6 65FfAWObvi4TvRmD4fOSPstP/cE+ga0Ak6D6dOr2nZ4rG9avQOqsqzjLPasGRaIj63hKUO YSPjcNOgWxHizrKBWkweHn6SVIk1XGzgH5ZVqsuwbuLxdpYu2y0oqIW/qOFeGA== 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 4ZLbSF6GK8zZkr; Mon, 24 Mar 2025 01:43: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 52O1hvjM094580; Mon, 24 Mar 2025 01:43:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O1hvgI094577; Mon, 24 Mar 2025 01:43:57 GMT (envelope-from git) Date: Mon, 24 Mar 2025 01:43:57 GMT Message-Id: <202503240143.52O1hvgI094577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 69569859a0a4 - stable/13 - ports.7: Update dialog4ports to portconfig List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 69569859a0a4767c4351e52cfe137098bd869715 Auto-Submitted: auto-generated The branch stable/13 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=69569859a0a4767c4351e52cfe137098bd869715 commit 69569859a0a4767c4351e52cfe137098bd869715 Author: Alexander Ziaee AuthorDate: 2025-03-21 16:31:26 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-24 01:42:56 +0000 ports.7: Update dialog4ports to portconfig dialog4ports has been replaced with portconfig for several years. It was marked as deprecated and broken in ports:61e4a788ecab. While here, tag SPDX. MFC after: 3 days Reported by: Community Discord Reviewed by: bapt (previous version), mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49204 (cherry picked from commit 3bf433f141a5c8987f347c6618bab0482063a66c) --- share/man/man7/ports.7 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index d1dfbed3a998..cc53b4c068c5 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1997 David E. O'Brien .\" .\" All rights reserved. @@ -23,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 24, 2023 +.Dd March 21, 2025 .Dt PORTS 7 .Os .Sh NAME @@ -151,7 +153,7 @@ target. Configure .Va OPTIONS for this port using -.Xr dialog4ports 1 . +.Xr portconfig 1 Pq Pa ports/ports-mgmt/portconfig . .It Cm fetch Fetch all of the files needed to build this port from the sites listed in @@ -231,7 +233,7 @@ configured. Configure .Va OPTIONS for this port and all its dependencies using -.Xr dialog4ports 1 . +.Xr portconfig 1 Pq Pa ports/ports-mgmt/portconfig . .It Cm fetch-list Show the list of files to fetch in order to build the port (but not its dependencies). From nobody Mon Mar 24 02:24:44 2025 X-Original-To: dev-commits-src-all@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 4ZLcMJ6xPxz5r93v; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMJ4mDCz49QV; Mon, 24 Mar 2025 02:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSHbk6bG0zNyYFPh4O4rKfAe7nI7aruh0I0WAkNpn+c=; b=FbV73UboD6T+MmgGdbtFVuQXGTDDyH7DYRy8CWVoWSoSRqkf2bUGe3tqBAcAMyPnHtxzRg Zz0RogK3tXuY95qRde1vV7o6JbWQ3fH5ZVl5uvbzb91ojwetIy8IThtcb0ThGuppw3X89N Gs0yXYflJe+eih5L5LM5yUCCf46JAPQDFQJmmOyJNBD+NY/JeDqiAvUP/olX/6hO8vAkr3 1nNmyphdE1HTngIDSOygiNeTcWUNYufsjiZt6Ynh0lNjFMft5ZoUt4p3Y46MFcbU6hWd1/ aU1vQj3/T9gbIdvtiqHdPZcxatqaiDOKNbsl2RYIOSn3NKcIYmNuGFScrhFX8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783084; a=rsa-sha256; cv=none; b=ipk4K1QKQC2oMLZEEtQSJMtKBtb0bormuTDBXpnquC6BFlRU5vE5Ht/5rKBOcc/oa6+YLf j7pPsWHl4DVk1fze6htuJuJv/37cMvJxJAF35esU2wYsCO3/ZNCz3kC4kl4qxYd2QXvCXL tGmTacndGn6X5w24zNFbLLf0jZIy8eCkQ2yqxPlhUK4MUgBJMB7oB0vkT4w7z8PpkBTcg/ 87IN7UsDkXja83l6fEVFl1EuiDMIzCe9CgIYAYrkZ8hcp9zlxz1CWJJ/7k3DxnLdXHZ7wI b2td+UlCIDrERxQW6dfy9o8obqXsWEX6Lqqqykixhpsk8+PvnSvrFy0oK7Y+9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSHbk6bG0zNyYFPh4O4rKfAe7nI7aruh0I0WAkNpn+c=; b=oD+h2hpH50BcK8Xw8kSwh+tGc/Aok+6F3MjiqLuZx74gjafmDcoYdIVvgHYubemmv8l16O illFnO2nbKsRFX9mw8+yfzeTf0LNuDfzUHiabBVXUqPsdlVeXh2FNisVbEV/xqyJJFLfZa tlTqWpdy03SObYHg4CTPzBdacZ2LvAOtiOjxqnLKSfH8cHmRMnt2Vd4eDy+cSCcejMQa0v J+K+aTz6WrkcPfHMAIX62R/Yieb9RmOBuKwQQO4geu8iCpILet1COFvwB7f6ijkE2j3NMo roe0leNhm8+RXbHCbg/gKqm3XC8Ekin91emYm6Q/z4JsQB5sz5scveCuc4dRsA== 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 4ZLcMJ4Mbzzb2P; Mon, 24 Mar 2025 02:24: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 52O2OiY2069589; Mon, 24 Mar 2025 02:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OiOK069586; Mon, 24 Mar 2025 02:24:44 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:44 GMT Message-Id: <202503240224.52O2OiOK069586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6eb7cba469d7 - main - kern/kern_descrip.c: remove unneeded headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6eb7cba469d7cf1beccfb18679d1e0bd4a468341 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6eb7cba469d7cf1beccfb18679d1e0bd4a468341 commit 6eb7cba469d7cf1beccfb18679d1e0bd4a468341 Author: Konstantin Belousov AuthorDate: 2025-03-18 01:50:01 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:13 +0000 kern/kern_descrip.c: remove unneeded headers Namely sys/cdefs.h and sys/param.h, they are guaranteed to be included implicitly. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D49372 --- sys/kern/kern_descrip.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index f87ad1f45143..dcb1f5d921db 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -34,14 +34,11 @@ * SUCH DAMAGE. */ -#include #include "opt_capsicum.h" #include "opt_ddb.h" #include "opt_ktrace.h" -#include #include - #include #include #include From nobody Mon Mar 24 02:24:45 2025 X-Original-To: dev-commits-src-all@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 4ZLcML1S6jz5r9fh; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMK5sc3z4942; Mon, 24 Mar 2025 02:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0U796YsqC6duXYyllyQR68HPqjKvRjKxJCpMVBFXSvs=; b=QudmVG51iuKstHsNIZidCiysqHtpd4D6nacSa1DK3trUWo39LbQQZVtT2x2hQNtcp+lrUy lzZU1tgr9Tkz3vU9vsu4ihBQ8IXapYFtMuO+hEvTNQCTiO1HqYVe9QK/J4xEoqwmVnFQ5o myIZz3QBLMdwTON+54ygNXQjaj+BsEBC3nb0OL6iTB2ULj2W6WHewhg6c58OzndQQqyprW CfwNl/G/sYLtinnJn0UaTBZ5+z8Hs7VsI7QXZllsw+EhMTINSUAuK3aC98kBKtgPyyXOpp hqlxmaopC0qzGqE972+WWOmQI+ZhVpMFsv4HFolYr6P8vCsMOOEnDABvz49jyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783085; a=rsa-sha256; cv=none; b=qsnYpgSrzpCsuBuDS9UX6uNlLfdINez1RahwwjmWZNkmTIaifrGak/JAtZ6PLZUajL4tIC 6TCxkSLIYV05Wml3c3WiSAY1foEgcmgdJOtF7EscLpYNyQOKlWtjSjTxEM3Kae5+oCM6d6 3d32iANTkxr/I+Jx37LyoVPgWvccTpXBNNbf5JkPUu461ls0Cc4aun4xhnib0/E2FJpvei B8Kb8OPy+RuwZtyk8DkqZY+6ewvBdHiMPPYRg8bNdtRysRnF258xmQRk1uu8z7tUWmwG76 cGyo3D/O+puzMK9QFFb9bbqQxiY85EEQVmKY4fSKE6RmKfg7+iyqi7BNBi7ARQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0U796YsqC6duXYyllyQR68HPqjKvRjKxJCpMVBFXSvs=; b=shmT4ihf9izB5zsmp7srEpBr7KEzWxwYsQQh0D1N9QPR7FtnLI6jGdgApxwKPYlsTH33O/ 4s4e1ustejcD3smaz03MJJw/XJz1xLhnu73mllXUdTCk2++MrBfRECZlhVA8Ui7R6xKoVO u2cwDD3TrNR9huLAB5pbi4BQ0d2MrFVIH68yNO+ripE7196KupNdf780eVmihLiVAtfefd PRyMsou9sqCL9zynAW33WiLac4ZLZNgyg6lasgpTepHE1ps09WMG112a1EHiJq/bkQIYtl itIW8YuF+T+5Tf3NzpacFqZqDOFvIJxSEqPaPVEgv7yFgw3DMhydOzDSXjjIkg== 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 4ZLcMK5QVNzb03; Mon, 24 Mar 2025 02:24: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 52O2Oj1N069622; Mon, 24 Mar 2025 02:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2Oj5P069619; Mon, 24 Mar 2025 02:24:45 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:45 GMT Message-Id: <202503240224.52O2Oj5P069619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4b69f1fab66d - main - descriptors: add fget_remote_foreach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4b69f1fab66db4fd3f874e78a457e317cd498d36 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b69f1fab66db4fd3f874e78a457e317cd498d36 commit 4b69f1fab66db4fd3f874e78a457e317cd498d36 Author: Konstantin Belousov AuthorDate: 2025-03-18 02:10:03 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:13 +0000 descriptors: add fget_remote_foreach() Suggested by: markj Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/kern/kern_descrip.c | 41 +++++++++++++++++++++++++++++++++++++++++ sys/sys/file.h | 2 ++ 2 files changed, 43 insertions(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index dcb1f5d921db..9d81c30df328 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2993,6 +2993,47 @@ fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp) return (error); } +int +fget_remote_foreach(struct thread *td, struct proc *p, + int (*fn)(struct proc *, int, struct file *, void *), void *arg) +{ + struct filedesc *fdp; + struct fdescenttbl *fdt; + struct file *fp; + int error, error1, fd, highfd; + + error = 0; + PROC_LOCK(p); + fdp = fdhold(p); + PROC_UNLOCK(p); + if (fdp == NULL) + return (ENOENT); + + FILEDESC_SLOCK(fdp); + if (refcount_load(&fdp->fd_refcnt) != 0) { + fdt = atomic_load_ptr(&fdp->fd_files); + highfd = fdt->fdt_nfiles - 1; + FILEDESC_SUNLOCK(fdp); + } else { + error = ENOENT; + FILEDESC_SUNLOCK(fdp); + goto out; + } + + for (fd = 0; fd <= highfd; fd++) { + error1 = fget_remote(td, p, fd, &fp); + if (error1 != 0) + continue; + error = fn(p, fd, fp, arg); + fdrop(fp, td); + if (error != 0) + break; + } +out: + fddrop(fdp); + return (error); +} + #ifdef CAPABILITIES int fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) diff --git a/sys/sys/file.h b/sys/sys/file.h index bc7dd7e06ded..d0b53196151e 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -267,6 +267,8 @@ int fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, int needfcntl, struct file **fpp); int _fdrop(struct file *fp, struct thread *td); int fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp); +int fget_remote_foreach(struct thread *td, struct proc *p, + int (*fn)(struct proc *, int, struct file *, void *), void *arg); fo_rdwr_t invfo_rdwr; fo_truncate_t invfo_truncate; From nobody Mon Mar 24 02:24:46 2025 X-Original-To: dev-commits-src-all@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 4ZLcMM2Y5dz5r9cl; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcML6Wycz4949; Mon, 24 Mar 2025 02:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0vl2ppfQkYht1PnkwafhSPYJGjT7G8qZJsGy+oH2Mg=; b=D0gmZDEIRATXN7GhE5UU+b+YX5oQTgRFZ8W54AAMlsFPjSEnUXGfg911wCEdRzxmeEsWPR RVOrYEox6SlygPmDNjQlfinR4SJpJsh2Lz5yKRRQ3G2v+a6Te4+dENNj2DS3+Dq66gW2pN OZE7IbQJKeovfzZ4AW/SsffeEs5gb4OczSZAPAkZ4rUNvcPO1l488EgFrnOOByhA3KArnH 7S0l+ZxotKuDN7PFwBsdU1yzzPNG6xyBQleFvjQ+ikPls3u7cnjXjnAE8vvQBxpSR6VBrQ ReZUKYa4qvHqsrjrcURemmvdWthMTFbMl03t2rzVRj4ZfLc/8KRqjIRXuuv3Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783086; a=rsa-sha256; cv=none; b=P0Aq39RJhGhDHn1QzUZeWQ/WuvhtNgHwwh9P7dXol5nDNtYr3UpfWupmiZ2o0mVLrtxEnA om9pgvQFf0QB3jJZVCl+9loRhpEtxlvEJx+ZRZwDlkAfZQIBBbkWaysHotasCofoCjE3HL 0sr6x8Cfd6aQGTTtVeKt2+60xIYcaPVcPDD16MPMo3cF+OK68erE84NuQfThT8qCh8XDIj Csh+Z6M+dTSM6iMh/ZEALQdoSKbnIT+/3rwLlIZG9NLXjTiWDHzCUO0sm4ByRpTbCV3Q67 gLmfCdGFT6VZ/dbJRKcOjFasSCjRjpYp9R7a1SPVM5VwRlOVLz5fM+0jWn4GXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0vl2ppfQkYht1PnkwafhSPYJGjT7G8qZJsGy+oH2Mg=; b=p1sdYAq2DvGZrQ67wc43MCrztLBf3Uhi56SFxzwfbIhZ7Cb6M8gwBoUub9t308FJT1PskS Ggtd8hj1eQIKvfElJ/qUdLAMEFkauLVAenJS+rFQpK+VHxMWRVRLTzg56TLYyOhkD5256/ 8t0mU98NGxiDTEamxy1RrWIX/mgugYSabFTIceqZ1wNnD4LQMdM45veP52mQkGsl3vAQGw NMXlPB6JNAo8q7YPXC5zueMLsNloPHd1UWx2gIgWJGcoj+zAeEzY2qdKToM7yKqOx0w1cV Kc/Z0wya2Y1c5gsTu2ekXW3mQZ1jlfcHxJak8VM978SWRB9i2YgrTi7xcK2UuA== 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 4ZLcML5vsJzbY6; Mon, 24 Mar 2025 02:24: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 52O2OkEu069659; Mon, 24 Mar 2025 02:24:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2Ok3c069656; Mon, 24 Mar 2025 02:24:46 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:46 GMT Message-Id: <202503240224.52O2Ok3c069656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fee6a52e4338 - main - sysctl_kern_proc_kqueue(): convert to use sbuf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fee6a52e433811fde5a9f6be06bb446b5336aba3 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fee6a52e433811fde5a9f6be06bb446b5336aba3 commit fee6a52e433811fde5a9f6be06bb446b5336aba3 Author: Konstantin Belousov AuthorDate: 2025-03-13 22:30:32 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:13 +0000 sysctl_kern_proc_kqueue(): convert to use sbuf Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/kern/kern_event.c | 74 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 14aa3abd1901..b0106b5fa9ce 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -2871,7 +2872,7 @@ knote_status_export(int kn_status) } static int -sysctl_kern_proc_kqueue_report_one(struct proc *p, struct sysctl_req *req, +kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, struct kqueue *kq, struct knote *kn) { struct kinfo_knote kin; @@ -2887,13 +2888,41 @@ sysctl_kern_proc_kqueue_report_one(struct proc *p, struct sysctl_req *req, KQ_UNLOCK_FLUX(kq); if (kn->kn_fop->f_userdump != NULL) (void)kn->kn_fop->f_userdump(p, kn, &kin); - error = SYSCTL_OUT(req, &kin, sizeof(kin)); - maybe_yield(); + error = sbuf_bcat(s, &kin, sizeof(kin)); KQ_LOCK(kq); kn_leave_flux(kn); return (error); } +static int +kern_proc_kqueue_report(struct sbuf *s, struct proc *p, struct kqueue *kq) +{ + struct knote *kn; + int error, i; + + error = 0; + KQ_LOCK(kq); + for (i = 0; i < kq->kq_knlistsize; i++) { + SLIST_FOREACH(kn, &kq->kq_knlist[i], kn_link) { + error = kern_proc_kqueue_report_one(s, p, kq, kn); + if (error != 0) + goto out; + } + } + if (kq->kq_knhashmask == 0) + goto out; + for (i = 0; i <= kq->kq_knhashmask; i++) { + SLIST_FOREACH(kn, &kq->kq_knhash[i], kn_link) { + error = kern_proc_kqueue_report_one(s, p, kq, kn); + if (error != 0) + goto out; + } + } +out: + KQ_UNLOCK_FLUX(kq); + return (error); +} + static int sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) { @@ -2901,8 +2930,8 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) struct proc *p; struct file *fp; struct kqueue *kq; - struct knote *kn; - int error, i, *name; + struct sbuf *s, sm; + int error, error1, *name; name = (int *)arg1; if ((u_int)arg2 != 2) @@ -2928,34 +2957,19 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) goto out2; } - kq = fp->f_data; - if (req->oldptr == NULL) { - error = SYSCTL_OUT(req, NULL, sizeof(struct kinfo_knote) * - kq->kq_knlistsize * 11 / 10); + s = sbuf_new_for_sysctl(&sm, NULL, 0, req); + if (s == NULL) { + error = ENOMEM; goto out2; } + sbuf_clear_flags(s, SBUF_INCLUDENUL); - KQ_LOCK(kq); - for (i = 0; i < kq->kq_knlistsize; i++) { - SLIST_FOREACH(kn, &kq->kq_knlist[i], kn_link) { - error = sysctl_kern_proc_kqueue_report_one(p, req, - kq, kn); - if (error != 0) - goto out3; - } - } - if (kq->kq_knhashmask == 0) - goto out3; - for (i = 0; i <= kq->kq_knhashmask; i++) { - SLIST_FOREACH(kn, &kq->kq_knhash[i], kn_link) { - error = sysctl_kern_proc_kqueue_report_one(p, req, - kq, kn); - if (error != 0) - goto out3; - } - } -out3: - KQ_UNLOCK_FLUX(kq); + kq = fp->f_data; + error = kern_proc_kqueue_report(s, p, kq); + error1 = sbuf_finish(s); + if (error == 0) + error = error1; + sbuf_delete(s); out2: fdrop(fp, td); out1: From nobody Mon Mar 24 02:24:47 2025 X-Original-To: dev-commits-src-all@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 4ZLcMN2sH3z5r9jD; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMN0BKlz49CL; Mon, 24 Mar 2025 02:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBhxYZuj+Cffbfrf2a92JTlkAyltMlGFR1hzruT91CA=; b=eaNSK7BJe22dv+ottAtRpLXkNwYHJ0EZ18alyJTlvUpexWs7RUpSU3Qnc7OSPAPgnOWiWg 4+aqPd+v/W9DeNO77kFY9VIJvBvJyszSruquejI4HP+mdyIHpG6j1nrwg/2mv/R3injUOH F9EXVBIHVNvkXOYIwv7xj3r9HLiw/dz/iCGiGtmDS88zZLQiCs+AHbRCRMN9HiIGirhsVF wdyosKC3fT2snaJyXTR0DMAWCI2OqG2YLXjPS0iYBFapREr8RrY2JkfJCy/bb/ebMafRNb z7XFs8ko/OwqGG5zQo9u5Mh8+QvbH6mqd+1kmYocWVil2yshwm6hq7bgcW1xqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783088; a=rsa-sha256; cv=none; b=sdseusob1WuhBXA5EZfa/VHGriOLb2ogXc7mEUprE/KusfgvR82uT9rz6F2+gwAyRSZ3Am dBFbo1ns45qj0HjXTSsKpTSYKm0MZFXlqVpZKQqJS3cFSrwHIBhVB7Eet7nJAOrU9AkyOb 6Dgq1UZhaI9Qw0SdViP6QLe/ULYFE+dW5ReR3tncKof13HRQmWP+wPRMvU8PLlJRe5Gtb5 fhTmdBCiGC1YPrJyW9IfZ5046Ljlkl17/lc5v1A0M/XWP95mFQzIbe4ctJ5t9nYxIGneVS 0EgRI/H3jv5Mb2amnlr9ki5aj5VhABNetPqX3FM5tb1uaExt62GbwQ5kV1Tr3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QBhxYZuj+Cffbfrf2a92JTlkAyltMlGFR1hzruT91CA=; b=xlba4wozZlFmELU9YaCg7E0ZZcc0Q4iuEzfXZJUdl+lYtaj8skaI410ajwh/MoSCD2WKIa ow/BEVvcAFkWrSQ6mO8MjSC2ZaRo/osujI+pMjPmd8QZDjM02dGHX4mxw0V1ZtRAWlR8f2 olI0va8Z0qDNkvIZCtOLKnWKhWcKefxZ6kSThBXDMFI25ZIEAsTXqqBOS1CcMOLNoD15ou BQdu2fZ7DxyKh1l6OPMVyVv5J7HU5eIu0shXcJzIzVkmm8CTO2KNEnnu294gSlKkerp/yX WgUupXxy1Ozeokg/GBYUC19H7doiD6oilURbwRoJDEBNN9SWfBGr5LnDyxX1NQ== 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 4ZLcMM6tgmzbH2; Mon, 24 Mar 2025 02:24: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 52O2Ol82069692; Mon, 24 Mar 2025 02:24:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OlYr069689; Mon, 24 Mar 2025 02:24:47 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:47 GMT Message-Id: <202503240224.52O2OlYr069689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9d1e7a7e8e8b - main - kinfo_knote: add knt_kq_fd member List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 9d1e7a7e8e8bde5b343226ce0fefc583932d5af3 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9d1e7a7e8e8bde5b343226ce0fefc583932d5af3 commit 9d1e7a7e8e8bde5b343226ce0fefc583932d5af3 Author: Konstantin Belousov AuthorDate: 2025-03-13 23:34:40 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:13 +0000 kinfo_knote: add knt_kq_fd member Note: this breaks kinfo_knote ABI Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/kern/kern_event.c | 19 ++++++++++++------- sys/sys/user.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index b0106b5fa9ce..e9808e3c6e19 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2873,7 +2873,7 @@ knote_status_export(int kn_status) static int kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, - struct kqueue *kq, struct knote *kn) + int kq_fd, struct kqueue *kq, struct knote *kn) { struct kinfo_knote kin; int error; @@ -2882,6 +2882,7 @@ kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, return (0); memset(&kin, 0, sizeof(kin)); + kin.knt_kq_fd = kq_fd; memcpy(&kin.knt_event, &kn->kn_kevent, sizeof(struct kevent)); kin.knt_status = knote_status_export(kn->kn_status); kn_enter_flux(kn); @@ -2895,7 +2896,8 @@ kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, } static int -kern_proc_kqueue_report(struct sbuf *s, struct proc *p, struct kqueue *kq) +kern_proc_kqueue_report(struct sbuf *s, struct proc *p, int kq_fd, + struct kqueue *kq) { struct knote *kn; int error, i; @@ -2904,7 +2906,8 @@ kern_proc_kqueue_report(struct sbuf *s, struct proc *p, struct kqueue *kq) KQ_LOCK(kq); for (i = 0; i < kq->kq_knlistsize; i++) { SLIST_FOREACH(kn, &kq->kq_knlist[i], kn_link) { - error = kern_proc_kqueue_report_one(s, p, kq, kn); + error = kern_proc_kqueue_report_one(s, p, kq_fd, + kq, kn); if (error != 0) goto out; } @@ -2913,7 +2916,8 @@ kern_proc_kqueue_report(struct sbuf *s, struct proc *p, struct kqueue *kq) goto out; for (i = 0; i <= kq->kq_knhashmask; i++) { SLIST_FOREACH(kn, &kq->kq_knhash[i], kn_link) { - error = kern_proc_kqueue_report_one(s, p, kq, kn); + error = kern_proc_kqueue_report_one(s, p, kq_fd, + kq, kn); if (error != 0) goto out; } @@ -2931,7 +2935,7 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) struct file *fp; struct kqueue *kq; struct sbuf *s, sm; - int error, error1, *name; + int error, error1, kq_fd, *name; name = (int *)arg1; if ((u_int)arg2 != 2) @@ -2949,7 +2953,8 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) #endif td = curthread; - error = fget_remote(td, p, name[1] /* kqfd */, &fp); + kq_fd = name[1]; + error = fget_remote(td, p, kq_fd, &fp); if (error != 0) goto out1; if (fp->f_type != DTYPE_KQUEUE) { @@ -2965,7 +2970,7 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) sbuf_clear_flags(s, SBUF_INCLUDENUL); kq = fp->f_data; - error = kern_proc_kqueue_report(s, p, kq); + error = kern_proc_kqueue_report(s, p, kq_fd, kq); error1 = sbuf_finish(s); if (error == 0) error = error1; diff --git a/sys/sys/user.h b/sys/sys/user.h index cf42412af66f..c053441c9e6a 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -677,6 +677,7 @@ struct kinfo_vm_layout { #define KNOTE_EXTDATA_PIPE 2 struct kinfo_knote { + int knt_kq_fd; struct kevent knt_event; int knt_status; int knt_extdata; From nobody Mon Mar 24 02:24:48 2025 X-Original-To: dev-commits-src-all@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 4ZLcMP4gNmz5r9fm; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMP1835z494Q; Mon, 24 Mar 2025 02:24:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1FahKJ6R/nrCM8ve1WnPx2wrbGEZF+xtAwLrZh8PU8=; b=gCtkp+U7BuQy+mSdKEAyzWge3j/RFFKGamHQXctUiHVU+xO6MQK8pxqAODn68JL28jeSbO l2wZYOTdsYsHbHqccsQ7xzpcvkBy8wGCIuvuhe6CieB98vKEsCjoKsQyrnUe13ETnMWJLK eMM+bywq4PmR+WuLzQL+CV2IeMQKA0HNyq1RlNny5ZC30KzxwQuwB2imImASYhBvCQQtuH hlqb1mEi6I1PKiGTU+DHs5WQTlGsNwM+Dc1Jrk1fMdyWDQb6b2lMN2vMOR2h1tIns7fm2L Ai1GtMbperJFklZpHYGEl+NlJLiVLB+AzA6WRF5cfVyBJv7Ow2e7l+aRXxlMnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783089; a=rsa-sha256; cv=none; b=wZFXmnilUbIyrwOEyA74O3iF0cLA8gn9Jn5ulZk7/bhsKyrDYPZObet2CzY0VQX5DvfBZl Z9+e3PCTwu+/BNgcv3Asip4xUeTQrq9y1uSfP8Jff81X879oTqiaB6/VOtALcvz9CsoMRm B4up5jf2fGb21XAI713FzzjjmtNaPtA47rh63fdhgg0dHfO4JsMmShhRuz2gQtbcYcMpLC XUXoCpFOHgEw79rrdWUPm3F3TQKaz/6nykhrn1mOEWuBHPE7RcYkFe6jNRbXGxniAZ8kWg LFBAnaVqSuY36s+ssML0TvDn/ewFc4BVUCd0JknsarO2PKo12+dRudIeerCoog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1FahKJ6R/nrCM8ve1WnPx2wrbGEZF+xtAwLrZh8PU8=; b=Qx0XtFV/FL8ieRAZPAU89UNNJIJX/4bxVupwGGNwIi56E0bma9qlfZRB7IDM/fJW/pjKRf 1fLzdztzcMtHf/Zm1jl+qF+3r1Fd01ekA5hKF8DLA6JDvTEoMN32z1lm4rxqkEvK35Dkmp HTzMQ2w1p9AuXpit94hnSDMCtOxsvSKJCYJ7mT5/THs2sLrAruBNAgBYlwKTPX7ON1/HAi e81XanntO5q4biLbNFMGu5A4oCKrd1JgJ1vlz0UehLa9mQQ3h8SN1ekaSbzfVwQ8RjM3Gy +1T3v2wGoU0BdpKPddESnHVmLycbH0Zo5AtIUdOtDK547hG/PwocHjCm+llpxA== 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 4ZLcMP0Rg3zZt5; Mon, 24 Mar 2025 02:24: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 52O2OnN9069732; Mon, 24 Mar 2025 02:24:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OmoR069729; Mon, 24 Mar 2025 02:24:48 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:48 GMT Message-Id: <202503240224.52O2OmoR069729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6534c17326b2 - main - FREEBSD_COMPAT32: add freebsd32_kevent_to_kevent32() helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6534c17326b27af9d85dd7f4ed5758df0385a57f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6534c17326b27af9d85dd7f4ed5758df0385a57f commit 6534c17326b27af9d85dd7f4ed5758df0385a57f Author: Konstantin Belousov AuthorDate: 2025-03-13 23:03:59 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:13 +0000 FREEBSD_COMPAT32: add freebsd32_kevent_to_kevent32() helper converting struct kevent to struct kevent32 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/compat/freebsd32/freebsd32_misc.c | 59 ++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index e5b2b0feeafd..d54e268f0930 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -679,6 +679,36 @@ freebsd32_pselect(struct thread *td, struct freebsd32_pselect_args *uap) return (error); } +static void +freebsd32_kevent_to_kevent32(const struct kevent *kevp, struct kevent32 *ks32) +{ + uint64_t e; + int j; + + CP(*kevp, *ks32, ident); + CP(*kevp, *ks32, filter); + CP(*kevp, *ks32, flags); + CP(*kevp, *ks32, fflags); +#if BYTE_ORDER == LITTLE_ENDIAN + ks32->data1 = kevp->data; + ks32->data2 = kevp->data >> 32; +#else + ks32->data1 = kevp->data >> 32; + ks32->data2 = kevp->data; +#endif + PTROUT_CP(*kevp, *ks32, udata); + for (j = 0; j < nitems(kevp->ext); j++) { + e = kevp->ext[j]; +#if BYTE_ORDER == LITTLE_ENDIAN + ks32->ext64[2 * j] = e; + ks32->ext64[2 * j + 1] = e >> 32; +#else + ks32->ext64[2 * j] = e >> 32; + ks32->ext64[2 * j + 1] = e; +#endif + } +} + /* * Copy 'count' items into the destination list pointed to by uap->eventlist. */ @@ -687,36 +717,13 @@ freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count) { struct freebsd32_kevent_args *uap; struct kevent32 ks32[KQ_NEVENTS]; - uint64_t e; - int i, j, error; + int i, error; KASSERT(count <= KQ_NEVENTS, ("count (%d) > KQ_NEVENTS", count)); uap = (struct freebsd32_kevent_args *)arg; - for (i = 0; i < count; i++) { - CP(kevp[i], ks32[i], ident); - CP(kevp[i], ks32[i], filter); - CP(kevp[i], ks32[i], flags); - CP(kevp[i], ks32[i], fflags); -#if BYTE_ORDER == LITTLE_ENDIAN - ks32[i].data1 = kevp[i].data; - ks32[i].data2 = kevp[i].data >> 32; -#else - ks32[i].data1 = kevp[i].data >> 32; - ks32[i].data2 = kevp[i].data; -#endif - PTROUT_CP(kevp[i], ks32[i], udata); - for (j = 0; j < nitems(kevp->ext); j++) { - e = kevp[i].ext[j]; -#if BYTE_ORDER == LITTLE_ENDIAN - ks32[i].ext64[2 * j] = e; - ks32[i].ext64[2 * j + 1] = e >> 32; -#else - ks32[i].ext64[2 * j] = e >> 32; - ks32[i].ext64[2 * j + 1] = e; -#endif - } - } + for (i = 0; i < count; i++) + freebsd32_kevent_to_kevent32(&kevp[i], &ks32[i]); error = copyout(ks32, uap->eventlist, count * sizeof *ks32); if (error == 0) uap->eventlist += count; From nobody Mon Mar 24 02:24:50 2025 X-Original-To: dev-commits-src-all@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 4ZLcMR2K6Yz5r9ln; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMQ3VCyz49RM; Mon, 24 Mar 2025 02:24:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DA2PDS3vSYSfQCEavgVzUROPPxLX9xF/bWBxGK8g48c=; b=jVTEsymjmcqMfkwGVS1JxbZfXfFOwbdzmYgLJ2g95A+O+UxpHy4eHcngaLeSv4Ve20RWhP EhMSfJScul20Qs21M4+myk76Ga+CkiVD8/AGsJJkt4aphS83L11b9mGBSw7BJISH/SipPN o+hPg69u9H9C59K3yWt2Ln7qDqE8shRYD8BUGuvGbBsUXsweng727FJzXdeM51E6xDngqm 6kKZe7b7lJPl0HFrRAaoy5cPEcNGZYZ2pFJFYz8NAfFiSdyM325hsAe9LKSmcA98uD/bh6 qrAvx5TK3XzKT2SiVYL0duav2sXRSLKLes6RZpFnPBGw+l6eaaGTrcYaCL7X1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783090; a=rsa-sha256; cv=none; b=QZXTmxyZS2xwykn2377bhIqKe4Sq2M1FdFU4St6VVhvUvX75u9MPRYz/EPhdM1yHpDrHXy M8O74IU9U//t1Ff9D5gnygEzips0khGHtT2lAvfCpjKxHeCHTs0y1TqWZtbfmz3UMlxQTx fEgad7RHnCmZRYyBnNfUrIoC3jz/WNf/mrlGhJFWRldzYQzaVYnFrRIqn5N5bH3zNjivDk L3itTgKpMRIs31JGDNZpEKCBPZRjPPJRsBuRXTHJqV4nE0MTrVaR7QKC4pleA5HmSKZJOD WJuHYmmMR5o2TjjRKKf0WGJ1Gl3ahPnl+MRREVEAXjNKpr1kRcmPEv4yeQvLhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DA2PDS3vSYSfQCEavgVzUROPPxLX9xF/bWBxGK8g48c=; b=YqnJr0Cr1oQWSpmpoKEWZ+x696QigFfGw9RBXTO6ADQ2aGnyMRMm7l66qQJR9E+alF1TQI m1Isslzw3Il5bZAl0TqYC33cTl2T9uuLX7LtruhJnUMKHUxKJntrz4nwU6/aFBr4rQ/E4j QLhQj3xvVOc12C8hb02catL9Y/7PRRhJ/7W0T0uz1UJnZGjau8aDfKJCEHxClPbWd4skRV ZVEUo8YzKBqJWEr+3BdSy6D3jViBTs27VFSXbVJmFy/00+hiOTkOwHG3bzdOjXDZFUALvK l1REml2uhHeouOtqErjbKC1hJCVUs+apebCbCHmCQ5l0js6afBJ3IBYpz2+Pfg== 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 4ZLcMQ1DjwzbH3; Mon, 24 Mar 2025 02:24: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 52O2Ooos069767; Mon, 24 Mar 2025 02:24:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OogU069764; Mon, 24 Mar 2025 02:24:50 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:50 GMT Message-Id: <202503240224.52O2OogU069764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fa8fdd80dff9 - main - sysctl KERN_PROC_KQUEUE: implement compat32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fa8fdd80dff94dc848b449282080a5d85a3e6012 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fa8fdd80dff94dc848b449282080a5d85a3e6012 commit fa8fdd80dff94dc848b449282080a5d85a3e6012 Author: Konstantin Belousov AuthorDate: 2025-03-13 23:05:21 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 sysctl KERN_PROC_KQUEUE: implement compat32 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/compat/freebsd32/freebsd32.h | 18 +++++++++++++ sys/compat/freebsd32/freebsd32_misc.c | 50 +++++++++++++++++++++++++++++++++++ sys/compat/freebsd32/freebsd32_util.h | 5 ++++ sys/kern/kern_event.c | 38 +++++++++++++++++--------- 4 files changed, 98 insertions(+), 13 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 3dbf1b5a876d..2db154a8155c 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -446,6 +446,24 @@ struct kinfo_vm_layout32 { uint32_t kvm_spare[12]; }; +struct kinfo_knote32 { + int knt_kq_fd; + struct kevent32 knt_event; + int knt_status; + int knt_extdata; + union { + struct { + int knt_vnode_type; + uint32_t knt_vnode_fsid[2]; + uint32_t knt_vnode_fileid[2]; + char knt_vnode_fullpath[PATH_MAX]; + } knt_vnode; + struct { + uint32_t knt_pipe_ino[2]; + } knt_pipe; + }; +}; + struct kld_file_stat_1_32 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index d54e268f0930..e10f5782c10f 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -709,6 +709,56 @@ freebsd32_kevent_to_kevent32(const struct kevent *kevp, struct kevent32 *ks32) } } +void +freebsd32_kinfo_knote_to_32(const struct kinfo_knote *kin, + struct kinfo_knote32 *kin32) +{ + memset(kin32, 0, sizeof(*kin32)); + CP(*kin, *kin32, knt_kq_fd); + freebsd32_kevent_to_kevent32(&kin->knt_event, &kin32->knt_event); + CP(*kin, *kin32, knt_status); + CP(*kin, *kin32, knt_extdata); + switch (kin->knt_extdata) { + case KNOTE_EXTDATA_NONE: + break; + case KNOTE_EXTDATA_VNODE: + CP(*kin, *kin32, knt_vnode.knt_vnode_type); +#if BYTE_ORDER == LITTLE_ENDIAN + kin32->knt_vnode.knt_vnode_fsid[0] = kin->knt_vnode. + knt_vnode_fsid; + kin32->knt_vnode.knt_vnode_fsid[1] = kin->knt_vnode. + knt_vnode_fsid >> 32; + kin32->knt_vnode.knt_vnode_fileid[0] = kin->knt_vnode. + knt_vnode_fileid; + kin32->knt_vnode.knt_vnode_fileid[1] = kin->knt_vnode. + knt_vnode_fileid >> 32; +#else + kin32->knt_vnode.knt_vnode_fsid[1] = kin->knt_vnode. + knt_vnode_fsid; + kin32->knt_vnode.knt_vnode_fsid[0] = kin->knt_vnode. + knt_vnode_fsid >> 32; + kin32->knt_vnode.knt_vnode_fileid[1] = kin->knt_vnode. + knt_vnode_fileid; + kin32->knt_vnode.knt_vnode_fileid[0] = kin->knt_vnode. + knt_vnode_fileid >> 32; +#endif + memcpy(kin32->knt_vnode.knt_vnode_fullpath, + kin->knt_vnode.knt_vnode_fullpath, PATH_MAX); + break; + case KNOTE_EXTDATA_PIPE: +#if BYTE_ORDER == LITTLE_ENDIAN + kin32->knt_pipe.knt_pipe_ino[0] = kin->knt_pipe.knt_pipe_ino; + kin32->knt_pipe.knt_pipe_ino[1] = kin->knt_pipe. + knt_pipe_ino >> 32; +#else + kin32->knt_pipe.knt_pipe_ino[1] = kin->knt_pipe.knt_pipe_ino; + kin32->knt_pipe.knt_pipe_ino[0] = kin->knt_pipe. + knt_pipe_ino >> 32; +#endif + break; + } +} + /* * Copy 'count' items into the destination list pointed to by uap->eventlist. */ diff --git a/sys/compat/freebsd32/freebsd32_util.h b/sys/compat/freebsd32/freebsd32_util.h index dca61da714f0..4ac314f4391e 100644 --- a/sys/compat/freebsd32/freebsd32_util.h +++ b/sys/compat/freebsd32/freebsd32_util.h @@ -122,6 +122,11 @@ struct image_args; int freebsd32_exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, uint32_t *argv, uint32_t *envv); +struct kinfo_knote; +struct kinfo_knote32; +void freebsd32_kinfo_knote_to_32(const struct kinfo_knote *kin, + struct kinfo_knote32 *kin32); + extern int compat_freebsd_32bit; #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index e9808e3c6e19..c7260f6bb267 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -75,6 +75,10 @@ #include #endif #include +#ifdef COMPAT_FREEBSD32 +#include +#include +#endif #include @@ -2873,9 +2877,12 @@ knote_status_export(int kn_status) static int kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, - int kq_fd, struct kqueue *kq, struct knote *kn) + int kq_fd, struct kqueue *kq, struct knote *kn, bool compat32 __unused) { struct kinfo_knote kin; +#ifdef COMPAT_FREEBSD32 + struct kinfo_knote32 kin32; +#endif int error; if (kn->kn_status == KN_MARKER) @@ -2889,7 +2896,13 @@ kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, KQ_UNLOCK_FLUX(kq); if (kn->kn_fop->f_userdump != NULL) (void)kn->kn_fop->f_userdump(p, kn, &kin); - error = sbuf_bcat(s, &kin, sizeof(kin)); +#ifdef COMPAT_FREEBSD32 + if (compat32) { + freebsd32_kinfo_knote_to_32(&kin, &kin32); + error = sbuf_bcat(s, &kin32, sizeof(kin32)); + } else +#endif + error = sbuf_bcat(s, &kin, sizeof(kin)); KQ_LOCK(kq); kn_leave_flux(kn); return (error); @@ -2897,7 +2910,7 @@ kern_proc_kqueue_report_one(struct sbuf *s, struct proc *p, static int kern_proc_kqueue_report(struct sbuf *s, struct proc *p, int kq_fd, - struct kqueue *kq) + struct kqueue *kq, bool compat32) { struct knote *kn; int error, i; @@ -2907,7 +2920,7 @@ kern_proc_kqueue_report(struct sbuf *s, struct proc *p, int kq_fd, for (i = 0; i < kq->kq_knlistsize; i++) { SLIST_FOREACH(kn, &kq->kq_knlist[i], kn_link) { error = kern_proc_kqueue_report_one(s, p, kq_fd, - kq, kn); + kq, kn, compat32); if (error != 0) goto out; } @@ -2917,7 +2930,7 @@ kern_proc_kqueue_report(struct sbuf *s, struct proc *p, int kq_fd, for (i = 0; i <= kq->kq_knhashmask; i++) { SLIST_FOREACH(kn, &kq->kq_knhash[i], kn_link) { error = kern_proc_kqueue_report_one(s, p, kq_fd, - kq, kn); + kq, kn, compat32); if (error != 0) goto out; } @@ -2936,6 +2949,7 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) struct kqueue *kq; struct sbuf *s, sm; int error, error1, kq_fd, *name; + bool compat32; name = (int *)arg1; if ((u_int)arg2 != 2) @@ -2944,13 +2958,6 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) error = pget((pid_t)name[0], PGET_HOLD | PGET_CANDEBUG, &p); if (error != 0) return (error); -#ifdef COMPAT_FREEBSD32 - if (SV_CURPROC_FLAG(SV_ILP32)) { - /* XXXKIB */ - error = EOPNOTSUPP; - goto out1; - } -#endif td = curthread; kq_fd = name[1]; @@ -2968,9 +2975,14 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) goto out2; } sbuf_clear_flags(s, SBUF_INCLUDENUL); +#ifdef FREEBSD_COMPAT32 + compat32 = SV_CURPROC_FLAG(SV_ILP32); +#else + compat32 = false; +#endif kq = fp->f_data; - error = kern_proc_kqueue_report(s, p, kq_fd, kq); + error = kern_proc_kqueue_report(s, p, kq_fd, kq, compat32); error1 = sbuf_finish(s); if (error == 0) error = error1; From nobody Mon Mar 24 02:24:51 2025 X-Original-To: dev-commits-src-all@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 4ZLcMR5VtKz5r9pB; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMR3VTbz49RY; Mon, 24 Mar 2025 02:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rkc7nJIiJgpO+PLbzJGn5+2OSVA2hfdqlFj2y0HT0S8=; b=RpiGvDUaEmeENkyTV5xcbYdDybLkKcVp1+9ekghm706jQeld7PqSEYrl+yJEU3VDa4FMog XuTi+DTWsvDvlxwKU9DH3mcZc/IA6S+ehTekd556mitqHVy4Nno6b6DwwjjdRZDq3QzVte Bi2DdyzfI9xVH2XpMY8wV0RfrlrRSoho1+gTChIAsgX5nEoZr6Y+gXAfY69a6O6eoNMHPk uduvq+yvMAk3pKLt/eh1j5PBZk303ncFPJplaV5X7SfbSPBTe9GyyIof2OA62raTBqFkFE 6xnWFvnaGGCU3rMbC6J1eR/ITWebo0iRqS9dsgEgWaCrUNNOdq+O5BGK1t+ECg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783091; a=rsa-sha256; cv=none; b=QgCPWm+0ZX7MRCfSS8/pm0p4EbnSiwK5hz3Vw5Uj8j63m9bDwObto+Lt0kKvTX6+/7BiHM 1IshzPaDqdy3Yp5sHj64SEwWEVaIO1Tvuc4ZMuaJiOMgjewkE3q3b3v48ce8BhIDlWZkfH tpVFfH36CelnOnzENEoB3wKp79TOSt1IYlKptfUolP/NpUpzGxVqUfVbTLjRVIp8JExpok pHCaWlu4+y18JkjOnvalx8kuk7nPkketjjpK1guKdh7o6+VTVfmDHBzxMopgyWAT7VVjhQ El4H3/n5qJDI7TCSRNHZcp4rm/wrguVcz6TT9A1ZXnxNdoYBdMkldNVsJqR3aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rkc7nJIiJgpO+PLbzJGn5+2OSVA2hfdqlFj2y0HT0S8=; b=lIdCI9TEVXy43DrGQwfamhYQw843nirXVkXSu5HSAgvW4SYPPzvEfQHV5dywLEAG0IGBgT X9vnm/9KmG8Bc2LwdhhKmfwsZIoaoIEwdlg4O1o0mB+eq33P6d9s3YdvSiQndRIhtQk/R5 ql+bjxGH1jAZ2JKgeXrw8xzYzj9IN8nHdapffJfZgvc+fa/9cT+3bGm8xXy5s5rK7UKV9w ieqt9RbQoDr3H5IAN1T7iHf0iB5FxMzvHuz1ijegkQs++jgaDklVUu2aHBuF+G0rNzyWXd Vn5QfZmS2bBDyUBgr1kv55Ug32iRLin9kU8onFGxUAgkAOK8mS7UlDE7aMgRCA== 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 4ZLcMR2mcBzbY7; Mon, 24 Mar 2025 02:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52O2OpCG069802; Mon, 24 Mar 2025 02:24:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OpTG069799; Mon, 24 Mar 2025 02:24:51 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:51 GMT Message-Id: <202503240224.52O2OpTG069799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5e7c43ff02dc - main - Add NT_PROCSTAT_KQUEUES core note List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5e7c43ff02dc0ec246582af24d3f4d03d5d55bf4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5e7c43ff02dc0ec246582af24d3f4d03d5d55bf4 commit 5e7c43ff02dc0ec246582af24d3f4d03d5d55bf4 Author: Konstantin Belousov AuthorDate: 2025-03-13 22:31:25 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 Add NT_PROCSTAT_KQUEUES core note Suggested by: jhb Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/kern/imgact_elf.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ sys/kern/kern_event.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/elf_common.h | 1 + sys/sys/user.h | 2 ++ 4 files changed, 101 insertions(+) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index fc074ad74e6b..1a2c0e2ef93d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1574,6 +1574,7 @@ static void __elfN(note_threadmd)(void *, struct sbuf *, size_t *); static void __elfN(note_procstat_auxv)(void *, struct sbuf *, size_t *); static void __elfN(note_procstat_proc)(void *, struct sbuf *, size_t *); static void __elfN(note_procstat_psstrings)(void *, struct sbuf *, size_t *); +static void __elfN(note_procstat_kqueues)(void *, struct sbuf *, size_t *); static void note_procstat_files(void *, struct sbuf *, size_t *); static void note_procstat_groups(void *, struct sbuf *, size_t *); static void note_procstat_osrel(void *, struct sbuf *, size_t *); @@ -1899,6 +1900,8 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, __elfN(note_procstat_psstrings), p); size += __elfN(register_note)(td, list, NT_PROCSTAT_AUXV, __elfN(note_procstat_auxv), p); + size += __elfN(register_note)(td, list, NT_PROCSTAT_KQUEUES, + __elfN(note_procstat_kqueues), p); *sizep = size; } @@ -2719,6 +2722,54 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) } } +static void +__elfN(note_procstat_kqueues)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct proc *p; + size_t size, sect_sz, i; + ssize_t start_len, sect_len; + int structsize; + bool compat32; + +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 + compat32 = true; + structsize = sizeof(struct kinfo_knote32); +#else + compat32 = false; + structsize = sizeof(struct kinfo_knote); +#endif + p = arg; + if (sb == NULL) { + size = 0; + sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); + sbuf_set_drain(sb, sbuf_count_drain, &size); + sbuf_bcat(sb, &structsize, sizeof(structsize)); + kern_proc_kqueues_out(p, sb, -1, compat32); + sbuf_finish(sb); + sbuf_delete(sb); + *sizep = size; + } else { + sbuf_start_section(sb, &start_len); + + sbuf_bcat(sb, &structsize, sizeof(structsize)); + kern_proc_kqueues_out(p, sb, *sizep - sizeof(structsize), + compat32); + + sect_len = sbuf_end_section(sb, start_len, 0, 0); + if (sect_len < 0) + return; + sect_sz = sect_len; + + KASSERT(sect_sz <= *sizep, + ("kern_proc_kqueue_out did not respect maxlen; " + "requested %zu, got %zu", *sizep - sizeof(structsize), + sect_sz - sizeof(structsize))); + + for (i = 0; i < *sizep - sect_sz && sb->s_error == 0; i++) + sbuf_putc(sb, 0); + } +} + #define MAX_NOTES_LOOP 4096 bool __elfN(parse_notes)(const struct image_params *imgp, const Elf_Note *checknote, diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index c7260f6bb267..8188323bdbc9 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2940,6 +2940,53 @@ out: return (error); } +struct kern_proc_kqueues_out1_cb_args { + struct sbuf *s; + bool compat32; +}; + +static int +kern_proc_kqueues_out1_cb(struct proc *p, int fd, struct file *fp, void *arg) +{ + struct kqueue *kq; + struct kern_proc_kqueues_out1_cb_args *a; + + if (fp->f_type != DTYPE_KQUEUE) + return (0); + a = arg; + kq = fp->f_data; + return (kern_proc_kqueue_report(a->s, p, fd, kq, a->compat32)); +} + +static int +kern_proc_kqueues_out1(struct thread *td, struct proc *p, struct sbuf *s, + bool compat32) +{ + struct kern_proc_kqueues_out1_cb_args a; + + MPASS(p == curproc); + + a.s = s; + a.compat32 = compat32; + return (fget_remote_foreach(td, p, kern_proc_kqueues_out1_cb, &a)); +} + +int +kern_proc_kqueues_out(struct proc *p, struct sbuf *sb, size_t maxlen, + bool compat32) +{ + struct sbuf *s, sm; + int error; + + s = sbuf_new(&sm, NULL, maxlen, SBUF_FIXEDLEN); + error = kern_proc_kqueues_out1(curthread, p, s, compat32); + sbuf_finish(s); + if (error == 0) + sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen)); + sbuf_delete(s); + return (error); +} + static int sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) { diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 766ff6ede51b..488aaaf25ab1 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -840,6 +840,7 @@ typedef struct { #define NT_PROCSTAT_PSSTRINGS 15 /* Procstat ps_strings data. */ #define NT_PROCSTAT_AUXV 16 /* Procstat auxv data. */ #define NT_PTLWPINFO 17 /* Thread ptrace miscellaneous info. */ +#define NT_PROCSTAT_KQUEUES 18 /* Procstat kqueues events. */ #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ #define NT_X86_SEGBASES 0x200 /* x86 FS/GS base addresses. */ diff --git a/sys/sys/user.h b/sys/sys/user.h index c053441c9e6a..8396f827e9ed 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -721,6 +721,8 @@ int kern_proc_cwd_out(struct proc *p, struct sbuf *sb, ssize_t maxlen); int kern_proc_out(struct proc *p, struct sbuf *sb, int flags); int kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags); +int kern_proc_kqueues_out(struct proc *p, struct sbuf *s, size_t maxlen, + bool compat32); int vntype_to_kinfo(int vtype); void pack_kinfo(struct kinfo_file *kif); From nobody Mon Mar 24 02:24:52 2025 X-Original-To: dev-commits-src-all@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 4ZLcMS5bTFz5r9jP; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMS3yW9z49fg; Mon, 24 Mar 2025 02:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4OMdTJQZpxdHviryQ6CKoz1J0cqmK74Oj8BbOX2Jblk=; b=fc7vVYQt8y9kbS07soNsJ3lgfZ3yt8SL1Zl6ceIO+jo55k9xyQhcMsj7c8cV1E+bKFslIU /ihRE4VBTjm0NJzWtHL4zQrQ9Mv1Xaq1zd0P02G1AkO6tm5wZr979nv0dqO4c+kui+qDP/ pbTIhFigJJhFixeUvqCE9kkG6XdEUKDHnf/QfaIyC+miLN6jpILnvyBDTSaFKQ4+fMAjOG 6Ndy0jD07oWugSt/2R4SdlSEoogebKFSwnBKMZMVwvneKVHJ6IMxJCBA+udkqU5Jdi53/F wSt0jY1Xxq4i9mDSuBZLMcAEzKqkLVLInLlxZS+HdbtTwl2HxRUjXObCMopeQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783092; a=rsa-sha256; cv=none; b=LjmdFy+dGuEdArqL+MFBPYrqzWuUkk7cCsqlcorkb48Yny8tKHRtnhEaIKsLIsfc8liH7m AIvRG1nYHsLJ1dxQzL4SPU4cNzgiqUhrc/hz5QJ2fhoZpxY68S5aUuWtvNh/NU/JU05gzB AiQtiGwPN/+kdeEhLTpPfLRGtV7HjrX+vLlRwNrBdLXivBsbrHKeB3i4FWEzawdyjtsK+R +otwtQw8Ne1BeNLZ4SQ9CGekbRNH0XpNsoIFtir5r9mD5Rj8HwthaqayGDRBzQ7g0okHXE vQT75W01uWAVIsc0y0wbeB4JvLRhNm0jQYziSauhftyfOfiU6/gexEm3XTS9rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4OMdTJQZpxdHviryQ6CKoz1J0cqmK74Oj8BbOX2Jblk=; b=kga23RqgZsVGz8MhVcpvPdaoB9Le4hWYlZE3XtPBEhNrIPKt4uBbB33pQJhVKjupJI7Knh z/izQpE006nV+jaamko5TkjAnvBaPYNv/Pkh10LaqcWdt/yRVXqGhoq30Yex6BWyTzqSAa MxoWpw9BEhBXUlbW+rJUpOHj25+xGZYJbYxyf5I3KWEQoWUOKrl3EJyoMiZzqbNOyCSBzH m5ACwMM1ngMYMh+Awu+zR51dQqG170Oe1LatlG+yhz2dtsxuPKTGapdTHaFMKWGlFjV2/M vBK8ouXU/VJ2sA4Kul9I9QJDpY9dtiTFejZ87K5fR43Xk7chTJkPC4RtfPCDoQ== 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 4ZLcMS3TlJzbH4; Mon, 24 Mar 2025 02:24: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 52O2Oqpp069837; Mon, 24 Mar 2025 02:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2Oq4U069834; Mon, 24 Mar 2025 02:24:52 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:52 GMT Message-Id: <202503240224.52O2Oq4U069834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ab9b296498fe - main - sysctl KERN_PROC_KQUEUE: treat omitted kqfd as request to dump all kqueues List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ab9b296498fe5809bbb905c320d46e700c267164 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ab9b296498fe5809bbb905c320d46e700c267164 commit ab9b296498fe5809bbb905c320d46e700c267164 Author: Konstantin Belousov AuthorDate: 2025-03-15 01:50:46 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 sysctl KERN_PROC_KQUEUE: treat omitted kqfd as request to dump all kqueues Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- sys/kern/kern_event.c | 64 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 8188323bdbc9..e891cb7c094a 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2964,8 +2964,6 @@ kern_proc_kqueues_out1(struct thread *td, struct proc *p, struct sbuf *s, { struct kern_proc_kqueues_out1_cb_args a; - MPASS(p == curproc); - a.s = s; a.compat32 = compat32; return (fget_remote_foreach(td, p, kern_proc_kqueues_out1_cb, &a)); @@ -2987,19 +2985,39 @@ kern_proc_kqueues_out(struct proc *p, struct sbuf *sb, size_t maxlen, return (error); } +static int +sysctl_kern_proc_kqueue_one(struct thread *td, struct sbuf *s, struct proc *p, + int kq_fd, bool compat32) +{ + struct file *fp; + struct kqueue *kq; + int error; + + error = fget_remote(td, p, kq_fd, &fp); + if (error == 0) { + if (fp->f_type != DTYPE_KQUEUE) { + error = EINVAL; + } else { + kq = fp->f_data; + error = kern_proc_kqueue_report(s, p, kq_fd, kq, + compat32); + } + fdrop(fp, td); + } + return (error); +} + static int sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) { struct thread *td; struct proc *p; - struct file *fp; - struct kqueue *kq; struct sbuf *s, sm; - int error, error1, kq_fd, *name; + int error, error1, *name; bool compat32; name = (int *)arg1; - if ((u_int)arg2 != 2) + if ((u_int)arg2 > 2 || (u_int)arg2 == 0) return (EINVAL); error = pget((pid_t)name[0], PGET_HOLD | PGET_CANDEBUG, &p); @@ -3007,36 +3025,32 @@ sysctl_kern_proc_kqueue(SYSCTL_HANDLER_ARGS) return (error); td = curthread; - kq_fd = name[1]; - error = fget_remote(td, p, kq_fd, &fp); - if (error != 0) - goto out1; - if (fp->f_type != DTYPE_KQUEUE) { - error = EINVAL; - goto out2; - } +#ifdef FREEBSD_COMPAT32 + compat32 = SV_CURPROC_FLAG(SV_ILP32); +#else + compat32 = false; +#endif s = sbuf_new_for_sysctl(&sm, NULL, 0, req); if (s == NULL) { error = ENOMEM; - goto out2; + goto out; } sbuf_clear_flags(s, SBUF_INCLUDENUL); -#ifdef FREEBSD_COMPAT32 - compat32 = SV_CURPROC_FLAG(SV_ILP32); -#else - compat32 = false; -#endif - kq = fp->f_data; - error = kern_proc_kqueue_report(s, p, kq_fd, kq, compat32); + if ((u_int)arg2 == 1) { + error = kern_proc_kqueues_out1(td, p, s, compat32); + } else { + error = sysctl_kern_proc_kqueue_one(td, s, p, + name[1] /* kq_fd */, compat32); + } + error1 = sbuf_finish(s); if (error == 0) error = error1; sbuf_delete(s); -out2: - fdrop(fp, td); -out1: + +out: PRELE(p); return (error); } From nobody Mon Mar 24 02:24:53 2025 X-Original-To: dev-commits-src-all@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 4ZLcMV1lV5z5r9g4; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMT50VYz49SB; Mon, 24 Mar 2025 02:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OC8RjJgx2opSJyJziw4mQs25e39Y/Utg5wiA1JAv31w=; b=k8OAUhb25e2FNvGHznb7hwn30jT54lqh28asOxxAaEZMfWmeErRD2BCvC7aCRm56uD8A1a Xr1OFEJi6CU3zIPGAAd4CWn23FpiKlq5oAiCZVyKCkh09fMdloYZ2HXLseIzxHBYWVHWBT NAGvUNaQO0ZTtr0sBI7DwrfzUKjkHuQ450dNfdoqORUtA+j+fj+ZwjMoxErXwwglMf0N26 30HYFs01beUZRgb32SkOyCXi0HmM26rYvGMjaxaaGbMSRnU/kNleAv6OYX7+qbhfhIpXaF Uxmr18aD5Wsst+/tTHBMvwWxKm20mUyvkkl4t4pjTVXC71ntPCBCMM+Nv0qc0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783093; a=rsa-sha256; cv=none; b=OL8jYpBBZEtkehmv9phoi4lRNOeJ8KyHZC685GrE6dtcG6GgJ6ibqfow8TkevORQNV6+EP 18Rv4+rrYnyYl/ZASu+1oiJZUYghhj7lC/VRm4i08oU8d+09vZ5lN364Jivq8wCYm35qDX g76wObJWujQeYmjRz7VcMf6L0jfMmrfhChhqbIob1jPkyq9RO/Ay5nJh1uQGJGxidVfGI7 Z6+EEFnjqUdDKQ1tfkwdD5BZL92xUl9iNVx2WwR5wr1TE8965BX0uysQ/G9zOsGhBJfkw+ BN6nXW91roJvr4wsRgP3XMy0a8+vHzRdbhzFoqsNWLibOfpskLNKCo+3FKWuhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OC8RjJgx2opSJyJziw4mQs25e39Y/Utg5wiA1JAv31w=; b=bvkdVY7w6kGiCCP/VyQsAImRR46YqlNd3z8oerwr1jwDt/RGjeH/ZHTEOsnB4M2/ug+W3G GjTfSPtA/+HjHiXEYkhNicPVNewy5J9C9wyZAhCY8BKF2zw/15DZVmMn5v1NzmZjzo8Oz5 VRhZxmhIE31ACDGsHA9YSMsClOFzHHxVlv/blZz7PuL0QyoGUZph3bk1BcywiZckcCZ2re aVd8vSJEkuso47779u8CoqHugkuBAoq5SI9jIYmZJYPbbMZpDRvBsX88mdNpprafll/XxR a9O7gO/Js+oLNHNwhN1hwVjTzH1+PEfUckn+ImzjLv7+ABIIhIs+J/X4Q1FRQw== 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 4ZLcMT4Yrlzb2Q; Mon, 24 Mar 2025 02:24: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 52O2Orpb069872; Mon, 24 Mar 2025 02:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2Or66069869; Mon, 24 Mar 2025 02:24:53 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:53 GMT Message-Id: <202503240224.52O2Or66069869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fe8ece34b446 - main - struct kinfo_knote: add spare fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fe8ece34b446e92218a283ce5a7754784b6c53c1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fe8ece34b446e92218a283ce5a7754784b6c53c1 commit fe8ece34b446e92218a283ce5a7754784b6c53c1 Author: Konstantin Belousov AuthorDate: 2025-03-15 14:49:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 struct kinfo_knote: add spare fields This is yet another ABI breakage, hopefully the last. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Diffferential revision: https://reviews.freebsd.org/D49372 --- sys/compat/freebsd32/freebsd32.h | 1 + sys/sys/user.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 2db154a8155c..c3234141d5a9 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -451,6 +451,7 @@ struct kinfo_knote32 { struct kevent32 knt_event; int knt_status; int knt_extdata; + uint32_t knt_spare0[8]; union { struct { int knt_vnode_type; diff --git a/sys/sys/user.h b/sys/sys/user.h index 8396f827e9ed..0c443672a3b1 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -681,6 +681,7 @@ struct kinfo_knote { struct kevent knt_event; int knt_status; int knt_extdata; + uint64_t knt_spare0[4]; union { struct { int knt_vnode_type; From nobody Mon Mar 24 02:24:54 2025 X-Original-To: dev-commits-src-all@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 4ZLcMW3G1Zz5r9jV; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMV65Rjz49ZS; Mon, 24 Mar 2025 02:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxdQLlV0ng1jjzb2jzR9W370MbRxLArpC9gsI8eujjw=; b=rQNx6qRBuI26Z4l2WlNM7PU1VVPamDL+iz0r4tRj6zXW4pqXrrpUptxG8LKxykDfou3DKe b3kRpyeSKzRoZOKeuFZDmbhs1XMeJwe4gs9I0Wu2wfXU/gO+YP5bh9SdNTj+lvBdYoY7wo wrEIK7u1BqiCUkfrajOA3/SgzMIXAQVCnYOxNfl8Rc+U0uuAPQ45zzM1ersJUOtry30aNl oaqtS99R75KyMN/Y27KOq1Jn14Ky4Nn23cFxpYn6YOQ+gZZCQML8P3WuJQv6fHyONiUll/ GLx8x1+sRDBXtscXrYBGVoaBzFdoABu5kR7+eVuXA6cszAPMYCEFw4xFsa5KFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783094; a=rsa-sha256; cv=none; b=taumpLZNKUicg11eo8HNtGEGJhZa6bB2qPNHfR5CwnKK8ysgaKnCwBy724uaqWGooy/RGb YuZzSjhhol7Z10Ek9t/qBgZlToHm4OiS30XYKzpkIMFvXI4kxfzU7p3WLjQ+U55ujizQIs q+ts0E0oSMySAZbNoWXuNRefxpvz8rgliAAlyB3YVedtb9POCq6wDmBs2/xgc9Gj42OPAU hkhF6eq1fCnlj300upFHYiMDb7xCGYQ5uJCfZk+KNt7ghi2Qr4f0aopxNA+TlR7B6tGaT4 2VBhkvBB60uPJz3nWQ5aKuQCVvWk/Z11lLs0D5z0FkMslVpTUh/U/V7TbZYSAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxdQLlV0ng1jjzb2jzR9W370MbRxLArpC9gsI8eujjw=; b=qRwRV0cYkASmxYZ3R+9bHwPDZ2F5ynmgIfduCvTkZNtWPnf7l1j9ao7LwHmO1YKbGFeH5M zg41ockO6cQSecJanZOhzL5Sb9elJqAn0Q52q9YtTAflQrYULHwxTjMFz9f3Meq9XY2KQn BIdORnegLNVz8kSVLTO1bbpgHfA55KBmP+q83GTnRXGxEluCWcul/QY58tMup1hgT2qRxx HgTv5cs7IVGrKjuP5Xd7TF5C2ovO3A/U6tSmyI9P9KiuN1vr/AvzGL6Xw6KmgiPqWzXBxd xXOfNSwAnOJfqkdcOzroKKv/M7WTVaH0RCEhNJGbZwGSWyv5I7pOIEP5OiWtzg== 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 4ZLcMV5SgTzb2R; Mon, 24 Mar 2025 02:24: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 52O2Os5O069917; Mon, 24 Mar 2025 02:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2Osit069914; Mon, 24 Mar 2025 02:24:54 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:54 GMT Message-Id: <202503240224.52O2Osit069914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ba2fb6b367fd - main - libprocstat: change psc_type_info array to use designated initializers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ba2fb6b367fd513ea5812a496254d3a05ec380b8 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ba2fb6b367fd513ea5812a496254d3a05ec380b8 commit ba2fb6b367fd513ea5812a496254d3a05ec380b8 Author: Konstantin Belousov AuthorDate: 2025-03-15 00:28:07 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 libprocstat: change psc_type_info array to use designated initializers Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- lib/libprocstat/core.c | 60 ++++++++++++++++++++++++++++++++++++++++---------- lib/libprocstat/core.h | 2 +- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index c02ab9511af7..83aabc50cc30 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -61,18 +61,54 @@ static struct psc_type_info { unsigned int n_type; int structsize; } psc_type_info[PSC_TYPE_MAX] = { - { .n_type = NT_PROCSTAT_PROC, .structsize = sizeof(struct kinfo_proc) }, - { .n_type = NT_PROCSTAT_FILES, .structsize = sizeof(struct kinfo_file) }, - { .n_type = NT_PROCSTAT_VMMAP, .structsize = sizeof(struct kinfo_vmentry) }, - { .n_type = NT_PROCSTAT_GROUPS, .structsize = sizeof(gid_t) }, - { .n_type = NT_PROCSTAT_UMASK, .structsize = sizeof(u_short) }, - { .n_type = NT_PROCSTAT_RLIMIT, .structsize = sizeof(struct rlimit) * RLIM_NLIMITS }, - { .n_type = NT_PROCSTAT_OSREL, .structsize = sizeof(int) }, - { .n_type = NT_PROCSTAT_PSSTRINGS, .structsize = sizeof(vm_offset_t) }, - { .n_type = NT_PROCSTAT_PSSTRINGS, .structsize = sizeof(vm_offset_t) }, - { .n_type = NT_PROCSTAT_PSSTRINGS, .structsize = sizeof(vm_offset_t) }, - { .n_type = NT_PROCSTAT_AUXV, .structsize = sizeof(Elf_Auxinfo) }, - { .n_type = NT_PTLWPINFO, .structsize = sizeof(struct ptrace_lwpinfo) }, + [PSC_TYPE_PROC] = { + .n_type = NT_PROCSTAT_PROC, + .structsize = sizeof(struct kinfo_proc) + }, + [PSC_TYPE_FILES] = { + .n_type = NT_PROCSTAT_FILES, + .structsize = sizeof(struct kinfo_file) + }, + [PSC_TYPE_VMMAP] = { + .n_type = NT_PROCSTAT_VMMAP, + .structsize = sizeof(struct kinfo_vmentry) + }, + [PSC_TYPE_GROUPS] = { + .n_type = NT_PROCSTAT_GROUPS, + .structsize = sizeof(gid_t) + }, + [PSC_TYPE_UMASK] = { + .n_type = NT_PROCSTAT_UMASK, + .structsize = sizeof(u_short) + }, + [PSC_TYPE_RLIMIT] = { + .n_type = NT_PROCSTAT_RLIMIT, + .structsize = sizeof(struct rlimit) * RLIM_NLIMITS + }, + [PSC_TYPE_OSREL] = { + .n_type = NT_PROCSTAT_OSREL, + .structsize = sizeof(int) + }, + [PSC_TYPE_PSSTRINGS] = { + .n_type = NT_PROCSTAT_PSSTRINGS, + .structsize = sizeof(vm_offset_t) + }, + [PSC_TYPE_ARGV] = { + .n_type = NT_PROCSTAT_PSSTRINGS, + .structsize = sizeof(vm_offset_t) + }, + [PSC_TYPE_ENVV] = { + .n_type = NT_PROCSTAT_PSSTRINGS, + .structsize = sizeof(vm_offset_t) + }, + [PSC_TYPE_AUXV] = { + .n_type = NT_PROCSTAT_AUXV, + .structsize = sizeof(Elf_Auxinfo) + }, + [PSC_TYPE_PTLWPINFO] = { + .n_type = NT_PTLWPINFO, + .structsize = sizeof(struct ptrace_lwpinfo) + }, }; static bool core_offset(struct procstat_core *core, off_t offset); diff --git a/lib/libprocstat/core.h b/lib/libprocstat/core.h index d6cb60dc9e25..8f6aa40192da 100644 --- a/lib/libprocstat/core.h +++ b/lib/libprocstat/core.h @@ -31,7 +31,7 @@ #define _CORE_H enum psc_type { - PSC_TYPE_PROC, + PSC_TYPE_PROC = 0, PSC_TYPE_FILES, PSC_TYPE_VMMAP, PSC_TYPE_GROUPS, From nobody Mon Mar 24 02:24:55 2025 X-Original-To: dev-commits-src-all@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 4ZLcMX3bbRz5r9jY; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMW6sYkz49js; Mon, 24 Mar 2025 02:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kdr0PmcW/05WUqqJAICU5aDzmgT4JDotknDmKLLSIrk=; b=OSLZA/bWMQdvkkw2XemAq044kXdpjE9BEw0zwqpySQ52gCYGKc7T5La3JZW1hatWktiN9g kLjqecuEDa4onH21QfEy5Bw37H617/+98ST+RIlWIpZh4Tz2IB9TuDteDwvexdHr8xtqBO m+4zqAcf6uF3bhS+yqDTdy0kIG877kGRQgplcgnTPm0aUL0sPZfUpLJHC+n7NhUZcyZV8x P3BTxwiDI79XEnwzz9bBIIfetq2D6sTAfoojE3n4Hi8ZHR/OAWk1eyeV7sd1MDjZGjTUjT fM/HRdczgI6tUDopy/sybBAcJy/CsxwcUg/3hBvQHyjS+akHngo3DwfzyW4irQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783096; a=rsa-sha256; cv=none; b=knQc1m/so4HdAXZHpRmLiY2jeXy7z1laKZQgPAxPgj9ahnTg/jEXjxwlFP6iw/m2OmUR1A RKbdUgQSQB+hwZ1bR+hQtP8/IpZ93FCxkBlCGgoiJlykKqVoZcWe399Z2qkuFUYwIcpAIW dkHWK0RH1DemizEDTtbX/OA8A9yT4302CHRPMfveaGjRrbzHFQcO0Eix9WGO9xbXpyuIEI IyaEWGD3ObHko0eBEgenlbFhL01ytPY7XWwbRUJp+ldrRGn3RsEdqMM4AiZ1jE4XpsN44N JjmkWzg5jofcJ4k1Y7RX1dvAKhmTsIAioZNqvkrEr9BgjT6oao42WBdIKYA1tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kdr0PmcW/05WUqqJAICU5aDzmgT4JDotknDmKLLSIrk=; b=mosFIdO6TtSK/R71EZzlz9yGXdorvmeOpuLG8si3gQmvLcgwNUgjHrcwdirzGhqLVwO6E+ rxmRdzHEAclOzYrK8HzbljT9YxebY3uruQbTpUo8znQsFKTa3Yx4Vw/XAru3pGNAkSU3oK jgM7OrKgdRuIc+8c75O2vJAC9XyS2hcrVS+PLUGv3V8Ivb+/sRnDudIC08Qd9rbFElQctn ZvNRT/dyAXChJ0SpY211VVMv4vSF+AntVUnVUOApDzlD2kCFmkn5mPJ++fCHr6rk9j2Lky 5qxhqpSReHCTVTGXGD3QusyeGAFHBRuhPnR87WnjFw3zt8xWTkltOsmZzjKvJg== 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 4ZLcMW6QQfzbY8; Mon, 24 Mar 2025 02:24: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 52O2Otkb069952; Mon, 24 Mar 2025 02:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OtnQ069949; Mon, 24 Mar 2025 02:24:55 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:55 GMT Message-Id: <202503240224.52O2OtnQ069949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: debcd4c05701 - main - libprocstat: constify psc_type_info[] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: debcd4c05701be0ff48c6b350ed6b3a80e5f0b1f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=debcd4c05701be0ff48c6b350ed6b3a80e5f0b1f commit debcd4c05701be0ff48c6b350ed6b3a80e5f0b1f Author: Konstantin Belousov AuthorDate: 2025-03-18 01:43:54 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 libprocstat: constify psc_type_info[] Suggested by: markj Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- lib/libprocstat/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index 83aabc50cc30..37ea9b7bb912 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -57,7 +57,7 @@ struct procstat_core GElf_Phdr pc_phdr; }; -static struct psc_type_info { +static const struct psc_type_info { unsigned int n_type; int structsize; } psc_type_info[PSC_TYPE_MAX] = { From nobody Mon Mar 24 02:24:56 2025 X-Original-To: dev-commits-src-all@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 4ZLcMY6T8zz5r9rn; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMY1Bvfz49gT; Mon, 24 Mar 2025 02:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GePSJlPrmBNXj1Iem6scMA9HCYwJ75+wx0iXf3GolbA=; b=ebLTln8DFn3h6/U0ED/Mnskg5SHoXpN8et5hJcZYcjTPINhQLQJhLpPJ9pekTLbmeRoLHN mV09ZKXvD6k0yecWp1bvf/x8Zy/TO1qHy/liOxM8GQ0a859vyLFdZLtxITfbcccP7xxb2U z1NxHijZ+1KVBC2sAqrcduhob9ZEIZ4y2TBQhPu2OTy62P2Xq4P4Xk5Qwi9DP0xgie/cs3 xtevtAOF8acgz3cXoQYZXDiZVk39m3Zm/wRYlYgojLGpMInnycVcLvkw3s4HSusXCoR1vd zdJ4mcTNCj1Wi4Nu95BWRAZO2BONHujG1sNOZxcgBo/aIH4gKaFLSw+dmlIbeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783097; a=rsa-sha256; cv=none; b=E/6lR5GwV/HnrUt6S3KVNIHO+IyVjAYDoY40E/PNPx/kH5wP4ISEzgP5A4Jv7bYGyUYKkb jforFRqD63KQGA50GOWAYs8PJsD378K4g1/moAaQOUMu9yGrKP+sI6IRwIn3raFFTOn5ey 0kD3dJKXWJn4iLnNbe4Vj+nTN0NIrDaq4lm5HZcLCo5ioeukp4C+LiZBZ9RcFKARhO/gSz 4q+NwaP0WsotiNmMY9e7AIkfnclnUuI5uowyS/itrcHvfFl0xBDmGrFBmF7cltDB1BB+eF FkO7nZ87SQe4wmLU1xDxpCiHnyp7aFAA7yu1OxttX3Ch/Ag4N9O135lWv1JhTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GePSJlPrmBNXj1Iem6scMA9HCYwJ75+wx0iXf3GolbA=; b=VUDcFoBocPnCXY2rEKht5ZuOeM7rNWSFCsQfDDmK7FFdCQo7B0T912WwHGTsICDQEbFX+R 1WKl5IMtXC0mFaery/1lHD1Ur4tBYRPC3MukhNruYq0WguqMVNsAqOuDZZWrT8XrN53npd LaGUixa+TdBwRINWdxnKzcfJKJSgAmluLabNLJQoRI7UZqxCMULB0A/byce+ivniIyaCnO t4d8PqWubuXTofilz6iqE5whh7+2BIe2B15AJ4iyZfFeRDxxhit+EMYpnTXO46kkVDxuT7 ZYxBwb8nRasdKHKBnZO0Jp6XI7xkJMXPCD4Bu0A+pZQ/379pUVJMnrq1hnRK5w== 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 4ZLcMY026lzbV2; Mon, 24 Mar 2025 02:24: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 52O2OucD069987; Mon, 24 Mar 2025 02:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2OuiC069984; Mon, 24 Mar 2025 02:24:56 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:56 GMT Message-Id: <202503240224.52O2OuiC069984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1c3d6532ca29 - main - libprocstat: add knowledge about NT_PROCSTAT_KQUEUES core file section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1c3d6532ca29c7aa7d26edd4074bc91671ac1bc2 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c3d6532ca29c7aa7d26edd4074bc91671ac1bc2 commit 1c3d6532ca29c7aa7d26edd4074bc91671ac1bc2 Author: Konstantin Belousov AuthorDate: 2025-03-13 23:06:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 libprocstat: add knowledge about NT_PROCSTAT_KQUEUES core file section Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- lib/libprocstat/core.c | 4 ++++ lib/libprocstat/core.h | 1 + lib/libprocstat/libprocstat.c | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index 37ea9b7bb912..b27b35de3bab 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -109,6 +109,10 @@ static const struct psc_type_info { .n_type = NT_PTLWPINFO, .structsize = sizeof(struct ptrace_lwpinfo) }, + [PSC_TYPE_KQUEUES] = { + .n_type = NT_PROCSTAT_KQUEUES, + .structsize = sizeof(struct kinfo_knote) + }, }; static bool core_offset(struct procstat_core *core, off_t offset); diff --git a/lib/libprocstat/core.h b/lib/libprocstat/core.h index 8f6aa40192da..f4276fbdf09e 100644 --- a/lib/libprocstat/core.h +++ b/lib/libprocstat/core.h @@ -43,6 +43,7 @@ enum psc_type { PSC_TYPE_ENVV, PSC_TYPE_AUXV, PSC_TYPE_PTLWPINFO, + PSC_TYPE_KQUEUES, PSC_TYPE_MAX }; diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 3c70c939ff7e..29f464ef6414 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2862,6 +2862,9 @@ struct kinfo_knote * procstat_get_kqueue_info(struct procstat *procstat, struct kinfo_proc *kp, int kqfd, unsigned int *count, char *errbuf) { + struct kinfo_knote *kn, *k, *res, *rn; + size_t len, kqn; + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); @@ -2870,8 +2873,34 @@ procstat_get_kqueue_info(struct procstat *procstat, return (procstat_get_kqueue_info_sysctl(kp->ki_pid, kqfd, count, errbuf)); case PROCSTAT_CORE: - warnx("core method is not supported"); - return (NULL); + k = procstat_core_get(procstat->core, PSC_TYPE_KQUEUES, + NULL, &len); + if (k == NULL) { + snprintf(errbuf, _POSIX2_LINE_MAX, + "getting NT_PROCSTAT_KQUEUES note failed"); + *count = 0; + return (NULL); + } + for (kqn = 0, kn = k; kn < k + len / sizeof(*kn); kn++) { + if (kn->knt_kq_fd == kqfd) + kqn++; + } + res = calloc(kqn, sizeof(*res)); + if (res == NULL) { + free(k); + snprintf(errbuf, _POSIX2_LINE_MAX, + "no memory"); + return (NULL); + } + for (kn = k, rn = res; kn < k + len / sizeof(*kn); kn++) { + if (kn->knt_kq_fd != kqfd) + continue; + *rn = *kn; + rn++; + } + *count = kqn; + free(k); + return (res); default: warnx("unknown access method: %d", procstat->type); return (NULL); From nobody Mon Mar 24 02:24:58 2025 X-Original-To: dev-commits-src-all@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 4ZLcMZ4YQlz5r9rp; Mon, 24 Mar 2025 02:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcMZ1Wbmz49Y6; Mon, 24 Mar 2025 02:24:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wH2z2hxqDv7QYtBJZkapzxnt2tJGRM0evSgkC9ZiKcU=; b=HcP+rXllVH+JK2YzdSJp+CQxvq3vsYgGOy0GOu4Xa1g60PAMWZPZUAEpuZJDbNPkYwpTQw /OjF8hF0uVvS+Z2xMuMrN/sDjn6sC+D4VAm/W4+ZYkQCGmtK8Dm0HMAVaPnGv1oFj2HhF+ rErPB/Tm7rcPkiRkY67ScmSazAk/PgcY+48YiwaLPzahboq9DA1TptDyJkEht0khJSVM1X 5LVRRM1Cca54wWHkOMn90kcN10+1Rwzag9E1DMqgUWYfn5E4wWb9z8QacUVOBGYWTyyVyt TRKHCPKXAzsWlBeo94d+TddtnfU8a0C74GgNYtUDKVSu/JX9MuNCsDtBw6hiRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742783098; a=rsa-sha256; cv=none; b=DhfYvpTlr/Lv3a1lz36DlHBqDUEFcWOw23IddDYxmX3Geu62WtSrKWPMTKV/dTQhCeXk/u qrvpoDsA2gYjg7ylaDG98IRy6lOGJN1B7NiAcczSLBgkHeU83NTskrMlFbSDV6uRqOWhZG 778hMhQLgInv4htbJPyojsEzIe11Ijxv2G1I6LtEeAeE/I7CC82+pq8NmTAnVUJV1USTPz oX9/GCdQDUk/pDBP4f7zI4gGo2rhuTjBfhPEGh1gjuSCQs5txSsA81eYDRA+lf5H1VS1tt 4+ncKLUySEEGMKovOgd3LSWlg9DIq2eLkkgEhT/imeCf2bt/IqUc5tb5RtdyvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742783098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wH2z2hxqDv7QYtBJZkapzxnt2tJGRM0evSgkC9ZiKcU=; b=ouH3OxLqfCGbJeuv8B/k/Nlvf57OdwMEqnoTT25bikFKoH55w4LLgbVrPgn2g8Ir/e8BaV SzPWccUWQAOJVXw+913b4iyCch1O06pFnC/ljo1MNt0NCJcvwd62/dPxxoQRSzpiJ1V6xJ c+QryYjlCBaaXeU79txUU80ESL3+mKH2aNjODDtzIfB7jlstd6Lb8JIQLr4Qv2hYb0brrp oD8K9t31T38MHgxpbaCNQewQM2Iah6uMmbugEzvKRDWsz/xLEdLpI02ybXqlI0RhbhQEOf oucahyyFaxKHKcnn0Dqdr2Th9oAljDiy7bkbSPrkNaL+5EKQ/rYRUZCDRQheFw== 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 4ZLcMZ0ptczbY9; Mon, 24 Mar 2025 02:24: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 52O2OwAR070021; Mon, 24 Mar 2025 02:24:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O2Ow0Y070018; Mon, 24 Mar 2025 02:24:58 GMT (envelope-from git) Date: Mon, 24 Mar 2025 02:24:58 GMT Message-Id: <202503240224.52O2Ow0Y070018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 10626f7384f9 - main - gcore(1): dump NT_PROCSTAT_KQUEUES section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 10626f7384f9e39a8c02dfd475b1fd14fd7395dd Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=10626f7384f9e39a8c02dfd475b1fd14fd7395dd commit 10626f7384f9e39a8c02dfd475b1fd14fd7395dd Author: Konstantin Belousov AuthorDate: 2025-03-15 01:56:09 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 02:24:14 +0000 gcore(1): dump NT_PROCSTAT_KQUEUES section Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49372 --- usr.bin/gcore/elfcore.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index 2bffd409bb11..86613a91ca73 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -105,6 +105,7 @@ static void *elf_note_powerpc_vsx(void *, size_t *); static void *elf_note_procstat_auxv(void *, size_t *); static void *elf_note_procstat_files(void *, size_t *); static void *elf_note_procstat_groups(void *, size_t *); +static void *elf_note_procstat_kqueues(void *, size_t *); static void *elf_note_procstat_osrel(void *, size_t *); static void *elf_note_procstat_proc(void *, size_t *); static void *elf_note_procstat_psstrings(void *, size_t *); @@ -388,6 +389,7 @@ elf_putnotes(pid_t pid, struct sbuf *sb, size_t *sizep) elf_putnote(NT_PROCSTAT_PSSTRINGS, elf_note_procstat_psstrings, &pid, sb); elf_putnote(NT_PROCSTAT_AUXV, elf_note_procstat_auxv, &pid, sb); + elf_putnote(NT_PROCSTAT_KQUEUES, elf_note_procstat_kqueues, &pid, sb); #endif size = sbuf_end_section(sb, old_len, 1, 0); @@ -756,7 +758,7 @@ procstat_sysctl(void *arg, int what, size_t structsz, size_t *sizep) { size_t len; pid_t pid; - int name[4], structsize; + int name[5], structsize; void *buf, *p; pid = *(pid_t *)arg; @@ -841,6 +843,14 @@ elf_note_procstat_auxv(void *arg, size_t *sizep) sizeof(Elf_Auxinfo), sizep)); } +static void * +elf_note_procstat_kqueues(void *arg, size_t *sizep) +{ + + return (procstat_sysctl(arg, KERN_PROC_KQUEUE, + sizeof(struct kinfo_knote), sizep)); +} + static void * elf_note_procstat_rlimit(void *arg, size_t *sizep) { From nobody Mon Mar 24 02:45:55 2025 X-Original-To: dev-commits-src-all@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 4ZLcqs4WYqz5rBr6; Mon, 24 Mar 2025 02:46:01 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLcqs3t5gz3VyG; Mon, 24 Mar 2025 02:46:01 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742784361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zm9k6Yv5w0MYeKOas1S5L0lrFYAAbj2BO+wCT2SKj+Y=; b=Qhz9gUb41xNg0JXnn7E4bS3XZqIfkFkKG9t0ZlrrvMtcRGLBkFWlW6C2wYMQuUDClHnbqf uz69VwihPlcPLUxQ9ZF6RmJIyfbZMo7hDpRbyI62ppcOrewu5aKTo4zAeNN+QxurRPSeLC OMbymeHvBItnyXiTigpnAM0WZB0wA1lM2Eag9tPAaTV/tQ7xVzqIpcUPjyZxxCJ8M+bbVi gt2nHS52SRBv+KwQkRTLrTHfBeH000Q2A11tuBYKxvVOhpPdspR+df1+QC5U2pcLxVxDyy 8H32ObryKrcVrjC8NSdBF1YZ9UlpDKYLgGXfWOlenMPi1PQSlLdWIJFRIFWOqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742784361; a=rsa-sha256; cv=none; b=KGnaspWItcrArEtOW9S0n8yRV/a2jzihLYmA5NflXUqp4h9CaRx8o2kAYldLvo5fIiwqzx z+Ew2OMgZhZX2Di4mzZa3ftznkvb9G4TJq1sZUbbX1Sl0SAGNI7mT5WFIcvMjdasAQAQEB +MAhheOJEpgxKfj46+O7kSLBbiFAWM4xeBQ4FvNwtBhNFhJxsKaa0GEei/QwKUsEg2DHpg 9CNfUioDio8zcyWt/y3mgJlVkKpHnJ7UYfIs0Zl/zPoLbh5S7ufQ553pIEihN6qRVSd91M sPsZ14X6bdlqvHz3oZjrocn7ESsTfb1bJA+142iUgHPsFDO3tyIOsIvVDkCwzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742784361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zm9k6Yv5w0MYeKOas1S5L0lrFYAAbj2BO+wCT2SKj+Y=; b=IDu478F/ry26lrkVJ2wwHvzrJ2sxwFLMl4b+Ph0/SML/M7BYaXuTQ618y7GTVxBHdGu5le XesUHFyZKeJsUAs8qDiTuOgAvE1Kyht86ygxiU9p/klwbdkHkFkcC5/2hPmno5/E3Y9FUd Ni/2VccxtSZM7eMb8lUSbvR5iBr2N7Gj1uP+46MK4IyIL0WgRoUqpxw37is/PWCvarq6WX 1bLrgUigh7EJBYFkFU4v0GYrrb89fJhQK0giNg9lnx5Qo/a6eJiD/tHkUQHPCUCCyZd1wG nyrgiIKhVcbJaHqkoYTvGNn2up/Rgas6bEqUsjGq9hjBxQvlMUjhy3Qpng4KvA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R10" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLcqs1tPFz19kr; Mon, 24 Mar 2025 02:46:01 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 0DA4F1ED05; Mon, 24 Mar 2025 03:45:57 +0100 (CET) From: Kristof Provost To: Gleb Smirnoff Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0849f1634a70 - main - tests/netinet: add test for IP_MULTICAST_IF Date: Mon, 24 Mar 2025 11:45:55 +0900 X-Mailer: MailMate (2.0r6222) Message-ID: <7440BE85-66E8-4D1A-AC15-8B944F5C2951@FreeBSD.org> In-Reply-To: <202503222340.52MNekCX071219@gitrepo.freebsd.org> References: <202503222340.52MNekCX071219@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_B28CA915-06EB-49CD-961F-2ADDD3DDDB4D_=" --=_MailMate_B28CA915-06EB-49CD-961F-2ADDD3DDDB4D_= Content-Type: text/plain; charset=UTF-8; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 23 Mar 2025, at 8:40, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D0849f1634a70099b90256ceece52a= 598eeb3280e > > commit 0849f1634a70099b90256ceece52a598eeb3280e > Author: Gleb Smirnoff > AuthorDate: 2025-03-22 22:44:20 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-03-22 23:39:50 +0000 > > tests/netinet: add test for IP_MULTICAST_IF > It bugs me a little that we have to jump through hoops to get a C = program running in a specific jail/network setup. It=E2=80=99s somewhat common for that to happen, and I=E2=80=99m sure the= re=E2=80=99d be = more cases if it were easier to do (e.g. the getaddrinfo tests you=E2=80=99= ve = been working on could be even more useful with a custom DNS server, so = in their own vnet jail). I took a stab at that: diff --git a/tests/sys/netinet/multicast.sh = b/tests/sys/netinet/multicast.sh index eb2b962dac70..7476daeb832a 100644 --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -26,6 +26,15 @@ . $(atf_get_srcdir)/../common/vnet.subr +ctest_j() +{ + jail=3D$1 + shift + + cc -x c - -o tmp || atf_fail "Failed to build" + jexec $jail `pwd`/tmp $@ || atf_fail "Test program failed" +} + # See regression fixed in baad45c9c12028964acd0b58096f3aaa0fb22859 atf_test_case "IP_MULTICAST_IF" "cleanup" IP_MULTICAST_IF_head() @@ -33,7 +42,6 @@ IP_MULTICAST_IF_head() atf_set descr \ 'sendto() for IP_MULTICAST_IF socket does not do routing = lookup' atf_set require.user root - } IP_MULTICAST_IF_body() @@ -46,8 +54,45 @@ IP_MULTICAST_IF_body() vnet_mkjail mjail ${epair}a jexec mjail ifconfig ${epair}a up jexec mjail ifconfig ${epair}a 192.0.2.1/24 - atf_check -s exit:0 -o empty \ - jexec mjail $(atf_get_srcdir)/sendto-IP_MULTICAST_IF = 192.0.2.1 + + ctest_j mjail 192.0.2.1 < +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + struct sockaddr_in sin =3D { + .sin_family =3D AF_INET, + .sin_len =3D sizeof(struct sockaddr_in), + }; + struct in_addr in; + int s, rv; + + if (argc < 2) + errx(1, "Usage: %s IPv4-address", argv[0]); + + if (inet_pton(AF_INET, argv[1], &in) !=3D 1) + err(1, "inet_pton(%s) failed", argv[1]); + + assert((s =3D socket(PF_INET, SOCK_DGRAM, 0)) > 0); + assert(bind(s, (struct sockaddr *)&sin, sizeof(sin)) =3D=3D 0); + assert(setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &in, = sizeof(in)) + =3D=3D 0); + /* RFC 6676 */ + assert(inet_pton(AF_INET, "233.252.0.1", &sin.sin_addr) =3D=3D 1= ); + sin.sin_port =3D htons(6676); + rv =3D sendto(s, &sin, sizeof(sin), 0, + (struct sockaddr *)&sin, sizeof(sin)); + if (rv !=3D sizeof(sin)) + err(1, "sendto failed"); + + return (0); +} +EOF } IP_MULTICAST_IF_cleanup() The downside is that we=E2=80=99re compiling the C test code on every run= , but = I expect test programs to be tiny, so that=E2=80=99s not too much of a co= st. Does this seem useful to you too? Best regards, Kristof --=_MailMate_B28CA915-06EB-49CD-961F-2ADDD3DDDB4D_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 23 Mar 2025, at 8:40, Gleb Smirnoff wrote:

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3D0849f1634a70099b90256ceece52a598eeb3280e

commit 0849f1634a70099b90256ceece52a598eeb3280e
Author: Gleb Smirnoff glebius@= FreeBSD.org
AuthorDate: 2025-03-22 22:44:20 +0000
Commit: Gleb Smirnoff glebius@= FreeBSD.org
CommitDate: 2025-03-22 23:39:50 +0000

te=
sts/netinet: add test for IP_MULTICAST_IF

It bugs me a little that we have to jump through hoops to= get a C program running in a specific jail/network setup.
It=E2=80=99s somewhat common for that to happen, and I=E2=80=99m sure the= re=E2=80=99d be more cases if it were easier to do (e.g. the getaddrinfo = tests you=E2=80=99ve been working on could be even more useful with a cus= tom DNS server, so in their own vnet jail).

I took a stab at that:

di=
ff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.s=
h
index eb2b962dac70..7476daeb832a 100644
--- a/tests/sys/netinet/multicast.sh
+++ b/tests/sys/netinet/multicast.sh
@@ -26,6 +26,15 @@

 . $(atf_get_srcdir)/../common/vnet.subr

+ctest_j()
+{
+       jail=3D$1
+       shift
+
+       cc -x c - -o tmp || atf_fail "Failed to build"
+       jexec $jail `pwd`/tmp $@ || atf_fail "Test program failed&qu=
ot;
+}
+
 # See regression fixed in baad45c9c12028964acd0b58096f3aaa0fb22859
 atf_test_case "IP_MULTICAST_IF" "cleanup"
 IP_MULTICAST_IF_head()
@@ -33,7 +42,6 @@ IP_MULTICAST_IF_head()
        atf_set descr \
            'sendto() for IP_MULTICAST_IF socket does not do routing look=
up'
        atf_set require.user root
-
 }

 IP_MULTICAST_IF_body()
@@ -46,8 +54,45 @@ IP_MULTICAST_IF_body()
        vnet_mkjail mjail ${epair}a
        jexec mjail ifconfig ${epair}a up
        jexec mjail ifconfig ${epair}a 192.0.2.1/24
-       atf_check -s exit:0 -o empty \
-           jexec mjail $(atf_get_srcdir)/sendto-IP_MULTICAST_IF 192.0.2.=
1
+
+       ctest_j mjail 192.0.2.1 <<EOF
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <assert.h>
+#include <err.h>
+
+int
+main(int argc, char *argv[])
+{
+       struct sockaddr_in sin =3D {
+               .sin_family =3D AF_INET,
+               .sin_len =3D sizeof(struct sockaddr_in),
+       };
+       struct in_addr in;
+       int s, rv;
+
+       if (argc < 2)
+               errx(1, "Usage: %s IPv4-address", argv[0]);
+
+       if (inet_pton(AF_INET, argv[1], &in) !=3D 1)
+               err(1, "inet_pton(%s) failed", argv[1]);
+
+       assert((s =3D socket(PF_INET, SOCK_DGRAM, 0)) > 0);
+       assert(bind(s, (struct sockaddr *)&sin, sizeof(sin)) =3D=3D 0=
);
+       assert(setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &in, sizeof=
(in))
+         =3D=3D 0);
+       /* RFC 6676 */
+       assert(inet_pton(AF_INET, "233.252.0.1", &sin.sin_a=
ddr) =3D=3D 1);
+       sin.sin_port =3D htons(6676);
+       rv =3D sendto(s, &sin, sizeof(sin), 0,
+           (struct sockaddr *)&sin, sizeof(sin));
+       if (rv !=3D sizeof(sin))
+               err(1, "sendto failed");
+
+       return (0);
+}
+EOF
 }

 IP_MULTICAST_IF_cleanup()

The downside is that we=E2=80=99re compiling the C test c= ode on every run, but I expect test programs to be tiny, so that=E2=80=99= s not too much of a cost.

Does this seem useful to you too?

Best regards,
Kristof

--=_MailMate_B28CA915-06EB-49CD-961F-2ADDD3DDDB4D_=-- From nobody Mon Mar 24 03:21:27 2025 X-Original-To: dev-commits-src-all@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 4ZLdcm0hR2z5rDt0; Mon, 24 Mar 2025 03:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLdcl6q9Tz3vZt; Mon, 24 Mar 2025 03:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742786488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4Up+qJhsYChniOwc3fHeZfeGQKE088qvwQgMz2hmfM=; b=XxlJYdxFuFV6b6lbj+/2reH9K0tXSVFzIEzgf/4JYxaAp4Z3CiS7iZ8k7DJz7UuwGxa6FW vNNGccNjqS/G2AttbA08rJ/wpR9tcqkPCSuc8oCEkFqtyfaIbPPeHVBHETSmn4czy6qDPb KloHquKI9bKj+KOXD5sj9R622t1jWQ8XKkJyoDSxMFdClOemPNEkudbdawKdn6Mr16lSdN iJbIdMx9zIhBwJFx2tIbkyr36BGGH4XjPy+mXt4yhCVLiXTOWnV+Jtj81+9uG6tRZI6Pfd 1GxfhCKUkNuTFS3cu5d5IzIRzKB6cW4FHQwZa91pDe9t7rcCNvCfbghpiyoxYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742786488; a=rsa-sha256; cv=none; b=lUaT9pzwapeM5+8uNcAYtofzB80w/6bt0WLCY6l0BmYvQlu+cdMwNkncXfdn4IJBP70FOx 0a0z2zBn0GJ2/jtH3UeW4WwbTJ90eZJe9f5/yDmchqVIqTSnS5Y6C+G/bdfEonBRlYfsEU 0s0Hav4AtAesWRy7HoWQd9kmSeg4Jeh94hW4WAVp7Xhk1sE5YsC1C3JE+rtLJ8H8Irlahe ovyL+gFmESG3it56r25vT8LhT0JtRpUnmPE+46kvmaMHZFV4bP3OkAHtoTWj3iy6+1tLfL Xmx2zT9eRwZKlKvJv6l4htOfErdFZBV4xwrn6cdrxz9M3uzniIM8IFVDLapmww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742786488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4Up+qJhsYChniOwc3fHeZfeGQKE088qvwQgMz2hmfM=; b=jjWdEQZtixwmk9EwF1VhwTiR822TkCJsAd2y2YLhrlm/zBiuYuPNTxEqE3FK+c4zIAotpe Bytmyhy9oYhYFNYSnu5wm2pBpWOkmpOFlJl0mxYIg8ZBr0PQsECtn2J8ewB0/f0l03amLk 0OSBbVo1RkttqZgmpfQKR8H1aeCasPh/kcaqB7/pkYeICTJZW7HFGBVy8lFIncRDezZ19w A5xAPjWL3TvsEAM3Cz5qzzRLBeVYs6hjY6fc0ggvpnJibmcAtS/cDyz52YinZUBnzMDmf9 z8uoUF4fvTzdK30nIK19mfmmavdw9HjofOaXQII04Kzu/ByNZpUWl+RWfdSt9Q== 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 4ZLdcl6Ng2zd0R; Mon, 24 Mar 2025 03:21: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 52O3LRc7078094; Mon, 24 Mar 2025 03:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O3LR53078091; Mon, 24 Mar 2025 03:21:27 GMT (envelope-from git) Date: Mon, 24 Mar 2025 03:21:27 GMT Message-Id: <202503240321.52O3LR53078091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 626ec04c2b84 - main - vm_reserv: clarify reserv_from_object List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 626ec04c2b84f646c8b96e0fd1b4aac95d8035ce Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=626ec04c2b84f646c8b96e0fd1b4aac95d8035ce commit 626ec04c2b84f646c8b96e0fd1b4aac95d8035ce Author: Doug Moore AuthorDate: 2025-03-24 03:19:57 +0000 Commit: Doug Moore CommitDate: 2025-03-24 03:19:57 +0000 vm_reserv: clarify reserv_from_object vm_reserv_from_page returns an existing reservation, or initializes a successor pointer, or both. If it returns an existing reservation, callers will ignore the successor pointer, initialized or not, so initializing it serves no purpose. So, don't initialize it in that case, and make less ambiguous the comment that describes the function's behavior. Reviewed by: markj, kib, alc Differential Revision: https://reviews.freebsd.org/D49415 --- sys/vm/vm_reserv.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c index 1102cb61323a..3dc278851cc9 100644 --- a/sys/vm/vm_reserv.c +++ b/sys/vm/vm_reserv.c @@ -506,7 +506,8 @@ vm_reserv_from_page(vm_page_t m) } /* - * Returns an existing reservation or NULL and initialized successor pointer. + * Either returns an existing reservation or returns NULL and initializes + * successor pointer. */ static vm_reserv_t vm_reserv_from_object(vm_object_t object, vm_pindex_t pindex, @@ -515,7 +516,6 @@ vm_reserv_from_object(vm_object_t object, vm_pindex_t pindex, vm_reserv_t rv; vm_page_t msucc; - msucc = NULL; if (mpred != NULL) { KASSERT(mpred->object == object, ("vm_reserv_from_object: object doesn't contain mpred")); @@ -523,7 +523,7 @@ vm_reserv_from_object(vm_object_t object, vm_pindex_t pindex, ("vm_reserv_from_object: mpred doesn't precede pindex")); rv = vm_reserv_from_page(mpred); if (rv->object == object && vm_reserv_has_pindex(rv, pindex)) - goto found; + return (rv); msucc = TAILQ_NEXT(mpred, listq); } else msucc = TAILQ_FIRST(&object->memq); @@ -532,14 +532,10 @@ vm_reserv_from_object(vm_object_t object, vm_pindex_t pindex, ("vm_reserv_from_object: msucc doesn't succeed pindex")); rv = vm_reserv_from_page(msucc); if (rv->object == object && vm_reserv_has_pindex(rv, pindex)) - goto found; + return (rv); } - rv = NULL; - -found: *msuccp = msucc; - - return (rv); + return (NULL); } /* From nobody Mon Mar 24 04:07:28 2025 X-Original-To: dev-commits-src-all@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 4ZLfdr41dvz5rJJD; Mon, 24 Mar 2025 04:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLfdr2V2tz3Rqw; Mon, 24 Mar 2025 04:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742789248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xFkmDiiQzFmLs25ypAkKGi+y4rwNNLBJ7RNPC55En7w=; b=iPZfvAok68FEXoma51OwJZ/yL1mh7TNAmTS3KN9l48OSN0z8TFoWnIIECUbTX5jbKjQAAX NdlSb8dK6zFG3h4m0h+vNfb9feQmo4szuDt+jvNnDFpE3th0kues1Zq5/FO447mgT4WtaB AKYLGGBlgWoWH7httTig/a9b6Q8+jg2Nniw58kLo3IaOH8zdErx+RtGVBrKOkgMN+9xziu OMaHMkauEAIzzg3jMPKlEJ8SSG3rEWE8fxI6c4A1vA5lUCTwPZz2UDPkimv4DO2Q+JpYNE SXJ2K0xGsesla+TiDnx6boTETAcQbMRk+COdWGfRa1KgCKqmMWT5QeJFjZb+cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742789248; a=rsa-sha256; cv=none; b=Lhnw22LME3JuYBo1gRWzF7UtxEVfXcRaKPVk+3wpe/ghb6L1bDBGMrAbeoaYHCTCuuwJ4f 71v4RhI8ptKCAlnYRjKzLAhScIZUfV/rnHOFmnRmucxOW5mQxpR0ertZcyvLQPqABN6Suu 6AIggh7e9BYXQc7jTMPV3LdxLY4hUhE0FqBIOFe9HlVvk8JXNaLN/Aplwl6UvzOl8DN86j W72Nrl5Jxyvp3NmYm7soEDHt24HJ0LIBgW7GG8ywMoNNmR9WlkerCA73u++mkaB5f1q0dp RvhmdP3yrjvopNHWhXjQdKAK7KWBofZt+5AHv7kf1RrN70Cu11uTVlJmZ4CpnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742789248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xFkmDiiQzFmLs25ypAkKGi+y4rwNNLBJ7RNPC55En7w=; b=pm+ljAiIupvz9mva5KapLwWDlnz/Wmh8Lc0Rs0FmudXERvjiw05OE4j4WlaJr27qSJ8ImP z0uv80HYTX46eBZGzISmKHd3VhZngxucH7VZkCTJ8XdjNygM9DEUKyfoY0/HE/CVqy0Ico tH/qWvvAH1B7uxylWV8g5ZUiAnLvTHuKGzyE2VXPFZPzimIbUXuPBd1YeY+DiL1/ov8Dkg X4x0gNdIrSdkHnMFubPSLlw6ioaPvI9Oz8PykTyjkLu+BNzgi+78oAb+JdJmMl/BPZZxst 1XXX7Jsh/hJe41rYmu+cd124mFczniKn8PtPe9L/JQDTQpdt7abx0sbPckoCtg== 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 4ZLfdr25sszf6r; Mon, 24 Mar 2025 04:07: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 52O47Se0059879; Mon, 24 Mar 2025 04:07:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O47Sk3059876; Mon, 24 Mar 2025 04:07:28 GMT (envelope-from git) Date: Mon, 24 Mar 2025 04:07:28 GMT Message-Id: <202503240407.52O47Sk3059876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a6ea60aa4887 - main - freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a6ea60aa48878d2d0c113f541fb2b9b8246ac06b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a6ea60aa48878d2d0c113f541fb2b9b8246ac06b commit a6ea60aa48878d2d0c113f541fb2b9b8246ac06b Author: Konstantin Belousov AuthorDate: 2025-03-24 04:06:24 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 04:06:24 +0000 freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/compat/freebsd32/freebsd32.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index c3234141d5a9..3a4625b8e2d3 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -446,6 +446,7 @@ struct kinfo_vm_layout32 { uint32_t kvm_spare[12]; }; +#if defined(_WANT_KEVENT32) || (defined(_KERNEL) && defined(__LP64__)) struct kinfo_knote32 { int knt_kq_fd; struct kevent32 knt_event; @@ -464,6 +465,7 @@ struct kinfo_knote32 { } knt_pipe; }; }; +#endif struct kld_file_stat_1_32 { int version; /* set to sizeof(struct kld_file_stat_1) */ From nobody Mon Mar 24 04:54:00 2025 X-Original-To: dev-commits-src-all@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 4ZLggX57t2z5rMFJ; Mon, 24 Mar 2025 04:54: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLggX3hRYz3wtC; Mon, 24 Mar 2025 04:54:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742792040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vfx+/WvYMeCdfu80mNOCKADouf/VsJm3GO/zj8ki4EE=; b=bhLgdhKvSscxXjbPYPzAwWbZCIZjdyOT5kgtFmlAIRPINrH9ltsdq9KWpyUp8wy1KKi6+f 9G1y014Ikp04I2kJSrqLqSgKW9lopEKI8xC4eTGekWKS2kuUvhLwIjWKhBHiZlPri0r/++ XJnAquMdIvFXUl9Yx/ag0xBHRZNUu97OZ1Vmr0qyPbdrvrGD4wOwZ8sqRfq+FC4+c2Fgtg dIWyJxPU4WY0QMmGBj1sTi8KnEArvgbWXwG9H2OachS3AQyIe8fUNB20dx4tqXv3xydv60 o+aUD6n8YLd6EMwieLFPtOSe7lQyxkIEcHcRy0hIPciMoCOrOogtGPdvxpW5mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742792040; a=rsa-sha256; cv=none; b=a1MMylc9ZKy81tQgsaxBlcwhQTwqarkJMHgxs9BIbLKI/pdMomuxRWK54Pb7dVj20fyiQH LV8d8E6DnPZoN9Tyfw0YFXNLNiSAVV1npTl5K9P2qemCJnwbHGps146URc2g8L6W1n9zpt Kfk4RKS0uBam1UYjdL4Q84VDyeAaQlPhWHdEA86SgrFMah9qNv3z4vYFqKzYFDFwTSvEQi QwjucScmXUj2hYBS3P0dWz22YemzWSRF+PaghmA8h4yOzcDGy6H37QznoCBlUJxT7K/J8r bmCZ41GD4BwpksUPXhFwb8OGeMjfUIHPXFG+TQx0jCO4SFdQveiSIE8LKclQ8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742792040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vfx+/WvYMeCdfu80mNOCKADouf/VsJm3GO/zj8ki4EE=; b=Oi78XZcnu+lG2eeQQBk7gUUklm8moTQJtpLZlOpWiQNDzR25YbCWntsBVhW4IdB3HlE8pI GFR1J6j7SV1RXfRgafTO0EkZSuIzj5IaOQqWogUaDIxZ2uWJ+0+Zp/6jS1iZwdlabNd1iq sLqTqzvD77ouqmcdc2oMiCaLNzWy9hK26mOc7O8qx5opnrEUmt2cVDIK0SGwcys12rxxW+ ZQiTSKldM9Sr0ceHjpKSbECUWYJeaSpgQcJhTVd/m+TeVD+k3ZyAyYLLwOUNWb0r8T/D9p xqCK5C1FmxGpos5WWa2uWNB1NBhh8Co8VX5BAHPshUKTApSooENnkRstQGS36Q== 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 4ZLggX3BvLzgPH; Mon, 24 Mar 2025 04:54: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 52O4s0eD051384; Mon, 24 Mar 2025 04:54:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O4s0Xi051381; Mon, 24 Mar 2025 04:54:00 GMT (envelope-from git) Date: Mon, 24 Mar 2025 04:54:00 GMT Message-Id: <202503240454.52O4s0Xi051381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c18a16ebcf5b - main - kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: c18a16ebcf5bf0bad19be10f58d9f42cbc079057 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c18a16ebcf5bf0bad19be10f58d9f42cbc079057 commit c18a16ebcf5bf0bad19be10f58d9f42cbc079057 Author: Konstantin Belousov AuthorDate: 2025-03-24 04:29:15 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-24 04:48:08 +0000 kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_event.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index e891cb7c094a..eb77a5064113 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2974,13 +2974,21 @@ kern_proc_kqueues_out(struct proc *p, struct sbuf *sb, size_t maxlen, bool compat32) { struct sbuf *s, sm; + size_t sb_len; int error; - s = sbuf_new(&sm, NULL, maxlen, SBUF_FIXEDLEN); + if (maxlen == -1 || maxlen == 0) + sb_len = 128; + else + sb_len = maxlen; + s = sbuf_new(&sm, NULL, sb_len, maxlen == -1 ? SBUF_AUTOEXTEND : + SBUF_FIXEDLEN); error = kern_proc_kqueues_out1(curthread, p, s, compat32); sbuf_finish(s); - if (error == 0) - sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen)); + if (error == 0) { + sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen == -1 ? + SIZE_T_MAX : maxlen)); + } sbuf_delete(s); return (error); } From nobody Mon Mar 24 05:45:16 2025 X-Original-To: dev-commits-src-all@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 4ZLhpy45GMz5rQlH for ; Mon, 24 Mar 2025 05:45:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 4ZLhpy0pfjz3Qnp for ; Mon, 24 Mar 2025 05:45:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43d0618746bso25426355e9.2 for ; Sun, 23 Mar 2025 22:45:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742795128; x=1743399928; 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=Zb5ZlYU8E+UfBJpyeOG+V6idyJYTsXu74n1XH87jgyo=; b=fJ5JpUh3ON9+oMCpcxKn5kuxhBws8txxP+RQvEjekgm2GOwnuDsinyXjxAva1+4b0N OdYuLaWK/PfYQd1FgoragQd/ITiJfTCHjiMIIQfl3vBl4GeIUZemBbdzVAqAAQTXy8CP O3sMCJsgCh807RylvKZ3mQtAiNhrbeVDazO1AKCHanohl/SALYFB+l/7RtFVqdq0IVQ2 ImO3zJu3pSrUopdps3zgeiVPj7SmP7OOGNtmPlibhDvLFkLwUmutyzZopB4tfk/CACfT sGpHBAlvTMg6VagelQd+Nyvdm/DDAhYA0zFmwDLFiMNgXJFXiob5v36YNrIPPG8TvySE iDZA== X-Forwarded-Encrypted: i=1; AJvYcCVKxotPJ3EfdysBv8bSxKmder+Oyzy563e0YHTgXRGl9uSJNzGvJjiUn6CJ2q9eC86QX0QQ+AESfJd9SDnnYucRcQGo@freebsd.org X-Gm-Message-State: AOJu0Yy7nK6k9fPcx+bNZe9fZAK/ssjUJn8MiPQTg2xJ34h7wpVyYS09 MlIQxEe3ONY03iFeypKy3bympznSBzx4sJExOJ+gFvWH9u6w5hvs9xKKwa09AL4= X-Gm-Gg: ASbGncs8uRWGWUliC+AnyKsU3iSwCIzecMAOrtMn3URrbXtW9qN2+OSA93WlCIaPQ1g 21DS4kTVEtkHWvwYj+hMDVswGalfdll0t2hp7ygpw0jzpcQsx6smzhq15hGz0UnkBfeCx4kIRqU jn8W3veuxRsnS9GhTV0lJHInIarGSB9byoA3vRA1O2P78FHd5JXmb6+GDCFAPgRK+OJlgvR+95U FEa7PqT3Mf2y26eGSKbuv6i5PBGxwJnM1fzmLAsY1ntnRoHYa72mYqqCFJLwibl255ZjlARTKDc 51Mjv4dr+1BOZgHiBD1iknRHQ/kzuawfDIfFEUSzew2YHXoagMBlX2pG+g9dVIDguzKokA== X-Google-Smtp-Source: AGHT+IGCKY3We6sTpfiR69ngrc7rR4Z+axKMlN/IWkf1K1HsC8tFoEBlbrrCIiJH/A/rImllaIReKg== X-Received: by 2002:a5d:6d81:0:b0:391:29c0:83f5 with SMTP id ffacd0b85a97d-3997f94da3bmr9749968f8f.44.1742795127499; Sun, 23 Mar 2025 22:45:27 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43fdab7asm160191255e9.29.2025.03.23.22.45.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Mar 2025 22:45:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: git: a6ea60aa4887 - main - freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined From: Jessica Clarke In-Reply-To: <202503240407.52O47Sk3059876@gitrepo.freebsd.org> Date: Mon, 24 Mar 2025 05:45:16 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <24EE84A5-EED2-46A4-A6BF-137DE982833B@freebsd.org> References: <202503240407.52O47Sk3059876@gitrepo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3826.300.87.4.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4ZLhpy0pfjz3Qnp X-Spamd-Bar: ---- On 24 Mar 2025, at 04:07, Konstantin Belousov wrote: >=20 > The branch main has been updated by kib: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Da6ea60aa48878d2d0c113f541fb2b9b8= 246ac06b >=20 > commit a6ea60aa48878d2d0c113f541fb2b9b8246ac06b > Author: Konstantin Belousov > AuthorDate: 2025-03-24 04:06:24 +0000 > Commit: Konstantin Belousov > CommitDate: 2025-03-24 04:06:24 +0000 >=20 > freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is = defined >=20 > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > --- > sys/compat/freebsd32/freebsd32.h | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/sys/compat/freebsd32/freebsd32.h = b/sys/compat/freebsd32/freebsd32.h > index c3234141d5a9..3a4625b8e2d3 100644 > --- a/sys/compat/freebsd32/freebsd32.h > +++ b/sys/compat/freebsd32/freebsd32.h > @@ -446,6 +446,7 @@ struct kinfo_vm_layout32 { > uint32_t kvm_spare[12]; > }; >=20 > +#if defined(_WANT_KEVENT32) || (defined(_KERNEL) && = defined(__LP64__)) Please don=E2=80=99t use __LP64__ to mean =E2=80=9Cnot 32-bit=E2=80=9D. = Other ABIs exist downstream. Is there a reason the RHS of the || isn=E2=80=99t just = defined(COMPAT_FREEBSD32)? Jess > struct kinfo_knote32 { > int knt_kq_fd; > struct kevent32 knt_event; > @@ -464,6 +465,7 @@ struct kinfo_knote32 { > } knt_pipe; > }; > }; > +#endif >=20 > struct kld_file_stat_1_32 { > int version; /* set to sizeof(struct kld_file_stat_1) */ From nobody Mon Mar 24 05:51:14 2025 X-Original-To: dev-commits-src-all@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 4ZLhxt2Dscz5rR2D; Mon, 24 Mar 2025 05:51:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.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 mx1.freebsd.org (Postfix) with ESMTPS id 4ZLhxs10bKz3VwH; Mon, 24 Mar 2025 05:51:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 52O5pE13061995; Mon, 24 Mar 2025 07:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 52O5pE13061995 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 52O5pEmb061994; Mon, 24 Mar 2025 07:51:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 24 Mar 2025 07:51:14 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: a6ea60aa4887 - main - freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined Message-ID: References: <202503240407.52O47Sk3059876@gitrepo.freebsd.org> <24EE84A5-EED2-46A4-A6BF-137DE982833B@freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <24EE84A5-EED2-46A4-A6BF-137DE982833B@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4ZLhxs10bKz3VwH X-Spamd-Bar: ---- On Mon, Mar 24, 2025 at 05:45:16AM +0000, Jessica Clarke wrote: > On 24 Mar 2025, at 04:07, Konstantin Belousov wrote: > > > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a6ea60aa48878d2d0c113f541fb2b9b8246ac06b > > > > commit a6ea60aa48878d2d0c113f541fb2b9b8246ac06b > > Author: Konstantin Belousov > > AuthorDate: 2025-03-24 04:06:24 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2025-03-24 04:06:24 +0000 > > > > freebsd32/freebsd32.h: only define kinfo_knote32 when kevent32 is defined > > > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > --- > > sys/compat/freebsd32/freebsd32.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h > > index c3234141d5a9..3a4625b8e2d3 100644 > > --- a/sys/compat/freebsd32/freebsd32.h > > +++ b/sys/compat/freebsd32/freebsd32.h > > @@ -446,6 +446,7 @@ struct kinfo_vm_layout32 { > > uint32_t kvm_spare[12]; > > }; > > > > +#if defined(_WANT_KEVENT32) || (defined(_KERNEL) && defined(__LP64__)) > > Please don’t use __LP64__ to mean “not 32-bit”. Other ABIs exist downstream. > > Is there a reason the RHS of the || isn’t just defined(COMPAT_FREEBSD32)? This line is the verbatim copy of the braces around the struct kevent32 in sys/sys/event.h. I suspect that both kevent32 and kinfo_knote32 definitions can be predicated on just _KERNEL, to be unused for 32bit kernel builds without consequences. From nobody Mon Mar 24 05:57:04 2025 X-Original-To: dev-commits-src-all@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 4ZLj4K1Ylkz5rRS0; Mon, 24 Mar 2025 05:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLj4J6V1dz3brM; Mon, 24 Mar 2025 05:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742795824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGXtFD0o1/CffaglwG0bPHdjmqaOUR0xo5U+ncHpxHU=; b=yHQkbxlM4VQzQYqxaSWs5W9L8lwnAwOgRzaiKnXtqpWlO2jer03GzsN/5K9DWM2GsB4y6l 8NDscxyKYGOSknjYEl0xyc3JBQy56IVFl/QTxfrdz/Sj2T4kJeRJadja6y0vsZEqd8ewBk 4LNPEFl+IpF4fNNh4waPPhCwqDIOofPa04i4ok3tMl/J1AJyVaADDpuwvg9XrTqCe0XMqT Wwk7DNxbqrxKULQZhegrfVhHflHD3f+7/YvlA6/Pb8HOrcfv9dOZLoiuYvwKMB1Suo+Z8x M/9xkcBQ2KPcJfUtxLP3WQTRFhbNyLAYhvNELCdovRcvY6jTLOQN/mT+QFhm/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742795824; a=rsa-sha256; cv=none; b=ZFfL0l9ydqtGNxZVnhZPHFnGENkGI0uR0s3xYmg1rfUlRsTzwqitF0J7M5csQ6W346voiS +18zY7GWrT2xiJmP8yOjHzeMz0JOw2HEoKAMd3JbmrYNEebF8Ug0Svn3gMIJ6tLQmtymut p5yq6kDnQ9Q+353Lz1QIns+910tb7PLyERX/iaBr4T+mnkCaqyrkV1xg7sab9Guia/EW9Q cw0rYUoUB3daAe2dpJtsXg0UzyYGWWndYsf/1dpU5AilNlMEWJ6pRlB3QbTWj/cejSRufo yndh/o8RB+VUF4drVl0xDe2Acz20UVyopOHd82IfUi+yTZsqm765d87P9ba4hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742795824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGXtFD0o1/CffaglwG0bPHdjmqaOUR0xo5U+ncHpxHU=; b=hC2E/3W0NoMY39OiwWu4/yx022dIByQq+Y9BS5qL5ZD9uceAUSzmqguvRTZmjXmpDckkCd XalmurfYuuUcr8LL8mL+HfhEC7Nf39Lsim8FHOrHVrUVlPotE8MCyQyGw+uYfFDOtZb/i1 StVG6uYhpHRHBsqDdqSvS1e9V2AvoiyLfhTWNFvczxjL18AjZZCNbQmhD1Xl6D9NYXBbx9 mzOccHzYUlrrdTvZu7WpEkPqsytlcnMZBNeQaP2L3uLqTDV0pVRI5MAvnS5nOwATUqGXyL aFHf+9U6x6s+qMmDORr+vm1jXS5GVX14QnsPY7EBnUP/vAso054p1GmzgmaIxQ== 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 4ZLj4J60s1zhxQ; Mon, 24 Mar 2025 05:57:04 +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 52O5v4su064467; Mon, 24 Mar 2025 05:57:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O5v4pY064464; Mon, 24 Mar 2025 05:57:04 GMT (envelope-from git) Date: Mon, 24 Mar 2025 05:57:04 GMT Message-Id: <202503240557.52O5v4pY064464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: 4a328b804996 - stable/14 - tcp: fix reverting of spurious timeouts (RTO) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4a328b8049962976d13b8fb9abe2d9a488f2a894 Auto-Submitted: auto-generated The branch stable/14 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=4a328b8049962976d13b8fb9abe2d9a488f2a894 commit 4a328b8049962976d13b8fb9abe2d9a488f2a894 Author: Richard Scheffenegger AuthorDate: 2025-03-21 04:23:30 +0000 Commit: Richard Scheffenegger CommitDate: 2025-03-24 05:35:43 +0000 tcp: fix reverting of spurious timeouts (RTO) One variable that became critical to correctly calculate the cwnd during limited transmit was not properly reverted on detection of spurious timeouts. PR: 282605 Reviewed By: cc, tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D48652 (cherry picked from commit 6f6c07813b38ab04d8b1b2bb87c0291dbae25a25) --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index fe67710fadd6..c868ba648bd7 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -472,6 +472,7 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type) ENTER_CONGRECOVERY(tp->t_flags); tp->snd_nxt = tp->snd_max; tp->t_flags &= ~TF_PREVVALID; + tp->t_rxtshift = 0; tp->t_badrxtwin = 0; break; } From nobody Mon Mar 24 06:12:24 2025 X-Original-To: dev-commits-src-all@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 4ZLjQ40F3Pz5rSRS; Mon, 24 Mar 2025 06:12:28 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLjQ36Pjtz3j0d; Mon, 24 Mar 2025 06:12:27 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742796747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LBW04QgxNWEkXfIN7j747Ma/OHOnhh2c01/Dc4XoggM=; b=MEQYfNP+J4kmjoj0Ze+K+g7nVwadr55qseqRKExS0a9kHlq5IszxCBGkWTzZIRrUxEIA8s szzbhBBmF+IRkEtO3r//wIufFCk8F2xPSonFr6NfVjekIGdQdBpeiKRudShDSbn0RIpRlz ogMOQy0tcdoVdGGUQ1CV8hEZlz4D5n5rIe2QyoF2WpoWO2SEwKds7jDCu0F1/lZwcqT4p3 aFnjPzlVGoUAwdE49SK7euPgBvudqN6TNP/zRy1ka0fnPsXa9b99bPyTSNZs7VWBnQ5X4L dcfene3N6yxUMFlnN6GUSHArSfmW0PEqs6JGB+r4p1BD1hLz+/4T/8tJOxNjiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742796747; a=rsa-sha256; cv=none; b=J3PoHfFXH29Ub64Q56Sfpy+11uBkEq7LRbmGCTgdM+qKBU2N4EYYA51xXVqd3s/Bg/6csf DetM5JNpqwDWK2CavFqozSnPhT89RbXoo0mY/GI4RtkeFtIxsOeVn5wV6uSXp7ggFOkhWo MetkEt+MMlT0JWUVIn2AQSvw7IQnfxcXqHC/ePwxmuFJcf21lQvIVWVChpE/SNYDyrUyI0 rcmVRYMSctCTBjSg25QvV7HjatKN+hZyd8kaiuJzF/yW9MLLtUaZYgpFtihcn2h5qyECeE 8THpAmeI6oJt6SeS9QuGc5dk+aNGM945aKpWJQQHA6Ib6M2YKebmJaGCI4tYgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742796747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LBW04QgxNWEkXfIN7j747Ma/OHOnhh2c01/Dc4XoggM=; b=Iy3zSvUNHHa/4YeaQTjAvyWF2pDAK6w9VkKFI4tiCQT9LRPSbyx/oOxoKETlhqWYxdc13T is2PBznjyjzXhKSWwfaWKqTatOQ5npclAeaCEZisSTDNLBKyG00jZHTRJGsBw/6fIeJLJ9 BV59ZPOqCSGicAQcQuApjE7ffAr9BC/YhxSE8QuB8k83Jq1oMeaMei0AnQJOqXwptDkjXM KommUC3Qh3v4ErWsmFPHeBjUlW2Ua09nb8g5Iaqu62BDOnDvQUsHeIwzj6YYzmoE7Ax2Jp ZITrsNoBH0VGtRfbkeaWakYviwMNToE7fl1LL1dU/aBmRctRFamLFrjg3UAzsA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.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) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLjQ31MCqz25G; Mon, 24 Mar 2025 06:12:27 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sun, 23 Mar 2025 23:12:24 -0700 From: Gleb Smirnoff To: Kristof Provost , igoro@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0849f1634a70 - main - tests/netinet: add test for IP_MULTICAST_IF Message-ID: References: <202503222340.52MNekCX071219@gitrepo.freebsd.org> <7440BE85-66E8-4D1A-AC15-8B944F5C2951@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7440BE85-66E8-4D1A-AC15-8B944F5C2951@FreeBSD.org> On Mon, Mar 24, 2025 at 11:45:55AM +0900, Kristof Provost wrote: K> > tests/netinet: add test for IP_MULTICAST_IF K> > K> It bugs me a little that we have to jump through hoops to get a C program K> running in a specific jail/network setup. K> It’s somewhat common for that to happen, and I’m sure there’d be more cases K> if it were easier to do (e.g. the getaddrinfo tests you’ve been working on K> could be even more useful with a custom DNS server, so in their own vnet K> jail). It bugs me, too. :) Igor has already pushed changes that allow you to specify in the Makefile: TEST_METADATA.foo+= "execenv="jail" execenv_jail_params="vnet" Then this gets into Kyuafile after build. This is a step forward, but not enough. First problem is that the created jail is empty and doesn't have any interfaces. Second problem is that the specified environment affects all tests inside one test file. Ideally we'd like to have a declarative language to describe jail environment for a test. This is basically what vnet.subr does for shell tests and what atf_python.sys.net.vnet does for python tests, but brought to kyua level and of course agnostic to the language of a test. Igor is thinking in this direction and hopefully will eventually deliver something. K> The downside is that we’re compiling the C test code on every run, but I K> expect test programs to be tiny, so that’s not too much of a cost. K> K> Does this seem useful to you too? That would fail on decreased installation, that has tests, but doesn't have compiler. This is not just a made up problem, this is what many would do in CI, cause you want usually as quick as possible response time from CI, and if your team is not hacking the compiler, you won't add compiler to the CI build. -- Gleb Smirnoff From nobody Mon Mar 24 06:33:36 2025 X-Original-To: dev-commits-src-all@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 4ZLjtn4JkHz5rTf6; Mon, 24 Mar 2025 06:33:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLjtn3flVz3v9Q; Mon, 24 Mar 2025 06:33:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742798033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nEXwySIoNlBOQXpauglcM1w5Kg8OF5mv0X44SOh+Da0=; b=klb7cHUpcbegKysGMeN9GCZ3DJP4Mi9QbzrZGkEdMM73Ck4XZCxLVdloXHdBl9qkg2RIdQ v56ud5VHHFr8uVE12d2DrFTH8wK0dIgpAJVL0YznH7YFABSNK6wZrGzWrIR7dkCC3Ef5D3 S9RHsN1ML9hlon621ip/hwyZt7wJThsSougy/uGg8NoKn7k84gRkFz8BynxqBQHTA0SeZn O3itRZOh6YxmXTo9wpbGgL/jTg7JEaKljW1FvBoPoV8UTe51qqK9AWTx3BeeNw6KmPurUW wItbpKG91rc1NIsHMIEckrqIOVHBBwfEFBNrK11TClewC8ITGBDxE6XNZM7iaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742798033; a=rsa-sha256; cv=none; b=WIfjaSX98W1AJwgM3YTxW2MAE2H+X0gv1NGsT+NcGrC7c1yv3Tc8TTGzFvUAFn9JXVECQ8 dKDYUvnotKNc6Cy7lG1ZT0BfO4YvC7wEZFUcMB9qsrDUdWWXp//jeXYuiwhMVApO24wVVf JX/6I3j9nnRXejGIYfDgyPNZYNgek2kU/ItGXFXTwJy7r9NsDGCY/nZf/lm/cTsJvdaSom tV2q33u9/xcV2dPo6FolkHHUxuucu+Sf2bbB9V9AjTzuxl4pdl0SW3+IiPoaxqwO/LYiCB LeBE/X5RA+p5s/oiRXn9YLeT5cWYkSGI6veIHfxZPHEjARlWCbfYzhmMFdXp6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742798033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nEXwySIoNlBOQXpauglcM1w5Kg8OF5mv0X44SOh+Da0=; b=YzjnHm7ZMCswG0Utdi7y4d1Mcf/hVj84EY61pav4oImRm+PwT+2p0EM7mSkSnX3LRQ1waB PYrx+hjTSm2+iSdn+AKcxJdK0Sa8luOsrFfiAqtU7PmAr+aGjC3wvuadG+5LHnVR8BykjN xg7AJkgFVLTcrSYbHcjGYU5aJO7VQy+r3SIMZbFyJvtTOlSzd+HIfNwBarFltdwAx9+XW4 XgeXsUyb88/0aXAH4ndOKyXbJvC3eYC9NjnYmFPxXS+0aSEr2emY0o3L0/eeR9DZT6CaNL knwUWJ5YO9AaUprIzMyIkTJ1aG6BRbzexvAy8N/YALOiqBQCChYO8cC4U8pbtg== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R10" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLjtn2MPJz25S; Mon, 24 Mar 2025 06:33:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 7CA861EF21; Mon, 24 Mar 2025 07:33:44 +0100 (CET) From: Kristof Provost To: Gleb Smirnoff Cc: igoro@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0849f1634a70 - main - tests/netinet: add test for IP_MULTICAST_IF Date: Mon, 24 Mar 2025 15:33:36 +0900 X-Mailer: MailMate (2.0r6222) Message-ID: In-Reply-To: References: <202503222340.52MNekCX071219@gitrepo.freebsd.org> <7440BE85-66E8-4D1A-AC15-8B944F5C2951@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; markup=markdown Content-Transfer-Encoding: quoted-printable On 24 Mar 2025, at 15:12, Gleb Smirnoff wrote: > On Mon, Mar 24, 2025 at 11:45:55AM +0900, Kristof Provost wrote: > K> > tests/netinet: add test for IP_MULTICAST_IF > K> > > K> It bugs me a little that we have to jump through hoops to get a C pr= ogram > K> running in a specific jail/network setup. > K> It=E2=80=99s somewhat common for that to happen, and I=E2=80=99m sur= e there=E2=80=99d be more cases > K> if it were easier to do (e.g. the getaddrinfo tests you=E2=80=99ve b= een working on > K> could be even more useful with a custom DNS server, so in their own = vnet > K> jail). > > It bugs me, too. :) Igor has already pushed changes that allow you to s= pecify > in the Makefile: > > TEST_METADATA.foo+=3D "execenv=3D"jail" execenv_jail_params=3D"vnet" > The primary intent behind that was to allow for parallel test execution. A lot of tests, and a lot of this is my fault, use the same network range= s and jail names, so if we run them at the same time they=E2=80=99d confl= ict and break in unexpected ways. Running them inside a vnet jail avoids this issue. I was actually looking at adding this to your multicast tests, but you do= n=E2=80=99t assign addresses on the host=E2=80=99s epair, so there=E2=80=99= s not much point. > Then this gets into Kyuafile after build. This is a step forward, but n= ot > enough. First problem is that the created jail is empty and doesn't hav= e any > interfaces. Second problem is that the specified environment affects al= l tests > inside one test file. > > Ideally we'd like to have a declarative language to describe jail envir= onment > for a test. This is basically what vnet.subr does for shell tests and = what > atf_python.sys.net.vnet does for python tests, but brought to kyua leve= l and of > course agnostic to the language of a test. Igor is thinking in this di= rection > and hopefully will eventually deliver something. > Interesting idea. I fear it would be difficult to get something that=E2=80= =99s expressive enough to cover all the cases we care about, while still = being simple enough to be easy to use. On the other hand, perhaps we don=E2=80=99t need something that covers 10= 0% of cases. We=E2=80=99re probably never going to be able to build the s= orts of complex setups (for values of complex that are =E2=80=98three jai= ls with routes, a simple daemon in one or more and some pf rules) I often= build for pf tests, but perhaps we can cover 80% of cases with a simple = =E2=80=9CBuild a jail with one interface with a known address and a defau= lt route=E2=80=9D. Perhaps a =E2=80=98execenv_jail_init=3Dfoo.sh=E2=80=99 calling a separate= script to do the setup? > K> The downside is that we=E2=80=99re compiling the C test code on ever= y run, but I > K> expect test programs to be tiny, so that=E2=80=99s not too much of a= cost. > K> > K> Does this seem useful to you too? > > That would fail on decreased installation, that has tests, but doesn't = have > compiler. This is not just a made up problem, this is what many would = do in > CI, cause you want usually as quick as possible response time from CI, = and if > your team is not hacking the compiler, you won't add compiler to the CI= build. > That=E2=80=99s a good point, and not something I think we can reasonably = do from atf-sh. Not unless we do a pre-processing step during =E2=80=98ma= ke install=E2=80=99 (on top of the =E2=80=98add the shebang line=E2=80=99= we already do) to extract C code, build it and install it somewhere the = test can find it. I think I don=E2=80=99t dislike the current approach enough to try that. Best regards, Kristof From nobody Mon Mar 24 06:41:19 2025 X-Original-To: dev-commits-src-all@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 4ZLk3N6n2Jz5rTk1; Mon, 24 Mar 2025 06:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLk3N1Jjlz3x8P; Mon, 24 Mar 2025 06:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742798480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaKeY98C+nm73FkC89QuLNuMqVtSqhLm3e1RFzZ34qg=; b=ymianBXNcvlNA4k1P3isIw67GwyXoR2hIQYv668jvpjRvo+3vD/7OzJkHnI7Prjjf5MeJr nVbZoZ57CLsEoVUcPAsPRuFy0dXagfy6A4BmSA91/hFaXiP3yH01ofkAYlRWDxBjauKLKI rpOXRrP9aLbkOMmmP5oRyAygNARiXl5vdmbJosYXkQSknu5ovePNaj1bqrUUO82g3rNaa5 BzxiSOWvC7+fqSVcbUyMYHYtXLnyjSekDUkJunSQvbq9yRBuCEkPmd+RaiUJp/BDzRM5RD Wn942Tb7TVaXpwLeOHCnvEUv2oO5ze81YDhQ9pviqzqZPTUlFZMOwz/AD7ntVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742798480; a=rsa-sha256; cv=none; b=v6Zldf5qtqDMUinJCSi5E/rYQ0prB9cDQElouOB61WoIFZQ5eWO09lIWZTX89aw55x/vzZ jUeIxMg2ZqYL1TASVLgzUKkFRaXWjuV7Y5hWkrnjHhDd+zJmZX0kLqbCh71w5fVyCMpYlc xEU5XcMX4eqDI9LLWMxLlxxDGaxpTZBdbvYTxZodHYhNPz557NQMTymVUIkWNNIfjo4AFO 89WoITnyhBtiAwMHQjJKHtDNCzf7Lop5nIQbNhS9ArpkaeHc9cWu6/GcjiuciRpedJJ03A CM8ndHc+XV5j6YBbBW09lYJTUA+8Q1nfi2tlXOqfS8oZKNUyhmhhLJ5w5sDBiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742798480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WaKeY98C+nm73FkC89QuLNuMqVtSqhLm3e1RFzZ34qg=; b=BSl1L5c//OvP2eEJkzaRwHuU27pmo4VJWzeRJWbpAoIe8rpFHyJmvFWjv4F1e1VRmmRTIY +T+bQ47jmv4FNh06zf1EbarnSQiwFBKVn/z/oykp8X7qltfu6UxlPKsA+DIdV9mRgw25Iz bszQWM7cdqNME8EC8hXEkG0P+5BEOOc94zbFIcDg07X92HCcWaubbKkStZeNYRU2vOSL2V 0onr/bEbHzjf8o+bEy/of2yxJUpKuXkf6Q74iKn9bo0jxEOndZWzqkPM5tV0A911IMJXaP HYJRZvJnl9ZMEglqALyoWai14QqR004fwILMGy4kxXMxq/zG+Ya16BUjASLrbw== 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 4ZLk3M6SzHzjxt; Mon, 24 Mar 2025 06:41:19 +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 52O6fJgX052827; Mon, 24 Mar 2025 06:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O6fJuG052824; Mon, 24 Mar 2025 06:41:19 GMT (envelope-from git) Date: Mon, 24 Mar 2025 06:41:19 GMT Message-Id: <202503240641.52O6fJuG052824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 67c1c4dfd1cc - main - sockbuf: provide sbunreserve_locked() which is a complement to sbreserve() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67c1c4dfd1ccf7d46271bfbabc403dc0534c1631 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=67c1c4dfd1ccf7d46271bfbabc403dc0534c1631 commit 67c1c4dfd1ccf7d46271bfbabc403dc0534c1631 Author: Gleb Smirnoff AuthorDate: 2025-03-24 06:40:50 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-24 06:40:50 +0000 sockbuf: provide sbunreserve_locked() which is a complement to sbreserve() The sbreserve() works only on protocol-independent parts of the sockbuf, but sbrelease() also clears the generic sockbuf mbuf chain. Calling the latter to undo changes done by the former is not correct. The new function is the right thing. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D49364 --- sys/kern/uipc_sockbuf.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 48984046ea8a..ec00878cd9a5 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -75,6 +75,7 @@ static void sbcompress_ktls_rx(struct sockbuf *sb, struct mbuf *m, struct mbuf *n); #endif static struct mbuf *sbcut_internal(struct sockbuf *sb, int len); +static void sbunreserve_locked(struct socket *so, sb_which which); /* * Our own version of m_clrprotoflags(), that can preserve M_NOTREADY. @@ -618,7 +619,7 @@ soreserve(struct socket *so, u_long sndcc, u_long rcvcc) SOCK_SENDBUF_UNLOCK(so); return (0); bad2: - sbrelease_locked(so, SO_SND); + sbunreserve_locked(so, SO_SND); bad: SOCK_RECVBUF_UNLOCK(so); SOCK_SENDBUF_UNLOCK(so); @@ -683,6 +684,18 @@ sbreserve_locked(struct socket *so, sb_which which, u_long cc, return (sbreserve_locked_limit(so, which, cc, sb_max, td)); } +static void +sbunreserve_locked(struct socket *so, sb_which which) +{ + struct sockbuf *sb = sobuf(so, which); + + SOCK_BUF_LOCK_ASSERT(so, which); + + (void)chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, 0, + RLIM_INFINITY); + sb->sb_mbmax = 0; +} + int sbsetopt(struct socket *so, struct sockopt *sopt) { @@ -786,9 +799,7 @@ sbrelease_locked(struct socket *so, sb_which which) SOCK_BUF_LOCK_ASSERT(so, which); sbflush_locked(sb); - (void)chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, 0, - RLIM_INFINITY); - sb->sb_mbmax = 0; + sbunreserve_locked(so, which); } void From nobody Mon Mar 24 06:41:18 2025 X-Original-To: dev-commits-src-all@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 4ZLk3M26Hsz5rTh1; Mon, 24 Mar 2025 06:41:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLk3L6GW1z3x3l; Mon, 24 Mar 2025 06:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742798478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OlSI+Jt5XSxtV6qtEI18A6kktfWJIhikFaa6+rcdeOQ=; b=xMnrYvOeTMJwGFJkX996h1HWVy9oR8lWmwcmWZNjqORQdCGukuHo1iNyX3xczs3sIcE8F2 xUo01WOfXYyR+zBZpjwCnzhap+R89ht/2qgvBGCk3BQXlg8CHvjUM3FI6hIfVaIaCdp9GI eOdhKHCRrlJ44PL5vk1aya3jU4Gxs2D+yYSFwfMw+4/XuQlIUp7xZDdyTgMBM60ZCymsPl 3D5EqKI2d0+yXrRnQ1Vb/MaGddc3Yck9MSqQqqu7bpEbiE6Clm74i7J97a947p4jGpdA8b 4A7Vhe+U1QNRGK+RWQqeZle9HzmocN2X7veDppskdGOZyEOvxxFVzIFnPSN/2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742798478; a=rsa-sha256; cv=none; b=RHTQwcUqxO09XQisPYJ4zQb0LdMqL5e9WojykG0Meo6v5bfjLMhkasjcJGIEvTKOYACvJd U/AeKFrdCfFSPCE1aGgU5CqiOjr9Dq/d9cONjfN2MYSUmDZNZUB+L/3B1q6Wv22u+Ia8Ns BUIPbuuDMWvWAycjiY0cT9BFJPwqihHteHVbMwNX0UzrBJ9Fc/JwgqDwdz8VVT1/0Uo7HT SOsLBnZUqINrKsrWVuDvx0iGTmfC9D70ouY9+IyZRg2TCQ3Qd8FQZruVUEdjlY6CIS7OjB Qo6S1v4e4BLyLXFAEhntTSUDvDhceK8M8dGbRpcY8Xhws+yGPRlz1M4qZRzkLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742798478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OlSI+Jt5XSxtV6qtEI18A6kktfWJIhikFaa6+rcdeOQ=; b=G/70VFit5BWrN/u5UVq/uD8vd+n5U2JIFqxeDaOutW7nkdNre2tCzyC9DWgnPL2wOnVwEU Mpi+EJSMa4vUaPALTiblp4t1a5vnA9qvP3SAbL9lORdFrDsgoKQRP58asIdXFUq4kvKs17 nKatyRE7WKyHJa5Nko6YXgB3RytNQZXXg4rVRIcJWd/rXnPp5ut8jadSaiR4ltAoNAaPLw VQT69UUtKAf6uvuG4WuZvrz4lYw8k92JkFpzImIZ0qeduph3Se7JU7VP6YFXrjz905gUdB iRrVREiEqTqjGJjcz2f5XM18fPvhPGBPMyAMY9BNpZujc1VdQNBqhF3Cx5ktGg== 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 4ZLk3L5fmyzjxs; Mon, 24 Mar 2025 06:41: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 52O6fITi052786; Mon, 24 Mar 2025 06:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52O6fIF8052783; Mon, 24 Mar 2025 06:41:18 GMT (envelope-from git) Date: Mon, 24 Mar 2025 06:41:18 GMT Message-Id: <202503240641.52O6fIF8052783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 371392bc10f2 - main - sockbuf: remove sbflush_internal() and sbrelease_internal() shims List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 371392bc10f262a71c197a64d3815d930f8527fe Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=371392bc10f262a71c197a64d3815d930f8527fe commit 371392bc10f262a71c197a64d3815d930f8527fe Author: Gleb Smirnoff AuthorDate: 2025-03-24 06:40:19 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-24 06:40:19 +0000 sockbuf: remove sbflush_internal() and sbrelease_internal() shims This functions serve just one purpose - allow to call sbdestroy() from sofree() without triggering unlocked mutex assertions. Let's just don't save on locking with INVARIANTS kernel and this will allow to clean up all these shims. Should be no functional changes. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D49363 --- sys/kern/uipc_sockbuf.c | 34 ++++++++++------------------------ sys/kern/uipc_socket.c | 18 +++++++++++++----- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index e8d410b00c15..48984046ea8a 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -75,7 +75,6 @@ static void sbcompress_ktls_rx(struct sockbuf *sb, struct mbuf *m, struct mbuf *n); #endif static struct mbuf *sbcut_internal(struct sockbuf *sb, int len); -static void sbflush_internal(struct sockbuf *sb); /* * Our own version of m_clrprotoflags(), that can preserve M_NOTREADY. @@ -779,24 +778,17 @@ sbsetopt(struct socket *so, struct sockopt *sopt) /* * Free mbufs held by a socket, and reserved mbuf space. */ -static void -sbrelease_internal(struct socket *so, sb_which which) -{ - struct sockbuf *sb = sobuf(so, which); - - sbflush_internal(sb); - (void)chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, 0, - RLIM_INFINITY); - sb->sb_mbmax = 0; -} - void sbrelease_locked(struct socket *so, sb_which which) { + struct sockbuf *sb = sobuf(so, which); SOCK_BUF_LOCK_ASSERT(so, which); - sbrelease_internal(so, which); + sbflush_locked(sb); + (void)chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, 0, + RLIM_INFINITY); + sb->sb_mbmax = 0; } void @@ -818,7 +810,7 @@ sbdestroy(struct socket *so, sb_which which) ktls_free(sb->sb_tls_info); sb->sb_tls_info = NULL; #endif - sbrelease_internal(so, which); + sbrelease_locked(so, which); } /* @@ -1530,10 +1522,12 @@ sbcompress_ktls_rx(struct sockbuf *sb, struct mbuf *m, struct mbuf *n) /* * Free all mbufs in a sockbuf. Check that all resources are reclaimed. */ -static void -sbflush_internal(struct sockbuf *sb) +void +sbflush_locked(struct sockbuf *sb) { + SOCKBUF_LOCK_ASSERT(sb); + while (sb->sb_mbcnt || sb->sb_tlsdcc) { /* * Don't call sbcut(sb, 0) if the leading mbuf is non-empty: @@ -1548,14 +1542,6 @@ sbflush_internal(struct sockbuf *sb) sb->sb_ccc, (void *)sb->sb_mb, sb->sb_mbcnt)); } -void -sbflush_locked(struct sockbuf *sb) -{ - - SOCKBUF_LOCK_ASSERT(sb); - sbflush_internal(sb); -} - void sbflush(struct sockbuf *sb) { diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index c27b007cafc6..63d30f04c8e0 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1862,14 +1862,22 @@ sofree(struct socket *so) if (pr->pr_detach != NULL) pr->pr_detach(so); - /* - * From this point on, we assume that no other references to this - * socket exist anywhere else in the stack. Therefore, no locks need - * to be acquired or held. - */ if (!(pr->pr_flags & PR_SOCKBUF) && !SOLISTENING(so)) { + /* + * From this point on, we assume that no other references to + * this socket exist anywhere else in the stack. Therefore, + * no locks need to be acquired or held. + */ +#ifdef INVARIANTS + SOCK_SENDBUF_LOCK(so); + SOCK_RECVBUF_LOCK(so); +#endif sbdestroy(so, SO_SND); sbdestroy(so, SO_RCV); +#ifdef INVARIANTS + SOCK_SENDBUF_UNLOCK(so); + SOCK_RECVBUF_UNLOCK(so); +#endif } seldrain(&so->so_rdsel); seldrain(&so->so_wrsel); From nobody Mon Mar 24 13:30:23 2025 X-Original-To: dev-commits-src-all@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 4ZLv7N6VMwz5rvxk; Mon, 24 Mar 2025 13:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLv7N5DsRz3t6T; Mon, 24 Mar 2025 13:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742823024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h907+EpohH2WTtgCwwtFIyNULu1V89bbczNSuZOuxQE=; b=fRaui+KLlW5K+MakKDcTpvDvr59H45dbAxY+sAgftLeWWdxDWL9Ud9zXhOfaY+N7lvrUwT 3NmDG7kBNuKUz9vhUJVHmbGoEKwhhMXBVmPCOSgfT28jSW/iWxYk7aq/N7uskgpWWbk90T 5Ci4VnttscOLb7Z9GxTeJR/qq+3DXq4wlWqtueDQbqDzome8wdCMo5XJZoAGKotX/fT/hW U2sLPENfNqMuSFX22BosGCWsIhWfzFcxAdw2NRmBOtEzWjST8/3EDbFarnNdFf/EtPLMXc k9QCUfiLJl1MmrOyWXuXKupNijYSN/StllaEozpex/mL0pL4hedxTujTSaH0oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742823024; a=rsa-sha256; cv=none; b=Bvltt9UWYa5gGk1vaBcfyeLnq6BPOBNbTO9p0lrAvcb+gNLPi8aaPbx+D0AxTZS15z/yBs /Fzeq4gSMN5pEPNENbJ1LtYAiyy96+oOEB9Wu1RDwRtJJWUitOJmWcIEI9vKfWWY0C8mnN rliXFvuGW+xQo4UCaPfdDLQUfONhNg2jhAsBo4pQzXYJGmx1/XSsv3N8pbJwaXKuWLWTyn kWu1gPFcBSiGv74lzwaZ7g7/gueW4uMgiXPwP2hQ8/zaAnPUq0KS4Q+1kM1LB5Cu87jeWC OkDYVdiNMVwWdDVbVjxpTgDFuBtt6SqrHwmbpC1hatvCPrGN0yFdW8hWAFz7TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742823024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h907+EpohH2WTtgCwwtFIyNULu1V89bbczNSuZOuxQE=; b=Nie4dJDVqPsC54pza1F554w+3UIU/MXmQQ5YKj4NXycdc0GvnNYKKHJ+j8YpGLASX783bI HJIYIVK9kS6MOA8G0Sy23qDOcFcWjJ1n6PlHCKUXKPl899Banq+IKmURsYlFJC14zXIuFY q1Om0ZtUnVSo09Sv0/JwT8LTtr6oYy6C1dlXZVjdkpwmQCE/5OEcTjKQeGeDeqG7+DuiI9 ogWeyFOCuAingGL/PGAu9sq+enaoFPYuUHmkbKLbevl6+2pLN4FjLKj50n2UF0IZlDrhSv aC7Ad7DHfxfa0WxpgHWtof6tPYja9HfGRuSaw0Qf9wbGjXrAgEsJP6ahEO7HrQ== Received: from [IPV6:2601:5c0:4200:b830:c071:16c3:77e4:59b3] (unknown [IPv6:2601:5c0:4200:b830:c071:16c3:77e4:59b3]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLv7N2jxnz8RW; Mon, 24 Mar 2025 13:30:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <02b98558-1143-4540-beb0-a4d1e0ccfb77@FreeBSD.org> Date: Mon, 24 Mar 2025 09:30:23 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 623be660fcc9 - main - beep: add missing include of src.opts.mk, use LIBADD instead of LDFLAGS Content-Language: en-US To: Chuck Silvers , Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202503192022.52JKMaUG019132@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/19/25 16:23, Chuck Silvers wrote: > On Wed, Mar 19, 2025 at 08:44:13PM +0000, Brooks Davis wrote: >> On Wed, Mar 19, 2025 at 08:22:36PM +0000, Chuck Silvers wrote: >>> The branch main has been updated by chs: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=623be660fcc9860c0e8b99e8c2c4bbdefc121fd1 >>> >>> commit 623be660fcc9860c0e8b99e8c2c4bbdefc121fd1 >>> Author: Chuck Silvers >>> AuthorDate: 2025-03-19 19:48:10 +0000 >>> Commit: Chuck Silvers >>> CommitDate: 2025-03-19 19:48:10 +0000 >>> >>> beep: add missing include of src.opts.mk, use LIBADD instead of LDFLAGS >>> >>> Sponsored by: Netflix >>> --- >>> usr.bin/beep/Makefile | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/usr.bin/beep/Makefile b/usr.bin/beep/Makefile >>> index f252ab64f843..8388ff7ff986 100644 >>> --- a/usr.bin/beep/Makefile >>> +++ b/usr.bin/beep/Makefile >>> @@ -1,6 +1,7 @@ >>> +.include >> >> Why add src.opts.mk? Nothing is using it and bsd.prog.mk will include >> it. Is there another change coming that will use it? >> >> -- Brooks >> >>> + >>> PROG= beep >>> MAN= beep.1 >>> - >>> -LDFLAGS= -lm >>> +LIBADD= m >>> >>> .include >>> > > the motivation for these changes is that I want to be able to add something > to LDFLAGS in /etc/src.conf and have that actually affect every executable > and shared library that is built. > > we don't actually care about beep or trim, I just noticed that they were > not getting the LDFLAGS from src.conf and thought I would fix them > for completeness. adding the include of src.opts.mk seemed to fix that. > also, a great many makefiles include src.opts.mk as the first thing and > I thought that was just some boilerplate that was expected to be done > everywhere and had been overlooked in these two. > > at that point I had not changed the usage of LDFLAGS in these two makefiles. > then as I was arranging this stuff to commit, I grep'ed for other makefiles > that assign rather than append to LDFLAGS (like I had found in bsnmpd) > and found that these same two makefiles also incorrectly assigned to LDFLAGS, > so then I added the other changes you see in those two commits. > > I'm not sure why I thought that including src.opts.mk without changing > the LDFLAGS usage made things work initially. I tried that again just now > and indeed it doesn't help, and the parts that remove the assignment to LDFLAGS > are enough. maybe I had something stale in my obj dir before? > > anyway, I'd be happy to remove the include of src.opts.mk from these again > if you'd like. I do think we shouldn't keep the extra src.opts.mk includes unless they are needed. The typical use case for including that early is if a Makefile needs to test some of the variables it sets (e.g. MK_FOO). -- John Baldwin From nobody Mon Mar 24 15:06:28 2025 X-Original-To: dev-commits-src-all@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 4ZLxGH0XRJz5s2BP; Mon, 24 Mar 2025 15:06:31 +0000 (UTC) (envelope-from SRS0=qcs0=WL=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.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 mx1.freebsd.org (Postfix) with ESMTPS id 4ZLxGG4BLYz3Yfm; Mon, 24 Mar 2025 15:06:30 +0000 (UTC) (envelope-from SRS0=qcs0=WL=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Date: Mon, 24 Mar 2025 16:06:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1742828788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L/8y4OpZBabNdHUlLaigtbAZ0qvJya1pqM2XNPLqKk8=; b=UhcYME0mXQlyuw/3608L7T+C+QFqv9c410DLKRrsEmQ5wq1B1ZztI+KqpHL2l3TMnQnti6 Ef0ChzEnJDq3bl9otu15qzeCC8lO2F8PdpC/fYDRvOdFUWc8WG7Bs0lRZwjZ4bdi2rKX/a OUppht5zCNDGygVcN/NzR9i1vjrF3+vOpIzg2LYT5WCW9+C8ZAE44jsI15NM1Il4YOKOwt jfR1JjHyXrm6O4OWa5d9HxwGGSd7NENZQQ1dIf40DNucsmSwp3O9UJM34ZI9TwOcviItYO Q7G1M1icqNLjwiMViDMtGg5sK9+tpx4YA0fBrHtnpjnCsjaZhfnFTvAPrVx6VQ== From: Ronald Klop To: Konstantin Belousov Cc: dev-commits-src-all@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <1305725331.9507.1742828788168@localhost> In-Reply-To: <202503240454.52O4s0Xi051381@gitrepo.freebsd.org> References: <202503240454.52O4s0Xi051381@gitrepo.freebsd.org> Subject: Re: git: c18a16ebcf5b - main - kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9506_724619219.1742828787966" X-Mailer: Realworks (743.26) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL] X-Rspamd-Queue-Id: 4ZLxGG4BLYz3Yfm X-Spamd-Bar: ---- ------=_Part_9506_724619219.1742828787966 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Konstantin Belousov Datum: maandag, 24 maart 2025 05:54 Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Onderwerp: git: c18a16ebcf5b - main - kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c18a16ebcf5bf0bad19be10f58d9f42cbc079057 > > commit c18a16ebcf5bf0bad19be10f58d9f42cbc079057 > Author: Konstantin Belousov > AuthorDate: 2025-03-24 04:29:15 +0000 > Commit: Konstantin Belousov > CommitDate: 2025-03-24 04:48:08 +0000 > > kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen > > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > --- > sys/kern/kern_event.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c > index e891cb7c094a..eb77a5064113 100644 > --- a/sys/kern/kern_event.c > +++ b/sys/kern/kern_event.c > @@ -2974,13 +2974,21 @@ kern_proc_kqueues_out(struct proc *p, struct sbuf *sb, size_t maxlen, > bool compat32) > { > struct sbuf *s, sm; > + size_t sb_len; > int error; > > - s = sbuf_new(&sm, NULL, maxlen, SBUF_FIXEDLEN); > + if (maxlen == -1 || maxlen == 0) > + sb_len = 128; > + else > + sb_len = maxlen; > + s = sbuf_new(&sm, NULL, sb_len, maxlen == -1 ? SBUF_AUTOEXTEND : > + SBUF_FIXEDLEN); > error = kern_proc_kqueues_out1(curthread, p, s, compat32); > sbuf_finish(s); > - if (error == 0) > - sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen)); > + if (error == 0) { > + sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen == -1 ? > + SIZE_T_MAX : maxlen)); > + } > sbuf_delete(s); > return (error); > } > > > > As maxlen is of the unsigned type size_t, how can it be -1? Or am I mistaken on this? Regards, Ronald. ------=_Part_9506_724619219.1742828787966 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Konstantin Belousov <kib@FreeBSD.org>
Datum: maandag, 24 maart 2025 05:54
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Onderwerp: git: c18a16ebcf5b - main - kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c18a16ebcf5bf0bad19be10f58d9f42cbc079057

commit c18a16ebcf5bf0bad19be10f58d9f42cbc079057
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-03-24 04:29:15 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-03-24 04:48:08 +0000

    kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/kern_event.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index e891cb7c094a..eb77a5064113 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -2974,13 +2974,21 @@ kern_proc_kqueues_out(struct proc *p, struct sbuf *sb, size_t maxlen,
     bool compat32)
 {
    struct sbuf *s, sm;
+   size_t sb_len;
    int error;
 
-   s = sbuf_new(&sm, NULL, maxlen, SBUF_FIXEDLEN);
+   if (maxlen == -1 || maxlen == 0)
+       sb_len = 128;
+   else
+       sb_len = maxlen;
+   s = sbuf_new(&sm, NULL, sb_len, maxlen == -1 ? SBUF_AUTOEXTEND :
+       SBUF_FIXEDLEN);
    error = kern_proc_kqueues_out1(curthread, p, s, compat32);
    sbuf_finish(s);
-   if (error == 0)
-       sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen));
+   if (error == 0) {
+       sbuf_bcat(sb, sbuf_data(s), MIN(sbuf_len(s), maxlen == -1 ?
+           SIZE_T_MAX : maxlen));
+   }
    sbuf_delete(s);
    return (error);
 }
 



As maxlen is of the unsigned type size_t, how can it be -1?
Or am I mistaken on this?

Regards,
Ronald.
  ------=_Part_9506_724619219.1742828787966-- From nobody Mon Mar 24 15:59:20 2025 X-Original-To: dev-commits-src-all@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 4ZLyRM6jpjz5s4yw; Mon, 24 Mar 2025 15:59:27 +0000 (UTC) (envelope-from olce@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLyRM5kJdz3vWk; Mon, 24 Mar 2025 15:59:27 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742831967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=La21LZPWlDF0KZGpfolShJma4MAor55llO4s+56WvVU=; b=Ac6D/vlBYU/jWU0oPW1PAI/gJRf5y/EJNPdPk1zT2AjGC0iyD9PIZJT6f7wK07TC3LGsHE YfllHJ5MMP7m9Hyz/PWzTxnF/TFf/M6/287MqN9Zhj9GmjVoOU92L1fwzNlig57h8TEqvp uim4UJbcufaZNhyVMJ9t+Ql8atN/D4kHadvoE7l6z5uJ/b0jExZ15bnjdkN4Xu0I0AouYy OtiaoYMI4MdZtGViGOHsLH4WHvUH3ipWKYxClxlR/I6PXdAKZUXMw/f+Hd+s8vOgKLdd+6 MYtjECNzHuZ27dBcnWjpDKL6A6Pih55No3RqP7k+pu6KBfvmzKtbiKYpEMWaTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742831967; a=rsa-sha256; cv=none; b=gwzdnKeiSbxHNAVDfaORR6pQRhyT2N5R4NXmKIF1qWR+FbQlb8g6RzuSAm2Ot475xnbINf WFieFmPNa8vfCp7YeF2Qf0ErFwL8BH7Ea3Qfw2cL9w8eFh39x52PP200+kSv9jQMUxX8FB 4ZeC+5QVdi/8Vg9cbL4G5x87PhgbPf3Jt4DLjGnal/Ja3jjn3QWzkUZJzJMulxTQ2tL/4b OXkYYqD0r/MjbZYPIDxnZTvNKPHSLfyyLv5TMEOiPjiFmpRqVV7fiHcvPUS2040BTHpHP9 27wAwEErMQIVblQ5G5169JKIQiskiVpF+/e30U+9kSAqbHQvMLVbLpDiK9I2oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742831967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=La21LZPWlDF0KZGpfolShJma4MAor55llO4s+56WvVU=; b=UxoDvdtiXQOI8xBoAcoTUA9T/Lc3Gszs86TKSPs1WWR5la+W2I/CptJXeiuKX233gKzbUi n06Vd0Qb03cSqGZcRWfCGlxT0JaFigf7upzy+pvrYjskYaKYtgADZth1lsFDtsp82xG/sL SI5oB7TFHseAFsBlvuTgIFU6GpIT0I8aXXZDQz/1cgzW/rcvyUPE2H8qOa+Ktera6HsD+A a0aYfODN611YX5DAAPqAW0I+Avjml5PGLpZ+tG6TYBlMnWMUyjp07E/YgIG4VGV6ZmvxW7 C0ejMgbchlpBKL7CBsmonNpJ2YQii2IEZs9pXBPAliLxPTGsaWaTEqQBcq9fKg== Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.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) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLyRM0S6qzDsF; Mon, 24 Mar 2025 15:59:26 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Konstantin Belousov , Ronald Klop Cc: dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c18a16ebcf5b - main - kern_proc_kqueues_out(): maxlen == -1 means there is no maxlen Date: Mon, 24 Mar 2025 16:59:20 +0100 Message-ID: <8229058.iDzAj6rjnq@ravel> In-Reply-To: <1305725331.9507.1742828788168@localhost> References: <202503240454.52O4s0Xi051381@gitrepo.freebsd.org> <1305725331.9507.1742828788168@localhost> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2149079.x0N0T6uNKo"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2149079.x0N0T6uNKo Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner Date: Mon, 24 Mar 2025 16:59:20 +0100 Message-ID: <8229058.iDzAj6rjnq@ravel> In-Reply-To: <1305725331.9507.1742828788168@localhost> MIME-Version: 1.0 Hi, > (snip) =20 > > + if (maxlen =3D=3D -1 || maxlen =3D=3D 0) > As maxlen is of the unsigned type size_t, how can it be -1? > Or am I mistaken on this? It's of course true that 'maxlen' can't be -1 mathematically as it has an u= nsigned type, but that's not what 'maxlen =3D=3D -1' tests. In this exampl= e, 'maxlen' is an unsigned type of size at least equal to 'unsigned int', w= hose values cannot all be represented in a signed 'int' (well, that last pa= rt is true but not the real reason, which has to do with integer ranks). A= ccording to the standard promotion rules, and because -1 as an integer cons= tant is interpreted as of type 'int', both arguments of '=3D=3D' will be co= nverted to 'unsigned int', and conversion of a signed type to an unsigned o= ne is done by computing its congruence to the number of values the latter c= an represent (this is the mathematical description; with two-complement rep= resentation, that's basically just truncating the bits that are "too high",= or sign-extending if the unsigned type destination is wider, and in this p= recise case, just keeping the same exact representation bits). So, basicall= y, this test is equivalent to 'maxlen =3D=3D UINT_MAX' on 32-bit machines o= r 'maxlen =3D=3D ULONG_MAX' on 64-bit ones. Relevant C standard passages are, in section Language > Conversions > Arith= metic operands, the "Boolean, characters, and integers", "Signed and unsign= ed integers" and "Usual arithmetic conversions" chapters, and, under Langua= ge > Expressions, the chapter about equality operators (in particular, the = fact that it states that the usual arithmetic conversions apply), and chapt= er Language > Lexical elements > Constants > Integer constants. Regards. =2D-=20 Olivier Certner --nextPart2149079.x0N0T6uNKo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmfhgVgACgkQjKEwQJce JicMug/8DXuApknJ9/MpLLBj6QZ3TICmietYFg3OYjHGVkluxu9nmRoSDlre3Het d/9csBgriOiW8MJHgkq9FiJsmq6kwvLdh3cEeUjcdwGWdqapY7+gm5h1K3I9Pm3O hW3dJne9lJL1aSlbz189QdA70aCf3+Mu91d1pVGVtzctXman7nkDUI1l6JTri3hu 0VOD/FsirlOt6JWSyVGuYRbMRCR7ViaGks9ahjo9aRyV1wCmUCaysG1JevvYyDLh o14vECCOPZltsuDA8XbV9uDjCon4KR0wTL2nFNwAPTI0DnobQ8Y2ntGcuJdBP1p0 r0ZWNjFrCOsxutpep2N6ODaiIhXMrKcsD6VPgSLcOcd4oCYvf60EgkCQiE5HG+HQ 7JrLfVvldqo4oXNJtzlXRTe8ODZ37gd6mFZtiJ611fA9pZ23ZFWy4aQ/1iWLyFEN S7lvBo9Pbyi/qhD8SHvMDrZraP3DpD+HDzJDmoAs5Z4MtGO02YSX7eZ6LLeoq4Pw /y7rrj/AdyDfAopseR5go0tPr3Mw1ToRH8HPsL0igluKuQ8vX/6lcve97Z4K+6D1 IFFooTh7OvCjb/R5o0w2ScNJsuKBBeHafadd2I7zg1Z5ih7QD8PHQCiKhKByOF+4 nG/gaSrGiqsmOkSfKSUbfJrmLFX7aOf7oF6rmvZeZEuvRLg3qVs= =V36y -----END PGP SIGNATURE----- --nextPart2149079.x0N0T6uNKo-- From nobody Mon Mar 24 16:09:59 2025 X-Original-To: dev-commits-src-all@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 4ZLygY0Dtvz5s5Z7; Mon, 24 Mar 2025 16:10:01 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLygX409Bz3y9q; Mon, 24 Mar 2025 16:10:00 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742832600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WksLi4VEG9DTjUY7ALmRCmNdUUbw2DFygscqOD+Wmkw=; b=k5hFu04o3NRooYEWNy37SmxfVdgsl8eqr77fsUHq9hNeUDQSDeh82zDU1LsMh+KUG52kVe KOkpBfPfknuxrAc/MHLMQ1s40IgGo4l/Kk7GkIVDgufm6EoXeeM6D8Jmu2JhAYrhM1GB9S UyBMXi2QiZI0ku4BEAL74Q95AzUn1OgQggnTHsgwC7k4rN2xfrwTuAkn0xF78by7Envd7N i5ZDd47YUG+2qRJHKPF02YgIvoK4Ox01EI0yyHAMMl7DggHpEusLFtk99Do3IpZXlP/Qfz iuGkb8CoXCfBNWbPmI8UIpkWnPI2s/R+WB0mdIfeGmlFdgdzUFNdg+Ea0pz6Hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742832600; a=rsa-sha256; cv=none; b=Dmkxf4gZsu+wjdMr7IEtQXYbkfVHCPMlhsyGIs7LMXDX0wLEnJX6o0NU92ml5mgvfeq5Uk LcOnxvaYG+0YeBE96dfm60UtYPZV6q6NoQ9QLA0S+yj7W9mdAPzqF4WeL7O+BJ5uAg1Q6O Pr9b7H/1kLX02sC/D+kKoLo65QfcDpImNl3HNEVhoutMn8oBUCPvfn9JqocK/cjkD+ZlQi IxUH8snuAKBb0KqqU7lWTswArv9x226kdKQ/QMI0orUsu44JChY9IHFy+J1tNUZfELrZW9 F0rtdJnPjtSqPfrEUkJH1tFmaefoRH+A2mK+pE2u5keEmTNxBFq/OFU5LgVn2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742832600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WksLi4VEG9DTjUY7ALmRCmNdUUbw2DFygscqOD+Wmkw=; b=dOGRhNxvnU6R/OrXzRSlHhcUfWQasDmVVtJrsskRSQlqmYLSX5ZxMbo6AECy0YvxVuldar zqUWlepcmei0NECEIzO/hN/cxHIdARm+fuhhS1aSzKlCVIFCncWBEWzTuVJLpqlOJnJ43e xVACYHObqTLKivLqMrZxcOBUbHoAMmLfqoYLutbJ8AsCpFuBIY8XkuLo49ZtjClGRUJRtS fpXZO0+bsWcSWsNmD45AC/jQnPrO+8zg48gZu+b2LanzAO8wVUaGgs7mCxuVROkcR7nGz5 d1eczaPawMn+qhhPpPZiBa/k1lvrGqac/YrDxSQTlXstBjfECy4RK8cEZx0SFw== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.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) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLygX38LfzFKq; Mon, 24 Mar 2025 16:10:00 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id DCB4C3C01A0; Mon, 24 Mar 2025 16:09:59 +0000 (UTC) Date: Mon, 24 Mar 2025 16:09:59 +0000 From: Brooks Davis To: Gleb Smirnoff Cc: Kristof Provost , igoro@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0849f1634a70 - main - tests/netinet: add test for IP_MULTICAST_IF Message-ID: References: <202503222340.52MNekCX071219@gitrepo.freebsd.org> <7440BE85-66E8-4D1A-AC15-8B944F5C2951@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Mar 23, 2025 at 11:12:24PM -0700, Gleb Smirnoff wrote: > On Mon, Mar 24, 2025 at 11:45:55AM +0900, Kristof Provost wrote: > K> The downside is that we???re compiling the C test code on every run, but I > K> expect test programs to be tiny, so that???s not too much of a cost. > K> > K> Does this seem useful to you too? > > That would fail on decreased installation, that has tests, but doesn't have > compiler. This is not just a made up problem, this is what many would do in > CI, cause you want usually as quick as possible response time from CI, and if > your team is not hacking the compiler, you won't add compiler to the CI build. This would be pretty catastraphic in our CheriBSD CI setup which uses qemu. We don't install the compiler at all and it is very, very slow under emulation.[0] -- Brooks [0] Emulation is worse than typical for use becasue the underlying hardware doesn't (yet!) support capabilities and thus we have to emulate all the bounds, permissisons, etc checks for each instruction. From nobody Mon Mar 24 16:10:36 2025 X-Original-To: dev-commits-src-all@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 4ZLyhF4PRZz5s5cc; Mon, 24 Mar 2025 16:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLyhF0f4wz40XX; Mon, 24 Mar 2025 16:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742832637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T880m0VX4GO4hhoGWB5zhJggBK3RD4GUu+B5m/GVqNw=; b=QZ0bGOwyhrBBolJVGH4qIuPWwFEooPLFeFIBt8SWkgWuEl5YNnWppkaz8GyNa5R2a9AaK9 a0sa5wcfR4DXEGitRXI0uoGTPdpUJI9tJASjOK1dzwy9hHAVxvad+EQw71rSgcZkQoADso mU9YeYBkJR7U+B+0HTOPgB6STv1BCIsY2kk83qaNnKtHDRwFCh5cTGMIXY7FnediBD4ibY danMfV16ccGpG6ype4U2qLg8f/+zf6MoUE3mBEAznhavD8qt3R0P5K8XXZy42iEgJeoLij RZxnEr3OCBnJu9taClmExafm2w+3VW/0VzNHtaeJLTI5ihBHYC1Xx4FpqMsHHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742832637; a=rsa-sha256; cv=none; b=cKAtWTi0hZLSgGZOW/wv/g4R9e5ge3HOSbgpG7sb68x1IyzMww+92y7kn3LXr3PMPbD+my fHNFOGxLNLRZjksmCavsfDpgbf7C/HrlY6mEnQJ2K47e/t4jxtIGv6gphH8s/QW2J5eWiG SlLaR9LJcIDY7/Xp1fjxyJtlSIVK+hehuqEuibTYw6d6yQwLekRShTOrVlgTOqTyfM386q 1ZCa8+5UTLYpfy9bG49WnwD5BK7j5pYCY710svhoL8KfDG2eAyXCbLszNm7v4mx6QkwlsI qnKYmJLe+Sxg06Zg2VMfJ2l31fxEdCdODt84//ELMtLDxKCibZh2a1rCL22gCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742832637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T880m0VX4GO4hhoGWB5zhJggBK3RD4GUu+B5m/GVqNw=; b=OhpUEFMdMRPQpE5mRK4MhT5Tsaf2mFaQ/7VhVwq9kSjddNXt5SSOpu9N/p0LRBlqJLeLCl 8LrKWm05D5Bivk/ThU0tUrwcAEmmJ6mSGcp1++48QzkkbiI3vVytLAsXs8rJRFj9F+Tsh4 QdwznVOwu+PRrEgnkmKYaCCfjztQT42K4Mj8O+2x8B1cE8zUqPpDe0euX7E3Nr+83UUxYU hCLnfGOIk2ujR6XCYQcXI8a4WrD1I2uoGjYQQNYoozZZezoKZM3YexhCfbIh5fBI3w+A8K dwaR06CtnVsH/CpnWOSKUvIThcyArFA863hMkmbL2y9c4PtI1EbWdqIhrGFvPw== 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 4ZLyhD6zB6z11kQ; Mon, 24 Mar 2025 16:10: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 52OGAaSY013832; Mon, 24 Mar 2025 16:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52OGAa2l013829; Mon, 24 Mar 2025 16:10:36 GMT (envelope-from git) Date: Mon, 24 Mar 2025 16:10:36 GMT Message-Id: <202503241610.52OGAa2l013829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3209f63851b9 - main - trim: Remove unnecessary include of src.opts.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3209f63851b9e44b9d586857babe809cf7df6bfc Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3209f63851b9e44b9d586857babe809cf7df6bfc commit 3209f63851b9e44b9d586857babe809cf7df6bfc Author: Ed Maste AuthorDate: 2025-03-20 12:05:58 +0000 Commit: Ed Maste CommitDate: 2025-03-24 16:10:09 +0000 trim: Remove unnecessary include of src.opts.mk Reviewed by: chs Fixes: db466e475446 ("trim: add missing include of src.opts.mk, remove unneeded LDFLAGS") Differential Revision: https://reviews.freebsd.org/D49485 --- usr.sbin/trim/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/trim/Makefile b/usr.sbin/trim/Makefile index 1329c7f79690..6cf96b703094 100644 --- a/usr.sbin/trim/Makefile +++ b/usr.sbin/trim/Makefile @@ -1,5 +1,3 @@ -.include - PROG= trim MAN= trim.8 LIBADD= util From nobody Mon Mar 24 16:10:35 2025 X-Original-To: dev-commits-src-all@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 4ZLyhD108qz5s56X; Mon, 24 Mar 2025 16:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLyhC6bbgz40FX; Mon, 24 Mar 2025 16:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742832635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMY96PBpYkKnNSBJqVBaYzorRBrWlOTyP3vrqBJ9Ork=; b=U+u5UKHky7n4yvKinXk4ZGtxWFvx/kxFvWGYG27XMzFgsVOJiPduMuectBudAaEVn/+wv/ NhswxSLw6oU5e0l5EGe2swUCStVczVZYr3CnVDQSpDwXVHKry2gUVIzwotZ4Hu54wrU4v4 SZSwJxDo8CXpH7HF7BGUemoFqO8P0Z45SAjJ+1GGfYNmvxBzATYuaMZBGgVjpLQbM1aMuM NtMhaKJhBd9swZviytQ/4T6H/SfvHVYPy60rSn7QZkKA5CiSxUY8nYZiv/ajRYd7j31/bO TI5Q1GOurpABCWcYFzcxg30qdxJIseFm5xpW62HG21Mirp+vMURo3d4hVA7I/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742832635; a=rsa-sha256; cv=none; b=MjVIrci0xByaotoUVJtpywABQY+3O9J175OoFGbKDEXbG54H8+aFySKIDsVWuNyUWZOIyJ jcQqJHiXTaHGNrUoELPDsa7NvFZ9+8gGN45a7NSW301GZ+xrMt9OhQRO36GMoNslXjMq7q ALMyuHDQCEdJnzOTEsj6gfItFQ8ESECWAwzTYNHd9Tpp4UetZCdqBytoDHhJZWNgdFIVgp qxh6whEh7EU1TvgkvFO6edMlxKxWDE05ea7qaM/Dzzm7ujTn/u7bIH34D6Z4q14y6WKE55 Dp0yBRoH94B0Y5RL1umbsTvZY9WA3yAezWk2fIaWxEe8MvyXxRgZ/s4jUYuLsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742832635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMY96PBpYkKnNSBJqVBaYzorRBrWlOTyP3vrqBJ9Ork=; b=mxu3YmcJZq42AUBS1JBtDdRTZ2ALs2zIIilCkxilBbftaJzr/Fk0RCq/SqTJ8cdIEX4IMX JD8TszYopgo7QG/rViSI4HXk38C0MRYA83ZZywgkOH563SXGg/elRU+rFLJMxAxwRqO3dU qAGoTtF7EpLKtiiX1yKnDkWCehM2yPDhzpqkKwU6tNQiZtk6mcqKj8ZTp0cTwwOnV4Vgyo f6r5NWFoBmcjUHy2c1XldMm7HBCqqFySnlngi+a1aRlRuEpaEQD8xiMXs31l/KLHVAI/TP A0nOZ4PmhfGc7D3Kaz9hPGGZvC8NWaUo8ovmGGcJtxWLLB0VLnFLM1E4T7TU4Q== 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 4ZLyhC66Rzz11Rx; Mon, 24 Mar 2025 16:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52OGAZ1m013796; Mon, 24 Mar 2025 16:10:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52OGAZLT013793; Mon, 24 Mar 2025 16:10:35 GMT (envelope-from git) Date: Mon, 24 Mar 2025 16:10:35 GMT Message-Id: <202503241610.52OGAZLT013793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c40b323b91bd - main - beep: Remove unnecessary include of src.opts.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c40b323b91bdc0076922fcd6377f77da167de6af Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c40b323b91bdc0076922fcd6377f77da167de6af commit c40b323b91bdc0076922fcd6377f77da167de6af Author: Ed Maste AuthorDate: 2025-03-20 12:06:46 +0000 Commit: Ed Maste CommitDate: 2025-03-24 16:09:57 +0000 beep: Remove unnecessary include of src.opts.mk Reviewed by: chs Fixes: 623be660fcc9 ("beep: add missing include of src.opts.mk, use LIBADD instead of LDFLAGS") Differential Revision: https://reviews.freebsd.org/D49485 --- usr.bin/beep/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.bin/beep/Makefile b/usr.bin/beep/Makefile index 8388ff7ff986..1f2548c24819 100644 --- a/usr.bin/beep/Makefile +++ b/usr.bin/beep/Makefile @@ -1,5 +1,3 @@ -.include - PROG= beep MAN= beep.1 LIBADD= m From nobody Mon Mar 24 16:16:32 2025 X-Original-To: dev-commits-src-all@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 4ZLyqR1c7gz5s5kR; Mon, 24 Mar 2025 16:16:51 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLyqR0pnGz43S4; Mon, 24 Mar 2025 16:16:51 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742833011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S7tR2Dfz2GnlVsYaqpiyIbhD4bbbC5z6ihNhgeJ6wpQ=; b=xhfaGSH2FGjYKi+CMGsz9DZ2rkP8ZV61+Wv5yJssjEk2Q8YlNgY3QSm1gWRLiKmdgD0eNU XfKKvHTNN6G7OV03Cy0P7JJfMvtBwnCIP6uH8TEP5oinjb64fRl8R/p8YfUXsaQfMmvAlY KRsb/9MoV8qNzW019kKQ6X3UQPmAbHngCAQyHinHG/8f7/0mwL0N7FLQ1c91WbYM4IxHCn Zn9y2KvIclskf2FnlIu9OgcyW0/pow7Psb2/5+OKrvJmfaWBwWkrm1c8EBAejwBWQW5sAO BJrb/kUGoc4GOWfffiqWmjOFts9/pOhPixFObb4Umzze1HG7SyNq1XLCifKlpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742833011; a=rsa-sha256; cv=none; b=gSr/SoWToKl0EquVXPquPAPPwh3/1pZwMFnlUWIXOFUaaSGInwA8CfUISRNxDrZQcAk1QC Csitowp1yGJKumswkJhAVs4P+TYxlqt429O7mKTsOmPT5ByscZqYnnVt14V67W0phXltTG rmq8jIWSW9XFfyA3nHZAOevMe3Qj3XHVtC3UmMQfLgW6zXRbLMQdijNEam/3aeDC74MS9d btM6ynvUoo1zTTPOtQapALOU/Fu+aS54xCtMKd4QtquaVOMY7MfG1x6FarI92ix+WBVIMH XK6uGOnynJ8R+yxXCnRcsFwekY7jJWW+yXLwsAucz5LI1iDAMjMNCDFUJkKvvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742833011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S7tR2Dfz2GnlVsYaqpiyIbhD4bbbC5z6ihNhgeJ6wpQ=; b=eaVzL+0l7LHk7G7r7pff3VcdzJoggBMUnVBjotH0tNDfxyK4l8TK821xt5oZhOJYrebEME RYrSNeAYUdI1goMBkmCbeBWumJgNwG4DAkpE7keg8imhXqcdrYCB5f9MD8ztQDczAv7LdY EYLTYUqNJnvLVS3e0EntLx7w38Q8Vxijdoj/6rDRxUbV8UUkEVFIdAaNJBXdFtVyvWRrjs 2P6hpwFTKdAcdUlF2x8n0R6cGR0G2Z0h+aO5Vt7Qp7OnUi3HvrgxBSczpFnGP26X2Wy64s l4W34fcALopJUMd6XzXF9Q05sufxga8SuC3RQQBjLIsaabjn9GRkmthTmTD8ag== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R10" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZLyqQ6T92zF6K; Mon, 24 Mar 2025 16:16:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id E86001FE84; Mon, 24 Mar 2025 17:16:40 +0100 (CET) From: Kristof Provost To: Brooks Davis Cc: Gleb Smirnoff , igoro@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0849f1634a70 - main - tests/netinet: add test for IP_MULTICAST_IF Date: Tue, 25 Mar 2025 01:16:32 +0900 X-Mailer: MailMate (2.0r6222) Message-ID: <563E114F-6591-4F12-91FF-F237FF315809@FreeBSD.org> In-Reply-To: References: <202503222340.52MNekCX071219@gitrepo.freebsd.org> <7440BE85-66E8-4D1A-AC15-8B944F5C2951@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; markup=markdown Content-Transfer-Encoding: quoted-printable On 25 Mar 2025, at 1:09, Brooks Davis wrote: > On Sun, Mar 23, 2025 at 11:12:24PM -0700, Gleb Smirnoff wrote: >> On Mon, Mar 24, 2025 at 11:45:55AM +0900, Kristof Provost wrote: >> K> The downside is that we???re compiling the C test code on every run= , but I >> K> expect test programs to be tiny, so that???s not too much of a cost= =2E >> K> >> K> Does this seem useful to you too? >> >> That would fail on decreased installation, that has tests, but doesn't= have >> compiler. This is not just a made up problem, this is what many would= do in >> CI, cause you want usually as quick as possible response time from CI,= and if >> your team is not hacking the compiler, you won't add compiler to the C= I build. > > This would be pretty catastraphic in our CheriBSD CI setup which uses > qemu. We don't install the compiler at all and it is very, very slow > under emulation.[0] > We=E2=80=99re not going to go down that path. I considered Gleb=E2=80=99s= objection sufficient to abandon it, so you=E2=80=99re just bouncing the = rubble at this point. Igor and Gleb have a better idea, where we=E2=80=99ll use jail=E2=80=99s = exec.start (or something based on that) to set up a useful vnet jail envi= ronment for a pre-compiled C test. Best regards, Kristof From nobody Mon Mar 24 17:03:38 2025 X-Original-To: dev-commits-src-all@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 4ZLzsR0dYDz5r9L4; Mon, 24 Mar 2025 17:03:39 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLzsQ6Hkmz4MGk; Mon, 24 Mar 2025 17:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742835818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVyIeDqmEYxxjE/5OLCo/o4zZFGLq7LK+nqdJ6RQb9E=; b=UUwrt5dE0oXbZNykaPHi68+ZxjDiHgw/y6mVqLAdkUhNHB6bamorcmL8bRPEmZDj8YWgiW +STyW/mSXfU7jpdRd+nnmi6GHpBToQkZiDsQKemsB706wedZG1o71q9qLpM2VX8qdhdV2t 0tInZ7MLA57tt5zNiJxmJldcQokAv97dl8GVrFCflz/ZynONVO2E94DNK+Q6Hm8BXr2m8W VQYwohurSLl3tJ0Fhgdr9ltJjE4GwpfwbYfCIEOIKTbZPMKgWPp1VlnwT4AbsbuS2EIe7v NUHTj1TQUifA8/aYRpdGt/WL96rpXwyf+pBC4U9OscH8Aqzjmsu+YOrSXkJKXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742835818; a=rsa-sha256; cv=none; b=hJvcKWiJKn6J7neR8eA2soM+QK5a5d/26T7OMUM2ZDZE14/Aa56qdz2WTGOK2H0fpOVmbb A7l8GSeQXyKmXWekv1pBcDV8creMmL3V6tUQt9J8c0ZVRg/pKLJMcGrz+tZ0P2+OzXWCOg c9h4wQvoZ0PiYg7oNs4YfXo7+ao3hZDGy1tJRpwk1CauWtUkgvN/zP6eo+GdRqr8MOu3a3 2TJpqU8DpPbMl3MIpNxYNXS+mhjV7q1pJKbnwnvZRLl42A/Ei1SN7Hj5USBGIIgmsH8jB+ 8UIDV+9fxesOpZ832+fW0VLsSuDuSFvegJWL18cBtMRlXJuHBM1K7246sZhQ0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742835818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVyIeDqmEYxxjE/5OLCo/o4zZFGLq7LK+nqdJ6RQb9E=; b=hWglbtTPoCUR4n7K/PdnnsbtzOe0y91YUvFPpngDfrRUlHq0M+AqIx/1DmYIaPM8X6/sC6 JIF+xJCamE5Hm2b8UeCf4CjMFVFZWty3Q8RHPE3VP19eWUkR0qCc9g0M9pjJ1IVQN/P+vZ 4GzoQh3MzcfdQ9YxNnWhJeWhnqci5biqiCTCLWO2Mb8oRdjqBVkvv3qAkzF0FLmV5WqZK4 9EU+rTmutxQ/tT1qzrEqVYXKMY9qDjvQoOg1SIfp91uCUZNuH2n9WstTil3qKRUxu+vGea azvxZ4RO8h+YrdCPx048Ep+GITZ/yba7SpetDLOYTQ//I3mu/eIO01X5w4NlXQ== 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 4ZLzsQ5Ywlz12Gt; Mon, 24 Mar 2025 17:03: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 52OH3cTX015498; Mon, 24 Mar 2025 17:03:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52OH3cT0015495; Mon, 24 Mar 2025 17:03:38 GMT (envelope-from git) Date: Mon, 24 Mar 2025 17:03:38 GMT Message-Id: <202503241703.52OH3cT0015495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a27328ea3927 - main - bhyve: Suppress unimplemented MSR related warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a27328ea392714f2bc106f138191fd465157aafb Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a27328ea392714f2bc106f138191fd465157aafb commit a27328ea392714f2bc106f138191fd465157aafb Author: brendabrandy AuthorDate: 2025-03-11 23:19:58 +0000 Commit: Warner Losh CommitDate: 2025-03-24 17:02:30 +0000 bhyve: Suppress unimplemented MSR related warnings When using bhyve on x86, rdmsr and wrmsr can emit many warnings when dealing with unimplemented MSRs. An option x86.verbosemsr is created to control these warnings. By default, the MSR related warnings are suppressed to avoid spamming the console. Sponsored by: Netflix Reviewed by: imp, jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1611 --- usr.sbin/bhyve/amd64/bhyverun_machdep.c | 1 + usr.sbin/bhyve/amd64/vmexit.c | 14 ++++++++++---- usr.sbin/bhyve/bhyve_config.5 | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index d51ad3a5fc05..85af124b5536 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -63,6 +63,7 @@ bhyve_init_config(void) set_config_bool("acpi_tables_in_memory", true); set_config_value("memory.size", "256M"); set_config_bool("x86.strictmsr", true); + set_config_bool("x86.verbosemsr", false); set_config_value("lpc.fwcfg", "bhyve"); } diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c index e0b9aec2d17a..944f5de34645 100644 --- a/usr.sbin/bhyve/amd64/vmexit.c +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -107,8 +107,11 @@ vmexit_rdmsr(struct vmctx *ctx __unused, struct vcpu *vcpu, val = 0; error = emulate_rdmsr(vcpu, vme->u.msr.code, &val); if (error != 0) { - EPRINTLN("rdmsr to register %#x on vcpu %d", - vme->u.msr.code, vcpu_id(vcpu)); + if (get_config_bool("x86.strictmsr") || + get_config_bool("x86.verbosemsr")) { + EPRINTLN("rdmsr to register %#x on vcpu %d", + vme->u.msr.code, vcpu_id(vcpu)); + } if (get_config_bool("x86.strictmsr")) { vm_inject_gp(vcpu); return (VMEXIT_CONTINUE); @@ -137,8 +140,11 @@ vmexit_wrmsr(struct vmctx *ctx __unused, struct vcpu *vcpu, error = emulate_wrmsr(vcpu, vme->u.msr.code, vme->u.msr.wval); if (error != 0) { - EPRINTLN("wrmsr to register %#x(%#lx) on vcpu %d", - vme->u.msr.code, vme->u.msr.wval, vcpu_id(vcpu)); + if (get_config_bool("x86.strictmsr") || + get_config_bool("x86.verbosemsr")) { + EPRINTLN("wrmsr to register %#x(%#lx) on vcpu %d", + vme->u.msr.code, vme->u.msr.wval, vcpu_id(vcpu)); + } if (get_config_bool("x86.strictmsr")) { vm_inject_gp(vcpu); return (VMEXIT_CONTINUE); diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 3f9d9130787b..3dd24ca5fe69 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -240,6 +240,11 @@ By default, writes are ignored and reads return all bits set. Inject a general protection fault if a guest accesses a Model Specific Register (MSR) that is not emulated. If this is false, writes are ignored and reads return zero. +.It Va x86.verbosemsr Ta bool Ta false Ta +Enable verbose MSR print out. When this option is true, +messages related to reading from (rdmsr) and writing to (wrmsr) +MSRs on virtual CPUs will be printed out. This can be useful for +debugging purposes. .It Va x86.vmexit_on_hlt Ta bool Ta false Ta Force a VM exit when a guest CPU executes the .Dv HLT From nobody Tue Mar 25 02:27:35 2025 X-Original-To: dev-commits-src-all@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 4ZMDN76lbKz5rq5p; Tue, 25 Mar 2025 02:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMDN74xQsz3Xxy; Tue, 25 Mar 2025 02:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742869655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZmI6v1aITeGWahIiFs/15skLLROyazWYURt6+O6iYW8=; b=QDQYcaw+QhQiyQV2mJo12MMgMxXvt0CNFCXRp1wLFNOCmdTOQTnKh4/HKHOMzzMQrXnxoe MSy2WHc3ndMv34GMogld1wEZyULJHX310gzd/qgK/maaWcljkGA2VrRpZ5nxLDR/Hr6FEZ eMHyavudOReWJe/nACxQW19h2A8dVLOBmdqDlbOMna6mtY0/3zVdviwSv1R1Ykz4dTSYx6 Xh7EiakckfDULg+5P2RwngOqK1BDf1kIvRIVmE4Mhj3bpsXjX+k9bXJUVSYaOZpvtUVnQI 39RJZLHUUEOa43S4pGIDfjWGnKiuiMH2++DrzpYh140CndNusIhImyLILxhlJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742869655; a=rsa-sha256; cv=none; b=EaYN8xCiIrwfaHA8/oWSQTWAitLFHzBzDqiqkkiL4+tfNCWWr2Lwa2ZRwfhTmzY0ZepZ5B OwrfyG8xgkHChMFM/QGwkZXbQyf2iDaBLdYnquFOEnsI7TicuB8ZgZxOyyXsAcHrz5kffy U8aMSCfkiPJHPC6jkm3RxpbjixbyWJ4j01qHgDAF+gEq1M5smbbaeTLO8DgSUa1pwv65ic W1oKel32awhDJcmt+dcGcSAC0vmXG8sI7/dxHZ5r3Wkt7Mize7E1uS5ZqExTPSHyPQSDkk 50e2Ov4NfxpmsVbhNFT8Lld5U7ZRUhY28QE2drpLZPgK9b7c0d9HKTbot8GIoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742869655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZmI6v1aITeGWahIiFs/15skLLROyazWYURt6+O6iYW8=; b=D0wk1834mKf0jcBX5/quDcURl6y7NrcQXE8sLtVsjcH8gP/jbVv9AoabHLubITpXUzrpid 1BIIVYUqs7VWIUJ8gBArvfiAMHQ+2BcJn0ULnnY1ZWTV2jMmqoxjtP//cRIRcjizX5tJVK R9tFHtvwSxGV7I0DJTf2ikNV/xsMqa5A2AhEyrFmdE5Wmij/kRWwNid2tRO1Qy9LB+wega fJ2NKabJPTFUrsJN/zgiG90xN1S36NzJ8vKwWB1z7jg0PrS7NDfexPBUvxvjIDRfRPrwMI zAvtI3Cl4uAWZvWVUKMgs1LkbmM/AMJ3jtFIxrLpnSYjKEmCPVF/5lHsug6hZg== 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 4ZMDN74CdDz5lm; Tue, 25 Mar 2025 02:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52P2RZfM062722; Tue, 25 Mar 2025 02:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52P2RZZp062719; Tue, 25 Mar 2025 02:27:35 GMT (envelope-from git) Date: Tue, 25 Mar 2025 02:27:35 GMT Message-Id: <202503250227.52P2RZZp062719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2452bcd8913b - main - kevent32/kinfo_knote32: remove __LP64__ predicate in definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2452bcd8913bb45ec269d0a3219ca8bfc0c7a183 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2452bcd8913bb45ec269d0a3219ca8bfc0c7a183 commit 2452bcd8913bb45ec269d0a3219ca8bfc0c7a183 Author: Konstantin Belousov AuthorDate: 2025-03-24 06:45:30 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-25 02:27:11 +0000 kevent32/kinfo_knote32: remove __LP64__ predicate in definitions Requested by: jrtc27 Reviewed by: kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49483 --- sys/compat/freebsd32/freebsd32.h | 2 +- sys/sys/event.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 3a4625b8e2d3..3b45d291c70a 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -446,7 +446,7 @@ struct kinfo_vm_layout32 { uint32_t kvm_spare[12]; }; -#if defined(_WANT_KEVENT32) || (defined(_KERNEL) && defined(__LP64__)) +#if defined(_WANT_KEVENT32) || defined(_KERNEL) struct kinfo_knote32 { int knt_kq_fd; struct kevent32 knt_event; diff --git a/sys/sys/event.h b/sys/sys/event.h index dee3365ba7b6..1b30e4292de8 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -101,7 +101,7 @@ struct freebsd11_kevent { }; #endif -#if defined(_WANT_KEVENT32) || (defined(_KERNEL) && defined(__LP64__)) +#if defined(_WANT_KEVENT32) || defined(_KERNEL) struct kevent32 { __uint32_t ident; /* identifier for this event */ short filter; /* filter for event */ From nobody Tue Mar 25 03:02:26 2025 X-Original-To: dev-commits-src-all@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 4ZMF8M6rZQz5rs8R; Tue, 25 Mar 2025 03:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMF8L6rZjz43Lq; Tue, 25 Mar 2025 03:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742871747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xUUjSi7N0WZzwQLPqNEwhU/Xy9QVQP8I/HgWskxRktA=; b=XzobbvPjX4nQR0ejSZQF7wjLNprb3JHSSJZ6ZVmGAgNeyeUYz3QkGfm3NY4jOhNXokmrU0 KhYlWuvomJxDQnF/oJ7so/ouSBBjypmreruWlg064lh5QPEhaPOzjvYSLj0mU1B634nJOh idcQJyYLJMPENJv/0kwRWfmam1uq/HeThAp5V5oguWRf0Z0oU+Vhh5yZRDmmmlwP9K8h9z /AInk/rqEcMp5vqogNN0ExquRtgEwybXwTvBZRxy2I2Q50Fvyl5Wz2on+eHfPpIb/vpDHl bP+9hyDSB0ZY7wppZYUhhyQZnmBTmizps/tZWfw/08fNksfGCJuefX1ZykcFmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742871747; a=rsa-sha256; cv=none; b=MKzXANWdGoaE3rg4F8EtarniKvnFB2XkeLUHICCmBiAKc6s+Z3W4p7il+CvidqebYwk9KT 5Q0lbs/wsnpzecRLTFkurTbc7j+7zNoMt4ghkSHYLLdJBWobzCShPMZaVnJ+HgpNpnAkC6 /l+xEJEB169ZTfSJFnTKD+hbSEFgIuyLOCLxGsT4w+XT7I3IOcX9R0HZKl62/jr4ErYbSs 9G+xi4P+/xLo70PVasGSf/xcEgSL247O+IjZspP4SOGjzuZ3nbHftCdt8pKlpIjU7hAyr6 jet//X/PmJ+Ndksc+DJB5bigSI3ZB9obJ8RtX2uCWBAn2qFytL6M20xfloDX7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742871747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xUUjSi7N0WZzwQLPqNEwhU/Xy9QVQP8I/HgWskxRktA=; b=KzX68MU/n0TqAIj8wrAJybsT+G7o/WJRjbMiV4/1A7u7q/RgBA6wO1t5hbeBJ9/iwJe2bC RuaKUf0AR7RaXp45P+cTUyVTHZZ+jXPZySIMNJmGz8pt+uviTLs/3EcWcag1BqKFb+xH5v AuD4lplSNDCSVGCFJ2O6IxoSlzqOmX8qyklRp7GAT+MfTOzOlAyKCLvkFMdKGMonTpio4e hzIkElIy4B1D78MXOxkrUzRZz2bFs26yE9QHt8JOCgjSYQ7i6Bb4fjOF6+1dgaOzJbH5yg HyYgaFY47JakEb+FCxmq5H+mzQMDmlNyL/CjI2NNERYeFQQSahv4NXJ/Ft5m0Q== 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 4ZMF8L6S6Dz6jc; Tue, 25 Mar 2025 03:02: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 52P32QAu037647; Tue, 25 Mar 2025 03:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52P32QAv037630; Tue, 25 Mar 2025 03:02:26 GMT (envelope-from git) Date: Tue, 25 Mar 2025 03:02:26 GMT Message-Id: <202503250302.52P32QAv037630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: d3a659a338cb - stable/14 - usb-msctest: Be more conservative setting GETMAXLUN quirk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d3a659a338cbad72bd205e6fc8787a9fb3fb485b Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3a659a338cbad72bd205e6fc8787a9fb3fb485b commit d3a659a338cbad72bd205e6fc8787a9fb3fb485b Author: Warner Losh AuthorDate: 2025-03-16 19:20:09 +0000 Commit: Warner Losh CommitDate: 2025-03-25 03:01:56 +0000 usb-msctest: Be more conservative setting GETMAXLUN quirk Only set the GETMAXLUN quirk when it causes an error, but don't set it when it returns 0. Since we reset the device when we set any quirk, only set this quirk when it generates an error so umass will avoid it. When the command works, there's no reason for umass to avoid it at all. MFC After: 1 week Sponsored by: Netflix (cherry picked from commit b0375f78e32acd7947d28126a5e165f8139a5a23) --- sys/dev/usb/usb_msctest.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/dev/usb/usb_msctest.c b/sys/dev/usb/usb_msctest.c index d31baabcf875..7b31d9dadfab 100644 --- a/sys/dev/usb/usb_msctest.c +++ b/sys/dev/usb/usb_msctest.c @@ -741,11 +741,10 @@ usb_iface_is_cdrom(struct usb_device *udev, uint8_t iface_index) return (is_cdrom); } -static uint8_t +static int usb_msc_get_max_lun(struct usb_device *udev, uint8_t iface_index) { struct usb_device_request req; - usb_error_t err; uint8_t buf = 0; /* The Get Max Lun command is a class-specific request. */ @@ -756,11 +755,7 @@ usb_msc_get_max_lun(struct usb_device *udev, uint8_t iface_index) req.wIndex[1] = 0; USETW(req.wLength, 1); - err = usbd_do_request(udev, NULL, &req, &buf); - if (err) - buf = 0; - - return (buf); + return usbd_do_request(udev, NULL, &req, &buf); } #define USB_ADD_QUIRK(udev, any, which) do { \ @@ -803,8 +798,8 @@ usb_msc_auto_quirk(struct usb_device *udev, uint8_t iface_index, usb_pause_mtx(NULL, hz); if (usb_test_quirk(uaa, UQ_MSC_NO_GETMAXLUN) == 0 && - usb_msc_get_max_lun(udev, iface_index) == 0) { - DPRINTF("Device has only got one LUN.\n"); + usb_msc_get_max_lun(udev, iface_index) != 0) { + DPRINTF("Device can't handle GETMAXLUN\n"); USB_ADD_QUIRK(udev, any_quirk, UQ_MSC_NO_GETMAXLUN); } From nobody Tue Mar 25 07:27:10 2025 X-Original-To: dev-commits-src-all@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 4ZMM1q5Kz2z5s8LS; Tue, 25 Mar 2025 07:27:11 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMM1p676pz3VmH; Tue, 25 Mar 2025 07:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742887630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuWLZj8CaZtzJksiMs+e4ZffRG3td357jYZQznvkPyk=; b=NRPaznU8MAXJxfXioqMoOaHLRrSdOKQAixToCPwTv/OJmxU39bSTgT9QB29/lziNULhCKX EW/QXZPp0uikL0MPqq0G3CB7ZZDs7CBAsAso2x+tyGpLfnuHAAXs+7KMn0j/LpEFPcUHRM kI2q1fWrGuBhfGthx3pG9rv38QikMeOOTrUIj3iRZqVHWTIVJHoTUHLo1P3SyTjblwFT7c fsh8EbZI6tDI0QbKSALyIrNfGbU59NqLfbWVJ75asO1Hu6kfsL+TPwZculHkJuJpF8o33R umkP1B0x1aXvgXZbw3B4Bpc2aXCix1iF0ywImDfTdzJyInrZ9YHclF03GfED4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742887630; a=rsa-sha256; cv=none; b=B9ZmnunuZ/n+Aacs5L5GTFXhuubY1NstYAUiD0/fsJvO+5v4i13YwamhhqKOE08NzPpkZ3 C1Fwx2Xah+EaSiQmnrQVKCm0rBKZd5HB4ns0Cxc4FvLbeVvZ3RC+9ry660aBaluQgJguD/ 8VQfYCosDEKHd/natKdnjoc8rd9kvwghKE7011AZeVHz2+V63+myfSc6Egqp0sSNkurR92 8hKRyGqGhzD1bZBRuXQuPrm+BqDzjcq4l74/U22zItKWmBxksYmJLKRPlOvsSTrHEbxVAI 8l9E7s1TmaI1JQ03IDiD+zcgzCKDzi4xSjcCaNFQfkvl8uVz84aUIW3H+rDmtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742887630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuWLZj8CaZtzJksiMs+e4ZffRG3td357jYZQznvkPyk=; b=RRQn8W7kHBlnvqAUxGRUbpnWa+q0NK0/HGaCC5G5/KVA53Rlc4D/30k5Zm+7EcQyT+ZjRi JOu9m/QTtRTSxRZKcFQgVg/2sMbRVaYRjVH6E1z8XNIwb4XBnUDb+KPI9zaIXKMN5RbirK 7NQgJQu3cQok1DNoGiuALWHMWu5h6Y5TAcs08dP56q4o+3DiaTD/2uY4r/v4PAuFkdtq4i szjHDIkuUra94/OYcTwAhGtH36LarYXBaQYWGXPIEKOi4z9b2eWN0mS0U4DoPcT1sJvyqZ B7+GlMr040OAd/S7BWknWozEgDMRJ3E4llUPyxG05NSH2Q+oM9qfkKxhfyuaAQ== 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 4ZMM1p5gdWzW3G; Tue, 25 Mar 2025 07:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52P7RAo3024299; Tue, 25 Mar 2025 07:27:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52P7RAvS024296; Tue, 25 Mar 2025 07:27:10 GMT (envelope-from git) Date: Tue, 25 Mar 2025 07:27:10 GMT Message-Id: <202503250727.52P7RAvS024296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: b67080455907 - main - tests: fix test for NULL encription List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6708045590712930c533e916e3d6fdfe48ec5ba Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=b6708045590712930c533e916e3d6fdfe48ec5ba commit b6708045590712930c533e916e3d6fdfe48ec5ba Author: Andrey V. Elsukov AuthorDate: 2025-03-25 07:23:40 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-03-25 07:23:40 +0000 tests: fix test for NULL encription After 04207850a9b9 it is required that key length is not zero. Add some key to avoid error. Reported by: markj MFC after: 1 week --- tests/sys/netipsec/tunnel/empty.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netipsec/tunnel/empty.sh b/tests/sys/netipsec/tunnel/empty.sh index dc1d3708f744..56480d21f4ec 100755 --- a/tests/sys/netipsec/tunnel/empty.sh +++ b/tests/sys/netipsec/tunnel/empty.sh @@ -11,7 +11,7 @@ v4_head() v4_body() { # Can't use filename "null" for this script: PR 223564 - ist_test 4 null "" + ist_test 4 null "1234" } v4_cleanup() @@ -28,7 +28,7 @@ v6_head() v6_body() { - ist_test 6 null "" + ist_test 6 null "5678" } v6_cleanup() From nobody Tue Mar 25 09:19:41 2025 X-Original-To: dev-commits-src-all@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 4ZMPWf2qgwz5sG47; Tue, 25 Mar 2025 09:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMPWf12nLz429Z; Tue, 25 Mar 2025 09:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742894382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T7KFnJUYwQnP7aaTm4+PKEl90349Ml04jOVT+WEk+hI=; b=ifDnCS39CSV1l1zetTUlLqG2kn6NbMHqMdV498ypMO6hbk3C3Eb+yYWKGl1YuwihSzfJqj aLBN/pgai/lsLW0H0qwV3rXl0lKEHYbkQqNauIvhO91sNDKC1HkJizMGnQQzsjkc6y125A oIK+HetMW5IhrrMm+qabe9S/RlFDbySZGuAAs6SuIjVaD7Lt4zcRrv2s+C+vJFNZXq/mIe mQdMpYV2P2RXhXozdnHE5+zs9P/bM689oWedFGOCUMvpg8mdCH4uAPUcchy7IPQlHuXz50 tolUrhquw15XiFwpIa4UnoMFv6/NNz+Q6fcvENmgfiF5xNVJrtP/Gqo7UX0Xxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742894382; a=rsa-sha256; cv=none; b=inI6Vj9coTp4xfV3IYN0kK8q9eWP6CKBdP+6LuHNS+GFeJbAD7FoERow3dl5/UVuytunAS qdZokQ6OB6moAhTy+3Ghc5yf6KKvkHrjVcnGcFh1PfztGnkBJ+VcsN3IFyacyffzfqT2gQ 6Gm9FSx42mIVK9cz64edi3mvNdnfz2rJ2XvxWxYkS7tVCUbC2YpOFQH/L4BjmsuieB7wxt nh7QIEsFdE/cxO3CoXGYr8oVEnstyDD7lKUtPD/89sZkFuuA2ytWATq+KhMvaDMvXnBYGL at5RKUjJ/tYnVGWIm+9F+4Rel6ChYONZ3Eqg8lshOEuBT88T1iqeyDNFvFqHSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742894382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T7KFnJUYwQnP7aaTm4+PKEl90349Ml04jOVT+WEk+hI=; b=EHo3+wKQ0KNqljTDUIxwvpOZMSjdnqro2ij3rJ84NAosxdzMytmeEDMsfdALLH3TacbJeQ dEN496nCrwfuOf7WWVyVQiLnRnbUTyaLeVrvT/JoTLes1kixS8X5sYafcWkB6/FLFudUjr X2je0KoIsEpLm3qeGSXoPeJnMPtbF7n2XxzaL6JH8YjFPm+f/PpDcr2WYjJiQs7gC0xfEx 4yOJQA+PHvewOfq7HoCm8ScaW9EhV6CFpAMKMjbGICL3lHPByU6L52FGdC2jnfo4rC1/fu Uy2RDzHT7JRhRBxffZbXRF/ZmnmSLSWd87TgNbl7S0s7Lf3bXiGRdWlJAnE2Pg== 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 4ZMPWf0M9VzbLG; Tue, 25 Mar 2025 09:19: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 52P9JfN7032705; Tue, 25 Mar 2025 09:19:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52P9JfOA032702; Tue, 25 Mar 2025 09:19:41 GMT (envelope-from git) Date: Tue, 25 Mar 2025 09:19:41 GMT Message-Id: <202503250919.52P9JfOA032702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 718d1928f874 - main - LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 718d1928f8748fe4429c011296f94f194d63c695 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=718d1928f8748fe4429c011296f94f194d63c695 commit 718d1928f8748fe4429c011296f94f194d63c695 Author: Mathieu AuthorDate: 2024-11-14 00:24:02 +0000 Commit: Olivier Certner CommitDate: 2025-03-25 08:41:44 +0000 LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY This is to fix slowdowns with drm-kmod that get worse over time as physical memory become more fragmented (and probably also depending on other factors). Based on information posted in this bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277476 By default, linux_alloc_pages() retries failed allocations by calling vm_page_reclaim_contig() to attempt to free contiguous physical memory pages. vm_page_reclaim_contig() does not always succeed and calling it can be very slow even when it fails. When physical memory is very fragmented, vm_page_reclaim_contig() can end up being called (and failing) after every allocation attempt. This could cause very noticeable graphical desktop hangs (which could last seconds). The drm-kmod code in question attempts to allocate multiple contiguous pages at once but does not actually require them to be contiguous. It can fallback to doing multiple smaller allocations when larger allocations fail. It passes alloc_pages() the __GFP_NORETRY flag in this case. This patch makes linux_alloc_pages() fail early (without retrying) when this flag is passed. [olce: The problem this patch fixes is longer and longer GUI freezes as a machine's memory gets filled and becomes fragmented, when using amdgpu from DRM kmod 5.15 and DRM kmod 6.1 (DRM kmod 5.10 is unaffected; newer Linux kernel introduced an "optimization" by which a pool of pages is filled preferentially with contiguous pages, which triggered the problem for us). The original commit message above evokes freezes lasting seconds, but I occasionally witnessed some lasting tens of minutes, rendering a machine completely useless. The patch has been reviewed for its potential impacts to other LinuxKPI parts and our existing DRM kmods' code. In particular, there is no other user of __GFP_NORETRY/GFP_NORETRY with Linux's alloc_pages*() functions in our tree or DRM kmod ports. It has also been tested extensively, by me for months against 14-STABLE and sporadically on -CURRENT on a RX580, and by several others as reported below and as is visible in more details in the quoted bugzilla PR and in the initial drm-kmod issue at https://github.com/freebsd/drm-kmod/issues/302, on a variety of other AMD GPUs (several RX580, RX570, Radeon Pro WX5100, Green Sardine 5600G, Ryzen 9 4900H with embedded Renoir).] PR: 277476 Reported by: Josef 'Jeff' Sipek Reviewed by: olce Tested by: many (olce, Pierre Pronchery, Evgenii Khramtsov, chaplina, rk) MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation (review and part of testing) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 4 ++-- sys/compat/linuxkpi/common/src/linux_page.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index bd8fa1a18372..35dbe3e2a436 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -43,7 +43,6 @@ #define __GFP_NOWARN 0 #define __GFP_HIGHMEM 0 #define __GFP_ZERO M_ZERO -#define __GFP_NORETRY 0 #define __GFP_NOMEMALLOC 0 #define __GFP_RECLAIM 0 #define __GFP_RECLAIMABLE 0 @@ -57,7 +56,8 @@ #define __GFP_KSWAPD_RECLAIM 0 #define __GFP_WAIT M_WAITOK #define __GFP_DMA32 (1U << 24) /* LinuxKPI only */ -#define __GFP_BITS_SHIFT 25 +#define __GFP_NORETRY (1U << 25) /* LinuxKPI only */ +#define __GFP_BITS_SHIFT 26 #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) #define __GFP_NOFAIL M_WAITOK diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index bece8c954bfd..b5a0d34a6ad7 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -117,7 +117,8 @@ linux_alloc_pages(gfp_t flags, unsigned int order) page = vm_page_alloc_noobj_contig(req, npages, 0, pmax, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); if (page == NULL) { - if (flags & M_WAITOK) { + if ((flags & (M_WAITOK | __GFP_NORETRY)) == + M_WAITOK) { int err = vm_page_reclaim_contig(req, npages, 0, pmax, PAGE_SIZE, 0); if (err == ENOMEM) From nobody Tue Mar 25 12:36:52 2025 X-Original-To: dev-commits-src-all@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 4ZMTv861Kdz5rF3Y; Tue, 25 Mar 2025 12:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMTv84YDNz3FjD; Tue, 25 Mar 2025 12:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742906212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dspDOrIydZxiXQs5kSa4JS5mssUoyh8KReZrVzFEO34=; b=byIkeKdrFYfPbV0SqdPS+IU0CubOeQzm/WENGukMsUqD7WAX5ams1K+3SHej2MmYcnYRDz Z+NdnPlkZYvuxFkrMDZUA4gLDA8atUJoxPs7sSMewLrmmvG3j2te40OQXYS6OxdmRHAy45 25N/+feY2LBFYXQ3x5i7Clg/ow/63ch+v85omdv+6n759H+oWC13dPnrcbTEu+lpYfSZCO 3cdxwXefuEpf0uTG3+uF76kZC7woNhMngOeLVxkKMhidhPnMBVWqwV3/I77sbFXoam+/WK /a6WrZwMYQfvOYom/xP7L2jTvxMiOfNgvP9ouiATdOrf0ivFbRdfRSrxU0Seug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742906212; a=rsa-sha256; cv=none; b=stjzDqJ2lhBHgGOsSOjj2REN7wc2+gtwGIMzdQTLIaQYzJRkxnN7fsulWlNw1YtlRunOU9 p8bglAy5juU1feenlD0vCwx4UjoBckIPuOZkYg1YpkAaLCEDzC+cCejasyyY0lUS7P8u6W kJPo5CJKyj62bRj6Lm3zygpPSqKoq6nxKyrjc+6RqBoURkKCdMh6bfMdhLH9U7jEUEQjfn zWYef1t2AHv7fgxW5jrpp1hTbDXJ71Zj35RjJsXnYQE4AmAHZzbOprDD6m3U2xcWfhqQSt ToclbP0vH/ZC3gizNpxZ2niYPcloqASIW5+/dQhqgg/nzPqrsjNuLQhWfiCaEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742906212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dspDOrIydZxiXQs5kSa4JS5mssUoyh8KReZrVzFEO34=; b=teRS640Ty8u2AThcUXwPsDNTd9K9x8m+VlYONDXbK1BD5NazBTUC8xxBN/L3J1PsFLDzqk ebA6kep3UxB/nQX0nKJU0s0vgABz2MXT52+S/bGMgN2WKrFBFdE8RZ4tCc04fCr2QOOhmr I+JSsPRdSEY/25Jo8oisVIE0ZZmRw7cAGu32Ur9OceNn4qjO1Jza4L2/dZHCWKPAnCZvMc 1tY3kyIu9+46HkimK1Y4nSfQ5Nigdn9rJMNWSNvtuV/UY3mDpKT9vCBb+fl0BM7EU7ydOL LGp6uZfmr38ZZjUeCgtoaV9ok+lqnyd0xzQ5WnQWYCFkg/KwXBppMlTkSq5YMw== 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 4ZMTv84754zhMH; Tue, 25 Mar 2025 12:36: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 52PCaq3e005400; Tue, 25 Mar 2025 12:36:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PCaqlK005397; Tue, 25 Mar 2025 12:36:52 GMT (envelope-from git) Date: Tue, 25 Mar 2025 12:36:52 GMT Message-Id: <202503251236.52PCaqlK005397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d45d070e5475 - main - tools/sysdoc: Chase sysctl rename List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d45d070e5475466ceac8057f2e7558055267fb1b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d45d070e5475466ceac8057f2e7558055267fb1b commit d45d070e5475466ceac8057f2e7558055267fb1b Author: Ed Maste AuthorDate: 2025-03-24 13:53:27 +0000 Commit: Ed Maste CommitDate: 2025-03-25 12:36:00 +0000 tools/sysdoc: Chase sysctl rename PR: 285591 Reviewed by: glebius Fixes: 94df3271d6b2 ("Rename net.inet.ip.check_interface to rfc1122_strong_es and document it.") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49486 --- tools/tools/sysdoc/tunables.mdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc index 54f6920a22c0..20b59f450cf2 100644 --- a/tools/tools/sysdoc/tunables.mdoc +++ b/tools/tools/sysdoc/tunables.mdoc @@ -1272,12 +1272,12 @@ bool Controls forwarding of source-routed IP packets. --- -net.inet.ip.check_interface +net.inet.ip.rfc1122_strong_es bool This .Nm -verifies that packets arrive on the correct interfaces. +verifies that the packet's IP destination address matches an address on the arrival interface. --- net.inet.ip.fastforwarding From nobody Tue Mar 25 13:22:46 2025 X-Original-To: dev-commits-src-all@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 4ZMVw65xtpz5rHHc; Tue, 25 Mar 2025 13:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMVw63lP3z3JXn; Tue, 25 Mar 2025 13:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742908966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6MyG6NKpB6Fw41IUkh1G9Zg7rEd5L9KIfhZBKYduuY=; b=lBm0dlOUgtqKs6SCekP+1Chp/PpB1OHXhxlPze5GOBC6ZQJrtLZ5PIZ9HSwBvBRz87j/Z+ J/1iAcjrmRUGhOQwnxDkyGT8JZBlr/33vtpEiFtfSYUCFxJKHa58150LfwndmCl+GhBQHt K35Qa62q+hxbpcVRntkf9m1u89NuX9BnfJhMS6Nq858yzH2otlOdu7joen1IT9LGwjePKu UeSBAA9+s0Ki/g14FY8R1qZ9K1yviqESeCu5x0bEF31hnLJhQ4Eg5kY8O2LLrS/WaklHtc A57MUnh9y1Lw0hxohlXBN1fJd1/PafPsqhl8+e9etjkqvV2MvUC/irAOH/IdJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742908966; a=rsa-sha256; cv=none; b=gwzJcnNnE/mGk9eLJPLoSLnV3MPlLpDdtiXqGYZilqefGEdTJwy6eDcvB625j4OoGZzG0q Xq1nVnbTprdXl1ZIxSAHI/kvhJrjT0fVgYhudBLHtsXY2HfBCWd0lANnTXd4P9vqgplVk4 ceR6ODE17yjAbcpa7tQxR96waKMLHi/mc5UlsF5/BBYR6TeKmYdpIrLpiazYt3PwUA7CFO i/RIR35c2chgr2dD3ITBDCJe/JG/DOUN0I+lD0Jaof4weBPwl+ZzDHk1jxtWRAEFvq3iGi 876WZGhIAOsvRyi+/wNlNkzMXw366RIH5iV/b8Bzb43sYEem7NPrupGmibstDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742908966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n6MyG6NKpB6Fw41IUkh1G9Zg7rEd5L9KIfhZBKYduuY=; b=C0LyCweBNEWmtULjN2+NKUn56n+DjYtMRUAult1e49rDsMmKS1A89kZnaME9kebe26Pfco We9ssIimTugMmYBKQn7yM9enFahTs7x6P8fyi7DOCcv8aEyrt0o40zN6JhQhH+1mWVEodN XJcqFH45dCDCpFDG213Bb993KHUTJGrcX6fiZYYXsfAVFSygbE+HU/3/9DaKigNVyqsFx0 Y3pPsYheNg1Lw4FwuCg0WxBdNN4No8ujgg3nV2aJtU2sYRyoNra21PXaubfFepcBFqXJxH WJqCEQ8eIxO2CjMyw8LS+Ght3GD3ttgEg2xq+VHNHDwyD/8F4FYVG2IfYaPeqg== 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 4ZMVw63G1hzjmZ; Tue, 25 Mar 2025 13:22: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 52PDMkuW098042; Tue, 25 Mar 2025 13:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PDMkqt098039; Tue, 25 Mar 2025 13:22:46 GMT (envelope-from git) Date: Tue, 25 Mar 2025 13:22:46 GMT Message-Id: <202503251322.52PDMkqt098039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 65f2a8887c9b - main - arm: Garbage collect cpufunc_asm_arm11x6.S List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65f2a8887c9b2acb98afd9574b3a489ca1ebb344 Auto-Submitted: auto-generated The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=65f2a8887c9b2acb98afd9574b3a489ca1ebb344 commit 65f2a8887c9b2acb98afd9574b3a489ca1ebb344 Author: Olivier Houchard AuthorDate: 2025-03-25 12:55:27 +0000 Commit: Olivier Houchard CommitDate: 2025-03-25 12:59:43 +0000 arm: Garbage collect cpufunc_asm_arm11x6.S Armv6 support has been removed a while ago, we can safely remove cpufunc_asm_arm11x6.S, as it is now unused. --- sys/arm/arm/cpufunc_asm_arm11x6.S | 86 --------------------------------------- 1 file changed, 86 deletions(-) diff --git a/sys/arm/arm/cpufunc_asm_arm11x6.S b/sys/arm/arm/cpufunc_asm_arm11x6.S deleted file mode 100644 index ded80290b3aa..000000000000 --- a/sys/arm/arm/cpufunc_asm_arm11x6.S +++ /dev/null @@ -1,86 +0,0 @@ -/* $NetBSD: cpufunc_asm_arm11x6.S,v 1.1 2012/07/21 12:19:15 skrll Exp $ */ - -/* - * Copyright (c) 2007 Microsoft - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Microsoft - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/*- - * Copyright (c) 2012 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Eben Upton - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - - -#include - .cpu arm1176jz-s - -/* - * Preload the cache before issuing the WFI by conditionally disabling the - * mcr intstructions the first time around the loop. Ensure the function is - * cacheline aligned. - */ - .arch armv6 - .p2align 5 - -ENTRY_NP(arm11x6_sleep) - mov r0, #0 - mov r1, #2 -1: - subs r1, #1 - nop - mcreq p15, 0, r0, c7, c10, 4 /* data sync barrier */ - mcreq p15, 0, r0, c7, c0, 4 /* wait for interrupt */ - nop - nop - nop - bne 1b - RET -END(arm11x6_sleep) From nobody Tue Mar 25 13:27:02 2025 X-Original-To: dev-commits-src-all@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 4ZMW126LHtz5rHjj; Tue, 25 Mar 2025 13:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMW123w52z3KYD; Tue, 25 Mar 2025 13:27:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742909222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L8qSIarJAr8v3+lhfLw8hfsqfn4SswRcbtvCIO90PM0=; b=KF/ZrQRPWFHdlB8aymnryHPaTfxvtTxf6EGpOGlmxWjUyqb9jLbErzbJRQ5Pvjo+I8Bpuz uAhnxQ5u+tAJ7LZAmVVcuWTVNtKV3vfQImQaNtcuPjEhAA+50m7rTlzPJyXfb9ZBhl02Ag yAj3hSX8lz1V45bQPKRdSlW7o2ApuR7UoQJ21imz/6nV8v4lt1MlEiGZqI9/eHYrdHGG5s 2fhHSCI6syFYgGIAezXZKgS/vMPfKq6v8mokvaZYgtrTpTJ3gtdrYRG8xQXVSzQKRnmniZ +uAwb7hQ8t2ELo7hH8W8Qn/BOQPbEAxgac9BLWhBAVwG5DqiB61qbfcP/QYBTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742909222; a=rsa-sha256; cv=none; b=eLg/aFVTnEpSuM2HzZIDTx/W0YOI1obvS5iAJZZEyBPHnqJ9JNqg/WggPOFLhb4cBQ9gfY aGgT0Z1BqbpUDiUMU80sw+yfDKsHAheUIH+SiwbnczrEDR/4OHNOw/DGbKqfMmn7vx8FSy 5ItZZ3pfAWyHakWQGIJSBV8ZAHakpZ3sNCfd+uROGRc3W086whYnukkpCsMVoGMK8Mcfil Z/DenWpH5aXXsvxojFUkkIQCFfwxa2JOYa1k/zYAyPoJgXSxtlwSTEzuY11GB3YGTu8pTt MFFOPbVyaIRYm7kuwWSnWzRlaxtTLT2Uk/hPc8BBHry8ygoiGCUaQZYkOdcObQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742909222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L8qSIarJAr8v3+lhfLw8hfsqfn4SswRcbtvCIO90PM0=; b=t99/ok/heBBiV3H0WRruotBa+LxFaxzHznHG6y5PhkcXlEG4vfRvUt164AXU7+VkiRmMRN S3ZKPjDWrs49/Vl5ci9iCv/i07DGNtyQVF6KUvIaJD5pr9hcNuoE4fuuRHA2f/OJHSMzL6 Bq/OZAglxXG/EURKSKVV2BpgR12Fb76p7jpmrflwvhqdgAkfsKk5XulFdNp1HfRA6nhp5h 0o+ZxLSsZ9oRYEjVNG2XeFYkQiF16B3zF/KHvqw4iAUIafuLREFq5HrK+SDT711hcOTiaM EoK5fvuIrEMJ+h8Mow+/UOqDJspjmCqzUCUDp0yEt1eYDthUwwDNYypR5dd5QQ== 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 4ZMW123QZ4zhmy; Tue, 25 Mar 2025 13:27: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 52PDR2wC099619; Tue, 25 Mar 2025 13:27:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PDR2NI099616; Tue, 25 Mar 2025 13:27:02 GMT (envelope-from git) Date: Tue, 25 Mar 2025 13:27:02 GMT Message-Id: <202503251327.52PDR2NI099616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 5fca5c7da944 - main - arm: Remove any reference to cpufunc_asm_arm11x6.S List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fca5c7da9446743289c06b8f2a5ae724a2190cf Auto-Submitted: auto-generated The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=5fca5c7da9446743289c06b8f2a5ae724a2190cf commit 5fca5c7da9446743289c06b8f2a5ae724a2190cf Author: Olivier Houchard AuthorDate: 2025-03-25 13:02:02 +0000 Commit: Olivier Houchard CommitDate: 2025-03-25 13:03:44 +0000 arm: Remove any reference to cpufunc_asm_arm11x6.S I was wrong and there were still one reference to that file, in files.arm, so remove it. --- sys/conf/files.arm | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 0188dda87c96..91b01845519e 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -10,7 +10,6 @@ arm/arm/busdma_machdep.c standard arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard -arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpuinfo.c standard From nobody Tue Mar 25 13:31:00 2025 X-Original-To: dev-commits-src-all@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 4ZMW5c62Vhz5rHvj; Tue, 25 Mar 2025 13:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMW5c4Tshz3L7G; Tue, 25 Mar 2025 13:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742909460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqMyHbBhhQfVG9QOcFkdTwPVlrSKuGlJk1cvOB4nqio=; b=P+NwgOD7mDuXUcGzcrgX4QSQ8wO5RX4I2i/95MT47mIJRIA5AEtTE1DDQVopD/SbC4IIEo Kt3m1IupJRluyMM7lw1ZycChsdq71zUbvw12NVBdWnGBJPJ+IoC5BhoUYgdO+OPoF2QFz2 g9MQ31uRtMyp55fA7sGMlbKb7aSkecAqTXnFfvf0MRxiwo79/cHJSKKipzXrEqgKc7Ah66 MaIuIcgRF9y6iqhKz3BsPdiVFITP2/QsJMQyPzj+e5O9GAzT9sYmA41FMqEZ25ej+sJDQM 3EtxmOc2vqKGr/nCUnkyoL8BaIKCW5H95azc/zaehxq/svn1naG2nvehl1Gpmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742909460; a=rsa-sha256; cv=none; b=nLfnPCdCLFXyLcUgfwXAWD+CrbR8eSIuBZexbCiCR2PUzjtwqR1mEtTDBgMBe5/Ous9s83 t0EXaXyPoiXopt0JR/mIk5C1/pEFlhr0O1nrkB0WeGP7zQ2m1A0TnvCRCnoDyKvx0SSF89 d7Nk8qpaameZq8mJBDyyhSsEsWWioybcsPNA190d93ldpE+04zcN4zD1JKDtkHiqObCAtp 6gJetQprKjd8CYbun0axP2Jf7DLa7w1jvFEsD2i1yGxNYzZYO7VPhXiL04sdgxVjOyfwXW gppywoefrU6RkTVd56KmO6+vNsqBIBMC+QXXeqpndl0aLJZnscxIOIGXnM7gEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742909460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqMyHbBhhQfVG9QOcFkdTwPVlrSKuGlJk1cvOB4nqio=; b=v7s4eZPdcZhIymnTMV81L8TNb2jE0ripzVVwzRCnrwSFWOxfeuN4J+NVgIvXImhKoi4HRA DVoCCUU88n6YyV9CCNpxRbpR90LZIBclQemXRE8z+Wv5cFOjbEFqw8u152Etjj4MobGwQw bDwElGzrlXxDOhLmXWj96ST+Zr/Hko7CkN8dRmWXhGy6vJnVQNParuUnQvQ6a02KaPWl24 343KfwRVOuk25xcJ+fsGN+efZtCbZVrtstclJ6ILBwaZKbSM0NJZd/rB2qqZZZ9JDa5Xk7 BXnofQX1hgziXB1PWeAiu9+Lwc8Hro+pJDwOMuup2Z/kjixZ5NdXZPTE6iagaA== 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 4ZMW5c3zQRzjjC; Tue, 25 Mar 2025 13:31: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 52PDV0Kk010500; Tue, 25 Mar 2025 13:31:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PDV0rU010497; Tue, 25 Mar 2025 13:31:00 GMT (envelope-from git) Date: Tue, 25 Mar 2025 13:31:00 GMT Message-Id: <202503251331.52PDV0rU010497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 693fa339761f - main - arm: Garbage collect CPU_ARM1176 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 693fa339761f756f1dce75ee507f4a2b9efb0d34 Auto-Submitted: auto-generated The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=693fa339761f756f1dce75ee507f4a2b9efb0d34 commit 693fa339761f756f1dce75ee507f4a2b9efb0d34 Author: Olivier Houchard AuthorDate: 2025-03-25 13:07:02 +0000 Commit: Olivier Houchard CommitDate: 2025-03-25 13:07:02 +0000 arm: Garbage collect CPU_ARM1176 Remove the option CPU_ARM1176, as it has been useless since armv6 support was removed. --- sys/conf/options.arm | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/options.arm b/sys/conf/options.arm index 6d15daebe851..49a317bb02b4 100644 --- a/sys/conf/options.arm +++ b/sys/conf/options.arm @@ -1,6 +1,5 @@ ARM_FORCE_DBG_MONITOR_DISABLE opt_ddb.h CPSW_ETHERSWITCH opt_cpsw.h -CPU_ARM1176 opt_global.h CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h CPU_MV_PJ4B opt_global.h From nobody Tue Mar 25 16:57:16 2025 X-Original-To: dev-commits-src-all@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 4ZMbgl0X9gz5rWTQ; Tue, 25 Mar 2025 16:57:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMbgk6gq9z3c8D; Tue, 25 Mar 2025 16:57:22 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742921842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4KqWxPterQVRvMxV29GomyvS+E1rqiDKGDXPwZPs0X4=; b=X4ralv7sdB7yd7F8aCV5njHTAVcImTxKwoSul/hwoQ67ZdfAbsrr6zVIIj+wQYpU1UKLoZ bXNaXnmhsW3XcihxznVuXW8s3Qn+i5KEw3rV1qQUhiA8193r8BhcS+afFEsZx5sE4tvI6e Y6eh56YUcQMTH/xhHer9/Fhh7DdwWPkW/Xsqm7j83GtbpTdrd+7qeWv7F6s6oNkxTWSzKW tF5b7e0IGtFMbfUe0tYCqO2QWHqhJYTEzi7CiF8l5rBUou6OA5Q79OL3iZk3skUVOF/qXV vvZpiZpFyoe1H6qkHUYOvmBDFku8xd1BVaxCOixAuUcUgq+/6zgw6P4WA+FdHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742921842; a=rsa-sha256; cv=none; b=r1yTCeBrycOfxCmCMVpRq+lRrXT/NUcmaUu+6XZ02/x3Sk71ViUZztjvx+swdRqx1zi92u GmeEIQPLOoSUDE0m1vx4jxJVjSpxfvItUuQVUwNY+ttWuo/J2iCtt/SXN++xBMmwKUBIOE Kegc6+ldnkTIf+vDJ/BadNeymK8YvxThMI2P2+C7X9HGcOj2xO9wuYP67ii0Eq+ZtCQXjY FpV224af1TCFePXgcv+HDqmvqwkfLeTUn6fOIiMM3mZ3cawwNFJKtEIb/WDvJcfXZs9rzr BFUpfPnlP19JKLbJfLVKqf2vg/+kxE8OieQId3hy+1aYgGFOTSALziMk5WiB6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742921842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4KqWxPterQVRvMxV29GomyvS+E1rqiDKGDXPwZPs0X4=; b=ZmhGuYdtjF5bKk4H3DZkXQ5guK3+kqv+vjJLIujja2wpmq0EtFXwBBmC3AoV1BGNx/QSm4 1mL6ztT0FCth3ViWxWQza5OVP2aLHOS1OivXuyLjSVOwyy+1Eof75Ehe6/OwXR1oU/cbsd Q8pq/1pNJ75YFYux8wtOKkkcyrcWwKczPFfGxlRLumdefulk0xqUHMHmIf1vtkPmDa3vdp U6S3BJ+Z+gkEZY0BOvVC2TPLOqWbFk+mHpoKuZW8V2a5MzZkUQ45AGn4Fyj6VIdK8DNEp1 61SiGFeNyWgDKfiWSJ3oBKE+eDY88VEEbRqfCwMGRDBiY2zh1e21EtCd6QtWBw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.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 ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZMbgk4GT5z13dc; Tue, 25 Mar 2025 16:57:22 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 6DF9DA64805; Tue, 25 Mar 2025 16:57:16 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C70AB2D029E0; Tue, 25 Mar 2025 16:57:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id RQt1bksMOtYR; Tue, 25 Mar 2025 16:57:16 +0000 (UTC) Received: from strong-rtwn0.sbone.de (strong-rtwn0.sbone.de [IPv6:fde9:577b:c1a9:4902:3e64:cfff:fe55:bc80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B09962D029D8; Tue, 25 Mar 2025 16:57:16 +0000 (UTC) Date: Tue, 25 Mar 2025 16:57:16 +0000 (UTC) From: "Bjoern A. Zeeb" To: Olivier Certner cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 718d1928f874 - main - LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY In-Reply-To: <202503250919.52P9JfOA032702@gitrepo.freebsd.org> Message-ID: References: <202503250919.52P9JfOA032702@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 25 Mar 2025, Olivier Certner wrote: > The branch main has been updated by olce: > > URL: https://cgit.FreeBSD.org/src/commit/?id=718d1928f8748fe4429c011296f94f194d63c695 > > commit 718d1928f8748fe4429c011296f94f194d63c695 > Author: Mathieu > AuthorDate: 2024-11-14 00:24:02 +0000 > Commit: Olivier Certner > CommitDate: 2025-03-25 08:41:44 +0000 > > LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY > > This is to fix slowdowns with drm-kmod that get worse over time as > physical memory become more fragmented (and probably also depending on > other factors). > > Based on information posted in this bug report: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277476 > > By default, linux_alloc_pages() retries failed allocations by calling > vm_page_reclaim_contig() to attempt to free contiguous physical memory > pages. vm_page_reclaim_contig() does not always succeed and calling it > can be very slow even when it fails. When physical memory is very > fragmented, vm_page_reclaim_contig() can end up being called (and > failing) after every allocation attempt. This could cause very > noticeable graphical desktop hangs (which could last seconds). > > The drm-kmod code in question attempts to allocate multiple contiguous > pages at once but does not actually require them to be contiguous. It > can fallback to doing multiple smaller allocations when larger > allocations fail. It passes alloc_pages() the __GFP_NORETRY flag in this > case. What is the drm code in question? ttm_pool_alloc -> ttm_pool_alloc_page()? As all other uses of __GFP_NORETRY in 6.1 (ignoring drm_printf.c) seem to be in i915. > This patch makes linux_alloc_pages() fail early (without retrying) when > this flag is passed. > > [olce: The problem this patch fixes is longer and longer GUI freezes as > a machine's memory gets filled and becomes fragmented, when using amdgpu > from DRM kmod 5.15 and DRM kmod 6.1 (DRM kmod 5.10 is unaffected; newer > Linux kernel introduced an "optimization" by which a pool of pages is > filled preferentially with contiguous pages, which triggered the problem > for us). The original commit message above evokes freezes lasting > seconds, but I occasionally witnessed some lasting tens of minutes, > rendering a machine completely useless. > > The patch has been reviewed for its potential impacts to other LinuxKPI > parts and our existing DRM kmods' code. In particular, there is no > other user of __GFP_NORETRY/GFP_NORETRY with Linux's alloc_pages*() > functions in our tree or DRM kmod ports. Are you sure? i915_gem_object_get_pages_internal() in drm-6.1 at least seems to conditionally pass it down: 17 #define QUIET (__GFP_NORETRY | __GFP_NOWARN) ... 74 page = alloc_pages(gfp | (order ? QUIET : MAYFAIL), Seems it can deal with allocation failures, lowering order or returning -ENOMEM from the function so should be fine hopefully. > It has also been tested extensively, by me for months against 14-STABLE > and sporadically on -CURRENT on a RX580, and by several others as > reported below and as is visible in more details in the quoted bugzilla > PR and in the initial drm-kmod issue at > https://github.com/freebsd/drm-kmod/issues/302, on a variety of other > AMD GPUs (several RX580, RX570, Radeon Pro WX5100, Green Sardine 5600G, > Ryzen 9 4900H with embedded Renoir).] > > PR: 277476 > Reported by: Josef 'Jeff' Sipek > Reviewed by: olce > Tested by: many (olce, Pierre Pronchery, Evgenii Khramtsov, chaplina, rk) > MFC after: 2 weeks > Relnotes: yes > Sponsored by: The FreeBSD Foundation (review and part of testing) > --- > sys/compat/linuxkpi/common/include/linux/gfp.h | 4 ++-- > sys/compat/linuxkpi/common/src/linux_page.c | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h > index bd8fa1a18372..35dbe3e2a436 100644 > --- a/sys/compat/linuxkpi/common/include/linux/gfp.h > +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h > @@ -43,7 +43,6 @@ > #define __GFP_NOWARN 0 > #define __GFP_HIGHMEM 0 > #define __GFP_ZERO M_ZERO > -#define __GFP_NORETRY 0 > #define __GFP_NOMEMALLOC 0 > #define __GFP_RECLAIM 0 > #define __GFP_RECLAIMABLE 0 > @@ -57,7 +56,8 @@ > #define __GFP_KSWAPD_RECLAIM 0 > #define __GFP_WAIT M_WAITOK > #define __GFP_DMA32 (1U << 24) /* LinuxKPI only */ > -#define __GFP_BITS_SHIFT 25 > +#define __GFP_NORETRY (1U << 25) /* LinuxKPI only */ > +#define __GFP_BITS_SHIFT 26 > #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) > #define __GFP_NOFAIL M_WAITOK > > diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c > index bece8c954bfd..b5a0d34a6ad7 100644 > --- a/sys/compat/linuxkpi/common/src/linux_page.c > +++ b/sys/compat/linuxkpi/common/src/linux_page.c > @@ -117,7 +117,8 @@ linux_alloc_pages(gfp_t flags, unsigned int order) > page = vm_page_alloc_noobj_contig(req, npages, 0, pmax, > PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); > if (page == NULL) { > - if (flags & M_WAITOK) { > + if ((flags & (M_WAITOK | __GFP_NORETRY)) == > + M_WAITOK) { > int err = vm_page_reclaim_contig(req, > npages, 0, pmax, PAGE_SIZE, 0); > if (err == ENOMEM) > -- Bjoern A. Zeeb r15:7 From nobody Tue Mar 25 18:41:46 2025 X-Original-To: dev-commits-src-all@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 4ZMf0L1v3jz5rdXD; Tue, 25 Mar 2025 18:41:54 +0000 (UTC) (envelope-from olce@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMf0K729nz3pJ0; Tue, 25 Mar 2025 18:41:53 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742928114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UKfM1ymbnWcwdFIaWSs0x/atwbhspviEt9CfofhmrGQ=; b=TitPhmIPnfFrxJSlZm4yql0JYwt8hezpvONSzgCgwzVpW0jWzchSA6+a/JIa1j7MHxqjRn JB02xtxE7SvNpS1baFJMXCm9DuZ4kVJ74oXJjMuqCDHnePf/e5ZIvT9pZe2PZZqzAks0K9 7WFo+/C7tLheRCNdKAyyif0rPega5wmS7XL8zsKcGlXNXw6ByvK3g+p5ukGG3a2fm60jn+ aty3US++lH/j1yCQiD/3qP8omdnbqG3wJLIRe/gnUyIxp0Jx/x+aycaI3KM7KBcOxwx43X 2hrQdqLp3gMaKXNNh7GbZC6Zl0lCG8NGjB31MfqRQFgTpV0j2UDknfAT6BxNmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742928114; a=rsa-sha256; cv=none; b=XzxFavOmJVikov4mlwDUpVWCjeSmU2g3/w7g+5R4ZDmt40vE8a2QRlHPkz7z8TfOs+d/9l 99YOvFLUB6tWdTSN76xNbR3mR+LJvF5WlhRKBkKzgyFiR3pXbw4qd17EIeSqze53z1mSXZ SvRsHoQGRs/R0/cgW+wi8tYVcp3xSk04Y37uim3ek0/2iT0Vw+JLX6a25dahX6M56bWjOY cvlqob7Fj+eQ/bNZGCE7girDHQ45bWbPiUcEmvZL4hMHMMhSFS0MpKvgJe/qyPcHh2TNtP 8ndv7LPwAtU5SxJe7ztov1KLIqG4Vp2JqgeKkHLniRu8Yl1KZFUKfH8jNvzbSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742928114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UKfM1ymbnWcwdFIaWSs0x/atwbhspviEt9CfofhmrGQ=; b=i3lhQv74PNpR4KHfvLqZe3FFNQ1Scl1K9tGxPRzXGTaoR1XYIkG+RorJ8ljlpFyR66j1/d GN9fMZgQd6AEXdwqasqdGAMeDmN8NMaPUCLujJzTvTIbhvTNg5ugamsVBTiXgYQKbUHPtv xdJFrwQJJThINrVZQZTh0il1AqFDc9kif1OwSm/QS1bM44+cw/22wXMkWAVcvBVmcgW7w5 pNvCBpHVjrXdVtPatxTi01sBHKz+5PyPm6vZtaTZIsyevANibAiyezZYTt4w6X/3yk+Y2z 3CSy+2gTdvoZhbossnsixWeRGUcRAt50ILKCIEydp1YBBoAT4dO8v8N/PsCyYg== Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.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) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZMf0K2qlsz15YJ; Tue, 25 Mar 2025 18:41:53 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 718d1928f874 - main - LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY Date: Tue, 25 Mar 2025 19:41:46 +0100 Message-ID: <3046625.S5UcXbOgvz@ravel> In-Reply-To: References: <202503250919.52P9JfOA032702@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2203838.BuRyMYtAyW"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2203838.BuRyMYtAyW Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: "Bjoern A. Zeeb" Date: Tue, 25 Mar 2025 19:41:46 +0100 Message-ID: <3046625.S5UcXbOgvz@ravel> In-Reply-To: MIME-Version: 1.0 Hi Bjoern, > What is the drm code in question? ttm_pool_alloc -> ttm_pool_alloc_page()? > As all other uses of __GFP_NORETRY in 6.1 (ignoring drm_printf.c) seem to be > in i915. Yes, this is indeed targeted at ttm_pool_alloc_page() which tries to allocate contiguous pages to fill up the pool (but not in 5.10). TTM pools are used by the amdgpu driver to build its translation tables. Calls to functions other than (linux_)alloc_pages*() are unaffected by the change, and if you dig through all the references of __GFP_NORETRY/GFP_RETRY (including those from files under 'selftests/'), you'll see the built GFP flags are never used with (linux_)alloc_pages*(), except for the only reference you mentioned. > Are you sure? > > i915_gem_object_get_pages_internal() in drm-6.1 at least seems to > conditionally pass it down: > > 17 #define QUIET (__GFP_NORETRY | __GFP_NOWARN) > ... > 74 page = alloc_pages(gfp | (order ? QUIET : MAYFAIL), > > Seems it can deal with allocation failures, lowering order or returning > -ENOMEM from the function so should be fine hopefully. Yes, I was aware of this piece of code, but obviously it cannot cause any problem. All calls to Linux's alloc_pages*() can fail *whatever* the passed GFP flags except for GFP_NOFAIL (and that's the only exception). Callers always have to cope, and specifically when specifying __GFP_NORETRY it would be foolish not too (and that wouldn't be allowed in Linus' tree anyway). If it wasn't for that, i915_gem_object_get_pages_internal() does the same lowering that ttm_pool_alloc_page() does anyway, as you noticed. My sentence was indeed too strong, as I was still swapping in context for this work which was done months ago now. I reviewed all callers not only for GFP_NORETRY but also for most others GFP flags (I have tweaked grep files for all of them and over multiple Linux versions), as I started some work to document what the Linux guarantees/behaviors really are and then some other work to rationalize how we translate them in FreeBSD (there seems to be several possible improvements here). Unfortunately, I have stalled that last work for weeks now, and probably will for a significant while. Given Linux's contract on __GFP_NORETRY, it is arguably not reasonable to spend time compacting memory on such calls, that's a deviation from what drivers are supposed to expect. Oh, and the rest of the commit message also doesn't mention that I also tested this change on machines using the i915 driver, without observing any problem or change in behavior. Thanks and regards. -- Olivier Certner --nextPart2203838.BuRyMYtAyW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmfi+OoACgkQjKEwQJce JiepbA//bxDMv9nQwrb6Cp9RLDVGwKAHSyZJyT3Pz2sYbpr4VUXFPvBe4La4uLpZ 23ZJ80M4HnukGuSwkpGauifFHGrfu9I5t727qIpdoP/elGa6mw1qzCDQ6YpJ0str f5NMTRrgFoPHjOHQ1tZgjlE8Q4LA8LWzc3dvvuW8aklPYlU7g70MZsFbCIZh9/0W R8EbcowHh0lJNU4U9sl6vH8OZqGdCJojNZxHEt89+W/yaDskPQqppoTTbibvX9Qg GhhksWeNKVJK8gYD3R89313Cjl9FvW5ANPCKUiAK00iVZhBGAt77GLuZ6koiY1e8 Xqamhf7jNmzdYSJv6VVB2osILfijX2nC8No1FqMm3uB+hKMB+jaFfMTrvxeRLOwv zvlH3xPNnLUIjncZZ5atX9wvv66oOr7zSQ6DLCbUBqVEPqVAYjMUWd/9vewSHFuO LozI9AOxJNEQTEiOCPyrWJs4z1xU263t0XFPZSlAXqnVM2Y8NKqE90mRPW0UjgoJ vZH/PEzEZlochyml2W6VNXZdwEkLq9Fs2eadJ5pwX/Wzqsa4SdNEv/DYFjX8VxzB nGXVpCWMLBs2z3I3vFM/BLkjAWjy9dAn8AUgborrifLaNUtlmuy4SyQabAfg2R2a /7GcBvsjFv5/84j8GcQCND3CNTKx1lMGW044p+GgCA8RcZUtV2c= =l+HE -----END PGP SIGNATURE----- --nextPart2203838.BuRyMYtAyW-- From nobody Tue Mar 25 19:14:12 2025 X-Original-To: dev-commits-src-all@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 4ZMfjc6TQqz5rg4R; Tue, 25 Mar 2025 19:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMfjc5T50z3rql; Tue, 25 Mar 2025 19:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742930052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBXDIsJk+WZulfdvAeJcMeIVukHvV4BKasFRjBtM8y0=; b=CPVzNNzT7DMPLTkfiUiPlVVVexkBkcdvs6T3b8tuWHLNUxgd5GzRcxKyQC7qDQTrWACwwT ae/nKwghA5F0e71whYX94LVtw5NC5Bh6spZyapvzMnD8QmoSc/YjOqIyEWllg/7l82s/rK rKNY/WVb9ifuSzzjHruCyu9o2bM6/3us4WPniVYJVtcDZkD8wsIKcV9B2EOBROWRD3aRCH R8kGuOt9uGauIt3XgIrq4+VCWirj6zGT6Dj6rlGozRBxFx+Iru4LOIsf+3zT9USd4fLo08 9vnZslsEKNu1luqC22UhUJklgGL63A5M3gBm8HV7vQUuWoFr6WSTvMrs+A7IHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742930052; a=rsa-sha256; cv=none; b=nDQFpus2nYg56Y6otYEsuRNccNGznkXXcEsEzQqvoKoBoR4D0TTskYgEli93WZsqli3NQE HJo16k8ktMUWKh28X2PMHQoVZgyz57r09iTTk0Bv6vLtsUTfy+o8J34GfqazpFIDZsZ0s8 iXhJbeY/4eDZSeXXKrhDaj9PdIvW4vTcXOIj2KNFHxolgTS18ta2y/NOrV2w7ZiSV05k8h 6UEQzvrQg7cMPUCVDjDY+5mQTCgar5SrpGl5XubSkr4bE1OOQpuBJ9bqKiETG48K+5WCrW mIMDAPEpDf4cN6AFHqSg53bSIXG5tckzm02I/qPKiOZZFzx53jnEa7H0zFcfow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742930052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBXDIsJk+WZulfdvAeJcMeIVukHvV4BKasFRjBtM8y0=; b=WDuTvYUEh8blcXUr191kyF4j1N25zAiFgFwwaf/OM1Cewfyo+SBNrbEYiOa5nD7xqmHOET rulIXqNjLK7GxAP0XPWo6bjL1aYdr4cBkSLQn++Da9cYXqSFuhLL36cUJ5Hy+Df1uF9Z+0 yj0lL6iOeUIqCn9CUyp6BAkSQMe7ehks6osLyTwzBoD1+NST9sT4SmOXmNcxU4iX4/nypX mwh99CeGUMnSOyfjnEa6a0Zgah3AcZyE6tu/+7LTPDfYNJFlC8/dVRJ+vD7u+c6p5Ol0c/ Soh5ywxqzN3a1NVpxU81dkS+9GSwsIlsTzg6sK58csBXjQL3PgUzLy+hxgK1wQ== 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 4ZMfjc4jSzzst3; Tue, 25 Mar 2025 19:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52PJECgW053373; Tue, 25 Mar 2025 19:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PJECWh053369; Tue, 25 Mar 2025 19:14:12 GMT (envelope-from git) Date: Tue, 25 Mar 2025 19:14:12 GMT Message-Id: <202503251914.52PJECWh053369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2f1f523a45fb - main - snd_hda: Patch Framework 16 AMD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2f1f523a45fb7f9fddd36a3402edbf7b111996c3 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2f1f523a45fb7f9fddd36a3402edbf7b111996c3 commit 2f1f523a45fb7f9fddd36a3402edbf7b111996c3 Author: Christos Margiolis AuthorDate: 2025-03-25 19:13:49 +0000 Commit: Christos Margiolis CommitDate: 2025-03-25 19:13:59 +0000 snd_hda: Patch Framework 16 AMD Reported by: jrm Tested by: jrm Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: jrm Differential Revision: https://reviews.freebsd.org/D49416 --- sys/dev/sound/pci/hda/hdaa_patches.c | 14 ++++++++++++++ sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 15 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 0e88a63e2423..e5473ad48cc1 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -346,6 +346,20 @@ hdac_pin_patch(struct hdaa_widget *w) patch_str = "as=3 seq=15 color=Black loc=Left"; break; } + } else if (id == HDA_CODEC_ALC295 && + subid == FRAMEWORK_LAPTOP_0005_SUBVENDOR) { + switch (nid) { + case 20: + /* + * This pin is a duplicate of pin 23 (both as=1 seq=0), + * which ends up in the driver disabling the + * association altogether. Since sound quality from pin + * 23 seems to be better, configure this one as a back + * speaker. + */ + patch_str = "as=1 seq=2"; + break; + } } else if (id == HDA_CODEC_ALC295 && subid == FRAMEWORK_LAPTOP_0006_SUBVENDOR) { switch (nid) { diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 231839327530..2a79cb47353c 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -532,6 +532,7 @@ #define FRAMEWORK_LAPTOP_0001_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0001) #define FRAMEWORK_LAPTOP_0002_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0002) #define FRAMEWORK_LAPTOP_0003_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0003) +#define FRAMEWORK_LAPTOP_0005_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0005) #define FRAMEWORK_LAPTOP_0006_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0006) /* All codecs you can eat... */ From nobody Tue Mar 25 20:29:44 2025 X-Original-To: dev-commits-src-all@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 4ZMhNn2jC7z5rkmh; Tue, 25 Mar 2025 20:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMhNn1ZYTz3xxD; Tue, 25 Mar 2025 20:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742934585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=afAHmK4Jr76YYnLJFAmzekJ8emvaAUgtao9KBqdqj1s=; b=E2BTfSntOE+mU7SXdu3kTlsPx48oStGKog8hFwi9apu2T6ODBKJlssNWuRdk0VndZTyY3A zQtTMm+s4EWQTgA+1gcw1XE61YraKr4EBCzjhu7bekEyfLsnUKOShYKye0TcVRZ6Kqtlpx Q3UCflCLyE2kaviL8qWYCmUWJE0eUVAqmOME/UkeEmIFewNj6pTLIZW2qK5pY+qKioJql+ eS3/zVN8fkmaeWOufUXvacTO2Ybv2CkdhVDduWOATxqxXFfRS6gx/06ylAbeIK+V0JBTzO Bf74StTn9/bv91Xq2aPGsuuz3FSIXO5XR2Z3D53HOrjjDsFwK9OdABMx7ZMNEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742934585; a=rsa-sha256; cv=none; b=ivEQ4AuNSUAINWWhrYkm3cYzNL8BSa/c9KBmxS4FUayd4gyBdSCEil5TzUul7iYvMh6MtQ nSymVioNtH/B2s5byZm1Fv+DT1vwwDOuntifea2/+x7YINKcw4U1OuOKByzwBwUm2lyZgE KoSnQGqMvRLql+ksUo0YrttQELPBZwUQgOl8b3nHw+xePDjfcdEaws0geV5jLfDY/QxCED j5zq0tDYYkYkNT2zKRqKctkUhgLqQBbH7BKwPrve8oY094E/4xLuff1+rkWQAH9Uqtsxz+ CyzLtXBPnrd7mcqG9fPKksUWD2V6HgTrKoS6Hj3X/9rilIiFYjffNNpxnkxKGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742934585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=afAHmK4Jr76YYnLJFAmzekJ8emvaAUgtao9KBqdqj1s=; b=tFPV8uEDk84eRRbcq9kyuOKZCBLP4VieGmG/8MOF+M6GRiGxMyO9KHbHsNbLKRDwrRaVo2 XRUjE02U/nnoBt7XcxXKeZEzsAeu6Sde9rNwrf8MCaATZlyVCIQ9yA9V1uUlSFW9ZXNLzz fkXxAt7+58Lqtn/Z0KMWPdCiH/jn4qJwn8Z3kJylbwr6w7/0/FZmwC+PSWCOs6AuU57gKR hUGEh1vOSQczjbK94JxB1ppMNNsHAfN2MZni1dL+jYcLBL5WHLnA6pvFsQ+DAo6sHB4ORY SxqQVQtylPWdZz34ElJyeOise/QkQVozcWs0xlmWOER/diSF5LEAOcHhgyMD7g== 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 4ZMhNn17jhzwK2; Tue, 25 Mar 2025 20:29: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 52PKTj4T084851; Tue, 25 Mar 2025 20:29:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PKTit4084848; Tue, 25 Mar 2025 20:29:44 GMT (envelope-from git) Date: Tue, 25 Mar 2025 20:29:44 GMT Message-Id: <202503252029.52PKTit4084848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 1d67cec52542 - stable/14 - contrib/googletest: update from 1.14.0 to 1.15.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1d67cec525421c568199a0524357c35d35e3f6e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1d67cec525421c568199a0524357c35d35e3f6e2 commit 1d67cec525421c568199a0524357c35d35e3f6e2 Author: Enji Cooper AuthorDate: 2024-10-20 01:51:18 +0000 Commit: Enji Cooper CommitDate: 2025-03-25 20:21:40 +0000 contrib/googletest: update from 1.14.0 to 1.15.2 The changes between the two versions can be found in this diff of the two release tags: https://github.com/google/googletest/compare/v1.14.0...v1.15.2 One notable change is that GoogleTest 1.15.x now officially requires C++-14 (1.14.x required C++-11). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47197 Merge commit '14f7077fed7d82046bdcbe347004132f08aba886' (cherry picked from commit 5ca8c28cd8c725b81781201cfdb5f9969396f934) --- contrib/googletest/BUILD.bazel | 17 ++ contrib/googletest/CMakeLists.txt | 13 +- contrib/googletest/CONTRIBUTING.md | 8 +- contrib/googletest/CONTRIBUTORS | 1 + contrib/googletest/MODULE.bazel | 69 +++++ contrib/googletest/README.md | 22 +- contrib/googletest/WORKSPACE | 29 +- contrib/googletest/WORKSPACE.bzlmod | 35 +++ contrib/googletest/ci/linux-presubmit.sh | 10 +- contrib/googletest/ci/macos-presubmit.sh | 3 +- contrib/googletest/ci/windows-presubmit.bat | 11 +- contrib/googletest/docs/advanced.md | 36 ++- contrib/googletest/docs/faq.md | 57 ++-- contrib/googletest/docs/gmock_cook_book.md | 41 ++- contrib/googletest/docs/gmock_for_dummies.md | 6 +- contrib/googletest/docs/primer.md | 39 ++- contrib/googletest/docs/reference/assertions.md | 2 +- contrib/googletest/docs/reference/mocking.md | 3 +- contrib/googletest/docs/reference/testing.md | 29 +- contrib/googletest/fake_fuchsia_sdk.bzl | 33 +++ contrib/googletest/googlemock/CMakeLists.txt | 27 +- contrib/googletest/googlemock/README.md | 6 +- .../googlemock/include/gmock/gmock-actions.h | 44 ++- .../include/gmock/gmock-function-mocker.h | 9 +- .../googlemock/include/gmock/gmock-matchers.h | 179 ++++++------- .../googlemock/include/gmock/gmock-more-actions.h | 7 +- .../googletest/googlemock/include/gmock/gmock.h | 15 +- .../include/gmock/internal/gmock-internal-utils.h | 14 +- .../googlemock/include/gmock/internal/gmock-port.h | 8 +- .../googlemock/src/gmock-internal-utils.cc | 5 +- .../googletest/googlemock/src/gmock-matchers.cc | 29 +- .../googlemock/src/gmock-spec-builders.cc | 3 +- .../test/gmock-matchers-comparisons_test.cc | 9 + .../test/gmock-matchers-containers_test.cc | 17 +- .../googlemock/test/gmock-more-actions_test.cc | 40 ++- .../googlemock/test/gmock-spec-builders_test.cc | 2 +- .../googletest/googlemock/test/gmock_link_test.h | 9 + contrib/googletest/googletest/CMakeLists.txt | 28 +- contrib/googletest/googletest/README.md | 4 +- .../googletest/googletest/cmake/Config.cmake.in | 4 + .../googletest/cmake/internal_utils.cmake | 42 +-- .../include/gtest/gtest-assertion-result.h | 2 +- .../googletest/include/gtest/gtest-death-test.h | 8 +- .../googletest/include/gtest/gtest-message.h | 19 +- .../googletest/include/gtest/gtest-param-test.h | 8 +- .../googletest/include/gtest/gtest-printers.h | 90 +++++-- .../googletest/include/gtest/gtest-typed-test.h | 126 ++++----- .../googletest/googletest/include/gtest/gtest.h | 55 ++-- .../gtest/internal/gtest-death-test-internal.h | 51 ++-- .../include/gtest/internal/gtest-filepath.h | 8 +- .../include/gtest/internal/gtest-internal.h | 99 +++---- .../include/gtest/internal/gtest-param-util.h | 154 +++++------ .../include/gtest/internal/gtest-port-arch.h | 2 + .../googletest/include/gtest/internal/gtest-port.h | 141 +++++++--- .../include/gtest/internal/gtest-type-util.h | 6 +- .../googletest/googletest/src/gtest-death-test.cc | 36 +-- .../googletest/googletest/src/gtest-filepath.cc | 2 +- .../googletest/googletest/src/gtest-internal-inl.h | 46 ++-- contrib/googletest/googletest/src/gtest-port.cc | 98 +++++-- contrib/googletest/googletest/src/gtest.cc | 294 ++++++++++++--------- .../googletest/test/googletest-color-test.py | 1 + .../googletest/test/googletest-death-test-test.cc | 78 +++--- .../test/googletest-json-output-unittest.py | 15 ++ .../googletest/test/googletest-options-test.cc | 5 +- .../test/googletest-output-test-golden-lin.txt | 5 - .../googletest/test/googletest-port-test.cc | 6 +- .../googletest/test/googletest-printers-test.cc | 16 ++ .../googletest/test/gtest_environment_test.cc | 96 ++++--- .../googletest/googletest/test/gtest_help_test.py | 64 ++--- .../googletest/test/gtest_json_test_utils.py | 3 + .../googletest/test/gtest_repeat_test.cc | 4 +- .../googletest/googletest/test/gtest_unittest.cc | 46 ++-- .../googletest/test/gtest_xml_output_unittest.py | 15 +- contrib/googletest/googletest_deps.bzl | 22 +- 74 files changed, 1564 insertions(+), 1022 deletions(-) diff --git a/contrib/googletest/BUILD.bazel b/contrib/googletest/BUILD.bazel index b1e3b7fba89a..e407ae29f44c 100644 --- a/contrib/googletest/BUILD.bazel +++ b/contrib/googletest/BUILD.bazel @@ -56,6 +56,12 @@ config_setting( constraint_values = ["@platforms//os:openbsd"], ) +# NOTE: Fuchsia is not an officially supported platform. +config_setting( + name = "fuchsia", + constraint_values = ["@platforms//os:fuchsia"], +) + config_setting( name = "msvc_compiler", flag_values = { @@ -147,6 +153,17 @@ cc_library( "@com_googlesource_code_re2//:re2", ], "//conditions:default": [], + }) + select({ + # `gtest-death-test.cc` has `EXPECT_DEATH` that spawns a process, + # expects it to crash and inspects its logs with the given matcher, + # so that's why these libraries are needed. + # Otherwise, builds targeting Fuchsia would fail to compile. + ":fuchsia": [ + "@fuchsia_sdk//pkg/fdio", + "@fuchsia_sdk//pkg/syslog", + "@fuchsia_sdk//pkg/zx", + ], + "//conditions:default": [], }), ) diff --git a/contrib/googletest/CMakeLists.txt b/contrib/googletest/CMakeLists.txt index 089ac987fb60..512e5c3d480f 100644 --- a/contrib/googletest/CMakeLists.txt +++ b/contrib/googletest/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) project(googletest-distribution) -set(GOOGLETEST_VERSION 1.14.0) +set(GOOGLETEST_VERSION 1.15.2) if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) set(CMAKE_CXX_EXTENSIONS OFF) @@ -15,11 +15,20 @@ enable_testing() include(CMakeDependentOption) include(GNUInstallDirs) -#Note that googlemock target already builds googletest +# Note that googlemock target already builds googletest. option(BUILD_GMOCK "Builds the googlemock subproject" ON) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF) +if(GTEST_HAS_ABSL) + if(NOT TARGET absl::base) + find_package(absl REQUIRED) + endif() + if(NOT TARGET re2::re2) + find_package(re2 REQUIRED) + endif() +endif() + if(BUILD_GMOCK) add_subdirectory( googlemock ) else() diff --git a/contrib/googletest/CONTRIBUTING.md b/contrib/googletest/CONTRIBUTING.md index 8bed14b2666d..ab5a47bf5530 100644 --- a/contrib/googletest/CONTRIBUTING.md +++ b/contrib/googletest/CONTRIBUTING.md @@ -47,11 +47,11 @@ PR is acceptable as an alternative. ## The Google Test and Google Mock Communities The Google Test community exists primarily through the -[discussion group](http://groups.google.com/group/googletestframework) and the +[discussion group](https://groups.google.com/group/googletestframework) and the GitHub repository. Likewise, the Google Mock community exists primarily through -their own [discussion group](http://groups.google.com/group/googlemock). You are -definitely encouraged to contribute to the discussion and you can also help us -to keep the effectiveness of the group high by following and promoting the +their own [discussion group](https://groups.google.com/group/googlemock). You +are definitely encouraged to contribute to the discussion and you can also help +us to keep the effectiveness of the group high by following and promoting the guidelines listed here. ### Please Be Friendly diff --git a/contrib/googletest/CONTRIBUTORS b/contrib/googletest/CONTRIBUTORS index 77397a5b53fe..ccea41ea810b 100644 --- a/contrib/googletest/CONTRIBUTORS +++ b/contrib/googletest/CONTRIBUTORS @@ -55,6 +55,7 @@ Russ Cox Russ Rufer Sean Mcafee Sigurður Ásgeirsson +Soyeon Kim Sverre Sundsdal Szymon Sobik Takeshi Yoshino diff --git a/contrib/googletest/MODULE.bazel b/contrib/googletest/MODULE.bazel new file mode 100644 index 000000000000..61d5e2223512 --- /dev/null +++ b/contrib/googletest/MODULE.bazel @@ -0,0 +1,69 @@ +# Copyright 2024 Google Inc. +# All Rights Reserved. +# +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://bazel.build/external/overview#bzlmod + +module( + name = "googletest", + version = "1.15.2", + compatibility_level = 1, +) + +# Only direct dependencies need to be listed below. +# Please keep the versions in sync with the versions in the WORKSPACE file. + +bazel_dep(name = "abseil-cpp", + version = "20240116.2", + repo_name = "com_google_absl") + +bazel_dep(name = "platforms", + version = "0.0.10") + +bazel_dep(name = "re2", + repo_name = "com_googlesource_code_re2", + version = "2024-07-02") + +bazel_dep(name = "rules_python", + version = "0.34.0", + dev_dependency = True) + +# https://rules-python.readthedocs.io/en/stable/toolchains.html#library-modules-with-dev-only-python-usage +python = use_extension( + "@rules_python//python/extensions:python.bzl", + "python", + dev_dependency = True +) + +python.toolchain(python_version = "3.12", + is_default = True, + ignore_root_user_error = True) + +fake_fuchsia_sdk = use_repo_rule("//:fake_fuchsia_sdk.bzl", "fake_fuchsia_sdk") +fake_fuchsia_sdk(name = "fuchsia_sdk") diff --git a/contrib/googletest/README.md b/contrib/googletest/README.md index 443e02069581..f50c670534d5 100644 --- a/contrib/googletest/README.md +++ b/contrib/googletest/README.md @@ -9,7 +9,7 @@ GoogleTest now follows the We recommend [updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it). We do publish occasional semantic versions, tagged with -`v${major}.${minor}.${patch}` (e.g. `v1.13.0`). +`v${major}.${minor}.${patch}` (e.g. `v1.15.0`). #### Documentation Updates @@ -17,25 +17,21 @@ Our documentation is now live on GitHub Pages at https://google.github.io/googletest/. We recommend browsing the documentation on GitHub Pages rather than directly in the repository. -#### Release 1.13.0 +#### Release 1.15.0 -[Release 1.13.0](https://github.com/google/googletest/releases/tag/v1.13.0) is +[Release 1.15.0](https://github.com/google/googletest/releases/tag/v1.15.0) is now available. -The 1.13.x branch requires at least C++14. +The 1.15.x branch requires at least C++14. #### Continuous Integration -We use Google's internal systems for continuous integration. \ -GitHub Actions were added for the convenience of open-source contributors. They -are exclusively maintained by the open-source community and not used by the -GoogleTest team. +We use Google's internal systems for continuous integration. #### Coming Soon * We are planning to take a dependency on [Abseil](https://github.com/abseil/abseil-cpp). -* More documentation improvements are planned. ## Welcome to **GoogleTest**, Google's C++ test framework! @@ -100,12 +96,12 @@ tools. In addition to many internal projects at Google, GoogleTest is also used by the following notable projects: -* The [Chromium projects](http://www.chromium.org/) (behind the Chrome browser - and Chrome OS). -* The [LLVM](http://llvm.org/) compiler. +* The [Chromium projects](https://www.chromium.org/) (behind the Chrome + browser and Chrome OS). +* The [LLVM](https://llvm.org/) compiler. * [Protocol Buffers](https://github.com/google/protobuf), Google's data interchange format. -* The [OpenCV](http://opencv.org/) computer vision library. +* The [OpenCV](https://opencv.org/) computer vision library. ## Related Open Source Projects diff --git a/contrib/googletest/WORKSPACE b/contrib/googletest/WORKSPACE index f819ffe61b35..218e6c2e8c2b 100644 --- a/contrib/googletest/WORKSPACE +++ b/contrib/googletest/WORKSPACE @@ -6,22 +6,27 @@ googletest_deps() load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( - name = "rules_python", # 2023-07-31T20:39:27Z - sha256 = "1250b59a33c591a1c4ba68c62e95fc88a84c334ec35a2e23f46cbc1b9a5a8b55", - strip_prefix = "rules_python-e355becc30275939d87116a4ec83dad4bb50d9e1", - urls = ["https://github.com/bazelbuild/rules_python/archive/e355becc30275939d87116a4ec83dad4bb50d9e1.zip"], + name = "rules_python", + sha256 = "d71d2c67e0bce986e1c5a7731b4693226867c45bfe0b7c5e0067228a536fc580", + strip_prefix = "rules_python-0.29.0", + urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.29.0/rules_python-0.29.0.tar.gz"], ) +# https://github.com/bazelbuild/rules_python/releases/tag/0.29.0 +load("@rules_python//python:repositories.bzl", "py_repositories") +py_repositories() + http_archive( - name = "bazel_skylib", # 2023-05-31T19:24:07Z - sha256 = "08c0386f45821ce246bbbf77503c973246ed6ee5c3463e41efc197fa9bc3a7f4", - strip_prefix = "bazel-skylib-288731ef9f7f688932bd50e704a91a45ec185f9b", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/288731ef9f7f688932bd50e704a91a45ec185f9b.zip"], + name = "bazel_skylib", + sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94", + urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"], ) http_archive( - name = "platforms", # 2023-07-28T19:44:27Z - sha256 = "40eb313613ff00a5c03eed20aba58890046f4d38dec7344f00bb9a8867853526", - strip_prefix = "platforms-4ad40ef271da8176d4fc0194d2089b8a76e19d7b", - urls = ["https://github.com/bazelbuild/platforms/archive/4ad40ef271da8176d4fc0194d2089b8a76e19d7b.zip"], + name = "platforms", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz", + "https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz", + ], + sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee", ) diff --git a/contrib/googletest/WORKSPACE.bzlmod b/contrib/googletest/WORKSPACE.bzlmod new file mode 100644 index 000000000000..381432c5d0cb --- /dev/null +++ b/contrib/googletest/WORKSPACE.bzlmod @@ -0,0 +1,35 @@ +# Copyright 2024 Google Inc. +# All Rights Reserved. +# +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://bazel.build/external/migration#workspace.bzlmod +# +# This file is intentionally empty. When bzlmod is enabled and this +# file exists, the content of WORKSPACE is ignored. This prevents +# bzlmod builds from unintentionally depending on the WORKSPACE file. diff --git a/contrib/googletest/ci/linux-presubmit.sh b/contrib/googletest/ci/linux-presubmit.sh index 6bac88787ff2..6d2b3fb573a0 100644 --- a/contrib/googletest/ci/linux-presubmit.sh +++ b/contrib/googletest/ci/linux-presubmit.sh @@ -31,7 +31,7 @@ set -euox pipefail -readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20230217" +readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20240523" readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20230120" if [[ -z ${GTEST_ROOT:-} ]]; then @@ -67,6 +67,9 @@ for cc in /usr/local/bin/gcc /opt/llvm/clang/bin/clang; do done # Do one test with an older version of GCC +# TODO(googletest-team): This currently uses Bazel 5. When upgrading to a +# version of Bazel that supports Bzlmod, add --enable_bzlmod=false to keep test +# coverage for the old WORKSPACE dependency management. time docker run \ --volume="${GTEST_ROOT}:/src:ro" \ --workdir="/src" \ @@ -80,7 +83,6 @@ time docker run \ --copt="-Wuninitialized" \ --copt="-Wundef" \ --copt="-Wno-error=pragmas" \ - --distdir="/bazel-distdir" \ --features=external_include_paths \ --keep_going \ --show_timestamps \ @@ -102,7 +104,7 @@ for std in ${STD}; do --copt="-Wuninitialized" \ --copt="-Wundef" \ --define="absl=${absl}" \ - --distdir="/bazel-distdir" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --show_timestamps \ @@ -127,7 +129,7 @@ for std in ${STD}; do --copt="-Wuninitialized" \ --copt="-Wundef" \ --define="absl=${absl}" \ - --distdir="/bazel-distdir" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --linkopt="--gcc-toolchain=/usr/local" \ diff --git a/contrib/googletest/ci/macos-presubmit.sh b/contrib/googletest/ci/macos-presubmit.sh index 681ebc2a91d9..70eaa74fb490 100644 --- a/contrib/googletest/ci/macos-presubmit.sh +++ b/contrib/googletest/ci/macos-presubmit.sh @@ -53,7 +53,7 @@ done # Test the Bazel build # If we are running on Kokoro, check for a versioned Bazel binary. -KOKORO_GFILE_BAZEL_BIN="bazel-5.1.1-darwin-x86_64" +KOKORO_GFILE_BAZEL_BIN="bazel-7.0.0-darwin-x86_64" if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}" chmod +x ${BAZEL_BIN} @@ -69,6 +69,7 @@ for absl in 0 1; do --copt="-Wundef" \ --cxxopt="-std=c++14" \ --define="absl=${absl}" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --show_timestamps \ diff --git a/contrib/googletest/ci/windows-presubmit.bat b/contrib/googletest/ci/windows-presubmit.bat index 48962eb9e086..1adc1a16ffa8 100644 --- a/contrib/googletest/ci/windows-presubmit.bat +++ b/contrib/googletest/ci/windows-presubmit.bat @@ -1,6 +1,6 @@ SETLOCAL ENABLEDELAYEDEXPANSION -SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-5.1.1-windows-x86_64.exe +SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-7.0.0-windows-x86_64.exe SET PATH=C:\Python34;%PATH% SET BAZEL_PYTHON=C:\python34\python.exe @@ -46,12 +46,17 @@ RMDIR /S /Q cmake_msvc2022 :: ---------------------------------------------------------------------------- :: Bazel +:: The default home directory on Kokoro is a long path which causes errors +:: because of Windows limitations on path length. +:: --output_user_root=C:\tmp causes Bazel to use a shorter path. SET BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community -%BAZEL_EXE% test ... ^ +%BAZEL_EXE% ^ + --output_user_root=C:\tmp ^ + test ... ^ --compilation_mode=dbg ^ --copt=/std:c++14 ^ --copt=/WX ^ - --features=external_include_paths ^ + --enable_bzlmod=true ^ --keep_going ^ --test_output=errors ^ --test_tag_filters=-no_test_msvc2017 diff --git a/contrib/googletest/docs/advanced.md b/contrib/googletest/docs/advanced.md index 3871db13b797..240588a83b4e 100644 --- a/contrib/googletest/docs/advanced.md +++ b/contrib/googletest/docs/advanced.md @@ -508,9 +508,9 @@ TEST_F(FooDeathTest, DoesThat) { When built with Bazel and using Abseil, GoogleTest uses the [RE2](https://github.com/google/re2/wiki/Syntax) syntax. Otherwise, for POSIX systems (Linux, Cygwin, Mac), GoogleTest uses the -[POSIX extended regular expression](http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04) +[POSIX extended regular expression](https://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04) syntax. To learn about POSIX syntax, you may want to read this -[Wikipedia entry](http://en.wikipedia.org/wiki/Regular_expression#POSIX_extended). +[Wikipedia entry](https://en.wikipedia.org/wiki/Regular_expression#POSIX_extended). On Windows, GoogleTest uses its own simple regular expression implementation. It lacks many features. For example, we don't support union (`"x|y"`), grouping @@ -899,10 +899,10 @@ also supports per-test-suite set-up/tear-down. To use it: variables to hold the shared resources. 2. Outside your test fixture class (typically just below it), define those member variables, optionally giving them initial values. -3. In the same test fixture class, define a `static void SetUpTestSuite()` - function (remember not to spell it as **`SetupTestSuite`** with a small - `u`!) to set up the shared resources and a `static void TearDownTestSuite()` - function to tear them down. +3. In the same test fixture class, define a public member function `static void + SetUpTestSuite()` (remember not to spell it as **`SetupTestSuite`** with a + small `u`!) to set up the shared resources and a `static void + TearDownTestSuite()` function to tear them down. That's it! GoogleTest automatically calls `SetUpTestSuite()` before running the *first test* in the `FooTest` test suite (i.e. before creating the first @@ -1004,11 +1004,21 @@ calling the `::testing::AddGlobalTestEnvironment()` function: Environment* AddGlobalTestEnvironment(Environment* env); ``` -Now, when `RUN_ALL_TESTS()` is called, it first calls the `SetUp()` method of -each environment object, then runs the tests if none of the environments -reported fatal failures and `GTEST_SKIP()` was not called. `RUN_ALL_TESTS()` -always calls `TearDown()` with each environment object, regardless of whether or -not the tests were run. +Now, when `RUN_ALL_TESTS()` is invoked, it first calls the `SetUp()` method. The +tests are then executed, provided that none of the environments have reported +fatal failures and `GTEST_SKIP()` has not been invoked. Finally, `TearDown()` is +called. + +Note that `SetUp()` and `TearDown()` are only invoked if there is at least one +test to be performed. Importantly, `TearDown()` is executed even if the test is +not run due to a fatal failure or `GTEST_SKIP()`. + +Calling `SetUp()` and `TearDown()` for each iteration depends on the flag +`gtest_recreate_environments_when_repeating`. `SetUp()` and `TearDown()` are +called for each environment object when the object is recreated for each +iteration. However, if test environments are not recreated for each iteration, +`SetUp()` is called only on the first iteration, and `TearDown()` is called only +on the last iteration. It's OK to register multiple environment objects. In this suite, their `SetUp()` will be called in the order they are registered, and their `TearDown()` will be @@ -1804,7 +1814,7 @@ and/or command line flags. For the flags to work, your programs must call `::testing::InitGoogleTest()` before calling `RUN_ALL_TESTS()`. To see a list of supported flags and their usage, please run your test program -with the `--help` flag. You can also use `-h`, `-?`, or `/?` for short. +with the `--help` flag. If an option is specified both by an environment variable and by a flag, the latter takes precedence. @@ -2171,7 +2181,7 @@ The report format conforms to the following JSON Schema: ```json { - "$schema": "http://json-schema.org/schema#", + "$schema": "https://json-schema.org/schema#", "type": "object", "definitions": { "TestCase": { diff --git a/contrib/googletest/docs/faq.md b/contrib/googletest/docs/faq.md index 1928097292a2..c7d10b5006ba 100644 --- a/contrib/googletest/docs/faq.md +++ b/contrib/googletest/docs/faq.md @@ -3,7 +3,7 @@ ## Why should test suite names and test names not contain underscore? {: .callout .note} -Note: GoogleTest reserves underscore (`_`) for special purpose keywords, such as +Note: GoogleTest reserves underscore (`_`) for special-purpose keywords, such as [the `DISABLED_` prefix](advanced.md#temporarily-disabling-tests), in addition to the following rationale. @@ -33,9 +33,9 @@ contains `_`? `TestSuiteName_Bar__Test`, which is invalid. So clearly `TestSuiteName` and `TestName` cannot start or end with `_` -(Actually, `TestSuiteName` can start with `_` -- as long as the `_` isn't -followed by an upper-case letter. But that's getting complicated. So for -simplicity we just say that it cannot start with `_`.). +(Actually, `TestSuiteName` can start with `_`—as long as the `_` isn't followed +by an upper-case letter. But that's getting complicated. So for simplicity we +just say that it cannot start with `_`.). It may seem fine for `TestSuiteName` and `TestName` to contain `_` in the middle. However, consider this: @@ -128,30 +128,9 @@ both approaches a try. Practice is a much better way to grasp the subtle differences between the two tools. Once you have some concrete experience, you can much more easily decide which one to use the next time. -## I got some run-time errors about invalid proto descriptors when using `ProtocolMessageEquals`. Help! - -{: .callout .note} -**Note:** `ProtocolMessageEquals` and `ProtocolMessageEquiv` are *deprecated* -now. Please use `EqualsProto`, etc instead. - -`ProtocolMessageEquals` and `ProtocolMessageEquiv` were redefined recently and -are now less tolerant of invalid protocol buffer definitions. In particular, if -you have a `foo.proto` that doesn't fully qualify the type of a protocol message -it references (e.g. `message` where it should be `message`), you -will now get run-time errors like: - -``` -... descriptor.cc:...] Invalid proto descriptor for file "path/to/foo.proto": -... descriptor.cc:...] blah.MyMessage.my_field: ".Bar" is not defined. -``` - -If you see this, your `.proto` file is broken and needs to be fixed by making -the types fully qualified. The new definition of `ProtocolMessageEquals` and -`ProtocolMessageEquiv` just happen to reveal your bug. - ## My death test modifies some state, but the change seems lost after the death test finishes. Why? -Death tests (`EXPECT_DEATH`, etc) are executed in a sub-process s.t. the +Death tests (`EXPECT_DEATH`, etc.) are executed in a sub-process s.t. the expected crash won't kill the test program (i.e. the parent process). As a result, any in-memory side effects they incur are observable in their respective sub-processes, but not in the parent process. You can think of them as running @@ -192,16 +171,16 @@ class Foo { }; ``` -You also need to define it *outside* of the class body in `foo.cc`: +you also need to define it *outside* of the class body in `foo.cc`: ```c++ const int Foo::kBar; // No initializer here. ``` Otherwise your code is **invalid C++**, and may break in unexpected ways. In -particular, using it in GoogleTest comparison assertions (`EXPECT_EQ`, etc) will -generate an "undefined reference" linker error. The fact that "it used to work" -doesn't mean it's valid. It just means that you were lucky. :-) +particular, using it in GoogleTest comparison assertions (`EXPECT_EQ`, etc.) +will generate an "undefined reference" linker error. The fact that "it used to +work" doesn't mean it's valid. It just means that you were lucky. :-) If the declaration of the static data member is `constexpr` then it is implicitly an `inline` definition, and a separate definition in `foo.cc` is not @@ -311,7 +290,7 @@ a **fresh** test fixture object, immediately call `SetUp()`, run the test body, call `TearDown()`, and then delete the test fixture object. When you need to write per-test set-up and tear-down logic, you have the choice -between using the test fixture constructor/destructor or `SetUp()/TearDown()`. +between using the test fixture constructor/destructor or `SetUp()`/`TearDown()`. The former is usually preferred, as it has the following benefits: * By initializing a member variable in the constructor, we have the option to @@ -352,7 +331,7 @@ You may still want to use `SetUp()/TearDown()` in the following cases: GoogleTest assertions in a destructor if your code could run on such a platform. -## The compiler complains "no matching function to call" when I use ASSERT_PRED*. How do I fix it? +## The compiler complains "no matching function to call" when I use `ASSERT_PRED*`. How do I fix it? See details for [`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) in the Assertions Reference. @@ -410,7 +389,7 @@ C++ is case-sensitive. Did you spell it as `Setup()`? Similarly, sometimes people spell `SetUpTestSuite()` as `SetupTestSuite()` and wonder why it's never called. -## I have several test suites which share the same test fixture logic, do I have to define a new test fixture class for each of them? This seems pretty tedious. +## I have several test suites which share the same test fixture logic; do I have to define a new test fixture class for each of them? This seems pretty tedious. You don't have to. Instead of @@ -545,7 +524,7 @@ The new NPTL thread library doesn't suffer from this problem, as it doesn't create a manager thread. However, if you don't control which machine your test runs on, you shouldn't depend on this. -## Why does GoogleTest require the entire test suite, instead of individual tests, to be named *DeathTest when it uses ASSERT_DEATH? +## Why does GoogleTest require the entire test suite, instead of individual tests, to be named `*DeathTest` when it uses `ASSERT_DEATH`? GoogleTest does not interleave tests from different test suites. That is, it runs all tests in one test suite first, and then runs all tests in the next test @@ -570,7 +549,7 @@ interleave tests from different test suites, we need to run all tests in the `FooTest` case before running any test in the `BarTest` case. This contradicts with the requirement to run `BarTest.DefDeathTest` before `FooTest.Uvw`. -## But I don't like calling my entire test suite \*DeathTest when it contains both death tests and non-death tests. What do I do? +## But I don't like calling my entire test suite `*DeathTest` when it contains both death tests and non-death tests. What do I do? You don't have to, but if you like, you may split up the test suite into `FooTest` and `FooDeathTest`, where the names make it clear that they are @@ -607,7 +586,7 @@ defined such that we can print a value of `FooType`. In addition, if `FooType` is declared in a name space, the `<<` operator also needs to be defined in the *same* name space. See -[Tip of the Week #49](http://abseil.io/tips/49) for details. +[Tip of the Week #49](https://abseil.io/tips/49) for details. ## How do I suppress the memory leak messages on Windows? @@ -628,10 +607,10 @@ mistake in production. Such cleverness also leads to advise against the practice, and GoogleTest doesn't provide a way to do it. In general, the recommended way to cause the code to behave differently under -test is [Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection). You can inject +test is [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection). You can inject different functionality from the test and from the production code. Since your production code doesn't link in the for-test logic at all (the -[`testonly`](http://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure +[`testonly`](https://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure that), there is no danger in accidentally running it. However, if you *really*, *really*, *really* have no choice, and if you follow @@ -654,7 +633,7 @@ the `--gtest_also_run_disabled_tests` flag. Yes. The rule is **all test methods in the same test suite must use the same fixture -class.** This means that the following is **allowed** because both tests use the +class**. This means that the following is **allowed** because both tests use the same fixture class (`::testing::Test`). ```c++ diff --git a/contrib/googletest/docs/gmock_cook_book.md b/contrib/googletest/docs/gmock_cook_book.md index da10918c9659..f1b10b472d27 100644 --- a/contrib/googletest/docs/gmock_cook_book.md +++ b/contrib/googletest/docs/gmock_cook_book.md @@ -1927,6 +1927,12 @@ class MockFoo : public Foo { action_n)); ``` +The return value of the last action **must** match the return type of the mocked +method. In the example above, `action_n` could be `Return(true)`, or a lambda +that returns a `bool`, but not `SaveArg`, which returns `void`. Otherwise the +signature of `DoAll` would not match the signature expected by `WillOnce`, which +is the signature of the mocked method, and it wouldn't compile. + ### Verifying Complex Arguments {#SaveArgVerify} If you want to verify that a method is called with a particular argument but the @@ -3306,7 +3312,7 @@ For convenience, we allow the description string to be empty (`""`), in which case gMock will use the sequence of words in the matcher name as the description. -For example: +#### Basic Example ```cpp MATCHER(IsDivisibleBy7, "") { return (arg % 7) == 0; } @@ -3344,6 +3350,8 @@ If the above assertions fail, they will print something like: where the descriptions `"is divisible by 7"` and `"not (is divisible by 7)"` are automatically calculated from the matcher name `IsDivisibleBy7`. +#### Adding Custom Failure Messages + As you may have noticed, the auto-generated descriptions (especially those for the negation) may not be so great. You can always override them with a `string` expression of your own: @@ -3377,14 +3385,41 @@ With this definition, the above assertion will give a better message: Actual: 27 (the remainder is 6) ``` +#### Using EXPECT_ Statements in Matchers + +You can also use `EXPECT_...` (and `ASSERT_...`) statements inside custom +matcher definitions. In many cases, this allows you to write your matcher more +concisely while still providing an informative error message. For example: + +```cpp +MATCHER(IsDivisibleBy7, "") { + const auto remainder = arg % 7; + EXPECT_EQ(remainder, 0); + return true; +} +``` + +If you write a test that includes the line `EXPECT_THAT(27, IsDivisibleBy7());`, +you will get an error something like the following: + +```shell +Expected equality of these values: + remainder + Which is: 6 + 0 +``` + +#### `MatchAndExplain` + You should let `MatchAndExplain()` print *any additional information* that can help a user understand the match result. Note that it should explain why the match succeeds in case of a success (unless it's obvious) - this is useful when the matcher is used inside `Not()`. There is no need to print the argument value itself, as gMock already prints it for you. -{: .callout .note} -NOTE: The type of the value being matched (`arg_type`) is determined by the +#### Argument Types + +The type of the value being matched (`arg_type`) is determined by the context in which you use the matcher and is supplied to you by the compiler, so you don't need to worry about declaring it (nor can you). This allows the matcher to be polymorphic. For example, `IsDivisibleBy7()` can be used to match diff --git a/contrib/googletest/docs/gmock_for_dummies.md b/contrib/googletest/docs/gmock_for_dummies.md index 43f907aaa5da..ed2297c2f796 100644 --- a/contrib/googletest/docs/gmock_for_dummies.md +++ b/contrib/googletest/docs/gmock_for_dummies.md @@ -90,14 +90,14 @@ gMock is bundled with googletest. ## A Case for Mock Turtles Let's look at an example. Suppose you are developing a graphics program that -relies on a [LOGO](http://en.wikipedia.org/wiki/Logo_programming_language)-like +relies on a [LOGO](https://en.wikipedia.org/wiki/Logo_programming_language)-like API for drawing. How would you test that it does the right thing? Well, you can run it and compare the screen with a golden screen snapshot, but let's admit it: tests like this are expensive to run and fragile (What if you just upgraded to a shiny new graphics card that has better anti-aliasing? Suddenly you have to update all your golden images.). It would be too painful if all your tests are like this. Fortunately, you learned about -[Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection) and know the right thing +[Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) and know the right thing to do: instead of having your application talk to the system API directly, wrap the API in an interface (say, `Turtle`) and code to that interface: @@ -261,6 +261,8 @@ happen. Therefore it's a good idea to turn on the heap checker in your tests when you allocate mocks on the heap. You get that automatically if you use the `gtest_main` library already. +###### Expectation Ordering + **Important note:** gMock requires expectations to be set **before** the mock functions are called, otherwise the behavior is **undefined**. Do not alternate between calls to `EXPECT_CALL()` and calls to the mock functions, and do not set diff --git a/contrib/googletest/docs/primer.md b/contrib/googletest/docs/primer.md index f2a97a7269b7..61806be6ef86 100644 --- a/contrib/googletest/docs/primer.md +++ b/contrib/googletest/docs/primer.md @@ -50,7 +50,7 @@ terms *Test*, *Test Case* and *Test Suite*, so beware of misunderstanding these. Historically, GoogleTest started to use the term *Test Case* for grouping related tests, whereas current publications, including International Software -Testing Qualifications Board ([ISTQB](http://www.istqb.org/)) materials and +Testing Qualifications Board ([ISTQB](https://www.istqb.org/)) materials and various textbooks on software quality, use the term *[Test Suite][istqb test suite]* for this. @@ -68,13 +68,13 @@ deprecated and refactored away. So please be aware of the different definitions of the terms: -Meaning | GoogleTest Term | [ISTQB](http://www.istqb.org/) Term +Meaning | GoogleTest Term | [ISTQB](https://www.istqb.org/) Term :----------------------------------------------------------------------------------- | :---------------------- | :---------------------------------- Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case][istqb test case] -[istqb test case]: http://glossary.istqb.org/en/search/test%20case -[istqb test suite]: http://glossary.istqb.org/en/search/test%20suite +[istqb test case]: https://glossary.istqb.org/en_US/term/test-case-2 +[istqb test suite]: https://glossary.istqb.org/en_US/term/test-suite-1-3 ## Basic Concepts @@ -210,7 +210,7 @@ objects for several different tests. To create a fixture: -1. Derive a class from `::testing::Test` . Start its body with `protected:`, as +1. Derive a class from `testing::Test` . Start its body with `protected:`, as we'll want to access fixture members from sub-classes. 2. Inside the class, declare any objects you plan to use. 3. If necessary, write a default constructor or `SetUp()` function to prepare @@ -271,16 +271,16 @@ First, define a fixture class. By convention, you should give it the name `FooTest` where `Foo` is the class being tested. ```c++ -class QueueTest : public ::testing::Test { +class QueueTest : public testing::Test { protected: - void SetUp() override { + QueueTest() { // q0_ remains empty q1_.Enqueue(1); q2_.Enqueue(2); q2_.Enqueue(3); } - // void TearDown() override {} + // ~QueueTest() override = default; Queue q0_; Queue q1_; @@ -288,8 +288,9 @@ class QueueTest : public ::testing::Test { }; ``` -In this case, `TearDown()` is not needed since we don't have to clean up after -each test, other than what's already done by the destructor. +In this case, we don't need to define a destructor or a `TearDown()` method, +because the implicit destructor generated by the compiler will perform all of +the necessary cleanup. Now we'll write tests using `TEST_F()` and this fixture. @@ -326,11 +327,9 @@ would lead to a segfault when `n` is `NULL`. When these tests run, the following happens: 1. GoogleTest constructs a `QueueTest` object (let's call it `t1`). -2. `t1.SetUp()` initializes `t1`. -3. The first test (`IsEmptyInitially`) runs on `t1`. -4. `t1.TearDown()` cleans up after the test finishes. -5. `t1` is destructed. -6. The above steps are repeated on another `QueueTest` object, this time +2. The first test (`IsEmptyInitially`) runs on `t1`. +3. `t1` is destructed. +4. The above steps are repeated on another `QueueTest` object, this time running the `DequeueWorks` test. **Availability**: Linux, Windows, Mac. @@ -402,7 +401,7 @@ namespace project { namespace { // The fixture for testing class Foo. -class FooTest : public ::testing::Test { +class FooTest : public testing::Test { protected: // You can remove any or all of the following functions if their bodies would // be empty. @@ -450,14 +449,14 @@ TEST_F(FooTest, DoesXyz) { } // namespace my int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); + testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } ``` -The `::testing::InitGoogleTest()` function parses the command line for -GoogleTest flags, and removes all recognized flags. This allows the user to -control a test program's behavior via various flags, which we'll cover in the +The `testing::InitGoogleTest()` function parses the command line for GoogleTest +flags, and removes all recognized flags. This allows the user to control a test +program's behavior via various flags, which we'll cover in the [AdvancedGuide](advanced.md). You **must** call this function before calling `RUN_ALL_TESTS()`, or the flags won't be properly initialized. diff --git a/contrib/googletest/docs/reference/assertions.md b/contrib/googletest/docs/reference/assertions.md index aa1dbc04bd19..492ff5ef6937 100644 --- a/contrib/googletest/docs/reference/assertions.md +++ b/contrib/googletest/docs/reference/assertions.md @@ -1,7 +1,7 @@ # Assertions Reference *** 5249 LINES SKIPPED *** From nobody Tue Mar 25 20:29:46 2025 X-Original-To: dev-commits-src-all@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 4ZMhNp4F9qz5rlBg; Tue, 25 Mar 2025 20:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMhNp2d38z3xmL; Tue, 25 Mar 2025 20:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742934586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pbUMUhDv44eNjwDgtev9Nbl7/UWu1xuD8YUKG8/ZWgc=; b=xaLGg4tJiYegiecbxI/cuu4g1G0lIE3jsmEUbFYXPNis+FRctBq1KFUQCAwWFGmw94KMY3 n+VF/giS/7cSRkmkKFNuyY8oCkOSbakv8QxETcj8p/Ktt0lfq2UZCBkO3bU5/xafHpa1hu 9juDUlZmnMQiEWxC6/A+gtESq9847/Gw2ZnuAV9b7cAU0nbN1PzNuUJLeJs7HrYNYmFW7V rIBTYaHs66/gKiz3zdLfozp7auPxqU9ae+FFmvzbL+8pk+XO4Y/j6vfjtpJyM43/GL3oSX qnACxjg07pg7EPvU1G5eOKayKJIJcclxVjHIfUKrFVl+/x/ZqJxQRcVvlW99Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742934586; a=rsa-sha256; cv=none; b=YH1+0NTBO3npWBH10bsN48FznOJQCzEvAc66byC+N79W6Qpt0w0i/vngkcjGxdXVZ0wJCI kSwQftqSU15KLC4pMFC2kFaJoviftvnTjz1VGEla6Kmp7rjjsJE4ZTedlQeyo0dC0jOK6f CjaLKOo13tWBWuzp2eyUBv+GBY7SeWeonpp5q9L3yzGJSIzzCg9xuTwsYQ6cxEe2qNkP3Q FcOovPReFhttANM/8v+XyqpwSrN6OtQRrC0FPAaEVob2XuT9x5b8yvz7MXMAB+v5oV8VGx 54v/R8IhZ/aNJnBFFGXbQ3iYAx/zPurfYoLOaOqLwq/RokNcecK/uq/N3jp0rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742934586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pbUMUhDv44eNjwDgtev9Nbl7/UWu1xuD8YUKG8/ZWgc=; b=D5lnyN36VlyGpcl1IBZGGn6vNJILKAYQNmFrhbRxMhMYaJnB+UNVm2xG0pfpmR+t+o7Eej CGrD1eyqsjOFHf1MyoFknAxqubKECOkbeVxAicvvxUDtyTAjvbUnDgQ20S6L3fkV/Y0Hk1 vQvS6ppvceGUDKJeY1jPc9s8kDLcMlHyyMzS7hH48z9IPVOoHHhtvCIzPUxZPkTowlTFGx 7m8RzKN5TVEtINYVseF2UGBA5xPt+i6sQvNADUIYA94cl8LtlsPMVIQBVzN2bscLf2XAgf u0LzpW8uv/9s+sPlVNK7dq5IMQpk68EyZcfHHEJuHq42iJaGO9WzivS2vXJJgg== 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 4ZMhNp24Z7zwMP; Tue, 25 Mar 2025 20:29: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 52PKTkWi084885; Tue, 25 Mar 2025 20:29:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PKTk1W084882; Tue, 25 Mar 2025 20:29:46 GMT (envelope-from git) Date: Tue, 25 Mar 2025 20:29:46 GMT Message-Id: <202503252029.52PKTk1W084882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 7286b7242c31 - stable/14 - tests/sys/fs/fusefs: include iomanip header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7286b7242c312eed08932e50f70554ff452e5eda Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=7286b7242c312eed08932e50f70554ff452e5eda commit 7286b7242c312eed08932e50f70554ff452e5eda Author: Enji Cooper AuthorDate: 2024-10-19 15:34:07 +0000 Commit: Enji Cooper CommitDate: 2025-03-25 20:25:31 +0000 tests/sys/fs/fusefs: include iomanip header io.cc relies on `std::setw(..)`, which is exported by the iomanip C++ header. Newer versions of GoogleTest don't export this header, so add the explicit include. This unbreaks the build with GoogleTest 1.15.2. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47194 (cherry picked from commit 0077477f215c851fe15c9ea12cfb005125c4238a) --- tests/sys/fs/fusefs/io.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 766148044b32..ced291836da0 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -37,6 +37,8 @@ extern "C" { #include } +#include + #include "mockfs.hh" #include "utils.hh" From nobody Tue Mar 25 21:09:54 2025 X-Original-To: dev-commits-src-all@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 4ZMjH73SGDz5rnBt; Tue, 25 Mar 2025 21:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMjH63gRHz3T8C; Tue, 25 Mar 2025 21:09:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742936994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XdCHwRaK45njVu3JbU98hVIU6QkgfbJJbGy3XKJhhak=; b=KVk5HZjBUI7AtBgc0GrOndrMveKGafHbmtK03JsdAzBXWYzcmFY4rKcTL07jVa7Hg1x2ir hixtjQoDZUTrOd/YijUpMi5jJ0FGZmyXdf7UfrimkUlwU1xoXd5MRmfIl7lWNXPYprYqw+ RtsKmSI3lAg7t3Gs3yAnzKUu6BFf/Xe07ZSGGuazEArHuDzctodhwYwuXYen72CfmdO2b0 89kq0Qh8gyOYwT7HTJ3BKDFoQ7/xCv2seuKk0Vu1VyyZc882TEABYFQlGhRIcy+aXhAprz 5PS+yNfain/oqMdp7WIolPylBb7lRrMnLpMr8uOK5l5vkXkXd7QvXCbCuKMEOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742936994; a=rsa-sha256; cv=none; b=DLpX8S/EUFH62JROqlOH3XvYL6qxBAPTQ4FhHSec7FH4pc2NKDNobg93Z2mJhChlEcoFVZ 07a2O7jC+UF0+2JSUS8geTWpuegnW+8zcRgP1I/1NQCydFXpjdPJr6RHPfD9cuRRLHffow VTgydPqsC/2DqmOJIKHL00alz77fSkJQRaR9cG1vouarfTUYb61Eszk6HylDH6I+0UV2y1 uOOXMy0uKN/4JkqmGQg46y1Mxmn9NvFoz/MqCIMa/mTkZQ1fGoIiKtOXcrVetLo21bjLoa IDPRui/mdb4udkjOCsLg4NADuJ2CBZA8U7zWiUNtjMED6hgra30cyGLItuKQ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742936994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XdCHwRaK45njVu3JbU98hVIU6QkgfbJJbGy3XKJhhak=; b=QOx82ec2rOkWzBZB3CgBUqFcKUmwVhiCzS97P/hc0cTGrA578w//ie+UKE01oKCiWeoEW9 Qfc8veGrG/xTq31bsmignW5n3VjS5EBWHk+DEftYk8wyIlaNi49ef63iXe+vyhwzytIhWU x96YtLA6HD07vtSgPaPXqxEE8xtgZl1ie/NfWyeGjxgbkJuHW/8Bdp2KLSpnxw0MsbcaC+ yWPN5EadF7TGFP5ch/wM38mpLkKULfpAP/I/j+ty+TdY+4mgGPbV4JVd/EIDqAAqxhCaDo z/JyiR6WhwO8XZw3kt6N8RysV4ON8x3FKistTsxyPJfazRPX7YlI5OFwN5cKAg== 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 4ZMjH63GPyzwt0; Tue, 25 Mar 2025 21:09: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 52PL9s5S060228; Tue, 25 Mar 2025 21:09:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PL9sKt060225; Tue, 25 Mar 2025 21:09:54 GMT (envelope-from git) Date: Tue, 25 Mar 2025 21:09:54 GMT Message-Id: <202503252109.52PL9sKt060225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: cb29db243bd0 - stable/14 - openssl: Import OpenSSL 3.0.16 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cb29db243bd09d16604435639ae43ef7af0ea254 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=cb29db243bd09d16604435639ae43ef7af0ea254 commit cb29db243bd09d16604435639ae43ef7af0ea254 Author: Enji Cooper AuthorDate: 2025-03-14 06:40:59 +0000 Commit: Enji Cooper CommitDate: 2025-03-25 21:07:59 +0000 openssl: Import OpenSSL 3.0.16 This release incorporates the following bug fixes and mitigations: - [CVE-2024-13176](https://www.openssl.org/news/vulnerabilities.html#CVE-2024-13176 - [CVE-2024-9143](https://www.openssl.org/news/vulnerabilities.html#CVE-2024-9143) Release notes can be found at: https://openssl-library.org/news/openssl-3.0-notes/index.html MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D49296 (cherry picked from commit 0d0c8621fd181e507f0fb50ffcca606faf66a8c2) --- crypto/openssl/CHANGES.md | 33 ++ crypto/openssl/Configurations/unix-Makefile.tmpl | 2 +- crypto/openssl/NEWS.md | 16 + crypto/openssl/NOTES-NONSTOP.md | 7 +- crypto/openssl/README.md | 28 +- crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/asn1parse.c | 5 +- crypto/openssl/apps/cms.c | 39 ++- crypto/openssl/apps/engine.c | 8 +- crypto/openssl/apps/lib/http_server.c | 7 +- crypto/openssl/apps/lib/s_cb.c | 24 +- crypto/openssl/apps/lib/s_socket.c | 13 +- crypto/openssl/apps/lib/vms_term_sock.c | 10 +- crypto/openssl/apps/passwd.c | 3 +- crypto/openssl/apps/pkcs12.c | 5 +- crypto/openssl/apps/pkeyutl.c | 5 +- crypto/openssl/apps/rehash.c | 5 + crypto/openssl/apps/smime.c | 20 +- crypto/openssl/apps/speed.c | 373 ++++++++++++++++----- crypto/openssl/configdata.pm.in | 4 +- crypto/openssl/crypto/asn1/a_bitstr.c | 41 ++- crypto/openssl/crypto/asn1/a_strnid.c | 10 +- crypto/openssl/crypto/asn1/a_time.c | 57 ++-- crypto/openssl/crypto/asn1/asn1_gen.c | 5 +- crypto/openssl/crypto/asn1/asn_mime.c | 2 + crypto/openssl/crypto/bio/bio_addr.c | 9 +- crypto/openssl/crypto/bio/bio_sock.c | 4 +- crypto/openssl/crypto/bio/bss_log.c | 2 +- crypto/openssl/crypto/bn/asm/armv8-mont.pl | 4 +- crypto/openssl/crypto/bn/bn_exp.c | 23 +- crypto/openssl/crypto/bn/bn_gf2m.c | 28 +- crypto/openssl/crypto/bn/rsaz_exp_x2.c | 8 +- crypto/openssl/crypto/cmp/cmp_client.c | 5 +- crypto/openssl/crypto/cms/cms_asn1.c | 19 +- crypto/openssl/crypto/cms/cms_dh.c | 2 +- crypto/openssl/crypto/cms/cms_env.c | 9 - crypto/openssl/crypto/cms/cms_err.c | 102 +++--- crypto/openssl/crypto/cms/cms_kari.c | 9 +- crypto/openssl/crypto/cms/cms_lib.c | 15 +- crypto/openssl/crypto/cms/cms_local.h | 2 +- crypto/openssl/crypto/cms/cms_rsa.c | 5 +- crypto/openssl/crypto/cms/cms_sd.c | 20 +- crypto/openssl/crypto/cms/cms_smime.c | 3 +- crypto/openssl/crypto/core_fetch.c | 5 +- crypto/openssl/crypto/dso/dso_dl.c | 13 +- crypto/openssl/crypto/dso/dso_dlfcn.c | 9 +- crypto/openssl/crypto/dso/dso_win32.c | 16 +- crypto/openssl/crypto/ec/ec_asn1.c | 2 +- crypto/openssl/crypto/ec/ec_backend.c | 8 +- crypto/openssl/crypto/ec/ec_lib.c | 9 +- crypto/openssl/crypto/ec/ec_oct.c | 4 + crypto/openssl/crypto/encode_decode/encoder_pkey.c | 6 +- crypto/openssl/crypto/err/openssl.txt | 4 +- crypto/openssl/crypto/evp/ctrl_params_translate.c | 12 +- crypto/openssl/crypto/evp/m_sigver.c | 12 +- crypto/openssl/crypto/http/http_client.c | 19 +- crypto/openssl/crypto/http/http_lib.c | 22 +- crypto/openssl/crypto/pem/pem_pk8.c | 4 +- crypto/openssl/crypto/pkcs12/p12_crt.c | 6 +- crypto/openssl/crypto/pkcs7/pk7_doit.c | 6 +- crypto/openssl/crypto/pkcs7/pk7_lib.c | 5 + crypto/openssl/crypto/sm2/sm2_sign.c | 10 +- crypto/openssl/crypto/srp/srp_vfy.c | 2 + crypto/openssl/crypto/threads_win.c | 3 +- crypto/openssl/crypto/trace.c | 2 +- crypto/openssl/crypto/ui/ui_util.c | 12 +- crypto/openssl/crypto/x509/v3_admis.c | 34 +- crypto/openssl/crypto/x509/v3_san.c | 3 +- crypto/openssl/crypto/x509/x509_cmp.c | 4 +- crypto/openssl/crypto/x509/x_all.c | 4 +- crypto/openssl/demos/cipher/aesccm.c | 2 +- crypto/openssl/doc/man1/openssl-ca.pod.in | 2 +- crypto/openssl/doc/man1/openssl-cmp.pod.in | 11 +- crypto/openssl/doc/man1/openssl-cms.pod.in | 9 +- crypto/openssl/doc/man1/openssl-fipsinstall.pod.in | 4 + crypto/openssl/doc/man1/openssl-ocsp.pod.in | 30 +- crypto/openssl/doc/man1/openssl-pkeyutl.pod.in | 77 +++-- crypto/openssl/doc/man1/openssl-req.pod.in | 4 +- crypto/openssl/doc/man1/openssl-s_client.pod.in | 77 ++++- crypto/openssl/doc/man1/openssl-s_server.pod.in | 11 +- crypto/openssl/doc/man1/openssl-s_time.pod.in | 1 + crypto/openssl/doc/man1/openssl-smime.pod.in | 4 +- crypto/openssl/doc/man1/openssl-ts.pod.in | 2 + .../doc/man1/openssl-verification-options.pod | 194 ++++++----- crypto/openssl/doc/man1/openssl.pod | 107 +----- crypto/openssl/doc/man3/ASN1_TIME_set.pod | 10 +- crypto/openssl/doc/man3/ASN1_aux_cb.pod | 6 +- crypto/openssl/doc/man3/BIO_s_accept.pod | 6 +- crypto/openssl/doc/man3/BIO_s_connect.pod | 2 +- crypto/openssl/doc/man3/ECDSA_sign.pod | 4 +- crypto/openssl/doc/man3/EVP_EncryptInit.pod | 16 +- crypto/openssl/doc/man3/EVP_PKEY_decapsulate.pod | 9 +- crypto/openssl/doc/man3/EVP_PKEY_encapsulate.pod | 7 +- crypto/openssl/doc/man3/OSSL_CMP_CTX_new.pod | 6 +- crypto/openssl/doc/man3/OSSL_CMP_validate_msg.pod | 4 +- crypto/openssl/doc/man3/OSSL_HTTP_parse_url.pod | 11 +- crypto/openssl/doc/man3/OSSL_HTTP_transfer.pod | 6 +- crypto/openssl/doc/man3/OSSL_PARAM.pod | 2 +- crypto/openssl/doc/man3/OSSL_trace_enabled.pod | 8 +- crypto/openssl/doc/man3/SSL_CTX_new.pod | 10 +- crypto/openssl/doc/man3/SSL_get_shared_sigalgs.pod | 2 +- crypto/openssl/doc/man3/SSL_set_bio.pod | 9 + crypto/openssl/doc/man3/X509V3_set_ctx.pod | 5 +- crypto/openssl/doc/man3/X509_STORE_CTX_new.pod | 19 +- crypto/openssl/doc/man3/X509_add_cert.pod | 3 +- crypto/openssl/doc/man3/X509_load_http.pod | 3 + crypto/openssl/doc/man7/EVP_KDF-HKDF.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-KB.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-PBKDF2.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-SS.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-SSHKDF.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-TLS13_KDF.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-TLS1_PRF.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-X942-ASN1.pod | 2 + crypto/openssl/doc/man7/EVP_KDF-X963.pod | 2 + crypto/openssl/doc/man7/EVP_SIGNATURE-DSA.pod | 4 +- crypto/openssl/doc/man7/openssl-env.pod | 93 +++++ crypto/openssl/doc/man7/provider.pod | 12 + crypto/openssl/engines/e_afalg.c | 4 +- crypto/openssl/engines/e_loader_attic.c | 2 +- crypto/openssl/include/crypto/bn.h | 5 +- crypto/openssl/include/crypto/cmserr.h | 2 +- crypto/openssl/include/openssl/cmserr.h | 3 +- crypto/openssl/include/openssl/http.h | 5 +- crypto/openssl/providers/fips-sources.checksums | 254 +++++++------- crypto/openssl/providers/fips.checksum | 2 +- .../implementations/ciphers/cipher_aes_ocb.c | 12 +- .../encode_decode/encode_key2text.c | 3 +- .../openssl/providers/implementations/kdfs/hkdf.c | 2 +- .../providers/implementations/kdfs/scrypt.c | 5 +- .../providers/implementations/kem/rsa_kem.c | 54 ++- .../providers/implementations/keymgmt/dsa_kmgmt.c | 2 +- .../providers/implementations/keymgmt/ecx_kmgmt.c | 2 +- .../implementations/keymgmt/mac_legacy_kmgmt.c | 6 +- .../implementations/signature/eddsa_sig.c | 3 +- .../implementations/storemgmt/file_store.c | 2 +- crypto/openssl/ssl/statem/extensions_srvr.c | 2 +- crypto/openssl/ssl/statem/statem_srvr.c | 6 +- crypto/openssl/test/acvp_test.c | 2 +- crypto/openssl/test/build.info | 6 +- crypto/openssl/test/cmactest.c | 8 +- crypto/openssl/test/conf_include_test.c | 2 +- crypto/openssl/test/drbgtest.c | 2 +- crypto/openssl/test/ec_internal_test.c | 51 +++ crypto/openssl/test/enginetest.c | 4 +- crypto/openssl/test/evp_kdf_test.c | 28 +- crypto/openssl/test/evp_libctx_test.c | 126 ++++--- crypto/openssl/test/hmactest.c | 12 +- crypto/openssl/test/memleaktest.c | 4 +- crypto/openssl/test/p_test.c | 34 +- crypto/openssl/test/pkcs12_format_test.c | 9 +- crypto/openssl/test/property_test.c | 41 ++- crypto/openssl/test/recipes/03-test_fipsinstall.t | 4 + .../openssl/test/recipes/04-test_encoder_decoder.t | 29 +- crypto/openssl/test/recipes/25-test_verify.t | 8 +- .../recipes/30-test_evp_data/evpkdf_tls13_kdf.txt | 10 + crypto/openssl/test/recipes/80-test_cmp_http.t | 4 +- .../80-test_cmp_http_data/test_connection.csv | 4 +- crypto/openssl/test/recipes/80-test_cms.t | 81 ++++- crypto/openssl/test/sslapitest.c | 5 +- crypto/openssl/test/testutil/tests.c | 3 +- crypto/openssl/test/threadstest.c | 2 +- crypto/openssl/util/check-format-commit.sh | 193 ++++++----- crypto/openssl/util/check-format.pl | 14 +- crypto/openssl/util/mkbuildinf.pl | 12 +- crypto/openssl/util/perl/OpenSSL/Template.pm | 9 + 166 files changed, 2042 insertions(+), 1082 deletions(-) diff --git a/crypto/openssl/CHANGES.md b/crypto/openssl/CHANGES.md index e41181b5bbb0..5b0193bc3955 100644 --- a/crypto/openssl/CHANGES.md +++ b/crypto/openssl/CHANGES.md @@ -28,6 +28,37 @@ breaking changes, and mappings for the large list of deprecated functions. [Migration guide]: https://github.com/openssl/openssl/tree/master/doc/man7/migration_guide.pod +### Changes between 3.0.15 and 3.0.16 [11 Feb 2025] + + * Fixed timing side-channel in ECDSA signature computation. + + There is a timing signal of around 300 nanoseconds when the top word of + the inverted ECDSA nonce value is zero. This can happen with significant + probability only for some of the supported elliptic curves. In particular + the NIST P-521 curve is affected. To be able to measure this leak, the + attacker process must either be located in the same physical computer or + must have a very fast network connection with low latency. + + ([CVE-2024-13176]) + + *Tomáš Mráz* + + * Fixed possible OOB memory access with invalid low-level GF(2^m) elliptic + curve parameters. + + Use of the low-level GF(2^m) elliptic curve APIs with untrusted + explicit values for the field polynomial can lead to out-of-bounds memory + reads or writes. + Applications working with "exotic" explicit binary (GF(2^m)) curve + parameters, that make it possible to represent invalid field polynomials + with a zero constant term, via the above or similar APIs, may terminate + abruptly as a result of reading or writing outside of array bounds. Remote + code execution cannot easily be ruled out. + + ([CVE-2024-9143]) + + *Viktor Dukhovni* + ### Changes between 3.0.14 and 3.0.15 [3 Sep 2024] * Fixed possible denial of service in X.509 name checks. @@ -19922,6 +19953,8 @@ ndif +[CVE-2024-13176]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-13176 +[CVE-2024-9143]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-9143 [CVE-2024-6119]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-6119 [CVE-2024-5535]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-5535 [CVE-2024-4741]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4741 diff --git a/crypto/openssl/Configurations/unix-Makefile.tmpl b/crypto/openssl/Configurations/unix-Makefile.tmpl index 644540397de5..d2b0797a7edf 100644 --- a/crypto/openssl/Configurations/unix-Makefile.tmpl +++ b/crypto/openssl/Configurations/unix-Makefile.tmpl @@ -1688,7 +1688,7 @@ EOF } elsif ($makedep_scheme eq 'gcc' && !grep /\.rc$/, @srcs) { $recipe .= <<"EOF"; $obj: $deps - $cmd $incs $defs $cmdflags -MMD -MF $dep.tmp -MT \$\@ -c -o \$\@ $srcs + $cmd $incs $defs $cmdflags -MMD -MF $dep.tmp -c -o \$\@ $srcs \@touch $dep.tmp \@if cmp $dep.tmp $dep > /dev/null 2> /dev/null; then \\ rm -f $dep.tmp; \\ diff --git a/crypto/openssl/NEWS.md b/crypto/openssl/NEWS.md index e0a81703ee8d..007fc9786ef8 100644 --- a/crypto/openssl/NEWS.md +++ b/crypto/openssl/NEWS.md @@ -18,6 +18,20 @@ OpenSSL Releases OpenSSL 3.0 ----------- +### Major changes between OpenSSL 3.0.15 and OpenSSL 3.0.16 [11 Feb 2025] + +OpenSSL 3.0.16 is a security patch release. The most severe CVE fixed in this +release is Low. + +This release incorporates the following bug fixes and mitigations: + + * Fixed timing side-channel in ECDSA signature computation. + ([CVE-2024-13176]) + + * Fixed possible OOB memory access with invalid low-level GF(2^m) elliptic + curve parameters. + ([CVE-2024-9143]) + ### Major changes between OpenSSL 3.0.14 and OpenSSL 3.0.15 [3 Sep 2024] OpenSSL 3.0.15 is a security patch release. The most severe CVE fixed in this @@ -1495,6 +1509,8 @@ OpenSSL 0.9.x +[CVE-2024-13176]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-13176 +[CVE-2024-9143]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-9143 [CVE-2024-6119]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-6119 [CVE-2024-5535]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-5535 [CVE-2024-4741]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4741 diff --git a/crypto/openssl/NOTES-NONSTOP.md b/crypto/openssl/NOTES-NONSTOP.md index ab13de7d3a76..9441647604c7 100644 --- a/crypto/openssl/NOTES-NONSTOP.md +++ b/crypto/openssl/NOTES-NONSTOP.md @@ -119,12 +119,9 @@ correctly, you also need the `COMP_ROOT` set, as in: `COMP_ROOT` needs to be in Windows form. -`Configure` must specify the `no-makedepend` option otherwise errors will -result when running the build because the c99 cross-compiler does not support -the `gcc -MT` option. An example of a `Configure` command to be run from the -OpenSSL directory is: +An example of a `Configure` command to be run from the OpenSSL directory is: - ./Configure nonstop-nsx_64 no-makedepend --with-rand-seed=rdcpu + ./Configure nonstop-nsx_64 --with-rand-seed=rdcpu Do not forget to include any OpenSSL cross-compiling prefix and certificate options when creating your libraries. diff --git a/crypto/openssl/README.md b/crypto/openssl/README.md index 5184a461bb17..477f5cbb7d12 100644 --- a/crypto/openssl/README.md +++ b/crypto/openssl/README.md @@ -59,7 +59,7 @@ For Production Use ------------------ Source code tarballs of the official releases can be downloaded from -[www.openssl.org/source](https://www.openssl.org/source). +[openssl-library.org/source/](https://openssl-library.org/source/). The OpenSSL project does not distribute the toolkit in binary form. However, for a large variety of operating systems precompiled versions @@ -75,22 +75,18 @@ the source tarballs, having a local copy of the git repository with the entire project history gives you much more insight into the code base. -The official OpenSSL Git Repository is located at [git.openssl.org]. -There is a GitHub mirror of the repository at [github.com/openssl/openssl], +The main OpenSSL Git repository is private. +There is a public GitHub mirror of it at [github.com/openssl/openssl], which is updated automatically from the former on every commit. -A local copy of the Git Repository can be obtained by cloning it from -the original OpenSSL repository using - - git clone git://git.openssl.org/openssl.git - -or from the GitHub mirror using +A local copy of the Git repository can be obtained by cloning it from +the GitHub mirror using git clone https://github.com/openssl/openssl.git If you intend to contribute to OpenSSL, either to fix bugs or contribute -new features, you need to fork the OpenSSL repository openssl/openssl on -GitHub and clone your public fork instead. +new features, you need to fork the GitHub mirror and clone your public fork +instead. git clone https://github.com/yourname/openssl.git @@ -166,7 +162,7 @@ attempting to develop or distribute cryptographic code. Copyright ========= -Copyright (c) 1998-2024 The OpenSSL Project +Copyright (c) 1998-2025 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson @@ -178,14 +174,6 @@ All rights reserved. "OpenSSL Homepage" -[git.openssl.org]: - - "OpenSSL Git Repository" - -[git.openssl.org]: - - "OpenSSL Git Repository" - [github.com/openssl/openssl]: "OpenSSL GitHub Mirror" diff --git a/crypto/openssl/VERSION.dat b/crypto/openssl/VERSION.dat index 0942ddc200ca..4b7eb91a451a 100644 --- a/crypto/openssl/VERSION.dat +++ b/crypto/openssl/VERSION.dat @@ -1,7 +1,7 @@ MAJOR=3 MINOR=0 -PATCH=15 +PATCH=16 PRE_RELEASE_TAG= BUILD_METADATA= -RELEASE_DATE="3 Sep 2024" +RELEASE_DATE="11 Feb 2025" SHLIB_VERSION=3 diff --git a/crypto/openssl/apps/asn1parse.c b/crypto/openssl/apps/asn1parse.c index f0bfd1d45fc4..129b867c8cc7 100644 --- a/crypto/openssl/apps/asn1parse.c +++ b/crypto/openssl/apps/asn1parse.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -127,7 +127,8 @@ int asn1parse_main(int argc, char **argv) dump = strtol(opt_arg(), NULL, 0); break; case OPT_STRPARSE: - sk_OPENSSL_STRING_push(osk, opt_arg()); + if (sk_OPENSSL_STRING_push(osk, opt_arg()) <= 0) + goto end; break; case OPT_GENSTR: genstr = opt_arg(); diff --git a/crypto/openssl/apps/cms.c b/crypto/openssl/apps/cms.c index abb9f196a760..dce227ef2db5 100644 --- a/crypto/openssl/apps/cms.c +++ b/crypto/openssl/apps/cms.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -494,13 +494,15 @@ int cms_main(int argc, char **argv) if (rr_from == NULL && (rr_from = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(rr_from, opt_arg()); + if (sk_OPENSSL_STRING_push(rr_from, opt_arg()) <= 0) + goto end; break; case OPT_RR_TO: if (rr_to == NULL && (rr_to = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(rr_to, opt_arg()); + if (sk_OPENSSL_STRING_push(rr_to, opt_arg()) <= 0) + goto end; break; case OPT_PRINT: noout = print = 1; @@ -577,13 +579,15 @@ int cms_main(int argc, char **argv) if (sksigners == NULL && (sksigners = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(sksigners, signerfile); + if (sk_OPENSSL_STRING_push(sksigners, signerfile) <= 0) + goto end; if (keyfile == NULL) keyfile = signerfile; if (skkeys == NULL && (skkeys = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(skkeys, keyfile); + if (sk_OPENSSL_STRING_push(skkeys, keyfile) <= 0) + goto end; keyfile = NULL; } signerfile = opt_arg(); @@ -601,12 +605,14 @@ int cms_main(int argc, char **argv) if (sksigners == NULL && (sksigners = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(sksigners, signerfile); + if (sk_OPENSSL_STRING_push(sksigners, signerfile) <= 0) + goto end; signerfile = NULL; if (skkeys == NULL && (skkeys = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(skkeys, keyfile); + if (sk_OPENSSL_STRING_push(skkeys, keyfile) <= 0) + goto end; } keyfile = opt_arg(); break; @@ -660,7 +666,8 @@ int cms_main(int argc, char **argv) key_param->next = nparam; key_param = nparam; } - sk_OPENSSL_STRING_push(key_param->param, opt_arg()); + if (sk_OPENSSL_STRING_push(key_param->param, opt_arg()) <= 0) + goto end; break; case OPT_V_CASES: if (!opt_verify(o, vpm)) @@ -749,12 +756,14 @@ int cms_main(int argc, char **argv) if (sksigners == NULL && (sksigners = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(sksigners, signerfile); + if (sk_OPENSSL_STRING_push(sksigners, signerfile) <= 0) + goto end; if (skkeys == NULL && (skkeys = sk_OPENSSL_STRING_new_null()) == NULL) goto end; if (keyfile == NULL) keyfile = signerfile; - sk_OPENSSL_STRING_push(skkeys, keyfile); + if (sk_OPENSSL_STRING_push(skkeys, keyfile) <= 0) + goto end; } if (sksigners == NULL) { BIO_printf(bio_err, "No signer certificate specified\n"); @@ -1014,8 +1023,15 @@ int cms_main(int argc, char **argv) pwri_tmp = NULL; } if (!(flags & CMS_STREAM)) { - if (!CMS_final(cms, in, NULL, flags)) + if (!CMS_final(cms, in, NULL, flags)) { + if (originator != NULL + && ERR_GET_REASON(ERR_peek_error()) + == CMS_R_ERROR_UNSUPPORTED_STATIC_KEY_AGREEMENT) { + BIO_printf(bio_err, "Cannot use originator for encryption\n"); + goto end; + } goto end; + } } } else if (operation == SMIME_ENCRYPTED_ENCRYPT) { cms = CMS_EncryptedData_encrypt_ex(in, cipher, secret_key, @@ -1261,6 +1277,7 @@ int cms_main(int argc, char **argv) X509_free(cert); X509_free(recip); X509_free(signer); + X509_free(originator); EVP_PKEY_free(key); EVP_CIPHER_free(cipher); EVP_CIPHER_free(wrap_cipher); diff --git a/crypto/openssl/apps/engine.c b/crypto/openssl/apps/engine.c index 1b0f64309c6f..c83bdfc150c3 100644 --- a/crypto/openssl/apps/engine.c +++ b/crypto/openssl/apps/engine.c @@ -1,5 +1,5 @@ /* - * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -352,10 +352,12 @@ int engine_main(int argc, char **argv) test_avail++; break; case OPT_PRE: - sk_OPENSSL_STRING_push(pre_cmds, opt_arg()); + if (sk_OPENSSL_STRING_push(pre_cmds, opt_arg()) <= 0) + goto end; break; case OPT_POST: - sk_OPENSSL_STRING_push(post_cmds, opt_arg()); + if (sk_OPENSSL_STRING_push(post_cmds, opt_arg()) <= 0) + goto end; break; } } diff --git a/crypto/openssl/apps/lib/http_server.c b/crypto/openssl/apps/lib/http_server.c index a7fe5e1a58b0..33ae886d4a1c 100644 --- a/crypto/openssl/apps/lib/http_server.c +++ b/crypto/openssl/apps/lib/http_server.c @@ -220,14 +220,17 @@ BIO *http_server_init_bio(const char *prog, const char *port) { BIO *acbio = NULL, *bufbio; int asock; + char name[40]; + snprintf(name, sizeof(name), "[::]:%s", port); /* port may be "0" */ bufbio = BIO_new(BIO_f_buffer()); if (bufbio == NULL) goto err; acbio = BIO_new(BIO_s_accept()); if (acbio == NULL - || BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) < 0 - || BIO_set_accept_port(acbio, port) < 0) { + || BIO_set_accept_ip_family(acbio, BIO_FAMILY_IPANY) <= 0 /* IPv4/6 */ + || BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) <= 0 + || BIO_set_accept_name(acbio, name) <= 0) { log_message(prog, LOG_ERR, "Error setting up accept BIO"); goto err; } diff --git a/crypto/openssl/apps/lib/s_cb.c b/crypto/openssl/apps/lib/s_cb.c index 6440b496099e..9f33c24c4e35 100644 --- a/crypto/openssl/apps/lib/s_cb.c +++ b/crypto/openssl/apps/lib/s_cb.c @@ -240,10 +240,10 @@ static const char *get_sigtype(int nid) return "ECDSA"; case NID_ED25519: - return "Ed25519"; + return "ed25519"; case NID_ED448: - return "Ed448"; + return "ed448"; case NID_id_GostR3410_2001: return "gost2001"; @@ -288,6 +288,26 @@ static int do_print_sigalgs(BIO *out, SSL *s, int shared) SSL_get_sigalgs(s, i, &sign_nid, &hash_nid, NULL, &rsign, &rhash); if (i) BIO_puts(out, ":"); + switch (rsign | rhash << 8) { + case 0x0809: + BIO_puts(out, "rsa_pss_pss_sha256"); + continue; + case 0x080a: + BIO_puts(out, "rsa_pss_pss_sha384"); + continue; + case 0x080b: + BIO_puts(out, "rsa_pss_pss_sha512"); + continue; + case 0x081a: + BIO_puts(out, "ecdsa_brainpoolP256r1_sha256"); + continue; + case 0x081b: + BIO_puts(out, "ecdsa_brainpoolP384r1_sha384"); + continue; + case 0x081c: + BIO_puts(out, "ecdsa_brainpoolP512r1_sha512"); + continue; + } sstr = get_sigtype(sign_nid); if (sstr) BIO_printf(out, "%s", sstr); diff --git a/crypto/openssl/apps/lib/s_socket.c b/crypto/openssl/apps/lib/s_socket.c index 059afe47b904..8c6020d01692 100644 --- a/crypto/openssl/apps/lib/s_socket.c +++ b/crypto/openssl/apps/lib/s_socket.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -380,6 +380,12 @@ int do_server(int *accept_sock, const char *host, const char *port, BIO_closesocket(asock); break; } + + if (naccept != -1) + naccept--; + if (naccept == 0) + BIO_closesocket(asock); + BIO_set_tcp_ndelay(sock, 1); i = (*cb)(sock, type, protocol, context); @@ -410,11 +416,12 @@ int do_server(int *accept_sock, const char *host, const char *port, BIO_closesocket(sock); } else { + if (naccept != -1) + naccept--; + i = (*cb)(asock, type, protocol, context); } - if (naccept != -1) - naccept--; if (i < 0 || naccept == 0) { BIO_closesocket(asock); ret = i; diff --git a/crypto/openssl/apps/lib/vms_term_sock.c b/crypto/openssl/apps/lib/vms_term_sock.c index 97fb3943265c..1a413376b20b 100644 --- a/crypto/openssl/apps/lib/vms_term_sock.c +++ b/crypto/openssl/apps/lib/vms_term_sock.c @@ -353,7 +353,7 @@ static int CreateSocketPair (int SocketFamily, /* ** Get the binary (64-bit) time of the specified timeout value */ - sprintf (AscTimeBuff, "0 0:0:%02d.00", SOCKET_PAIR_TIMEOUT_VALUE); + BIO_snprintf(AscTimeBuff, sizeof(AscTimeBuff), "0 0:0:%02d.00", SOCKET_PAIR_TIMEOUT_VALUE); AscTimeDesc.dsc$w_length = strlen (AscTimeBuff); AscTimeDesc.dsc$a_pointer = AscTimeBuff; status = sys$bintim (&AscTimeDesc, BinTimeBuff); @@ -567,10 +567,10 @@ static void LogMessage (char *msg, ...) /* ** Format the message buffer */ - sprintf (MsgBuff, "%02d-%s-%04d %02d:%02d:%02d [%08X] %s\n", - LocTime->tm_mday, Month[LocTime->tm_mon], - (LocTime->tm_year + 1900), LocTime->tm_hour, LocTime->tm_min, - LocTime->tm_sec, pid, msg); + BIO_snprintf(MsgBuff, sizeof(MsgBuff), "%02d-%s-%04d %02d:%02d:%02d [%08X] %s\n", + LocTime->tm_mday, Month[LocTime->tm_mon], + (LocTime->tm_year + 1900), LocTime->tm_hour, LocTime->tm_min, + LocTime->tm_sec, pid, msg); /* ** Get any variable arguments and add them to the print of the message diff --git a/crypto/openssl/apps/passwd.c b/crypto/openssl/apps/passwd.c index 64b2e76c147a..31d8bdd87cb6 100644 --- a/crypto/openssl/apps/passwd.c +++ b/crypto/openssl/apps/passwd.c @@ -589,7 +589,8 @@ static char *shacrypt(const char *passwd, const char *magic, const char *salt) OPENSSL_strlcat(out_buf, ascii_dollar, sizeof(out_buf)); if (rounds_custom) { char tmp_buf[80]; /* "rounds=999999999" */ - sprintf(tmp_buf, "rounds=%u", rounds); + + BIO_snprintf(tmp_buf, sizeof(tmp_buf), "rounds=%u", rounds); #ifdef CHARSET_EBCDIC /* In case we're really on a ASCII based platform and just pretend */ if (tmp_buf[0] != 0x72) /* ASCII 'r' */ diff --git a/crypto/openssl/apps/pkcs12.c b/crypto/openssl/apps/pkcs12.c index ab78903ee9cd..5146699f1672 100644 --- a/crypto/openssl/apps/pkcs12.c +++ b/crypto/openssl/apps/pkcs12.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -305,7 +305,8 @@ int pkcs12_main(int argc, char **argv) if (canames == NULL && (canames = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(canames, opt_arg()); + if (sk_OPENSSL_STRING_push(canames, opt_arg()) <= 0) + goto end; break; case OPT_IN: infile = opt_arg(); diff --git a/crypto/openssl/apps/pkeyutl.c b/crypto/openssl/apps/pkeyutl.c index 3c9f9025a160..5e5047137632 100644 --- a/crypto/openssl/apps/pkeyutl.c +++ b/crypto/openssl/apps/pkeyutl.c @@ -81,10 +81,11 @@ const OPTIONS pkeyutl_options[] = { OPT_SECTION("Output"), {"out", OPT_OUT, '>', "Output file - default stdout"}, - {"asn1parse", OPT_ASN1PARSE, '-', "asn1parse the output data"}, + {"asn1parse", OPT_ASN1PARSE, '-', + "parse the output as ASN.1 data to check its DER encoding and print errors"}, {"hexdump", OPT_HEXDUMP, '-', "Hex dump output"}, {"verifyrecover", OPT_VERIFYRECOVER, '-', - "Verify with public key, recover original data"}, + "Verify RSA signature, recovering original signature input data"}, OPT_SECTION("Signing/Derivation"), {"digest", OPT_DIGEST, 's', diff --git a/crypto/openssl/apps/rehash.c b/crypto/openssl/apps/rehash.c index 85eee3857942..6e0ca3642c40 100644 --- a/crypto/openssl/apps/rehash.c +++ b/crypto/openssl/apps/rehash.c @@ -559,6 +559,11 @@ int rehash_main(int argc, char **argv) } else if ((env = getenv(X509_get_default_cert_dir_env())) != NULL) { char lsc[2] = { LIST_SEPARATOR_CHAR, '\0' }; m = OPENSSL_strdup(env); + if (m == NULL) { + BIO_puts(bio_err, "out of memory\n"); + errs = 1; + goto end; + } for (e = strtok(m, lsc); e != NULL; e = strtok(NULL, lsc)) errs += do_dir(e, h); OPENSSL_free(m); diff --git a/crypto/openssl/apps/smime.c b/crypto/openssl/apps/smime.c index 651294e46daa..790a8d06ad0c 100644 --- a/crypto/openssl/apps/smime.c +++ b/crypto/openssl/apps/smime.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2025 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -279,13 +279,15 @@ int smime_main(int argc, char **argv) if (sksigners == NULL && (sksigners = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(sksigners, signerfile); + if (sk_OPENSSL_STRING_push(sksigners, signerfile) <= 0) + goto end; if (keyfile == NULL) keyfile = signerfile; if (skkeys == NULL && (skkeys = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(skkeys, keyfile); + if (sk_OPENSSL_STRING_push(skkeys, keyfile) <= 0) + goto end; keyfile = NULL; } signerfile = opt_arg(); @@ -310,12 +312,14 @@ int smime_main(int argc, char **argv) if (sksigners == NULL && (sksigners = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(sksigners, signerfile); + if (sk_OPENSSL_STRING_push(sksigners, signerfile) <= 0) + goto end; signerfile = NULL; if (skkeys == NULL && (skkeys = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(skkeys, keyfile); + if (sk_OPENSSL_STRING_push(skkeys, keyfile) <= 0) + goto end; } keyfile = opt_arg(); break; @@ -390,12 +394,14 @@ int smime_main(int argc, char **argv) if (sksigners == NULL && (sksigners = sk_OPENSSL_STRING_new_null()) == NULL) goto end; - sk_OPENSSL_STRING_push(sksigners, signerfile); + if (sk_OPENSSL_STRING_push(sksigners, signerfile) <= 0) + goto end; if (!skkeys && (skkeys = sk_OPENSSL_STRING_new_null()) == NULL) goto end; if (!keyfile) keyfile = signerfile; - sk_OPENSSL_STRING_push(skkeys, keyfile); + if (sk_OPENSSL_STRING_push(skkeys, keyfile) <= 0) + goto end; } if (sksigners == NULL) { BIO_printf(bio_err, "No signer certificate specified\n"); diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index d8e2c70e6128..bafcacf7775e 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -456,6 +456,14 @@ static double sm2_results[SM2_NUM][2]; /* 2 ops: sign then verify */ #define COND(unused_cond) (run && count < INT_MAX) #define COUNT(d) (count) +#define TAG_LEN 16 + +static unsigned int mode_op; /* AE Mode of operation */ +static unsigned int aead = 0; /* AEAD flag */ +static unsigned char aead_iv[12]; /* For AEAD modes */ +static unsigned char aad[EVP_AEAD_TLS1_AAD_LEN] = { 0xcc }; +static int aead_ivlen = sizeof(aead_iv); + typedef struct loopargs_st { ASYNC_JOB *inprogress_job; ASYNC_WAIT_CTX *wait_ctx; @@ -464,6 +472,7 @@ typedef struct loopargs_st { unsigned char *buf_malloc; unsigned char *buf2_malloc; unsigned char *key; + unsigned char tag[TAG_LEN]; size_t buflen; size_t sigsize; EVP_PKEY_CTX *rsa_sign_ctx[RSA_NUM]; @@ -727,12 +736,8 @@ static int EVP_Update_loop(void *args) unsigned char *buf = tempargs->buf; EVP_CIPHER_CTX *ctx = tempargs->ctx; int outl, count, rc; - unsigned char faketag[16] = { 0xcc }; if (decrypt) { - if (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(ctx)) & EVP_CIPH_FLAG_AEAD_CIPHER) { - (void)EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(faketag), faketag); - } for (count = 0; COND(c[D_EVP][testnum]); count++) { rc = EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); if (rc != 1) { @@ -757,74 +762,159 @@ static int EVP_Update_loop(void *args) } /* + * To make AEAD benchmarking more relevant perform TLS-like operations, + * 13-byte AAD followed by payload. But don't use TLS-formatted AAD, as + * payload length is not actually limited by 16KB... * CCM does not support streaming. For the purpose of performance measurement, * each message is encrypted using the same (key,iv)-pair. Do not use this * code in your application. */ -static int EVP_Update_loop_ccm(void *args) +static int EVP_Update_loop_aead_enc(void *args) { loopargs_t *tempargs = *(loopargs_t **) args; unsigned char *buf = tempargs->buf; + unsigned char *key = tempargs->key; EVP_CIPHER_CTX *ctx = tempargs->ctx; - int outl, count; - unsigned char tag[12]; - - if (decrypt) { - for (count = 0; COND(c[D_EVP][testnum]); count++) { - (void)EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(tag), - tag); - /* reset iv */ - (void)EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv); - /* counter is reset on every update */ - (void)EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); + int outl, count, realcount = 0; + + for (count = 0; COND(c[D_EVP][testnum]); count++) { + /* Set length of iv (Doesn't apply to SIV mode) */ + if (mode_op != EVP_CIPH_SIV_MODE) { + if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, + aead_ivlen, NULL)) { + BIO_printf(bio_err, "\nFailed to set iv length\n"); + ERR_print_errors(bio_err); + exit(1); + } } - } else { - for (count = 0; COND(c[D_EVP][testnum]); count++) { - /* restore iv length field */ - (void)EVP_EncryptUpdate(ctx, NULL, &outl, NULL, lengths[testnum]); - /* counter is reset on every update */ - (void)EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); + /* Set tag_len (Not for GCM/SIV at encryption stage) */ + if (mode_op != EVP_CIPH_GCM_MODE + && mode_op != EVP_CIPH_SIV_MODE) { + if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, + TAG_LEN, NULL)) { + BIO_printf(bio_err, "\nFailed to set tag length\n"); + ERR_print_errors(bio_err); + exit(1); + } + } + if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, aead_iv, -1)) { + BIO_printf(bio_err, "\nFailed to set key and iv\n"); + ERR_print_errors(bio_err); + exit(1); + } + /* Set total length of input. Only required for CCM */ + if (mode_op == EVP_CIPH_CCM_MODE) { + if (!EVP_EncryptUpdate(ctx, NULL, &outl, + NULL, lengths[testnum])) { + BIO_printf(bio_err, "\nCouldn't set input text length\n"); + ERR_print_errors(bio_err); + exit(1); + } } + if (aead) { + if (!EVP_EncryptUpdate(ctx, NULL, &outl, aad, sizeof(aad))) { + BIO_printf(bio_err, "\nCouldn't insert AAD when encrypting\n"); + ERR_print_errors(bio_err); + exit(1); + } + } + if (!EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum])) { + BIO_printf(bio_err, "\nFailed to encrypt the data\n"); + ERR_print_errors(bio_err); + exit(1); + } + if (EVP_EncryptFinal_ex(ctx, buf, &outl)) + realcount++; } - if (decrypt) - (void)EVP_DecryptFinal_ex(ctx, buf, &outl); - else - (void)EVP_EncryptFinal_ex(ctx, buf, &outl); - return count; + return realcount; } /* * To make AEAD benchmarking more relevant perform TLS-like operations, * 13-byte AAD followed by payload. But don't use TLS-formatted AAD, as * payload length is not actually limited by 16KB... + * CCM does not support streaming. For the purpose of performance measurement, + * each message is decrypted using the same (key,iv)-pair. Do not use this + * code in your application. + * For decryption, we will use buf2 to preserve the input text in buf. */ -static int EVP_Update_loop_aead(void *args) +static int EVP_Update_loop_aead_dec(void *args) { loopargs_t *tempargs = *(loopargs_t **) args; unsigned char *buf = tempargs->buf; + unsigned char *outbuf = tempargs->buf2; + unsigned char *key = tempargs->key; + unsigned char tag[TAG_LEN]; EVP_CIPHER_CTX *ctx = tempargs->ctx; - int outl, count; - unsigned char aad[13] = { 0xcc }; - unsigned char faketag[16] = { 0xcc }; + int outl, count, realcount = 0; + + for (count = 0; COND(c[D_EVP][testnum]); count++) { + /* Set the length of iv (Doesn't apply to SIV mode) */ + if (mode_op != EVP_CIPH_SIV_MODE) { *** 6017 LINES SKIPPED *** From nobody Tue Mar 25 21:36:12 2025 X-Original-To: dev-commits-src-all@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 4ZMjsW64wjz5rqDw; Tue, 25 Mar 2025 21:36:15 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMjsW5bK7z3pTb; Tue, 25 Mar 2025 21:36:15 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742938575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b1363uwdxTdnvnKgQGRQCR34CuQpI2/Z6q0gLwgsmNY=; b=VK9j2pOrgcQWdANtd8z7mnbaPHXAS+qwAj+tVjjaFHWtM0XVpMaOR5WNy1ltUudZPjetz7 RxB8SO/JQI43IbFfRxZ4Ton9bwEn61uGLspaiqFVNKnNzYf3I0Luk6cTsaSeqJjXsYwXkh F7unHf6x8845PEdJVO+M3phZ8V/e8SB1QQELQ4KYWShEs32+OfGKGD/Drk6Efj1T2KDn7l +qaocwggwa2G/pCy678Fi6A2giUjUN+XmhzhuKIdJ8gBWZp+PBovij9Z6Zhshnv0nafLe8 11XDXBQW64GwtheC5WWH0N707ZWSxhcujE1wXv+iYt2mwRDWDU+Mp0MwC1H2Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742938575; a=rsa-sha256; cv=none; b=s+BFxtPdZdjrKUgVnzEBnIvLUzkl87TOqKOxUNKD0vNk9cnfjMQUBFxeeYS3MR798znNAC bEUGpx71CNRK0oQ1v1cDmKvvaJ6hiGsn5ReYEmd6DHE8q8V9XWHP7TlDKGax4nA/FtLuoQ KxtIAfbV9hKNP0LSc4XxBL0iUb52fBYcEXao4X0kO7ima6Z+0EKmuu0JpVI4KrSZOXbhjN tweY1lQUnW3WuYQIb0l67Nx861ekh06d2izXsBBSYR9ABKTJk/+1SdNRFztRobgmYNeuOD 5I940OFgdvhn4MFVhXI/nNV0r0cQExzRqksR/aWNNZW2O12Aa/1S07T91BP13w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742938575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b1363uwdxTdnvnKgQGRQCR34CuQpI2/Z6q0gLwgsmNY=; b=whLWkhPre+YIbzB4WqMN1zGI+5Sp4Xcln8E6RN4yH+qZvsZe/pBVABVWZiEcgE2IyKupmv 5TlNE2KqpkSmoJcNa3yKdAqoBxKdGIWa6SfGX5KEt3QHBOC748GjPCD1FookUFedqFG9Gw iNeK0A3d5qld5GoDiXrXKnX+4dw5j2m23pMkhdT8x7CG4sht0W/5YoUNc9AbXdL9/bojwY orXtc74muHg1qocOAEv9NXFViIxy//HPpc9nJNtpbz9tKnZp//q+wxKCaKMzzhoXFgVIxi zakTvugifGDAEhZRrbtNI96yjx0SD1ELfRe91ae75vvw3WZO7pr6sFzme05zyA== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.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 ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZMjsW36XTz18wh; Tue, 25 Mar 2025 21:36:15 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 1535AA64805; Tue, 25 Mar 2025 21:36:11 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 905882D029E0; Tue, 25 Mar 2025 21:36:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id 4OGKPGYRFfxP; Tue, 25 Mar 2025 21:36:12 +0000 (UTC) Received: from strong-rtwn0.sbone.de (strong-rtwn0.sbone.de [IPv6:fde9:577b:c1a9:4902:3e64:cfff:fe55:bc80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 696D22D029D8; Tue, 25 Mar 2025 21:36:12 +0000 (UTC) Date: Tue, 25 Mar 2025 21:36:12 +0000 (UTC) From: "Bjoern A. Zeeb" To: Olivier Certner cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: Re: git: 718d1928f874 - main - LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY In-Reply-To: <3046625.S5UcXbOgvz@ravel> Message-ID: References: <202503250919.52P9JfOA032702@gitrepo.freebsd.org> <3046625.S5UcXbOgvz@ravel> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 25 Mar 2025, Olivier Certner wrote: Hi Olivier, >> What is the drm code in question? ttm_pool_alloc -> ttm_pool_alloc_page()? >> As all other uses of __GFP_NORETRY in 6.1 (ignoring drm_printf.c) seem to be >> in i915. > > Yes, this is indeed targeted at ttm_pool_alloc_page() which tries to allocate contiguous pages to fill up the pool (but not in 5.10). TTM pools are used by the amdgpu driver to build its translation tables. Great; I think with two other work in progress bits the disabled fallback in there could be used again very soon but that'll be a discussion for another time and place (and likely people). > Calls to functions other than (linux_)alloc_pages*() are unaffected by the change, and if you dig through all the references of __GFP_NORETRY/GFP_RETRY (including those from files under 'selftests/'), you'll see the built GFP flags are never used with (linux_)alloc_pages*(), except for the only reference you mentioned. > >> Are you sure? >> >> i915_gem_object_get_pages_internal() in drm-6.1 at least seems to >> conditionally pass it down: >> >> 17 #define QUIET (__GFP_NORETRY | __GFP_NOWARN) >> ... >> 74 page = alloc_pages(gfp | (order ? QUIET : MAYFAIL), >> >> Seems it can deal with allocation failures, lowering order or returning >> -ENOMEM from the function so should be fine hopefully. > > Yes, I was aware of this piece of code, but obviously it cannot cause any problem. > > All calls to Linux's alloc_pages*() can fail *whatever* the passed GFP flags except for GFP_NOFAIL (and that's the only exception). Ah I see; that's where the M_WAITOK logic in there comes from. I was wondering about it given others like GFP_KERNEL also being mapped to that. Sometimes that makes me wonder if we should indeed pass the gfp_t all the way down to the actual function doing the alloc and only there filter and convert rather than doing that earlier in wrapper functions. > Callers always have to cope, and specifically when specifying __GFP_NORETRY it would be foolish not too (and that wouldn't be allowed in Linus' tree anyway). > > If it wasn't for that, i915_gem_object_get_pages_internal() does the same lowering that ttm_pool_alloc_page() does anyway, as you noticed. > > My sentence was indeed too strong, as I was still swapping in context for this work which was done months ago now. I know how that feels. I just started looking at something I've done a year+ ago completely outside my domain. > I reviewed all callers not only for GFP_NORETRY but also for most others GFP flags (I have tweaked grep files for all of them and over multiple Linux versions), as I started some work to document what the Linux guarantees/behaviors really are and then some other work to rationalize how we translate them in FreeBSD (there seems to be several possible improvements here). Unfortunately, I have stalled that last work for weeks now, and probably will for a significant while. > > Given Linux's contract on __GFP_NORETRY, it is arguably not reasonable to spend time compacting memory on such calls, that's a deviation from what drivers are supposed to expect. > > Oh, and the rest of the commit message also doesn't mention that I also tested this change on machines using the i915 driver, without observing any problem or change in behavior. Fantastic! Thanks you so much for the follow-up. It clarifies a lot and makes sense and is very helpful! Lots of joy, Bjoern -- Bjoern A. Zeeb r15:7 From nobody Tue Mar 25 21:36:58 2025 X-Original-To: dev-commits-src-all@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 4ZMjtM0QSSz5rqKW; Tue, 25 Mar 2025 21:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMjtL37yVz3pyS; Tue, 25 Mar 2025 21:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742938618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VkNvNsRJ7fDDt6cGjBipCjJtjUvOydhz1puS6WQJ+kk=; b=vLfPfvMI8Zwb94NJ8Msq3x3NTiA7PCiH06kHftXjJo6eVL5k9zdthAkDBdvgj0U3U97aMX MwAaojdddmi3WZI4HnSqEgGo73LsAIzSifIeLOQRLcEN2nFOciw7o1CjhvRVTMmrp4axnP TBoSi6W28EDPQLUNGB5uyt9VVMwKxw5DFR7vk5m1hGa33RrLP64GQXqI/hR0c/Jlip4zPJ W2X7nJANjJ/t/KtkW6cVibN6XCy81z6YY7LuNok3+NbpOjmQCnmwNUuQpJwa/ijxUgjgzp fRlNLLjfE9eY+JDLjHzdEbBo8VJF24SU04BltTZeDbuN0Vu4j2l8UW165tWqGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742938618; a=rsa-sha256; cv=none; b=FWx1dLnCS2twORgMbBFMoMHab47rKWWCXj07tGD5QV8acLGwarY61c1QXdzXWBwaGoSOEn 1Y3KOZ0OoTeMYTFTVkf6sWFQVpg47Rm2H6kOLSeN5oJdH3AajjHt91muwfSAEZOL6C4EVv /AORhqBhn2N3HBwz63v0QexDcGul5CAhDhzv9UFaNE/NyCkphi0si+QtHIQ187Z7MN5NUV v6L953eWidHVbAV85RgjMImNvsJkTFB3S+Lo1Qdld9ppmzDTVB1fVl79UPPmoA7Jy+p7yX FAuu9etU2J3NPw6R0IBbKlEOisfQeNCxcfwjwoNv0fbLWZCoLgDGXzlzIpIZ0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742938618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VkNvNsRJ7fDDt6cGjBipCjJtjUvOydhz1puS6WQJ+kk=; b=Cp0RHBeRla71AQPatXPEwpVTRMcCUBaUovDvM4uhFtPW9SK+1b89/AXISXBMEnNZCUcrX2 igdJrCKl+aDNeSacv9ksTxG6VX4nXqCO38h169C38b+9XytJAE0tNojgjhW+uADYDNUBpo ywS1SQ7bU+YTOHOo3O+XeuAM+FuAXC6kL7BFU3zCu++slR5IdvhdYx55kShtwCNEznMDlQ K0Z6Mvc7gIp5DXhjazcAUeLiNETPcyOGWiCxW3SA123heqLzkkIDQ0lNdopOnmUWzuh/A4 zqxMXRSQEeVWaGfyqgSJ+HTZnqCzCXb8MjCetstshmGwIdwHsW4PXqpGmdE9oQ== 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 4ZMjtL29c0zyBD; Tue, 25 Mar 2025 21:36: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 52PLaw8G014920; Tue, 25 Mar 2025 21:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PLawKv014917; Tue, 25 Mar 2025 21:36:58 GMT (envelope-from git) Date: Tue, 25 Mar 2025 21:36:58 GMT Message-Id: <202503252136.52PLawKv014917@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: f03c8869127c - stable/14 - nfsd.8: Note that the -n option is deprecated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f03c8869127c84cccec468ab4bf2ea5caf3cfade Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f03c8869127c84cccec468ab4bf2ea5caf3cfade commit f03c8869127c84cccec468ab4bf2ea5caf3cfade Author: Rick Macklem AuthorDate: 2025-03-10 13:35:23 +0000 Commit: Rick Macklem CommitDate: 2025-03-25 21:35:53 +0000 nfsd.8: Note that the -n option is deprecated PR#284616 reported that --maxthreads did not obey the 256 thread limit defined as MAXNFSDCNT in nfsd.c. This is actually a feature and not a bug, since many NFS servers will now want to run more than 256 threads and --maxthreads can be used to set the upper bound on the number of threads. (MAXNFSDCNT was used long ago to define how many daemons would be forked, before daemons were replaced by kernel threads.) However, the nfsd.8 man page was misleading, since it indicated that "-n" was the equivalent to setting both --minthreads and --maxthreads to the same value. This patch fixes the man page. This is a content change. PR: 284616 (cherry picked from commit f27afbd850021b9cb7cf4e66f0621c793ad37de0) --- usr.sbin/nfsd/nfsd.8 | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/usr.sbin/nfsd/nfsd.8 b/usr.sbin/nfsd/nfsd.8 index 1c04bad3a042..46478f978f21 100644 --- a/usr.sbin/nfsd/nfsd.8 +++ b/usr.sbin/nfsd/nfsd.8 @@ -27,7 +27,7 @@ .\" .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" -.Dd March 16, 2024 +.Dd February 21, 2025 .Dt NFSD 8 .Os .Sh NAME @@ -90,13 +90,20 @@ without creating any servers. Specifies a hostname to be used as a principal name, instead of the default hostname. .It Fl n Ar threads -Specifies how many servers to create. -This option is equivalent to specifying +This option is deprecated and is limited to a maximum of 256 threads. +The options .Fl Fl maxthreads and .Fl Fl minthreads -with their respective arguments to -.Ar threads . +should now be used. +The +.Ar threads +argument for +.Fl Fl minthreads +and +.Fl Fl maxthreads +may be set to the same value to avoid dynamic +changes to the number of threads. .It Fl Fl maxthreads Ar threads Specifies the maximum servers that will be kept around to service requests. .It Fl Fl minthreads Ar threads @@ -221,12 +228,15 @@ Ignored; included for backward compatibility. .El .Pp For example, -.Dq Li "nfsd -u -t -n 6" -serves UDP and TCP transports using six daemons. +.Dq Li "nfsd -u -t --minthreads 6 --maxthreads 6" +serves UDP and TCP transports using six kernel threads (servers). .Pp -A server should run enough daemons to handle -the maximum level of concurrency from its clients, -typically four to six. +For a system dedicated to servicing NFS RPCs, the number of +threads (servers) should be sufficient to handle the peak +client RPC load. +For systems that perform other services, the number of +threads (servers) may need to be limited, so that resources +are available for these other services. .Pp The .Nm From nobody Tue Mar 25 21:55:35 2025 X-Original-To: dev-commits-src-all@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 4ZMkHq5Mmqz5rrQP; Tue, 25 Mar 2025 21:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMkHq3kQ5z40mJ; Tue, 25 Mar 2025 21:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742939735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bmm0kzzC53hfkcGlkmGKSyQXIUc/fqHesDPDXQk2wHw=; b=fc7GBZrU69h6AzogLiPJeXITRblhWBTDXjPSa5XmVLE6YCWo2KtIiPmxsJrto8fDKtA0yr hf2uVpU4lMUjGCpkT4mYGDi35lLw8GhAF+BJSdNt2+zQFmeyWriTbyGF4BOXzZDKy9EzAO wiXjrniSkHYM+NskOzrlzEQ5BXlO9Gu83dGLtZGQPqFfbiKWVlYqbXDn4XkWLPhlDbyYH6 XDUCZ7NW0yx8Rm9N1ZkWnZalQHqVmggVFLJ4iSui0eiPk2TeOXfAmLg8030KvFWtyvSG/r +rKmKikjlcCLfgQ9s6q3IBuXoCShDQuRx+UQumHTSTLMX33uIVr0ySSwjavRCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742939735; a=rsa-sha256; cv=none; b=viNN+pKdx/n/AtnWB2kXzVzwX4jt8UsncW1iuE5S4+woUeqPQTNo4bJu0veVOooT94HUSc T7v9efTYF2rOf0kyaDMJlSXxa5xZuEiI/mKjrmi8FmzQ2G9PQoNjgWqLkIGyIx+Faq6uvz Kv3cbQ+B5eRcputSLCEmzUonH31LhfXibGOj9dgBL7iPK7Q4/NYRxbbjhoSwaa1YVCws1r qyXLuv+K/bEgXz56E550OYQe98nNX43edDrlFW+293K6jhjJJYAZdgHn+VdNvy8xnqrTQD oeCUgSEEfH33uN1ffauTDm38V2xlu9A4+P7rqR4kEs3NwdZfmMTkBLhEbr+HoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742939735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bmm0kzzC53hfkcGlkmGKSyQXIUc/fqHesDPDXQk2wHw=; b=iPakNy86iLd0iAH3wRe/xd4xcUWI5r21xUB6t1OFGtW91cMKVxkIgu/SvdYIR4I0HrO95l 8gK1IxjruMB7npqvTlpFXADkeqaTBCk82PkfF61Dh9fp+ppQmH3oPnp9Vv6Q642cnFJ89K bI4CPAU9nobccDtPVTEldsRb9fe2+fQBH3M3IDwXTVVceegUxnW7juVPNoqi4c4oGkr5AX efUDAYMg806r8Cm4JWRA9DwjrPSpe/w0uuWHwakqxPgoDeFNAWYey2a3xZF7ddW45rk2eb fkO408kSengvKMAGCSffFTa+aZeROAPmucyvzmYFJlC8bMe/D+WlR55VIOX0DQ== 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 4ZMkHq35H7zyVj; Tue, 25 Mar 2025 21:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52PLtZAs051509; Tue, 25 Mar 2025 21:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PLtZSG051506; Tue, 25 Mar 2025 21:55:35 GMT (envelope-from git) Date: Tue, 25 Mar 2025 21:55:35 GMT Message-Id: <202503252155.52PLtZSG051506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 0a85254d5a33 - main - top: Polish key bindings in usage and manual List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a85254d5a33800600477ce57fbaab64591aa6ea Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=0a85254d5a33800600477ce57fbaab64591aa6ea commit 0a85254d5a33800600477ce57fbaab64591aa6ea Author: Alexander Ziaee AuthorDate: 2025-03-23 18:28:53 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-25 21:51:08 +0000 top: Polish key bindings in usage and manual Organize key bindings by ascii(7) for consistency and maintainability, mark them as Interactive Commands, wordsmith them, and sync their organization between the manual and help screen. MFC after: 3 days PR: 282734 Fixes: c8aa5e526 (move command mapping to commands.c) Reviewed by: imp, mhorne, Jim Brown Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49462 --- usr.bin/top/commands.c | 26 +++---- usr.bin/top/top.1 | 183 +++++++++++++++++++++++++------------------------ 2 files changed, 105 insertions(+), 104 deletions(-) diff --git a/usr.bin/top/commands.c b/usr.bin/top/commands.c index e65f4ee6c4c4..3fa63459f2e1 100644 --- a/usr.bin/top/commands.c +++ b/usr.bin/top/commands.c @@ -51,35 +51,35 @@ static int str_addarg(char *str, int len, char *arg, bool first); const struct command all_commands[] = { - {'C', "toggle the displaying of weighted CPU percentage", false, CMD_wcputog}, + {' ', "update the display", false, CMD_update}, + {'/', "filter on command name (+ selects all commands)", false, CMD_grep}, + {'a', "toggle the display of process titles", false, CMD_showargs}, + {'C', "toggle the display of raw or weighted CPU percentage", false, CMD_wcputog}, {'d', "change number of displays to show", false, CMD_displays}, {'e', "list errors generated by last \"kill\" or \"renice\" command", false, CMD_errors}, - {'H', "toggle the displaying of threads", false, CMD_thrtog}, + {'H', "toggle the display of threads", false, CMD_thrtog}, {'h', "show this help text", true, CMD_help}, {'?', NULL, true, CMD_help}, - {'/', "filter on command name (+ selects all commands)", false, CMD_grep}, - {'i', "toggle the displaying of idle processes", false, CMD_idletog}, + {'i', "toggle the display of idle processes", false, CMD_idletog}, {'I', NULL, false, CMD_idletog}, - {'j', "toggle the displaying of jail ID", false, CMD_jidtog}, {'J', "display processes for only one jail (+ selects all jails)", false, CMD_jail}, + {'j', "toggle the display of jail ID", false, CMD_jidtog}, {'k', "kill processes; send a signal to a list of processes", false, CMD_kill}, - {'q', "quit" , true, CMD_quit}, {'m', "toggle the display between 'cpu' and 'io' modes", false, CMD_viewtog}, {'n', "change number of processes to display", false, CMD_number}, {'#', NULL, false, CMD_number}, {'o', "specify the sort order", false, CMD_order}, + {'P', "toggle the display of per-CPU statistics", false, CMD_pcputog}, {'p', "display one process (+ selects all processes)", false, CMD_pid}, - {'P', "toggle the displaying of per-CPU statistics", false, CMD_pcputog}, + {'q', "quit" , true, CMD_quit}, {'r', "renice a process", false, CMD_renice}, + {'S', "toggle the display of system processes", false, CMD_viewsys}, {'s', "change number of seconds to delay between updates", false, CMD_delay}, - {'S', "toggle the displaying of system processes", false, CMD_viewsys}, - {'a', "toggle the displaying of process titles", false, CMD_showargs}, - {'T', "toggle the displaying of thread IDs", false, CMD_toggletid}, + {'T', "toggle the display of thread IDs", false, CMD_toggletid}, {'t', "toggle the display of this process", false, CMD_selftog}, {'u', "display processes for only one user (+ selects all users)", false, CMD_user}, {'w', "toggle the display of swap use for each process", false, CMD_swaptog}, - {'z', "toggle the displaying of the system idle process", false, CMD_kidletog}, - {' ', "update the display", false, CMD_update}, + {'z', "toggle the display of the system idle process", false, CMD_kidletog}, {0, NULL, true, CMD_NONE} }; @@ -108,7 +108,7 @@ show_help(void) } else if (curcmd->c == ' '){ /* special case space rather than introducing a "display string" to * the struct */ - sprintf(keys, "SPC"); + sprintf(keys, "space"); } else { sprintf(keys, "%c", curcmd->c); } diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index ca74860aaa35..3443df0f8c22 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -1,4 +1,4 @@ -.Dd November 18, 2021 +.Dd March 25, 2025 .Dt TOP 1 .Os .Sh NAME @@ -235,7 +235,7 @@ or .Dq all . Boolean flags are toggles. A second specification of any of these options will negate the first. -.Sh "INTERACTIVE MODE" +.Sh INTERACTIVE MODE When .Nm is running in @@ -255,9 +255,8 @@ is between displays; that is, while it is waiting for seconds to elapse. If this is the case, the command will be processed and the display will be updated immediately thereafter -(reflecting any changes that the command may have specified). -This -happens even if the command was incorrect. +.Pq reflecting any changes that the command may have specified . +This happens even if the command was incorrect. If a key is pressed while .Nm is in the middle of updating the display, it will finish the update and @@ -269,65 +268,54 @@ in, the user's erase and kill keys (as set up by the command .Xr stty 1 ) are recognized, and a newline terminates the input. .Pp -These commands are currently recognized (^L refers to control-L): +The bindings are as follows: .Bl -tag -width indent -.It ^L -Redraw the screen. -.It h -Display a summary of the commands (help screen). -Version information -is included in this display. -.It q -Quit -.Nm -.It d -Change the number of displays to show (prompt for new number). -Remember that the next display counts as one, so typing 'd1' will make -.Nm -show one final display and then immediately exit. -.It / -Display only processes that contain the specified string in their -command name. -If displaying arguments is enabled, the arguments are searched -too. '+' shows all processes. -.It m -Toggle the display between 'cpu' and 'io' modes. -.It n or # -Change the number of processes to display (prompt for new number). -.It s -Change the number of seconds to delay between displays -(prompt for new number). -.It S -Toggle the display of system processes. -.It a -Toggle the display of process titles. -.It k +.It Ic space +Update the display. +.It Ic / +Filter by command name. +Prompt for +.Ar string +or +.Ql Ic + +to show all processes. +.It Ic a +Toggle display of process titles. +.It Ic C +Toggle display of raw or weighted CPU percentage. +.It Ic d +Change the number of remaining displays to show before exit. +Prompt for new number. +.It Ic e +Display a list of system errors (if any) generated by the last command. +.It Ic H +Toggle display of threads. +.It Ic h No or Ic \&? +Display a summary of the commands (help screen) and version information. +.It Ic i No or Ic I +Toggle display of idle processes. +.It Ic J +Filter processes owned by a specific jail. +Prompt for jail name or +.Ql Ic + +for all processes belonging to all jails and the host. +This will also enable the display of JID. +.It Ic j +Toggle display of +.Xr jail 8 +ID. +.It Ic k Send a signal .Pq SIGKILL by default to a list of processes. This acts similarly to the command .Xr kill 1 . -.It r -Change the priority -.Pq the Dq nice -of a list of processes. -This acts similarly to -.Xr renice 8 . -.It u -Display only processes owned by a specific set of usernames (prompt for -username). -If the username specified is simply -.Dq + -or -.Dq - , -then processes belonging to all users will be displayed. -Usernames can be added -to and removed from the set by prepending them with -.Dq + -and -.Dq - , -respectively. -.It o +.It Ic m +Toggle the display between 'cpu' and 'io' modes. +.It Ic n No or Ic # +Change the number of processes to display. +Prompt for new number. +.It Ic o Change the order in which the display is sorted. The sort key names include .Dq cpu , @@ -336,41 +324,54 @@ The sort key names include and .Dq time. The default is cpu. -.It p -Display a specific process (prompt for pid). -If the pid specified is simply -.Dq + , -then show all processes. -.It e -Display a list of system errors (if any) generated by the last -command. -.It H -Toggle the display of threads. -.It i or I -Toggle the display of idle processes. -.It j -Toggle the display of -.Xr jail 8 -ID. -.It J -Display only processes owned by a specific jail (prompt for jail). -If the jail specified is simply -.Dq + , -then processes belonging -to all jails and the host will be displayed. -This will also enable the display of JID. -.It P -Toggle the display of per-CPU statistics. -.It T -Toggle display of TID and PID -.It t -Toggle the display of the +.It Ic P +Toggle display of per-CPU statistics. +.It Ic p +Filter by exact process ID. +Prompt for +.Ar PID +or +.Ql Ic + +to show all processes. +.It Ic q +Quit +.Nm . +.It Ic r +Change the priority +.Pq the Dq nice +of a list of processes. +This acts similarly to +.Xr renice 8 . +.It Ic S +Toggle the display of system processes. +.It Ic s +Change the number of seconds to delay between displays. +Prompt for new number. +.It Ic T +Toggle display between thread ID and process ID. +.It Ic t +Toggle display of the .Nm process. -.It w -Toggle the display of swap usage. -.It z -Toggle the display of the system idle process. +.It Ic u +Filter by exact process owner username. +Prompt for +.Ar username +or +.Ql Ic - Ns +.No / Ns +.Ql Ic + +for all users. +Usernames can be added +to and removed from the set by prepending them with +.Ql + +and +.Ql - , +respectively. +.It Ic w +Toggle display of swap usage. +.It Ic z +Toggle display of the system idle process. .El .Sh "THE DISPLAY" The top few lines of the display show general information From nobody Wed Mar 26 01:04:32 2025 X-Original-To: dev-commits-src-all@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 4ZMpTs0Qwyz5s4Ct; Wed, 26 Mar 2025 01:04:33 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMpTr6g0Pz3XbJ; Wed, 26 Mar 2025 01:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742951072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FRsw2vSvzWnsrsVTtgOgZR3QeC9a4FS/xu045WDX0f0=; b=SbLIRYbde+JVdoPjh7+/3GJroO3o7lw4WKtzhZd6Hg3xNGpNAvDbEFpGik4gou9meRS9BG rF9sWC4A83QN8sW05mR77vPcPUeMWZjRU/OHEWUF6X3JzzuSkxZaGFOCSDljMS0d4yx7Zx +UE0pUkyXLEroxhrH2mG6+aHi3wGGiDsh35kcg7Np86RMsKL1hcMk6x6uKz0oi6g2W2Qby Q89Uiqlu2X/HVbNnDfGC/qWapON61d2dfRlobQLgRJbED+VujSn85Lpfsr1zFQBTWXXcyO hglgaCkCJBUTrGtPSZgegUDQ+2D0PAwAskL4Vf4Ky+ZmJO91+V8UllwbAmPskg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742951072; a=rsa-sha256; cv=none; b=YpJhs9G/pc/+OgBkZxtAKH4D6y6SBvuA7pUqsqO8wvfmuvZs2UkT7MV7oN6/HMSRVfgcXs rvvj/Yl8MHcIun+s+rps/MHT7a59SjExNpxcDD6itR20/8rDMhGcJXpnxxqlEzMDXcSYXq NjF+oQIAWy2ci2sXt1XPm8n7pPBQjlZnr3LheEZ9G7916SDqWDpFWKCLXfLVvpH7m7ejeU 1YVZY3QL+E0D7EntFDNxabATrx07nB6f7nevuULbNIYPNA9QMiKsQz0n/5yooNUwegwMLO dfGoGbx8VuRoV+iDcumZz0bnLWpITAm3/dmYiQYpAVBFr+Qiwq0LF73fzRgtLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742951072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FRsw2vSvzWnsrsVTtgOgZR3QeC9a4FS/xu045WDX0f0=; b=m03wIs3m929GU1U8qUiV4T1gTIQvo88hk9ybht2YuLIkunRnRlS6TsdpiyBVqRAE9w+F00 7Ha7SQA7DPDcNkWsDr0DQHD9MImxMFdH3X5lrG9y3bjRlsFOwHfCdCd8zrNvpQ3dwfO6xT hjo/WE7L8Y2+MMzrWws3UXigMEfLCFNn4TMuCFvj+thtrSiIkm7dxtLCidwS8TozeHfgVm gTakp3GU83TA5aJXjOzkqVWjdqVN7JU5W2FrIYHJsT5H+jqbNnHLcPqiVd8qN/go84W3sM jTbbavsX1RXOPoQefssfpBX5CK6NH9V/lTwmOPQ1DnIj7Ykmy1H8iZxZX5dlWw== 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 4ZMpTr5zjHz14Wl; Wed, 26 Mar 2025 01:04: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 52Q14WZk007383; Wed, 26 Mar 2025 01:04:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q14Waa007380; Wed, 26 Mar 2025 01:04:32 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:04:32 GMT Message-Id: <202503260104.52Q14Waa007380@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: 475082194ac8 - stable/14 - contrib/tzdata: import tzdata 2025b List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 475082194ac811a925bf4a8109ef5e4f4f485dad Auto-Submitted: auto-generated The branch stable/14 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=475082194ac811a925bf4a8109ef5e4f4f485dad commit 475082194ac811a925bf4a8109ef5e4f4f485dad Author: Philip Paeps AuthorDate: 2025-03-23 01:28:44 +0000 Commit: Philip Paeps CommitDate: 2025-03-26 01:03:52 +0000 contrib/tzdata: import tzdata 2025b Changes: https://github.com/eggert/tz/blob/2025b/NEWS (cherry picked from commit d2cccdef30376b7de5643caae1ef035f8e6932f0) --- contrib/tzdata/NEWS | 29 +++++++++++++-- contrib/tzdata/asia | 12 ++++++- contrib/tzdata/northamerica | 9 +++++ contrib/tzdata/southamerica | 86 ++++++++++++++++++++++++++++++++++++--------- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 3 +- contrib/tzdata/zone1970.tab | 3 +- contrib/tzdata/zonenow.tab | 2 +- 8 files changed, 123 insertions(+), 23 deletions(-) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index a5d7ea89204e..8c0771641ef0 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,15 +1,40 @@ News for the tz database +Release 2025b - 2025-03-22 13:40:46 -0700 + + Briefly: + New zone for Aysén Region in Chile which moves from -04/-03 to -03. + + Changes to future timestamps + + Chile's Aysén Region moves from -04/-03 to -03 year-round, joining + Magallanes Region. The region will not change its clocks on + 2025-04-05 at 24:00, diverging from America/Santiago and creating a + new zone America/Coyhaique. (Thanks to Yonathan Dossow.) Model + this as a change to standard offset effective 2025-03-20. + + Changes to past timestamps + + Iran switched from +04 to +0330 on 1978-11-10 at 24:00, not at + year end. (Thanks to Roozbeh Pournader.) + + Changes to code + + 'zic -l TIMEZONE -d . -l /some/other/file/system' no longer + attempts to create an incorrect symlink, and no longer has a + read buffer underflow. (Problem reported by Evgeniy Gorbanev.) + + Release 2025a - 2025-01-15 10:47:24 -0800 Briefly: - Paraguay adopts permanent -03 starting spring 2024. + Paraguay adopted 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 + Paraguay stopped 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 diff --git a/contrib/tzdata/asia b/contrib/tzdata/asia index d4eb058053ed..d3d1059ac90d 100644 --- a/contrib/tzdata/asia +++ b/contrib/tzdata/asia @@ -1500,6 +1500,16 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # (UIT No. 143 17.XI.1977) and not 23 September (UIT No. 141 13.IX.1977). # UIT is the Operational Bulletin of International Telecommunication Union. +# From Roozbeh Pournader (2025-03-18): +# ... the exact time of Iran's transition from +0400 to +0330 ... was Friday +# 1357/8/19 AP=1978-11-10. Here's a newspaper clip from the Ettela'at +# newspaper, dated 1357/8/14 AP=1978-11-05, translated from Persian +# (at https://w.wiki/DUEY): +# Following the government's decision about returning the official time +# to the previous status, the spokesperson for the Ministry of Energy +# announced today: At the hour 24 of Friday 19th of Aban (=1978-11-10), +# the country's time will be pulled back half an hour. +# # From Roozbeh Pournader (2003-03-15): # This is an English translation of what I just found (originally in Persian). # The Gregorian dates in brackets are mine: @@ -1627,7 +1637,7 @@ Rule Iran 2021 2022 - Sep 21 24:00 0 - Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1935 Jun 13 # Tehran Mean Time 3:30 Iran %z 1977 Oct 20 24:00 - 4:00 Iran %z 1979 + 4:00 Iran %z 1978 Nov 10 24:00 3:30 Iran %z diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 8d356aa0069d..20b47b481ddd 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1611,6 +1611,15 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9 # For more on Orillia, see: Daubs K. Bold attempt at daylight saving # time became a comic failure in Orillia. Toronto Star 2017-07-08. # https://www.thestar.com/news/insight/2017/07/08/bold-attempt-at-daylight-saving-time-became-a-comic-failure-in-orillia.html +# From Paul Eggert (2025-03-20): +# Also see the 1912-06-17 front page of The Evening Sunbeam, +# reproduced in: Richardson M. "Daylight saving was a confusing +# time in Orillia" in the 2025-03-15 Orillia Matters. Richardson writes, +# "The first Sunday after the switch was made, [DST proponent and +# Orillia mayor William Sword] Frost walked into church an hour late. +# This became a symbol of the downfall of daylight saving in Orillia." +# The mayor became known as "Daylight Bill". +# https://www.orilliamatters.com/local-news/column-daylight-saving-was-a-confusing-time-in-orillia-10377529 # From Mark Brader (2010-03-06): # diff --git a/contrib/tzdata/southamerica b/contrib/tzdata/southamerica index 1fcf65146785..06fee598baf4 100644 --- a/contrib/tzdata/southamerica +++ b/contrib/tzdata/southamerica @@ -1246,35 +1246,45 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # dates to 2014. # DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC) # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) -# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Tim Parenti (2025-03-22): +# Decreto 307 of 2014 of the Ministry of the Interior and Public Security, +# promulgated 2014-01-30 and published 2014-02-19: +# https://www.diariooficial.interior.gob.cl/media/2014/02/19/do-20140219.pdf#page=1 +# https://www.bcn.cl/leychile/navegar?idNorma=1059557 # From Eduardo Romero Urra (2015-03-03): # Today has been published officially that Chile will use the DST time # permanently until March 25 of 2017 -# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg -# -# From Paul Eggert (2015-03-03): -# For now, assume that the extension will persist indefinitely. +# From Tim Parenti (2025-03-22): +# Decreto 106 of 2015 of the Ministry of the Interior and Public Security, +# promulgated 2015-01-27 and published 2015-03-03: +# https://www.diariooficial.interior.gob.cl/media/2015/03/03/do-20150303.pdf#page=1 +# https://www.bcn.cl/leychile/navegar?idNorma=1075157 # From Juan Correa (2016-03-18): -# The decree regarding DST has been published in today's Official Gazette: -# http://www.diariooficial.interior.gob.cl/versiones-anteriores/do/20160318/ -# http://www.leychile.cl/Navegar?idNorma=1088502 +# The decree regarding DST has been published in today's Official Gazette... # It does consider the second Saturday of May and August as the dates # for the transition; and it lists DST dates until 2019, but I think # this scheme will stick. -# # From Paul Eggert (2016-03-18): -# For now, assume the pattern holds for the indefinite future. # The decree says transitions occur at 24:00; in practice this appears # to mean 24:00 mainland time, not 24:00 local time, so that Easter # Island is always two hours behind the mainland. +# From Tim Parenti (2025-03-22): +# Decreto 253 of 2016 of the Ministry of the Interior and Public Security, +# promulgated 2016-03-16 and published 2016-03-18. +# https://www.diariooficial.interior.gob.cl/media/2016/03/18/do-20160318.pdf#page=1 +# https://www.bcn.cl/leychile/navegar?idNorma=1088502 # From Juan Correa (2016-12-04): # Magallanes region ... will keep DST (UTC -3) all year round.... # http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx -# From Deborah Goldsmith (2017-01-19): -# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# From Tim Parenti (2025-03-22), via Deborah Goldsmith (2017-01-19): +# Decreto 1820 of 2016 of the Ministry of the Interior and Public Security, +# promulgated 2016-12-02 and published 2017-01-17: +# https://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1099217 +# Model this as a change to standard offset effective 2016-12-04. # From Juan Correa (2018-08-13): # As of moments ago, the Ministry of Energy in Chile has announced the new @@ -1293,13 +1303,20 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # https://twitter.com/MinEnergia/status/1029009354001973248 # "We will keep the new time policy unchanged for at least the next 4 years." # So we extend the new rules on Saturdays at 24:00 mainland time indefinitely. -# From Juan Correa (2019-02-04): -# http://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf +# From Tim Parenti (2025-03-22), via Juan Correa (2019-02-04): +# Decreto 1286 of 2018 of the Ministry of the Interior and Public Security, +# promulgated 2018-09-21 and published 2018-11-23: +# https://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1125760 # From Juan Correa (2022-04-02): # I found there was a decree published last Thursday that will keep -# Magallanes region to UTC -3 "indefinitely". The decree is available at +# Magallanes region to UTC -3 "indefinitely". +# From Tim Parenti (2025-03-22): +# Decreto 143 of 2022 of the Ministry of the Interior and Public Security, +# promulgated 2022-03-29 and published 2022-03-31: # https://www.diariooficial.interior.gob.cl/publicaciones/2022/03/31/43217-B/01/2108910.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1174342 # From Juan Correa (2022-08-09): # the Internal Affairs Ministry (Ministerio del Interior) informed DST @@ -1308,13 +1325,36 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # will keep UTC -3 "indefinitely"... This is because on September 4th # we will have a voting whether to approve a new Constitution. # -# From Eduardo Romero Urra (2022-08-17): +# From Tim Parenti (2025-03-22), via Eduardo Romero Urra (2022-08-17): +# Decreto 224 of 2022 of the Ministry of the Interior and Public Security, +# promulgated 2022-07-14 and published 2022-08-13: # https://www.diariooficial.interior.gob.cl/publicaciones/2022/08/13/43327/01/2172567.pdf +# https://www.bcn.cl/leychile/navegar?idNorma=1179983 # # From Paul Eggert (2022-08-17): # Although the presidential decree stops at fall 2026, assume that # similar DST rules will continue thereafter. +# From Paul Eggert (2025-01-15): +# Diario Regional Aysén's Sebastián Martel reports that 94% of Aysén +# citizens polled in November favored changing the rules from +# -04/-03-with-DST to -03 all year... +# https://www.diarioregionalaysen.cl/noticia/actualidad/2024/12/presentan-decision-que-gano-la-votacion-sobre-el-cambio-del-huso-horario-en-aysen +# +# From Yonathan Dossow (2025-03-20): +# [T]oday we have more confirmation of the change. [Aysén] region will keep +# UTC-3 all year... +# https://www.cnnchile.com/pais/region-de-aysen-mantendra-horario-de-verano-todo-el-ano_20250320/ +# https://www.latercera.com/nacional/noticia/tras-consulta-ciudadana-region-de-aysen-mantendra-el-horario-de-verano-durante-todo-el-ano/ +# https://x.com/min_interior/status/1902692504270672098 +# +# From Tim Parenti (2025-03-22), via Eduardo Romero Urra (2025-03-20): +# Decreto 93 of 2025 of the Ministry of the Interior and Public Security, +# promulgated 2025-03-11 and published 2025-03-20: +# https://www.diariooficial.interior.gob.cl/publicaciones/2025/03/20/44104/01/2624263.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1211955 +# Model this as a change to standard offset effective 2025-03-20. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Chile 1927 1931 - Sep 1 0:00 1:00 - Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1371,6 +1411,20 @@ Zone America/Santiago -4:42:45 - LMT 1890 -5:00 1:00 %z 1947 Mar 31 24:00 -5:00 - %z 1947 May 21 23:00 -4:00 Chile %z +Zone America/Coyhaique -4:48:16 - LMT 1890 + -4:42:45 - SMT 1910 Jan 10 + -5:00 - %z 1916 Jul 1 + -4:42:45 - SMT 1918 Sep 10 + -4:00 - %z 1919 Jul 1 + -4:42:45 - SMT 1927 Sep 1 + -5:00 Chile %z 1932 Sep 1 + -4:00 - %z 1942 Jun 1 + -5:00 - %z 1942 Aug 1 + -4:00 - %z 1946 Aug 28 24:00 + -5:00 1:00 %z 1947 Mar 31 24:00 + -5:00 - %z 1947 May 21 23:00 + -4:00 Chile %z 2025 Mar 20 + -3:00 - %z Zone America/Punta_Arenas -4:43:40 - LMT 1890 -4:42:45 - SMT 1910 Jan 10 -5:00 - %z 1916 Jul 1 diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 0846b7f265fa..ef468adcecf9 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2025a +2025b diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index d2be66359f3b..2626b0550341 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -139,7 +139,8 @@ CH +4723+00832 Europe/Zurich CI +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago most of Chile -CL -5309-07055 America/Punta_Arenas Region of Magallanes +CL -4534-07204 America/Coyhaique Aysen Region +CL -5309-07055 America/Punta_Arenas Magallanes Region CL -2709-10926 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 3a5a71c508d4..814ed69e0468 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -125,7 +125,8 @@ CH,DE,LI +4723+00832 Europe/Zurich Büsingen CI,BF,GH,GM,GN,IS,ML,MR,SH,SL,SN,TG +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago most of Chile -CL -5309-07055 America/Punta_Arenas Region of Magallanes +CL -4534-07204 America/Coyhaique Aysén Region +CL -5309-07055 America/Punta_Arenas Magallanes Region CL -2709-10926 Pacific/Easter Easter Island CN +3114+12128 Asia/Shanghai Beijing Time CN +4348+08735 Asia/Urumqi Xinjiang Time diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab index d2c1e48584f8..093f0a0cb749 100644 --- a/contrib/tzdata/zonenow.tab +++ b/contrib/tzdata/zonenow.tab @@ -104,7 +104,7 @@ XX +4439-06336 America/Halifax Atlantic ("AST/ADT") - Canada; Bermuda XX +4734-05243 America/St_Johns Newfoundland ("NST/NDT") # # -03 -XX -2332-04637 America/Sao_Paulo eastern South America +XX -2332-04637 America/Sao_Paulo eastern and southern South America # # -03/-02 (North America DST) XX +4703-05620 America/Miquelon St Pierre & Miquelon From nobody Wed Mar 26 01:04:59 2025 X-Original-To: dev-commits-src-all@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 4ZMpVM43QXz5s4cx; Wed, 26 Mar 2025 01:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMpVM2S53z3XyZ; Wed, 26 Mar 2025 01:04:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742951099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zl3+Yf8Bo/7AF7RwgeYQmhTxE7ueFMtWFxMXY/f1n+A=; b=KyilRm/DJK6FWzytnUPXsb+5d4TQPhDl2FePiAQDubmglGxePkxnUR1Ce9cymfpt4lAAGA 7JsDC9l0NtgJTVUmvDd6RPJpz6l8J17fbq3bP496AR9Z9hI6DDxhY7ItPqMbU5PqZYyRBZ XALXjLPjCQ0VFu/lJRqEIAbdthTCYyTNBnN6ton0TKSkvlq9YVRJRXdkyiFZyQo9RmQWx9 kh4cUWRrXOyvHtYk6GVy/gC/jc0BKawQtnxlKicVCbFQjTacvzNaqdSrOUWkNFzHO9Y5A1 IqEmJf1T3b9WnY7P3HlMI446vT9sTOc1DWvH9sRhplc0dMxysZRDOookMOHDsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742951099; a=rsa-sha256; cv=none; b=ITIb2s0cwnsed1bORpejYkSwddqB/Pc8oGHY7fBDQ68iHNHNIEW2yeTDmOMJ1Q34vSsZ3q OG+mXadjSy02YbzidALfIhRS5o6K+RHwxU56p0wmlLAbWzwPwgeBWMYV8ApM5uOa4ZGnuT vxCDXJoTi2I6erXQpM25cgPbOva7WwgZDVDoKUbX29iIUuRe7QPTlMItyB1Z0hPuRp54Ie tUyEiaDvRvlpgVnyFdMoKKQYv1ruLfQERxGodjr5p/G3yAAZHnbMfnXETlzMOTawSxdYsf wzlvUzpjGo833IosWDclPSBmFWJzBkkTuf8cUhiV4k3BBlMio+EeetR37fjskQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742951099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zl3+Yf8Bo/7AF7RwgeYQmhTxE7ueFMtWFxMXY/f1n+A=; b=Lvb1WarOIDFebrbDMSDlUVSuJxqWQbKZofu7Vn65r/XrjTjRIdvckps0ZkOk3wzfjWj9ab /TfOqpCZS2dSS+VuHvcq7KaXxNj/r2StYD1Y3z9kitwpwS0ZfWRHSCeu9e+OIefqSrPqfc lw568Q6ak5W8wE9aNo1d/hLfDoO3aUoZS6nkRxLD+Je79vVtWJ2wWOF7t5Te3rKMX6hR3w FFlHTBltt6khOkPlYHcXB6RJ4HnwO8a/YHCjPW+92CzQmUdyKivyjjrkZT7c8+gl5HFrAH OkqhrwryeIqKgP0FElHxEd1F2BKF8oCazSkjToylkZZSz/RHlY8IqaY1r9MmNA== 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 4ZMpVM1rKgz13rM; Wed, 26 Mar 2025 01:04: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 52Q14xSq007734; Wed, 26 Mar 2025 01:04:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q14xZW007731; Wed, 26 Mar 2025 01:04:59 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:04:59 GMT Message-Id: <202503260104.52Q14xZW007731@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: 7b17666c32f7 - stable/13 - contrib/tzdata: import tzdata 2025b List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b17666c32f7cad4a26cc9da2d3347dca90af32e Auto-Submitted: auto-generated The branch stable/13 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=7b17666c32f7cad4a26cc9da2d3347dca90af32e commit 7b17666c32f7cad4a26cc9da2d3347dca90af32e Author: Philip Paeps AuthorDate: 2025-03-23 01:28:44 +0000 Commit: Philip Paeps CommitDate: 2025-03-26 01:04:40 +0000 contrib/tzdata: import tzdata 2025b Changes: https://github.com/eggert/tz/blob/2025b/NEWS (cherry picked from commit d2cccdef30376b7de5643caae1ef035f8e6932f0) --- contrib/tzdata/NEWS | 29 +++++++++++++-- contrib/tzdata/asia | 12 ++++++- contrib/tzdata/northamerica | 9 +++++ contrib/tzdata/southamerica | 86 ++++++++++++++++++++++++++++++++++++--------- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 3 +- contrib/tzdata/zone1970.tab | 3 +- contrib/tzdata/zonenow.tab | 2 +- 8 files changed, 123 insertions(+), 23 deletions(-) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index a5d7ea89204e..8c0771641ef0 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,15 +1,40 @@ News for the tz database +Release 2025b - 2025-03-22 13:40:46 -0700 + + Briefly: + New zone for Aysén Region in Chile which moves from -04/-03 to -03. + + Changes to future timestamps + + Chile's Aysén Region moves from -04/-03 to -03 year-round, joining + Magallanes Region. The region will not change its clocks on + 2025-04-05 at 24:00, diverging from America/Santiago and creating a + new zone America/Coyhaique. (Thanks to Yonathan Dossow.) Model + this as a change to standard offset effective 2025-03-20. + + Changes to past timestamps + + Iran switched from +04 to +0330 on 1978-11-10 at 24:00, not at + year end. (Thanks to Roozbeh Pournader.) + + Changes to code + + 'zic -l TIMEZONE -d . -l /some/other/file/system' no longer + attempts to create an incorrect symlink, and no longer has a + read buffer underflow. (Problem reported by Evgeniy Gorbanev.) + + Release 2025a - 2025-01-15 10:47:24 -0800 Briefly: - Paraguay adopts permanent -03 starting spring 2024. + Paraguay adopted 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 + Paraguay stopped 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 diff --git a/contrib/tzdata/asia b/contrib/tzdata/asia index d4eb058053ed..d3d1059ac90d 100644 --- a/contrib/tzdata/asia +++ b/contrib/tzdata/asia @@ -1500,6 +1500,16 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # (UIT No. 143 17.XI.1977) and not 23 September (UIT No. 141 13.IX.1977). # UIT is the Operational Bulletin of International Telecommunication Union. +# From Roozbeh Pournader (2025-03-18): +# ... the exact time of Iran's transition from +0400 to +0330 ... was Friday +# 1357/8/19 AP=1978-11-10. Here's a newspaper clip from the Ettela'at +# newspaper, dated 1357/8/14 AP=1978-11-05, translated from Persian +# (at https://w.wiki/DUEY): +# Following the government's decision about returning the official time +# to the previous status, the spokesperson for the Ministry of Energy +# announced today: At the hour 24 of Friday 19th of Aban (=1978-11-10), +# the country's time will be pulled back half an hour. +# # From Roozbeh Pournader (2003-03-15): # This is an English translation of what I just found (originally in Persian). # The Gregorian dates in brackets are mine: @@ -1627,7 +1637,7 @@ Rule Iran 2021 2022 - Sep 21 24:00 0 - Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1935 Jun 13 # Tehran Mean Time 3:30 Iran %z 1977 Oct 20 24:00 - 4:00 Iran %z 1979 + 4:00 Iran %z 1978 Nov 10 24:00 3:30 Iran %z diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 8d356aa0069d..20b47b481ddd 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1611,6 +1611,15 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9 # For more on Orillia, see: Daubs K. Bold attempt at daylight saving # time became a comic failure in Orillia. Toronto Star 2017-07-08. # https://www.thestar.com/news/insight/2017/07/08/bold-attempt-at-daylight-saving-time-became-a-comic-failure-in-orillia.html +# From Paul Eggert (2025-03-20): +# Also see the 1912-06-17 front page of The Evening Sunbeam, +# reproduced in: Richardson M. "Daylight saving was a confusing +# time in Orillia" in the 2025-03-15 Orillia Matters. Richardson writes, +# "The first Sunday after the switch was made, [DST proponent and +# Orillia mayor William Sword] Frost walked into church an hour late. +# This became a symbol of the downfall of daylight saving in Orillia." +# The mayor became known as "Daylight Bill". +# https://www.orilliamatters.com/local-news/column-daylight-saving-was-a-confusing-time-in-orillia-10377529 # From Mark Brader (2010-03-06): # diff --git a/contrib/tzdata/southamerica b/contrib/tzdata/southamerica index 1fcf65146785..06fee598baf4 100644 --- a/contrib/tzdata/southamerica +++ b/contrib/tzdata/southamerica @@ -1246,35 +1246,45 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # dates to 2014. # DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC) # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) -# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Tim Parenti (2025-03-22): +# Decreto 307 of 2014 of the Ministry of the Interior and Public Security, +# promulgated 2014-01-30 and published 2014-02-19: +# https://www.diariooficial.interior.gob.cl/media/2014/02/19/do-20140219.pdf#page=1 +# https://www.bcn.cl/leychile/navegar?idNorma=1059557 # From Eduardo Romero Urra (2015-03-03): # Today has been published officially that Chile will use the DST time # permanently until March 25 of 2017 -# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg -# -# From Paul Eggert (2015-03-03): -# For now, assume that the extension will persist indefinitely. +# From Tim Parenti (2025-03-22): +# Decreto 106 of 2015 of the Ministry of the Interior and Public Security, +# promulgated 2015-01-27 and published 2015-03-03: +# https://www.diariooficial.interior.gob.cl/media/2015/03/03/do-20150303.pdf#page=1 +# https://www.bcn.cl/leychile/navegar?idNorma=1075157 # From Juan Correa (2016-03-18): -# The decree regarding DST has been published in today's Official Gazette: -# http://www.diariooficial.interior.gob.cl/versiones-anteriores/do/20160318/ -# http://www.leychile.cl/Navegar?idNorma=1088502 +# The decree regarding DST has been published in today's Official Gazette... # It does consider the second Saturday of May and August as the dates # for the transition; and it lists DST dates until 2019, but I think # this scheme will stick. -# # From Paul Eggert (2016-03-18): -# For now, assume the pattern holds for the indefinite future. # The decree says transitions occur at 24:00; in practice this appears # to mean 24:00 mainland time, not 24:00 local time, so that Easter # Island is always two hours behind the mainland. +# From Tim Parenti (2025-03-22): +# Decreto 253 of 2016 of the Ministry of the Interior and Public Security, +# promulgated 2016-03-16 and published 2016-03-18. +# https://www.diariooficial.interior.gob.cl/media/2016/03/18/do-20160318.pdf#page=1 +# https://www.bcn.cl/leychile/navegar?idNorma=1088502 # From Juan Correa (2016-12-04): # Magallanes region ... will keep DST (UTC -3) all year round.... # http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx -# From Deborah Goldsmith (2017-01-19): -# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# From Tim Parenti (2025-03-22), via Deborah Goldsmith (2017-01-19): +# Decreto 1820 of 2016 of the Ministry of the Interior and Public Security, +# promulgated 2016-12-02 and published 2017-01-17: +# https://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1099217 +# Model this as a change to standard offset effective 2016-12-04. # From Juan Correa (2018-08-13): # As of moments ago, the Ministry of Energy in Chile has announced the new @@ -1293,13 +1303,20 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # https://twitter.com/MinEnergia/status/1029009354001973248 # "We will keep the new time policy unchanged for at least the next 4 years." # So we extend the new rules on Saturdays at 24:00 mainland time indefinitely. -# From Juan Correa (2019-02-04): -# http://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf +# From Tim Parenti (2025-03-22), via Juan Correa (2019-02-04): +# Decreto 1286 of 2018 of the Ministry of the Interior and Public Security, +# promulgated 2018-09-21 and published 2018-11-23: +# https://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1125760 # From Juan Correa (2022-04-02): # I found there was a decree published last Thursday that will keep -# Magallanes region to UTC -3 "indefinitely". The decree is available at +# Magallanes region to UTC -3 "indefinitely". +# From Tim Parenti (2025-03-22): +# Decreto 143 of 2022 of the Ministry of the Interior and Public Security, +# promulgated 2022-03-29 and published 2022-03-31: # https://www.diariooficial.interior.gob.cl/publicaciones/2022/03/31/43217-B/01/2108910.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1174342 # From Juan Correa (2022-08-09): # the Internal Affairs Ministry (Ministerio del Interior) informed DST @@ -1308,13 +1325,36 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 # will keep UTC -3 "indefinitely"... This is because on September 4th # we will have a voting whether to approve a new Constitution. # -# From Eduardo Romero Urra (2022-08-17): +# From Tim Parenti (2025-03-22), via Eduardo Romero Urra (2022-08-17): +# Decreto 224 of 2022 of the Ministry of the Interior and Public Security, +# promulgated 2022-07-14 and published 2022-08-13: # https://www.diariooficial.interior.gob.cl/publicaciones/2022/08/13/43327/01/2172567.pdf +# https://www.bcn.cl/leychile/navegar?idNorma=1179983 # # From Paul Eggert (2022-08-17): # Although the presidential decree stops at fall 2026, assume that # similar DST rules will continue thereafter. +# From Paul Eggert (2025-01-15): +# Diario Regional Aysén's Sebastián Martel reports that 94% of Aysén +# citizens polled in November favored changing the rules from +# -04/-03-with-DST to -03 all year... +# https://www.diarioregionalaysen.cl/noticia/actualidad/2024/12/presentan-decision-que-gano-la-votacion-sobre-el-cambio-del-huso-horario-en-aysen +# +# From Yonathan Dossow (2025-03-20): +# [T]oday we have more confirmation of the change. [Aysén] region will keep +# UTC-3 all year... +# https://www.cnnchile.com/pais/region-de-aysen-mantendra-horario-de-verano-todo-el-ano_20250320/ +# https://www.latercera.com/nacional/noticia/tras-consulta-ciudadana-region-de-aysen-mantendra-el-horario-de-verano-durante-todo-el-ano/ +# https://x.com/min_interior/status/1902692504270672098 +# +# From Tim Parenti (2025-03-22), via Eduardo Romero Urra (2025-03-20): +# Decreto 93 of 2025 of the Ministry of the Interior and Public Security, +# promulgated 2025-03-11 and published 2025-03-20: +# https://www.diariooficial.interior.gob.cl/publicaciones/2025/03/20/44104/01/2624263.pdf +# https://www.bcn.cl/leychile/Navegar?idNorma=1211955 +# Model this as a change to standard offset effective 2025-03-20. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Chile 1927 1931 - Sep 1 0:00 1:00 - Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1371,6 +1411,20 @@ Zone America/Santiago -4:42:45 - LMT 1890 -5:00 1:00 %z 1947 Mar 31 24:00 -5:00 - %z 1947 May 21 23:00 -4:00 Chile %z +Zone America/Coyhaique -4:48:16 - LMT 1890 + -4:42:45 - SMT 1910 Jan 10 + -5:00 - %z 1916 Jul 1 + -4:42:45 - SMT 1918 Sep 10 + -4:00 - %z 1919 Jul 1 + -4:42:45 - SMT 1927 Sep 1 + -5:00 Chile %z 1932 Sep 1 + -4:00 - %z 1942 Jun 1 + -5:00 - %z 1942 Aug 1 + -4:00 - %z 1946 Aug 28 24:00 + -5:00 1:00 %z 1947 Mar 31 24:00 + -5:00 - %z 1947 May 21 23:00 + -4:00 Chile %z 2025 Mar 20 + -3:00 - %z Zone America/Punta_Arenas -4:43:40 - LMT 1890 -4:42:45 - SMT 1910 Jan 10 -5:00 - %z 1916 Jul 1 diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 0846b7f265fa..ef468adcecf9 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2025a +2025b diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index d2be66359f3b..2626b0550341 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -139,7 +139,8 @@ CH +4723+00832 Europe/Zurich CI +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago most of Chile -CL -5309-07055 America/Punta_Arenas Region of Magallanes +CL -4534-07204 America/Coyhaique Aysen Region +CL -5309-07055 America/Punta_Arenas Magallanes Region CL -2709-10926 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 3a5a71c508d4..814ed69e0468 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -125,7 +125,8 @@ CH,DE,LI +4723+00832 Europe/Zurich Büsingen CI,BF,GH,GM,GN,IS,ML,MR,SH,SL,SN,TG +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago most of Chile -CL -5309-07055 America/Punta_Arenas Region of Magallanes +CL -4534-07204 America/Coyhaique Aysén Region +CL -5309-07055 America/Punta_Arenas Magallanes Region CL -2709-10926 Pacific/Easter Easter Island CN +3114+12128 Asia/Shanghai Beijing Time CN +4348+08735 Asia/Urumqi Xinjiang Time diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab index d2c1e48584f8..093f0a0cb749 100644 --- a/contrib/tzdata/zonenow.tab +++ b/contrib/tzdata/zonenow.tab @@ -104,7 +104,7 @@ XX +4439-06336 America/Halifax Atlantic ("AST/ADT") - Canada; Bermuda XX +4734-05243 America/St_Johns Newfoundland ("NST/NDT") # # -03 -XX -2332-04637 America/Sao_Paulo eastern South America +XX -2332-04637 America/Sao_Paulo eastern and southern South America # # -03/-02 (North America DST) XX +4703-05620 America/Miquelon St Pierre & Miquelon From nobody Wed Mar 26 01:28:50 2025 X-Original-To: dev-commits-src-all@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 4ZMq1t4bdYz5s5tk; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq1t1gSjz3rJn; Wed, 26 Mar 2025 01:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JsaDs+5Tuyq/eILWqlYx174V5ystZm+iJfDT0YjAx1Y=; b=bYiAWGERTYevBUKexPqUjBsiBxsK/uSQBgZK8yFx5i/z4w//rF1ze9cT3ErBdYw7aAR2t8 iuTRIdbRIs0rbXuYUCcHK9RjYoIbpqV0JqQrHL6OhNqjmcfob4W4k3eFqAqLnX92bvHJ1s PIT68VrfUoR7NpXmVV4aj0lX5gwxdHtBZsye2XGNCGMO5KNlFmIzKTkvleoc9TLEQ6kcdY HpkI/hi8vG/bMzWCe+ZNmnYS62dwkoFWvGbnhBGt5D0/SAoAjd86zM4P/v310hWBm7y2WI XNEQ6YYIhDDmrCRRSpphdmIYoLdrMYQSRhy2G03CNwpo4zd1we6sC2Pw1EDHMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952530; a=rsa-sha256; cv=none; b=R/R+TObAntp3pf62lAOJszCS6JzCWFVT4dHGtMRI0CbYWre1KrcJKDKVAx51LUGhkZptjX a6Nh1+R/dcOXM2HQob3AYmVXp1FRo9SYM2pDf7yrhbgoJJfFF2GXu+Ck69E+UdjoGf+8Sj nuAJXyYCssNvklT79V9MV1hJExh5t8b2UIdf7u7M6Q+J4h8RUQIGX2pw4UqibCTpVDjZns jLMoPm4ZVOtqsIczht1LyyDqKf6tAAG87N3wpWC98QthqNzRBEk5Evy/jVBUx0BZoa4CCL GezulRHdINvcL2uprAPHOtDKhWGOudkJAefN4GJxQAGVZoO/c5rr6id301NQvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JsaDs+5Tuyq/eILWqlYx174V5ystZm+iJfDT0YjAx1Y=; b=k5oDmlRUGyEI5GQYZOfQyti3+0xp3OiXW7O8dl6SLl1A/BkzXxyzWqmvQKS7lUyzuVFURD KdSZvxEg/Uoq3lZBOP8IbdOW9/SFm4OmlZhoAXwB4k6LfUXHSf2t9DxtVF5blHByD8+4k9 3y5fy3Y1S27/dKD7L7Nr5q2iOz47Uni6CMLoOEPpxZInp1cp/+27syyNSiA4KkyxNixZOq jThMttzelPofoMORhZUnD6mWDEV86zoBi3BWVZ7w9qowWeJbcIHM4qKvcGh7YIHSc7/G0h Tyalzbr7QF8hnK9+1AX143YP51D2kk6h6NBy95yr1wnjfR2h/9ATwcAwi+l4xQ== 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 4ZMq1t1Fpbz14xJ; Wed, 26 Mar 2025 01:28: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 52Q1Sosf046947; Wed, 26 Mar 2025 01:28:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1SolO046944; Wed, 26 Mar 2025 01:28:50 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:50 GMT Message-Id: <202503260128.52Q1SolO046944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4073e53e4285 - stable/14 - acpi_cmbat: Use nitems instead of sizeof List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4073e53e4285f20c21e4eeecb4d774752b59bae8 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4073e53e4285f20c21e4eeecb4d774752b59bae8 commit 4073e53e4285f20c21e4eeecb4d774752b59bae8 Author: Ahmad Khalifa AuthorDate: 2024-04-19 22:43:19 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:37 +0000 acpi_cmbat: Use nitems instead of sizeof Reviewed by: imp, markj, Elliott Mitchell Pull Request: https://github.com/freebsd/freebsd-src/pull/1125 (cherry picked from commit d0cc25f770aee068bcbaee89aa2f52cc5dd79dd5) --- sys/dev/acpica/acpi_cmbat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi_cmbat.c b/sys/dev/acpica/acpi_cmbat.c index e85967aed9c9..35032244af19 100644 --- a/sys/dev/acpica/acpi_cmbat.c +++ b/sys/dev/acpica/acpi_cmbat.c @@ -344,7 +344,7 @@ acpi_cmbat_get_bix(void *arg) bix_buffer.Pointer = NULL; bix_buffer.Length = ACPI_ALLOCATE_BUFFER; - for (n = 0; n < sizeof(bobjs); n++) { + for (n = 0; n < nitems(bobjs); n++) { as = AcpiEvaluateObject(h, bobjs[n].name, NULL, &bix_buffer); if (!ACPI_FAILURE(as)) { res = (ACPI_OBJECT *)bix_buffer.Pointer; @@ -355,7 +355,7 @@ acpi_cmbat_get_bix(void *arg) bix_buffer.Length = ACPI_ALLOCATE_BUFFER; } /* Both _BIF and _BIX were not found. */ - if (n == sizeof(bobjs)) { + if (n == nitems(bobjs)) { ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), "error fetching current battery info -- %s\n", AcpiFormatException(as)); From nobody Wed Mar 26 01:28:52 2025 X-Original-To: dev-commits-src-all@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 4ZMq1x2m0Vz5s5hD; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq1w3jxdz3rMV; Wed, 26 Mar 2025 01:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SvzGi8WAONjkzYyDFQoYJm7LNjWp4Jewc9jWPxs0VCo=; b=p0B+fyVbTNAuziQEqtbT5fu1WrN6d0hAYhwdpDm4JbUxNVHzYmzFcUoK8gYh39OId+09G5 ndfXzKC2KPVSoPHTYJsUIH66ScNZp09if84EfgWZY7o0NgBMkEzFASWsi0HoYm95qw0JVf pSvL2XH4lGsSquqhuvVvlWmbK2gwlN33IygvNkC6ohnSecFYDMXvbmEqZ7ntxb7dagyXP5 WxYNC9tLcdHvUm6serBBxGwJxnCEDnrSht8YuK45w7f87zalotnofE433PawnwggPJp17q 90Qd9+4ZTpVDIApXOpSKjWHPpVNmMCyZHPevAuwtHUexAw/tN/A5EcQhOHME/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952532; a=rsa-sha256; cv=none; b=rIwZfHt6d0GwvJCLqhzlvln/sznNVJNX+hBUW4dPylMyUSVR8uzK/7csc6AtwixgVZEdJa eU25HhDoNNL6s0oNMefw6OHVoZKLV2QlAS8mUJSXSS3q1y9uLDnGxe3L61VkfKWaZRrXj0 IHSSeBCPxekeKKvWLJaiuYBTlhouj9E16TXTH1PTXuoGM1aWkLmCOcJDFIGBL+1jnqz8zu 7AczlofMYXAyQRZa4KmaKLVQdmF4wfUne9TSX6FeZuOP28WTy0BzJVpPrvdY4NBe4EMqhb fEjnU1nTUDN908sahl7OKLvW2DILG3Cyml2AcbB+7bSid4VcHA2VUfK32YVkMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SvzGi8WAONjkzYyDFQoYJm7LNjWp4Jewc9jWPxs0VCo=; b=IOY7Oz5SgBicAgwcM+wcXBm7kUqLTL0YZ3UyPqwWFjWEpr4+SC1YUzBf5mH0AMt9rCYeIE Q8zf2qmvK3U2S0Ns2uDoIkquwowEeKrQfm/mA9yTA34MTnd8FecHg3Z5pvzAwh5y8I2BTy mxUryjtXsP8T4zcNtxhncdRQvvcaJaxcZ5Lzh1SSccrfDDLAjJhwFBtYL1ophe3x3r2OEU m4sLaaIvEbK6iAhmfTxx5RTilrO2PZuDUTUkiAU4ArRE4Lq6EXiRiKp8KCJOD2wrYjum66 CNYh33TGDxCq39WkJ992BKXhsaFyU3DV03VIUhuqRt+aMry3T8vMBU7wkLrDSw== 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 4ZMq1w2rvdz155S; Wed, 26 Mar 2025 01:28: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 52Q1SqWM047016; Wed, 26 Mar 2025 01:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1Sq3a047013; Wed, 26 Mar 2025 01:28:52 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:52 GMT Message-Id: <202503260128.52Q1Sq3a047013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: df872d66f24a - stable/14 - loader: Increase buffer size to accommodate longer commands List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df872d66f24a4f496cddb1e2da2222f10e3bc722 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=df872d66f24a4f496cddb1e2da2222f10e3bc722 commit df872d66f24a4f496cddb1e2da2222f10e3bc722 Author: Ahmad Khalifa AuthorDate: 2024-06-05 00:32:58 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:37 +0000 loader: Increase buffer size to accommodate longer commands The longest command we have is "efi-autoresizecons". That combined with the two spaces before and after the command gives us a total of 23 characters including the null-terminator. Also move the two trailing spaces to their own pager_output call so they don't get truncated if the command is too long and increase the minimum string length to 20 in order to fix alignment issues caused by the increased buffer size. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1277 (cherry picked from commit ab08da5328b4175e399d8e59adc4dfad0eea24f1) --- stand/common/commands.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stand/common/commands.c b/stand/common/commands.c index e6e4fd005f72..95d12ad95973 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -229,7 +229,7 @@ command_commandlist(int argc __unused, char *argv[] __unused) { struct bootblk_command **cmdp; int res; - char name[20]; + char name[23]; res = 0; pager_open(); @@ -238,9 +238,10 @@ command_commandlist(int argc __unused, char *argv[] __unused) if (res) break; if ((*cmdp)->c_name != NULL && (*cmdp)->c_desc != NULL) { - snprintf(name, sizeof(name), " %-15s ", + snprintf(name, sizeof(name), " %-20s", (*cmdp)->c_name); pager_output(name); + pager_output(" "); pager_output((*cmdp)->c_desc); res = pager_output("\n"); } From nobody Wed Mar 26 01:28:53 2025 X-Original-To: dev-commits-src-all@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 4ZMq1x6Ljxz5s5mZ; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq1x4RDwz3rN9; Wed, 26 Mar 2025 01:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6P6gN5O9dRg0aKtKZxPJe+Q2/9mtbvRDp0h6IOtXwNw=; b=LA/YmUYsPTqoUVjyIw+jxfTgMqfG1lkF1Y4/St/WzaqBv320NCN+3xPsF6erNQmPejD/px SDXZFcDbRobHzZxXOYmub17OzLXA5OozlT/QPDxGscU278xMZlU/K9Bil63poWhbpcQIoV +FWnPE4k2/t3wC9cm+MHgpWO4kWC6RA6l/x6YufepUP5riy2xeRbfgYb+CaX1aWJfCQ3oY uPD3Z8NBdChZiW8S3T1k2l1DeOVVHmobqrAY+8f195cnzBQVGNSaocpuCcWfKlLnJkXHfV 7ehwULKYIam9MjS+uRox4Kylsm/roqIqhl314imqx3aVT0R+5Wc2pqczB1pXoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952533; a=rsa-sha256; cv=none; b=Pxo/KomE64W8YJOSWQH2J8fsA8AFjj+55zIBvai5X7EV0+0R59/XkA4fwo/XzcMlbvaREc lHAFkBgr+Q7+9Xm4NEp1/U03ZHTyxgXuBsqVihymTcX6rQsxpOogRzx6dMhazHxGyd9LRK GcZRrGL7+Jri9eh6R30wIulcWGJPM/TqW0oXwL/1sXJzU8Ykt3JpOPZxIT9rFdwOEKT39U oi5ZBQZTWKtJmszXv9PbOAVMtbDkk1AsG+tStDaBMG6LRigerihZEzNPRsWGXZmCflFk5K B7baEX8i3yYCk7Mwo4JHdOvhfH00yHDimXc8Lj2iyhTj29C4xn7taqy1G1rjaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6P6gN5O9dRg0aKtKZxPJe+Q2/9mtbvRDp0h6IOtXwNw=; b=W7mSlB6aZ3PwP5SF+oPMYFYTtZ8sildhccNbJliNB6792Rww7/41uTSPjwGElkcqrQahdi 218p2/PmTex1RCmx4xVFL8BWv7p0+6HxjIKGxWD9chS/U4sY3RF/TpQHPPsEHYFY8fTSMl HTHujiv9kA+WHylA4yja0Yf3N7cTZJKUSq8s/C5lA4yfNRGK9qfmNDLO3EB1s0OCewTvqx neeHsRVFo3GOHVnu2W1qQlPnqjNOt7Y2BbH0JwZNQ+XgNhvOovtGkGC+Y3kKm9IQYu4bPz SlvPbvkj+65YgIAORampYy7vq5cxJF+bF6KQ2IKcP3zlZHGJJ4C6X9z8nDI4vw== 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 4ZMq1x42zJz155T; Wed, 26 Mar 2025 01:28: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 52Q1SrDu047058; Wed, 26 Mar 2025 01:28:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1SrM4047055; Wed, 26 Mar 2025 01:28:53 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:53 GMT Message-Id: <202503260128.52Q1SrM4047055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 0a4a5b8cefd4 - stable/14 - efi_console: Stay inline with the UEFI spec List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0a4a5b8cefd4c172911e869801aace91f80a42b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0a4a5b8cefd4c172911e869801aace91f80a42b4 commit 0a4a5b8cefd4c172911e869801aace91f80a42b4 Author: Ahmad Khalifa AuthorDate: 2024-06-13 23:17:25 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:37 +0000 efi_console: Stay inline with the UEFI spec The UEFI spec states that the minimum garunteed terminal resolution is 80x25. Signed-off-by: Ahmad Khalifa Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1292 (cherry picked from commit 3b68c491d37196bb76a95bce3c02f7c6d5ba22fd) --- stand/efi/libefi/efi_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 4a3219ef3017..a112528d8c95 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -63,7 +63,7 @@ void HO(void); void end_term(void); #endif -#define TEXT_ROWS 24 +#define TEXT_ROWS 25 #define TEXT_COLS 80 static tf_bell_t efi_cons_bell; From nobody Wed Mar 26 01:28:54 2025 X-Original-To: dev-commits-src-all@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 4ZMq1z0Y8Mz5s5s7; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq1y5SF3z3rQQ; Wed, 26 Mar 2025 01:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9UwHpXjnkmAZDa9TwV47dnBh7k6tmhkxt64iWyazkw4=; b=l0zAyhaj7XlFLvKrazqaIAQRigaNgUzMQSFT3oF0CD5VgX04CrGf274KYiApMAzItYhiHX Y1QFsy33KM37AfyW2lX5gtTE/2KZa0UGXpRmRzhaiemua2x9A1xPmuGpp9nnSht3ULADrd ebJpKSByNcHv7DX7rrRbIVUDTAjV3Pa4Aonk6R6IYPFhD1404HxphhOjZjL2WWF4wCuoRi ve278YV1p48fD/aSU69Xe01AovJCSw2GkTk7KBiXKMGrenzleM7Gc6iLinDeFoCLpOR+30 JcFfZvoetaEIxvrcENFCdznhQ+ZHCpcICetQoDgD7XHhe9Tu40Vt0iXkqYHvpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952534; a=rsa-sha256; cv=none; b=XqR+GDSFDy6MpClHJV/arIA6MCU1dOUOi2ICP4Xq7Wf4kLaLqlpr3X9kqI2MxAMx3QeUn+ QAFt8MqPV+9epmlwadenlQpbv0hcgB2hZK8WwM/+gkNm66gxK8OBf7MarzFxYL2g3kjHXM 5VVf6fwFFZgT3c7mxevtNi4hTomF3slxPq7oyD16wMjHeOG1UES6h5PCZHY06Zlh1fSaRp 3xWXzN3N0Y6T/YbvF4jnz7tgAEB6X1vtQRZckti4eMXt5Q8okGx/HidM8jxtO6CoWgln5I 49O87muHs7tsgPm0+LM5fl09fSyiJ7KYS02jCeLVViMfPslF/l4650vPSHDzEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9UwHpXjnkmAZDa9TwV47dnBh7k6tmhkxt64iWyazkw4=; b=teOfpcuh47m2NAIrzk3bPUywEZi506IsGsYJ9CGPzIDI7KfjTKJuhduYGKRnSzJA0wdw84 IBGZ+wRgrVgqkTuO7xryjN7qi516S/RJhgbaniLb5VTcUIILsJU8xH2XNaQ+BNy2TJh91Z c4Gk5sTR3I68w34xTvss7ebgSbyVujGAU23UMFO3Td9ForyBikvLAqN+iA6W3nFcaJVDm5 jxiccksiQHTSjZ8L7os97qlUbaJLl0HZd1oiGgQqnR9CurHiH73fzdqnz7YK6PgUM/o7XK tYgBLVX0CyrZaj3N/69VawWUcsG/sslP9EHQUPU8Cu+ReY8/rr7WChifmq5zeA== 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 4ZMq1y4zZ4z155V; Wed, 26 Mar 2025 01:28: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 52Q1SsjO047093; Wed, 26 Mar 2025 01:28:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1Ssqq047090; Wed, 26 Mar 2025 01:28:54 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:54 GMT Message-Id: <202503260128.52Q1Ssqq047090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 703287df5e77 - stable/14 - loader.conf.5: Correct terminal size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 703287df5e77cd8fa2ac907bd4c782e31baf3c56 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=703287df5e77cd8fa2ac907bd4c782e31baf3c56 commit 703287df5e77cd8fa2ac907bd4c782e31baf3c56 Author: Ahmad Khalifa AuthorDate: 2024-06-14 00:17:59 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:37 +0000 loader.conf.5: Correct terminal size Signed-off-by: Ahmad Khalifa Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1292 (cherry picked from commit 1dbbce9744500f2fa4d6ca5ec888835c0f7b9161) --- stand/defaults/loader.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index d5c5305fac5f..1e302172af46 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd February 9, 2025 +.Dd July 8, 2024 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -338,8 +338,8 @@ replacing it with character (useful for embedded products and such). .It Va screen.font Set font size for framebuffer mode. -Default font size is selected based on screen resolution, to achieve -terminal dimensions 80x24. +The default font size is selected based on screen resolution. +Note that the terminal's size may vary. .It Va screen.textmode Value .Dq 0 From nobody Wed Mar 26 01:28:55 2025 X-Original-To: dev-commits-src-all@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 4ZMq203Dt0z5s5k0; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq1z6MBJz3rGV; Wed, 26 Mar 2025 01:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiPFMqzx6O4oDC+5r8l921cqpNrtB7rvihiTZw2Vp6E=; b=q3E1KBrA1jSyT2ru26CS7kkTk4iWKaDK2UPx2LQ2S72I7ggnvG80RObHc/XabB8E0qIu92 NZFioUIHZ/b/dPG2TdBlvvsqY6gxXSgZ7+zZkTabj7GdeV5kO8os3lXUKCB8qkhMxAcEy5 ndNCMM3+CYahJeI1mK3Bl2Zp4VjRv25Cpht00dE4d7iUEAIzcMTwyQz5pSOY9Pq3w+vw0h CaKDZMPx8PTgo6oIMTlbkH+U1EV9dPWXoNWCZu7xg2CtYtDM2YiGvzU1iMZT3rm6mUONjj +izuLL7y6dLVMVfVL1J/UKmVysQWQ1WSexJ3iEP69yvx86B0tU/8G8rkgWiN+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952535; a=rsa-sha256; cv=none; b=dSS7TzWrLDpTRUz0Hxbg7phpnO1vi1ekjeYlbyuFh61gAqcXP9DJE2YtYobnwq8TLjvHVj 2NmEaFgetnHSFvwEgH+ZAaJ7as0/5pLuRuV6AghnGItUSYEPDcgZ83rKximt3yynIRWNcO 2rUnK2l72lHvXdvocr7TX6mrGzELaSaUEAwdJKul0AlYC/BdCGVtRcWqSsPB8ZD2h9sPfC 0u5ftdOsIxaq6TlsUQifHeBJaLpV49IpiWngbAdQufAgdLoFfkNDJTE0wrB1a/+AZovKSb j0LN6j43ynuqqLnauYsfxobiPzTJUDQTUM15a8HIziZY66Sn+Ml84x16l+OQiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiPFMqzx6O4oDC+5r8l921cqpNrtB7rvihiTZw2Vp6E=; b=w0N137yAyXWSHLBrj3IGDQ5SBPO+M3FCEnrIFMHkZ4V9BwG2QbESMwiTZiz/lYcGrgb3Lu lQXpY8UiB6zqF0tyNo8Kl658ZgHjecE4SdnLq3noruYs/+nypCMeEv7+bHKsJ6lITDjQL3 +Jt8yfztbZkl6KMGELkR8JDHkC0x9PkUXlRWYgpBcK0OgcalF+v05lo0n8PjHwCzSLXhmG iZdVEairGPlsH4uWC5nQY0Clv/uYzCEepwaSHuSdJF8UXQ8diicDVpy8QBQfTsGhi/7aND nL2s+uZQy5J2WV7cQjodWvB01Yw/KR4aIw8wUxsetoZVY8J5mMMa3HKXGPG1eA== 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 4ZMq1z5y6pz155W; Wed, 26 Mar 2025 01:28: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 52Q1Stbu047132; Wed, 26 Mar 2025 01:28:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1St8e047127; Wed, 26 Mar 2025 01:28:55 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:55 GMT Message-Id: <202503260128.52Q1St8e047127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7d042b0af1dc - stable/14 - bytgpio: expose PNP info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7d042b0af1dc0f1c7f4979507aec9681d42ee616 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7d042b0af1dc0f1c7f4979507aec9681d42ee616 commit 7d042b0af1dc0f1c7f4979507aec9681d42ee616 Author: Ahmad Khalifa AuthorDate: 2024-07-26 08:21:44 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 bytgpio: expose PNP info Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1349 (cherry picked from commit 969484b53217cee65d6802f1954f0431cbfc6b45) --- sys/dev/gpio/bytgpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/bytgpio.c b/sys/dev/gpio/bytgpio.c index b3f5f02081c5..f7b2a73ec6cb 100644 --- a/sys/dev/gpio/bytgpio.c +++ b/sys/dev/gpio/bytgpio.c @@ -278,6 +278,8 @@ const struct pinmap_info bytgpio_sus_pins[] = { GPIO_PIN_MAP(40, 0) }; +static char *bytgpio_gpio_ids[] = { "INT33FC", NULL }; + #define SUS_PINS nitems(bytgpio_sus_pins) #define BYGPIO_PIN_REGISTER(sc, pin, r) ((sc)->sc_pinpad_map[(pin)].reg * 16 + (r)) @@ -538,12 +540,11 @@ bytgpio_pin_toggle(device_t dev, uint32_t pin) static int bytgpio_probe(device_t dev) { - static char *gpio_ids[] = { "INT33FC", NULL }; int rv; if (acpi_disabled("gpio")) return (ENXIO); - rv = ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids, NULL); + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, bytgpio_gpio_ids, NULL); if (rv <= 0) device_set_desc(dev, "Intel Baytrail GPIO Controller"); return (rv); @@ -675,3 +676,4 @@ static driver_t bytgpio_driver = { DRIVER_MODULE(bytgpio, acpi, bytgpio_driver, 0, 0); MODULE_DEPEND(bytgpio, acpi, 1, 1, 1); MODULE_DEPEND(bytgpio, gpiobus, 1, 1, 1); +ACPI_PNP_INFO(bytgpio_gpio_ids); From nobody Wed Mar 26 01:28:56 2025 X-Original-To: dev-commits-src-all@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 4ZMq211kwGz5s5pn; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq2070bCz3rWT; Wed, 26 Mar 2025 01:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2i4Mpe427p3FGnW+z/0Hrp0HRw/FGR7J+pxgJwRESpI=; b=eJWgCLLaVPJzrweGQxioPjTeXUfm2xJmkShUye2heeHqX1v8nWkK1IXjDu4eDW4dsG3nwe PLvkNgZ+qVdl10Hvgd/6881XGzV38OHl0gv+MwhTUlESpCjxHYKawpq3+MaA3Shtcfv8eZ Rl0hEIKyN0VOxKYdpsmfkNcOA/frp+ThVgBfNkEndyLU6s9lLJjVEGZM0pQWXP1hEt7L8W T45CuW8kLd7ASoFmZi+wl3swfch9jxdiCsSJs0QN06LBo4mXHwxaJykL/SVwRasCUQxBfg JjdpwZMn/IRifC1nJuGgvNSNdWQmc/jGxHwQKESLkuO/AP2pbbwvWcPvC4hV7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952537; a=rsa-sha256; cv=none; b=cqgUrljmXKETtHuE6hQvQWgP7DJ4L1Rhob1d+5a2FZYoTA/pVrJ8WAXkGTxl9Wrw56Fa5K BioH+OsHm0dR7/UWMwph4aP98rJYnGDaLj2tBdO23v8XVb8qXUvcVQslLfCJfek6656VTv zLMOGmr5HeeVdGjiLOxbZIFHQpYEIkVjgBYFjO2TTIuQ6N1AT7fijqAx8A56bT4VOV1u7a bvQHT/L3rqljaVEluBi7XyYc+TksVNudgoy8AxxUIM8v7vyvtcTWPSajLsk8rARu2V4OWo NocJRHBHkXnfDZF+YgsPv68r7WijDwMUKOxDbuWeU1wwWbd9pMqTG0pZFXXwaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2i4Mpe427p3FGnW+z/0Hrp0HRw/FGR7J+pxgJwRESpI=; b=FqwjJHoPmyR90yo13EQqW7cxRzlAT2p/PmP1WjLGNuJ6c7zqzmiv0kxgi06fs/djYvCuXQ Yfjtb8io+ph7JQXoaaXA796wAkKEMjPI1u54/oBd8oDn47ZdnhQ1poaLs9JpI7icCHk2hw GNEoLys66/vX6FAr4RkIZhyr0ymY6uWSYhyvOeAIqqQT8HNNrybe30zCZCDexv5QnHR7ii pLftYpgPNaOF5ETIpV/8d+5QOYGPlgWS127FPXEsQwxTpKuS25O22GeKHRQchjPTlMAw04 yhayKXbf7K2z0HTUA7H5A0dloPL5dtN8k0nVsn+4f1O5yDizebSF74GyzkTzUw== 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 4ZMq206Wpwz14Yq; Wed, 26 Mar 2025 01:28: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 52Q1Su57047167; Wed, 26 Mar 2025 01:28:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1SudU047164; Wed, 26 Mar 2025 01:28:56 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:56 GMT Message-Id: <202503260128.52Q1SudU047164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 513d89fef90a - stable/14 - usb: increase USB_PORT_RESET_RECOVERY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 513d89fef90a64330580e9c5db4fd67d8198d7de Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=513d89fef90a64330580e9c5db4fd67d8198d7de commit 513d89fef90a64330580e9c5db4fd67d8198d7de Author: Ahmad Khalifa AuthorDate: 2024-07-16 17:38:12 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 usb: increase USB_PORT_RESET_RECOVERY 10ms seems to be too strict for some configurations, so increase to 20ms. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1327 (cherry picked from commit e152944f1a16a4ff33b4e20b813ce4a54b884b90) --- sys/dev/usb/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 3d00cda27d18..a6c3c8030c73 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -114,7 +114,7 @@ MALLOC_DECLARE(M_USBDEV); /* Allow for marginal and non-conforming devices. */ #define USB_PORT_RESET_DELAY 50 /* ms */ #define USB_PORT_ROOT_RESET_DELAY 200 /* ms */ -#define USB_PORT_RESET_RECOVERY 10 /* ms */ +#define USB_PORT_RESET_RECOVERY 20 /* ms */ #define USB_PORT_POWERUP_DELAY 300 /* ms */ #define USB_PORT_RESUME_DELAY (20*2) /* ms */ #define USB_SET_ADDRESS_SETTLE 10 /* ms */ From nobody Wed Mar 26 01:28:57 2025 X-Original-To: dev-commits-src-all@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 4ZMq224xpFz5s5VS; Wed, 26 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq221XtPz3rZB; Wed, 26 Mar 2025 01:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mHWY/yxcLm8j+07dqG3scSc9dlFSFQIq9dcqAd2k3G0=; b=HO4XCEWdza2bGvGPTaOpz7ri1Lf243JZZg4zzY1adK03FRQqt4gKOFLKy+Q2Ih0uS0BWIt YWK8JVkNji2kpp2xbUcqGZEiq5ENBdrugV43rNYXLzf12M9ZeS554N4xaxW+NMxTWOOafO xHoB2TRTJm+uGVLa1vL48dAOcJmcficP2U0LxfZM2/ChbwLMyLI3+a4hKf+Hx3IwVD0vQt Z8EG39ZlvMuIWzlVZVFOrr6gk0lx79uDZOO8taTctonMGpUrHNAjDz1HaxplALoSNBED05 7Thy/VUjNh9dL3nAPeUQMetqX6MLNeHxSgNtsIFtwFMrnIe0CnZg31IoeFldQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952538; a=rsa-sha256; cv=none; b=jFAR24sXpnPXP7zPBhdLg30BP0Ll7AC6XvR+n1DBBuIZ4gsG1fzHvBIbVFMc8RXqZJ5wBd 8kLKOxTOWUNLzmrZ0lUGjSb/VtGbXQ6ZBcl3GLcSHN9sTAzT4ehZIqpK5O7JR13aKZgwdq EXL0Cif40um4jNAyCxrwFmpOzHX8raiIVR4sAv8pHmyG9yedcv8e8fOeH/RT+UxF8/GLUz QXc0B16mlTTXbuHlo2ZAAz40/bp5Wx3Z9YTH2ojJUx8exTqKji14oTAd8SmKLxok/7ud8e 7TgAqMKdZLZBM7MfKu7ZvSPem8rsGC94A6489mxWI3WQ0XCv5viSvnGZyfGcAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mHWY/yxcLm8j+07dqG3scSc9dlFSFQIq9dcqAd2k3G0=; b=FePOheP4ubc2paKF6xRsjT2v6meiUeIIyUpmOIGbKmdKgU5qcPWDTDD6aFqcaNB+yruwQX ah+eGGsT4O0iHeSCQJMf/lqazsRReAZH0rdJaFP8QbCbzMwwrb2TH13mBDQ6xTlOywiUTI L0bNGbmA3+Ex4zV1xtjUG3rcDwX0C8PYQohRbD8duarhTzkygRl2WfABEQBhAcTsLEiu5u 3zwcO+/1y5ZsztAtfwSbL9fu7VuTR6tv0hPfVAUV7IaFF6eGSU3LCGlKaxFx1bb3+iIAP0 IG9ksuZxDzfQLirEAZ2bSWZcrN+ZsZy6+wt+Md2mRA7LiiC2QaTy2We+PuAzRA== 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 4ZMq2203kFz14Ks; Wed, 26 Mar 2025 01:28: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 52Q1Svpc047202; Wed, 26 Mar 2025 01:28:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1SvUn047199; Wed, 26 Mar 2025 01:28:57 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:57 GMT Message-Id: <202503260128.52Q1SvUn047199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: c6d3271fe07b - stable/14 - Copy the new ia32 loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c6d3271fe07b622355ddd6d4966cc9e111e813cd Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c6d3271fe07b622355ddd6d4966cc9e111e813cd commit c6d3271fe07b622355ddd6d4966cc9e111e813cd Author: Ahmad Khalifa AuthorDate: 2024-06-03 01:53:44 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 Copy the new ia32 loader This handles copying in install-boot.sh and bsdinstall's bootconfig. install-boot.sh: make_esp_file now optionally takes extra arguments so it can copy multiple files. This is used by the amd64 release scripts. make_esp_device also takes an extra optional argument for efibootname. This is currently unused, but it can be used in the future to do something like: make_esp_device loader.efi bootx64 make_esp_device loader_ia32.efi bootia32 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit 599273f942b8dc6f957487bb28f36694dab9dad2) --- release/amd64/make-memstick.sh | 7 ++++- release/amd64/mkisoimages.sh | 7 ++++- tools/boot/install-boot.sh | 52 +++++++++++++++++++++++++--------- usr.sbin/bsdinstall/scripts/bootconfig | 36 ++++++++++++++--------- 4 files changed, 72 insertions(+), 30 deletions(-) diff --git a/release/amd64/make-memstick.sh b/release/amd64/make-memstick.sh index 4c51d7d65af4..cbb80e971343 100755 --- a/release/amd64/make-memstick.sh +++ b/release/amd64/make-memstick.sh @@ -60,7 +60,12 @@ fi # Make an ESP in a file. espfilename=$(mktemp /tmp/efiboot.XXXXXX) -make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi +if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then + make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 \ + ${BASEBITSDIR}/boot/loader_ia32.efi bootia32 +else + make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi +fi mkimg -s mbr \ -b ${BASEBITSDIR}/boot/mbr \ diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh index 3cc7a6cc919e..245beb660c3f 100644 --- a/release/amd64/mkisoimages.sh +++ b/release/amd64/mkisoimages.sh @@ -64,7 +64,12 @@ if [ "$1" = "-b" ]; then espfilename=$(mktemp /tmp/efiboot.XXXXXX) # ESP file size in KB. espsize="2048" - make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi + if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then + make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 \ + ${BASEBITSDIR}/boot/loader_ia32.efi bootia32 + else + make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi + fi bootable="$bootable -o bootimage=i386;${espfilename} -o no-emul-boot -o platformid=efi" shift diff --git a/tools/boot/install-boot.sh b/tools/boot/install-boot.sh index 332756582137..217bf0ff1457 100755 --- a/tools/boot/install-boot.sh +++ b/tools/boot/install-boot.sh @@ -42,11 +42,10 @@ get_uefi_bootname() { } make_esp_file() { - local file sizekb loader device stagedir fatbits efibootname + local file sizekb device stagedir fatbits efibootname file=$1 sizekb=$2 - loader=$3 if [ "$sizekb" -ge "$fat32min" ]; then fatbits=32 @@ -58,8 +57,25 @@ make_esp_file() { stagedir=$(mktemp -d /tmp/stand-test.XXXXXX) mkdir -p "${stagedir}/EFI/BOOT" - efibootname=$(get_uefi_bootname) - cp "${loader}" "${stagedir}/EFI/BOOT/${efibootname}.efi" + + # Allow multiple files to be copied. + # We do this in pairs, e.g: + # make_esp_file ... loader1.efi bootx64 loader2.efi bootia32 + # + # If the second argument is left out, + # determine it automatically. + shift; shift # Skip $file and $sizekb + while [ ! -z $1 ]; do + if [ ! -z $2 ]; then + efibootname=$2 + else + efibootname=$(get_uefi_bootname) + fi + cp "$1" "${stagedir}/EFI/BOOT/${efibootname}.efi" + + shift; shift || : # Ignore failure to shift + done + makefs -t msdos \ -o fat_type=${fatbits} \ -o sectors_per_cluster=1 \ @@ -70,13 +86,20 @@ make_esp_file() { } make_esp_device() { - local dev file mntpt fstype efibootname kbfree loadersize efibootfile + local dev file dst mntpt fstype efibootname kbfree loadersize efibootfile local isboot1 existingbootentryloaderfile bootorder bootentry # ESP device node dev=$1 file=$2 + # Allow caller to override the default + if [ ! -z $3 ]; then + efibootname=$3 + else + efibootname=$(get_uefi_bootname) + fi + dst=$(basename ${file%.efi}) mntpt=$(mktemp -d /tmp/stand-test.XXXXXX) # See if we're using an existing (formatted) ESP @@ -93,7 +116,6 @@ make_esp_device() { echo "Mounted ESP ${dev} on ${mntpt}" - efibootname=$(get_uefi_bootname) kbfree=$(df -k "${mntpt}" | tail -1 | cut -w -f 4) loadersize=$(stat -f %z "${file}") loadersize=$((loadersize / 1024)) @@ -114,7 +136,7 @@ make_esp_device() { fi fi - if [ ! -f "${mntpt}/EFI/freebsd/loader.efi" ] && [ "$kbfree" -lt "$loadersize" ]; then + if [ ! -f "${mntpt}/EFI/freebsd/${dst}.efi" ] && [ "$kbfree" -lt "$loadersize" ]; then umount "${mntpt}" rmdir "${mntpt}" echo "Failed to update the EFI System Partition ${dev}" @@ -126,24 +148,26 @@ make_esp_device() { mkdir -p "${mntpt}/EFI/freebsd" # Keep a copy of the existing loader.efi in case there's a problem with the new one - if [ -f "${mntpt}/EFI/freebsd/loader.efi" ] && [ "$kbfree" -gt "$((loadersize * 2))" ]; then - cp "${mntpt}/EFI/freebsd/loader.efi" "${mntpt}/EFI/freebsd/loader-old.efi" + if [ -f "${mntpt}/EFI/freebsd/${dst}.efi" ] && [ "$kbfree" -gt "$((loadersize * 2))" ]; then + cp "${mntpt}/EFI/freebsd/${dst}.efi" "${mntpt}/EFI/freebsd/${dst}-old.efi" fi echo "Copying loader to /EFI/freebsd on ESP" - cp "${file}" "${mntpt}/EFI/freebsd/loader.efi" + cp "${file}" "${mntpt}/EFI/freebsd/${dst}.efi" - if [ -n "${updatesystem}" ]; then - existingbootentryloaderfile=$(efibootmgr -v | grep "${mntpt}//EFI/freebsd/loader.efi") + # efibootmgr won't work on systems with ia32 UEFI firmware + # since we only use it to boot the 64-bit kernel + if [ -n "${updatesystem}" ] && [ ${efibootname} != "bootia32" ]; then + existingbootentryloaderfile=$(efibootmgr -v | grep "${mntpt}//EFI/freebsd/${dst}.efi") if [ -z "$existingbootentryloaderfile" ]; then # Try again without the double forward-slash in the path - existingbootentryloaderfile=$(efibootmgr -v | grep "${mntpt}/EFI/freebsd/loader.efi") + existingbootentryloaderfile=$(efibootmgr -v | grep "${mntpt}/EFI/freebsd/${dst}.efi") fi if [ -z "$existingbootentryloaderfile" ]; then echo "Creating UEFI boot entry for FreeBSD" - efibootmgr --create --label FreeBSD --loader "${mntpt}/EFI/freebsd/loader.efi" > /dev/null + efibootmgr --create --label FreeBSD --loader "${mntpt}/EFI/freebsd/${dst}.efi" > /dev/null if [ $? -ne 0 ]; then die "Failed to create new boot entry" fi diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index bd69195f76ff..618a1966095e 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -109,32 +109,40 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then # i386) ARCHBOOTNAME=ia32 ;; # no support for this in i386 kernels, rare machines *) die "Unsupported arch $(uname -m) for UEFI install" esac + + if [ `sysctl -n machdep.efi_arch` == i386 ]; then + ARCHBOOTNAME=ia32 + file=loader_ia32.efi + else + file=loader.efi + fi + BOOTDIR="/efi/boot" BOOTNAME="${BOOTDIR}/boot${ARCHBOOTNAME}.efi" FREEBSD_BOOTDIR="/efi/freebsd" - FREEBSD_BOOTNAME="${FREEBSD_BOOTDIR}/loader.efi" + FREEBSD_BOOTNAME="${FREEBSD_BOOTDIR}/${file}" mntpt="$BSDINSTALL_CHROOT/boot/efi" - f_dprintf "Installing loader.efi onto ESP" + f_dprintf "Installing ${file} onto ESP" mkdir -p "${mntpt}/${FREEBSD_BOOTDIR}" "${mntpt}/${BOOTDIR}" - cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${FREEBSD_BOOTNAME}" + cp "$BSDINSTALL_CHROOT/boot/${file}" "${mntpt}/${FREEBSD_BOOTNAME}" # - # The following shouldn't be necessary. UEFI defines a way to - # specifically select what to boot (which we do via - # efibootmgr). However, virtual environments often times lack - # support for the NV variables efibootmgr sets. In addition, - # some UEFI implementations have features that interfere with - # the setting of these variables. To combat that, we install the - # default removable media boot file as a fallback if it doesn't - # exist. We don't install it all the time since that can - # interfere with other installations on the drive (like rEFInd). + # UEFI defines a way to specifically select what to boot + # (which we do via efibootmgr). However, if we booted from an ia32 + # UEFI environment, we wouldn't have access to efirt. In addition, + # virtual environments often times lack support for the NV variables + # efibootmgr sets, and some UEFI implementations have features that + # interfere with the setting of these variables. To combat that, we + # install the default removable media boot file if it doesn't exist. + # We don't install it all the time since that can interfere with other + # installations on the drive (like rEFInd). # if [ ! -f "${mntpt}/${BOOTNAME}" ]; then - cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" + cp "$BSDINSTALL_CHROOT/boot/${file}" "${mntpt}/${BOOTNAME}" fi - if [ "$BSDINSTALL_CONFIGCURRENT" ]; then + if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then update_uefi_bootentry fi From nobody Wed Mar 26 01:28:59 2025 X-Original-To: dev-commits-src-all@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 4ZMq250ZPKz5s5k5; Wed, 26 Mar 2025 01:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq232Q17z3rZQ; Wed, 26 Mar 2025 01:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCexOC6cgynhduODssgzxZMzFMAE+GMf6aBY5Zo6Xs0=; b=UJDqQj9EUZ/YrA5jAsuUuiTBmwI7p1YKOxiKbEVJdHBinmNjivztVS0hJ6FFTA7sd9hU9S BiXQQTezhI5s3EsCrXiBJP3Si1YeHXmSrQ/WzkwAB/bwle6qRYXFcxf+5HoOFSfBVt0pAC epbsr5stJQ5HBxRQ7Ugej0qqdQbX2KGlbLHJSVI4Cb24tY0kd50QUhAgD+4fuSlfoijtd0 Rel01KmILSkKTRPh3iDlJP1sXyXMwiQBSKOvnwAHDLOrg9ToQjk/BttKav6en9agUH4XTa ahrVrpSShAkoECFhkZWZiZqTfCeJewAri+D+0ZBSkipWe2yVXNkdBPc7fQ2HbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952539; a=rsa-sha256; cv=none; b=Ak/xRJhT71qUMDv4J3RUF4I4NZjePEbEFwB5or8DPNbFdFrBPd+ZyJY0VKRcuEn++yvVk1 nlNYy3yhtRnsBBULcqZVPAbq5jErOLcMn3Yn7uPC3q3zCnHtMvthWmVJN2PTriKUlAkHAB UOSs0pNApSePzlolDi8lZlzuHL5IgY6aamyGcNyffbLpE0PAbBpnOIcLM2zlqFM8wXzdhP I/2v9c6WM2XGAyXqIMGzey/qec93FKwXBpPdH0ZNaxFAUVGuqOSXxofO8JiZgapyvAguoi Hpha4W/UczizbqBZcbF/bU7Wlzvp44fQecK38Fsq4oyvKdQqXS6TYMnRztEVwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCexOC6cgynhduODssgzxZMzFMAE+GMf6aBY5Zo6Xs0=; b=by4Be64oAM5gKEsBOCpz9UgehacRYNzGeQTdhI0szL2VN05qPAqctmnELkOXpfjguy8RO0 TeaIuaQw3RpSRP9yd/isL1ofWzyKUZymfaNFD0ppJEpApyxNmgLaR1PkcaQMJJghtrcSZG e2UbHHlD6QD2G5lrw22mrEwzC6SaEHZjM4tBczUxlDHwsXOWzSo+XlLDtQWaC3EVeGOlOq pam2h/MW4PQOi6pfOpzcHRiAZHgRFCLTSj+CLScq8W62GyowUpyLI+/aNHNNuwZFsUL0DP +DpY8Y6ZiFS5OhXcJVzrBCxi/QdLBmbEGM17IimCYKKEJ2ntxh0NiXz0aHRuFA== 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 4ZMq230lS8z14rn; Wed, 26 Mar 2025 01:28: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 52Q1Sx9s047242; Wed, 26 Mar 2025 01:28:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1SxdC047239; Wed, 26 Mar 2025 01:28:59 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:59 GMT Message-Id: <202503260128.52Q1SxdC047239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: ce02470205a1 - stable/14 - stand: Add support for 64-bit machines with 32-bit UEFI implementations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce02470205a1521c75edab1fa466e36abd09cda0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ce02470205a1521c75edab1fa466e36abd09cda0 commit ce02470205a1521c75edab1fa466e36abd09cda0 Author: Ahmad Khalifa AuthorDate: 2024-05-14 19:40:06 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 stand: Add support for 64-bit machines with 32-bit UEFI implementations Some machines have 64-bit capable cpus but are stuck on 32-bit uefi firmware. Add support for them by building a new "loader_ia32" with LOADER_DEFAULT_INTERP along with the 64-bit one. The loader can be disabled using MK_LOADER_IA32. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit f8ca5d45c3c1829759ecd87cb95d53e5ab7d0811) --- stand/common/bootstrap.h | 2 +- stand/common/load_elf.c | 4 +- stand/efi/Makefile | 1 + stand/efi/Makefile.inc | 4 + stand/efi/loader/Makefile | 24 ++- stand/efi/loader/arch/i386/Makefile.inc | 9 + stand/efi/loader/arch/i386/amd64_tramp.S | 100 +++++++++++ stand/efi/loader/arch/i386/elf64_freebsd.c | 274 +++++++++++++++++++++++++++++ stand/efi/loader/arch/i386/i386.ldscript | 55 ++++++ stand/efi/loader/arch/i386/setup.c | 51 ++++++ stand/efi/loader/arch/i386/start.S | 75 ++++++++ stand/efi/loader/bootinfo.c | 13 +- stand/efi/loader/conf.c | 4 +- stand/efi/loader/copy.c | 18 +- stand/efi/loader/loader_efi.h | 2 +- stand/efi/loader/main.c | 2 +- stand/efi/loader_ia32/Makefile | 6 + 17 files changed, 621 insertions(+), 23 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 2dcc6eda47ba..3e78500157cd 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -238,7 +238,7 @@ struct preloaded_file size_t f_size; /* file size */ struct kernel_module *f_modules; /* list of modules if any */ struct preloaded_file *f_next; /* next file */ -#ifdef __amd64__ +#if defined(__amd64__) || defined(__i386__) bool f_kernphys_relocatable; #endif #if defined(__i386__) diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index 8877e5f8b7e0..eaa6bef6ee86 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -217,7 +217,7 @@ static int elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr) } #endif -#ifdef __amd64__ +#if defined(__amd64__) || defined(__i386__) static bool is_kernphys_relocatable(elf_file_t ef) { @@ -491,7 +491,7 @@ __elfN(loadfile_raw)(char *filename, uint64_t dest, /* Load OK, return module pointer */ *result = (struct preloaded_file *)fp; err = 0; -#ifdef __amd64__ +#if defined(__amd64__) || defined(__i386__) fp->f_kernphys_relocatable = multiboot || is_kernphys_relocatable(&ef); #endif #ifdef __i386__ diff --git a/stand/efi/Makefile b/stand/efi/Makefile index 5177ea688ed1..2ecd8ba07aa0 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -11,6 +11,7 @@ SUBDIR.yes+= boot1 gptboot SUBDIR.${MK_FORTH}+= loader_4th SUBDIR.${MK_LOADER_LUA}+= loader_lua +SUBDIR.${MK_LOADER_IA32}+= loader_ia32 SUBDIR.yes+= loader_simp .include diff --git a/stand/efi/Makefile.inc b/stand/efi/Makefile.inc index d4600a4d60e7..0a127a142221 100644 --- a/stand/efi/Makefile.inc +++ b/stand/efi/Makefile.inc @@ -19,7 +19,11 @@ CFLAGS+= -fPIC .endif .if ${MACHINE_CPUARCH} == "amd64" +.if ${DO32:U0} == 1 +EFI_TARGET= efi-app-ia32 +.else EFI_TARGET= efi-app-x86_64 +.endif .else EFI_TARGET= binary .endif diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index d2b872e0ca99..0823f8b38856 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -7,7 +7,13 @@ LOADER_EXT2FS_SUPPORT?= no .include +.if ${MACHINE} == "amd64" && ${DO32:U0} == 1 +__arch= i386 +LOADER?= loader_ia32 +.else +__arch= ${MACHINE} LOADER?= loader_${LOADER_INTERP} +.endif PROG= ${LOADER}.sym INTERNALPROG= WARNS?= 3 @@ -53,13 +59,13 @@ CFLAGS.gfx_fb.c += -DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib CWARNFLAGS.main.c+= -Wno-format .PATH: ${.CURDIR}/../loader -.PATH: ${.CURDIR}/../loader/arch/${MACHINE} -.include "${.CURDIR}/../loader/arch/${MACHINE}/Makefile.inc" +.PATH: ${.CURDIR}/../loader/arch/${__arch} +.include "${.CURDIR}/../loader/arch/${__arch}/Makefile.inc" CFLAGS+= -I${.CURDIR} -CFLAGS+= -I${.CURDIR}/arch/${MACHINE} +CFLAGS+= -I${.CURDIR}/arch/${__arch} CFLAGS+= -I${EFISRC}/include -CFLAGS+= -I${EFISRC}/include/${MACHINE} +CFLAGS+= -I${EFISRC}/include/${__arch} CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include CFLAGS+= -I${BOOTSRC}/i386/libi386 CFLAGS+= -DEFI @@ -96,11 +102,11 @@ CLEANFILES+= 8x16.c FILES+= ${LOADER}.efi FILESMODE_${LOADER}.efi= ${BINMODE} -.if ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP} +.if ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP} && ${__arch} != "i386" LINKS+= ${BINDIR}/${LOADER}.efi ${BINDIR}/loader.efi .endif -LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/${MACHINE}.ldscript +LDSCRIPT= ${.CURDIR}/../loader/arch/${__arch}/${__arch}.ldscript LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie .if ${LINKER_TYPE} == "bfd" && ${LINKER_VERSION} >= 23400 LDFLAGS+= -Wl,--no-dynamic-linker @@ -133,8 +139,14 @@ ${LOADER}.efi: ${PROG} --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a +LIBEFI32= ${BOOTOBJ}/efi/libefi32/libefi.a +.if ${__arch} == "i386" +DPADD= ${LDR_INTERP32} ${LIBEFI32} ${LIBSA32} ${LDSCRIPT} +LDADD= ${LDR_INTERP32} ${LIBEFI32} ${LIBSA32} +.else DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT} LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} +.endif .include diff --git a/stand/efi/loader/arch/i386/Makefile.inc b/stand/efi/loader/arch/i386/Makefile.inc new file mode 100644 index 000000000000..e27b553c6bab --- /dev/null +++ b/stand/efi/loader/arch/i386/Makefile.inc @@ -0,0 +1,9 @@ +SRCS+= amd64_tramp.S \ + start.S \ + setup.c \ + elf64_freebsd.c + +.PATH: ${BOOTSRC}/i386/libi386 +SRCS+= nullconsole.c \ + comconsole.c \ + spinconsole.c diff --git a/stand/efi/loader/arch/i386/amd64_tramp.S b/stand/efi/loader/arch/i386/amd64_tramp.S new file mode 100644 index 000000000000..06f9262014b3 --- /dev/null +++ b/stand/efi/loader/arch/i386/amd64_tramp.S @@ -0,0 +1,100 @@ +/*- + * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2023 Ahmad Khalifa + * + * This software was developed by Benno Rice 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 + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + + .text + .globl amd64_tramp + +/* + * void amd64_tramp(uint32_t stack, void *copy_finish, uint32_t kernend, + * uint32_t modulep, uint32_t pagetable, uint32_t gdtr, uint64_t entry) + */ +amd64_tramp: + cli /* Make sure we don't get interrupted. */ + + calll *8(%esp) /* Call copy_finish so we're all ready to go. */ + + movl %cr0, %eax /* Paging may be enabled, disable it. */ + andl $0x7FFFFFFF, %eax + movl %eax, %cr0 + + movl %cr4, %eax /* PAE may be disabled, enable it. */ + orl $0x20, %eax + movl %eax, %cr4 + + movl 20(%esp), %eax /* Swap page tables. */ + movl %eax, %cr3 + + movl $0xC0000080, %ecx /* Enable long mode. */ + rdmsr + orl $0x100, %eax + wrmsr + + movl 12(%esp), %edi /* Stash the kernel and GDT values for later. */ + movl 16(%esp), %esi + movl 24(%esp), %ebx + movl 28(%esp), %edx + movl 32(%esp), %ebp + + movl 4(%esp), %esp /* Switch to our temporary stack. */ + + movl %cr0, %eax /* Enable paging and enter compatibility mode. */ + orl $0x80000000, %eax + movl %eax, %cr0 + + lgdtl (%ebx) /* Load GDT. */ + + pushl %edi /* Push kernend. */ + pushl %esi /* Push modulep. */ + pushl $0x0 + pushl %ebp /* Push 64-bit entry address. */ + pushl %edx + + calll 0f /* Find the address of ".longmode". */ +0: popl %eax + addl $(.longmode-0b), %eax + + pushl $0x8 /* Push CS. */ + pushl %eax /* Push the address. */ + lretl /* "Return" to 64-bit code. */ + + .code64 + +.longmode: + retq /* "Return" to kernel entry. */ + + .code32 + + ALIGN_TEXT +amd64_tramp_end: + + .data + .globl amd64_tramp_size +amd64_tramp_size: + .long amd64_tramp_end-amd64_tramp diff --git a/stand/efi/loader/arch/i386/elf64_freebsd.c b/stand/efi/loader/arch/i386/elf64_freebsd.c new file mode 100644 index 000000000000..ba5117b37016 --- /dev/null +++ b/stand/efi/loader/arch/i386/elf64_freebsd.c @@ -0,0 +1,274 @@ +/*- + * Copyright (c) 1998 Michael Smith + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#define __ELF_WORD_SIZE 64 +#include +#include +#include + +#include +#include + +#include "bootstrap.h" + +#include "loader_efi.h" + +extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); + +static int elf64_exec(struct preloaded_file *amp); +static int elf64_obj_exec(struct preloaded_file *amp); + +static struct file_format amd64_elf = { + .l_load = elf64_loadfile, + .l_exec = elf64_exec +}; + +static struct file_format amd64_elf_obj = { + .l_load = elf64_obj_loadfile, + .l_exec = elf64_obj_exec +}; + +struct file_format *file_formats[] = { + &amd64_elf, + &amd64_elf_obj, + NULL +}; + +struct gdtr { + uint16_t size; + uint64_t ptr; +} __packed; + +#define PG_V 0x001 +#define PG_RW 0x002 +#define PG_PS 0x080 + +#define GDT_P 0x00800000000000 +#define GDT_E 0x00080000000000 +#define GDT_S 0x00100000000000 +#define GDT_RW 0x00020000000000 +#define GDT_L 0x20000000000000 + +#define M(x) ((x) * 1024 * 1024) +#define G(x) (1ULL * (x) * 1024 * 1024 * 1024) + +typedef uint64_t p4_entry_t; +typedef uint64_t p3_entry_t; +typedef uint64_t p2_entry_t; +typedef uint64_t gdt_t; + +static p4_entry_t *PT4; +static p3_entry_t *PT3; +static p3_entry_t *PT3_l, *PT3_u; +static p2_entry_t *PT2; +static p2_entry_t *PT2_l0, *PT2_l1, *PT2_l2, *PT2_l3, *PT2_u0, *PT2_u1; +static gdt_t *GDT; + +extern EFI_PHYSICAL_ADDRESS staging; + +static void (*trampoline)(uint32_t stack, void *copy_finish, uint32_t kernend, + uint32_t modulep, uint64_t *pagetable, struct gdtr *gdtr, uint64_t entry); + +extern void *amd64_tramp; +extern uint32_t amd64_tramp_size; + +/* + * There is an ELF kernel and one or more ELF modules loaded. + * We wish to start executing the kernel image, so make such + * preparations as are required, and do so. + */ +static int +elf64_exec(struct preloaded_file *fp) +{ + EFI_PHYSICAL_ADDRESS ptr; + EFI_ALLOCATE_TYPE type; + EFI_STATUS err; + struct file_metadata *md; + struct gdtr *gdtr; + Elf_Ehdr *ehdr; + vm_offset_t modulep, kernend, trampstack; + int i; + + switch (copy_staging) { + case COPY_STAGING_ENABLE: + type = AllocateMaxAddress; + break; + case COPY_STAGING_DISABLE: + type = AllocateAnyPages; + break; + case COPY_STAGING_AUTO: + type = fp->f_kernphys_relocatable ? + AllocateAnyPages : AllocateMaxAddress; + break; + } + + if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) + return (EFTYPE); + ehdr = (Elf_Ehdr *)&(md->md_data); + + /* + * Make our temporary stack 32 bytes big, which is + * a little more than we need. + */ + ptr = G(1); + err = BS->AllocatePages(type, EfiLoaderCode, + EFI_SIZE_TO_PAGES(amd64_tramp_size + 32), &ptr); + if (EFI_ERROR(err)) { + printf("Unable to allocate trampoline\n"); + return (ENOMEM); + } + + trampoline = (void *)(uintptr_t)ptr; + trampstack = ptr + amd64_tramp_size + 32; + bcopy(&amd64_tramp, trampoline, amd64_tramp_size); + + ptr = G(1); + err = BS->AllocatePages(type, EfiLoaderData, + EFI_SIZE_TO_PAGES(sizeof(struct gdtr) + sizeof(uint64_t) * 2), &ptr); + if (EFI_ERROR(err)) { + printf("Unable to allocate GDT\n"); + BS->FreePages((uintptr_t)trampoline, 1); + return (ENOMEM); + } + GDT = (gdt_t *)(uintptr_t)ptr; + GDT[1] = GDT_P | GDT_E | GDT_S | GDT_RW | GDT_L; /* CS */ + GDT[0] = 0; + gdtr = (struct gdtr *)&GDT[2]; + gdtr->size = sizeof(uint64_t) * 2 - 1; + gdtr->ptr = (uintptr_t)GDT; + + if (type == AllocateMaxAddress) { + /* Copy staging enabled */ + + ptr = G(1); + err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, + EFI_SIZE_TO_PAGES(512 * 3 * sizeof(uint64_t)), &ptr); + if (EFI_ERROR(err)) { + printf("Unable to allocate trampoline page table\n"); + BS->FreePages((uintptr_t)trampoline, 1); + BS->FreePages((uintptr_t)GDT, 1); + return (ENOMEM); + } + PT4 = (p4_entry_t *)(uintptr_t)ptr; + + PT3 = &PT4[512]; + PT2 = &PT3[512]; + + /* + * This is kinda brutal, but every single 1GB VM + * memory segment points to the same first 1GB of + * physical memory. But it is more than adequate. + */ + for (i = 0; i < 512; i++) { + /* + * Each slot of the L4 pages points to the + * same L3 page. + */ + PT4[i] = (uintptr_t)PT3 | PG_V | PG_RW; + + /* + * Each slot of the L3 pages points to the + * same L2 page. + */ + PT3[i] = (uintptr_t)PT2 | PG_V | PG_RW; + + /* + * The L2 page slots are mapped with 2MB pages for 1GB. + */ + PT2[i] = (i * M(2)) | PG_V | PG_RW | PG_PS; + } + } else { + err = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(512 * 9 * sizeof(uint64_t)), &ptr); + if (EFI_ERROR(err)) { + printf("Unable to allocate trampoline page table\n"); + BS->FreePages((uintptr_t)trampoline, 1); + BS->FreePages((uintptr_t)GDT, 1); + return (ENOMEM); + } + PT4 = (p4_entry_t *)(uintptr_t)ptr; + + PT3_l = &PT4[512]; + PT3_u = &PT3_l[512]; + PT2_l0 = &PT3_u[512]; + PT2_l1 = &PT2_l0[512]; + PT2_l2 = &PT2_l1[512]; + PT2_l3 = &PT2_l2[512]; + PT2_u0 = &PT2_l3[512]; + PT2_u1 = &PT2_u0[512]; + + /* 1:1 mapping of lower 4G */ + PT4[0] = (uintptr_t)PT3_l | PG_V | PG_RW; + PT3_l[0] = (uintptr_t)PT2_l0 | PG_V | PG_RW; + PT3_l[1] = (uintptr_t)PT2_l1 | PG_V | PG_RW; + PT3_l[2] = (uintptr_t)PT2_l2 | PG_V | PG_RW; + PT3_l[3] = (uintptr_t)PT2_l3 | PG_V | PG_RW; + for (i = 0; i < 2048; i++) { + PT2_l0[i] = ((p2_entry_t)i * M(2)) | PG_V | PG_RW | PG_PS; + } + + /* mapping of kernel 2G below top */ + PT4[511] = (uintptr_t)PT3_u | PG_V | PG_RW; + PT3_u[511] = (uintptr_t)PT2_u1 | PG_V | PG_RW; + PT3_u[510] = (uintptr_t)PT2_u0 | PG_V | PG_RW; + /* compat mapping of phys @0 */ + PT2_u0[0] = PG_PS | PG_V | PG_RW; + /* this maps past staging area */ + for (i = 1; i < 1024; i++) { + PT2_u0[i] = (staging + (i - 1) * M(2)) + | PG_V | PG_RW | PG_PS; + } + } + + printf( + "staging %#llx (%scopying) tramp %p PT4 %p GDT %p\n" + "Start @ %#llx ...\n", staging, + type == AllocateMaxAddress ? "" : "not ", trampoline, PT4, GDT, + ehdr->e_entry + ); + + efi_time_fini(); + err = bi_load(fp->f_args, &modulep, &kernend, true); + if (err != 0) { + efi_time_init(); + return (err); + } + + dev_cleanup(); + + trampoline(trampstack, type == AllocateMaxAddress ? efi_copy_finish : + efi_copy_finish_nop, kernend, modulep, PT4, gdtr, ehdr->e_entry); + + panic("exec returned"); +} + +static int +elf64_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} diff --git a/stand/efi/loader/arch/i386/i386.ldscript b/stand/efi/loader/arch/i386/i386.ldscript new file mode 100644 index 000000000000..dcbbf1b6d609 --- /dev/null +++ b/stand/efi/loader/arch/i386/i386.ldscript @@ -0,0 +1,55 @@ +OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd") +OUTPUT_ARCH(i386) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0; + ImageBase = .; + . = SIZEOF_HEADERS; + . = ALIGN(4096); + .text : { + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.plt) + } =0xCCCCCCCC + . = ALIGN(4096); + .data : { + *(.rodata .rodata.* .gnu.linkonce.r.*) + *(.rodata1) + *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) + *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) + *(.opd) + *(.data .data.* .gnu.linkonce.d.*) + *(.data1) + *(.plabel) + *(.dynbss) + *(.bss .bss.* .gnu.linkonce.b.*) + *(COMMON) + } + . = ALIGN(4096); + __gp = .; + .sdata : { + *(.got.plt .got) + *(.sdata .sdata.* .gnu.linkonce.s.*) + *(dynsbss) + *(.sbss .sbss.* .gnu.linkonce.sb.*) + *(.scommon) + } + . = ALIGN(4096); + .dynamic : { *(.dynamic) } + . = ALIGN(4096); + .rel.dyn : { + *(.rel.*) + *(.relset_*) + } + . = ALIGN(4096); + .reloc : { *(.reloc) } + . = ALIGN(4096); + .hash : { *(.hash) } + . = ALIGN(4096); + .dynsym : { *(.dynsym) } + . = ALIGN(4096); + .dynstr : { *(.dynstr) } +} diff --git a/stand/efi/loader/arch/i386/setup.c b/stand/efi/loader/arch/i386/setup.c new file mode 100644 index 000000000000..5d15e499ddb3 --- /dev/null +++ b/stand/efi/loader/arch/i386/setup.c @@ -0,0 +1,51 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Ahmad Khalifa + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include + +#include + +/* + * Check for long mode then call efi_main + */ +EFI_STATUS +setup(EFI_HANDLE IH, EFI_SYSTEM_TABLE *ST) { + u_int edx; + + asm("cpuid" : "=d"(edx) : "a"(0x80000001) : "ebx", "ecx"); + if ((edx & AMDID_LM) == 0) { + ST->ConOut->OutputString(ST->ConOut, (CHAR16 *) + L"This CPU doesn't support long mode.\r\n" + L"Unable to proceed.\r\n"); + ST->BootServices->Exit(IH, EFI_UNSUPPORTED, 0, NULL); + } + + return (efi_main(IH, ST)); +} diff --git a/stand/efi/loader/arch/i386/start.S b/stand/efi/loader/arch/i386/start.S new file mode 100644 index 000000000000..2754c81e509c --- /dev/null +++ b/stand/efi/loader/arch/i386/start.S @@ -0,0 +1,75 @@ +/*- + * Copyright (C) 1999 Hewlett-Packard Co. + * Contributed by David Mosberger . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Hewlett-Packard Co. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * crt0-efi-ia32.S - x86 EFI startup code. + */ + + .text + .align 4 + + .globl _start +_start: + pushl %ebp + movl %esp, %ebp + + pushl 12(%ebp) + pushl 8(%ebp) + + call 0f +0: popl %eax + movl %eax, %ebx + + addl $ImageBase-0b, %eax + addl $_DYNAMIC-0b, %ebx + + pushl %ebx + pushl %eax + call self_reloc + popl %ebx + popl %ebx + + call setup + +.exit: + leave + ret + + /* + * hand-craft a dummy .reloc section so EFI knows it's a relocatable + * executable: + */ + + .data + .section .reloc, "a" + .long 0 + .long 10 + .word 0 diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 0a53422142e2..5afb4c78353e 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -185,7 +185,7 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) struct efi_map_header *efihdr; bool do_vmap; -#if defined(__amd64__) || defined(__aarch64__) +#if defined(__amd64__) || defined(__aarch64__) || defined(__i386__) struct efi_fb efifb; efifb.fb_addr = gfx_state.tg_fb.fb_addr; @@ -339,7 +339,16 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) vm_offset_t size; char *rootdevname; int howto; +#ifdef __i386__ + /* + * The 32-bit UEFI loader is used to + * boot the 64-bit kernel on machines + * that support it. + */ + bool is64 = true; +#else bool is64 = sizeof(long) == 8; +#endif #if defined(LOADER_FDT_SUPPORT) vm_offset_t dtbp; int dtb_size; @@ -438,7 +447,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) module = *modulep; file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof(module), &module); #endif -#ifdef EFI +#if defined(EFI) && !defined(__i386__) file_addmetadata(kfp, MODINFOMD_FW_HANDLE, sizeof(ST), &ST); #endif #ifdef LOADER_GELI_SUPPORT diff --git a/stand/efi/loader/conf.c b/stand/efi/loader/conf.c index 3bc74ea6354c..0a0476873fe1 100644 --- a/stand/efi/loader/conf.c +++ b/stand/efi/loader/conf.c @@ -82,7 +82,7 @@ extern struct console eficom; /* Hack for backward compatibility -- but only for a while */ extern struct console comconsole; #endif -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) extern struct console comconsole; extern struct console nullconsole; extern struct console spinconsole; @@ -94,7 +94,7 @@ struct console *consoles[] = { #if defined(__aarch64__) && __FreeBSD_version < 1500000 &comconsole, #endif -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) &comconsole, &nullconsole, &spinconsole, diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index 3f2d1c6c20b0..b6dd7c51c921 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -182,13 +182,13 @@ out: #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__arm__) || \ - defined(__riscv) + defined(__riscv) || defined(__i386__) #define EFI_STAGING_2M_ALIGN 1 #else #define EFI_STAGING_2M_ALIGN 0 #endif -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) #define EFI_STAGING_SLOP M(8) #else #define EFI_STAGING_SLOP 0 @@ -209,7 +209,7 @@ efi_copy_free(void) stage_offset = 0; } -#ifdef __amd64__ +#if defined(__amd64__) || defined(__i386__) int copy_staging = COPY_STAGING_AUTO; static int @@ -281,7 +281,7 @@ command_staging_slop(int argc, char *argv[]) COMMAND_SET(staging_slop, "staging_slop", "set staging slop", command_staging_slop); -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) /* * The staging area must reside in the first 1GB or 4GB physical * memory: see elf64_exec() in @@ -320,7 +320,8 @@ efi_copy_init(void) */ if (running_on_hyperv()) efi_verify_staging_size(&nr_pages); - +#endif +#if defined(__amd64__) || defined(__i386__) staging = get_staging_max(); #endif status = BS->AllocatePages(EFI_ALLOC_METHOD, EfiLoaderCode, @@ -380,9 +381,10 @@ efi_check_space(vm_offset_t end) end += staging_slop; nr_pages = EFI_SIZE_TO_PAGES(end - staging_end); -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) /* - * amd64 needs all memory to be allocated under the 1G or 4G boundary. + * The amd64 kernel needs all memory to be allocated under the 1G or + * 4G boundary. */ if (end > get_staging_max()) goto before_staging; @@ -427,7 +429,7 @@ expand: #if EFI_STAGING_2M_ALIGN nr_pages += M(2) / EFI_PAGE_SIZE; #endif -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) new_base = get_staging_max(); #endif status = BS->AllocatePages(EFI_ALLOC_METHOD, EfiLoaderCode, diff --git a/stand/efi/loader/loader_efi.h b/stand/efi/loader/loader_efi.h index 249860aa5e91..c9dfefcd4c74 100644 --- a/stand/efi/loader/loader_efi.h +++ b/stand/efi/loader/loader_efi.h @@ -32,7 +32,7 @@ #include #include -#ifdef __amd64__ +#if defined(__amd64__) || defined(__i386__) enum { COPY_STAGING_ENABLE, COPY_STAGING_DISABLE, diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 61bfe7a4d673..2588774b8457 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -966,7 +966,7 @@ main(int argc, CHAR16 *argv[]) archsw.arch_getdev = efi_getdev; archsw.arch_copyin = efi_copyin; archsw.arch_copyout = efi_copyout; -#ifdef __amd64__ +#if defined(__amd64__) || defined(__i386__) archsw.arch_hypervisor = x86_hypervisor; #endif archsw.arch_readin = efi_readin; diff --git a/stand/efi/loader_ia32/Makefile b/stand/efi/loader_ia32/Makefile new file mode 100644 index 000000000000..003c75f43948 --- /dev/null +++ b/stand/efi/loader_ia32/Makefile @@ -0,0 +1,6 @@ +DO32=1 +INSTALL_LOADER_HELP_FILE=no + +NEWVERSWHAT?= "EFI loader" amd64-ia32 + +.include "../loader/Makefile" From nobody Wed Mar 26 01:29:03 2025 X-Original-To: dev-commits-src-all@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 4ZMq280kvDz5s5vf; Wed, 26 Mar 2025 01:29:04 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq274Pllz3rdT; Wed, 26 Mar 2025 01:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZ8qSp2SNSa/ECD7eWd2g4yyXTLg+wysLK07F64nfVE=; b=krabOxYI0/l40eKF1SFejq0a5AM3mU2UCbQ19WgGYY+kqOYmeB7RkiEYUmLIsPn1z1V4Wv +9oJQef23N9e9ZIDVC/i9AfHPAw30XvLXitI7y1M/UAr62elbygoYLRExotype3XqiwJbW 2aEpP1UxKCSRYwtFHeyMyu9iUEPwVKf0+7IwIbIKKOLRWGreJHzkDQ3fG+qioVvrsuuE9j HXI/foh0c4uLjwbyN6Ym5ThP9Kfo69YoG+a+ob9zuZbrC2WAKHQ0W1Bh0PVTmPt4KtWHN4 4vt/OTyIM31aeoGNhif466PApywi+vyuMSWiDvv8M2k0NzLGlYRjpaXUIvIiig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952543; a=rsa-sha256; cv=none; b=uTKcL7Bkxlhesd8PSc/7KvjnNc7J4znXzRUL9CUfq542FnEz2kkaeg0W+UvwLo88pVVT0s jQI3v9Fb2nMOhNrMv7lKovrYSEJQ57pLG+hxbt5IaRxm72ob0uBohJsXrwaKhR9IVToX33 3Hso6LNjVNXUn2rlvgAGERkdfufb39b4oKDshI1XnqSmgGTPcF8hwtAlpw4Hll5KSbA7/+ lOX1VPnTY7hmer9U+O/HuCm5nnjWs84FPMfqB6K6+oZHeOkGuweT2lzDp/Pan6BqN+H1TG RryB1Q/ZmeuPm5tJgfOABFhiV1mRByJp6AakI+gPOxNjHLy2qGAHV61pPkK/ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZ8qSp2SNSa/ECD7eWd2g4yyXTLg+wysLK07F64nfVE=; b=tz04HboiRK1Sj6ZJmL/QFmw2NkjbwUisbIiAfya6pCbPIQinTl0CMOuiHcROKNXHFTtpAG qJ6WoGYC527is3Q6CbkHvUDAF7XGANYrRW2C+NtEv3/1/EqJT5ac+kMPdTtv7BPWoZ5DaW MGUsMeiRM8QulH0M6xvVykF6cH767hoqkwkXu4HyItnn5gcDW0UiGKVM7UwZWu8KvKiLvD L6SEshHnrR7ji02MBx9APtgLABx0mpA9Lf0zkU/aIM8/EpCJ245MN+yR5b1RSjTBodkB5f 1oy3auW8ZfejvTYw2p2MtB5M3DKPK4ciVz94twa+yPDF0SXTlTpuC8RtMw0bLw== 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 4ZMq273wxMz14p1; Wed, 26 Mar 2025 01:29: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 52Q1T35d047385; Wed, 26 Mar 2025 01:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T3Y0047382; Wed, 26 Mar 2025 01:29:03 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:03 GMT Message-Id: <202503260129.52Q1T3Y0047382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 43dc900d75a6 - stable/14 - loader: Fix G overflowing for G(4) on 32-bit builds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 43dc900d75a6262408f566dbaca27400ee5a9990 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43dc900d75a6262408f566dbaca27400ee5a9990 commit 43dc900d75a6262408f566dbaca27400ee5a9990 Author: Ahmad Khalifa AuthorDate: 2024-05-29 14:30:59 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 loader: Fix G overflowing for G(4) on 32-bit builds Prevent G(4) and over from overflowing for 32-bit builds. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit 5360d017be83d2502ba262f391ef45b07e0de680) --- stand/efi/loader/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index b6dd7c51c921..d34acea4e876 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -36,7 +36,7 @@ #include "loader_efi.h" #define M(x) ((x) * 1024 * 1024) -#define G(x) (1UL * (x) * 1024 * 1024 * 1024) +#define G(x) (1ULL * (x) * 1024 * 1024 * 1024) #if defined(__amd64__) #include From nobody Wed Mar 26 01:29:02 2025 X-Original-To: dev-commits-src-all@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 4ZMq272t9Gz5s5xM; Wed, 26 Mar 2025 01:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq263vqGz3rdP; Wed, 26 Mar 2025 01:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IA2Q3gK23rK61C6S5zGe+1R5r5KlpJWdE18HY1IgZwM=; b=Jyn3X+NIz63rdNFej9WqPkmOQYwQZPqCiubpvkbIEWwJQM6hCcRa8R1O/Un8KPw3Y3Vkoq +ye2ZotZxFOSZ23Hw9Y+K8oXe/gc06kiKh6g+dJhA26nzgqb+iH5MsVWGhnq7a++o28pN0 yI9aKwP+TT8LfKQmY9YAjem+MylmT2xhllX+0AuUJy8Utn6/lfLABiUvLtKjAaICV4PbtF ak/XZDq7lNn0fupOPMzzTOlQkcJNyUoDRCwcooUlINWjJ8Eha7JbclCV6eBKB5AGFb7Bxl QURIdh5bQXpP4ncGBqJmfyTDhfOx7ttK26ShsTUSgeQ26y8rr3beh65hwzNcEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952542; a=rsa-sha256; cv=none; b=cLKw1AV65BqeckPMcTb0mTpv1xs5wPFBiaabvuxolXoiRLpbHB6VwurNejXFuD0Ymxz/Z3 YfR6l2i5PnuhumlaaCJa3GiOxpN9RtJ4gdc58g+K9PoL3smOl73LDDjn4e2A+Abw/Uj3Se OiCRPkuOGOzFOu3z2/9/GLd8C4xxp2RkQ3o6VqRT/Rh6tgk+Lrszn1kPg2aTmIDphGHnIS ojEB+fE46I+uETTBxsytQibX9xC0/9Qfvdm7xfN0eem9ZYtlekrgjRO8go6VAlFz+7DqZJ F9WhA1aPy3kIytKNACM5jncw7aWfm1f9+znRwp1P/AKmRwc1Y96KXD2Xns/JPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IA2Q3gK23rK61C6S5zGe+1R5r5KlpJWdE18HY1IgZwM=; b=MuJInvZXfyQpS6VFk1Hv9WLpc5rN/ITIqgIB3FevspfLFZvvLiTCmra15KJyzQqKn/Gt2R Pe1vvJ3HgTqut8ycp7lko0HCtO3gfX+MniXyBMzOzOTyqSrCluv7Pw4vv7vTMeamYUZ2+b fSZNSnPOUzx/KgIedyuMKCoqDXTdMmcQti2YqGAIL1VE1oCSbRKQkfM1QLQOMePnGk/Bzm jsGq5o4uIJScU/903cuF6GYWqLYQws/MMwsdsTLCNU3J//jaPl0UZSzRVA+WRUMX8QzZqm qqocu4TpcPgz/6C/RTH00OHp0lmvTLIuRwGguwGnRwnDVLhzH5QRldyAvekHzg== 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 4ZMq2638Q3z14Kv; Wed, 26 Mar 2025 01:29: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 52Q1T2lo047351; Wed, 26 Mar 2025 01:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T2jr047348; Wed, 26 Mar 2025 01:29:02 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:02 GMT Message-Id: <202503260129.52Q1T2jr047348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: ac5378d93ce0 - stable/14 - Add build option for the ia32 loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac5378d93ce0bcb639a53b91b546b4d7d24af52b Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ac5378d93ce0bcb639a53b91b546b4d7d24af52b commit ac5378d93ce0bcb639a53b91b546b4d7d24af52b Author: Ahmad Khalifa AuthorDate: 2024-05-14 19:27:06 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 Add build option for the ia32 loader In preparation for supporting 64-bit machines with 32-bit UEFI firmware, add a build option for compiling the ia32 loader. Currently unused. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit fe3f792f9a2982678138e239f5e8d66e8ee71aeb) --- share/mk/src.opts.mk | 5 +++++ tools/build/options/WITHOUT_LOADER_IA32 | 1 + tools/build/options/WITH_LOADER_IA32 | 1 + 3 files changed, 7 insertions(+) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 22373f8c7af1..b3f635bc5a70 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -136,6 +136,7 @@ __DEFAULT_YES_OPTIONS = \ LOADER_OFW \ LOADER_PXEBOOT \ LOADER_UBOOT \ + LOADER_IA32 \ LOCALES \ LOCATE \ LPR \ @@ -323,6 +324,10 @@ BROKEN_OPTIONS+=LOADER_KBOOT .if (${__T:Marm*} == "" && ${__T:Mpowerpc*} == "") || ${__T} == "powerpc64le" BROKEN_OPTIONS+=LOADER_UBOOT .endif +# The 32-bit UEFI loader is only for amd64 +.if ${__T} != "amd64" +BROKEN_OPTIONS+=LOADER_IA32 +.endif # GELI and Lua in loader currently cause boot failures on powerpc. # Further debugging is required -- probably they are just broken on big # endian systems generically (they jump to null pointers or try to read diff --git a/tools/build/options/WITHOUT_LOADER_IA32 b/tools/build/options/WITHOUT_LOADER_IA32 new file mode 100644 index 000000000000..2df947216b8f --- /dev/null +++ b/tools/build/options/WITHOUT_LOADER_IA32 @@ -0,0 +1 @@ +Do not build the 32-bit UEFI loader. diff --git a/tools/build/options/WITH_LOADER_IA32 b/tools/build/options/WITH_LOADER_IA32 new file mode 100644 index 000000000000..2030619dbb85 --- /dev/null +++ b/tools/build/options/WITH_LOADER_IA32 @@ -0,0 +1 @@ +Build the 32-bit UEFI loader. From nobody Wed Mar 26 01:29:01 2025 X-Original-To: dev-commits-src-all@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 4ZMq263yrNz5s5pq; Wed, 26 Mar 2025 01:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq252k0Pz3rgt; Wed, 26 Mar 2025 01:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ab8RjRMqStThHdP/pASza4VFY9vM9mvggzGcs0QpKDM=; b=uSvOfdszULwadpladY6FWDAGSDfKn0g5sSPK39Sf7zEYMix7thwRwxd4dI+rv1okdbPtZx wvo6tlxQw122eW10rI9OxlaEp+kEYPcC7FpzTOF7RD1aCs5GZr7CRMFI2CM6btvF2zUDZp vIr7M5PTWV0YKjXercRGJHiMRGeax6JY5p1+IS8x+ka9tX+AE6raj3DWWrboiZ5VijaK2I yIuHPzYHQootng6BuIJYlHpa6xuSfStLZ/YZYGwn0mNlWZ0QHfKREN7bDgTiqHKgxeIPEY 6/jzloRFq6/5M7CWUI8d6+fC7IjYxYtpUcbpKY6p/ruGJ/s1itKjFIMDPPge3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952541; a=rsa-sha256; cv=none; b=V5Q3Ct8/4vhoRDgOtu4l3IvFNfaOgXLjImiWLV8h5N+KzcqMV/RDAD5aiQSEZAbYl4mmkl VhLaxzlc67oL548r4IrdNq7ydOAOhWkPpoj0eS/3rz4+agH7qVLHOeDYiSbgHEAEM1nqg1 TXNxsJQfDYppOz0v2IJxihmHvT7M6hCV0Hwj3FV9sxScXFG+ut61+URRTs4WWBnNq3nzcr 1ZwCpzoTHpbunb6Gvp+b45dA0ZkP4rYaeAyg6KDl5dlrEeWMNLAXhZyBzltpDJAwSGtCzv E/gaYUk4V1eJWyOyF/S8YZ82F89HcdVI9O7JlOA1aw4QJwZYqezpsF6UmTbsCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ab8RjRMqStThHdP/pASza4VFY9vM9mvggzGcs0QpKDM=; b=I1fJWCOyofRbiXoyLWnxlSLw1RnSP+EyFhI+ltu0Wr2NjuUU4Ha4RQIP8+kZBFlfb0dVbB kdfyUhkcA1c4wUHhgvGcknIYoDVfb3AJnoeiq4GgKWHtch1jPEpkM965sPjt5ydHjxVfYE OPf+8VAO+du74TGAU42nenrk4XFI8amjmR3skM3sRzjQ7vfSOYfgyxT/JoLpEExudljYyH PTpuC6H+vVRfadLrEG4r4Acw1xI0CxENTxRjLn7lbXyOCIbMAZLRBb3kGgZXQ0IddseT+r SYqA7p9cEdBMw4RuA5i2eMzb/+9/f5RP9OL0zYcBN8nX9tZht40sT6CwWooZOw== 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 4ZMq251ysbz14Kt; Wed, 26 Mar 2025 01:29: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 52Q1T1Ik047317; Wed, 26 Mar 2025 01:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T18U047314; Wed, 26 Mar 2025 01:29:01 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:01 GMT Message-Id: <202503260129.52Q1T18U047314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7d7dc14d6b38 - stable/14 - stand/efi: Add a 32-bit variant of libefi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7d7dc14d6b389ba0df4f522501c39578cbef8cae Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7d7dc14d6b389ba0df4f522501c39578cbef8cae commit 7d7dc14d6b389ba0df4f522501c39578cbef8cae Author: Ahmad Khalifa AuthorDate: 2024-05-14 19:37:13 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 stand/efi: Add a 32-bit variant of libefi In preparation for supporting 64-bit machines with 32-bit UEFI firmware, add a 32-bit variant of libefi since we need to compile both the 64-bit version and the 32-bit version at the same time. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit f0d5b1bdf075c68ddb1dcfbc5a0eda0214510b5b) --- stand/Makefile | 1 + stand/defs.mk | 10 +++++++--- stand/efi/Makefile | 1 + stand/efi/libefi32/Makefile | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/stand/Makefile b/stand/Makefile index 6d0d7a09672a..a9f2f5a0c50b 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -67,6 +67,7 @@ SUBDIR_DEPEND_${MACHINE}+= libofw SUBDIR+=${_x} .if defined(LIB32LIST) && ${LIB32LIST:M${_x}} SUBDIR+=${_x}32 +INTERP_DEPENDS+=${_x}32 .endif .if ${_x} != "libsa" SUBDIR_DEPEND_${_x}+= libsa diff --git a/stand/defs.mk b/stand/defs.mk index 3624b9311161..a1cb39f8b4a0 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -38,7 +38,14 @@ WARNS?= 1 BOOTSRC= ${SRCTOP}/stand EFISRC= ${BOOTSRC}/efi EFIINC= ${EFISRC}/include +# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is +# built 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here +# and activate it when DO32 is explicitly defined to be 1. +.if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 +EFIINCMD= ${EFIINC}/i386 +.else EFIINCMD= ${EFIINC}/${MACHINE} +.endif FDTSRC= ${BOOTSRC}/fdt FICLSRC= ${BOOTSRC}/ficl LDRSRC= ${BOOTSRC}/common @@ -128,9 +135,6 @@ CFLAGS+= -m32 -mcpu=powerpc -mbig-endian CFLAGS+= -m32 -mcpu=powerpc -mlittle-endian .endif -# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is -# build 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here -# and activate it when DO32 is explicitly defined to be 1. .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 CFLAGS+= -m32 # LD_FLAGS is passed directly to ${LD}, not via ${CC}: diff --git a/stand/efi/Makefile b/stand/efi/Makefile index 2ecd8ba07aa0..e92d59e9f8b7 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -4,6 +4,7 @@ NO_OBJ=t .include SUBDIR.yes+= libefi +SUBDIR.${MK_LOADER_IA32}+= libefi32 SUBDIR.${MK_FDT}+= fdt SUBDIR.yes+= .WAIT diff --git a/stand/efi/libefi32/Makefile b/stand/efi/libefi32/Makefile new file mode 100644 index 000000000000..779c7e604686 --- /dev/null +++ b/stand/efi/libefi32/Makefile @@ -0,0 +1,4 @@ +DO32=1 + +.PATH: ${.CURDIR}/../libefi +.include "${.CURDIR}/../libefi/Makefile" From nobody Wed Mar 26 01:29:04 2025 X-Original-To: dev-commits-src-all@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 4ZMq291Gvzz5s5hW; Wed, 26 Mar 2025 01:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq285mwrz3rkj; Wed, 26 Mar 2025 01:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wougU42a8vvBT0CsRkkQQ9Ngl3GJPN7S60MLS31WOdo=; b=P4nA2qVxcTyqfcF1WJXfEojFEsTc9ojiAOS+l7ob5oA0EWqk/BBpqaOJmrE5GBAS1ou6+h sULUlnCvefAin157rYp9P9IbPN6lmWlKQUbYVu8b2MozLDvtqKt2J48/6tOrNC+jwQhYbB nddKG2zAAVa96kiNtFYHzTBCe2/ZPSQ3R81+AipzAOGlNIwHZJsYnSDRu0zbuqe7EE3VSR 3g2GF14QmAILCWyD7zN5dVQT4FZQopQyCtlO/4wp17tEfMZwe6TMsw2wkVy/StzmXG+x4z PrZVzPgKMLdZ5/PWNNfSifp3euMdSE8Lnp1q9ZQWd/LDfdndUyd6K1b1OgGzlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952544; a=rsa-sha256; cv=none; b=QvidLn80xlqCvvCyhiJyaCIPZXnn1nkVJTRqeOC2i+zvFyM45fqQUZVrKtPZcy62oqny/j 1/J60FtO4hE0tI3hLMrPV0hNuojTLlpECpySUgo0pqFJ9KDmoKrr09HNlb2Uqyl4ULFlOc g5Jvk8V0rt2NSdMXxgJaxZLjPtX+66y8VOW2okwGzG02C6A/+kMw9DnYU/Sb3sJ3PmbY+Y 0LkJqNWCaJs014a+NOt+T7wivJq1VqnADzVFSOVUlTCYBOKwNBpNHC754YZC1v9MpHxbep QkmOyn8igrPCD7X+5VceMvg42QKTpDonyFE/jQrWTI88/bXFfQYIv2CZfM/RVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wougU42a8vvBT0CsRkkQQ9Ngl3GJPN7S60MLS31WOdo=; b=YwukY68hHlnWxgVBqydJ4i7QBuYnY9rmbZkCTc/b8mgGWVW6Pb250cDLjfS8WMFT9pTGcJ S+QUd8euLPQXP4CeRL4vRdPtjn2HhVlA/8XWNTSbyG+WnVLLAIBXH8H8QVWN7CXKkt4s9H C1rfAfYC0Hh7JYihvhCwcVXPx+yUxKBbAggRAz7zd3sBS0Yf/exAC/kaDPaLeXI13ZiX6r bL0UI4KBvTh/xKyR0GCPqZfycrcVPaM4h7Gti+hz3e15c0BCU3VfSfxhghXsVDoC4dgIZi 7L1Tzve02175dMxIz84hDTHsTdYwkktbXqrdGTMT1pt6eJl71XCxznUNNvrD2Q== 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 4ZMq284ykpz14p2; Wed, 26 Mar 2025 01:29:04 +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 52Q1T460047424; Wed, 26 Mar 2025 01:29:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T4sa047421; Wed, 26 Mar 2025 01:29:04 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:04 GMT Message-Id: <202503260129.52Q1T4sa047421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 0ca77a636399 - stable/14 - loader: Allow overriding NEWVERSWHAT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0ca77a63639982bec9bfc33d543b820b9f6bf980 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0ca77a63639982bec9bfc33d543b820b9f6bf980 commit 0ca77a63639982bec9bfc33d543b820b9f6bf980 Author: Ahmad Khalifa AuthorDate: 2024-05-29 14:28:13 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:39 +0000 loader: Allow overriding NEWVERSWHAT This can be useful when making alternate versions of the loader. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit dcc7b3698d03b2aedc68e88b4e05a0b32b435429) --- stand/efi/loader/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 0823f8b38856..a2c0d9908b4c 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -87,7 +87,7 @@ CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} CFLAGS+= -DEFI_SECUREBOOT .endif -NEWVERSWHAT= "EFI loader" ${MACHINE} +NEWVERSWHAT?= "EFI loader" ${MACHINE} VERSION_FILE= ${.CURDIR}/../loader/version HELP_FILENAME= loader.help.efi From nobody Wed Mar 26 01:29:07 2025 X-Original-To: dev-commits-src-all@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 4ZMq2F3dcTz5s5sf; Wed, 26 Mar 2025 01:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq2D15nxz3rmV; Wed, 26 Mar 2025 01:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Od5K3B43WD2+2kKR7KH05bCyDfRRE482YluhTXQ5avk=; b=jO3w80eoHCGJFwxhFarOk/hzqQ1jvPwt7OLTWluD23YWHiCNaXjA+1op/iMt2DctpG4cSz fcbyh4CnARYDxnZdSDBYZjge4a29y1VkOfxh2NQapGJcI3XSa4wbGYjCKdfp8I894Atvp5 R1Z3QGuke+VKj2JzDCMtIhXZiXo8TtdTCc617lXMfy5iEt2OiRkKR0qlcjz8il77RO7LlP C2y6zWG3iSYLXN70do34Cjw1z6ngckEsLCReROaQBI3a0olH/RDj9j2F1rcWLAnLD0tPC0 ZMI7nYxEZ2VWajp5mE/xUTOWF7TELlSvyIZ9JLc4fugju8yWmza6AK+SZpB6wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952548; a=rsa-sha256; cv=none; b=gOZiH1cijkKsfSGHYMJTATnB8IiKcoLSLWqUtyxc/R+XAQuKpRMwOu0cBjubgcGQwSAAsW F/pOA4/4XLIdtXGZ50rcyeklpfx15VmBUfQeY9h2wXhArkIN5cs7F4yvu7efuOaHM40bEG FltX2N9geU8HgCiTvlFzrs3kr7OZ3WgQNQtjU72tFMXNziD8a8E4xyyB8i0cYQ8Ucg1BGs BTMGUz27ISjxeYIfT18oySbHfZ2QWX+M7MLDFQueuk8NV4A5qH5l+isjQfrrKX9ROBkTwq ozBHJ7U4uODCjqpnhTt0wUIsZUkaeaClZdwvp1AQOEPV8J+ofypmxxqrEYyxaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Od5K3B43WD2+2kKR7KH05bCyDfRRE482YluhTXQ5avk=; b=QrmXvnZHbuzYV2RA4ZZNFEMJu2tSd/6x6k2E1RAp8TYD1RrU7e0DscRaSRNWI/V2Regwvc tQix00UY5P4Db83YIZ9jXUNieP2ahFBnOJUBOpAEzMKRhLbsQPv/JLKts98OqF5FMY8uE3 KHCu9jNdbUyqV0zhKSJNNHd42L+hCEL6QicUAMBnK4KeKy6pfzldVv7frfPOxeEdghfbKm 2FxE5mCA+Wfyl9hDjRSLHVeuQiEN7BJTSo2PG3rEvc4TQz/b+cfvyS/plZcKyQXnWpMTNx TFh11aD5sQx64BV1johnIYGfYyaPHv6YuHmzlE82XvFNdJrrD0XCVOO7wGMrtQ== 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 4ZMq2D0jLMz14Kx; Wed, 26 Mar 2025 01:29: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 52Q1T7lM047528; Wed, 26 Mar 2025 01:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T7et047525; Wed, 26 Mar 2025 01:29:07 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:07 GMT Message-Id: <202503260129.52Q1T7et047525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 38dc6b814a6d - stable/14 - acpi_iicbus: install the address space handler by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 38dc6b814a6daed2bd54dfd652e9fe2f0fdb981a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=38dc6b814a6daed2bd54dfd652e9fe2f0fdb981a commit 38dc6b814a6daed2bd54dfd652e9fe2f0fdb981a Author: Ahmad Khalifa AuthorDate: 2025-01-26 18:48:17 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:39 +0000 acpi_iicbus: install the address space handler by default Signed-off-by: Ahmad Khalifa Reviewed by: wulf Pull Request: https://github.com/freebsd/freebsd-src/pull/1583 (cherry picked from commit d3b1dcb408e2f63845aee5508fe4c73db1f94b58) --- sys/dev/iicbus/acpi_iicbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/acpi_iicbus.c b/sys/dev/iicbus/acpi_iicbus.c index 53171a72d995..03b6946a18f0 100644 --- a/sys/dev/iicbus/acpi_iicbus.c +++ b/sys/dev/iicbus/acpi_iicbus.c @@ -76,7 +76,7 @@ struct acpi_iicbus_ivars { ACPI_HANDLE handle; }; -static int install_space_handler = 0; +static int install_space_handler = 1; TUNABLE_INT("hw.iicbus.enable_acpi_space_handler", &install_space_handler); static inline bool From nobody Wed Mar 26 01:29:05 2025 X-Original-To: dev-commits-src-all@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 4ZMq2C0GJbz5s5xQ; Wed, 26 Mar 2025 01:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq296KQCz3rm1; Wed, 26 Mar 2025 01:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8j//8aDzB1m14m+mznDTrYtD5JkNfXAi1x1eKupnt3Q=; b=JJcs2HwD5AXLsAb0ZJfr+hazuBon/1Qxciqp25ZXXbcjqFYGKBD0PwFVaNQvQOU82R8Bva blwldQSUjZfxwTExfYctnSL+g9nRZMZbA3T4Qv/lOyYK8w/fpLIVn+VTLOtL0ks1vxedlG hpKQsvTFhVUDbY7/I0L8nIm13dbLx7mhWf+XV46DsI5XXUoxYavDqIjtsma1cdCvO6OJNI Rq7zGwudfAz8290F3nAiz2D/V+LRTM2AsvMaDNq94zq3SZv52WUI4QLBi3T98F3Rqen+JJ NjK/A+iQLC3C/XKhR44nj10bFmUxpkkPdG0BcmVLDm2WWpEe4QT9s6pN/89/8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952546; a=rsa-sha256; cv=none; b=L9LVxbfVjFEgWnwnWGXKQD3VngpRjfvZId9uIbXTTgR5a7c+qoPVVeBLCflNhn/uM/eGA5 s3jaWgEhZ/CaJYBLkn/L/lUXXlea3EwKGz2afEiyd/KLJZDCWvGKXuvATvgGzeBVMIgRFG GChv4Jvx42Quyc4xo3/Bsgo1Zqs9kLkKe6/ZnJsokG+1c/TGz3AA0FUhj/bHYFttR0h22J vheeBvSwiU0KHywyFIkkcDi24Che6cD/vdP0uXcXpYpMW9PFQ40tcYV9wl5Rd1cY26vbP9 t/fi0SrdiVVrHoNEhAoOVsunxbjfC85ieWWDS0fdKcWlI2G/x6AgbnETgzhRow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8j//8aDzB1m14m+mznDTrYtD5JkNfXAi1x1eKupnt3Q=; b=TTYDHxwPHEJBj8WlhI6oBLNV5TXRZ++ejW4j1wZ36TXisPyZj872x1xFpcruYkRYrTe9Nv KfHDbha+08IzOGFj+RJKe76yp72qDw8IyCqDaBn3k4LiNgihs7jfq/J+k4aCzGqd0s8Rje 67fFopTWWZKRx7roHK0ZULkIPXxSpbU0tnavcJwQtvaLYb7DCPi6YTpm5IGrQaGmq6H63A huGvfcrGJHRonMRJmfOKXsJgTbbHdPJeqL7YZjXkofU7y2sUbX9uQBB2C0udbl24aSlo85 OvD4OGdLiowGX7rBLmgXP5IRY/3CSBKUpkoOg9xIpW2BZzzeyOxtOu226UdNVw== 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 4ZMq295t5rz14Kw; Wed, 26 Mar 2025 01:29: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 52Q1T5xl047462; Wed, 26 Mar 2025 01:29:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T5rB047459; Wed, 26 Mar 2025 01:29:05 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:05 GMT Message-Id: <202503260129.52Q1T5rB047459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 2ce4f021827a - stable/14 - libc/stdio: Increase BUF in vfprintf.c and vfwprintf.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ce4f021827a718005e44db693ee5aee7ed175b9 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ce4f021827a718005e44db693ee5aee7ed175b9 commit 2ce4f021827a718005e44db693ee5aee7ed175b9 Author: Ahmad Khalifa AuthorDate: 2024-08-31 03:42:04 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:39 +0000 libc/stdio: Increase BUF in vfprintf.c and vfwprintf.c With the %b format specifier we need enough space to write a uintmax_t in binary. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1400 (cherry picked from commit d4f9e326393e3298062a58338e2c94ef6baff8b5) --- lib/libc/stdio/vfprintf.c | 8 ++------ lib/libc/stdio/vfwprintf.c | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 72178c31aa94..6a1ce394a6cd 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -294,13 +294,9 @@ vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap) /* * The size of the buffer we use as scratch space for integer * conversions, among other things. We need enough space to - * write a uintmax_t in octal (plus one byte). + * write a uintmax_t in binary. */ -#if UINTMAX_MAX <= UINT64_MAX -#define BUF 32 -#else -#error "BUF must be large enough to format a uintmax_t" -#endif +#define BUF (sizeof(uintmax_t) * CHAR_BIT) /* * Non-MT-safe version diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index b606eec0d9a4..67b366439618 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -374,13 +374,9 @@ vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap) /* * The size of the buffer we use as scratch space for integer * conversions, among other things. We need enough space to - * write a uintmax_t in octal (plus one byte). + * write a uintmax_t in binary. */ -#if UINTMAX_MAX <= UINT64_MAX -#define BUF 32 -#else -#error "BUF must be large enough to format a uintmax_t" -#endif +#define BUF (sizeof(uintmax_t) * CHAR_BIT) /* * Non-MT-safe version From nobody Wed Mar 26 01:29:06 2025 X-Original-To: dev-commits-src-all@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 4ZMq2C5rBDz5s5kD; Wed, 26 Mar 2025 01:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMq2C079Tz3rlF; Wed, 26 Mar 2025 01:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xuQjsuSSsdKa2i0vcUh+B2KHLYPqZAuf/9rJg7Xemmo=; b=CYSwzxpfRYgUoXSYnhdxxtBYM2z+FmnGjum7zEvMgYPb0tpoUQDz/ps0yDYEA4Nu8KOzXN 9W87xUHV/q8i1axWXGp/68zBCZHmYxZ/CQDK+lA6rZhbfT0uzZNH31lN0xIWFNmDAQ9iua VgeIaIc1dfqydTc/ug7WgN5aY+ocpfOuy+3E+cMhCFKbsl2eyvgycbuLgYWfGg2esTIx0y TUn59ss/npcXCbBEBTWm3i/l58X12tcu9atQXmLHl9iEirFDgz7Nu5+UzM3I/FiobsME7s KgznEPXRe9EPZN4dcwxket3N3dHTVGSfOWlgN16Anztv1JQ+Qbzv3j26RWSbjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952547; a=rsa-sha256; cv=none; b=G8TNPpTofSrGYx9dXZ3VbUJECC/GivJIfPUcxNFc0YkfjZjzNU5dFk+CCQwp1msulovgNN 86rYFMSLmUZ7hXQAix8wB3BqkZ36AgzKo6TS9QY7ftKh7VUvHwBnXeUSanDmW4z7VmcEYr ILmlJscajwlBxQx2X2u6+7Pkiw44pVeCBDu3kvZpgukhsJUljS40zg5SRtaOViE8d15fGu 8n/xW+a+KpzmzpLYG1SzgQzhbsYNbxASm82rfeT1hpVRgUoVgundLVVE0iHFBBh1hTnfvK 91jaVeIxEIw0qJeLuZxa24Xc49i1eS0uNXN+sRBsfWxkgUqmdZm8fVBo+gZxFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xuQjsuSSsdKa2i0vcUh+B2KHLYPqZAuf/9rJg7Xemmo=; b=vDuCceEgwOFV43FjnG8r1JY8lLGw64yLEy5uuhvLxvfRK0rvremv3F1seJM9iJ6FRjhsSH BslG0W4kuSyamZk8/phTL9UTFUB1tfDbG7C5yGDitKvbSsanJiSX25MoNJVLy/u4ZxFwQy Ch47CckerLepZCnREz/bxAWQh79LEZdpgX+GSQrEWB8qfTzbH0KtcCOK/ee4wRU8h7BcTv DmbGwpUDpvlOI/Idf4QsBqwZoA3BQ3SzQQhaCrCFyi0impWRFk2MrsMfn0ByPFqoMjcmsG JhSGZPkJJfAa+MmYpb5VcGP+cvcODmaCuxVeuztgPdMBZQgsvcyMu7XYZBbuug== 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 4ZMq2B6ZbXz14Yr; Wed, 26 Mar 2025 01:29: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 52Q1T6mG047495; Wed, 26 Mar 2025 01:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T6HK047492; Wed, 26 Mar 2025 01:29:06 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:06 GMT Message-Id: <202503260129.52Q1T6HK047492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: c0e07c93e858 - stable/14 - install: print directory name instead of file name if mkstemp fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c0e07c93e858136c6b10d26810e9405e79ad2fb5 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e07c93e858136c6b10d26810e9405e79ad2fb5 commit c0e07c93e858136c6b10d26810e9405e79ad2fb5 Author: Ahmad Khalifa AuthorDate: 2024-08-14 14:26:04 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:39 +0000 install: print directory name instead of file name if mkstemp fails Printing the file name doesn't make sense since mkstemp failing means that the file wasn't created. Also add a test case for this. Co-authored-by: Jose Luis Duran Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1383 (cherry picked from commit e8d027be6b84ac976eacd46283c286b934dd6f1f) --- usr.bin/xinstall/tests/install_test.sh | 10 ++++++++++ usr.bin/xinstall/xinstall.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.bin/xinstall/tests/install_test.sh b/usr.bin/xinstall/tests/install_test.sh index b35706521ec3..0f1f93ab4c63 100755 --- a/usr.bin/xinstall/tests/install_test.sh +++ b/usr.bin/xinstall/tests/install_test.sh @@ -32,6 +32,15 @@ copy_to_empty_body() { install testf "" } +atf_test_case copy_to_nonexistent_dir +copy_to_nonexistent_dir_body() { + local dir="/nonexistent" + + printf 'test\n123\r456\r\n789\0z' >testf + atf_check -s not-exit:0 -e match:$dir": No such file or directory" \ + install testf $dir/testf +} + copy_to_nonexistent_with_opts() { printf 'test\n123\r456\r\n789\0z' >testf atf_check install "$@" testf copyf @@ -506,6 +515,7 @@ set_optional_exec_body() atf_init_test_cases() { atf_add_test_case copy_to_empty atf_add_test_case copy_to_nonexistent + atf_add_test_case copy_to_nonexistent_dir atf_add_test_case copy_to_nonexistent_safe atf_add_test_case copy_to_nonexistent_comparing atf_add_test_case copy_to_nonexistent_safe_comparing diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 4d771186781b..4942d57b1f9c 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -881,7 +881,7 @@ install(const char *from_name, const char *to_name, u_long fset, u_int flags) to_fd = create_tempfile(to_name, tempfile, sizeof(tempfile)); if (to_fd < 0) - err(EX_OSERR, "%s", tempfile); + err(EX_OSERR, "%s", dirname(tempfile)); if (!devnull) { if (dostrip) { stripped = strip(tempfile, to_fd, from_name, From nobody Wed Mar 26 01:39:30 2025 X-Original-To: dev-commits-src-all@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 4ZMqGC3fRlz5s6VM; Wed, 26 Mar 2025 01:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMqGC21rWz45G8; Wed, 26 Mar 2025 01:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742953171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yz1SQl6JoflzJH9LJlHrwM5bp8mrJpl2TjEFysORff0=; b=K986dUTXeczDYAuS82Kwg4pkAQjHlWIOJv7YUHMPj1FTpWWk86KTfvrvOGG27Qh5mHcaMe EUA73BUNBkZQZFQ7FvE9fUwPfcXKCPQ948AHiqOtDbClMaSACsm1DJXMG8Y5cKFqgv8UdF fFLDGmDWnwwwdWNke/2RNBxlHwsDYiV1dKwa072CQpEvDAQ3sOjQstXvty9w/6+W+ijVoX bDhPkiJ6ekIOJgpctP+Ep0Uz3mIVTVKNt16jIzhfyP+UADJN7razx+opYx+LUIAl+3EVyT RTBT4K+3WAyL5+jmmO0bEvbCcONzPT/flbS2EHemCzS8LXtsi1xoWqL7Xz5VuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742953171; a=rsa-sha256; cv=none; b=Ae1z2bbbIoPXUgzqLgQ9LfMfH1JStuw5Y894kw9Zgb1ayTJxNYLv6Fs7dqpIZfRNHy9DZD +4TiDMi7VbE4gkAW9YIsSTUni+SC60bRRLMkEAlA976zv61ejoxbWQk6KBPOJGWQiqaCnI xbrpBg9Q23aLfDmkIYXqwKDNGEHuGxLbh+E3WEnBdODvjwWY5G5w3m6G2Q2I/tDxHt19eB eL7RvGnrqyEjyvWmu4xef56ah8wbaCZ096zOHwPf74h7ePxRHLCzsxXAFLVyyTasT5pPJy j9rXGqziUk0xW9TV7DOGc2t1lNFNrdNfzjTi3acXUydLHVP1gf6C4NknwRvzOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742953171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yz1SQl6JoflzJH9LJlHrwM5bp8mrJpl2TjEFysORff0=; b=fVIBUQHfMRDJyvEjscjjvYdW+MmdV0BY4h2Xa64r2OE9BWx9jX/lbtOX85jDifFiH65RkS /7Fd5I94mG+t2oEphYbM60h3k1ibOCyuK0BAWBxtD/xPI/o9M2WzAkUa3MPXckykRwp2N0 umthqSJWbdJf9FIM9z/acUFo+MXzFvKyDs+6fqbD/JWR5+ACFv/ZwM2LZyPjJve76j78Dp flTCaIfLY61JejqMwtz4sz1SzGmjdWX3GqjElGmtysTYij9fyaAm4IW1vhc5JFnlNtlXQu TwmLc/zi3aMd3VxKOBCZxA68saO57bVAWwaehNmRy5vtrzJ6eW1od3DlcZCrdw== 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 4ZMqGC13CHz14y7; Wed, 26 Mar 2025 01:39: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 52Q1dU9d066458; Wed, 26 Mar 2025 01:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1dUZo066455; Wed, 26 Mar 2025 01:39:30 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:39:30 GMT Message-Id: <202503260139.52Q1dUZo066455@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: a3dfa53bbfe7 - stable/14 - snd_hda: Support Intel Raptor Lake 0x7a50 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a3dfa53bbfe73b6ed07cf14607aa11c5c7dd51a8 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a3dfa53bbfe73b6ed07cf14607aa11c5c7dd51a8 commit a3dfa53bbfe73b6ed07cf14607aa11c5c7dd51a8 Author: Christos Margiolis AuthorDate: 2025-03-19 18:18:37 +0000 Commit: Christos Margiolis CommitDate: 2025-03-26 01:39:23 +0000 snd_hda: Support Intel Raptor Lake 0x7a50 PR: 276379 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D49389 (cherry picked from commit fc40132603f5133037a35e2c14ac1356a0128c50) --- sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index c25f11ba1f23..904e3b2001c7 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -117,6 +117,7 @@ static const struct { { HDA_INTEL_ALLKPS, "Intel Alder Lake-PS", 0, 0 }, { HDA_INTEL_RPTLK1, "Intel Raptor Lake-P", 0, 0 }, { HDA_INTEL_RPTLK2, "Intel Raptor Lake-P", 0, 0 }, + { HDA_INTEL_RPTLK3, "Intel Raptor Lake-S", 0, 0 }, { HDA_INTEL_MTL, "Intel Meteor Lake-P", 0, 0 }, { HDA_INTEL_ARLS, "Intel Arrow Lake-S", 0, 0 }, { HDA_INTEL_ARL, "Intel Arrow Lake", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 72da5a4a44ac..9b11dcba32a8 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -77,6 +77,7 @@ #define HDA_INTEL_ALLKPS HDA_MODEL_CONSTRUCT(INTEL, 0x51c9) #define HDA_INTEL_RPTLK1 HDA_MODEL_CONSTRUCT(INTEL, 0x51ca) #define HDA_INTEL_RPTLK2 HDA_MODEL_CONSTRUCT(INTEL, 0x51cb) +#define HDA_INTEL_RPTLK3 HDA_MODEL_CONSTRUCT(INTEL, 0x7a50) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20) #define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21) From nobody Wed Mar 26 04:50:46 2025 X-Original-To: dev-commits-src-all@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 4ZMvVt64wTz5rLsx; Wed, 26 Mar 2025 04:50: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMvVt3FQHz3Jvy; Wed, 26 Mar 2025 04:50:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742964646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwUUszt6QDT28ZB+FWrIUohLNKMh5CT6eTPnlTnWV+I=; b=kNXP5fYoH/kOwY27JtvxOdJ/VYW8EBqs6Ovp/z4kgKRjSx0my8buksz98uLQshrgC/fVGi EMDKp7ROPpZpzhPa4efSPWmm0QvpXVldFhIhPUFhs+K23W++pl+1K+FXgo3D+OZu3vkWzK CzADEblTwhTLgaiI2rnq269E7McKEmH4gQsSTqwMnZENhcsxocnF6SZwOfluufhA8s8ZSh ColpYz8dMnTsJIkc3rc47PMK/bfuq81y4aUj/AC9YiAH6MprobcaTfOYO7saFueVRUtat8 BAfoLNkEohpHunNhUL4yDpU7g1vfuNxTXOLH/hNvpwShWZH4bvuh85CZ3DhTgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742964646; a=rsa-sha256; cv=none; b=ksmX7dbMffZvRiIpgrM6Q4hOP2hJW7MdGaG/ZgeCuhsKagKrCwZNvBEtYw/IzEmLI5Zr2Q vsFCWoVyKpgXPTNt0NrkqFlnV0jd4AisarJw/flSm5X8l6/yuto8h7ZZ3+oxCe9uhSAWpK M4WJN6AjFRCFO3Wl5vs/3sYdEY+ZBdBnnhbc0PECZniuPzGWK/0ax47hH8+qDAqfZ0WGrJ Ri8b87bvOxgD0ZU7zXT9NI0eFhZz2ACbbJw9CaHXe9O+g3vw7HCpXm5EsbgSAgZE69SPuL leb1VPiU+i+fDDeztHLgxT50tzU6vKtZoRAHzxqc0G8+8FEpX+U4THmon5yejw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742964646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwUUszt6QDT28ZB+FWrIUohLNKMh5CT6eTPnlTnWV+I=; b=cWQKBVdn0tF88C6swiu0Bp/JiLDMechcUIrCfKNUtp1n+UMgj/06TIPwI+xAcElMe2nfnY VSEIlSXH+krtVoiOR84mCNr7Jhc+1dWaZCf1oREpr4ryVSIrGyuwNcoVbFUavNGG2tAvct oQ0a/uWKgFmg1XMoCijvSOwcLRTIe35zWFKMJQ4KkIWnWXEm/FFz+2POvY65nQY3ZSo+MF RFvusmo8eGAi8n9Kdv5L3NXyZGnHi7a3RL76x9TPviZosP5h+57kFxNy8V+6e38LPWzCqk Zq4x0WDjCvuz5gZsVdKZsXoogy8uNEoaQDp40gbK9BUsZ7pP6pFQsvvYuMoNjQ== 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 4ZMvVt2jVCz19ky; Wed, 26 Mar 2025 04:50: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 52Q4okow029932; Wed, 26 Mar 2025 04:50:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q4ok8C029929; Wed, 26 Mar 2025 04:50:46 GMT (envelope-from git) Date: Wed, 26 Mar 2025 04:50:46 GMT Message-Id: <202503260450.52Q4ok8C029929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: d97e44784bb5 - main - aio_*(2): mention ENOSYS under ERRORS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d97e44784bb5a510b7af7593c86cfbcff73855c4 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d97e44784bb5a510b7af7593c86cfbcff73855c4 commit d97e44784bb5a510b7af7593c86cfbcff73855c4 Author: Enji Cooper AuthorDate: 2025-03-25 21:57:52 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 04:49:33 +0000 aio_*(2): mention ENOSYS under ERRORS ENOSYS can occur if aio(4) is not loaded in the kernel. Document this behavior so consumers on FreeBSD can better understand that this is a possible scenario. Clean up the manpages slightly while here: - Sort `ERRORS` by errno(3). - Use `.Fx` instead of `FreeBSD`. MFC after: 2 weeks Reviewed by: ziaee PR: 190942 Differential Revision: https://reviews.freebsd.org/D49502 --- lib/libsys/aio_cancel.2 | 7 +++++++ lib/libsys/aio_error.2 | 7 +++++++ lib/libsys/aio_fsync.2 | 7 +++++++ lib/libsys/aio_mlock.2 | 7 +++++++ lib/libsys/aio_read.2 | 11 ++++++++++- lib/libsys/aio_return.2 | 7 +++++++ lib/libsys/aio_suspend.2 | 7 +++++++ lib/libsys/aio_waitcomplete.2 | 11 +++++++++-- lib/libsys/aio_write.2 | 11 ++++++++++- 9 files changed, 71 insertions(+), 4 deletions(-) diff --git a/lib/libsys/aio_cancel.2 b/lib/libsys/aio_cancel.2 index 42d074054716..928a8b325e5f 100644 --- a/lib/libsys/aio_cancel.2 +++ b/lib/libsys/aio_cancel.2 @@ -80,6 +80,13 @@ The .Fa fildes argument is an invalid file descriptor. +.It Bq Er ENOSYS +The +.Fn aio_cancel +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .El .Sh SEE ALSO .Xr aio_error 2 , diff --git a/lib/libsys/aio_error.2 b/lib/libsys/aio_error.2 index 69eb7cd90ee2..2579d2f33052 100644 --- a/lib/libsys/aio_error.2 +++ b/lib/libsys/aio_error.2 @@ -72,6 +72,13 @@ The .Fa iocb argument does not reference an outstanding asynchronous I/O request. +.It Bq Er ENOSYS +The +.Fn aio_error +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .El .Sh SEE ALSO .Xr aio_cancel 2 , diff --git a/lib/libsys/aio_fsync.2 b/lib/libsys/aio_fsync.2 index 46fc5d95bcfd..0b863773eaf2 100644 --- a/lib/libsys/aio_fsync.2 +++ b/lib/libsys/aio_fsync.2 @@ -136,6 +136,13 @@ argument is not a valid descriptor. .It Bq Er EINVAL This implementation does not support synchronized I/O for this file. +.It Bq Er ENOSYS +The +.Fn aio_fsync +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .El .Pp If the request is successfully enqueued, but subsequently cancelled diff --git a/lib/libsys/aio_mlock.2 b/lib/libsys/aio_mlock.2 index 02d54304c631..f89ad10936aa 100644 --- a/lib/libsys/aio_mlock.2 +++ b/lib/libsys/aio_mlock.2 @@ -98,6 +98,13 @@ The request was not queued because of system resource limitations. The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. +.It Bq Er ENOSYS +The +.Fn aio_mlock +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .El .Pp If the request is successfully enqueued, but subsequently cancelled diff --git a/lib/libsys/aio_read.2 b/lib/libsys/aio_read.2 index 3a9601754c06..811d0b234168 100644 --- a/lib/libsys/aio_read.2 +++ b/lib/libsys/aio_read.2 @@ -173,6 +173,13 @@ points outside the process's allocated address space. The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. +.It Bq Er ENOSYS +The +.Fn aio_read +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .It Bq Er EOPNOTSUPP Asynchronous read operations on the file descriptor .Fa iocb->aio_fildes @@ -263,7 +270,9 @@ The .Fn aio_read2 and .Fn aio_readv -system calls are FreeBSD extensions, +system calls are +.Fx +extensions, and should not be used in portable code. .Sh HISTORY The diff --git a/lib/libsys/aio_return.2 b/lib/libsys/aio_return.2 index 499b85ef20d8..49e1abf201ec 100644 --- a/lib/libsys/aio_return.2 +++ b/lib/libsys/aio_return.2 @@ -79,6 +79,13 @@ The I/O operation was submitted with and the value of the .Fa aio_lio_opcode is invalid. +.It Bq Er ENOSYS +The +.Fn aio_return +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .El .Sh SEE ALSO .Xr aio_cancel 2 , diff --git a/lib/libsys/aio_suspend.2 b/lib/libsys/aio_suspend.2 index c46b0292c34e..ebc3c15d059f 100644 --- a/lib/libsys/aio_suspend.2 +++ b/lib/libsys/aio_suspend.2 @@ -89,6 +89,13 @@ contains more asynchronous I/O requests than the variable, or at least one of the requests is not valid. .It Bq Er EINTR the suspend was interrupted by a signal. +.It Bq Er ENOSYS +The +.Fn aio_suspend +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .El .Sh SEE ALSO .Xr aio_cancel 2 , diff --git a/lib/libsys/aio_waitcomplete.2 b/lib/libsys/aio_waitcomplete.2 index 1f20eca942ab..0a38155d7c75 100644 --- a/lib/libsys/aio_waitcomplete.2 +++ b/lib/libsys/aio_waitcomplete.2 @@ -91,8 +91,6 @@ The .Fn aio_waitcomplete system call fails if: .Bl -tag -width Er -.It Bq Er EINVAL -The specified time limit is invalid. .It Bq Er EAGAIN The process has not yet called .Fn aio_read @@ -101,6 +99,15 @@ or .It Bq Er EINTR A signal was delivered before the timeout expired and before any asynchronous I/O requests completed. +.It Bq Er EINVAL +The specified time limit is invalid. +.It Bq Er ENOSYS +The +.Fn aio_waitcomplete +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .It Bq Er EWOULDBLOCK .It Bq Er EINPROGRESS The specified time limit expired before any asynchronous I/O requests diff --git a/lib/libsys/aio_write.2 b/lib/libsys/aio_write.2 index f59406b8ab36..a7108a87e378 100644 --- a/lib/libsys/aio_write.2 +++ b/lib/libsys/aio_write.2 @@ -182,6 +182,13 @@ points outside the process's allocated address space. The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. +.It Bq Er ENOSYS +The +.Fn aio_write +system call is not supported. +This can occur if +.Xr aio 4 +support is not present. .It Bq Er EOPNOTSUPP Asynchronous write operations on the file descriptor .Fa iocb->aio_fildes @@ -265,7 +272,9 @@ The .Fn aio_write2 and .Fn aio_writev -system calls are FreeBSD extensions, +system calls are +.Fx +extensions, and should not be used in portable code. .Sh HISTORY The From nobody Wed Mar 26 05:42:26 2025 X-Original-To: dev-commits-src-all@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 4ZMwfV4scrz5rPsj; Wed, 26 Mar 2025 05:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMwfV4Mztz3rr7; Wed, 26 Mar 2025 05:42:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742967746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HDvVDF2vUswHPXibxLJjGoj/dEjbVGwjRkuupjKlrw8=; b=QZ7OHg5qKAfdq6nCRUk/k+8SWGNnmwDyxcvHfu8EDPmQ9HIEGaXTx95WAVBXd4TWvJtsbE D+PegyxoOmRHk46/qpe2CziyAM6IxicCaPwcn8O+8ng8UxkNRF8W2zhHBzOuDU3VJuDCXJ MXj7RCv2E0s7sLTwxjAhhnTU/jRYUe0bSToHOoQYdhjJIwfKyeUqiq7/mrhwUhRPEnc0Q0 e/LkjEKYo6En9zMX0v6JIWmC0wPDliUIJCgbphSevYC/TWnDuzXNhAmYnk/630vI3wCmvB ck8YDwiyhwe14m1TDatSzxuYZ3PXVe1kUMsvpiZPUFqPfjR2NIvecSW0k0lsCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742967746; a=rsa-sha256; cv=none; b=LO3HdDhU/0SwVf8MCbvxpfzHQq2EdEeW7jVBwxQ+bANueJ6b7teVbL0eB1QiNyqkg5L5PI WubQJCKmSezv8LuR/LVHmkGgYYjryPCMSeWqsaclMWPuSD/cwYQB2k5Hj6bd+gq3uVOcsx BobwdCiW1qDnh6YMzVIXJszAzMw23Np2AW4RH8I1ydt0KLrWLhIPeyXUqcsRTeU3UF3NC3 i12OkuDvPRu5FMXdNK7tUzORr7vvTV0fGKkCbcqQRixAFa7mDot6p/yLoaptHiQcMjFddI Gdf++QphDtpKzWYxsxhKsFUvOxQ0C1vZlNDbK3VxOPK+ruEhNGn45QnellXBgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742967746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HDvVDF2vUswHPXibxLJjGoj/dEjbVGwjRkuupjKlrw8=; b=lBoYoEies31uJ8tFsSMB5qK8/8zbdzPI6s+RVRdjYPFUPCqmfNM0W/Z1BZPCoWBLsdx7nE cwNoNV5Apy2IrEN3n2N1i8P/u+apW2i8EtwGNom/V9BMYdQmayO+6NOp/6mLDw+JfLlhqK m+q9MxaloK+fQsoToo2sy1xRck04RgYqA8mrJWfN+xVzhM2oJUhshkG9kWAmCATfkLpF2a wdoe4vof5UKjYNqrEzovVlhsN3TPNcL16FObkBmodqHsjSZgnD2WxQKVEkW3Sh3XWPj9LB H4HZGnXroXJ9iajWzHcsAKfdNmeqMB8F0j8xooqf/44AHZXCnWcQDAScBiaXQA== 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 4ZMwfV3xsWz1CJb; Wed, 26 Mar 2025 05:42: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 52Q5gQqV030946; Wed, 26 Mar 2025 05:42:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q5gQZr030943; Wed, 26 Mar 2025 05:42:26 GMT (envelope-from git) Date: Wed, 26 Mar 2025 05:42:26 GMT Message-Id: <202503260542.52Q5gQZr030943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 8d75a78b4d21 - stable/14 - UPDATING: Show plural syntax for PORTS_MODULES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d75a78b4d21e20b5eb659ef770e6dee56e36df4 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=8d75a78b4d21e20b5eb659ef770e6dee56e36df4 commit 8d75a78b4d21e20b5eb659ef770e6dee56e36df4 Author: Alexander Ziaee AuthorDate: 2025-03-23 04:40:34 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 05:40:42 +0000 UPDATING: Show plural syntax for PORTS_MODULES Show two examples in PORTS_MODULES to demonstrate space separation. This also shows off our working PRIME dual-gpu support. Switching to this doubled my laptop's battery life! MFC after: 3 days Reviewed by: mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D48342 (cherry picked from commit dcef6ce862cd19b3496486469cc631bb1b71fcbf) --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index f35f4267117b..62d80d0c4c74 100644 --- a/UPDATING +++ b/UPDATING @@ -2032,7 +2032,7 @@ FOOTNOTES: happens automatically. If all your modules come from ports, then adding the port origin directories to PORTS_MODULES instead is also automatic and effective, eg: - PORTS_MODULES+=x11/nvidia-driver + PORTS_MODULES+=graphics/drm-kmod graphics/nvidia-drm-kmod [3] From the bootblocks, boot -s, and then do fsck -p From nobody Wed Mar 26 05:42:27 2025 X-Original-To: dev-commits-src-all@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 4ZMwfX03RZz5rPbp; Wed, 26 Mar 2025 05:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZMwfW5nXmz3s6t; Wed, 26 Mar 2025 05:42:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742967747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSVH0vcgKLk6NLW52suqo9zNLxwdR3Ti+MXCT89yuE8=; b=OMWpcUYQ+j7YvvUhiLZEpnn64+SB7JiJb4pqiRKg160ImOzqxKzk92S4EeyBAddAUsGdeK 3rRQaigLICqPI8zncyYu5l0PJ58L/lk6Fn684LnQICbaDtkLJsWdW1IbjUlxZ8hZt87c8F vyC9qJ9DgDgaVe4vvA4So8fJQoqWH0UuEdJgmPdKRXE1d6XIpqJs3Q0wJpugaUjpAza6wm XNM/tn/Ewteti3W5vdtC4FyrOCzdBac37dx8tvm0HCsBXRDK4DPacxt+fa6xNrFZKV5qlw 4xhFNy+PXPxDbiI2915YO8tgYQOF55y5utujnO83DGPfQdBtX8gk7suQzCIKCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742967747; a=rsa-sha256; cv=none; b=BCdQkaO+iVRPcSUcVHq8/iORpWfTg/Ff9AHXIddlBX5m5NEsJSGlaTlBmhTK3hg24J/LCp 8YpFHJVyDDIsAys1vp4VVf/KHezpHvIzkdiIvbC22R5sFeR0a8Udtoknz8wT6/SzAKqAcf tI8WQl1y7zJ50b2TgsrZsMLWqSTzt1+t50S3unAahT4XGPU47MAqhnYR5gT49jkfWx3wVg 5QSMVORd3I7cJhva285cNjgkeGwj+tSSIy6LNPCJIjpRF1cX+3kDhX+hpa6P6PsXU8Kv9y zLJHyjLGmSxzpx2c+BamGz576q9cgImRPoJzX2cvsgu3hB/vNxwQd/mzLxYtOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742967747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OSVH0vcgKLk6NLW52suqo9zNLxwdR3Ti+MXCT89yuE8=; b=eH4VbOorwR5mLuxbTSyuDjbv/26YNdupArnud3ecgcSd8W67sZd31zcONU7N9ACdptSY/p 27nlKzJfz6u6FId0/Bowg91UQ2nP8zQumUEWgLDEN0WWDVPx5Bjkumwce6ZgUThKDQurJs OXta8x9UfNLYLfywweRAUQ2GN8BiLDwfAq5rbH+c1xVBeaRalpmBqiPgVOAH1xpRi4YTl6 5m3+Y/BI0ecgG6NFGgsiUu4MDEQqghovifN+rUcLuKYotpgONApp2sQCWDsvTI14f7tO03 TbN6F8PX/cBDd5av7p2XG22pKUeltMzsNYkgPDIRXYZFZ4WR/xdgqGRi2WE6FA== 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 4ZMwfW4w3mz1CSC; Wed, 26 Mar 2025 05:42: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 52Q5gRe6030979; Wed, 26 Mar 2025 05:42:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q5gREN030976; Wed, 26 Mar 2025 05:42:27 GMT (envelope-from git) Date: Wed, 26 Mar 2025 05:42:27 GMT Message-Id: <202503260542.52Q5gREN030976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: b0d6aa07c193 - stable/14 - style.mdoc: HARDWARE generates Release Notes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b0d6aa07c19370fd9c936f4ed28fe391b530bb9f Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=b0d6aa07c19370fd9c936f4ed28fe391b530bb9f commit b0d6aa07c19370fd9c936f4ed28fe391b530bb9f Author: Alexander Ziaee AuthorDate: 2024-10-06 22:44:15 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 05:40:59 +0000 style.mdoc: HARDWARE generates Release Notes FreeBSD Release Infrastructure has been building the Hardware Release Notes from these subsections in the Kernel Interfaces Manual. Standardize this behavior in the FreeBSD Manual page style guide with everything we learned in the 14.2-RELEASE. To me, this is an enormously exciting discovery, and I believe that over the next 5 years, this can transform the supported hardware UX, without reinventing the wheel, by doubling down on our ways instead of reinventing them. MFC after: 3 days Reported by: bz (special thanks) Reviewed by: imp, mhorne, pauamma, rpolaka Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D48343 (cherry picked from commit 29eb4de61a4c2ab1d940e10f3816db79e74d46b1) --- share/man/man5/style.mdoc.5 | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/share/man/man5/style.mdoc.5 b/share/man/man5/style.mdoc.5 index dd4d8a1f5fdf..d96c9ff08bbb 100644 --- a/share/man/man5/style.mdoc.5 +++ b/share/man/man5/style.mdoc.5 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018-2022 Mateusz Piotrowski <0mp@FreeBSD.org> @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 12, 2024 +.Dd December 21, 2024 .Dt STYLE.MDOC 5 .Os .Sh NAME @@ -74,6 +74,33 @@ Historically, was the preferred way before the deprecation of .Sy \&Li . .El +.Ss HARDWARE Section +Driver manuals in section four should have a +.Sx HARDWARE +section describing hardware known to work with the driver. +This section is drawn verbatim into the Release Hardware Notes, +therefore there are several things to note: +.Bl -dash -width "" +.It +The introductory sentence should be in the form: +.Bd -literal -offset indent +The +\&.Nm +driver supports the following $device_class: +.Ed +.Pp +Followed by the list of supported hardware. +.Pp +This defines what driver the subsection is referring to, +and allows the reader to search through the Hardware Notes +not only for the device models they have, +but also for the device type they are looking to acquire. +.It +The supported hardware should be listed as a bullet list, +or if complexity requires, a column list. +These two list types create very neat subsections +with clean starting and stopping points. +.El .Ss EXAMPLES Section .Bl -dash -width "" .It From nobody Wed Mar 26 08:25:46 2025 X-Original-To: dev-commits-src-all@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 4ZN0Gz10Vdz5rZxw; Wed, 26 Mar 2025 08:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN0Gz0BbXz3GVd; Wed, 26 Mar 2025 08:25:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742977547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0IYM+uTQqzLC+o86vlLo8Fd9UlIATA+cGJGtscU+0TM=; b=fK/YKQ5U4I06SBoJSY674SJAjD1mhVtHZhYGZYqpJ31Xs7qvyy3CCtP/BbwFOI9jBfsCiF 8I0MuUu3g1TVQtonM44Bw1Eb7Bba9x55QTEfVTrBqnjxPgNr371s55Qg53QWcNc4sCbZHW CbCUHsiUFajPFDd4wgDP4NGZDKqqTZ110HHKqTyBjqMEBVS9KvGCzv7h/H4fW4mT4aCyDk YH/G5+YEP4xCT2emzYU607dJeTLhC2Oi3SAoe1jKUM8LUf5KzlcFOSG2RZ6BdxA3FKl5qr rBUrsK5O49SVZHK/Ub4C5nsMgdtNBFkuSoMP9vYdI4kpekm9WiAxikUYKGGoYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742977547; a=rsa-sha256; cv=none; b=C53goDpRkfv0/xXVcjiKQxZk4dRYkP1JJNjehVLdFrh0LhgQV5lzh3sBcM2XbNiCT92KxA DmnPka0Pgia8NQbYSPg4W8t3i6WLBQE+ZX6q00xJG4XF0WqwkNzb59oXv02UtG60R4iAWo PX0e4oBWBJzMW0x9LorHB8mFKfVClm/SPZMFasqDHmetFWQ18arb0Wg3STAp6xpcXxpNBR j5abWQXL1nYWGPaV7IDn57D7O0ya0KW3UE5iS2A/dPF3eBS+BExihhLrTNgnDeFNmzGrGd 7VBeYlvz4c18COeTTqPRUDGvEZCbXGXpwuLJYgvy3mC5oE+t0JiSxHrVdE1pAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742977547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0IYM+uTQqzLC+o86vlLo8Fd9UlIATA+cGJGtscU+0TM=; b=EGygYdveDt1GgWDiDf+VgcOpLVbG6zJH4/4de24O9+lD3MIBXp1be+1RYvp14AaBHQtInd jnbo9GRMBUfMH/vaE2IdJ3rTBqIvyn0lfxR5uIupepr9Za0cUvDivWJHrv5SK6VBWr+TTm d5niNIiLgwtaCz3itMBq3v2YPbKCFIhyu3SWR/2c2FuwF3e2DZkXpVTeyjzwW6aLNWOL88 4wPEzUWPjYX2OWi8D4/4zFlc6ICRf7rvfPbie3rMYVhQSuD1mdmpSjjqLsHKyPbOSZHL3v p26VMHkJazz88qKGqbMkaUbZgR+fx4f7WIxwRFA1v8OjJnFs/2zcZ5R2B7vy4w== 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 4ZN0Gy6YPwz1HX0; Wed, 26 Mar 2025 08:25: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 52Q8PkDT032197; Wed, 26 Mar 2025 08:25:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q8PkJ1032194; Wed, 26 Mar 2025 08:25:46 GMT (envelope-from git) Date: Wed, 26 Mar 2025 08:25:46 GMT Message-Id: <202503260825.52Q8PkJ1032194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 6d58c670060a - main - riscv timer: fix interrupt handling. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d58c670060a17817fa0c8ebf4e7543c3d2b4523 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=6d58c670060a17817fa0c8ebf4e7543c3d2b4523 commit 6d58c670060a17817fa0c8ebf4e7543c3d2b4523 Author: Ruslan Bukin AuthorDate: 2025-03-26 08:09:50 +0000 Commit: Ruslan Bukin CommitDate: 2025-03-26 08:22:50 +0000 riscv timer: fix interrupt handling. Based on the spec the STIP bit of SIP register is read-only. To clear STIP bit from supervisor we have to do an SBI call to firmware. Upon reception of SBI request, the machine-mode firmware clears the STIP bit in the MIP register. This fixes operation on Codasip A730. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D49487 --- sys/riscv/riscv/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c index dc909082edae..652e5c8db62b 100644 --- a/sys/riscv/riscv/timer.c +++ b/sys/riscv/riscv/timer.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015-2024 Ruslan Bukin + * Copyright (c) 2015-2025 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -146,7 +146,7 @@ riscv_timer_intr(void *arg) if (has_sstc) csr_write(stimecmp, -1UL); else - csr_clear(sip, SIP_STIP); + sbi_set_timer(-1UL); if (sc->et.et_active) sc->et.et_event_cb(&sc->et, sc->et.et_arg); From nobody Wed Mar 26 10:26:44 2025 X-Original-To: dev-commits-src-all@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 4ZN2yk3LQXz5rk4P; Wed, 26 Mar 2025 10:26:54 +0000 (UTC) (envelope-from olce@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN2yj6H65z458b; Wed, 26 Mar 2025 10:26:53 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742984813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MIC/mJwDEnGAn9XD1/zTdyno6AEa7iYlcq1oCFxpHZY=; b=noKiC+VLZEOgO5QTuxqm9ONQ5C5GlhpZ+C2vV2wZ30P2z1GQK+hvxpe5H6nW0fqFjXwsU2 3xs+7DxHSE9tn5pJHMOGvifSA7EsD6lib3qew9LHgsmmJbs30vggQKPT26NoI08tDRLvk2 A6QwlR8/QC02oQVVqDVL2NWffy3lkG9SDQx0hB+E09Qs0RF+kGD32d32qp8nrkynApWadG ykYqAwWFCsZv4yoAFBMbgQwdOBA3wl+6uLwkMPIBv8olZdu1k84k4tmT8BRBTEcp7eMYSh 1OIAvJF+mjhKH3Os9PKRJioVCDO39hgWXfrGWNM0h3bCQh65D+5mjz4aVGKeHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742984813; a=rsa-sha256; cv=none; b=D+6nUVkskNPJMKOzCVMNL0gVV3NOVhVp5cOod6xWVoKoE3CNk1GSLyG5fnpSB8tdtk5DZY lW7YljvFN9JpUfK8lDcG2mx4KqF2Hc6vPPateCQRF0leTSeCrtwhAba0qon/SaxePjKFeG Oqq4Nq+Kq1i4tSePplafSdeCEM77OrkMhvkF16f5oaKS4YVVwNSTn9bGZDo1OZl/6912P2 KoxPcal6bjymvw5UtbN/azugu/puB1mrcCS3A3qYKE+RH7Fz1PXcduNsCEHPYh3YZXm/1K VkcemRznVdB/VStLaaH169AwW6ZlUNRSCydfMpJE1KZccs6a4Boud72LSCa+Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742984813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MIC/mJwDEnGAn9XD1/zTdyno6AEa7iYlcq1oCFxpHZY=; b=Bue4aHPolnak1C735JfWdd+eiNBuL7bMs98B3OHfIRzH2BoPr50TpXyt6T0Iy9K5BalIJS mVHCpvVKy/D8InoqFbVJiOHSci+MHgkBsa979sHGmSpxWYrU2i1CodhzEX9evHX3k4Zbi1 07RiC6d4GAWyaCYo7SUZGwwO8GSj4x+V8VvX4eM4zvYN0O7yshViX45bAHNB4DbRDSh2NQ VwDEOCXata1uWp7t70O3bkJpZi0UF8nSDlwbLXswXxWsVd6CXx49/LcG/ySJLgvytWHSws zk+bmadSxw3rcTsN249YUuVvoXY1LUGpJiWQixjLoWHoHm7ufR8EdcIuB8tnLg== Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.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) (Authenticated sender: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZN2yj0d8tz1Q1W; Wed, 26 Mar 2025 10:26:52 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 718d1928f874 - main - LinuxKPI: make linux_alloc_pages() honor __GFP_NORETRY Date: Wed, 26 Mar 2025 11:26:44 +0100 Message-ID: <6026448.Zv9zXsTiuT@ravel> In-Reply-To: References: <202503250919.52P9JfOA032702@gitrepo.freebsd.org> <3046625.S5UcXbOgvz@ravel> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2760223.TYJnH3iKXO"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2760223.TYJnH3iKXO Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: "Bjoern A. Zeeb" Date: Wed, 26 Mar 2025 11:26:44 +0100 Message-ID: <6026448.Zv9zXsTiuT@ravel> In-Reply-To: MIME-Version: 1.0 > Ah I see; that's where the M_WAITOK logic in there comes from. I was > wondering about it given others like GFP_KERNEL also being mapped to > that. Sometimes that makes me wonder if we should indeed pass the gfp_t > all the way down to the actual function doing the alloc and only there > filter and convert rather than doing that earlier in wrapper functions. I'm pretty sure this is the way to go, as it will allow us to choose a correct behavior in some complicated cases where multiple GFP flags are specified. Today, some of these flags are converted to M_NOWAIT or M_WAITOK early (and even at compile-time), and we lose the initial request nuances. GFP flags basically say how many retries and which memory-freeing mechanisms are allowed if the allocation cannot be fulfilled immediately (and sometimes, provide some more context about where the allocation is happening), which doesn't map to our flags directly (except for GFP_NOFAIL, for all other flags we need to use M_NOWAIT and then have various fallback paths). Although it hasn't happened yet in practice AFAIK, we could even end up with cases where we could both set M_WAITOK and M_NOWAIT (which is an error). An additional benefit of this approach is to remove the need to recompile LinuxKPI consumers when changing the memory allocation subsystem's behavior. For example, in this commit, __GFP_RETRY is now defined to be non-zero, but this doesn't affect previously compiled drm-kmod modules. In other words, to change the behavior, we currently have to change the interface, and although it is a small change, it introduces a bit of friction for testing. > I know how that feels. I just started looking at something I've done a > year+ ago completely outside my domain. :-) > It clarifies a lot and makes sense and is very helpful! Thanks. I think I saw your recent work of yours on LinuxKPI memory allocations, but merely glanced at it. If you need some support or to exchange ideas, in particular discussing how we should map GFP flags, feel free to contact me. Regards. -- Olivier Certner --nextPart2760223.TYJnH3iKXO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmfj1mQACgkQjKEwQJce JifCvg/7BhZlbaHsXqu9BMA1ktPYqK1ClcMuroSlM7Dbx8KxLP3ru1WBJBnBt19T j3FbH8zZZIBA6PuNz3ZI+pgN9pQ/7/L1Q8XLfLqUISI6X6MQArXRvht3nil8IC5a 4Wbp38FZtkqYScouevbF0eO/j8LBYIvtKB+RRzPfb/Nc+gA4vjS4D4NLaXb1nOld TbP+pzuSncimOVfqybvuz85EeBD+9YtyS5ZPZDrRAKWBJLBGZPUDJP2Y3DLU4jQ6 yrXxI4+BydP8LLSfx7ovS3AFecEpqq6ZrHqsimFnECazaSJP9yEuBzCLEv5cgdb4 cOxLZOjVghqvDWq+y6ldwz8WyMPVEFaVgzG3Ui6Z5VRx2fAi43VaJnxIZNS2zrKg RgBa8BCQ4DaYeCxUi9Z40bOg5gKb0TfFxuV8jGjjTt/5dfLI4A1EKG/T1k1Cp5Nm XLb4I3115/GCb647pLKC2PE1qsKGNs3XYAWBhfuHvte24NrnCZZyTmzGku5uWPaP 8Wq4WzUJSQLAauZnD29H9JqQHYdam1Nrwi43eoPmp6fYu+aWa38YFTkrkCxZ5Zhd rPCILJ7W0mPmyHyPVcd7kTXOyzNewE7HjWfzRKMoUQ9NHAO4/vnmjngsWig/Pv/Q JO0gQHvZkVqWl/dIUeBzBb4UaytE9vd2E4h86+pKzWt3xm+RK5Y= =al6f -----END PGP SIGNATURE----- --nextPart2760223.TYJnH3iKXO-- From nobody Wed Mar 26 12:01:07 2025 X-Original-To: dev-commits-src-all@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 4ZN53S3GSZz5rqM9; Wed, 26 Mar 2025 12:01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN53R5PKyz3qqS; Wed, 26 Mar 2025 12:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742990467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7yG5FIiK+uMjy8dC6dLjPwbUz68FVI5wu5DGmlkF/3w=; b=G2UfO3ItjRF4KIqa+Ui0j6dd/7/IwsIcowKJJZKELz5SxQawOFLiBBNmqqYL0TB/wkAIam ndn5NjwtP5gpGE26drnQ+2C5Gu7iyZlnbP4uQQ+WqO9S8lLvPK060DeWfM9nfiMPlhmMEe Bf439/6HzVcgqZ0yhWd+7NBk7grb4SlYQHSzBo7XUG87oMLk6mAmHFiSJPz+Cp5TNO34WL hIrBAd/IXMyeqaJfjR4l2zQqg/bbaUjasQF9hChszm8/E/IQTZJvNMbM0RJIJR7022m4wU hfVsu8zPFY2ozSR9hi/p3oDB61zOU9YcGKiYGXeBqeZkb3VaiLfw5vgmdazNLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742990467; a=rsa-sha256; cv=none; b=B/FsuwnjELIswztvMzMG7lFohcA7T2NgQ9jNaEUwHxboeJoEcoDs2eoBcHYDiKtEAA/54L x9zFjOkZKfTvdq6cORYbNaLZOEpAgWv1dcCd3R7AfQYzHDe66kkKyqjRB/MPaEURT/L0g8 GQQk03s3pj6TjaAmOMo3Kj+rHAbTDTdTeUfTlGvYDDJsGrbFFqn7t/LkfzGpAugzlg0Co6 VVPcK2UJPpJ2xuq00Ndx0O2w9TDmpOxQWC2LwWbUNKejIwBtltZP99Z5I81XJBYeHIAaI4 uUfFYgdT9WYD4G8LMyHhVJwONHam0+rekC9+HJMTukb7WdBX8cRFtWE9z10jCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742990467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7yG5FIiK+uMjy8dC6dLjPwbUz68FVI5wu5DGmlkF/3w=; b=RO7ygzw7GiVoP3nnKU0yWdhw74tXCI06HjY1/QAVlHRCbNgrg4eoTyI8VgE5tIbeYM+HJv l30v8bR7fNk2b+umOZpWt1QzkxmQ64rVSEe87aPhJs1+qwZsLZZ+kBYNAwxb21w8Y4/b1K UuxQxLDAYAA00G/xQX2we2xx9fsJ3/euWGUGm48cbIFU5d7cIyepTvPMw8OX3kv29HMfv9 7K3xtyfT54tbO2Dp5s29stD0hPPiwnmJ/kFptwlpOsiuos8VRBtuT7KT+ndKFcoX9RaDLe WXOmOWBkKrVCMfyGsDZgUAX3ZBAGNAOGv0t0DRK7fegHr61Jxvf3bAZO0YQX9g== 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 4ZN53R4zcGz1NmT; Wed, 26 Mar 2025 12:01: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 52QC17G8037724; Wed, 26 Mar 2025 12:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QC17Wb037721; Wed, 26 Mar 2025 12:01:07 GMT (envelope-from git) Date: Wed, 26 Mar 2025 12:01:07 GMT Message-Id: <202503261201.52QC17Wb037721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e173855c9f6b - main - i386: Avoid registering overlapping vm_phys_seg entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e173855c9f6b3b87c975418d0acf1c22ac4f1626 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e173855c9f6b3b87c975418d0acf1c22ac4f1626 commit e173855c9f6b3b87c975418d0acf1c22ac4f1626 Author: Mark Johnston AuthorDate: 2025-03-26 09:34:53 +0000 Commit: Mark Johnston CommitDate: 2025-03-26 09:54:39 +0000 i386: Avoid registering overlapping vm_phys_seg entries The entry added in pmap_bootstrap() is guaranteed to be covered by that added in pmap_cold(). This apparently went unnoticed until commit 8a14ddcc1d8e ("vm_phys: Check for overlap when adding a segment"). PR: 285415 Tested by: dim MFC after: 2 weeks --- sys/i386/i386/pmap.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 57ba48d399c3..302e493e44d1 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -614,15 +614,6 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr) res = atop(firstaddr - (vm_paddr_t)KERNLOAD); - /* - * Add a physical memory segment (vm_phys_seg) corresponding to the - * preallocated kernel page table pages so that vm_page structures - * representing these pages will be created. The vm_page structures - * are required for promotion of the corresponding kernel virtual - * addresses to superpage mappings. - */ - vm_phys_early_add_seg(KPTphys, KPTphys + ptoa(nkpt)); - /* * Initialize the first available kernel virtual address. * However, using "firstaddr" may waste a few pages of the From nobody Wed Mar 26 12:11:00 2025 X-Original-To: dev-commits-src-all@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 4ZN5Gr5L8Xz5rr3T; Wed, 26 Mar 2025 12:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN5Gr4PCTz3vS3; Wed, 26 Mar 2025 12:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742991060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fa5eKrh+twAY5RILu+9N/yHrcZxAiE5c5MKtNt40Fdo=; b=sY2ZCIky6ozGn9onu/ypE+hz6+n6QEZtR96KCgi7gF242xDxasUehO1b/amwGBpLgLwHl5 9pQjrmpz+UEEeF6QfTXOvVfdL1224VCnL16f/woENW6YjpxREskRL42PTvpB5eSr2hMMlh bVEcUxZVUydYhzhe5PgAwV3hcWc8p5Ay0KhAtfb4uQAUsVW+ksea49N5cDsR1r+Idg5xi5 LsR1DTJGsuurg7aTkPOiPMWsHnErJW8UNkOp7WCFuFbEPCU81UGW4f8Y+hDjq9tmik5UJ2 HfND5qLyyY1aP+5MQfuHpyoNtOSAEyxyvaCHE1Jxgr3AajHgBvIW9/qpcSKpag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742991060; a=rsa-sha256; cv=none; b=KKhcFwowctVISvQhQ2Y3gbzQ20BfTeU0vOu8iDfsEano7hcVFPNE4QfDArZKPpBSNvOuTS /HP8wN9WhRBnUZ9A7pOovSOthUyeXNqqrX1ULQISfa1p9VoUJoXVysvQ/VslnoR95yAfi6 6fbf7VZj3eVmLUqGGyZD/snztWNNvLasbd8id0WT7wkTrurHGcMVWBcUrJgjPDiK4VrW+6 8z0cVBiLzjvbZ+WGchM5X/QcjlLDsfwqUAJvH0DeObQ2bc+hdcRy4TxcEOOjBUxxDmpDHG 6ilARZpHnYZo3CVBYwQYnQx8w84WvARA024O/58ZKYzFIYpuVozLEHDx3KHiQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742991060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fa5eKrh+twAY5RILu+9N/yHrcZxAiE5c5MKtNt40Fdo=; b=Ebceei1B0ZTEAWnTEwAF6aClKXjultyID6auKQD2lHUko2vGEJAIDwUTWS5N6rD2WS0w+D UkHcK+XD3A1rcyE3WKZeNiQ11qvGx0dF37/k9VLLMuw20k7ssDn2UjveRT7el89KxoyfLf GJWyaioHZPWFTPQLd0W6cN9dbykC3GFYnAdZ2X5LQh4FAB4vkbFYalLKENYMZH6FOgHYyU dozpscOcDeMLCdFGTCzJMwZAJXznDM8D+sMat9DIRDiqX8L7lpa3PHA3M34xZeKXgYMHKU JaxLv1rHYtfHUa4fPgtqDsjYt1OWsuXBt37sO6LKREAc68LaEAbLACs7BqMc9A== 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 4ZN5Gr40n7z1PMv; Wed, 26 Mar 2025 12:11: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 52QCB0QQ052507; Wed, 26 Mar 2025 12:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QCB0jk052504; Wed, 26 Mar 2025 12:11:00 GMT (envelope-from git) Date: Wed, 26 Mar 2025 12:11:00 GMT Message-Id: <202503261211.52QCB0jk052504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: c7ffe32b1b7d - main - xilinx quad spi: various fixes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7ffe32b1b7de9d72add1b44d5d3a3a14605a8f0 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=c7ffe32b1b7de9d72add1b44d5d3a3a14605a8f0 commit c7ffe32b1b7de9d72add1b44d5d3a3a14605a8f0 Author: Ruslan Bukin AuthorDate: 2025-03-26 11:53:24 +0000 Commit: Ruslan Bukin CommitDate: 2025-03-26 12:08:27 +0000 xilinx quad spi: various fixes. - add compat table and a string for an older IP - name driver properly - depend on ofw_spibus - add missing ofw_bus_get_node() method - connect to GENERIC (similar to other Xilinx IP) Tested on Codasip A730. --- sys/dev/xilinx/axi_quad_spi.c | 31 +++++++++++++++++++++++++------ sys/riscv/conf/GENERIC | 1 + 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sys/dev/xilinx/axi_quad_spi.c b/sys/dev/xilinx/axi_quad_spi.c index eba320731659..86b00473fc96 100644 --- a/sys/dev/xilinx/axi_quad_spi.c +++ b/sys/dev/xilinx/axi_quad_spi.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Ruslan Bukin + * Copyright (c) 2016-2025 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -100,6 +100,12 @@ struct spi_softc { void *ih; }; +static struct ofw_compat_data compat_data[] = { + { "xlnx,xps-spi-3.2", 1 }, + { "xlnx,xps-spi-2.00.a", 1 }, + { NULL, 0 } +}; + static struct resource_spec spi_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { -1, 0 } @@ -112,7 +118,7 @@ spi_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "xlnx,xps-spi-3.2")) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); device_set_desc(dev, "Xilinx Quad SPI"); @@ -148,7 +154,7 @@ spi_attach(device_t dev) reg = (CR_MASTER | CR_MSS | CR_SPE); WRITE4(sc, SPI_CR, reg); - device_add_child(dev, "spibus", 0); + device_add_child(dev, "spibus", DEVICE_UNIT_ANY); bus_attach_children(dev); return (0); } @@ -212,20 +218,33 @@ spi_transfer(device_t dev, device_t child, struct spi_command *cmd) return (0); } +static phandle_t +axispi_get_node(device_t bus, device_t dev) +{ + + return (ofw_bus_get_node(bus)); +} + static device_method_t spi_methods[] = { /* Device interface */ DEVMETHOD(device_probe, spi_probe), DEVMETHOD(device_attach, spi_attach), + /* ofw_bus_if */ + DEVMETHOD(ofw_bus_get_node, axispi_get_node), + /* SPI interface */ DEVMETHOD(spibus_transfer, spi_transfer), DEVMETHOD_END }; -static driver_t spi_driver = { - "spi", +static driver_t axispi_driver = { + "axispi", spi_methods, sizeof(struct spi_softc), }; -DRIVER_MODULE(spi, simplebus, spi_driver, 0, 0); +DRIVER_MODULE(axispi, simplebus, axispi_driver, 0, 0); +DRIVER_MODULE(ofw_spibus, axispi, ofw_spibus_driver, 0, 0); +MODULE_DEPEND(axispi, ofw_spibus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 8dca3bdb3369..7d7d0ca6e79c 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -161,6 +161,7 @@ device fdt_pinctrl # SPI device spibus device spigen +device xilinx_spi # Xilinx AXI SPI Controller # Debugging support. Always need this: options KDB # Enable kernel debugger support. From nobody Wed Mar 26 12:41:03 2025 X-Original-To: dev-commits-src-all@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 4ZN5xW2p51z5rtlp; Wed, 26 Mar 2025 12:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN5xW1mSvz4JKv; Wed, 26 Mar 2025 12:41:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742992863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnMkEjaId1vsfAkXj1PaWtle2ZFb3UuB7qnUP5GxIw0=; b=Y/GvIix6QKoHbWevAjkxlRBgx5dqtwVYooA9qM8nqLu7HwJcxsUC2FLoHVYsn6wmHz1YTp hK7AAn8zY9vlWMfwvYNvnN0qtq//TbGXs0DLLIOkvCtYDN62cP5/VxlkXm3GgYdjptWO9F fpgNvz3ySVPrF3Eq1rsoKH3gd2/IEWc/M06acQr6ju/O+QIeQiby0yGDWmlN6a/wRh075y 1ollSws60LKpzWZuVfOzi541fNC/I1nUXtmYIFxw59TdIvjb4Wj6FM+JZ9LzdR9aDZeKpA 3apZ8dmvtJjDr2Cy/6XCLyQFBgnHc/NJDeQdmlpZvAoRldYOK57GZn+DQaAYGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742992863; a=rsa-sha256; cv=none; b=Zz0WkfBoC3SJobtSHqXe8S1grT08PV6sKTp1n6Ik/W4zElAElWN/4oMifSjGJNHftHeNN+ OOADsgMv+oOgG9vWZ+qOnDmjel0N2m55LMTp1nMxMiETUtx9ONstlOgB/w5ALyyZbSGhrD ERPQ8xTalAvn/npuK4tEzCFi57oEQyYxruvlDotmuxLooiyF6cYnC6eW6603sRnki/m/0o nY0r6obZYLoItr3zNKLtg/oAhIqLGLSdpsAkCX79fj6KFxhjjN9oij4StY5nlcP0xK4+bZ q/DnwcC/5NlkxRkDc/v3C4fNXqSht4QRhLV6YOqOxDfH5TjKnG3szw6P1GgHQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742992863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnMkEjaId1vsfAkXj1PaWtle2ZFb3UuB7qnUP5GxIw0=; b=YX8pqMHktcbpCQ/7O5wWlWGTEbnRYYMx4MVhjMXZol5MjEYAbz4XQ5JBGtxq17+Rs9+ekt o53uM8yej8xJGK7CcwllXsK6zjwQTumQFt2eqJDY+OnMODArt+3qpiWAM+5EHTUH7Gr8w/ auqK1VlbAqUtbk53pRW8Pca2FrehgJn7UjC7auB4ufBiYBm6qj3p0lHzhtF7vEVLx4Qb6s emYIqtN6ACze0tvHVVwjflagjPn4MsrFAEefR1inI8ZLBACTboKG/w1LSqvog0eia7I1Lf vbuiXqNTf3IC/5zkGwdjAC/2x3hQsj4plXjDxUmXx73cVd5hCuBMHN9ZE8d9ZA== 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 4ZN5xW1HWBz1Q2N; Wed, 26 Mar 2025 12:41: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 52QCf3OO008352; Wed, 26 Mar 2025 12:41:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QCf3sm008349; Wed, 26 Mar 2025 12:41:03 GMT (envelope-from git) Date: Wed, 26 Mar 2025 12:41:03 GMT Message-Id: <202503261241.52QCf3sm008349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: 20bdda14fa5c - main - ps(1): Consistent usage of Kbyte unit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20bdda14fa5c7ccb96c814d09311db948b1d239a Auto-Submitted: auto-generated The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=20bdda14fa5c7ccb96c814d09311db948b1d239a commit 20bdda14fa5c7ccb96c814d09311db948b1d239a Author: Olivier Cochard AuthorDate: 2025-03-26 12:33:17 +0000 Commit: Olivier Cochard CommitDate: 2025-03-26 12:39:17 +0000 ps(1): Consistent usage of Kbyte unit Approved by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49504 --- bin/ps/ps.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 5f3c6d122dbb..f90bf008a286 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -416,7 +416,7 @@ for details. The process scheduling increment (see .Xr setpriority 2 ) . .It Cm rss -the real memory (resident set) size of the process (in 1024 byte units). +the real memory (resident set) size of the process in Kbytes. .It Cm start The time the command started. If the command started less than 24 hours ago, the start time is @@ -668,7 +668,7 @@ real group ID .It Cm rgroup group name (from rgid) .It Cm rss -resident set size +resident set size (in Kbytes) .It Cm rtprio realtime priority (see .Xr rtprio 1) From nobody Wed Mar 26 14:00:26 2025 X-Original-To: dev-commits-src-all@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 4ZN7j73gcSz5s03Q; Wed, 26 Mar 2025 14:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN7j66kNHz3gqZ; Wed, 26 Mar 2025 14:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742997627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ol+OFddIRiKAtqD4DGTgi2eC+PzkZaTeCZ5FEfVK88o=; b=YR5panyF5ufcNMfiKk2tXVYr8ZIz8LhZaePvm+pAhSbe9HKul9oeT7BSgd0u9ku2YdSvz4 y6X4WBIDLoDqJrqjiQbsBvaV/gJc7ayyCVOC5bIOTtdgcSUYlBLycSfhp3d1v4i/eFHiZu 9Ed3eBHJorNv7x517YTwSX0TLyssrLR4QKSntJR4DpLoVPRQSV98/INVx+p4s7U7PhpQ44 2MyG1rF32iaVH5pJtJhIshgQEF7j3znncHiLNbBR0m30Wb6n5MdARmYVuyopp4z1szTQ1+ 0ApLwCZUpI+poKYDWoKSOTEY9zs77JSmNZvGBsQbo6G0FQjUSY6z2q8Ci5aoRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742997627; a=rsa-sha256; cv=none; b=m3im6Vlq+TRutGD4ZgfFlfdmlOBqNmicXWWq993x2k59iFBfR7i8z7F1L+G+RPAe04jDL3 ecfq2xNLiS/QSsvMNEiCV5NBcr0jQepxpfyeompbng6NYniuc2fsq6h5zEsS/PDUNRHbGg A1egfAn0rfNZp2OICqRYQlhi/8aOsba/TG0uUZOPld/UgShZXW/z/GWGrL+m9YLdwwvVaE vW2zlEwp9cWYU+Taj8snvTqs17T12biPkJ7hekYxQfbVJ+hj6rgsNiqoc4taU7B2tVSGMu Xt+yPevHBTOFeoHLXez2qduH9dvhjunyBpqqt81djNV3PTlbbK6GibK4zOPwnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742997627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ol+OFddIRiKAtqD4DGTgi2eC+PzkZaTeCZ5FEfVK88o=; b=xNwKRHoaW+9xKH+0lBBMn+QvhhjDITBkj/c3eMQhLR4JsfltV/tQau04sBaAbwrI/bXDMk wwnpkbF2dZQXJVuOQXHA9sexEtauNJxhuUQUDc0pSJbJoizm3PmTRD6TX6JaPcCGn9yAvI IwRGqKE8uM7yhl5aUnrq5f1Jc9Rhk51LtlqYeCFS87Y3q0Hgeur9cb9Bn1FFhSvU4jI4pc fNUXtnXSi0hR82zykghr6HFpLIu/F1MxpV7p2bDLqk4kmMQQpkGcMIRXDzCz4MIdCszvXg 2Zd30z3EMf6khrCuZlv/wJnFkEJgdlFYdFWTHpBMgTMxnAdzk9NOrKtcQ3nzbA== 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 4ZN7j660jCz1Rcm; Wed, 26 Mar 2025 14:00: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 52QE0QH4057771; Wed, 26 Mar 2025 14:00:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QE0QvT057768; Wed, 26 Mar 2025 14:00:26 GMT (envelope-from git) Date: Wed, 26 Mar 2025 14:00:26 GMT Message-Id: <202503261400.52QE0QvT057768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: d5c804138845 - main - heimdal: Add missing symbols to map List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5c804138845a1c8d81fbbce48de676806de32e6 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d5c804138845a1c8d81fbbce48de676806de32e6 commit d5c804138845a1c8d81fbbce48de676806de32e6 Author: Cy Schubert AuthorDate: 2025-03-26 13:43:54 +0000 Commit: Cy Schubert CommitDate: 2025-03-26 13:59:24 +0000 heimdal: Add missing symbols to map Patch supplied by mi@ through a private email. Bump __FreeBSD_version for ports that might need this. PR: 280025 MFC after 1 week --- crypto/heimdal/lib/krb5/version-script.map | 22 ++++++++++++++++++++++ sys/sys/param.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/krb5/version-script.map b/crypto/heimdal/lib/krb5/version-script.map index 05fc0cef1bd9..348112cef190 100644 --- a/crypto/heimdal/lib/krb5/version-script.map +++ b/crypto/heimdal/lib/krb5/version-script.map @@ -743,6 +743,28 @@ HEIMDAL_KRB5_2.0 { # kinit helper krb5_get_init_creds_opt_set_pkinit_user_certs; krb5_pk_enterprise_cert; + krb5_auth_con_getrecvsubkey; + krb5_auth_con_getsendsubkey; + krb5_auth_con_setrecvsubkey; + krb5_auth_con_setsendsubkey; + krb5_c_random_make_octets; + krb5_cc_copy_creds; + krb5_cc_get_flags; + krb5_creds_get_ticket_flags; + krb5_get_validated_creds; + krb5_init_creds_free; + krb5_init_creds_get_creds; + krb5_init_creds_get_error; + krb5_init_creds_get; + krb5_init_creds_init; + krb5_init_creds_set_keyblock; + krb5_init_creds_set_keytab; + krb5_init_creds_set_password; + krb5_init_creds_set_service; + krb5_init_creds_step; + krb5_rd_req_out_get_server; + krb5_sockaddr_is_loopback; + krb5_ticket_get_flags; # testing _krb5_n_fold; diff --git a/sys/sys/param.h b/sys/sys/param.h index ca6957ccdb14..b08a83ccc25b 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500034 +#define __FreeBSD_version 1500035 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Wed Mar 26 14:58:14 2025 X-Original-To: dev-commits-src-all@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 4ZN8zq1T93z5s3Sf; Wed, 26 Mar 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN8zp5gJSz3CGp; Wed, 26 Mar 2025 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743001094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ji5Z5kD9iUIyM7Twyh8DqB2cf+2rpee1CVDdE/5AiVk=; b=M9aSbxDfPMlpsy5HOvLkwkA2deFy5RIQCbq3AN7DCqKv+CrsR6QVHoQSLC4z5InhDsb7iz kPFXGivb+KnfIw/HzmyFS+VDySkm/7jg2e4ffgu+prK240Pxqf+ddZsSOzcrDdVEG+aXV1 JUzmXRxrXwPW9SroABOiKObGwc/S9dO5PZY0MvgYzY/0h1tj3YByarwgxhwfuNOZLz0ijV NKtsn1HKsRjYnAsFNsahNLaP7mKuceP0+6YSvEbLR/Mzk5ASwW0fLBp38kvHsabUzCvd0j FKgRRkholj5A1A11Ua9zcP0XFF1Q2FrVxB/ccHvLXIGrsEIFiesZ80HG3ranew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743001094; a=rsa-sha256; cv=none; b=yNNfmJmAbf6O/kvLueO64/Gq0tIdf3A2UHb38BLiPoO828B06HKNxMQupNR3eT8liE8Gpq 5jdQUjkq/a7zRivqY0LcHWVRfVTHZCMgiaigHWveQj3bWhoeg2ipSJIYcNUwHNUkfkaitZ lYYOGry1YQpKeOMhd4KUdcAl2FfQ3Ab5gz+eX6uLdzlneuu+VM3Aj8cHOcupZXDcy4v521 FtjEUCz+nFACRDtx1WYMFV7YF8rvJVWukZQ7bLCbGkNGSf/a9PL3MOGLZEhWExDFfqkxuW ANEVXWOqwn6o8wKAQu8uW5i5jcWBfdbUJA3bUz7AoUP+4pTuYcqkv0yNwfO8pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743001094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ji5Z5kD9iUIyM7Twyh8DqB2cf+2rpee1CVDdE/5AiVk=; b=sumjcytv8YdLOuLHtw5CvxokVsHDHD2fPC90NZOHtdbalaC9KMiJPtSl+TVlI+X3d6z7hL Q8h7MEebjJqnJtsxcPPWmUV2RWe4enUVHNOxMp1WRm/pAbbF1p4Q9JANeocmPVx5fKCvho ysKaL2u4dZzyEB3SIB8xVZpUhTfLaqoD6an4xgR2g1w6ypKdm57Fh3R9Ms4nSuqK/lDpvR pp0vRUpDMY/u7wjc1ipnmzdHmP0O/yEFU1eYBTJRNkbhaxWc0siFupneZHRkveyQVb1OOi YvHSTxaRb3WaRMGH6jPaI9VTECOtF4/Z517mQIvGDCKs10KwoMBF45LxJzPVHg== 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 4ZN8zp40f9zsn; Wed, 26 Mar 2025 14:58: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 52QEwEga060250; Wed, 26 Mar 2025 14:58:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QEwEZ9060247; Wed, 26 Mar 2025 14:58:14 GMT (envelope-from git) Date: Wed, 26 Mar 2025 14:58:14 GMT Message-Id: <202503261458.52QEwEZ9060247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: c11b70191511 - main - geom: Push GEOM sysinit ordering to after devctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c11b701915116bf512f3d77dfdac7a867f51ca0a Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=c11b701915116bf512f3d77dfdac7a867f51ca0a commit c11b701915116bf512f3d77dfdac7a867f51ca0a Author: Justin Hibbits AuthorDate: 2025-03-26 14:43:14 +0000 Commit: Justin Hibbits CommitDate: 2025-03-26 14:55:24 +0000 geom: Push GEOM sysinit ordering to after devctl GEOM depends on devctl being initialized, as it uses devctl_notify, which assumes that devctl is initialized already. However, if devctl is not initialized yet, the devctl UMA zone is NULL, resulting in a panic. Thus far this has worked seemingly by linker luck that lets devctl sort before GEOM, but this is not guaranteed. Instead, enforce the ordering by pushing GEOM to third place, explicitly ordering it after devctl_init, which is ordered second. Since g_raid wants to initialize after GEOM, push that to fourth place as well. Sponsored by: Juniper Networks, Inc. --- sys/geom/geom.h | 2 +- sys/geom/raid/g_raid.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 0eb6775701fd..dcd6f793f9f7 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -417,7 +417,7 @@ g_free(void *ptr) static moduledata_t name##_mod = { \ #name, g_modevent, &class \ }; \ - DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND); + DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); int g_is_geom_thread(struct thread *td); diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c index 6938491d696c..a483622d14a5 100644 --- a/sys/geom/raid/g_raid.c +++ b/sys/geom/raid/g_raid.c @@ -2571,5 +2571,5 @@ static moduledata_t g_raid_mod = { g_modevent, &g_raid_class }; -DECLARE_MODULE(g_raid, g_raid_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); +DECLARE_MODULE(g_raid, g_raid_mod, SI_SUB_DRIVERS, SI_ORDER_FOURTH); MODULE_VERSION(geom_raid, 0); From nobody Wed Mar 26 15:04:52 2025 X-Original-To: dev-commits-src-all@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 4ZN97n5dffz5s3qr; Wed, 26 Mar 2025 15:05:09 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 4ZN97n3RFWz3Dbt; Wed, 26 Mar 2025 15:05:09 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5e5bc066283so10008939a12.0; Wed, 26 Mar 2025 08:05:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743001507; x=1743606307; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eCOxHsTneQkFWgkVQ14HO4ugfgyx6tN4CaCV7SejXLM=; b=s7rrjou5cetu6JjdJ7+sIudatmaPFmZWS9XsMRXqh+a5UtC6MAxPSytC32fIlXDP1H C9rifymSoiVnWYWgen2KsdsqeTQhZ3Ffg4H8LlP5JTukBT2SYrxsbg5PAF7jP3OLvAvr F/MLkTCM0T9ZGpp6QcTFNv7eO2xE0ZEfh3nMivd8r3LUJ+3R1X3PR97RH8qsvfyHlvO5 bAdVdFFcyloZ4InMwLAZc+VilOwdIxkC+RcKxd4VYuJhYHPvvRTHCG6cSyax//Rpx2cD uUmFbVnL2VxgpLWpcErBc1IUr2PnT9LbAMkuynp71iTutUMRJvwIR8Vow/Pz8mrMkfVQ +F2A== X-Forwarded-Encrypted: i=1; AJvYcCUHXiVyArEAShiKYNnP1scNArd946u2vwild8WXA8PDtNoVSOd5HSveDPG0DTi5Y37gTt7mPHAtgO9BsgeUNEddsnO07rs=@freebsd.org, AJvYcCXcZnCF03UGbcRhgZ9R7cxa/ONPPKtv0XwmjwWJZ3BZwjzZYrGQBgh5oi3o3gNA6sYFwHfix4seAZEXSGraGEKc3bcW@freebsd.org X-Gm-Message-State: AOJu0YzeVW8kB+cUeXBPx1ZrVgH6+9SXm9rZffng61NU6gvvzmNb1Fq8 Bi4SrzcgoYZDrUoep04COBt85gPLL/xZyiEoGrwzvJ4PQYg3mo89cW4MBkKJITvT63huWVfEIbm on1lWWvkLtpvd4/ATdmw7/fesAFuM8Ew+ X-Gm-Gg: ASbGncsusc1ZJI73MksEZzQQWM9tck4QpjDJc4Ph1DadJM2jc1u2YsypXtTakcV60Rf MWc7QCy2h8KqU9TxacqaBLqg5g8h4JFY31Y7/3ItMO9tvHybNdF59XbPdPdn35IFTGNOxEG2J8D ZNMpzoM8n0TytlcAM50CxpI+gNZA== X-Google-Smtp-Source: AGHT+IFLCaWPqSIRpxctKdZuOMUclvlIJs4Lr53azqzjHfyKesazjHFwk2aTsFN2DGcVcEdZYMLi+rHJjZXmu+jwX/o= X-Received: by 2002:a05:6402:5109:b0:5ec:f769:db07 with SMTP id 4fb4d7f45d1cf-5ecf769dc08mr7804566a12.29.1743001504362; Wed, 26 Mar 2025 08:05:04 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202503260450.52Q4ok8C029929@gitrepo.freebsd.org> In-Reply-To: <202503260450.52Q4ok8C029929@gitrepo.freebsd.org> From: Alan Somers Date: Wed, 26 Mar 2025 09:04:52 -0600 X-Gm-Features: AQ5f1Jp9RYpaaSeY4SwdLKyAx4IPCW7xZiaZZ9F0O00w_3nGnn12drR-ZVgHN-Q Message-ID: Subject: Re: git: d97e44784bb5 - main - aio_*(2): mention ENOSYS under ERRORS To: Enji Cooper Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000082bc6e0631402995" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4ZN97n3RFWz3Dbt X-Spamd-Bar: ---- --00000000000082bc6e0631402995 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Is this error still possible after f3215338ef82c7798bebca17a7d502cc5ef8bc18 ? How does one unload the module now? On Tue, Mar 25, 2025 at 10:51=E2=80=AFPM Enji Cooper wro= te: > The branch main has been updated by ngie: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dd97e44784bb5a510b7af7593c86cfbc= ff73855c4 > > commit d97e44784bb5a510b7af7593c86cfbcff73855c4 > Author: Enji Cooper > AuthorDate: 2025-03-25 21:57:52 +0000 > Commit: Enji Cooper > CommitDate: 2025-03-26 04:49:33 +0000 > > aio_*(2): mention ENOSYS under ERRORS > > ENOSYS can occur if aio(4) is not loaded in the kernel. Document this > behavior so consumers on FreeBSD can better understand that this is a > possible scenario. > > Clean up the manpages slightly while here: > - Sort `ERRORS` by errno(3). > - Use `.Fx` instead of `FreeBSD`. > > MFC after: 2 weeks > Reviewed by: ziaee > PR: 190942 > Differential Revision: https://reviews.freebsd.org/D49502 > --- > lib/libsys/aio_cancel.2 | 7 +++++++ > lib/libsys/aio_error.2 | 7 +++++++ > lib/libsys/aio_fsync.2 | 7 +++++++ > lib/libsys/aio_mlock.2 | 7 +++++++ > lib/libsys/aio_read.2 | 11 ++++++++++- > lib/libsys/aio_return.2 | 7 +++++++ > lib/libsys/aio_suspend.2 | 7 +++++++ > lib/libsys/aio_waitcomplete.2 | 11 +++++++++-- > lib/libsys/aio_write.2 | 11 ++++++++++- > 9 files changed, 71 insertions(+), 4 deletions(-) > > diff --git a/lib/libsys/aio_cancel.2 b/lib/libsys/aio_cancel.2 > index 42d074054716..928a8b325e5f 100644 > --- a/lib/libsys/aio_cancel.2 > +++ b/lib/libsys/aio_cancel.2 > @@ -80,6 +80,13 @@ The > .Fa fildes > argument > is an invalid file descriptor. > +.It Bq Er ENOSYS > +The > +.Fn aio_cancel > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .El > .Sh SEE ALSO > .Xr aio_error 2 , > diff --git a/lib/libsys/aio_error.2 b/lib/libsys/aio_error.2 > index 69eb7cd90ee2..2579d2f33052 100644 > --- a/lib/libsys/aio_error.2 > +++ b/lib/libsys/aio_error.2 > @@ -72,6 +72,13 @@ The > .Fa iocb > argument > does not reference an outstanding asynchronous I/O request. > +.It Bq Er ENOSYS > +The > +.Fn aio_error > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .El > .Sh SEE ALSO > .Xr aio_cancel 2 , > diff --git a/lib/libsys/aio_fsync.2 b/lib/libsys/aio_fsync.2 > index 46fc5d95bcfd..0b863773eaf2 100644 > --- a/lib/libsys/aio_fsync.2 > +++ b/lib/libsys/aio_fsync.2 > @@ -136,6 +136,13 @@ argument > is not a valid descriptor. > .It Bq Er EINVAL > This implementation does not support synchronized I/O for this file. > +.It Bq Er ENOSYS > +The > +.Fn aio_fsync > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .El > .Pp > If the request is successfully enqueued, but subsequently cancelled > diff --git a/lib/libsys/aio_mlock.2 b/lib/libsys/aio_mlock.2 > index 02d54304c631..f89ad10936aa 100644 > --- a/lib/libsys/aio_mlock.2 > +++ b/lib/libsys/aio_mlock.2 > @@ -98,6 +98,13 @@ The request was not queued because of system resource > limitations. > The asynchronous notification method in > .Fa iocb->aio_sigevent.sigev_notify > is invalid or not supported. > +.It Bq Er ENOSYS > +The > +.Fn aio_mlock > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .El > .Pp > If the request is successfully enqueued, but subsequently cancelled > diff --git a/lib/libsys/aio_read.2 b/lib/libsys/aio_read.2 > index 3a9601754c06..811d0b234168 100644 > --- a/lib/libsys/aio_read.2 > +++ b/lib/libsys/aio_read.2 > @@ -173,6 +173,13 @@ points outside the process's allocated address space= . > The asynchronous notification method in > .Fa iocb->aio_sigevent.sigev_notify > is invalid or not supported. > +.It Bq Er ENOSYS > +The > +.Fn aio_read > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .It Bq Er EOPNOTSUPP > Asynchronous read operations on the file descriptor > .Fa iocb->aio_fildes > @@ -263,7 +270,9 @@ The > .Fn aio_read2 > and > .Fn aio_readv > -system calls are FreeBSD extensions, > +system calls are > +.Fx > +extensions, > and should not be used in portable code. > .Sh HISTORY > The > diff --git a/lib/libsys/aio_return.2 b/lib/libsys/aio_return.2 > index 499b85ef20d8..49e1abf201ec 100644 > --- a/lib/libsys/aio_return.2 > +++ b/lib/libsys/aio_return.2 > @@ -79,6 +79,13 @@ The I/O operation was submitted with > and the value of the > .Fa aio_lio_opcode > is invalid. > +.It Bq Er ENOSYS > +The > +.Fn aio_return > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .El > .Sh SEE ALSO > .Xr aio_cancel 2 , > diff --git a/lib/libsys/aio_suspend.2 b/lib/libsys/aio_suspend.2 > index c46b0292c34e..ebc3c15d059f 100644 > --- a/lib/libsys/aio_suspend.2 > +++ b/lib/libsys/aio_suspend.2 > @@ -89,6 +89,13 @@ contains more asynchronous I/O requests than the > variable, or at least one of the requests is not valid. > .It Bq Er EINTR > the suspend was interrupted by a signal. > +.It Bq Er ENOSYS > +The > +.Fn aio_suspend > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .El > .Sh SEE ALSO > .Xr aio_cancel 2 , > diff --git a/lib/libsys/aio_waitcomplete.2 b/lib/libsys/aio_waitcomplete.= 2 > index 1f20eca942ab..0a38155d7c75 100644 > --- a/lib/libsys/aio_waitcomplete.2 > +++ b/lib/libsys/aio_waitcomplete.2 > @@ -91,8 +91,6 @@ The > .Fn aio_waitcomplete > system call fails if: > .Bl -tag -width Er > -.It Bq Er EINVAL > -The specified time limit is invalid. > .It Bq Er EAGAIN > The process has not yet called > .Fn aio_read > @@ -101,6 +99,15 @@ or > .It Bq Er EINTR > A signal was delivered before the timeout expired and before any > asynchronous I/O requests completed. > +.It Bq Er EINVAL > +The specified time limit is invalid. > +.It Bq Er ENOSYS > +The > +.Fn aio_waitcomplete > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .It Bq Er EWOULDBLOCK > .It Bq Er EINPROGRESS > The specified time limit expired before any asynchronous I/O requests > diff --git a/lib/libsys/aio_write.2 b/lib/libsys/aio_write.2 > index f59406b8ab36..a7108a87e378 100644 > --- a/lib/libsys/aio_write.2 > +++ b/lib/libsys/aio_write.2 > @@ -182,6 +182,13 @@ points outside the process's allocated address space= . > The asynchronous notification method in > .Fa iocb->aio_sigevent.sigev_notify > is invalid or not supported. > +.It Bq Er ENOSYS > +The > +.Fn aio_write > +system call is not supported. > +This can occur if > +.Xr aio 4 > +support is not present. > .It Bq Er EOPNOTSUPP > Asynchronous write operations on the file descriptor > .Fa iocb->aio_fildes > @@ -265,7 +272,9 @@ The > .Fn aio_write2 > and > .Fn aio_writev > -system calls are FreeBSD extensions, > +system calls are > +.Fx > +extensions, > and should not be used in portable code. > .Sh HISTORY > The > --00000000000082bc6e0631402995 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Is this error still possible after f3215338ef82c7798b= ebca17a7d502cc5ef8bc18 ?=C2=A0 How does one unload the module now?
On Tue, Mar 25, 2025 at 10:51=E2=80=AFPM Enji Cooper <ngie@freebsd.org> wrote:
The branch main has been upd= ated by ngie:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3Dd97e44784bb5a510b7af7593c86cfbcff73855c4
commit d97e44784bb5a510b7af7593c86cfbcff73855c4
Author:=C2=A0 =C2=A0 =C2=A0Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2025-03-25 21:57:52 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2025-03-26 04:49:33 +0000

=C2=A0 =C2=A0 aio_*(2): mention ENOSYS under ERRORS

=C2=A0 =C2=A0 ENOSYS can occur if aio(4) is not loaded in the kernel. Docum= ent this
=C2=A0 =C2=A0 behavior so consumers on FreeBSD can better understand that t= his is a
=C2=A0 =C2=A0 possible scenario.

=C2=A0 =C2=A0 Clean up the manpages slightly while here:
=C2=A0 =C2=A0 - Sort `ERRORS` by errno(3).
=C2=A0 =C2=A0 - Use `.Fx` instead of `FreeBSD`.

=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks
=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 ziaee
=C2=A0 =C2=A0 PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0190942
=C2=A0 =C2=A0 Differential Revision: https://reviews.freebsd.org/D= 49502
---
=C2=A0lib/libsys/aio_cancel.2=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 7 +++++++ =C2=A0lib/libsys/aio_error.2=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 7 +++++++ =C2=A0lib/libsys/aio_fsync.2=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 7 +++++++ =C2=A0lib/libsys/aio_mlock.2=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 7 +++++++ =C2=A0lib/libsys/aio_read.2=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 11 +++++++++= +-
=C2=A0lib/libsys/aio_return.2=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 7 +++++++ =C2=A0lib/libsys/aio_suspend.2=C2=A0 =C2=A0 =C2=A0 |=C2=A0 7 +++++++
=C2=A0lib/libsys/aio_waitcomplete.2 | 11 +++++++++--
=C2=A0lib/libsys/aio_write.2=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 11 ++++++++++- =C2=A09 files changed, 71 insertions(+), 4 deletions(-)

diff --git a/lib/libsys/aio_cancel.2 b/lib/libsys/aio_cancel.2
index 42d074054716..928a8b325e5f 100644
--- a/lib/libsys/aio_cancel.2
+++ b/lib/libsys/aio_cancel.2
@@ -80,6 +80,13 @@ The
=C2=A0.Fa fildes
=C2=A0argument
=C2=A0is an invalid file descriptor.
+.It Bq Er ENOSYS
+The
+.Fn aio_cancel
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.El
=C2=A0.Sh SEE ALSO
=C2=A0.Xr aio_error 2 ,
diff --git a/lib/libsys/aio_error.2 b/lib/libsys/aio_error.2
index 69eb7cd90ee2..2579d2f33052 100644
--- a/lib/libsys/aio_error.2
+++ b/lib/libsys/aio_error.2
@@ -72,6 +72,13 @@ The
=C2=A0.Fa iocb
=C2=A0argument
=C2=A0does not reference an outstanding asynchronous I/O request.
+.It Bq Er ENOSYS
+The
+.Fn aio_error
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.El
=C2=A0.Sh SEE ALSO
=C2=A0.Xr aio_cancel 2 ,
diff --git a/lib/libsys/aio_fsync.2 b/lib/libsys/aio_fsync.2
index 46fc5d95bcfd..0b863773eaf2 100644
--- a/lib/libsys/aio_fsync.2
+++ b/lib/libsys/aio_fsync.2
@@ -136,6 +136,13 @@ argument
=C2=A0is not a valid descriptor.
=C2=A0.It Bq Er EINVAL
=C2=A0This implementation does not support synchronized I/O for this file.<= br> +.It Bq Er ENOSYS
+The
+.Fn aio_fsync
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.El
=C2=A0.Pp
=C2=A0If the request is successfully enqueued, but subsequently cancelled diff --git a/lib/libsys/aio_mlock.2 b/lib/libsys/aio_mlock.2
index 02d54304c631..f89ad10936aa 100644
--- a/lib/libsys/aio_mlock.2
+++ b/lib/libsys/aio_mlock.2
@@ -98,6 +98,13 @@ The request was not queued because of system resource li= mitations.
=C2=A0The asynchronous notification method in
=C2=A0.Fa iocb->aio_sigevent.sigev_notify
=C2=A0is invalid or not supported.
+.It Bq Er ENOSYS
+The
+.Fn aio_mlock
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.El
=C2=A0.Pp
=C2=A0If the request is successfully enqueued, but subsequently cancelled diff --git a/lib/libsys/aio_read.2 b/lib/libsys/aio_read.2
index 3a9601754c06..811d0b234168 100644
--- a/lib/libsys/aio_read.2
+++ b/lib/libsys/aio_read.2
@@ -173,6 +173,13 @@ points outside the process's allocated address spa= ce.
=C2=A0The asynchronous notification method in
=C2=A0.Fa iocb->aio_sigevent.sigev_notify
=C2=A0is invalid or not supported.
+.It Bq Er ENOSYS
+The
+.Fn aio_read
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.It Bq Er EOPNOTSUPP
=C2=A0Asynchronous read operations on the file descriptor
=C2=A0.Fa iocb->aio_fildes
@@ -263,7 +270,9 @@ The
=C2=A0.Fn aio_read2
=C2=A0and
=C2=A0.Fn aio_readv
-system calls are FreeBSD extensions,
+system calls are
+.Fx
+extensions,
=C2=A0and should not be used in portable code.
=C2=A0.Sh HISTORY
=C2=A0The
diff --git a/lib/libsys/aio_return.2 b/lib/libsys/aio_return.2
index 499b85ef20d8..49e1abf201ec 100644
--- a/lib/libsys/aio_return.2
+++ b/lib/libsys/aio_return.2
@@ -79,6 +79,13 @@ The I/O operation was submitted with
=C2=A0and the value of the
=C2=A0.Fa aio_lio_opcode
=C2=A0is invalid.
+.It Bq Er ENOSYS
+The
+.Fn aio_return
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.El
=C2=A0.Sh SEE ALSO
=C2=A0.Xr aio_cancel 2 ,
diff --git a/lib/libsys/aio_suspend.2 b/lib/libsys/aio_suspend.2
index c46b0292c34e..ebc3c15d059f 100644
--- a/lib/libsys/aio_suspend.2
+++ b/lib/libsys/aio_suspend.2
@@ -89,6 +89,13 @@ contains more asynchronous I/O requests than the
=C2=A0variable, or at least one of the requests is not valid.
=C2=A0.It Bq Er EINTR
=C2=A0the suspend was interrupted by a signal.
+.It Bq Er ENOSYS
+The
+.Fn aio_suspend
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.El
=C2=A0.Sh SEE ALSO
=C2=A0.Xr aio_cancel 2 ,
diff --git a/lib/libsys/aio_waitcomplete.2 b/lib/libsys/aio_waitcomplete.2<= br> index 1f20eca942ab..0a38155d7c75 100644
--- a/lib/libsys/aio_waitcomplete.2
+++ b/lib/libsys/aio_waitcomplete.2
@@ -91,8 +91,6 @@ The
=C2=A0.Fn aio_waitcomplete
=C2=A0system call fails if:
=C2=A0.Bl -tag -width Er
-.It Bq Er EINVAL
-The specified time limit is invalid.
=C2=A0.It Bq Er EAGAIN
=C2=A0The process has not yet called
=C2=A0.Fn aio_read
@@ -101,6 +99,15 @@ or
=C2=A0.It Bq Er EINTR
=C2=A0A signal was delivered before the timeout expired and before any
=C2=A0asynchronous I/O requests completed.
+.It Bq Er EINVAL
+The specified time limit is invalid.
+.It Bq Er ENOSYS
+The
+.Fn aio_waitcomplete
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.It Bq Er EWOULDBLOCK
=C2=A0.It Bq Er EINPROGRESS
=C2=A0The specified time limit expired before any asynchronous I/O requests=
diff --git a/lib/libsys/aio_write.2 b/lib/libsys/aio_write.2
index f59406b8ab36..a7108a87e378 100644
--- a/lib/libsys/aio_write.2
+++ b/lib/libsys/aio_write.2
@@ -182,6 +182,13 @@ points outside the process's allocated address spa= ce.
=C2=A0The asynchronous notification method in
=C2=A0.Fa iocb->aio_sigevent.sigev_notify
=C2=A0is invalid or not supported.
+.It Bq Er ENOSYS
+The
+.Fn aio_write
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
=C2=A0.It Bq Er EOPNOTSUPP
=C2=A0Asynchronous write operations on the file descriptor
=C2=A0.Fa iocb->aio_fildes
@@ -265,7 +272,9 @@ The
=C2=A0.Fn aio_write2
=C2=A0and
=C2=A0.Fn aio_writev
-system calls are FreeBSD extensions,
+system calls are
+.Fx
+extensions,
=C2=A0and should not be used in portable code.
=C2=A0.Sh HISTORY
=C2=A0The
--00000000000082bc6e0631402995-- From nobody Wed Mar 26 15:15:20 2025 X-Original-To: dev-commits-src-all@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 4ZN9MX4qQMz5s45s; Wed, 26 Mar 2025 15:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZN9MX2SyDz3JSC; Wed, 26 Mar 2025 15:15:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743002120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2dss2/GGlRBiwPBKyTxt+u8Y4z3cghG5GG+iD4ZW57Y=; b=PV+D/y5XYiojWuGzwRFpYUTqQeE2UtPQPpj7SpJju90N8fJZZZF1cdsB8/19mnU8/V+OlS TboBzn7kicFwAZSrAsmGCygnAJF7ij/jS89QAQRuF7bMyLnLMgvQgoCiF5syi9VLiokVXl vHsPCXTzIrxrSDDepi94ILBeuGGE7xL2K1VtxZf5pIyLnL8FKg2ksvht16duj1f9uLjwZz hfaqMnh5TwWLqcKc98L5ijfKZt9a4l+JPJpbBKJeWAaxbCZL0WgR8/Npjhc5dXSiHPzSvf vxqP8xYhZDZJoAlDMMQtM+NdoJ58HBK5bHd0CMeDeUiQ8T7YQLmhF/cNReSRlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743002120; a=rsa-sha256; cv=none; b=l0lKWyP6g99doGiw4u2rTXa85np/Y6PBBf23rPrqZhmL3YrBtpjCOdJFXGd9PERME17DXd jz0XEP2zZ0OrYs2k4duqlvJtM1UkYKCe0Hk167WmWGmrQYSTUbv4O5dB8gPjK5AUfKVyE+ EShLHNcWWC0Q3TQap7xj3hhpK57aKlP4Jc87L3aSx1gw3CgS/4kdESKz4CjyDb76foqb79 u8UU8Yez6GVcNOUVJjCiBnFYCS6uUmizP+VYwIBqYxkUAnqPY7jpLh2hP+orLSg2Op8IEG fh1gcefAejTyvjSrlruhAT4sybQqUVT31U55Rw55StZaG14dfY77B/q+VMKbSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743002120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2dss2/GGlRBiwPBKyTxt+u8Y4z3cghG5GG+iD4ZW57Y=; b=cN88lZ7MW+CeDlTTG4sIppFpUlqn8qtTseQcHTBM91KfxlINijDJKdxxJEs4wGft9NCaUd kmARFgabda24RTYcubjX75XyXvt0scOSPd+7yBqysn+kqv2IaWGN5sn2LMHSzBhkEAcGEk xc4xFrVOApEYd6c8w/yJrzm4xLPHK9vvHD2Sk9jy/6Q4l4wjNg/TobpLNBy5K/VAMTUfMq Z83zfIfoCv9rIEEXpEka9tZtxW52beJo7ecrXUPgVHZODhVZYQ6JrqUnKbC8EvnZniva1z n0jHY+c875g5vJv2V959GMT0fl3gAs83vAwmx+dOkt7aaJ3kV5uKrup2K153Jg== 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 4ZN9MX21cWz1dh; Wed, 26 Mar 2025 15:15: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 52QFFKVi097130; Wed, 26 Mar 2025 15:15:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QFFKfo097127; Wed, 26 Mar 2025 15:15:20 GMT (envelope-from git) Date: Wed, 26 Mar 2025 15:15:20 GMT Message-Id: <202503261515.52QFFKfo097127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 3969b51ffa1c - main - xilinx axi ethernet: allocate memory for buffers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3969b51ffa1ca8c863d9a9ddb85ad18aaf2c030c Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=3969b51ffa1ca8c863d9a9ddb85ad18aaf2c030c commit 3969b51ffa1ca8c863d9a9ddb85ad18aaf2c030c Author: Ruslan Bukin AuthorDate: 2025-03-26 14:52:29 +0000 Commit: Ruslan Bukin CommitDate: 2025-03-26 15:14:13 +0000 xilinx axi ethernet: allocate memory for buffers. The xae(9) driver expects that the "memory-region" property is always provided in its DTS node, but this is not a case for every platform. If the property is not provided, then no restriction on buffer location is in place and busdma backend could be used. Since the Xilinx AXI DMA engine driver does not support busdma(9), then allocate some memory for buffers manually, so we don't panic. This fixes operation on Codasip A730. --- sys/dev/xilinx/if_xae.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/sys/dev/xilinx/if_xae.c b/sys/dev/xilinx/if_xae.c index 080b13606525..97e7aa16dda4 100644 --- a/sys/dev/xilinx/if_xae.c +++ b/sys/dev/xilinx/if_xae.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2019 Ruslan Bukin + * Copyright (c) 2019-2025 Ruslan Bukin * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and @@ -43,6 +43,9 @@ #include #include +#include +#include + #include #include #include @@ -94,6 +97,7 @@ #define NUM_RX_MBUF 16 #define BUFRING_SIZE 8192 #define MDIO_CLK_DIV_DEFAULT 29 +#define BUF_NPAGES 512 #define PHY1_RD(sc, _r) \ xae_miibus_read_reg(sc->dev, 1, _r) @@ -834,6 +838,8 @@ setup_xdma(struct xae_softc *sc) { device_t dev; vmem_t *vmem; + vm_paddr_t phys; + vm_page_t m; int error; dev = sc->dev; @@ -886,11 +892,19 @@ setup_xdma(struct xae_softc *sc) /* Setup bounce buffer */ vmem = xdma_get_memory(dev); - if (vmem) { - xchan_set_memory(sc->xchan_tx, vmem); - xchan_set_memory(sc->xchan_rx, vmem); + if (!vmem) { + m = vm_page_alloc_noobj_contig(VM_ALLOC_WIRED | VM_ALLOC_ZERO, + BUF_NPAGES, 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0, + VM_MEMATTR_DEFAULT); + phys = VM_PAGE_TO_PHYS(m); + vmem = vmem_create("xdma vmem", 0, 0, PAGE_SIZE, PAGE_SIZE, + M_BESTFIT | M_WAITOK); + vmem_add(vmem, phys, BUF_NPAGES * PAGE_SIZE, 0); } + xchan_set_memory(sc->xchan_tx, vmem); + xchan_set_memory(sc->xchan_rx, vmem); + xdma_prep_sg(sc->xchan_tx, TX_QUEUE_SIZE, /* xchan requests queue size */ MCLBYTES, /* maxsegsize */ From nobody Wed Mar 26 15:49:12 2025 X-Original-To: dev-commits-src-all@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 4ZNB6d41pkz5s6D2; Wed, 26 Mar 2025 15:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNB6c6km0z3d5N; Wed, 26 Mar 2025 15:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743004153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWAD6/60J+iTc8pJvogwQPbiKHWYcvw+sd9qxhbws/4=; b=D2ENSThFqA6kxz1EB6+PRPuhjyPyhrI/5XKvXdTzfhunG7kzCjEGWbLjmLUXo1ERkpsvtJ 8QUUg04+/owMwggLFL6AjKdlDENPzRdD1CEsvjqKFMo6OuXDRcRHCh3Qz+oc+UKmyLg27+ 73+I/QHmBy+r1dqOB/LIMpBx2LnIamH8OKi8QpSThqqZAlSb7baOr6yub2lBC6zYrsKG1K 02jU9vGU5CmFAp+WGVUJDZXq5yYiCzfAZJRb+Wf7FhYGimt9fCTDVdWeluK1dbZlXFivtF Q5sMLh/OI9kHwUSxzJnJ9znZX+nwpMWl04u/DVRhzBpqJzIkWG1J8Ze3I1T7cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743004153; a=rsa-sha256; cv=none; b=oXvSRyPMBRoYxXt72vi0yiMP/zdr4iB+vjMzU3EZxc2clZ5MIY1140J2fBc7xH9wJcuIzI PkuPLl1LP6i2r9/cIMzguQdQc1tGn3KslYdfVkO6V06H6EKlgm+em+1st0/mGavK8d0cyL 3kGSiXIznc+Oply7TcUgVi+pG8/9DFmR7XILcLy2a6c+YgO6hTuT7ojZ2wXGj8VZCiBMEG 2iBerC4Jb6dgOyKIAdyt5DaR2NcxDoUdl1ACb3sot+yLlOBAQXZMGTIuGqRIs7is+fIVe3 +vDPqQ5YN8GIuG43dXQyBWA++XmskiOjCRxBc1sPo3N9uyC43sBjgSwN+tuS8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743004153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWAD6/60J+iTc8pJvogwQPbiKHWYcvw+sd9qxhbws/4=; b=gaIa41jpmCVnCL5goEBZDmtppTQGtCQwcpgodtKZ4PqkvyZOPunZz1lmoN21BDxQRa90UV Uxw47+11/m7JwWfChuJATR2j3CTU3ZXTqG1Zg7T8A3dBaqeLAfYpbmuk4qQ/rsn4rVP3DH ToGsxeD7o5NC/8S4dYbvPaH29Aiv+8JEQNTg3eN0ehaZ7kmNvHSLAea16KsxWYdbY+18pf Ler3foRzF+NB02q4mSb4ugGQvwt26wcXxTY2epWkQlVmyamm4juTQ0l7tLZTy+0MHDAP2/ JOD22POm3035ugVmyXnyfUSLjEoHHwmKe/deds+EN7c21bWYxTKPY2NWR5iPNQ== 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 4ZNB6c5fYTz2Vg; Wed, 26 Mar 2025 15:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52QFnCm6054044; Wed, 26 Mar 2025 15:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QFnCG5054041; Wed, 26 Mar 2025 15:49:12 GMT (envelope-from git) Date: Wed, 26 Mar 2025 15:49:12 GMT Message-Id: <202503261549.52QFnCG5054041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 69c5f7b4ca36 - stable/14 - pkg: Fix Coverity warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 69c5f7b4ca368636a6a9fc7d8e0a99d4f1753e30 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=69c5f7b4ca368636a6a9fc7d8e0a99d4f1753e30 commit 69c5f7b4ca368636a6a9fc7d8e0a99d4f1753e30 Author: Mark Johnston AuthorDate: 2025-01-16 15:09:58 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 15:48:01 +0000 pkg: Fix Coverity warnings - Fix allocation size in config_get_repositories(). - Fix a memory leak in read_conf_file(). - Avoid a null pointer dereference in an error path in verify_pubsignature(). Fixes: e3b4a51580fc ("pkg(7): expand VERSION_MAJOR, VERSION_MINOR, RELEASE and OSNAME") Fixes: dc4581589a32 ("pkg: clean support for repositories") (cherry picked from commit c1557708f1fae1bb9c8e23e3bbb2aa2b055e1211) --- usr.sbin/pkg/config.c | 17 ++++++++++------- usr.sbin/pkg/pkg.c | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index 16f7598fc745..44543f304657 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -477,9 +477,9 @@ read_conf_file(const char *confpath, const char *requested_repo, { struct ucl_parser *p; ucl_object_t *obj = NULL; - const char *abi = pkg_get_myabi(); - char *major, *minor; + char *abi = pkg_get_myabi(), *major, *minor; struct utsname uts; + int ret; if (uname(&uts)) err(EXIT_FAILURE, "uname"); @@ -503,9 +503,9 @@ read_conf_file(const char *confpath, const char *requested_repo, if (errno != ENOENT) errx(EXIT_FAILURE, "Unable to parse configuration " "file %s: %s", confpath, ucl_parser_get_error(p)); - ucl_parser_free(p); /* no configuration present */ - return (1); + ret = 1; + goto out; } obj = ucl_parser_get_object(p); @@ -518,13 +518,16 @@ read_conf_file(const char *confpath, const char *requested_repo, else if (conftype == CONFFILE_REPO) parse_repo_file(obj, requested_repo); } - ucl_object_unref(obj); + + ret = 0; +out: ucl_parser_free(p); + free(abi); free(major); free(minor); - return (0); + return (ret); } static void @@ -675,7 +678,7 @@ config_get_repositories(void) { if (STAILQ_EMPTY(&repositories)) { /* Fall back to PACKAGESITE - deprecated - */ - struct repository *r = calloc(1, sizeof(r)); + struct repository *r = calloc(1, sizeof(*r)); if (r == NULL) err(EXIT_FAILURE, "calloc"); r->name = strdup("fallback"); diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index f19c93c6fbb5..305181699e4a 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -669,7 +669,7 @@ verify_pubsignature(int fd_pkg, int fd_sig, struct repository *r) pubkey = r->pubkey; } else { if (config_string(PUBKEY, &pubkey) != 0) { - warnx("No CONFIG_PUBKEY defined for %s", r->name); + warnx("No CONFIG_PUBKEY defined"); goto cleanup; } } From nobody Wed Mar 26 16:39:06 2025 X-Original-To: dev-commits-src-all@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 4ZNCDB5mdRz5s8gv; Wed, 26 Mar 2025 16:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNCDB4TvTz3xL0; Wed, 26 Mar 2025 16:39:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EUa0XX92uly75659Wdgc0ZF8E+TdNu/d16eEsbYw6HA=; b=Muja1B30iGa1dEnGAZ2z08exNBUmEo7N/7ZJNH3G1XTbuSD82XFOMRNKzvo1an84Z+jXIt 3Ox75JXzKxBzPxRgyNvRGbKBek+LsA+elyAhpZTowYTfQu6Nugh7uYcL2SD2jB0nvUd3DR 82t1/B6+Y/j8HWFJqlw+LSIKVgZEZDJHd7ZTbfvIa3O3IbH2xZ8OrZnsSxU6faL63kpAH+ ISYG2FUH1exxJWdpDVXv3oPo0Rv4jXgKeMC+LKCuxBy3BniQB+Tvd/l8MUbbp4bIAjLrPq 1utYDMFeE1u/i061w9XCAiI1HQDQJouSIUzvBXD6j47b9GXyLSVJND5ygoWKVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743007146; a=rsa-sha256; cv=none; b=LbF+xXoEtn3hkOVVEmCwDNgI1OR5C515r1vd6I25MNfpVIF51bpr+/GXVLGbGAxjPbYlot 1P7zODwAKfA7tPfl/eQ/ncl2+QXlaNjNJg8o7JL66fBFR/dn0ObU1y1JjEZ3Zbu+N8o2FD CknsKIBDH7JLUzNIX9XKQd78HFaxwYidXdTONwP+d0tBHmKXtyKphvj33Q7obRnZ602Amk BUCDSdEWydzBUdwnzgYQVRWG+GmTtzeGzkzWKx1m8ngoSRa7P14xa3DR287GfxYHVnOcQY 9CZwXRlSRcgC2YV0R8JPHa1P3IE5HW2t6oRJme3qD0j15Conjgzj5z6PXNLt6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EUa0XX92uly75659Wdgc0ZF8E+TdNu/d16eEsbYw6HA=; b=C0NR8GwIdBED3iWqmKgrsiC/DhZwl1ShZGfJtfVWrkFUDkHA1HQnsKQcg+IwR8tDviUiuw E3TIHi9PdmYNsPGiXKQlYz7jjijLXzaERfYpiRudwfJxMsTferuJy14Sxm8XVRXon7IfEH WMJVzOluN9gX1BcPAQVhLpLAvnoNhnyfpIikdX8c3IND7/AXUWgguCpkos2UxSDGhvMR7D F4tUFztDg9Q+jkZhk1og3CEf1BFWLTEFgyG8aGHeODIS3CwFGDCNu6YeLn+e8O4+AVvzDe 3dBnxbedeVuR27Um73vpJzFGQgwjwKyHaPq0pUf4tMLVbUjnm25FUR+ZdfubmQ== 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 4ZNCDB42y7z3Fq; Wed, 26 Mar 2025 16:39: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 52QGd62W047630; Wed, 26 Mar 2025 16:39:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QGd6wW047627; Wed, 26 Mar 2025 16:39:06 GMT (envelope-from git) Date: Wed, 26 Mar 2025 16:39:06 GMT Message-Id: <202503261639.52QGd6wW047627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: f47cbb29e1c2 - main - hier.7: Add /dev/gpt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f47cbb29e1c2bcb5b5ad838d2d5342a47b0c4692 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=f47cbb29e1c2bcb5b5ad838d2d5342a47b0c4692 commit f47cbb29e1c2bcb5b5ad838d2d5342a47b0c4692 Author: Roman Schmidt AuthorDate: 2025-03-19 06:05:56 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 16:38:01 +0000 hier.7: Add /dev/gpt While here, fix a typo. MFC after: 3 days Reviewed by: mhorne, emaste, ziaee Approved by: mhorne (mentor) Pull Request: https://github.com/freebsd/freebsd-src/pull/1608 --- share/man/man7/hier.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 949b521ab3d9..c5fb3cf0a7fb 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -156,6 +156,8 @@ file descriptor files; see .Xr fd 4 .It Pa fd0 first floppy drive +.It Pa gpt/ +filesystems by GPT label .It Pa mmcsd0 first SD storage device .It Pa mmcsd0s1 @@ -168,7 +170,7 @@ infinite loop that accepts anything and contains nothing .It Pa nvd0 first NVMe storage device using NVMe namespaces .It Pa pts/ -pseduo-terminals; see +pseudo-terminals; see .Xr pts 4 .It Pa random source of weak randomness; see From nobody Wed Mar 26 16:44:56 2025 X-Original-To: dev-commits-src-all@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 4ZNCLw34YKz5s92Q; Wed, 26 Mar 2025 16:44: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNCLw2LjMz41yT; Wed, 26 Mar 2025 16:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RC8kVe2WoSO5xZniuyE4s4G/GYPesXB/1+rcfBvV3c8=; b=jFbZjA+9ajN9hiOC2Q+JyJX85Veya8MdsEHILYTeIap1/Fe8SlpqtAlUIam56c6025BN7t rz3vevB64aJsMxU3emcttG4AIrDfl/GXnA1P3RHES6US04noVK2N0DA6uKgR4RRkvcu2sr qhB8m442pyt68cXJhKjhTWJKsrAQM1IUUHPl5ru3s3/+lkcqW10zpZ2eej3KdbdUAxlRxC k10gM2Z9LlyvAuSGqKcaxZuXPLmiH17EFNEv4kERIIB6sQ7wolVPWbugT7LGRmlpqJv1b6 o44jTTUce/WdndZE7psk+uOxDLrOM2GQqV+oG1Dj+NrrJWaiEb3nupPLeFtiHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743007496; a=rsa-sha256; cv=none; b=Xaxb67xkE8hRU9nEBLWLxQ4BjyO+chMsKXiLiCr7sARJEjNI5+F7+SqV4Brmsh+Kxu8BNf lhWBoAkgC+bjbFv3fMcQpM4XaqKaq8X/WTjuN82ynjRtdrAGoM5lXoDBSesoAgQqkCLxZh jeZ3K4InDqWmvgW6xV9vXBReYEkpg7ar6mAjdlXmRH1276rBRy/Kg0JznolHaH2s0tGdUG p7Qp98LJBxovUgTppZjZg7F47qSEw0pREUmPT0+uNFXUFzqSQ09WPW1tj7qybiM0WSM4HD k8c2YKOszGTRkraXgyXBhiFcxzlYTPSyKpMM/06wfTVxQZQcvm3/KcuZqM/k4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RC8kVe2WoSO5xZniuyE4s4G/GYPesXB/1+rcfBvV3c8=; b=uKhV7VQxsVkgydE1a/P4j9mZy+aTwo//oIOEDZeVOYxvc+buZjokU1uMNXtMTJSNZb5ft/ oySoYLxPcCyl9tlteO1baIK6jjWf8TRXyD3iKkPoGVyp5R/vGbE9JC4pBbPj9+mIzT8t+g 0BXkt9J/9hNJObPv7bmD4bA17oo8Q9Q8hE2Pq3YBWPnJJ5YCkKRCKm+oHMTXsjI6yiff6B qLiet3eeOrR3XA3D5+EHeRO8PjGa4P5fiFH7FknAdVp6qhDrS/hWvfOXZeWhxu/+sRbnRi Cl+Mgn0sgI0SV18aU9Sya9fI6EXjNHTGCXr98Wj4U3J9N+y1hqMHgqx6VqjNgA== 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 4ZNCLw1Yf1z3Jc; Wed, 26 Mar 2025 16:44: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 52QGiuWN065100; Wed, 26 Mar 2025 16:44:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QGiugi065097; Wed, 26 Mar 2025 16:44:56 GMT (envelope-from git) Date: Wed, 26 Mar 2025 16:44:56 GMT Message-Id: <202503261644.52QGiugi065097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 8d65152cbfc8 - main - intro.5: Add local to files, minor maintenence List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d65152cbfc8861f6920846dea6f540c673ab7b6 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=8d65152cbfc8861f6920846dea6f540c673ab7b6 commit 8d65152cbfc8861f6920846dea6f540c673ab7b6 Author: Alexander Ziaee AuthorDate: 2024-11-17 17:07:34 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 16:43:54 +0000 intro.5: Add local to files, minor maintenence New users are sometimes confused about the difference between /etc/ and /usr/local/etc. Explain this in the manual as we did in intro(1). Link hier(7) which now lists base system configuration files in /etc/. Add a section number to HISTORY for clarity. PR: 248562 MFC after: 3 days Approved by: mhorne (mentor) Reviewed by: imp, mhorne, Lexi Winter Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 --- share/man/man5/intro.5 | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 78e147975e81..1c746f37a399 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,25 +28,28 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 16, 1997 +.Dd November 17, 2024 .Dt INTRO 5 .Os .Sh NAME .Nm intro -.Nd "introduction to file formats" +.Nd introduction to file formats .Sh DESCRIPTION This section contains information about file formats. .Sh FILES -.Bl -tag -width /etc/shells -compact -.It Pa /etc -location of most system configuration files +.Bl -tag -width "/usr/local/etc/" -compact +.It Pa /etc/ +base system software configuration files +.It Pa /usr/local/etc/ +locally installed software configuration files .El .Sh SEE ALSO .Xr apropos 1 , .Xr intro 1 , +.Xr hier 7 , .Xr intro 8 .Sh HISTORY The -.Nm -section manual page appeared in +.Nm Ns Pq 5 +manual page first appeared in .Fx 2.2 . From nobody Wed Mar 26 16:44:57 2025 X-Original-To: dev-commits-src-all@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 4ZNCLx6b8Hz5s9JK; Wed, 26 Mar 2025 16:44: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNCLx2LMMz42Km; Wed, 26 Mar 2025 16:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzrpGftVjNeAet0ojZTg3ROkPmZvo9h4V13w9of/Ap0=; b=IkfKgxpXXPrmKSra9zyt6uDp3Lu67eEBJWytcL16sJbQPDuzSwuYp4z9/oKcVKktVN1A0E /ReV6uKtYzhyk2mk/LIx88YaKDwVx4sjrmaVBXSX7kbvyf1WtUuyvVDkyk2LGsM3eP0w0/ xmv1b8CIhpdmq7m5YXJdISi4tDvDg1/6rgPQ6NPVOZsuJpDd6whASMwyCJIO7Kg3lolkTT CNNF6MjiyOFfe9yz6eTbilFoWKJRvHlkC0ma7d2MDb1iwhjxzUVFf8i4xApwWxJ0Ulc70h 04qKldJOxNh5dJ4d+oF7FGbbUk+WQCZK1osdGhCSykFYWrHWUlAwfnOuvY8FKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743007497; a=rsa-sha256; cv=none; b=ZzJ+GXzbH8K/XTQIUuqbgztFCAVsrKZ/xSOuKXRdPXzcxXAimA49EqMd7Y/5GBhvsoRG1+ HpDI+VYiETtNMpj3nZdpaN7WWE2E30d5I9/2+P4MDkuYbWYNuQ5aqL/xu4xlRIWRTiLi1L 3AF5Jfoz52DxCYWN+8r1TdRRiggI9wDdmBJvhva+rN0M3aWlkpSHmMg+xkb/m52JBp7+0u 4xqX5R1G/IWBfKRa+xMT3fgnBbHudvxWYNqRxIusPW9iuluPHubQORDFJQxozjr1B4OJrv P/byaBAjwPGZ9sAhvEO6HKSlSrRZmQ09oOzsbV+R/YnjKvO94935ClKTS7dg5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DzrpGftVjNeAet0ojZTg3ROkPmZvo9h4V13w9of/Ap0=; b=wGUrZ4kzESGJ/TFneD7dks7bBVveSYaNWMJf1JkfbZ93aOTQKdOPxDznsmiPxbzEt217dj BuFXa5ZHa9kTMcy5oDX8X61uwhqlGz58sUojQbXczVABf8/r3oOcO2jiX+Odi0DrzHKg/a by6mfQpdjOTKnHTztZgfMuNyiacJq/EmFmM7aw1NtuU0zeagr7D+NOQAofolLlEEk1VKEG yggwEkukLG/xrtq2sa4ICt/q0ni/LVpgv/n0ciMLaJfgR2iBkJgzVz3wWu+azHYni1UJTd hj4YgZAjG+QpNJaHYRG9EsSjULVHsG2A2MlYH5mcaiW0N7wHia+dzByAgDmFOA== 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 4ZNCLx1sZsz3DS; Wed, 26 Mar 2025 16:44: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 52QGivBC065135; Wed, 26 Mar 2025 16:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QGivLM065132; Wed, 26 Mar 2025 16:44:57 GMT (envelope-from git) Date: Wed, 26 Mar 2025 16:44:57 GMT Message-Id: <202503261644.52QGivLM065132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 26ec37653662 - main - intro.5: Import description table from OpenBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26ec376536622e8fec8f40847aa9b2d1121d585d Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=26ec376536622e8fec8f40847aa9b2d1121d585d commit 26ec376536622e8fec8f40847aa9b2d1121d585d Author: Alexander Ziaee AuthorDate: 2024-11-17 17:10:56 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 16:44:16 +0000 intro.5: Import description table from OpenBSD Looking around at how everyone else is doing it, this list seems nearly perfect to me and we should just import it from them. I have added "and streams" because we have some explanations of those in this section too. PR: 248562 MFC after: 3 days Obtained from: OpenBSD Approved by: mhorne (mentor) Reviewed by: imp, mhorne, Lexi Winter Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 --- share/man/man5/intro.5 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 1c746f37a399..60328a4bed06 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -35,7 +35,16 @@ .Nm intro .Nd introduction to file formats .Sh DESCRIPTION -This section contains information about file formats. +This section contains information about file formats, including: +.Pp +.Bl -bullet -compact +.It +ASCII configuration and resource files +.It +System binary file and stream structures +.It +Composition of database files +.El .Sh FILES .Bl -tag -width "/usr/local/etc/" -compact .It Pa /etc/ From nobody Wed Mar 26 16:44:58 2025 X-Original-To: dev-commits-src-all@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 4ZNCLy66ngz5s8w4; Wed, 26 Mar 2025 16:44: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNCLy3Pdgz41yX; Wed, 26 Mar 2025 16:44:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=04gvSZ0CqboYefztosfbhUwJrFiCfXGs0698Ua74ZNA=; b=Ttmjw79MTw5ksbId5PXHdx7OYGG+n2jxaP84BH5mutKDwiFjc+jmXENJehSvV8JmEBzV0a L8y3r0p3ZWaeWrswsd3NBMYtPPgsI72eE8W/2JdOc+sqe/Hd8z77YsbpBTJAV5M9K5v9mS 3ZFRg5QaKIVDTyiqeXdLSAoQACvygFFa7jWr6bsXF4gDF10t684ams+yBlFy6jyZ5Ihxsa lPR7DpMubEZgnjHjv2UDyM5xqHJa8V3K6x8NiuSNUhnlGmG7rmz4FsfmbD81PqqL7RXNyQ uuOxSvKrJUSRYrqaM+eJ1PhWpOg8WE0GWKo8ZiaOu2YZUzUCio0IKj4z1HaajQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743007498; a=rsa-sha256; cv=none; b=fbbi+OFPbBFuRx19KpINaZuw8HvjKahMeowkFgwA4W7b3Su9cpPw8jhJk7muVP54kvsyBh mS7MKB8wuU0Piq+U2NI88995I4AlVg03GSGLeTeIjbKaT4QhkS/RSKmG2MVVhIelU5W45q Lq34oei8hwhw+eaBwpSoX3QIcGYQQFhQwm0gt+Q9ROsnelKXoY54rrpkYz0mihcCBxbSNz rvCkWXwQcTgytlJBJLcL+Yu4QPD7sCEO2UzUrzvQlBWb2/1SBm5TOwlDhPAuT8A30dsonr kIze6cNaDpnvvMkHP7EAMvlZa54zOeC/0GWukb+pY0/DineV89TJIwH+wTte/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=04gvSZ0CqboYefztosfbhUwJrFiCfXGs0698Ua74ZNA=; b=xMG9+onastVzVgGCeEQAwEXak8j5euDNVjGnGvG5AGefKzsVphYf5VNAAilHvCznMMjNq1 uUZQk9nnDwP1YhbckKE4gmq69+90PbOzaGZR5zar9V4Pkvey93PgEZfaX09X6xBrP+otXH LFaeA6vU+nE2tNHAzCQsIs/vyyj0SKh1tyk4KJ0TIJgZuplXuhUDKMRWt3F6+oX+tX7o8E 815qPmagAsRb+yJ0aobjJrKt03TDYrExrmm3EZL7STR71M/MxLlb+kLlVFVuXEHHDM9tEv Yig4Uo/uVGC2b0EOfVrnp/JbT07Iv5tK2f0MOQGP1s0KfwpH8JE3xEf8lMMFLQ== 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 4ZNCLy2ryRz3Mt; Wed, 26 Mar 2025 16:44: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 52QGiw1W065169; Wed, 26 Mar 2025 16:44:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QGiwKO065166; Wed, 26 Mar 2025 16:44:58 GMT (envelope-from git) Date: Wed, 26 Mar 2025 16:44:58 GMT Message-Id: <202503261644.52QGiwKO065166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 37508388d066 - main - intro.5: More verbose introductory sentence List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37508388d066826d0a36b5ec646c95a9ffb00d28 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=37508388d066826d0a36b5ec646c95a9ffb00d28 commit 37508388d066826d0a36b5ec646c95a9ffb00d28 Author: Alexander Ziaee AuthorDate: 2024-11-17 17:14:21 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 16:44:26 +0000 intro.5: More verbose introductory sentence Explain a little about everything is a file, matching the style of earlier intro pages. PR: 248562 MFC after: 3 days Approved by: mhorne (mentor) Reviewed by: imp, mhorne, Lexi Winter Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 --- share/man/man5/intro.5 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 60328a4bed06..525d6801aaad 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -35,7 +35,10 @@ .Nm intro .Nd introduction to file formats .Sh DESCRIPTION -This section contains information about file formats, including: +This section contains information about the file formats +which comprise most data structures in the +.Bx +environment, including: .Pp .Bl -bullet -compact .It From nobody Wed Mar 26 16:44:59 2025 X-Original-To: dev-commits-src-all@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 4ZNCLz5spVz5s8w7; Wed, 26 Mar 2025 16:44: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNCLz40H0z42F5; Wed, 26 Mar 2025 16:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vpPr/q+h3ljMqhMRsuDXjL/EJDZT49VnydQmZP4M0Lo=; b=CFEQ3JQR5RXpIxKsCzYJQctVTgJGzR00s3jHXf700h9FWwNIYJxIxbEXUqWr607YYlNLek fAp4jv4qM22hBCRAkhpuRy/nzI5Qx8m2xdx4di0S6Y99L7mc4yFp90doLQUyrGjEsYn9w9 uOTK2L8+8wghg7Ihj9ChFdz6fiJuH7gT7f320e9lKh1+dii8Zx7GaojfHVwEA4nQAPbRbF 3s8l706wTUNksBLX7c800zc+ziQtShJnWHSM349q77pwX+i3o++EgFS7GWUbkVaXKBfQ04 ZAIKuG9Y2DpvO7RwGSJrI3KFbtwfXZRt+34cMVFX1reG45/Z+IMtFnyA01QVxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743007499; a=rsa-sha256; cv=none; b=XVUK2F0CTCW0/ZGpVq0IdF4mmAp2VDUNSc9ktCXbVFdN0DiF+YAUUcv3d0wdbrsNdFvMCD kwory0rpFlMHfOwcyMyLJh5KJcMD20r5X1eF9ulbFbzntTrk6AAFY62npdHS5gqpoe26VH pqeHLJWNWy6sltE8LNmftjuEyqONGsLUIaibx1nLcdwi8Bq39j1HP7SrUjt2l24dnYmnqa FfOWmVp9pnUQKusS9hkZoPe2wmqnphiEv0K94vXrgyiqHycK9qTUcJufMBUg096AN1iOrM ci3/AqJw/aSU5Cwkhy1ctNAJ/fT4o7LzYp7rzMvq4omSFxoyc0UE9sugn/ArlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743007499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vpPr/q+h3ljMqhMRsuDXjL/EJDZT49VnydQmZP4M0Lo=; b=PlE3Vc/2Wfc6xtF/KaEtaCIYzf4gqF+wKab5DEpb7FwlTQKKAvg3oVumHjXlEXBdE56ItY 4JIiYZI3kRG1xd9b4hcEAOE6GskaND4icPQV2XA/YXRu7dP0SSpcZ3tHgEO78d4sd0J1ca c5zItgnlj1kffln5AE/zu9tR1a6Et9Tcw+Wrad3wy566UkH5rnYVFB3mxRcOzxKXdG+0vw xW6bL0KP6t7FmH7cbdbEfmibVHgaobrMeoyVQu2pWtnNRDM2k+jjFl/YcWps2FpERtpFyZ NtWxb8yNzoMYlVAXr7z+xT/JLu7DI7iTVD2XCJLd6QGCaRMX4VZ64pq4MQVrIg== 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 4ZNCLz3Wzgz3DT; Wed, 26 Mar 2025 16:44: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 52QGixpQ065204; Wed, 26 Mar 2025 16:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QGixjf065201; Wed, 26 Mar 2025 16:44:59 GMT (envelope-from git) Date: Wed, 26 Mar 2025 16:44:59 GMT Message-Id: <202503261644.52QGixjf065201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: a6175f28da70 - main - intro.5: Crossreference ascii(7) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6175f28da7018ba9f824f48fe6db732bd9cb501 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=a6175f28da7018ba9f824f48fe6db732bd9cb501 commit a6175f28da7018ba9f824f48fe6db732bd9cb501 Author: Alexander Ziaee AuthorDate: 2025-03-23 18:41:09 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-26 16:44:33 +0000 intro.5: Crossreference ascii(7) Since the beginning, Unix has included an ASCII chart. Over the last half a century to this day, the most common format for lexographical organization in files is according to ASCII. Consistency is maintainable and for that reason, crossreference ascii(7) promenently in the introduction to the File Formats Manual. Additionally, this demonstrates the often softer style of bullet lists in the manual tradition. PR: 248562 MFC after: 3 days Reviewed by: mhorne Approved by: mhorne (mentor) Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 --- share/man/man5/intro.5 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 525d6801aaad..3e67b319da14 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -42,11 +42,12 @@ environment, including: .Pp .Bl -bullet -compact .It -ASCII configuration and resource files +.Xr ascii 7 +configuration and resource files .It -System binary file and stream structures +system binary file and stream structures .It -Composition of database files +composition of database files .El .Sh FILES .Bl -tag -width "/usr/local/etc/" -compact From nobody Wed Mar 26 18:08:26 2025 X-Original-To: dev-commits-src-all@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 4ZNFCG6xvHz5sF4c; Wed, 26 Mar 2025 18:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNFCG5k3Mz3hvt; Wed, 26 Mar 2025 18:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743012506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOqT/51vfeagMJrBBXCOYykMkQ04ARA1qDhhjWlS8dM=; b=VsIXHVQDjNV8AUzANZx3fHJ760bK96Ri+V5Bby0WXffTjUonFdHzmg3kIlip2oM32fgHSJ brCsjK9Ne4RoYSWchtXaFwWg0exMb/afR39vTkXsyqCCJP6BVkPt2ujBdf4Q0Lv98M8eBh zPD9J4kQFIfkUc4yZ1OSxMXkopwk09ZtF5hxKiZkAfKx7CIbCiZuoWyZbFlnZEW45ZRJ8Y JVqwAibY5Ggbe8pWJ9z9ohiEc06tgVf9kAJYTlZn0a1umuMIev935oboQP7S+96Ml33lDb ODA2njJOUnbnC0a0ytFvuXyKCKwaPW5indCTyX4Xy5Tjaw1cGJKxLiKT+YIpnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743012506; a=rsa-sha256; cv=none; b=vDIwYn21rHAv9fwxNnDVuBjEAHvrUqlm7+4YmDhVXspmHyCamLBdwFqr1MLWbOJOeKcVnE zkWOTsL8YjbtZQSIl+X5qmdY+DJoq6qrqkQwhuTTDXGFk8xgJwhdUP+69tZZ/WbiYlgpOK zo+2eWbtBXxivOUWMhX6YvHP1hLFoMHxAbpOGSRxHm/p94swGsXB23z3qWVGGLWyEQ1Ltl hiiHtrKlhTkw1dDbnvfIb3smkcKBsS4KW3XbS9CS6KV+pJujyFUk96sLA01/r1XB3RlLLS ekuDKKDxBDYpLL56U62uCQfAhjlh4YiQyQyGv/hcioF173mAcgVF+8MEsRJvdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743012506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOqT/51vfeagMJrBBXCOYykMkQ04ARA1qDhhjWlS8dM=; b=gyuhyXhUecpUl2kIVqhsK1vVTFkQB42f/JMtY6HJHS++JkVZTleKhCK2alvw0qj06wjY6L g86IMxH82+sV30OeF376i6PttK/6IQ5QJcDPZttM+2vDUdTe+kCcVhJ1ysSNbPV12X+C06 wyJTukrOVgM5wKrlVoUU3TySnZR0ncuy9TElU3iAIrKICEg+OwJnbyTJN5hTAW8KbJvJ9x LJMN29mH+DIjRnNWad63uasYNiKYA66Pwtv0twuOgFREbSwfrnvB8Boaa25rwFlTqQpkmv nGXgd19ZsZwnOQiTa4MCTocZ731Bq87C15aeTtmR1yqDkAbUVHG0GSPJZVLcAA== 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 4ZNFCG4m10z6Cn; Wed, 26 Mar 2025 18:08: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 52QI8QKl016483; Wed, 26 Mar 2025 18:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QI8QnP016480; Wed, 26 Mar 2025 18:08:26 GMT (envelope-from git) Date: Wed, 26 Mar 2025 18:08:26 GMT Message-Id: <202503261808.52QI8QnP016480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 2adc0bae0b46 - stable/13 - fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2adc0bae0b4613282f2a954089b5bdad487a4c2d Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=2adc0bae0b4613282f2a954089b5bdad487a4c2d commit 2adc0bae0b4613282f2a954089b5bdad487a4c2d Author: Enji Cooper AuthorDate: 2023-08-08 13:42:07 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 16:40:48 +0000 fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0 `INSTANTIATE_TEST_CASE_P` has been replaced with `INSTANTIATE_TEST_SUITE_P`. Replace all uses of the former macro with the latter macro. While here, address the fact that the latter macro doesn't permit some of the constructions that the former macro did, e.g., empty parameters, etc. Conflicts: tests/sys/fs/fusefs/fallocate.cc (fix applied manually) tests/sys/fs/fusefs/io.cc (change reverted) MFC after: 2 weeks Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D41398 (cherry picked from commit 811e0a31acafd6ab21f89bec8ba0fb8c09f258d2) --- tests/sys/fs/fusefs/bmap.cc | 2 +- tests/sys/fs/fusefs/cache.cc | 2 +- tests/sys/fs/fusefs/dev_fuse_poll.cc | 2 +- tests/sys/fs/fusefs/io.cc | 6 +++--- tests/sys/fs/fusefs/last_local_modify.cc | 2 +- tests/sys/fs/fusefs/mount.cc | 6 +++--- tests/sys/fs/fusefs/read.cc | 4 ++-- tests/sys/fs/fusefs/write.cc | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/sys/fs/fusefs/bmap.cc b/tests/sys/fs/fusefs/bmap.cc index 8e9268058e96..30612079657d 100644 --- a/tests/sys/fs/fusefs/bmap.cc +++ b/tests/sys/fs/fusefs/bmap.cc @@ -261,6 +261,6 @@ TEST_P(BmapEof, eof) leak(fd); } -INSTANTIATE_TEST_CASE_P(BE, BmapEof, +INSTANTIATE_TEST_SUITE_P(BE, BmapEof, Values(1, 2, 3) ); diff --git a/tests/sys/fs/fusefs/cache.cc b/tests/sys/fs/fusefs/cache.cc index 47841d46c90d..ea6d87674da2 100644 --- a/tests/sys/fs/fusefs/cache.cc +++ b/tests/sys/fs/fusefs/cache.cc @@ -195,7 +195,7 @@ TEST_P(Cache, truncate_by_surprise_invalidates_cache) leak(fd); } -INSTANTIATE_TEST_CASE_P(Cache, Cache, +INSTANTIATE_TEST_SUITE_P(Cache, Cache, Combine( /* Test every combination that: * - does not cache at least one of entries and attrs diff --git a/tests/sys/fs/fusefs/dev_fuse_poll.cc b/tests/sys/fs/fusefs/dev_fuse_poll.cc index b26071f828fe..181cd69de665 100644 --- a/tests/sys/fs/fusefs/dev_fuse_poll.cc +++ b/tests/sys/fs/fusefs/dev_fuse_poll.cc @@ -96,7 +96,7 @@ TEST_P(DevFusePoll, destroy) m_mock->unmount(); } -INSTANTIATE_TEST_CASE_P(PM, DevFusePoll, +INSTANTIATE_TEST_SUITE_P(PM, DevFusePoll, ::testing::Values("BLOCKING", "KQ", "POLL", "SELECT")); static void* statter(void* arg) { diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 84c6e3c0161b..f6c7975ac36e 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -583,7 +583,7 @@ TEST_P(IoCopyFileRange, copy_file_range_from_mapped_write) } -INSTANTIATE_TEST_CASE_P(Io, Io, +INSTANTIATE_TEST_SUITE_P(Io, Io, Combine(Bool(), /* async read */ Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */ Values(Uncached, Writethrough, Writeback, WritebackAsync), @@ -591,7 +591,7 @@ INSTANTIATE_TEST_CASE_P(Io, Io, ) ); -INSTANTIATE_TEST_CASE_P(Io, IoCacheable, +INSTANTIATE_TEST_SUITE_P(Io, IoCacheable, Combine(Bool(), /* async read */ Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */ Values(Writethrough, Writeback, WritebackAsync), @@ -599,7 +599,7 @@ INSTANTIATE_TEST_CASE_P(Io, IoCacheable, ) ); -INSTANTIATE_TEST_CASE_P(Io, IoCopyFileRange, +INSTANTIATE_TEST_SUITE_P(Io, IoCopyFileRange, Combine(Bool(), /* async read */ Values(0x10000), /* m_maxwrite */ Values(Writethrough, Writeback, WritebackAsync), diff --git a/tests/sys/fs/fusefs/last_local_modify.cc b/tests/sys/fs/fusefs/last_local_modify.cc index fa0137d77aa7..495bfd8aa959 100644 --- a/tests/sys/fs/fusefs/last_local_modify.cc +++ b/tests/sys/fs/fusefs/last_local_modify.cc @@ -504,7 +504,7 @@ TEST_P(LastLocalModify, vfs_vget) } -INSTANTIATE_TEST_CASE_P(LLM, LastLocalModify, +INSTANTIATE_TEST_SUITE_P(LLM, LastLocalModify, Values( "VOP_ALLOCATE", "VOP_COPY_FILE_RANGE", diff --git a/tests/sys/fs/fusefs/mount.cc b/tests/sys/fs/fusefs/mount.cc index 570d1a8dbc5c..7a8d2c1396f0 100644 --- a/tests/sys/fs/fusefs/mount.cc +++ b/tests/sys/fs/fusefs/mount.cc @@ -190,11 +190,11 @@ TEST_P(UpdateErr, update) EXPECT_TRUE((newflags ^ statbuf.f_flags) & flag); } -INSTANTIATE_TEST_CASE_P(Mount, UpdateOk, +INSTANTIATE_TEST_SUITE_P(Mount, UpdateOk, ::testing::Values("MNT_RDONLY", "MNT_NOEXEC", "MNT_NOSUID", "MNT_NOATIME", "MNT_SUIDDIR") ); -INSTANTIATE_TEST_CASE_P(Mount, UpdateErr, - ::testing::Values( "MNT_USER"); +INSTANTIATE_TEST_SUITE_P(Mount, UpdateErr, + ::testing::Values( "MNT_USER") ); diff --git a/tests/sys/fs/fusefs/read.cc b/tests/sys/fs/fusefs/read.cc index df2ca2380f00..9693428914e6 100644 --- a/tests/sys/fs/fusefs/read.cc +++ b/tests/sys/fs/fusefs/read.cc @@ -1359,7 +1359,7 @@ TEST_P(ReadAhead, readahead) { delete[] contents; } -INSTANTIATE_TEST_CASE_P(RA, ReadAhead, +INSTANTIATE_TEST_SUITE_P(RA, ReadAhead, Values(tuple(false, 0), tuple(false, 1), tuple(false, 2), @@ -1441,4 +1441,4 @@ TEST_P(TimeGran, atime_during_setattr) leak(fd); } -INSTANTIATE_TEST_CASE_P(TG, TimeGran, Range(0u, 10u)); +INSTANTIATE_TEST_SUITE_P(TG, TimeGran, Range(0u, 10u)); diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc index 0b93369ad66d..1fe2e3cc522d 100644 --- a/tests/sys/fs/fusefs/write.cc +++ b/tests/sys/fs/fusefs/write.cc @@ -612,7 +612,7 @@ TEST_P(WriteRlimitFsize, rlimit_fsize_truncate) leak(fd); } -INSTANTIATE_TEST_CASE_P(W, WriteRlimitFsize, +INSTANTIATE_TEST_SUITE_P(W, WriteRlimitFsize, Values(0, O_DIRECT) ); @@ -720,7 +720,7 @@ TEST_P(WriteEofDuringVnopStrategy, eof_during_vop_strategy) } -INSTANTIATE_TEST_CASE_P(W, WriteEofDuringVnopStrategy, +INSTANTIATE_TEST_SUITE_P(W, WriteEofDuringVnopStrategy, Values(1, 2, 3) ); @@ -1531,7 +1531,7 @@ TEST_P(TimeGran, timestamps_during_setattr) leak(fd); } -INSTANTIATE_TEST_CASE_P(RA, TimeGran, Range(0u, 10u)); +INSTANTIATE_TEST_SUITE_P(RA, TimeGran, Range(0u, 10u)); /* * Without direct_io, writes should be committed to cache From nobody Wed Mar 26 18:08:27 2025 X-Original-To: dev-commits-src-all@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 4ZNFCK63Twz5sFGJ; Wed, 26 Mar 2025 18:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNFCK31xfz3ht1; Wed, 26 Mar 2025 18:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743012509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpPRoTcAlZdGp+qLzVf9kya6TvqTRtHGB9fvHaYE0vo=; b=yTepF4CZHh9qeCEyX2uzDEX/arS5XWm/kSvm4HcPJCm/GgcFQvhyiSG3fDVU3igoi/umQp Di+f6uvUU1zzL9buMfn/5Mq/Oci1cR4RP7YFoljy8ODoHGelRIxwzUz7o5VAmBKbDEIJ5P ji2ErYtczcXRnjewLcMI2NImQI3lR5gGombXrC6tWWtVzqV0DOE45yBFg47VApXwOpOOCc FkMZf+4zsXVgDHVv+SRv+M1q66KilkYrRQEiamNEVe0K2khJBX5tmiGIwPegXbhuZOAizD scayUnrww3ksxfQzErhJbvlXwuk1uvKKUG/Un86CGSA7MzhGBsntZ0jU4WCI0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743012509; a=rsa-sha256; cv=none; b=PYTXxyb0kuDrlLqUHTHQDUfKLD4dL6FHXEtnETYA3dQrgzsFexarhqguej1lclXTWkOySa sC6MCNbBanJIYpkkvlzQMAu1WY/OWDhN3FLZ5uW8takOzK/f8C6Qf/gf0SRWTp+CxJMvMA BgCoPE2xLkZ2gbo/rQS+cG5s/Fac8TeVFYzieNzKADm1k1UYfqko0IGrNFOhPTJ+A2DptD 1NUDoDkfWFXxCQsqsH8TyhEkDf9TdZU0wZ/2yfNfVXQYWF8Y4zKAUqUCpb3u3jCRlWGp5G Q+CGC4viMO5XGLbkXp1L2qgouTNh+j5AgoSu1HpmrqFzfO+bzwh67B71lnPOFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743012509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpPRoTcAlZdGp+qLzVf9kya6TvqTRtHGB9fvHaYE0vo=; b=bd/mgvgH2zFIWuByGRnrT5tp7p0rh+Uo59wqh+phVwQuzeM+q4+zqs4s27dRa0X5SmhlFC OVoj++nnGN2OsLPN6ZupuQGw0DcLRI21ZDgtmWxxprIj4ePB+Wcl8B6zcpB9TU4SACi4Dd LTX6fh6J0F25Yh+aqavZPV8SNvI2JlyY50E4hARyRi8qCEMAokDlPB0i7B2wUe/8+/4fT/ rsstsisiKlBqkFGe6zShxeK2S9NRtPrEjAPBIrnTjIHQpELKyxvj3yDaK8RtW7UebO9+Pc FgUFv/tcrael/ZNbnvVe8XbcxPdEwy55s0gTByIME/nN6X+Z4HsRndbb//vKmg== 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 4ZNFCK2R0wz5rl; Wed, 26 Mar 2025 18:08: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 52QI8T6g016521; Wed, 26 Mar 2025 18:08:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QI8Ruh016513; Wed, 26 Mar 2025 18:08:27 GMT (envelope-from git) Date: Wed, 26 Mar 2025 18:08:27 GMT Message-Id: <202503261808.52QI8Ruh016513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 687096cf1e2a - stable/13 - Import GoogleTest 1.14.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 687096cf1e2a8d1cf2ba983452d6a566acb47d95 Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=687096cf1e2a8d1cf2ba983452d6a566acb47d95 commit 687096cf1e2a8d1cf2ba983452d6a566acb47d95 Author: Enji Cooper AuthorDate: 2023-08-08 06:17:32 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 16:41:31 +0000 Import GoogleTest 1.14.0 GoogleTest 1.14.0 now requires C++14 to build. Change `googletest.test.inc.mk` to reflect this requirement. Adjust the build integration logic to handle the new version of GoogleTest (add/remove headers/sources as needed). Tighten down warnings via `CXXFLAGS.clang` instead of ignoring all warnings. Some new warnings snuck in after I did my last round of fix submissions upstream. Also address some overlinking added in the previous version import by removing superfluous libraries. =============================== Expect WhenDynamicCastToTest.AmbiguousCast to fail This change reapplies the expected failure from 1.10.0. Ref: https://github.com/google/googletest/issues/2172 MFC after: 2 weeks Reviewed by: asomers, emaste Differential Revision: https://reviews.freebsd.org/D41399 Merge commit '8ef491440fcaec96f899d73e08873426c78583a4' into googletest-v1.14.0-import (cherry picked from commit 28f6c2f292806bf31230a959bc4b19d7081669a7) --- contrib/googletest/.clang-format | 4 + .../.github/ISSUE_TEMPLATE/00-bug_report.yml | 53 + .../.github/ISSUE_TEMPLATE/10-feature_request.yml | 33 + .../googletest/.github/ISSUE_TEMPLATE/config.yml | 5 + contrib/googletest/.github/workflows/gtest-ci.yml | 43 + contrib/googletest/.gitignore | 34 + contrib/googletest/BUILD.bazel | 127 +- contrib/googletest/CMakeLists.txt | 14 +- contrib/googletest/CONTRIBUTING.md | 203 +- contrib/googletest/{googletest => }/CONTRIBUTORS | 28 + contrib/googletest/Makefile.am | 14 - contrib/googletest/README.md | 240 +- contrib/googletest/WORKSPACE | 27 +- contrib/googletest/appveyor.yml | 104 - contrib/googletest/ci/build-linux-bazel.sh | 36 - contrib/googletest/ci/env-linux.sh | 41 - contrib/googletest/ci/env-osx.sh | 40 - contrib/googletest/ci/get-nprocessors.sh | 48 - contrib/googletest/ci/install-linux.sh | 49 - contrib/googletest/ci/install-osx.sh | 39 - contrib/googletest/ci/linux-presubmit.sh | 137 + .../Scripts/runtests.sh => ci/macos-presubmit.sh} | 71 +- contrib/googletest/ci/travis.sh | 44 - contrib/googletest/ci/windows-presubmit.bat | 58 + contrib/googletest/configure.ac | 16 - contrib/googletest/docs/_config.yml | 1 + contrib/googletest/docs/_data/navigation.yml | 43 + contrib/googletest/docs/_layouts/default.html | 58 + contrib/googletest/docs/_sass/main.scss | 200 + .../googletest/{googletest => }/docs/advanced.md | 1608 +++-- contrib/googletest/docs/assets/css/style.scss | 5 + .../docs/community_created_documentation.md | 7 + contrib/googletest/{googletest => }/docs/faq.md | 362 +- contrib/googletest/docs/gmock_cheat_sheet.md | 241 + contrib/googletest/docs/gmock_cook_book.md | 4344 +++++++++++++ contrib/googletest/docs/gmock_faq.md | 390 ++ contrib/googletest/docs/gmock_for_dummies.md | 700 ++ contrib/googletest/docs/index.md | 22 + contrib/googletest/docs/pkgconfig.md | 144 + contrib/googletest/docs/platforms.md | 8 + contrib/googletest/docs/primer.md | 483 ++ contrib/googletest/docs/quickstart-bazel.md | 153 + contrib/googletest/docs/quickstart-cmake.md | 157 + contrib/googletest/docs/reference/actions.md | 115 + contrib/googletest/docs/reference/assertions.md | 633 ++ contrib/googletest/docs/reference/matchers.md | 302 + contrib/googletest/docs/reference/mocking.md | 589 ++ contrib/googletest/docs/reference/testing.md | 1432 ++++ .../googletest/{googletest => }/docs/samples.md | 6 +- contrib/googletest/googlemock/CHANGES | 126 - contrib/googletest/googlemock/CMakeLists.txt | 74 +- contrib/googletest/googlemock/CONTRIBUTORS | 40 - contrib/googletest/googlemock/LICENSE | 28 - contrib/googletest/googlemock/Makefile.am | 224 - contrib/googletest/googlemock/README.md | 353 +- contrib/googletest/googlemock/build-aux/.keep | 0 contrib/googletest/googlemock/cmake/gmock.pc.in | 3 +- .../googletest/googlemock/cmake/gmock_main.pc.in | 3 +- contrib/googletest/googlemock/configure.ac | 146 - contrib/googletest/googlemock/docs/CheatSheet.md | 564 -- contrib/googletest/googlemock/docs/CookBook.md | 3660 ----------- contrib/googletest/googlemock/docs/DesignDoc.md | 280 - .../googletest/googlemock/docs/Documentation.md | 15 - contrib/googletest/googlemock/docs/ForDummies.md | 447 -- .../googlemock/docs/FrequentlyAskedQuestions.md | 627 -- contrib/googletest/googlemock/docs/KnownIssues.md | 19 - contrib/googletest/googlemock/docs/README.md | 4 + .../googlemock/include/gmock/gmock-actions.h | 2000 ++++-- .../googlemock/include/gmock/gmock-cardinalities.h | 40 +- .../include/gmock/gmock-function-mocker.h | 518 ++ .../include/gmock/gmock-generated-actions.h | 2567 -------- .../include/gmock/gmock-generated-actions.h.pump | 833 --- .../gmock/gmock-generated-function-mockers.h | 1380 ---- .../gmock/gmock-generated-function-mockers.h.pump | 348 - .../include/gmock/gmock-generated-matchers.h | 2260 ------- .../include/gmock/gmock-generated-matchers.h.pump | 678 -- .../include/gmock/gmock-generated-nice-strict.h | 459 -- .../gmock/gmock-generated-nice-strict.h.pump | 179 - .../googlemock/include/gmock/gmock-matchers.h | 3681 ++++++----- .../googlemock/include/gmock/gmock-more-actions.h | 795 ++- .../googlemock/include/gmock/gmock-more-matchers.h | 74 +- .../googlemock/include/gmock/gmock-nice-strict.h | 277 + .../googlemock/include/gmock/gmock-spec-builders.h | 1120 ++-- .../googletest/googlemock/include/gmock/gmock.h | 28 +- .../include/gmock/internal/custom/README.md | 2 + .../internal/custom/gmock-generated-actions.h | 13 +- .../internal/custom/gmock-generated-actions.h.pump | 12 - .../include/gmock/internal/custom/gmock-matchers.h | 13 +- .../include/gmock/internal/custom/gmock-port.h | 11 +- .../internal/gmock-generated-internal-utils.h | 287 - .../internal/gmock-generated-internal-utils.h.pump | 137 - .../include/gmock/internal/gmock-internal-utils.h | 433 +- .../googlemock/include/gmock/internal/gmock-port.h | 97 +- .../googlemock/include/gmock/internal/gmock-pp.h | 279 + contrib/googletest/googlemock/make/Makefile | 101 - contrib/googletest/googlemock/msvc/2005/gmock.sln | 32 - .../googletest/googlemock/msvc/2005/gmock.vcproj | 191 - .../googlemock/msvc/2005/gmock_config.vsprops | 15 - .../googlemock/msvc/2005/gmock_main.vcproj | 187 - .../googlemock/msvc/2005/gmock_test.vcproj | 201 - contrib/googletest/googlemock/msvc/2010/gmock.sln | 46 - .../googletest/googlemock/msvc/2010/gmock.vcxproj | 145 - .../googlemock/msvc/2010/gmock_config.props | 19 - .../googlemock/msvc/2010/gmock_main.vcxproj | 151 - .../googlemock/msvc/2010/gmock_test.vcxproj | 176 - contrib/googletest/googlemock/msvc/2015/gmock.sln | 46 - .../googletest/googlemock/msvc/2015/gmock.vcxproj | 145 - .../googlemock/msvc/2015/gmock_config.props | 19 - .../googlemock/msvc/2015/gmock_main.vcxproj | 151 - .../googlemock/msvc/2015/gmock_test.vcxproj | 176 - .../googlemock/scripts/fuse_gmock_files.py | 240 - .../googlemock/scripts/generator/LICENSE | 203 - .../googletest/googlemock/scripts/generator/README | 34 - .../googlemock/scripts/generator/README.cppclean | 115 - .../googlemock/scripts/generator/cpp/__init__.py | 0 .../googlemock/scripts/generator/cpp/ast.py | 1736 ----- .../scripts/generator/cpp/gmock_class.py | 227 - .../scripts/generator/cpp/gmock_class_test.py | 466 -- .../googlemock/scripts/generator/cpp/keywords.py | 59 - .../googlemock/scripts/generator/cpp/tokenize.py | 287 - .../googlemock/scripts/generator/cpp/utils.py | 41 - .../googlemock/scripts/generator/gmock_gen.py | 31 - .../googletest/googlemock/scripts/gmock-config.in | 303 - .../googletest/googlemock/scripts/gmock_doctor.py | 640 -- contrib/googletest/googlemock/scripts/upload.py | 1387 ---- .../googletest/googlemock/scripts/upload_gmock.py | 78 - .../googlemock/src/gmock-cardinalities.cc | 22 +- .../googlemock/src/gmock-internal-utils.cc | 132 +- .../googletest/googlemock/src/gmock-matchers.cc | 143 +- .../googlemock/src/gmock-spec-builders.cc | 321 +- contrib/googletest/googlemock/src/gmock.cc | 89 +- contrib/googletest/googlemock/src/gmock_main.cc | 25 +- contrib/googletest/googlemock/test/BUILD.bazel | 49 +- .../googlemock/test/gmock-actions_test.cc | 1439 ++++- .../googlemock/test/gmock-cardinalities_test.cc | 127 +- .../googlemock/test/gmock-function-mocker_test.cc | 998 +++ .../test/gmock-generated-actions_test.cc | 1229 ---- .../test/gmock-generated-function-mockers_test.cc | 646 -- .../test/gmock-generated-internal-utils_test.cc | 128 - .../test/gmock-generated-matchers_test.cc | 1341 ---- .../googlemock/test/gmock-internal-utils_test.cc | 441 +- .../test/gmock-matchers-arithmetic_test.cc | 1516 +++++ .../test/gmock-matchers-comparisons_test.cc | 2371 +++++++ .../test/gmock-matchers-containers_test.cc | 3137 +++++++++ .../googlemock/test/gmock-matchers-misc_test.cc | 1823 ++++++ .../googlemock/test/gmock-matchers_test.cc | 6814 -------------------- .../googlemock/test/gmock-matchers_test.h | 192 + .../googlemock/test/gmock-more-actions_test.cc | 1155 +++- .../googlemock/test/gmock-nice-strict_test.cc | 201 +- .../googletest/googlemock/test/gmock-port_test.cc | 2 +- .../googlemock/test/gmock-pp-string_test.cc | 205 + .../googletest/googlemock/test/gmock-pp_test.cc | 83 + .../googlemock/test/gmock-spec-builders_test.cc | 1142 ++-- .../googletest/googlemock/test/gmock_all_test.cc | 9 +- .../googletest/googlemock/test/gmock_ex_test.cc | 4 +- .../googletest/googlemock/test/gmock_leak_test.py | 61 +- .../googletest/googlemock/test/gmock_leak_test_.cc | 8 +- .../googletest/googlemock/test/gmock_link2_test.cc | 1 - .../googletest/googlemock/test/gmock_link_test.cc | 1 - .../googletest/googlemock/test/gmock_link_test.h | 96 +- .../googlemock/test/gmock_output_test.py | 21 +- .../googlemock/test/gmock_output_test_.cc | 83 +- .../googlemock/test/gmock_output_test_golden.txt | 32 +- .../googlemock/test/gmock_stress_test.cc | 142 +- contrib/googletest/googlemock/test/gmock_test.cc | 190 +- .../googletest/googlemock/test/gmock_test_utils.py | 19 +- contrib/googletest/googletest/CHANGES | 157 - contrib/googletest/googletest/CMakeLists.txt | 97 +- contrib/googletest/googletest/LICENSE | 28 - contrib/googletest/googletest/Makefile.am | 345 - contrib/googletest/googletest/README.md | 348 +- contrib/googletest/googletest/cmake/gtest.pc.in | 2 +- .../googletest/googletest/cmake/gtest_main.pc.in | 4 +- .../googletest/cmake/internal_utils.cmake | 166 +- contrib/googletest/googletest/cmake/libgtest.la.in | 21 + .../googletest/googletest/codegear/gtest.cbproj | 138 - .../googletest/googletest/codegear/gtest.groupproj | 54 - .../googletest/googletest/codegear/gtest_link.cc | 40 - .../googletest/codegear/gtest_main.cbproj | 82 - .../googletest/codegear/gtest_unittest.cbproj | 88 - contrib/googletest/googletest/configure.ac | 68 - contrib/googletest/googletest/docs/Pkgconfig.md | 146 - contrib/googletest/googletest/docs/PumpManual.md | 177 - contrib/googletest/googletest/docs/README.md | 4 + contrib/googletest/googletest/docs/XcodeGuide.md | 93 - contrib/googletest/googletest/docs/primer.md | 569 -- .../include/gtest/gtest-assertion-result.h | 237 + .../googletest/include/gtest/gtest-death-test.h | 145 +- .../googletest/include/gtest/gtest-matchers.h | 923 +++ .../googletest/include/gtest/gtest-message.h | 115 +- .../googletest/include/gtest/gtest-param-test.h | 1264 +--- .../include/gtest/gtest-param-test.h.pump | 500 -- .../googletest/include/gtest/gtest-printers.h | 1074 +-- .../googletest/include/gtest/gtest-spi.h | 143 +- .../googletest/include/gtest/gtest-test-part.h | 51 +- .../googletest/include/gtest/gtest-typed-test.h | 225 +- .../googletest/googletest/include/gtest/gtest.h | 1319 ++-- .../googletest/include/gtest/gtest_pred_impl.h | 276 +- .../googletest/include/gtest/gtest_prod.h | 15 +- .../include/gtest/internal/custom/README.md | 12 - .../include/gtest/internal/custom/gtest-port.h | 6 +- .../include/gtest/internal/custom/gtest-printers.h | 6 +- .../include/gtest/internal/custom/gtest.h | 6 +- .../gtest/internal/gtest-death-test-internal.h | 193 +- .../include/gtest/internal/gtest-filepath.h | 44 +- .../include/gtest/internal/gtest-internal.h | 1107 ++-- .../include/gtest/internal/gtest-linked_ptr.h | 243 - .../gtest/internal/gtest-param-util-generated.h | 5552 ---------------- .../internal/gtest-param-util-generated.h.pump | 282 - .../include/gtest/internal/gtest-param-util.h | 762 ++- .../include/gtest/internal/gtest-port-arch.h | 120 +- .../googletest/include/gtest/internal/gtest-port.h | 2211 +++---- .../include/gtest/internal/gtest-string.h | 53 +- .../include/gtest/internal/gtest-tuple.h | 1021 --- .../include/gtest/internal/gtest-tuple.h.pump | 348 - .../include/gtest/internal/gtest-type-util.h | 3352 +--------- .../include/gtest/internal/gtest-type-util.h.pump | 314 - contrib/googletest/googletest/m4/acx_pthread.m4 | 363 -- contrib/googletest/googletest/m4/gtest.m4 | 74 - contrib/googletest/googletest/make/Makefile | 82 - .../googletest/googletest/msvc/2010/gtest-md.sln | 55 - .../googletest/msvc/2010/gtest-md.vcxproj | 149 - .../googletest/msvc/2010/gtest-md.vcxproj.filters | 18 - contrib/googletest/googletest/msvc/2010/gtest.sln | 55 - .../googletest/googletest/msvc/2010/gtest.vcxproj | 149 - .../googletest/msvc/2010/gtest.vcxproj.filters | 18 - .../googletest/msvc/2010/gtest_main-md.vcxproj | 154 - .../msvc/2010/gtest_main-md.vcxproj.filters | 18 - .../googletest/msvc/2010/gtest_main.vcxproj | 162 - .../msvc/2010/gtest_main.vcxproj.filters | 18 - .../msvc/2010/gtest_prod_test-md.vcxproj | 199 - .../msvc/2010/gtest_prod_test-md.vcxproj.filters | 26 - .../googletest/msvc/2010/gtest_prod_test.vcxproj | 191 - .../msvc/2010/gtest_prod_test.vcxproj.filters | 26 - .../googletest/msvc/2010/gtest_unittest-md.vcxproj | 188 - .../msvc/2010/gtest_unittest-md.vcxproj.filters | 18 - .../googletest/msvc/2010/gtest_unittest.vcxproj | 180 - .../msvc/2010/gtest_unittest.vcxproj.filters | 18 - .../googletest/googletest/samples/prime_tables.h | 39 +- contrib/googletest/googletest/samples/sample1.cc | 6 +- contrib/googletest/googletest/samples/sample1.h | 8 +- .../googletest/samples/sample10_unittest.cc | 15 +- .../googletest/samples/sample1_unittest.cc | 11 +- contrib/googletest/googletest/samples/sample2.cc | 4 +- contrib/googletest/googletest/samples/sample2.h | 18 +- .../googletest/samples/sample2_unittest.cc | 10 +- .../googletest/googletest/samples/sample3-inl.h | 31 +- .../googletest/samples/sample3_unittest.cc | 23 +- contrib/googletest/googletest/samples/sample4.cc | 14 +- contrib/googletest/googletest/samples/sample4.h | 6 +- .../googletest/samples/sample4_unittest.cc | 2 +- .../googletest/samples/sample5_unittest.cc | 29 +- .../googletest/samples/sample6_unittest.cc | 30 +- .../googletest/samples/sample7_unittest.cc | 20 +- .../googletest/samples/sample8_unittest.cc | 61 +- .../googletest/samples/sample9_unittest.cc | 46 +- contrib/googletest/googletest/scripts/common.py | 83 - .../googletest/scripts/fuse_gtest_files.py | 253 - .../googletest/scripts/gen_gtest_pred_impl.py | 730 --- .../googletest/googletest/scripts/gtest-config.in | 274 - contrib/googletest/googletest/scripts/pump.py | 855 --- .../googletest/googletest/scripts/release_docs.py | 158 - .../googletest/googletest/scripts/test/Makefile | 59 - contrib/googletest/googletest/scripts/upload.py | 1387 ---- .../googletest/googletest/scripts/upload_gtest.py | 78 - contrib/googletest/googletest/src/gtest-all.cc | 4 +- .../gtest-assertion-result.cc} | 69 +- .../googletest/googletest/src/gtest-death-test.cc | 986 +-- .../googletest/googletest/src/gtest-filepath.cc | 239 +- .../googletest/googletest/src/gtest-internal-inl.h | 548 +- .../googletest/googletest/src/gtest-matchers.cc | 98 + contrib/googletest/googletest/src/gtest-port.cc | 714 +- .../googletest/googletest/src/gtest-printers.cc | 294 +- .../googletest/googletest/src/gtest-test-part.cc | 35 +- .../googletest/googletest/src/gtest-typed-test.cc | 40 +- contrib/googletest/googletest/src/gtest.cc | 4271 +++++++----- contrib/googletest/googletest/src/gtest_main.cc | 31 +- contrib/googletest/googletest/test/BUILD.bazel | 169 +- .../test/googletest-break-on-failure-unittest.py | 79 +- .../test/googletest-break-on-failure-unittest_.cc | 25 +- .../test/googletest-catch-exceptions-test.py | 316 +- .../test/googletest-catch-exceptions-test_.cc | 122 +- .../googletest/test/googletest-color-test.py | 70 +- .../googletest/test/googletest-color-test_.cc | 4 +- .../googletest/test/googletest-death-test-test.cc | 613 +- .../test/googletest-death-test_ex_test.cc | 31 +- .../googletest/test/googletest-env-var-test.py | 11 +- .../googletest/test/googletest-env-var-test_.cc | 36 +- .../test/googletest-failfast-unittest.py | 461 ++ .../test/googletest-failfast-unittest_.cc | 166 + .../googletest/test/googletest-filepath-test.cc | 226 +- .../googletest/test/googletest-filter-unittest.py | 448 +- .../googletest/test/googletest-filter-unittest_.cc | 75 +- .../test/googletest-global-environment-unittest.py | 141 + .../googletest-global-environment-unittest_.cc} | 47 +- .../test/googletest-json-outfiles-test.py | 138 +- .../test/googletest-json-output-unittest.py | 950 +-- .../googletest/test/googletest-linked-ptr-test.cc | 151 - .../test/googletest-list-tests-unittest.py | 102 +- .../test/googletest-list-tests-unittest_.cc | 103 +- .../googletest/test/googletest-listener-test.cc | 480 +- .../googletest/test/googletest-message-test.cc | 48 +- .../googletest/test/googletest-options-test.cc | 103 +- .../test/googletest-output-test-golden-lin.txt | 247 +- .../googletest/test/googletest-output-test.py | 182 +- .../googletest/test/googletest-output-test_.cc | 539 +- .../googletest-param-test-invalid-name1-test.py | 4 +- .../googletest-param-test-invalid-name1-test_.cc | 12 +- .../googletest-param-test-invalid-name2-test.py | 5 +- .../googletest-param-test-invalid-name2-test_.cc | 15 +- .../googletest/test/googletest-param-test-test.cc | 556 +- .../googletest/test/googletest-param-test-test.h | 14 +- .../googletest/test/googletest-param-test2-test.cc | 13 +- .../googletest/test/googletest-port-test.cc | 315 +- .../googletest/test/googletest-printers-test.cc | 1176 ++-- .../test/googletest-setuptestsuite-test.py} | 38 +- .../googletest-setuptestsuite-test_.cc} | 26 +- .../googletest/test/googletest-shuffle-test.py | 203 +- .../googletest/test/googletest-shuffle-test_.cc | 13 +- .../googletest/test/googletest-test-part-test.cc | 26 +- .../googletest/test/googletest-test2_test.cc | 61 - .../test/googletest-throw-on-failure-test.py | 77 +- .../test/googletest-throw-on-failure-test_.cc | 12 +- .../googletest/test/googletest-tuple-test.cc | 319 - .../test/googletest-uninitialized-test.py | 13 +- .../test/googletest-uninitialized-test_.cc | 5 +- .../googletest/test/gtest-typed-test2_test.cc | 11 +- .../googletest/test/gtest-typed-test_test.cc | 246 +- .../googletest/test/gtest-typed-test_test.h | 24 +- .../googletest/test/gtest-unittest-api_test.cc | 272 +- .../googletest/googletest/test/gtest_all_test.cc | 1 - .../test/gtest_assert_by_exception_test.cc | 28 +- .../googletest/googletest/test/gtest_dirs_test.cc | 101 + .../googletest/test/gtest_environment_test.cc | 29 +- .../googletest/googletest/test/gtest_help_test.py | 129 +- .../googletest/googletest/test/gtest_help_test_.cc | 3 +- .../googletest/test/gtest_json_test_utils.py | 4 + .../googletest/test/gtest_list_output_unittest.py | 184 +- .../googletest/test/gtest_list_output_unittest_.cc | 26 + .../googletest/test/gtest_main_unittest.cc | 4 +- .../googletest/test/gtest_pred_impl_unittest.cc | 1793 +++-- .../googletest/test/gtest_premature_exit_test.cc | 30 +- .../googletest/test/gtest_repeat_test.cc | 76 +- .../gtest_skip_check_output_test.py} | 66 +- .../gtest_skip_environment_check_output_test.py} | 40 +- .../test/gtest_skip_in_environment_setup_test.cc | 26 +- .../googletest/googletest/test/gtest_skip_test.cc | 10 +- .../googletest/test/gtest_sole_header_test.cc | 4 +- .../googletest/test/gtest_stress_test.cc | 36 +- .../test/gtest_test_macro_stack_footprint_test.cc | 58 +- .../googletest/googletest/test/gtest_test_utils.py | 142 +- .../googletest/test/gtest_testbridge_test.py | 4 +- .../googletest/test/gtest_testbridge_test_.cc | 1 - .../test/gtest_throw_on_failure_ex_test.cc | 19 +- .../googletest/googletest/test/gtest_unittest.cc | 3944 ++++++----- .../googletest/test/gtest_xml_outfile1_test_.cc | 8 +- .../googletest/test/gtest_xml_outfile2_test_.cc | 46 +- .../googletest/test/gtest_xml_outfiles_test.py | 55 +- .../googletest/test/gtest_xml_output_unittest.py | 338 +- .../googletest/test/gtest_xml_output_unittest_.cc | 56 +- .../googletest/test/gtest_xml_test_utils.py | 170 +- contrib/googletest/googletest/test/production.h | 7 +- .../googletest/xcode/Config/DebugProject.xcconfig | 30 - .../xcode/Config/FrameworkTarget.xcconfig | 17 - .../googletest/xcode/Config/General.xcconfig | 41 - .../xcode/Config/ReleaseProject.xcconfig | 32 - .../xcode/Config/StaticLibraryTarget.xcconfig | 18 - .../googletest/xcode/Config/TestTarget.xcconfig | 8 - .../googletest/xcode/Resources/Info.plist | 30 - .../xcode/Samples/FrameworkSample/Info.plist | 28 - .../WidgetFramework.xcodeproj/project.pbxproj | 457 -- .../xcode/Samples/FrameworkSample/widget.cc | 63 - .../googletest/xcode/Scripts/versiongenerate.py | 100 - .../xcode/gtest.xcodeproj/project.pbxproj | 1182 ---- contrib/googletest/googletest_deps.bzl | 22 + lib/googletest/gmock/Makefile | 18 +- lib/googletest/gtest/Makefile | 5 +- lib/googletest/tests/gmock/Makefile | 5 +- lib/googletest/tests/gmock_main/Makefile | 20 +- lib/googletest/tests/gtest/Makefile | 11 +- lib/googletest/tests/gtest_main/Makefile | 15 +- share/mk/googletest.test.inc.mk | 2 +- 382 files changed, 51489 insertions(+), 78609 deletions(-) diff --git a/contrib/googletest/.clang-format b/contrib/googletest/.clang-format new file mode 100644 index 000000000000..5b9bfe6d2242 --- /dev/null +++ b/contrib/googletest/.clang-format @@ -0,0 +1,4 @@ +# Run manually to reformat a file: +# clang-format -i --style=file +Language: Cpp +BasedOnStyle: Google diff --git a/contrib/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml b/contrib/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml new file mode 100644 index 000000000000..586779ad2d61 --- /dev/null +++ b/contrib/googletest/.github/ISSUE_TEMPLATE/00-bug_report.yml @@ -0,0 +1,53 @@ +name: Bug Report +description: Let us know that something does not work as expected. +title: "[Bug]: Please title this bug report" +body: + - type: textarea + id: what-happened + attributes: + label: Describe the issue + description: What happened, and what did you expect to happen? + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce the problem + description: It is important that we are able to reproduce the problem that you are experiencing. Please provide all code and relevant steps to reproduce the problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the problem are also helpful. + validations: + required: true + - type: textarea + id: version + attributes: + label: What version of GoogleTest are you using? + description: Please include the output of `git rev-parse HEAD` or the GoogleTest release version number that you are using. + validations: + required: true + - type: textarea + id: os + attributes: + label: What operating system and version are you using? + description: If you are using a Linux distribution please include the name and version of the distribution as well. + validations: + required: true + - type: textarea + id: compiler + attributes: + label: What compiler and version are you using? + description: Please include the output of `gcc -v` or `clang -v`, or the equivalent for your compiler. + validations: + required: true + - type: textarea + id: buildsystem + attributes: + label: What build system are you using? + description: Please include the output of `bazel --version` or `cmake --version`, or the equivalent for your build system. + validations: + required: true + - type: textarea + id: additional + attributes: + label: Additional context + description: Add any other context about the problem here. + validations: + required: false diff --git a/contrib/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml b/contrib/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml new file mode 100644 index 000000000000..f3bbc091e8e9 --- /dev/null +++ b/contrib/googletest/.github/ISSUE_TEMPLATE/10-feature_request.yml @@ -0,0 +1,33 @@ +name: Feature request +description: Propose a new feature. +title: "[FR]: Please title this feature request" +labels: "enhancement" +body: + - type: textarea + id: version + attributes: + label: Does the feature exist in the most recent commit? + description: We recommend using the latest commit from GitHub in your projects. + validations: + required: true + - type: textarea + id: why + attributes: + label: Why do we need this feature? + description: Ideally, explain why a combination of existing features cannot be used instead. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Describe the proposal. + description: Include a detailed description of the feature, with usage examples. + validations: + required: true + - type: textarea + id: platform + attributes: + label: Is the feature specific to an operating system, compiler, or build system version? + description: If it is, please specify which versions. + validations: + required: true diff --git a/contrib/googletest/.github/ISSUE_TEMPLATE/config.yml b/contrib/googletest/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..65170d10a782 --- /dev/null +++ b/contrib/googletest/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Get Help + url: https://github.com/google/googletest/discussions + about: Please ask and answer questions here. diff --git a/contrib/googletest/.github/workflows/gtest-ci.yml b/contrib/googletest/.github/workflows/gtest-ci.yml new file mode 100644 index 000000000000..03a8cc5e287b --- /dev/null +++ b/contrib/googletest/.github/workflows/gtest-ci.yml @@ -0,0 +1,43 @@ +name: ci + +on: + push: + pull_request: + +env: + BAZEL_CXXOPTS: -std=c++14 + +jobs: + Linux: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Tests + run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... + + macOS: + runs-on: macos-latest + steps: + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Tests + run: bazel test --cxxopt=-std=c++14 --features=external_include_paths --test_output=errors ... + + + Windows: + runs-on: windows-latest + steps: + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Tests + run: bazel test --cxxopt=/std:c++14 --features=external_include_paths --test_output=errors ... diff --git a/contrib/googletest/.gitignore b/contrib/googletest/.gitignore index 73cdd2c203ff..fede02f65093 100644 --- a/contrib/googletest/.gitignore +++ b/contrib/googletest/.gitignore @@ -12,6 +12,7 @@ bazel-testlogs *.pyc # Visual Studio files +.vs *.sdf *.opensdf *.VC.opendb @@ -23,6 +24,10 @@ Win32-Release/ x64-Debug/ x64-Release/ +# VSCode files +.cache/ +cmake-variants.yaml + # Ignore autoconf / automake files Makefile.in aclocal.m4 @@ -34,6 +39,7 @@ googletest/m4/ltoptions.m4 googletest/m4/ltsugar.m4 googletest/m4/ltversion.m4 googletest/m4/lt~obsolete.m4 +googlemock/m4 # Ignore generated directories. googlemock/fused-src/ @@ -41,6 +47,8 @@ googletest/fused-src/ # macOS files .DS_Store +googletest/.DS_Store +googletest/xcode/.DS_Store # Ignore cmake generated directories and files. CMakeFiles @@ -52,3 +60,29 @@ googlemock/CTestTestfile.cmake googlemock/Makefile googlemock/cmake_install.cmake googlemock/gtest +/bin +/googlemock/gmock.dir +/googlemock/gmock_main.dir +/googlemock/RUN_TESTS.vcxproj.filters +/googlemock/RUN_TESTS.vcxproj +/googlemock/INSTALL.vcxproj.filters +/googlemock/INSTALL.vcxproj +/googlemock/gmock_main.vcxproj.filters +/googlemock/gmock_main.vcxproj +/googlemock/gmock.vcxproj.filters +/googlemock/gmock.vcxproj +/googlemock/gmock.sln +/googlemock/ALL_BUILD.vcxproj.filters +/googlemock/ALL_BUILD.vcxproj +/lib +/Win32 +/ZERO_CHECK.vcxproj.filters +/ZERO_CHECK.vcxproj +/RUN_TESTS.vcxproj.filters +/RUN_TESTS.vcxproj +/INSTALL.vcxproj.filters +/INSTALL.vcxproj +/googletest-distribution.sln +/CMakeCache.txt +/ALL_BUILD.vcxproj.filters +/ALL_BUILD.vcxproj diff --git a/contrib/googletest/BUILD.bazel b/contrib/googletest/BUILD.bazel index 41a098579818..b1e3b7fba89a 100644 --- a/contrib/googletest/BUILD.bazel +++ b/contrib/googletest/BUILD.bazel @@ -28,22 +28,40 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# Author: misterg@google.com (Gennadiy Civil) -# # Bazel Build for Google C++ Testing Framework(Google Test) package(default_visibility = ["//visibility:public"]) licenses(["notice"]) +exports_files(["LICENSE"]) + +config_setting( + name = "qnx", + constraint_values = ["@platforms//os:qnx"], +) + config_setting( name = "windows", - values = {"cpu": "x64_windows"}, + constraint_values = ["@platforms//os:windows"], +) + +config_setting( + name = "freebsd", + constraint_values = ["@platforms//os:freebsd"], ) config_setting( - name = "windows_msvc", - values = {"cpu": "x64_windows_msvc"}, + name = "openbsd", + constraint_values = ["@platforms//os:openbsd"], +) + +config_setting( + name = "msvc_compiler", + flag_values = { + "@bazel_tools//tools/cpp:compiler": "msvc-cl", + }, + visibility = [":__subpackages__"], ) config_setting( @@ -51,6 +69,13 @@ config_setting( values = {"define": "absl=1"}, ) +# Library that defines the FRIEND_TEST macro. +cc_library( + name = "gtest_prod", + hdrs = ["googletest/include/gtest/gtest_prod.h"], + includes = ["googletest/include"], +) + # Google Test including Google Mock cc_library( name = "gtest", @@ -73,21 +98,19 @@ cc_library( "googletest/include/gtest/*.h", "googlemock/include/gmock/*.h", ]), - copts = select( - { - ":windows": [], - ":windows_msvc": [], - "//conditions:default": ["-pthread"], - }, - ), - defines = select( - { - ":has_absl": [ - "GTEST_HAS_ABSL=1", - ], - "//conditions:default": [], - }, - ), + copts = select({ + ":qnx": [], + ":windows": [], + "//conditions:default": ["-pthread"], + }), + defines = select({ + ":has_absl": ["GTEST_HAS_ABSL=1"], + "//conditions:default": [], + }), + features = select({ + ":windows": ["windows_export_all_symbols"], + "//conditions:default": [], + }), includes = [ "googlemock", "googlemock/include", @@ -95,32 +118,45 @@ cc_library( "googletest/include", ], linkopts = select({ + ":qnx": ["-lregex"], ":windows": [], - ":windows_msvc": [], - "//conditions:default": [ + ":freebsd": [ + "-lm", "-pthread", ], + ":openbsd": [ + "-lm", + "-pthread", + ], + "//conditions:default": ["-pthread"], + }), + deps = select({ + ":has_absl": [ + "@com_google_absl//absl/container:flat_hash_set", + "@com_google_absl//absl/debugging:failure_signal_handler", + "@com_google_absl//absl/debugging:stacktrace", + "@com_google_absl//absl/debugging:symbolize", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/flags:parse", + "@com_google_absl//absl/flags:reflection", + "@com_google_absl//absl/flags:usage", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/types:any", + "@com_google_absl//absl/types:optional", + "@com_google_absl//absl/types:variant", + "@com_googlesource_code_re2//:re2", + ], + "//conditions:default": [], }), - deps = select( - { - ":has_absl": [ - "@com_google_absl//absl/debugging:failure_signal_handler", - "@com_google_absl//absl/debugging:stacktrace", - "@com_google_absl//absl/debugging:symbolize", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/types:optional", - "@com_google_absl//absl/types:variant", - ], - "//conditions:default": [], - }, - ), ) cc_library( name = "gtest_main", - srcs = [ - "googlemock/src/gmock_main.cc", - ], + srcs = ["googlemock/src/gmock_main.cc"], + features = select({ + ":windows": ["windows_export_all_symbols"], + "//conditions:default": [], + }), deps = [":gtest"], ) @@ -139,14 +175,18 @@ cc_library( "googletest/samples/sample3-inl.h", "googletest/samples/sample4.h", ], + features = select({ + ":windows": ["windows_export_all_symbols"], + "//conditions:default": [], + }), ) cc_test( name = "gtest_samples", size = "small", - #All Samples except: - #sample9 ( main ) - #sample10 (main and takes a command line option and needs to be separate) + # All Samples except: + # sample9 (main) + # sample10 (main and takes a command line option and needs to be separate) srcs = [ "googletest/samples/sample1_unittest.cc", "googletest/samples/sample2_unittest.cc", @@ -157,6 +197,7 @@ cc_test( "googletest/samples/sample7_unittest.cc", "googletest/samples/sample8_unittest.cc", ], + linkstatic = 0, deps = [ "gtest_sample_lib", ":gtest_main", @@ -174,7 +215,5 @@ cc_test( name = "sample10_unittest", size = "small", srcs = ["googletest/samples/sample10_unittest.cc"], - deps = [ - ":gtest", - ], + deps = [":gtest"], ) diff --git a/contrib/googletest/CMakeLists.txt b/contrib/googletest/CMakeLists.txt index d77321165aeb..089ac987fb60 100644 --- a/contrib/googletest/CMakeLists.txt +++ b/contrib/googletest/CMakeLists.txt @@ -1,11 +1,14 @@ -cmake_minimum_required(VERSION 2.8.8) +# Note: CMake support is community-based. The maintainers do not use CMake +# internally. -if (POLICY CMP0048) - cmake_policy(SET CMP0048 NEW) -endif (POLICY CMP0048) +cmake_minimum_required(VERSION 3.13) project(googletest-distribution) -set(GOOGLETEST_VERSION 1.9.0) +set(GOOGLETEST_VERSION 1.14.0) + +if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) + set(CMAKE_CXX_EXTENSIONS OFF) +endif() enable_testing() @@ -15,6 +18,7 @@ include(GNUInstallDirs) #Note that googlemock target already builds googletest option(BUILD_GMOCK "Builds the googlemock subproject" ON) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) +option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF) if(BUILD_GMOCK) add_subdirectory( googlemock ) diff --git a/contrib/googletest/CONTRIBUTING.md b/contrib/googletest/CONTRIBUTING.md index 846dd8abfb1c..8bed14b2666d 100644 --- a/contrib/googletest/CONTRIBUTING.md +++ b/contrib/googletest/CONTRIBUTING.md @@ -2,16 +2,16 @@ ## Contributor License Agreements -We'd love to accept your patches! Before we can take them, we -have to jump a couple of legal hurdles. +We'd love to accept your patches! Before we can take them, we have to jump a +couple of legal hurdles. Please fill out either the individual or corporate Contributor License Agreement (CLA). - * If you are an individual writing original source code and you're sure you +* If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, +* If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). @@ -20,141 +20,122 @@ instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. ## Are you a Googler? -If you are a Googler, you can either create an internal change or work on GitHub directly. +If you are a Googler, please make an attempt to submit an internal contribution +rather than a GitHub Pull Request. If you are not able to submit internally, a +PR is acceptable as an alternative. ## Contributing A Patch -1. Submit an issue describing your proposed change to the - [issue tracker](https://github.com/google/googletest). -1. Please don't mix more than one logical change per submittal, - because it makes the history hard to follow. If you want to make a - change that doesn't have a corresponding issue in the issue - tracker, please create one. -1. Also, coordinate with team members that are listed on the issue in - question. This ensures that work isn't being duplicated and - communicating your plan early also generally leads to better - patches. -1. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Ensure that your code adheres to the existing style in the sample to which - you are contributing. -1. Ensure that your code has an appropriate set of unit tests which all pass. -1. Submit a pull request. - -## The Google Test and Google Mock Communities ## +1. Submit an issue describing your proposed change to the + [issue tracker](https://github.com/google/googletest/issues). +2. Please don't mix more than one logical change per submittal, because it + makes the history hard to follow. If you want to make a change that doesn't + have a corresponding issue in the issue tracker, please create one. +3. Also, coordinate with team members that are listed on the issue in question. + This ensures that work isn't being duplicated and communicating your plan + early also generally leads to better patches. +4. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement + ([see details above](#contributor-license-agreements)). +5. Fork the desired repo, develop and test your code changes. +6. Ensure that your code adheres to the existing style in the sample to which + you are contributing. +7. Ensure that your code has an appropriate set of unit tests which all pass. +8. Submit a pull request. + +## The Google Test and Google Mock Communities The Google Test community exists primarily through the -[discussion group](http://groups.google.com/group/googletestframework) -and the GitHub repository. -Likewise, the Google Mock community exists primarily through their own -[discussion group](http://groups.google.com/group/googlemock). -You are definitely encouraged to contribute to the -discussion and you can also help us to keep the effectiveness of the -group high by following and promoting the guidelines listed here. - -### Please Be Friendly ### - -Showing courtesy and respect to others is a vital part of the Google -culture, and we strongly encourage everyone participating in Google -Test development to join us in accepting nothing less. Of course, -being courteous is not the same as failing to constructively disagree *** 162878 LINES SKIPPED *** From nobody Wed Mar 26 18:36:25 2025 X-Original-To: dev-commits-src-all@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 4ZNFqZ0Sw0z5sGPS; Wed, 26 Mar 2025 18:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNFqY73j3z3ytk; Wed, 26 Mar 2025 18:36:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743014186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LfoceqdyxYvfcfroDZHOXIq0Fr7zdJN7MU+38FEQ6EM=; b=ap4rbGF/lYHqo5SnpZKfIhbJHT6l5zJLJxwvvo7tBRBN8jmwowbdlDrlQQDAIjy3ispyQd XsLegFS7TRAc2Ld9ehgjlpNDCpJJfZy2pjLGNOe7cLBt6JS6vipRRHg5ygv4DF3VhOzPiP vu2IRw3RxwH8Rzunh8L118tujjmHk7p8tKD3kM9G4a7l2sw6s+CwgOoCxBI8tgDg2DJDzb OsDudoi43OWezmYPqOC4f2qyjxBvbhuPiV8c8fgicT1fGYFXtELW0LORtQvHNjU8E8oGdA eyBbQxeFQwp2cRlHXU1fGdJwEwSFhWoi3zfeIH9HEkqXSkyYsvSLbApXqH+YTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743014186; a=rsa-sha256; cv=none; b=a7rQ00IsPPWiyfKQGliEA2KiYtFhI+fjP7KVipixXBnHyVzrTetrbVDg+uxRcwqC2FuWHG Ocwu9les7dqwmPTL/eqZYumgre4QRr8PyK3/hwk6rFYx4Ay4uVGxxU14QTnXqO8cY7wJye SYHKLNvrN9wCrhx+2ugielda1UXikORR3BOpaiOQ5BMULF2Hqq0BPRBS9wW8FvF3UXx5ex BJBE59i13HkNlmMmNmX8sRYGD4PEMt+HrWnI+1WYHrGZ1xpa0fTMmmqAP/bOw6x4ABpIVQ pVEZ47UyS/LNKwA78uYf9mRYAhgqscFmxu8ukc/SQjgJn+gXr0WrQitBduW2Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743014186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LfoceqdyxYvfcfroDZHOXIq0Fr7zdJN7MU+38FEQ6EM=; b=WlpaQabZQGs/8VORhAy/h2TYUacBsz8mdBiJa4Jnq44YPRYiq5R7KRvjhs+BbOzqZWx3qr wZ+OAaHSChd0n8pE7MkU4z76sHpA/n/0FZZg9e7sSaTbvoUQLcgR+iDPSPBIqlVk01SLGN zeFRkfa4EJZNv1bSJYLfXpBqaWcnv4bLWTxSUT4+2JSAs6PFQV/hkDgY/ykkgNjL6evgCS T20281ZitQgh68lRUdSORDSkmJA6mjDb4yMf/sp4i5auF/mRpdvE+v6gCFnt48XqGRPiIz UbSK1IKeDnxOomuOGvek9WB0mOj+mS2lYBuiSiT7H1W3rvFTf6HKJlrD34h/oQ== 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 4ZNFqY6MwKz6SD; Wed, 26 Mar 2025 18:36: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 52QIaPKN071657; Wed, 26 Mar 2025 18:36:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QIaPYa071654; Wed, 26 Mar 2025 18:36:25 GMT (envelope-from git) Date: Wed, 26 Mar 2025 18:36:25 GMT Message-Id: <202503261836.52QIaPYa071654@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 275b0935fb56 - stable/14 - kern.mk: Update SSP comment (not limited to GCC) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 275b0935fb56beb7dbe32bbcdf3daa3a9c18335e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=275b0935fb56beb7dbe32bbcdf3daa3a9c18335e commit 275b0935fb56beb7dbe32bbcdf3daa3a9c18335e Author: Ed Maste AuthorDate: 2025-03-14 20:21:07 +0000 Commit: Ed Maste CommitDate: 2025-03-26 18:36:13 +0000 kern.mk: Update SSP comment (not limited to GCC) Sponsored by: The FreeBSD Foundation (cherry picked from commit 222c850503d1cbd5293c04987181a74b9dbe3fcf) --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 38d0664538ea..e37665ac374c 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -228,7 +228,7 @@ CFLAGS+= -ffreestanding CFLAGS+= -fwrapv # -# GCC SSP support +# Stack Smashing Protection (SSP) support # .if ${MK_SSP} != "no" CFLAGS+= -fstack-protector From nobody Wed Mar 26 21:09:52 2025 X-Original-To: dev-commits-src-all@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 4ZNKDf4t6lz5rCSd; Wed, 26 Mar 2025 21:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKDc3syrz3fYJ; Wed, 26 Mar 2025 21:09:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwxdB0sAgw/tx02lGuGglp2N1JiqH8tmL60f0ItRUy8=; b=IXuaMHQHhIjGAApiqCmdRj5jBslHqSgJHUSFn8HPzNM+p22k2cP6KQCMkPTTkV7SiiZtxB 3CQQ8R5+WH+d9yYGUCYJpS2tJXDGxInBczEoZYvwUrlRZB0WvqVXrR2gAgdmuTJ+0iixAv SGH1g+HI5MuaCLW+j/WcMruzJnW+32cdB2NyBEPyLZP49yWeBa7S7+QWJNvmbOzKzzNmqC Tq1TJBC0EMu/RFnl/Ki2vxoK5nWgtAK8kEKEaGPoP9OPGu5h5VhBgJwln06LkmDetXHfqg zDbOMaxV4YdMCvs2FgzDX0JvXOtKTinYJecg8I7Ak9ZtreRGCBr2f2Fd1/PCog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023392; a=rsa-sha256; cv=none; b=QVVnLnSeLR8ccfq4rqQapp4boDbd8fuJVeodTFfBC9Y7VOTPf0qMt1UeQ0gHILiDKOCtjm d3WIbEjUALYnucVgrVxIT/7gaApKG7fCV0k6mENQeYIPsMSQJCgV0sZsbus7JWo/v2bPZr NGnQ+ZVejNI0g1giaTI46YMqme2RxYE1dBW1uaxpKjGxiec42RDB5VTF3DhjAo58TSPGtY 0fPdf1GNdW6S93JB9lw059pBFYJyd7gwm6zqTtE4XPIqfhFh2pwPHjrb2ieAlVzbiDCnk2 yezG+Zlu2OxlDmnmbwDBvcGHrRS4/bFiwNyOKab/gyRnVYuNmNqz/GA4AQciwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwxdB0sAgw/tx02lGuGglp2N1JiqH8tmL60f0ItRUy8=; b=lw49vG+elps7RpAEllsSbfqJ1mBImCeL/A6payAP8s2StJmURMxjdL2XOQOhrrYx3/gbQ+ RRkeXmTeJK99Q41aKtr0A5opfQ/z8b2t3tZ2LMy94wQAOuhn78U73Q4JrTSK1ORFVMiVnY PC9nrkN3AlWp6Tys4bKYy7PJV4qm9+5qkTQnI6bjw2gczllxnahwMGjlzKwF2rtyIm59Su /8HV6fmuocpIdKs2U/gLV2NqsQplZeGOSu0jEHx/GdPvg7HXdwIF7TlKmqUk8DgzgD6pgO vAcDqCDCKMOA9vFMIEnlVjzqLDNHa0+UG2W3Ck1G55FjTdJrTaxMQGi/FUNVHg== 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 4ZNKDc3QZtzB6k; Wed, 26 Mar 2025 21:09: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 52QL9qTV052807; Wed, 26 Mar 2025 21:09:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QL9quC052804; Wed, 26 Mar 2025 21:09:52 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:09:52 GMT Message-Id: <202503262109.52QL9quC052804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: a5403c1f7d57 - stable/13 - contrib/googletest: update from 1.14.0 to 1.15.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a5403c1f7d57112e12c3966761dbc481e9c415e1 Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a5403c1f7d57112e12c3966761dbc481e9c415e1 commit a5403c1f7d57112e12c3966761dbc481e9c415e1 Author: Enji Cooper AuthorDate: 2024-10-20 01:51:18 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 20:00:35 +0000 contrib/googletest: update from 1.14.0 to 1.15.2 The changes between the two versions can be found in this diff of the two release tags: https://github.com/google/googletest/compare/v1.14.0...v1.15.2 One notable change is that GoogleTest 1.15.x now officially requires C++-14 (1.14.x required C++-11). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47197 Merge commit '14f7077fed7d82046bdcbe347004132f08aba886' (cherry picked from commit 5ca8c28cd8c725b81781201cfdb5f9969396f934) (cherry picked from commit 1d67cec525421c568199a0524357c35d35e3f6e2) --- contrib/googletest/BUILD.bazel | 17 ++ contrib/googletest/CMakeLists.txt | 13 +- contrib/googletest/CONTRIBUTING.md | 8 +- contrib/googletest/CONTRIBUTORS | 1 + contrib/googletest/MODULE.bazel | 69 +++++ contrib/googletest/README.md | 22 +- contrib/googletest/WORKSPACE | 29 +- contrib/googletest/WORKSPACE.bzlmod | 35 +++ contrib/googletest/ci/linux-presubmit.sh | 10 +- contrib/googletest/ci/macos-presubmit.sh | 3 +- contrib/googletest/ci/windows-presubmit.bat | 11 +- contrib/googletest/docs/advanced.md | 36 ++- contrib/googletest/docs/faq.md | 57 ++-- contrib/googletest/docs/gmock_cook_book.md | 41 ++- contrib/googletest/docs/gmock_for_dummies.md | 6 +- contrib/googletest/docs/primer.md | 39 ++- contrib/googletest/docs/reference/assertions.md | 2 +- contrib/googletest/docs/reference/mocking.md | 3 +- contrib/googletest/docs/reference/testing.md | 29 +- contrib/googletest/fake_fuchsia_sdk.bzl | 33 +++ contrib/googletest/googlemock/CMakeLists.txt | 27 +- contrib/googletest/googlemock/README.md | 6 +- .../googlemock/include/gmock/gmock-actions.h | 44 ++- .../include/gmock/gmock-function-mocker.h | 9 +- .../googlemock/include/gmock/gmock-matchers.h | 179 ++++++------- .../googlemock/include/gmock/gmock-more-actions.h | 7 +- .../googletest/googlemock/include/gmock/gmock.h | 15 +- .../include/gmock/internal/gmock-internal-utils.h | 14 +- .../googlemock/include/gmock/internal/gmock-port.h | 8 +- .../googlemock/src/gmock-internal-utils.cc | 5 +- .../googletest/googlemock/src/gmock-matchers.cc | 29 +- .../googlemock/src/gmock-spec-builders.cc | 3 +- .../test/gmock-matchers-comparisons_test.cc | 9 + .../test/gmock-matchers-containers_test.cc | 17 +- .../googlemock/test/gmock-more-actions_test.cc | 40 ++- .../googlemock/test/gmock-spec-builders_test.cc | 2 +- .../googletest/googlemock/test/gmock_link_test.h | 9 + contrib/googletest/googletest/CMakeLists.txt | 28 +- contrib/googletest/googletest/README.md | 4 +- .../googletest/googletest/cmake/Config.cmake.in | 4 + .../googletest/cmake/internal_utils.cmake | 42 +-- .../include/gtest/gtest-assertion-result.h | 2 +- .../googletest/include/gtest/gtest-death-test.h | 8 +- .../googletest/include/gtest/gtest-message.h | 19 +- .../googletest/include/gtest/gtest-param-test.h | 8 +- .../googletest/include/gtest/gtest-printers.h | 90 +++++-- .../googletest/include/gtest/gtest-typed-test.h | 126 ++++----- .../googletest/googletest/include/gtest/gtest.h | 55 ++-- .../gtest/internal/gtest-death-test-internal.h | 51 ++-- .../include/gtest/internal/gtest-filepath.h | 8 +- .../include/gtest/internal/gtest-internal.h | 99 +++---- .../include/gtest/internal/gtest-param-util.h | 154 +++++------ .../include/gtest/internal/gtest-port-arch.h | 2 + .../googletest/include/gtest/internal/gtest-port.h | 141 +++++++--- .../include/gtest/internal/gtest-type-util.h | 6 +- .../googletest/googletest/src/gtest-death-test.cc | 36 +-- .../googletest/googletest/src/gtest-filepath.cc | 2 +- .../googletest/googletest/src/gtest-internal-inl.h | 46 ++-- contrib/googletest/googletest/src/gtest-port.cc | 98 +++++-- contrib/googletest/googletest/src/gtest.cc | 294 ++++++++++++--------- .../googletest/test/googletest-color-test.py | 1 + .../googletest/test/googletest-death-test-test.cc | 78 +++--- .../test/googletest-json-output-unittest.py | 15 ++ .../googletest/test/googletest-options-test.cc | 5 +- .../test/googletest-output-test-golden-lin.txt | 5 - .../googletest/test/googletest-port-test.cc | 6 +- .../googletest/test/googletest-printers-test.cc | 16 ++ .../googletest/test/gtest_environment_test.cc | 96 ++++--- .../googletest/googletest/test/gtest_help_test.py | 64 ++--- .../googletest/test/gtest_json_test_utils.py | 3 + .../googletest/test/gtest_repeat_test.cc | 4 +- .../googletest/googletest/test/gtest_unittest.cc | 46 ++-- .../googletest/test/gtest_xml_output_unittest.py | 15 +- contrib/googletest/googletest_deps.bzl | 22 +- 74 files changed, 1564 insertions(+), 1022 deletions(-) diff --git a/contrib/googletest/BUILD.bazel b/contrib/googletest/BUILD.bazel index b1e3b7fba89a..e407ae29f44c 100644 --- a/contrib/googletest/BUILD.bazel +++ b/contrib/googletest/BUILD.bazel @@ -56,6 +56,12 @@ config_setting( constraint_values = ["@platforms//os:openbsd"], ) +# NOTE: Fuchsia is not an officially supported platform. +config_setting( + name = "fuchsia", + constraint_values = ["@platforms//os:fuchsia"], +) + config_setting( name = "msvc_compiler", flag_values = { @@ -147,6 +153,17 @@ cc_library( "@com_googlesource_code_re2//:re2", ], "//conditions:default": [], + }) + select({ + # `gtest-death-test.cc` has `EXPECT_DEATH` that spawns a process, + # expects it to crash and inspects its logs with the given matcher, + # so that's why these libraries are needed. + # Otherwise, builds targeting Fuchsia would fail to compile. + ":fuchsia": [ + "@fuchsia_sdk//pkg/fdio", + "@fuchsia_sdk//pkg/syslog", + "@fuchsia_sdk//pkg/zx", + ], + "//conditions:default": [], }), ) diff --git a/contrib/googletest/CMakeLists.txt b/contrib/googletest/CMakeLists.txt index 089ac987fb60..512e5c3d480f 100644 --- a/contrib/googletest/CMakeLists.txt +++ b/contrib/googletest/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) project(googletest-distribution) -set(GOOGLETEST_VERSION 1.14.0) +set(GOOGLETEST_VERSION 1.15.2) if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) set(CMAKE_CXX_EXTENSIONS OFF) @@ -15,11 +15,20 @@ enable_testing() include(CMakeDependentOption) include(GNUInstallDirs) -#Note that googlemock target already builds googletest +# Note that googlemock target already builds googletest. option(BUILD_GMOCK "Builds the googlemock subproject" ON) option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF) +if(GTEST_HAS_ABSL) + if(NOT TARGET absl::base) + find_package(absl REQUIRED) + endif() + if(NOT TARGET re2::re2) + find_package(re2 REQUIRED) + endif() +endif() + if(BUILD_GMOCK) add_subdirectory( googlemock ) else() diff --git a/contrib/googletest/CONTRIBUTING.md b/contrib/googletest/CONTRIBUTING.md index 8bed14b2666d..ab5a47bf5530 100644 --- a/contrib/googletest/CONTRIBUTING.md +++ b/contrib/googletest/CONTRIBUTING.md @@ -47,11 +47,11 @@ PR is acceptable as an alternative. ## The Google Test and Google Mock Communities The Google Test community exists primarily through the -[discussion group](http://groups.google.com/group/googletestframework) and the +[discussion group](https://groups.google.com/group/googletestframework) and the GitHub repository. Likewise, the Google Mock community exists primarily through -their own [discussion group](http://groups.google.com/group/googlemock). You are -definitely encouraged to contribute to the discussion and you can also help us -to keep the effectiveness of the group high by following and promoting the +their own [discussion group](https://groups.google.com/group/googlemock). You +are definitely encouraged to contribute to the discussion and you can also help +us to keep the effectiveness of the group high by following and promoting the guidelines listed here. ### Please Be Friendly diff --git a/contrib/googletest/CONTRIBUTORS b/contrib/googletest/CONTRIBUTORS index 77397a5b53fe..ccea41ea810b 100644 --- a/contrib/googletest/CONTRIBUTORS +++ b/contrib/googletest/CONTRIBUTORS @@ -55,6 +55,7 @@ Russ Cox Russ Rufer Sean Mcafee Sigurður Ásgeirsson +Soyeon Kim Sverre Sundsdal Szymon Sobik Takeshi Yoshino diff --git a/contrib/googletest/MODULE.bazel b/contrib/googletest/MODULE.bazel new file mode 100644 index 000000000000..61d5e2223512 --- /dev/null +++ b/contrib/googletest/MODULE.bazel @@ -0,0 +1,69 @@ +# Copyright 2024 Google Inc. +# All Rights Reserved. +# +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://bazel.build/external/overview#bzlmod + +module( + name = "googletest", + version = "1.15.2", + compatibility_level = 1, +) + +# Only direct dependencies need to be listed below. +# Please keep the versions in sync with the versions in the WORKSPACE file. + +bazel_dep(name = "abseil-cpp", + version = "20240116.2", + repo_name = "com_google_absl") + +bazel_dep(name = "platforms", + version = "0.0.10") + +bazel_dep(name = "re2", + repo_name = "com_googlesource_code_re2", + version = "2024-07-02") + +bazel_dep(name = "rules_python", + version = "0.34.0", + dev_dependency = True) + +# https://rules-python.readthedocs.io/en/stable/toolchains.html#library-modules-with-dev-only-python-usage +python = use_extension( + "@rules_python//python/extensions:python.bzl", + "python", + dev_dependency = True +) + +python.toolchain(python_version = "3.12", + is_default = True, + ignore_root_user_error = True) + +fake_fuchsia_sdk = use_repo_rule("//:fake_fuchsia_sdk.bzl", "fake_fuchsia_sdk") +fake_fuchsia_sdk(name = "fuchsia_sdk") diff --git a/contrib/googletest/README.md b/contrib/googletest/README.md index 443e02069581..f50c670534d5 100644 --- a/contrib/googletest/README.md +++ b/contrib/googletest/README.md @@ -9,7 +9,7 @@ GoogleTest now follows the We recommend [updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it). We do publish occasional semantic versions, tagged with -`v${major}.${minor}.${patch}` (e.g. `v1.13.0`). +`v${major}.${minor}.${patch}` (e.g. `v1.15.0`). #### Documentation Updates @@ -17,25 +17,21 @@ Our documentation is now live on GitHub Pages at https://google.github.io/googletest/. We recommend browsing the documentation on GitHub Pages rather than directly in the repository. -#### Release 1.13.0 +#### Release 1.15.0 -[Release 1.13.0](https://github.com/google/googletest/releases/tag/v1.13.0) is +[Release 1.15.0](https://github.com/google/googletest/releases/tag/v1.15.0) is now available. -The 1.13.x branch requires at least C++14. +The 1.15.x branch requires at least C++14. #### Continuous Integration -We use Google's internal systems for continuous integration. \ -GitHub Actions were added for the convenience of open-source contributors. They -are exclusively maintained by the open-source community and not used by the -GoogleTest team. +We use Google's internal systems for continuous integration. #### Coming Soon * We are planning to take a dependency on [Abseil](https://github.com/abseil/abseil-cpp). -* More documentation improvements are planned. ## Welcome to **GoogleTest**, Google's C++ test framework! @@ -100,12 +96,12 @@ tools. In addition to many internal projects at Google, GoogleTest is also used by the following notable projects: -* The [Chromium projects](http://www.chromium.org/) (behind the Chrome browser - and Chrome OS). -* The [LLVM](http://llvm.org/) compiler. +* The [Chromium projects](https://www.chromium.org/) (behind the Chrome + browser and Chrome OS). +* The [LLVM](https://llvm.org/) compiler. * [Protocol Buffers](https://github.com/google/protobuf), Google's data interchange format. -* The [OpenCV](http://opencv.org/) computer vision library. +* The [OpenCV](https://opencv.org/) computer vision library. ## Related Open Source Projects diff --git a/contrib/googletest/WORKSPACE b/contrib/googletest/WORKSPACE index f819ffe61b35..218e6c2e8c2b 100644 --- a/contrib/googletest/WORKSPACE +++ b/contrib/googletest/WORKSPACE @@ -6,22 +6,27 @@ googletest_deps() load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( - name = "rules_python", # 2023-07-31T20:39:27Z - sha256 = "1250b59a33c591a1c4ba68c62e95fc88a84c334ec35a2e23f46cbc1b9a5a8b55", - strip_prefix = "rules_python-e355becc30275939d87116a4ec83dad4bb50d9e1", - urls = ["https://github.com/bazelbuild/rules_python/archive/e355becc30275939d87116a4ec83dad4bb50d9e1.zip"], + name = "rules_python", + sha256 = "d71d2c67e0bce986e1c5a7731b4693226867c45bfe0b7c5e0067228a536fc580", + strip_prefix = "rules_python-0.29.0", + urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.29.0/rules_python-0.29.0.tar.gz"], ) +# https://github.com/bazelbuild/rules_python/releases/tag/0.29.0 +load("@rules_python//python:repositories.bzl", "py_repositories") +py_repositories() + http_archive( - name = "bazel_skylib", # 2023-05-31T19:24:07Z - sha256 = "08c0386f45821ce246bbbf77503c973246ed6ee5c3463e41efc197fa9bc3a7f4", - strip_prefix = "bazel-skylib-288731ef9f7f688932bd50e704a91a45ec185f9b", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/288731ef9f7f688932bd50e704a91a45ec185f9b.zip"], + name = "bazel_skylib", + sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94", + urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"], ) http_archive( - name = "platforms", # 2023-07-28T19:44:27Z - sha256 = "40eb313613ff00a5c03eed20aba58890046f4d38dec7344f00bb9a8867853526", - strip_prefix = "platforms-4ad40ef271da8176d4fc0194d2089b8a76e19d7b", - urls = ["https://github.com/bazelbuild/platforms/archive/4ad40ef271da8176d4fc0194d2089b8a76e19d7b.zip"], + name = "platforms", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz", + "https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz", + ], + sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee", ) diff --git a/contrib/googletest/WORKSPACE.bzlmod b/contrib/googletest/WORKSPACE.bzlmod new file mode 100644 index 000000000000..381432c5d0cb --- /dev/null +++ b/contrib/googletest/WORKSPACE.bzlmod @@ -0,0 +1,35 @@ +# Copyright 2024 Google Inc. +# All Rights Reserved. +# +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# https://bazel.build/external/migration#workspace.bzlmod +# +# This file is intentionally empty. When bzlmod is enabled and this +# file exists, the content of WORKSPACE is ignored. This prevents +# bzlmod builds from unintentionally depending on the WORKSPACE file. diff --git a/contrib/googletest/ci/linux-presubmit.sh b/contrib/googletest/ci/linux-presubmit.sh index 6bac88787ff2..6d2b3fb573a0 100644 --- a/contrib/googletest/ci/linux-presubmit.sh +++ b/contrib/googletest/ci/linux-presubmit.sh @@ -31,7 +31,7 @@ set -euox pipefail -readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20230217" +readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20240523" readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20230120" if [[ -z ${GTEST_ROOT:-} ]]; then @@ -67,6 +67,9 @@ for cc in /usr/local/bin/gcc /opt/llvm/clang/bin/clang; do done # Do one test with an older version of GCC +# TODO(googletest-team): This currently uses Bazel 5. When upgrading to a +# version of Bazel that supports Bzlmod, add --enable_bzlmod=false to keep test +# coverage for the old WORKSPACE dependency management. time docker run \ --volume="${GTEST_ROOT}:/src:ro" \ --workdir="/src" \ @@ -80,7 +83,6 @@ time docker run \ --copt="-Wuninitialized" \ --copt="-Wundef" \ --copt="-Wno-error=pragmas" \ - --distdir="/bazel-distdir" \ --features=external_include_paths \ --keep_going \ --show_timestamps \ @@ -102,7 +104,7 @@ for std in ${STD}; do --copt="-Wuninitialized" \ --copt="-Wundef" \ --define="absl=${absl}" \ - --distdir="/bazel-distdir" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --show_timestamps \ @@ -127,7 +129,7 @@ for std in ${STD}; do --copt="-Wuninitialized" \ --copt="-Wundef" \ --define="absl=${absl}" \ - --distdir="/bazel-distdir" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --linkopt="--gcc-toolchain=/usr/local" \ diff --git a/contrib/googletest/ci/macos-presubmit.sh b/contrib/googletest/ci/macos-presubmit.sh index 681ebc2a91d9..70eaa74fb490 100644 --- a/contrib/googletest/ci/macos-presubmit.sh +++ b/contrib/googletest/ci/macos-presubmit.sh @@ -53,7 +53,7 @@ done # Test the Bazel build # If we are running on Kokoro, check for a versioned Bazel binary. -KOKORO_GFILE_BAZEL_BIN="bazel-5.1.1-darwin-x86_64" +KOKORO_GFILE_BAZEL_BIN="bazel-7.0.0-darwin-x86_64" if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}" chmod +x ${BAZEL_BIN} @@ -69,6 +69,7 @@ for absl in 0 1; do --copt="-Wundef" \ --cxxopt="-std=c++14" \ --define="absl=${absl}" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --show_timestamps \ diff --git a/contrib/googletest/ci/windows-presubmit.bat b/contrib/googletest/ci/windows-presubmit.bat index 48962eb9e086..1adc1a16ffa8 100644 --- a/contrib/googletest/ci/windows-presubmit.bat +++ b/contrib/googletest/ci/windows-presubmit.bat @@ -1,6 +1,6 @@ SETLOCAL ENABLEDELAYEDEXPANSION -SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-5.1.1-windows-x86_64.exe +SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-7.0.0-windows-x86_64.exe SET PATH=C:\Python34;%PATH% SET BAZEL_PYTHON=C:\python34\python.exe @@ -46,12 +46,17 @@ RMDIR /S /Q cmake_msvc2022 :: ---------------------------------------------------------------------------- :: Bazel +:: The default home directory on Kokoro is a long path which causes errors +:: because of Windows limitations on path length. +:: --output_user_root=C:\tmp causes Bazel to use a shorter path. SET BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community -%BAZEL_EXE% test ... ^ +%BAZEL_EXE% ^ + --output_user_root=C:\tmp ^ + test ... ^ --compilation_mode=dbg ^ --copt=/std:c++14 ^ --copt=/WX ^ - --features=external_include_paths ^ + --enable_bzlmod=true ^ --keep_going ^ --test_output=errors ^ --test_tag_filters=-no_test_msvc2017 diff --git a/contrib/googletest/docs/advanced.md b/contrib/googletest/docs/advanced.md index 3871db13b797..240588a83b4e 100644 --- a/contrib/googletest/docs/advanced.md +++ b/contrib/googletest/docs/advanced.md @@ -508,9 +508,9 @@ TEST_F(FooDeathTest, DoesThat) { When built with Bazel and using Abseil, GoogleTest uses the [RE2](https://github.com/google/re2/wiki/Syntax) syntax. Otherwise, for POSIX systems (Linux, Cygwin, Mac), GoogleTest uses the -[POSIX extended regular expression](http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04) +[POSIX extended regular expression](https://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04) syntax. To learn about POSIX syntax, you may want to read this -[Wikipedia entry](http://en.wikipedia.org/wiki/Regular_expression#POSIX_extended). +[Wikipedia entry](https://en.wikipedia.org/wiki/Regular_expression#POSIX_extended). On Windows, GoogleTest uses its own simple regular expression implementation. It lacks many features. For example, we don't support union (`"x|y"`), grouping @@ -899,10 +899,10 @@ also supports per-test-suite set-up/tear-down. To use it: variables to hold the shared resources. 2. Outside your test fixture class (typically just below it), define those member variables, optionally giving them initial values. -3. In the same test fixture class, define a `static void SetUpTestSuite()` - function (remember not to spell it as **`SetupTestSuite`** with a small - `u`!) to set up the shared resources and a `static void TearDownTestSuite()` - function to tear them down. +3. In the same test fixture class, define a public member function `static void + SetUpTestSuite()` (remember not to spell it as **`SetupTestSuite`** with a + small `u`!) to set up the shared resources and a `static void + TearDownTestSuite()` function to tear them down. That's it! GoogleTest automatically calls `SetUpTestSuite()` before running the *first test* in the `FooTest` test suite (i.e. before creating the first @@ -1004,11 +1004,21 @@ calling the `::testing::AddGlobalTestEnvironment()` function: Environment* AddGlobalTestEnvironment(Environment* env); ``` -Now, when `RUN_ALL_TESTS()` is called, it first calls the `SetUp()` method of -each environment object, then runs the tests if none of the environments -reported fatal failures and `GTEST_SKIP()` was not called. `RUN_ALL_TESTS()` -always calls `TearDown()` with each environment object, regardless of whether or -not the tests were run. +Now, when `RUN_ALL_TESTS()` is invoked, it first calls the `SetUp()` method. The +tests are then executed, provided that none of the environments have reported +fatal failures and `GTEST_SKIP()` has not been invoked. Finally, `TearDown()` is +called. + +Note that `SetUp()` and `TearDown()` are only invoked if there is at least one +test to be performed. Importantly, `TearDown()` is executed even if the test is +not run due to a fatal failure or `GTEST_SKIP()`. + +Calling `SetUp()` and `TearDown()` for each iteration depends on the flag +`gtest_recreate_environments_when_repeating`. `SetUp()` and `TearDown()` are +called for each environment object when the object is recreated for each +iteration. However, if test environments are not recreated for each iteration, +`SetUp()` is called only on the first iteration, and `TearDown()` is called only +on the last iteration. It's OK to register multiple environment objects. In this suite, their `SetUp()` will be called in the order they are registered, and their `TearDown()` will be @@ -1804,7 +1814,7 @@ and/or command line flags. For the flags to work, your programs must call `::testing::InitGoogleTest()` before calling `RUN_ALL_TESTS()`. To see a list of supported flags and their usage, please run your test program -with the `--help` flag. You can also use `-h`, `-?`, or `/?` for short. +with the `--help` flag. If an option is specified both by an environment variable and by a flag, the latter takes precedence. @@ -2171,7 +2181,7 @@ The report format conforms to the following JSON Schema: ```json { - "$schema": "http://json-schema.org/schema#", + "$schema": "https://json-schema.org/schema#", "type": "object", "definitions": { "TestCase": { diff --git a/contrib/googletest/docs/faq.md b/contrib/googletest/docs/faq.md index 1928097292a2..c7d10b5006ba 100644 --- a/contrib/googletest/docs/faq.md +++ b/contrib/googletest/docs/faq.md @@ -3,7 +3,7 @@ ## Why should test suite names and test names not contain underscore? {: .callout .note} -Note: GoogleTest reserves underscore (`_`) for special purpose keywords, such as +Note: GoogleTest reserves underscore (`_`) for special-purpose keywords, such as [the `DISABLED_` prefix](advanced.md#temporarily-disabling-tests), in addition to the following rationale. @@ -33,9 +33,9 @@ contains `_`? `TestSuiteName_Bar__Test`, which is invalid. So clearly `TestSuiteName` and `TestName` cannot start or end with `_` -(Actually, `TestSuiteName` can start with `_` -- as long as the `_` isn't -followed by an upper-case letter. But that's getting complicated. So for -simplicity we just say that it cannot start with `_`.). +(Actually, `TestSuiteName` can start with `_`—as long as the `_` isn't followed +by an upper-case letter. But that's getting complicated. So for simplicity we +just say that it cannot start with `_`.). It may seem fine for `TestSuiteName` and `TestName` to contain `_` in the middle. However, consider this: @@ -128,30 +128,9 @@ both approaches a try. Practice is a much better way to grasp the subtle differences between the two tools. Once you have some concrete experience, you can much more easily decide which one to use the next time. -## I got some run-time errors about invalid proto descriptors when using `ProtocolMessageEquals`. Help! - -{: .callout .note} -**Note:** `ProtocolMessageEquals` and `ProtocolMessageEquiv` are *deprecated* -now. Please use `EqualsProto`, etc instead. - -`ProtocolMessageEquals` and `ProtocolMessageEquiv` were redefined recently and -are now less tolerant of invalid protocol buffer definitions. In particular, if -you have a `foo.proto` that doesn't fully qualify the type of a protocol message -it references (e.g. `message` where it should be `message`), you -will now get run-time errors like: - -``` -... descriptor.cc:...] Invalid proto descriptor for file "path/to/foo.proto": -... descriptor.cc:...] blah.MyMessage.my_field: ".Bar" is not defined. -``` - -If you see this, your `.proto` file is broken and needs to be fixed by making -the types fully qualified. The new definition of `ProtocolMessageEquals` and -`ProtocolMessageEquiv` just happen to reveal your bug. - ## My death test modifies some state, but the change seems lost after the death test finishes. Why? -Death tests (`EXPECT_DEATH`, etc) are executed in a sub-process s.t. the +Death tests (`EXPECT_DEATH`, etc.) are executed in a sub-process s.t. the expected crash won't kill the test program (i.e. the parent process). As a result, any in-memory side effects they incur are observable in their respective sub-processes, but not in the parent process. You can think of them as running @@ -192,16 +171,16 @@ class Foo { }; ``` -You also need to define it *outside* of the class body in `foo.cc`: +you also need to define it *outside* of the class body in `foo.cc`: ```c++ const int Foo::kBar; // No initializer here. ``` Otherwise your code is **invalid C++**, and may break in unexpected ways. In -particular, using it in GoogleTest comparison assertions (`EXPECT_EQ`, etc) will -generate an "undefined reference" linker error. The fact that "it used to work" -doesn't mean it's valid. It just means that you were lucky. :-) +particular, using it in GoogleTest comparison assertions (`EXPECT_EQ`, etc.) +will generate an "undefined reference" linker error. The fact that "it used to +work" doesn't mean it's valid. It just means that you were lucky. :-) If the declaration of the static data member is `constexpr` then it is implicitly an `inline` definition, and a separate definition in `foo.cc` is not @@ -311,7 +290,7 @@ a **fresh** test fixture object, immediately call `SetUp()`, run the test body, call `TearDown()`, and then delete the test fixture object. When you need to write per-test set-up and tear-down logic, you have the choice -between using the test fixture constructor/destructor or `SetUp()/TearDown()`. +between using the test fixture constructor/destructor or `SetUp()`/`TearDown()`. The former is usually preferred, as it has the following benefits: * By initializing a member variable in the constructor, we have the option to @@ -352,7 +331,7 @@ You may still want to use `SetUp()/TearDown()` in the following cases: GoogleTest assertions in a destructor if your code could run on such a platform. -## The compiler complains "no matching function to call" when I use ASSERT_PRED*. How do I fix it? +## The compiler complains "no matching function to call" when I use `ASSERT_PRED*`. How do I fix it? See details for [`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) in the Assertions Reference. @@ -410,7 +389,7 @@ C++ is case-sensitive. Did you spell it as `Setup()`? Similarly, sometimes people spell `SetUpTestSuite()` as `SetupTestSuite()` and wonder why it's never called. -## I have several test suites which share the same test fixture logic, do I have to define a new test fixture class for each of them? This seems pretty tedious. +## I have several test suites which share the same test fixture logic; do I have to define a new test fixture class for each of them? This seems pretty tedious. You don't have to. Instead of @@ -545,7 +524,7 @@ The new NPTL thread library doesn't suffer from this problem, as it doesn't create a manager thread. However, if you don't control which machine your test runs on, you shouldn't depend on this. -## Why does GoogleTest require the entire test suite, instead of individual tests, to be named *DeathTest when it uses ASSERT_DEATH? +## Why does GoogleTest require the entire test suite, instead of individual tests, to be named `*DeathTest` when it uses `ASSERT_DEATH`? GoogleTest does not interleave tests from different test suites. That is, it runs all tests in one test suite first, and then runs all tests in the next test @@ -570,7 +549,7 @@ interleave tests from different test suites, we need to run all tests in the `FooTest` case before running any test in the `BarTest` case. This contradicts with the requirement to run `BarTest.DefDeathTest` before `FooTest.Uvw`. -## But I don't like calling my entire test suite \*DeathTest when it contains both death tests and non-death tests. What do I do? +## But I don't like calling my entire test suite `*DeathTest` when it contains both death tests and non-death tests. What do I do? You don't have to, but if you like, you may split up the test suite into `FooTest` and `FooDeathTest`, where the names make it clear that they are @@ -607,7 +586,7 @@ defined such that we can print a value of `FooType`. In addition, if `FooType` is declared in a name space, the `<<` operator also needs to be defined in the *same* name space. See -[Tip of the Week #49](http://abseil.io/tips/49) for details. +[Tip of the Week #49](https://abseil.io/tips/49) for details. ## How do I suppress the memory leak messages on Windows? @@ -628,10 +607,10 @@ mistake in production. Such cleverness also leads to advise against the practice, and GoogleTest doesn't provide a way to do it. In general, the recommended way to cause the code to behave differently under -test is [Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection). You can inject +test is [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection). You can inject different functionality from the test and from the production code. Since your production code doesn't link in the for-test logic at all (the -[`testonly`](http://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure +[`testonly`](https://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure that), there is no danger in accidentally running it. However, if you *really*, *really*, *really* have no choice, and if you follow @@ -654,7 +633,7 @@ the `--gtest_also_run_disabled_tests` flag. Yes. The rule is **all test methods in the same test suite must use the same fixture -class.** This means that the following is **allowed** because both tests use the +class**. This means that the following is **allowed** because both tests use the same fixture class (`::testing::Test`). ```c++ diff --git a/contrib/googletest/docs/gmock_cook_book.md b/contrib/googletest/docs/gmock_cook_book.md index da10918c9659..f1b10b472d27 100644 --- a/contrib/googletest/docs/gmock_cook_book.md +++ b/contrib/googletest/docs/gmock_cook_book.md @@ -1927,6 +1927,12 @@ class MockFoo : public Foo { action_n)); ``` +The return value of the last action **must** match the return type of the mocked +method. In the example above, `action_n` could be `Return(true)`, or a lambda +that returns a `bool`, but not `SaveArg`, which returns `void`. Otherwise the +signature of `DoAll` would not match the signature expected by `WillOnce`, which +is the signature of the mocked method, and it wouldn't compile. + ### Verifying Complex Arguments {#SaveArgVerify} If you want to verify that a method is called with a particular argument but the @@ -3306,7 +3312,7 @@ For convenience, we allow the description string to be empty (`""`), in which case gMock will use the sequence of words in the matcher name as the description. -For example: +#### Basic Example ```cpp MATCHER(IsDivisibleBy7, "") { return (arg % 7) == 0; } @@ -3344,6 +3350,8 @@ If the above assertions fail, they will print something like: where the descriptions `"is divisible by 7"` and `"not (is divisible by 7)"` are automatically calculated from the matcher name `IsDivisibleBy7`. +#### Adding Custom Failure Messages + As you may have noticed, the auto-generated descriptions (especially those for the negation) may not be so great. You can always override them with a `string` expression of your own: @@ -3377,14 +3385,41 @@ With this definition, the above assertion will give a better message: Actual: 27 (the remainder is 6) ``` +#### Using EXPECT_ Statements in Matchers + +You can also use `EXPECT_...` (and `ASSERT_...`) statements inside custom +matcher definitions. In many cases, this allows you to write your matcher more +concisely while still providing an informative error message. For example: + +```cpp +MATCHER(IsDivisibleBy7, "") { + const auto remainder = arg % 7; + EXPECT_EQ(remainder, 0); + return true; +} +``` + +If you write a test that includes the line `EXPECT_THAT(27, IsDivisibleBy7());`, +you will get an error something like the following: + +```shell +Expected equality of these values: + remainder + Which is: 6 + 0 +``` + +#### `MatchAndExplain` + You should let `MatchAndExplain()` print *any additional information* that can help a user understand the match result. Note that it should explain why the match succeeds in case of a success (unless it's obvious) - this is useful when the matcher is used inside `Not()`. There is no need to print the argument value itself, as gMock already prints it for you. -{: .callout .note} -NOTE: The type of the value being matched (`arg_type`) is determined by the +#### Argument Types + +The type of the value being matched (`arg_type`) is determined by the context in which you use the matcher and is supplied to you by the compiler, so you don't need to worry about declaring it (nor can you). This allows the matcher to be polymorphic. For example, `IsDivisibleBy7()` can be used to match diff --git a/contrib/googletest/docs/gmock_for_dummies.md b/contrib/googletest/docs/gmock_for_dummies.md index 43f907aaa5da..ed2297c2f796 100644 --- a/contrib/googletest/docs/gmock_for_dummies.md +++ b/contrib/googletest/docs/gmock_for_dummies.md @@ -90,14 +90,14 @@ gMock is bundled with googletest. ## A Case for Mock Turtles Let's look at an example. Suppose you are developing a graphics program that -relies on a [LOGO](http://en.wikipedia.org/wiki/Logo_programming_language)-like +relies on a [LOGO](https://en.wikipedia.org/wiki/Logo_programming_language)-like API for drawing. How would you test that it does the right thing? Well, you can run it and compare the screen with a golden screen snapshot, but let's admit it: tests like this are expensive to run and fragile (What if you just upgraded to a shiny new graphics card that has better anti-aliasing? Suddenly you have to update all your golden images.). It would be too painful if all your tests are like this. Fortunately, you learned about -[Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection) and know the right thing +[Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) and know the right thing to do: instead of having your application talk to the system API directly, wrap the API in an interface (say, `Turtle`) and code to that interface: @@ -261,6 +261,8 @@ happen. Therefore it's a good idea to turn on the heap checker in your tests when you allocate mocks on the heap. You get that automatically if you use the `gtest_main` library already. +###### Expectation Ordering + **Important note:** gMock requires expectations to be set **before** the mock functions are called, otherwise the behavior is **undefined**. Do not alternate between calls to `EXPECT_CALL()` and calls to the mock functions, and do not set diff --git a/contrib/googletest/docs/primer.md b/contrib/googletest/docs/primer.md index f2a97a7269b7..61806be6ef86 100644 --- a/contrib/googletest/docs/primer.md +++ b/contrib/googletest/docs/primer.md @@ -50,7 +50,7 @@ terms *Test*, *Test Case* and *Test Suite*, so beware of misunderstanding these. Historically, GoogleTest started to use the term *Test Case* for grouping related tests, whereas current publications, including International Software -Testing Qualifications Board ([ISTQB](http://www.istqb.org/)) materials and +Testing Qualifications Board ([ISTQB](https://www.istqb.org/)) materials and various textbooks on software quality, use the term *[Test Suite][istqb test suite]* for this. @@ -68,13 +68,13 @@ deprecated and refactored away. So please be aware of the different definitions of the terms: -Meaning | GoogleTest Term | [ISTQB](http://www.istqb.org/) Term +Meaning | GoogleTest Term | [ISTQB](https://www.istqb.org/) Term :----------------------------------------------------------------------------------- | :---------------------- | :---------------------------------- Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case][istqb test case] -[istqb test case]: http://glossary.istqb.org/en/search/test%20case -[istqb test suite]: http://glossary.istqb.org/en/search/test%20suite +[istqb test case]: https://glossary.istqb.org/en_US/term/test-case-2 +[istqb test suite]: https://glossary.istqb.org/en_US/term/test-suite-1-3 ## Basic Concepts @@ -210,7 +210,7 @@ objects for several different tests. To create a fixture: -1. Derive a class from `::testing::Test` . Start its body with `protected:`, as +1. Derive a class from `testing::Test` . Start its body with `protected:`, as we'll want to access fixture members from sub-classes. 2. Inside the class, declare any objects you plan to use. 3. If necessary, write a default constructor or `SetUp()` function to prepare @@ -271,16 +271,16 @@ First, define a fixture class. By convention, you should give it the name `FooTest` where `Foo` is the class being tested. ```c++ -class QueueTest : public ::testing::Test { +class QueueTest : public testing::Test { protected: - void SetUp() override { + QueueTest() { // q0_ remains empty q1_.Enqueue(1); q2_.Enqueue(2); q2_.Enqueue(3); } - // void TearDown() override {} + // ~QueueTest() override = default; Queue q0_; Queue q1_; @@ -288,8 +288,9 @@ class QueueTest : public ::testing::Test { }; ``` -In this case, `TearDown()` is not needed since we don't have to clean up after -each test, other than what's already done by the destructor. +In this case, we don't need to define a destructor or a `TearDown()` method, +because the implicit destructor generated by the compiler will perform all of +the necessary cleanup. Now we'll write tests using `TEST_F()` and this fixture. @@ -326,11 +327,9 @@ would lead to a segfault when `n` is `NULL`. When these tests run, the following happens: 1. GoogleTest constructs a `QueueTest` object (let's call it `t1`). -2. `t1.SetUp()` initializes `t1`. -3. The first test (`IsEmptyInitially`) runs on `t1`. -4. `t1.TearDown()` cleans up after the test finishes. -5. `t1` is destructed. -6. The above steps are repeated on another `QueueTest` object, this time +2. The first test (`IsEmptyInitially`) runs on `t1`. +3. `t1` is destructed. +4. The above steps are repeated on another `QueueTest` object, this time running the `DequeueWorks` test. **Availability**: Linux, Windows, Mac. @@ -402,7 +401,7 @@ namespace project { namespace { // The fixture for testing class Foo. -class FooTest : public ::testing::Test { +class FooTest : public testing::Test { protected: // You can remove any or all of the following functions if their bodies would // be empty. @@ -450,14 +449,14 @@ TEST_F(FooTest, DoesXyz) { } // namespace my int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); + testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } ``` -The `::testing::InitGoogleTest()` function parses the command line for -GoogleTest flags, and removes all recognized flags. This allows the user to -control a test program's behavior via various flags, which we'll cover in the +The `testing::InitGoogleTest()` function parses the command line for GoogleTest +flags, and removes all recognized flags. This allows the user to control a test +program's behavior via various flags, which we'll cover in the [AdvancedGuide](advanced.md). You **must** call this function before calling `RUN_ALL_TESTS()`, or the flags won't be properly initialized. diff --git a/contrib/googletest/docs/reference/assertions.md b/contrib/googletest/docs/reference/assertions.md index aa1dbc04bd19..492ff5ef6937 100644 --- a/contrib/googletest/docs/reference/assertions.md +++ b/contrib/googletest/docs/reference/assertions.md @@ -1,7 +1,7 @@ *** 5250 LINES SKIPPED *** From nobody Wed Mar 26 21:12:26 2025 X-Original-To: dev-commits-src-all@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 4ZNKHb1qyjz5rCbT; Wed, 26 Mar 2025 21:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKHZ6YzFz3kDN; Wed, 26 Mar 2025 21:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hT6O9nOmQ1qHQO3fP1FZBR2xly760X5iDo1hMNabXe0=; b=aSz6cUu4pJKIWx5pYeEk6xm/1LGgMwR35Ok4G3B6UWNiWc3lMOJDcKJYvs6GAdHaBCX5sx 0THlW8RHVGDoe+XbRPT5T3/fGMccSCmOIuVVHI66U0FzBDWXl03zFD4abJJRgfIqpRNKO3 bZK5iFqVvWsgbzXpCTYw/WxZf6mu+azCq/o9IzbJYnY/mdYX5XNKCx5vzJIE2hk7Zqwt6/ +N7EgKEWPwl+aw8TaGe2epT2jp/YHfGzHEodaP4R/RrkJz2l+BnOt9Ox9qnbJjlz1n9SN9 wckVftX2X2NUlLBZSwMx5mvq/KW0zUdDTwuxw+exQf9eqRiJCng9KYMemO/wFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023546; a=rsa-sha256; cv=none; b=LXshk/1/YqDD5Nzn4YSBwMTs+T6KrluHuZ3FHjZoLOSXULhYrsJraLvZghKfy9QuE4inIq VnS7SV66W6Quv5yolnMSNz91n8/A/RyEULKPo6BMm1f2mpf3SHhH/CL3SALfdDTDrnHMTx YvVlgKMd3gnDIne1O0VS/gTL7SL7dN50SyRNcnDUAY47z5vB3bKq+t0yVK09Q6DaCxblIo 2tkNLSJvHLB2iZw6sZ5Ps43tkR5Gzkp/Oe7qQHIPgXVjvB/uea+twWKXwD31cBUiozd5gc pb5I0/7JPacgxKRAjIdCliqRPuKG2Mqh6+VI4irvp5w8ebVpm09KIQ9tIhesSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hT6O9nOmQ1qHQO3fP1FZBR2xly760X5iDo1hMNabXe0=; b=b6qsrPTotnhcrK5QxQCx/+4YTaU7jIpGgnFnqofeg1WaLx84RwKZRw+zyFA6sWJ6DyloTX BumnF+99MaJH4963GuIuH8xLKFCvrbAnvK+LJtNC0/NcgxWF49u5+KrJzF6a7wxMnu3YyO utHQ82funxKMC96mHx/v/S7d+jF39VaLl0gwQRHxMt96sPrv9EceSft2hp6jFzwqYOlbVu BgsfTWD9olEH5FhsIGVj0UDFHmyWdOz5ucKR0kMBY7oaTRe4oszBbugKAVfpqaSiiACVDi Rj7yoBMUi+7T3thB4ymJtw05Oeq1mD/8CnMCG7yMKzXUBI9hccYCHj+uaQ5Vog== 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 4ZNKHZ69SQzBy3; Wed, 26 Mar 2025 21:12: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 52QLCQ6S069401; Wed, 26 Mar 2025 21:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLCQYu069398; Wed, 26 Mar 2025 21:12:26 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:12:26 GMT Message-Id: <202503262112.52QLCQYu069398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: f50d338974f2 - stable/13 - lib/libsbuf/tests: reformat with `clang-format` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f50d338974f27fcf075ec041c68753ffd4366c80 Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f50d338974f27fcf075ec041c68753ffd4366c80 commit f50d338974f27fcf075ec041c68753ffd4366c80 Author: Enji Cooper AuthorDate: 2024-12-02 04:39:52 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:10:48 +0000 lib/libsbuf/tests: reformat with `clang-format` This change is being done first so any functional changes from the tests will be clearer to reviewers. No functional change intended. MFC after: 2 weeks Ref: https://reviews.freebsd.org/D47826 (cherry picked from commit 991bd461625a2c521d5be4fd6938deed57f60972) --- lib/libsbuf/tests/sbuf_core_test.c | 32 +++++++++---------- lib/libsbuf/tests/sbuf_stdio_test.c | 21 ++++++------- lib/libsbuf/tests/sbuf_string_test.c | 60 +++++++++++++++++++----------------- 3 files changed, 58 insertions(+), 55 deletions(-) diff --git a/lib/libsbuf/tests/sbuf_core_test.c b/lib/libsbuf/tests/sbuf_core_test.c index 1ed320316510..b01a43e12c5c 100644 --- a/lib/libsbuf/tests/sbuf_core_test.c +++ b/lib/libsbuf/tests/sbuf_core_test.c @@ -26,6 +26,8 @@ #include #include #include + +#include #include #include #include @@ -33,12 +35,10 @@ #include #include -#include - #include "sbuf_test_common.h" -static char test_string[] = "this is a test string"; -#define TEST_STRING_CHOP_COUNT 5 +static char test_string[] = "this is a test string"; +#define TEST_STRING_CHOP_COUNT 5 _Static_assert(nitems(test_string) > TEST_STRING_CHOP_COUNT, "test_string is too short"); @@ -76,8 +76,8 @@ ATF_TC_BODY(sbuf_clear_test, tc) buf_len = sbuf_len(sb); ATF_REQUIRE_MSG(buf_len == 0, "sbuf_len (%zd) != 0", buf_len); - ATF_REQUIRE_STREQ_MSG(sbuf_data(sb), "", - "sbuf (\"%s\") was not empty", sbuf_data(sb)); + ATF_REQUIRE_STREQ_MSG(sbuf_data(sb), "", "sbuf (\"%s\") was not empty", + sbuf_data(sb)); sbuf_delete(sb); } @@ -104,7 +104,6 @@ ATF_TC_BODY(sbuf_done_and_sbuf_finish_test, tc) static int drain_ret0(void *arg, const char *data, int len) { - (void)arg; (void)data; (void)len; @@ -145,10 +144,11 @@ ATF_TC_BODY(sbuf_len_test, tc) buf_len = sbuf_len(sb); ATF_REQUIRE_MSG(buf_len == (ssize_t)(i * test_string_len), "sbuf_len (%zd) != %zu", buf_len, i * test_string_len); - ATF_REQUIRE_MSG(sbuf_cat(sb, test_string) == 0, "sbuf_cat failed"); + ATF_REQUIRE_MSG(sbuf_cat(sb, test_string) == 0, + "sbuf_cat failed"); } -#ifdef HAVE_SBUF_SET_FLAGS +#ifdef HAVE_SBUF_SET_FLAGS sbuf_set_flags(sb, SBUF_INCLUDENUL); ATF_REQUIRE_MSG((ssize_t)(i * test_string_len + 1) == sbuf_len(sb), "sbuf_len(..) didn't report the NUL char"); @@ -173,8 +173,8 @@ ATF_TC_BODY(sbuf_new_fixedlen, tc) child_proc = atf_utils_fork(); if (child_proc == 0) { - ATF_REQUIRE_EQ_MSG(0, sbuf_finish(&sb), "sbuf_finish failed: %s", - strerror(errno)); + ATF_REQUIRE_EQ_MSG(0, sbuf_finish(&sb), + "sbuf_finish failed: %s", strerror(errno)); sbuf_putbuf(&sb); exit(0); @@ -183,7 +183,8 @@ ATF_TC_BODY(sbuf_new_fixedlen, tc) sbuf_putc(&sb, ' '); - ATF_CHECK_EQ_MSG(-1, sbuf_finish(&sb), "failed to return error on overflow"); + ATF_CHECK_EQ_MSG(-1, sbuf_finish(&sb), + "failed to return error on overflow"); sbuf_delete(&sb); } @@ -244,7 +245,6 @@ ATF_TC_BODY(sbuf_setpos_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sbuf_clear_test); ATF_TP_ADD_TC(tp, sbuf_done_and_sbuf_finish_test); ATF_TP_ADD_TC(tp, sbuf_drain_ret0_test); @@ -252,15 +252,15 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, sbuf_new_fixedlen); #if 0 /* TODO */ -#ifdef HAVE_SBUF_CLEAR_FLAGS +#ifdef HAVE_SBUF_CLEAR_FLAGS ATF_TP_ADD_TC(tp, sbuf_clear_flags_test); #endif -#ifdef HAVE_SBUF_GET_FLAGS +#ifdef HAVE_SBUF_GET_FLAGS ATF_TP_ADD_TC(tp, sbuf_get_flags_test); #endif ATF_TP_ADD_TC(tp, sbuf_new_positive_test); ATF_TP_ADD_TC(tp, sbuf_new_negative_test); -#ifdef HAVE_SBUF_SET_FLAGS +#ifdef HAVE_SBUF_SET_FLAGS ATF_TP_ADD_TC(tp, sbuf_set_flags_test); #endif #endif diff --git a/lib/libsbuf/tests/sbuf_stdio_test.c b/lib/libsbuf/tests/sbuf_stdio_test.c index 5bf32c674901..4987c1409723 100644 --- a/lib/libsbuf/tests/sbuf_stdio_test.c +++ b/lib/libsbuf/tests/sbuf_stdio_test.c @@ -26,6 +26,8 @@ #include #include #include + +#include #include #include #include @@ -33,17 +35,15 @@ #include #include -#include - #include "sbuf_test_common.h" -static char test_string[] = "this is a test string"; +static char test_string[] = "this is a test string"; -#define MESSAGE_FORMAT "message: %s\n" -#define MESSAGE_SEPARATOR ';' +#define MESSAGE_FORMAT "message: %s\n" +#define MESSAGE_SEPARATOR ';' static int -sbuf_vprintf_helper(struct sbuf *sb, const char * restrict format, ...) +sbuf_vprintf_helper(struct sbuf *sb, const char *restrict format, ...) { va_list ap; int rc; @@ -117,8 +117,8 @@ ATF_TC_BODY(sbuf_printf_test, tc) struct sbuf *sb; char *test_string_tmp; - asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, - test_string, MESSAGE_SEPARATOR, test_string); + asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, test_string, + MESSAGE_SEPARATOR, test_string); ATF_REQUIRE_MSG(test_string_tmp != NULL, "asprintf failed"); sb = sbuf_new_auto(); @@ -177,8 +177,8 @@ ATF_TC_BODY(sbuf_vprintf_test, tc) char *test_string_tmp; int rc; - asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, - test_string, MESSAGE_SEPARATOR, test_string); + asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, test_string, + MESSAGE_SEPARATOR, test_string); ATF_REQUIRE_MSG(test_string_tmp != NULL, "asprintf failed"); sb = sbuf_new_auto(); @@ -204,7 +204,6 @@ ATF_TC_BODY(sbuf_vprintf_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sbuf_printf_drain_null_test); ATF_TP_ADD_TC(tp, sbuf_printf_drain_test); ATF_TP_ADD_TC(tp, sbuf_printf_test); diff --git a/lib/libsbuf/tests/sbuf_string_test.c b/lib/libsbuf/tests/sbuf_string_test.c index 9deccc572692..9ff3dde0cab3 100644 --- a/lib/libsbuf/tests/sbuf_string_test.c +++ b/lib/libsbuf/tests/sbuf_string_test.c @@ -26,28 +26,33 @@ #include #include #include + +#include #include #include #include #include #include -#include - #include "sbuf_test_common.h" -static char test_string[] = "this is a test string"; -static char test_whitespace_string[] = " \f\n\r\t\v "; -static int test_buffer[] = { 0, 1, 2, 3, 4, 5, }; +static char test_string[] = "this is a test string"; +static char test_whitespace_string[] = " \f\n\r\t\v "; +static int test_buffer[] = { + 0, + 1, + 2, + 3, + 4, + 5, +}; static void check_buffers_equal(const void *sb_buf, const void *test_buf, size_t len) { - if (memcmp(sb_buf, test_buf, len) != 0) { printf("sbuf:\n"); - hexdump(sb_buf, len, NULL, 0), - printf("test_buf:\n"); + hexdump(sb_buf, len, NULL, 0), printf("test_buf:\n"); hexdump(test_buf, len, NULL, 0); atf_tc_fail("contents of sbuf didn't match test_buf contents"); } @@ -76,16 +81,16 @@ ATF_TC_BODY(sbuf_bcat_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)sizeof(test_buffer), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_buffer)); ATF_CHECK_MSG(sbuf_bcat(sb, test_buffer, sizeof(test_buffer)) == 0, "sbuf_bcat failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)(2 * sizeof(test_buffer)), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, 2 * sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + 2 * sizeof(test_buffer)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -113,16 +118,16 @@ ATF_TC_BODY(sbuf_bcpy_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)sizeof(test_buffer), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_buffer)); ATF_CHECK_MSG(sbuf_bcpy(sb, test_buffer, sizeof(test_buffer)) == 0, "sbuf_bcpy failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)sizeof(test_buffer), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_buffer)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -150,15 +155,15 @@ ATF_TC_BODY(sbuf_cat_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_string)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_string)); ATF_CHECK_MSG(sbuf_cat(sb, test_string) == 0, "sbuf_cat failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string_tmp), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, strlen(test_string_tmp)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + strlen(test_string_tmp)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -186,15 +191,15 @@ ATF_TC_BODY(sbuf_cpy_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, strlen(test_string)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + strlen(test_string)); ATF_CHECK_MSG(sbuf_cpy(sb, test_string) == 0, "sbuf_cpy failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, strlen(test_string)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + strlen(test_string)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -217,7 +222,7 @@ ATF_TC_BODY(sbuf_putc_test, tc) ATF_REQUIRE_MSG(sb != NULL, "sbuf_new_auto failed: %s", strerror(errno)); - for (i = 0; i <= strlen(test_string); i++) { /* Include the NUL */ + for (i = 0; i <= strlen(test_string); i++) { /* Include the NUL */ ATF_REQUIRE_MSG(sbuf_putc(sb, test_string[i]) == 0, "sbuf_putc failed"); @@ -257,8 +262,8 @@ ATF_TC_BODY(sbuf_trim_test, tc) strlen(test_whitespace_string)); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(exp_sbuf_len == test_sbuf_len, - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, exp_sbuf_len); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + exp_sbuf_len); ATF_REQUIRE_MSG(sbuf_trim(sb) == 0, "sbuf_trim failed"); @@ -274,7 +279,6 @@ ATF_TC_BODY(sbuf_trim_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sbuf_bcat_test); ATF_TP_ADD_TC(tp, sbuf_bcpy_test); ATF_TP_ADD_TC(tp, sbuf_cat_test); From nobody Wed Mar 26 21:13:59 2025 X-Original-To: dev-commits-src-all@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 4ZNKKN1jckz5rD7c; Wed, 26 Mar 2025 21:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKKM35m4z3lfd; Wed, 26 Mar 2025 21:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4URe31C/wPe/bBEhC8+DSQAtp4I1eZgfFoThdOlyqM=; b=vnu6fi9I05GyIuQC/GI+p/IqtQp4FfpQMu26sOH4/eLbFXoQLOB5AbMijYLiCof0NwzivG ocrqo7JpEOwBclw2khTsLAcvidA1UKAQh9kMMcSk4zXhDKiAhOdrMUpc+KcKGiWjYF2hlE Ef/fWvQkW9EbjDrAW6slrU6+ejzfxvE8tiQBXCU/WLxyHRrt/94y2kB+drFf5CgiOJrSJP q4EqUqYcF0JNa8fp4E6VGo1BW3QgPlMvOoZv+t8p2HecrFfOxyNhRQIRSgCbK2Y8MpPj1j 9PzZ0/5rwZ/hRwj5Tg8RGs/HRH0vH/rLt5ZDC4noWbmk770vQSmAmvCCTVtvgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023639; a=rsa-sha256; cv=none; b=R6JSvA/A7pGcisxdwsi152gzztxnAF1rQ91WAB5/BiDi3+4AlAF2+EHUM448/5J/uAFZ7y u4hwE3ZpEjOX1Hiph2KLSp2H0/QtdWu/B5CEBfTG6n+Es7MOuXcWcDLRQ1pdun0isDDeJN /DsVhsxU2dXL4kYX9BiyR4nCScaheiVJgEwno1NlZJCfkKdClUDm5c4irLBnLDDMUCPGo3 IGKSRx/7X8yKQ6fEzX30fC2swqifaNMT5XXtDeer09apg7FYBgXzQp2oJRCiw0FMCtMGr1 lcfNOa/6zwvEAI74SuetxbR7N4fEmm9tvDPQyi7+t1Oow7RvCovGomoED2b/yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B4URe31C/wPe/bBEhC8+DSQAtp4I1eZgfFoThdOlyqM=; b=lOj/+8dq5xDgf/iRr2usrBPLWl/ck1kIiU6frPAqHalmg9JRuk8450xJvlbdtagMXPCUHg myNyFRr8+uZGhWLRbn1AjcS8ivc/O4tYwDa/Ni5gxNBp9IdKmGsX9/HCU+WZ8XxI3Uw+Bg tKPSIBobtildWs/j1uldcSe9LO49SzQCbA9XQ9SYfNvfNGYvYlLll4RHfSFmvO6eS+vgYF 0ljjVO3PVftiNQe55rcJGAqhp2tAHDMp6UWB8eh/Mff8SwijZ6XdjROHJwNKLxYSc5bXI3 p2uOy4JNoSWq8q7lDbduNEhKdKn084QxtSjQcyCHDNcIAGAjvCWWXB5LlUPnlA== 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 4ZNKKM2KbnzBtW; Wed, 26 Mar 2025 21:13: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 52QLDxns069977; Wed, 26 Mar 2025 21:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLDxP4069974; Wed, 26 Mar 2025 21:13:59 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:13:59 GMT Message-Id: <202503262113.52QLDxP4069974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c08ec13bcc71 - stable/14 - lib/libsbuf/tests: reformat with `clang-format` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c08ec13bcc719216b99ac035354248910aed7fbc Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c08ec13bcc719216b99ac035354248910aed7fbc commit c08ec13bcc719216b99ac035354248910aed7fbc Author: Enji Cooper AuthorDate: 2024-12-02 04:39:52 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:13:54 +0000 lib/libsbuf/tests: reformat with `clang-format` This change is being done first so any functional changes from the tests will be clearer to reviewers. No functional change intended. MFC after: 2 weeks Ref: https://reviews.freebsd.org/D47826 (cherry picked from commit 991bd461625a2c521d5be4fd6938deed57f60972) --- lib/libsbuf/tests/sbuf_core_test.c | 32 +++++++++---------- lib/libsbuf/tests/sbuf_stdio_test.c | 21 ++++++------- lib/libsbuf/tests/sbuf_string_test.c | 60 +++++++++++++++++++----------------- 3 files changed, 58 insertions(+), 55 deletions(-) diff --git a/lib/libsbuf/tests/sbuf_core_test.c b/lib/libsbuf/tests/sbuf_core_test.c index 1ed320316510..b01a43e12c5c 100644 --- a/lib/libsbuf/tests/sbuf_core_test.c +++ b/lib/libsbuf/tests/sbuf_core_test.c @@ -26,6 +26,8 @@ #include #include #include + +#include #include #include #include @@ -33,12 +35,10 @@ #include #include -#include - #include "sbuf_test_common.h" -static char test_string[] = "this is a test string"; -#define TEST_STRING_CHOP_COUNT 5 +static char test_string[] = "this is a test string"; +#define TEST_STRING_CHOP_COUNT 5 _Static_assert(nitems(test_string) > TEST_STRING_CHOP_COUNT, "test_string is too short"); @@ -76,8 +76,8 @@ ATF_TC_BODY(sbuf_clear_test, tc) buf_len = sbuf_len(sb); ATF_REQUIRE_MSG(buf_len == 0, "sbuf_len (%zd) != 0", buf_len); - ATF_REQUIRE_STREQ_MSG(sbuf_data(sb), "", - "sbuf (\"%s\") was not empty", sbuf_data(sb)); + ATF_REQUIRE_STREQ_MSG(sbuf_data(sb), "", "sbuf (\"%s\") was not empty", + sbuf_data(sb)); sbuf_delete(sb); } @@ -104,7 +104,6 @@ ATF_TC_BODY(sbuf_done_and_sbuf_finish_test, tc) static int drain_ret0(void *arg, const char *data, int len) { - (void)arg; (void)data; (void)len; @@ -145,10 +144,11 @@ ATF_TC_BODY(sbuf_len_test, tc) buf_len = sbuf_len(sb); ATF_REQUIRE_MSG(buf_len == (ssize_t)(i * test_string_len), "sbuf_len (%zd) != %zu", buf_len, i * test_string_len); - ATF_REQUIRE_MSG(sbuf_cat(sb, test_string) == 0, "sbuf_cat failed"); + ATF_REQUIRE_MSG(sbuf_cat(sb, test_string) == 0, + "sbuf_cat failed"); } -#ifdef HAVE_SBUF_SET_FLAGS +#ifdef HAVE_SBUF_SET_FLAGS sbuf_set_flags(sb, SBUF_INCLUDENUL); ATF_REQUIRE_MSG((ssize_t)(i * test_string_len + 1) == sbuf_len(sb), "sbuf_len(..) didn't report the NUL char"); @@ -173,8 +173,8 @@ ATF_TC_BODY(sbuf_new_fixedlen, tc) child_proc = atf_utils_fork(); if (child_proc == 0) { - ATF_REQUIRE_EQ_MSG(0, sbuf_finish(&sb), "sbuf_finish failed: %s", - strerror(errno)); + ATF_REQUIRE_EQ_MSG(0, sbuf_finish(&sb), + "sbuf_finish failed: %s", strerror(errno)); sbuf_putbuf(&sb); exit(0); @@ -183,7 +183,8 @@ ATF_TC_BODY(sbuf_new_fixedlen, tc) sbuf_putc(&sb, ' '); - ATF_CHECK_EQ_MSG(-1, sbuf_finish(&sb), "failed to return error on overflow"); + ATF_CHECK_EQ_MSG(-1, sbuf_finish(&sb), + "failed to return error on overflow"); sbuf_delete(&sb); } @@ -244,7 +245,6 @@ ATF_TC_BODY(sbuf_setpos_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sbuf_clear_test); ATF_TP_ADD_TC(tp, sbuf_done_and_sbuf_finish_test); ATF_TP_ADD_TC(tp, sbuf_drain_ret0_test); @@ -252,15 +252,15 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, sbuf_new_fixedlen); #if 0 /* TODO */ -#ifdef HAVE_SBUF_CLEAR_FLAGS +#ifdef HAVE_SBUF_CLEAR_FLAGS ATF_TP_ADD_TC(tp, sbuf_clear_flags_test); #endif -#ifdef HAVE_SBUF_GET_FLAGS +#ifdef HAVE_SBUF_GET_FLAGS ATF_TP_ADD_TC(tp, sbuf_get_flags_test); #endif ATF_TP_ADD_TC(tp, sbuf_new_positive_test); ATF_TP_ADD_TC(tp, sbuf_new_negative_test); -#ifdef HAVE_SBUF_SET_FLAGS +#ifdef HAVE_SBUF_SET_FLAGS ATF_TP_ADD_TC(tp, sbuf_set_flags_test); #endif #endif diff --git a/lib/libsbuf/tests/sbuf_stdio_test.c b/lib/libsbuf/tests/sbuf_stdio_test.c index 5bf32c674901..4987c1409723 100644 --- a/lib/libsbuf/tests/sbuf_stdio_test.c +++ b/lib/libsbuf/tests/sbuf_stdio_test.c @@ -26,6 +26,8 @@ #include #include #include + +#include #include #include #include @@ -33,17 +35,15 @@ #include #include -#include - #include "sbuf_test_common.h" -static char test_string[] = "this is a test string"; +static char test_string[] = "this is a test string"; -#define MESSAGE_FORMAT "message: %s\n" -#define MESSAGE_SEPARATOR ';' +#define MESSAGE_FORMAT "message: %s\n" +#define MESSAGE_SEPARATOR ';' static int -sbuf_vprintf_helper(struct sbuf *sb, const char * restrict format, ...) +sbuf_vprintf_helper(struct sbuf *sb, const char *restrict format, ...) { va_list ap; int rc; @@ -117,8 +117,8 @@ ATF_TC_BODY(sbuf_printf_test, tc) struct sbuf *sb; char *test_string_tmp; - asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, - test_string, MESSAGE_SEPARATOR, test_string); + asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, test_string, + MESSAGE_SEPARATOR, test_string); ATF_REQUIRE_MSG(test_string_tmp != NULL, "asprintf failed"); sb = sbuf_new_auto(); @@ -177,8 +177,8 @@ ATF_TC_BODY(sbuf_vprintf_test, tc) char *test_string_tmp; int rc; - asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, - test_string, MESSAGE_SEPARATOR, test_string); + asprintf(&test_string_tmp, "%s%c" MESSAGE_FORMAT, test_string, + MESSAGE_SEPARATOR, test_string); ATF_REQUIRE_MSG(test_string_tmp != NULL, "asprintf failed"); sb = sbuf_new_auto(); @@ -204,7 +204,6 @@ ATF_TC_BODY(sbuf_vprintf_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sbuf_printf_drain_null_test); ATF_TP_ADD_TC(tp, sbuf_printf_drain_test); ATF_TP_ADD_TC(tp, sbuf_printf_test); diff --git a/lib/libsbuf/tests/sbuf_string_test.c b/lib/libsbuf/tests/sbuf_string_test.c index 9deccc572692..9ff3dde0cab3 100644 --- a/lib/libsbuf/tests/sbuf_string_test.c +++ b/lib/libsbuf/tests/sbuf_string_test.c @@ -26,28 +26,33 @@ #include #include #include + +#include #include #include #include #include #include -#include - #include "sbuf_test_common.h" -static char test_string[] = "this is a test string"; -static char test_whitespace_string[] = " \f\n\r\t\v "; -static int test_buffer[] = { 0, 1, 2, 3, 4, 5, }; +static char test_string[] = "this is a test string"; +static char test_whitespace_string[] = " \f\n\r\t\v "; +static int test_buffer[] = { + 0, + 1, + 2, + 3, + 4, + 5, +}; static void check_buffers_equal(const void *sb_buf, const void *test_buf, size_t len) { - if (memcmp(sb_buf, test_buf, len) != 0) { printf("sbuf:\n"); - hexdump(sb_buf, len, NULL, 0), - printf("test_buf:\n"); + hexdump(sb_buf, len, NULL, 0), printf("test_buf:\n"); hexdump(test_buf, len, NULL, 0); atf_tc_fail("contents of sbuf didn't match test_buf contents"); } @@ -76,16 +81,16 @@ ATF_TC_BODY(sbuf_bcat_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)sizeof(test_buffer), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_buffer)); ATF_CHECK_MSG(sbuf_bcat(sb, test_buffer, sizeof(test_buffer)) == 0, "sbuf_bcat failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)(2 * sizeof(test_buffer)), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, 2 * sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + 2 * sizeof(test_buffer)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -113,16 +118,16 @@ ATF_TC_BODY(sbuf_bcpy_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)sizeof(test_buffer), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_buffer)); ATF_CHECK_MSG(sbuf_bcpy(sb, test_buffer, sizeof(test_buffer)) == 0, "sbuf_bcpy failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)sizeof(test_buffer), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_buffer)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_buffer)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -150,15 +155,15 @@ ATF_TC_BODY(sbuf_cat_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, sizeof(test_string)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + sizeof(test_string)); ATF_CHECK_MSG(sbuf_cat(sb, test_string) == 0, "sbuf_cat failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string_tmp), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, strlen(test_string_tmp)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + strlen(test_string_tmp)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -186,15 +191,15 @@ ATF_TC_BODY(sbuf_cpy_test, tc) test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, strlen(test_string)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + strlen(test_string)); ATF_CHECK_MSG(sbuf_cpy(sb, test_string) == 0, "sbuf_cpy failed"); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(test_sbuf_len == (ssize_t)strlen(test_string), - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, strlen(test_string)); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + strlen(test_string)); ATF_REQUIRE_MSG(sbuf_finish(sb) == 0, "sbuf_finish failed: %s", strerror(errno)); @@ -217,7 +222,7 @@ ATF_TC_BODY(sbuf_putc_test, tc) ATF_REQUIRE_MSG(sb != NULL, "sbuf_new_auto failed: %s", strerror(errno)); - for (i = 0; i <= strlen(test_string); i++) { /* Include the NUL */ + for (i = 0; i <= strlen(test_string); i++) { /* Include the NUL */ ATF_REQUIRE_MSG(sbuf_putc(sb, test_string[i]) == 0, "sbuf_putc failed"); @@ -257,8 +262,8 @@ ATF_TC_BODY(sbuf_trim_test, tc) strlen(test_whitespace_string)); test_sbuf_len = sbuf_len(sb); ATF_REQUIRE_MSG(exp_sbuf_len == test_sbuf_len, - "sbuf_len(..) => %zd (actual) != %zu (expected)", - test_sbuf_len, exp_sbuf_len); + "sbuf_len(..) => %zd (actual) != %zu (expected)", test_sbuf_len, + exp_sbuf_len); ATF_REQUIRE_MSG(sbuf_trim(sb) == 0, "sbuf_trim failed"); @@ -274,7 +279,6 @@ ATF_TC_BODY(sbuf_trim_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, sbuf_bcat_test); ATF_TP_ADD_TC(tp, sbuf_bcpy_test); ATF_TP_ADD_TC(tp, sbuf_cat_test); From nobody Wed Mar 26 21:16:23 2025 X-Original-To: dev-commits-src-all@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 4ZNKN867Cbz5rD5c; Wed, 26 Mar 2025 21:16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKN80QFsz3nn2; Wed, 26 Mar 2025 21:16:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynhKWzY+0vIP2JU7IEpKYwmJAEXzH0UYUi9GiNeUP90=; b=V7mWncJGNYwWmu6OQ7tFUJ6yyVdarIL360mmGbLKP03qkp+ocf6FwS55ekQ99iNE2KSaxJ /9bpHQfcvQAXoWlV1TzqNNwjWRpeKDEXG5do1scYbV1Vl7OjBH8EWo91Ncs7yVQpxwFX/J n5ObamCN3XhnhZGht61giO3mPeF3Uy15RnndhdiyTvhUNg+Rim9TEinrbRWcIQJuSyyo1M tmqub42+Rr2KeXE7KNrPuY6FBSzl5cJNoJb3uwX0Kh8GI1rtO9EdMHnZ9Bz6R25WI0yySl MWL9XzxX5ErhNS3P+Pgbz2OZsTocrelNiu7mNz8ldwR7/VPiVf46wPwtvi0Sog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023784; a=rsa-sha256; cv=none; b=hffwtpR7Mg6awjeSUlfP4DWG7BNc79yYNrEHR7PuIzcOVfzfJos/Sj/SlOx5gXw5SbIQ3+ bqXpbeqpARViL0AST8U+68mPx6bmIBtU0hYQtdvgdEhBW1DjLrDGMviP0xiGoM9fhsQlyH Yvlk4vXW9kaDOFzjE4BWVoALglxpvteN6Lji2jhK7NIlKrQ6O7GhHiSIH8Bl86s1+kyFIT WxJLw2aYAe7GeiSLMpdr4PxA8bu0FmbwqO0IzBNSl1oOhZGrL6twzmG7UsDtdkLde+/i1g Je/BZS/xK35X/bOiJ7ieNu5mENEO6F0Z+mIzgn6WTBeY+QFmR7fXcCPxAIshzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynhKWzY+0vIP2JU7IEpKYwmJAEXzH0UYUi9GiNeUP90=; b=NK0NvW+Zu0YkEgqEvMy+6+5DbTDtCTgdLNRujx3qhhmdlQ6+0nBccm9C36dg46GaMrxgv5 Taze3xHf9FuaLYSvHXLCrbsCdtFywE83IxE7GAgnCZ/JSNWZ6NR3FOfjlwaFeqttw61Wrx talDBGY3g/SJP1JVnT1OfnvblrUlwilmfaQ2EtWxuDQ51SYCXdYqezabRGvcueATWpXbvT pIxYzURYYZ2z70D4+pi4Luwnl56als7RGbMzAG6O4YBZd9KGkL3ED4dzZsyjHdCLPBkuyP 1jkiN4McOybZNWhNXrOa6gvT8K7FsXyIjhDb8UKPSYcghxOBYT+9l53WnMPEFQ== 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 4ZNKN771hTzBtY; Wed, 26 Mar 2025 21:16: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 52QLGNfR070763; Wed, 26 Mar 2025 21:16:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLGNwX070760; Wed, 26 Mar 2025 21:16:23 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:16:23 GMT Message-Id: <202503262116.52QLGNwX070760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: f7d46b858a54 - stable/13 - radlib: fix a memory leak in `is_valid_request` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f7d46b858a54cdaf648ff532025b2fd4e34e59a5 Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f7d46b858a54cdaf648ff532025b2fd4e34e59a5 commit f7d46b858a54cdaf648ff532025b2fd4e34e59a5 Author: Enji Cooper AuthorDate: 2024-06-04 20:01:55 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:15:25 +0000 radlib: fix a memory leak in `is_valid_request` Call `HMAC_CTX_free` if returning early from `is_valid_request` when processing `Message-Authenticator` tags. Reported by: Coverity MFC after: 1 week Fixes: 8d5c7813061d ("libradius: Fix input validation bugs") Differential Revision: https://reviews.freebsd.org/D45488 (cherry picked from commit 77c04f3eb12a560eb61252c817e4147bc0178e43) --- lib/libradius/radlib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libradius/radlib.c b/lib/libradius/radlib.c index 2049468f455f..cd1f1df1b234 100644 --- a/lib/libradius/radlib.c +++ b/lib/libradius/radlib.c @@ -321,8 +321,10 @@ is_valid_request(struct rad_handle *h) hctx = HMAC_CTX_new(); while (pos < len - 2) { alen = h->in[pos + 1]; - if (alen < 2) + if (alen < 2) { + HMAC_CTX_free(hctx); return (0); + } if (h->in[pos] == RAD_MESSAGE_AUTHENTIC) { if (len - pos < MD5_DIGEST_LENGTH + 2) { HMAC_CTX_free(hctx); From nobody Wed Mar 26 21:17:12 2025 X-Original-To: dev-commits-src-all@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 4ZNKP51Mf6z5rDGR; Wed, 26 Mar 2025 21:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKP465MJz3pm1; Wed, 26 Mar 2025 21:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuCZX4gpP+tbUwM9zBpMUVXvhXJcDNs4nHlux2UhINY=; b=pmslwc05LKY44bNBl+VwrQ+hDU0WZtIDdhzMVflNKrpKiv365WSptykCQF+eCvmKY0vgKH jbbH0aQQn0/dl/0uhmiVXD76S0WhnyHDTjoj/C0qLe440nRVpW9cfBFtRRZF1ozD0MfPEE IqNXkshISRfCETtAKAwaIcHJ+vIHweyZctaTQArfMkBjhaJVgNXjoH5GHlch9fh4eYMR/l +YBNypjuFSr5njdX2Fb5QxcvcirY+WDOVqEBhT+D9hbuN7J4667BhcaaXwMxkeQaZyNRNr /QWxzFjxFEXb32ITDRcRoYDng1gztKPxyIN7p6I52pk6ybpnKzh/N47PCLXNLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023832; a=rsa-sha256; cv=none; b=RdBb262hniVnDQcEkenFI5MA2UxfiWJSdXMSpVG+/XaTSBVJnZmtUxbV79ieOYSP+NLUaF U5/gwNeqEdq+PQSOO8u8CFg8I15DDqv8k5mq+XOgmwE81etm7ZtZVKM+sQoVgrPBQoiAnO sV6lpDtydbPxSTLG7R4ZoKHnzMX0B8srmsc9iQb1O/mVUM4B3i9/cKkPibYMQjarPb6f69 08wUl/p1Liy2e4D3+uYQVuCxQjEB5NYQ+V2oT+pA09P9Jw0I2e5fQk1eqFG3QzGc0nFrwn lAcg+xQf0jOpm68/mJXB6924SnjmuiRSdHMVATeQ9NXIs2lOMAeLh411wX7+nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuCZX4gpP+tbUwM9zBpMUVXvhXJcDNs4nHlux2UhINY=; b=guaw2GYt0Sv6yaaUpjwQitlIDQmd93ziAWB9pRSAand/niwIY3aFZLiZaBaYayt5vNfDnA H6LOXZG36uZN+QTxOvNzC8VHoIjiNLz5x09zERAruzw1LpEyuokVLsIS/sLjzW43t4fRbQ FUUN9poDHgu6HxoHzXuRnXqTv2pBXKAOt46lb2iKNS7jtO2YRVYx+JWgdqoJMRwWc6MDDf Qt4Uv+xQexRUlr7q6zmu8f54IxAeSRxYL+q+MLz273SqhsYL1J8fmf+s7/sb4Uymm6mVY/ qtD3w1OO8yfvah8QYDpriGw3pjhXtSZJ4/kDn3HrZi2NgRDZhu+bmVhhjaFrIA== 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 4ZNKP43YMQzBtZ; Wed, 26 Mar 2025 21:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52QLHC3E071130; Wed, 26 Mar 2025 21:17:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLHCUZ071127; Wed, 26 Mar 2025 21:17:12 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:17:12 GMT Message-Id: <202503262117.52QLHCUZ071127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 62e7a3c6cd67 - stable/13 - lib/libcrypt: remove trailing whitespace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 62e7a3c6cd67568d16f0ac3c5667b42e4260d29f Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=62e7a3c6cd67568d16f0ac3c5667b42e4260d29f commit 62e7a3c6cd67568d16f0ac3c5667b42e4260d29f Author: Enji Cooper AuthorDate: 2023-10-28 01:10:39 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:16:38 +0000 lib/libcrypt: remove trailing whitespace No functional change intended. MFC after: 2 weeks (cherry picked from commit 8ef8da882ff475e3da3bde57d97593a68f7d97b2) --- lib/libcrypt/crypt-nthash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcrypt/crypt-nthash.c b/lib/libcrypt/crypt-nthash.c index 28c832dd6f9f..8bd880e625cc 100644 --- a/lib/libcrypt/crypt-nthash.c +++ b/lib/libcrypt/crypt-nthash.c @@ -57,17 +57,17 @@ crypt_nthash(const char *pw, const char *salt __unused, char *buffer) u_char hash[MD4_SIZE]; const char *s; MD4_CTX ctx; - - bzero(unipw, sizeof(unipw)); + + bzero(unipw, sizeof(unipw)); /* convert to unicode (thanx Archie) */ unipwLen = 0; for (s = pw; unipwLen < sizeof(unipw) / 2 && *s; s++) unipw[unipwLen++] = htons(*s << 8); - + /* Compute MD4 of Unicode password */ MD4Init(&ctx); MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t)); - MD4Final(hash, &ctx); + MD4Final(hash, &ctx); buffer = stpcpy(buffer, magic); *buffer++ = '$'; From nobody Wed Mar 26 21:18:29 2025 X-Original-To: dev-commits-src-all@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 4ZNKQb5YDgz5rDKW; Wed, 26 Mar 2025 21:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKQZ1WCcz3qs4; Wed, 26 Mar 2025 21:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3eJkXPsfxx5xz8v0ORt+NKv3L8OQWdCjR4dgZ40xLPs=; b=fHCTNs5l9y59lS9/yLhUVvF5N1VYA1BlPrm3OBqMIlibHxDdZueQ/R1kAhLkIBUEK6cyUi wAMRMItqJkAiXCmlZ88uEew6vioZdtDPZ/7Mra4a39rTIWvsGvHXbCJ0B40zD7y9X+SJxB QZPUSFMJyqhGYsVlfSmiGkdHpUXfMoOdgdek2eh28oPMORCaO7etKQjW4coCPM7ZYpjlO7 J0WAS2Kbw70pb5hyH7wjocH217Gh64Gr1c5uYUOZLcrFxNi50A9txHMo8Ow403nyEHXt0H XMj/zOIqLzNb5hXdLdbqRhhmCAuGfKTPD0Urrbi4S35PirtT+G0okQXecjn/9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023910; a=rsa-sha256; cv=none; b=aTB5W1Ctthmf4talVL18kK34bxEF83Qp3V9/ivOmnhwQZixPjHUfAK5WmtfuJI4QnpPl8v dyv2Ov3sNGP068Tjd/JR7NqmM3NSaQZ1T0NVKj3ygRwTuL9Y1VWxZ/nzzSEghxyeQjrlPM cdvmv8nfj5FgtGP7fwv614rNbMdxFGxWsw1LP7NBqwEg6NKgInCNzfX+38O7c0D7PYP8al 1n3CtPdcTDpNW2BfgIftRfAnfZZ7DWJuh1kfXjSFBohSFf5/AsqFhCjVo54mvHyQQDn04E MLM+n9S3z17+Slay3bzzTUlh0h2U7jxLfZYOxypUgPRqn5ZqfTyYVDutr15Plg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3eJkXPsfxx5xz8v0ORt+NKv3L8OQWdCjR4dgZ40xLPs=; b=mAk+K9na+32uJbxOZKW5OPXN/pZD5wtvz5hsPoysZpVh5/tTiCchh8e4cTPjPJlrOJSdyv ismeBtDty4RgeDqwZsJUNwSKbPLrnbBhcaApg6q2ktNpVNJZtez/MkWyMuYTPEXHb0LsfT rBPAW7CEpQ+PJ8g9Tv5oeyRnrM4uoGVDVWccEIWFU8dWlT3oVCimGUI0tAAGWvWCH/L4dM sf/rbYaprasA4kT8YzPk7GCxJSoFrO9+XuDsIC1dG6UW41XD3T7ZvToT3KZs4w6P+UsMOu wwSrnL2BYlEBDq9bqa8oJvuLxTsp7eLfxEEKVN7527Nfbs70IIxg7+8j4BKlvA== 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 4ZNKQY6jQvzC5L; Wed, 26 Mar 2025 21:18: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 52QLITN6071617; Wed, 26 Mar 2025 21:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLITZl071615; Wed, 26 Mar 2025 21:18:29 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:18:29 GMT Message-Id: <202503262118.52QLITZl071615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: b99e7c46884a - stable/13 - lib/libcrypt: another trivial style change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b99e7c46884a5e9c750746f831697cc4fc8fe81b Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=b99e7c46884a5e9c750746f831697cc4fc8fe81b commit b99e7c46884a5e9c750746f831697cc4fc8fe81b Author: Enji Cooper AuthorDate: 2023-10-28 01:56:41 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:18:00 +0000 lib/libcrypt: another trivial style change Normalize on hard tabs. I didn't catch this before pushing the previous commit. No functional changes intended. MFC after: 2 weeks MFC with: 8ef8da882ff475e3da3bde57d97593a68f7d97b2 (cherry picked from commit 61b15e6dfc963a0c67dbaeae7f4590674976111f) --- lib/libcrypt/crypt-nthash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcrypt/crypt-nthash.c b/lib/libcrypt/crypt-nthash.c index 8bd880e625cc..cc9dbf7533cd 100644 --- a/lib/libcrypt/crypt-nthash.c +++ b/lib/libcrypt/crypt-nthash.c @@ -65,7 +65,7 @@ crypt_nthash(const char *pw, const char *salt __unused, char *buffer) unipw[unipwLen++] = htons(*s << 8); /* Compute MD4 of Unicode password */ - MD4Init(&ctx); + MD4Init(&ctx); MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t)); MD4Final(hash, &ctx); From nobody Wed Mar 26 21:26:27 2025 X-Original-To: dev-commits-src-all@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 4ZNKbl4t9sz5rDRL; Wed, 26 Mar 2025 21:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKbl4100z40tY; Wed, 26 Mar 2025 21:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743024387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fomPh70ckug9pVyjiKayiivc7teFza1AoSpGviKoJnU=; b=g33VqA/kfCuKP4w6Fk2y12eHBbnTZLNdT3e7WdGfuH/g0ZXlHElsrbDtEQHqN49AOj9kzs ivFFKYJ11DNG/VokPBlXmonvwLZQgmJk8R3HYG6klxBHkkehlqeNEAkQ8i3en+T/5CNvOv siMByF6e0KkWnDSrSCI6dvtLhV3eLOAjNgnd3BiBd2DZbvxtV+Wyvu8st+IqJ28HjP8KCu zCRTO/+fzlvLCCp8diMGbIscR+Ffb1NF2iiRHbpZrHvIk55g4LWGg22DJY+ugDT3ijSj5g 89qOR9ZSM8YmdWclpVg5XGIGpz+nFpXhkG2Am02cVppkOsUpgljU6XfmkzZxWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743024387; a=rsa-sha256; cv=none; b=GzUAkhwgxnGkbRp8Yir+/SXm4inNYD8xlYVKBFHMjn7YUP2DCzPVWiPwoICMVNmSCrQw7v 7N0/6gYnKEK9JIv75yvUfzZqcTzKKNHQAU4xlEUkehooO9ifeVXTlrJvpq7ZfgeJZbw+o3 m6uc7FmyOxAOqxT1iVSl2aoQeM4DNfv1bh1c46wMseVZ84keZEfvT7wtfvQgxSqNtiQlPD z9ApesiV88oPcXlkxtvSErf9VXdoFFsVdG3A0jyNS45tB6ojQ4Zia+nXGb7DMMFgtacMXL hPPfm8F12w9hcxrzYCxmuNB6yrajpRMzAb5WUk/IByCpgox+nsgACmwxjzf/sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743024387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fomPh70ckug9pVyjiKayiivc7teFza1AoSpGviKoJnU=; b=F+1ck92s2zIXV+KhKf6MlFfTlWMw+HwQ+EH/sPfPfmVjye8/aRXkITVi+12IxuQ9k9ATVn Ym2K89uLpUEYNdiAfH4GEL8reO7HP1kLLZLnSfnFtVNu7/Uem7hsJEMM/GNV6r7ai6u9Zs fIRARKLq7yCvYhs0JdlnjzNzNll8islF6yMsBpbTQ+zYfSEQCvBaASuIcDfoXO8JMMYcr4 eLAjWhoc4JI3qhyAdGXdwYhilhr4xhttckeNIm8S/wBqGRzBcRpkqSNAxT9LcVlauPUE4m k55mYPtSpmcVpnj26AF4yG6nkHwW5/wHcZqy1LG5Z7xHkZCPFNMO/5JU169ZcA== 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 4ZNKbl3blPzCHK; Wed, 26 Mar 2025 21:26: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 52QLQRNC089985; Wed, 26 Mar 2025 21:26:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLQRPE089982; Wed, 26 Mar 2025 21:26:27 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:26:27 GMT Message-Id: <202503262126.52QLQRPE089982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: d5425ed751aa - stable/13 - mptutil: document that disabled/enabled are also supported List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5425ed751aa89c8bedaf7a84c3cae2bfd195247 Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d5425ed751aa89c8bedaf7a84c3cae2bfd195247 commit d5425ed751aa89c8bedaf7a84c3cae2bfd195247 Author: Enji Cooper AuthorDate: 2023-05-25 04:54:02 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:26:13 +0000 mptutil: document that disabled/enabled are also supported This change officially documents the fact that the `volume cache enabled` and `volume cache disabled` are also supported. While here, remove an unnecessary newline at the end of a warn*(3) call. warn*(3) adds a newline automatically. MFC after: 1 week (cherry picked from commit 9a49a3792940497ddf4657f6e5be56d8ef881edc) --- usr.sbin/mptutil/mpt_volume.c | 3 ++- usr.sbin/mptutil/mptutil.8 | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mptutil/mpt_volume.c b/usr.sbin/mptutil/mpt_volume.c index aa28262e3709..73137f647157 100644 --- a/usr.sbin/mptutil/mpt_volume.c +++ b/usr.sbin/mptutil/mpt_volume.c @@ -217,7 +217,8 @@ volume_cache(int ac, char **av) *s1 = tolower(*s1); if ((strcmp(av[2], "enable")) && (strcmp(av[2], "enabled")) && (strcmp(av[2], "disable")) && (strcmp(av[2], "disabled"))) { - warnx("volume cache: invalid flag, must be 'enable' or 'disable'\n"); + warnx("volume cache: invalid flag; " + "must be 'enable', 'enabled', 'disable', or 'disabled'"); return (EINVAL); } diff --git a/usr.sbin/mptutil/mptutil.8 b/usr.sbin/mptutil/mptutil.8 index 74fbda13ba2e..88c5d4505e8e 100644 --- a/usr.sbin/mptutil/mptutil.8 +++ b/usr.sbin/mptutil/mptutil.8 @@ -27,7 +27,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 16, 2009 +.Dd May 24, 2024 +.\" .Dt MPTUTIL 8 .Os .Sh NAME @@ -69,7 +70,7 @@ .Nm .Op Fl u Ar unit .Cm volume cache Ar volume -.Ar enable|disable +.Ar enable|enabled|disable|disabled .Nm .Op Fl u Ar unit .Cm clear @@ -237,7 +238,7 @@ Sets the name of .Ar volume to .Ar name . -.It Cm volume cache Ar volume Ar enable|disable +.It Cm volume cache Ar volume Ar enable|enabled|disable|disabled Enables or disables the drive write cache for the member drives of .Ar volume . .It Cm volume status Ar volume From nobody Wed Mar 26 21:31:41 2025 X-Original-To: dev-commits-src-all@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 4ZNKjn1xjXz5rDjj; Wed, 26 Mar 2025 21:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKjn1QjLz458D; Wed, 26 Mar 2025 21:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743024701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoMimVY0HQcy3g9UYyduhQxxYYYWIsf097fdchjilGE=; b=f5JDu67Zmdw7ei8cNYvlmgE4ILrkg4zF7yYI0CyXxY+CrcccuVaA8HmO8FIe7RuAPj/ox0 hxvikn3Pwdt01qE5bfuagwbccOH4S0DWaiaKLOKaFtnTUujkH5iYWCap5DkYhVkZ3TYD5C +BVKvNgoDPKWTKmzdS4eABT5fQAmCbW3F66CsEFnmGk3qAjYUDAbJlTXjNEC+DdhtjS2D6 Pz2+0a0E3RhrnI0zcOZ2KdfEWsIEbhnWoDsMAOgmKKQZMNuZa3IA3mgMiw/UucDy+NLKuK sIgoDghsU3DKiQ7MPEEHhl5GzxII2Wke22yDoUv+uFGpXmlkJ/RxOUkilz2/BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743024701; a=rsa-sha256; cv=none; b=tZFlxJiW1qCw/TYlMeRZBiVEEhmSqXYw8ROymN72ZXprHnjovbNq2f4q9G8pcwPj3MLe4K 2J+crOW2lCBfglxX/M6xMFgvNECuhgcS42CnAcscWWKSh7X2wHpowoMGtCG+GvcNkJSSIP DNwpVPyTJbiWtbp8toWVwrKGGVXFXAHLmYQ2ygnJzAJPiimv3YEwXbpHfZ1XTIQMJmEEnJ n4Zs3zAjjHmlXUCOYsKt/f1g7vFFGu9q6Jp/m9f9kiKaEjUIizNvLjHsgmMG1NYq7KpgW/ qeHmco9+02jknnso60dLNyznjYAkFVa6Xup5wTQp/WsYpw/rTFP6AjUJlDWZCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743024701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoMimVY0HQcy3g9UYyduhQxxYYYWIsf097fdchjilGE=; b=yZPWMzDBN+2ad9JxmO17JUvrJ4IoG8YAQuqPwQZ0vgNF7EyDL0tIIQQdIux/1+ep9T8LGS 4cDB1IVRJutemC6Kw47JE5FXgecybJrUV+Ylyi9Vn8QVko1s8f6kD0Zd3LTbHuYv7pCwUX RqnjxXe/ookX0b1LjyE9EGMlAJI42GoW54HwCnZyfpT+dM9GhZ0fsoKvfdpbtz6vO8rBZO zEgEgwQLkV7mXaS/v03jXgIZT16W2m+2+SkZh9++TAIX1RBUaIHa2LsjAeyFMje0Z6y/Sg 7b+nMpCE6jgGIx5TXdMbVeviVYLz+VlZmZOhRsIGsfgnxDqDpDYb21CWcW0LPw== 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 4ZNKjn0tS1zCf0; Wed, 26 Mar 2025 21:31:41 +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 52QLVfR3002640; Wed, 26 Mar 2025 21:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLVftx002637; Wed, 26 Mar 2025 21:31:41 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:31:41 GMT Message-Id: <202503262131.52QLVftx002637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 30cfebf2f089 - stable/13 - mca_log: add missing breaks when handling thresholds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 30cfebf2f089466f9ee2c5fa25b0d47f868e3539 Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=30cfebf2f089466f9ee2c5fa25b0d47f868e3539 commit 30cfebf2f089466f9ee2c5fa25b0d47f868e3539 Author: Enji Cooper AuthorDate: 2025-01-29 21:24:53 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:26:50 +0000 mca_log: add missing breaks when handling thresholds Per the "Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes: Vol. 3B 17-7", the Green and Yellow threshold indicators are mutually exclusive. Add the missing `break` statements so they're treated that way. MFC after: 1 week Reported by: Coverity Differential Revision: https://reviews.freebsd.org/D48722 (cherry picked from commit 36d7d2044b934103ad9254cd03ea61245c16ccda) --- sys/x86/x86/mca.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index dca6b935e4a3..2bc8eb0cfd4c 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -453,8 +453,10 @@ mca_log(const struct mca_record *rec) switch ((rec->mr_status & MC_STATUS_TES_STATUS) >> 53) { case 0x1: printf("(Green) "); + break; case 0x2: printf("(Yellow) "); + break; } } } From nobody Wed Mar 26 21:35:25 2025 X-Original-To: dev-commits-src-all@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 4ZNKp61LFLz5rF80; Wed, 26 Mar 2025 21:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKp56V2tz47Hv; Wed, 26 Mar 2025 21:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743024925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zb7LUGEH6XXwsALydCZf24nca79LF8wiWoMVJzOznZE=; b=ujM93lJVhQ5IFvhRE7C3w7bZeT8xrqNVSndy4HGPfxrMeqm7zSrH6i8E6d+koAH67xRPa+ NlPJZNLwlGbL80G7QLZjAtH0D9lQt10L8DMPKT2kvfjxZGHSge45Ar5MrSrqWitqv9pevS ehxlgjW86yKCQA9J/FCXwqB/HGgftDnuSHG9ObZDD8YH9Va61a1OtFvXRc6XmjH4UQcm7k S0XhEn0Rhb8ryjDMQjO8jlSym6HkS8znA8vg+MJXU/Srwn1aWqKhuug45uznLTv9HSuFjJ EB+YmXK0J53UC9tvBhfEDlKa5K/p1kEeMmAMyTrxL+q1m05mVlAHWhnQpi6srQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743024925; a=rsa-sha256; cv=none; b=o8rZcEvixZAarux70TfIZNKooDiRLLhlv17HwbN1i8Xk5yvI/CdVImRpxgM0BmQ10G8Mwd Z3BB3eeTbnr4B4p5763pPVSncxp7p0hq+Gb3osUF4if0pNylutxvVINkpL2qBIFnINh49I DtCpI5V0NVHTSofBbJ9PHOPiziXimIwhHDPq7vsf7IqRHZ21e00sZcuxPircTPHnegUidL cGv7cpXuUla7XlCjSIeJZE8jC6xc70wImIZ+TQr82n3WzbKs8Whyd72ESXLHDk90xz969p qYW/WJItth5XwZ8iCoy8zjBzLwsCpsSefQNCwfw2ct5EYoMsV49He/CPesK1NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743024925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zb7LUGEH6XXwsALydCZf24nca79LF8wiWoMVJzOznZE=; b=j5FowQbomJusv6A1+dPYjHRAxJCOjZ+nU/zmCqzBSCqKxnmcjbRHrXX3L0KCzqK/ayR4uj PaS1nGk+HkLdt+WO4R6Bwn2CJlvd+hvkqcdylbZctnE7fC26a7dU2ge5t/sIiZvexJazhr /UB2ZN9B0TV95DLHb943zX0/zNe0eALyrrM/7+je6OgHNLDeuIkqZCpWf+AlbYoDIQgvB2 R4aBzihpCCVDhc5sMidsA3ZFCrF0dTgFc5EiSQ2ghDDy3bfaxVcsCAp3givQ4hsnDrKRdH X2iUzdC5wMNz66gfdixgiF+oQOKz4SgXFu73YYqcCIFE1z//BWK16bRIogtiyg== 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 4ZNKp55tSszCdT; Wed, 26 Mar 2025 21:35: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 52QLZPMs008364; Wed, 26 Mar 2025 21:35:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLZPSw008361; Wed, 26 Mar 2025 21:35:25 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:35:25 GMT Message-Id: <202503262135.52QLZPSw008361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: d6552ebf26bc - stable/14 - mca_log: add missing breaks when handling thresholds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d6552ebf26bc5bb605c65fd05deb4301574f396b Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d6552ebf26bc5bb605c65fd05deb4301574f396b commit d6552ebf26bc5bb605c65fd05deb4301574f396b Author: Enji Cooper AuthorDate: 2025-01-29 21:24:53 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:27:24 +0000 mca_log: add missing breaks when handling thresholds Per the "Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes: Vol. 3B 17-7", the Green and Yellow threshold indicators are mutually exclusive. Add the missing `break` statements so they're treated that way. MFC after: 1 week Reported by: Coverity Differential Revision: https://reviews.freebsd.org/D48722 (cherry picked from commit 36d7d2044b934103ad9254cd03ea61245c16ccda) --- sys/x86/x86/mca.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index b293fcedbd84..4ba49469d3a2 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -453,8 +453,10 @@ mca_log(const struct mca_record *rec) switch ((rec->mr_status & MC_STATUS_TES_STATUS) >> 53) { case 0x1: printf("(Green) "); + break; case 0x2: printf("(Yellow) "); + break; } } } From nobody Wed Mar 26 21:37:17 2025 X-Original-To: dev-commits-src-all@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 4ZNKrG0Kdwz5rFCL; Wed, 26 Mar 2025 21:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNKrF6ckQz496B; Wed, 26 Mar 2025 21:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743025037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kf867IQYmpfll1AGxhOgBNP4JL3LOxZqmd7Cm03/b0g=; b=G93C0xy+3dthDXWiVrFr8NSQoDSEFVg3iWYS0c9YK0pqsC9Mel1S4QDmfXKtf9jl5mN3QC YEgGZx5QZywgPYSkNwmE9Q78yK3SpH7G128GKuue4xVbf+ZX5DjDYxDK7E8SJ0YF0iR7a4 Zv6osGjpuLiyCGY0wCNK2BwOYmzu7E8IbNGKzOGzG5vzX0UkCiYJuhcKCJNpWgrM6La/pF aX1FBoZLChB/zkRjIGKHzsiujSkTUPUSAq2xAyYeYoTRo0vmrocIvB3/GOzeQoaCYpi/vV U+yjLHVvrNtZOMDGLbKEKvkBWP6ZLa6MhvbB/H0iGo/a4vKftahB8dfWD8Houw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743025037; a=rsa-sha256; cv=none; b=E7J8UeWJ4wcLAwldgqOYt9mJRaOoPa/ZluqfVSrIunmDrxP9uvbppDqkfAraCnd6oSR7Qm jjpPCHA59NS0nxMby6oPfbwzMVFeffmkiigY1cr2F8323e8MCalXP/BVZUmHJeExEUl0wN rThd3Sujzxicljw3kkYZr2LUxpodHahmlIp5mN1YURcGb6mg1LTlL6C0zBFljWQi5EkvES Y4GfIXGkxMH+mNiXHZnVt5hWohFPJIe65mgJgKW8OabT088Xmr8Qa1o8CTG+/K9FtZAYo3 QiyM3bRZQ9fHh6ai/9rYKNUePdDm2sCogy6pUreq4Iu9tDA79ipkcUhAVLfaPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743025037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kf867IQYmpfll1AGxhOgBNP4JL3LOxZqmd7Cm03/b0g=; b=g/DxzbViTsO1c40UWIYF6Jj4WFUpqx0A2A8JJxGxVNj6b0LsjACRq2nrPUQB08DmgdtL9h wSzz+HxNYqSuddq/5aIDO+sNB2V3/usPZ+9DrQq/Fb2EjrdrQfPg60/y+sYQ5K1QEu5RZt hm0SnRsa0lwFIKI7LCjcMmGta0JIUoN+3eB5tLFI8IAZfIblytKdS88Q2jCyGZbxQCWAeL Fo1Rg/bi7fhRGnXs0syvW7fL232wF8l/hcNvk86llkc0Lc/bkDRJNSsWceSZvZe0V1xOiN Rjsv7I6UUuLrhixNHOcyRlI5UoKkq7K3qTRG0UkALetprQuULimix1HtL7fbOw== 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 4ZNKrF5sBLzCKN; Wed, 26 Mar 2025 21:37: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 52QLbHo9009003; Wed, 26 Mar 2025 21:37:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QLbHdm009000; Wed, 26 Mar 2025 21:37:17 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:37:17 GMT Message-Id: <202503262137.52QLbHdm009000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c15ed41118c9 - stable/13 - dumpon: provide diag info when `PEM_read_RSA_PUBKEY` fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c15ed41118c9174160a1a854355320558b48928d Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c15ed41118c9174160a1a854355320558b48928d commit c15ed41118c9174160a1a854355320558b48928d Author: Enji Cooper AuthorDate: 2023-05-27 01:02:34 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 21:36:43 +0000 dumpon: provide diag info when `PEM_read_RSA_PUBKEY` fails This change modifies dumpon to print out the last error from OpenSSL when `PEM_read_RSA_PUBKEY` fails. This allows end-users to diagnose why reading in RSA pubkey files fails so they can adjust the usage to meet the needs of the command. MFC after: 1 week (cherry picked from commit 52b63df9b6dfc157fb0b9f61a770b64e3663dee9) --- sbin/dumpon/dumpon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index d12df7bf0c4d..ca25d38c09e8 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -267,7 +267,8 @@ genkey(const char *pubkeyfile, struct diocskerneldump_arg *kdap) fclose(fp); fp = NULL; if (pubkey == NULL) - errx(1, "Unable to read data from %s.", pubkeyfile); + errx(1, "Unable to read data from %s: %s", pubkeyfile, + ERR_error_string(ERR_get_error(), NULL)); /* * RSA keys under ~1024 bits are trivially factorable (2018). OpenSSL From nobody Wed Mar 26 22:56:54 2025 X-Original-To: dev-commits-src-all@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 4ZNMc70YJ0z5rL56; Wed, 26 Mar 2025 22:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNMc65vPrz3KNG; Wed, 26 Mar 2025 22:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743029814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+U/FAliB+Mv85CU/eFQei81izArVlLONAiD2w4ymNrk=; b=Fkma3HJ5ariGdfR3wfwrCfSZ+WtPohZ0b/2vLYV41KySlouPq1IGWx4VgU0VZYfYFfDVer Y2ETPo9p+O/EIgh3PUHRqRUdJfwV57a4YSQHF46tRuEvxkWjUjR6NN9nGQ0Rmh6XyZedaQ syE5GgWrnCISdz7vHbbADN6ud9rpmJxwSAthjgV8mabTx1TSIzvbtE6G1NCRAfpM9GQRrG ZH3s9ruawAbsrV3YBHCjsgE5Q8/rNcKX/s5x7bjNeffKTodPy6BwUbqfLHFLaAF6bEZjdb /hXSaU62e8XTX2d2wqHMUCNffD40SoQpYjxW7RMFFuEieOeeVQOodZDljUq3Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743029814; a=rsa-sha256; cv=none; b=e74bKbpFd8pL9xv5Ol1ntv6P2frMP5lmV2ExZxM1BlV24lPnHdhd/uU6xZEM6DdGzW9tZT D/0nz+2OeBrZ8n7przv/mhu4kSji9ExMg1zFyzPjF66PN1bXBwB92i7G0tULNRd/iD4cdJ L45xwDSpu0KBvlhj1p9vj+bjo/MCk1Pn8gW4kcZH/DTb7YxkZRD89yDJ6/vse6SPh2QT98 fKwVoPKK3srUM3l0IEYvox2xuHI7dSP2K04/svBkQwZ1iYgVmyHJC6eHp5iohW9j+qt7YR pnhZqrq2mti1kIDcyfxWZHBtw3TMFTb5I04dAWQ9ZXZSBdssJa6huHIJo+EpHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743029814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+U/FAliB+Mv85CU/eFQei81izArVlLONAiD2w4ymNrk=; b=rOMFWYD6h0vD1HMdfvBtdSWiR6QLAI909sg0glcUPBzu9CgA0DRGupv/tXg39jvBQTUQnm j2GGptO6cJYp/pHZHIzXtvytyi9Diy7hXIo6w6AQg2WvsBBmyY12BKHHcaZRbwTjRIKJGy +WmyhBRTUdkK1ytyZul6SvS5kCwfYCcDaf46SUbXgXmSGuGoYR5tYGyPbMnd4OWxuDmrTN p6dbJya5vP3naf4aqvhOh14UmMo5viwAm3kXMOKDVEeJ1cToltfRQs0PJhi2vbQfQj6CnK /bSp4RhoBNfqucvynyvy6sotDcEmsCdZtkIyuJE1RXKCxyj6/3WZVLt+ckoRSw== 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 4ZNMc65DlQzVkt; Wed, 26 Mar 2025 22:56: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 52QMus54057597; Wed, 26 Mar 2025 22:56:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QMusMs057594; Wed, 26 Mar 2025 22:56:54 GMT (envelope-from git) Date: Wed, 26 Mar 2025 22:56:54 GMT Message-Id: <202503262256.52QMusMs057594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b3a68a2ec3f1 - main - pf: convert DIOCRCLRTSTATS to netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b3a68a2ec3f132183cadbdf86967ab912938a74e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3a68a2ec3f132183cadbdf86967ab912938a74e commit b3a68a2ec3f132183cadbdf86967ab912938a74e Author: Kristof Provost AuthorDate: 2025-03-22 05:54:39 +0000 Commit: Kristof Provost CommitDate: 2025-03-26 22:54:36 +0000 pf: convert DIOCRCLRTSTATS to netlink Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ lib/libpfctl/libpfctl.h | 2 ++ sbin/pfctl/pfctl.h | 1 - sbin/pfctl/pfctl_radix.c | 23 ----------------------- sbin/pfctl/pfctl_table.c | 2 +- sys/netpfil/pf/pf_nl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ sys/netpfil/pf/pf_nl.h | 2 ++ 7 files changed, 95 insertions(+), 25 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e1cae22e2f3e..d84a66063647 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -3279,3 +3279,48 @@ pfctl_get_tstats(struct pfctl_handle *h, const struct pfr_table *filter, return (e.error); } +static struct snl_attr_parser ap_tstats_clr[] = { + { .type = PF_TS_NZERO, .off = 0, .cb = snl_attr_get_uint64 }, +}; +SNL_DECLARE_PARSER(tstats_clr_parser, struct genlmsghdr, snl_f_p_empty, ap_tstats_clr); + +int +pfctl_clear_tstats(struct pfctl_handle *h, const struct pfr_table *filter, + int *nzero, int flags) +{ + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint64_t zero; + uint32_t seq_id; + int family_id; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_CLR_TSTATS); + + snl_add_msg_attr_string(&nw, PF_T_ANCHOR, filter->pfrt_anchor); + snl_add_msg_attr_string(&nw, PF_T_NAME, filter->pfrt_name); + snl_add_msg_attr_u32(&nw, PF_T_TABLE_FLAGS, filter->pfrt_flags); + snl_add_msg_attr_u32(&nw, PF_T_FLAGS, flags); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + + seq_id = hdr->nlmsg_seq; + + if (!snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + if (!snl_parse_nlmsg(&h->ss, hdr, &tstats_clr_parser, &zero)) + continue; + if (nzero) + *nzero = (uint32_t)zero; + } + + return (e.error); +} diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index c1c1da66746b..d8a7d1b6ebc4 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -554,5 +554,7 @@ int pfctl_del_table(struct pfctl_handle *h, struct pfr_table *table, typedef int (*pfctl_get_tstats_fn)(const struct pfr_tstats *t, void *arg); int pfctl_get_tstats(struct pfctl_handle *h, const struct pfr_table *filter, pfctl_get_tstats_fn fn, void *arg); +int pfctl_clear_tstats(struct pfctl_handle *h, const struct pfr_table *filter, + int *nzero, int flags); #endif diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index ffd37cf023a6..468328e12f38 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -60,7 +60,6 @@ int pfr_add_table(struct pfr_table *, int *, int); int pfr_del_table(struct pfr_table *, int *, int); int pfr_get_tables(struct pfr_table *, struct pfr_table *, int *, int); int pfr_get_tstats(struct pfr_table *, struct pfr_tstats *, int *, int); -int pfr_clr_tstats(struct pfr_table *, int, int *, int); int pfr_clr_astats(struct pfr_table *, struct pfr_addr *, int, int *, int); int pfr_clr_addrs(struct pfr_table *, int *, int); int pfr_add_addrs(struct pfr_table *, struct pfr_addr *, int, int *, int); diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index 3b0cc615e5a2..1d1918e29f44 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -234,29 +234,6 @@ pfr_clr_astats(struct pfr_table *tbl, struct pfr_addr *addr, int size, return (0); } -int -pfr_clr_tstats(struct pfr_table *tbl, int size, int *nzero, int flags) -{ - struct pfioc_table io; - - if (size < 0 || (size && !tbl)) { - errno = EINVAL; - return (-1); - } - bzero(&io, sizeof io); - io.pfrio_flags = flags; - io.pfrio_buffer = tbl; - io.pfrio_esize = sizeof(*tbl); - io.pfrio_size = size; - if (ioctl(dev, DIOCRCLRTSTATS, &io)) { - pfr_report_error(tbl, &io, "clear tstats from"); - return (-1); - } - if (nzero) - *nzero = io.pfrio_nzero; - return (0); -} - int pfr_tst_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size, int *nmatch, int flags) diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c index 57f7354b0172..834f74811ea2 100644 --- a/sbin/pfctl/pfctl_table.c +++ b/sbin/pfctl/pfctl_table.c @@ -396,7 +396,7 @@ pfctl_table(int argc, char *argv[], char *tname, const char *command, opts & PF_OPT_USEDNS); } else if (!strcmp(command, "zero")) { flags |= PFR_FLAG_ADDRSTOO; - RVTEST(pfr_clr_tstats(&table, 1, &nzero, flags)); + RVTEST(pfctl_clear_tstats(pfh, &table, &nzero, flags)); xprintf(opts, "%d table/stats cleared", nzero); } else warnx("pfctl_table: unknown command '%s'", command); diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index f34bb71839b3..3a5ae2f233b4 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -2035,6 +2035,44 @@ pf_handle_get_tstats(struct nlmsghdr *hdr, struct nl_pstate *npt) return (error); } +static int +pf_handle_clear_tstats(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct pfioc_table attrs = { 0 }; + struct nl_writer *nw = npt->nw; + struct genlmsghdr *ghdr_new; + int error; + int nzero; + + PF_RULES_RLOCK_TRACKER; + + error = nl_parse_nlmsg(hdr, &table_parser, npt, &attrs); + if (error != 0) + return (error); + + PF_TABLE_STATS_LOCK(); + PF_RULES_RLOCK(); + error = pfr_clr_tstats(&attrs.pfrio_table, 1, + &nzero, attrs.pfrio_flags | PFR_FLAG_USERIOCTL); + PF_RULES_RUNLOCK(); + PF_TABLE_STATS_UNLOCK(); + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + return (ENOMEM); + + ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_CLR_TSTATS; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_u64(nw, PF_TS_NZERO, nzero); + + if (! nlmsg_end(nw)) + error = ENOMEM; + + return (error); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, @@ -2257,6 +2295,13 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_CLR_TSTATS, + .cmd_name = "CLR_TSTATS", + .cmd_cb = pf_handle_clear_tstats, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index ed01d3427fc4..55cc9c991b18 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -65,6 +65,7 @@ enum { PFNL_CMD_ADD_TABLE = 27, PFNL_CMD_DEL_TABLE = 28, PFNL_CMD_GET_TSTATS = 29, + PFNL_CMD_CLR_TSTATS = 30, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) @@ -453,6 +454,7 @@ enum pf_tstats_t { PF_TS_TZERO = 6, /* u64 */ PF_TS_CNT = 7, /* u64 */ PF_TS_REFCNT = 8, /* u64 array */ + PF_TS_NZERO = 9, /* u64 */ }; #ifdef _KERNEL From nobody Wed Mar 26 22:56:55 2025 X-Original-To: dev-commits-src-all@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 4ZNMc84ph9z5rL0p; Wed, 26 Mar 2025 22:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNMc771NHz3KHN; Wed, 26 Mar 2025 22:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743029816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jZGFT3sRAnzwsdjQv6adcncNJn9+M23HVWJ2X/2er6g=; b=rMJCeC+EZ6wTuJZAZ8RfVl+z4Zq/Ftwrh+QWeU+okMp8zMNNutMfbyZtAfEOfZJWD3/BsY onr/J+63ddwSbu4wo5pifsWBJvOJd59+VYvutNwZ0OV5D7iz1ESQFGJtKTDv4yPYbm2W3L djZpbY3Q8iodj/RvMwpaI1+aOgwSDI8nbmMoHUa+xFBQZgXnepCvwglJ/o9BHenYdmiGXc YPircwphqQBaMBrWKDVaU7ueGWu64LHd3PC/AxhpLpBDfvyL5bH+JxljVwXKV+YAN2yZP7 VgQ8h1j3dTYBd0kR3lDo5ztqAEo+PqPQGX4FGB0vOARzs3RNgGiusOfvC3ZbdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743029816; a=rsa-sha256; cv=none; b=xlnmhzsWGEjIx1XEN0gkm8mkdkZovoUrXvNizj4+dzPVqLV2aIzZLPOMtvYYxnLL3dzXK8 5iXfeD9mK5Rl/ZFMIl/tw+2GJ2UxbD6PZT2NxT+P3O+U2uLkBDXBfv2BfO0UUt60Ye2qPM WPwWUp699/zRgfLfiJgd+z91XYjuFwJs6KltbyMg00V1aG6edovigrRIOuinx7dxVNaMTt 6B92EAZs1x7tXJJga57KFPgqC26pq2dI/dwIxUXN4dQvAuhw1pPQMxDgxtNAn1Lh3ba5TS tQ1DNlEaDlNSK7LzfgtttyJvmX7vkMIPxGMyBmARozjRh3sCxkocfEFcW+lEog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743029816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jZGFT3sRAnzwsdjQv6adcncNJn9+M23HVWJ2X/2er6g=; b=E7vzbKZwaTKuqmSXnsmU+ZoSac97afSVn4bXPLMi+FqZ2TN0UrXU+eh+x1+yES9ZnJ1Mp5 p4i9FOclrtnSfIpKWUccyDwsMUtwosj1qINU1sQvaB6jDi83zpcduNzhcxOsNOI8FZ35rU MCkpehaJ74uVMMdTnbwiaZK5OQrukZAvpjZheTfhZAW3BnbQuJMLsQ5q9OlCUW3dQuWJKA g8O6ZmDiHHeNt/Y0yqVZWGHntHUIxzdz4JcGIu0tm1NZkhh/ftpnD6KL3zWID0bdGiS9g6 RabPHrtR5B3RfXTKJYo9qL0wPBJlbKyA3HPFSCCo4YT96QL4bPw8ageB0diuBg== 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 4ZNMc76RmNzV14; Wed, 26 Mar 2025 22:56: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 52QMut64057632; Wed, 26 Mar 2025 22:56:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QMutJU057629; Wed, 26 Mar 2025 22:56:55 GMT (envelope-from git) Date: Wed, 26 Mar 2025 22:56:55 GMT Message-Id: <202503262256.52QMutJU057629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4e675edef1b6 - main - pfctl: remove unused function prototype List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4e675edef1b68678c63ca9c865e851199c1fefc4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4e675edef1b68678c63ca9c865e851199c1fefc4 commit 4e675edef1b68678c63ca9c865e851199c1fefc4 Author: Kristof Provost AuthorDate: 2025-03-22 05:55:12 +0000 Commit: Kristof Provost CommitDate: 2025-03-26 22:54:36 +0000 pfctl: remove unused function prototype Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index 468328e12f38..b4f8c97854d1 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -59,7 +59,6 @@ int pfr_get_fd(void); int pfr_add_table(struct pfr_table *, int *, int); int pfr_del_table(struct pfr_table *, int *, int); int pfr_get_tables(struct pfr_table *, struct pfr_table *, int *, int); -int pfr_get_tstats(struct pfr_table *, struct pfr_tstats *, int *, int); int pfr_clr_astats(struct pfr_table *, struct pfr_addr *, int, int *, int); int pfr_clr_addrs(struct pfr_table *, int *, int); int pfr_add_addrs(struct pfr_table *, struct pfr_addr *, int, int *, int); From nobody Wed Mar 26 22:56:56 2025 X-Original-To: dev-commits-src-all@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 4ZNMc94qhfz5rKxZ; Wed, 26 Mar 2025 22:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNMc90WXRz3KNK; Wed, 26 Mar 2025 22:56:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743029817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fyWJd2T8qUrlHFZo8osSTtK8FbPx0wn90duLO9Fmm+M=; b=dt0sDsiwJtng7FrNDnGkW2euu9XZYs+i6J5dJIaO+oABc4kaR4d0Tv1u1dH9jOwxHU4S5h GPA+xVfqp4puv0383hDPyg1UXaqHsnuGWNPLC2+l7uDyaP6OqySgIC6wndXu+nAZtqSo3f P61T/9eEeKzbUHkaR26omHnvJYfvLPl8aq0/iZWjiYAezrcV6SOCE51c3KrZMxWvx250Kr YFhRekc1j98QF7YlmQRixEKbGg+9tkrCUD2fUuK9USvdd7X88uFXPbA1eIIPFEB8hM4EPU moydJJTkQY1K31S0Ui4MxmRe3JjMvv1osfI6Xy/TR7G54eVtIYhcb4I/Nf9dGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743029817; a=rsa-sha256; cv=none; b=hfUZRBZM69d9dvEvE13nirlkYDE1IOqDHWTBEgtYRsfFTCn+v/vfJClhPIpMnRenC7QD+t Emka4koYmfUC5gMESZCmMquVnYE508m/eCO8aAjLAbnwpUKF5MgvvzV/Ha9KDcjBY2P7BU JbqiYoBJkSuxwlLD+oIR0AkrxAZRZW/GA8tmts+yTdJgWhKjiT0dnNu63xoDTq6QxKyi4f X5BT9cLpcHphHx3MBq1XmisvfTV6gvSvHIXzBlUKudV40N3G08BlwJoAyWAK1N79T9bHjb Mhfypb68Y88slnv6ql6tB/lxoJrKfR8UCKrslUWzivLzR6f3nAvREo8rLpWqkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743029817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fyWJd2T8qUrlHFZo8osSTtK8FbPx0wn90duLO9Fmm+M=; b=e9R7L3R0EtgkDQsclK0dZkfCxY2ffXa+BpRJIDlRP1QgkSe482pL/NYXmCqB72WiRWIsbj 7ovp49tOEtt9TRWn0Mn2c446kqSpBC6jKjLrUs5MPCtKI1D1t+nMcOmpK9Fx0PHFGimN0t +3yNaoNU66cqt6WMi3hOMcz5pBxzIqENlU6ECdShpccwWuJ5lTaNDEI16iZVNwKJXju45s rpak+0jl9AhTxSshNRZLpRSE+iZ1CsAwlwSxyPbwwMySkbuRg1xd3+bp+oYUXi0+2ZIIOX UU7RyNyqJp7siCn9NterShNL1wuVNZfmI+jfpeStonhL4ITFADlss/eobqPn4g== 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 4ZNMc86xxzzWGf; Wed, 26 Mar 2025 22:56: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 52QMuuql057671; Wed, 26 Mar 2025 22:56:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QMuuaK057668; Wed, 26 Mar 2025 22:56:56 GMT (envelope-from git) Date: Wed, 26 Mar 2025 22:56:56 GMT Message-Id: <202503262256.52QMuuaK057668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fd52a9e11c52 - main - pf tests: test clearing counters for all addresses in a table List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fd52a9e11c5250c196f5ec7fd2cefa64094621c4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd52a9e11c5250c196f5ec7fd2cefa64094621c4 commit fd52a9e11c5250c196f5ec7fd2cefa64094621c4 Author: Kristof Provost AuthorDate: 2025-03-26 10:53:26 +0000 Commit: Kristof Provost CommitDate: 2025-03-26 22:54:36 +0000 pf tests: test clearing counters for all addresses in a table Basic test case so we exercise the DIOCRCLRTSTATS call. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/table.sh | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index a3d00f8cdb14..78320375db7c 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -236,6 +236,60 @@ zero_one_cleanup() pft_cleanup } +atf_test_case "zero_all" "cleanup" +zero_all_head() +{ + atf_set descr 'Test zeroing all table entries' + atf_set require.user root +} + +zero_all_body() +{ + pft_init + + epair_send=$(vnet_mkepair) + ifconfig ${epair_send}a 192.0.2.1/24 up + ifconfig ${epair_send}a inet alias 192.0.2.3/24 + + vnet_mkjail alcatraz ${epair_send}b + jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "table counters { 192.0.2.1, 192.0.2.3 }" \ + "block all" \ + "pass in from to any" \ + "pass out from any to " \ + "set skip on lo" + + atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.1 192.0.2.2 + atf_check -s exit:0 -o ignore ping -c 3 -S 192.0.2.3 192.0.2.2 + + jexec alcatraz pfctl -t foo -T show -vv + atf_check -s exit:0 -e ignore \ + -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ + -o match:'Out/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'Out/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ + jexec alcatraz pfctl -t foo -T show -vv + + atf_check -s exit:0 -e ignore \ + jexec alcatraz pfctl -t foo -T zero + + jexec alcatraz pfctl -t foo -T show -vv + atf_check -s exit:0 -e ignore \ + -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'In/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \ + -o match:'Out/Pass:.*'"$TABLE_STATS_ZERO_REGEXP" \ + jexec alcatraz pfctl -t foo -T show -vv +} + +zero_all_cleanup() +{ + pft_cleanup +} + atf_test_case "reset_nonzero" "cleanup" reset_nonzero_head() { @@ -534,6 +588,7 @@ atf_init_test_cases() atf_add_test_case "v6_counters" atf_add_test_case "match_counters" atf_add_test_case "zero_one" + atf_add_test_case "zero_all" atf_add_test_case "reset_nonzero" atf_add_test_case "pr251414" atf_add_test_case "automatic" From nobody Thu Mar 27 00:21:15 2025 X-Original-To: dev-commits-src-all@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 4ZNPTS2G8rz5rQmh; Thu, 27 Mar 2025 00:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNPTR46H8z3QCR; Thu, 27 Mar 2025 00:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743034875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6zwlkcqKv8xx7Q0/KbNsfzf9BxG20BdOTk3vaHCBC1M=; b=LCTQn8spHJf653Hm8jtoNLs3Kh1IwO6GHoJ2iIhp0FprJXpmhEBD3+aq0u4YR49JUFqjTB RSIhj2wL2mlNBE1kWrmPbk0yTs1u4hmjXXhhcACLXs0MGgyRH3+ttbyUwN2nPfflHHR/9V lBc8MBpNPglLnpopDTIIVLO3DlwgzPq+/A7mbYTiFecDSnkR1NvTK+FAjKITkMKAHyLmjn wp6zT8rW6hx1mvzKrFNwgOCSRkimw+1h9YQBOcLjUkoGgwROR5gexmc2N7pHj/L1dSvjao GTvTD6eAOPkmre+Po1xaTaZU/0vX678GgCby4AyA+8dDmuEJs80fq4L0+OmMCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743034875; a=rsa-sha256; cv=none; b=BD4gl2SGPx7dkXR0tzPb8WMXkUGbpaUVPPFm+q+bkIROsnJrMniEabkMblS12PUixuEJK9 O9NPkhEPtVtrPE8zLYlqck14rncCcrM71h1H0ySkI8KLp7hK6d+ro3gZ5788k62NplUsQH rJi8eKOyDKFyJad+HzvJvybbpwPpUZaWT32sfO645bgPxXOkMcPybQFh/M6EAtfHYyg6Cy 5mcNu8hV7N0NYLdIYBSRGhNI1i4kuSSVf5ETsBHpoi901IrRe5oKE20lgaxFrCJXJGyFif 92qvBny6qhUqQUYLp2XCvtVY+LkO+mi5FoyRZwc1BDi9RUdM8hncF+a4G1a7JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743034875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6zwlkcqKv8xx7Q0/KbNsfzf9BxG20BdOTk3vaHCBC1M=; b=ZDg2F9+c15F9Ubfg93WZ9kIPPPncZH4le7VyQno2DPSQPdjgBBeaJF5RGcYBfEBsd1WyvS JUcuXMCVHxwKfIgI+fwr2ahtJtvSsa2HbvHf9xCWzjd6w5fHyux5cvAC9jl7XFUzx13oMa 1wHV6aJPy2BoyjTg8RARFTIv7l67nXSSUswj4eRuHP/M6VJ64SrmpGZUFflffPr0+EEUx+ nrAY3DB9wJvFvCOM2YW1rjxNWYK3KH0fwFTrA1yVghrYHVeKTf4FVSfDbUeq/zqm/MB6w1 GqEZQUJi/fEG6WQFWy/ztT2qEP2R9HbqGmc6LxmYBIjpql5g8OMWVV2VZ0aQ/A== 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 4ZNPTR3XDfzZSl; Thu, 27 Mar 2025 00:21:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52R0LFX1018944; Thu, 27 Mar 2025 00:21:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R0LFoq018941; Thu, 27 Mar 2025 00:21:15 GMT (envelope-from git) Date: Thu, 27 Mar 2025 00:21:15 GMT Message-Id: <202503270021.52R0LFoq018941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: d4f438357e90 - main - openssh: Request the OpenSSL 1.1 API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d4f438357e90ee1cb12819d092913fdbce813626 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=d4f438357e90ee1cb12819d092913fdbce813626 commit d4f438357e90ee1cb12819d092913fdbce813626 Author: Jose Luis Duran AuthorDate: 2025-03-27 00:19:14 +0000 Commit: Jose Luis Duran CommitDate: 2025-03-27 00:19:14 +0000 openssh: Request the OpenSSL 1.1 API Upstream OpenSSH commit f51423bda ("request 1.1x API compatibility for OpenSSL >=3.x") requests OPENSSL_API_COMPAT version 0x10100000L (OpenSSL 1.1.0), in order to avoid warnings about deprecated functions. Do the same here, to avoid getting those warnings. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D49517 --- secure/ssh.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/secure/ssh.mk b/secure/ssh.mk index 8411fb11fb16..f522e1a927fc 100644 --- a/secure/ssh.mk +++ b/secure/ssh.mk @@ -24,3 +24,5 @@ CFLAGS+= -DLIBWRAP=1 # Built-in security key support CFLAGS+= -include sk_config.h .endif + +CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L From nobody Thu Mar 27 01:28:50 2025 X-Original-To: dev-commits-src-all@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 4ZNQzR1yQwz5rVgV; Thu, 27 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNQzR15DRz3R3r; Thu, 27 Mar 2025 01:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sdeQ/FRUBk9bHPxGdr6yMV26DOrrMIxb7FBzJBhj9BM=; b=m85TDnTj+TTfWvQXFyO/TEdGbqRb0ecJctSvh0fQgXFkf+pp8Z3H5gr2MD/a6byFtbfGsJ RWDPdHzeu2SuhwpxGrsZ/7JZOyaizWdyvjuy9jnGMDTs0bu2Xhr3hTX/nPIUOk0/pl9JsC E0PZxaYS3jxvndT/s8swWVr5F7Ac+C73AjUGttsiaC0QhklF2hTOUYITKPmc1w5EfpZvWq qC2ahu40xCizCiMlu0uJqqnH8NFp/hJLjgTcNmm6DTdmqMCuw+PRENwIioXNPawxyd7Hcq WjJe02v9brfxCWM2LZw62XIjXYogrQAYUYnJLfdfxgc/vUUI43f/Zmvb3RAvRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743038931; a=rsa-sha256; cv=none; b=Ew/6Tss0QjpjgcRmE7c0Rua6jy8BJ6AckF/moQ8S/ea7mIEySt2cCIWFISFDhyrG2GnVGt ITk7gwjuaorSinugbJ0Cw7UGiF3bb+KxL4qYQeTMFT0UsPrgb7BXJfstG3D6mebpJxAHc3 bqIr4dg3BqTNeGYHGZRtmYr90nmflpT05wrp807tt+xEVklB68DiHxl+GxDMLLj0W2gsaf pNvD+AVfmuokWeRQhY09fCzkHfAQNzMM7L6KJvzbZHL/k6aULc0XHoo4anbDEEpznqhX8K tbrG0FpCCUCCfZ/0sOmc3um41KdKBaSYKzqDSbKIEBqEqJlblAOIKFPb+CzoTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sdeQ/FRUBk9bHPxGdr6yMV26DOrrMIxb7FBzJBhj9BM=; b=EOiQWWoAb8aiAh5tW+i8uYSo0Z5YJ6k69+kX979kZmXKhrIJAjovMDgASWdnO62rLJenta oFx78Z50sQh6Lt86Gebx/ScTOcl6JSQJ2IjO4YcplN+C1WjSuSy6oB/W+MIUCELoYm3CKh efdaTJllPpVb8YRl0ANxcFFmEKkbT7+TJd2nkKXGRh8to08D3A9FgLrSEG29EaDVYRm8Kz gAAOHIWdf+ZaRNYt57b38bN2kHzXeYITTZYSsAHHe4G6t3ZUhvxXh+b0en2UZ+o9x/oyXu MK+UPc5dsMjbBQgbvsSiIxJQDtSLvenS2zqwhCLs+qlwmM5oDcWw8sJy4UFM9w== 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 4ZNQzR0KXlzc2l; Thu, 27 Mar 2025 01:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52R1SokT039803; Thu, 27 Mar 2025 01:28:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R1Soi3039800; Thu, 27 Mar 2025 01:28:50 GMT (envelope-from git) Date: Thu, 27 Mar 2025 01:28:50 GMT Message-Id: <202503270128.52R1Soi3039800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 077108d94ae1 - main - rtwn: add support for AES-GCM-128 in the supported software cipher set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 077108d94ae1928cdeed5e63d87a8b53a9dc0382 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=077108d94ae1928cdeed5e63d87a8b53a9dc0382 commit 077108d94ae1928cdeed5e63d87a8b53a9dc0382 Author: Adrian Chadd AuthorDate: 2025-03-01 04:36:42 +0000 Commit: Adrian Chadd CommitDate: 2025-03-27 01:28:46 +0000 rtwn: add support for AES-GCM-128 in the supported software cipher set I'm testing this with rtwn(4) NICs right now, so enable it here. Locally tested: * RTL8812AU / RTL8821AU, STA mode (with some wpa_supplicant.conf shenanigans to force GCMP as the pairwise key to an OpenWRT AP configured to use GCMP but without requiring MFP.) Differential Revision: https://reviews.freebsd.org/D49190 Reviewed by: bz --- sys/dev/rtwn/if_rtwn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/rtwn/if_rtwn.c b/sys/dev/rtwn/if_rtwn.c index 2003fa7d20be..7df1b78db37b 100644 --- a/sys/dev/rtwn/if_rtwn.c +++ b/sys/dev/rtwn/if_rtwn.c @@ -298,6 +298,11 @@ rtwn_attach(struct rtwn_softc *sc) sc->sc_node_free = ic->ic_node_free; ic->ic_node_free = rtwn_node_free; + /* Note: this has to happen AFTER ieee80211_ifattach() */ + ieee80211_set_software_ciphers(ic, IEEE80211_CRYPTO_WEP | + IEEE80211_CRYPTO_TKIP | IEEE80211_CRYPTO_AES_CCM | + IEEE80211_CRYPTO_AES_GCM_128); + rtwn_postattach(sc); rtwn_radiotap_attach(sc); From nobody Thu Mar 27 01:28:52 2025 X-Original-To: dev-commits-src-all@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 4ZNQzS3trhz5rW3S; Thu, 27 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNQzS1b2Hz3R7K; Thu, 27 Mar 2025 01:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LfLYGmjs3svROTAXoIXB6StFe40Ek25iG3ONyfdM0w=; b=BkTzO3CcHnENixQXykx2SbSEmHBGNP5gCFGttxsDZuTG1ylj9poxG1hZ6jd/vE7CRF66qD bKaUlf2EEGg5oU5rprHPibrWrLvBW8U6qJMXZVRL1zQ10O4nu32CXLuJzojpnsoaLKTdep eHadD05ZCMS4S/g6vzmIFgWgm7J3vS0cEFOx5xt/JnxRdFn9h8etGW5vWYrKBljMBpZaXW 26ltJThb9yUiQa5ksKV95jONgDUOwksfLNzbNJwY6xmGSH50DCsM9d4berbQqf0LyBDaI4 i9UK1sAqhQSHI5s+6nXcpOBjtW7ximM8868btYpLEnGE/a4Pr4VMXmtGKApT0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743038932; a=rsa-sha256; cv=none; b=b2bKGy62gSJY3tzdRezxJMxe8dOndMMhEGWm92anwOp1EhkVUpJRj+Vp9dnzIjdxsSaSsE lQFZHdvi0UXmr1lb59C1PmVuZtdAB3ZhBYbAbDkcGzSZcIpBEFHTqxHxB8Sr25vCMmINXn VV87EjUz5L5wONX7/k1tkdDM8A44/aUSK2uWlK2eHO4Gt8GbXOA6USuawgOfYy3RF2JgrM Vz8AYlBZIFrvrPIFDx06kmXwy9GDep6loJCXEMHks2/uUFkaQSsfZ0T9I5ypugGHvDgF0B HvR3HeV7wuNq82if0EmrvvPPfQHTSuSemETVnFwH7ge+R8ybvvWBuVa1fGYiHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/LfLYGmjs3svROTAXoIXB6StFe40Ek25iG3ONyfdM0w=; b=wevWE0JGUX74Dn0EfxnnOGZdR/vPi8Pcl3VqHHE/vKY/81kd2b1nKqmCoJ5zVwQU8fCoBo srSWUUTGS84tukTNpUDxacNfNmDylt1rl4g0QhtU/9kNvAKVLdbhJUJwdpqWtbGbgBOefe d5hp7V5WfBFZcxPzzpCTLHba1KYccRk4fZdobtwQig9zERdQ7wiyDMiV4OgR0g+tPf58vs xhIM5MKMu9v0s//MNWJt/ROaupR410JLoVK9tdiuHUT/JSnfF7oqqvzn978mBa+YFtfv41 W/nvnT4bzADQTmbphy/ZKg1gb7K/7T1NH8YPEb+Ra+4DyTEfNuB81yzNFYR1Sw== 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 4ZNQzS19rQzcGY; Thu, 27 Mar 2025 01:28: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 52R1SqKu039838; Thu, 27 Mar 2025 01:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R1SqX9039835; Thu, 27 Mar 2025 01:28:52 GMT (envelope-from git) Date: Thu, 27 Mar 2025 01:28:52 GMT Message-Id: <202503270128.52R1SqX9039835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 7bf82ea4fdda - main - sys: add wlan_gcmp to GENERIC kernels as appropriate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bf82ea4fdda4fa2aa15cf690f7a64d66024eaad Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=7bf82ea4fdda4fa2aa15cf690f7a64d66024eaad commit 7bf82ea4fdda4fa2aa15cf690f7a64d66024eaad Author: Adrian Chadd AuthorDate: 2025-03-13 15:08:34 +0000 Commit: Adrian Chadd CommitDate: 2025-03-27 01:28:46 +0000 sys: add wlan_gcmp to GENERIC kernels as appropriate Add wlan_gcmp wherever CCMP is defined in kernel configs. Differential Revision: https://reviews.freebsd.org/D49343 Reviewed by: bz, cy --- sys/amd64/conf/GENERIC | 1 + sys/arm/conf/TEGRA124 | 1 + sys/conf/NOTES | 3 ++- sys/i386/conf/GENERIC | 1 + sys/powerpc/conf/GENERIC64 | 1 + sys/powerpc/conf/GENERIC64LE | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 923574adf943..6921c1d73a58 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -283,6 +283,7 @@ options IEEE80211_DEBUG # enable debug msgs options IEEE80211_SUPPORT_MESH # enable 802.11s draft support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support +device wlan_gcmp # 802.11 GCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device ath # Atheros CardBus/PCI NICs diff --git a/sys/arm/conf/TEGRA124 b/sys/arm/conf/TEGRA124 index 058a85955a04..ad5532427eda 100644 --- a/sys/arm/conf/TEGRA124 +++ b/sys/arm/conf/TEGRA124 @@ -108,6 +108,7 @@ device ums # USB mouse #device wlan # 802.11 support #device wlan_wep # 802.11 WEP support #device wlan_ccmp # 802.11 CCMP support +#device wlan_gcmp # 802.11 GCMP support #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm diff --git a/sys/conf/NOTES b/sys/conf/NOTES index aedb89e49b67..fc32acd681b3 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -889,10 +889,11 @@ options IEEE80211_SUPPORT_MESH #enable 802.11s D3.0 support options IEEE80211_SUPPORT_TDMA #enable TDMA support # The `wlan_wep', `wlan_tkip', and `wlan_ccmp' devices provide -# support for WEP, TKIP, and AES-CCMP crypto protocols optionally +# support for WEP, TKIP, AES-CCMP and AES-GCMP crypto protocols optionally # used with 802.11 devices that depend on the `wlan' module. device wlan_wep device wlan_ccmp +device wlan_gcmp device wlan_tkip # The `wlan_xauth' device provides support for external (i.e. user-mode) diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index e7851f7eb92c..e7d460af21d4 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -248,6 +248,7 @@ options IEEE80211_DEBUG # enable debug msgs options IEEE80211_SUPPORT_MESH # enable 802.11s draft support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support +device wlan_gcmp # 802.11 GCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device ath # Atheros CardBus/PCI NICs diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 9a363a5471a1..85711c8fc3ff 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -235,6 +235,7 @@ options IEEE80211_SUPPORT_MESH # enable 802.11s draft support options IEEE80211_DEBUG # enable debug msgs device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support +device wlan_gcmp # 802.11 GCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device ath # Atheros CardBus/PCI NICs diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 6aeb188d7501..a56feb6574a4 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -231,6 +231,7 @@ options IEEE80211_SUPPORT_MESH # enable 802.11s draft support options IEEE80211_DEBUG # enable debug msgs device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support +device wlan_gcmp # 802.11 GCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device ath # Atheros CardBus/PCI NICs From nobody Thu Mar 27 01:28:53 2025 X-Original-To: dev-commits-src-all@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 4ZNQzT6wSqz5rVcX; Thu, 27 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNQzT2JR8z3RGY; Thu, 27 Mar 2025 01:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=muL/paQMrhm1i9RZTDndyMQLEmn2mpsESlE5M4ahCPI=; b=k8HpOPB7F4HJN9eWFLAluhRPdChKBIS+ZuBBREotUrBTUzOFT15Uu9Di60dPyKxUEwfi32 QzMDciTWj51fI3Ng1xmSisdUbq5CIO6PmKjo1DYdBF3ydstbpH0OJN8H7GGPxcR7tNrfQJ zom+/O+UJc8nyVbzhDKpUoc9EYSxzU3FZfzcJfQfmSY9CtqttCRnG//TR65FFWwpAJ+uYP ETOxZDGFEZCSO/2JhXEFcvdHbXyEZDfV3lyI3af2GoLlYawWssPvYmjoYEV4mrzIRMGW1V 08tWtwNf8RXqxGWC4xlHr+9dVkkpHKosTy43atIl2dcspXm81dyuFi5tvBCGAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743038933; a=rsa-sha256; cv=none; b=NZ7Ob59igPpLrq11KFDU9fThwEMnXtL8IlthnaXArsEyU4QgIcRJhCcZu+aFMvhItr+qNT 3LN6Q2ALRJRDgQhqQGD5DXqjZil8nL/kLE25w3Hs1U/Xrin+QI9i5C5Zpyvs/fiPwmfmR7 F4M03Eeh5fqmSAkkbBgPDENdMQDV+eRJFaHNbkzg3WvAUgjbziAMgAJGawH3BYNofgVpAC JIGRIpXvLsP3T2Szd/CW6Z46aY7W21ZJOXVDjRk9omhqz2gOJgG6MxlktEEed0g1zEIKX0 blIXffmoOby1YlvL3a4QAdNituNdBFhPvDvwZ5zN1SFGQEFFiha3pCPyZ0zj9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=muL/paQMrhm1i9RZTDndyMQLEmn2mpsESlE5M4ahCPI=; b=Azj8y3JQBA1z81z6pCI8yTvgAcpuRp2VpPMIDR5B7VNe7xrJLCy+vrUfFxVNFn8hB/KgkA H7gV7LJaG09vIZJQCrNpLGfg94qcf1a4Kz53YRzAGSJ2SRR0V5GIBlrHEHen0xLg7Oypjc IcrpgPU+Kc5/zeDmfybHsHLQ7vrTiVkPwkALoQIqJ9jLDMwK58SB96RjSwSaDQeui6pBI4 TQmF6k6iqv9fgeAN+run/IwXA6m2PhQ/So3VQOIvz1W2OovSBnxYvAlcxkx6p055ifk5/E w/tmn1Iwn4QKlcqUrCvoyeZ6yl7qTJiGq0RWdpABfccSGFIhUd4V7AM5TD2XVg== 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 4ZNQzT1kTZzc1Z; Thu, 27 Mar 2025 01:28: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 52R1Sruw039873; Thu, 27 Mar 2025 01:28:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R1SrFa039870; Thu, 27 Mar 2025 01:28:53 GMT (envelope-from git) Date: Thu, 27 Mar 2025 01:28:53 GMT Message-Id: <202503270128.52R1SrFa039870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: d8503e8768aa - main - rc: add wlan_gcmp to the hostapd / wpa_supplicant rc scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8503e8768aa63cbec349393acfc48db876d93db Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=d8503e8768aa63cbec349393acfc48db876d93db commit d8503e8768aa63cbec349393acfc48db876d93db Author: Adrian Chadd AuthorDate: 2025-03-13 15:10:07 +0000 Commit: Adrian Chadd CommitDate: 2025-03-27 01:28:46 +0000 rc: add wlan_gcmp to the hostapd / wpa_supplicant rc scripts Add wlan_gcmp as a module to check for before starting hostapd/wpa_supplicant. Differential Revision: https://reviews.freebsd.org/D49344 Reviewed by: bz, cy --- libexec/rc/rc.d/hostapd | 2 +- libexec/rc/rc.d/wpa_supplicant | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/hostapd b/libexec/rc/rc.d/hostapd index 251df91a280b..264cb4ef476b 100755 --- a/libexec/rc/rc.d/hostapd +++ b/libexec/rc/rc.d/hostapd @@ -34,7 +34,7 @@ fi command_args="-P ${pidfile} -B ${conf_file}" required_files="${conf_file}" -required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" +required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp wlan_gcmp" extra_commands="reload" load_rc_config ${name} diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant index 61525a82894b..e11dddfb5fd3 100755 --- a/libexec/rc/rc.d/wpa_supplicant +++ b/libexec/rc/rc.d/wpa_supplicant @@ -31,7 +31,7 @@ conf_file=${wpa_supplicant_conf_file} pidfile="/var/run/${name}/${ifn}.pid" command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile" required_files=$conf_file -required_modules="wlan_wep wlan_tkip wlan_ccmp" +required_modules="wlan_wep wlan_tkip wlan_ccmp wlan_gcmp" # doesn't make sense to run in a svcj: nojail keyword wpa_supplicant_svcj="NO" From nobody Thu Mar 27 01:28:54 2025 X-Original-To: dev-commits-src-all@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 4ZNQzV67rSz5rVjs; Thu, 27 Mar 2025 01:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNQzV3BJnz3R9T; Thu, 27 Mar 2025 01:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewtqkonDV+k/xrxRvyhn3i2FeLJbftgALRkT9ZuR7/o=; b=OdwJYFngj3EM3XnWSw0Y9hBj1T8R2DNFdi39K8cn7ILM2sNv3WswjH8ZM2h3EhR3VY7+vo tGaYNVdzBGc6FTsIrWBA8M7d6lMO1piwGrAndS9cW5iEhJ7aVuzJZlMJps1gRFOBX+CNvF CiXj5MIR+Lx57AP92Hlpi5p/YtJuHPmnyNzY0vKZqF3ayLl23cggeZoiS5COhcIIfcIh7q 1M4PpSHelTBIxLvJOQFfr3O4gslOqm5WrpqJAYP4r8FILlU+XIDBCzeWmmtwI+PLaSfUvz lF3sA7kZuR/C8jJU2WfWoGo1U81KkCYSAUJopjVZeVkMZG2HBMzAUBd0xU9vbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743038934; a=rsa-sha256; cv=none; b=qUnKjRiLUYijmrB789k6VxPlu9zXUF216LY/s7zgv9nYNsaFDR0y3rIVB57Zyv6CBnbWD0 yR0bWHobj6GLtDWpGvwFbK6imKoX3yxtRFVyxVA9O8Mj0ky7PSRI22O4loCxSIfOZ6shie m2lCwVHKSJh+2t8VKibcp23eyjLqWzdQNTlQq/oZzw0L2iCSYCjjfOD23s1yJ2DkNS3rbS z6F4FxPwliB4Lu/KtdMHpEtA4gAbdG0mkmiXhndxw4YMTrgqymDlkopdmqrpmC3BL1sVLp yiEAOIOV8Dbw/pp/sEnmqyv5QecGOFeX6Xs5GlOKCO38g84VxAIflh8Zdq2KKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743038934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewtqkonDV+k/xrxRvyhn3i2FeLJbftgALRkT9ZuR7/o=; b=Zec5soLA3fAqhOk89/Ek+R10A0IkG0By5i7eMkFjG5pQcMJArdsKCkXW5b3eysj5cE0BU5 Ibw6Flj+0HxLmghdC1CUR/HYlGyDZ5WA+Sq7KxQUAqltEEZeatK4lbjR+jACjxrMcjoZXp Unl1A5R7ZUJ6DkDEZzGqX3EbRwv1XKxOLfR4QQWlb3V0r+e+0WZ0XAsnTY1BqGlPZiVgHN w/dPA+Db079d6tDsL0JQdlNkjcuVaDn9tSzhIpX8m50eYP2zTDmCBTLdljnfZRDUzVVkAy 4pcAwiFFMfDG4Hgfq8KvlLWeWK48/sSaHyipSBwtOgYQ20723DjK/g5a/YKAXw== 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 4ZNQzV2hRFzbZ1; Thu, 27 Mar 2025 01:28: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 52R1Ss1f039908; Thu, 27 Mar 2025 01:28:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R1Ssf6039905; Thu, 27 Mar 2025 01:28:54 GMT (envelope-from git) Date: Thu, 27 Mar 2025 01:28:54 GMT Message-Id: <202503270128.52R1Ssf6039905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: d342ae67192f - main - uath: add support for GCMP-128 encryption List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d342ae67192f776e41476c8292117fe87c5b6f7c Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=d342ae67192f776e41476c8292117fe87c5b6f7c commit d342ae67192f776e41476c8292117fe87c5b6f7c Author: Adrian Chadd AuthorDate: 2025-03-15 02:05:04 +0000 Commit: Adrian Chadd CommitDate: 2025-03-27 01:28:47 +0000 uath: add support for GCMP-128 encryption Explicitly set the software ciphers; add support for GCMP-128. Locally tested: * AR5523 11abg NIC, 2/5GHz STA operation, GCMP forced in wpa_supplicant.conf Differential Revision: https://reviews.freebsd.org/D49370 Reviewed by: bz --- sys/dev/usb/wlan/if_uath.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 28c176df1f14..b49c75032d77 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -441,6 +441,12 @@ uath_attach(device_t dev) ieee80211_init_channels(ic, NULL, bands); ieee80211_ifattach(ic); + + /* Note: this has to happen AFTER ieee80211_ifattach() */ + ieee80211_set_software_ciphers(ic, + IEEE80211_CRYPTO_WEP | IEEE80211_CRYPTO_TKIP | + IEEE80211_CRYPTO_AES_CCM | IEEE80211_CRYPTO_AES_GCM_128); + ic->ic_raw_xmit = uath_raw_xmit; ic->ic_scan_start = uath_scan_start; ic->ic_scan_end = uath_scan_end; From nobody Thu Mar 27 07:47:56 2025 X-Original-To: dev-commits-src-all@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 4ZNbNr5XRWz5rxcc for ; Thu, 27 Mar 2025 07:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNbNr41nBz3Vrb; Thu, 27 Mar 2025 07:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743061676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BU2UBXJ/JedDELrT//uu5skflp7+TYfI6W42nleToKs=; b=Vx3sy/oST6SA0AEDGyRIByxyC6bCzQkGvEBsExpANFz+0WaOzyP/AhEW9ZMq1XjQ5zuZUT w1vBkp+u0SgSz7vQxnUmtczoZsnr/mZB1GK3rwsp6UKPXd8MFSdlRcdq1Q8xmpcHgd9+Bf 7akI2cVTXTtL9MZ/qc0jvcAhHiQYSHpXosRQtiEEbSwVikl2qEp71nRVXLHbRjp/K4yvQP 7rXiUF22+P9xjvdEopvjWowi7DbS8hV7pwZy/dR80pinu7K0JMzuWVt0rJKdhil8ATJAXm /MZfPbkm+nSXl5eGdQTiWzSn+V7/4Jz3+bAFpljvOm2nZ+uYbcBg2HuZhMWf7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743061676; a=rsa-sha256; cv=none; b=G+48AzrvyEGREyQ6iSTZVww4QUZVeiz97LEcy43WAuD+LRDZcPi4TOMRx23UjpQpjeX3ga fsxBAgad+fWfexitiCutv81bTqgjaFUVlCglntqyDyaMuj6ACwGa9H3Y0AjNWh4agpwmNA HgZofLxYPXndhgreYtQc5Gh1phtSKA+5aIDpVePbP2yFjxtqNyV5XePGSgT4BeLZH4ARJk 7hXHiN2WUv6DhHoexh7AwD6SWtwcO1AzgaZXotloZf80yW4RjMYdNXlCe94Pbo20fU85iW C7JlQ3DMlRGO7mB7A/ihF75JLTbHLx992PusYbVoaFpsfhZ7PG6+rGCdF5ggQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743061676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BU2UBXJ/JedDELrT//uu5skflp7+TYfI6W42nleToKs=; b=layKz3hDuRV6MciDFx5y3NzxUGUt6zLSVfTi0RuMRuKvVNls2gTjswP/jP2t43YQLZl1bI 4fm4iFNK46ut4OGs5mvvGIdhSoWByuWVxxvoOSHmFNAGkmwCCN+2nAWA1g+fSLpgZT7dWk js9FbCchvZQYRItnhzYId0udUhoPfxh+YNreduMakKEmH3q12lUNma5QRMnJwBiC837wEu AoyqKh/ZuH61yIhMGv8r7BhDUMuC+Vl3drtUvbOp+pScZRRZWCX9Ne29pmy82xymWiOWLa nRTLs0QV0M5ogq6k6Cs33WCoDGYCIR8VGqEgnY1oWRGvjnbckzN12u6mhnZnjg== 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 4ZNbNr34KQznhW; Thu, 27 Mar 2025 07:47: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 52R7luq9051425; Thu, 27 Mar 2025 07:47:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R7luhr051424; Thu, 27 Mar 2025 07:47:56 GMT (envelope-from git) Date: Thu, 27 Mar 2025 07:47:56 GMT Message-Id: <202503270747.52R7luhr051424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: fe674998bb2d..4abc21b28c22 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 4abc21b28c22d93c06e1e51c1f9019b4fa4e0d51 X-Git-Oldrev: fe674998bb2d0912660d8aa3f2904b70f57497b0 X-Git-Newrev: 4abc21b28c22d93c06e1e51c1f9019b4fa4e0d51 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=fe674998bb2d..4abc21b28c22 62a9d372f832 zed: Print return code on failed zpool_prepare_disk 41823a0ede88 linux: zvols: correctly detect flush requests (#17131) 4ddaf45ba468 AUTHORS: refresh with recent new contributors 0433523ca263 Verify every block pointer is either embedded, hole, or has a valid DVA 13ec35ce3b52 Linux/vnops: implement STATX_DIOALIGN 09f4dd06c3e3 Prefer embedded blocks to dedup 0ea44e576bd4 Fix deduplication of overridden blocks 084531bcceb0 Update FreeBSD CI images 1b495eeab379 FDT dedup log sync -- remove incremental 201d26294995 Add receive:append permission for limited receive eb9098ed47e6 SPDX: license tags: CDDL-1.0 137045be9827 SPDX: license tags: BSD-2-Clause 4eafa9e5e8d3 SPDX: license tags: BSD-3-Clause 7d8dd8d9a5f8 SPDX: license tags: MIT c404ffb44666 SPDX: license tags: Apache-2.0 f83431b3bd9c SPDX: license tags: GPL-2.0-or-later f8d29099e7c7 SPDX: license tags: LGPL-2.1-or-later ff28d9fc6ff4 SPDX: license tags: BSD-3-Clause OR GPL-2.0-only 9fd7401d753e SPDX: license tags: BSD-2-Clause OR GPL-2.0-only 44dc09614e47 SPDX: license tags: Brian-Gladman-3-Clause bf754d60108c SPDX: license tags: OpenSSL-standalone a8847a7e4fde SPDX: license tags: LicenseRef-OpenZFS-ThirdParty-PublicDomain f5312d2996a3 spdxcheck: program to check SPDX license tags 21850f519be4 ZTS: Remove TXG_TIMEOUT from dedup_quota test (#17150) f69631992d74 dmu_tx: rename dmu_tx_assign() flags from TXG_* to DMU_TX_* (#17143) cb4b854838e2 convert_wycheproof: fix compile failure 6e89095873b9 convert_wycheproof: don't check tag len on invalid tests 3cd9934a4898 Some arc_release() cleanup d033f2676594 Always perform bounds-checking in metaslab_free_concrete 83fa051ceb91 spl_vfs: fix vrele task runner signature mismatch 676b7ef10439 Fix deadlock on I/O errors during device removal 94b9cbbe1e69 Updating dio_read_verify ZTS test (#16830) 9250403ba68d Make ganging redundancy respect redundant_metadata property (#17073) 5b5a514955fd zts: add spdx license tags to gang_blocks tests (#17160) d28d2e30079c linux/kstat: allow multi-level module names 45e9b54e9ec5 freebsd/kstat: allow multi-level module names 3862ebbf1fe1 CI: Remove FreeBSD 13.3 and 14.1 tests (#17162) 94a3fabcb0de Unified allocation throttling (#17020) 530ddcd5f131 Harmonize on American spelling in several places 73494f335261 Make use of "i.e." (id est) consistent b386bf87c152 Fix cases where "descendent" is used as a noun 1d4505d7a1a1 Capitalize in various places where appropriate e759a86fa53f Correct "umount" to "unmount" in a couple of places ef8181272639 Fix spelling errors fd018248d5f7 Disambiguate reference to kibibytes, not kilobytes 885f87fa3ef9 ZTS: Fix zpool_status_features_001_pos local test (#17174) 9611dfdc7088 Linux 6.14 compat: META (#17098) (#17172) a0e62718cfcf Linux: Fix zfs_prune panics v2 (#17121) 240fc4a6d15c runners: Fix zfs-release RPM creation (#17173) 50d87fed6a3a runners: Fix tarball build for zfs-qemu-packages workflow (#17158) 4abc21b28c22 Block remap for cloned blocks on device removal From nobody Thu Mar 27 08:12:18 2025 X-Original-To: dev-commits-src-all@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 4ZNbwz68h7z5ryPL; Thu, 27 Mar 2025 08:12:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNbwz4fx7z3drS; Thu, 27 Mar 2025 08:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743063139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pPF31Afw4LQOZHywiejdI2bnaRHu5n3kPBBcdxRXUcA=; b=riczxkihj1Iyac3/LocYtZJHRXcKZP4pw2ypbi15bpO53m61JbaOnOl5+1MJncGjBwPOeP 25M7SBl3HL18axdfBf6+sTJ1cb7xgW8xmCYwKFeFucZalJ6YnYjn2eNW/92up+OgioCiPa w+Pk/h2zuQDIsIacqJej6IqdLMuPjKIfO1mjeW2PlE3vg7d1sQ8/Z0UzOt+0D2Yud3FRTv MYBR84va0IOLz8/6QImJoRHP8/t54OJEWaGAVC4kETpu1P2XsYNMrO1yJ8xfcjb6MNYL7s 35NRJy24EeB1mzlTv8hiFlQQ0xaREvxl9OYkKdWiM+I/k7l9QwJqDocUvS45Zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743063139; a=rsa-sha256; cv=none; b=cSKp4mr5mUHoN3HeRr+byrddA33fabsqIYONtNl9zQyB8ycsd+Fm2c1sYJKHYAyraQdTGt RZkurtT39WS1LYZLxRmr3hOOiGC8DyxfWELAZKgqUdlnhuehUAz4WjIL6/dW9k6QAgdacb UTbz1+of39Gb3xLkzx+My4kSlukBnwjXQpWy+aicZNji9bC6iaD5m3fRy1mvRRxw68wqdb 7580NHUuZLc0mupZIfpzGsqKt2l0omvcxdD6V7FRR4vwNVXS5Ft9X3UbjkY32/SkPfT4Q9 4u5pjz2wBKUvxas21sDoDq+SQU28OAaZUQG+KlcDxtd6BzTlYamZMEqGLFiSCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743063139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pPF31Afw4LQOZHywiejdI2bnaRHu5n3kPBBcdxRXUcA=; b=fVDIi8Fzmal2RZpj/r4960UsI6gbjuCe3/djzD1ZcPEmAbj732NoOg6uT8AZOcPtg44MCR Z8aQRR9kCq/EwzhjbkJunYVertepCnTo/fIanRwlf+cxcAb9lUtDTbRY3w2iIPkI8VTiTC 85GS4UwAQ2HXpTzxM3xmXC40cw9pwHuUYkTyWdNIzHZIovGnPVPrKWEgw/MRBwHU+AsDdr td2XHc2kbxW8Ix8wnT3D10p7Mjp06V2wjMRjyLRq7a0QXbRlX+j2SCu2SXGkBtUN4Qe0Nh qbPlZjasjOFJntVLjcjJbiNJtVs66gxXIBYmo6NPGmBy4Aqn38n5lW2byen7lQ== 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 4ZNbwz4Cj7zpfB; Thu, 27 Mar 2025 08:12:19 +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 52R8CJZ0006435; Thu, 27 Mar 2025 08:12:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R8CI5h006429; Thu, 27 Mar 2025 08:12:18 GMT (envelope-from git) Date: Thu, 27 Mar 2025 08:12:18 GMT Message-Id: <202503270812.52R8CI5h006429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 61145dc2b94f - main - zfs: merge openzfs/zfs@4abc21b28 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61145dc2b94f12f6a47344fb9aac702321880e43 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=61145dc2b94f12f6a47344fb9aac702321880e43 commit 61145dc2b94f12f6a47344fb9aac702321880e43 Merge: d342ae67192f 4abc21b28c22 Author: Martin Matuska AuthorDate: 2025-03-27 07:50:36 +0000 Commit: Martin Matuska CommitDate: 2025-03-27 08:01:36 +0000 zfs: merge openzfs/zfs@4abc21b28 Notable upstream pull request merges: #17015 201d26294 Add receive:append permission for limited receive #17020 94a3fabcb Unified allocation throttling #17038 1b495eeab FDT dedup log sync -- remove incremental #17073 9250403ba Make ganging redundancy respect redundant_metadata property #17077 0433523ca Verify every block pointer is either embedded, hole, or has a valid DVA #17101 83fa051ce spl_vfs: fix vrele task runner signature mismatch #17113 09f4dd06c Prefer embedded blocks to dedup #17120 0ea44e576 Fix deduplication of overridden blocks #17124 62a9d372f zed: Print return code on failed zpool_prepare_disk #17126 3cd9934a4 Some arc_release() cleanup #17136 d033f2676 Always perform bounds-checking in metaslab_free_concrete #17142 45e9b54e9 kstat: allow multi-level module names #17145 676b7ef10 Fix deadlock on I/O errors during device removal #17180 4abc21b28 Block remap for cloned blocks on device removal Obtained from: OpenZFS OpenZFS commit: 4abc21b28c22d93c06e1e51c1f9019b4fa4e0d51 sys/contrib/openzfs/.cirrus.yml | 10 +- .../.github/workflows/scripts/qemu-2-start.sh | 13 - .../.github/workflows/scripts/qemu-4-build-vm.sh | 33 +- sys/contrib/openzfs/.github/workflows/zfs-qemu.yml | 6 +- sys/contrib/openzfs/.mailmap | 5 + sys/contrib/openzfs/AUTHORS | 14 + sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/Makefile.am | 4 + sys/contrib/openzfs/cmd/arc_summary | 1 + sys/contrib/openzfs/cmd/arcstat.in | 1 + sys/contrib/openzfs/cmd/dbufstat.in | 1 + sys/contrib/openzfs/cmd/mount_zfs.c | 1 + sys/contrib/openzfs/cmd/raidz_test/raidz_bench.c | 1 + sys/contrib/openzfs/cmd/raidz_test/raidz_test.c | 1 + sys/contrib/openzfs/cmd/raidz_test/raidz_test.h | 1 + sys/contrib/openzfs/cmd/zdb/zdb.c | 15 +- sys/contrib/openzfs/cmd/zdb/zdb.h | 1 + sys/contrib/openzfs/cmd/zdb/zdb_il.c | 1 + sys/contrib/openzfs/cmd/zed/agents/fmd_api.c | 1 + sys/contrib/openzfs/cmd/zed/agents/fmd_api.h | 1 + sys/contrib/openzfs/cmd/zed/agents/fmd_serd.c | 1 + sys/contrib/openzfs/cmd/zed/agents/fmd_serd.h | 1 + sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c | 1 + sys/contrib/openzfs/cmd/zed/agents/zfs_agents.h | 1 + sys/contrib/openzfs/cmd/zed/agents/zfs_diagnosis.c | 1 + sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 21 +- sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 1 + sys/contrib/openzfs/cmd/zed/zed.c | 1 + .../openzfs/cmd/zed/zed.d/statechange-notify.sh | 1 + sys/contrib/openzfs/cmd/zed/zed.h | 1 + sys/contrib/openzfs/cmd/zed/zed_conf.c | 1 + sys/contrib/openzfs/cmd/zed/zed_conf.h | 1 + sys/contrib/openzfs/cmd/zed/zed_disk_event.c | 1 + sys/contrib/openzfs/cmd/zed/zed_disk_event.h | 1 + sys/contrib/openzfs/cmd/zed/zed_event.c | 1 + sys/contrib/openzfs/cmd/zed/zed_event.h | 1 + sys/contrib/openzfs/cmd/zed/zed_exec.c | 1 + sys/contrib/openzfs/cmd/zed/zed_exec.h | 1 + sys/contrib/openzfs/cmd/zed/zed_file.c | 1 + sys/contrib/openzfs/cmd/zed/zed_file.h | 1 + sys/contrib/openzfs/cmd/zed/zed_log.c | 1 + sys/contrib/openzfs/cmd/zed/zed_log.h | 1 + sys/contrib/openzfs/cmd/zed/zed_strings.c | 1 + sys/contrib/openzfs/cmd/zed/zed_strings.h | 1 + sys/contrib/openzfs/cmd/zfs/zfs_iter.c | 1 + sys/contrib/openzfs/cmd/zfs/zfs_iter.h | 1 + sys/contrib/openzfs/cmd/zfs/zfs_main.c | 2 + sys/contrib/openzfs/cmd/zfs/zfs_project.c | 1 + sys/contrib/openzfs/cmd/zfs/zfs_projectutil.h | 1 + sys/contrib/openzfs/cmd/zfs/zfs_util.h | 1 + sys/contrib/openzfs/cmd/zfs_ids_to_path.c | 1 + sys/contrib/openzfs/cmd/zgenhostid.c | 1 + sys/contrib/openzfs/cmd/zhack.c | 1 + sys/contrib/openzfs/cmd/zilstat.in | 1 + sys/contrib/openzfs/cmd/zinject/translate.c | 1 + sys/contrib/openzfs/cmd/zinject/zinject.c | 1 + sys/contrib/openzfs/cmd/zinject/zinject.h | 1 + .../openzfs/cmd/zpool/os/freebsd/zpool_vdev_os.c | 1 + .../openzfs/cmd/zpool/os/linux/zpool_vdev_os.c | 1 + sys/contrib/openzfs/cmd/zpool/zpool_iter.c | 1 + sys/contrib/openzfs/cmd/zpool/zpool_main.c | 1 + sys/contrib/openzfs/cmd/zpool/zpool_util.c | 1 + sys/contrib/openzfs/cmd/zpool/zpool_util.h | 1 + sys/contrib/openzfs/cmd/zpool/zpool_vdev.c | 1 + .../openzfs/cmd/zpool_influxdb/zpool_influxdb.c | 1 + sys/contrib/openzfs/cmd/zstream/zstream.c | 1 + sys/contrib/openzfs/cmd/zstream/zstream.h | 1 + .../openzfs/cmd/zstream/zstream_decompress.c | 1 + sys/contrib/openzfs/cmd/zstream/zstream_dump.c | 1 + .../openzfs/cmd/zstream/zstream_recompress.c | 1 + sys/contrib/openzfs/cmd/zstream/zstream_redup.c | 1 + sys/contrib/openzfs/cmd/zstream/zstream_token.c | 1 + sys/contrib/openzfs/cmd/ztest.c | 34 +- sys/contrib/openzfs/config/ax_code_coverage.m4 | 1 + sys/contrib/openzfs/config/kernel-sb-dying.m4 | 19 + sys/contrib/openzfs/config/kernel.m4 | 2 + sys/contrib/openzfs/configure.ac | 1 + .../openzfs/contrib/pam_zfs_key/pam_zfs_key.c | 1 + .../openzfs/contrib/pyzfs/libzfs_core/__init__.py | 1 + .../contrib/pyzfs/libzfs_core/_constants.py | 1 + .../pyzfs/libzfs_core/_error_translation.py | 1 + .../contrib/pyzfs/libzfs_core/_libzfs_core.py | 1 + .../openzfs/contrib/pyzfs/libzfs_core/_nvlist.py | 1 + .../contrib/pyzfs/libzfs_core/bindings/__init__.py | 1 + .../pyzfs/libzfs_core/bindings/libnvpair.py | 1 + .../pyzfs/libzfs_core/bindings/libzfs_core.py | 1 + .../openzfs/contrib/pyzfs/libzfs_core/ctypes.py | 1 + .../contrib/pyzfs/libzfs_core/exceptions.py | 1 + .../pyzfs/libzfs_core/test/test_libzfs_core.py | 1 + .../contrib/pyzfs/libzfs_core/test/test_nvlist.py | 1 + sys/contrib/openzfs/etc/init.d/zfs-import.in | 1 + sys/contrib/openzfs/etc/init.d/zfs-load-key.in | 1 + sys/contrib/openzfs/etc/init.d/zfs-mount.in | 1 + sys/contrib/openzfs/etc/init.d/zfs-share.in | 1 + sys/contrib/openzfs/etc/init.d/zfs-zed.in | 1 + .../system-generators/zfs-mount-generator.c | 1 + sys/contrib/openzfs/etc/zfs/zfs-functions.in | 1 + sys/contrib/openzfs/include/cityhash.h | 2 + sys/contrib/openzfs/include/libnvpair.h | 1 + sys/contrib/openzfs/include/libuutil.h | 1 + sys/contrib/openzfs/include/libuutil_common.h | 1 + sys/contrib/openzfs/include/libuutil_impl.h | 1 + sys/contrib/openzfs/include/libzfs.h | 1 + sys/contrib/openzfs/include/libzfs_core.h | 1 + sys/contrib/openzfs/include/libzfsbootenv.h | 1 + sys/contrib/openzfs/include/libzutil.h | 1 + .../openzfs/include/os/freebsd/linux/compiler.h | 1 + .../openzfs/include/os/freebsd/linux/types.h | 1 + .../include/os/freebsd/spl/acl/acl_common.h | 1 + .../openzfs/include/os/freebsd/spl/sys/acl.h | 1 + .../openzfs/include/os/freebsd/spl/sys/acl_impl.h | 1 + .../openzfs/include/os/freebsd/spl/sys/atomic.h | 1 + .../openzfs/include/os/freebsd/spl/sys/byteorder.h | 1 + .../openzfs/include/os/freebsd/spl/sys/callb.h | 1 + .../openzfs/include/os/freebsd/spl/sys/ccompile.h | 1 + .../openzfs/include/os/freebsd/spl/sys/cmn_err.h | 1 + .../openzfs/include/os/freebsd/spl/sys/condvar.h | 1 + .../openzfs/include/os/freebsd/spl/sys/cred.h | 1 + .../openzfs/include/os/freebsd/spl/sys/ctype.h | 1 + .../openzfs/include/os/freebsd/spl/sys/debug.h | 1 + .../openzfs/include/os/freebsd/spl/sys/dirent.h | 1 + .../openzfs/include/os/freebsd/spl/sys/disp.h | 1 + .../openzfs/include/os/freebsd/spl/sys/fcntl.h | 1 + .../openzfs/include/os/freebsd/spl/sys/file.h | 1 + .../include/os/freebsd/spl/sys/freebsd_rwlock.h | 1 + .../include/os/freebsd/spl/sys/ia32/asm_linkage.h | 1 + .../openzfs/include/os/freebsd/spl/sys/idmap.h | 1 + .../openzfs/include/os/freebsd/spl/sys/isa_defs.h | 1 + .../openzfs/include/os/freebsd/spl/sys/kmem.h | 1 + .../include/os/freebsd/spl/sys/kmem_cache.h | 1 + .../openzfs/include/os/freebsd/spl/sys/kstat.h | 1 + .../openzfs/include/os/freebsd/spl/sys/list.h | 1 + .../openzfs/include/os/freebsd/spl/sys/list_impl.h | 1 + .../openzfs/include/os/freebsd/spl/sys/lock.h | 1 + .../openzfs/include/os/freebsd/spl/sys/misc.h | 1 + .../openzfs/include/os/freebsd/spl/sys/mod_os.h | 1 + .../openzfs/include/os/freebsd/spl/sys/mount.h | 1 + .../openzfs/include/os/freebsd/spl/sys/mutex.h | 1 + .../openzfs/include/os/freebsd/spl/sys/param.h | 1 + .../openzfs/include/os/freebsd/spl/sys/policy.h | 1 + .../openzfs/include/os/freebsd/spl/sys/proc.h | 1 + .../openzfs/include/os/freebsd/spl/sys/processor.h | 1 + .../include/os/freebsd/spl/sys/procfs_list.h | 1 + .../openzfs/include/os/freebsd/spl/sys/random.h | 1 + .../openzfs/include/os/freebsd/spl/sys/rwlock.h | 1 + .../openzfs/include/os/freebsd/spl/sys/sdt.h | 1 + .../openzfs/include/os/freebsd/spl/sys/sid.h | 1 + .../openzfs/include/os/freebsd/spl/sys/sig.h | 1 + .../openzfs/include/os/freebsd/spl/sys/simd.h | 1 + .../include/os/freebsd/spl/sys/simd_aarch64.h | 1 + .../openzfs/include/os/freebsd/spl/sys/simd_arm.h | 1 + .../include/os/freebsd/spl/sys/simd_powerpc.h | 1 + .../openzfs/include/os/freebsd/spl/sys/simd_x86.h | 1 + .../openzfs/include/os/freebsd/spl/sys/string.h | 1 + .../openzfs/include/os/freebsd/spl/sys/sunddi.h | 1 + .../openzfs/include/os/freebsd/spl/sys/sysmacros.h | 1 + .../include/os/freebsd/spl/sys/systeminfo.h | 1 + .../openzfs/include/os/freebsd/spl/sys/systm.h | 1 + .../openzfs/include/os/freebsd/spl/sys/taskq.h | 1 + .../openzfs/include/os/freebsd/spl/sys/thread.h | 1 + .../openzfs/include/os/freebsd/spl/sys/time.h | 1 + .../openzfs/include/os/freebsd/spl/sys/timer.h | 1 + .../openzfs/include/os/freebsd/spl/sys/types.h | 1 + .../openzfs/include/os/freebsd/spl/sys/types32.h | 1 + .../openzfs/include/os/freebsd/spl/sys/uio.h | 1 + .../openzfs/include/os/freebsd/spl/sys/uuid.h | 1 + .../openzfs/include/os/freebsd/spl/sys/vfs.h | 1 + .../openzfs/include/os/freebsd/spl/sys/vm.h | 1 + .../openzfs/include/os/freebsd/spl/sys/vmsystm.h | 1 + .../openzfs/include/os/freebsd/spl/sys/vnode.h | 1 + .../include/os/freebsd/spl/sys/vnode_impl.h | 1 + .../openzfs/include/os/freebsd/spl/sys/wmsum.h | 1 + .../openzfs/include/os/freebsd/spl/sys/zmod.h | 1 + .../openzfs/include/os/freebsd/spl/sys/zone.h | 1 + .../include/os/freebsd/zfs/sys/abd_impl_os.h | 1 + .../openzfs/include/os/freebsd/zfs/sys/abd_os.h | 1 + .../include/os/freebsd/zfs/sys/freebsd_crypto.h | 1 + .../openzfs/include/os/freebsd/zfs/sys/vdev_os.h | 1 + .../include/os/freebsd/zfs/sys/zfs_bootenv_os.h | 1 + .../include/os/freebsd/zfs/sys/zfs_context_os.h | 1 + .../include/os/freebsd/zfs/sys/zfs_ctldir.h | 1 + .../openzfs/include/os/freebsd/zfs/sys/zfs_dir.h | 1 + .../include/os/freebsd/zfs/sys/zfs_ioctl_compat.h | 1 + .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 + .../include/os/freebsd/zfs/sys/zfs_vnops_os.h | 1 + .../include/os/freebsd/zfs/sys/zfs_znode_impl.h | 1 + .../include/os/linux/kernel/linux/blkdev_compat.h | 3 +- .../os/linux/kernel/linux/compiler_compat.h | 1 + .../include/os/linux/kernel/linux/dcache_compat.h | 1 + .../include/os/linux/kernel/linux/kmap_compat.h | 1 + .../include/os/linux/kernel/linux/mm_compat.h | 1 + .../include/os/linux/kernel/linux/mod_compat.h | 1 + .../openzfs/include/os/linux/kernel/linux/simd.h | 1 + .../include/os/linux/kernel/linux/simd_aarch64.h | 1 + .../include/os/linux/kernel/linux/simd_arm.h | 1 + .../include/os/linux/kernel/linux/simd_powerpc.h | 1 + .../include/os/linux/kernel/linux/simd_x86.h | 1 + .../include/os/linux/kernel/linux/utsname_compat.h | 1 + .../include/os/linux/kernel/linux/vfs_compat.h | 1 + .../include/os/linux/kernel/linux/xattr_compat.h | 1 + .../openzfs/include/os/linux/spl/rpc/types.h | 1 + sys/contrib/openzfs/include/os/linux/spl/rpc/xdr.h | 1 + sys/contrib/openzfs/include/os/linux/spl/sys/acl.h | 1 + .../openzfs/include/os/linux/spl/sys/atomic.h | 1 + .../openzfs/include/os/linux/spl/sys/byteorder.h | 1 + .../openzfs/include/os/linux/spl/sys/callb.h | 1 + .../openzfs/include/os/linux/spl/sys/callo.h | 1 + .../openzfs/include/os/linux/spl/sys/cmn_err.h | 1 + .../openzfs/include/os/linux/spl/sys/condvar.h | 1 + .../openzfs/include/os/linux/spl/sys/cred.h | 1 + .../openzfs/include/os/linux/spl/sys/ctype.h | 1 + .../openzfs/include/os/linux/spl/sys/debug.h | 1 + .../openzfs/include/os/linux/spl/sys/disp.h | 1 + .../openzfs/include/os/linux/spl/sys/errno.h | 1 + .../openzfs/include/os/linux/spl/sys/fcntl.h | 1 + .../openzfs/include/os/linux/spl/sys/file.h | 1 + .../include/os/linux/spl/sys/ia32/asm_linkage.h | 1 + .../openzfs/include/os/linux/spl/sys/inttypes.h | 1 + .../openzfs/include/os/linux/spl/sys/isa_defs.h | 1 + .../openzfs/include/os/linux/spl/sys/kmem.h | 1 + .../openzfs/include/os/linux/spl/sys/kmem_cache.h | 1 + .../openzfs/include/os/linux/spl/sys/kstat.h | 7 + .../openzfs/include/os/linux/spl/sys/list.h | 1 + .../openzfs/include/os/linux/spl/sys/misc.h | 1 + .../openzfs/include/os/linux/spl/sys/mod_os.h | 1 + .../openzfs/include/os/linux/spl/sys/mutex.h | 1 + .../openzfs/include/os/linux/spl/sys/param.h | 1 + .../openzfs/include/os/linux/spl/sys/proc.h | 1 + .../openzfs/include/os/linux/spl/sys/processor.h | 1 + .../openzfs/include/os/linux/spl/sys/procfs_list.h | 1 + .../openzfs/include/os/linux/spl/sys/random.h | 1 + .../openzfs/include/os/linux/spl/sys/rwlock.h | 1 + .../openzfs/include/os/linux/spl/sys/shrinker.h | 1 + sys/contrib/openzfs/include/os/linux/spl/sys/sid.h | 1 + .../openzfs/include/os/linux/spl/sys/signal.h | 1 + .../openzfs/include/os/linux/spl/sys/simd.h | 1 + .../openzfs/include/os/linux/spl/sys/stat.h | 1 + .../openzfs/include/os/linux/spl/sys/string.h | 1 + .../openzfs/include/os/linux/spl/sys/sunddi.h | 1 + .../openzfs/include/os/linux/spl/sys/sysmacros.h | 1 + .../openzfs/include/os/linux/spl/sys/systeminfo.h | 1 + .../openzfs/include/os/linux/spl/sys/taskq.h | 1 + .../openzfs/include/os/linux/spl/sys/thread.h | 1 + .../openzfs/include/os/linux/spl/sys/time.h | 1 + .../openzfs/include/os/linux/spl/sys/timer.h | 1 + .../openzfs/include/os/linux/spl/sys/trace.h | 1 + .../openzfs/include/os/linux/spl/sys/trace_spl.h | 1 + .../openzfs/include/os/linux/spl/sys/trace_taskq.h | 1 + sys/contrib/openzfs/include/os/linux/spl/sys/tsd.h | 1 + .../openzfs/include/os/linux/spl/sys/types.h | 1 + .../openzfs/include/os/linux/spl/sys/types32.h | 1 + sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 1 + .../openzfs/include/os/linux/spl/sys/user.h | 1 + sys/contrib/openzfs/include/os/linux/spl/sys/vfs.h | 1 + .../openzfs/include/os/linux/spl/sys/vmem.h | 1 + .../openzfs/include/os/linux/spl/sys/vmsystm.h | 1 + .../openzfs/include/os/linux/spl/sys/vnode.h | 1 + .../openzfs/include/os/linux/spl/sys/wait.h | 1 + .../openzfs/include/os/linux/spl/sys/wmsum.h | 1 + .../openzfs/include/os/linux/spl/sys/zmod.h | 1 + .../openzfs/include/os/linux/spl/sys/zone.h | 1 + .../openzfs/include/os/linux/zfs/sys/abd_impl_os.h | 1 + .../openzfs/include/os/linux/zfs/sys/abd_os.h | 1 + .../openzfs/include/os/linux/zfs/sys/policy.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_acl.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_arc.h | 1 + .../include/os/linux/zfs/sys/trace_common.h | 1 + .../include/os/linux/zfs/sys/trace_dbgmsg.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_dbuf.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_dmu.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_dnode.h | 1 + .../include/os/linux/zfs/sys/trace_multilist.h | 1 + .../include/os/linux/zfs/sys/trace_rrwlock.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_txg.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_vdev.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_zfs.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 1 + .../openzfs/include/os/linux/zfs/sys/trace_zio.h | 1 + .../include/os/linux/zfs/sys/trace_zrlock.h | 1 + .../include/os/linux/zfs/sys/zfs_bootenv_os.h | 1 + .../include/os/linux/zfs/sys/zfs_context_os.h | 1 + .../openzfs/include/os/linux/zfs/sys/zfs_ctldir.h | 1 + .../openzfs/include/os/linux/zfs/sys/zfs_dir.h | 1 + .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 1 + .../include/os/linux/zfs/sys/zfs_vnops_os.h | 1 + .../include/os/linux/zfs/sys/zfs_znode_impl.h | 1 + sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 1 + sys/contrib/openzfs/include/sys/abd.h | 1 + sys/contrib/openzfs/include/sys/abd_impl.h | 1 + sys/contrib/openzfs/include/sys/aggsum.h | 1 + sys/contrib/openzfs/include/sys/arc.h | 1 + sys/contrib/openzfs/include/sys/arc_impl.h | 1 + sys/contrib/openzfs/include/sys/asm_linkage.h | 1 + sys/contrib/openzfs/include/sys/avl.h | 1 + sys/contrib/openzfs/include/sys/avl_impl.h | 1 + sys/contrib/openzfs/include/sys/bitmap.h | 1 + sys/contrib/openzfs/include/sys/bitops.h | 1 + sys/contrib/openzfs/include/sys/blake3.h | 1 + sys/contrib/openzfs/include/sys/blkptr.h | 1 + sys/contrib/openzfs/include/sys/bplist.h | 1 + sys/contrib/openzfs/include/sys/bpobj.h | 1 + sys/contrib/openzfs/include/sys/bptree.h | 1 + sys/contrib/openzfs/include/sys/bqueue.h | 1 + sys/contrib/openzfs/include/sys/brt.h | 1 + sys/contrib/openzfs/include/sys/brt_impl.h | 1 + sys/contrib/openzfs/include/sys/btree.h | 1 + sys/contrib/openzfs/include/sys/crypto/api.h | 1 + sys/contrib/openzfs/include/sys/crypto/common.h | 1 + sys/contrib/openzfs/include/sys/crypto/icp.h | 1 + sys/contrib/openzfs/include/sys/dataset_kstats.h | 1 + sys/contrib/openzfs/include/sys/dbuf.h | 2 + sys/contrib/openzfs/include/sys/ddt.h | 11 +- sys/contrib/openzfs/include/sys/ddt_impl.h | 1 + sys/contrib/openzfs/include/sys/dmu.h | 16 +- sys/contrib/openzfs/include/sys/dmu_impl.h | 1 + sys/contrib/openzfs/include/sys/dmu_objset.h | 1 + sys/contrib/openzfs/include/sys/dmu_recv.h | 1 + sys/contrib/openzfs/include/sys/dmu_redact.h | 1 + sys/contrib/openzfs/include/sys/dmu_send.h | 1 + sys/contrib/openzfs/include/sys/dmu_traverse.h | 1 + sys/contrib/openzfs/include/sys/dmu_tx.h | 1 + sys/contrib/openzfs/include/sys/dmu_zfetch.h | 1 + sys/contrib/openzfs/include/sys/dnode.h | 1 + sys/contrib/openzfs/include/sys/dsl_bookmark.h | 1 + sys/contrib/openzfs/include/sys/dsl_crypt.h | 1 + sys/contrib/openzfs/include/sys/dsl_dataset.h | 1 + sys/contrib/openzfs/include/sys/dsl_deadlist.h | 1 + sys/contrib/openzfs/include/sys/dsl_deleg.h | 2 + sys/contrib/openzfs/include/sys/dsl_destroy.h | 1 + sys/contrib/openzfs/include/sys/dsl_dir.h | 1 + sys/contrib/openzfs/include/sys/dsl_pool.h | 3 + sys/contrib/openzfs/include/sys/dsl_prop.h | 1 + sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/include/sys/dsl_synctask.h | 1 + sys/contrib/openzfs/include/sys/dsl_userhold.h | 1 + sys/contrib/openzfs/include/sys/edonr.h | 1 + sys/contrib/openzfs/include/sys/efi_partition.h | 1 + sys/contrib/openzfs/include/sys/fm/fs/zfs.h | 1 + sys/contrib/openzfs/include/sys/fm/protocol.h | 1 + sys/contrib/openzfs/include/sys/fm/util.h | 1 + sys/contrib/openzfs/include/sys/frame.h | 1 + sys/contrib/openzfs/include/sys/fs/zfs.h | 1 + sys/contrib/openzfs/include/sys/hkdf.h | 1 + sys/contrib/openzfs/include/sys/lua/lauxlib.h | 1 + sys/contrib/openzfs/include/sys/lua/lua.h | 1 + sys/contrib/openzfs/include/sys/lua/luaconf.h | 1 + sys/contrib/openzfs/include/sys/lua/lualib.h | 1 + sys/contrib/openzfs/include/sys/metaslab.h | 29 +- sys/contrib/openzfs/include/sys/metaslab_impl.h | 62 +- sys/contrib/openzfs/include/sys/mmp.h | 1 + sys/contrib/openzfs/include/sys/mntent.h | 1 + sys/contrib/openzfs/include/sys/mod.h | 1 + sys/contrib/openzfs/include/sys/multilist.h | 1 + sys/contrib/openzfs/include/sys/nvpair.h | 1 + sys/contrib/openzfs/include/sys/nvpair_impl.h | 1 + sys/contrib/openzfs/include/sys/objlist.h | 1 + sys/contrib/openzfs/include/sys/pathname.h | 1 + sys/contrib/openzfs/include/sys/qat.h | 1 + sys/contrib/openzfs/include/sys/range_tree.h | 1 + sys/contrib/openzfs/include/sys/rrwlock.h | 1 + sys/contrib/openzfs/include/sys/sa.h | 1 + sys/contrib/openzfs/include/sys/sa_impl.h | 1 + sys/contrib/openzfs/include/sys/sha2.h | 1 + sys/contrib/openzfs/include/sys/skein.h | 1 + sys/contrib/openzfs/include/sys/spa.h | 6 +- sys/contrib/openzfs/include/sys/spa_checkpoint.h | 1 + sys/contrib/openzfs/include/sys/spa_checksum.h | 1 + sys/contrib/openzfs/include/sys/spa_impl.h | 12 +- sys/contrib/openzfs/include/sys/spa_log_spacemap.h | 1 + sys/contrib/openzfs/include/sys/space_map.h | 1 + sys/contrib/openzfs/include/sys/space_reftree.h | 1 + sys/contrib/openzfs/include/sys/sysevent.h | 1 + sys/contrib/openzfs/include/sys/sysevent/dev.h | 1 + .../openzfs/include/sys/sysevent/eventdefs.h | 1 + sys/contrib/openzfs/include/sys/txg.h | 1 + sys/contrib/openzfs/include/sys/txg_impl.h | 1 + sys/contrib/openzfs/include/sys/u8_textprep.h | 1 + sys/contrib/openzfs/include/sys/u8_textprep_data.h | 1 + sys/contrib/openzfs/include/sys/uberblock.h | 1 + sys/contrib/openzfs/include/sys/uberblock_impl.h | 1 + sys/contrib/openzfs/include/sys/uio_impl.h | 1 + sys/contrib/openzfs/include/sys/unique.h | 1 + sys/contrib/openzfs/include/sys/uuid.h | 1 + sys/contrib/openzfs/include/sys/vdev.h | 2 + sys/contrib/openzfs/include/sys/vdev_disk.h | 1 + sys/contrib/openzfs/include/sys/vdev_draid.h | 1 + sys/contrib/openzfs/include/sys/vdev_file.h | 1 + sys/contrib/openzfs/include/sys/vdev_impl.h | 5 +- .../openzfs/include/sys/vdev_indirect_births.h | 1 + .../openzfs/include/sys/vdev_indirect_mapping.h | 1 + sys/contrib/openzfs/include/sys/vdev_initialize.h | 1 + sys/contrib/openzfs/include/sys/vdev_raidz.h | 1 + sys/contrib/openzfs/include/sys/vdev_raidz_impl.h | 1 + sys/contrib/openzfs/include/sys/vdev_rebuild.h | 1 + sys/contrib/openzfs/include/sys/vdev_removal.h | 1 + sys/contrib/openzfs/include/sys/vdev_trim.h | 1 + sys/contrib/openzfs/include/sys/xvattr.h | 1 + sys/contrib/openzfs/include/sys/zap.h | 1 + sys/contrib/openzfs/include/sys/zap_impl.h | 1 + sys/contrib/openzfs/include/sys/zap_leaf.h | 1 + sys/contrib/openzfs/include/sys/zcp.h | 1 + sys/contrib/openzfs/include/sys/zcp_global.h | 1 + sys/contrib/openzfs/include/sys/zcp_iter.h | 1 + sys/contrib/openzfs/include/sys/zcp_prop.h | 1 + sys/contrib/openzfs/include/sys/zcp_set.h | 1 + sys/contrib/openzfs/include/sys/zfeature.h | 1 + sys/contrib/openzfs/include/sys/zfs_acl.h | 1 + sys/contrib/openzfs/include/sys/zfs_bootenv.h | 1 + sys/contrib/openzfs/include/sys/zfs_chksum.h | 1 + sys/contrib/openzfs/include/sys/zfs_context.h | 1 + sys/contrib/openzfs/include/sys/zfs_debug.h | 2 + sys/contrib/openzfs/include/sys/zfs_delay.h | 1 + sys/contrib/openzfs/include/sys/zfs_file.h | 1 + sys/contrib/openzfs/include/sys/zfs_fuid.h | 1 + sys/contrib/openzfs/include/sys/zfs_impl.h | 1 + sys/contrib/openzfs/include/sys/zfs_ioctl.h | 1 + sys/contrib/openzfs/include/sys/zfs_ioctl_impl.h | 1 + sys/contrib/openzfs/include/sys/zfs_onexit.h | 1 + sys/contrib/openzfs/include/sys/zfs_project.h | 1 + sys/contrib/openzfs/include/sys/zfs_quota.h | 1 + sys/contrib/openzfs/include/sys/zfs_racct.h | 1 + sys/contrib/openzfs/include/sys/zfs_ratelimit.h | 1 + sys/contrib/openzfs/include/sys/zfs_refcount.h | 1 + sys/contrib/openzfs/include/sys/zfs_rlock.h | 1 + sys/contrib/openzfs/include/sys/zfs_sa.h | 1 + sys/contrib/openzfs/include/sys/zfs_stat.h | 1 + sys/contrib/openzfs/include/sys/zfs_sysfs.h | 1 + sys/contrib/openzfs/include/sys/zfs_vfsops.h | 1 + sys/contrib/openzfs/include/sys/zfs_vnops.h | 4 + sys/contrib/openzfs/include/sys/zfs_znode.h | 1 + sys/contrib/openzfs/include/sys/zil.h | 1 + sys/contrib/openzfs/include/sys/zil_impl.h | 1 + sys/contrib/openzfs/include/sys/zio.h | 4 +- sys/contrib/openzfs/include/sys/zio_checksum.h | 1 + sys/contrib/openzfs/include/sys/zio_compress.h | 1 + sys/contrib/openzfs/include/sys/zio_crypt.h | 1 + sys/contrib/openzfs/include/sys/zio_impl.h | 1 + sys/contrib/openzfs/include/sys/zrlock.h | 1 + sys/contrib/openzfs/include/sys/zstd/zstd.h | 1 + sys/contrib/openzfs/include/sys/zthr.h | 1 + sys/contrib/openzfs/include/sys/zvol.h | 1 + sys/contrib/openzfs/include/sys/zvol_impl.h | 1 + sys/contrib/openzfs/include/thread_pool.h | 1 + sys/contrib/openzfs/include/zfeature_common.h | 1 + sys/contrib/openzfs/include/zfs_comutil.h | 1 + sys/contrib/openzfs/include/zfs_deleg.h | 1 + sys/contrib/openzfs/include/zfs_fletcher.h | 1 + sys/contrib/openzfs/include/zfs_namecheck.h | 1 + sys/contrib/openzfs/include/zfs_prop.h | 1 + sys/contrib/openzfs/include/zfs_valstr.h | 1 + sys/contrib/openzfs/lib/libefi/rdwr_efi.c | 1 + sys/contrib/openzfs/lib/libnvpair/libnvpair.c | 1 + sys/contrib/openzfs/lib/libnvpair/libnvpair_json.c | 1 + .../openzfs/lib/libnvpair/nvpair_alloc_system.c | 1 + sys/contrib/openzfs/lib/libshare/libshare.c | 1 + sys/contrib/openzfs/lib/libshare/libshare_impl.h | 1 + sys/contrib/openzfs/lib/libshare/nfs.c | 1 + sys/contrib/openzfs/lib/libshare/nfs.h | 1 + sys/contrib/openzfs/lib/libshare/os/freebsd/nfs.c | 1 + sys/contrib/openzfs/lib/libshare/os/freebsd/smb.c | 1 + sys/contrib/openzfs/lib/libshare/os/linux/nfs.c | 1 + sys/contrib/openzfs/lib/libshare/os/linux/smb.c | 1 + sys/contrib/openzfs/lib/libshare/smb.h | 1 + sys/contrib/openzfs/lib/libspl/assert.c | 1 + sys/contrib/openzfs/lib/libspl/atomic.c | 1 + sys/contrib/openzfs/lib/libspl/backtrace.c | 1 + sys/contrib/openzfs/lib/libspl/getexecname.c | 1 + sys/contrib/openzfs/lib/libspl/include/assert.h | 1 + sys/contrib/openzfs/lib/libspl/include/atomic.h | 1 + sys/contrib/openzfs/lib/libspl/include/libgen.h | 1 + sys/contrib/openzfs/lib/libspl/include/libshare.h | 1 + .../openzfs/lib/libspl/include/os/freebsd/fcntl.h | 1 + .../lib/libspl/include/os/freebsd/sys/byteorder.h | 1 + .../lib/libspl/include/os/freebsd/sys/fcntl.h | 1 + .../lib/libspl/include/os/freebsd/sys/file.h | 1 + .../include/os/freebsd/sys/ia32/asm_linkage.h | 1 + .../lib/libspl/include/os/freebsd/sys/mnttab.h | 1 + .../lib/libspl/include/os/freebsd/sys/mount.h | 1 + .../lib/libspl/include/os/freebsd/sys/param.h | 1 + .../lib/libspl/include/os/freebsd/sys/stat.h | 1 + .../lib/libspl/include/os/freebsd/sys/vfs.h | 1 + .../libspl/include/os/freebsd/sys/zfs_context_os.h | 1 + .../lib/libspl/include/os/linux/sys/byteorder.h | 1 + .../lib/libspl/include/os/linux/sys/errno.h | 1 + .../libspl/include/os/linux/sys/ia32/asm_linkage.h | 1 + .../lib/libspl/include/os/linux/sys/mnttab.h | 1 + .../lib/libspl/include/os/linux/sys/mount.h | 1 + .../lib/libspl/include/os/linux/sys/param.h | 1 + .../openzfs/lib/libspl/include/os/linux/sys/stat.h | 1 + .../lib/libspl/include/os/linux/sys/sysmacros.h | 1 + .../libspl/include/os/linux/sys/zfs_context_os.h | 1 + sys/contrib/openzfs/lib/libspl/include/rpc/xdr.h | 1 + .../openzfs/lib/libspl/include/statcommon.h | 1 + sys/contrib/openzfs/lib/libspl/include/stdlib.h | 1 + sys/contrib/openzfs/lib/libspl/include/string.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/acl.h | 1 + .../openzfs/lib/libspl/include/sys/acl_impl.h | 1 + .../openzfs/lib/libspl/include/sys/asm_linkage.h | 1 + .../openzfs/lib/libspl/include/sys/backtrace.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/callb.h | 1 + .../openzfs/lib/libspl/include/sys/cmn_err.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/cred.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/debug.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/dkio.h | 1 + .../openzfs/lib/libspl/include/sys/dklabel.h | 1 + .../openzfs/lib/libspl/include/sys/dktp/fdisk.h | 1 + .../openzfs/lib/libspl/include/sys/feature_tests.h | 1 + .../openzfs/lib/libspl/include/sys/inttypes.h | 1 + .../openzfs/lib/libspl/include/sys/isa_defs.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/kmem.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/kstat.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/list.h | 1 + .../openzfs/lib/libspl/include/sys/list_impl.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/mhd.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/mkdev.h | 1 + .../openzfs/lib/libspl/include/sys/policy.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/poll.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/priv.h | 1 + .../openzfs/lib/libspl/include/sys/processor.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/simd.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/stack.h | 1 + .../openzfs/lib/libspl/include/sys/stdtypes.h | 1 + .../openzfs/lib/libspl/include/sys/sunddi.h | 1 + .../openzfs/lib/libspl/include/sys/systeminfo.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/time.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/types.h | 1 + .../openzfs/lib/libspl/include/sys/types32.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/uio.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/vnode.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/wmsum.h | 1 + sys/contrib/openzfs/lib/libspl/include/sys/zone.h | 1 + sys/contrib/openzfs/lib/libspl/include/umem.h | 1 + sys/contrib/openzfs/lib/libspl/include/unistd.h | 1 + sys/contrib/openzfs/lib/libspl/include/zone.h | 1 + sys/contrib/openzfs/lib/libspl/libspl_impl.h | 1 + sys/contrib/openzfs/lib/libspl/list.c | 1 + sys/contrib/openzfs/lib/libspl/mkdirp.c | 1 + .../openzfs/lib/libspl/os/freebsd/getexecname.c | 1 + .../openzfs/lib/libspl/os/freebsd/gethostid.c | 1 + .../openzfs/lib/libspl/os/freebsd/getmntany.c | 1 + sys/contrib/openzfs/lib/libspl/os/freebsd/mnttab.c | 1 + sys/contrib/openzfs/lib/libspl/os/freebsd/zone.c | 1 + .../openzfs/lib/libspl/os/linux/getexecname.c | 1 + .../openzfs/lib/libspl/os/linux/gethostid.c | 1 + .../openzfs/lib/libspl/os/linux/getmntany.c | 1 + sys/contrib/openzfs/lib/libspl/os/linux/zone.c | 1 + sys/contrib/openzfs/lib/libspl/page.c | 1 + sys/contrib/openzfs/lib/libspl/strlcat.c | 1 + sys/contrib/openzfs/lib/libspl/strlcpy.c | 1 + sys/contrib/openzfs/lib/libspl/timestamp.c | 1 + sys/contrib/openzfs/lib/libtpool/thread_pool.c | 1 + .../openzfs/lib/libtpool/thread_pool_impl.h | 1 + sys/contrib/openzfs/lib/libuutil/uu_alloc.c | 1 + sys/contrib/openzfs/lib/libuutil/uu_avl.c | 1 + sys/contrib/openzfs/lib/libuutil/uu_ident.c | 1 + sys/contrib/openzfs/lib/libuutil/uu_list.c | 1 + sys/contrib/openzfs/lib/libuutil/uu_misc.c | 1 + sys/contrib/openzfs/lib/libuutil/uu_string.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_config.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_diff.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_impl.h | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_import.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_iter.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_status.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 1 + .../openzfs/lib/libzfs/os/freebsd/libzfs_compat.c | 1 + .../openzfs/lib/libzfs/os/freebsd/libzfs_zmount.c | 1 + .../openzfs/lib/libzfs/os/linux/libzfs_mount_os.c | 1 + .../openzfs/lib/libzfs/os/linux/libzfs_pool_os.c | 1 + .../openzfs/lib/libzfs/os/linux/libzfs_util_os.c | 1 + sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c | 1 + .../lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c | 1 + .../lib/libzfs_core/os/linux/libzfs_core_ioctl.c | 1 + .../openzfs/lib/libzfsbootenv/lzbe_device.c | 1 + sys/contrib/openzfs/lib/libzfsbootenv/lzbe_pair.c | 1 + sys/contrib/openzfs/lib/libzfsbootenv/lzbe_util.c | 1 + sys/contrib/openzfs/lib/libzpool/abd_os.c | 1 + sys/contrib/openzfs/lib/libzpool/arc_os.c | 1 + .../openzfs/lib/libzpool/include/sys/abd_impl_os.h | 1 + .../openzfs/lib/libzpool/include/sys/abd_os.h | 1 + sys/contrib/openzfs/lib/libzpool/kernel.c | 1 + sys/contrib/openzfs/lib/libzpool/taskq.c | 1 + sys/contrib/openzfs/lib/libzpool/util.c | 1 + sys/contrib/openzfs/lib/libzpool/vdev_label_os.c | 1 + sys/contrib/openzfs/lib/libzpool/zfs_debug.c | 1 + sys/contrib/openzfs/lib/libzpool/zfs_racct.c | 1 + .../lib/libzutil/os/freebsd/zutil_device_path_os.c | 1 + .../lib/libzutil/os/freebsd/zutil_import_os.c | 1 + .../lib/libzutil/os/linux/zutil_device_path_os.c | 1 + .../lib/libzutil/os/linux/zutil_import_os.c | 1 + .../lib/libzutil/os/linux/zutil_setproctitle.c | 1 + .../openzfs/lib/libzutil/zutil_device_path.c | 1 + sys/contrib/openzfs/lib/libzutil/zutil_import.c | 1 + sys/contrib/openzfs/lib/libzutil/zutil_import.h | 1 + sys/contrib/openzfs/lib/libzutil/zutil_nicenum.c | 1 + sys/contrib/openzfs/lib/libzutil/zutil_pool.c | 1 + sys/contrib/openzfs/man/man1/arcstat.1 | 1 + sys/contrib/openzfs/man/man1/cstyle.1 | 1 + sys/contrib/openzfs/man/man1/raidz_test.1 | 1 + sys/contrib/openzfs/man/man1/test-runner.1 | 1 + sys/contrib/openzfs/man/man1/zhack.1 | 1 + sys/contrib/openzfs/man/man1/ztest.1 | 3 +- sys/contrib/openzfs/man/man1/zvol_wait.1 | 1 + sys/contrib/openzfs/man/man4/spl.4 | 7 +- sys/contrib/openzfs/man/man4/zfs.4 | 148 ++-- sys/contrib/openzfs/man/man5/vdev_id.conf.5 | 1 + sys/contrib/openzfs/man/man7/dracut.zfs.7 | 1 + sys/contrib/openzfs/man/man7/vdevprops.7 | 5 +- sys/contrib/openzfs/man/man7/zfsconcepts.7 | 1 + sys/contrib/openzfs/man/man7/zfsprops.7 | 35 +- sys/contrib/openzfs/man/man7/zpool-features.7 | 3 +- sys/contrib/openzfs/man/man7/zpoolconcepts.7 | 3 +- sys/contrib/openzfs/man/man7/zpoolprops.7 | 1 + sys/contrib/openzfs/man/man8/fsck.zfs.8 | 1 + sys/contrib/openzfs/man/man8/mount.zfs.8 | 1 + sys/contrib/openzfs/man/man8/vdev_id.8 | 1 + sys/contrib/openzfs/man/man8/zdb.8 | 1 + sys/contrib/openzfs/man/man8/zed.8.in | 3 +- sys/contrib/openzfs/man/man8/zfs-allow.8 | 12 +- sys/contrib/openzfs/man/man8/zfs-bookmark.8 | 1 + sys/contrib/openzfs/man/man8/zfs-clone.8 | 1 + sys/contrib/openzfs/man/man8/zfs-create.8 | 1 + sys/contrib/openzfs/man/man8/zfs-destroy.8 | 1 + sys/contrib/openzfs/man/man8/zfs-diff.8 | 1 + sys/contrib/openzfs/man/man8/zfs-hold.8 | 3 +- sys/contrib/openzfs/man/man8/zfs-jail.8 | 1 + sys/contrib/openzfs/man/man8/zfs-list.8 | 1 + sys/contrib/openzfs/man/man8/zfs-load-key.8 | 1 + .../openzfs/man/man8/zfs-mount-generator.8.in | 1 + sys/contrib/openzfs/man/man8/zfs-mount.8 | 1 + sys/contrib/openzfs/man/man8/zfs-program.8 | 1 + sys/contrib/openzfs/man/man8/zfs-project.8 | 1 + sys/contrib/openzfs/man/man8/zfs-promote.8 | 1 + sys/contrib/openzfs/man/man8/zfs-receive.8 | 1 + sys/contrib/openzfs/man/man8/zfs-rename.8 | 1 + sys/contrib/openzfs/man/man8/zfs-rollback.8 | 1 + sys/contrib/openzfs/man/man8/zfs-send.8 | 3 +- sys/contrib/openzfs/man/man8/zfs-set.8 | 1 + sys/contrib/openzfs/man/man8/zfs-share.8 | 1 + sys/contrib/openzfs/man/man8/zfs-snapshot.8 | 1 + sys/contrib/openzfs/man/man8/zfs-upgrade.8 | 1 + sys/contrib/openzfs/man/man8/zfs-userspace.8 | 1 + sys/contrib/openzfs/man/man8/zfs-wait.8 | 1 + sys/contrib/openzfs/man/man8/zfs-zone.8 | 1 + sys/contrib/openzfs/man/man8/zfs.8 | 1 + sys/contrib/openzfs/man/man8/zfs_ids_to_path.8 | 1 + sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in | 1 + sys/contrib/openzfs/man/man8/zgenhostid.8 | 1 + sys/contrib/openzfs/man/man8/zinject.8 | 1 + sys/contrib/openzfs/man/man8/zpool-add.8 | 1 + sys/contrib/openzfs/man/man8/zpool-attach.8 | 3 +- sys/contrib/openzfs/man/man8/zpool-checkpoint.8 | 1 + sys/contrib/openzfs/man/man8/zpool-clear.8 | 1 + sys/contrib/openzfs/man/man8/zpool-create.8 | 1 + sys/contrib/openzfs/man/man8/zpool-ddtprune.8 | 1 + sys/contrib/openzfs/man/man8/zpool-destroy.8 | 1 + sys/contrib/openzfs/man/man8/zpool-detach.8 | 1 + sys/contrib/openzfs/man/man8/zpool-events.8 | 3 +- sys/contrib/openzfs/man/man8/zpool-export.8 | 1 + sys/contrib/openzfs/man/man8/zpool-get.8 | 1 + sys/contrib/openzfs/man/man8/zpool-history.8 | 1 + sys/contrib/openzfs/man/man8/zpool-import.8 | 1 + sys/contrib/openzfs/man/man8/zpool-initialize.8 | 1 + sys/contrib/openzfs/man/man8/zpool-iostat.8 | 1 + sys/contrib/openzfs/man/man8/zpool-labelclear.8 | 1 + sys/contrib/openzfs/man/man8/zpool-list.8 | 1 + sys/contrib/openzfs/man/man8/zpool-offline.8 | 1 + sys/contrib/openzfs/man/man8/zpool-prefetch.8 | 1 + sys/contrib/openzfs/man/man8/zpool-reguid.8 | 1 + sys/contrib/openzfs/man/man8/zpool-remove.8 | 3 +- sys/contrib/openzfs/man/man8/zpool-reopen.8 | 1 + sys/contrib/openzfs/man/man8/zpool-replace.8 | 3 +- sys/contrib/openzfs/man/man8/zpool-resilver.8 | 1 + sys/contrib/openzfs/man/man8/zpool-scrub.8 | 1 + sys/contrib/openzfs/man/man8/zpool-split.8 | 1 + sys/contrib/openzfs/man/man8/zpool-status.8 | 1 + sys/contrib/openzfs/man/man8/zpool-sync.8 | 1 + sys/contrib/openzfs/man/man8/zpool-trim.8 | 1 + sys/contrib/openzfs/man/man8/zpool-upgrade.8 | 1 + sys/contrib/openzfs/man/man8/zpool-wait.8 | 1 + sys/contrib/openzfs/man/man8/zpool.8 | 3 +- sys/contrib/openzfs/man/man8/zpool_influxdb.8 | 1 + sys/contrib/openzfs/man/man8/zstream.8 | 1 + sys/contrib/openzfs/module/avl/avl.c | 1 + sys/contrib/openzfs/module/icp/algs/aes/aes_impl.c | 1 + .../openzfs/module/icp/algs/aes/aes_impl_aesni.c | 1 + .../openzfs/module/icp/algs/aes/aes_impl_generic.c | 1 + .../openzfs/module/icp/algs/aes/aes_impl_x86-64.c | 1 + .../openzfs/module/icp/algs/aes/aes_modes.c | 1 + .../openzfs/module/icp/algs/blake3/blake3.c | 1 + .../module/icp/algs/blake3/blake3_generic.c | 1 + .../openzfs/module/icp/algs/blake3/blake3_impl.c | 1 + .../openzfs/module/icp/algs/blake3/blake3_impl.h | 1 + sys/contrib/openzfs/module/icp/algs/edonr/edonr.c | 1 + sys/contrib/openzfs/module/icp/algs/modes/ccm.c | 1 + sys/contrib/openzfs/module/icp/algs/modes/gcm.c | 1 + .../openzfs/module/icp/algs/modes/gcm_generic.c | 1 + .../openzfs/module/icp/algs/modes/gcm_pclmulqdq.c | 1 + sys/contrib/openzfs/module/icp/algs/modes/modes.c | 1 + .../openzfs/module/icp/algs/sha2/sha256_impl.c | 1 + .../openzfs/module/icp/algs/sha2/sha2_generic.c | 1 + .../openzfs/module/icp/algs/sha2/sha512_impl.c | 1 + sys/contrib/openzfs/module/icp/algs/skein/skein.c | 1 + .../openzfs/module/icp/algs/skein/skein_block.c | 1 + .../openzfs/module/icp/algs/skein/skein_impl.h | 1 + .../openzfs/module/icp/algs/skein/skein_iv.c | 1 + .../openzfs/module/icp/algs/skein/skein_port.h | 1 + sys/contrib/openzfs/module/icp/api/kcf_cipher.c | 1 + sys/contrib/openzfs/module/icp/api/kcf_ctxops.c | 1 + sys/contrib/openzfs/module/icp/api/kcf_mac.c | 1 + .../icp/asm-aarch64/blake3/b3_aarch64_sse2.S | 1 + .../icp/asm-aarch64/blake3/b3_aarch64_sse41.S | 1 + .../module/icp/asm-aarch64/sha2/sha256-armv8.S | 1 + .../module/icp/asm-aarch64/sha2/sha512-armv8.S | 1 + .../openzfs/module/icp/asm-arm/sha2/sha256-armv7.S | 1 + .../openzfs/module/icp/asm-arm/sha2/sha512-armv7.S | 1 + .../module/icp/asm-ppc64/blake3/b3_ppc64le_sse2.S | 1 + .../module/icp/asm-ppc64/blake3/b3_ppc64le_sse41.S | 1 + .../openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S | 1 + .../openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S | 1 + .../openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S | 1 + .../openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S | 1 + .../openzfs/module/icp/asm-x86_64/aes/aes_aesni.S | 1 + .../openzfs/module/icp/asm-x86_64/aes/aes_amd64.S | 1 + .../openzfs/module/icp/asm-x86_64/aes/aeskey.c | 1 + .../openzfs/module/icp/asm-x86_64/aes/aesopt.h | 1 + .../openzfs/module/icp/asm-x86_64/aes/aestab.h | 1 + .../openzfs/module/icp/asm-x86_64/aes/aestab2.h | 1 + .../module/icp/asm-x86_64/blake3/blake3_avx2.S | 1 + .../module/icp/asm-x86_64/blake3/blake3_avx512.S | 1 + .../module/icp/asm-x86_64/blake3/blake3_sse2.S | 1 + .../module/icp/asm-x86_64/blake3/blake3_sse41.S | 1 + .../module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S | 1 + .../module/icp/asm-x86_64/modes/gcm_pclmulqdq.S | 1 + .../module/icp/asm-x86_64/modes/ghash-x86_64.S | 1 + .../module/icp/asm-x86_64/sha2/sha256-x86_64.S | 1 + .../module/icp/asm-x86_64/sha2/sha512-x86_64.S | 1 + sys/contrib/openzfs/module/icp/core/kcf_callprov.c | 1 + .../openzfs/module/icp/core/kcf_mech_tabs.c | 1 + sys/contrib/openzfs/module/icp/core/kcf_prov_lib.c | 1 + .../openzfs/module/icp/core/kcf_prov_tabs.c | 1 + sys/contrib/openzfs/module/icp/core/kcf_sched.c | 1 + sys/contrib/openzfs/module/icp/illumos-crypto.c | 1 + .../openzfs/module/icp/include/aes/aes_impl.h | 1 + .../openzfs/module/icp/include/generic_impl.c | 1 + .../openzfs/module/icp/include/modes/gcm_impl.h | 1 + .../openzfs/module/icp/include/modes/modes.h | 1 + .../openzfs/module/icp/include/sha2/sha2_impl.h | 1 + .../openzfs/module/icp/include/sys/crypto/impl.h | 1 + .../module/icp/include/sys/crypto/sched_impl.h | 1 + .../openzfs/module/icp/include/sys/crypto/spi.h | 1 + sys/contrib/openzfs/module/icp/io/aes.c | 1 + sys/contrib/openzfs/module/icp/io/sha2_mod.c | 1 + sys/contrib/openzfs/module/icp/spi/kcf_spi.c | 1 + sys/contrib/openzfs/module/lua/README.zfs | 1 + sys/contrib/openzfs/module/lua/lapi.c | 1 + sys/contrib/openzfs/module/lua/lapi.h | 1 + sys/contrib/openzfs/module/lua/lauxlib.c | 1 + sys/contrib/openzfs/module/lua/lbaselib.c | 1 + sys/contrib/openzfs/module/lua/lcode.c | 1 + sys/contrib/openzfs/module/lua/lcode.h | 1 + sys/contrib/openzfs/module/lua/lcompat.c | 1 + sys/contrib/openzfs/module/lua/lcorolib.c | 1 + sys/contrib/openzfs/module/lua/lctype.c | 1 + sys/contrib/openzfs/module/lua/lctype.h | 1 + sys/contrib/openzfs/module/lua/ldebug.c | 1 + sys/contrib/openzfs/module/lua/ldebug.h | 1 + sys/contrib/openzfs/module/lua/ldo.c | 1 + sys/contrib/openzfs/module/lua/ldo.h | 1 + sys/contrib/openzfs/module/lua/lfunc.c | 1 + sys/contrib/openzfs/module/lua/lfunc.h | 1 + sys/contrib/openzfs/module/lua/lgc.c | 1 + sys/contrib/openzfs/module/lua/lgc.h | 1 + sys/contrib/openzfs/module/lua/llex.c | 1 + sys/contrib/openzfs/module/lua/llex.h | 1 + sys/contrib/openzfs/module/lua/llimits.h | 1 + sys/contrib/openzfs/module/lua/lmem.c | 1 + sys/contrib/openzfs/module/lua/lmem.h | 1 + sys/contrib/openzfs/module/lua/lobject.c | 1 + sys/contrib/openzfs/module/lua/lobject.h | 1 + sys/contrib/openzfs/module/lua/lopcodes.c | 1 + sys/contrib/openzfs/module/lua/lopcodes.h | 1 + sys/contrib/openzfs/module/lua/lparser.c | 1 + sys/contrib/openzfs/module/lua/lparser.h | 1 + sys/contrib/openzfs/module/lua/lstate.c | 1 + sys/contrib/openzfs/module/lua/lstate.h | 1 + sys/contrib/openzfs/module/lua/lstring.c | 1 + sys/contrib/openzfs/module/lua/lstring.h | 1 + sys/contrib/openzfs/module/lua/lstrlib.c | 1 + sys/contrib/openzfs/module/lua/ltable.c | 1 + sys/contrib/openzfs/module/lua/ltable.h | 1 + sys/contrib/openzfs/module/lua/ltablib.c | 1 + sys/contrib/openzfs/module/lua/ltm.c | 1 + sys/contrib/openzfs/module/lua/ltm.h | 1 + sys/contrib/openzfs/module/lua/lvm.c | 1 + sys/contrib/openzfs/module/lua/lvm.h | 1 + sys/contrib/openzfs/module/lua/lzio.c | 1 + sys/contrib/openzfs/module/lua/lzio.h | 1 + .../openzfs/module/lua/setjmp/setjmp_aarch64.S | 1 + sys/contrib/openzfs/module/lua/setjmp/setjmp_arm.S | 1 + .../openzfs/module/lua/setjmp/setjmp_i386.S | 1 + .../openzfs/module/lua/setjmp/setjmp_loongarch64.S | 1 + .../openzfs/module/lua/setjmp/setjmp_mips.S | 1 + .../openzfs/module/lua/setjmp/setjmp_rv64g.S | 1 + .../openzfs/module/lua/setjmp/setjmp_s390x.S | 1 + .../openzfs/module/lua/setjmp/setjmp_sparc64.S | 1 + .../openzfs/module/lua/setjmp/setjmp_x86_64.S | 1 + sys/contrib/openzfs/module/nvpair/fnvpair.c | 1 + sys/contrib/openzfs/module/nvpair/nvpair.c | 1 + .../openzfs/module/nvpair/nvpair_alloc_fixed.c | 1 + .../openzfs/module/nvpair/nvpair_alloc_spl.c | 1 + .../openzfs/module/os/freebsd/spl/acl_common.c | 1 + sys/contrib/openzfs/module/os/freebsd/spl/callb.c | 1 + sys/contrib/openzfs/module/os/freebsd/spl/list.c | 1 + .../openzfs/module/os/freebsd/spl/spl_acl.c | 1 + .../openzfs/module/os/freebsd/spl/spl_atomic.c | 1 + .../openzfs/module/os/freebsd/spl/spl_cmn_err.c | 1 + .../openzfs/module/os/freebsd/spl/spl_dtrace.c | 1 + .../openzfs/module/os/freebsd/spl/spl_kmem.c | 1 + .../openzfs/module/os/freebsd/spl/spl_kstat.c | 88 +-- .../openzfs/module/os/freebsd/spl/spl_misc.c | 1 + .../openzfs/module/os/freebsd/spl/spl_policy.c | 1 + .../module/os/freebsd/spl/spl_procfs_list.c | 1 + .../openzfs/module/os/freebsd/spl/spl_string.c | 1 + .../openzfs/module/os/freebsd/spl/spl_sunddi.c | 1 + .../openzfs/module/os/freebsd/spl/spl_sysevent.c | 1 + .../openzfs/module/os/freebsd/spl/spl_taskq.c | 1 + .../openzfs/module/os/freebsd/spl/spl_uio.c | 1 + .../openzfs/module/os/freebsd/spl/spl_vfs.c | 11 +- sys/contrib/openzfs/module/os/freebsd/spl/spl_vm.c | 1 + .../openzfs/module/os/freebsd/spl/spl_zlib.c | 1 + .../openzfs/module/os/freebsd/spl/spl_zone.c | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c | 1 + .../openzfs/module/os/freebsd/zfs/crypto_os.c | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/hkdf.c | 1 + .../openzfs/module/os/freebsd/zfs/kmod_core.c | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/spa_os.c | 1 + .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 1 + .../openzfs/module/os/freebsd/zfs/vdev_geom.c | 1 + .../openzfs/module/os/freebsd/zfs/vdev_label_os.c | 1 + .../openzfs/module/os/freebsd/zfs/zfs_acl.c | 3 +- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 1 + .../openzfs/module/os/freebsd/zfs/zfs_debug.c | 1 + .../openzfs/module/os/freebsd/zfs/zfs_dir.c | 9 +- .../openzfs/module/os/freebsd/zfs/zfs_file_os.c | 1 + .../module/os/freebsd/zfs/zfs_ioctl_compat.c | 1 + .../openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c | 1 + .../openzfs/module/os/freebsd/zfs/zfs_racct.c | 1 + .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 3 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 51 +- .../openzfs/module/os/freebsd/zfs/zfs_znode_os.c | 7 +- .../openzfs/module/os/freebsd/zfs/zio_crypt.c | 1 + .../openzfs/module/os/freebsd/zfs/zvol_os.c | 9 +- .../openzfs/module/os/linux/spl/spl-atomic.c | 1 + .../openzfs/module/os/linux/spl/spl-condvar.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-cred.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-err.c | 1 + .../openzfs/module/os/linux/spl/spl-generic.c | 1 + .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c | 1 + .../openzfs/module/os/linux/spl/spl-kstat.c | 103 ++- sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 1 + .../openzfs/module/os/linux/spl/spl-procfs-list.c | 1 + .../openzfs/module/os/linux/spl/spl-shrinker.c | 1 + .../openzfs/module/os/linux/spl/spl-taskq.c | 1 + .../openzfs/module/os/linux/spl/spl-thread.c | 1 + .../openzfs/module/os/linux/spl/spl-trace.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-tsd.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-vmem.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-xdr.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-zlib.c | 1 + sys/contrib/openzfs/module/os/linux/spl/spl-zone.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/arc_os.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/mmp_os.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/policy.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/qat.c | 1 + .../openzfs/module/os/linux/zfs/qat_compress.c | 1 + .../openzfs/module/os/linux/zfs/qat_crypt.c | 1 + .../openzfs/module/os/linux/zfs/spa_misc_os.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/trace.c | 1 + .../openzfs/module/os/linux/zfs/vdev_disk.c | 1 + .../openzfs/module/os/linux/zfs/vdev_label_os.c | 1 + .../openzfs/module/os/linux/zfs/vdev_raidz.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c | 3 +- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 1 + .../openzfs/module/os/linux/zfs/zfs_debug.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c | 7 +- .../openzfs/module/os/linux/zfs/zfs_file_os.c | 1 + .../openzfs/module/os/linux/zfs/zfs_ioctl_os.c | 1 + .../openzfs/module/os/linux/zfs/zfs_racct.c | 1 + .../openzfs/module/os/linux/zfs/zfs_sysfs.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/zfs_uio.c | 1 + .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 3 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 64 +- .../openzfs/module/os/linux/zfs/zfs_znode_os.c | 7 +- .../openzfs/module/os/linux/zfs/zio_crypt.c | 1 + .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 1 + .../openzfs/module/os/linux/zfs/zpl_export.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 1 + .../openzfs/module/os/linux/zfs/zpl_file_range.c | 1 + .../openzfs/module/os/linux/zfs/zpl_inode.c | 14 + .../openzfs/module/os/linux/zfs/zpl_super.c | 27 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 1 + sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 5 +- sys/contrib/openzfs/module/unicode/u8_textprep.c | 1 + sys/contrib/openzfs/module/zcommon/cityhash.c | 2 + sys/contrib/openzfs/module/zcommon/simd_stat.c | 1 + .../openzfs/module/zcommon/zfeature_common.c | 1 + sys/contrib/openzfs/module/zcommon/zfs_comutil.c | 1 + sys/contrib/openzfs/module/zcommon/zfs_deleg.c | 2 + sys/contrib/openzfs/module/zcommon/zfs_fletcher.c | 1 + .../module/zcommon/zfs_fletcher_aarch64_neon.c | 1 + .../openzfs/module/zcommon/zfs_fletcher_avx512.c | 1 + .../openzfs/module/zcommon/zfs_fletcher_intel.c | 1 + .../openzfs/module/zcommon/zfs_fletcher_sse.c | 1 + .../module/zcommon/zfs_fletcher_superscalar.c | 1 + .../module/zcommon/zfs_fletcher_superscalar4.c | 1 + sys/contrib/openzfs/module/zcommon/zfs_namecheck.c | 1 + sys/contrib/openzfs/module/zcommon/zfs_prop.c | 1 + sys/contrib/openzfs/module/zcommon/zfs_valstr.c | 1 + sys/contrib/openzfs/module/zcommon/zpool_prop.c | 1 + sys/contrib/openzfs/module/zcommon/zprop_common.c | 1 + sys/contrib/openzfs/module/zfs/abd.c | 1 + sys/contrib/openzfs/module/zfs/aggsum.c | 1 + sys/contrib/openzfs/module/zfs/arc.c | 48 +- sys/contrib/openzfs/module/zfs/blake3_zfs.c | 1 + sys/contrib/openzfs/module/zfs/blkptr.c | 1 + sys/contrib/openzfs/module/zfs/bplist.c | 1 + sys/contrib/openzfs/module/zfs/bpobj.c | 1 + sys/contrib/openzfs/module/zfs/bptree.c | 1 + sys/contrib/openzfs/module/zfs/bqueue.c | 1 + sys/contrib/openzfs/module/zfs/brt.c | 1 + sys/contrib/openzfs/module/zfs/btree.c | 1 + sys/contrib/openzfs/module/zfs/dataset_kstats.c | 1 + sys/contrib/openzfs/module/zfs/dbuf.c | 5 +- sys/contrib/openzfs/module/zfs/dbuf_stats.c | 1 + sys/contrib/openzfs/module/zfs/ddt.c | 358 +++++----- sys/contrib/openzfs/module/zfs/ddt_log.c | 1 + sys/contrib/openzfs/module/zfs/ddt_stats.c | 1 + sys/contrib/openzfs/module/zfs/ddt_zap.c | 1 + sys/contrib/openzfs/module/zfs/dmu.c | 28 +- sys/contrib/openzfs/module/zfs/dmu_diff.c | 1 + sys/contrib/openzfs/module/zfs/dmu_direct.c | 1 + sys/contrib/openzfs/module/zfs/dmu_object.c | 1 + *** 2623 LINES SKIPPED *** From nobody Thu Mar 27 08:14:59 2025 X-Original-To: dev-commits-src-all@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 4ZNc040wDRz5ryyB; Thu, 27 Mar 2025 08:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNc036qNhz3gFS; Thu, 27 Mar 2025 08:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743063300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxL419BA2O7PkCgDY0c/qf5bkCYiebMl680irllPUnA=; b=cBfyxcRCqES07Snw6OMUg48LDMU3PCptNx0YOgf27JkHE7qWPqafF7H993hfIZ4y5s8nO5 cLBFEORNiGJddAm+VQGy0SvjPkxba/ug7FdgnYDnD/6gjuxsFS4l9Z6HtVRYzrLCpYYxwN NpGxWbEwFDWuATKLx1jo7uCiG2wAastMpgWlmuehw+wSSY8JIpOM1xsaPaEsJdahpDMm4c ciPGh049DRP+hj5vr3Oyd60+OBjgm/4v38xpdGtLHZSzcfxrcUfBs6yXAenYEKou1qInVW OJc4gfIonm9Flad+6omW4Rf66Y9FG/+bmXrhyZ8j71qcFbBpIu8n7HwfTb4EHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743063300; a=rsa-sha256; cv=none; b=KOj0znc/gzEPcFAdKurxLf+MakEROera6XNEgmyNAg4KM1ju+nRyCgxicqr/NjkueuWiSa wil1GrXo8IpfOpySrzXJl5H6+epntGrlsMo1dK8GS6xKghBji2aVL8imaevRH7IFBHZYpt APDHq+jSeRH4hPOuauG+vsce3MR2gHlR5jyxPWLh5FPazHlCdcS8nlCchPrXqBTeJCs4Bf S0yuC8PJ6j1+ZiiHdLvSK4O2IdVX1uD84N+hVNlHWLbhI9zSGL++558xG1cNLPjo0haKN7 29w27F1eOQauk/nQqbLQ7hgI/2hEUNtCgDhRoQ5BX2QMUwMM4CUgI72Kh+i8AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743063300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxL419BA2O7PkCgDY0c/qf5bkCYiebMl680irllPUnA=; b=Xzb9eol9wwwNJs5d6sqHVl/5ApiLTe6VJJJVbNzGVt0ziQ//rOb1pzglKTCqZeYAjsK8iU hwG6nt7yogEdqTQz6h6Zp6McsSJ2h3JHCHdzWxkO1afaZA+5OENURHaHME/YEaZaqLZGPU 4uWAWy2kZ9gg9Dz92hLqaFdeuHpqpLiGodvOlInnk6nEsz6wpA6eviK1XiALDzsDE2VCrZ 7x5OdhWLbEf2uiNSs8cnRRenXtqpPFyphq1RWpLIZV4KxaYPex3b00SzyV6XDnp/1elEwB SXZeP55BexXHQBVeQgx7345rBxj3lUcc8pgNkjXuSc5GJnAiAspJQwaF1t7Mfg== 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 4ZNc036CxgzpKj; Thu, 27 Mar 2025 08:14: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 52R8ExQd007334; Thu, 27 Mar 2025 08:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R8ExrE007331; Thu, 27 Mar 2025 08:14:59 GMT (envelope-from git) Date: Thu, 27 Mar 2025 08:14:59 GMT Message-Id: <202503270814.52R8ExrE007331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 641794f94f4d - main - zfs: update zfs_config.h and zfs_gitref.h to catch up with 61145dc2b List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 641794f94f4df1e229ed776f5dfdf0d6e8055db8 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=641794f94f4df1e229ed776f5dfdf0d6e8055db8 commit 641794f94f4df1e229ed776f5dfdf0d6e8055db8 Author: Martin Matuska AuthorDate: 2025-03-27 08:14:14 +0000 Commit: Martin Matuska CommitDate: 2025-03-27 08:14:14 +0000 zfs: update zfs_config.h and zfs_gitref.h to catch up with 61145dc2b --- sys/modules/zfs/zfs_config.h | 4 ++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index 1a1170ffdf44..2650db0a389b 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -794,7 +794,7 @@ /* #undef ZFS_DEVICE_MINOR */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.3.99-212-FreeBSD_gfe674998b" +#define ZFS_META_ALIAS "zfs-2.3.99-263-FreeBSD_g4abc21b28" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -824,7 +824,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "212-FreeBSD_gfe674998b" +#define ZFS_META_RELEASE "263-FreeBSD_g4abc21b28" /* Define the project version. */ #define ZFS_META_VERSION "2.3.99" diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h index e27544c9894d..b0718b39a62b 100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@ -1 +1 @@ -#define ZFS_META_GITREV "zfs-2.3.99-212-gfe674998b" +#define ZFS_META_GITREV "zfs-2.3.99-263-g4abc21b28" From nobody Thu Mar 27 09:08:48 2025 X-Original-To: dev-commits-src-all@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 4ZNdB91qK6z5s3CJ; Thu, 27 Mar 2025 09:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNdB91Pfkz40c9; Thu, 27 Mar 2025 09: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=1743066529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyK1S/aZ3UhBiVkVk6UvrDZMCGP7/DyOd2CNRUkZf5E=; b=pled/aM61rnKuw2PfgTlCB4gpZPNT+N/biuroYPYMi/8P5ZfLNwxm/euRHWWggmqh17rVX F2kbM2W6MgbQBl/umJrzzzbSNjhsNw8H8+DyguWgkwqjKcJ72AHlWpM+k/cyH9KFDKWlNx EhC1ZCkZlVjt6pJF/9DLrHGg4OXuxOgRbhHmyI7Ofm91ymfp0vALK+sjxqE2vDRQcEG5Ln DZPLFT0Gl4hOD+ZsCJTpjJ7fAHlegVYlvawZVx0DMPhZsWtyYZf03GGmeAzy7TiSbKG40E JoOUrb/nO2361QS8zu0Z1i7DP9qKuCeuMfCCqK7w1DHmt6n4qpj29e+SeMD16w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743066529; a=rsa-sha256; cv=none; b=XP1FXTe0jNhBHib3FE41vDeIYSohbhahfG1OQEfIVg9sj8WLxny9xQhUPmj12uBINj+KwZ lbsjdfhh6oPVGF/3eQdWPBPMrod44lNMAPOq3Fdyjloy+h0KzLpJ5w2SrhKAKoscFYgTjr PSjv98Cbi9aWTkiKA3K231aYdQEXw49NkMbXsJWKDxbro+cPc7w3JvhFcLUJSvLBiLKFYi AiLfjyUMQLWN94RHjK4aKA2voYOmji6bGemzGqSAUMO5/eiTdDifjT8lboaro0SIyrCWq1 R6tUntcCYcYQvk+IpCMDaCY030k+GfNze9i/wJBRYonE1vkbc/pf99amTltwOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743066529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyK1S/aZ3UhBiVkVk6UvrDZMCGP7/DyOd2CNRUkZf5E=; b=PUlMUfeTtJIrVHYiMbc+gZVhxLb8SuGs00V1hU0PQuX2mJh3G2BKYwMud85/CkH2f4isDR SGzSstoad8cEHNAgeIAZzOmXEPio7tms/8uYpQYu2f4RnSEBhgMho96qnp5B1QG5VhYaF0 afLacd/aELw7TxhXhn+vzJFxi+Dud2efr7g7lbAO6TDH+tHGwRAF2yolMfxnENQ4fY2yS1 6jKj+JBNI8xytvwYOB/BdfkFjzkzLlUBS0sPkf3HLBMXUCGa58aoVCcphAl0yiNZskVmnP X1sKtXPesnwWEz9fofwjOkiqj/kXvoPcI/KrxGcDR51AKDliMDe5vfm+fwWWoA== 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 4ZNdB90db4zqk3; Thu, 27 Mar 2025 09: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 52R98mRR002286; Thu, 27 Mar 2025 09: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 52R98m9P002283; Thu, 27 Mar 2025 09:08:48 GMT (envelope-from git) Date: Thu, 27 Mar 2025 09:08:48 GMT Message-Id: <202503270908.52R98m9P002283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8011df62f57f - main - procstat: decode SOCK_SEQPACKET unix domain socket type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8011df62f57f021a1b4f62d9beea4c25d9b37a23 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8011df62f57f021a1b4f62d9beea4c25d9b37a23 commit 8011df62f57f021a1b4f62d9beea4c25d9b37a23 Author: Konstantin Belousov AuthorDate: 2025-03-26 18:42:31 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-27 09:08:18 +0000 procstat: decode SOCK_SEQPACKET unix domain socket type Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49525 --- usr.bin/procstat/procstat_files.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c index bd9bbfc358c9..d61cf1693053 100644 --- a/usr.bin/procstat/procstat_files.c +++ b/usr.bin/procstat/procstat_files.c @@ -75,6 +75,8 @@ protocol_to_string(int domain, int type, int protocol) return ("UDS"); case SOCK_DGRAM: return ("UDD"); + case SOCK_SEQPACKET: + return ("UDQ"); default: return ("UD?"); } From nobody Thu Mar 27 09:08:49 2025 X-Original-To: dev-commits-src-all@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 4ZNdBB2NR8z5s3CM; Thu, 27 Mar 2025 09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNdBB106Rz40Lq; Thu, 27 Mar 2025 09: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=1743066530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J7k9kgneNcUc+T3mrr06ANHKNvFhs9/H+SxCLy8FEXk=; b=UGixvUbLG6iNTxX1QEI6pYJ82z4WTxjvWXx4BN7HphX7aNsgipQAKM+ScvhHg+I4Wd4eiI vWySoOJoZiZN+NZEiFmIZcBzHFBKT8WyJINzUE7c3khGzb1erNNMGHiumCvHH0oCYyNa1s wdV8XEBI3SidF9CHWkF1u2tXkzfui8nGJsfj/gAM0Zx/cotYLkLDS6sCUt1LsPTk7SGEHw HEhCtd4NkYMgvGOvEiPStiLJ7PS3ERN4c6ElHZxAAbBp3yl+dLDbUH27z7Xf+9tIY8AXJt ZvqVskovJW6g3s0LJkMyxanQ2XwSt+1EGl3zJQcjxmIzjQhpnU6YAElBWG1FBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743066530; a=rsa-sha256; cv=none; b=vUhkjovzi3J00I64y0sibTn1/gBMTAcWT0Hc5fLD5owk/iv+S3nYsF+KVyOF1oJq4PwGuQ USJMuKeD/KKJRYRgh0K6WkdZQ4Gv+vEqdiSdkttz2Amv8GS35nobA83YqH3+C1wcYp4WjB gLNv8VmMNDqatrHTYoED7eWEPVDA43hiU7Qmn/FGxTNKPtcnNVeF0ZaOvsesrwMIgvKUTR CY5qzeUkZ3UK45eO9Y8NmvHNyz/WatOK4kicEVOIeU8h4gsE/BEy2eZFWduKbIeYHphGz8 FM4na18PgvYN8GT0yVwHIdFr3/yLOXwp4zSa88w5fvUOLRg10SUsuQBqxkCZYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743066530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J7k9kgneNcUc+T3mrr06ANHKNvFhs9/H+SxCLy8FEXk=; b=BJF2CDHznbHdBvMapm1sFdTpnWo7d++icaK8faJJQuRZsFl3btaVbK8wLzrfi8rBTkwFmy VU1WDG/AYWFBIZNriXvqiqngcvP/uVZiSaGo7e3uNBbH2GxWir3a+ps+6Oo1NPhxSWHRyy tN2OFHFdYhl2omZloD6hvB+z0vYuKUg2YKZtKvEKt3SNYyK4hbESgWAnAIIw1Ws535PPej xlOyHbx8ScRi7VWinK9eerUu91ORzRlo8mhYt0SdU6/mjaAhZQ/X4jy7MDgcSUW4PzS2co sjNP534llTZLLjVES5PLO/fa5x6NbnApMx4HgwJEDVOTdujldhih0Xir5K1+zQ== 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 4ZNdBB0XG5zqmw; Thu, 27 Mar 2025 09: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 52R98nFO002320; Thu, 27 Mar 2025 09: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 52R98nEl002317; Thu, 27 Mar 2025 09:08:49 GMT (envelope-from git) Date: Thu, 27 Mar 2025 09:08:49 GMT Message-Id: <202503270908.52R98nEl002317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 991329f507a8 - main - procstat.1: correct local socket types descriptions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 991329f507a893076a4119c90bb463de0ac15be9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=991329f507a893076a4119c90bb463de0ac15be9 commit 991329f507a893076a4119c90bb463de0ac15be9 Author: Konstantin Belousov AuthorDate: 2025-03-27 09:02:21 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-27 09:08:24 +0000 procstat.1: correct local socket types descriptions. Datagram/Stream sockets are similar to, but are not TCP/UDP sockets. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49525 --- usr.bin/procstat/procstat.1 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 index 3466291ba43c..1623caf6b717 100644 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -479,13 +479,9 @@ see .Pp .Bl -tag -width indent -compact .It UDD -.Dv IPPROTO_UDP ; -see -.Xr udp 4 . +Datagram socket. .It UDS -.Dv IPPROTO_TCP ; -see -.Xr tcp 4 . +Stream socket. .It UD? unknown protocol. .El From nobody Thu Mar 27 09:08:51 2025 X-Original-To: dev-commits-src-all@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 4ZNdBC4kxpz5s3FS; Thu, 27 Mar 2025 09:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNdBC1wnbz40PP; Thu, 27 Mar 2025 09:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743066531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g28eDnkM6q4oEaGlZIM3kM04vEf03S28vQOaGEqIsa4=; b=MgYPi/ejNzSq2RiYyxnqqA0KQHy95RVfsWcw383+TLc95Ag1ahjejq7ylftLy7tyRfF52Q Ms9E2Yyd+mRSAyspsts0P2BJFIyCl74aVwTJNkjCznL5YjP9kHMI1dAb4H0DLFKHiXKHlL 0P71l5lC1PKQgq/zVEyt+gEGXYMFY1d2mFb4TKaW17RxE1YRzPnD4YTm5gL7EKBkhsKcov UIxaBpV+4ohMCDZPjL6AbRcm8ikl/SvHSMlRh1rBugFv23XGPXEKQ4gZUic8xd3iKwMxaO v1+aMVzfVdu4HRasw8n056bxuhD8NX7entagVVcbAwwIO+uz8M6GKhfXrKMV1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743066531; a=rsa-sha256; cv=none; b=kUe9HnjJ4WfJwdxNZQV2aprWwhBENNApPoPC/Xo/o/0cZ9slBCt3fVPAxq0SgIj+5kcMlV 8RVWPSCcpa4RjkbNxc7renYimwRSMJFN606PRH2Dlsx85I7n/5Aq9tXZ80eVuekNaxPn4D hzJg+sZh5TZ9QBg8ZR01W8u/t6AJtl+ELvY2uBpLMiXs3AEdbNlKboeCucwAvLYeDa6FCt 1D8Ckhgc4vZ0tpyySBjTQOIY7x48b9gJe11wU05UdWUv9ivmSKC80CNlMeFgCyp7lB2eOV NW93Qyk44OWHC2F49s8ZsqLDJGSyb9nlxzOC0SgYZgiu9sAfSKnwDxHstBKKlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743066531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g28eDnkM6q4oEaGlZIM3kM04vEf03S28vQOaGEqIsa4=; b=F27F5JYo52ggdSONqtw5JoyVbAWeJKz/wxfmS2KfrNrtAzi5gPnqk5enrOiksQbF+OM+Us j0G0R/rMXll+1t07x0Gi97+qr721al5ZaLRWbypY0dqN1rGukuukfEDpiGTQnPbi0QcW0T pxyYmojZLL++OpVp/CnLduG0Dv2741ihYVRnAWg0iqiVSx7ja1GP/UgGi1UcHjLauld4VE YW/vS/14YD03C35KdSnZDZSdakL6dvlai/txVkLi3NhjFDkGn6U+KWXi28woMyqwZ8b64n IyYjjP+mlw5o4CaZVJKy1a38f5BrGNiwGL1M8nuvscvk8IS8Yk36zXJm45b4XQ== 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 4ZNdBC1TXPzqYh; Thu, 27 Mar 2025 09:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52R98pio002355; Thu, 27 Mar 2025 09:08:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52R98pdX002352; Thu, 27 Mar 2025 09:08:51 GMT (envelope-from git) Date: Thu, 27 Mar 2025 09:08:51 GMT Message-Id: <202503270908.52R98pdX002352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 03dfb8d0211c - main - procstat.1: document local SOCK_SEQPACKET socket display List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 03dfb8d0211cf9d7405c4fd7d541dde28047001c Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=03dfb8d0211cf9d7405c4fd7d541dde28047001c commit 03dfb8d0211cf9d7405c4fd7d541dde28047001c Author: Konstantin Belousov AuthorDate: 2025-03-27 09:06:25 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-27 09:08:31 +0000 procstat.1: document local SOCK_SEQPACKET socket display Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49525 --- usr.bin/procstat/procstat.1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 index 1623caf6b717..cc775ffe133b 100644 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -482,6 +482,8 @@ see Datagram socket. .It UDS Stream socket. +.It UDQ +Sequential Packet Stream socket. .It UD? unknown protocol. .El From nobody Thu Mar 27 10:40:42 2025 X-Original-To: dev-commits-src-all@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 4ZNgDC1Gd9z5r912; Thu, 27 Mar 2025 10:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNgDB5xztz3bnW; Thu, 27 Mar 2025 10:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743072042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBMwRmiGosmuNq8z5kQKlb7NmhQSfuP+pqN7WPimkfM=; b=OCNnQcC5J3QVTICou0XxIYONmoq6nypT0cBhvNT3k/CS89yE6NRZ2atLY/Mtld6P0nJE9F yptprMoyUCWkkEWctvi+v9mDNBHm7Cx0gH6KzNV3C7sohToilCjPHarRk9oDByTjxRbMYl m5hPRzojKqxG5fE+/Xs+zKQtN4bVZlQlf4EuIvtcxhjjkVgxP5mWbknoDUizEUdWMJeQHk Wq0qHatWC6KnifIG1/EALlA4rva7SnvyE0UkS59evGPa2nd/adc+kwa10OiADDmjx3DSER WR7+xrmSWHlz3MysWxAIViA5/sfdeB4UZm5SvGqz2cnUztLv37nW4WDOGbox9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743072042; a=rsa-sha256; cv=none; b=aau/DFblpHDVq2/GMd7jw5wPCdz8ZkFkHgStRL6fPZJA+5cPQ2lXyQ+o7j4RQz3g9LHFUr DKXPiCzrq2Fl+Ga/EtKk0l9jjqHGXPFqTQKV39vALzhG2vOB00Vhai2rg8X1t+yIUt5TSw Z+fPvMocmB+wG9QO8XigrseJD8lj5aHsQHIe3Tre+iHn7Vjq/czKn+RMqt33gxXAp1esTe ofiVvq3GSgHiLNCPj+u+I7PezYJMVJHtJ8XCYcZGdTPjCqg3U5RESSxKXcBBve3fBi19ob t/4RC1B6tyBKwOyzXr/c6w6VHp8F1/xQSVulae95MMuXlUHcgeFh8TBn/uu19w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743072042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBMwRmiGosmuNq8z5kQKlb7NmhQSfuP+pqN7WPimkfM=; b=hukSK0R9sZKrHw0n/fooHwK9OuukjT/tZKfZsjqIAhn3+P6K2dNmsLTcO0afGxu7CWZ80y mB5Ezo0adUqJn6FwuVEVYZgRwYN5iN8gAZNbvT3Dvhe2MqEoF2NcpyELq6IUi4PswkxuCj HBSqpCsWPD91/hj9CqwI6mSo6NKKR0lKf5N1/2BsX3oiQd+S628mt1arqzKRNvx5g5AUse 8MIlnf9xRrWKdc5Y1fSWYpOG09G3iFYTfYs/P0aOOlQWzriErNg1gykqiV1KxOHTZKUGWP aXw+Y82qvQvqQi7sL2awniyk5QbP9hoUAHrAFvRu4i9UaIHKUeP4BgwUKrrY5w== 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 4ZNgDB5L7jztLS; Thu, 27 Mar 2025 10:40: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 52RAeglK080194; Thu, 27 Mar 2025 10:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RAeg1v080191; Thu, 27 Mar 2025 10:40:42 GMT (envelope-from git) Date: Thu, 27 Mar 2025 10:40:42 GMT Message-Id: <202503271040.52RAeg1v080191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 6d6c97fb72a7 - main - vm_fault: update pred lock acq in copy_entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d6c97fb72a7dce85008cef891d093b24dcbb380 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6d6c97fb72a7dce85008cef891d093b24dcbb380 commit 6d6c97fb72a7dce85008cef891d093b24dcbb380 Author: Doug Moore AuthorDate: 2025-03-27 10:39:44 +0000 Commit: Doug Moore CommitDate: 2025-03-27 10:39:44 +0000 vm_fault: update pred lock acq in copy_entry In vm_fault_copy_entry, variable 'mpred' is invalided as the predecessor of the next page to be inserted when an allocation failure leads to lock release and reacquisition. Recompute it in that case. Reported by: markj Reviewed by: markj Fixes: vm_page: expose page_alloc_after 6b33d9dc46c2f1cbb9127377119 Differential Revision: https://reviews.freebsd.org/D49521 --- sys/vm/vm_fault.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index c97a7cd998df..2e254e255dce 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -2199,14 +2199,16 @@ again: /* * Allocate a page in the destination object. */ - dst_m = vm_page_alloc_after(dst_object, (src_object == - dst_object ? src_pindex : 0) + dst_pindex, + pindex = (src_object == dst_object ? src_pindex : 0) + + dst_pindex; + dst_m = vm_page_alloc_after(dst_object, pindex, VM_ALLOC_NORMAL, mpred); if (dst_m == NULL) { VM_OBJECT_WUNLOCK(dst_object); VM_OBJECT_RUNLOCK(object); vm_wait(dst_object); VM_OBJECT_WLOCK(dst_object); + mpred = vm_page_mpred(src_object, pindex); goto again; } From nobody Thu Mar 27 13:19:18 2025 X-Original-To: dev-commits-src-all@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 4ZNklC0TjDz5rMKL; Thu, 27 Mar 2025 13:19:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNklB38Zmz40YN; Thu, 27 Mar 2025 13:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743081558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tuKDjHrb7PS5ADOYZwTEVpUndN9lnKdYX1/yQsw8OBc=; b=bGJLzPeBpi1etdtevU6MzMfWi/5euaMA/uoGBZyHtUZSGden9Aj3ROd1ECVX1JnZaneOxr WOOukmQsAcMER6kNwNHcNmhmlctgVBz/E891HgQqlv34ah00uQ0lFjg46f9TkbD8Y4wJlu V7CsPilQYhQuM+i7jQijP6AqMvLS5rLVyFM63stZKAAtnYxhJfP0WpPoSNS1YXMy11pFn0 UA3PBVf+rsFyQNNC+syEg9gTmw5OoDodLQyQQzdAMN/ISrsEuBPTYwpy0QCxSh54vDyhCj H9dFNd7w+9DDjURMCTaAD9ZHVC8K7lDLiQiKTLxD4Lt+fmW9ZdIXHNk+XPqsag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743081558; a=rsa-sha256; cv=none; b=keJD02ZABzOj0Lw9c/SqEtrTBc+iO4FGSmQNCm7RjlNoBRrwuuEKWmldT9jWjSwF4Y0eGA vf/+gMHx9PiPD98csmW3i0NOPEbKcEd4uWEXqdDCPqhK0i82PlM/0rXwWUD/IpyvrMrQrm SgMCAKuoYdsiC7TexgVRxoUsF8Jauhugq51rtWh6HaB7lauBTMTa7StaETm+iFObWQ5igb +DWrwFoaunovL4qdc+8SO084HSatASjI8ANo7Q7/X/Dc58eqNwzq425RF2DQyIK371c1d7 bv3NiR59lqZMZxxkAsGtPU4Wb2XgI8smuXJXfAU4nlK32Ug7+Y49dwhOVbMnkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743081558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tuKDjHrb7PS5ADOYZwTEVpUndN9lnKdYX1/yQsw8OBc=; b=Mgk1mOJA+Oj54o7rSfZbSP0TGxWUeLDg5UXU+J9eS0pE7lQm8wB3S0dtPGp8DTMS+fGT7R 0Knb5y7Uolo3W+2RANPTouwTKKFiIGpeCv/cbMAAichdNIMUgaQcfDILGGlyWK7GW9wQYC FeIRO7ThUkNTGemOoItbxHWJMeCAkivBupt6lefG9SO7RS+HBqhMa1OvVQ1nEolJ79foaX JcjtuNRx//wsEknhvVfdM+J4nPlp5QxgeQ0sp61mqx8w5aS5BqjWK+Y4so2rvf2tpd6v1n zsTOfejaeaiHMxeqqoQMRTWGPF2S2iY4FKAi+dYRQVR+fYi9u6UPDV4TGc3aow== 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 4ZNklB27MNzyT6; Thu, 27 Mar 2025 13:19: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 52RDJIaC070467; Thu, 27 Mar 2025 13:19:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDJIwc070464; Thu, 27 Mar 2025 13:19:18 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:19:18 GMT Message-Id: <202503271319.52RDJIwc070464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 2e16618fe789 - main - ipmi: fix runtime on powerpc64le List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e16618fe789f110bd8d297b1c65b166fa60c2fe Auto-Submitted: auto-generated The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e16618fe789f110bd8d297b1c65b166fa60c2fe commit 2e16618fe789f110bd8d297b1c65b166fa60c2fe Author: Piotr Kubaj AuthorDate: 2025-03-27 11:55:48 +0000 Commit: Piotr Kubaj CommitDate: 2025-03-27 11:57:28 +0000 ipmi: fix runtime on powerpc64le Summary: OPAL runs in big-endian mode, so we need to byteswap msg_len on little-endian. MFC after: 1 week Test Plan: ipmitool lan print Reviewers: #powerpc Subscribers: imp Differential Revision: https://reviews.freebsd.org/D49530 --- sys/dev/ipmi/ipmi_opal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ipmi/ipmi_opal.c b/sys/dev/ipmi/ipmi_opal.c index ae7583a0d749..0393dd92cc53 100644 --- a/sys/dev/ipmi/ipmi_opal.c +++ b/sys/dev/ipmi/ipmi_opal.c @@ -93,6 +93,7 @@ opal_ipmi_recv(struct opal_ipmi_softc *sc, uint64_t *msg_len, int timo) opal_call(OPAL_POLL_EVENTS, NULL); err = opal_call(OPAL_IPMI_RECV, sc->sc_interface, vtophys(sc->sc_msg), vtophys(msg_len)); + *msg_len = be64toh(*msg_len); if (err != OPAL_EMPTY) break; From nobody Thu Mar 27 13:47:47 2025 X-Original-To: dev-commits-src-all@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 4ZNlN36v5wz5rPKS; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlN3635kz3MHF; Thu, 27 Mar 2025 13:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0D0dTM6A06joZHmbR3wuJJlsOAbibeJnV4/uXJJW6Bk=; b=Pcr+mWQGDsL3+GEekqCBawPGeqdXtacHgirMFjvSSKZurZgq7WdOHdl8j7Nr8PRp4MysSA aeFS5kN1LQw1oWsBZ8NAJl/g+t2WnQ6++Gd5kkckSIFx4y2ShVjV8GP7OFJ/T8vMEA2LuB qeoV506+bMX2mpA8cGafTYVR89EsrQZCWNgDQADDc/paQAw0rOYyll2nHQkYPamqhb9RW8 6mM4UAKbp8miHo6+1BEG/xZANvC8IV/6AegIk6GaKQP9dzjCATlQ0oDo8slxvskHx/Asj/ eLuzv/LzoYM3WE9rWhAUYkviog+38I4XZsJXAOEPvSgiiQXR23goMC/RRNr8JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083267; a=rsa-sha256; cv=none; b=JyUZgHojqF/UTOppCpIK1TsWEIGYCEerBjb6q87ov0RmFhxIjDy/fh0+YRis6L6PH4+zRE WGyQa/SKxwzB300bCS9k0ywpwC/U5PJl9LOEo9yYAhkPOmZLg7EQUGUUIzVbFNwA/+e2L0 7mqBaRXQMBAggPQ/wTdjwGXs04zJfQJ96H2IYONnDzdnXEcDfI++zfyjrb2FSTTmuQJtQa moPtLDqn+vlQyugkFDSoVVcf84UAD7qRflXs9LpFO1VMTcINnFEhUNb2rLB6Q4CC8XYEIb rjyK9bH0slscf65yJ82UE/CKHsigMBvb6/eRyO2PhdbesPBUyj2YsG623N7p2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0D0dTM6A06joZHmbR3wuJJlsOAbibeJnV4/uXJJW6Bk=; b=W7G9cRPkjUmL5FJIE/OV4fEIl2Iz7AIdMKfSdv+j0gPfY81XY2gN1FfWgQoeePF/390XKA SdCfkpWoH4Bk7sNV/+dvEo5w3HBE80MqON8qOiPrSnLORqjZSSfUr2TqTtiYGGrD4RfOO+ rM37tkQrFClOYpElAQ11u9dB0O4PzgGFItFEOYDNuhTbC+gSnv/YvC2sxi3nXiO9igf5XE WaDH/lTbYnW/rXkjNtL0aBNINUu4SIL+xQISCMBvRO5frZnehxmHKWYyDR5PFc6EVD5Y4q nd1QVhaT5EQANvALH+fdjFR1MLDGRoLnz2W2cJcQ7oI1H7AnfL1iDuIlgk0drw== 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 4ZNlN35Sj3z109Q; Thu, 27 Mar 2025 13:47: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 52RDll5d025475; Thu, 27 Mar 2025 13:47:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDllCE025472; Thu, 27 Mar 2025 13:47:47 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:47 GMT Message-Id: <202503271347.52RDllCE025472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: e9ab9910fa12 - main - arm64: Clean up enabling in-kernel BTI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9ab9910fa12ce7b042a83a25dfaf5efdb631a32 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e9ab9910fa12ce7b042a83a25dfaf5efdb631a32 commit e9ab9910fa12ce7b042a83a25dfaf5efdb631a32 Author: Andrew Turner AuthorDate: 2025-03-27 13:47:28 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:28 +0000 arm64: Clean up enabling in-kernel BTI Some hypervisors incorrectly use the Guarded Page (GP) bit from the last level page table as part of the output address. This causes them to raise an address size exception as the calculated physical address is too large. Only set the GP bit in the page table when BTI is present. Reviewed by: alc, kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49154 --- sys/arm64/arm64/locore.S | 22 +++++++++++++++++++--- sys/arm64/arm64/pmap.c | 3 ++- sys/arm64/include/pte.h | 3 ++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 88193b6c93f7..9cf23fcf13a1 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -87,6 +87,7 @@ ENTRY(_start) * x26 = Kernel L1 table * x24 = TTBR1 table * x22 = PTE shareability attributes + * x21 = BTI guarded page attribute if supported */ /* Enable the mmu */ @@ -136,9 +137,13 @@ virtdone: str x27, [x0, #BP_KERN_TTBR0] str x23, [x0, #BP_BOOT_EL] - /* Set this before it's used in kasan_init_early */ + /* Set these before they are used in kasan_init_early */ adrp x1, pmap_sh_attr str x22, [x1, :lo12:pmap_sh_attr] +#ifdef __ARM_FEATURE_BTI_DEFAULT + adrp x1, pmap_gp_attr + str x21, [x1, :lo12:pmap_gp_attr] +#endif #ifdef KASAN /* Save bootparams */ @@ -487,6 +492,17 @@ LENTRY(create_pagetables) cmp x6, x27 b.lo 1b +#ifdef __ARM_FEATURE_BTI_DEFAULT + /* + * Check if the CPU supports BTI + */ + mrs x6, id_aa64pfr1_el1 /* Read the ID register */ + and x6, x6, ID_AA64PFR1_BT_MASK /* Mask the field we need */ + cmp x6, xzr /* Check it's non-zero */ + cset x6, ne /* x6 is set if non-zero */ + lsl x21, x6, ATTR_S1_GP_SHIFT /* Shift to the correct bit */ +#endif + /* * Find the shareability attribute we should use. If FEAT_LPA2 is * enabled then the shareability field is moved from the page table @@ -785,7 +801,7 @@ LENTRY(build_l2_block_pagetable) orr x12, x12, #(ATTR_AF) orr x12, x12, #(ATTR_S1_UXN) #ifdef __ARM_FEATURE_BTI_DEFAULT - orr x12, x12, #(ATTR_S1_GP) + orr x12, x12, x21 #endif /* Set the shareability attribute */ orr x12, x12, x22 @@ -863,7 +879,7 @@ LENTRY(build_l3_page_pagetable) orr x12, x12, #(ATTR_AF) orr x12, x12, #(ATTR_S1_UXN) #ifdef __ARM_FEATURE_BTI_DEFAULT - orr x12, x12, #(ATTR_S1_GP) + orr x12, x12, x21 #endif /* Set the shareability attribute */ orr x12, x12, x22 diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 5a3dbbf00203..14ef7dd0169c 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -182,7 +182,8 @@ #define pmap_l2_pindex(v) ((v) >> L2_SHIFT) #ifdef __ARM_FEATURE_BTI_DEFAULT -#define ATTR_KERN_GP ATTR_S1_GP +pt_entry_t __read_mostly pmap_gp_attr; +#define ATTR_KERN_GP pmap_gp_attr #else #define ATTR_KERN_GP 0 #endif diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h index ae6a8694f6c4..464d8c941c56 100644 --- a/sys/arm64/include/pte.h +++ b/sys/arm64/include/pte.h @@ -73,7 +73,8 @@ typedef uint64_t pt_entry_t; /* page table entry */ #define ATTR_CONTIGUOUS (1UL << 52) #define ATTR_DBM (1UL << 51) -#define ATTR_S1_GP (1UL << 50) +#define ATTR_S1_GP_SHIFT 50 +#define ATTR_S1_GP (1UL << ATTR_S1_GP_SHIFT) /* * Largest possible output address field for a level 3 page. Block From nobody Thu Mar 27 13:47:48 2025 X-Original-To: dev-commits-src-all@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 4ZNlN52VKmz5rP32; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlN46qrYz3M8B; Thu, 27 Mar 2025 13:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uOyyJaHapS/+DMpzwEp8cwBFc5h+mVqVMbDT3gTQqqY=; b=YCRdaP47elPLKaQDq+uS3fduVYEJKcI9FmtFDvjJofFeD5jcUc5L8GY0qqmxKaWK8gzCC6 lV1LK4KqhqMIlUryqmIWAzmRcbEpNsc3ramCJGS8zeStHkedRry3hYmQU+F1KfyeZKy7kH QJEVZ0Zcno3CYbUoZze5Bofjspf+fhFzPiso0LdWoKVa/P1FAk77vZkvvIlBNPBz6nHFNw YHVUFRFwgneNiDRxIca1zxFR/Bdvh8+zkXhSohzi5KWQFd3/Zn6m0U3zOKJEmPBkYztqH1 Xg8fDIfWThzhuSebGssTe3DsGb33WU1rSv25Bk6JGmQ6ixWno/EWxxgnBsdkQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083269; a=rsa-sha256; cv=none; b=lOhgS+idP9iz5Wufw1WQliOCZLewUHlHVsZAo5qnzgjaaoVu+i0EUMbCS1pYhqDnQbHQ+k Ffmpd6E6PcaycLYwQ59JcHWcfe2NmM6tNDvMTZSLJOk3XAmtLO30Jl5dakmviyKnFBLqNQ Ctq6JVH6Ml5tsFbX8YNKEsZPnWxE9Ol3hD5Ay9gF4Dq5meHq0eNp4nNmpvHroJyXPI47RJ 1J9il24LIBcHfrTq9rW7VfBwXIwF7wmhINiNbxOlwpMnmV58jgEFoTy9GeX76AeopK5RJF 41wYahLoX6OKuNJjKUd3km3fmER0Ys9VGhLXjtTUO0AoMk1y+jyHZCMpQickuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uOyyJaHapS/+DMpzwEp8cwBFc5h+mVqVMbDT3gTQqqY=; b=ASAY3mxJ/v60tNEWQhAsT40LlIS4je8A5P7NgqMCzIzh5/5bfkRuZShGjLBJyuOMDHPmTE 6nxREGVmeawpzhthjpKztGFDYy3zPWX3++rKeuNS68dDKGIIUcuQyONsTPaHLlXcIU1JnL E/erUClNX8TO3sOiBGqmUsVuxdlvW2ktq361lLlunl/RU7mtLOgI+1He0Wsb0miBbaMEIb Qqh0vR9Iapb8NBl8ZmABGUii/BSQAgfkEOFVL++t2MvUs3Y4jRucvU7DY0tp9wSOF5r+9A uJKjA/c1HwOGLdQGCHq2za1ro6iqn1XsmbwZ0NDmX/N+04tA9H6MvozrNpYtrA== 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 4ZNlN46P28zywP; Thu, 27 Mar 2025 13:47: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 52RDlm52025508; Thu, 27 Mar 2025 13:47:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDlm0K025505; Thu, 27 Mar 2025 13:47:48 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:48 GMT Message-Id: <202503271347.52RDlm0K025505@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 872fc1b8de1a - main - arm64/vmm: Don't load on Ampere eMAG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 872fc1b8de1ac2a10465a315457cd69b4268cbe9 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=872fc1b8de1ac2a10465a315457cd69b4268cbe9 commit 872fc1b8de1ac2a10465a315457cd69b4268cbe9 Author: Andrew Turner AuthorDate: 2025-03-27 13:17:30 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:37 +0000 arm64/vmm: Don't load on Ampere eMAG Loading vmm.ko on Ampere eMAG locks up the system. Block loading for now until it can be fixed. PR: 285051 Reviewed by: tuexen Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49155 --- sys/arm64/vmm/vmm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index ad82e6dbd432..f28643db99d2 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -310,6 +310,20 @@ vm_exitinfo(struct vcpu *vcpu) return (&vcpu->exitinfo); } +static int +vmm_unsupported_quirk(void) +{ + /* + * Known to not load on Ampere eMAG + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285051 + */ + if (CPU_MATCH(CPU_IMPL_MASK | CPU_PART_MASK, CPU_IMPL_APM, + CPU_PART_EMAG8180, 0, 0)) + return (ENXIO); + + return (0); +} + static int vmm_init(void) { @@ -339,6 +353,9 @@ vmm_handler(module_t mod, int what, void *arg) switch (what) { case MOD_LOAD: + error = vmm_unsupported_quirk(); + if (error != 0) + break; error = vmmdev_init(); if (error != 0) break; From nobody Thu Mar 27 13:47:49 2025 X-Original-To: dev-commits-src-all@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 4ZNlN63FXkz5rP7Y; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlN60JH1z3MN2; Thu, 27 Mar 2025 13:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKWm1B/eFN7p7Fl+yRxp/J/8sGp0SS6GBUKCEeO+3sY=; b=tZwqscl5wc9PrHmx/d5Qf7H3mjP8y0fgKUVJJat8nxJYZfZfjWpI/lV6+OEiclZ0wEtTVD bdx/OEEsj/U4DqPHAyDvQHqx17tAstaDpJwd2s5wgyoIRF+aPdXCT8vzbTMWMa76ADod3m BTrcPJPYqihOLXBsP7ai9IrAgqm8XSgc9zHDaJGOqR1Myx0YBIDMY8cSjsd0lGAyrxBAeR 4zCWfEpfx3bsRRaYECzqs3Z2bahGD0UAEp06ZH4xsgA4ReqPtEvyfYJ7mN3+zwqwXubPHR 9bRDfgokoVVepYleuLFXHJT+dcydO76Uilz6ameni5ioiUmF9jWjQm60PnVUVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083270; a=rsa-sha256; cv=none; b=GGBgb5yhmLoGzS9/nlEW4+B0o/EeK+GI0aGZG0MsZyaEJ96MNsat54hLftxyZptv+0i8gD 2zhL7q2ODpZsTtwqE9vUmd/ItWrewEizPTltUFTboK0WuKmMkEOu97NFzBoTvnMKLKuDbp Ebjn/4WA6zPT/mtlp9YEb2rsQehswQMp9BCcJcGWEhSatuKSYSDbuhnQzuytIv9JZcjPoB inVf+LkOwsun8us0C5V3r6oPz4EarfLMYhx+hEwzyx1otxqG8V6XRPYYIWhaI9ZGabsbqz TOTsxi0ror5ts2Al3Mehbbl2R8MM+aQjizCPPleq/47FrPI4n3zB8qPRhICGmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKWm1B/eFN7p7Fl+yRxp/J/8sGp0SS6GBUKCEeO+3sY=; b=dqKax4vL/lngXOTsLsLUAISYCJZaHDpE7qxBxghmc4h/WmkrZeNBV6BJr0YN89C3TRL6Ai GmzzhE8+vj5iDGQAygpkecPvZc2W0jEGVARSXWHrokc96MrHc0yzMOsgSl3iki10E44Xq7 VRMqBaS6kzjzCQATqzIb+RXQyY1cWrVBzA/2OLCaseaztoPRoDt46BBUUHp7Vzbd6rqX6n 1Y7gn7wzDUvX+O2/N+ADcQClyeTK26wmiWehyu613uQSOGNJAevmsuSY7H1uWZZ6vNi948 zz87XmdTAyxOh4MWdr7iZiOT0QlvAg5BZUSgrgG3WXyrViODEDedcXHM3UihTw== 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 4ZNlN5723Gzyth; Thu, 27 Mar 2025 13:47: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 52RDlntu025549; Thu, 27 Mar 2025 13:47:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDlnhl025546; Thu, 27 Mar 2025 13:47:49 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:49 GMT Message-Id: <202503271347.52RDlnhl025546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 1ccf882c6b34 - main - arm/mv: Remove wdt_soc, it's unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ccf882c6b34d4734c3a7b5b14dcdb0c3497f204 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=1ccf882c6b34d4734c3a7b5b14dcdb0c3497f204 commit 1ccf882c6b34d4734c3a7b5b14dcdb0c3497f204 Author: Andrew Turner AuthorDate: 2025-03-27 13:21:24 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:37 +0000 arm/mv: Remove wdt_soc, it's unused Reviewed by: cognet, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49495 --- sys/arm/mv/armada/wdt.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/arm/mv/armada/wdt.c b/sys/arm/mv/armada/wdt.c index 6e2e22907c68..79f39291e0e6 100644 --- a/sys/arm/mv/armada/wdt.c +++ b/sys/arm/mv/armada/wdt.c @@ -56,7 +56,6 @@ #define MV_CLOCK_SRC_ARMV7 25000000 /* Timers' 25MHz mode */ struct mv_wdt_config { - enum soc_family wdt_soc; uint32_t wdt_timer; void (*wdt_enable)(void); void (*wdt_disable)(void); @@ -73,7 +72,6 @@ static void mv_wdt_disable_armada_38x(void); static void mv_wdt_disable_armada_xp(void); static struct mv_wdt_config mv_wdt_armada_38x_config = { - .wdt_soc = MV_SOC_ARMADA_38X, .wdt_timer = 4, .wdt_enable = &mv_wdt_enable_armada_38x, .wdt_disable = &mv_wdt_disable_armada_38x, @@ -81,7 +79,6 @@ static struct mv_wdt_config mv_wdt_armada_38x_config = { }; static struct mv_wdt_config mv_wdt_armada_xp_config = { - .wdt_soc = MV_SOC_ARMADA_XP, .wdt_timer = 2, .wdt_enable = &mv_wdt_enable_armada_xp, .wdt_disable = &mv_wdt_disable_armada_xp, @@ -89,7 +86,6 @@ static struct mv_wdt_config mv_wdt_armada_xp_config = { }; static struct mv_wdt_config mv_wdt_armv5_config = { - .wdt_soc = MV_SOC_ARMV5, .wdt_timer = 2, .wdt_enable = &mv_wdt_enable_armv5, .wdt_disable = &mv_wdt_disable_armv5, From nobody Thu Mar 27 13:47:51 2025 X-Original-To: dev-commits-src-all@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 4ZNlN75xxlz5rPH8; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlN71b4pz3MC7; Thu, 27 Mar 2025 13:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gOVYUOu8Ifu4OlFDU2/16y+h5Q+Adj5+NjThBZkUACk=; b=w9r2XTXV5HpDwAx4XjDZk+dwHaZYHphgGyJbS1O/VhoEPb9ACwTa/3m6jz0YJYqGe2bRHw n97SV4821drMG+l2XXcO4QIDAiUzdaWm2Yqq7uxmWC+GmZRjy/keUOjmh6RGNWN1SBgyaW 4zzClHuvCvq0AQ2sPMEZrySNATkPyXedC7cUUySTQlsI5gaRNbdeIPoRhdLzDcVVUU01gS 8ANXnUarSDV2C71DEo/XWVNepxl+8XIK2EckKhON7Lqg8MKS6b2/8LrHE26uvE+iMhncgn ilfeFNgsUIzVDxIx5AE2vKEoBLEXlFrPUnL4MSkhMqgo0WGYEJShvnyVxVITeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083271; a=rsa-sha256; cv=none; b=X83q2jcTUL1Ik//vza8kRJnAC1npi3UXrQ1uPeLAjAqOv9akk84+p8oVjOK9zL+Mzl4byd +bJO97alGFuyG8V4kZMKHPAhwOe+IH2qpuiZ+pxnrWrohz/rCTXNeH7YarBqXp5AtkukXg fEdsrvTgjGTqo7dIUAdhZtMQzq0V0CKa+0wqKnXivsR7ditNdybZE7pVCWndRczrBSKytK DIVgzeGHf8hRcliM29Faq32dsuA2MFTSc6GXw1pv5d4cqho7QVFu4ZghKXJ3OxEl8PQgTZ Ww9bk5mjMByEZnUsGyLPguoAj0R9T8xVkAvjgL/Km7ug7NJjUiSm5E8R037BuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gOVYUOu8Ifu4OlFDU2/16y+h5Q+Adj5+NjThBZkUACk=; b=AcO6a2d3ihINwuadE4ZCo8eVWVgfELVYi4fidtNH9RQRQ2u7P0DxFIS9ff1cMyMfPt3hPa DrA3WkqdOqetInfwJky5cWWxQ/0Kxh/xuCJZHG+bWM3gRRXta2rkrfl149aU6ddk0OhGxJ ZqHQMVdKOwN8+ALsO/nlD2xYb8ttxc6zNme7pXXGrjiz9ZSS831nA0TbV3uD7f2KDoOr1T 8WiQo1I5iSBcBX9dGNFK5flv1HRIHcWzIBr178nKx88T+PsVOK7GB1Htvd4IpYf5NLTOyP 9V97gn+xjanVIzI606BqOPhpGI29ZboyCi/zfg+A18NZ+xEy/CsFGVGuFafXcA== 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 4ZNlN70t4QzyhV; Thu, 27 Mar 2025 13:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52RDlpIW025583; Thu, 27 Mar 2025 13:47:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDlpUG025580; Thu, 27 Mar 2025 13:47:51 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:51 GMT Message-Id: <202503271347.52RDlpUG025580@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: c0dba117de23 - main - arm/mv: Remove ic.c, it's unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0dba117de236a68de5dc233ab4f61bed337a9cb Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c0dba117de236a68de5dc233ab4f61bed337a9cb commit c0dba117de236a68de5dc233ab4f61bed337a9cb Author: Andrew Turner AuthorDate: 2025-03-27 13:21:33 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:37 +0000 arm/mv: Remove ic.c, it's unused Reviewed by: cognet, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49496 --- sys/arm/mv/ic.c | 310 -------------------------------------------------------- 1 file changed, 310 deletions(-) diff --git a/sys/arm/mv/ic.c b/sys/arm/mv/ic.c deleted file mode 100644 index aaea59ae2ca6..000000000000 --- a/sys/arm/mv/ic.c +++ /dev/null @@ -1,310 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2006 Benno Rice. - * Copyright (C) 2007-2008 MARVELL INTERNATIONAL LTD. - * All rights reserved. - * - * Adapted and extended to Marvell SoCs by Semihalf. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * from: FreeBSD: //depot/projects/arm/src/sys/arm/xscale/pxa2x0/pxa2x0_icu.c, rev 1 - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -struct mv_ic_softc { - struct resource * ic_res[1]; - bus_space_tag_t ic_bst; - bus_space_handle_t ic_bsh; - int ic_high_regs; - int ic_error_regs; -}; - -static struct resource_spec mv_ic_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { -1, 0 } -}; - -static struct mv_ic_softc *mv_ic_sc = NULL; - -static int mv_ic_probe(device_t); -static int mv_ic_attach(device_t); - -uint32_t mv_ic_get_cause(void); -uint32_t mv_ic_get_mask(void); -void mv_ic_set_mask(uint32_t); -uint32_t mv_ic_get_cause_hi(void); -uint32_t mv_ic_get_mask_hi(void); -void mv_ic_set_mask_hi(uint32_t); -uint32_t mv_ic_get_cause_error(void); -uint32_t mv_ic_get_mask_error(void); -void mv_ic_set_mask_error(uint32_t); -static void arm_mask_irq_all(void); - -static int -mv_ic_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "mrvl,pic")) - return (ENXIO); - - device_set_desc(dev, "Marvell Integrated Interrupt Controller"); - return (0); -} - -static int -mv_ic_attach(device_t dev) -{ - struct mv_ic_softc *sc; - uint32_t dev_id, rev_id; - int error; - - sc = (struct mv_ic_softc *)device_get_softc(dev); - - if (mv_ic_sc != NULL) - return (ENXIO); - mv_ic_sc = sc; - - soc_id(&dev_id, &rev_id); - - sc->ic_high_regs = 0; - sc->ic_error_regs = 0; - - if (dev_id == MV_DEV_88F6281 || - dev_id == MV_DEV_88F6282 || - dev_id == MV_DEV_MV78100 || - dev_id == MV_DEV_MV78100_Z0) - sc->ic_high_regs = 1; - - if (dev_id == MV_DEV_MV78100 || dev_id == MV_DEV_MV78100_Z0) - sc->ic_error_regs = 1; - - error = bus_alloc_resources(dev, mv_ic_spec, sc->ic_res); - if (error) { - device_printf(dev, "could not allocate resources\n"); - return (ENXIO); - } - - sc->ic_bst = rman_get_bustag(sc->ic_res[0]); - sc->ic_bsh = rman_get_bushandle(sc->ic_res[0]); - - /* Mask all interrupts */ - arm_mask_irq_all(); - - return (0); -} - -static device_method_t mv_ic_methods[] = { - DEVMETHOD(device_probe, mv_ic_probe), - DEVMETHOD(device_attach, mv_ic_attach), - { 0, 0 } -}; - -static driver_t mv_ic_driver = { - "ic", - mv_ic_methods, - sizeof(struct mv_ic_softc), -}; - -DRIVER_MODULE(ic, simplebus, mv_ic_driver, 0, 0); - -int -arm_get_next_irq(int last) -{ - u_int filt, irq; - int next; - - filt = ~((last >= 0) ? (2 << last) - 1 : 0); - irq = mv_ic_get_cause() & mv_ic_get_mask(); - if (irq & filt) { - next = ffs(irq & filt) - 1; - goto out; - } - if (mv_ic_sc->ic_high_regs) { - filt = ~((last >= 32) ? (2 << (last - 32)) - 1 : 0); - irq = mv_ic_get_cause_hi() & mv_ic_get_mask_hi(); - if (irq & filt) { - next = ffs(irq & filt) + 31; - goto out; - } - } - if (mv_ic_sc->ic_error_regs) { - filt = ~((last >= 64) ? (2 << (last - 64)) - 1 : 0); - irq = mv_ic_get_cause_error() & mv_ic_get_mask_error(); - if (irq & filt) { - next = ffs(irq & filt) + 63; - goto out; - } - } - next = -1; - - out: - CTR3(KTR_INTR, "%s: last=%d, next=%d", __func__, last, next); - return (next); -} - -static void -arm_mask_irq_all(void) -{ - - mv_ic_set_mask(0); - - if (mv_ic_sc->ic_high_regs) - mv_ic_set_mask_hi(0); - - if (mv_ic_sc->ic_error_regs) - mv_ic_set_mask_error(0); -} - -void -arm_mask_irq(uintptr_t nb) -{ - uint32_t mr; - - if (nb < 32) { - mr = mv_ic_get_mask(); - mr &= ~(1 << nb); - mv_ic_set_mask(mr); - - } else if ((nb < 64) && mv_ic_sc->ic_high_regs) { - mr = mv_ic_get_mask_hi(); - mr &= ~(1 << (nb - 32)); - mv_ic_set_mask_hi(mr); - - } else if ((nb < 96) && mv_ic_sc->ic_error_regs) { - mr = mv_ic_get_mask_error(); - mr &= ~(1 << (nb - 64)); - mv_ic_set_mask_error(mr); - } -} - -void -arm_unmask_irq(uintptr_t nb) -{ - uint32_t mr; - - if (nb < 32) { - mr = mv_ic_get_mask(); - mr |= (1 << nb); - mv_ic_set_mask(mr); - - } else if ((nb < 64) && mv_ic_sc->ic_high_regs) { - mr = mv_ic_get_mask_hi(); - mr |= (1 << (nb - 32)); - mv_ic_set_mask_hi(mr); - - } else if ((nb < 96) && mv_ic_sc->ic_error_regs) { - mr = mv_ic_get_mask_error(); - mr |= (1 << (nb - 64)); - mv_ic_set_mask_error(mr); - } -} - -void -mv_ic_set_mask(uint32_t val) -{ - - bus_space_write_4(mv_ic_sc->ic_bst, mv_ic_sc->ic_bsh, - IRQ_MASK, val); -} - -uint32_t -mv_ic_get_mask(void) -{ - - return (bus_space_read_4(mv_ic_sc->ic_bst, - mv_ic_sc->ic_bsh, IRQ_MASK)); -} - -uint32_t -mv_ic_get_cause(void) -{ - - return (bus_space_read_4(mv_ic_sc->ic_bst, - mv_ic_sc->ic_bsh, IRQ_CAUSE)); -} - -void -mv_ic_set_mask_hi(uint32_t val) -{ - - bus_space_write_4(mv_ic_sc->ic_bst, mv_ic_sc->ic_bsh, - IRQ_MASK_HI, val); -} - -uint32_t -mv_ic_get_mask_hi(void) -{ - - return (bus_space_read_4(mv_ic_sc->ic_bst, - mv_ic_sc->ic_bsh, IRQ_MASK_HI)); -} - -uint32_t -mv_ic_get_cause_hi(void) -{ - - return (bus_space_read_4(mv_ic_sc->ic_bst, - mv_ic_sc->ic_bsh, IRQ_CAUSE_HI)); -} - -void -mv_ic_set_mask_error(uint32_t val) -{ - - bus_space_write_4(mv_ic_sc->ic_bst, mv_ic_sc->ic_bsh, - IRQ_MASK_ERROR, val); -} - -uint32_t -mv_ic_get_mask_error(void) -{ - - return (bus_space_read_4(mv_ic_sc->ic_bst, - mv_ic_sc->ic_bsh, IRQ_MASK_ERROR)); -} - -uint32_t -mv_ic_get_cause_error(void) -{ - - return (bus_space_read_4(mv_ic_sc->ic_bst, - mv_ic_sc->ic_bsh, IRQ_CAUSE_ERROR)); -} From nobody Thu Mar 27 13:47:52 2025 X-Original-To: dev-commits-src-all@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 4ZNlN84bwzz5rPKZ; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlN82921z3M6V; Thu, 27 Mar 2025 13:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6lRGHyA1bznOaRKdAOVFWbr0Q9ztYMokKxWXe04JPA=; b=sDQW8+LjJL2o2+vEFuEotwJNZkb2i2g1W5xqdJ7Y8aSoJJ8mUOAEtQi2jeEcg0grZH1MhQ 3GP52ESh8LDufgeZjqBtoto3kQMw4gtr4Tbc6FyCCY427qGr458dwFT/9sGYjYPWr9WWhO YQnRZsoOMWYJO3lwPizaWactas9V7w3GIy8D3qu8H15PqvAEuwgIKxG8jiOEFUCExsuzue ZGvzOx7jXuzCbQJcZ9ziMVFZlgzsIMjHrgpE0z2zY/5lLwYMK5bmYnqlPdt3w9pnsTfQKV br3jT/ddLK7tRuTmlzEmxdaQ8DX0fwiURcYeSxO0WYBKHfG06nRuejd4C3SQXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083272; a=rsa-sha256; cv=none; b=OWFX4g98pTDQWdc1Hhw8fyenedO3bJ3q+x2tevy+9STdvksMft+q/7S99TF/dayC5xMKOC h+2kURmOBNNEv510J91RjWN0XrXxiROLCEPagjJhC2gty4FUZlIj2HLqM1r1F6hpNoVWgf lHrlAES2TRp7EMjWwqQfnBn8DNTR5nBvYsTlpB49q/nsa60zDCxYIsKe0vwoylXWVy78Eu JYMAxJV7e/MQ+osnMmioZxDEv1UzviNOSQdiUuTBG2LsyCTZ0+tHhnUzZUFuk1Sj5tmqZd DrLROY+2yBj2DrKoxYNhJ+xYWu9En4WowcmOU6vusvrFniLkSgUvTKOfn6bcEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6lRGHyA1bznOaRKdAOVFWbr0Q9ztYMokKxWXe04JPA=; b=ez4FdR+VTEFlp8UKos9gQP/5ALW7LpAupDQmTpdTmX1S3ixWN4+i2V0LIFHGGG6SkCM94A 7cCaUJv9j1acLFDjGi/7iNmJQa43mZT/gOFlB9mHkiCE0rdtkr8WzlUhV7+C9rZ6l2Yjfu BA6BBadENSzom0vsD7IzU/nuFW0mEKimMCYmK8OzaZlnMkOZWIV5j4nfq5eYJfofPlftkI 1ccGx9pnmV0h0vLtrFxOHPzq4bxFJSi9EGNgz5m77p8M7e8iIwWIMLkXUFZZ20Rz5UKs6V pR4b43ZjvEOJIPRrSs20KGGCPaLcxi8+1u+658LEzC3BGNaxcAlEJ8FueSfAdw== 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 4ZNlN81h2yz108n; Thu, 27 Mar 2025 13:47: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 52RDlqKJ025618; Thu, 27 Mar 2025 13:47:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDlqca025615; Thu, 27 Mar 2025 13:47:52 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:52 GMT Message-Id: <202503271347.52RDlqca025615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d25a708ba773 - main - arm/mv: Remove pre-armv7 support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d25a708ba7737cd31dfc109f82efed4713290e49 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d25a708ba7737cd31dfc109f82efed4713290e49 commit d25a708ba7737cd31dfc109f82efed4713290e49 Author: Andrew Turner AuthorDate: 2025-03-27 13:21:42 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:37 +0000 arm/mv: Remove pre-armv7 support Armv4, Armv5, and Armv6 support has been removed. Remove the Marvell SoCs that used these cores. Reviewed by: cognet, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49497 --- sys/arm/mv/mv_common.c | 822 +------------------------------------------------ sys/arm/mv/mvreg.h | 99 ------ sys/arm/mv/mvvar.h | 4 - sys/arm/mv/mvwin.h | 27 -- sys/arm/mv/timer.c | 57 ---- sys/conf/options.arm | 3 - sys/dev/cesa/cesa.c | 20 -- sys/dev/mge/if_mge.c | 37 +-- sys/dev/mvs/mvs_soc.c | 5 - 9 files changed, 20 insertions(+), 1054 deletions(-) diff --git a/sys/arm/mv/mv_common.c b/sys/arm/mv/mv_common.c index 5bfe4c08d762..a1302859644a 100644 --- a/sys/arm/mv/mv_common.c +++ b/sys/arm/mv/mv_common.c @@ -76,14 +76,11 @@ struct soc_node_spec; static enum soc_family soc_family; -static int mv_win_cesa_attr_armv5(int eng_sel); static int mv_win_cesa_attr_armada38x(int eng_sel); static int mv_win_cesa_attr_armadaxp(int eng_sel); -uint32_t read_cpu_ctrl_armv5(uint32_t reg); uint32_t read_cpu_ctrl_armv7(uint32_t reg); -void write_cpu_ctrl_armv5(uint32_t reg, uint32_t val); void write_cpu_ctrl_armv7(uint32_t reg, uint32_t val); static int win_eth_can_remap(int i); @@ -127,41 +124,29 @@ static void decode_win_sdhci_dump(u_long); static void decode_win_pcie_dump(u_long); static uint32_t win_cpu_cr_read(int); -static uint32_t win_cpu_armv5_cr_read(int); static uint32_t win_cpu_armv7_cr_read(int); static uint32_t win_cpu_br_read(int); -static uint32_t win_cpu_armv5_br_read(int); static uint32_t win_cpu_armv7_br_read(int); static uint32_t win_cpu_remap_l_read(int); -static uint32_t win_cpu_armv5_remap_l_read(int); static uint32_t win_cpu_armv7_remap_l_read(int); static uint32_t win_cpu_remap_h_read(int); -static uint32_t win_cpu_armv5_remap_h_read(int); static uint32_t win_cpu_armv7_remap_h_read(int); static void win_cpu_cr_write(int, uint32_t); -static void win_cpu_armv5_cr_write(int, uint32_t); static void win_cpu_armv7_cr_write(int, uint32_t); static void win_cpu_br_write(int, uint32_t); -static void win_cpu_armv5_br_write(int, uint32_t); static void win_cpu_armv7_br_write(int, uint32_t); static void win_cpu_remap_l_write(int, uint32_t); -static void win_cpu_armv5_remap_l_write(int, uint32_t); static void win_cpu_armv7_remap_l_write(int, uint32_t); static void win_cpu_remap_h_write(int, uint32_t); -static void win_cpu_armv5_remap_h_write(int, uint32_t); static void win_cpu_armv7_remap_h_write(int, uint32_t); static uint32_t ddr_br_read(int); static uint32_t ddr_sz_read(int); -static uint32_t ddr_armv5_br_read(int); -static uint32_t ddr_armv5_sz_read(int); static uint32_t ddr_armv7_br_read(int); static uint32_t ddr_armv7_sz_read(int); static void ddr_br_write(int, uint32_t); static void ddr_sz_write(int, uint32_t); -static void ddr_armv5_br_write(int, uint32_t); -static void ddr_armv5_sz_write(int, uint32_t); static void ddr_armv7_br_write(int, uint32_t); static void ddr_armv7_sz_write(int, uint32_t); @@ -190,16 +175,6 @@ typedef void (*decode_win_setup_t)(u_long); typedef void (*dump_win_t)(u_long); typedef int (*valid_t)(void); -/* - * The power status of device feature is only supported on - * Kirkwood and Discovery SoCs. - */ -#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define SOC_MV_POWER_STAT_SUPPORTED 1 -#else -#define SOC_MV_POWER_STAT_SUPPORTED 0 -#endif - struct soc_node_spec { const char *compat; decode_win_setup_t decode_handler; @@ -306,27 +281,6 @@ static struct decode_win_spec decode_win_specs[] = &get_tclk_armadaxp, &get_cpu_freq_armadaxp, }, - { - &read_cpu_ctrl_armv5, - &write_cpu_ctrl_armv5, - &win_cpu_armv5_cr_read, - &win_cpu_armv5_br_read, - &win_cpu_armv5_remap_l_read, - &win_cpu_armv5_remap_h_read, - &win_cpu_armv5_cr_write, - &win_cpu_armv5_br_write, - &win_cpu_armv5_remap_l_write, - &win_cpu_armv5_remap_h_write, - MV_WIN_CPU_MAX, - &mv_win_cesa_attr_armv5, - MV_WIN_CESA_TARGET, - &ddr_armv5_br_read, - &ddr_armv5_sz_read, - &ddr_armv5_br_write, - &ddr_armv5_sz_write, - NULL, - NULL, - }, }; struct fdt_pm_mask_entry { @@ -345,16 +299,6 @@ static struct fdt_pm_mask_entry fdt_pm_mask_table[] = { { NULL, 0 } }; -static __inline int -pm_is_disabled(uint32_t mask) -{ -#if SOC_MV_POWER_STAT_SUPPORTED - return (soc_power_ctrl_get(mask) == mask ? 0 : 1); -#else - return (0); -#endif -} - /* * Disable device using power management register. * 1 - Device Power On @@ -389,12 +333,6 @@ pm_is_disabled(uint32_t mask) * machines. */ -static int mv_win_cesa_attr_armv5(int eng_sel) -{ - - return MV_WIN_CESA_ATTR(eng_sel); -} - static int mv_win_cesa_attr_armada38x(int eng_sel) { @@ -426,21 +364,6 @@ mv_check_soc_family(void) soc_decode_win_spec = &decode_win_specs[MV_SOC_ARMADA_38X]; soc_family = MV_SOC_ARMADA_38X; break; - case MV_DEV_88F5181: - case MV_DEV_88F5182: - case MV_DEV_88F5281: - case MV_DEV_88F6281: - case MV_DEV_88RC8180: - case MV_DEV_88RC9480: - case MV_DEV_88RC9580: - case MV_DEV_88F6781: - case MV_DEV_88F6282: - case MV_DEV_MV78100_Z0: - case MV_DEV_MV78100: - case MV_DEV_MV78160: - soc_decode_win_spec = &decode_win_specs[MV_SOC_ARMV5]; - soc_family = MV_SOC_ARMV5; - break; default: soc_family = MV_SOC_UNSUPPORTED; return (MV_SOC_UNSUPPORTED); @@ -457,15 +380,10 @@ pm_disable_device(int mask) #ifdef DIAGNOSTIC uint32_t reg; - reg = soc_power_ctrl_get(CPU_PM_CTRL_ALL); - printf("Power Management Register: 0%x\n", reg); - + reg = CPU_PM_CTRL_ALL; reg &= ~mask; soc_power_ctrl_set(reg); printf("Device %x is disabled\n", mask); - - reg = soc_power_ctrl_get(CPU_PM_CTRL_ALL); - printf("Power Management Register: 0%x\n", reg); #endif } @@ -503,16 +421,6 @@ mv_fdt_pm(phandle_t node) compat = ofw_bus_node_is_compatible(node, fdt_pm_mask_table[i].compat); -#if defined(SOC_MV_KIRKWOOD) - if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) { - dev_mask |= (1 << i); - ena = 0; - break; - } else if (compat) { - dev_mask |= (1 << i); - break; - } -#else if (compat && (~cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) { dev_mask |= (1 << i); ena = 0; @@ -521,7 +429,6 @@ mv_fdt_pm(phandle_t node) dev_mask |= (1 << i); break; } -#endif } return (ena); @@ -536,13 +443,6 @@ read_cpu_ctrl(uint32_t reg) return (-1); } -uint32_t -read_cpu_ctrl_armv5(uint32_t reg) -{ - - return (bus_space_read_4(fdtbus_bs_tag, MV_CPU_CONTROL_BASE, reg)); -} - uint32_t read_cpu_ctrl_armv7(uint32_t reg) { @@ -558,13 +458,6 @@ write_cpu_ctrl(uint32_t reg, uint32_t val) soc_decode_win_spec->write_cpu_ctrl(reg, val); } -void -write_cpu_ctrl_armv5(uint32_t reg, uint32_t val) -{ - - bus_space_write_4(fdtbus_bs_tag, MV_CPU_CONTROL_BASE, reg, val); -} - void write_cpu_ctrl_armv7(uint32_t reg, uint32_t val) { @@ -600,64 +493,16 @@ write_cpu_misc(uint32_t reg, uint32_t val) bus_space_write_4(fdtbus_bs_tag, MV_MISC_BASE, reg, val); } -uint32_t -cpu_extra_feat(void) -{ - uint32_t dev, rev; - uint32_t ef = 0; - - soc_id(&dev, &rev); - - switch (dev) { - case MV_DEV_88F6281: - case MV_DEV_88F6282: - case MV_DEV_88RC8180: - case MV_DEV_MV78100_Z0: - case MV_DEV_MV78100: - __asm __volatile("mrc p15, 1, %0, c15, c1, 0" : "=r" (ef)); - break; - case MV_DEV_88F5182: - case MV_DEV_88F5281: - __asm __volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (ef)); - break; - default: - if (bootverbose) - printf("This ARM Core does not support any extra features\n"); - } - - return (ef); -} - -/* - * Get the power status of device. This feature is only supported on - * Kirkwood and Discovery SoCs. - */ -uint32_t -soc_power_ctrl_get(uint32_t mask) -{ - -#if SOC_MV_POWER_STAT_SUPPORTED - if (mask != CPU_PM_CTRL_NONE) - mask &= read_cpu_ctrl(CPU_PM_CTRL); - - return (mask); -#else - return (mask); -#endif -} - /* - * Set the power status of device. This feature is only supported on + * Set the power status of device. This feature was only supported on * Kirkwood and Discovery SoCs. */ void soc_power_ctrl_set(uint32_t mask) { -#if !defined(SOC_MV_ORION) if (mask != CPU_PM_CTRL_NONE) write_cpu_ctrl(CPU_PM_CTRL, mask); -#endif } void @@ -686,7 +531,7 @@ soc_id(uint32_t *dev, uint32_t *rev) static void soc_identify(uint32_t d, uint32_t r) { - uint32_t size, mode, freq; + uint32_t mode, freq; const char *dev; const char *rev; @@ -696,55 +541,6 @@ soc_identify(uint32_t d, uint32_t r) rev = ""; switch (d) { - case MV_DEV_88F5181: - dev = "Marvell 88F5181"; - if (r == 3) - rev = "B1"; - break; - case MV_DEV_88F5182: - dev = "Marvell 88F5182"; - if (r == 2) - rev = "A2"; - break; - case MV_DEV_88F5281: - dev = "Marvell 88F5281"; - if (r == 4) - rev = "D0"; - else if (r == 5) - rev = "D1"; - else if (r == 6) - rev = "D2"; - break; - case MV_DEV_88F6281: - dev = "Marvell 88F6281"; - if (r == 0) - rev = "Z0"; - else if (r == 2) - rev = "A0"; - else if (r == 3) - rev = "A1"; - break; - case MV_DEV_88RC8180: - dev = "Marvell 88RC8180"; - break; - case MV_DEV_88RC9480: - dev = "Marvell 88RC9480"; - break; - case MV_DEV_88RC9580: - dev = "Marvell 88RC9580"; - break; - case MV_DEV_88F6781: - dev = "Marvell 88F6781"; - if (r == 2) - rev = "Y0"; - break; - case MV_DEV_88F6282: - dev = "Marvell 88F6282"; - if (r == 0) - rev = "A0"; - else if (r == 1) - rev = "A1"; - break; case MV_DEV_88F6828: dev = "Marvell 88F6828"; break; @@ -754,15 +550,6 @@ soc_identify(uint32_t d, uint32_t r) case MV_DEV_88F6810: dev = "Marvell 88F6810"; break; - case MV_DEV_MV78100_Z0: - dev = "Marvell MV78100 Z0"; - break; - case MV_DEV_MV78100: - dev = "Marvell MV78100"; - break; - case MV_DEV_MV78160: - dev = "Marvell MV78160"; - break; case MV_DEV_MV78260: dev = "Marvell MV78260"; break; @@ -787,25 +574,6 @@ soc_identify(uint32_t d, uint32_t r) printf(" Instruction cache prefetch %s, data cache prefetch %s\n", (mode & CPU_CONFIG_IC_PREF) ? "enabled" : "disabled", (mode & CPU_CONFIG_DC_PREF) ? "enabled" : "disabled"); - - switch (d) { - case MV_DEV_88F6281: - case MV_DEV_88F6282: - mode = read_cpu_ctrl(CPU_L2_CONFIG) & CPU_L2_CONFIG_MODE; - printf(" 256KB 4-way set-associative %s unified L2 cache\n", - mode ? "write-through" : "write-back"); - break; - case MV_DEV_MV78100: - mode = read_cpu_ctrl(CPU_CONTROL); - size = mode & CPU_CONTROL_L2_SIZE; - mode = mode & CPU_CONTROL_L2_MODE; - printf(" %s set-associative %s unified L2 cache\n", - size ? "256KB 4-way" : "512KB 8-way", - mode ? "write-through" : "write-back"); - break; - default: - break; - } } #ifdef KDB @@ -857,14 +625,6 @@ soc_decode_win(void) /************************************************************************** * Decode windows registers accessors **************************************************************************/ -WIN_REG_IDX_RD(win_cpu_armv5, cr, MV_WIN_CPU_CTRL_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_RD(win_cpu_armv5, br, MV_WIN_CPU_BASE_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_RD(win_cpu_armv5, remap_l, MV_WIN_CPU_REMAP_LO_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_RD(win_cpu_armv5, remap_h, MV_WIN_CPU_REMAP_HI_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_WR(win_cpu_armv5, cr, MV_WIN_CPU_CTRL_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_WR(win_cpu_armv5, br, MV_WIN_CPU_BASE_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_WR(win_cpu_armv5, remap_l, MV_WIN_CPU_REMAP_LO_ARMV5, MV_MBUS_BRIDGE_BASE) -WIN_REG_IDX_WR(win_cpu_armv5, remap_h, MV_WIN_CPU_REMAP_HI_ARMV5, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_RD(win_cpu_armv7, cr, MV_WIN_CPU_CTRL_ARMV7, MV_MBUS_BRIDGE_BASE) WIN_REG_IDX_RD(win_cpu_armv7, br, MV_WIN_CPU_BASE_ARMV7, MV_MBUS_BRIDGE_BASE) @@ -1000,11 +760,6 @@ WIN_REG_BASE_IDX_WR(win_sdhci, cr, MV_WIN_SDHCI_CTRL); WIN_REG_BASE_IDX_WR(win_sdhci, br, MV_WIN_SDHCI_BASE); #ifndef SOC_MV_DOVE -WIN_REG_IDX_RD(ddr_armv5, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE) -WIN_REG_IDX_RD(ddr_armv5, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE) -WIN_REG_IDX_WR(ddr_armv5, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE) -WIN_REG_IDX_WR(ddr_armv5, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE) - WIN_REG_IDX_RD(ddr_armv7, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE_ARMV7) WIN_REG_IDX_RD(ddr_armv7, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE_ARMV7) WIN_REG_IDX_WR(ddr_armv7, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE_ARMV7) @@ -1116,17 +871,9 @@ win_cpu_can_remap(int i) soc_id(&dev, &rev); /* Depending on the SoC certain windows have remap capability */ - if ((dev == MV_DEV_88F5182 && i < 2) || - (dev == MV_DEV_88F5281 && i < 4) || - (dev == MV_DEV_88F6281 && i < 4) || - (dev == MV_DEV_88F6282 && i < 4) || - (dev == MV_DEV_88F6828 && i < 20) || + if ((dev == MV_DEV_88F6828 && i < 20) || (dev == MV_DEV_88F6820 && i < 20) || - (dev == MV_DEV_88F6810 && i < 20) || - (dev == MV_DEV_88RC8180 && i < 2) || - (dev == MV_DEV_88F6781 && i < 4) || - (dev == MV_DEV_MV78100_Z0 && i < 8) || - ((dev & MV_DEV_FAMILY_MASK) == MV_DEV_DISCOVERY && i < 8)) + (dev == MV_DEV_88F6810 && i < 20)) return (1); return (0); @@ -1338,13 +1085,7 @@ ddr_size(int i) uint32_t ddr_attr(int i) { - uint32_t dev, rev, attr; - - soc_id(&dev, &rev); - if (dev == MV_DEV_88RC8180) - return ((ddr_sz_read(i) & 0xf0) >> 4); - if (dev == MV_DEV_88F6781) - return (0); + uint32_t attr; attr = (i == 0 ? 0xe : (i == 1 ? 0xd : @@ -1356,27 +1097,6 @@ ddr_attr(int i) return (attr); } -uint32_t -ddr_target(int i) -{ - uint32_t dev, rev; - - soc_id(&dev, &rev); - if (dev == MV_DEV_88RC8180) { - i = (ddr_sz_read(i) & 0xf0) >> 4; - return (i == 0xe ? 0xc : - (i == 0xd ? 0xd : - (i == 0xb ? 0xe : - (i == 0x7 ? 0xf : 0xc)))); - } - - /* - * On SOCs other than 88RC8180 Mbus unit ID for - * DDR SDRAM controller is always 0x0. - */ - return (0); -} - /************************************************************************** * CESA windows routines **************************************************************************/ @@ -1432,7 +1152,6 @@ decode_win_cesa_setup(u_long base) cr = (((size - 1) & 0xffff0000) | (ddr_attr(i) << IO_WIN_ATTR_SHIFT) | - (ddr_target(i) << IO_WIN_TGT_SHIFT) | IO_WIN_ENA_MASK); /* Set the first free CESA window */ @@ -1477,9 +1196,6 @@ decode_win_usb_dump(u_long base) { int i; - if (pm_is_disabled(CPU_PM_CTRL_USB(usb_port - 1))) - return; - for (i = 0; i < MV_WIN_USB_MAX; i++) printf("USB window#%d: c 0x%08x, b 0x%08x\n", i, win_usb_cr_read(base, i), win_usb_br_read(base, i)); @@ -1494,9 +1210,6 @@ decode_win_usb_setup(u_long base) uint32_t br, cr; int i, j; - if (pm_is_disabled(CPU_PM_CTRL_USB(usb_port))) - return; - usb_port++; for (i = 0; i < MV_WIN_USB_MAX; i++) { @@ -1513,8 +1226,7 @@ decode_win_usb_setup(u_long base) * burst limit field in the ctrl reg */ cr = (((ddr_size(i) - 1) & 0xffff0000) | - (ddr_attr(i) << 8) | - (ddr_target(i) << 4) | 1); + (ddr_attr(i) << 8) | 1); /* Set the first free USB window */ for (j = 0; j < MV_WIN_USB_MAX; j++) { @@ -1570,7 +1282,6 @@ decode_win_usb3_setup(u_long base) cr = (((ddr_size(i) - 1) & (IO_WIN_SIZE_MASK << IO_WIN_SIZE_SHIFT)) | (ddr_attr(i) << IO_WIN_ATTR_SHIFT) | - (ddr_target(i) << IO_WIN_TGT_SHIFT) | IO_WIN_ENA_MASK); /* Set the first free USB3.0 window */ @@ -1639,9 +1350,6 @@ decode_win_eth_dump(u_long base) { int i; - if (pm_is_disabled(CPU_PM_CTRL_GE(eth_port - 1))) - return; - for (i = 0; i < MV_WIN_ETH_MAX; i++) { printf("ETH window#%d: b 0x%08x, s 0x%08x", i, win_eth_br_read(base, i), @@ -1658,17 +1366,12 @@ decode_win_eth_dump(u_long base) win_eth_epap_read(base)); } -#define MV_WIN_ETH_DDR_TRGT(n) ddr_target(n) - static void decode_win_eth_setup(u_long base) { uint32_t br, sz; int i, j; - if (pm_is_disabled(CPU_PM_CTRL_GE(eth_port))) - return; - eth_port++; /* Disable, clear and revoke protection for all ETH windows */ @@ -1684,7 +1387,7 @@ decode_win_eth_setup(u_long base) /* Only access to active DRAM banks is required */ for (i = 0; i < MV_WIN_DDR_MAX; i++) if (ddr_is_active(i)) { - br = ddr_base(i) | (ddr_attr(i) << 8) | MV_WIN_ETH_DDR_TRGT(i); + br = ddr_base(i) | (ddr_attr(i) << 8); sz = ((ddr_size(i) - 1) & 0xffff0000); /* Set the first free ETH window */ @@ -1782,7 +1485,7 @@ decode_win_pcie_setup(u_long base) /* Map DDR to BAR 1 */ cr = (ddr_size(i) - 1) & 0xffff0000; size += ddr_size(i) & 0xffff0000; - cr |= (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1; + cr |= (ddr_attr(i) << 8) | 1; br = ddr_base(i); if (br < ddrbase) ddrbase = br; @@ -1822,228 +1525,6 @@ decode_win_pcie_valid(void) /************************************************************************** * IDMA windows routines **************************************************************************/ -#if defined(SOC_MV_ORION) || defined(SOC_MV_DISCOVERY) -static int -idma_bare_read(u_long base, int i) -{ - uint32_t v; - - v = win_idma_bare_read(base); - v &= (1 << i); - - return (v >> i); -} - -static void -idma_bare_write(u_long base, int i, int val) -{ - uint32_t v; - - v = win_idma_bare_read(base); - v &= ~(1 << i); - v |= (val << i); - win_idma_bare_write(base, v); -} - -/* - * Sets channel protection 'val' for window 'w' on channel 'c' - */ -static void -idma_cap_write(u_long base, int c, int w, int val) -{ - uint32_t v; - - v = win_idma_cap_read(base, c); - v &= ~(0x3 << (w * 2)); - v |= (val << (w * 2)); - win_idma_cap_write(base, c, v); -} - -/* - * Set protection 'val' on all channels for window 'w' - */ -static void -idma_set_prot(u_long base, int w, int val) -{ - int c; - - for (c = 0; c < MV_IDMA_CHAN_MAX; c++) - idma_cap_write(base, c, w, val); -} - -static int -win_idma_can_remap(int i) -{ - - /* IDMA decode windows 0-3 have remap capability */ - if (i < 4) - return (1); - - return (0); -} - -void -decode_win_idma_setup(u_long base) -{ - uint32_t br, sz; - int i, j; - - if (pm_is_disabled(CPU_PM_CTRL_IDMA)) - return; - /* - * Disable and clear all IDMA windows, revoke protection for all channels - */ - for (i = 0; i < MV_WIN_IDMA_MAX; i++) { - idma_bare_write(base, i, 1); - win_idma_br_write(base, i, 0); - win_idma_sz_write(base, i, 0); - if (win_idma_can_remap(i) == 1) - win_idma_har_write(base, i, 0); - } - for (i = 0; i < MV_IDMA_CHAN_MAX; i++) - win_idma_cap_write(base, i, 0); - - /* - * Set up access to all active DRAM banks - */ - for (i = 0; i < MV_WIN_DDR_MAX; i++) - if (ddr_is_active(i)) { - br = ddr_base(i) | (ddr_attr(i) << 8) | ddr_target(i); - sz = ((ddr_size(i) - 1) & 0xffff0000); - - /* Place DDR entries in non-remapped windows */ - for (j = 0; j < MV_WIN_IDMA_MAX; j++) - if (win_idma_can_remap(j) != 1 && - idma_bare_read(base, j) == 1) { - /* Configure window */ - win_idma_br_write(base, j, br); - win_idma_sz_write(base, j, sz); - - /* Set protection RW on all channels */ - idma_set_prot(base, j, 0x3); - - /* Enable window */ - idma_bare_write(base, j, 0); - break; - } - } - - /* - * Remaining targets -- from statically defined table - */ - for (i = 0; i < idma_wins_no; i++) - if (idma_wins[i].target > 0) { - br = (idma_wins[i].base & 0xffff0000) | - (idma_wins[i].attr << 8) | idma_wins[i].target; - sz = ((idma_wins[i].size - 1) & 0xffff0000); - - /* Set the first free IDMA window */ - for (j = 0; j < MV_WIN_IDMA_MAX; j++) { - if (idma_bare_read(base, j) == 0) - continue; - - /* Configure window */ - win_idma_br_write(base, j, br); - win_idma_sz_write(base, j, sz); - if (win_idma_can_remap(j) && - idma_wins[j].remap >= 0) - win_idma_har_write(base, j, - idma_wins[j].remap); - - /* Set protection RW on all channels */ - idma_set_prot(base, j, 0x3); - - /* Enable window */ - idma_bare_write(base, j, 0); - break; - } - } -} - -int -decode_win_idma_valid(void) -{ - const struct decode_win *wintab; - int c, i, j, rv; - uint32_t b, e, s; - - if (idma_wins_no > MV_WIN_IDMA_MAX) { - printf("IDMA windows: too many entries: %d\n", idma_wins_no); - return (0); - } - for (i = 0, c = 0; i < MV_WIN_DDR_MAX; i++) - if (ddr_is_active(i)) - c++; - - if (idma_wins_no > (MV_WIN_IDMA_MAX - c)) { - printf("IDMA windows: too many entries: %d, available: %d\n", - idma_wins_no, MV_WIN_IDMA_MAX - c); - return (0); - } - - wintab = idma_wins; - rv = 1; - for (i = 0; i < idma_wins_no; i++, wintab++) { - if (wintab->target == 0) { - printf("IDMA window#%d: DDR target window is not " - "supposed to be reprogrammed!\n", i); - rv = 0; - } - - if (wintab->remap >= 0 && win_cpu_can_remap(i) != 1) { - printf("IDMA window#%d: not capable of remapping, but " - "val 0x%08x defined\n", i, wintab->remap); - rv = 0; - } - - s = wintab->size; - b = wintab->base; - e = b + s - 1; - if (s > (0xFFFFFFFF - b + 1)) { - /* XXX this boundary check should account for 64bit and - * remapping.. */ - printf("IDMA window#%d: no space for size 0x%08x at " - "0x%08x\n", i, s, b); - rv = 0; - continue; - } - - j = decode_win_overlap(i, idma_wins_no, &idma_wins[0]); - if (j >= 0) { - printf("IDMA window#%d: (0x%08x - 0x%08x) overlaps " - "with #%d (0x%08x - 0x%08x)\n", i, b, e, j, - idma_wins[j].base, - idma_wins[j].base + idma_wins[j].size - 1); - rv = 0; - } - } - - return (rv); -} - -void -decode_win_idma_dump(u_long base) -{ - int i; - - if (pm_is_disabled(CPU_PM_CTRL_IDMA)) - return; - - for (i = 0; i < MV_WIN_IDMA_MAX; i++) { - printf("IDMA window#%d: b 0x%08x, s 0x%08x", i, - win_idma_br_read(base, i), win_idma_sz_read(base, i)); - - if (win_idma_can_remap(i)) - printf(", ha 0x%08x", win_idma_har_read(base, i)); - - printf("\n"); - } - for (i = 0; i < MV_IDMA_CHAN_MAX; i++) - printf("IDMA channel#%d: ap 0x%08x\n", i, - win_idma_cap_read(base, i)); - printf("IDMA windows: bare 0x%08x\n", win_idma_bare_read(base)); -} -#else /* Provide dummy functions to satisfy the build for SoCs not equipped with IDMA */ int @@ -2062,285 +1543,10 @@ void decode_win_idma_dump(u_long base) { } -#endif /************************************************************************** * XOR windows routines **************************************************************************/ -#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -static int -xor_ctrl_read(u_long base, int i, int c, int e) -{ - uint32_t v; - v = win_xor_ctrl_read(base, c, e); - v &= (1 << i); - - return (v >> i); -} - -static void -xor_ctrl_write(u_long base, int i, int c, int e, int val) -{ - uint32_t v; - - v = win_xor_ctrl_read(base, c, e); - v &= ~(1 << i); - v |= (val << i); - win_xor_ctrl_write(base, c, e, v); -} - -/* - * Set channel protection 'val' for window 'w' on channel 'c' - */ -static void -xor_chan_write(u_long base, int c, int e, int w, int val) -{ - uint32_t v; - - v = win_xor_ctrl_read(base, c, e); - v &= ~(0x3 << (w * 2 + 16)); - v |= (val << (w * 2 + 16)); - win_xor_ctrl_write(base, c, e, v); -} - -/* - * Set protection 'val' on all channels for window 'w' on engine 'e' - */ -static void -xor_set_prot(u_long base, int w, int e, int val) -{ - int c; - - for (c = 0; c < MV_XOR_CHAN_MAX; c++) - xor_chan_write(base, c, e, w, val); -} - -static int -win_xor_can_remap(int i) -{ - - /* XOR decode windows 0-3 have remap capability */ - if (i < 4) - return (1); - - return (0); -} - -static int -xor_max_eng(void) -{ - uint32_t dev, rev; - - soc_id(&dev, &rev); - switch (dev) { - case MV_DEV_88F6281: - case MV_DEV_88F6282: - case MV_DEV_MV78130: - case MV_DEV_MV78160: - case MV_DEV_MV78230: - case MV_DEV_MV78260: - case MV_DEV_MV78460: - return (2); - case MV_DEV_MV78100: - case MV_DEV_MV78100_Z0: - return (1); - default: - return (0); - } -} - -static void -xor_active_dram(u_long base, int c, int e, int *window) -{ - uint32_t br, sz; - int i, m, w; - - /* - * Set up access to all active DRAM banks - */ - m = xor_max_eng(); - for (i = 0; i < m; i++) - if (ddr_is_active(i)) { - br = ddr_base(i) | (ddr_attr(i) << 8) | - ddr_target(i); - sz = ((ddr_size(i) - 1) & 0xffff0000); - - /* Place DDR entries in non-remapped windows */ - for (w = 0; w < MV_WIN_XOR_MAX; w++) - if (win_xor_can_remap(w) != 1 && - (xor_ctrl_read(base, w, c, e) == 0) && - w > *window) { - /* Configure window */ - win_xor_br_write(base, w, e, br); - win_xor_sz_write(base, w, e, sz); - - /* Set protection RW on all channels */ - xor_set_prot(base, w, e, 0x3); - - /* Enable window */ - xor_ctrl_write(base, w, c, e, 1); - (*window)++; - break; - } - } -} - -void -decode_win_xor_setup(u_long base) -{ - uint32_t br, sz; - int i, j, z, e = 1, m, window; - - if (pm_is_disabled(CPU_PM_CTRL_XOR)) - return; - - /* - * Disable and clear all XOR windows, revoke protection for all - * channels - */ - m = xor_max_eng(); - for (j = 0; j < m; j++, e--) { - /* Number of non-remaped windows */ - window = MV_XOR_NON_REMAP - 1; - *** 659 LINES SKIPPED *** From nobody Thu Mar 27 13:47:53 2025 X-Original-To: dev-commits-src-all@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 4ZNlNB1vVwz5rPDp; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlN92wS7z3MNQ; Thu, 27 Mar 2025 13:47:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XE0v/Q3mrHDnSiDuC0EkdwQJQO6Sw85WD9HyZi0scnw=; b=QlvEpEZX9FllayWbzZf3/IukAJDbZbum7h7JXu2+FV4Oj8PeiJ1YxfgvUAE3ElL2ZLpzLh cocf/x6XAuhuUKZDYhFZy4TgnkynAqR71QnnhnWcamzRgqj2qCGhiUjhdaWtfHBRB2eFhN 4pM5bp6AkOOn4r1be2SrohdIdGZHCDW9DZ1UIZjf0d8ClNakRDdoq4VNGIBAdeJOJji3AV alHRmuG+/9Lw1psaeTTPtmFtXx81/Ke3gepQVMJQNYEbyXo2yj8ZSPJ2EWsW1jNT40Vegt g7eJGJk6fQEVJMIq1Eo0gHphWBP276eCB/qJnTh3nFQi3+zY6RU9oqMLLX/IZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083273; a=rsa-sha256; cv=none; b=lnM5i0HMuucAiJ0XVKYujU9IBMm9mDy4f0rsSeWFqmLf2dXD0UkkDiziCpp9EudjDDkD4L 2/ua4/HHJ5SBCbn0MBRly8tqC7SyvrJpKrN9Swaj7f2ZDGYNuHU2RV2WRXyOw0Xy5R/svH nPdLI3qWcIqIr9Abh48Sfjito/Wmae+b8lAzUBqhuhjxogArAaNh/q74jxAWBEAFf0uZ3P AzIp+p9b0U8Q0e1XdI9Oofwj33IYBlDoy9UrBopkhtjnjqyDI/PGntFdRzewLyoA8an0qx 7S431F8K54EiOI8TdAqksmSdwHPpE4A0HbwynWEhcZY5EbSoI4pmH9FYKbtlow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XE0v/Q3mrHDnSiDuC0EkdwQJQO6Sw85WD9HyZi0scnw=; b=c0V4wyIikGI0Q8JAMqjW4np/R/l1DtWCi4uFMtO+pcIY4PhB0Q+V3K/WNwNnYIkSDiuTxt iGJ5UIRcjPfUonYqTEmkiV7rjYLotUGt95batzpILnJiJ6Z+w0KoZM2e6ApymhVcqG5S34 P7ClBLiStlOJMqKCXLyHJLXjcldb44N7CbpX5Zt2TOdGdgZ+C4YWfCIEWC7L49lK+Cf/0g NM85Uizytd7PheQ/AjXDtSYT+Q+TmfrxsMBrtBR2GFxpk1xxQrChOBZ3ncgBVOJcsLZxFN UgtQk1YvA5YRiD1XcJT7MWQf/CWVshmi2UKP22KU8GEeqa2SB/KwKSE6SOYHsw== 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 4ZNlN92Tr0zytj; Thu, 27 Mar 2025 13:47: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 52RDlrU2025653; Thu, 27 Mar 2025 13:47:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDlrlO025650; Thu, 27 Mar 2025 13:47:53 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:53 GMT Message-Id: <202503271347.52RDlrlO025650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: c7142afec42c - main - arm: Remove FLASHADDR and PHYSADDR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7142afec42c4f0a3aa4da845f4c4e15b5e3f018 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c7142afec42c4f0a3aa4da845f4c4e15b5e3f018 commit c7142afec42c4f0a3aa4da845f4c4e15b5e3f018 Author: Andrew Turner AuthorDate: 2025-03-27 13:21:52 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:38 +0000 arm: Remove FLASHADDR and PHYSADDR They appear to have been used when executing directly from flash, however are now unused. Reviewed by: cognet, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49498 --- sys/arm/arm/pmap-v6.c | 2 -- sys/arm/arm/support.S | 11 ----------- sys/conf/options.arm | 2 -- 3 files changed, 15 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 6cc78b187a9a..bb2aced34c94 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1716,8 +1716,6 @@ pmap_init(void) pt2_entry_t *pte2p, pte2; u_int i, pte1_idx, pv_npg; - PDEBUG(1, printf("%s: phys_start = %#x\n", __func__, PHYSADDR)); - /* * Initialize the vm page array entries for kernel pmap's * L2 page table pages allocated in advance. diff --git a/sys/arm/arm/support.S b/sys/arm/arm/support.S index cbe3ff489076..cbfbb086b1ed 100644 --- a/sys/arm/arm/support.S +++ b/sys/arm/arm/support.S @@ -730,17 +730,6 @@ ENTRY(memcpy) pld [r1] cmp r2, #0x0c ble .Lmemcpy_short /* <= 12 bytes */ -#ifdef FLASHADDR -#if FLASHADDR > PHYSADDR - ldr r3, =FLASHADDR - cmp r3, pc - bls .Lnormal -#else - ldr r3, =FLASHADDR - cmp r3, pc - bhi .Lnormal -#endif -#endif mov r3, r0 /* We must not clobber r0 */ /* Word-align the destination buffer */ diff --git a/sys/conf/options.arm b/sys/conf/options.arm index a41d2387459c..0c0002d50b88 100644 --- a/sys/conf/options.arm +++ b/sys/conf/options.arm @@ -7,7 +7,6 @@ SMP_ON_UP opt_global.h # Runtime detection of MP extensions DEV_GIC opt_global.h DEV_PMU opt_global.h EFI opt_platform.h -FLASHADDR opt_global.h GIC_DEFAULT_ICFGR_INIT opt_global.h INTRNG opt_global.h FREEBSD_BOOT_LOADER opt_global.h @@ -16,7 +15,6 @@ KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h LOCORE_MAP_MB opt_locore.h NKPT2PG opt_pmap.h -PHYSADDR opt_global.h PLATFORM opt_global.h SOCDEV_PA opt_global.h SOCDEV_VA opt_global.h From nobody Thu Mar 27 13:47:54 2025 X-Original-To: dev-commits-src-all@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 4ZNlNC3x4fz5rP7g; Thu, 27 Mar 2025 13:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNlNB3yyWz3M6y; Thu, 27 Mar 2025 13:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kUKF1h8/ExAm5lIBYyMSlruVgqVrX7wEJofKaQC8cdA=; b=XskRLjzEJiZW8VMqne5K2FP5YyNxZgAGuuM+Y+xUGTUipoEUj8R+DAQ2co6hT/ArVgU9N3 4j4zNIwtCXLaZ1GgyRt/OFrFRorUZjGG9JuUdK8sI1Qgd2iY4miIynoMUBMPqcq7uxRbRS VqZXWBEfLdXNFRwjz9NUMo06tA3l+GRJIghx1WxP6S0k3wRorWoWgOugzvlIvfUriIb0Gr m+9k3IxqDX3B53+ZqcGrgoFRQ8rSYP3Z5B85AbJQBeQSjo3bEHmyfr7yoA5dcBnztl9G+e TTKxH/v/QMno6bCXw07SqG/Wbv1qFI6QztXWjydl493ykptxmjVhpm8YbPYWzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743083274; a=rsa-sha256; cv=none; b=i1VbM91ChdAQOThMPKC++h2DrYvZliQMfX34yI4OjYv6TIc9b3pljZoSZuTOIhM9QbUgrV PlllkwXjkPJH/DHzgsuvThW7vMEuRZSfkS76PBGYRnhExSBjCeuN8ACjnJ69Om6b11zpOI o4pxjYDhciJprylGHF+w6pIHjP/J+m7TkYRTZqK45pnjO+Lv8sShuh93oApN0Px6X8DMyR L5g8MhgiT3U+sA9wEOgczt7xtVVqhdPKpjznztXmH0F+bez/jy6Zh0Pbk+vUam5V6x7VRC LfrPMGKuAfLqr+anzq/lVV+WNXOayyK518iuGpFZlgQNmeUzci2PQ4tm7bwNdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743083274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kUKF1h8/ExAm5lIBYyMSlruVgqVrX7wEJofKaQC8cdA=; b=nEmHoFWimy2eanKwVVRCa7cmYEv5dGQjbFvMTq9a0TMaM7JMzS5UPa/W7EkdFSMfhQiGOe XGMqeY0jVpkwVi1nblg1Jj7ODXlMBYQjLvxROdtFn7HQgXQFGciKeEbcGDuYY/ix1s97ht 5QzJFk96sCGKUQkllZFjuXbCNTjl6nlR76Hl7kBQUvzDO6YUbtDyXdnARW2et1rLMr/ZWt /oWerXHvIt/rjBSPLWMY5sVFpnsXBeyYfp6EgtJbjLTst/VjWQHVCk/9cK8qLc6qKKDANu 7BOBgnlglJeLZ+tm9rsgutTP25ESQbsCPnsMPhtAaci3XkPfbqV7dFQ+ncfHDg== 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 4ZNlNB3TJ9zyr9; Thu, 27 Mar 2025 13:47: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 52RDlsCC025690; Thu, 27 Mar 2025 13:47:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RDlsIe025687; Thu, 27 Mar 2025 13:47:54 GMT (envelope-from git) Date: Thu, 27 Mar 2025 13:47:54 GMT Message-Id: <202503271347.52RDlsIe025687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 066e44b13ea6 - main - conf: Remove SOC_BCM2835, it's unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 066e44b13ea694bd7ddf8dd328914b2e5a2bb546 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=066e44b13ea694bd7ddf8dd328914b2e5a2bb546 commit 066e44b13ea694bd7ddf8dd328914b2e5a2bb546 Author: Andrew Turner AuthorDate: 2025-03-27 13:21:59 +0000 Commit: Andrew Turner CommitDate: 2025-03-27 13:47:38 +0000 conf: Remove SOC_BCM2835, it's unused It was removed with armv6. Reviewed by: cognet, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D49499 --- sys/conf/options.arm | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/options.arm b/sys/conf/options.arm index 0c0002d50b88..da06d9cd84e4 100644 --- a/sys/conf/options.arm +++ b/sys/conf/options.arm @@ -30,7 +30,6 @@ SOC_ALLWINNER_H2PLUS opt_global.h SOC_ALLWINNER_H3 opt_global.h SOC_ALTERA_ARRIA10 opt_global.h SOC_ALTERA_CYCLONE5 opt_global.h -SOC_BCM2835 opt_global.h SOC_BCM2836 opt_global.h SOC_BRCM_BCM2837 opt_global.h SOC_IMX6 opt_global.h From nobody Thu Mar 27 16:03:24 2025 X-Original-To: dev-commits-src-all@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 4ZNpNX4zJ1z5rY5Q; Thu, 27 Mar 2025 16:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNpNX4P56z3kh9; Thu, 27 Mar 2025 16:03:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743091404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WjAsahfiUGo72Dv2i8+TndUJEWqmCQzIE7vvLjE8e50=; b=iGryeIjShyfSz1AHQxDtpC+3OcYs88HbzuNpVO5snN4sco/BqmLf2yvPKYH6UR9qKtyEBt 80wdpmh6HOlD4zuYX6cGanQM/4tL1YQr/+LSiid9fGMLMEvyOt5WUHyPD6bTdcxq2jMJ1l oXwK3KqWqyMnvu7lpqKXbliuvebFhlsSyoTAk+CmxZtgx/C2u6gyxTOi05KJfOEOHIF2KM FWDU7Gi0eDdSru8VLov2QtQXu5ryAV/yuvoBn2a3r367Ml9W66agyE2YvBhFJLcq8vtnLg /5g9i84Cy7201RFVbQ8uF44SCAJiSWp7ErqOEbmBsvlkhcPJ6HYV9+n21z29MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743091404; a=rsa-sha256; cv=none; b=OKUiaagxGyirQl+PC5QzvMoN1Ig/zkk4JG7VjbXMQT1obrk1AQJr6YpMmb2g0iCWnPdXld C+7XBwTf5PAVsfqIB7mVLnyC/rOQWR0ufC0tM5j+8wPUUuItv2fYLDn26aoKDkmI8C6YKn lX4yMGHpdSz9ORXe+Xg7eA0Rn8jP31oMFpolW5fi5JoL30p+XyqxKzwY9pwOWH+E8A7zD2 ltXrgN1tI9Je4x2YVAFezYXKuxckbUT2ATg9/azHvUZs7soHvBVyTdo9N1Dx75fJfw/+eb JS+Evh+bQRq2MR+gvWxVvb8oZfchbDhEIQSmCF2xAbYnnh6qA6cpbM1cRzwhmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743091404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WjAsahfiUGo72Dv2i8+TndUJEWqmCQzIE7vvLjE8e50=; b=luh2zHmxytHjbbGPVptTvT1AUP7/rwwna0DIE5exf9kliErmzZJ84KJXZ4M4+Qb7nJK3Z0 MI9RQmCCd07mVm3hbNmCF3rS6NTFgk0XrIt83yabcgFmSa3VPGUA9gyYr6czft6VyXR1qW OhdrzyWMKPO77G8OF2iid4/omeRPZe603jRrhEZ26NKWDKHHjzJ4ogjQdaw8PpzBu4s4vZ fpu4j7p6RxU3/uGaBTMoTYnpd5tfARssWooWIzEjCBZDjk2MJfSYGmDJ+e3HG+4xeN874X FGXzLZsLcCmcBOnb4dDu+ryXZ3C5rTzyyuZXJCqRsBqNKUXWW2GtITJ0O1zbqA== 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 4ZNpNX3t3Yz13j2; Thu, 27 Mar 2025 16:03: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 52RG3OVF087328; Thu, 27 Mar 2025 16:03:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RG3Oev087325; Thu, 27 Mar 2025 16:03:24 GMT (envelope-from git) Date: Thu, 27 Mar 2025 16:03:24 GMT Message-Id: <202503271603.52RG3Oev087325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 9eb6cdafe5e2 - main - release/vm: empty sh functions are disallowed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9eb6cdafe5e2c2cfc9ddebc34ecabd1e7cbdc3ca Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9eb6cdafe5e2c2cfc9ddebc34ecabd1e7cbdc3ca commit 9eb6cdafe5e2c2cfc9ddebc34ecabd1e7cbdc3ca Author: Brooks Davis AuthorDate: 2025-03-27 16:02:30 +0000 Commit: Brooks Davis CommitDate: 2025-03-27 16:02:52 +0000 release/vm: empty sh functions are disallowed This happens to work with FreeBSD's shell, but is rejected by dash and bash. Reported by: def Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D49526 --- release/tools/vmimage.subr | 1 + 1 file changed, 1 insertion(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index c647097e8ced..9b8813e6dc4a 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -53,6 +53,7 @@ vm_create_base() { vm_copy_base() { # Defunct + return 0 } vm_install_base() { From nobody Thu Mar 27 16:38:57 2025 X-Original-To: dev-commits-src-all@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 4ZNq9Y64vDz5rbYx; Thu, 27 Mar 2025 16:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNq9Y5RR6z440r; Thu, 27 Mar 2025 16:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743093537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wTqteCaBr+U7AV0fB9hmrScznoe22Cp0/3ddtOGxt8=; b=FfA4rz9R8H3gZdOYYPoRJ8LztW805M6MzwvaJLyXfChiRE3f6m6tv34FP0iETxi1V2pVoT Un3/669j+kWcUVMOuJJZDM3WlFKDPEddAJIJr8u/F71KhiZAgtb1eI04KZ4CAgZlbb38xC IgzRKrc5IFMyIavk69L2CGW27WHop9Gyw5OIxtxFH5MRo67pQOiUEBAcssJ2cDdwu3iahE 1kHyjiYR6nDTPfD2s7MGEaTVocWTplvsAh/fXnmxZ4G0t5hi373ULUitpK3ta8v2mP9qcw MdgK5bZ6WgUfPNZpRMo2yvn7oLGHdNsIPgIk0s0R6MDzx543aovkGEluXSbagQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743093537; a=rsa-sha256; cv=none; b=jicUfUjJ2sjzLzczK3elSJYnzqzqfiwEC2RJ9s/YMXMWciLJpYBopZW9/BOdWH0IicxWse zW+07tAbJnWJ2EATZblqRf+n1I1bYSaV3DMd0dhcGSErXQkGYhA4MKFF+Dy2XILpnmvbkP X6aLc1mvH2Q46wkqWVxau2y1fTwvDIl30ehAPl0UkHBZ50PorQzVP3GD5jaWt1GCKh8rBg ppjKsgyQNH1FidsTG7BlcfQI1zicob9kwR7qsMxFC0AxlRrx+v7uNSTTTyYnuD79Mx3n1R mTBvhk751jWdG7i1hIMpbDaM4iPonbMd5UewmnQY7F/5zBQhZEcairiJj4Kv9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743093537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wTqteCaBr+U7AV0fB9hmrScznoe22Cp0/3ddtOGxt8=; b=gO3XB4uePoYZXGAFUhkJePeuAYt/HphVME3qLlDQp7T1ooHgfRX4akwt3l9L1OJZ1s5baD Kzmux7Jx1jycJzdsAbk6i67l3Sx7s39Y+iA3ZkJaeq+RQuZjT8GllW7MuztN7DClDrJstp 2Ye7EKTJJGH6oGXXfeD4HspCa6b71ItOwHVZF0y2v5MWK5NTk0cwOIJaSFmTp9Py+wCmKt 00XfraxVhRPzOkC33iMrUaVzVMRTsbjvsBgKIbUJyAta7pnMofGSuIua/8KpPBzUBjvnpV yG31gml7s8oZhRtLOY6cyYs5HsIfXtopypVIuTNQYOBWt8ZBGoUPEvgYMD7msg== 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 4ZNq9Y4lcsz142c; Thu, 27 Mar 2025 16:38: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 52RGcvcs045113; Thu, 27 Mar 2025 16:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RGcvWW045110; Thu, 27 Mar 2025 16:38:57 GMT (envelope-from git) Date: Thu, 27 Mar 2025 16:38:57 GMT Message-Id: <202503271638.52RGcvWW045110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7d70f8b482fd - main - Makefile.inc1: Rework ELF Tool Chain bootstrapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d70f8b482fd1ab82dbea31103be7de5ec3c2c7b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7d70f8b482fd1ab82dbea31103be7de5ec3c2c7b commit 7d70f8b482fd1ab82dbea31103be7de5ec3c2c7b Author: Ed Maste AuthorDate: 2025-03-25 13:47:50 +0000 Commit: Ed Maste CommitDate: 2025-03-27 16:38:25 +0000 Makefile.inc1: Rework ELF Tool Chain bootstrapping Remove additional conditions and bootstrap elfctl, elfdump, and elfcopy (aka objdump) if ELFTOOLCHAIN_BOOTSTRAP is true. The first two are bespoke tools that won't exist in an external GNU or LLVM binutils, and elfcopy is also not provided by that name. This should fix GCC CI builds, which was skipping the elfcopy build because of the ${TARGET_ARCH} != ${MACHINE_ARCH} condition. Reported by: olce Reviewed by: brooks Fixes: b885643b63e4 ("boot: Always use ELF Tool Chain elfcopy for EFI builds") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49493 --- Makefile.inc1 | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 3569d068095c..af9e4736a65a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2909,29 +2909,24 @@ _dtrace_tools= cddl/lib/libctf cddl/lib/libspl cddl/usr.bin/ctfconvert \ cddl/usr.bin/ctfmerge .endif -# If we're given an XAS, don't build binutils. -.if ${XAS:M/*} == "" .if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" +# Some bespoke tools from or based on ELF Tool Chain. objcopy (elfcopy) is +# included because llvm-objcopy is currently not capable of translating ELF to +# PE32+, which is required for EFI boot programs. _elftctools= lib/libelftc \ lib/libpe \ usr.bin/elfctl \ usr.bin/elfdump \ - usr.bin/objcopy \ - usr.bin/nm \ + usr.bin/objcopy +# If we're given an XNM we don't need to build standard binary utilities. +.if ${XNM:M/*} == "" +_elftctools+= usr.bin/nm \ usr.bin/size \ usr.bin/strings # These are not required by the build, but can be useful for developers who # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif -.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" -# If cross-building with an external binutils we still need to build strip for -# the target (for at least crunchide). -_elftctools= lib/libelftc \ - lib/libpe \ - usr.bin/elfctl \ - usr.bin/elfdump \ - usr.bin/objcopy .endif .if ${MK_CLANG_BOOTSTRAP} != "no" From nobody Thu Mar 27 17:27:19 2025 X-Original-To: dev-commits-src-all@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 4ZNrFM4PjFz5rdvT; Thu, 27 Mar 2025 17:27:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNrFM3nZyz3FJy; Thu, 27 Mar 2025 17:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743096439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aWkS6y8/ItMclvER2c4ZuOMJ5Zc3cnr6kfb7khGHpY=; b=JnGAwV3lV0Bxc0gkwC30scoTYxgKTpZWBJsRBXvs47U8XgCR/NYsqMJFpVsW6mxTG3wq21 hH5PTQ9ETuOBVmpl1tnkJZguSPyjuKD29ufSYoBIsEDLjtBxx8cgL1/Z+sz59ghJS9V3/D rBulL3cYEOKzw+wIRDWKzBWNyzXoDrNMplWAzgtaEfTjIoE626KF2XztD70zHR14Oj2F4V GuXHQDN4sw77vfLWxq1915G4pRK8KgrDK8RWytZhsKjn//y3NdC/4fyWk3tB5M0QCSNzWS P/boQFNZrnm0sie+pARR3Ak9iyOtfkczf3UGrhiod80zbd4QsJIYP2KpTSpLkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743096439; a=rsa-sha256; cv=none; b=D6gxijF5JRBeralIPb+LbofCqJZ8py71lSddwR/CSBF5Xp9Y86gu3Zetmgqtq4Mf/OdM4z 4t+PnryrwePCPkXRSTgxZkH4JmqWx1zNUnJXr18dgNtFcMjyb3XlgxlYbTVez5V+gubzPE s3Lg3r8vxi2tmSfio98FCBDJpeYBF0o7DalCHaVzrOjZ30ui2uPRoaanHYWj+76PcVD8FF I3p44+8B08rR4fdpgU+sLHZm9xzel3HNxxpX88fiKQLRDD+D9/DvbfPdwTuMK+K/Lc3gXU YlTsCCPD+b0bf/7tRQn4RmGuF/4lzQ2YV90ddOkvoCe8eQ/o20WQMnHrqeMfXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743096439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aWkS6y8/ItMclvER2c4ZuOMJ5Zc3cnr6kfb7khGHpY=; b=dtCkC/6Zw3mO4Z5SWClDAuRtNcBUelNqNmiHqJ25/wx9NHj7jZp/yIZZmngXAjFA5gzfor +kDKfH/XDSw6X+nI6L4GOKO1KWCqu/tKAqQ4T1jhjI8BjXfy/iIQ4aPqcikMAmOcCcRfac Tizb8fvd6kryPatd1OoAB6PLWvM29x8CZgDqJnhAs4I/sk3g9/EkHTce42zBkZkd24GPjH 2844eBToCvFL3S8se2yfB/85rNSuCnfOq2W963o7xuVmaE0EYoRgSt9WDrBHJWQbzUuPH7 jyzOM7hLcXrIrCHbrQi3Zbpdo0qWMgqyqWI7RjpBDgHhU/unJINFiooN7i7XAg== 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 4ZNrFM3NLRz15WH; Thu, 27 Mar 2025 17:27:19 +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 52RHRJdn038416; Thu, 27 Mar 2025 17:27:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RHRJh9038413; Thu, 27 Mar 2025 17:27:19 GMT (envelope-from git) Date: Thu, 27 Mar 2025 17:27:19 GMT Message-Id: <202503271727.52RHRJh9038413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 3b496eb1bded - stable/14 - loader: Fix 32-bit compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3b496eb1bdedaf407fc45ba4ca68dc0598bfcb60 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=3b496eb1bdedaf407fc45ba4ca68dc0598bfcb60 commit 3b496eb1bdedaf407fc45ba4ca68dc0598bfcb60 Author: Ahmad Khalifa AuthorDate: 2024-05-14 19:29:08 +0000 Commit: Enji Cooper CommitDate: 2025-03-27 17:21:55 +0000 loader: Fix 32-bit compatibility main.c - Fix rsdp cast. framebuffer.c - - Use temp variable instead of directly passing pointer when EFI_PHYSICAL_ADDRESS is expected. Also fix FreePages cast. - Mask framebuffer address given to us by UEFI. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit 6818ff7797c6a9ab104e5d7e91d4e422874bf50d) --- stand/efi/loader/framebuffer.c | 21 +++++++++++++++------ stand/efi/loader/main.c | 3 ++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index c954a2471340..ea4131b751c8 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -149,7 +149,16 @@ efifb_from_gop(struct efi_fb *efifb, EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *mode, { int result; - efifb->fb_addr = mode->FrameBufferBase; + /* + * The Asus EEEPC 1025C, and possibly others, + * require the address to be masked. + */ + efifb->fb_addr = +#ifdef __i386__ + mode->FrameBufferBase & 0xffffffff; +#else + mode->FrameBufferBase; +#endif efifb->fb_size = mode->FrameBufferSize; efifb->fb_height = info->VerticalResolution; efifb->fb_width = info->HorizontalResolution; @@ -555,6 +564,7 @@ efi_has_gop(void) int efi_find_framebuffer(teken_gfx_t *gfx_state) { + EFI_PHYSICAL_ADDRESS ptr; EFI_HANDLE *hlist; UINTN nhandles, i, hsize; struct efi_fb efifb; @@ -651,16 +661,15 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) efifb.fb_mask_blue | efifb.fb_mask_reserved); if (gfx_state->tg_shadow_fb != NULL) - BS->FreePages((EFI_PHYSICAL_ADDRESS)gfx_state->tg_shadow_fb, + BS->FreePages((uintptr_t)gfx_state->tg_shadow_fb, gfx_state->tg_shadow_sz); gfx_state->tg_shadow_sz = EFI_SIZE_TO_PAGES(efifb.fb_height * efifb.fb_width * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, - gfx_state->tg_shadow_sz, - (EFI_PHYSICAL_ADDRESS *)&gfx_state->tg_shadow_fb); - if (status != EFI_SUCCESS) - gfx_state->tg_shadow_fb = NULL; + gfx_state->tg_shadow_sz, &ptr); + gfx_state->tg_shadow_fb = status == EFI_SUCCESS ? + (uint32_t *)(uintptr_t)ptr : NULL; return (0); } diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 2588774b8457..819acbcd1fe5 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -923,7 +924,7 @@ acpi_detect(void) if ((rsdp = efi_get_table(&acpi)) == NULL) return; - sprintf(buf, "0x%016llx", (unsigned long long)rsdp); + sprintf(buf, "0x%016"PRIxPTR, (uintptr_t)rsdp); setenv("acpi.rsdp", buf, 1); revision = rsdp->Revision; if (revision == 0) From nobody Thu Mar 27 19:15:29 2025 X-Original-To: dev-commits-src-all@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 4ZNtfS3dWLz5rn1G; Thu, 27 Mar 2025 19:15:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 4ZNtfR3Kygz3S16; Thu, 27 Mar 2025 19:15:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=mEAR0q9Y; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::62a as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-22398e09e39so32142075ad.3; Thu, 27 Mar 2025 12:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743102941; x=1743707741; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GrsZg22YCTMM/DV1BJCsxrY6NrUWKZ/FJv16SduWbl8=; b=mEAR0q9YUdks2TUmeK5ZQ5JG2aixSHE6nE558KSGtktGbaop61NyhIhUMalYnE1rVt PRvupDtqsBLf/zbhhjbEmqYfMjXnAl7/v2MK/uKQ1SFxhOe3i7zvCE4TzZGFFOyCXUnW BqgYe4HQCpHHh9u5WC73u5WmyOxQCxY4SetyJMDm+h5os70w4Y3uHDEgEJOT91+AZZxW eQGkL+zGhAI0mlSAKsPWQ6Qq0xh6y1Bq+f3VLnAGzrkGpy3T0MUfgQ4VFBGlnM53Rb5X fDU9CA2pTnbq6zCePUBj1b+Dd/Z6pl8B8utH0kxhfucJejOzl8htAt6H4X2wk2CUSGuT YwvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743102941; x=1743707741; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GrsZg22YCTMM/DV1BJCsxrY6NrUWKZ/FJv16SduWbl8=; b=S9TVrKLBzbYw12WuKJSaFa+6luI07qWBajZioC4Rmg06zqCA7dYPTREaCw9EazV7SH M1vLsRQ1v2G0OxC51D5MIKcSyq4pbtgnyQeTr7LvJBRsrWzt5C58i4kTl0if2egEfWP2 d15Q0hgIAfTDCAWlb9n/Q8tD5d6kqeDkQYhw+ukOUK3Iw6fX6gEbLeHUR8PxOZDwyp3U Qlhj0k1pG6Kao9OeL9goH2PXwmHNheDu1jebQospddsUunK07f+OIqjFhEHQ+4qPqQlM xuqdmYUPz3qaVkXj1OWgvR22pY6wjRcwcs7Bjo3mkGT9GyqYpYzbRbcFR9PSiRTXpQKE bnEQ== X-Forwarded-Encrypted: i=1; AJvYcCU9Gb6HnduTtkgbhoFX8/A5saqaLZj8ljAcU7QVBQqdyCorY4GZAvRwjWSuibmkImHqkn+KWvj5Xkl7ANFkFTRDMxqtazM=@freebsd.org, AJvYcCVH6I9ew/5Hdb85otEoJaHOnMqI5QHkH/7RIkuR0os1ogr066nTL+x74UpsF70qeoeabq7WfOPx8T7SUyf3kVnUwDd2@freebsd.org, AJvYcCX2PHhAnWk8EUe7hFNThnHXbIcIKUwxyOUh/5HiZLdrXFsQsYM233pFSe3LREPNahMqBC59m24o2n9Q1CxbeLE=@freebsd.org X-Gm-Message-State: AOJu0YyOMmGLEIZRM1ugpTCMhZaqWtYYeHKpdBc4KU6+R+k2b7RfCDyT 3g2yAFbF/Jd/C8zCcv9XCWJfl5pmzyMtWFt/l0aGaZaQ+vw6l2wbJZ7SG6DrVmE= X-Gm-Gg: ASbGncvtSL6nd9VaMA1Srq8zBixrt3CZRMk3vNC/8kgJ0TMB3SQeECR+d4YjaBsGxA5 L1W7a+UaUKfjaCx9UNtHmm9DtcOFWL30rCURFiEPjcx1dphlAo8aGX2C8LzOT2YiCjrSNMZlriT hSgRACwI8HjMZxPH2BIXcBe5WfaUM9Ed9Mntrj16Knmp3tUW2L55Pjrxw3wabWIViOPbN22wWYS B0fyJ1Iu3zGsDRZ8b7uga2XEavue8wOPEEByKlllZd3Sxl5ov2py7jxWW7WgwdYl4JO/kOywbRf IvwcmZqy8v0X14VG9Yg7MYI+F94TOutV8n1I22dQQ6Tdw6kWMNLKqtJBSjYfD65XvswM8Bvs7Pu 1 X-Google-Smtp-Source: AGHT+IFpGWymjOjvex9a2h8Ow2sE7nZenmGtlDIM/l6yOurMzYxnI6eH8HbWQDGrrvaoHHwLakDqwA== X-Received: by 2002:a17:90a:c88c:b0:2ee:d63f:d8f with SMTP id 98e67ed59e1d1-303a7d73507mr6950354a91.13.1743102941251; Thu, 27 Mar 2025 12:15:41 -0700 (PDT) Received: from smtpclient.apple ([185.153.179.131]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30516d56521sm283026a91.19.2025.03.27.12.15.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Mar 2025 12:15:40 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_B5391102-0ECF-44F3-9EDB-47F61F017BC1"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: git: d97e44784bb5 - main - aio_*(2): mention ENOSYS under ERRORS From: "Enji Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 27 Mar 2025 12:15:29 -0700 Cc: Enji Cooper , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: <98AE6DBB-B0C7-42F9-811A-F74706B9CD44@gmail.com> References: <202503260450.52Q4ok8C029929@gitrepo.freebsd.org> To: Alan Somers X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Spamd-Result: default: False [-5.46 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.996]; NEURAL_HAM_MEDIUM(-0.87)[-0.866]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62a:from]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_ATTACHMENT(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4ZNtfR3Kygz3S16 X-Spamd-Bar: ----- --Apple-Mail=_B5391102-0ECF-44F3-9EDB-47F61F017BC1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 26, 2025, at 8:04=E2=80=AFAM, Alan Somers = wrote: >=20 > Is this error still possible after = f3215338ef82c7798bebca17a7d502cc5ef8bc18 ? How does one unload the = module now? Ack: I missed that. I wrote up the patch before that commit and = didn=E2=80=99t go back and confirm that it was still the case. I=E2=80=99ll revert the change now. Thanks! -Enji= --Apple-Mail=_B5391102-0ECF-44F3-9EDB-47F61F017BC1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmflo9EACgkQGpE5DjPs NJjQZA//RXxkeXn8Y107Ss40WPzGh9UR4YbdUEfFKulgc7j5d39TdULqNcjPHooU HxAATKq4yXXhhcPKaTlsmZJzhkzr0IxLZ5SiEbMeVR+WXerzQ2KZBOO55v4rYIJD Estww4XzYXoRrYvaoo291JecAX51dIgrx6e+eN2GOkmvSo6blhV7Ix6+r1kncpur b2Iddfy1EBZk9me4emYiUxi5Br05NhRgyoDMw+UOS+2FiP1v7PzdSKKX9N9VAdRI m9dM3UAmb1S2A3+wrAJpKAKAvzQgOZ8VTrgXiT9bMzjhdrMILeK928AQXDpEHU79 4EB8UrbVipYgEwbGsry/+lIXIrtuTIWpZJB4H6os4fNMA09mhAAyuUMlT3qdY2mq eMShbW5rmqy7Odbv2ASJnJ3ghkTxCyqP8S+BBCfiR/tqA5qLrcz68Ny3gWw78QBB R9DLuG6F5WeQ95T6b4SeSPJAVYWtlgld9tq1KSkQsRtA5wcBAxs5eta9KKvSbxub WTnE13E7sNPC/7LKqX0NfwqulX5qn0FaSPhwurgUvbp5SOSYQShhsxBT0fAyeNAc PGCpepB1uoEogMi3kLlV+T1xq6KwU4myxdtBVdDMVtrjuWBwMlKXfvOYjb6Ubkc1 yQDIMk2APlj9rehwwncrTzYLZyYz/nTDqbC3yhGN748W+1MwEEg= =wl3u -----END PGP SIGNATURE----- --Apple-Mail=_B5391102-0ECF-44F3-9EDB-47F61F017BC1-- From nobody Thu Mar 27 19:18:40 2025 X-Original-To: dev-commits-src-all@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 4ZNtjt30tgz5rmwd; Thu, 27 Mar 2025 19:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNtjr2JgSz3Txv; Thu, 27 Mar 2025 19:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743103120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EeLY28mXFT6ZtTT9L1W5RodHtO7FoabVHKUIyl7EbMg=; b=KFXGFc6HrJLna51aitB5YSj3ScEPNCrCxlI2gMCudJYoKKJ+pSGxNoswCRCnFcz5pH1hAM jAQS1ZkkhgHx1YKevQf+wGC3vQTC/Gil49ToCGu/LULH6JqF7XV2QiXLTuqgSffG2+etG3 hP4788TMgbDt62dmIxvtT05sY+qd1ZyRadXH3JtOYof+RU9bwY2AQAIs8GkGn7ZpAJ/Aml DnB/Q9iHNc/LjG0Uz67+c+gNb75sQCet3FEqwLYAneVrFEWlTnAO08jiAUGB9fLL1OXnim bodoBVr+aYlRM5RN9YWlTXYXMyy1ACMA9Mj/DBulA56VaAGK8Q8s99p5tmk7PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743103120; a=rsa-sha256; cv=none; b=HYTwLLXyXczSs7gFqijkEsFKfUnnR3povPdcTyNV/fl0UQMKuBT7gm/lCiVLqdUgfWklYs ZDhvE3wVfTvZ3UB3mvq7iRq3T1jaay2VuloMnMDPK2Zy/ZbxNAsdWUDpRPF0Z2j5E9ALvw OEPUZZigQDDmazqpr7xzJQnnWijhAkw7zQo+WnfZ50QKbV+4x3zJn7lrirHym/sFT9KzAm R+/Fibazca7vs4HQJWBMU76BKTEY5Iqy+exj5zJjnz0xtmj17BAaIh2JVeCvrCxZg36NqT KXPQ0yXBJMAFZ09vOb95xFNJU8buWRDE5a1tAI3NR7osfrRfBotPkwMX6UTFhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743103120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EeLY28mXFT6ZtTT9L1W5RodHtO7FoabVHKUIyl7EbMg=; b=ZJjbmQLEAfFJUd+/BWN/ZJJze2X2/szcOb4cLcO8fzuuoYyHp8D5g9yeOL+7dv5bsCWLBV HXKkyBfFopAH3CuXStxnUpDl55yFHj0frF6EcQrSmRvauN/uNpScPoaxSibjEURI3slIHl TMTAl3T1YgMTjPWrwKPjqqnjIaVW4njbu8Eil+w/hBgl5heC2+mT2999SJSOX0L7foqyNs 1oyc5IbIrLX0XhiWVJVSU+dyt8qXNFqZoYgb3j2U/7n9NUZyygTWqa0XMKebOHICl44EgH EO2mOmWK2rtg5/TrvOcdBPFUif7CRklx7xPgppveZARcCMqO/U/5utF1mUVBkg== 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 4ZNtjr1wL2z18Lx; Thu, 27 Mar 2025 19:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52RJIec6044848; Thu, 27 Mar 2025 19:18:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RJIeFp044845; Thu, 27 Mar 2025 19:18:40 GMT (envelope-from git) Date: Thu, 27 Mar 2025 19:18:40 GMT Message-Id: <202503271918.52RJIeFp044845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a75dbf419467 - stable/14 - tools/sysdoc: Chase sysctl rename List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a75dbf419467eacec88078f9667b43de613bad56 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a75dbf419467eacec88078f9667b43de613bad56 commit a75dbf419467eacec88078f9667b43de613bad56 Author: Ed Maste AuthorDate: 2025-03-24 13:53:27 +0000 Commit: Ed Maste CommitDate: 2025-03-27 19:15:04 +0000 tools/sysdoc: Chase sysctl rename PR: 285591 Reviewed by: glebius Fixes: 94df3271d6b2 ("Rename net.inet.ip.check_interface to rfc1122_strong_es and document it.") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49486 (cherry picked from commit d45d070e5475466ceac8057f2e7558055267fb1b) --- tools/tools/sysdoc/tunables.mdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc index 54f6920a22c0..20b59f450cf2 100644 --- a/tools/tools/sysdoc/tunables.mdoc +++ b/tools/tools/sysdoc/tunables.mdoc @@ -1272,12 +1272,12 @@ bool Controls forwarding of source-routed IP packets. --- -net.inet.ip.check_interface +net.inet.ip.rfc1122_strong_es bool This .Nm -verifies that packets arrive on the correct interfaces. +verifies that the packet's IP destination address matches an address on the arrival interface. --- net.inet.ip.fastforwarding From nobody Thu Mar 27 20:48:41 2025 X-Original-To: dev-commits-src-all@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 4ZNwjk3vXnz5rt33; Thu, 27 Mar 2025 20:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwjj6831z3dCD; Thu, 27 Mar 2025 20:48:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gWBRyb1l6WmmSKJ1id1O7b83j9C/g/onirx7U0PUA8=; b=Q/7y9kWngupB6tCWcewnd11RD7mUb265xGemLsrI+q7cQAOHJdHnB35GvPoBKfF6wW85H/ UAik98hyl4Al8eweCkd8BXZwDDJp5YpyzvxwbtuGmd3twkdsUzbqh3qu1p+pdDPLdsPC9o 4xKiBK8JQKa0MUEnW6b2uojH0b8tWuRdrjR+V42djDt4LiYZEkmzS7xJC1Xo/kNYwKfEto B7INWI1yAmLvj+tFJFfIrHgUilhR/EfYhN1t8YSW3nW4FIk5kpb8syhdmd5KGcTXE9ON5D AR5rgmUZ91qwu9mxofMYKBbZtI+snx3rGUFlK1zCnOua6UDU0AVu3g9cIuAyAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743108521; a=rsa-sha256; cv=none; b=bUaZs9LsUi4Pgu87hbAdWtgQlvrhh/cTLt5kZ91PSnLpfMfDchT1LdA4k7h8ZyamRlqs8f CZWL7Qii+e80q7CWvZBcTZ70qx+iahIhNUNCGkoDS70UR2aAIgffiQljJL4nrOg9AWthRV azuFLTofAstOofapYmBjgQjwk2KMwRb5k+djx1J1B15s/iepo/Lm0EA422i+BSg3iy473Z 7YiCgBqUZnGMDwxoMb+bvGvaa3aGH+Hr4jcosMmYSjCRQf3EHGbdHt/neesPZO3OaL5XP+ eE/rhGW/EnC2fRqo75QvOI0VXkTkc/JdBABfseF+24VE7GWjmcZ6FoY2XHnV7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gWBRyb1l6WmmSKJ1id1O7b83j9C/g/onirx7U0PUA8=; b=HYnHL/D0FfzXXB4M9RHryjOtmmQNa1KB9eou12udj1srbW/wLHJ9VPJ6VreDjQDIlsfCUf h6o+UGp0RU2Y3ocAjBRGj/wPERF6VX5+cUPas7PY6nfFiHXnAafnWf0ew+v0FH25NtxmFu oI39rpdTYiJ1aBiyYIRvWC2awAI3rxPTXexvff0rgXJlQEdpsKDc00JZ/nRjblF+9zpdBX N6sY9dHQNsVtCiPUOvRkqzrBf7fgmNHk5tVn/vqJQUwULrqyNK0fOI/GwhUrPB5LQ3ag1/ Hm9YPcN6FPCmIXLlu9tLp7q2pjFxWrCWjARVzkvtD1QjZMHJWKBcshIJF6FayA== 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 4ZNwjj5blZz1BC3; Thu, 27 Mar 2025 20:48:41 +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 52RKmfR7012895; Thu, 27 Mar 2025 20:48:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKmfi9012892; Thu, 27 Mar 2025 20:48:41 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:48:41 GMT Message-Id: <202503272048.52RKmfi9012892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1123986db5f0 - main - device_pager: Add cdev_pager_get_path to retrieve the "path" for an object List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1123986db5f0b0b3bfc68840a6d8e12f93d6ca3e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1123986db5f0b0b3bfc68840a6d8e12f93d6ca3e commit 1123986db5f0b0b3bfc68840a6d8e12f93d6ca3e Author: John Baldwin AuthorDate: 2025-03-27 20:44:33 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:44:33 +0000 device_pager: Add cdev_pager_get_path to retrieve the "path" for an object This wraps a new optional cdev_pg_path method in struct cdev_pager_ops. If the method pointer is NULL, the function does nothing. The old device pager reads the pathname of the cdev stored in the object handle to match the existing code. Retire the OBJ_CDEVH flag as it is no longer needed. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49335 --- sys/kern/kern_proc.c | 22 ++++++---------------- sys/vm/device_pager.c | 21 ++++++++++++++++++++- sys/vm/vm_mmap.c | 3 --- sys/vm/vm_object.c | 18 ++++-------------- sys/vm/vm_object.h | 1 - sys/vm/vm_pager.h | 2 ++ 6 files changed, 32 insertions(+), 35 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 463ecb025317..ee15efb5fb31 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -91,6 +91,7 @@ #include #include #include +#include #include #include @@ -2615,11 +2616,9 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) struct ucred *cred; struct vnode *vp; struct vmspace *vm; - struct cdev *cdev; - struct cdevsw *csw; vm_offset_t addr; unsigned int last_timestamp; - int error, ref; + int error; key_t key; unsigned short seq; bool guard, super; @@ -2715,19 +2714,10 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) kve->kve_ref_count = obj->ref_count; kve->kve_shadow_count = obj->shadow_count; - if ((obj->type == OBJT_DEVICE || - obj->type == OBJT_MGTDEVICE) && - (obj->flags & OBJ_CDEVH) != 0) { - cdev = obj->un_pager.devp.handle; - if (cdev != NULL) { - csw = dev_refthread(cdev, &ref); - if (csw != NULL) { - strlcpy(kve->kve_path, - cdev->si_name, sizeof( - kve->kve_path)); - dev_relthread(cdev, ref); - } - } + if (obj->type == OBJT_DEVICE || + obj->type == OBJT_MGTDEVICE) { + cdev_pager_get_path(obj, kve->kve_path, + sizeof(kve->kve_path)); } VM_OBJECT_RUNLOCK(obj); if ((lobj->flags & OBJ_SYSVSHM) != 0) { diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 15626938ba95..96c3e97d97a6 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -97,11 +97,13 @@ static int old_dev_pager_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot, static void old_dev_pager_dtor(void *handle); static int old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, vm_page_t *mres); +static void old_dev_pager_path(void *handle, char *path, size_t len); static const struct cdev_pager_ops old_dev_pager_ops = { .cdev_pg_ctor = old_dev_pager_ctor, .cdev_pg_dtor = old_dev_pager_dtor, - .cdev_pg_fault = old_dev_pager_fault + .cdev_pg_fault = old_dev_pager_fault, + .cdev_pg_path = old_dev_pager_path }; static void @@ -262,6 +264,14 @@ dev_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, size, prot, foff, cred)); } +void +cdev_pager_get_path(vm_object_t object, char *path, size_t sz) +{ + if (object->un_pager.devp.ops->cdev_pg_path != NULL) + object->un_pager.devp.ops->cdev_pg_path( + object->un_pager.devp.handle, path, sz); +} + void cdev_pager_free_page(vm_object_t object, vm_page_t m) { @@ -537,3 +547,12 @@ old_dev_pager_dtor(void *handle) dev_rel(handle); } + +static void +old_dev_pager_path(void *handle, char *path, size_t len) +{ + struct cdev *cdev = handle; + + if (cdev != NULL) + dev_copyname(cdev, path, len); +} diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index c3672f884f25..afc25965d73c 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1407,9 +1407,6 @@ vm_mmap_cdev(struct thread *td, vm_size_t objsize, vm_prot_t prot, td->td_ucred); if (obj == NULL) return (EINVAL); - VM_OBJECT_WLOCK(obj); - vm_object_set_flag(obj, OBJ_CDEVH); - VM_OBJECT_WUNLOCK(obj); *objp = obj; *flagsp = flags; return (0); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 592f48296c22..4ab20a86e155 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2485,10 +2485,8 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) struct vattr va; vm_object_t obj; vm_page_t m; - struct cdev *cdev; - struct cdevsw *csw; u_long sp; - int count, error, ref; + int count, error; key_t key; unsigned short seq; bool want_path; @@ -2577,17 +2575,9 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only) sp = swap_pager_swapped_pages(obj); kvo->kvo_swapped = sp > UINT32_MAX ? UINT32_MAX : sp; } - if ((obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) && - (obj->flags & OBJ_CDEVH) != 0) { - cdev = obj->un_pager.devp.handle; - if (cdev != NULL) { - csw = dev_refthread(cdev, &ref); - if (csw != NULL) { - strlcpy(kvo->kvo_path, cdev->si_name, - sizeof(kvo->kvo_path)); - dev_relthread(cdev, ref); - } - } + if (obj->type == OBJT_DEVICE || obj->type == OBJT_MGTDEVICE) { + cdev_pager_get_path(obj, kvo->kvo_path, + sizeof(kvo->kvo_path)); } VM_OBJECT_RUNLOCK(obj); if ((obj->flags & OBJ_SYSVSHM) != 0) { diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index fabd21809036..68cc41731b73 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -204,7 +204,6 @@ struct vm_object { #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ #define OBJ_POSIXSHM 0x00020000 /* Posix SHM */ -#define OBJ_CDEVH 0x00040000 /* OBJT_DEVICE handle is cdev */ /* * Helpers to perform conversion between vm_object page indexes and offsets. diff --git a/sys/vm/vm_pager.h b/sys/vm/vm_pager.h index c4a9b5e9dcb9..785717628685 100644 --- a/sys/vm/vm_pager.h +++ b/sys/vm/vm_pager.h @@ -293,6 +293,7 @@ struct cdev_pager_ops { int (*cdev_pg_ctor)(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff, struct ucred *cred, u_short *color); void (*cdev_pg_dtor)(void *handle); + void (*cdev_pg_path)(void *handle, char *path, size_t len); }; vm_object_t cdev_pager_allocate(void *handle, enum obj_type tp, @@ -302,6 +303,7 @@ vm_object_t cdev_pager_lookup(void *handle); void cdev_pager_free_page(vm_object_t object, vm_page_t m); void cdev_mgtdev_pager_free_page(struct pctrie_iter *pages, vm_page_t m); void cdev_mgtdev_pager_free_pages(vm_object_t object); +void cdev_pager_get_path(vm_object_t object, char *path, size_t sz); struct phys_pager_ops { int (*phys_pg_getpages)(vm_object_t vm_obj, vm_page_t *m, int count, From nobody Thu Mar 27 20:48:40 2025 X-Original-To: dev-commits-src-all@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 4ZNwjj0CHJz5rtF4; Thu, 27 Mar 2025 20:48:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwjh5Rbhz3cwm; Thu, 27 Mar 2025 20:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwyvyT4AzFCKRnTel29CflP9/ZrTkRq/1bFLS+9akpo=; b=J1/OT0xsRJwrIN5BMAuSj+JQxRRg7TtaaeyxqUujhFOoX+JqN+7CRSyHAIppZvMFAVljfK IekEOWonUbh3JogDZemdoRE+yElPsTb46rMDJxJC+lEwLQwm+XQuu7aqxhdzngmms5+ceV 3MEwWVOMV0esTKP1BAIwbuJKeHRkMInCXazEsAuMwbQSCEBeMCZGcEDBo5vMmqgCn9KWcM Z1nDyGYKdQuuPNngAse+HiR0y3+dnSAqUw03O7tnvWBrNH6RL1IDhBkSC6wSmGoNlYd9iZ zTSWZkxmGmsED8vg+MaNBMVunjOr0FflDxIJskV3hwZdLJ6yT+849Ja/dpe5aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743108520; a=rsa-sha256; cv=none; b=OokcGWDKcSVNAlLmME2mR1MsJ+tEzOkLxYzsiXQJo1yG7pG/uS6AG2NSzjqoKXA0AR8qgb MHoQ4eKriAjfVBvE/6OzUZKFTap/7YgREkysF7GVwi31Zl8NaZASvTPODgnyE2uCzmcFmo 6tK44fjCQ8yBaHQP6VBlx5LLAqpNfJWMr+1U6349yM9n3NKo1QfXM1/I9qtRXaWyHShEal nCGM9M50mc+DExraNg8cwdeE8B1lNFBQHX9Rc7VxaTNlpXd+exyn1vWkhQ2H/L0uu7c773 0TNXIGnTLHXrlBSs1Gzuh8VMAeFGDHFFGtqlHZVByeTSWLqBlQqlf2boKvZEDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwyvyT4AzFCKRnTel29CflP9/ZrTkRq/1bFLS+9akpo=; b=sthiCd59v/05N+C5G8jGtuNB/E6c8VaGuixgJ52TKVsdym8Rv5Jy1MJ7bgIdC0alWe8+cs Kox07LbFyzeHmbY930ix2y4oJLpJAfzu1UnQonfVtkwijOFeXKFnn1dtePJkkMovYPPj/A Ra/1z1VjC4ZBhb9LTbP6EXRRS9TyTY4RDloikBhpVP1btvYm2HJsDlkscvSOuKYjBNRYjt WkS9AHezHyHw2ztVzVG2jMqIcc2yD9WBxLcPntH55Sf3vISAtIhl596Nkf/oB0egAx3dkO x3k6cyOSxZWNF0nRxLEd9/QFl8Q6KhyB16Q+en3xIRFyz3OcmNVcVSt06tQAAw== 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 4ZNwjh528fz1BX7; Thu, 27 Mar 2025 20:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52RKmeTP012861; Thu, 27 Mar 2025 20:48:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKmeaL012858; Thu, 27 Mar 2025 20:48:40 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:48:40 GMT Message-Id: <202503272048.52RKmeaL012858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e3f669870fe2 - main - cdev: dev_copyname copies a character device's name to a buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e3f669870fe255ad4535d2a793e79e8ad878177f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e3f669870fe255ad4535d2a793e79e8ad878177f commit e3f669870fe255ad4535d2a793e79e8ad878177f Author: John Baldwin AuthorDate: 2025-03-27 20:43:15 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:43:15 +0000 cdev: dev_copyname copies a character device's name to a buffer This function can be called on a cdev that might have been destroyed unlike devtoname. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49334 --- sys/kern/kern_conf.c | 13 +++++++++++++ sys/sys/conf.h | 1 + 2 files changed, 14 insertions(+) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index f9d406548d10..1f0772e97030 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -1245,6 +1245,19 @@ devtoname(struct cdev *dev) return (dev->si_name); } +void +dev_copyname(struct cdev *dev, char *path, size_t len) +{ + struct cdevsw *csw; + int ref; + + csw = dev_refthread(dev, &ref); + if (csw != NULL) { + strlcpy(path, dev->si_name, len); + dev_relthread(dev, ref); + } +} + int dev_stdclone(char *name, char **namep, const char *stem, int *unit) { diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 8970006c7089..1646aa108701 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -277,6 +277,7 @@ void destroy_dev(struct cdev *_dev); int destroy_dev_sched(struct cdev *dev); int destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg); void destroy_dev_drain(struct cdevsw *csw); +void dev_copyname(struct cdev *dev, char *path, size_t len); struct cdevsw *dev_refthread(struct cdev *_dev, int *_ref); struct cdevsw *devvn_refthread(struct vnode *vp, struct cdev **devp, int *_ref); void dev_relthread(struct cdev *_dev, int _ref); From nobody Thu Mar 27 20:48:42 2025 X-Original-To: dev-commits-src-all@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 4ZNwjl4VkYz5rt1K; Thu, 27 Mar 2025 20:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwjl0CFQz3d3r; Thu, 27 Mar 2025 20:48:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAH010jR0JrKj1ujcMTquajWSaNLpv8YIAHBe2enIY4=; b=hMKA5EXNOiMANnl4+Sv1nx1uXPUq4WvAi5BTBEjTmA688nJO5XBglUZd2YuNpmFaJVAsq8 +tK2uVFxw4PV/VhpEtK3AOm7jB2HKwIaRj6+qD/JVH/5lEkrAXL/SiPZFH9O7Bpb4LvUDC oQxw2ltbNbJcD8H5dEXJCXkJvVRudsUyhyBno+gAwiz56BPwwFSn407yc4ylh25P0Sc9Cm XmNtqnrlAWLyE8o/QqRfexlz7SY8IPV7ip83bnZvYDoZrVuDOw8J4XpqoeFtsKywnVNBcf fRj/PDS0gj8fJ9C9DI+J71nQH9BF0oPg+nJ6fE5jcQhaigTWUgvBLJbtGgpspw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743108523; a=rsa-sha256; cv=none; b=EgY4ISwR009ro2CSjjPEvmdD+9eaP4khZALNmH3tVtGYcjLzCDxviDnfUoPSvGLcwDJJBS fm+RoWFTe2yGY1Kd8lM8K7ZRm9LS8SvnhumwK0SfqU8/InToUyRiiFHms4If4FrOK7WOLp wM6F0EyHteWogx6GdRX1GWkdozul+r0I6drzjgakKznhoTe9rNmHPQ0jNjtRD//XVYb50w OlXW1AA6+FRS+H3CUAS++TTBSG31vzGJmdd6RkdjMQWAzA5Unkgk3GYTLI9o9bu3W6wEw/ uuelP1Pscgp3o9Xa5bH+SrKBLEzERZYMJZE0/LVeF5K/ImVILcKF7qOfEUjNPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAH010jR0JrKj1ujcMTquajWSaNLpv8YIAHBe2enIY4=; b=i+17uHlfgA+w2GmSxZN8duCVCMiw1gN66o0BOfkaxVzxyEO04w5VLQpjIAnxiiJixgvYy5 Sn6Jz8CsbfuZtVfeWUn0z6bDFy6dccetGS/UkCe151kCQbAeJZRfYt2rOBwS4Bl95vRrTN Pruc4WZmI4qH6QF+fOrKk0TmJW8VeorVLDNtIb1Q+2DCLWsQoQtVOsjObh6s8I57yneP8r PgxCE649RvV2n0y97gfpXKlLVL0ozdaGQDqP8XBP/2mjuUiMuN21sEQFAMi0XT4a049/Tl hhrE4qkjdoLHXMzt6YgfUy5SLdwQ0WzFK2lqg961WN3j4tR7vn9itjFRUW0gwQ== 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 4ZNwjk6qZtz1B8P; Thu, 27 Mar 2025 20:48: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 52RKmg93012932; Thu, 27 Mar 2025 20:48:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKmgNC012929; Thu, 27 Mar 2025 20:48:42 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:48:42 GMT Message-Id: <202503272048.52RKmgNC012929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: faaa687646d5 - main - sgx: Add a simple cdev_pg_path method List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: faaa687646d50507f6e64bbedde38de167393f45 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=faaa687646d50507f6e64bbedde38de167393f45 commit faaa687646d50507f6e64bbedde38de167393f45 Author: John Baldwin AuthorDate: 2025-03-27 20:44:55 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:44:55 +0000 sgx: Add a simple cdev_pg_path method This uses the constant string of "sgx" as the pathname Reviewed by: br, kib Differential Revision: https://reviews.freebsd.org/D49336 --- sys/amd64/sgx/sgx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/amd64/sgx/sgx.c b/sys/amd64/sgx/sgx.c index 1ada2a189f3c..1cc268102b1f 100644 --- a/sys/amd64/sgx/sgx.c +++ b/sys/amd64/sgx/sgx.c @@ -593,10 +593,17 @@ sgx_pg_fault(vm_object_t object, vm_ooffset_t offset, return (VM_PAGER_FAIL); } +static void +sgx_pg_path(void *handle, char *path, size_t len) +{ + strlcpy(path, "sgx", len); +} + static struct cdev_pager_ops sgx_pg_ops = { .cdev_pg_ctor = sgx_pg_ctor, .cdev_pg_dtor = sgx_pg_dtor, .cdev_pg_fault = sgx_pg_fault, + .cdev_pg_path = sgx_pg_path, }; static void From nobody Thu Mar 27 20:48:43 2025 X-Original-To: dev-commits-src-all@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 4ZNwjm2kRLz5rt92; Thu, 27 Mar 2025 20:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwjm0ncFz3d98; Thu, 27 Mar 2025 20:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kjkmd1cfd+AfIWmFLikqerhXfhhexyHuiQYWL46Iz1o=; b=Bzn/Iu+QzJmHukasXkTycFABO67x+uO0s7wWBk67bLzspuCle9BcnCByVxsrb2TU5FqZmA jhxYI0oVMmQ5+UYUZI+QeobZ8uVf7HhneETAnVEu0hAzrYTF7qDt+AWrSn1tLX9+Y7ymGX X8sW0suSew7GdW3DpahCmYtvf8/28vBzQSPQJ3mTzC6SSR2nVWgaPiQf/5KeAymd1g3GxB J1OF610A4FhSEr04Fz0SG/G+jt3BlwshfeoyAOmKtQOq6LB8MqgmHTr5NtZL7J3DXXhB18 27ZJEwuG+JbOkcqO2WX9HnSPTLo945R+vrgsIaNOa5ZAhNAbUePd6/dym7NnWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743108524; a=rsa-sha256; cv=none; b=iSCzMWEMc6cUY6XDZUbqFDYPGfavrnJvFS5mbBfsEy7ARp1LQZ9L1gFACRq7rONCxT+l33 MI/k8J0ogyFETzPLqk3A/bXSVq2rTT7zoJnmljnUFCIQb38w5aJ1Xru/EzIFV7QypYLxfR jN0q79JqY3CDW0A75OJ+5Dmg4RELVtEPk5kNKYugYuiId7ShtaJM8co7tbC61G5eDPtGm2 HQYGJoAUuO8SVGG6zGiWeVgqJgH9SMpvjFlq1KibhbiK1N8VL9XNhchCiPfeAvv3NbRH63 HLFV6vizfOm1U/II+tXpsHl/G9S2PuleOjM0sSYJRH6fhXESo9A8XOvBaEcg/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743108524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kjkmd1cfd+AfIWmFLikqerhXfhhexyHuiQYWL46Iz1o=; b=gJVDfjVHcS6QHksyi1taQ+QmZyxgjR0m9RXnS8+hyqfvETmbxUs0a6D7nCZwbjfuE493CY pi+r3qD8a3/NwNAh30yoam2TOZIwdlnjgNi2udnZgdrB2+WeLoObLacYDDvzDu14aVZ9gr sYJQqU9Y2PDqFPvM6aICx/uYzDYu7YmJTNgci05ZjfSjcjTF/bu1ztURvcj4k48DWSk78B 7v5EznJ24VfOTMxSHyjTd0BjxZZpFTXZBo3awh4ny1hlhsqcJn8/qlIMHouXOX/S3OHbR6 R6H3hVJ9a5/v2LMreJ5sTrRi1OekF2jGRdbnjwUWfxAGzcnOJ4aogMfJdEbf7g== 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 4ZNwjm0M26z1Bnb; Thu, 27 Mar 2025 20:48: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 52RKmhlh012965; Thu, 27 Mar 2025 20:48:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKmhZA012962; Thu, 27 Mar 2025 20:48:43 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:48:43 GMT Message-Id: <202503272048.52RKmhZA012962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7a5b9c4abcf2 - main - netmap: Add a cdev_pg_path hook that returns the name of the cdev List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7a5b9c4abcf24856b0a9bd2517373ada261ef943 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7a5b9c4abcf24856b0a9bd2517373ada261ef943 commit 7a5b9c4abcf24856b0a9bd2517373ada261ef943 Author: John Baldwin AuthorDate: 2025-03-27 20:45:06 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:45:06 +0000 netmap: Add a cdev_pg_path hook that returns the name of the cdev Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49337 --- sys/dev/netmap/netmap_freebsd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index 6448fdc74160..8cc543d54c2e 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -1025,11 +1025,20 @@ netmap_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, return (VM_PAGER_OK); } +static void +netmap_dev_pager_path(void *handle, char *path, size_t len) +{ + struct netmap_vm_handle_t *vmh = handle; + struct cdev *dev = vmh->dev; + + dev_copyname(dev, path, len); +} static struct cdev_pager_ops netmap_cdev_pager_ops = { .cdev_pg_ctor = netmap_dev_pager_ctor, .cdev_pg_dtor = netmap_dev_pager_dtor, .cdev_pg_fault = netmap_dev_pager_fault, + .cdev_pg_path = netmap_dev_pager_path, }; From nobody Thu Mar 27 20:59:48 2025 X-Original-To: dev-commits-src-all@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 4ZNwyX4b1Vz5rtW2; Thu, 27 Mar 2025 20:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwyX2d4gz3nhl; Thu, 27 Mar 2025 20:59:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRKVmzzU1giGCMSxpHaWerKVUtVN7ify4Cu23oTrD88=; b=mw7qn5Z4NszgqMKCXRp4hCd8LxM4M8F9CF8AaG2tXWh5EPaNkw25aIUeziw8MJZamL0GYQ +pmPNnhIKs7xCp77dmlgFBDMfO45c4ApUWlprS69LMivHL6XQTKlmcMKdkZuZAnrk7tWzv MJZA/KK/ytp3JmdYH2ds8ZLkleiizABGqLnMX9VXxBHM3VLQ+rIl8CwaGtufrXowcf1RdM IVOcHQhpfgew1WFjh12pccicvd/aQMimGnAGn6+OVCPq3q/sxwvD+yzA71G2hoR9FOyiOr 4S1dImydyfbBT/AhSGdGQi/YazI8WGNlU+cKj4GdFwCNt1CEzYH5rkQliSm3wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743109188; a=rsa-sha256; cv=none; b=m5RpeRdJI9Wt4qE+bbwATa+Im581Q1Ft8UtXbki63YpmS9cKgVWNWkebFBLxae22MDJYDB jNo4cyTq0Sx3loKuTusp5HmXyn3RVajmuhDatXKfJ7U4tdhq+XKG1cP5vh96xU01tYoMuv RWIguYxzyFmFCGod97tlrBau1DCOhD9/VQu+pUHcgPJW/AfbM9bDHNvaZXyBeZWsEQvCwu F0vKwznZ42jajKA8k36ZHgd4SMmPfJFa4sbegTuqv0H4YDcgUuZCfq88oj5wmwyu70edY2 a4UAY+e8rPz4LeRMplfpFrnWRee0JHjoqQw3NjGlChL473gJn0BKkUztN3fOCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRKVmzzU1giGCMSxpHaWerKVUtVN7ify4Cu23oTrD88=; b=uyexc6xlutlosQKI8nXpoL3AmJnO7haDwHFzdYjzedxUNtcWYq/NecK066Fb1HOBA2NBME V0q+Py2QhGSqZWQeWVNSBbsFXGDm84GrOKu/4X1u+MEFC/54/XQ3zjZQ0yi1TVXl8tMMqV ujLAk0hBLuAijkN4nuBYXfGHn4Xup84ALf8BAR3m4hO+UcwSt2AkhmeIO/v+R7iCRlooSK mjfM1qfw46VKlk9DyfFDQ5DTxWZ4bwcMyFjnz1xIRugKbFjru7k0Y66fWU101YH9EEjnoh 8htGkUZD4QOMtthpUrNcdOsZ73mJ4I+3xvS/5EOVV5H5dNPlRhrOO+y0wWnwNQ== 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 4ZNwyX27TLz1BxM; Thu, 27 Mar 2025 20:59: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 52RKxm70031769; Thu, 27 Mar 2025 20:59:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKxmUM031766; Thu, 27 Mar 2025 20:59:48 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:59:48 GMT Message-Id: <202503272059.52RKxmUM031766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 82d692771239 - main - pci: Clear active PME# and disable PME# generation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 82d692771239f1d156a875087dff4cf09f0e8b80 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=82d692771239f1d156a875087dff4cf09f0e8b80 commit 82d692771239f1d156a875087dff4cf09f0e8b80 Author: John Baldwin AuthorDate: 2025-03-27 20:53:24 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:53:24 +0000 pci: Clear active PME# and disable PME# generation The PCI power management specification requires that the OS clear any pending PME# interrupt and generation of PME# interrupts during "initial operating system load". Note that clearing a pending PME# interrupt requires writing a 1 to the Read/Write-Clear PME bit in the power management status register. To handle the boot time case, clear PME# state in pci_read_cap() when scanning new PCI devices. This should also cover hotplug devices. In addition, clear this state on every PCI device after resume from sleep in pci_resume_child before invoking the driver's DEVICE_RESUME method. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49222 --- share/man/man9/Makefile | 1 + share/man/man9/pci.9 | 8 ++++++++ sys/dev/cardbus/cardbus.c | 1 + sys/dev/pci/pci.c | 18 ++++++++++++++++++ sys/dev/pci/pcivar.h | 1 + 5 files changed, 29 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 8a3c36b0f8aa..7b48a32b5387 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1790,6 +1790,7 @@ MLINKS+=panic.9 vpanic.9 \ panic.9 KERNEL_PANICKED.9 MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_alloc_msix.9 \ + pci.9 pci_clear_pme.9 \ pci.9 pci_disable_busmaster.9 \ pci.9 pci_disable_io.9 \ pci.9 pci_enable_busmaster.9 \ diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9 index 3c3e54bf8760..0f3fc92c23e7 100644 --- a/share/man/man9/pci.9 +++ b/share/man/man9/pci.9 @@ -30,6 +30,7 @@ .Nm pci , .Nm pci_alloc_msi , .Nm pci_alloc_msix , +.Nm pci_clear_pme , .Nm pci_disable_busmaster , .Nm pci_disable_io , .Nm pci_enable_busmaster , @@ -81,6 +82,8 @@ .Fn pci_alloc_msi "device_t dev" "int *count" .Ft int .Fn pci_alloc_msix "device_t dev" "int *count" +.Ft void +.Fn pci_clear_pme "device_t dev" .Ft int .Fn pci_disable_busmaster "device_t dev" .Ft int @@ -670,6 +673,11 @@ then the function will fail with .Er EOPNOTSUPP . .Pp The +.Fn pci_clear_pme +function is used to clear any pending PME# signal and disable generation +of power management events. +.Pp +The .Fn pci_iov_attach function is used to advertise that the given device .Pq and associated device driver diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 21467a11cb68..e4d546799482 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -212,6 +212,7 @@ cardbus_attach_card(device_t cbdev) DEVPRINTF((cbdev, "Warning: Bogus CIS ignored\n")); pci_cfg_save(dinfo->pci.cfg.dev, &dinfo->pci, 0); pci_cfg_restore(dinfo->pci.cfg.dev, &dinfo->pci); + pci_clear_pme(child); cardbus_device_setup_regs(&dinfo->pci.cfg); pci_add_resources(cbdev, child, 1, dinfo->mprefetchable); pci_print_verbose(&dinfo->pci); diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index ad13e7f9a3a4..4c7ca27d8e64 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -2936,6 +2936,22 @@ pci_get_powerstate_method(device_t dev, device_t child) return (result); } +/* Clear any active PME# and disable PME# generation. */ +void +pci_clear_pme(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + pcicfgregs *cfg = &dinfo->cfg; + uint16_t status; + + if (cfg->pp.pp_cap != 0) { + status = pci_read_config(dev, dinfo->cfg.pp.pp_status, 2); + status &= ~PCIM_PSTAT_PMEENABLE; + status |= PCIM_PSTAT_PME; + pci_write_config(dev, dinfo->cfg.pp.pp_status, status, 2); + } +} + /* * Some convenience functions for PCI device drivers. */ @@ -4472,6 +4488,7 @@ pci_add_child(device_t bus, struct pci_devinfo *dinfo) resource_list_init(&dinfo->resources); pci_cfg_save(dev, dinfo, 0); pci_cfg_restore(dev, dinfo); + pci_clear_pme(dev); pci_print_verbose(dinfo); pci_add_resources(bus, dev, 0, 0); if (pci_enable_mps_tune) @@ -4662,6 +4679,7 @@ pci_resume_child(device_t dev, device_t child) dinfo = device_get_ivars(child); pci_cfg_restore(child, dinfo); + pci_clear_pme(child); if (!device_is_attached(child)) pci_cfg_save(child, dinfo, 1); diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index c0d54f8e58e0..1f99e9830930 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -686,6 +686,7 @@ void pci_restore_state(device_t dev); void pci_save_state(device_t dev); int pci_set_max_read_req(device_t dev, int size); int pci_power_reset(device_t dev); +void pci_clear_pme(device_t dev); uint32_t pcie_read_config(device_t dev, int reg, int width); void pcie_write_config(device_t dev, int reg, uint32_t value, int width); uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask, From nobody Thu Mar 27 20:59:49 2025 X-Original-To: dev-commits-src-all@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 4ZNwyZ2ByVz5rthS; Thu, 27 Mar 2025 20:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwyY3nXHz3ntT; Thu, 27 Mar 2025 20:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu7W21a5a4cSoKtcK9RyHAfapaKrdx2EAMIh4O4B7Iw=; b=dGtbncZlGtEHvfAJcRJVVLK6h1yEmbzzSF/Bo0HZueTOsVJ0Jq1Xj3pJ3EBap+w4Jvtdhs ZsmnkVajaXaCrbhLXTOv08rFHZK3rM70tdIUgUA01QFUdqzh6gOeYUZXxvRVeyimabFTjn K1bdTHN8xqg5DXmLkUQhkrWyhF0lZaqMu2T/lud6dDGdRyLSyV8mkV3tUJbUyL9QmR1eWR kw3EfoUCL8iLt/McHNDLi5QUwwI68CsB3tHhmfKYaMBGJafoRBeQZ6ReegKSr4lwndh5pc SXB/OdJ3MKKpVTpP/Nkaoq+qpxa/+ktR6iVl6bfNYs4lwBPTcpyeye8xM5kwKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743109189; a=rsa-sha256; cv=none; b=uixGxVHzQsClqr5DBc6iLpWgazfYZPp77Sw6OjqunPPN4qfahbtJJ0vwcmcPP+KDcAEE32 5aJiE57wbYIb9nmokv5mZU+QzLmLYs6KJ/B33g8/pAMxuA6epo3l3fQY5QYraX4TNuKhuk 1kH16MPG9MInqvDMjXUOiXZ9ApyT7ckebC/fxPwXVsOYyY0dXLyQTMMyMY1XwWYzvNOZVO /6SSfOwkq2oSOcQ6GftEzZAQC6RQK6J5T7oEgBQEZC6QTpEwf+l1pdZpdpC1aY4lJzLS77 hrUfYkPPtcAqKxU0F3+S1EWO0JEPipnIHxH2DdDhF32/8QhL7it3hJo2/c2BJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu7W21a5a4cSoKtcK9RyHAfapaKrdx2EAMIh4O4B7Iw=; b=gatXalmdfCVNJMlfDn9ZPJjfmUWlOBxTtySuI4vU83YjqudoZE55E+AH2KpI28WQ3vPNi/ RWdYJia4oM2s7q44ir3deVHIAsrCKlhGX30xcGQIJ9CGNQV3rPmtdU/OW18mRDr3yd4O/g rNf8DySDnvOltu62pAAagadogBEgGYF9LMT5veb836pcgGrzEvnrxEgSlhG+FRBB7+y94i 0rt5XTMrVk2i/TCLjHctnt9EeV07dkaJCreJ0hPgHyNG7erQWQPca+7H+2Sdp+DxD79ikl VacHw05yMY3Md2NDO28JgHJ44xfLs1Er3dgTd3ghZd8WrpVzGVYhscyFP91DbQ== 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 4ZNwyY3PL2z1Bs8; Thu, 27 Mar 2025 20:59: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 52RKxndn031804; Thu, 27 Mar 2025 20:59:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKxn5h031801; Thu, 27 Mar 2025 20:59:49 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:59:49 GMT Message-Id: <202503272059.52RKxn5h031801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e5cbf0e881fa - main - pci: Add helper routines to manage PME in device drivers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e5cbf0e881fa1851912be77c62aa7ab17f844c3d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e5cbf0e881fa1851912be77c62aa7ab17f844c3d commit e5cbf0e881fa1851912be77c62aa7ab17f844c3d Author: John Baldwin AuthorDate: 2025-03-27 20:53:58 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:55:03 +0000 pci: Add helper routines to manage PME in device drivers pci_has_pm is a quick check that returns true if a PCI device supports the power management capability. pci_enable_pme can be used in DEVICE_SUSPEND driver methods to enable PME# during suspend. Reviewed by: Krzysztof Galazka x Differential Revision: https://reviews.freebsd.org/D49250 --- share/man/man9/Makefile | 2 ++ share/man/man9/pci.9 | 19 ++++++++++++++++++- sys/dev/pci/pci.c | 24 ++++++++++++++++++++++++ sys/dev/pci/pcivar.h | 2 ++ 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7b48a32b5387..a43d2c9fef3f 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1795,6 +1795,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_disable_io.9 \ pci.9 pci_enable_busmaster.9 \ pci.9 pci_enable_io.9 \ + pci.9 pci_enable_pme.9 \ pci.9 pci_find_bsf.9 \ pci.9 pci_find_cap.9 \ pci.9 pci_find_dbsf.9 \ @@ -1807,6 +1808,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_get_powerstate.9 \ pci.9 pci_get_vpd_ident.9 \ pci.9 pci_get_vpd_readonly.9 \ + pci.9 pci_has_pm.9 \ pci.9 pci_iov_attach.9 \ pci.9 pci_iov_attach_name.9 \ pci.9 pci_iov_detach.9 \ diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9 index 0f3fc92c23e7..8f772e76ba99 100644 --- a/share/man/man9/pci.9 +++ b/share/man/man9/pci.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 20, 2021 +.Dd March 27, 2025 .Dt PCI 9 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm pci_disable_io , .Nm pci_enable_busmaster , .Nm pci_enable_io , +.Nm pci_enable_pme , .Nm pci_find_bsf , .Nm pci_find_cap , .Nm pci_find_dbsf , @@ -51,6 +52,7 @@ .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , .Nm pci_get_vpd_readonly , +.Nm pci_has_pm , .Nm pci_iov_attach , .Nm pci_iov_attach_name , .Nm pci_iov_detach , @@ -92,6 +94,8 @@ .Fn pci_enable_busmaster "device_t dev" .Ft int .Fn pci_enable_io "device_t dev" "int space" +.Ft void +.Fn pci_enable_pme "device_t dev" .Ft device_t .Fn pci_find_bsf "uint8_t bus" "uint8_t slot" "uint8_t func" .Ft int @@ -124,6 +128,8 @@ .Fn pci_get_vpd_ident "device_t dev" "const char **identptr" .Ft int .Fn pci_get_vpd_readonly "device_t dev" "const char *kw" "const char **vptr" +.Ft bool +.Fn pci_has_pm "device_t dev" .Ft int .Fn pci_msi_count "device_t dev" .Ft int @@ -358,6 +364,12 @@ When no more instances are located returns an error. .Pp The +.Fn pci_has_pm +function returns true if +.Fa dev +supports power management. +.Pp +The .Fn pci_find_extcap function is used to locate the first instance of a PCI-express extended capability register set for the device @@ -678,6 +690,11 @@ function is used to clear any pending PME# signal and disable generation of power management events. .Pp The +.Fn pci_enable_pme +function is used to enable generation of power management events before +suspending a device. +.Pp +The .Fn pci_iov_attach function is used to advertise that the given device .Pq and associated device driver diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 4c7ca27d8e64..2ee2f10924aa 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -2952,6 +2952,30 @@ pci_clear_pme(device_t dev) } } +/* Clear any active PME# and enable PME# generation. */ +void +pci_enable_pme(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + pcicfgregs *cfg = &dinfo->cfg; + uint16_t status; + + if (cfg->pp.pp_cap != 0) { + status = pci_read_config(dev, dinfo->cfg.pp.pp_status, 2); + status |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(dev, dinfo->cfg.pp.pp_status, status, 2); + } +} + +bool +pci_has_pm(device_t dev) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + pcicfgregs *cfg = &dinfo->cfg; + + return (cfg->pp.pp_cap != 0); +} + /* * Some convenience functions for PCI device drivers. */ diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 1f99e9830930..01fd67edb58d 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -687,6 +687,8 @@ void pci_save_state(device_t dev); int pci_set_max_read_req(device_t dev, int size); int pci_power_reset(device_t dev); void pci_clear_pme(device_t dev); +void pci_enable_pme(device_t dev); +bool pci_has_pm(device_t dev); uint32_t pcie_read_config(device_t dev, int reg, int width); void pcie_write_config(device_t dev, int reg, uint32_t value, int width); uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask, From nobody Thu Mar 27 20:59:50 2025 X-Original-To: dev-commits-src-all@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 4ZNwyb35jXz5rtqC; Thu, 27 Mar 2025 20:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwyZ4znQz3nl4; Thu, 27 Mar 2025 20:59:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9grKFDxUHus5ENXUhbFP02L0E8Vo4PWtENB8jbObgH0=; b=PGJCKooeAJ3ErkUwaRGzNnuo0VAj0zqpInWKmYNcLPmQKznnHujZmQdxNnGlAgHh0YEXF2 oSgkNh9B3qjaNG62De5X6gPzhlMLe6WrlATxhSRD5NusjeimDeGEUKznjB2KaQ2ntH/lhD sVgx1e5LkKPluxODdR4ehthhJF+VO4YuwRDgbuZZ3yQzJuo4eXzGPRKWpvnqxZrxvzBNKk iClDXbgAq85uBdYyndGc8sRtjWsYlWbtnX3P/1jHruiPBcZFpNkOZjMWZSWBD4AZv9COf+ GLu9Tkrd/ODvh6oujfP2WtzAPUA6b6Q1UybzYXVu7B9cNtwZSGcHYSLQwlBd7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743109190; a=rsa-sha256; cv=none; b=TjeXf6PKpECJXxUDMTSZUZ1uf17QYr3P7PThl+KVRrLf17UWWRBTPhGLHSfpgEcBkCnPLx JSPBhK6dh7mMN5bKNw/ef4pkRLiJNqS8WSO9PKemSSlQ4/d+c26UgN5cBCnpkvxOP79uFR 9kx6msaj+v5OGYGR243wmA5Tp/6REBAWmEF/37jJK9J+aUCQLj9jV4fv1TI2PXMFH975bE qPbyEXki4HV3pARd/8C3iDVZK9mEvRX95JmJVNj00d7C7kbjWa9iulMiJlscsO7sr4a4Fc 7ZhwBl01+Cp+Pt+aO5KYeifej29nkcAxSLIJJRClJoZG1FLq08tXyoUMK7UO5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9grKFDxUHus5ENXUhbFP02L0E8Vo4PWtENB8jbObgH0=; b=XAVFcaMfxw9dfN8L31CafjhBWaUJsuqLv3e9pIqUReR1tBzSLpF9yl4AcI2hzAIqKJZOVy XG5Fhh7CMz+m7UaePJ5U+pzEz4o9hKVN4d/xGsp5im1WOqZ+GHf2beDU1Vu6CTiUud+utm Z29eu1woUTVLa0d34oB3FlsSSXmpcq/fsUXnYQwYQKJ3UKvKEUQL97nBhczmaFkIFt2F9k uT7IQLfIFe8viFodf5tv8H0tAV/1TUinYTDLkv9BBaYxclVOvdVQ6sR2SpFj43unc81YWD ZH9PCtwEpjv5KahDLGJjpofI7lodhqRR8YXlQvr16tFpoxjbdHcD1YpJVEuQcA== 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 4ZNwyZ4LSSz1BxP; Thu, 27 Mar 2025 20:59: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 52RKxonh031842; Thu, 27 Mar 2025 20:59:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKxoov031837; Thu, 27 Mar 2025 20:59:50 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:59:50 GMT Message-Id: <202503272059.52RKxoov031837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ddaf6524682b - main - dev: Use recently added improvements to PME# support to simplify drivers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ddaf6524682b3ab9e50f7575db319814dbbd053a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ddaf6524682b3ab9e50f7575db319814dbbd053a commit ddaf6524682b3ab9e50f7575db319814dbbd053a Author: John Baldwin AuthorDate: 2025-03-27 20:55:12 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:55:12 +0000 dev: Use recently added improvements to PME# support to simplify drivers Depend on the PCI bus driver clearing PME# after resume to remove the need for clearing PME# from DEVICE_RESUME methods. Use pci_has_pm and pci_enable_pme. Reviewed by: Krzysztof Galazka Differential Revision: https://reviews.freebsd.org/D49251 --- sys/dev/ae/if_ae.c | 15 ++++----------- sys/dev/age/if_age.c | 15 +++++---------- sys/dev/age/if_agevar.h | 1 - sys/dev/alc/if_alc.c | 32 ++++---------------------------- sys/dev/alc/if_alcvar.h | 1 - sys/dev/ale/if_ale.c | 28 +++++----------------------- sys/dev/ale/if_alevar.h | 1 - sys/dev/e1000/if_em.c | 10 +++------- sys/dev/fxp/if_fxp.c | 34 ++++++++++------------------------ sys/dev/igc/if_igc.c | 10 +++------- sys/dev/jme/if_jme.c | 26 +++++--------------------- sys/dev/jme/if_jmevar.h | 1 - sys/dev/nfe/if_nfe.c | 11 +++-------- sys/dev/nge/if_nge.c | 23 +++-------------------- sys/dev/re/if_re.c | 14 ++++---------- sys/dev/rl/if_rl.c | 27 ++++----------------------- sys/dev/sis/if_sis.c | 15 +++------------ sys/dev/ste/if_ste.c | 25 ++++--------------------- sys/dev/vge/if_vge.c | 23 ++--------------------- sys/dev/vge/if_vgevar.h | 1 - sys/dev/vr/if_vr.c | 16 +++++----------- sys/dev/xl/if_xl.c | 16 ++++------------ sys/dev/xl/if_xlreg.h | 1 - 23 files changed, 71 insertions(+), 275 deletions(-) diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c index 2525c7aa4510..87de885701ae 100644 --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -238,7 +238,7 @@ ae_attach(device_t dev) if_t ifp; uint8_t chiprev; uint32_t pcirev; - int nmsi, pmc; + int nmsi; int error; sc = device_get_softc(dev); /* Automatically allocated and zeroed @@ -336,7 +336,7 @@ ae_attach(device_t dev) if_sethwassist(ifp, 0); if_setsendqlen(ifp, ifqmaxlen); if_setsendqready(ifp); - if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { + if (pci_has_pm(dev)) { if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC, 0); sc->flags |= AE_FLAG_PMG; } @@ -1302,9 +1302,7 @@ ae_pm_init(ae_softc_t *sc) { if_t ifp; uint32_t val; - uint16_t pmstat; struct mii_data *mii; - int pmc; AE_LOCK_ASSERT(sc); @@ -1363,13 +1361,8 @@ ae_pm_init(ae_softc_t *sc) /* * Configure PME. */ - if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) { - pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); - if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2); - } + if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) + pci_enable_pme(sc->dev); } static int diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c index c22a41b9c4e3..46d92ab11f53 100644 --- a/sys/dev/age/if_age.c +++ b/sys/dev/age/if_age.c @@ -460,7 +460,7 @@ age_attach(device_t dev) struct age_softc *sc; if_t ifp; uint16_t burst; - int error, i, msic, msixc, pmc; + int error, i, msic, msixc; error = 0; sc = device_get_softc(dev); @@ -600,8 +600,7 @@ age_attach(device_t dev) if_setsendqready(ifp); if_setcapabilities(ifp, IFCAP_HWCSUM | IFCAP_TSO4); if_sethwassist(ifp, AGE_CSUM_FEATURES | CSUM_TSO); - if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { - sc->age_flags |= AGE_FLAG_PMCAP; + if (pci_has_pm(dev)) { if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST, 0); } if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -1303,12 +1302,11 @@ age_setwol(struct age_softc *sc) if_t ifp; struct mii_data *mii; uint32_t reg, pmcs; - uint16_t pmstat; - int aneg, i, pmc; + int aneg, i; AGE_LOCK_ASSERT(sc); - if (pci_find_cap(sc->age_dev, PCIY_PMG, &pmc) != 0) { + if (!pci_has_pm(sc->age_dev)) { CSR_WRITE_4(sc, AGE_WOL_CFG, 0); /* * No PME capability, PHY power down. @@ -1414,11 +1412,8 @@ got_link: } /* Request PME. */ - pmstat = pci_read_config(sc->age_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->age_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->age_dev); #ifdef notyet /* See above for powering down PHY issues. */ if ((if_getcapenable(ifp) & IFCAP_WOL) == 0) { diff --git a/sys/dev/age/if_agevar.h b/sys/dev/age/if_agevar.h index 72073654d5d2..54e26fed8416 100644 --- a/sys/dev/age/if_agevar.h +++ b/sys/dev/age/if_agevar.h @@ -210,7 +210,6 @@ struct age_softc { #define AGE_FLAG_PCIX 0x0002 #define AGE_FLAG_MSI 0x0004 #define AGE_FLAG_MSIX 0x0008 -#define AGE_FLAG_PMCAP 0x0010 #define AGE_FLAG_DETACH 0x4000 #define AGE_FLAG_LINK 0x8000 diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index e03cfe590214..7d47054414d6 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -1594,10 +1594,9 @@ alc_attach(device_t dev) if_setsendqready(ifp); if_setcapabilities(ifp, IFCAP_TXCSUM | IFCAP_TSO4); if_sethwassist(ifp, ALC_CSUM_FEATURES | CSUM_TSO); - if (pci_find_cap(dev, PCIY_PMG, &base) == 0) { + if (pci_has_pm(dev)) { if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST, 0); sc->alc_flags |= ALC_FLAG_PM; - sc->alc_pmcap = base; } if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -2530,7 +2529,6 @@ alc_setwol_813x(struct alc_softc *sc) { if_t ifp; uint32_t reg, pmcs; - uint16_t pmstat; ALC_LOCK_ASSERT(sc); @@ -2579,13 +2577,8 @@ alc_setwol_813x(struct alc_softc *sc) CSR_READ_4(sc, ALC_MASTER_CFG) | MASTER_CLK_SEL_DIS); } /* Request PME. */ - pmstat = pci_read_config(sc->alc_dev, - sc->alc_pmcap + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->alc_dev, - sc->alc_pmcap + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->alc_dev); } static void @@ -2593,7 +2586,6 @@ alc_setwol_816x(struct alc_softc *sc) { if_t ifp; uint32_t gphy, mac, master, pmcs, reg; - uint16_t pmstat; ALC_LOCK_ASSERT(sc); @@ -2644,13 +2636,8 @@ alc_setwol_816x(struct alc_softc *sc) if ((sc->alc_flags & ALC_FLAG_PM) != 0) { /* Request PME. */ - pmstat = pci_read_config(sc->alc_dev, - sc->alc_pmcap + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->alc_dev, - sc->alc_pmcap + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->alc_dev); } } @@ -2674,22 +2661,11 @@ alc_resume(device_t dev) { struct alc_softc *sc; if_t ifp; - uint16_t pmstat; sc = device_get_softc(dev); - ALC_LOCK(sc); - if ((sc->alc_flags & ALC_FLAG_PM) != 0) { - /* Disable PME and clear PME status. */ - pmstat = pci_read_config(sc->alc_dev, - sc->alc_pmcap + PCIR_POWER_STATUS, 2); - if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->alc_dev, - sc->alc_pmcap + PCIR_POWER_STATUS, pmstat, 2); - } - } /* Reset PHY. */ + ALC_LOCK(sc); alc_phy_reset(sc); ifp = sc->alc_ifp; if ((if_getflags(ifp) & IFF_UP) != 0) { diff --git a/sys/dev/alc/if_alcvar.h b/sys/dev/alc/if_alcvar.h index f68c22146868..c3073c6f0a2e 100644 --- a/sys/dev/alc/if_alcvar.h +++ b/sys/dev/alc/if_alcvar.h @@ -219,7 +219,6 @@ struct alc_softc { uint32_t alc_dma_wr_burst; uint32_t alc_rcb; int alc_expcap; - int alc_pmcap; int alc_flags; #define ALC_FLAG_PCIE 0x0001 #define ALC_FLAG_PCIX 0x0002 diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c index c24ff2ea65cb..fa2306f1525e 100644 --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -452,7 +452,7 @@ ale_attach(device_t dev) struct ale_softc *sc; if_t ifp; uint16_t burst; - int error, i, msic, msixc, pmc; + int error, i, msic, msixc; uint32_t rxf_len, txf_len; error = 0; @@ -619,8 +619,7 @@ ale_attach(device_t dev) if_setsendqready(ifp); if_setcapabilities(ifp, IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4); if_sethwassist(ifp, ALE_CSUM_FEATURES | CSUM_TSO); - if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { - sc->ale_flags |= ALE_FLAG_PMCAP; + if (pci_has_pm(dev)) { if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST, 0); } if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -1467,12 +1466,10 @@ ale_setwol(struct ale_softc *sc) { if_t ifp; uint32_t reg, pmcs; - uint16_t pmstat; - int pmc; ALE_LOCK_ASSERT(sc); - if (pci_find_cap(sc->ale_dev, PCIY_PMG, &pmc) != 0) { + if (!pci_has_pm(sc->ale_dev)) { /* Disable WOL. */ CSR_WRITE_4(sc, ALE_WOL_CFG, 0); reg = CSR_READ_4(sc, ALE_PCIE_PHYMISC); @@ -1518,11 +1515,8 @@ ale_setwol(struct ale_softc *sc) GPHY_CTRL_PWDOWN_HW); } /* Request PME. */ - pmstat = pci_read_config(sc->ale_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->ale_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->ale_dev); } static int @@ -1545,23 +1539,11 @@ ale_resume(device_t dev) { struct ale_softc *sc; if_t ifp; - int pmc; - uint16_t pmstat; sc = device_get_softc(dev); - ALE_LOCK(sc); - if (pci_find_cap(sc->ale_dev, PCIY_PMG, &pmc) == 0) { - /* Disable PME and clear PME status. */ - pmstat = pci_read_config(sc->ale_dev, - pmc + PCIR_POWER_STATUS, 2); - if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->ale_dev, - pmc + PCIR_POWER_STATUS, pmstat, 2); - } - } /* Reset PHY. */ + ALE_LOCK(sc); ale_phy_reset(sc); ifp = sc->ale_ifp; if ((if_getflags(ifp) & IFF_UP) != 0) { diff --git a/sys/dev/ale/if_alevar.h b/sys/dev/ale/if_alevar.h index 2baff5106b81..74ed9edb0ff3 100644 --- a/sys/dev/ale/if_alevar.h +++ b/sys/dev/ale/if_alevar.h @@ -200,7 +200,6 @@ struct ale_softc { #define ALE_FLAG_PCIX 0x0002 #define ALE_FLAG_MSI 0x0004 #define ALE_FLAG_MSIX 0x0008 -#define ALE_FLAG_PMCAP 0x0010 #define ALE_FLAG_FASTETHER 0x0020 #define ALE_FLAG_JUMBO 0x0040 #define ALE_FLAG_RXCSUM_BUG 0x0080 diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 449cb9e07f3a..f49682285875 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4503,10 +4503,9 @@ em_enable_wakeup(if_ctx_t ctx) device_t dev = iflib_get_dev(ctx); if_t ifp = iflib_get_ifp(ctx); int error = 0; - u32 pmc, ctrl, ctrl_ext, rctl; - u16 status; + u32 ctrl, ctrl_ext, rctl; - if (pci_find_cap(dev, PCIY_PMG, &pmc) != 0) + if (!pci_has_pm(dev)) return; /* @@ -4563,11 +4562,8 @@ em_enable_wakeup(if_ctx_t ctx) e1000_igp3_phy_powerdown_workaround_ich8lan(&sc->hw); pme: - status = pci_read_config(dev, pmc + PCIR_POWER_STATUS, 2); - status &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if (!error && (if_getcapenable(ifp) & IFCAP_WOL)) - status |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(dev, pmc + PCIR_POWER_STATUS, status, 2); + pci_enable_pme(dev); return; } diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index b26879cfa25c..7b17b054abb9 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -431,7 +431,7 @@ fxp_attach(device_t dev) uint32_t val; uint16_t data; u_char eaddr[ETHER_ADDR_LEN]; - int error, flags, i, pmc, prefer_iomap; + int error, flags, i, prefer_iomap; error = 0; sc = device_get_softc(dev); @@ -518,8 +518,7 @@ fxp_attach(device_t dev) if (sc->revision >= FXP_REV_82558_A4 && sc->revision != FXP_REV_82559S_A) { data = sc->eeprom[FXP_EEPROM_MAP_ID]; - if ((data & 0x20) != 0 && - pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) + if ((data & 0x20) != 0 && pci_has_pm(sc->dev)) sc->flags |= FXP_FLAG_WOLCAP; } @@ -1054,24 +1053,17 @@ fxp_suspend(device_t dev) { struct fxp_softc *sc = device_get_softc(dev); if_t ifp; - int pmc; - uint16_t pmstat; FXP_LOCK(sc); ifp = sc->ifp; - if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) { - pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); - if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0) { - /* Request PME. */ - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - sc->flags |= FXP_FLAG_WOL; - /* Reconfigure hardware to accept magic frames. */ - if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); - fxp_init_body(sc, 0); - } - pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0) { + /* Request PME. */ + pci_enable_pme(sc->dev); + sc->flags |= FXP_FLAG_WOL; + /* Reconfigure hardware to accept magic frames. */ + if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); + fxp_init_body(sc, 0); } fxp_stop(sc); @@ -1090,17 +1082,11 @@ fxp_resume(device_t dev) { struct fxp_softc *sc = device_get_softc(dev); if_t ifp = sc->ifp; - int pmc; - uint16_t pmstat; FXP_LOCK(sc); - if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) { + if (pci_has_pm(sc->dev)) { sc->flags &= ~FXP_FLAG_WOL; - pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); - /* Disable PME and clear PME status. */ - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2); if ((sc->flags & FXP_FLAG_WOLCAP) != 0) CSR_WRITE_1(sc, FXP_CSR_PMDR, CSR_READ_1(sc, FXP_CSR_PMDR)); diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 7402f89d56ff..318d2770911c 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -2450,10 +2450,9 @@ igc_enable_wakeup(if_ctx_t ctx) device_t dev = iflib_get_dev(ctx); if_t ifp = iflib_get_ifp(ctx); int error = 0; - u32 pmc, ctrl, rctl; - u16 status; + u32 ctrl, rctl; - if (pci_find_cap(dev, PCIY_PMG, &pmc) != 0) + if (!pci_has_pm(dev)) return; /* @@ -2487,11 +2486,8 @@ igc_enable_wakeup(if_ctx_t ctx) IGC_WRITE_REG(&sc->hw, IGC_WUFC, sc->wol); pme: - status = pci_read_config(dev, pmc + PCIR_POWER_STATUS, 2); - status &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if (!error && (if_getcapenable(ifp) & IFCAP_WOL)) - status |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(dev, pmc + PCIR_POWER_STATUS, status, 2); + pci_enable_pme(dev); return; } diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index 834717d849a0..d9982a2f031c 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -625,7 +625,7 @@ jme_attach(device_t dev) struct mii_data *mii; uint32_t reg; uint16_t burst; - int error, i, mii_flags, msic, msixc, pmc; + int error, i, mii_flags, msic, msixc; error = 0; sc = device_get_softc(dev); @@ -815,8 +815,7 @@ jme_attach(device_t dev) /* JMC250 supports Tx/Rx checksum offload as well as TSO. */ if_setcapabilities(ifp, IFCAP_HWCSUM | IFCAP_TSO4); if_sethwassist(ifp, JME_CSUM_FEATURES | CSUM_TSO); - if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { - sc->jme_flags |= JME_FLAG_PMCAP; + if (pci_has_pm(dev)) { if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC, 0); } if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -1562,12 +1561,10 @@ jme_setwol(struct jme_softc *sc) { if_t ifp; uint32_t gpr, pmcs; - uint16_t pmstat; - int pmc; JME_LOCK_ASSERT(sc); - if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) != 0) { + if (!pci_has_pm(sc->jme_dev)) { /* Remove Tx MAC/offload clock to save more power. */ if ((sc->jme_flags & JME_FLAG_TXCLK) != 0) CSR_WRITE_4(sc, JME_GHC, CSR_READ_4(sc, JME_GHC) & @@ -1602,11 +1599,8 @@ jme_setwol(struct jme_softc *sc) ~(GHC_TX_OFFLD_CLK_100 | GHC_TX_MAC_CLK_100 | GHC_TX_OFFLD_CLK_1000 | GHC_TX_MAC_CLK_1000)); /* Request PME. */ - pmstat = pci_read_config(sc->jme_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->jme_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->jme_dev); if ((if_getcapenable(ifp) & IFCAP_WOL) == 0) { /* No WOL, PHY power down. */ jme_phy_down(sc); @@ -1633,21 +1627,11 @@ jme_resume(device_t dev) { struct jme_softc *sc; if_t ifp; - uint16_t pmstat; - int pmc; sc = device_get_softc(dev); - JME_LOCK(sc); - if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) == 0) { - pmstat = pci_read_config(sc->jme_dev, - pmc + PCIR_POWER_STATUS, 2); - /* Disable PME clear PME status. */ - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->jme_dev, - pmc + PCIR_POWER_STATUS, pmstat, 2); - } /* Wakeup PHY. */ + JME_LOCK(sc); jme_phy_up(sc); ifp = sc->jme_ifp; if ((if_getflags(ifp) & IFF_UP) != 0) { diff --git a/sys/dev/jme/if_jmevar.h b/sys/dev/jme/if_jmevar.h index c22c0dee1077..5be250567f8c 100644 --- a/sys/dev/jme/if_jmevar.h +++ b/sys/dev/jme/if_jmevar.h @@ -190,7 +190,6 @@ struct jme_softc { #define JME_FLAG_PCIX 0x00000004 #define JME_FLAG_MSI 0x00000008 #define JME_FLAG_MSIX 0x00000010 -#define JME_FLAG_PMCAP 0x00000020 #define JME_FLAG_FASTETH 0x00000040 #define JME_FLAG_NOJUMBO 0x00000080 #define JME_FLAG_RXCLK 0x00000100 diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index 8df4ca27ac9d..4625c2616562 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -608,7 +608,7 @@ nfe_attach(device_t dev) (IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWTSO), 0); } - if (pci_find_cap(dev, PCIY_PMG, ®) == 0) + if (pci_has_pm(dev)) if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC, 0); if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -3309,12 +3309,10 @@ nfe_set_wol(struct nfe_softc *sc) { if_t ifp; uint32_t wolctl; - int pmc; - uint16_t pmstat; NFE_LOCK_ASSERT(sc); - if (pci_find_cap(sc->nfe_dev, PCIY_PMG, &pmc) != 0) + if (!pci_has_pm(sc->nfe_dev)) return; ifp = sc->nfe_ifp; if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0) @@ -3334,9 +3332,6 @@ nfe_set_wol(struct nfe_softc *sc) NFE_RX_START); } /* Request PME if WOL is requested. */ - pmstat = pci_read_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->nfe_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->nfe_dev); } diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 90650bf353a5..b9cf77cc0428 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -915,7 +915,7 @@ nge_attach(device_t dev) * supply(3VAUX) to drive PME such that checking PCI power * management capability is necessary. */ - if (pci_find_cap(sc->nge_dev, PCIY_PMG, &i) == 0) + if (pci_has_pm(sc->nge_dev)) if_setcapabilitiesbit(ifp, IFCAP_WOL, 0); if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -2510,12 +2510,10 @@ nge_wol(struct nge_softc *sc) { if_t ifp; uint32_t reg; - uint16_t pmstat; - int pmc; NGE_LOCK_ASSERT(sc); - if (pci_find_cap(sc->nge_dev, PCIY_PMG, &pmc) != 0) + if (!pci_has_pm(sc->nge_dev)) return; ifp = sc->nge_ifp; @@ -2556,11 +2554,8 @@ nge_wol(struct nge_softc *sc) } /* Request PME. */ - pmstat = pci_read_config(sc->nge_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->nge_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->nge_dev); } /* @@ -2595,23 +2590,11 @@ nge_resume(device_t dev) { struct nge_softc *sc; if_t ifp; - uint16_t pmstat; - int pmc; sc = device_get_softc(dev); NGE_LOCK(sc); ifp = sc->nge_ifp; - if (pci_find_cap(sc->nge_dev, PCIY_PMG, &pmc) == 0) { - /* Disable PME and clear PME status. */ - pmstat = pci_read_config(sc->nge_dev, - pmc + PCIR_POWER_STATUS, 2); - if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->nge_dev, - pmc + PCIR_POWER_STATUS, pmstat, 2); - } - } if (if_getflags(ifp) & IFF_UP) { if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); nge_init_locked(sc); diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index f6c28209d504..091ab2db72ec 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1685,7 +1685,7 @@ re_attach(device_t dev) if (if_getcapabilities(ifp) & IFCAP_HWCSUM) if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWCSUM, 0); /* Enable WOL if PM is supported. */ - if (pci_find_cap(sc->rl_dev, PCIY_PMG, ®) == 0) + if (pci_has_pm(sc->rl_dev)) if_setcapabilitiesbit(ifp, IFCAP_WOL, 0); if_setcapenable(ifp, if_getcapabilities(ifp)); if_setcapenablebit(ifp, 0, (IFCAP_WOL_UCAST | IFCAP_WOL_MCAST)); @@ -3859,13 +3859,11 @@ static void re_setwol(struct rl_softc *sc) { if_t ifp; - int pmc; - uint16_t pmstat; uint8_t v; RL_LOCK_ASSERT(sc); - if (pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) != 0) + if (!pci_has_pm(sc->rl_dev)) return; ifp = sc->rl_ifp; @@ -3927,22 +3925,18 @@ re_setwol(struct rl_softc *sc) */ /* Request PME if WOL is requested. */ - pmstat = pci_read_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->rl_dev); } static void re_clrwol(struct rl_softc *sc) { - int pmc; uint8_t v; RL_LOCK_ASSERT(sc); - if (pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) != 0) + if (!pci_has_pm(sc->rl_dev)) return; /* Enable config register write. */ diff --git a/sys/dev/rl/if_rl.c b/sys/dev/rl/if_rl.c index 4a5f375c2dd3..c045e57fb79a 100644 --- a/sys/dev/rl/if_rl.c +++ b/sys/dev/rl/if_rl.c @@ -640,7 +640,7 @@ rl_attach(device_t dev) const struct rl_type *t; struct sysctl_ctx_list *ctx; struct sysctl_oid_list *children; - int error = 0, hwrev, i, phy, pmc, rid; + int error = 0, hwrev, i, phy, rid; int prefer_iomap, unit; uint16_t rl_did = 0; char tn[32]; @@ -803,8 +803,7 @@ rl_attach(device_t dev) if_setinitfn(ifp, rl_init); if_setcapabilities(ifp, IFCAP_VLAN_MTU); /* Check WOL for RTL8139B or newer controllers. */ - if (sc->rl_type == RL_8139 && - pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { + if (sc->rl_type == RL_8139 && pci_has_pm(sc->rl_dev)) { hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; switch (hwrev) { case RL_HWREV_8139B: @@ -1972,24 +1971,13 @@ rl_resume(device_t dev) { struct rl_softc *sc; if_t ifp; - int pmc; - uint16_t pmstat; sc = device_get_softc(dev); ifp = sc->rl_ifp; RL_LOCK(sc); - if ((if_getcapabilities(ifp) & IFCAP_WOL) != 0 && - pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { - /* Disable PME and clear PME status. */ - pmstat = pci_read_config(sc->rl_dev, - pmc + PCIR_POWER_STATUS, 2); - if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->rl_dev, - pmc + PCIR_POWER_STATUS, pmstat, 2); - } + if ((if_getcapabilities(ifp) & IFCAP_WOL) != 0) { /* * Clear WOL matching such that normal Rx filtering * wouldn't interfere with WOL patterns. @@ -2037,8 +2025,6 @@ static void rl_setwol(struct rl_softc *sc) { if_t ifp; - int pmc; - uint16_t pmstat; uint8_t v; RL_LOCK_ASSERT(sc); @@ -2046,8 +2032,6 @@ rl_setwol(struct rl_softc *sc) ifp = sc->rl_ifp; if ((if_getcapabilities(ifp) & IFCAP_WOL) == 0) return; - if (pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) != 0) - return; /* Enable config register write. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); @@ -2080,11 +2064,8 @@ rl_setwol(struct rl_softc *sc) CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); /* Request PME if WOL is requested. */ - pmstat = pci_read_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->rl_dev); } static void diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c index 5879674b4fbb..d00cf0a8128c 100644 --- a/sys/dev/sis/if_sis.c +++ b/sys/dev/sis/if_sis.c @@ -898,7 +898,7 @@ sis_attach(device_t dev) u_char eaddr[ETHER_ADDR_LEN]; struct sis_softc *sc; if_t ifp; - int error = 0, pmc; + int error = 0; sc = device_get_softc(dev); @@ -1066,7 +1066,7 @@ sis_attach(device_t dev) if_setsendqlen(ifp, SIS_TX_LIST_CNT - 1); if_setsendqready(ifp); - if (pci_find_cap(sc->sis_dev, PCIY_PMG, &pmc) == 0) { + if (pci_has_pm(sc->sis_dev)) { if (sc->sis_type == SIS_TYPE_83815) if_setcapabilitiesbit(ifp, IFCAP_WOL, 0); else @@ -2311,8 +2311,6 @@ sis_wol(struct sis_softc *sc) { if_t ifp; uint32_t val; - uint16_t pmstat; - int pmc; ifp = sc->sis_ifp; if ((if_getcapenable(ifp) & IFCAP_WOL) == 0) @@ -2339,20 +2337,13 @@ sis_wol(struct sis_softc *sc) /* Enable silent RX mode. */ SIS_SETBIT(sc, SIS_CSR, SIS_CSR_RX_ENABLE); } else { - if (pci_find_cap(sc->sis_dev, PCIY_PMG, &pmc) != 0) - return; val = 0; if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0) val |= SIS_PWRMAN_WOL_MAGIC; CSR_WRITE_4(sc, SIS_PWRMAN_CTL, val); /* Request PME. */ - pmstat = pci_read_config(sc->sis_dev, - pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->sis_dev, - pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->sis_dev); } } diff --git a/sys/dev/ste/if_ste.c b/sys/dev/ste/if_ste.c index 7b347a97712f..bf8f6fafec11 100644 --- a/sys/dev/ste/if_ste.c +++ b/sys/dev/ste/if_ste.c @@ -905,7 +905,7 @@ ste_attach(device_t dev) struct ste_softc *sc; if_t ifp; uint16_t eaddr[ETHER_ADDR_LEN / 2]; - int error = 0, phy, pmc, prefer_iomap, rid; + int error = 0, phy, prefer_iomap, rid; sc = device_get_softc(dev); sc->ste_dev = dev; @@ -1020,7 +1020,7 @@ ste_attach(device_t dev) */ if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); if_setcapabilitiesbit(ifp, IFCAP_VLAN_MTU, 0); - if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) + if (pci_has_pm(dev)) if_setcapabilitiesbit(ifp, IFCAP_WOL_MAGIC, 0); if_setcapenable(ifp, if_getcapabilities(ifp)); #ifdef DEVICE_POLLING @@ -1992,21 +1992,9 @@ ste_resume(device_t dev) { struct ste_softc *sc; if_t ifp; - int pmc; - uint16_t pmstat; sc = device_get_softc(dev); STE_LOCK(sc); - if (pci_find_cap(sc->ste_dev, PCIY_PMG, &pmc) == 0) { - /* Disable PME and clear PME status. */ - pmstat = pci_read_config(sc->ste_dev, - pmc + PCIR_POWER_STATUS, 2); - if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->ste_dev, - pmc + PCIR_POWER_STATUS, pmstat, 2); - } - } ifp = sc->ste_ifp; if ((if_getflags(ifp) & IFF_UP) != 0) { if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); @@ -2095,13 +2083,11 @@ static void ste_setwol(struct ste_softc *sc) { if_t ifp; - uint16_t pmstat; uint8_t val; - int pmc; STE_LOCK_ASSERT(sc); - if (pci_find_cap(sc->ste_dev, PCIY_PMG, &pmc) != 0) { + if (!pci_has_pm(sc->ste_dev)) { /* Disable WOL. */ CSR_READ_1(sc, STE_WAKE_EVENT); CSR_WRITE_1(sc, STE_WAKE_EVENT, 0); @@ -2116,9 +2102,6 @@ ste_setwol(struct ste_softc *sc) val |= STE_WAKEEVENT_MAGICPKT_ENB | STE_WAKEEVENT_WAKEONLAN_ENB; CSR_WRITE_1(sc, STE_WAKE_EVENT, val); /* Request PME. */ - pmstat = pci_read_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); + pci_enable_pme(sc->ste_dev); } diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 395715e67e48..227ce30d9a2c 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -1024,10 +1024,8 @@ vge_attach(device_t dev) sc->vge_expcap = cap; } else sc->vge_flags |= VGE_FLAG_JUMBO; - if (pci_find_cap(dev, PCIY_PMG, &cap) == 0) { + if (pci_has_pm(dev)) sc->vge_flags |= VGE_FLAG_PMCAP; - sc->vge_pmcap = cap; - } rid = 0; msic = pci_msi_count(dev); if (msi_disable == 0 && msic > 0) { @@ -2444,20 +2442,9 @@ vge_resume(device_t dev) { struct vge_softc *sc; if_t ifp; - uint16_t pmstat; sc = device_get_softc(dev); VGE_LOCK(sc); - if ((sc->vge_flags & VGE_FLAG_PMCAP) != 0) { - /* Disable PME and clear PME status. */ - pmstat = pci_read_config(sc->vge_dev, - sc->vge_pmcap + PCIR_POWER_STATUS, 2); - if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->vge_dev, - sc->vge_pmcap + PCIR_POWER_STATUS, pmstat, 2); - } - } vge_clrwol(sc); /* Restart MII auto-polling. */ vge_miipoll_start(sc); @@ -2836,7 +2823,6 @@ static void vge_setwol(struct vge_softc *sc) { if_t ifp; - uint16_t pmstat; uint8_t val; VGE_LOCK_ASSERT(sc); @@ -2888,13 +2874,8 @@ vge_setwol(struct vge_softc *sc) val |= VGE_STICKHW_DS0 | VGE_STICKHW_DS1; CSR_WRITE_1(sc, VGE_PWRSTAT, val); /* Request PME if WOL is requested. */ - pmstat = pci_read_config(sc->vge_dev, sc->vge_pmcap + - PCIR_POWER_STATUS, 2); - pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((if_getcapenable(ifp) & IFCAP_WOL) != 0) - pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(sc->vge_dev, sc->vge_pmcap + PCIR_POWER_STATUS, - pmstat, 2); + pci_enable_pme(sc->vge_dev); } static void diff --git a/sys/dev/vge/if_vgevar.h b/sys/dev/vge/if_vgevar.h index 84bd7bcb0fc5..d2b1cf8e4b2a 100644 --- a/sys/dev/vge/if_vgevar.h +++ b/sys/dev/vge/if_vgevar.h @@ -191,7 +191,6 @@ struct vge_softc { #define VGE_FLAG_SUSPENDED 0x4000 #define VGE_FLAG_LINK 0x8000 int vge_expcap; *** 124 LINES SKIPPED *** From nobody Thu Mar 27 20:59:51 2025 X-Original-To: dev-commits-src-all@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 4ZNwyc3J8Kz5rtkS; Thu, 27 Mar 2025 20:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwyb61hMz3ntd; Thu, 27 Mar 2025 20:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rrYut5alV833pbaUwRddN6pRemoOdbCPuckJQZ9yPDc=; b=cw4zTrv2EYXSAAD5Gh5pI/7LSV4+0eoCPwwHnF1aOUyXEU5hAmKcpjZPbRc2tw+gpfrSBT /JIjd3k/oUPeMsH0xEepS0L7RdWeWXrJbNq5+cdmrQpcBX7oUU8etyt44bEY5CJa8pUTZ2 XIITnOP4FcaWctu7nBZqmJhO6VK4xWpwPfMUqinXW7Rok6pJAvstoXDzaM4dopr8leJkMM N5cVGqRaAWebA7H5Wxp1wK6blIV2XVjt5YI2fKX5h9iScut6/S0GtkEUYYMZEYc+3Pv7YK xz/SGVyHiUbZL3DqhupLVpJpJ6YR8Brsq8EVGhlznjIEtW1TUeHqpPm9ghbL+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743109191; a=rsa-sha256; cv=none; b=xYZtHaKEMb4DegO2Mrz9uxZ7GdA2MOeL2RbDCmC7iL+2hbOmPglGv9AltxgVOKp09/Xq2O ujWt5cdhlV5aVYvgiIfXVx4k0MIAxh6WVoJyCnZNUUYio5TBwcx2DqapH+2d2Pw0RJj0LE V26I7mgIrAkPF+QerQ1bCnONGwiAKJRDlYl25yNKLx1zWQ9QPbeHi/Ie2ecjB4YwN+RSBS pM/00jyp7pCoXroQ8QTut2AbDEpJBa5GPojNeT7xOwmC0lSIoKOX0XeIQsuRNGo26j3oG6 6XMo2E30fTs/mp6Oh2rdRy101hKXSCu64O15M2rNh/DNJQc6ImhEDLV4nCHi9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rrYut5alV833pbaUwRddN6pRemoOdbCPuckJQZ9yPDc=; b=BLtTyie8oAD1UPirYKwiAvauIgroEtnwqsj3GpjV10OUjlnJjBK1XF8p7YLaBC8oCCjAfl OJlBcL8+sQzXADICsGGbM9SmYGDzHpFEDhKizgsGkTyMJrdHDNBtBjAgzjx7sy2FXGcPFt kEFgD1+ESj/N4Z3eku9rAtwq0INu1popbBEoXJLcbzBgDR0CCdRwFZXaGHUu14RIepRk7L P7k8FPxA77nrI7cCt9MJtsKmqsXMJx/xVfSyATiS5QkfIZqxB3mWlniBBP0jXYhWyaXvrY Rul9lniEBJacFoI8HGA8Dl2MpNPIZUSbapujBhQccpMbfdC5QGxtQuHRYxZ0cA== 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 4ZNwyb5GtGz1Bs9; Thu, 27 Mar 2025 20:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52RKxpTc031878; Thu, 27 Mar 2025 20:59:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKxpGO031875; Thu, 27 Mar 2025 20:59:51 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:59:51 GMT Message-Id: <202503272059.52RKxpGO031875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 931baeb62b03 - main - acpi_pci: Use pci_has_pm and pci_clear_pme List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 931baeb62b03029cb57459736851c4e8141e672e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=931baeb62b03029cb57459736851c4e8141e672e commit 931baeb62b03029cb57459736851c4e8141e672e Author: John Baldwin AuthorDate: 2025-03-27 20:56:08 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:56:08 +0000 acpi_pci: Use pci_has_pm and pci_clear_pme Differential Revision: https://reviews.freebsd.org/D49266 --- sys/dev/acpica/acpi_pci.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c index b7a2bf70b4e0..646295f9eecc 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -391,8 +391,6 @@ acpi_pci_device_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { device_t child, dev; ACPI_STATUS status; - int pmc; - uint16_t pmstat; int error; dev = context; @@ -419,12 +417,8 @@ acpi_pci_device_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) return; } if ((acpi_quirks & ACPI_Q_CLEAR_PME_ON_DETACH) && - (pci_find_cap(child, PCIY_PMG, &pmc) == 0)) { - pmstat = pci_read_config(child, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pmstat |= PCIM_PSTAT_PME; - pci_write_config(child, pmc + PCIR_POWER_STATUS, pmstat, 2); - } + pci_has_pm(child)) + pci_clear_pme(child); status = acpi_SetInteger(h, "_EJ0", 1); if (ACPI_FAILURE(status)) { bus_topo_unlock(); From nobody Thu Mar 27 20:59:52 2025 X-Original-To: dev-commits-src-all@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 4ZNwyd3jJTz5rtvk; Thu, 27 Mar 2025 20:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNwyc6lLlz3nlF; Thu, 27 Mar 2025 20:59:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KsrwCI2WgsmLNvYzLhUN5aZK556GcbYhDA3GJ5FPJk=; b=Q/U2ol88wz5F653Bx6JGXykbIAvOITKr7nwMbg5deAfeIPbXxxn6bp8RDlnnA2w/GjCVvR kHszBI2t2ZWOGuAIRFLrWAk/TXUlZ/tuLi1h/p2547nSjYVbALZQlOqq0oK35y2JqywgGZ sZ0Wa6Dj/i7XQDsWNPKos4i0OXAe2+Nw+Le/ouL8i6yYLzBM8RcUco+Qop29CN7Al7+Lfn 6a0j4SpnEioN1/wc2afCnmK9lEKw3Ym7y0hgAYvaDkSx2yxM8VST7aVCHg3+SHVewo3CYB g2mcPhBQZbCNmohPiZpBK/svaFGQWyLY6HJ6orNTIXgreuFdOXDQN/2VIXCC0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743109192; a=rsa-sha256; cv=none; b=D9/LUYp3tUKmXEbc9Q9CxoW2AAXCeICLuDT9ctzeoCj0qxKtM91VF+8I/S9UMNaHyvvAZ9 5XLxI14bx78st8TyvY5+HM0a20TxlXiEsvPvlj46R3+WOGFtBEaiYrbuSqzkRWToVi4JYx Q1QMAqCmsXXolvErCy/sb3B1KOW7rAaahJmgltbu6LhtO8HP+jdfL+DuTbQW6Myc/vLBFd inynseuoagg2WGZO0lmLIvcWTNz6GGJM3UPyaWg8I8eiEeHmHb9jIdyyxJI1rVQvQCb54C My0ZqargCRPe8qX4fm/r4jYNyDmwNtSK9T56U1XsL67zmGmLLCi38vbV3Fb6fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743109192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KsrwCI2WgsmLNvYzLhUN5aZK556GcbYhDA3GJ5FPJk=; b=aTT1XYzGIgCuVlf5xWp1ZzC+UnmtgzQdDf58TEaLc2KrzMs6Gj0txz3HY7O0/0HZlGmjkI 65AQrI6Pv4EUYmCG+YH1UTmWAv56Z9S0otmDCjcuZmo3Upd3iiVf2lnZrXPA6eYtvbGYtY qNzIAkQx05RSAVFszldkJGlyq2iktlzb2yQejO2kmlTAtpq6N329wIGjKc4/kuXRbtO4i1 IddIdgmfYpcelp3AFWZMdDgj0n16K4NpQMoivJ8qMcOVuMlx3VF7rG0CmjlakdRUVDIAOJ mJMUHT8O8U0rLFGk+IMO5ccKHP+t8u27NjES7SQ5SqDruV2CXmiZRXndbGFBbw== 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 4ZNwyc6FvXz1C0r; Thu, 27 Mar 2025 20:59: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 52RKxqrE031913; Thu, 27 Mar 2025 20:59:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RKxqO5031910; Thu, 27 Mar 2025 20:59:52 GMT (envelope-from git) Date: Thu, 27 Mar 2025 20:59:52 GMT Message-Id: <202503272059.52RKxqO5031910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 86dd379d3ea2 - main - pci: Use a single variable for the offset of the power management registers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 86dd379d3ea2a43d702f63cfd0ed60bae91d0f85 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=86dd379d3ea2a43d702f63cfd0ed60bae91d0f85 commit 86dd379d3ea2a43d702f63cfd0ed60bae91d0f85 Author: John Baldwin AuthorDate: 2025-03-27 20:57:04 +0000 Commit: John Baldwin CommitDate: 2025-03-27 20:57:04 +0000 pci: Use a single variable for the offset of the power management registers This is the more typical pattern for other capability register sets, and two of these variables weren't used. Differential Revision: https://reviews.freebsd.org/D49267 --- sys/dev/pci/pci.c | 46 ++++++++++++++++++++++++---------------------- sys/dev/pci/pcivar.h | 4 +--- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 2ee2f10924aa..fe99d6beb029 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -908,13 +908,8 @@ pci_read_cap(device_t pcib, pcicfgregs *cfg) /* Process this entry */ switch (REG(ptr + PCICAP_ID, 1)) { case PCIY_PMG: /* PCI power management */ - if (cfg->pp.pp_cap == 0) { - cfg->pp.pp_cap = REG(ptr + PCIR_POWER_CAP, 2); - cfg->pp.pp_status = ptr + PCIR_POWER_STATUS; - cfg->pp.pp_bse = ptr + PCIR_POWER_BSE; - if ((nextptr - ptr) > PCIR_POWER_DATA) - cfg->pp.pp_data = ptr + PCIR_POWER_DATA; - } + cfg->pp.pp_location = ptr; + cfg->pp.pp_cap = REG(ptr + PCIR_POWER_CAP, 2); break; case PCIY_HT: /* HyperTransport */ /* Determine HT-specific capability type. */ @@ -2838,7 +2833,7 @@ pci_set_powerstate_method(device_t dev, device_t child, int state) uint16_t status; int oldstate, highest, delay; - if (cfg->pp.pp_cap == 0) + if (cfg->pp.pp_location == 0) return (EOPNOTSUPP); /* @@ -2869,8 +2864,8 @@ pci_set_powerstate_method(device_t dev, device_t child, int state) delay = 200; else delay = 0; - status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2) - & ~PCIM_PSTAT_DMASK; + status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_location + + PCIR_POWER_STATUS, 2) & ~PCIM_PSTAT_DMASK; switch (state) { case PCI_POWERSTATE_D0: status |= PCIM_PSTAT_D0; @@ -2896,7 +2891,8 @@ pci_set_powerstate_method(device_t dev, device_t child, int state) pci_printf(cfg, "Transition from D%d to D%d\n", oldstate, state); - PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status, 2); + PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_location + PCIR_POWER_STATUS, + status, 2); if (delay) DELAY(delay); return (0); @@ -2910,8 +2906,9 @@ pci_get_powerstate_method(device_t dev, device_t child) uint16_t status; int result; - if (cfg->pp.pp_cap != 0) { - status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2); + if (cfg->pp.pp_location != 0) { + status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_location + + PCIR_POWER_STATUS, 2); switch (status & PCIM_PSTAT_DMASK) { case PCIM_PSTAT_D0: result = PCI_POWERSTATE_D0; @@ -2944,11 +2941,13 @@ pci_clear_pme(device_t dev) pcicfgregs *cfg = &dinfo->cfg; uint16_t status; - if (cfg->pp.pp_cap != 0) { - status = pci_read_config(dev, dinfo->cfg.pp.pp_status, 2); + if (cfg->pp.pp_location != 0) { + status = pci_read_config(dev, dinfo->cfg.pp.pp_location + + PCIR_POWER_STATUS, 2); status &= ~PCIM_PSTAT_PMEENABLE; status |= PCIM_PSTAT_PME; - pci_write_config(dev, dinfo->cfg.pp.pp_status, status, 2); + pci_write_config(dev, dinfo->cfg.pp.pp_location + + PCIR_POWER_STATUS, status, 2); } } @@ -2960,10 +2959,12 @@ pci_enable_pme(device_t dev) pcicfgregs *cfg = &dinfo->cfg; uint16_t status; - if (cfg->pp.pp_cap != 0) { - status = pci_read_config(dev, dinfo->cfg.pp.pp_status, 2); + if (cfg->pp.pp_location != 0) { + status = pci_read_config(dev, dinfo->cfg.pp.pp_location + + PCIR_POWER_STATUS, 2); status |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; - pci_write_config(dev, dinfo->cfg.pp.pp_status, status, 2); + pci_write_config(dev, dinfo->cfg.pp.pp_location + + PCIR_POWER_STATUS, status, 2); } } @@ -2973,7 +2974,7 @@ pci_has_pm(device_t dev) struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = &dinfo->cfg; - return (cfg->pp.pp_cap != 0); + return (cfg->pp.pp_location != 0); } /* @@ -3079,10 +3080,11 @@ pci_print_verbose(struct pci_devinfo *dinfo) if (cfg->intpin > 0) printf("\tintpin=%c, irq=%d\n", cfg->intpin +'a' -1, cfg->intline); - if (cfg->pp.pp_cap) { + if (cfg->pp.pp_location) { uint16_t status; - status = pci_read_config(cfg->dev, cfg->pp.pp_status, 2); + status = pci_read_config(cfg->dev, cfg->pp.pp_location + + PCIR_POWER_STATUS, 2); printf("\tpowerspec %d supports D0%s%s D3 current D%d\n", cfg->pp.pp_cap & PCIM_PCAP_SPEC, cfg->pp.pp_cap & PCIM_PCAP_D1SUPP ? " D1" : "", diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 01fd67edb58d..14cb577dbedf 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -51,9 +51,7 @@ struct pcicfg_bridge { /* Interesting values for PCI power management */ struct pcicfg_pp { uint16_t pp_cap; /* PCI power management capabilities */ - uint8_t pp_status; /* conf. space addr. of PM control/status reg */ - uint8_t pp_bse; /* conf. space addr. of PM BSE reg */ - uint8_t pp_data; /* conf. space addr. of PM data reg */ + uint8_t pp_location; /* Offset of power management registers */ }; struct pci_map { From nobody Thu Mar 27 22:40:32 2025 X-Original-To: dev-commits-src-all@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 4ZNzBv3f7gz5s1q5 for ; Thu, 27 Mar 2025 22:40:39 +0000 (UTC) (envelope-from 01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@amazonses.com) Received: from a8-13.smtp-out.amazonses.com (a8-13.smtp-out.amazonses.com [54.240.8.13]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZNzBt3TrNz47fc for ; Thu, 27 Mar 2025 22:40:33 +0000 (UTC) (envelope-from 01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tarsnap.com header.s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57 header.b=Uq4bHaiJ; dkim=pass header.d=amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=a4XEoWd0; dmarc=pass (policy=none) header.from=tarsnap.com; spf=pass (mx1.freebsd.org: domain of 01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@amazonses.com designates 54.240.8.13 as permitted sender) smtp.mailfrom=01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@amazonses.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1743115232; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=wDuBy20jF5Y6P9MZCQToBgSkiTU59aF8t0XLGPxHCLs=; b=Uq4bHaiJFv/gqVQrb0zX55s7co0UAdvFQLLZBrKoWGa/GrVCW/HtlnQ47n/uX8PA NHMNHDh567ZmXi+SpUOU+1BzMXYWrYJiy0x0b/Knl2cgzOYWm8psvzhuZDUOqZEDqJi YwB8oO/RXzrrkb6nmEiI4wlHmxUDpgtjjdeyGv18= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1743115232; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=wDuBy20jF5Y6P9MZCQToBgSkiTU59aF8t0XLGPxHCLs=; b=a4XEoWd0R25lk/zECvew0/x4GU+z2qOfy2QWjatdvIRLm5uRDn5Kv1XQmo84AOHk DwVpsXAgkAAfVlgo5cdwlstVvQmiX10mZEp9UyRHREEWCVuySo+FWDZSifnVDXVgrQM Pkgurzttg4A2sRuuKkVgyQOZgRx7wo6RmHXdrw7Q= Message-ID: <01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@email.amazonses.com> Date: Thu, 27 Mar 2025 22:40:32 +0000 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: c41ba99779d0 - main - release/vm: partially support NO_ROOT To: Brooks Davis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202503122107.52CL746X008573@gitrepo.freebsd.org> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <202503122107.52CL746X008573@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: ::1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2025.03.27-54.240.8.13 X-Spamd-Result: default: False [1.17 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; NEURAL_HAM_LONG(-0.99)[-0.990]; NEURAL_SPAM_MEDIUM(0.96)[0.962]; NEURAL_HAM_SHORT(-0.61)[-0.605]; DMARC_POLICY_ALLOW(-0.50)[tarsnap.com,none]; FORGED_SENDER(0.30)[cperciva@tarsnap.com,01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@amazonses.com]; R_SPF_ALLOW(-0.20)[+ip4:54.240.0.0/18:c]; R_DKIM_ALLOW(-0.20)[tarsnap.com:s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57,amazonses.com:s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; RWL_MAILSPIKE_GOOD(-0.10)[54.240.8.13:from]; RCVD_IN_DNSWL_NONE(0.00)[54.240.8.13:from]; RBL_SENDERSCORE_REPUT_8(0.00)[54.240.8.13:from]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[amazonses.com:dkim]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US]; RCVD_COUNT_ZERO(0.00)[0]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cperciva@tarsnap.com,01000195d9c3a4ac-45ab21b3-6dfc-408d-9b39-752e01c9dccd-000000@amazonses.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[tarsnap.com:+,amazonses.com:+] X-Rspamd-Queue-Id: 4ZNzBt3TrNz47fc X-Spamd-Bar: + On 3/12/25 14:07, Brooks Davis wrote: > commit c41ba99779d0431c37ac06a674e7744d15de8045 > Author: Brooks Davis > > release/vm: partially support NO_ROOT > > --- a/release/Makefile.vm > +++ b/release/Makefile.vm > @@ -126,6 +130,7 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} > env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ > QEMUSTATIC=${QEMUSTATIC} \ > WITHOUT_QEMU=${WITHOUT_QEMU:Dtrue} \ > + NO_ROOT=${NO_ROOT:Dtrue} \ > ${.CURDIR}/scripts/mk-vmimage.sh \ > -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${_FS} \ > -i ${.OBJDIR}/${_CW:tl}.${_FS}.${_FMT}.img -s ${VMSIZE} -f ${_FMT} \ > diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf This is broken, since src/Makefile.incl assumes that NO_ROOT being set, including to an empty string, means we want no-root behaviour. As far as I can tell this hasn't broken anything except that VM images are shipping with a /METALOG file inside them, but it could probably cause worse problems later if it's not fixed before more no-root work happens. -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Thu Mar 27 23:28:20 2025 X-Original-To: dev-commits-src-all@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 4ZP0Fy0Y1Hz5s4ph; Thu, 27 Mar 2025 23:28:22 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP0Fx6lHwz3v7j; Thu, 27 Mar 2025 23:28:21 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743118102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MyxDr1komSpsGkHY3ObYSf8LBjk3JbT6BOmOiwBIwy8=; b=xmtEx96mjDwqdMdUxpyX6bI9dNzoGRpGKD4PvbmfXxjY0bFF/cK91D7pV9Fjgw46xXK33s zyv/347AN69IiFxGLD9ruFEA4Lcle9lv3MIaF2eQHrwOTMhQEQxv8luiFzmUdnXfkL8K8j 0LrA9VkDQvpz0itb0kQL5gMEdjtqdQecccmVcst0DSpHiRfRK/3vISw80/a3Ki0qaAonYX 01QSO8tEbAAHr9gK6VETxpY8loZrhy0o4Ij1AxJ9xDfUcBwqlWxfECt4yxpl+fBWwIIk1B Y62e4iTi7HEJD7Z2mUAPLGsBp/BobfOTAMs274K8EtqYmkQWiD45wCCrSmf1Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743118102; a=rsa-sha256; cv=none; b=wb99nw9jwnUvjou+rpI1owqxfiZ7GTi+baa/8JzQvst6pV8HOaBtFwLOOHwrFqWFCM7mLS Jh1MkIFVMAPqBFDezlwxPQEnqHS5/elFTK5ZIK4SYFuf0rBZQT3LQa+z2GVAMF4BKQuVpM X9jsthRg+hfEF+a5CSww/sXPk8UsVdX8ii4zn2AFFWQhO1tZlYQs52bSKY+PKrFx3S4bih SLbinx5agEWbCJK3r6NFiopXUp5BNub9JhjnWfvn1NBmt3l5lOhUsM6fXxlh2JSudYy1Hp zzo51EGW3PLayDQ+aFn4MsqxPvJ/AkioTHvMxTBKODEpT8eaorVRtm0Z2Ot3pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743118102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MyxDr1komSpsGkHY3ObYSf8LBjk3JbT6BOmOiwBIwy8=; b=uFv2XL0ZgK0pL7u3BkS/EjgQQXrBHVb+as7snX+pJdtYLNSeTUDe2KYhvRSWezVy9nezuk r2ZoolhZfhZk+WMJdXqgC3sHQyqZkjswI8oUaTSMc92xQzHDQzgoSqFsHglR3XL9x0tXCZ dAonmTx3DxS3jqpOpWnoSn7G+tntmFG8neQ2FVRpUkCPrIfbeECdEy8BwhoDi64kRHxFMB ehWjsbfOuJnwrOurZGDmVLXYtKElB4+Dd21oO8tHSWatjz1WP9EaM820QNMEFo5vjRK8to iJwdhjbMzLjppZ9MLAKVfYaDEQrdBEqQ88CGFkifmvhAi5RQRC/raSLF/6WDHA== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.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) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZP0Fx5J1bz10Dn; Thu, 27 Mar 2025 23:28:21 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id E90CA3C01A0; Thu, 27 Mar 2025 23:28:20 +0000 (UTC) Date: Thu, 27 Mar 2025 23:28:20 +0000 From: Brooks Davis To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c41ba99779d0 - main - release/vm: partially support NO_ROOT Message-ID: References: <202503122107.52CL746X008573@gitrepo.freebsd.org> <01000195d9c3a499-ccd7c1c1-93d8-4971-acaa-6ba42c4a9a32-000000@email.amazonses.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01000195d9c3a499-ccd7c1c1-93d8-4971-acaa-6ba42c4a9a32-000000@email.amazonses.com> On Thu, Mar 27, 2025 at 10:40:32PM +0000, Colin Percival wrote: > On 3/12/25 14:07, Brooks Davis wrote: > > commit c41ba99779d0431c37ac06a674e7744d15de8045 > > Author: Brooks Davis > > > > release/vm: partially support NO_ROOT > > --- a/release/Makefile.vm > > +++ b/release/Makefile.vm > > @@ -126,6 +130,7 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} > > env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ > > QEMUSTATIC=${QEMUSTATIC} \ > > WITHOUT_QEMU=${WITHOUT_QEMU:Dtrue} \ > > + NO_ROOT=${NO_ROOT:Dtrue} \ > > ${.CURDIR}/scripts/mk-vmimage.sh \ > > -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${_FS} \ > > -i ${.OBJDIR}/${_CW:tl}.${_FS}.${_FMT}.img -s ${VMSIZE} -f ${_FMT} \ > > diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf > > This is broken, since src/Makefile.incl assumes that NO_ROOT being set, > including to an empty string, means we want no-root behaviour. As far > as I can tell this hasn't broken anything except that VM images are > shipping with a /METALOG file inside them, but it could probably cause > worse problems later if it's not fixed before more no-root work happens. Oops, that is indeed the wrong substitution. I've posted a fix in https://reviews.freebsd.org/D49544 -- Brooks From nobody Thu Mar 27 23:51:47 2025 X-Original-To: dev-commits-src-all@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 4ZP0n00VbYz5s5yC; Thu, 27 Mar 2025 23:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP0mz3PX3z3C7M; Thu, 27 Mar 2025 23:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743119507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kYZSIurIEgcWC91WD1RRzr2oeFoGKC3QWtk/PewGYJI=; b=tTDz5oV5CcVTly6nx0oB/i4iDwLi7Wv3tOZdvvghUy6HgMDNjSBIfyhdjOmJpZqW3K9GGw FQawMsmnIrz2Sx3EjonxZNaJp5N//hZh6QX3f+mWPkOFBI5onNN/mREJutQaGRociD3l/4 fmuXhM1YkBkgo97io2gVT/Jlgt7qmMBmdNxCFQsnxrIWMtJkGIDDRvLvQa5PzpHxznmp2f xUI6TDkrhPELKSA8QMAe4GqlTYTGCx75f08Is+XNblrUgtfHrBet5Hv46LXtLeykRUzdXk QqhmSsrmF+amnaqom9CwLVsXI8y1TXndvEjf1jd+5qw8+a8M2omBlWFmCO6/AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743119507; a=rsa-sha256; cv=none; b=uCSNrCSV7EV8qre4aHZJDMIxFZ49CbUQ8/keN75zDg44su0vZlTqon9AjwzEsL14zVqfj7 3QfHrSRPqKL47IjkGoMcOfIDyBy4aUMyj6fRPljQ0EnISKLcBCh2xzm9EVbqhOxknzjzTt CpHdHC/s9pWaf/ggbuVnGwrU1xAGs4Y/nBosATl33jnk61EFluMBksdpRdyL7gU1408Ygk PBlqFfPcgbsGBaGnrfyeEw+Q9ZaLRo2hU9gwh6RKAsaKsH8+Boxs9ipA9xSU7ngWUFPG8e tXmVFGmPS8NqMd970e/nFsygTHJKBrwLg/cWjbCwopeqXBnL6QgsOtCpokYMKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743119507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kYZSIurIEgcWC91WD1RRzr2oeFoGKC3QWtk/PewGYJI=; b=pY7Ov0R6sf7QfPzryq8uJIxKih8m5iSpnrKNDScu2jiugxyeKQGwTeBkxhXEuSbEmDHrpO UevpE1q9/ktJbWSgVyK1qgM9EnwPQ8yLV7R7FJDdX4uRaiSosSKwx7PrtBGl3JS0JV168K v9LvxoYbYK1F9dZMmlmcN0CNNM1vAgMKs1DUuEu7OUT/Ftx/hSkLDvNa/ZeGw9l9RQlBlx A7yr/U6ctW93fp5Y2MRzFMHM8AqVvOuKkCmn3ki0UCpZEejx91K8nXdE559Xz+T8bjxg/V G0VXeXrbOoypYw4KI83REcaofUSpB5Rwwj1sGAbtt1xb2/Yz5ZgYzj9ZRsBhqg== 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 4ZP0mz30byz25q; Thu, 27 Mar 2025 23:51: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 52RNplD9060893; Thu, 27 Mar 2025 23:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52RNplWE060890; Thu, 27 Mar 2025 23:51:47 GMT (envelope-from git) Date: Thu, 27 Mar 2025 23:51:47 GMT Message-Id: <202503272351.52RNplWE060890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e6e5cd297ab4 - main - release/vm: fix setting NO_ROOT and WITHOUT_QEMU List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6e5cd297ab4cae4995895b99c713df9cf6e8c0f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e6e5cd297ab4cae4995895b99c713df9cf6e8c0f commit e6e5cd297ab4cae4995895b99c713df9cf6e8c0f Author: Brooks Davis AuthorDate: 2025-03-27 23:40:47 +0000 Commit: Brooks Davis CommitDate: 2025-03-27 23:51:39 +0000 release/vm: fix setting NO_ROOT and WITHOUT_QEMU To support common shell patterns (test -n and -z) we want NO_ROOT and WITHOUT_QEMU to be set and not empty in mk-vmimage.sh if they are set at all in the Makefile. Actually do this rather than making them always set (which propogates to submakes run by mk-vmimage.sh and unconditionally enables NO_ROOT with undesirable side effects such as installing a /METALOG in vm images). Reported by: cperciva Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D49544 --- release/Makefile.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 1f56bdb03f97..f58c7c7fd092 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -129,8 +129,8 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ QEMUSTATIC=${QEMUSTATIC} \ - WITHOUT_QEMU=${WITHOUT_QEMU:Dtrue} \ - NO_ROOT=${NO_ROOT:Dtrue} \ + ${WITHOUT_QEMU:DWITHOUT_QEMU=true} \ + ${NO_ROOT:DNO_ROOT=true} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${_FS} \ -i ${.OBJDIR}/${_CW:tl}.${_FS}.${_FMT}.img -s ${VMSIZE} -f ${_FMT} \ From nobody Fri Mar 28 00:46:12 2025 X-Original-To: dev-commits-src-all@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 4ZP1zn479Kz5s8t8; Fri, 28 Mar 2025 00:46: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP1zn1RLTz411t; Fri, 28 Mar 2025 00:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jSCSQ7uVpQEnxGA4JZkmueU/5ZANuGbTr5atEFK+1JI=; b=aHK3l0oPvAJvxdKcI+5hGnCJY23n8f2YmYV6nvJE9gTFS7T5M3NXeO9hqB5xT5tjLXlpfe 3BkOLNImyoEWc5OdRU1GG9W4gjfNrdejmr8GU7jx908faed2j4DEtJG4fn/ySwvirXFaR+ kjuvSCiNL295s64YFmajtXbaD1dFnm/dLAHpWwrqibdZCDIDoDQ28bTu9+1HWSfeYEGTx3 Kk2dDbVrWFTDdlEyrHXFnHJkrEiOAMJGcDPVp+YFYojFKTmXlVwdjdis/LFAhtFWWLzPas pIT6cBL1SuSj8yhGSGHFmFvM+3g6K5zLae28MLapYS4K+wjNHIlJps69YopvKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743122773; a=rsa-sha256; cv=none; b=UdI7urK7n0H6RjXuPbJAg3wlbSgl5eUiH18fNrrLvyp3E859QiOJkZxLadtrrr9x2Or7rJ MJ6NirqvaGBl6jQKlSb8U1ywhhkHnh4zLbtNUuJWw99Ia7MPCgNh6Q7Lzymw3INWB1K+uF 6umaVQq0oWh+pzF+mR622xMpNpWLJMThwN/gbymMgmaNHUaBtKDKRJpv8qS8Is4nx6u9W6 0CFqfO2iD+U9AIROFkQ1fCex5yaLgb7j2kn1YXpSJNFtpelba3u6XqGPh3K5Yz3GimNltS lKjI48BxvCS93u0t41qADtGMqvv1sEb8dSrV4DrOPP9jEcVEqHxGzdjhxSjAiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jSCSQ7uVpQEnxGA4JZkmueU/5ZANuGbTr5atEFK+1JI=; b=ZICMQalZn1iPuPloyQvSiFdzpp3ehq1P4kwTB+efh0Z9L0L8IoYRQnY1ia1W7pqIpF9T27 l3sCDe6aVPAZ0gUUb2mVNCxR9EZgsgjp+iWEXP45Jl2PjtIx2PkIwQAiZjE23GNST23Yf/ 0zNBNhimN2XhmdnkciEJAo1s3haRtXMVYLmer/aPbNZQCb7UOvyrH1iyY4E38w0kfqMU4A r7XalGiAymqeOyRSJau00O1hql6GsSYyY20kmW8xDazqtjH6eKscJpBZz8jnMmK0QB8CVW Mk6/1mMRL0b47UlVmvPpQ/GvfxxVbyO5mWBy49EwkV2L+U/cwlaYyrfefUM5Ng== 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 4ZP1zn0f1Yz568; Fri, 28 Mar 2025 00:46: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 52S0kCog060910; Fri, 28 Mar 2025 00:46:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S0kCBf060907; Fri, 28 Mar 2025 00:46:12 GMT (envelope-from git) Date: Fri, 28 Mar 2025 00:46:12 GMT Message-Id: <202503280046.52S0kCBf060907@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: 09b874567023 - stable/14 - kern___acl_aclcheck_path: vrele the vnode after namei() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 09b874567023e9562d7645b8f9ca3bac8a9112f7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=09b874567023e9562d7645b8f9ca3bac8a9112f7 commit 09b874567023e9562d7645b8f9ca3bac8a9112f7 Author: Konstantin Belousov AuthorDate: 2025-03-20 17:56:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-28 00:32:28 +0000 kern___acl_aclcheck_path: vrele the vnode after namei() (cherry picked from commit 7fad17a3e63481ef71b731b0059cb918aec14f17) --- sys/kern/vfs_acl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index fb1fc27867dd..58b950a04cd1 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -552,6 +552,7 @@ kern___acl_aclcheck_path(struct thread *td, const char *path, acl_type_t type, error = namei(&nd); if (error == 0) { error = vacl_aclcheck(td, nd.ni_vp, type, aclp); + vrele(nd.ni_vp); NDFREE_PNBUF(&nd); } return (error); From nobody Fri Mar 28 00:46:15 2025 X-Original-To: dev-commits-src-all@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 4ZP1zq4Hnmz5s963; Fri, 28 Mar 2025 00:46: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP1zq2jnDz40wY; Fri, 28 Mar 2025 00:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSNLN0OiS4XS+Biqkv6ay6nsq7UjCoqchO0Zni+m4ZA=; b=xwWwaxNkBqFrfDB866Z8ld+6rTYROYYYPXOdaJIEReEFcIJba+cKrxhdSEEe6uuT0boTtK 412oSev7k38y2XxwAI10mBf8084HDczFQN4kv4h4429EwFSC+EhjJS1U3njl2YJ1F6V7/Y HlzPvaIPyHDFjeZJf4IyHXFgA6AxJRVxnkLl0+36eVa9tWvgamHUAMJTg+ejC54UmFmHQS dYU7vrvyBxCL/XFCoa/GSHgRNDWLl3OryKbXcfySh7fHjJbTwQhn3xhbf7BX/l8yB3wLhg aaIgoeMtc7Iq/ewT/g13Zm6xLw0FYuF3cKHd5sFCVeEqZcyk4s7IPAO6gwa6KQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743122775; a=rsa-sha256; cv=none; b=hvFmpwxNf/5IdtZHIq/gJCSt1C8/Y6agz6V+f7nd25/dAYrc6GXl6ZSiYv/Uiw+ctzQQlh Ba6Tu3CKNdGKYheYNX+iKl2fLDzUvIdczvdyp2BNpUgHQRCZiiH4K9mYvcTL+6ANTQKTGg EnQyMLOzWBpooZx4j2Y6UVH3BH7iqmkR+DBQImxZi1S1GD3Fq0fhFMG5sljjKFz70LHK9l 8dUq6lOEbNAOlg0JP9RLDj7syk3q4MXpJjmRF80lf/M0YYGT+kuTUZlxs58yQJNn1KjU5w SF6qbyVJToRd034sVY5Ba5OThRhtvkEkyZGPvZkOyrIZDefPPFBHk3MqWVK41A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mSNLN0OiS4XS+Biqkv6ay6nsq7UjCoqchO0Zni+m4ZA=; b=Ijra1z8ZQwAtwfgA7ie4CBoWKwLZJQ2u9uXvkzIG150jhn3o7w8Jq+B+O4vLg91Ux86ZYE t8S3q1EA+a5F++wcIw+iSZNGnGw37vtbugyPof/01sOeNH15lSAmgDF6b4mBWQ55wfdEC4 LESfusRzWxC6NqUzdyzFDu1xR8Yj0c0GsrQzPsb6t+2998brbIS1FBKZ/YfbpFepWrmAH7 S7wN7I47yYY59Itrhof0DpCN+BgrRaRddAZTsRQ95z3gU/tzuMapw0q1xPfWr7UJQ5DQ9s j2MUy3/lJqO4cXUMETXR1AReIQG5c4nEq+hfPXCYBmvp0dHckOrmakj21KhOHA== 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 4ZP1zq28XFz53g; Fri, 28 Mar 2025 00:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52S0kFVX060980; Fri, 28 Mar 2025 00:46:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S0kFQM060977; Fri, 28 Mar 2025 00:46:15 GMT (envelope-from git) Date: Fri, 28 Mar 2025 00:46:15 GMT Message-Id: <202503280046.52S0kFQM060977@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: 4e923ed15e70 - stable/14 - ufs_aclcheck(): accurately dereference vp->v_mount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4e923ed15e70c9256437e96cfb6636418a9d3838 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4e923ed15e70c9256437e96cfb6636418a9d3838 commit 4e923ed15e70c9256437e96cfb6636418a9d3838 Author: Konstantin Belousov AuthorDate: 2025-03-20 18:10:56 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-28 00:32:28 +0000 ufs_aclcheck(): accurately dereference vp->v_mount (cherry picked from commit 5648c1d6f3b0d8f4d67d2e6ec56dd2abcbd8fff5) --- sys/ufs/ufs/ufs_acl.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/ufs/ufs/ufs_acl.c b/sys/ufs/ufs/ufs_acl.c index 49bd686a0d96..4b6cabc2ab30 100644 --- a/sys/ufs/ufs/ufs_acl.c +++ b/sys/ufs/ufs/ufs_acl.c @@ -609,11 +609,11 @@ ufs_setacl(struct vop_setacl_args *ap) } static int -ufs_aclcheck_nfs4(struct vop_aclcheck_args *ap) +ufs_aclcheck_nfs4(struct vop_aclcheck_args *ap, struct mount *mp) { int is_directory = 0; - if ((ap->a_vp->v_mount->mnt_flag & MNT_NFS4ACLS) == 0) + if ((mp->mnt_flag & MNT_NFS4ACLS) == 0) return (EINVAL); /* @@ -631,10 +631,9 @@ ufs_aclcheck_nfs4(struct vop_aclcheck_args *ap) } static int -ufs_aclcheck_posix1e(struct vop_aclcheck_args *ap) +ufs_aclcheck_posix1e(struct vop_aclcheck_args *ap, struct mount *mp) { - - if ((ap->a_vp->v_mount->mnt_flag & MNT_ACLS) == 0) + if ((mp->mnt_flag & MNT_ACLS) == 0) return (EINVAL); /* @@ -667,14 +666,18 @@ ufs_aclcheck_posix1e(struct vop_aclcheck_args *ap) int ufs_aclcheck(struct vop_aclcheck_args *ap) { + struct mount *mp; - if ((ap->a_vp->v_mount->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) == 0) + mp = atomic_load_ptr(&ap->a_vp->v_mount); + if (mp == NULL) + return (EBADF); + if ((mp->mnt_flag & (MNT_ACLS | MNT_NFS4ACLS)) == 0) return (EOPNOTSUPP); if (ap->a_type == ACL_TYPE_NFS4) - return (ufs_aclcheck_nfs4(ap)); + return (ufs_aclcheck_nfs4(ap, mp)); - return (ufs_aclcheck_posix1e(ap)); + return (ufs_aclcheck_posix1e(ap, mp)); } #endif /* !UFS_ACL */ From nobody Fri Mar 28 00:46:14 2025 X-Original-To: dev-commits-src-all@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 4ZP1zp46bYz5s91R; Fri, 28 Mar 2025 00:46:14 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP1zp1cgyz40rB; Fri, 28 Mar 2025 00:46:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cTEanwxqB2YGounEeQL3nh7uFEnorWquPANJ6D1MVDI=; b=xlfH6uCrQRqwsBIv7b2UhVn5rECMzZDhjNmdsIFIGaYRBddBUXXAPZmiGJWwyHUnd/QwzW raOUQUjsuhLP+OUf+w3eIMJ6hi6w2ZoznSIwQVCrFwl8Q+cntAbUiKVni39jAL+OOXSZyg bS+SuXywPLCLyDLLXueHLVpMmZIsgN9xq4plC5e4Iw6/1bs7spJ641X6OwoNBWs0R4jk1x 0vBGrPH4kSRrFs1wl6nJRRfuLA7F/g2P29D7Dl4F2wJ1mHxV2pLQgTpNXgA5OQQyTdaLRE x3tTmhezAY1BHEZ677yn//f6ljaFJzZEeb9ANH3Pyt6Pg8Y5NRyeDRULJUh/bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743122774; a=rsa-sha256; cv=none; b=iRKjl09+saE3Q2RWSYHBWUMEiWM+F3cetFW39xmWz6xOiXFNi6LdrfIYioMXuybmCaGcdN C9u2K8OADPqQXxowmEokDzKASpmXh+/L0NKb0pT0iaD43Ggs38RWxq3Fsg3VN5RX7cJmfV NCnScgBl/0+v/KxCCzHL3b3/5K6Hzr5rdXpDnirbtGhSxkr999l54qrCpkm4Dz9rqnoZeS BK9nnSvIMTgrL4+qq6mE17JG5PW4sEIckgYA76k/Hzjx+8z4CsP2/ydtjbNwKGNLdB5sRJ o49/ZnZOL8QJIY6IRF++jvI+2KIwGUtR3OmvcBXdDs7KPVhooG/o0aM6nJoSCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cTEanwxqB2YGounEeQL3nh7uFEnorWquPANJ6D1MVDI=; b=oWmE9Wuer6nrbHHGi/eLaPhL27qMEj6yyo7CIW5BpeKioyFOXfahwFeKrUVJDYvqO3eTJY CVYmrgCE5E82dyM6fS4HFIvkIfKgWqh/x/Ui19ybQx+EsMlLn1kN/+SVAZx/lsYKt9hkTm kZB1MO5XgFVp0HYKv3NGMPKOkencjxheQVYEZH8+Ow8LO3IarCoW/L+dil4rw7G/EWM5oH F5cF0hhY2DUMe0RqYgAB2nAMkHETlJj9kYS3VXapa154P2Z5t0vmrbNXWZKMe5lwmN87S4 d64FtII59zS6xW9J3Z2pbs2OeouMlAp/GxVqxW253ufNdNsMZYUZkHhGUjSaLQ== 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 4ZP1zp1D37z3y2; Fri, 28 Mar 2025 00:46: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 52S0kENK060942; Fri, 28 Mar 2025 00:46:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S0kE7g060939; Fri, 28 Mar 2025 00:46:14 GMT (envelope-from git) Date: Fri, 28 Mar 2025 00:46:14 GMT Message-Id: <202503280046.52S0kE7g060939@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: 658a4399ea56 - stable/14 - ufs_acl.c: style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 658a4399ea56ea9531719628b546abdad9702b47 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=658a4399ea56ea9531719628b546abdad9702b47 commit 658a4399ea56ea9531719628b546abdad9702b47 Author: Konstantin Belousov AuthorDate: 2025-03-20 18:09:09 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-28 00:32:28 +0000 ufs_acl.c: style (cherry picked from commit d7352b2d57e9fe4b9cfb6ae61fd7cdd18851cdd3) --- sys/ufs/ufs/ufs_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_acl.c b/sys/ufs/ufs/ufs_acl.c index 6fad085daea1..49bd686a0d96 100644 --- a/sys/ufs/ufs/ufs_acl.c +++ b/sys/ufs/ufs/ufs_acl.c @@ -642,7 +642,7 @@ ufs_aclcheck_posix1e(struct vop_aclcheck_args *ap) * to this kind of object. * Rely on the acl_posix1e_check() routine to verify the contents. */ - switch(ap->a_type) { + switch (ap->a_type) { case ACL_TYPE_ACCESS: break; From nobody Fri Mar 28 00:46:16 2025 X-Original-To: dev-commits-src-all@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 4ZP1zr5Sfcz5s8yW; Fri, 28 Mar 2025 00:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP1zr3Fssz416T; Fri, 28 Mar 2025 00:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x8tSuzfPzakCRwv6b7quIBLGDJZ6c5litcigzzOvaF4=; b=MgLWidPKj/Ja5M0IqrPJWdgw+QbLfuL5Ia4jhf83y05Y8SfeVZTM6tkqZbqYXt7q9BZY9q QPZkMfyq0hYRJY4lBHT0pRCfghbNEvIoBGW+6hP9/+ire4h6RWbQANe1XDt3Qb8PtENkNh nWlYd9CAK7N6wrvF0c9dJVNohZk/eFsuNnkbe4UDaNlHmlYdHKjGInqAVkpcmGfFEgbNU5 0ytUbE5hOu0pKG1PaKAO6JpIKx99ragB1plD4FS2g2Z2S1HisTH+9lvNWX1ZkMkRNAUT6K UmOy7/kuk8MaHvcFznu5hICmlM86alrIUBBJwV4GDKlxGD4AyOZRiIpiXKJR+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743122776; a=rsa-sha256; cv=none; b=VSRq0hoCNqtsY9rC2Zjzl9VApTo4fJV0p4c9tTKFErtbVGlnpwCU+t4D3vmOlZmNhStll8 pcDrFjIls6KsAE/wvBvynWqCti6mmcV0JRbolHXAacXbnLumVP9GPZ5nhix9gaLP7ZZ++c xpP5kf9CLo3CTRf3n0qh3+x1eILm7HHYuD9vhnD5L2uDNhKhQHj2v9pNjAIH2VGem6IXmq lBHFRSOfdMuumLJBFvtLxm2ti/WBnLUZAstmBxaPzu/eyE2oSIeKDVMWfhRYigvNG7sjL6 4+wBGwNxlwtqp9QpZ5TElqHalMBuzNHSX3t5w3Fcaak/HEVxJmOQ7oWv7iLAqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743122776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x8tSuzfPzakCRwv6b7quIBLGDJZ6c5litcigzzOvaF4=; b=B9sm+zzY7WWZZynng3PaExwDmlB17pDLwWuY1/KIHsSJyFIgRzVlG+lJ9fDPO/VQcbZeOE hdLqi8sR5BpHB8FO61h0qfXBbhR5lF+WB+xdFCejJX4OOYqrHFlRwIFDOmgH3FWRzEBcSq 1E96yedtj0sAZ8Yus6IdB3zQeGqM9LzsEB0CU87mDHQq3HfDuJYim/aN0N8jkeR/YQ/Scy yCtp5y0sJ/IZdHRALpkFg1/eiGjgkO0/p1asdNKSj5tOP/T9ZYThwS+zQp29q2F0s4l70v ftULwhzODuU4KxNCyg91hGLkcbriqoeWPb7yXHU5VISKjaKrm3yJ/nuCYmrICw== 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 4ZP1zr2XWTz569; Fri, 28 Mar 2025 00:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52S0kGdQ061012; Fri, 28 Mar 2025 00:46:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S0kGvf061009; Fri, 28 Mar 2025 00:46:16 GMT (envelope-from git) Date: Fri, 28 Mar 2025 00:46:16 GMT Message-Id: <202503280046.52S0kGvf061009@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: 4b3d44f3b43b - stable/14 - kern/kern_descrip.c: remove unneeded headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4b3d44f3b43b8c8339d7f3a8a21cd6da47bd732c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b3d44f3b43b8c8339d7f3a8a21cd6da47bd732c commit 4b3d44f3b43b8c8339d7f3a8a21cd6da47bd732c Author: Konstantin Belousov AuthorDate: 2025-03-18 01:50:01 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-28 00:32:28 +0000 kern/kern_descrip.c: remove unneeded headers (cherry picked from commit 6eb7cba469d7cf1beccfb18679d1e0bd4a468341) --- sys/kern/kern_descrip.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index b054bb43074c..c21e34f7e805 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -36,14 +36,11 @@ * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 */ -#include #include "opt_capsicum.h" #include "opt_ddb.h" #include "opt_ktrace.h" -#include #include - #include #include #include From nobody Fri Mar 28 02:32:29 2025 X-Original-To: dev-commits-src-all@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 4ZP4LQ46FFz5sGym; Fri, 28 Mar 2025 02:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP4LQ0pcWz3N0p; Fri, 28 Mar 2025 02:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBLyW4vMRDmLdiYlobVt+EMDotRas0Ooyb1QU8apwr4=; b=ZKLTzQkrYHXByKyTb6qkP8CwfMAFxWiqjPO6bKWkPG50Z6zrh3YU52CLE/lVTp86p+UNIL 129Ui0ApMM5OipOglbVcBHFBBY6112MRw4ol3goK7Stbdj3usQyT/YWW7rb4HVbIjhpfqO hbHwBtc7P1jN5ryuGkYuvjDk5/lpkyqEnGRXMBlumeKNAZUd6b4EUeuDbCNxtXESLHZX+V XgyI1QPrIqTocSrh+VD4pLhGaqgZVXtcS9VKAc1KBh1TUSS0M2xw3nL2QBaZ1hQs0vpNFY GsRLG4S5IGCjoMwOkAz1TZpI07XMlv2CgNXFAYRSaUhhXiEShS8vgOhCUKBJbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743129150; a=rsa-sha256; cv=none; b=ZexUd1ksxk7oLnF8vxZ/s0tLq9OC7D3Tx1OG221s3prxJZHGxjFL1jubFDAfmvBtTHrBC1 HU6wpGryG1clp67IYX+oSaNjq7tSUD8KdyuUbvu0m2di/Av5ZWd1O6/fnlPaHIJgzxaUwW 1XDpN2v8PvSaju/LS/s+/8hXYlA5CL6N+OwUVx+94Miwbnb3oToUeIR4LQ1/PGy4+pZUDd Uf4Qy+3EN7IUG83yuD11p6jhwAAbANKTPQtcv2XA1HmDzcYQcuVWxlKuQvZ3uBEwJok7h+ vhMoiwBpeQTfTqI53dKHFpJLFuJua2NZZwpqiWttddh11blMYL+5moLX1EeJ3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBLyW4vMRDmLdiYlobVt+EMDotRas0Ooyb1QU8apwr4=; b=sNGy+VnAru3RA2sr5Hi5Yabvob+pswK52j8/F4/0YxVcswfAseajJ2/CMGD2db7dOglXIh 7MkKX1IEoTn2aYWX4ScOPax5Zkj5zDGD5G9fpBQ/P/pDISnyozd5GE667smFyHvyACTZwO q3TYRiAyxugIQ/nm43kvkAXLAsqITbASO6APW/IlI+RBzxCW2SWq8v/Kj+ArFcEjSvFxhX rn0Me4JNLcAFg+mIZ5OgEcH4MMSrjSxIYBZmLFGDOVy7kN2wm3DAhPZUj+FmJPMJs0TfJh nZb8ni7p/vLFw4Mlapm9fFGEwU5Y6i3J4Qr5Eb76oD5vohUic1TbLbIXEqivCg== 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 4ZP4LQ0JQLz7kn; Fri, 28 Mar 2025 02:32: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 52S2WTA8064669; Fri, 28 Mar 2025 02:32:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S2WTSM064666; Fri, 28 Mar 2025 02:32:29 GMT (envelope-from git) Date: Fri, 28 Mar 2025 02:32:29 GMT Message-Id: <202503280232.52S2WTSM064666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Justin Hibbits Subject: git: 16caf6a11ec2 - stable/14 - powerpc: Add Hypervisor Facility Unavailable handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 16caf6a11ec25d705514e31920c2a3d1bde0fb04 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=16caf6a11ec25d705514e31920c2a3d1bde0fb04 commit 16caf6a11ec25d705514e31920c2a3d1bde0fb04 Author: Justin Hibbits AuthorDate: 2025-03-19 22:22:32 +0000 Commit: Justin Hibbits CommitDate: 2025-03-28 02:32:19 +0000 powerpc: Add Hypervisor Facility Unavailable handling Treat Hypervisor Facility Unavailable as an illegal instruction in user space. This way programs that use facilities like transactional memory, which will never be supported as it has been removed from the ISA, will not crash the kernel. Tested by: pkubaj MFC after: 1 week (cherry picked from commit 0b663e0cee89dedf5b070ff4e839d5ad95061535) --- sys/powerpc/aim/aim_machdep.c | 1 + sys/powerpc/powerpc/trap.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c index b439905441d3..814c679ff47e 100644 --- a/sys/powerpc/aim/aim_machdep.c +++ b/sys/powerpc/aim/aim_machdep.c @@ -417,6 +417,7 @@ aim_cpu_init(vm_offset_t toc) bcopy(&hypertrapcode, (void *)(EXC_HEA + trap_offset), trapsize); bcopy(&hypertrapcode, (void *)(EXC_HMI + trap_offset), trapsize); bcopy(&hypertrapcode, (void *)(EXC_HVI + trap_offset), trapsize); + bcopy(&hypertrapcode, (void *)(EXC_HFAC + trap_offset), trapsize); bcopy(&hypertrapcode, (void *)(EXC_SOFT_PATCH + trap_offset), trapsize); #endif diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index 7f1a267f5cf2..dae1228c30fa 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -139,6 +139,7 @@ static struct powerpc_exception powerpc_exceptions[] = { { EXC_VEC, "altivec unavailable" }, { EXC_VSX, "vsx unavailable" }, { EXC_FAC, "facility unavailable" }, + { EXC_HFAC, "hypervisor facility unavailable" }, { EXC_ITMISS, "instruction tlb miss" }, { EXC_DLMISS, "data load tlb miss" }, { EXC_DSMISS, "data store tlb miss" }, @@ -148,6 +149,7 @@ static struct powerpc_exception powerpc_exceptions[] = { { EXC_THRM, "thermal management" }, { EXC_RUNMODETRC, "run mode/trace" }, { EXC_SOFT_PATCH, "soft patch exception" }, + { EXC_HVI, "hypervisor virtualization" }, { EXC_LAST, NULL } }; @@ -352,6 +354,7 @@ trap(struct trapframe *frame) mtspr(SPR_FSCR, fscr & ~FSCR_IC_MASK); break; case EXC_HEA: + case EXC_HFAC: sig = SIGILL; ucode = ILL_ILLOPC; break; From nobody Fri Mar 28 02:32:31 2025 X-Original-To: dev-commits-src-all@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 4ZP4LR69yJz5sGXk; Fri, 28 Mar 2025 02:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP4LR1rl0z3NNw; Fri, 28 Mar 2025 02:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUJj/En0e6F0qB6p9ONgG/FDtyXS+7I410CBmrRXm/M=; b=uxH0AIUkZrUs3EcWiNTX5F2pW5EqFDf0lxz4Ka/TBXlInpOL40H72DsEg952xb6UWRSDf2 LJchQjOfb9q3+Oculjv7JJKSe+Tt9RqsKovDABQq1Z9peSKiJ1x/4il3IgH8WqxAhmtBsy S2gqXpFbXnvlXhW6T1bl7wPsi/UHY0eZ9W8m7rw+8Dcu+N4pxLNdbDEzBCX9g/LgHsp1to mwqxwlpu1s3tV1eEJTEYcRQmfq6PB4gff1tHaIiK9cKf/qqUHxzHplPX91Ea+VNrN+BGcN zsQaLMc3OETlfyq3KcKyPTdyfpWke3vxs4zTpYvr1OjpdsBILsVuYC5Fc7kkGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743129151; a=rsa-sha256; cv=none; b=TxJEP46VK4UzIoSeD3jUjLChe1kCIqAOng20CQ2vfM80Us3eqI/gQ6Fvp88xE9JtEo8Liu b3d6ZFfh5utC4X0TYEtflyAwzohfuEKLQ25CT02JyxfqYuAjtJ6q+RtW76ooDXa9zzBkNg irKZcdMMeCR8V4iuvg2kfxhHlblnR+XYUtQvYP1dCewct/3wwfzGxwonBnzqUqqRhms2Q8 Safwy/p2XZYQ1GsspdNHDEibRK9mTZzAevqvmZdmVYbtlsW6Pl7z77copeGsMqTfbNWkbe Mh5urNLJEzyc5a9r31zn34ZHke6hyXPGt4Q8EvZhTxOwSJ3Xl/ogbhglWDkcWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUJj/En0e6F0qB6p9ONgG/FDtyXS+7I410CBmrRXm/M=; b=CSrL2pVtmfDBOW/gNJHF0O29kQqziRQwIfge8SiOpldrV9UCZpmnwkoXtX1/7Mi8sokCr0 UE3hnLxHfBTn5D9EzJZZWaoqfO4OjSNFTVJObPkdwvlXHkdCkjTZcvwlyRFhnGnQZy3BM3 CQQGKqvColcUCBwSGGgdSGJH8LtEqw+89hMavLA3We/UhU5DTI0Q4jn5dI8DKr67AHXmD9 JciP5AxVZUNklhlEiHRnuaraa/7mkTkH9l1o6XL8JGUFXtW/sJEzUQ1vE+WveMXO7Bj8iF c/eC7+SQbfhAPlGSjR/U4VrMD7bzUDc+kNscK22mXHdMG7o0A9ELNiW+QHauQQ== 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 4ZP4LR1FBgz7wg; Fri, 28 Mar 2025 02:32: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 52S2WVBt064702; Fri, 28 Mar 2025 02:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S2WV5Q064699; Fri, 28 Mar 2025 02:32:31 GMT (envelope-from git) Date: Fri, 28 Mar 2025 02:32:31 GMT Message-Id: <202503280232.52S2WV5Q064699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Justin Hibbits Subject: git: ff9c290648df - stable/14 - powernv: Explicitly enable the facilities we support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff9c290648dfd36e6cd8850ec9d79aad88a10d84 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=ff9c290648dfd36e6cd8850ec9d79aad88a10d84 commit ff9c290648dfd36e6cd8850ec9d79aad88a10d84 Author: Justin Hibbits AuthorDate: 2025-03-19 22:25:40 +0000 Commit: Justin Hibbits CommitDate: 2025-03-28 02:32:20 +0000 powernv: Explicitly enable the facilities we support Thus far we've relied on the firmware setting HFSCR correctly, enabling all facilities. However, it appears some recent firmwares do not. Linux explicitly enables all facilities it supports (including transactional memory, which new firmwares apparently do not enable), so do the same here, explicitly enable all the facilities FreeBSD supports. MFC after: 1 week (cherry picked from commit fe73eb441f1c98fe350f4822c7d2abfeef046bf8) --- sys/powerpc/include/spr.h | 5 +++++ sys/powerpc/powernv/platform_powernv.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/sys/powerpc/include/spr.h b/sys/powerpc/include/spr.h index 5bb3858b0fb5..605b1be194d9 100644 --- a/sys/powerpc/include/spr.h +++ b/sys/powerpc/include/spr.h @@ -162,6 +162,11 @@ #define FSCR_DSCR 0x0000000000000004 /* DSCR available in PR state */ #define SPR_UAMOR 0x09d /* User Authority Mask Override Register */ #define SPR_DPDES 0x0b0 /* .6. Directed Privileged Doorbell Exception State Register */ +#define SPR_HFSCR 0xbe /* Hypervisor Facility Status and Control Register */ +#define HFSCR_BHRB 0x0000000000000010 /* BHRB instructions */ +#define HFSCR_PM 0x0000000000000008 /* Performance monitor SPRs */ +#define HFSCR_VECVSX 0x0000000000000002 /* Vector and VSX facilities */ +#define HFSCR_FP 0x0000000000000001 /* Floating Point facility */ #define SPR_USPRG0 0x100 /* 4.8 User SPR General 0 */ #define SPR_VRSAVE 0x100 /* .6. AltiVec VRSAVE */ #define SPR_SPRG0 0x110 /* 468 SPR General 0 */ diff --git a/sys/powerpc/powernv/platform_powernv.c b/sys/powerpc/powernv/platform_powernv.c index e9babc128af0..cf5249313880 100644 --- a/sys/powerpc/powernv/platform_powernv.c +++ b/sys/powerpc/powernv/platform_powernv.c @@ -139,6 +139,7 @@ powernv_attach(platform_t plat) phandle_t opal; int res, len, idx; register_t msr; + register_t fscr; bool has_lp; /* Ping OPAL again just to make sure */ @@ -180,6 +181,11 @@ powernv_attach(platform_t plat) mtspr(SPR_LPCR, lpcr); isync(); + fscr = mfspr(SPR_HFSCR); + fscr |= FSCR_TAR | FSCR_EBB | HFSCR_BHRB | HFSCR_PM | + HFSCR_VECVSX | HFSCR_FP | FSCR_MSGP | FSCR_DSCR; + mtspr(SPR_HFSCR, fscr); + mtmsr(msr); powernv_cpuref_init(); From nobody Fri Mar 28 02:40:47 2025 X-Original-To: dev-commits-src-all@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 4ZP4Wz3St2z5sH31; Fri, 28 Mar 2025 02:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP4Wz1yRHz3VwW; Fri, 28 Mar 2025 02:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ogCN+VvukchPrVm7HzCg8yoeKqLSgFd0yqzll8UFlU=; b=TPTSlO0K16Jf1SQUx356GrQeHeg/yBbBXhU//QYsRmkTcVqdNvbgTlm+lToelWhuPkMtse VfhVAdxJfDt4qCaWYr+hKwjlbgkbiEk74iqIbJQahtlOwXbshHgoLCEARrqp+bGt4My7lK doOx0SZ9WE2UyE8uvXlUyJM8Gq5pLHZBu0usYB2DhGy4PukZ+9uEcMbf+v7KP1wrKp7prf v71OvC8uvQkFBkvwgwzkEUl7F5FrLb7B7npRXl+flb5fHl2PUyW2qp+n+OHtLLSrLSD9GQ WlRP44O3UnN1mBPqOwU8XdIfdrCuyoe04cuADv6ce27RNkjxIgivHjWrJ5uvHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743129647; a=rsa-sha256; cv=none; b=V4QWUsd5nozwazxhMVk1AER9ezl9+VC1ceW+PAOEay9Nsv1FwBU3pIjriquLTvGFAUVg78 ZIQMz3GgVpX8lUMTVWAhZ1wJ6+AYE9xpJD2Ak5KumH1L2f1cX6OHujnHRu8wEt+WqXSTbb SsaiDW84fZH3IxjnDnBoxKlPzw8fPwJvdnuZ7JMs8QFVn8uegjnoDLe2hRZbmejmZay6y9 rAXxWYTfloVBsYenlyqMJkZpPxdNmWBze/41pumoHGaT5zcyKfNE3QeHtcn1OflNX0ynpL aEVu5ZIEzQVeeaVqFdK+S04K7mDHnres2JFJWodTHLXGQuqhXGODzTyua8zk7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ogCN+VvukchPrVm7HzCg8yoeKqLSgFd0yqzll8UFlU=; b=BgLqbq2tSJsOv4FX9e6XbQm/BD2viskP0B+2jkwZBtfd7ePrjMt2wXOC9uvLB+Oq0pJRFV e6BA8k6xBoKuwrze8tXJHyIIhQh9Lf3HqutVdNM3o/wfJcHI4UK0PgnmjKWC8oDhow8L6i PKYBrznZRpxpGDxPNcuiJ5p5GYef15WsT4MbX4YsnAfEI7VFXSxwA/kDMjReirT3ckcufX AScIWuOtuS23W/OmgpL9do6MxhLWFbeuT/sQpGP6Dvdc54cUspTAUz7LiEFMwPTr+1FD9y +KFfyoCZ0AOq0fVjd2Nj3ERLzeQxuku888st5chWcfNcF8F7TnqjTJz5reQBlw== 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 4ZP4Wz1Syqz7dy; Fri, 28 Mar 2025 02:40: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 52S2elkf075915; Fri, 28 Mar 2025 02:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S2elHG075912; Fri, 28 Mar 2025 02:40:47 GMT (envelope-from git) Date: Fri, 28 Mar 2025 02:40:47 GMT Message-Id: <202503280240.52S2elHG075912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: e24279e0f9e2 - main - Remove mentions of ENOSYS added in d97e44784bb5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e24279e0f9e28ba0c1920cb539fc357568790c0a Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=e24279e0f9e28ba0c1920cb539fc357568790c0a commit e24279e0f9e28ba0c1920cb539fc357568790c0a Author: Enji Cooper AuthorDate: 2025-03-27 19:26:59 +0000 Commit: Enji Cooper CommitDate: 2025-03-28 02:40:07 +0000 Remove mentions of ENOSYS added in d97e44784bb5 aio(4) is a hard requirement in the kernel as of f3215338ef82. The scenario that the patch was submitted for is no longer possible. This isn't a straight up revert since the previous change also addressed some minor issues. PR: 190942 Reported by: asomers MFC after: 2 weeks MFC with: d97e44784bb5 Fixes: d97e44784bb5 ("aio_*(2): mention ENOSYS under ERRORS") Differential Revision: https://reviews.freebsd.org/D49541 --- lib/libsys/aio_cancel.2 | 7 ------- lib/libsys/aio_error.2 | 7 ------- lib/libsys/aio_fsync.2 | 7 ------- lib/libsys/aio_mlock.2 | 7 ------- lib/libsys/aio_read.2 | 7 ------- lib/libsys/aio_return.2 | 7 ------- lib/libsys/aio_suspend.2 | 7 ------- lib/libsys/aio_waitcomplete.2 | 7 ------- lib/libsys/aio_write.2 | 7 ------- 9 files changed, 63 deletions(-) diff --git a/lib/libsys/aio_cancel.2 b/lib/libsys/aio_cancel.2 index 928a8b325e5f..42d074054716 100644 --- a/lib/libsys/aio_cancel.2 +++ b/lib/libsys/aio_cancel.2 @@ -80,13 +80,6 @@ The .Fa fildes argument is an invalid file descriptor. -.It Bq Er ENOSYS -The -.Fn aio_cancel -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .El .Sh SEE ALSO .Xr aio_error 2 , diff --git a/lib/libsys/aio_error.2 b/lib/libsys/aio_error.2 index 2579d2f33052..69eb7cd90ee2 100644 --- a/lib/libsys/aio_error.2 +++ b/lib/libsys/aio_error.2 @@ -72,13 +72,6 @@ The .Fa iocb argument does not reference an outstanding asynchronous I/O request. -.It Bq Er ENOSYS -The -.Fn aio_error -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .El .Sh SEE ALSO .Xr aio_cancel 2 , diff --git a/lib/libsys/aio_fsync.2 b/lib/libsys/aio_fsync.2 index 0b863773eaf2..46fc5d95bcfd 100644 --- a/lib/libsys/aio_fsync.2 +++ b/lib/libsys/aio_fsync.2 @@ -136,13 +136,6 @@ argument is not a valid descriptor. .It Bq Er EINVAL This implementation does not support synchronized I/O for this file. -.It Bq Er ENOSYS -The -.Fn aio_fsync -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .El .Pp If the request is successfully enqueued, but subsequently cancelled diff --git a/lib/libsys/aio_mlock.2 b/lib/libsys/aio_mlock.2 index f89ad10936aa..02d54304c631 100644 --- a/lib/libsys/aio_mlock.2 +++ b/lib/libsys/aio_mlock.2 @@ -98,13 +98,6 @@ The request was not queued because of system resource limitations. The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_mlock -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .El .Pp If the request is successfully enqueued, but subsequently cancelled diff --git a/lib/libsys/aio_read.2 b/lib/libsys/aio_read.2 index 811d0b234168..f7d8cdfd71b1 100644 --- a/lib/libsys/aio_read.2 +++ b/lib/libsys/aio_read.2 @@ -173,13 +173,6 @@ points outside the process's allocated address space. The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_read -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .It Bq Er EOPNOTSUPP Asynchronous read operations on the file descriptor .Fa iocb->aio_fildes diff --git a/lib/libsys/aio_return.2 b/lib/libsys/aio_return.2 index 49e1abf201ec..499b85ef20d8 100644 --- a/lib/libsys/aio_return.2 +++ b/lib/libsys/aio_return.2 @@ -79,13 +79,6 @@ The I/O operation was submitted with and the value of the .Fa aio_lio_opcode is invalid. -.It Bq Er ENOSYS -The -.Fn aio_return -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .El .Sh SEE ALSO .Xr aio_cancel 2 , diff --git a/lib/libsys/aio_suspend.2 b/lib/libsys/aio_suspend.2 index ebc3c15d059f..c46b0292c34e 100644 --- a/lib/libsys/aio_suspend.2 +++ b/lib/libsys/aio_suspend.2 @@ -89,13 +89,6 @@ contains more asynchronous I/O requests than the variable, or at least one of the requests is not valid. .It Bq Er EINTR the suspend was interrupted by a signal. -.It Bq Er ENOSYS -The -.Fn aio_suspend -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .El .Sh SEE ALSO .Xr aio_cancel 2 , diff --git a/lib/libsys/aio_waitcomplete.2 b/lib/libsys/aio_waitcomplete.2 index 0a38155d7c75..f14e05abaaf0 100644 --- a/lib/libsys/aio_waitcomplete.2 +++ b/lib/libsys/aio_waitcomplete.2 @@ -101,13 +101,6 @@ A signal was delivered before the timeout expired and before any asynchronous I/O requests completed. .It Bq Er EINVAL The specified time limit is invalid. -.It Bq Er ENOSYS -The -.Fn aio_waitcomplete -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .It Bq Er EWOULDBLOCK .It Bq Er EINPROGRESS The specified time limit expired before any asynchronous I/O requests diff --git a/lib/libsys/aio_write.2 b/lib/libsys/aio_write.2 index a7108a87e378..875b24fa160a 100644 --- a/lib/libsys/aio_write.2 +++ b/lib/libsys/aio_write.2 @@ -182,13 +182,6 @@ points outside the process's allocated address space. The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_write -system call is not supported. -This can occur if -.Xr aio 4 -support is not present. .It Bq Er EOPNOTSUPP Asynchronous write operations on the file descriptor .Fa iocb->aio_fildes From nobody Fri Mar 28 02:45:49 2025 X-Original-To: dev-commits-src-all@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 4ZP4dp5NByz5sHqw; Fri, 28 Mar 2025 02:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZP4dp2SCGz3c56; Fri, 28 Mar 2025 02:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DplTAuN5p+/AATlgaLyVhVuJZhDlYe7Ilgk55RzNawg=; b=Rta6Xp4W9i6p9wxmIGbTOqi4J6qxkOsBadW7Yzx/skaGZykIYrDe85ZS7NA2nMo6i4ZwRA znnvmVJjBqw3hVjvXKeOfBvAaNRzSO/UyGN/g+Es6mlNMwWJcrEh8t2hPF3oucD8ObeDW6 QS+s8PFC+YyO53PzFWjFQRXncuw/Udx2HjaXrXZpMOxCxs3kZtzShIvj8bXc0JlzDWeecv Ab+V7nFR6vSrlH2igWaFMyeqCCIssj8Vr+nn8JDF7MNQuIWHH86sLF7S2dQg+ynRzlGq6c Q2a+cuIOhpET2W+oLJesIO7yHp6Hd7BFERQRLToXreqK0qVVY9rqjYaqdMJunQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743129950; a=rsa-sha256; cv=none; b=o+MFVScTYG5OIveqFj0XSv+AsgGrPaSPBFth7oWxHwKwlA1ywYJiVKfUAwidRWSYp8wMN9 ckQjCq/3f2yD748cpjQk4oJdc4Th4L6rVmxeIdQ0mk+I+cO2rfktT/4np+q3OAF+Fup8Qg mekqjSjHBC6NBaxP3mbLPjvUlB7McHnelk2ZKKVfwjTw4w6qAjMi7rXP95e5R0SYz1yQIB eb/ap8iuBHMBzQRsDCVQB93MjbU7OChILUn2ll3kla3Ba66/GELvkC9IvpHyD9HBLNEaF7 f3Mm9D9LbLqHcTwepK33lTMmxGauEWk99gUB0EVYXef57KB0V5jXBzQSvRqqUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743129950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DplTAuN5p+/AATlgaLyVhVuJZhDlYe7Ilgk55RzNawg=; b=A73vKcJ2wXPBISMMUjmNbJSvRvuhM4YCFhMWBYX/7KRgq2dciO05HNuvqLOGdCCkSH8/3p Nfmg+QMXEsme3KHgHZzORGv30NWbuTLeY1CogrMAoKOnmk3czX5qefis+M+aQdgNgA7K0s V2e8v5cjignen5h+8IZqVD8XNw4HlDKLbxxwXSeKh6SwBbNnpn3QoYms41+MgQj+W6oqWY YuPK0k1dAnu4NUVcV5v/7iTVR2JNLd0Rht9oPjz6Jjs/9wx9TwusCp5JTmwbs8Wguii5Av faiQwcVIfxA/TAGxWFa7xXWtoswK2v8/0K+NvysHK6S+ixrqr378tJshL2SsxA== 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 4ZP4dp1RKkz8PZ; Fri, 28 Mar 2025 02:45: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 52S2joE5084521; Fri, 28 Mar 2025 02:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S2jniq084518; Fri, 28 Mar 2025 02:45:49 GMT (envelope-from git) Date: Fri, 28 Mar 2025 02:45:49 GMT Message-Id: <202503280245.52S2jniq084518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 1b37af092211 - main - Bump .Dd for recently changed aio_*(2) manpages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b37af092211f9947d9f089f452232b791b9eafc Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1b37af092211f9947d9f089f452232b791b9eafc commit 1b37af092211f9947d9f089f452232b791b9eafc Author: Enji Cooper AuthorDate: 2025-03-28 02:43:26 +0000 Commit: Enji Cooper CommitDate: 2025-03-28 02:43:26 +0000 Bump .Dd for recently changed aio_*(2) manpages The ones that were effectively unchanged from d97e44784bb5a^..e24279e0f9e did not have `.Dd` bumped. Only the ones that had a net content change between those revisions. MFC after: 2 weeks MFC with: d97e44784bb5a e24279e0f9e --- lib/libsys/aio_read.2 | 2 +- lib/libsys/aio_waitcomplete.2 | 2 +- lib/libsys/aio_write.2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libsys/aio_read.2 b/lib/libsys/aio_read.2 index f7d8cdfd71b1..45779fff94c4 100644 --- a/lib/libsys/aio_read.2 +++ b/lib/libsys/aio_read.2 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 1, 2024 +.Dd March 27, 2025 .Dt AIO_READ 2 .Os .Sh NAME diff --git a/lib/libsys/aio_waitcomplete.2 b/lib/libsys/aio_waitcomplete.2 index f14e05abaaf0..e7f993e0b796 100644 --- a/lib/libsys/aio_waitcomplete.2 +++ b/lib/libsys/aio_waitcomplete.2 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 21, 2016 +.Dd March 27, 2025 .Dt AIO_WAITCOMPLETE 2 .Os .Sh NAME diff --git a/lib/libsys/aio_write.2 b/lib/libsys/aio_write.2 index 875b24fa160a..107e347ac335 100644 --- a/lib/libsys/aio_write.2 +++ b/lib/libsys/aio_write.2 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 1, 2024 +.Dd March 27, 2025 .Dt AIO_WRITE 2 .Os .Sh NAME From nobody Fri Mar 28 07:04:41 2025 X-Original-To: dev-commits-src-all@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 4ZPBNT4B2sz5rNFQ; Fri, 28 Mar 2025 07:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPBNT3Fmqz3c9s; Fri, 28 Mar 2025 07:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743145481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEE5gHE1r85wwneOtKQQmnIagGpYqCX69erkagaqRes=; b=LvJvgZAX3ZNqjtvnPfZTI+xVMHhW2eV0Iuj2ssBb7bqrw3wMLGxPwk997HsmP3TMbz4or5 LoAFW+BOhQUG1pHowYaMnnq6mF6rpARqOx1UsoCVDQmOnSgeWQIZKtmim+CFetRqJVAHiA zx8iowynNEf0AW2q9VDc75HXS0WRw4csQDnzHv1G/buZcTCR8Sk9M5KhqMI1Npu7kZ1X+w 534fH6GH217FICQOrsNdzrRCLMmL8tMNQ95VkK0pvD3WXwdKQvP0BPR3rDEgzalOiyvJpX IbJtvkay+D5sN8qHgNhui1m7EQu5sgaCuFKYnfTpiFXgGuGg28V6J9pvJwrO7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743145481; a=rsa-sha256; cv=none; b=jHA/5L4VVs1/fIm+JbWbm9jk6CoyVce0O/hZVxWq9B0YDYdPMpb+xO4ZaWvIO+vkIzvxUH xOrASket2WSJS5KfKpzNQ1wYOgPwiHsHKe/PRUEszd1vqVUSB5AgByh6qCeB2AUWZ27ufz RblEaWaNWEmlWG+SM2H2UtJ7K5CJFB9TR63qP9Tso6AlIIAgUnHfoLnpE9egax8sGxyE3M NufIzSgco8QYYiEFyJHgpjkB7KOni/GL4xdROFnTadKFLmveHBthgGuoUF7X94IdtVb/ru DbjpqwI/aoJyZznQ/RU/Yje6OrD7stY8gLiOTXEsx+Q8F4LuRJSEd7cqEwnkKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743145481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEE5gHE1r85wwneOtKQQmnIagGpYqCX69erkagaqRes=; b=K7ZYJmakM8E0LtgvGUAvim7TSf7pw96JbeOEOp89V9rwNrC+fzmyiGzwAMWB5AOtUyFf1p UfCNjTHI14WrArSv+z/SVBRuMabHxZbGcyBQcCYRStvkQY8LZwHDwEflA1FTiyFsYYHQ8P CsFMpVbEuGWL6WzLLyw+22S1/A5/qtj+90zGKUWmSVgrb/Awk5mqAWL7uHNBIKlrb5AA0V KhJLBVof5eSaB1mP5f9y++7501C0KIUbWPIwCC1tpp+mnP9L1Kf9R2smECDdJz/FhYeP3v pMjukHRopbMIEk/r55Y3aRt43EhfeYtsw6yM01AvzS7vXV4YMcFIL3XkvNRcXw== 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 4ZPBNT2VsFzZ17; Fri, 28 Mar 2025 07:04:41 +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 52S74fQ3073200; Fri, 28 Mar 2025 07:04:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52S74fNY073197; Fri, 28 Mar 2025 07:04:41 GMT (envelope-from git) Date: Fri, 28 Mar 2025 07:04:41 GMT Message-Id: <202503280704.52S74fNY073197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 93c4f310fc65 - main - vm_fault: correct mpred update after alloc fail List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93c4f310fc653b0b7dda57043430dac8c7feaece Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=93c4f310fc653b0b7dda57043430dac8c7feaece commit 93c4f310fc653b0b7dda57043430dac8c7feaece Author: Doug Moore AuthorDate: 2025-03-28 07:01:50 +0000 Commit: Doug Moore CommitDate: 2025-03-28 07:01:50 +0000 vm_fault: correct mpred update after alloc fail Find the predecessor in dst_object, not src_object. Fixes: 6d6c97fb72a7 ("vm_fault: update pred lock acq in copy_entry") Reported by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D49547 --- sys/vm/vm_fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 2e254e255dce..48a7a47e4c59 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -2208,7 +2208,7 @@ again: VM_OBJECT_RUNLOCK(object); vm_wait(dst_object); VM_OBJECT_WLOCK(dst_object); - mpred = vm_page_mpred(src_object, pindex); + mpred = vm_page_mpred(dst_object, pindex); goto again; } From nobody Fri Mar 28 11:50:57 2025 X-Original-To: dev-commits-src-all@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 4ZPJkp1r41z5rkH1; Fri, 28 Mar 2025 11:50: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPJkn4v00z3ZFT; Fri, 28 Mar 2025 11:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743162657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2GrZX4KOdGzwDY1x4tVJOj+BZZi+HNarYj1nai1OgOE=; b=OkEGWHUteJJuUSZiblSw82o6vndNHfyD5dUxFTSy69T2DT7SO/0wF0EtDFlPO9ci6BNEMt 4ihw5vppwx/NhBzdPzkyNeKf8tj55LTwA9vv+irgJEDLqh56Z/GMI6ihLgUZ/JNLx+bTO/ 9rL351fEU3/6Dqa4W+lAhC9UJzfiRIuYdhGziiF5uiN6TQUgyu32froK6f67I98HQtYxFm ch3WSZ+6rWT71KDqcPp67pAR8MwC8V9gyebRRZcTkSHR7r0jxg1BSbDYujKJO4uTanFL/5 zhlPhgOq5oHPnf9ERXqet7Bn2rbXYQVn7D3XkQ98+sltBsHKOoUkKgd6MmnL8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743162657; a=rsa-sha256; cv=none; b=DEieuuM7F1ekrRlfKL2qPGBcAYnTdBqfDzfK6pQeUQv71adnmAM7TqJGdeWYPIT6Co5/y9 RiqUbLM35FNLkqoe6sMomQJW7n5gVX/hqJqv8u/oyPJHhe05Qb1s75nvBHkkxPo0Hj4JWB N1i1d4PS7x0Rh1QXdxYsvwwlK70EbI4OhytekM/xkbcgMrtOngZ+kvfU3DhqnCiD/RwMS1 6dru6XXEnDoeOOFPN4rkQFh41owqiQvJo8wNdW3Pd/cYwLPgKNvDm0tK/I4GjWLEgOb5On 6YLYmrXYMpne3iNSuqPmCwqtCB+lG4JVZiuHF1NpoDd/wGcT7E5MX8SM02VrXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743162657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2GrZX4KOdGzwDY1x4tVJOj+BZZi+HNarYj1nai1OgOE=; b=JMMfqKAgY2TyEOeAF1m0FZ6mvmLZh7lWbLHX5t2s/B4IQEtp878iWYpWcniBnIu+8r3psc Aj9l1iqr0W3qhJTaTlkDJj77tuBvYWF6iLaS1pfsn4R/AurF+R+eAnROS73JEpYqZhuZgS ELhSK0DjagmLutLQcYj8r/60VQMIbE9dGtMCQsAmy1reNgJjlC6enihg89al1a1bZUCn4A szOYY5Y39cvK1o4mnCphq2lHuC9e3eeCXtZToNHJO8jX/bGllxoNpytkUFXPi41bQUB1Kb BW7uAkLNZqjtDBlM5T3V/tVYX6W7HDvygC2y3xtf7IF/sAt4bU0X2Dx2SHPS0g== 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 4ZPJkn44Bxzj5k; Fri, 28 Mar 2025 11:50: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 52SBovDJ008090; Fri, 28 Mar 2025 11:50:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SBoveN008087; Fri, 28 Mar 2025 11:50:57 GMT (envelope-from git) Date: Fri, 28 Mar 2025 11:50:57 GMT Message-Id: <202503281150.52SBoveN008087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 16665c74788c - main - pf tests: verify that 'block return' generates the expected packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 16665c74788c6c75b84919d5a083369a6388f0b4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=16665c74788c6c75b84919d5a083369a6388f0b4 commit 16665c74788c6c75b84919d5a083369a6388f0b4 Author: Kristof Provost AuthorDate: 2025-03-27 10:59:13 +0000 Commit: Kristof Provost CommitDate: 2025-03-28 09:59:17 +0000 pf tests: verify that 'block return' generates the expected packets Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/return.py | 153 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 3b1ba2085f43..e3110d0e5df7 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -58,6 +58,7 @@ ATF_TESTS_PYTEST+= frag6.py ATF_TESTS_PYTEST+= icmp.py ATF_TESTS_PYTEST+= nat64.py ATF_TESTS_PYTEST+= nat66.py +ATF_TESTS_PYTEST+= return.py ATF_TESTS_PYTEST+= sctp.py # Allow tests to run in parallel in their own jails diff --git a/tests/sys/netpfil/pf/return.py b/tests/sys/netpfil/pf/return.py new file mode 100644 index 000000000000..753012860764 --- /dev/null +++ b/tests/sys/netpfil/pf/return.py @@ -0,0 +1,153 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +import pytest +import subprocess +import re +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +def check(cmd): + ps = subprocess.Popen(cmd, shell=True) + ret = ps.wait() + if ret != 0: + raise Exception("Command %s returned %d" % (cmd, ret)) + +class TestReturn(VnetTestTemplate): + REQUIRED_MODULES = [ "pf" ] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1", "if2"]}, + "vnet3": {"ifaces": ["if2"]}, + "if1": {"prefixes4": [("192.0.2.2/24", "192.0.2.1/24")]}, + "if2": {"prefixes4": [("198.51.100.1/24", "198.51.100.2/24")]}, + } + + def vnet2_handler(self, vnet): + ifname = vnet.iface_alias_map["if1"].name + if2name = vnet.iface_alias_map["if2"].name + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "nat on %s inet from 192.0.2.0/24 to any -> (%s)" % (ifname, ifname), + "block return", + "pass inet proto icmp icmp-type echoreq", + ]) + + ToolsHelper.print_output("/sbin/sysctl net.inet.ip.forwarding=1") + ToolsHelper.print_output("/sbin/pfctl -x loud") + + def vnet3_handler(self, vnet): + ToolsHelper.print_output("/sbin/route add default 198.51.100.1") + + def common_setup(self): + ToolsHelper.print_output("/sbin/route add default 192.0.2.1") + + # Sanity check + check("/sbin/ping -c 1 192.0.2.1") + check("/sbin/ping -c 1 198.51.100.1") + check("/sbin/ping -c 2 198.51.100.2") + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_tcp(self): + self.common_setup() + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + # Send a TCP SYN, expect a RST + pkt = sp.IP(src="192.0.2.2", dst="198.51.100.2") \ + / sp.TCP(sport=4321, dport=1234, flags="S") + print(pkt) + reply = sp.sr1(pkt, timeout=3, verbose=False) + print(reply) + + ip = reply.getlayer(sp.IP) + tcp = reply.getlayer(sp.TCP) + assert ip + assert ip.src == "198.51.100.2" + assert ip.dst == "192.0.2.2" + assert tcp + assert tcp.sport == 1234 + assert tcp.dport == 4321 + assert "R" in tcp.flags + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_udp(self): + self.common_setup() + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + # Send a UDP packet, expect ICMP error + pkt = sp.IP(dst="198.51.100.2") \ + / sp.UDP(sport=4321, dport=1234) + print(pkt) + reply = sp.sr1(pkt, timeout=3, verbose=False) + print(reply) + ip = reply.getlayer(sp.IP) + icmp = reply.getlayer(sp.ICMP) + udp = reply.getlayer(sp.UDPerror) + + assert ip + assert ip.src == "192.0.2.1" + assert ip.dst == "192.0.2.2" + assert icmp + assert icmp.type == 3 + assert icmp.code == 3 + assert udp + assert udp.sport == 4321 + assert udp.dport == 1234 + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_sctp(self): + self.common_setup() + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + # Send an SCTP init, expect an SCTP abort + pkt = sp.IP(dst="198.51.100.2") \ + / sp.SCTP(sport=1111, dport=2222) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + print(pkt) + reply = sp.sr1(pkt, timeout=3, verbose=False) + print(reply) + ip = reply.getlayer(sp.IP) + sctp = reply.getlayer(sp.SCTP) + abort = reply.getlayer(sp.SCTPChunkAbort) + print(sctp) + + assert ip + assert ip.src == "198.51.100.2" + assert ip.dst == "192.0.2.2" + assert sctp + assert sctp.sport == 2222 + assert sctp.dport == 1111 + assert(abort) From nobody Fri Mar 28 16:08:53 2025 X-Original-To: dev-commits-src-all@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 4ZPQSQ3fjWz5s3lZ; Fri, 28 Mar 2025 16:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPQSP4SKRz3Qky; Fri, 28 Mar 2025 16:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743178133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BxhfncOoRZkfWB1XUiSNOAMU3uHGVpIu1UK6gH7QQs=; b=jpe84+Bh+2SCU37/V4Z4aSSLyPPiT9+E0DoZgy1uHKtlzNII6mJVDVHpf+nv68vJXSloYc mUkKagcLZvAJOJJhht+6oNecQK5Ms/4oC/96c2E57vBGl+eetdEzzkoTDCAL+h30Oz5SKy KI4NS9JNZqERt60dAUQ1DPo6Xg4XgSHz+j1cgC6rnvh+F87RwVHXfS7rxSHE+0ZfOQpBnB trvwaCRl7/cYJ7NNSE9M2iqv+TzsnppDhuCf1sttawkOLlTTSvLsmycJ22CQsOo0tJGGIC xSY7dSexuuRrC6RzhsMKECTWVwbc+3n1qWxeFeWfR+tRrM2L/O75SSA2/Nnqzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743178133; a=rsa-sha256; cv=none; b=SXtTINlVtYmtb55RHuxp718RiHONMCqnoYwIZfiJAOdxG2aXyNDH6EbmRL6pXUZH98ZMyM yzsQh1pWc/TuM5rLI9ixyfXhUhd+bn2zecUV0fhQr3m0RDWZbAZ+WKSBYBHg1O7ys5z/lt UlNysMlBfRBZSStzedMZZZLj0uN3aFGymiGe/GrLtGfwW4IEK8fSPrCN2gQcW6Etyq4cDH ZaRAqDu0inlTQQAHrmnKL0LaKsJpz+9qeI+e3ykkNCdvrqrWeS/Rq9TXeJjQGgShoSHo61 0WXk9g/YVq6I9udI5XxjyaOeYg2QT9+KnrC5BkQnMeCS8RlQ8/VD26r4qaSNiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743178133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BxhfncOoRZkfWB1XUiSNOAMU3uHGVpIu1UK6gH7QQs=; b=d5mm6Yhyv9QErdypu9wkPlU+pAs+FAGNLLVQBb4S5qKNXhXizIdIVvwHu9i9CcGZCWXiYC XmnzgGQKjhZuaqS6leF4kfgONWe3cOnZX8Dx3rk/RuaBzw7f0lAYdsP70dL4dpjcS5EfI6 6W9hs3KbdV2eW3jpXL64VHFI6Q3vRUJ9MAEjMouELwsJWMcxnOb9AbMSOWXutsU31r8tfo jq4QpgiarECxbORS2ITamWWX50RuR3N90Rh+kI5sEfR6LUhDXEoohIr1paJ6uCQ7kgsDAj 5cKHnCmRcATprPvOkTOWR2Qv0ybNI3/xAGnRLYC1wMRoFdfIevmNGsA3BCfjJQ== 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 4ZPQSP3WwlzqXv; Fri, 28 Mar 2025 16:08: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 52SG8rEs086509; Fri, 28 Mar 2025 16:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SG8rp2086506; Fri, 28 Mar 2025 16:08:53 GMT (envelope-from git) Date: Fri, 28 Mar 2025 16:08:53 GMT Message-Id: <202503281608.52SG8rp2086506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: aeddee83341e - main - pfctl: Split pool parsing into separate functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aeddee83341eb3b847fb4862db5cd0a553bf4a36 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=aeddee83341eb3b847fb4862db5cd0a553bf4a36 commit aeddee83341eb3b847fb4862db5cd0a553bf4a36 Author: Kajetan Staszkiewicz AuthorDate: 2025-03-28 16:08:34 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2025-03-28 16:08:34 +0000 pfctl: Split pool parsing into separate functions The pf pools are used in NAT, route-to and af-to rules. Some parts of code are duplicated between them. Create functions apply_redirspec(), apply_nat_ports() and apply_rdr_ports() to handle the common tasks. Simplify data structures used for pool parsing. Move the contents of struct redirection to struct redirspec. Map all ways of parsing pools directly onto struct redirspec. Name various forms of struct redirspect to hint where they are used. Remove struct redirspec *rroute from struct filter_opts, because filter_opts is bzero()'ed after the route part of rule is parsed, and thus can't be used. Add tests to ensure that parsing and error messages behave as expected. The tests have been written and tested with pfctl from before this patch. This is prerequisite for adding support for OpenBSD NAT syntax. Reviewed by: kp Approved by: kp (mentor) Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D49218 --- sbin/pfctl/parse.y | 569 ++++++++++++++++------------------- sbin/pfctl/pfctl.c | 10 + sbin/pfctl/pfctl_parser.h | 1 + sbin/pfctl/tests/files/Makefile | 2 +- sbin/pfctl/tests/files/pf1026.ok | 2 +- sbin/pfctl/tests/files/pf1027.ok | 2 +- sbin/pfctl/tests/files/pf1028.in | 1 + sbin/pfctl/tests/files/pf1028.ok | 1 + sbin/pfctl/tests/files/pf1029.in | 1 + sbin/pfctl/tests/files/pf1029.ok | 1 + sbin/pfctl/tests/files/pf1030.in | 1 + sbin/pfctl/tests/files/pf1030.ok | 1 + sbin/pfctl/tests/files/pf1031.in | 1 + sbin/pfctl/tests/files/pf1031.ok | 1 + sbin/pfctl/tests/files/pf1032.in | 1 + sbin/pfctl/tests/files/pf1032.ok | 1 + sbin/pfctl/tests/files/pf1033.fail | 1 + sbin/pfctl/tests/files/pf1033.in | 1 + sbin/pfctl/tests/files/pf1034.fail | 1 + sbin/pfctl/tests/files/pf1034.in | 1 + sbin/pfctl/tests/files/pf1035.in | 1 + sbin/pfctl/tests/files/pf1035.ok | 1 + sbin/pfctl/tests/files/pf1036.in | 1 + sbin/pfctl/tests/files/pf1036.ok | 1 + sbin/pfctl/tests/files/pf1037.in | 1 + sbin/pfctl/tests/files/pf1037.ok | 1 + sbin/pfctl/tests/files/pf1038.in | 1 + sbin/pfctl/tests/files/pf1038.ok | 1 + sbin/pfctl/tests/files/pf1039.in | 1 + sbin/pfctl/tests/files/pf1039.ok | 1 + sbin/pfctl/tests/files/pf1040.fail | 1 + sbin/pfctl/tests/files/pf1040.in | 1 + sbin/pfctl/tests/files/pf1040.ok | 1 + sbin/pfctl/tests/files/pf1041.in | 1 + sbin/pfctl/tests/files/pf1041.ok | 1 + sbin/pfctl/tests/files/pf1042.fail | 1 + sbin/pfctl/tests/files/pf1042.in | 1 + sbin/pfctl/tests/files/pf1043.fail | 1 + sbin/pfctl/tests/files/pf1043.in | 1 + sbin/pfctl/tests/files/pf1044.in | 1 + sbin/pfctl/tests/files/pf1044.ok | 1 + sbin/pfctl/tests/files/pf1045.in | 1 + sbin/pfctl/tests/files/pf1045.ok | 1 + sbin/pfctl/tests/files/pf1046.fail | 1 + sbin/pfctl/tests/files/pf1046.in | 1 + sbin/pfctl/tests/files/pf1047.fail | 1 + sbin/pfctl/tests/files/pf1047.in | 1 + sbin/pfctl/tests/files/pf1048.in | 1 + sbin/pfctl/tests/files/pf1048.ok | 1 + sbin/pfctl/tests/files/pf1049.in | 1 + sbin/pfctl/tests/files/pf1049.ok | 1 + sbin/pfctl/tests/files/pf1050.in | 1 + sbin/pfctl/tests/files/pf1050.ok | 1 + sbin/pfctl/tests/files/pf1051.in | 1 + sbin/pfctl/tests/files/pf1051.ok | 1 + sbin/pfctl/tests/files/pf1052.in | 1 + sbin/pfctl/tests/files/pf1052.ok | 1 + sbin/pfctl/tests/files/pf1053.in | 1 + sbin/pfctl/tests/files/pf1053.ok | 1 + sbin/pfctl/tests/files/pf1054.in | 3 + sbin/pfctl/tests/files/pf1054.ok | 1 + sbin/pfctl/tests/files/pf1055.in | 1 + sbin/pfctl/tests/files/pf1055.ok | 1 + sbin/pfctl/tests/files/pf1056.in | 1 + sbin/pfctl/tests/files/pf1056.ok | 1 + sbin/pfctl/tests/files/pf1057.in | 1 + sbin/pfctl/tests/files/pf1057.ok | 1 + sbin/pfctl/tests/files/pf1058.in | 1 + sbin/pfctl/tests/files/pf1058.ok | 1 + sbin/pfctl/tests/files/pf1059.in | 1 + sbin/pfctl/tests/files/pf1059.ok | 1 + sbin/pfctl/tests/files/pf1060.in | 1 + sbin/pfctl/tests/files/pf1060.ok | 1 + sbin/pfctl/tests/files/pf1061.in | 1 + sbin/pfctl/tests/files/pf1061.ok | 1 + sbin/pfctl/tests/files/pf1062.in | 1 + sbin/pfctl/tests/files/pf1062.ok | 1 + sbin/pfctl/tests/files/pf1063.in | 1 + sbin/pfctl/tests/files/pf1063.ok | 1 + sbin/pfctl/tests/files/pf1064.in | 1 + sbin/pfctl/tests/files/pf1064.ok | 1 + sbin/pfctl/tests/pfctl_test.c | 188 ++++++++++-- sbin/pfctl/tests/pfctl_test_list.inc | 37 +++ 83 files changed, 547 insertions(+), 341 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 8f732bdf268a..ea81efd7fd94 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -227,10 +227,6 @@ struct range { int b; int t; }; -struct redirection { - struct node_host *host; - struct range rport; -}; static struct pool_opts { int marker; @@ -245,9 +241,10 @@ static struct pool_opts { } pool_opts; struct redirspec { - struct redirection *rdr; + struct node_host *host; + struct range rport; struct pool_opts pool_opts; - int af; + int af; }; static struct filter_opts { @@ -302,9 +299,8 @@ static struct filter_opts { struct node_host *addr; u_int16_t port; } divert; - struct redirspec nat; - struct redirspec rdr; - struct redirspec rroute; + struct redirspec *nat; + struct redirspec *rdr; /* new-style scrub opts */ int nodf; int minttl; @@ -382,9 +378,11 @@ void expand_eth_rule(struct pfctl_eth_rule *, struct node_mac *, struct node_mac *, struct node_host *, struct node_host *, const char *, const char *); +int apply_rdr_ports(struct pfctl_rule *r, struct pfctl_pool *, struct redirspec *); +int apply_nat_ports(struct pfctl_pool *, struct redirspec *); +int apply_redirspec(struct pfctl_pool *, struct redirspec *); void expand_rule(struct pfctl_rule *, struct node_if *, struct redirspec *, struct redirspec *, struct redirspec *, - struct node_host *, struct node_host *, struct node_host *, struct node_proto *, struct node_os *, struct node_host *, struct node_port *, struct node_host *, struct node_port *, struct node_uid *, struct node_gid *, struct node_if *, @@ -463,13 +461,10 @@ typedef struct { } etheraddr; char *bridge_to; struct { - struct node_host *host; + struct redirspec *redirspec; u_int8_t rt; - u_int8_t pool_opts; - sa_family_t af; - struct pf_poolhashkey *key; } route; - struct redirection *redirection; + struct redirspec *redirspec; struct { int action; struct node_state_opt *options; @@ -554,14 +549,15 @@ int parseport(char *, struct range *r, int); %type fromto l3fromto %type ipportspec from to %type ipspec toipspec xhost host dynaddr host_list -%type redir_host_list redirspec -%type route_host route_host_list routespec +%type redir_host redir_host_list routespec +%type route_host route_host_list %type os xos os_list %type portspec port_list port_item %type uids uid_list uid_item %type gids gid_list gid_item %type route -%type redirection redirpool +%type no_port_redirspec port_redirspec route_redirspec +%type binat_redirspec nat_redirspec %type label stringall tag anchorname %type string varstring numberstring %type keep @@ -965,7 +961,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto YYERROR; } - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); + if (pf->astack[pf->asd + 1]) { if ($2 && strchr($2, '/') != NULL) { free($2); @@ -978,7 +975,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto pfctl_anchor_setup(&r, &pf->astack[pf->asd]->ruleset, $2 ? $2 : pf->alast->name); - + if (r.anchor == NULL) err(1, "anchorrule: unable to " "create ruleset"); @@ -1082,7 +1079,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto decide_address_family($8.src.host, &r.af); decide_address_family($8.dst.host, &r.af); - expand_rule(&r, $5, NULL, NULL, NULL, NULL, NULL, NULL, + expand_rule(&r, $5, NULL, NULL, NULL, $7, $8.src_os, $8.src.host, $8.src.port, $8.dst.host, $8.dst.port, $9.uid, $9.gid, $9.rcv, $9.icmpspec, pf->astack[pf->asd + 1] ? pf->alast->name : $2); @@ -1097,7 +1094,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto YYERROR; } - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); + r.action = PF_NAT; r.af = $4; r.rtableid = $7; @@ -1105,7 +1103,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto decide_address_family($6.src.host, &r.af); decide_address_family($6.dst.host, &r.af); - expand_rule(&r, $3, NULL, NULL, NULL, NULL, NULL, NULL, + expand_rule(&r, $3, NULL, NULL, NULL, $5, $6.src_os, $6.src.host, $6.src.port, $6.dst.host, $6.dst.port, 0, 0, 0, 0, $2); free($2); @@ -1118,7 +1116,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto YYERROR; } - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); + r.action = PF_RDR; r.af = $4; r.rtableid = $7; @@ -1147,7 +1146,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto r.dst.port_op = $6.dst.port->op; } - expand_rule(&r, $3, NULL, NULL, NULL, NULL, NULL, NULL, + expand_rule(&r, $3, NULL, NULL, NULL, $5, $6.src_os, $6.src.host, $6.src.port, $6.dst.host, $6.dst.port, 0, 0, 0, 0, $2); free($2); @@ -1160,7 +1159,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto YYERROR; } - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); + r.action = PF_BINAT; r.af = $4; r.rtableid = $7; @@ -1425,7 +1425,7 @@ scrubrule : scrubaction dir logquick interface af proto fromto scrub_opts if (check_rulestate(PFCTL_STATE_SCRUB)) YYERROR; - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); r.action = $1.b1; r.direction = $2; @@ -1470,7 +1470,7 @@ scrubrule : scrubaction dir logquick interface af proto fromto scrub_opts r.match_tag_not = $8.match_tag_not; r.rtableid = $8.rtableid; - expand_rule(&r, $4, NULL, NULL, NULL, NULL, NULL, NULL, + expand_rule(&r, $4, NULL, NULL, NULL, $6, $7.src_os, $7.src.host, $7.src.port, $7.dst.host, $7.dst.port, NULL, NULL, NULL, NULL, ""); } @@ -1587,7 +1587,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { YYERROR; for (i = $3; i; i = i->next) { - bzero(&r, sizeof(r)); + pfctl_init_rule(&r); r.action = PF_DROP; r.direction = PF_IN; @@ -1635,9 +1635,9 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { } if (h != NULL) - expand_rule(&r, j, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, h, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, ""); + expand_rule(&r, j, NULL, NULL, NULL, + NULL, NULL, h, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, ""); if ((i->ifa_flags & IFF_LOOPBACK) == 0) { bzero(&r, sizeof(r)); @@ -1657,9 +1657,10 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { else h = ifa_lookup(i->ifname, 0); if (h != NULL) - expand_rule(&r, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, h, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, ""); + expand_rule(&r, NULL, NULL, + NULL, NULL, NULL, NULL, h, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, ""); } else free(hh); } @@ -2371,7 +2372,7 @@ pfrule : action dir logquick interface route af proto fromto if (check_rulestate(PFCTL_STATE_FILTER)) YYERROR; - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); r.action = $1.b1; switch ($1.b2) { @@ -2728,44 +2729,14 @@ pfrule : action dir logquick interface route af proto fromto YYERROR; } r.rt = $5.rt; - r.route.opts = $5.pool_opts; - if ($5.key != NULL) - memcpy(&r.route.key, $5.key, - sizeof(struct pf_poolhashkey)); - } - if (r.rt) { - decide_address_family($5.host, &r.af); + decide_address_family($5.redirspec->host, &r.af); if (!(r.rule_flag & PFRULE_AFTO)) - remove_invalid_hosts(&$5.host, &r.af); - if ($5.host == NULL) { + remove_invalid_hosts(&($5.redirspec->host), &r.af); + if ($5.redirspec->host == NULL) { yyerror("no routing address with " "matching address family found."); YYERROR; } - if ((r.route.opts & PF_POOL_TYPEMASK) == - PF_POOL_NONE && ($5.host->next != NULL || - $5.host->addr.type == PF_ADDR_TABLE || - DYNIF_MULTIADDR($5.host->addr))) - r.route.opts |= PF_POOL_ROUNDROBIN; - if ($5.host->next != NULL && - !PF_POOL_DYNTYPE(r.route.opts)) { - yyerror("address pool option " - "not supported by type"); - } - if (!PF_POOL_DYNTYPE(r.route.opts) && - (disallow_table($5.host, - "tables are not supported by pool type") || - disallow_alias($5.host, - "interface (%s) is not supported by pool type"))) - YYERROR; - if ($5.host->next != NULL) { - if ((r.route.opts & PF_POOL_TYPEMASK) != - PF_POOL_ROUNDROBIN) { - yyerror("r.route.opts must " - "be PF_POOL_ROUNDROBIN"); - YYERROR; - } - } } if ($9.queues.qname != NULL) { if (strlcpy(r.qname, $9.queues.qname, @@ -2824,19 +2795,10 @@ pfrule : action dir logquick interface route af proto fromto } if ($9.marker & FOM_AFTO) { - r.naf = $9.nat.af; - - r.nat.opts = $9.nat.pool_opts.type; - r.nat.opts |= $9.nat.pool_opts.opts; - - if (!PF_POOL_DYNTYPE(r.nat.opts) && - disallow_table($9.nat.rdr->host, "tables are not " - "supported by pool type")) - YYERROR; + r.naf = $9.nat->af; } - expand_rule(&r, $4, &$9.nat, &$9.rdr, &$9.rroute, - NULL, $9.nat.rdr ? $9.nat.rdr->host : NULL, $5.host, + expand_rule(&r, $4, $9.nat, $9.rdr, $5.redirspec, $7, $8.src_os, $8.src.host, $8.src.port, $8.dst.host, $8.dst.port, $9.uid, $9.gid, $9.rcv, $9.icmpspec, ""); } @@ -3053,8 +3015,8 @@ filter_opt : USER uids { filter_opts.marker |= FOM_SCRUB_TCP; filter_opts.marker |= $3.marker; } - | AFTO af FROM redirspec pool_opts { - if (filter_opts.nat.rdr) { + | AFTO af FROM port_redirspec { + if (filter_opts.nat) { yyerror("cannot respecify af-to"); YYERROR; } @@ -3062,26 +3024,18 @@ filter_opt : USER uids { yyerror("no address family specified"); YYERROR; } + + filter_opts.nat = $4; + filter_opts.nat->af = $2; if ($4->af && $4->af != $2) { yyerror("af-to addresses must be in the " "target address family"); YYERROR; } - filter_opts.nat.af = $2; - filter_opts.nat.rdr = calloc(1, sizeof(struct redirection)); - if (filter_opts.nat.rdr == NULL) - err(1, "af-to: calloc"); - filter_opts.nat.rdr->host = $4; - memcpy(&filter_opts.nat.pool_opts, &$5, - sizeof(filter_opts.nat.pool_opts)); - filter_opts.rdr.rdr = - calloc(1, sizeof(struct redirection)); - bzero(&filter_opts.rdr.pool_opts, - sizeof(filter_opts.rdr.pool_opts)); filter_opts.marker |= FOM_AFTO; } - | AFTO af FROM redirspec pool_opts TO redirspec pool_opts { - if (filter_opts.nat.rdr) { + | AFTO af FROM port_redirspec TO port_redirspec { + if (filter_opts.nat) { yyerror("cannot respecify af-to"); YYERROR; } @@ -3089,26 +3043,16 @@ filter_opt : USER uids { yyerror("no address family specified"); YYERROR; } - if (($4->af && $4->af != $2) || - ($7->af && $7->af != $2)) { + filter_opts.nat = $4; + filter_opts.nat->af = $2; + filter_opts.rdr = $6; + filter_opts.rdr->af = $2; + if (($4->af && $4->host->af != $2) || + ($6->af && $6->host->af != $2)) { yyerror("af-to addresses must be in the " "target address family"); YYERROR; } - filter_opts.nat.af = $2; - filter_opts.nat.rdr = calloc(1, sizeof(struct redirection)); - if (filter_opts.nat.rdr == NULL) - err(1, "af-to: calloc"); - filter_opts.nat.rdr->host = $4; - memcpy(&filter_opts.nat.pool_opts, &$5, - sizeof(filter_opts.nat.pool_opts)); - filter_opts.rdr.af = $2; - filter_opts.rdr.rdr = calloc(1, sizeof(struct redirection)); - if (filter_opts.rdr.rdr == NULL) - err(1, "af-to: calloc"); - filter_opts.rdr.rdr->host = $7; - memcpy(&filter_opts.nat.pool_opts, &$8, - sizeof(filter_opts.nat.pool_opts)); filter_opts.marker |= FOM_AFTO; } | filter_sets @@ -4580,7 +4524,7 @@ portstar : numberstring { } ; -redirspec : host { $$ = $1; } +redir_host : host { $$ = $1; } | '{' optnl redir_host_list '}' { $$ = $3; } ; @@ -4592,20 +4536,41 @@ redir_host_list : host optnl { $$ = $1; } } ; -redirpool : /* empty */ { $$ = NULL; } - | ARROW redirspec { - $$ = calloc(1, sizeof(struct redirection)); +/* Redirection without port */ +no_port_redirspec: redir_host pool_opts { + $$ = calloc(1, sizeof(struct redirspec)); if ($$ == NULL) - err(1, "redirection: calloc"); - $$->host = $2; + err(1, "redirspec: calloc"); + $$->host = $1; + $$->pool_opts = $2; $$->rport.a = $$->rport.b = $$->rport.t = 0; } - | ARROW redirspec PORT portstar { - $$ = calloc(1, sizeof(struct redirection)); + ; + +/* Redirection with optional port */ +port_redirspec : no_port_redirspec; + | redir_host PORT portstar pool_opts { + $$ = calloc(1, sizeof(struct redirspec)); if ($$ == NULL) - err(1, "redirection: calloc"); - $$->host = $2; - $$->rport = $4; + err(1, "redirspec: calloc"); + $$->host = $1; + $$->rport = $3; + $$->pool_opts = $4; + } + +/* Redirection with an arrow and an optional port: FreeBSD NAT rules */ +nat_redirspec : ARROW port_redirspec { + $$ = $2; + } + ; + +/* Redirection with interfaces and without ports: route-to rules */ +route_redirspec : routespec pool_opts { + $$ = calloc(1, sizeof(struct redirspec)); + if ($$ == NULL) + err(1, "redirspec: calloc"); + $$->host = $1; + $$->pool_opts = $2; } ; @@ -4756,18 +4721,18 @@ pool_opt : BITMASK { } ; -redirection : /* empty */ { $$ = NULL; } +binat_redirspec : /* empty */ { $$ = NULL; } | ARROW host { - $$ = calloc(1, sizeof(struct redirection)); + $$ = calloc(1, sizeof(struct redirspec)); if ($$ == NULL) - err(1, "redirection: calloc"); + err(1, "redirspec: calloc"); $$->host = $2; $$->rport.a = $$->rport.b = $$->rport.t = 0; } | ARROW host PORT portstar { - $$ = calloc(1, sizeof(struct redirection)); + $$ = calloc(1, sizeof(struct redirspec)); if ($$ == NULL) - err(1, "redirection: calloc"); + err(1, "redirspec: calloc"); $$->host = $2; $$->rport = $4; } @@ -4808,7 +4773,7 @@ nataction : no NAT natpasslog { ; natrule : nataction interface af proto fromto tag tagged rtable - redirpool pool_opts + nat_redirspec { struct pfctl_rule r; struct node_state_opt *o; @@ -4816,7 +4781,7 @@ natrule : nataction interface af proto fromto tag tagged rtable if (check_rulestate(PFCTL_STATE_NAT)) YYERROR; - memset(&r, 0, sizeof(r)); + pfctl_init_rule(&r); r.action = $1.b1; r.natpass = $1.b2; @@ -4875,110 +4840,6 @@ natrule : nataction interface af proto fromto tag tagged rtable } if (check_netmask($9->host, r.af)) YYERROR; - - r.rdr.proxy_port[0] = ntohs($9->rport.a); - - switch (r.action) { - case PF_RDR: - if (!$9->rport.b && $9->rport.t && - $5.dst.port != NULL) { - r.rdr.proxy_port[1] = - ntohs($9->rport.a) + - (ntohs( - $5.dst.port->port[1]) - - ntohs( - $5.dst.port->port[0])); - } else - r.rdr.proxy_port[1] = - ntohs($9->rport.b); - break; - case PF_NAT: - r.rdr.proxy_port[1] = - ntohs($9->rport.b); - if (!r.rdr.proxy_port[0] && - !r.rdr.proxy_port[1]) { - r.rdr.proxy_port[0] = - PF_NAT_PROXY_PORT_LOW; - r.rdr.proxy_port[1] = - PF_NAT_PROXY_PORT_HIGH; - } else if (!r.rdr.proxy_port[1]) - r.rdr.proxy_port[1] = - r.rdr.proxy_port[0]; - break; - default: - break; - } - - r.rdr.opts = $10.type; - if ((r.rdr.opts & PF_POOL_TYPEMASK) == - PF_POOL_NONE && ($9->host->next != NULL || - $9->host->addr.type == PF_ADDR_TABLE || - DYNIF_MULTIADDR($9->host->addr))) - r.rdr.opts = PF_POOL_ROUNDROBIN; - if (!PF_POOL_DYNTYPE(r.rdr.opts) && - (disallow_table($9->host, - "tables are not supported by pool type") || - disallow_alias($9->host, - "interface (%s) is not supported by pool type"))) - YYERROR; - if ($9->host->next != NULL) { - if ((r.rdr.opts & PF_POOL_TYPEMASK) != - PF_POOL_ROUNDROBIN) { - yyerror("only round-robin " - "valid for multiple " - "redirection addresses"); - YYERROR; - } - } - } - - if ($10.key != NULL) - memcpy(&r.rdr.key, $10.key, - sizeof(struct pf_poolhashkey)); - - if ($10.opts) - r.rdr.opts |= $10.opts; - - if ($10.staticport) { - if (r.action != PF_NAT) { - yyerror("the 'static-port' option is " - "only valid with nat rules"); - YYERROR; - } - if (r.rdr.proxy_port[0] != - PF_NAT_PROXY_PORT_LOW && - r.rdr.proxy_port[1] != - PF_NAT_PROXY_PORT_HIGH) { - yyerror("the 'static-port' option can't" - " be used when specifying a port" - " range"); - YYERROR; - } - r.rdr.proxy_port[0] = 0; - r.rdr.proxy_port[1] = 0; - } - - if ($10.mape.offset) { - if (r.action != PF_NAT) { - yyerror("the 'map-e-portset' option is" - " only valid with nat rules"); - YYERROR; - } - if ($10.staticport) { - yyerror("the 'map-e-portset' option" - " can't be used 'static-port'"); - YYERROR; - } - if (r.rdr.proxy_port[0] != - PF_NAT_PROXY_PORT_LOW && - r.rdr.proxy_port[1] != - PF_NAT_PROXY_PORT_HIGH) { - yyerror("the 'map-e-portset' option" - " can't be used when specifying" - " a port range"); - YYERROR; - } - r.rdr.mape = $10.mape; } o = keep_state_defaults; @@ -4996,16 +4857,14 @@ natrule : nataction interface af proto fromto tag tagged rtable o = o->next; } - expand_rule(&r, $2, NULL, NULL, NULL, - $9 == NULL ? NULL : $9->host, NULL, NULL, $4, + expand_rule(&r, $2, NULL, $9, NULL, $4, $5.src_os, $5.src.host, $5.src.port, $5.dst.host, $5.dst.port, 0, 0, 0, 0, ""); - free($9); } ; binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag - tagged rtable redirection + tagged rtable binat_redirspec { struct pfctl_rule binat; struct pf_pooladdr *pa; @@ -5016,7 +4875,7 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag "permitted as a binat destination")) YYERROR; - memset(&binat, 0, sizeof(binat)); + pfctl_init_rule(&binat); if ($1 && $3.b1) { yyerror("\"pass\" not valid with \"no\""); @@ -5249,36 +5108,23 @@ routespec : route_host { $$ = $1; } ; route : /* empty */ { - $$.host = NULL; - $$.rt = 0; - $$.pool_opts = 0; + $$.rt = PF_NOPFROUTE; } | FASTROUTE { /* backwards-compat */ - $$.host = NULL; - $$.rt = 0; - $$.pool_opts = 0; + $$.rt = PF_NOPFROUTE; } - | ROUTETO routespec pool_opts { - $$.host = $2; + | ROUTETO route_redirspec { $$.rt = PF_ROUTETO; - $$.pool_opts = $3.type | $3.opts; - if ($3.key != NULL) - $$.key = $3.key; + $$.redirspec = $2; } - | REPLYTO routespec pool_opts { - $$.host = $2; + | REPLYTO route_redirspec { $$.rt = PF_REPLYTO; - $$.pool_opts = $3.type | $3.opts; - if ($3.key != NULL) - $$.key = $3.key; + $$.redirspec = $2; } - | DUPTO routespec pool_opts { - $$.host = $2; + | DUPTO route_redirspec { $$.rt = PF_DUPTO; - $$.pool_opts = $3.type | $3.opts; - if ($3.key != NULL) - $$.key = $3.key; + $$.redirspec = $2; } ; @@ -6161,12 +6007,144 @@ expand_eth_rule(struct pfctl_eth_rule *r, FREE_LIST(struct node_host, ipdsts); } +int +apply_rdr_ports(struct pfctl_rule *r, struct pfctl_pool *rpool, struct redirspec *rs) +{ + if (rs == NULL) + return 0; + + rpool->proxy_port[0] = ntohs(rs->rport.a); + + if (!rs->rport.b && rs->rport.t && r->dst.port != NULL) { + rpool->proxy_port[1] = ntohs(rs->rport.a) + + (ntohs(r->dst.port[1]) - ntohs(r->dst.port[0])); + } else + r->rdr.proxy_port[1] = ntohs(rs->rport.b); + + if (rs->pool_opts.staticport) { + yyerror("the 'static-port' option is only valid with nat rules"); + return 1; + } + + if (rs->pool_opts.mape.offset) { + yyerror("the 'map-e-portset' option is only valid with nat rules"); + return 1; + } + + return 0; +} + +int +apply_nat_ports(struct pfctl_pool *rpool, struct redirspec *rs) +{ + if (rs == NULL) + return 0; + + rpool->proxy_port[0] = ntohs(rs->rport.a); + rpool->proxy_port[1] = ntohs(rs->rport.b); + if (!rpool->proxy_port[0] && !rpool->proxy_port[1]) { + rpool->proxy_port[0] = PF_NAT_PROXY_PORT_LOW; + rpool->proxy_port[1] = PF_NAT_PROXY_PORT_HIGH; + } else if (!rpool->proxy_port[1]) + rpool->proxy_port[1] = rpool->proxy_port[0]; + + if (rs->pool_opts.staticport) { + if (rpool->proxy_port[0] != PF_NAT_PROXY_PORT_LOW && + rpool->proxy_port[1] != PF_NAT_PROXY_PORT_HIGH) { + yyerror("the 'static-port' option can't" + " be used when specifying a port" + " range"); + return 1; + } + rpool->proxy_port[0] = 0; + rpool->proxy_port[1] = 0; + } + + if (rs->pool_opts.mape.offset) { + if (rs->pool_opts.staticport) { + yyerror("the 'map-e-portset' option" + " can't be used 'static-port'"); + return 1; + } + if (rpool->proxy_port[0] != PF_NAT_PROXY_PORT_LOW && + rpool->proxy_port[1] != PF_NAT_PROXY_PORT_HIGH) { + yyerror("the 'map-e-portset' option" + " can't be used when specifying" + " a port range"); + return 1; + } + rpool->mape = rs->pool_opts.mape; + } + + return 0; +} + +int +apply_redirspec(struct pfctl_pool *rpool, struct redirspec *rs) +{ + struct node_host *h; + struct pf_pooladdr *pa; + + if (rs == NULL) + return 0; + + rpool->opts = rs->pool_opts.type; + + if ((rpool->opts & PF_POOL_TYPEMASK) == PF_POOL_NONE && + (rs->host->next != NULL || + rs->host->addr.type == PF_ADDR_TABLE || + DYNIF_MULTIADDR(rs->host->addr))) + rpool->opts = PF_POOL_ROUNDROBIN; + + if (!PF_POOL_DYNTYPE(rpool->opts) && + (disallow_table(rs->host, "tables are not supported by pool type") || + disallow_alias(rs->host, "interface (%s) is not supported by pool type"))) + return 1; + + if (rs->host->next != NULL && + ((rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN)) { + yyerror("r.route.opts must be PF_POOL_ROUNDROBIN"); + return 1; + } + + if (rs->host->next != NULL) { + if ((rpool->opts & PF_POOL_TYPEMASK) != + PF_POOL_ROUNDROBIN) { + yyerror("only round-robin valid for multiple " + "redirection addresses"); + return 1; + } + } + + rpool->opts |= rs->pool_opts.opts; + + if (rs->pool_opts.key != NULL) + memcpy(&(rpool->key), rs->pool_opts.key, + sizeof(struct pf_poolhashkey)); + + TAILQ_INIT(&(rpool->list)); + for (h = rs->host; h != NULL; h = h->next) { + pa = calloc(1, sizeof(struct pf_pooladdr)); + if (pa == NULL) + err(1, "expand_rule: calloc"); + pa->addr = h->addr; + if (h->ifname != NULL) { + if (strlcpy(pa->ifname, h->ifname, + sizeof(pa->ifname)) >= sizeof(pa->ifname)) + errx(1, "expand_rule: strlcpy"); + } else + pa->ifname[0] = 0; + TAILQ_INSERT_TAIL(&(rpool->list), pa, entries); + } + + return 0; +} + void expand_rule(struct pfctl_rule *r, struct node_if *interfaces, struct redirspec *nat, struct redirspec *rdr, struct redirspec *route, - struct node_host *rdr_hosts, struct node_host *nat_hosts, - struct node_host *route_hosts, struct node_proto *protos, + struct node_proto *protos, struct node_os *src_oses, struct node_host *src_hosts, struct node_port *src_ports, struct node_host *dst_hosts, struct node_port *dst_ports, struct node_uid *uids, struct node_gid *gids, @@ -6178,8 +6156,7 @@ expand_rule(struct pfctl_rule *r, char label[PF_RULE_MAX_LABEL_COUNT][PF_RULE_LABEL_SIZE]; char tagname[PF_TAG_NAME_SIZE]; char match_tagname[PF_TAG_NAME_SIZE]; - struct pf_pooladdr *pa; - struct node_host *h, *osrch, *odsth; + struct node_host *osrch, *odsth; u_int8_t flags, flagset, keep_state; memcpy(label, r->label, sizeof(r->label)); @@ -6317,52 +6294,16 @@ expand_rule(struct pfctl_rule *r, r->os_fingerprint = PF_OSFP_ANY; } - TAILQ_INIT(&r->rdr.list); - for (h = rdr_hosts; h != NULL; h = h->next) { - pa = calloc(1, sizeof(struct pf_pooladdr)); - if (pa == NULL) - err(1, "expand_rule: calloc"); - pa->addr = h->addr; - if (h->ifname != NULL) { - if (strlcpy(pa->ifname, h->ifname, - sizeof(pa->ifname)) >= - sizeof(pa->ifname)) - errx(1, "expand_rule: strlcpy"); - } else - pa->ifname[0] = 0; - TAILQ_INSERT_TAIL(&r->rdr.list, pa, entries); - } - TAILQ_INIT(&r->nat.list); - for (h = nat_hosts; h != NULL; h = h->next) { - pa = calloc(1, sizeof(struct pf_pooladdr)); - if (pa == NULL) - err(1, "expand_rule: calloc"); - pa->addr = h->addr; - if (h->ifname != NULL) { - if (strlcpy(pa->ifname, h->ifname, - sizeof(pa->ifname)) >= - sizeof(pa->ifname)) - errx(1, "expand_rule: strlcpy"); - } else - pa->ifname[0] = 0; - TAILQ_INSERT_TAIL(&r->nat.list, pa, entries); - } - TAILQ_INIT(&r->route.list); - for (h = route_hosts; h != NULL; h = h->next) { - pa = calloc(1, sizeof(struct pf_pooladdr)); - if (pa == NULL) - err(1, "expand_rule: calloc"); - pa->addr = h->addr; - if (h->ifname != NULL) { - if (strlcpy(pa->ifname, h->ifname, - sizeof(pa->ifname)) >= - sizeof(pa->ifname)) - errx(1, "expand_rule: strlcpy"); - } else - pa->ifname[0] = 0; - TAILQ_INSERT_TAIL(&r->route.list, pa, entries); *** 920 LINES SKIPPED *** From nobody Fri Mar 28 16:19:59 2025 X-Original-To: dev-commits-src-all@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 4ZPQjD0xt2z5s4GM; Fri, 28 Mar 2025 16:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPQjD0C5Dz3XdB; Fri, 28 Mar 2025 16:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743178800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fy2sfkfw5uLu4f8kgv1DqMY6E/nmjkULjWeYxgxkiHI=; b=vVelfcsgKNv5ugqT0tOY+RAex7LVdrqzx2bowVHxSxRW8op1ZPnDJFtyTMWiXN2oRn3Fim YZpeuhl1J46ueUp++OQKgypi4sCCA9XfBZb+wc6p/DXDLW8x7VRQZG9//kVgImcyKdir+H ADzZRt670p6BmgBx2/93vFQyjho+ZwEguI9bdWnGTw7XZH1Zku3PwtdxWNpCnZtiuTbgUr ayiC9uT7sDJh4NE8WjOht38jhO8rBjpcZG0Y/mMLVc1sC4f+EKF/MiZ6Md852OthaQtCtl dRuQgm49bJ2sElaWfukk+Q+mJOyGljgQ+qjQ6dYvzbZ5xefRAgpx/KTo27p7VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743178800; a=rsa-sha256; cv=none; b=aVJFrNMG9/d7O6w80vOTFn1t3+owISxHBZgeMi0WGImKxn0TMrRLaaIPHNlgGkovwibccC g1mXIP+mvkj38YVw3kSVtP+BXtYxuTrriONYFK9FFEooZ2sp64wtyMSK46PRuncK78CbIH u3iXwziGaf4eScrxFcNxNOiOLqHDBHTHUW6HRFv/vL559RNXrSqJPQPgxmbhGZ1JbXJteQ BvtmbkBz2rjDcM/mvdcyU73wUYSJJLesTixxOxEDgLiNuehX1hT0abIt0U9YbmqpepvUqr QRpV7tRXQMO/YQtZztSMgKDTrRmKnY5O+3cpG/3G/lSqwQMPeWHIackwxre2iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743178800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fy2sfkfw5uLu4f8kgv1DqMY6E/nmjkULjWeYxgxkiHI=; b=a/jbkyDRPubOFIPlbb3PkyXkCGW48CFSnLsME2vIJeh8XUCN5iBCKWPWF1ySVvX9ttgmlQ XCr8/sjcP0oqxGkOUpUf7Me/5zwcEHf2Bdwr4ZtUT1aaz3Y1HIwGgwumOilc6gNozuhmzk KFQB4sUz6CqKv0mr82qplCOhURKRh8zgqK0cv1YA2wPDxFKpzQ6JsmxN35819T/TCSZE8/ e59zWU8JnXJavtMpjAOwuCiFfC84zuhutQlA/bUIeA7NGnEsveVeMFNlncYnjl/8QWDauv w7z3Zw85pc6cKRerSbeA8T6yi5V/JKIz+fSanOnSOnsV/sIM5UBcSH032Qvr+Q== 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 4ZPQjC6rbtzqwZ; Fri, 28 Mar 2025 16:19: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 52SGJx3D005664; Fri, 28 Mar 2025 16:19:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SGJxak005661; Fri, 28 Mar 2025 16:19:59 GMT (envelope-from git) Date: Fri, 28 Mar 2025 16:19:59 GMT Message-Id: <202503281619.52SGJxak005661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 5b02365ac656 - main - zfs: enable FPU on powerpc* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b02365ac656e1cccf293ec1c57a8eb6c5cd51e2 Auto-Submitted: auto-generated The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=5b02365ac656e1cccf293ec1c57a8eb6c5cd51e2 commit 5b02365ac656e1cccf293ec1c57a8eb6c5cd51e2 Author: Piotr Kubaj AuthorDate: 2025-03-27 16:32:59 +0000 Commit: Piotr Kubaj CommitDate: 2025-03-28 16:19:29 +0000 zfs: enable FPU on powerpc* Summary: MFC after: 1 week Test Plan: make kernel and boot with ZFS on / Reviewers: #powerpc Subscribers: imp, delphij Differential Revision: https://reviews.freebsd.org/D49538 --- sys/conf/files.powerpc | 13 +++++++++++-- .../openzfs/include/os/freebsd/spl/sys/simd_powerpc.h | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 314931ed0939..d2c3aa260cd9 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -17,8 +17,17 @@ contrib/openzfs/module/icp/asm-ppc64/blake3/b3_ppc64le_sse41.S optional zfs comp # zfs sha2 hash support contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S optional zfs compile-with "${ZFS_S}" contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S optional zfs compile-with "${ZFS_S}" -contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S optional zfs compile-with "${ZFS_S}" -contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S optional zfs compile-with "${ZFS_S}" +zfs-sha256-ppc.o optional zfs \ + dependency "$S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S" \ + compile-with "${CC} -c ${ZFS_ASM_CFLAGS} -o ${.TARGET} ${WERROR} $S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S" \ + no-implicit-rule \ + clean "zfs-sha256-ppc.o" + +zfs-sha512-ppc.o optional zfs \ + dependency "$S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S" \ + compile-with "${CC} -c ${ZFS_ASM_CFLAGS} -o ${.TARGET} ${WERROR} $S/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S" \ + no-implicit-rule \ + clean "zfs-sha512-ppc.o" # openssl ppc common files crypto/openssl/ossl_ppc.c optional ossl powerpc64 | ossl powerpc64le diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h index 7e7abd992ee3..48b90ecc9cc2 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h @@ -44,16 +44,25 @@ #ifndef _FREEBSD_SIMD_POWERPC_H #define _FREEBSD_SIMD_POWERPC_H +#include + #include #include #include #include +#include -#define kfpu_allowed() 0 +#define kfpu_allowed() 1 #define kfpu_initialize(tsk) do {} while (0) -#define kfpu_begin() do {} while (0) -#define kfpu_end() do {} while (0) +#define kfpu_begin() { \ + if (__predict_false(!is_fpu_kern_thread(0))) \ + fpu_kern_enter(PCPU_GET(curthread), NULL, FPU_KERN_NOCTX);\ +} +#define kfpu_end() { \ + if (__predict_false(PCPU_GET(curpcb)->pcb_flags & PCB_KERN_FPU_NOSAVE))\ + fpu_kern_leave(PCPU_GET(curthread), NULL); \ +} #define kfpu_init() (0) #define kfpu_fini() do {} while (0) From nobody Fri Mar 28 16:52:52 2025 X-Original-To: dev-commits-src-all@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 4ZPRR91HGCz5s6bd; Fri, 28 Mar 2025 16:52: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPRR85WwDz3n9V; Fri, 28 Mar 2025 16:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743180772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJGZup6vkfsWVOJ5JHfhimJbUJYuNY2YetEhVq3QbgM=; b=EU0t8pwoOX5uWUv/PdC26Jn8WF6ExlZ0VZAGSEYO9W2DlXdN+JhyWzeHu+w3iw1mIb9GjS rUlFWR6bfGGeW7DHOGL7iSeD/ghkSh0C0WutOUR7x1QtFFzi04QomB2mUwEj62cy7hr2DT gt6bifEnlKg3GWrAP4nm1oAHlk6Q37RTYHNNvM2r+lTYa4USb0h9KB2a6OCgguiauUCoAg c3Fn+CnODfJfCEybXZ0s2BN8F+o+EbBFPwuYCMih7oDdF8jWI1GhiOniv/AYNB5NkjwOx1 J2dxv7dPi53baUbMwKTE0xjiU7/825L9alqguEDPKO9ix+FDTfoab+C1xRkSDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743180772; a=rsa-sha256; cv=none; b=fiSCm85WJ29Cff2L6TINb8fyxYUZyotAbFe1vqPWt+WUHlIJX2YztT7ShQYjAVLMYQyWZN YQtNEaUkeowXYwno2rPt6FTBP6yWcfojaLvvrSYaETLN35yKc3zLZGFMctDX5Uko4cqQbq zUznxS6We78W8edti9/d96jpX1CmhYg/joeZRQuMUwcQ9Fcit16luOTr2GqPSU5TAbC0zj qjB5Kb7tprLFiF8Ko02M9YuRVjLAkAr7mhN5Sduja/IfKPqRxbuoOCu7piJluyV0Wnao9K uXLm7PTyeS2E3cPSwUz+gTnJyxsHMeMzOl1cWVBGpJO6G1ZvvcdLhFnlbHtl9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743180772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJGZup6vkfsWVOJ5JHfhimJbUJYuNY2YetEhVq3QbgM=; b=L7HJsazzwYSqqqOlh1I04nONuSGF/EsR5/usmL4i8zSMvKg3ZofYuTeiLVorV1wzoI7+uq wWrNmy+D1Mdy/YRiwIEVlZDFcAilPVeYsD7gTr1+T/L205Qc8QM37FoXgdJ8CfFrn+yv+u m7/4FRl4YCTwUAgdM6Eh8CkX8hAn0GpIz3IDvX38rZaoen7bv6f7PgU1mifTuZ22JpCt0C LGIzc0wj4vzMe0R1W6e7k57AOyfwqrUkZknS0GfEpHADQxPxyAhc4YnDmHo2ogxlA9c0tf QBIJED/lwrjSKU8u1ySIPe5dpDLboSxlU8j6OCT3WxtAWXAfDTanGfiARgNk8g== 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 4ZPRR84y97zrxV; Fri, 28 Mar 2025 16:52: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 52SGqqKk077489; Fri, 28 Mar 2025 16:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SGqqsv077486; Fri, 28 Mar 2025 16:52:52 GMT (envelope-from git) Date: Fri, 28 Mar 2025 16:52:52 GMT Message-Id: <202503281652.52SGqqsv077486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: a440b544d566 - main - zfs: remove inclusion of machine/pcpu.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a440b544d566a91fb0e869e3f3828081c3763f94 Auto-Submitted: auto-generated The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=a440b544d566a91fb0e869e3f3828081c3763f94 commit a440b544d566a91fb0e869e3f3828081c3763f94 Author: Piotr Kubaj AuthorDate: 2025-03-28 16:51:08 +0000 Commit: Piotr Kubaj CommitDate: 2025-03-28 16:51:08 +0000 zfs: remove inclusion of machine/pcpu.h It was necessary in the beginning for a definition of curthread, but in the later versions of the patch turned out to be not needed. Fixes: 5b02365ac656e1cccf293ec1c57a8eb6c5cd51e2 Reported by: mav --- sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h index 48b90ecc9cc2..0be9257e40cb 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd_powerpc.h @@ -44,8 +44,6 @@ #ifndef _FREEBSD_SIMD_POWERPC_H #define _FREEBSD_SIMD_POWERPC_H -#include - #include #include From nobody Fri Mar 28 17:57:40 2025 X-Original-To: dev-commits-src-all@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 4ZPSsw4P70z5rBpx; Fri, 28 Mar 2025 17:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPSsw3cDfz3NPW; Fri, 28 Mar 2025 17:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743184660; h=from:from:reply-to:subject:subject: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+QdkXab4ot/8F7Qi9bPYC/hPiKhBeSFNk/KZzJ9IzI=; b=M2Y7FsnKofjhenv7UCbXj8ecSz0awKkIPTa6koX/IMIBlfvT0wYYrxp5xKDt5QEW4AjSKF AxaNs6Jiw6lUe2bdMip3LBWkz6vIw8X3ayIZ5XF9Hh3ri+vPvfDxCZ46Jpgx/s6knNPlil rpdT7aE50L/aZ6GPxccJk6SvDv2y8uSqvEYWRihnC2vMns8q9+7iFGqRmdAC+uiXXw7rmd 3uXTDF5OwGFba07LhiJmCjgjtltp1BdyYm4VjxpqjY8DeB0T3k2Cs3WsQcZuWeioeQPexU Ko2i9lKN0mZ70T4UOkZf+x/n4My5l+sHEtpuDTH35j3XHgpm+AtfKuGOfx0gWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743184660; a=rsa-sha256; cv=none; b=SQsUh/gb944/XDOifgqQfbWlXHYDWRCZZOAjk2Q3pMb5pZp8pCEm8Qk632NTb72w+UB40B GEo/tYM5Dq8r+JMapwLSQK59EUbG0uC1CJmOYbUKxZpt9l8hpnAyWteee6UAH0lckC8Voj Sp949hg3e17l9+pnTWqMsJzQb9CHTLwEbvjiy/+qs0tLUWtu70BqXH98ckkSPgSmZdC9dg wGJz7R05JdsQn1/M+SZbQx44HpZXzAFiAonGANLuGn07+2dvDQ5B9viPfzBhiGPF3+Y8Io cYc0IVB0NrKQ1gbCUidWZdu266Z7740C45K9mgC1wicOP7WZWPipi/wHnvQGLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743184660; h=from:from:reply-to:subject:subject: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+QdkXab4ot/8F7Qi9bPYC/hPiKhBeSFNk/KZzJ9IzI=; b=oKYidgeuJ2HhCIavX8rLpRZIPe47zASwU50Ch81i6Y/2SFFYgP9oOYYJ69rNYMCs8GpOEQ rETcGWWxwQW31sV0QYmxHrmBMdxmqSZHsCQBsJbFdiIoMbHeu9NLC5myurgIAR08zyGJ/m 3Nr/gBXaaFa/9SWENNPl7RjoT/4uVN4Q3bFMR5U4CY6GdaSw9xPR1ooQzn02U3sQrZ6Q2i HBBPcSP/MUL7jtwBA+Kq/lh8DrCoDVsxcQS8fepJJKGQ6QT68Qk3lMp4n6nw+NSx5b2hl3 PlNdHjIkWYqKzBokwxgdRJy5Mpu0ZHu+OeYA3pAYG8u3mFeKUelCp9Jk5vZMXg== 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 4ZPSsw3BkwztBC; Fri, 28 Mar 2025 17:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52SHvejY091114; Fri, 28 Mar 2025 17:57:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SHvef2091111; Fri, 28 Mar 2025 17:57:40 GMT (envelope-from git) Date: Fri, 28 Mar 2025 17:57:40 GMT Message-Id: <202503281757.52SHvef2091111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 269cbe092da3 - main - kern.opts.mk: Remove EFI from riscv BROKEN_OPTIONS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 269cbe092da38e1100df5008b664db89510c3604 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=269cbe092da38e1100df5008b664db89510c3604 commit 269cbe092da38e1100df5008b664db89510c3604 Author: Ed Maste AuthorDate: 2025-03-28 13:28:24 +0000 Commit: Ed Maste CommitDate: 2025-03-28 17:56:55 +0000 kern.opts.mk: Remove EFI from riscv BROKEN_OPTIONS This discrepancy previously caused `make makeman` to warn `riscv/riscv64: ignoring duplicate option EFI`. Make the kernel EFI option consistent with EFI's per-arch defaults in src.opts.mk to remove the warning. Note that we do build EFI boot programs for RISC-V. This is a NFC because the only component gated by the kernel's EFI option is sys/modules/efirt, which is also inside of a MACHINE_CPUARCH block that excludes riscv64 anyway. Reviewed by: mhorne Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49549 --- sys/conf/kern.opts.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index d9d96a133250..045e55d1b19a 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -79,8 +79,8 @@ BROKEN_OPTIONS+= OFED BROKEN_OPTIONS+= KERNEL_RETPOLINE .endif -# EFI doesn't exist on powerpc or riscv and is broken on i386 -.if ${MACHINE:Mpowerpc} || ${MACHINE:Mriscv} || ${MACHINE} == "i386" +# EFI doesn't exist on powerpc and is broken on i386 +.if ${MACHINE:Mpowerpc} || ${MACHINE} == "i386" BROKEN_OPTIONS+=EFI .endif From nobody Fri Mar 28 17:58:28 2025 X-Original-To: dev-commits-src-all@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 4ZPStr4lMvz5rCGX; Fri, 28 Mar 2025 17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPStr2Fspz3PLB; Fri, 28 Mar 2025 17:58:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743184708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUm5vxRohpmd0OH2KXNQi77ljJZrKGfTtuSvKMwKxt4=; b=XY9646Q6+sP4c9iMQS1TynMsvm2aXOugfBgjdfEY+yc3f1G+LOzzGWOtpQ7EuWAQpASALq gJtFVY6hOUNSEaR5K5E01kGMx3RyD0cUXDupOtc/SK5Dv3PrG0icK3LZgFtzCTlYlN4ucK 9k8VsxFBJRf7f1l5UrIkIgKlt6AByqqLrWZTIqQKCQg9WDA3yDovncRnUYI7xk+IRO++z5 20Oe+fiA4e8pqLsgW3sUaiHY6HVEuSpKgPcTNQlEqqoX4wd/0IKFY1AnhHoS7bsaG1mRhS iETcYjZ+dFu0w0HQ8wezQUe0GZLXETsxKTjcy9Ci6pygcnfMALKJk2j6cYG8cA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743184708; a=rsa-sha256; cv=none; b=qUOMlnJeYZSimQXesRw+IU6rxR/kBEUvOKuNxdgEImIid36naKp1GqQzISP0oA3uRMkcyD oFCYy2qjw4wn5Vnkd2qVEG+5DuBNGrl6Va66mbFPGWoK3Knbr+8Z4bE3ZWFNr/+e1wjZJt nFKfxXB7cleIQeHRF8BVrnTpRVV7XAuo+6htw47sePBvVoRLPFmF89fKox7Hc7CAdaDwp+ PB2ZEiCVLg395vrO3hGP/1yfWSMLowgd8ovg+Rn5T0d/STW2P2mptkHnBTcQUX1zXS0rW6 efaNsGdXamI4CfJBvyV2nBcvSQLGIL8+2lZ/932WeYVuccJmPuYNzXM2NvTOtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743184708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUm5vxRohpmd0OH2KXNQi77ljJZrKGfTtuSvKMwKxt4=; b=GO3GNGsYjmfG3Z5xWdRwZy/RXeVkYL4KeDROwif5bRXvpcYdMbufSrI315xUbtxo1UWGFw dTIXY4KdVdkml+XIXs6qdrDuU4y/wWlDhrBLpB/stL9xlkzD4Zazev9QK8yfaz7woE6h+1 IjbRWrVXpXKtMuEu8704bTUH0ZG29AmF72PPMPET1q8jL9ejo2yAwHfhMiCU8kDXshW0J9 IAagYGrcpcN1YjezHkAEeYIQsPzl4v/h16OaiamNOE68HxPDksvwg7rn1VnadoJif6DWrE p+GnWfepH+usabARMdeZ/VR2MWBEL0f7ODA20mm63dLsjhbE9X+WaId5rhUfxA== 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 4ZPStr0qxczsXL; Fri, 28 Mar 2025 17:58: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 52SHwS22091495; Fri, 28 Mar 2025 17:58:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SHwSBY091492; Fri, 28 Mar 2025 17:58:28 GMT (envelope-from git) Date: Fri, 28 Mar 2025 17:58:28 GMT Message-Id: <202503281758.52SHwSBY091492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: a1759dca9674 - main - arm64: Fix off-by-one in its_init_cpu_lpi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1759dca96748648a6da5f9ebd14e46836eed45e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a1759dca96748648a6da5f9ebd14e46836eed45e commit a1759dca96748648a6da5f9ebd14e46836eed45e Author: Colin Percival AuthorDate: 2025-03-27 20:23:32 +0000 Commit: Colin Percival CommitDate: 2025-03-28 17:58:19 +0000 arm64: Fix off-by-one in its_init_cpu_lpi The low bits of GICR_PROPBASER are defined as The number of bits of LPI INTID supported, minus one, by the LPI Configuration table starting at Physical_Address. but flsl(1 << n) returns n + 1; use ilog2_long instead. PR: 285677 Reported by: Julien Grall Reviewed by: andrew Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49542 --- sys/arm64/arm64/gicv3_its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 77d1936d8c95..546a225abf09 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -801,7 +801,7 @@ its_init_cpu_lpi(device_t dev, struct gicv3_its_softc *sc) /* Make sure changes are observable my the GIC */ dsb(sy); - size = (flsl(LPI_CONFTAB_SIZE | GIC_FIRST_LPI) - 1); + size = ilog2_long(LPI_CONFTAB_SIZE | GIC_FIRST_LPI) - 1; xbaser = vtophys(sc->sc_conf_base) | (GICR_PROPBASER_SHARE_IS << GICR_PROPBASER_SHARE_SHIFT) | From nobody Fri Mar 28 17:59:19 2025 X-Original-To: dev-commits-src-all@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 4ZPSvr1v60z5rCR9; Fri, 28 Mar 2025 17:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPSvq2ZlPz3QN9; Fri, 28 Mar 2025 17:59:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743184759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wo4VCfmK0JpxqjSCXAWUaQMKeevGHEyfgZyr0EubJGA=; b=GhlbtveVv1oZKAlbNc/jTcZw2qTno7kShQi0dopTyBK4/NxjArU69IYxifJXf3XPOaaQ1V cN3dZ2Qf7gLS1ofNxwYK2neshxnQhYbArXwh9hmm/zKfLDeMZUeIwyJikDbazPAkJL0hqr y/xNLk2PJBDMRq/RT0q6VpQk9lTOLZnn0Q4sdC4bHCxrQuo7Ew72cFi2e1o7IStf2e2FO7 kTAcDPo+9lMfj/RpChuvB6q/jwUHLfTL8zyxNrG8ckCxzvg2uc6Oy6WcmOc8gE4xyweTtD Y/CaNEF7a9oyqU2LL2XBVn2t9bw6RiWxW/5ifZ9ogrOb5OGId0BrZfCvwnPEsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743184759; a=rsa-sha256; cv=none; b=XM0qEce9QeX9f0WP3GMzkad6zOFCNRowbkGxWe1EJXNWFqCmF0mVzWAkt0NSz2p3yuD89L 89OFx7ktW5csHhgJn8pMKwL5I0vVqJZgF3nPUJAD16JME1NxYbsyrNF0lPrPlt7vybtTwe iZNRAthT2MJuUTpxKkl5+WXkJs5Cu5HubK4aNELKEF4GAhbVgLSDw+KTZIm4W2k1LA3XO6 gpM5gbRblCHGXZtO1KF3wd2swDh5BzXTewm1xP4gDYkHvvYyO2yIaeayWfhB/kDR2LtPGV E4hC4//uwMM66UfEOARk3ndtBhO9ErS5yjWkaj3L5b6DKX9bK/oFr3dEIUjPpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743184759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wo4VCfmK0JpxqjSCXAWUaQMKeevGHEyfgZyr0EubJGA=; b=lvpvVoFwnKkSKsY67FP/lS0GLg/RM83DWVA6zlVhJfMcZPgDG58Mw0KVqq1laJvtjaWB2U KZf0vCrLJ3phiEpRQPGKJIezUC8fsAUyPG6/F/qTnwIEYk0Nf/YmC1pHVe4W0X7NlDrkTv lSIIE7e4XSPgko/ZqHnVMiiZubvUFt3ua/DSi0Z4EXbsuzeo+5XPoL5vIWnQyhaXnULkVt NRPLcR4vOLTbegAJcN9UOj5AO/+LdfXwVyd3AJfwjqUcjFNaNevyBOIduZV622i3DWHN0G LFllE0+nhFewHxXxWIRxDCLEoF/GBU5l8lMjCqz6VRpqg23gB8UZVnjweLQ9sA== 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 4ZPSvq24j6zt3x; Fri, 28 Mar 2025 17:59:19 +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 52SHxJYU091876; Fri, 28 Mar 2025 17:59:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SHxJUu091873; Fri, 28 Mar 2025 17:59:19 GMT (envelope-from git) Date: Fri, 28 Mar 2025 17:59:19 GMT Message-Id: <202503281759.52SHxJUu091873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 75a320e4312e - main - ps.1: Use ISO/IEC byte units List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75a320e4312e98a687a7bd922a1e2fa6649ad2c1 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=75a320e4312e98a687a7bd922a1e2fa6649ad2c1 commit 75a320e4312e98a687a7bd922a1e2fa6649ad2c1 Author: Alexander Ziaee AuthorDate: 2025-03-26 17:34:59 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-28 17:59:00 +0000 ps.1: Use ISO/IEC byte units The ps(1) utility uses 1024 byte units, not 1000 byte units. git grep KiB | wc -l 535 git grep KBytes | wc -l 39 Fixes: 20bdda14fa5c (Consistent usage of Kbyte unit) MFC after: 3 days Reviewed by: jsm, imp, mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49522 --- bin/ps/ps.1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index f90bf008a286..542ae71e898a 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -416,7 +416,7 @@ for details. The process scheduling increment (see .Xr setpriority 2 ) . .It Cm rss -the real memory (resident set) size of the process in Kbytes. +the real memory (resident set) size of the process in KiB. .It Cm start The time the command started. If the command started less than 24 hours ago, the start time is @@ -569,7 +569,7 @@ number of copy-on-write faults The processor number on which the process is executing (visible only on SMP systems). .It Cm dsiz -data size (in Kbytes) +data size in KiB .It Cm emul system-call emulation environment (ABI) .It Cm etime @@ -668,7 +668,7 @@ real group ID .It Cm rgroup group name (from rgid) .It Cm rss -resident set size (in Kbytes) +resident set size in KiB .It Cm rtprio realtime priority (see .Xr rtprio 1) @@ -693,7 +693,7 @@ blocked signals (alias .It Cm sl sleep time (in seconds; 127 = infinity) .It Cm ssiz -stack size (in Kbytes) +stack size in KiB .It Cm start time started .It Cm state @@ -719,11 +719,11 @@ control terminal process group ID .It Cm tracer tracer process ID .\".It Cm trss -.\"text resident set size (in Kbytes) +.\"text resident set size in KiB .It Cm tsid control terminal session ID .It Cm tsiz -text size (in Kbytes) +text size in KiB .It Cm tt control terminal name (two letter abbreviation) .It Cm tty @@ -745,7 +745,7 @@ accumulated user CPU time .It Cm vmaddr vmspace pointer .It Cm vsz -virtual size in Kbytes (alias +virtual size in KiB (alias .Cm vsize ) .It Cm wchan wait channel (as a symbolic name) From nobody Fri Mar 28 18:03:20 2025 X-Original-To: dev-commits-src-all@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 4ZPT0S3Sm9z5rCsc; Fri, 28 Mar 2025 18:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPT0S2K3Lz3SXj; Fri, 28 Mar 2025 18:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743185000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBMvPlHfbeRMHHMWsueySXj34D/63QQt6kUiHkSAnLw=; b=eYhx9itOn372PcfDtRRfsNjQ0BewRsaLE4nbT2Q/dOBCn7b8BozEAOr5LkEyF2Ln1SR8Sg p6bOgbY9uzCMAHEokVXYvUdW7JOT1PzFFyuT9rBJmgM//F28386P6ZU6NUFRH4eJaexCBh dhHEmUfRa8+HLysZ1Gn3FMUOrIRL8O1VlngI+yYaw2hR9BHpvll8XmdJshwIqS0Arwaxze m3XP5enL3COU5x/P16mOpRZsz92MHP2YWAfpKIfLRzCuMB3ZNI+UhnG8zAs9HKQE5hJ9vm 4ZhLUwm8+FqJ0ulOHT6rnnAjm4BAMHtrrKfC8ZAKO/8haXfrj23nNWu9LEUFEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743185000; a=rsa-sha256; cv=none; b=lYjHMZnn5CyVzBgop3sWXJFm/MVfQ33r2TNyk5LkjxDZ5m6S9Mla1EYK1MNAbcAlq3xABr j2DALQHsaHVlFpWiPKRHPtnh6Spq8qYfGOgISDwczhxKo/muwygLYQ/aNCrpzF5rXWJS9Q ycHuFnap9Ub5JLUN3xE7Y+OA+fYxkQxNwxcWOIF54XW7w+BZa+yctslyYFez0gZonAY62F /k24J1xYiAD0OrL8LxftxrCsI3KmlAEVd/YhP5feoJnZJ2vpvuJKbfSPDE/XuroAMT1yHY m8Xj5doR+wRUa9LS1FDA+R1QVkwbHGKhZqYK9BTvJplPJEQJ6xfW3bKnmHFciA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743185000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cBMvPlHfbeRMHHMWsueySXj34D/63QQt6kUiHkSAnLw=; b=HTCIrb0YtIKCj13iArFq9Fu5QQfwTICvbZ/uxDU/CPNCmSiqRlTyB19i9OKNlXk7Y/jLO+ dVangBbWMxd43gdYO5qsIcuiDPnAdbBMKxAcsrZOqdNW6VAO1MQo1NaDkfDUtA/NT2OLPL yDpatAMtmWurlzv4+GQccCVyP4db4NHW4EFTVJlbFnFBvKWh8Z4SljcHiMcUM8kfxzqXpt cHZtb7mfw5X+ZkBTwRmcHc0M35Uvr85pkYZFHD2QTsfRPJvs9cm0tiTrp+p3AXbk0Qag7N bV7LASBjFNAAEVo3rk4//naYAwiCH4PBV9DDjID1G81O+CeQEgMighGPWYgw6g== 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 4ZPT0S1vgmztkJ; Fri, 28 Mar 2025 18:03: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 52SI3KnO010011; Fri, 28 Mar 2025 18:03:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SI3KMV010008; Fri, 28 Mar 2025 18:03:20 GMT (envelope-from git) Date: Fri, 28 Mar 2025 18:03:20 GMT Message-Id: <202503281803.52SI3KMV010008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 187d954eab94 - main - top: Sync usage and synopsis List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 187d954eab94fdcb33609d91966dbd727acfd720 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=187d954eab94fdcb33609d91966dbd727acfd720 commit 187d954eab94fdcb33609d91966dbd727acfd720 Author: Alexander Ziaee AuthorDate: 2025-03-26 04:42:51 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-28 18:00:18 +0000 top: Sync usage and synopsis Switching between io and cpu sorting uses a great example in the usage. [-m io | cpu]. Use that everywhere. MFC after: 3 days Reviewed by: mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49515 --- usr.bin/top/top.1 | 4 ++-- usr.bin/top/top.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 3443df0f8c22..03f042acc744 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -6,10 +6,10 @@ .Nd display and update information about the top cpu processes .Sh SYNOPSIS .Nm -.Op Fl abCHIijnPpqSTtuvxz +.Op Fl abCHIijnPqSTtuvwz .Op Fl d Ar count .Op Fl J Ar jail -.Op Fl m Ar mode +.Op Fl m Ar cpu | io .Op Fl o Ar field .Op Fl p Ar pid .Op Fl s Ar time diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 8712e56d43ba..856ad838dc1c 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -463,7 +463,7 @@ main(int argc, const char *argv[]) default: errx(1, -"[-abCHIijnPqStuvwz] [-d count] [-J jail] [-m cpu | io] [-o field]\n" +"[-abCHIijnPqSTtuvwz] [-d count] [-J jail] [-m cpu | io] [-o field]\n" " [-p pid] [-s time] [-U username] [number]"); } } From nobody Fri Mar 28 18:07:45 2025 X-Original-To: dev-commits-src-all@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 4ZPT5Z1f5Dz5rCxC; Fri, 28 Mar 2025 18:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPT5Z0ww0z3V5M; Fri, 28 Mar 2025 18:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743185266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IXhjNEMA54auJwn/Gy/1kCDTYp8OzlVvyXFlnqKsD3U=; b=Bh85YK07YmtE0yacDvkGXTbSFKd13nY7hLc0KkCepbIJYL/UzgRolGq5pR1NKwMEj6f5RJ gTlu4jr+LM3bJ0wbhjRN2Fvnchnoa4/E9emL5bjH6BF7htWl/7VSkkvXYHZ8CUj4ewF2iO PxVhnkThqPoWIJgZ/LfNyqbfFWXtzpdJSUnl9tiLbKzckE1fopxoKvxpdvtY4I1mJDnEt3 WnQXm8qnQ4OJySLJRBATxbIbmT4JPdIoEJ1JRKI1v5WFvqD0WBspW8sPtfjDiGRxu4Tohb EW+0l2b5ww8USiRf2cwln0ATdYvoh4qfJUzCifsa/dL1ocb0GSVvlmsvELr/Hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743185266; a=rsa-sha256; cv=none; b=Dg1TBhKBi6ZGEZfOO4Pfri+b7QLv09JsQTxoEWTpydbLkOYWi2AAGi0mOHUimv3GhKTPQw vVIdZKJykInIRNbCumBPCGMsNZmikQ0iIjdZNkpPcFhZdQsPS08J4Z/EUhqlqTZijNvFup yiqubQPsmspLka+c7+DYxqZT3a11q24XF5HmIFuKLOIwbI8p676dGeXLGOctaW8s5ucw1s BzBajIl3vb9x3mSU2ww1ZHBe9tj9ECO5g2ZUE0d2wogxLoY8btacQS6/xty4+AeZHyFK/i ySbrBz95wBk5iE/jhfaAC5JakFL5cHjzrgIMa3CTO1lWlsz28ZgRF2TTzoRbNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743185266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IXhjNEMA54auJwn/Gy/1kCDTYp8OzlVvyXFlnqKsD3U=; b=nbP0Jhjd7uiwpXUxmV5iVZeEtt/Zr1mSMDAtI3P5wzWmLIfw4Fe998WHSwXX+hKhaa+2Tq /75k8ni1zdPTUWIxhdKbEXt0llUnk5dKHQhY17XP1xSRjY1r3tTPuHALbwxHECm6FfIuTR igHvVRR2iN6pkcnDFyUA19Zt0fliNq7NdBil+npnG3hAQP0Vpe9RrPXvM60n2tcTMfoO2l a6oYPTYX6qlFYss2DtW2evlctf2GPQsEjKrNhwjlQB3UUetfAQplUSpUUKTmZkrNyr3EA4 Yykv9u+DeNE8WkjzJbaMvF+oz1BnQVQWO7yEm74kWQf/kfW4sebqogJV7GZo/w== 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 4ZPT5Z0JNpztcb; Fri, 28 Mar 2025 18:07: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 52SI7joc011415; Fri, 28 Mar 2025 18:07:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SI7jmX011412; Fri, 28 Mar 2025 18:07:45 GMT (envelope-from git) Date: Fri, 28 Mar 2025 18:07:45 GMT Message-Id: <202503281807.52SI7jmX011412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 50296dccddf1 - main - hier.7: Storage partitions are not filesystems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50296dccddf1a7734be2aef606cd8e0408ee8780 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=50296dccddf1a7734be2aef606cd8e0408ee8780 commit 50296dccddf1a7734be2aef606cd8e0408ee8780 Author: Alexander Ziaee AuthorDate: 2025-03-26 17:51:04 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-28 18:07:01 +0000 hier.7: Storage partitions are not filesystems I recommended the incorrect text to the submitter. MFC after: 3 days Fixes: f47cbb29e1c2 (Add /dev/gpt) Reported by: Mark Millard Reviewed by: imp, mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49523 --- share/man/man7/hier.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index c5fb3cf0a7fb..1c69b911f53b 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -157,7 +157,7 @@ file descriptor files; see .It Pa fd0 first floppy drive .It Pa gpt/ -filesystems by GPT label +storage partitions by GPT label .It Pa mmcsd0 first SD storage device .It Pa mmcsd0s1 From nobody Fri Mar 28 18:16:53 2025 X-Original-To: dev-commits-src-all@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 4ZPTJ61vwLz5rDj8; Fri, 28 Mar 2025 18:16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPTJ60vWbz3cd5; Fri, 28 Mar 2025 18:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743185814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA4cbm36vt1eodnbCsSLdgs1C/TXFGTYFnx2Ael9WPo=; b=uCOEd2vOPcY2hC/J7EQ8MuaebnV7CE82raLYIJ2Dicf/L75x/CNc59wtMwIpta/cDh77nJ 7sl30yTyRFGW/PkscsWDwhpok6LblTvbiqopAErQUGrP7kW/ZKe/A5wZEA2V2wWG+S4Ygh vZTqIBXTdyAdIJs/SPtM8Ayqn1WURCwrmRmoA4DdEfUCZSYj6hmY9fkdUB/w4aMfFWa2le HAFw/VSADjjYcGMN71Mu7qrztlsXkwCPniDsYkVqkbOUWHiZMjqmXnNCnB0gYraKAEJZ4J 4GlqdNkmpetOESWVa7WcrknJSdrS0Lr0jffGjOXEKO2lta64d9yyNEO1Xtgg/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743185814; a=rsa-sha256; cv=none; b=TUTp2ToBxtL3mn5L5okOZJn2zlD3+11YuNVQTa1kSyEMHLB0fJiGeu4LQlRJlMhy7VO+AP yJ8ZC4OKy8nLxm6mziJBwbmdiHqPyVI89ScQAx/G9bVA8liWA68be+3DwCsKCYChE+nxfJ oDZ/amZeEJUqCovaQWcByKU5ZOG9q4jawn6D57+DrCsQ3Af3gZI+lI6k7DqrO/CwpwMzqL 7JQ7dFucm18xX56124ALFyd2TIiAD6CCAsGXNAA8ltzZZZoQOQeqyB4max/Qh8GnsaZoXe LvqTmE+7bjuf2Qmz16mbrlzLCRTmu3qQR8UdWUKbFK2rhpYe3JOCJABV21vYcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743185814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA4cbm36vt1eodnbCsSLdgs1C/TXFGTYFnx2Ael9WPo=; b=p3BLdmNlTddGMUBD0t3dCKsf/M4MXHj34W0wWb3bW5/3snfEfTK/bwuyz3MUhRjN42ZOJh Nm/z9jQNXLmNS4r25RIjCYyhGMLgNqsTXk3YD6bnc6eZhRKf2OOfxB8FvNPoHGlEeSMC3t rQVZPzEXLiO696i6VztKyTT2igiRDOHa5KV+KctXVY7bgoqqFcIpuL5BRU/excOzoYpFGt tQWBfixYtWwVgsd77YyMtbylqHKlVSYV7m7RpfPBaF19SzUpssXP4xyNiz9D8FdHSUsy58 xFcE6lsJ7/82Ngw++isYlGZERtL4eJ1Z4PvPOM8tYen4m0mT03R78o3Ayxx5dg== 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 4ZPTJ603Zhzthl; Fri, 28 Mar 2025 18:16: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 52SIGrMf029244; Fri, 28 Mar 2025 18:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SIGri2029241; Fri, 28 Mar 2025 18:16:53 GMT (envelope-from git) Date: Fri, 28 Mar 2025 18:16:53 GMT Message-Id: <202503281816.52SIGri2029241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 09f991f5f6f2 - main - release/azure: Update instruction of publishing to Azure Marketplace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09f991f5f6f224f75f3cc9f666f0e0e2e9621432 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=09f991f5f6f224f75f3cc9f666f0e0e2e9621432 commit 09f991f5f6f224f75f3cc9f666f0e0e2e9621432 Author: Li-Wen Hsu AuthorDate: 2025-03-28 18:16:30 +0000 Commit: Li-Wen Hsu CommitDate: 2025-03-28 18:16:30 +0000 release/azure: Update instruction of publishing to Azure Marketplace Using Compute Gallery as the source is the preferred method now. Reviewed by: brooks, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49528 --- release/Makefile.azure | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index 36f3f8715de1..577221ee3899 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -1,6 +1,4 @@ # -# -# # Makefile for uploading Microsoft Azure disk images. # @@ -18,9 +16,6 @@ AZURE${VAR}!= grep -E '^AZURE${VAR}' ${AZURE_UPLOAD_CONF} | awk -F ' ' '{print $ SNAPSHOT_DATE!= date +-${BUILDDATE} .endif -START_DATE!= date -v-1d -I -u -EXPIRY_DATE!= date -v+1m -I -u - azure-upload: ${AZURE_UPLOAD_TGTS} azure-check-depends: @@ -52,19 +47,16 @@ azure-do-upload-${_FS}: --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ --container-name ${AZURE_STORAGE} --type page \ --file ${AZURE_IMG_${_FS}} --name ${AZURE_TARGET_${_FS}}.vhd - @echo "The disk access URL with shared access signature is:" + @echo "The disk has been uploaded to Storage Account, use following information" + @echo "to create an image in Compute Gallery:" @echo - @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET_${_FS}}.vhd? - @/usr/local/bin/az storage container generate-sas \ - --account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \ - --name ${AZURE_STORAGE} \ - --permissions lr \ - --start ${START_DATE} \ - --expiry ${EXPIRY_DATE} | cut -d '"' -f 2 + @echo "Storage Account name: ${AZURE_ACCOUNT}" + @echo "Container name: ${AZURE_STORAGE}" + @echo "Blob name: ${AZURE_TARGET_${_FS}}.vhd" @echo @echo "Please go to Microsoft Partner Center to create a new offer and publish it:" @echo - @echo "https://partner.microsoft.com/dashboard/commercial-marketplace/overview" + @echo "https://partner.microsoft.com/dashboard/marketplace-offers/overview" @echo @echo "After the new offer status is live, you can delete the disk file with:" @echo From nobody Fri Mar 28 19:04:24 2025 X-Original-To: dev-commits-src-all@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 4ZPVLw5GqMz5rHYP; Fri, 28 Mar 2025 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPVLw4RkKz3DWc; Fri, 28 Mar 2025 19:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YV+9XU6Nww/PsBld++bRtcXYuRVDp7Sby9PGlibYAH8=; b=aU2yy8fWb6vmWhq0rgs2KEdsOzXWY6JfggCcR/DhxiEyvEXvw+RWkRMVrLDJcVrMxnErrs d5hPbfGRxuvOrQyyJLeZoF+DWuQ87g63MH3g3nA0oWRTPMVR4DLuIFUFG4o07RLnyqAbZq lFmUfk4dEo14q8WsgjHGC58Pd6sumXzj1iCUmtckQYnwWDXDyawusMLdLg0pPM+fGy9+jv 9J4GhAx0F8aBID8884qI1AZ3PeAYCiPdnbhipCo3vnhLA4y/gc/c8Iy568mlgi04fpUFFg v3AgD0bqKOYSH2JhBbLTjVNQ1G02wYD4a793ag8Vd3tpYaLWNJeFCuINkpUsaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743188664; a=rsa-sha256; cv=none; b=uryBdlNhr/OOfclzL8ecGr5HL0HOVDq0j7rMlL2w6Lp72x1LiY0DREG4rG4fr0qWfMbt7q tpAfDUqwFIct0rW1Kuq+eKBcMXtaj9qG5ChhTg/7P1OOcw5XfPAPCpjascorbDZlBW0tB3 8mkw+Ree3BpKjZMgSZQmQbRlhRnPwvZrZ+4mVqyA/EX6ZkEBN2sVV2UbfpCpMDjEWWKLEo wL6Fg2kZ4r8711ReekfTF8kkrEvmIW5hgbvHzt1G/cr8LDQO84dImSzxIOmtfZSRV/vD7Y t9AN+QXadbPpBvlTus5aXw+U8plg7q6FJ8oMC6nHCe/up524BvvsQhHxOCNSMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YV+9XU6Nww/PsBld++bRtcXYuRVDp7Sby9PGlibYAH8=; b=Wflbtl3KHk9Y7+GtPhzLICwPxyykIDG5xW1Nuvv7aW0GsbDOnrD0L67YlKzim20fNsQSus hg/Fljybn4DHBGNfy7nH3kH7j1GqioCp1VS5xxspku1CF/6T4cHiP2lfrM0CYTi3vDUOSR x1YrV+HEvfjilT/E11I4HVjb60yzS/x3ejTHkeMqzrm3sz8tm6tKTBvgj2V5wlglBJmArS SalpmNjdmr75+zhI/1OPs4WKwA4Sctnni4Bz8R6zah36rhF82/NPQ0l/4gvySHC4TyUiLQ d8BVyt/5lO3KfwPisqBpah5OdP9PBDUv4sHsj2iOUPJF27WjXnFpftdX4b6TrQ== 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 4ZPVLw43LVzw9b; Fri, 28 Mar 2025 19:04: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 52SJ4Oko022602; Fri, 28 Mar 2025 19:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SJ4OrE022599; Fri, 28 Mar 2025 19:04:24 GMT (envelope-from git) Date: Fri, 28 Mar 2025 19:04:24 GMT Message-Id: <202503281904.52SJ4OrE022599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 8b0acd853845 - main - mtw: fix compilation with IEEE80211_SUPPORT_SUPERG enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b0acd8538459b40b89ce4265ba99d035f08b4e0 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=8b0acd8538459b40b89ce4265ba99d035f08b4e0 commit 8b0acd8538459b40b89ce4265ba99d035f08b4e0 Author: Adrian Chadd AuthorDate: 2025-03-25 18:03:42 +0000 Commit: Adrian Chadd CommitDate: 2025-03-28 18:59:35 +0000 mtw: fix compilation with IEEE80211_SUPPORT_SUPERG enabled It looks like this was missed during the driver development and porting. Differential Revision: https://reviews.freebsd.org/D49512 Reviewed by: thj --- sys/dev/usb/wlan/if_mtw.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c index b42ed336d18e..1eb7869decfa 100644 --- a/sys/dev/usb/wlan/if_mtw.c +++ b/sys/dev/usb/wlan/if_mtw.c @@ -53,6 +53,9 @@ #include #include #include +#ifdef IEEE80211_SUPPORT_SUPERG +#include +#endif #include #include #include @@ -2801,10 +2804,10 @@ mtw_bulk_tx_callbackN(struct usb_xfer *xfer, usb_error_t error, u_int index) #ifdef IEEE80211_SUPPORT_SUPERG /* XXX TODO: make this deferred rather than unlock/relock */ /* XXX TODO: should only do the QoS AC this belongs to */ - if (pq->tx_nfree >= RUN_TX_RING_COUNT) { - RUN_UNLOCK(sc); + if (pq->tx_nfree >= MTW_TX_RING_COUNT) { + MTW_UNLOCK(sc); ieee80211_ff_flush_all(ic); - RUN_LOCK(sc); + MTW_LOCK(sc); } #endif } From nobody Fri Mar 28 19:04:25 2025 X-Original-To: dev-commits-src-all@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 4ZPVLy00dWz5rJ1M; Fri, 28 Mar 2025 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPVLx5h2jz3DT9; Fri, 28 Mar 2025 19:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T25+USfEQnJKfLOLQGLKapMYZCkAstzrVgN4p+Kx8Qw=; b=ikJQc2U61MntzvbtZeh0pba2xSqfeISfxv4m/Mymd8YnWu3oMoSYJLLaHltVBCr6i+GmCk Nsb8h0Ke885SPJDJA5en2BRx3nGE8BuZDRVfDZwDVKpi2rUc95kBw13xri9yHVgkm+ccRg WVLlXJuEn6hOI9oSWfxudOtTQV4wKCdlytJELFrRzzCiOwqWKxbKPlr674d7UVyS1aAENC bI/MsZ5rjAWOGPfC7P/0to0M1c6ejPu4AQDbsL4N7yCAhXpTcZjA+cbxHI/yv2pPLLzSWh fzFj13oZXyI92vKmHEClilHkHYoo8LI8dcnllndlGgeTBEqihwIUs7EfEjDdvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743188665; a=rsa-sha256; cv=none; b=vVoZas4L7rOi7o5CF8uMNys9MPgxBntlxUS3UYxyq2NzhyClxTiCUStJEjFAATQNRNOpgY 5xXVE7Dl+OpOGg5WVKnJanNIYOxj+N3/325Q2k1nBBf6024vYbRKzRMVDXYJbtBQ6qGwCi GPFYUJTbCXKYwfLLTSN27kjVx1tXWDcFCVJGQZWzNgcJXokesU8vrsSUeNikvN7TQOiDty V2+R4v3VkeZ9JhgZLy27JbfqXJMrHbvpix9HH5f2FbVcyw9AJ9hK87u99cBmgM/agbCFgf 8YqDJdVEhxvQ7cKHDmsVXFCLOOOKI6StiD7TeYVoipcnIAlqO8bw7S8viVdDxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T25+USfEQnJKfLOLQGLKapMYZCkAstzrVgN4p+Kx8Qw=; b=AtcZPQmCZ1pTmgc7E51EtpVT32xUfGPTm0d1cKKn6xNI3tzgXfLGK/RaFz5/p4/ERN+JXO uRsGw1wKlZ2IB5fIdu9BduayihwwVbzhvj9/+HgJNw0zo9Tt1p5RFo1m0Hs4QUqCl+79KE Gfrp9a24JaFBIZv/PWUgueJMptf7S+/Flj6aoEQ09hc4j8yRUApDerJ/m9JBVd8yl2jiiE 6kvUAUdLaPrb4WwtjQwfqunxwjqDutoQfiY8ZSU4eyh3DRF9criPgnrAVC85HFw/k5DXPE QpqF3A+iKzwcSlRmdkFAZYq3oo7mRtYplzHb3BSXTNvU7bDdQ23YTeiOzOe0Yg== 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 4ZPVLx5FvfzwCq; Fri, 28 Mar 2025 19:04: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 52SJ4P8I022636; Fri, 28 Mar 2025 19:04:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SJ4PRT022633; Fri, 28 Mar 2025 19:04:25 GMT (envelope-from git) Date: Fri, 28 Mar 2025 19:04:25 GMT Message-Id: <202503281904.52SJ4PRT022633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 2eab1f605f87 - main - net80211: document the 802.11 specification for ieee80211_getcapinfo() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2eab1f605f8712e2c2377d4f1e62bcaa525fc6c7 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=2eab1f605f8712e2c2377d4f1e62bcaa525fc6c7 commit 2eab1f605f8712e2c2377d4f1e62bcaa525fc6c7 Author: Adrian Chadd AuthorDate: 2025-03-26 03:36:08 +0000 Commit: Adrian Chadd CommitDate: 2025-03-28 19:00:04 +0000 net80211: document the 802.11 specification for ieee80211_getcapinfo() Add a reference to the 802.11 specification for the management frame capability info field. Differential Revision: https://reviews.freebsd.org/D49513 Reviewed by: thj --- sys/net80211/ieee80211_output.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 44903ed366fd..f2f89d2d9d7c 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2649,6 +2649,12 @@ ieee80211_send_probereq(struct ieee80211_node *ni, /* * Calculate capability information for mgt frames. + * + * This fills out the 16 bit capability field in various management + * frames for non-DMG STAs. DMG STAs are not supported. + * + * See 802.11-2020 9.4.1.4 (Capability Information Field) for the + * field definitions. */ uint16_t ieee80211_getcapinfo(struct ieee80211vap *vap, struct ieee80211_channel *chan) From nobody Fri Mar 28 19:04:26 2025 X-Original-To: dev-commits-src-all@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 4ZPVLz2Dy1z5rHYR; Fri, 28 Mar 2025 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPVLy6szGz3DnH; Fri, 28 Mar 2025 19:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7kQW6Gvb0Yag5t/Poc/l3MWk1Skryjq28Rwd4MS0TCg=; b=T2PQDWvKcLn3T2G2WSkI849b9du6tSzLlDxInDtefHI0KN79SHOsA1jo0dvVDzXc+9Ifhe K0Fa/Xj8frDSG0APl4XEOy45ZEF2mzTMdO/1VzSPmbZQa8GO1fsSfLWr3fSNO6tQUs24oI fcrMehlAC6tqEmTAL0FfdBphej2kR+bD14gT+R0GjqLUvk5m8B2FQceHTEbnUR3z+Uq4Hu EPJZNWPH7x5g7Cct8g75LFlr//1bFHG3CeWcDc9eXcowaIl5Ew14JZmoQh9VD0QtD/sb7q f/BMGTXF0hL5G/tk88DAMEZBCbzP8ek+K4MJDsa8THwhbwlDuS4GT8vrfZB1Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743188667; a=rsa-sha256; cv=none; b=JcdEdIx9ksuckXFlxlEFABRGUKSXoy9qR/7eTmIbmTHdZxN4WPaKluIBTtulnTzzMj69pD uiNWDug4AxuL8JoSMN3QY2RDjg9ZMZDbOxDr7FSGb3e3G+TozVz/S7/ToIhbVmbbeUrNDy BGxb7p3Rp/wHkKEswWy/6pvbN0YgRfQ8k0ZfhQlxidvZIwVc8r1pn0D5j+XTO/bOi9jAwR 90aDOPDz3qcbXkTzN1XWqXzsiq6cdXWi7+e7CROua6wAyD84FDyG7G1VptWRVHWOw6swl/ C36j01CqvxXlPm7JgcTqzUMGG3RaLPFSwGDGTwXcM6GSram/wuaVgLxCjIYdnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7kQW6Gvb0Yag5t/Poc/l3MWk1Skryjq28Rwd4MS0TCg=; b=GlMrnyIOVsorav5/6fz5P1VAK3oETVpDppyd/92XCJcPelrnU6KFmCzK1s29OhbY4FFbvr 0lF+61MuxNiw6QddbQbVaYQ3iQGp/z+I5RStUeZp0S8SowI6d9rvbF0exPH52m6AvbAPse GDdmg/PlXOWR+dQXLu9dabczJqAYwjT5HsQlxwoveSbXEqO8TY6eSSJws7gsr1UxOFlQ72 tCtj/+PJOeeDjfJbHNPrZI3Wb6qmz6eyR1p7o4RoiXM0WeJIuknBVikCFKuud/CdLaBqcT p5h0JFXiHoTirN8i18HTx+KBDAJa3nJUNXiqYCF43H+bICqKhl8T62rAoDGpKA== 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 4ZPVLy6DZnzw9c; Fri, 28 Mar 2025 19:04: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 52SJ4Qti022669; Fri, 28 Mar 2025 19:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SJ4QMa022666; Fri, 28 Mar 2025 19:04:26 GMT (envelope-from git) Date: Fri, 28 Mar 2025 19:04:26 GMT Message-Id: <202503281904.52SJ4QMa022666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 3bae83078261 - main - ath: fix athtools common code to correctly init state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3bae83078261cd1d51859f869a7b090aa3b428fc Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=3bae83078261cd1d51859f869a7b090aa3b428fc commit 3bae83078261cd1d51859f869a7b090aa3b428fc Author: Adrian Chadd AuthorDate: 2025-03-27 23:39:42 +0000 Commit: Adrian Chadd CommitDate: 2025-03-28 19:00:22 +0000 ath: fix athtools common code to correctly init state Check req->s instead of s to know if the state needs to be cleaned up first. This error is from a refactor I did years ago. Oops! Differential Revision: https://reviews.freebsd.org/D49545 Reviewed by: thj --- tools/tools/ath/common/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/ath/common/ctrl.c b/tools/tools/ath/common/ctrl.c index 419e6fe8277e..ccea1b13401a 100644 --- a/tools/tools/ath/common/ctrl.c +++ b/tools/tools/ath/common/ctrl.c @@ -87,7 +87,7 @@ ath_driver_req_open(struct ath_driver_req *req, const char *ifname) { int s; - if (s != -1) + if (req->s != -1) ath_driver_req_close(req); /* For now, netif socket, not /dev/ filedescriptor */ From nobody Fri Mar 28 19:04:27 2025 X-Original-To: dev-commits-src-all@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 4ZPVM05NV7z5rHxr; Fri, 28 Mar 2025 19:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPVM00TJVz3DqH; Fri, 28 Mar 2025 19:04:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TdjU9IEZLrGw12ezSz819BgPNUkz9S4mQDeIKv+Ksko=; b=J+MQ1h8Ap3jRweOKa0k0yUcuw9xdHSAzvCBbmtlmS7FMLzrOFT8oFothaV0i84KsNsl2+G /Up3O3wBzjsT3CgXD50/OZuRrN50Dbx+toIuO+5RpcooX2K4fvWMSx2DmPYyiLbyGaUAKj npa1IlsMf8ka61ugRad4bY6ENZIRtluviLflx+Ih6yEHNo1eq9mXzlCKn2/j8iAqzE7u9L n7WI0C+vB0h5N4LWbzycOu944OZLpO/xEgCE6JH66n0Y1BfotOfT0lVVGIbUKxWAa2GsgG H2uQwXCsJdzcGen+BYxXqb0CCWVZCBNAD/nLtfMG1K7FOuwSSAidwqhZn4/Uhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743188668; a=rsa-sha256; cv=none; b=h3SnDCZXLei37iZmc3eVMZ55jFcTx26adwvt63RcYUA2eMMt865MK8+S7rOS519SC1/VVj EUMPgSK+RkzZLq5tg231vyEuZCRIxHVWbLLKdAhPgMl8Zjwh0iF66Zb3r4Z7xlCQGGyc9D XRcTKTqvAwlm/TEv6LDOQHPyAsmwgEskqCFUaQgrw0g9vpfN73DmFlrvkrgXzn+SnpABJj NsuB7vLKqiAY4InMiXTFGpprv4zNXm9c5URPqEOwvmrUw6IVb+6WiQboIzDdUDirCLrIqB 08H8Zss1cjMR5oPgKFZZbp7jltez6CvjywjawYhw91etmfE/meosZ7IJertbzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743188668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TdjU9IEZLrGw12ezSz819BgPNUkz9S4mQDeIKv+Ksko=; b=UKMGmVUMp6SwOhsDZQcAUCGV/Jh/IvI46ec76CryH0iSpufR3ZEgrJI0ug8VWwqXfubC5W l0eIa8tuQBvvMYUtN/wlFO1xPTavK51iCTVkJI9KPuutVjdYUQ69pJFUqGvClzL2WZI3jt Xpo6f9J6Sl6iAEtAAooWuRnSM9PD9dNLZYE5F9kSXcxWqsJDe+jD3QkUEpVCzhXrbUsh3+ CKtqr97ywGt9Np97hdpRMyuNdtLBsgTdUy/uxsZyS8GtteEdknFGkYxhmd5PLW3z4OlBa+ hM25SaCq7WOemJ5ANAl+G54rrrDNrXRfy8vJKPC7nTzSpsZH4IPzd2vYUZCIqg== 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 4ZPVM002j8zw0F; Fri, 28 Mar 2025 19:04: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 52SJ4RRc022706; Fri, 28 Mar 2025 19:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SJ4R9k022703; Fri, 28 Mar 2025 19:04:27 GMT (envelope-from git) Date: Fri, 28 Mar 2025 19:04:27 GMT Message-Id: <202503281904.52SJ4R9k022703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: d8482e1b3e14 - main - athpoke: Use a format string with err() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8482e1b3e1473c7a8216f356bb978c792740a85 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=d8482e1b3e1473c7a8216f356bb978c792740a85 commit d8482e1b3e1473c7a8216f356bb978c792740a85 Author: Adrian Chadd AuthorDate: 2025-03-27 23:43:35 +0000 Commit: Adrian Chadd CommitDate: 2025-03-28 19:00:34 +0000 athpoke: Use a format string with err() Don't do err(1, ptr); that's a very old security risk turned warning. Differential Revision: https://reviews.freebsd.org/D49546 Reviewed by: thj --- tools/tools/ath/athpoke/athpoke.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tools/ath/athpoke/athpoke.c b/tools/tools/ath/athpoke/athpoke.c index e54388587ca8..02a21676e91f 100644 --- a/tools/tools/ath/athpoke/athpoke.c +++ b/tools/tools/ath/athpoke/athpoke.c @@ -89,7 +89,7 @@ main(int argc, char *argv[]) atd.ad_out_data = (caddr_t) &state.revs; atd.ad_out_size = sizeof(state.revs); if (ioctl(s, SIOCGATHDIAG, &atd) < 0) - err(1, atd.ad_name); + err(1, "%s", atd.ad_name); argc -= optind; argv += optind; @@ -132,7 +132,7 @@ regread(int s, struct ath_diag *atd, uint32_t r) atd->ad_out_size = sizeof(v); atd->ad_id = HAL_DIAG_REGS | ATH_DIAG_IN | ATH_DIAG_DYN; if (ioctl(s, SIOCGATHDIAG, atd) < 0) - err(1, atd->ad_name); + err(1, "%s", atd->ad_name); return v[2]; } @@ -147,7 +147,7 @@ regwrite(int s, struct ath_diag *atd, uint32_t r, uint32_t v) atd->ad_in_size = sizeof(rw); atd->ad_id = HAL_DIAG_SETREGS | ATH_DIAG_IN; if (ioctl(s, SIOCGATHDIAG, atd) < 0) - err(1, atd->ad_name); + err(1, "%s", atd->ad_name); } static int From nobody Fri Mar 28 21:37:48 2025 X-Original-To: dev-commits-src-all@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 4ZPYlw4Tdnz5rSbW; Fri, 28 Mar 2025 21:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPYlw43wYz44VK; Fri, 28 Mar 2025 21:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=loDz+FIqQBOaXAEMlP/AhN5kT4z5eDqHrKeo8nH6CDY=; b=IOwzlIVmCsyncLSPLgjexXIb8s1Ho8V9oXJ7IGj1husnHENur1uD/aZveX+0qTwCH/oCpa s8rGhKhme+6kaJADzWFA1MQzJTTr4TeMLUl7CG0cUWNGFrcKwM6tMS/iZqbE7HxTzP49Pw VjeG9cmd6cLm7mWkcy1WtRfZLrzwvI7ktV1dav4u9M+5QDV2tBPW8vt0mFTH2debwlmbcZ 9A6Tcn/6kFM5UO7SkUzuq+ZFvQcfc0gjRUWDSqM7MJbYjVFEt1Gsh50aspA/UxavXTLWJa R2wnDrxte1DPUxJ4/KxTZjoCI+7hEtVMGxwCGlKrpDv0eiMgTfrMs1RxL+Q/8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743197868; a=rsa-sha256; cv=none; b=VQs6+HB9EMdXv4WPYc6p/g6QI861LNXmUQTHgW4uh9/CFB+GGiOXazox7oYCqHvZs3FKKS 63NgvqXHtStS7VNUBV0rpmgfhlaQhOZBB3mAb8rPNDpbhbTX3g3LJlvNRmGQTaIGTpjg1E w7SaEnk062kn0sZ68zsnifSE++u8SjPW5WMr59ApkeAgpEOyZv8t9kAVwG109uQH+LAhRK txlqhzv+0ejzDH6h+4+z4q9nwo42AjIkaZQklV83qJdehmBAga1P2aAVbBTzQtck7QfOY4 rIzA4v2GHgKFSnmnuFKtjZ64zIIJi9zMg64uM60gsZg++5XpOgMR+lkahBMmyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=loDz+FIqQBOaXAEMlP/AhN5kT4z5eDqHrKeo8nH6CDY=; b=MMA8OEMqX0DkutuoDjt/LP2G3TweJ4NdSFnLTn/LRRsxgtgY2VrwV51CFBZhaoIJlz8ALL vgMqd9q/NHOADPcAtoq0uMBBTo1OcZK49TnWNs4aJe4H89URJBpz6Nw6w24Z3yno6/VzBA v1dDoxMvmtrKGT8mQlq5rygLwj0w2qyNMMRmDsPE3p9LfGavPV9fOsRiYaNe07lxtVYn1J Lvgo3mVgxGa2X2RQmBXCIY/s2l1TtbAdDYVH2PFhTpqf7pIfzF9JTy9N4+WXeeRdkSmIH+ qyicDHfnDU5+8hPNgnXyYh1Ex0Fj69LyPvsYhqo29E4Fn0vNJCogMZBeUtOLIA== 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 4ZPYlw3T2Wz1166; Fri, 28 Mar 2025 21:37: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 52SLbmWN003454; Fri, 28 Mar 2025 21:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SLbmIi003451; Fri, 28 Mar 2025 21:37:48 GMT (envelope-from git) Date: Fri, 28 Mar 2025 21:37:48 GMT Message-Id: <202503282137.52SLbmIi003451@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0b773a94ab9a - main - libc/tests: enable getaddrinfo(1) tests from NetBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b773a94ab9af13ebe560a3f07799b8e6622a61a Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0b773a94ab9af13ebe560a3f07799b8e6622a61a commit 0b773a94ab9af13ebe560a3f07799b8e6622a61a Author: Gleb Smirnoff AuthorDate: 2025-03-28 21:32:37 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-28 21:36:40 +0000 libc/tests: enable getaddrinfo(1) tests from NetBSD Enable running of contrib/netbsd-tests/lib/libc/net/getaddrinfo without modifications to the test program itself. However, create our own version of expected results files. They are produced from the NetBSD files, with the following list of changes: o AF_INET6 value is different, hence: s/family 24/family 28/. o SCTP result (socktype 5 protocol 132) needs to be added to many queries results. o NetBSD libc sorts multiple results first by protocol, then by address family. FreeBSD first sorts on address family, then on protocol. Some results need to be reordered. o Error strings need to be fixed: s/hostname nor servname provided, or not known/Name does not resolve/ s/ai_family not supported/Address family not recognized/ s/servname not supported for ai_socktype/\ Service was not recognized for socket type/. Reviewed by: ngie, kib Differential Revision: https://reviews.freebsd.org/D49409 --- lib/libc/tests/net/Makefile | 3 +- lib/libc/tests/net/getaddrinfo/Makefile | 2 - lib/libc/tests/net/getaddrinfo/basics_v4.exp | 42 +++++++++++++++ lib/libc/tests/net/getaddrinfo/basics_v4v6.exp | 50 +++++++++++++++++ lib/libc/tests/net/getaddrinfo/no_host_v4.exp | 44 +++++++++++++++ lib/libc/tests/net/getaddrinfo/no_host_v4v6.exp | 68 ++++++++++++++++++++++++ lib/libc/tests/net/getaddrinfo/no_serv_v4.exp | 17 ++++++ lib/libc/tests/net/getaddrinfo/no_serv_v4v6.exp | 20 +++++++ lib/libc/tests/net/getaddrinfo/scoped.exp | 5 ++ lib/libc/tests/net/getaddrinfo/sock_raw_v4.exp | 13 +++++ lib/libc/tests/net/getaddrinfo/sock_raw_v4v6.exp | 15 ++++++ lib/libc/tests/net/getaddrinfo/spec_fam_v4.exp | 7 +++ lib/libc/tests/net/getaddrinfo/spec_fam_v4v6.exp | 10 ++++ lib/libc/tests/net/getaddrinfo/unsup_fam.exp | 2 + 14 files changed, 294 insertions(+), 4 deletions(-) diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile index 0a49683ea3d1..016f0cd82ceb 100644 --- a/lib/libc/tests/net/Makefile +++ b/lib/libc/tests/net/Makefile @@ -31,8 +31,7 @@ aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c .include "../Makefile.netbsd-tests" -# TODO: the testcases needs to be ported to FreeBSD -#TESTS_SUBDIRS= getaddrinfo +TESTS_SUBDIRS= getaddrinfo ${PACKAGE}FILES+= hosts ${PACKAGE}FILES+= resolv.conf diff --git a/lib/libc/tests/net/getaddrinfo/Makefile b/lib/libc/tests/net/getaddrinfo/Makefile index 5d98aa31a86a..19c7ccbe0030 100644 --- a/lib/libc/tests/net/getaddrinfo/Makefile +++ b/lib/libc/tests/net/getaddrinfo/Makefile @@ -6,8 +6,6 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} BINDIR= ${TESTSDIR} -.error This testcase needs to be ported to FreeBSD (the output from getaddrinfo_test differs from NetBSD) - NETBSD_ATF_TESTS_SH= getaddrinfo_test PROGS= h_gai diff --git a/lib/libc/tests/net/getaddrinfo/basics_v4.exp b/lib/libc/tests/net/getaddrinfo/basics_v4.exp new file mode 100644 index 000000000000..4f1ee3517211 --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/basics_v4.exp @@ -0,0 +1,42 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv http +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv http +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv http +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv tftp +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv tftp +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv tftp +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv tftp +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv tftp +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv tftp +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv echo +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv echo +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv echo +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv echo + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv echo +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv echo + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv echo +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv echo + diff --git a/lib/libc/tests/net/getaddrinfo/basics_v4v6.exp b/lib/libc/tests/net/getaddrinfo/basics_v4v6.exp new file mode 100644 index 000000000000..b74758e93e2e --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/basics_v4v6.exp @@ -0,0 +1,50 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv http +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv http +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv http +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv http +ai4: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai5: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai6: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv tftp +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv tftp +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv tftp +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv tftp +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv tftp +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv tftp +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv tftp +ai3: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv tftp +ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv echo +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv echo +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv echo +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv echo + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv echo +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv echo + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv echo +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv echo +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv echo +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv echo +ai4: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo +ai5: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo +ai6: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv echo + diff --git a/lib/libc/tests/net/getaddrinfo/no_host_v4.exp b/lib/libc/tests/net/getaddrinfo/no_host_v4.exp new file mode 100644 index 000000000000..7ed41cd9d88a --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/no_host_v4.exp @@ -0,0 +1,44 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv http +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv echo +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv echo + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv tftp +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv tftp +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv http +ai1: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv http +ai2: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv http +ai3: flags 0x3 family 2 socktype 5 protocol 132 addrlen 16 host 0.0.0.0 serv http + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv echo +ai1: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv echo +ai2: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv echo +ai3: flags 0x3 family 2 socktype 5 protocol 132 addrlen 16 host 0.0.0.0 serv echo + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv tftp +ai1: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv tftp +ai2: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv tftp + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv http +ai2: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv http +ai3: flags 0x3 family 2 socktype 5 protocol 132 addrlen 16 host 0.0.0.0 serv http + +arg: flags 0x2 family 0 socktype 1 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 2 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http + diff --git a/lib/libc/tests/net/getaddrinfo/no_host_v4v6.exp b/lib/libc/tests/net/getaddrinfo/no_host_v4v6.exp new file mode 100644 index 000000000000..596799305117 --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/no_host_v4v6.exp @@ -0,0 +1,68 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv http +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv http +ai4: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai5: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai6: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv echo +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv echo +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv echo +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv echo +ai4: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv echo +ai5: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv echo +ai6: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv echo + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv tftp +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv tftp +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv tftp +ai3: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv tftp +ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv tftp + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv http +ai4: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai5: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai6: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv http +ai1: flags 0x3 family 28 socktype 2 protocol 17 addrlen 28 host :: serv http +ai2: flags 0x3 family 28 socktype 1 protocol 6 addrlen 28 host :: serv http +ai3: flags 0x3 family 28 socktype 5 protocol 132 addrlen 28 host :: serv http +ai4: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv http +ai5: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv http +ai6: flags 0x3 family 2 socktype 5 protocol 132 addrlen 16 host 0.0.0.0 serv http + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv echo +ai1: flags 0x3 family 28 socktype 2 protocol 17 addrlen 28 host :: serv echo +ai2: flags 0x3 family 28 socktype 1 protocol 6 addrlen 28 host :: serv echo +ai3: flags 0x3 family 28 socktype 5 protocol 132 addrlen 28 host :: serv echo +ai4: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv echo +ai5: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv echo +ai6: flags 0x3 family 2 socktype 5 protocol 132 addrlen 16 host 0.0.0.0 serv echo + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv tftp +ai1: flags 0x3 family 28 socktype 2 protocol 17 addrlen 28 host :: serv tftp +ai2: flags 0x3 family 28 socktype 1 protocol 6 addrlen 28 host :: serv tftp +ai3: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv tftp +ai4: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv tftp + +arg: flags 0x3 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x3 family 28 socktype 2 protocol 17 addrlen 28 host :: serv http +ai2: flags 0x3 family 28 socktype 1 protocol 6 addrlen 28 host :: serv http +ai3: flags 0x3 family 28 socktype 5 protocol 132 addrlen 28 host :: serv http +ai4: flags 0x3 family 2 socktype 2 protocol 17 addrlen 16 host 0.0.0.0 serv http +ai5: flags 0x3 family 2 socktype 1 protocol 6 addrlen 16 host 0.0.0.0 serv http +ai6: flags 0x3 family 2 socktype 5 protocol 132 addrlen 16 host 0.0.0.0 serv http + +arg: flags 0x2 family 0 socktype 1 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 0 socktype 2 protocol 0 addrlen 0 host (empty) serv 80 +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http + diff --git a/lib/libc/tests/net/getaddrinfo/no_serv_v4.exp b/lib/libc/tests/net/getaddrinfo/no_serv_v4.exp new file mode 100644 index 000000000000..667234d2161f --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/no_serv_v4.exp @@ -0,0 +1,17 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv (empty) +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv 0 +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv 0 +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv 0 + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv (empty) +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0 +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0 +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv (empty) +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0 +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0 +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv (empty) +Name does not resolve diff --git a/lib/libc/tests/net/getaddrinfo/no_serv_v4v6.exp b/lib/libc/tests/net/getaddrinfo/no_serv_v4v6.exp new file mode 100644 index 000000000000..53502547c40e --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/no_serv_v4v6.exp @@ -0,0 +1,20 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv (empty) +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv 0 +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv 0 +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv 0 + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv (empty) +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0 +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0 +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv (empty) +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv 0 +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv 0 +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv 0 +ai4: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0 +ai5: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0 +ai6: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv (empty) +Name does not resolve diff --git a/lib/libc/tests/net/getaddrinfo/scoped.exp b/lib/libc/tests/net/getaddrinfo/scoped.exp new file mode 100644 index 000000000000..f5ddb4bf6feb --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/scoped.exp @@ -0,0 +1,5 @@ +arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host fe80::1%lo0 serv http +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host fe80::1%lo0 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host fe80::1%lo0 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host fe80::1%lo0 serv http + diff --git a/lib/libc/tests/net/getaddrinfo/sock_raw_v4.exp b/lib/libc/tests/net/getaddrinfo/sock_raw_v4.exp new file mode 100644 index 000000000000..021038b81dcc --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/sock_raw_v4.exp @@ -0,0 +1,13 @@ +arg: flags 0x2 family 0 socktype 3 protocol 0 addrlen 0 host localhost serv (empty) +ai1: flags 0x2 family 2 socktype 3 protocol 0 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv (empty) +ai1: flags 0x2 family 2 socktype 3 protocol 59 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv 80 +Service was not recognized for socket type +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv www +Service was not recognized for socket type +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host ::1 serv (empty) +ai1: flags 0x2 family 28 socktype 3 protocol 59 addrlen 28 host ::1 serv 0 + diff --git a/lib/libc/tests/net/getaddrinfo/sock_raw_v4v6.exp b/lib/libc/tests/net/getaddrinfo/sock_raw_v4v6.exp new file mode 100644 index 000000000000..e494271a3d35 --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/sock_raw_v4v6.exp @@ -0,0 +1,15 @@ +arg: flags 0x2 family 0 socktype 3 protocol 0 addrlen 0 host localhost serv (empty) +ai1: flags 0x2 family 28 socktype 3 protocol 0 addrlen 28 host ::1 serv 0 +ai2: flags 0x2 family 2 socktype 3 protocol 0 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv (empty) +ai1: flags 0x2 family 28 socktype 3 protocol 59 addrlen 28 host ::1 serv 0 +ai2: flags 0x2 family 2 socktype 3 protocol 59 addrlen 16 host 127.0.0.1 serv 0 + +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv 80 +Service was not recognized for socket type +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv www +Service was not recognized for socket type +arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host ::1 serv (empty) +ai1: flags 0x2 family 28 socktype 3 protocol 59 addrlen 28 host ::1 serv 0 + diff --git a/lib/libc/tests/net/getaddrinfo/spec_fam_v4.exp b/lib/libc/tests/net/getaddrinfo/spec_fam_v4.exp new file mode 100644 index 000000000000..924d2a16f47c --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/spec_fam_v4.exp @@ -0,0 +1,7 @@ +arg: flags 0x2 family 2 socktype 0 protocol 0 addrlen 0 host localhost serv http +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 28 socktype 0 protocol 0 addrlen 0 host localhost serv http +Address family for hostname not supported diff --git a/lib/libc/tests/net/getaddrinfo/spec_fam_v4v6.exp b/lib/libc/tests/net/getaddrinfo/spec_fam_v4v6.exp new file mode 100644 index 000000000000..af3506938503 --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/spec_fam_v4v6.exp @@ -0,0 +1,10 @@ +arg: flags 0x2 family 2 socktype 0 protocol 0 addrlen 0 host localhost serv http +ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv http +ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv http +ai3: flags 0x2 family 2 socktype 5 protocol 132 addrlen 16 host 127.0.0.1 serv http + +arg: flags 0x2 family 28 socktype 0 protocol 0 addrlen 0 host localhost serv http +ai1: flags 0x2 family 28 socktype 2 protocol 17 addrlen 28 host ::1 serv http +ai2: flags 0x2 family 28 socktype 1 protocol 6 addrlen 28 host ::1 serv http +ai3: flags 0x2 family 28 socktype 5 protocol 132 addrlen 28 host ::1 serv http + diff --git a/lib/libc/tests/net/getaddrinfo/unsup_fam.exp b/lib/libc/tests/net/getaddrinfo/unsup_fam.exp new file mode 100644 index 000000000000..69e6b48a854b --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/unsup_fam.exp @@ -0,0 +1,2 @@ +arg: flags 0x2 family 99 socktype 0 protocol 0 addrlen 0 host localhost serv (empty) +Address family not recognized From nobody Fri Mar 28 21:37:50 2025 X-Original-To: dev-commits-src-all@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 4ZPYlz0MMCz5rT4F; Fri, 28 Mar 2025 21:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPYly5SVGz44HG; Fri, 28 Mar 2025 21:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30/zQYxOMQ/i/I9gU1LT6/C58WdupP5XFSint7OvE/M=; b=pUwqPWNdX+Akzgt9OTu054qa+HnbALXc7Ox2Znpn+t0DrAEHmAp6o1j0+uf67E2P+ZwSiU hgwCa6DPRmos2twp943SQNokv501rJtQp5DAWosWlB0UdWsShPKtNt+HV6OrXh7gRaW53n sAoCYUyvZJ4ZUt8fJmq9kZI+bvN2oGdoyvvVtEKZ0qIRgfSdIBkclZJDgFdQ9SUB7wSIXL u1jCgliF4BOEk+6Qh86O2Z9HHn0za7PcVpZ4sFUIlBvzEtEkOSQfzKSxU4ytRPtKzMGnID pt4PmceOEaz8fQbxF6nia89Md/xJvcskDdfrNSy7APchaAks+VG9PlqES9vozg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743197870; a=rsa-sha256; cv=none; b=w0KQM9tuJ+UNpnmqsI9GZijYfztgweEbGA+EzKDVDMJquSkhcS4IZiS59VtewbEN7ocTha WM4fwpB5hcNsT02XqXFdLDvFjyT7GrX70HW0O4sARhd5+586PW+2bmUiYZ7d5pNsq6es3U EPsKCvTEKzCeNkPmyY/sYlp20evmFYmRgrRxLvi4i10aUtc36zHxosrhM7AB4M18XrkZ3P 75BHD5xnjkBKhRqNKZJE9vFVF0wUE/ssKCp2Pt6m/FREhOCCZLlT+Sf4Lr92VYfCzMiT4s rscDbShZRlLRx7p/nVyOtNtHR0AmD913gTTyAZ3EOoDXl9ziBcrGzfaFIJchVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30/zQYxOMQ/i/I9gU1LT6/C58WdupP5XFSint7OvE/M=; b=lABRpOPj4pAcniWfqCLIRlBLcwO70n8B5FNWSHAWVQqwcdmJgtHGDb40XLbSNltKIEw2QX QALSVIerqNxp8x2l0nI0k1WmeVfeRvXBpVhw/EgWCuyktOjn/AM1XK2uBnXgkXK/uDDEoM /ObdAssBV2JZuqrx8a/gZQiQlCzS7NqGiK7jM+OfJ7Umf35KTdRfE03oM4VshrBtjC10nE 4Eo9+0NasjBkbmynyie8VOB8CRVWnkavZdHcCPBx1KFOJ0h7nNItt9YNE3bSF2VVSNt4ei mqW1VRY+1VctSWGp3qbhQHMHHqhZDpjrYXafTBZOtVmVg3o9PvmRFXSrAAYeOA== 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 4ZPYly540Tz10m2; Fri, 28 Mar 2025 21:37: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 52SLboVf003527; Fri, 28 Mar 2025 21:37:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SLbogV003524; Fri, 28 Mar 2025 21:37:50 GMT (envelope-from git) Date: Fri, 28 Mar 2025 21:37:50 GMT Message-Id: <202503282137.52SLbogV003524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d803854bccb9 - main - libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d803854bccb9ea527c1769ac403e011ff0e121e5 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d803854bccb9ea527c1769ac403e011ff0e121e5 commit d803854bccb9ea527c1769ac403e011ff0e121e5 Author: Gleb Smirnoff AuthorDate: 2025-03-28 21:35:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-28 21:36:40 +0000 libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout A nameserver timeout is a soft failure, future attempts may succeed. Returning EAI_AGAIN is crucial for API users to tell a soft name resolution failure from negative resolution result. Before the change we would return EAI_ADDRFAMILY, which I believe, is a regression from 144361386696, and before that revision we used to return EAI_NONAME in most of the cases. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49411 --- lib/libc/net/getaddrinfo.c | 58 +++++++++++++++++++++------- lib/libc/tests/net/getaddrinfo/getaddrinfo.c | 53 ++++++++++++------------- 2 files changed, 67 insertions(+), 44 deletions(-) diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 2b9499d5099b..b8af23ebe8da 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -2341,9 +2341,14 @@ _dns_getaddrinfo(void *rv, void *cb_data, va_list ap) if (res_searchN(hostname, &q, res) < 0) { free(buf); free(buf2); - if (res->res_h_errno == NO_DATA) + switch (res->res_h_errno) { + case NO_DATA: return (NS_ADDRFAMILY); - return (NS_NOTFOUND); + case TRY_AGAIN: + return (NS_TRYAGAIN); + default: + return (NS_NOTFOUND); + } } /* prefer IPv6 */ if (q.next) { @@ -2705,9 +2710,18 @@ res_queryN(const char *name, struct res_target *target, res_state res) int n; u_int oflags; struct res_target *t; - int rcode; + u_int rcode; int ancount; + /* + * Extend rcode values in the scope of this function. The DNS header + * rcode we use in this function (hp->rcode) is limited by 4 bits, so + * anything starting from 16 is safe wrt aliasing. However, nameser.h + * already has extended enum __ns_rcode, so for future safety let's use + * even larger values. + */ +#define RCODE_UNREACH 32 +#define RCODE_TIMEDOUT 33 rcode = NOERROR; ancount = 0; @@ -2768,7 +2782,29 @@ again: printf(";; res_nquery: retry without EDNS0\n"); goto again; } - rcode = hp->rcode; /* record most recent error */ + /* + * Historically if a DNS server replied with ICMP port + * unreach res_nsend() would signal that with + * ECONNREFUSED and the upper layers would convert that + * into TRY_AGAIN. See 3a0b3b673936b and deeper. + * Also, res_nsend() may set errno to ECONNREFUSED due + * to internal failures. This may not be intentional, + * but we also treat that as soft failures. + * + * A more practical case is when a DNS server(s) were + * queried and didn't respond anything, which usually + * indicates a soft network failure. + */ + switch (errno) { + case ECONNREFUSED: + rcode = RCODE_UNREACH; + break; + case ETIMEDOUT: + rcode = RCODE_TIMEDOUT; + break; + default: + rcode = hp->rcode; + } #ifdef DEBUG if (res->options & RES_DEBUG) printf(";; res_query: send error\n"); @@ -2800,6 +2836,8 @@ again: case NXDOMAIN: RES_SET_H_ERRNO(res, HOST_NOT_FOUND); break; + case RCODE_UNREACH: + case RCODE_TIMEDOUT: case SERVFAIL: RES_SET_H_ERRNO(res, TRY_AGAIN); break; @@ -2862,10 +2900,6 @@ res_searchN(const char *name, struct res_target *target, res_state res) ret = res_querydomainN(name, NULL, target, res); if (ret > 0 || trailing_dot) return (ret); - if (errno == ECONNREFUSED) { - RES_SET_H_ERRNO(res, TRY_AGAIN); - return (-1); - } switch (res->res_h_errno) { case NO_DATA: case HOST_NOT_FOUND: @@ -2906,7 +2940,6 @@ res_searchN(const char *name, struct res_target *target, res_state res) ret = res_querydomainN(name, *domain, target, res); if (ret > 0) return (ret); - /* * If no server present, give up. * If name isn't found in this domain, @@ -2920,11 +2953,6 @@ res_searchN(const char *name, struct res_target *target, res_state res) * but try the input name below in case it's * fully-qualified. */ - if (errno == ECONNREFUSED) { - RES_SET_H_ERRNO(res, TRY_AGAIN); - return (-1); - } - switch (res->res_h_errno) { case NO_DATA: got_nodata++; @@ -2933,8 +2961,8 @@ res_searchN(const char *name, struct res_target *target, res_state res) /* keep trying */ break; case TRY_AGAIN: - got_servfail++; if (hp->rcode == SERVFAIL) { + got_servfail++; /* try next search element, if any */ break; } diff --git a/lib/libc/tests/net/getaddrinfo/getaddrinfo.c b/lib/libc/tests/net/getaddrinfo/getaddrinfo.c index 9d8575232d2a..022405f464ce 100644 --- a/lib/libc/tests/net/getaddrinfo/getaddrinfo.c +++ b/lib/libc/tests/net/getaddrinfo/getaddrinfo.c @@ -122,19 +122,14 @@ ATF_TC_BODY(timeout, tc) resconf = badresolvconf; rv = getaddrinfo(goodname, NULL, &hints, &res); - /* - * XXXGL: EAI_ADDRFAMILY is most likely a regression from 144361386696. - * Error code on timeout used to be EAI_NONAME for many years and IMHO - * this is not correct either. Should be EAI_AGAIN. - */ - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); rv = getaddrinfo(goodname_dot, NULL, &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); } ATF_TC_WITHOUT_HEAD(timeout_specific); @@ -150,14 +145,14 @@ ATF_TC_BODY(timeout_specific, tc) resconf = badresolvconf; rv = getaddrinfo(goodname, "666", &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); rv = getaddrinfo(goodname_dot, "666", &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); } ATF_TC_WITHOUT_HEAD(timeout2); @@ -172,14 +167,14 @@ ATF_TC_BODY(timeout2, tc) resconf = badresolvconf2; rv = getaddrinfo(goodname, NULL, &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); rv = getaddrinfo(goodname_dot, NULL, &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); } /* @@ -197,14 +192,14 @@ ATF_TC_BODY(netdown, tc) send_error = ENETDOWN; rv = getaddrinfo(goodname, NULL, &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_NONAME, - "Expected %d (EAI_NONAME), got %d (%s)", - EAI_NONAME, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); rv = getaddrinfo(goodname_dot, NULL, &hints, &res); - ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, - "Expected %d (EAI_ADDRFAMILY), got %d (%s)", - EAI_ADDRFAMILY, rv, gai_strerror(rv)); + ATF_REQUIRE_MSG(rv == EAI_AGAIN, + "Expected %d (EAI_AGAIN), got %d (%s)", + EAI_AGAIN, rv, gai_strerror(rv)); } /* From nobody Fri Mar 28 21:37:49 2025 X-Original-To: dev-commits-src-all@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 4ZPYly1F2hz5rT1s; Fri, 28 Mar 2025 21:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPYlx55gQz44Q6; Fri, 28 Mar 2025 21:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uj7CvXQ4qtnsUBY9PoZ8Kq9gNJXauXx0kbvPLJSyGeY=; b=vTQbed5fwGlCKC+I40kQLlNOOv8UuMAN1ElrL4oODE8jSUwW5DJGCnPEaWxdYL7L9VY1w6 Y+3CrYJIONXRz8ToC8Z6xqi4uRxHthnDw/SfH1Irn771EwK4nb7o1xrFgkbnF1/+qNvO4j 52u2R7Yp2MNhbZPqs+3o3zIjJaL6XhR/RUMnuY+xyznhOXAjQC561Z4+hDUucdC5jvTftB 4bKV+OThFSA9t8mjKMOO7z9L+TJEa2zpzfw6dZwe9Dq/rFY74GcnrTKMXvWVtOac2+Cohx wyLbGqO5Wa9okmzCV0abSLlT+zy3WQa3QJym0vCmihGurSdwtBsvnPP1xko/Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743197869; a=rsa-sha256; cv=none; b=k8fpik/2W/FJbKD3VfOCKR3UKAb/ui0AVu82LY5o/UiHODZv/Mp72/+auP00wtHIB7FW1/ eAz95XSQcMFa5hwgUpJaLyla200KCYy8lBa9Xu2pDcfbeHTUnhHT+2gjvDVG+OUag9TyBZ vGpbhRDq3ThWN94xGJVbScK9w2e/Nx3PHya5NHgChuAPtFpoxda6qVWjQPS85fucoVy/Ae IheUMTZ1BLAopqIRUGvZKsOOjN0G1zpzY2wkgcmvA1QDZDIuyEI3WhwYjtUsYWyDyMs5dN efl9t1zz0lFHcQbkBcjNNSDwNfJqvCN5dwlKhq5dIkmX5C5jle5vfs9RJGadQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uj7CvXQ4qtnsUBY9PoZ8Kq9gNJXauXx0kbvPLJSyGeY=; b=wSGEGLJ2dzNEkhmdKWCTPHyVHU3uGS04fixg6uCqBkhEsbideA5w41sCdMgNXiSiExwfh8 BiC6+wxXO820FXdS4BtLqoKXlMkqVMqgZMY5bCK623lNeQO9Fp1eju0YLjr9VfK3ELa4je mpnWIl4mFhWKNmo2xOWj10p1clfs7DI7FHkFlOPkjv2jT0KiRKDayzDJLc2aRRY6W+ugUd TgrON8dsIM0E5Ii/ibZvUia0t9SjOlYwZrL8uGEnNPGRmUu468WnSqvr4NjDULBGTeNHkP t4mKq7X3VIUNnLqeJ/QhJ4o9iPkh6j09vbkOaQAwJSoJMvMm8Q6pTd7vxWJHTw== 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 4ZPYlx4gqtz10m0; Fri, 28 Mar 2025 21:37: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 52SLbnSo003487; Fri, 28 Mar 2025 21:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SLbnkN003484; Fri, 28 Mar 2025 21:37:49 GMT (envelope-from git) Date: Fri, 28 Mar 2025 21:37:49 GMT Message-Id: <202503282137.52SLbnkN003484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 531345778067 - main - libc/tests: add getaddrinfo test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53134577806796c8c12119c854a30ed4faf5a73e Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=53134577806796c8c12119c854a30ed4faf5a73e commit 53134577806796c8c12119c854a30ed4faf5a73e Author: Gleb Smirnoff AuthorDate: 2025-03-28 21:34:55 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-28 21:36:40 +0000 libc/tests: add getaddrinfo test A test suite for getaddrinfo(3) written in C. Unlike NetBSD test, this one will be mostly focused on what the API should return when something isn't good with your DNS. Test emulates bad DNS servers in resolv.conf intercepting fopen(2) and emulates downed network intercepting send(2). Initial version covers three main scenarios: all good, server(s) timed out, network down. For each scenario we test hostname with trailing dot and without, since libc resolver uses quite different code paths, sometimes even yielding with different error codes. All current error codes in the test are what our libc returns right now, meaning the test documents what we have, not what there should be. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49410 --- lib/libc/tests/net/getaddrinfo/Makefile | 1 + lib/libc/tests/net/getaddrinfo/getaddrinfo.c | 267 +++++++++++++++++++++++++++ 2 files changed, 268 insertions(+) diff --git a/lib/libc/tests/net/getaddrinfo/Makefile b/lib/libc/tests/net/getaddrinfo/Makefile index 19c7ccbe0030..1c8d68d8cc25 100644 --- a/lib/libc/tests/net/getaddrinfo/Makefile +++ b/lib/libc/tests/net/getaddrinfo/Makefile @@ -7,6 +7,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} BINDIR= ${TESTSDIR} NETBSD_ATF_TESTS_SH= getaddrinfo_test +ATF_TESTS_C= getaddrinfo PROGS= h_gai diff --git a/lib/libc/tests/net/getaddrinfo/getaddrinfo.c b/lib/libc/tests/net/getaddrinfo/getaddrinfo.c new file mode 100644 index 000000000000..9d8575232d2a --- /dev/null +++ b/lib/libc/tests/net/getaddrinfo/getaddrinfo.c @@ -0,0 +1,267 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Gleb Smirnoff + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include + +#include + +static const char goodname[] = "www.freebsd.org"; +static const char goodname_dot[] = "www.freebsd.org."; +static const char badname[] = "does-not-exist.freebsd.org"; +static const char badname_dot[] = "does-not-exist.freebsd.org."; +static const char ipv6onlyname[] = "beefy15.nyi.freebsd.org"; +static const char ipv6onlyname_dot[] = "beefy15.nyi.freebsd.org."; +static const char ipv4onlyname[] = "ipv4only.arpa"; +static const char ipv4onlyname_dot[] = "ipv4only.arpa."; +/* + * We need an IP address that doesn't exist, but not reported with ICMP + * unreachable by the nearest router. Let's try TEST-NET-3. + */ +static char badresolvconf[] = "nameserver 203.0.113.1"; +static char badresolvconf2[] = "nameserver 203.0.113.1\n" + "nameserver 203.0.113.2"; +static char *resconf = NULL; +FILE * +fopen(const char * restrict path, const char * restrict mode) +{ + static FILE *(*orig)(const char *, const char *); + + if (orig == NULL && (orig = dlsym(RTLD_NEXT, "fopen")) == NULL) + atf_libc_error(ENOENT, "dlsym(fopen): %s", dlerror()); + if (resconf != NULL && strcmp(path, _PATH_RESCONF) == 0) + return (fmemopen(resconf, strlen(resconf), mode)); + else + return (orig(path, mode)); +} + +static int send_error = 0; +ssize_t +send(int s, const void *msg, size_t len, int flags) +{ + static ssize_t (*orig)(int, const void *, size_t, int); + + if (orig == NULL && (orig = dlsym(RTLD_NEXT, "send")) == NULL) + atf_libc_error(ENOENT, "dlsym(send): %s", dlerror()); + if (send_error != 0) { + errno = send_error; + return (-1); + } else { + return (orig(s, msg, len, flags)); + } +} + +ATF_TC_WITHOUT_HEAD(basic); +ATF_TC_BODY(basic, tc) +{ + static const struct addrinfo hints = { + .ai_family = AF_UNSPEC, + .ai_flags = AI_CANONNAME, + }; + struct addrinfo *res; + int rv; + + rv = getaddrinfo(goodname, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == 0, + "Expected 0, got %d (%s)", rv, gai_strerror(rv)); + freeaddrinfo(res); + + rv = getaddrinfo(goodname_dot, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == 0, + "Expected 0, got %d (%s)", rv, gai_strerror(rv)); + freeaddrinfo(res); + + rv = getaddrinfo(badname, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_NONAME, + "Expected %d (EAI_NONAME), got %d (%s)", + EAI_NONAME, rv, gai_strerror(rv)); + + rv = getaddrinfo(badname_dot, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_NONAME, + "Expected %d (EAI_NONAME), got %d (%s)", + EAI_NONAME, rv, gai_strerror(rv)); +} + +ATF_TC_WITHOUT_HEAD(timeout); +ATF_TC_BODY(timeout, tc) +{ + static const struct addrinfo hints = { + .ai_family = AF_UNSPEC, + .ai_flags = AI_CANONNAME, + }; + struct addrinfo *res; + int rv; + + resconf = badresolvconf; + rv = getaddrinfo(goodname, NULL, &hints, &res); + /* + * XXXGL: EAI_ADDRFAMILY is most likely a regression from 144361386696. + * Error code on timeout used to be EAI_NONAME for many years and IMHO + * this is not correct either. Should be EAI_AGAIN. + */ + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(goodname_dot, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); +} + +ATF_TC_WITHOUT_HEAD(timeout_specific); +ATF_TC_BODY(timeout_specific, tc) +{ + static const struct addrinfo hints = { + .ai_family = AF_INET, + .ai_socktype = SOCK_STREAM, + .ai_flags = AI_CANONNAME, + }; + struct addrinfo *res; + int rv; + + resconf = badresolvconf; + rv = getaddrinfo(goodname, "666", &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(goodname_dot, "666", &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); +} + +ATF_TC_WITHOUT_HEAD(timeout2); +ATF_TC_BODY(timeout2, tc) +{ + static const struct addrinfo hints = { + .ai_family = AF_UNSPEC, + .ai_flags = AI_CANONNAME, + }; + struct addrinfo *res; + int rv; + + resconf = badresolvconf2; + rv = getaddrinfo(goodname, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(goodname_dot, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); +} + +/* + * Emulate interface/network down. + */ +ATF_TC_WITHOUT_HEAD(netdown); +ATF_TC_BODY(netdown, tc) +{ + static const struct addrinfo hints = { + .ai_family = AF_UNSPEC, + .ai_flags = AI_CANONNAME, + }; + struct addrinfo *res; + int rv; + + send_error = ENETDOWN; + rv = getaddrinfo(goodname, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_NONAME, + "Expected %d (EAI_NONAME), got %d (%s)", + EAI_NONAME, rv, gai_strerror(rv)); + + rv = getaddrinfo(goodname_dot, NULL, &hints, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); +} + +/* + * See https://reviews.freebsd.org/D37139. + */ +ATF_TC_WITHOUT_HEAD(nofamily); +ATF_TC_BODY(nofamily, tc) +{ + static const struct addrinfo hints4 = { + .ai_family = AF_INET, + .ai_flags = AI_CANONNAME, + }, hints6 = { + .ai_family = AF_INET6, + .ai_flags = AI_CANONNAME, + }; + struct addrinfo *res; + int rv; + + rv = getaddrinfo(ipv6onlyname, NULL, &hints4, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(ipv6onlyname_dot, NULL, &hints4, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(ipv4onlyname, NULL, &hints6, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(ipv4onlyname_dot, NULL, &hints6, &res); + ATF_REQUIRE_MSG(rv == EAI_ADDRFAMILY, + "Expected %d (EAI_ADDRFAMILY), got %d (%s)", + EAI_ADDRFAMILY, rv, gai_strerror(rv)); + + rv = getaddrinfo(badname, NULL, &hints4, &res); + ATF_REQUIRE_MSG(rv == EAI_NONAME, + "Expected %d (EAI_NONAME), got %d (%s)", + EAI_NONAME, rv, gai_strerror(rv)); + + rv = getaddrinfo(badname_dot, NULL, &hints6, &res); + ATF_REQUIRE_MSG(rv == EAI_NONAME, + "Expected %d (EAI_NONAME), got %d (%s)", + EAI_NONAME, rv, gai_strerror(rv)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, basic); + ATF_TP_ADD_TC(tp, timeout); + ATF_TP_ADD_TC(tp, timeout_specific); + ATF_TP_ADD_TC(tp, timeout2); + ATF_TP_ADD_TC(tp, netdown); + ATF_TP_ADD_TC(tp, nofamily); + + return (atf_no_error()); +} From nobody Fri Mar 28 21:37:51 2025 X-Original-To: dev-commits-src-all@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 4ZPYm05cYtz5rSbZ; Fri, 28 Mar 2025 21:37: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPYm03GNGz44Xq; Fri, 28 Mar 2025 21:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pL19qFbhewTreXP7T+aDedESBv+o7uSNmCt4psxeP0Q=; b=qeg9lppOXphZ4NTbvzTgYpiDn7yRkoeZP1a/GYPwARMbb0UxhJK/bqYvK9bqC/KHOCeBw+ QI1m076ePTglmBaV5ZaaSBTLAn35wis5Jr0PPdkJGlUSQ/1c70DrDddkTVvyFp5v2XxJXK KRAwPeFyAITtG2r7GJ+MxHY9OpvNbVZcCT9wFW68K35XaDoKktV2cwsXcjWL4ZLm8LhrX8 iikTF/8MbXZkUi5fPLAVDUfVFcfuX7YJpvp3ow4D6WU4qCuBsaEVBOHF5RrWX0fezhgHrE frCZK899diuuxMIHrsbVgh5h3l5BnIoQyN8IxEpqHAkfNg6deifmYogekrItog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743197872; a=rsa-sha256; cv=none; b=RrqXVil8kcUjL8O33GdPyWifj1ttoqSVt/Aa0mKTmPyUyKTxFU3+dlvT7lZ7Au1Pvo2Caw 3czZWtFD5EtTMw4drmIIedha1I2mvaXlvMhWaE4BFtIViM91YLMOk03h6dnfAi0pt4aLNn N84Wn1PEza1mkTOR34yGTvtbZ57gTpUGR2hBkCUQYoQKS867cBdm63vLktuuo6qTr+PTMj aaB1QSzm0wQt6uyGriGM3sXRdGsbORVXyStdW/zO5DwmQgpgRddpeR1wtwqBCXpOViKhx4 drmykBYQATmhT92GATJELdXgqQOcC7ZoLFoaYGKTqrb4z7oqqKZ1vGUfUvReOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743197872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pL19qFbhewTreXP7T+aDedESBv+o7uSNmCt4psxeP0Q=; b=ddoEyz6b6B345Wz1wgkI/Xh+IaDWk1KEv2knsRYjPIglqrhrCggcVXXSxDbopJibkwPlBN lPdxThOf4Ta2cOjdiR+u9rx/sn72IzW9LbwnWyFe9/S6tNJxOx+UW/Fez+GiO9iFCmGSdO QjXoFMIc2Z5FsKC/XLIAy1UIHP8ZYMtFcbUL7qFyKtgEJtyOKQX0LbDPMjzSCiQ8TqTlgz UoUYAmnc8jZMkczGAUTR1DUtHcsJzQ9M/ht5rvhmfbW5oxFdN+ehLOi1cXR1VOsm2oyv04 zJoMYTOYm8P2c1vnbHPbVxflvx7tpdKwnNpvK9hRjaBGL4ZXL/DlKoxuIOjV1Q== 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 4ZPYlz6HjFz113l; Fri, 28 Mar 2025 21:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52SLbpkb003567; Fri, 28 Mar 2025 21:37:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52SLbpw4003563; Fri, 28 Mar 2025 21:37:51 GMT (envelope-from git) Date: Fri, 28 Mar 2025 21:37:51 GMT Message-Id: <202503282137.52SLbpw4003563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 5fa093b6efcb - main - mount_nfs: make temporary DNS failure non-fatal with background mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fa093b6efcb7eb16a17d9830dbd4404bff5a565 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5fa093b6efcb7eb16a17d9830dbd4404bff5a565 commit 5fa093b6efcb7eb16a17d9830dbd4404bff5a565 Author: Gleb Smirnoff AuthorDate: 2025-03-28 21:31:54 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-28 21:36:40 +0000 mount_nfs: make temporary DNS failure non-fatal with background mode Typical problem with network mounts is remote equipment not being available when our host boots up after a power failure. Even if you properly configure boot order of all local services and wait for link coming up on your NIC, you still may boot faster than some intermediate switch on the network or the DNS server itself. Let's refer to this as a "server room boot race". For NFS mounts with hostname in hosts(5) the race is addressed by a retry loop on NFS mount timeout. However, a DNS resolution timeout is treated differently to NFS mount timeout. We fail on the former and keep retrying on the latter. With feedback received on current@, I see that the problem is so old, that people got used to it and see it as a desired behavior rather than a problem. And for those who is affected by the problem, they suggest hosts(5) as a solution. Note that using hosts(5) isn't scalable, and using bare IP addresses is neither scalable, nor compatible with Kerberized mounts. A trade-off solution would be to enable the retry cycle over DNS timeouts only when background mode is specified, which is a typical use in fstab(5) and very uncommon in a command line. That would address the server room boot race problem without breaking POLA for command line. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D49145 --- sbin/mount_nfs/mount_nfs.c | 59 ++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index 189bdd70b398..6ba51eeec588 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -587,6 +587,7 @@ getnfsargs(char **specp, char **hostpp, struct iovec **iov, int *iovlen) char *hostp, *delimp, *errstr, *spec; size_t len; static char nam[MNAMELEN + 1], pname[MAXHOSTNAMELEN + 5]; + bool resolved; spec = *specp; if (*spec == '[' && (delimp = strchr(spec + 1, ']')) != NULL && @@ -643,30 +644,7 @@ getnfsargs(char **specp, char **hostpp, struct iovec **iov, int *iovlen) else if (nfsproto == IPPROTO_UDP) hints.ai_socktype = SOCK_DGRAM; - if (getaddrinfo(hostp, portspec, &hints, &ai_nfs) != 0) { - hints.ai_flags = AI_CANONNAME; - if ((ecode = getaddrinfo(hostp, portspec, &hints, &ai_nfs)) - != 0) { - if (portspec == NULL) - errx(1, "%s: %s", hostp, gai_strerror(ecode)); - else - errx(1, "%s:%s: %s", hostp, portspec, - gai_strerror(ecode)); - return (0); - } - - /* - * For a Kerberized nfs mount where the "principal" - * argument has not been set, add it here. - */ - if (got_principal == 0 && secflavor != AUTH_SYS && - ai_nfs->ai_canonname != NULL) { - snprintf(pname, sizeof (pname), "nfs@%s", - ai_nfs->ai_canonname); - build_iovec(iov, iovlen, "principal", pname, - strlen(pname) + 1); - } - } + resolved = (getaddrinfo(hostp, portspec, &hints, &ai_nfs) == 0); if ((opflags & (BGRNDNOW | ISBGRND)) == BGRNDNOW) { warnx("Mount %s:%s, backgrounding", @@ -678,6 +656,37 @@ getnfsargs(char **specp, char **hostpp, struct iovec **iov, int *iovlen) ret = TRYRET_LOCALERR; for (;;) { + if (!resolved) { + hints.ai_flags = AI_CANONNAME; + if ((ecode = getaddrinfo(hostp, portspec, &hints, + &ai_nfs)) != 0) { + if (portspec == NULL) + warnx("%s: %s", hostp, + gai_strerror(ecode)); + else + warnx("%s:%s: %s", hostp, portspec, + gai_strerror(ecode)); + if (ecode == EAI_AGAIN && + (opflags & (BGRNDNOW | BGRND))) + goto retry; + else + exit(1); + } + resolved = true; + /* + * For a Kerberized nfs mount where the + * "principal" argument has not been set, add + * it here. + */ + if (got_principal == 0 && secflavor != AUTH_SYS && + ai_nfs->ai_canonname != NULL) { + snprintf(pname, sizeof (pname), "nfs@%s", + ai_nfs->ai_canonname); + build_iovec(iov, iovlen, "principal", pname, + strlen(pname) + 1); + } + } + /* * Try each entry returned by getaddrinfo(). Note the * occurrence of remote errors by setting `remoteerr'. @@ -705,7 +714,7 @@ getnfsargs(char **specp, char **hostpp, struct iovec **iov, int *iovlen) /* Exit if all errors were local. */ if (!remoteerr) exit(1); - +retry: /* * If retrycnt == 0, we are to keep retrying forever. * Otherwise decrement it, and exit if it hits zero. From nobody Sat Mar 29 00:09:10 2025 X-Original-To: dev-commits-src-all@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 4ZPd6Z3dgWz5rfNR; Sat, 29 Mar 2025 00:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPd6Z2LdSz3JFM; Sat, 29 Mar 2025 00:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743206950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFrTveogX+s/lJUHmmgn2v6UIe3kPWsU05LKMa6OZhU=; b=x4xuLL/7kI4yLYe6OzFWS5OKBJd0/8t+b3VDCtLgJyVKTHYQvXql0ajGmSTwknw7i0pdoA mVrxUVUknYvWPNmCMJjwWuo1pmkWR5lRDT4BWozQcdC0XvkMzaDdmpsemvJKHE1rZ1Xxwt S89X38nHhwII4EF47nGM1D6kGvGbZ9T20H2w+FnpvAkHlDvHWfemCXEsxN9e/fgLNOceNA 11FZYhb0OR+xfBKasKP14hRQMqC9HWE/THvkTV4KMwUo3hwYGOqHYkwQOugBUyCFnZLMVZ S4Du3tyaeSWBJUzxBXkiSoj26qfW8CSfiECVBOYRvGh4Q7PBcSDPdl3gbBX4+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743206950; a=rsa-sha256; cv=none; b=SMPKqKK9dtpPPDiqn2x+whBw0tVt311PeRtz825pQztwr2/uKaNlVamzySilbfllN70Rd6 zEb0Q0z3tYlyRuuuJjNDQU03lofWt2d+rmrO+sEKusXMJGlUFfYJ5fdhATf8mMK86LMZuo jKmRjBQ0v0t9Zn7QwDTCNK+8sq361adSKUI1EW0X5NfFiHZXic9ndjx874sgNIxor8J3ER 6ufovWN0CYdM7IJl+8uXcMtCz6LCWVItYkW7iQyS+fhRZgvD5a6Suu1p/jbb6ZzQ3hFM3l MlhpfMO1iAv2VjIfGT8QvPkpr4LFl66AyvomNxIAdHfjfWJ+wfXHJLmniP7UPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743206950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFrTveogX+s/lJUHmmgn2v6UIe3kPWsU05LKMa6OZhU=; b=R6zw0iuuUR8JoezA8SBuP0b0luSEHEDX8GKGCKZNb4d83tvpDEyXbaGdpewUTGIOCC6trQ mG1EsKcyMg0tkkBofDhMvcqUbXzxr5/esFw00UHqePynpksPUNX2hs/be5lGEelxbQ0xL9 UCeDf/ND7BFw8150ZFbogUq93hQ03B7suGrj5uUy4elrn5AQQdD4whXgcaxzBssAHsiFOS fBSWO76J0Pnt+i0GIyaIAfZNfr2oacDtQr0XocAQ1vdjpAEVzTegiFkHtphyL3n9htYiNn flIrjBOKFu4n9sH9yWiTO6i4zLPD34zOtNAwyZZn0wIAM2l3IB4YV8ftRybzww== 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 4ZPd6Z1cbqz14ky; Sat, 29 Mar 2025 00:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52T09AeG084572; Sat, 29 Mar 2025 00:09:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T09ALw084569; Sat, 29 Mar 2025 00:09:10 GMT (envelope-from git) Date: Sat, 29 Mar 2025 00:09:10 GMT Message-Id: <202503290009.52T09ALw084569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 1580f8d9c174 - main - ixgbe: fix mailbox ack handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1580f8d9c1740e0c54554e6c185573d34f2dcf76 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1580f8d9c1740e0c54554e6c185573d34f2dcf76 commit 1580f8d9c1740e0c54554e6c185573d34f2dcf76 Author: Norbert Ciosek AuthorDate: 2025-03-29 00:02:37 +0000 Commit: Kevin Bowling CommitDate: 2025-03-29 00:02:37 +0000 ixgbe: fix mailbox ack handling Check if CTS bit is set in the mailbox message before waiting for ACK. Otherwise ACK will never be received causing the function to timeout. Add a note for ixgbe_write_mbx that it should be called while holding a lock. Fixes: 6d243d2 ("net/ixgbe/base: introduce new mailbox API") Cc: stable@dpdk.org Signed-off-by: Norbert Ciosek Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson Obtained from: DPDK (1f119e4) MFC after: 1 week --- sys/dev/ixgbe/ixgbe_mbx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index 0b866e7a39af..7f58a9202c9e 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -112,6 +112,9 @@ s32 ixgbe_poll_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) * * returns SUCCESS if it successfully copied message into the buffer and * received an ACK to that message within specified period + * + * Note that the caller to this function must lock before calling, since + * multiple threads can destroy each other messages. **/ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { @@ -866,6 +869,11 @@ static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_id) while (countdown--) { /* Reserve mailbox for PF use */ pf_mailbox = IXGBE_READ_REG(hw, IXGBE_PFMAILBOX(vf_id)); + + /* Check if other thread holds the PF lock already */ + if (pf_mailbox & IXGBE_PFMAILBOX_PFU) + goto retry; + pf_mailbox |= IXGBE_PFMAILBOX_PFU; IXGBE_WRITE_REG(hw, IXGBE_PFMAILBOX(vf_id), pf_mailbox); @@ -876,6 +884,7 @@ static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_id) break; } + retry: /* Wait a bit before trying again */ usec_delay(mbx->usec_delay); } @@ -978,13 +987,14 @@ static s32 ixgbe_write_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size, for (i = 0; i < size; i++) IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_id), i, msg[i]); - /* Interrupt VF to tell it a message has been sent */ + /* interrupt VF to tell it a message has been sent */ pf_mailbox = IXGBE_READ_REG(hw, IXGBE_PFMAILBOX(vf_id)); pf_mailbox |= IXGBE_PFMAILBOX_STS; IXGBE_WRITE_REG(hw, IXGBE_PFMAILBOX(vf_id), pf_mailbox); /* if msg sent wait until we receive an ack */ - ixgbe_poll_for_ack(hw, vf_id); + if (msg[0] & IXGBE_VT_MSGTYPE_CTS) + ixgbe_poll_for_ack(hw, vf_id); /* update stats */ hw->mbx.stats.msgs_tx++; From nobody Sat Mar 29 00:19:43 2025 X-Original-To: dev-commits-src-all@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 4ZPdLm1MKwz5rgCB; Sat, 29 Mar 2025 00:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPdLl6whlz3NwW; Sat, 29 Mar 2025 00:19:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743207584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p35JA4UxoTw6JMqFuUnlw1g/oWkgNKEuf13DIWs5gKw=; b=DdnhOrnZHrL/JUa9R30YxfAYyZsXzi2VPLyzsVSHKCyhBLK2DQDkIPkx91M+bUuOHcfStC 87CMub2jyyOj7RjgZpsxfZFvvL6EXqFOhOHy5jA8idXoRgMszjD8NNYZ1kmA1lIDH4TkEc Z5FJCP8EvGMHMHAhqy+C5v4SLelehdLQQvCgXnsGyUFFm71jZCfEEyuYHkv/5szbfAJZ1e p9MXZRfdDmbWzQWU286A0KyAxv1Ovr5yfmkBmLyp0DHPnnf817T+TPXzfuYmsYxxS8b9lo Y1KAuIc+3ze6k88crnWSlRHkbXEIIHstU6E448OrC0VaXekjGmsx2PB7lja0BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743207584; a=rsa-sha256; cv=none; b=vDFRvw2D4RhJlEQxdT4UGb6XE6uD/WBU+2qJwjyEBxu5381efbwaMlh+SWLpLtI9vYTgmq 3VEMqbwDtoYHWHlwxM1IjIDME0v0oMoP0RB46tlUCbS9oSHkH2VaKur8DZ/0uND2ywCojc skcgpVR2QkezD7o2Z61G/gbyOw9nedssFyxRoIVAYi4u3zmjAWtWpw1GIUniU0JONqWKQF QYngC5JEKbaJb7kXzRA1gf4bykhUXepRugnzmv3hdVKIzzIrQZxHlX/tGT1F43a9FGVkxo /fNot81iptsYdGOQ6i70tXj6vkKEHUK08Tr+PVxwXz13un3wCKgNv6C0REoNHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743207584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p35JA4UxoTw6JMqFuUnlw1g/oWkgNKEuf13DIWs5gKw=; b=Ir75hOOuEKM92yjoKm9h7IQuJjhRKowOFAdAzb7dBMMeoKqjSpZ0EMEEevYmVngx9to4a8 kNt1ZG6di5E7hGPZOuLoDk9+2ofwT02TH685f9KjafV493j2wJbTf65mK2mTbJUDsOKT82 gpc63PX0H/yDAgTRgyHQXZPkuPHEBRf/610NZMOdsdzRV8MbP1otpymKeKrv3jjrQHdZPo 6xrFGKnvK24P0Ta3cVXwimx/W5XXVELXO5/oW6Ehid1lBO8pHbCK6oyyrfCe0oMkbSv+lr pLhNILbsH8PbQVh9aYHUGUW17AcXRm2lsN9A+hi1MOaxyIeW3YBh5jf5DK9QCw== 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 4ZPdLl66Fwz14lZ; Sat, 29 Mar 2025 00:19: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 52T0JhWp003014; Sat, 29 Mar 2025 00:19:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T0JhHj003011; Sat, 29 Mar 2025 00:19:43 GMT (envelope-from git) Date: Sat, 29 Mar 2025 00:19:43 GMT Message-Id: <202503290019.52T0JhHj003011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 7a4907250452 - main - powerpc/trap: Change prediction of NOFAULTING in trap_pfault() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a4907250452de0818dcd4c084a138b03f153f55 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=7a4907250452de0818dcd4c084a138b03f153f55 commit 7a4907250452de0818dcd4c084a138b03f153f55 Author: Justin Hibbits AuthorDate: 2025-03-29 00:03:39 +0000 Commit: Justin Hibbits CommitDate: 2025-03-29 00:19:33 +0000 powerpc/trap: Change prediction of NOFAULTING in trap_pfault() This was probably intended to match the amd64 check, but that tests NOFAULTING against non-zero, while this checks against 0. We're most likely to end up in this function when faulting is allowed, so predict_true is the better option. --- sys/powerpc/powerpc/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index d919b7715664..203d270a504b 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -794,7 +794,7 @@ trap_pfault(struct trapframe *frame, bool user, int *signo, int *ucode) return (true); #endif - if (__predict_false((td->td_pflags & TDP_NOFAULTING) == 0)) { + if (__predict_true((td->td_pflags & TDP_NOFAULTING) == 0)) { /* * If we get a page fault while in a critical section, then * it is most likely a fatal kernel page fault. The kernel From nobody Sat Mar 29 00:43:41 2025 X-Original-To: dev-commits-src-all@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 4ZPdtQ1k5vz5rhyc; Sat, 29 Mar 2025 00:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPdtQ0dPBz3jgB; Sat, 29 Mar 2025 00:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743209022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mtwyj061Xo5fvcgB0gJ98sLPyQWglpvz+VN2x73EeWw=; b=pm4rK3qwDtn3RHwzSBh4JBAW1GUQG8twWjcDnUF+sYMUgwUOsSizup3+k733W5qvhSsI5m vNMxA+PzD1vYOOXnZNEa+cajaTu/VmexDeZ6fLQIkqoe5mvOUaJZ0IflPkaIbLfHpJJYaN xQPydB8LpWQV7TnZt6hLD03ZDWdGH2NWo1Si/eDnMf0kvSQ0a062Xvp21eFN6t7yDdcs0L TJgboXg3VmmyVC0TjmW6lO+pPlQZejlQ+5zAeexFVr9eHhK8BRe9z30Yp1ELckIVbvjqFZ nkN53IbYEWZXjN5sUL5epBJNWWPBIeX7ZtuLxC/ii8zJwkgZ/Wbw3SrI6dUA0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743209022; a=rsa-sha256; cv=none; b=pHkfs82J+NjGNqgwSBKcBkDEae4F3du7AajuHveiNQh2L6GIRAzCJlxE+lRBA+ZwEKO9eS YwgRfBpy0ZKipeVRNLMcf+aSG+7y6tRjoaol5PYzPHhm1+Nqnw3XNFz3f2/cFN1j65nY42 Ii0EvNBuB4ffOqJ3qKQgtE9gRH7GbJUOx32bRr3DMTZbpNv3W40nTkq6Cm/m8sN+XG9+Gr ESnjPHusjYeW76rbQcqLn6+mKF08NKab+aRM7CYGcIzEhYxbm7dfy9W7jPvlpQ3AnbmZJ6 OmBqP+hXrQD+EN7c9fytKitJqzdHVsRh/uunh8P/hBjJySdzIICvxQBQ9kqgAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743209022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mtwyj061Xo5fvcgB0gJ98sLPyQWglpvz+VN2x73EeWw=; b=fLCQgQk4ilW9Nqp4/tFgrZPqXr5Z4gRPK3qhP0xQhjB0ILJ2Djg9m6csTAom+4SAGS0XOp egF7+l/L7H4iBL4N5AibFFiNj628Cyz7vyZUlXWWpE8RSt4klxCWgESaJzl1YHZ+4oJTn3 dngVlzA27Q+USCAMYVFlU3Cwdn8KTCHQ2UhytQ8QRRnD5beOkvUkx5UzfuJLwBLvxV3PSW GQMevudhqsWrjmHGB8fTqigfdGRNBkPikoMzx8CEURDuVGUk6Hz/huUBBgtp50tsuE+cE0 YX9GT9DiunI7Dd3oFLXJZUOBuLT1Nu4BrI0JZ9pxVla0gOgO86cEpSpnaZUNYQ== 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 4ZPdtQ07kcz15bB; Sat, 29 Mar 2025 00:43: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 52T0hfH8057703; Sat, 29 Mar 2025 00:43:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T0hfne057700; Sat, 29 Mar 2025 00:43:41 GMT (envelope-from git) Date: Sat, 29 Mar 2025 00:43:41 GMT Message-Id: <202503290043.52T0hfne057700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: ae15f8ceaa85 - stable/14 - Get consistent updates for UFS superblocks. Formatting and style cleanups. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ae15f8ceaa85e6e02e056aa151d965d82e1f200e Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=ae15f8ceaa85e6e02e056aa151d965d82e1f200e commit ae15f8ceaa85e6e02e056aa151d965d82e1f200e Author: Kirk McKusick AuthorDate: 2025-03-19 23:32:39 +0000 Commit: Kirk McKusick CommitDate: 2025-03-29 00:41:04 +0000 Get consistent updates for UFS superblocks. Formatting and style cleanups. Differential Revision: https://reviews.freebsd.org/D49276 Sponsored-by: Netflix (cherry picked from commit c2cd605e8c8a15e545dfd3e50aef2f660d460b30) (cherry picked from commit 16649530b7be02a61a32b34d56e6e937734cd247) --- sys/ufs/ffs/ffs_subr.c | 112 +++++++++++++++++++++++++++++------------------ sys/ufs/ffs/ffs_vfsops.c | 42 +++++++----------- 2 files changed, 86 insertions(+), 68 deletions(-) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index c0221c8ee2da..7a010da870db 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -343,31 +343,36 @@ ffs_oldfscompat_read(struct fs *fs, ufs2_daddr_t sblockloc) fs->fs_old_flags |= FS_FLAGS_UPDATED; fs->fs_sblockloc = sblockloc; } - /* - * If not yet done, update UFS1 superblock with new wider fields. - */ - if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_maxbsize != fs->fs_bsize) { - fs->fs_maxbsize = fs->fs_bsize; - fs->fs_time = fs->fs_old_time; - fs->fs_size = fs->fs_old_size; - fs->fs_dsize = fs->fs_old_dsize; - fs->fs_csaddr = fs->fs_old_csaddr; - fs->fs_cstotal.cs_ndir = fs->fs_old_cstotal.cs_ndir; - fs->fs_cstotal.cs_nbfree = fs->fs_old_cstotal.cs_nbfree; - fs->fs_cstotal.cs_nifree = fs->fs_old_cstotal.cs_nifree; - fs->fs_cstotal.cs_nffree = fs->fs_old_cstotal.cs_nffree; - } - if (fs->fs_magic == FS_UFS1_MAGIC && - fs->fs_old_inodefmt < FS_44INODEFMT) { - fs->fs_maxfilesize = ((uint64_t)1 << 31) - 1; - fs->fs_qbmask = ~fs->fs_bmask; - fs->fs_qfmask = ~fs->fs_fmask; - } - if (fs->fs_magic == FS_UFS1_MAGIC) { + switch (fs->fs_magic) { + case FS_UFS2_MAGIC: + /* No changes for now */ + break; + + case FS_UFS1_MAGIC: + /* + * If not yet done, update UFS1 superblock with new wider fields + */ + if (fs->fs_maxbsize != fs->fs_bsize) { + fs->fs_maxbsize = fs->fs_bsize; + fs->fs_time = fs->fs_old_time; + fs->fs_size = fs->fs_old_size; + fs->fs_dsize = fs->fs_old_dsize; + fs->fs_csaddr = fs->fs_old_csaddr; + fs->fs_cstotal.cs_ndir = fs->fs_old_cstotal.cs_ndir; + fs->fs_cstotal.cs_nbfree = fs->fs_old_cstotal.cs_nbfree; + fs->fs_cstotal.cs_nifree = fs->fs_old_cstotal.cs_nifree; + fs->fs_cstotal.cs_nffree = fs->fs_old_cstotal.cs_nffree; + } + if (fs->fs_old_inodefmt < FS_44INODEFMT) { + fs->fs_maxfilesize = ((uint64_t)1 << 31) - 1; + fs->fs_qbmask = ~fs->fs_bmask; + fs->fs_qfmask = ~fs->fs_fmask; + } fs->fs_save_maxfilesize = fs->fs_maxfilesize; maxfilesize = (uint64_t)0x80000000 * fs->fs_bsize - 1; if (fs->fs_maxfilesize > maxfilesize) fs->fs_maxfilesize = maxfilesize; + break; } /* Compatibility for old filesystems */ if (fs->fs_avgfilesize <= 0) @@ -387,16 +392,35 @@ void ffs_oldfscompat_write(struct fs *fs) { - /* - * Copy back UFS2 updated fields that UFS1 inspects. - */ - if (fs->fs_magic == FS_UFS1_MAGIC) { + switch (fs->fs_magic) { + case FS_UFS1_MAGIC: + if (fs->fs_sblockloc != SBLOCK_UFS1 && + (fs->fs_old_flags & FS_FLAGS_UPDATED) == 0) { + printf( + "WARNING: %s: correcting fs_sblockloc from %jd to %d\n", + fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS1); + fs->fs_sblockloc = SBLOCK_UFS1; + } + /* + * Copy back UFS2 updated fields that UFS1 inspects. + */ fs->fs_old_time = fs->fs_time; fs->fs_old_cstotal.cs_ndir = fs->fs_cstotal.cs_ndir; fs->fs_old_cstotal.cs_nbfree = fs->fs_cstotal.cs_nbfree; fs->fs_old_cstotal.cs_nifree = fs->fs_cstotal.cs_nifree; fs->fs_old_cstotal.cs_nffree = fs->fs_cstotal.cs_nffree; - fs->fs_maxfilesize = fs->fs_save_maxfilesize; + if (fs->fs_save_maxfilesize != 0) + fs->fs_maxfilesize = fs->fs_save_maxfilesize; + break; + case FS_UFS2_MAGIC: + if (fs->fs_sblockloc != SBLOCK_UFS2 && + (fs->fs_old_flags & FS_FLAGS_UPDATED) == 0) { + printf( + "WARNING: %s: correcting fs_sblockloc from %jd to %d\n", + fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS2); + fs->fs_sblockloc = SBLOCK_UFS2; + } + break; } } @@ -410,9 +434,8 @@ static int prttimechgs = 0; #ifdef _KERNEL SYSCTL_NODE(_vfs, OID_AUTO, ffs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "FFS filesystem"); - SYSCTL_INT(_vfs_ffs, OID_AUTO, prttimechgs, CTLFLAG_RWTUN, &prttimechgs, 0, - "print UFS1 time changes made to inodes"); + "print UFS1 time changes made to inodes"); #endif /* _KERNEL */ bool ffs_oldfscompat_inode_read(struct fs *fs, union dinodep dp, time_t now) @@ -934,6 +957,7 @@ int ffs_sbput(void *devfd, struct fs *fs, off_t loc, int (*writefunc)(void *devfd, off_t loc, void *buf, int size)) { + struct fs_summary_info *fs_si; int i, error, blks, size; uint8_t *space; @@ -956,23 +980,27 @@ ffs_sbput(void *devfd, struct fs *fs, off_t loc, } } fs->fs_fmod = 0; -#ifndef _KERNEL - { - struct fs_summary_info *fs_si; - - fs->fs_time = time(NULL); - /* Clear the pointers for the duration of writing. */ - fs_si = fs->fs_si; - fs->fs_si = NULL; - fs->fs_ckhash = ffs_calc_sbhash(fs); - error = (*writefunc)(devfd, loc, fs, fs->fs_sbsize); - fs->fs_si = fs_si; - } -#else /* _KERNEL */ + ffs_oldfscompat_write(fs); +#ifdef _KERNEL fs->fs_time = time_second; +#else /* User Code */ + fs->fs_time = time(NULL); +#endif + /* Clear the pointers for the duration of writing. */ + fs_si = fs->fs_si; + fs->fs_si = NULL; fs->fs_ckhash = ffs_calc_sbhash(fs); error = (*writefunc)(devfd, loc, fs, fs->fs_sbsize); -#endif /* _KERNEL */ + /* + * A negative error code is returned when a copy of the + * superblock has been made which is discarded when the I/O + * is done. So the fs_si field does not and indeed cannot be + * restored after the write is done. Convert the error code + * back to its usual positive value when returning it. + */ + if (error < 0) + return (-error - 1); + fs->fs_si = fs_si; return (error); } diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index eadd5815eaf7..b387fda14588 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -2034,9 +2034,15 @@ ffs_sbupdate(struct ufsmount *ump, int waitfor, int suspended) panic("ffs_sbupdate: write read-only filesystem"); /* * We use the superblock's buf to serialize calls to ffs_sbupdate(). + * Copy superblock to this buffer and have it written out. */ sbbp = getblk(ump->um_devvp, btodb(fs->fs_sblockloc), (int)fs->fs_sbsize, 0, 0, 0); + UFS_LOCK(ump); + fs->fs_fmod = 0; + bcopy((caddr_t)fs, sbbp->b_data, (uint64_t)fs->fs_sbsize); + UFS_UNLOCK(ump); + fs = (struct fs *)sbbp->b_data; /* * Initialize info needed for write function. */ @@ -2062,7 +2068,8 @@ ffs_use_bwrite(void *devfd, off_t loc, void *buf, int size) devfdp = devfd; ump = devfdp->ump; - fs = ump->um_fs; + bp = devfdp->sbbp; + fs = (struct fs *)bp->b_data; /* * Writing the superblock summary information. */ @@ -2079,44 +2086,27 @@ ffs_use_bwrite(void *devfd, off_t loc, void *buf, int size) } /* * Writing the superblock itself. We need to do special checks for it. + * A negative error code is returned to indicate that a copy of the + * superblock has been made and that the copy is discarded when the + * I/O is done. So the the caller should not attempt to restore the + * fs_si field after the write is done. The caller will convert the + * error code back to its usual positive value when returning it. */ - bp = devfdp->sbbp; if (ffs_fsfail_cleanup(ump, devfdp->error)) devfdp->error = 0; if (devfdp->error != 0) { brelse(bp); - return (devfdp->error); - } - if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_sblockloc != SBLOCK_UFS1 && - (fs->fs_old_flags & FS_FLAGS_UPDATED) == 0) { - printf("WARNING: %s: correcting fs_sblockloc from %jd to %d\n", - fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS1); - fs->fs_sblockloc = SBLOCK_UFS1; - } - if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_sblockloc != SBLOCK_UFS2 && - (fs->fs_old_flags & FS_FLAGS_UPDATED) == 0) { - printf("WARNING: %s: correcting fs_sblockloc from %jd to %d\n", - fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS2); - fs->fs_sblockloc = SBLOCK_UFS2; + return (-devfdp->error - 1); } if (MOUNTEDSOFTDEP(ump->um_mountp)) - softdep_setup_sbupdate(ump, (struct fs *)bp->b_data, bp); - UFS_LOCK(ump); - bcopy((caddr_t)fs, bp->b_data, (uint64_t)fs->fs_sbsize); - UFS_UNLOCK(ump); - fs = (struct fs *)bp->b_data; - fs->fs_fmod = 0; - ffs_oldfscompat_write(fs); - fs->fs_si = NULL; - /* Recalculate the superblock hash */ - fs->fs_ckhash = ffs_calc_sbhash(fs); + softdep_setup_sbupdate(ump, fs, bp); if (devfdp->suspended) bp->b_flags |= B_VALIDSUSPWRT; if (devfdp->waitfor != MNT_WAIT) bawrite(bp); else if ((error = bwrite(bp)) != 0) devfdp->error = error; - return (devfdp->error); + return (-devfdp->error - 1); } static int From nobody Sat Mar 29 01:33:48 2025 X-Original-To: dev-commits-src-all@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 4ZPg0D6h9tz5rmMd; Sat, 29 Mar 2025 01:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPg0D3jZQz3CXV; Sat, 29 Mar 2025 01:33:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vVJBWvmPWRrkXJupuu178nebG/fSK2r3vhTFwvomLeY=; b=rUTCCFV6PyehZL/VvkJ76rbc3kXCkPki+kvLYDDbMrJ5KbCiE4838yMJp0qiLdF+ktk0hU GuNNs1QHBjwJtnVgTeyKMe6icWaavNnWkffoI+dN3P4AJbefHGhqQZmqU8zHDtRtQfDUS6 is/Cq3Hg4o/DyYNZJQS2JrS92Ww514arOSSj3wGFDPgoiiUObBB03af8T+qRqp5mUZEnmo Gdd/6xZTQYiEZbk+1SE+63lI/HjAslyvciSjdCYZOQAhceSCMgjhM2ro2m+9SIwVwT6s/o E3xHWiR04aTJv2kXIYf7JGFNa5kqTO80aKflGX0B373cIcXz09rD+uy/j2FGzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743212028; a=rsa-sha256; cv=none; b=jGDKqLPRHAV1XjRfxTqN8qejD+FCgD7wrLwoteg71wu1D1t8y6K/98krvrm17tfvE13tAo ws0QEe7bLEzGy3bApu1GPfU2gdTvuveIwb0JX09OxIy4UMuQYYlPddUARpl+LNstLhgg4r kD3QwVp96ihmA4bjIOqTvhQnfIAFDbmtGaRVE9wbxRKvHyCX2NO5yYufGwAMggBAkN+3aa nCpJKLNVvWX6GmPaQq8I/fq0xPW911AaSdyVftxQokXNW9Uc0WveruzZd0IdRQOKuRW4KU TDcX2s0O2JOmmGEejJcA0sIcBJ1ueuQ+jA1oFPi7jITtaA5y0O5yhFqK2X2WXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vVJBWvmPWRrkXJupuu178nebG/fSK2r3vhTFwvomLeY=; b=xvYoirA2jLQCwRzm652L7lKF/cTP9Vsuo6TBMchfsWTEkM1ZX4T7MMBjx30zHIGL2zNMYJ pNZ7TowK/SkCSPQkRHU4GLImI3XySKoilodMpAuJNoAMFtH5VXYxyO6mw6mL/DETB4QDaF k0IyWWlLO01iGVQSh/FuNlMPMqhl6g7pMct2ahoyGI/nBCUQK1DtqMk0QJ8GUuCXNf2dKK RgyF1+kS9y3xkzjLt+ceyGziIjr+4hTTCcYGYhSK6qIUwELrSApbljas3Ts/Fp6R9zQf+3 VV6U6LkPnn2+x86m6S7ZoGxviTWM8P7Bak/gbBeWdygEfg7jc3gGd/adzX0Imw== 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 4ZPg0D3JSDz16yb; Sat, 29 Mar 2025 01:33: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 52T1XmAt052463; Sat, 29 Mar 2025 01:33:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T1XmN3052460; Sat, 29 Mar 2025 01:33:48 GMT (envelope-from git) Date: Sat, 29 Mar 2025 01:33:48 GMT Message-Id: <202503290133.52T1XmN3052460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: bb28ea49ad3a - stable/14 - intro.5: Import description table from OpenBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bb28ea49ad3a818371ecbde49556ca8f1260e81f Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=bb28ea49ad3a818371ecbde49556ca8f1260e81f commit bb28ea49ad3a818371ecbde49556ca8f1260e81f Author: Alexander Ziaee AuthorDate: 2024-11-17 17:10:56 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-29 01:32:10 +0000 intro.5: Import description table from OpenBSD Looking around at how everyone else is doing it, this list seems nearly perfect to me and we should just import it from them. I have added "and streams" because we have some explanations of those in this section too. PR: 248562 MFC after: 3 days Obtained from: OpenBSD Approved by: mhorne (mentor) Reviewed by: imp, mhorne, Lexi Winter Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 (cherry picked from commit 26ec376536622e8fec8f40847aa9b2d1121d585d) --- share/man/man5/intro.5 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 1c746f37a399..60328a4bed06 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -35,7 +35,16 @@ .Nm intro .Nd introduction to file formats .Sh DESCRIPTION -This section contains information about file formats. +This section contains information about file formats, including: +.Pp +.Bl -bullet -compact +.It +ASCII configuration and resource files +.It +System binary file and stream structures +.It +Composition of database files +.El .Sh FILES .Bl -tag -width "/usr/local/etc/" -compact .It Pa /etc/ From nobody Sat Mar 29 01:33:47 2025 X-Original-To: dev-commits-src-all@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 4ZPg0C6DPLz5rmMZ; Sat, 29 Mar 2025 01:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPg0C2mGpz3Cky; Sat, 29 Mar 2025 01:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vx8drtuCLNAIsE8Xw2ANNgcxMKvY9iGi5HoNTcKHF9o=; b=qgb4h8zrpe5BrjkaI+hcPgCb6GNNdorPy6VDKcQOAUmzAh/bx7+mPs8F1IHEbAofSBYO6v 000Du1dlBCXkthc8XUGDv9RQfWGFyXHK+giQ0ZoRfHYUihvn2nRrC4ccGdceTXLjGvlfgE u//5WL78s7s7wCwctNtN+IBRzkQyl7yv/hymljoIZtqoLlCT7ZZRC6+e6c8huQiSTOkC5f RhiL+rtHceZZW4Fgbli/hpsVtXiPOmC5JZpnnwZbxVPT9s5MVJn8HMXaOcr+S/AgIt0eCn jd6Ua8ZIz8LjtkZJARb6JBs2BDl6O/bkmcn76in2A3sCzBoK74VF9swW0jSsLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743212027; a=rsa-sha256; cv=none; b=JQGUk8yEDIU3iXp7H9FzQNo2SxALts336etaWjDAghtm8XX0K6/c1vghq7kUSJP0zmZJ7/ JpETnRitD3s88doRGVrPLVmfdnaAGJQBqFZH0sgkAzgHU6UO9v1+6VggusKOwmjFtz8TwX HS+yQMVaQpj3bRqqVqGumMQigeYOMDST4qyxywDgVhlFtvB0ozhZZeo+eTY9a7NuzCi1To gucK766Ag2uVVTcKT5hYbCgMHsAAsm2vr72lNNjfVF0L4Jjhz6J0dP3vADd7cj2k6AQ5Vb wLuWTdqE/i0dVT1khWv0HYjk0DHpEJt9Vqjj3EZfo1pKH1BdUNElHvI3PqGKpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vx8drtuCLNAIsE8Xw2ANNgcxMKvY9iGi5HoNTcKHF9o=; b=tcIzw0JeHo6Q0/gv+A5bSxReo3Pkb6uiHIXXOJ+0b/hmyY5OL0VTYSXlIFt5I/9wOqf6lg OzD9pc1bincQFSiBhJC176zPoow6B/4ZBXZW1h/5C4hptMQL+nepw01DtAiFmgDveb4Qj0 1kJb3eq9W/wG+7u/h/CcLcFdpJTJM3vz9+H14La2ETSvQOoKEWXrgvO80Ul6kEDLUJGR/U nvBvBstIJztoLSForP6aa1UO2E/TUS6cdvZdzTPZQXzymUEgXTaIZuuUBaUFpgja2GOXwj PjtxauufWSQhXEupmQYXXFdwp5+hPkd/dYFWhfBo3h5CLfILBzgVpOPMIOmY6A== 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 4ZPg0C2Mdtz16t3; Sat, 29 Mar 2025 01:33: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 52T1XlCC052426; Sat, 29 Mar 2025 01:33:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T1XlZ1052423; Sat, 29 Mar 2025 01:33:47 GMT (envelope-from git) Date: Sat, 29 Mar 2025 01:33:47 GMT Message-Id: <202503290133.52T1XlZ1052423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 342fa740cbc6 - stable/14 - intro.5: Add local to files, minor maintenence List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 342fa740cbc653909e7bc4197453b0da74d2f2ba Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=342fa740cbc653909e7bc4197453b0da74d2f2ba commit 342fa740cbc653909e7bc4197453b0da74d2f2ba Author: Alexander Ziaee AuthorDate: 2024-11-17 17:07:34 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-29 01:31:48 +0000 intro.5: Add local to files, minor maintenence New users are sometimes confused about the difference between /etc/ and /usr/local/etc. Explain this in the manual as we did in intro(1). Link hier(7) which now lists base system configuration files in /etc/. Add a section number to HISTORY for clarity. PR: 248562 MFC after: 3 days Approved by: mhorne (mentor) Reviewed by: imp, mhorne, Lexi Winter Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 (cherry picked from commit 8d65152cbfc8861f6920846dea6f540c673ab7b6) --- share/man/man5/intro.5 | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 78e147975e81..1c746f37a399 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,25 +28,28 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 16, 1997 +.Dd November 17, 2024 .Dt INTRO 5 .Os .Sh NAME .Nm intro -.Nd "introduction to file formats" +.Nd introduction to file formats .Sh DESCRIPTION This section contains information about file formats. .Sh FILES -.Bl -tag -width /etc/shells -compact -.It Pa /etc -location of most system configuration files +.Bl -tag -width "/usr/local/etc/" -compact +.It Pa /etc/ +base system software configuration files +.It Pa /usr/local/etc/ +locally installed software configuration files .El .Sh SEE ALSO .Xr apropos 1 , .Xr intro 1 , +.Xr hier 7 , .Xr intro 8 .Sh HISTORY The -.Nm -section manual page appeared in +.Nm Ns Pq 5 +manual page first appeared in .Fx 2.2 . From nobody Sat Mar 29 01:33:50 2025 X-Original-To: dev-commits-src-all@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 4ZPg0H5yxtz5rmMf; Sat, 29 Mar 2025 01:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPg0G5TbSz3CTv; Sat, 29 Mar 2025 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VmQF9dCbijPj/99gtT+M9suz9/Rtz23tyrgdCt+C3QU=; b=wTMOygomrs0WCaQOJPGDafFfbFRGrQ9Hs0kFkKWvXyv2zC9UFAvXNpou8KSjwl5CrgQI/s bEQDbjxdaB/wHOVN170p+fDiZtAiJepH943TMeZfNwiQNBbAvThZ50b5mWYsb/YOU7thY+ OZ+OWN8QMmvj4/vHI3T/YXIHkcGyMfweS2L0thh08fSlj8XpjXLxeB0mNCAJF9hwW9SA/3 KpRidrMkH6H+EYjYZpZsBOBgAM1cG3Pzxp/0u/8+Wj4pB0xMDBqig7BWo3stvic6S3PIQH ThrzcltXViQJ6GgBm19OAU/+hPZ79NRA2FMmM5LC7SZzMGWpxstj2lVjFIBAxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743212030; a=rsa-sha256; cv=none; b=Emje6wNNubaEHkVll1YaLSrGaKwdUpmVe+HwypI9nARWQymVRT+kZb2g2IQ/ueviSGN0OV ENXzTMtZnAfpF/dYpr+e1prayhTCul5OCr4BRHdIZWIMmOiwoT7Kvf8YoUXIrpqKycN0JZ U3gtykFfg5747W4EudTnaseYcKMNgC09TL3zOvMyirmNoJ3g41eFwXKTvEtiYGHABn4VIA 1S1mm5yuhdEnq9C+jxpuXUp7+eIFlyvrJl7HHbqlEehVw/41WMDNDavRlQgXxHtuo5ZnGp 753ZAKY3kl5yJyyiXcSR6R0o3y53ZiDuCxRUpJrnAScpi5TAECvYGBDporGIwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VmQF9dCbijPj/99gtT+M9suz9/Rtz23tyrgdCt+C3QU=; b=GBs7nKjLkwA9/R2GWFB6fhmwTwWFC0QsKXYoM8kNmSeuvXxsSMTCW82V2qIvnJackTr8zu iOr0h1L658W7jr5TaOYds0Akks0upLvZ5PaeU7zanhtIqsqICK53kIGOegOHkoUk2HHCF5 eRmvAXQUPg1nWraMnW1NIjK9UWgb6hnVVaYS9q0YCJS9rkt71JyIv8/Jt9Lq0up3/7Yszn IUgMJVme3hTFPwkbTh5iCeKI+2zgH9cq4jKaGlWha9BfGCJ2FQcFOFTlcU0SdjxmHh5Wxf ARzjSp5QfjOusqfM6huxssjLDe/D/z8Xpe7AcmX4AqskubJ33o17jsmBg6uVXA== 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 4ZPg0G4pSJz16h2; Sat, 29 Mar 2025 01:33: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 52T1Xo9w052538; Sat, 29 Mar 2025 01:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T1Xo1i052535; Sat, 29 Mar 2025 01:33:50 GMT (envelope-from git) Date: Sat, 29 Mar 2025 01:33:50 GMT Message-Id: <202503290133.52T1Xo1i052535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 3cdf03dbfeff - stable/14 - intro.5: Crossreference ascii(7) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3cdf03dbfeffafb666ba25b13339a0ee7432d445 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=3cdf03dbfeffafb666ba25b13339a0ee7432d445 commit 3cdf03dbfeffafb666ba25b13339a0ee7432d445 Author: Alexander Ziaee AuthorDate: 2025-03-23 18:41:09 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-29 01:32:41 +0000 intro.5: Crossreference ascii(7) Since the beginning, Unix has included an ASCII chart. Over the last half a century to this day, the most common format for lexographical organization in files is according to ASCII. Consistency is maintainable and for that reason, crossreference ascii(7) promenently in the introduction to the File Formats Manual. Additionally, this demonstrates the often softer style of bullet lists in the manual tradition. PR: 248562 MFC after: 3 days Reviewed by: mhorne Approved by: mhorne (mentor) Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 (cherry picked from commit a6175f28da7018ba9f824f48fe6db732bd9cb501) --- share/man/man5/intro.5 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 525d6801aaad..3e67b319da14 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -42,11 +42,12 @@ environment, including: .Pp .Bl -bullet -compact .It -ASCII configuration and resource files +.Xr ascii 7 +configuration and resource files .It -System binary file and stream structures +system binary file and stream structures .It -Composition of database files +composition of database files .El .Sh FILES .Bl -tag -width "/usr/local/etc/" -compact From nobody Sat Mar 29 01:33:49 2025 X-Original-To: dev-commits-src-all@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 4ZPg0F5mq7z5rmq7; Sat, 29 Mar 2025 01:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPg0F4N8zz3CcW; Sat, 29 Mar 2025 01:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddxYzR1PcN61a66ZKHePbBaiyMschPVy+YI+Y6W4LYo=; b=xn3e9BY8SPO9rd1Hnn+s/QrYBqZD7iRDj8js4I8JlAlyHjZOmXTLuVvlKWmLJEXTuoMbLH LCyLc/3opmJw3x/hhebIrMzhKMoFnsAN4d/AhbX5XOfL2jIP/6IKpEtyuQwhZEmQB/wvaK 9YJNs2rAQtOMHZElwFAdFRLC4paLW6KImiAVuzd/4ci7BFGZScMBCUZZ8dpFkNgWb82Ulb tnf+xHCHnhTQsgm51z4DwplcBNp5YV1tX0A4kL0nIZ6gS4umgnSQkaJzAVaHwjMp+6YBxC OQCzTPWxNONlWsUFb+LuxgB10rdqn5bD21+MjqEOuS9YaSpq2B+yxA9K/XHJYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743212029; a=rsa-sha256; cv=none; b=usao1R/BIpoQivQ5IZeXZZYKe9Bg12z94igZlxEiX99rFR0G11sUxFNXXTgmySd5aO1OMY +8zaO6ePSvxZA1G8rTIMMHeHxq3Txd50ycMvO40Fxvpg9Pe67ItTfok+FMxntWB/QzUvIy gVpA52L7hqxqg3AE7MM9I0w9+WJuFrcBH5hzr69jGsBZjFwoY2NpDg4Tx1gd3tu22rCfjx XIrMQWiH1xxslIz/NQvzCrOz0iPwCl20WtU1c4tRb2jAS5LOJpNt+l39VS8drtsDGxgXv2 ixoGJpDsYGSrfxmc6S048D7/o2YAEbjbeeNlOvU01Ib+rjXj3PqMltsbRmeojQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743212029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddxYzR1PcN61a66ZKHePbBaiyMschPVy+YI+Y6W4LYo=; b=o6BIJGaEfwyalMOSpgvrwIzyK1GAW6xlwlifUgR3Y7LGjAf48vG3q3havoKD3ocSk6RZbE VWD7Erf9Gvc/jK17Ji9VWIqVtMqTdTsxgQPQZN6s+TrBSMyF1ejqYjQdm/isfO66mRTDeU q3fW74/am5dUYpi5G8u5FuP4qQxvH1zRyIaXhSRm37X9amTbn4q3xL8+KxzKiqYUZZavGT GIH6BZIovKA332SsDcHi4RNY8le5UHNvbu7xNkNltCqi0uHieBy6MebGeuzRp9Sxe7TIjD 9H/j1RLgYNv163ZeNYiCmJTatsQgRB91TbiVzaffN0Pn8xdUUsNaxKpTUHXswg== 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 4ZPg0F3zZwz178y; Sat, 29 Mar 2025 01:33: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 52T1XnJ3052497; Sat, 29 Mar 2025 01:33:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T1XnZS052494; Sat, 29 Mar 2025 01:33:49 GMT (envelope-from git) Date: Sat, 29 Mar 2025 01:33:49 GMT Message-Id: <202503290133.52T1XnZS052494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 0d35e639731f - stable/14 - intro.5: More verbose introductory sentence List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0d35e639731f30d2472cdb92fb0e0821f8df6367 Auto-Submitted: auto-generated The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=0d35e639731f30d2472cdb92fb0e0821f8df6367 commit 0d35e639731f30d2472cdb92fb0e0821f8df6367 Author: Alexander Ziaee AuthorDate: 2024-11-17 17:14:21 +0000 Commit: Alexander Ziaee CommitDate: 2025-03-29 01:32:27 +0000 intro.5: More verbose introductory sentence Explain a little about everything is a file, matching the style of earlier intro pages. PR: 248562 MFC after: 3 days Approved by: mhorne (mentor) Reviewed by: imp, mhorne, Lexi Winter Pull Request: https://github.com/freebsd/freebsd-src/pull/1534 (cherry picked from commit 37508388d066826d0a36b5ec646c95a9ffb00d28) --- share/man/man5/intro.5 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 60328a4bed06..525d6801aaad 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -35,7 +35,10 @@ .Nm intro .Nd introduction to file formats .Sh DESCRIPTION -This section contains information about file formats, including: +This section contains information about the file formats +which comprise most data structures in the +.Bx +environment, including: .Pp .Bl -bullet -compact .It From nobody Sat Mar 29 08:53:19 2025 X-Original-To: dev-commits-src-all@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 4ZPrlN2W4Jz5sJtv; Sat, 29 Mar 2025 08:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPrlN0v61z3Q9s; Sat, 29 Mar 2025 08:53:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743238400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yQSCi3oH3oKQN5mTzq4y0nwJI/4HBhBSigOtH2MM/N4=; b=ACStCSLveTBaDLKo0LrSP0BrF2u0EUIX3oWgZmxdfU8kuZptQXHMKXX+ItQyPaFo4AGuDO DFOFza8Qc5Xz39jBZZcQPYf0AF8k77PpiSdFqjmnxWW/DMrGZtC0r7hXPhY83GmfrSiFHj AG0dY8NK8ajlHJxmZMRoYkNsPOb6aUZcSnB5NGK7EdUK50Ddj0erTPGZZfnElvFO4b6jMm cKTXXXah3hqcxsyz2sCiCQ0qsVUHzNqg/MrISVMEkkN2iAO10cg96toOlASY7nbGKMmfJb EJ1R3orAMmKqty70n5dommA38J9kshFYTQCtyogbIBxnLb0PzUwHxc2YgBJNpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743238400; a=rsa-sha256; cv=none; b=enipwCFDePTnYLoX7/EZU/HXkv724xFojcsyeYMK89NO1K2fmU6sv8BF7Sg1UfrrGVau7C vYM9Yq5FzNCihIoSocZ5Iue1bncQdemcXPp+1TVaYwCB5fup+nFY/80cB9fduW0zqz3DOO ghh9ja3ACyGer+63HEFBXNYeTmcKmvmcdIRhZHZSosjXZWnxsLUjU2T5hoJ6sKTWcnrtSA +9KHNSJKriqbbKJZ+ZbKeQjs060THQKQugjPltp/jKDgUw/gcKLs3LT/vOXwTKNSKm7n+L iiuNTfr8u2Pf8Qt0g9fVkPe6s9i3pLryxi9gfY79P4FYAeu9ZSdWnxZBqPZu7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743238400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yQSCi3oH3oKQN5mTzq4y0nwJI/4HBhBSigOtH2MM/N4=; b=eijIvdjXYR8gDgmALwcTPoH16oBlS66SeVp9GWbJvR5QpPhnBu/KWM5HuS0F57lENgqdpi X5RueSlZYHrCAlIMdbg5wqEHbzyvxw63SDKURyY2nZSckWZ6LFB9H+u1xrNmZw0AfUZptX D6hZm432jS0NWUeKXuc2IJnjh3xETRiDPz9RQF+HcoTKPRs3yF71Kj2IsOaJsQ3FA8rwnO yaC5x+cspcMWu6Hkv4nnpeBlYkaDUipAe6BIVMGgku/mq0JuGuA+hOYSVU/yqXyfvE0SxG G777iYkgjXw5/9AzqTwE/069+gT0pVE4Ce4lyIMy1Pmb0Mao67Jr7TJH5VkHGw== 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 4ZPrlN0QZsz6KS; Sat, 29 Mar 2025 08:53: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 52T8rKZ6074855; Sat, 29 Mar 2025 08:53:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T8rJ9X074852; Sat, 29 Mar 2025 08:53:19 GMT (envelope-from git) Date: Sat, 29 Mar 2025 08:53:19 GMT Message-Id: <202503290853.52T8rJ9X074852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 674701e2b6d7 - main - pf: Remove some state pointer indirection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 674701e2b6d74b5604ec00961333c3ab33f6ec9c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=674701e2b6d74b5604ec00961333c3ab33f6ec9c commit 674701e2b6d74b5604ec00961333c3ab33f6ec9c Author: Mark Johnston AuthorDate: 2025-03-29 08:51:38 +0000 Commit: Mark Johnston CommitDate: 2025-03-29 08:52:25 +0000 pf: Remove some state pointer indirection Several subroutines take a pointer to a pointer to a pf state, but never modify the input pointer. As in commit 9f9cf83f114a, let's remove the indirection, making the code easier to read. No functional change intended. Reviewed by: kp, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49519 --- sys/netpfil/pf/pf.c | 206 ++++++++++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 002fff9b81be..d3c857a66b85 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -350,11 +350,11 @@ static int pf_create_state(struct pf_krule *, struct pf_krule *, struct pf_krule_slist *, struct pf_udp_mapping *); static int pf_state_key_addr_setup(struct pf_pdesc *, struct pf_state_key_cmp *, int); -static int pf_tcp_track_full(struct pf_kstate **, +static int pf_tcp_track_full(struct pf_kstate *, struct pf_pdesc *, u_short *, int *, struct pf_state_peer *, struct pf_state_peer *, u_int8_t, u_int8_t); -static int pf_tcp_track_sloppy(struct pf_kstate **, +static int pf_tcp_track_sloppy(struct pf_kstate *, struct pf_pdesc *, u_short *, struct pf_state_peer *, struct pf_state_peer *, u_int8_t, u_int8_t); @@ -6419,7 +6419,7 @@ pf_translate(struct pf_pdesc *pd, struct pf_addr *saddr, u_int16_t sport, } static int -pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, +pf_tcp_track_full(struct pf_kstate *state, struct pf_pdesc *pd, u_short *reason, int *copyback, struct pf_state_peer *src, struct pf_state_peer *dst, u_int8_t psrc, u_int8_t pdst) { @@ -6445,7 +6445,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, if (src->seqlo == 0) { /* First packet from this end. Set its state */ - if (((*state)->state_flags & PFSTATE_SCRUB_TCP || dst->scrub) && + if ((state->state_flags & PFSTATE_SCRUB_TCP || dst->scrub) && src->scrub == NULL) { if (pf_normalize_tcp_init(pd, th, src, dst)) { REASON_SET(reason, PFRES_MEMORY); @@ -6495,7 +6495,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, src->seqlo = seq; if (src->state < TCPS_SYN_SENT) - pf_set_protostate(*state, psrc, TCPS_SYN_SENT); + pf_set_protostate(state, psrc, TCPS_SYN_SENT); /* * May need to slide the window (seqhi may have been set by @@ -6579,7 +6579,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(pd, reason, th, - *state, src, dst, copyback)) + state, src, dst, copyback)) return (PF_DROP); } @@ -6596,43 +6596,43 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, /* update states */ if (tcp_get_flags(th) & TH_SYN) if (src->state < TCPS_SYN_SENT) - pf_set_protostate(*state, psrc, TCPS_SYN_SENT); + pf_set_protostate(state, psrc, TCPS_SYN_SENT); if (tcp_get_flags(th) & TH_FIN) if (src->state < TCPS_CLOSING) - pf_set_protostate(*state, psrc, TCPS_CLOSING); + pf_set_protostate(state, psrc, TCPS_CLOSING); if (tcp_get_flags(th) & TH_ACK) { if (dst->state == TCPS_SYN_SENT) { - pf_set_protostate(*state, pdst, + pf_set_protostate(state, pdst, TCPS_ESTABLISHED); if (src->state == TCPS_ESTABLISHED && - (*state)->sns[PF_SN_LIMIT] != NULL && - pf_src_connlimit(*state)) { + state->sns[PF_SN_LIMIT] != NULL && + pf_src_connlimit(state)) { REASON_SET(reason, PFRES_SRCLIMIT); return (PF_DROP); } } else if (dst->state == TCPS_CLOSING) - pf_set_protostate(*state, pdst, + pf_set_protostate(state, pdst, TCPS_FIN_WAIT_2); } if (tcp_get_flags(th) & TH_RST) - pf_set_protostate(*state, PF_PEER_BOTH, TCPS_TIME_WAIT); + pf_set_protostate(state, PF_PEER_BOTH, TCPS_TIME_WAIT); /* update expire time */ - (*state)->expire = pf_get_uptime(); + state->expire = pf_get_uptime(); if (src->state >= TCPS_FIN_WAIT_2 && dst->state >= TCPS_FIN_WAIT_2) - (*state)->timeout = PFTM_TCP_CLOSED; + state->timeout = PFTM_TCP_CLOSED; else if (src->state >= TCPS_CLOSING && dst->state >= TCPS_CLOSING) - (*state)->timeout = PFTM_TCP_FIN_WAIT; + state->timeout = PFTM_TCP_FIN_WAIT; else if (src->state < TCPS_ESTABLISHED || dst->state < TCPS_ESTABLISHED) - (*state)->timeout = PFTM_TCP_OPENING; + state->timeout = PFTM_TCP_OPENING; else if (src->state >= TCPS_CLOSING || dst->state >= TCPS_CLOSING) - (*state)->timeout = PFTM_TCP_CLOSING; + state->timeout = PFTM_TCP_CLOSING; else - (*state)->timeout = PFTM_TCP_ESTABLISHED; + state->timeout = PFTM_TCP_ESTABLISHED; /* Fall through to PASS packet */ @@ -6667,19 +6667,19 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, if (V_pf_status.debug >= PF_DEBUG_MISC) { printf("pf: loose state match: "); - pf_print_state(*state); + pf_print_state(state); pf_print_flags(tcp_get_flags(th)); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, - pd->p_len, ackskew, (unsigned long long)(*state)->packets[0], - (unsigned long long)(*state)->packets[1], + pd->p_len, ackskew, (unsigned long long)state->packets[0], + (unsigned long long)state->packets[1], pd->dir == PF_IN ? "in" : "out", - pd->dir == (*state)->direction ? "fwd" : "rev"); + pd->dir == state->direction ? "fwd" : "rev"); } if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(pd, reason, th, - *state, src, dst, copyback)) + state, src, dst, copyback)) return (PF_DROP); } @@ -6700,37 +6700,37 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, if (tcp_get_flags(th) & TH_FIN) if (src->state < TCPS_CLOSING) - pf_set_protostate(*state, psrc, TCPS_CLOSING); + pf_set_protostate(state, psrc, TCPS_CLOSING); if (tcp_get_flags(th) & TH_RST) - pf_set_protostate(*state, PF_PEER_BOTH, TCPS_TIME_WAIT); + pf_set_protostate(state, PF_PEER_BOTH, TCPS_TIME_WAIT); /* Fall through to PASS packet */ } else { - if ((*state)->dst.state == TCPS_SYN_SENT && - (*state)->src.state == TCPS_SYN_SENT) { + if (state->dst.state == TCPS_SYN_SENT && + state->src.state == TCPS_SYN_SENT) { /* Send RST for state mismatches during handshake */ if (!(tcp_get_flags(th) & TH_RST)) - pf_send_tcp((*state)->rule, pd->af, + pf_send_tcp(state->rule, pd->af, pd->dst, pd->src, th->th_dport, th->th_sport, ntohl(th->th_ack), 0, TH_RST, 0, 0, - (*state)->rule->return_ttl, M_SKIP_FIREWALL, - 0, 0, (*state)->act.rtableid); + state->rule->return_ttl, M_SKIP_FIREWALL, + 0, 0, state->act.rtableid); src->seqlo = 0; src->seqhi = 1; src->max_win = 1; } else if (V_pf_status.debug >= PF_DEBUG_MISC) { printf("pf: BAD state: "); - pf_print_state(*state); + pf_print_state(state); pf_print_flags(tcp_get_flags(th)); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, pd->p_len, ackskew, - (unsigned long long)(*state)->packets[0], - (unsigned long long)(*state)->packets[1], + (unsigned long long)state->packets[0], + (unsigned long long)state->packets[1], pd->dir == PF_IN ? "in" : "out", - pd->dir == (*state)->direction ? "fwd" : "rev"); + pd->dir == state->direction ? "fwd" : "rev"); printf("pf: State failure on: %c %c %c %c | %c %c\n", SEQ_GEQ(src->seqhi, data_end) ? ' ' : '1', SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)) ? @@ -6748,7 +6748,7 @@ pf_tcp_track_full(struct pf_kstate **state, struct pf_pdesc *pd, } static int -pf_tcp_track_sloppy(struct pf_kstate **state, struct pf_pdesc *pd, +pf_tcp_track_sloppy(struct pf_kstate *state, struct pf_pdesc *pd, u_short *reason, struct pf_state_peer *src, struct pf_state_peer *dst, u_int8_t psrc, u_int8_t pdst) { @@ -6756,21 +6756,21 @@ pf_tcp_track_sloppy(struct pf_kstate **state, struct pf_pdesc *pd, if (tcp_get_flags(th) & TH_SYN) if (src->state < TCPS_SYN_SENT) - pf_set_protostate(*state, psrc, TCPS_SYN_SENT); + pf_set_protostate(state, psrc, TCPS_SYN_SENT); if (tcp_get_flags(th) & TH_FIN) if (src->state < TCPS_CLOSING) - pf_set_protostate(*state, psrc, TCPS_CLOSING); + pf_set_protostate(state, psrc, TCPS_CLOSING); if (tcp_get_flags(th) & TH_ACK) { if (dst->state == TCPS_SYN_SENT) { - pf_set_protostate(*state, pdst, TCPS_ESTABLISHED); + pf_set_protostate(state, pdst, TCPS_ESTABLISHED); if (src->state == TCPS_ESTABLISHED && - (*state)->sns[PF_SN_LIMIT] != NULL && - pf_src_connlimit(*state)) { + state->sns[PF_SN_LIMIT] != NULL && + pf_src_connlimit(state)) { REASON_SET(reason, PFRES_SRCLIMIT); return (PF_DROP); } } else if (dst->state == TCPS_CLOSING) { - pf_set_protostate(*state, pdst, TCPS_FIN_WAIT_2); + pf_set_protostate(state, pdst, TCPS_FIN_WAIT_2); } else if (src->state == TCPS_SYN_SENT && dst->state < TCPS_SYN_SENT) { /* @@ -6779,11 +6779,11 @@ pf_tcp_track_sloppy(struct pf_kstate **state, struct pf_pdesc *pd, * the initial SYN without ever seeing a packet from * the destination, set the connection to established. */ - pf_set_protostate(*state, PF_PEER_BOTH, + pf_set_protostate(state, PF_PEER_BOTH, TCPS_ESTABLISHED); dst->state = src->state = TCPS_ESTABLISHED; - if ((*state)->sns[PF_SN_LIMIT] != NULL && - pf_src_connlimit(*state)) { + if (state->sns[PF_SN_LIMIT] != NULL && + pf_src_connlimit(state)) { REASON_SET(reason, PFRES_SRCLIMIT); return (PF_DROP); } @@ -6795,117 +6795,117 @@ pf_tcp_track_sloppy(struct pf_kstate **state, struct pf_pdesc *pd, * don't see the full bidirectional FIN/ACK+ACK * handshake. */ - pf_set_protostate(*state, pdst, TCPS_CLOSING); + pf_set_protostate(state, pdst, TCPS_CLOSING); } } if (tcp_get_flags(th) & TH_RST) - pf_set_protostate(*state, PF_PEER_BOTH, TCPS_TIME_WAIT); + pf_set_protostate(state, PF_PEER_BOTH, TCPS_TIME_WAIT); /* update expire time */ - (*state)->expire = pf_get_uptime(); + state->expire = pf_get_uptime(); if (src->state >= TCPS_FIN_WAIT_2 && dst->state >= TCPS_FIN_WAIT_2) - (*state)->timeout = PFTM_TCP_CLOSED; + state->timeout = PFTM_TCP_CLOSED; else if (src->state >= TCPS_CLOSING && dst->state >= TCPS_CLOSING) - (*state)->timeout = PFTM_TCP_FIN_WAIT; + state->timeout = PFTM_TCP_FIN_WAIT; else if (src->state < TCPS_ESTABLISHED || dst->state < TCPS_ESTABLISHED) - (*state)->timeout = PFTM_TCP_OPENING; + state->timeout = PFTM_TCP_OPENING; else if (src->state >= TCPS_CLOSING || dst->state >= TCPS_CLOSING) - (*state)->timeout = PFTM_TCP_CLOSING; + state->timeout = PFTM_TCP_CLOSING; else - (*state)->timeout = PFTM_TCP_ESTABLISHED; + state->timeout = PFTM_TCP_ESTABLISHED; return (PF_PASS); } static int -pf_synproxy(struct pf_pdesc *pd, struct pf_kstate **state, u_short *reason) +pf_synproxy(struct pf_pdesc *pd, struct pf_kstate *state, u_short *reason) { - struct pf_state_key *sk = (*state)->key[pd->didx]; + struct pf_state_key *sk = state->key[pd->didx]; struct tcphdr *th = &pd->hdr.tcp; - if ((*state)->src.state == PF_TCPS_PROXY_SRC) { - if (pd->dir != (*state)->direction) { + if (state->src.state == PF_TCPS_PROXY_SRC) { + if (pd->dir != state->direction) { REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } if (tcp_get_flags(th) & TH_SYN) { - if (ntohl(th->th_seq) != (*state)->src.seqlo) { + if (ntohl(th->th_seq) != state->src.seqlo) { REASON_SET(reason, PFRES_SYNPROXY); return (PF_DROP); } - pf_send_tcp((*state)->rule, pd->af, pd->dst, + pf_send_tcp(state->rule, pd->af, pd->dst, pd->src, th->th_dport, th->th_sport, - (*state)->src.seqhi, ntohl(th->th_seq) + 1, - TH_SYN|TH_ACK, 0, (*state)->src.mss, 0, - M_SKIP_FIREWALL, 0, 0, (*state)->act.rtableid); + state->src.seqhi, ntohl(th->th_seq) + 1, + TH_SYN|TH_ACK, 0, state->src.mss, 0, + M_SKIP_FIREWALL, 0, 0, state->act.rtableid); REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } else if ((tcp_get_flags(th) & (TH_ACK|TH_RST|TH_FIN)) != TH_ACK || - (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || - (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { + (ntohl(th->th_ack) != state->src.seqhi + 1) || + (ntohl(th->th_seq) != state->src.seqlo + 1)) { REASON_SET(reason, PFRES_SYNPROXY); return (PF_DROP); - } else if ((*state)->sns[PF_SN_LIMIT] != NULL && - pf_src_connlimit(*state)) { + } else if (state->sns[PF_SN_LIMIT] != NULL && + pf_src_connlimit(state)) { REASON_SET(reason, PFRES_SRCLIMIT); return (PF_DROP); } else - pf_set_protostate(*state, PF_PEER_SRC, + pf_set_protostate(state, PF_PEER_SRC, PF_TCPS_PROXY_DST); } - if ((*state)->src.state == PF_TCPS_PROXY_DST) { - if (pd->dir == (*state)->direction) { + if (state->src.state == PF_TCPS_PROXY_DST) { + if (pd->dir == state->direction) { if (((tcp_get_flags(th) & (TH_SYN|TH_ACK)) != TH_ACK) || - (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || - (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { + (ntohl(th->th_ack) != state->src.seqhi + 1) || + (ntohl(th->th_seq) != state->src.seqlo + 1)) { REASON_SET(reason, PFRES_SYNPROXY); return (PF_DROP); } - (*state)->src.max_win = MAX(ntohs(th->th_win), 1); - if ((*state)->dst.seqhi == 1) - (*state)->dst.seqhi = htonl(arc4random()); - pf_send_tcp((*state)->rule, pd->af, + state->src.max_win = MAX(ntohs(th->th_win), 1); + if (state->dst.seqhi == 1) + state->dst.seqhi = htonl(arc4random()); + pf_send_tcp(state->rule, pd->af, &sk->addr[pd->sidx], &sk->addr[pd->didx], sk->port[pd->sidx], sk->port[pd->didx], - (*state)->dst.seqhi, 0, TH_SYN, 0, - (*state)->src.mss, 0, - (*state)->orig_kif->pfik_ifp == V_loif ? M_LOOP : 0, - (*state)->tag, 0, (*state)->act.rtableid); + state->dst.seqhi, 0, TH_SYN, 0, + state->src.mss, 0, + state->orig_kif->pfik_ifp == V_loif ? M_LOOP : 0, + state->tag, 0, state->act.rtableid); REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); } else if (((tcp_get_flags(th) & (TH_SYN|TH_ACK)) != (TH_SYN|TH_ACK)) || - (ntohl(th->th_ack) != (*state)->dst.seqhi + 1)) { + (ntohl(th->th_ack) != state->dst.seqhi + 1)) { REASON_SET(reason, PFRES_SYNPROXY); return (PF_DROP); } else { - (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); - (*state)->dst.seqlo = ntohl(th->th_seq); - pf_send_tcp((*state)->rule, pd->af, pd->dst, + state->dst.max_win = MAX(ntohs(th->th_win), 1); + state->dst.seqlo = ntohl(th->th_seq); + pf_send_tcp(state->rule, pd->af, pd->dst, pd->src, th->th_dport, th->th_sport, ntohl(th->th_ack), ntohl(th->th_seq) + 1, - TH_ACK, (*state)->src.max_win, 0, 0, 0, - (*state)->tag, 0, (*state)->act.rtableid); - pf_send_tcp((*state)->rule, pd->af, + TH_ACK, state->src.max_win, 0, 0, 0, + state->tag, 0, state->act.rtableid); + pf_send_tcp(state->rule, pd->af, &sk->addr[pd->sidx], &sk->addr[pd->didx], sk->port[pd->sidx], sk->port[pd->didx], - (*state)->src.seqhi + 1, (*state)->src.seqlo + 1, - TH_ACK, (*state)->dst.max_win, 0, 0, - M_SKIP_FIREWALL, 0, 0, (*state)->act.rtableid); - (*state)->src.seqdiff = (*state)->dst.seqhi - - (*state)->src.seqlo; - (*state)->dst.seqdiff = (*state)->src.seqhi - - (*state)->dst.seqlo; - (*state)->src.seqhi = (*state)->src.seqlo + - (*state)->dst.max_win; - (*state)->dst.seqhi = (*state)->dst.seqlo + - (*state)->src.max_win; - (*state)->src.wscale = (*state)->dst.wscale = 0; - pf_set_protostate(*state, PF_PEER_BOTH, + state->src.seqhi + 1, state->src.seqlo + 1, + TH_ACK, state->dst.max_win, 0, 0, + M_SKIP_FIREWALL, 0, 0, state->act.rtableid); + state->src.seqdiff = state->dst.seqhi - + state->src.seqlo; + state->dst.seqdiff = state->src.seqhi - + state->dst.seqlo; + state->src.seqhi = state->src.seqlo + + state->dst.max_win; + state->dst.seqhi = state->dst.seqlo + + state->src.max_win; + state->src.wscale = state->dst.wscale = 0; + pf_set_protostate(state, PF_PEER_BOTH, TCPS_ESTABLISHED); REASON_SET(reason, PFRES_SYNPROXY); return (PF_SYNPROXY_DROP); @@ -6964,7 +6964,7 @@ pf_test_state(struct pf_kstate **state, struct pf_pdesc *pd, u_short *reason) case IPPROTO_TCP: { struct tcphdr *th = &pd->hdr.tcp; - if ((action = pf_synproxy(pd, state, reason)) != PF_PASS) + if ((action = pf_synproxy(pd, *state, reason)) != PF_PASS) return (action); if ((*state)->src.state >= TCPS_FIN_WAIT_2 && (*state)->dst.state >= TCPS_FIN_WAIT_2 && @@ -6984,13 +6984,13 @@ pf_test_state(struct pf_kstate **state, struct pf_pdesc *pd, u_short *reason) return (PF_DROP); } if ((*state)->state_flags & PFSTATE_SLOPPY) { - if (pf_tcp_track_sloppy(state, pd, reason, src, dst, + if (pf_tcp_track_sloppy(*state, pd, reason, src, dst, psrc, pdst) == PF_DROP) return (PF_DROP); } else { int ret; - ret = pf_tcp_track_full(state, pd, reason, + ret = pf_tcp_track_full(*state, pd, reason, ©back, src, dst, psrc, pdst); if (ret == PF_DROP) return (PF_DROP); @@ -10414,7 +10414,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 s->src.seqhi = ntohl(pd.hdr.tcp.th_ack) - 1; s->src.seqlo = ntohl(pd.hdr.tcp.th_seq) - 1; pf_set_protostate(s, PF_PEER_SRC, PF_TCPS_PROXY_DST); - action = pf_synproxy(&pd, &s, &reason); + action = pf_synproxy(&pd, s, &reason); break; } else { action = pf_test_rule(&r, &s, &pd, From nobody Sat Mar 29 08:53:21 2025 X-Original-To: dev-commits-src-all@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 4ZPrlP5GFhz5sK26; Sat, 29 Mar 2025 08:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPrlP3KrKz3QJV; Sat, 29 Mar 2025 08:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743238401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GUcHXZKoWcg5fxmcOKApPzusixql+b5qeXD/cDxwCjQ=; b=a5FM+msXcXrqjoGhR9nXbZX83e1lTNxiBz4yWCcczG7iUY3tpnWeyIJSEnvBtlZwLwfDCX dGwAbPIZ0ffv4016ASUX8/SVmdq6fktbuQ3+AwiAzjQ8khX7IGzKNm4QluL9l4weLb3zxN oISzDfbK09lB3prm9n6QOMMSUGAvbQx6KwxP62VCihQRoYd4l4EiuhvmGS07dWSnqIl+bn oD4BkiVTnw99pn98Bz1MggGjzRSgvYnfZyg2rURmKh2v+6Xn0DXe2a5I4VeupJO8gKcYGm MzwX6fwPQcjjRwnrbYrWDxMhQd2vDvvt0qOQLU0FPG+RB03+uo35hFCnTyBvQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743238401; a=rsa-sha256; cv=none; b=g+1SmF0VY0RCxMTtztDXqU95CJuIc7K0+vxzJTrEaF2jh8aaztpIFQLcsjJblnbLm4ze+6 e+eHNE0Riho4jOGDfB0v71NlTiNpx9ItuKZTp/HQcCC+0PvJlvWk/NQs4Qsio5Tmpeb6Oy OpXZypGMSM2amdN3vlFyxitZDx5tq9TngojdRbnQSe38xRrzj9+79ynssXSfwR3WMGoeDe dArN0sUQf1to2cu7BcvZNWgyQp5OtASHy7yVxD4JRHD4NsEYhzWN+oK1TXZf1GTGZd/I64 WaxjW0436hbDhe5Z1ASDJvwo3j9eh+Fbw1crwuh4QLYExP7AC3ruEfBu29cU6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743238401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GUcHXZKoWcg5fxmcOKApPzusixql+b5qeXD/cDxwCjQ=; b=cORivO6+wwTEUL3fuTz53rkxcpDndBQpuugtFcziAxq6+ghSsbvTqgAZvL6hxf2z3fiH4I PkpdTveCqb/yJBrMCUav5BBss3R559dqn9KDqKa06yI1+OA19q2uz3vpjpWg6WJ33SYzVB Y/5fwSb8tnUcoLA5Mt8/JahajPP+T6vexKqbFHT/bRpI+fV2HXAIZ+9+LOdaJKTqoiuYJo RMIJtwpEkY5E+gAgS194xV38qnPDcJ3+5yloXM3UvfV7V01RDUIF21Iekm0X4eCP0gUO6/ qHRRHnkxo4CNXPi8gIIp02V6WG74G8cYLzJ8PLXfR40wvaDE10qHqJ4Gv5i0Bg== 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 4ZPrlP173yz6Yg; Sat, 29 Mar 2025 08:53: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 52T8rLgu074888; Sat, 29 Mar 2025 08:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52T8rLp3074885; Sat, 29 Mar 2025 08:53:21 GMT (envelope-from git) Date: Sat, 29 Mar 2025 08:53:21 GMT Message-Id: <202503290853.52T8rLp3074885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 27f70efebf1d - main - pf: Use a macro to get the hash row in pf_find_state_byid() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 27f70efebf1d9424462f291e9d04e62272083aa7 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=27f70efebf1d9424462f291e9d04e62272083aa7 commit 27f70efebf1d9424462f291e9d04e62272083aa7 Author: Mark Johnston AuthorDate: 2025-03-29 08:52:06 +0000 Commit: Mark Johnston CommitDate: 2025-03-29 08:52:25 +0000 pf: Use a macro to get the hash row in pf_find_state_byid() This seems a bit preferable to open-coding it. No functional change intended. Reviewed by: kp, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49518 --- sys/net/pfvar.h | 3 ++- sys/netpfil/pf/pf.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 2aaef12e3431..39ca13c89379 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2226,7 +2226,8 @@ VNET_DECLARE(struct pf_udpendpointhash *, pf_udpendpointhash); VNET_DECLARE(struct pf_srchash *, pf_srchash); #define V_pf_srchash VNET(pf_srchash) -#define PF_IDHASH(s) (be64toh((s)->id) % (V_pf_hashmask + 1)) +#define PF_IDHASHID(id) (be64toh(id) % (V_pf_hashmask + 1)) +#define PF_IDHASH(s) PF_IDHASHID((s)->id) VNET_DECLARE(void *, pf_swi_cookie); #define V_pf_swi_cookie VNET(pf_swi_cookie) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d3c857a66b85..ef86d70db760 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1864,7 +1864,7 @@ pf_find_state_byid(uint64_t id, uint32_t creatorid) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - ih = &V_pf_idhash[(be64toh(id) % (V_pf_hashmask + 1))]; + ih = &V_pf_idhash[PF_IDHASHID(id)]; PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) From nobody Sat Mar 29 12:21:21 2025 X-Original-To: dev-commits-src-all@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 4ZPxMP2ct8z5rM9K; Sat, 29 Mar 2025 12:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZPxMP1Qwrz3MtG; Sat, 29 Mar 2025 12:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743250881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C9XyAv2mr1sV2Q7eAHbDeo84B3OsxC+SFDob9emsygI=; b=pjURQEYXlJqTXXqK1WoYLC7BEB63lBUHY/vcW7/VE4Vr5iO/zLFKYYljIEAgn2OVRobZUB QzcAWnA+Ki9t2L3wU62tOozG/HPZPBiauCUMl9mmwhx3wWZl/xPgrryTztb00Swo4AwUXh DLWlhCt2h3m22tCwyLnAjHZfKF2cwZQwzqb/Yw9GcoZj+AbQoZ2ZqDAd1VjVdMxh9bY8aX CrktElgTUg6rZb1DG3qox7ugbzzPKUloVlRA98S/UC/v64rjO6bf7cT782xqW7zzXb2tt9 lrejjJSe3VW82FWmmmESFKceTDVfLAsjwMp2BSCAfHA7iN+bIbOtxOwaxKcGOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743250881; a=rsa-sha256; cv=none; b=EuBVc4zUaX8JFQHULVgVBf44OdwGpBmawisAD4DK4itu0dLcV5EBJl0PKB9W1HazAWb5B3 P+1fnS0ii1uuvYroy4YIUAVd2tab3aAKOx1SsgkCPmoZ1r5pKLWsAliPboNo1r5yvXRdEK yAdkcpNZrR+HIaNdk6z7Q2YDu2yhAzs1lTbWiPmBBcibq2mrzoev5SMBKtZVyMVp4sUwkz HVZVLRxIoFBZN1uLUeaEHxv3lSAOYJuQ9KUPgwN8EALE3VSm+fh7cq4lLUd/HOMQguIfrG mZV/FpVX63lk/lXhPVljP237iFmgCubTv6x72nj4QAki1V6LyOG6f4x0vCWL2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743250881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C9XyAv2mr1sV2Q7eAHbDeo84B3OsxC+SFDob9emsygI=; b=H9jFmV6LvrAk5/FNcMoo4jGtHaH4byBEVqekSSlAz5kPttOW09CIXQgy22lx+rOgYROevN UxKMtlu2f2JkMR79qKZ7+aXPsg5Dgbxo+k+QER4xOiYEf4YPSVlCEjplHmSTOblEBeVYTO PhLxyGl8f0FGawKjo2n/A0pWest79p60n7Ir5uyiZO2cyBGJrWQj1aNCsieZBt0BraF+vr kyYrU+T8ftFTJ8v1rOUh7ey2uO0UQ828/NcT++njS8yO0MVxujAHmVSOr2kF2uPsZjr5Hi vwW0eqL2/9nQNK2W0mv63NLW3bbWKt9NwEFmOuItvgEwFXZSCM95RtW20mHe/g== 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 4ZPxMP0yk8zCXc; Sat, 29 Mar 2025 12:21: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 52TCLL05061035; Sat, 29 Mar 2025 12:21:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TCLLfx061032; Sat, 29 Mar 2025 12:21:21 GMT (envelope-from git) Date: Sat, 29 Mar 2025 12:21:21 GMT Message-Id: <202503291221.52TCLLfx061032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5df8159d56a6 - main - tests: xfail readelf phdr count test w/LLVM binutils List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5df8159d56a681e388a2fff1c1c24a4830b741d6 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5df8159d56a681e388a2fff1c1c24a4830b741d6 commit 5df8159d56a681e388a2fff1c1c24a4830b741d6 Author: Ed Maste AuthorDate: 2025-03-28 20:13:27 +0000 Commit: Ed Maste CommitDate: 2025-03-29 12:21:13 +0000 tests: xfail readelf phdr count test w/LLVM binutils LLVM readelf does not (yet) support phdr counts that overflow 16 bits. Temporarily xfail this test until fixed; see upstream issue 132216 for more details https://github.com/llvm/llvm-project/issues/132216. PR: 285547 Reported by: markj Reviewed by: dim, markj Sponsored by: The FreeBSD Foundation Fixes: 1cae7121c667 ("Enable LLVM_BINUTILS by default") Differential Revision: https://reviews.freebsd.org/D49561 --- tests/sys/kern/coredump_phnum_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sys/kern/coredump_phnum_test.sh b/tests/sys/kern/coredump_phnum_test.sh index e01c5d86a252..a1337d5ad1fb 100644 --- a/tests/sys/kern/coredump_phnum_test.sh +++ b/tests/sys/kern/coredump_phnum_test.sh @@ -80,6 +80,11 @@ coredump_phnum_body() atf_fail "Helper program did not dump core" fi + if readelf --version | grep -q LLVM; then + atf_expect_fail "PR285547: llvm-objdump does not support large phdr count" + # See https://github.com/llvm/llvm-project/issues/132216 + fi + # These magic numbers don't have any real significance. They are just # the result of running the helper program and dumping core. The only # important bit is that they're larger than 65535 (UINT16_MAX). From nobody Sat Mar 29 15:25:00 2025 X-Original-To: dev-commits-src-all@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 4ZQ1RJ5pqnz5rcD2; Sat, 29 Mar 2025 15:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQ1RJ1WMFz3Q71; Sat, 29 Mar 2025 15:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743261900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o/XWWilWpYdur/CpXbIBwRbZqyezzst5yBamdkdj2t4=; b=N9PFYMEL/pAi7NEuGlMeSdX4aPAkxT9C2GaEqPX7dq4yRZP273U6Oq2bOO/PgMrMGQyKon 3LRMtg/3RVUBFvY10yISzR3nL/dYRfHK5RBGCeKzKkEL+/DlSQnStFrZWlKBfM0maT9WM0 NMyaaEHetEVsln2zuL0lFBY0afBFQ+XPCvsXta7kE/19efcWSGwhokJBV/T5+d/+ZO3obX QxTglPDUV3qrI2NRcgTwcHlELjhz5iA2Eut5z5XRqnkrYdXLgMhIdf1ojGDs7Nc68MvpZI Jy9isaVFWtZjvHqpOhYMU8t0YYX4Vp19AKNZSrzDeA6ecYAF3MwHL3usNaRMzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743261900; a=rsa-sha256; cv=none; b=IDw7ze/DAtJ3qbWoKB4n5P93aW3IfzV55WSPty0mhAcWSjAQdAzpee0mLtApvHU+l7NUUz RjoPTFOTFERSvdaMG+EU+SzzKvHpUmnQDyTRZzEG0jqnqPv9KKGL3bdupEwjASOXNuyGyQ JI7IUPIxZs60kurG8iom8Qdc18UuXuASWDlUcyZfDybmL9L/VLDp1qmLbAlF7PIe7ARImE quFr6VeKSPEo7TTG1Q4tJNPIZxqDvIFhmpY2Vuc4UObaXRimfPaEgH8DgLC095EjVFcRt6 bNzIuqrY+CoDXtwOy1hhhLVYTkVoeAJ0r6Xgv779krf6zzJABKT4B7nchzMaug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743261900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o/XWWilWpYdur/CpXbIBwRbZqyezzst5yBamdkdj2t4=; b=CqkgXofJElIonXMXV/48qzmdralJ4ad8dTI58BagEcHyPjWXK5nB0dltd22XFj8gOxEYNu cItz6mwLOPPjdMmq3rF2/dyC+od16KpjVSUoiduZI6ml1CkNhrevRUoWpJACpbyYs422FM rVm/fb4Z9UkAaXBfXl4pPTGZw9aKtYo5cTZHwI8V4AbzOVUB2cgE3tojHJM+TC5Pk0K80n IXUDJgC4m8XYGhPuaElnb+1xXNQG8ioO/nrHBTiaFkTr0S7BXdNct/NqeYsBYimzNG6eMB /sE4voQMndKin8geSWw1bIm9gug5JkPM7oWZkijTmrSTv7bO7fEOLG7S+MkO2A== 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 4ZQ1RJ0yXvzbZV; Sat, 29 Mar 2025 15:25: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 52TFP0aM004675; Sat, 29 Mar 2025 15:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TFP0Ua004672; Sat, 29 Mar 2025 15:25:00 GMT (envelope-from git) Date: Sat, 29 Mar 2025 15:25:00 GMT Message-Id: <202503291525.52TFP0Ua004672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: f33989797374 - main - linuxkpi: Define `MAX_PAGE_ORDER` and `NR_PAGE_ORDERS` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f33989797374d135b64da59e0ef533ac69d0a5b7 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=f33989797374d135b64da59e0ef533ac69d0a5b7 commit f33989797374d135b64da59e0ef533ac69d0a5b7 Author: Jean-Sébastien Pédron AuthorDate: 2025-03-03 20:56:42 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2025-03-29 15:18:21 +0000 linuxkpi: Define `MAX_PAGE_ORDER` and `NR_PAGE_ORDERS` The TTM component of the DRM drivers started to use the latter in Linux 6.8. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49387 --- sys/compat/linuxkpi/common/include/linux/mmzone.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mmzone.h b/sys/compat/linuxkpi/common/include/linux/mmzone.h index 9fd481e18ee4..57d3dcac9597 100644 --- a/sys/compat/linuxkpi/common/include/linux/mmzone.h +++ b/sys/compat/linuxkpi/common/include/linux/mmzone.h @@ -9,4 +9,7 @@ #define MAX_ORDER 11 +#define MAX_PAGE_ORDER 10 +#define NR_PAGE_ORDERS (MAX_PAGE_ORDER + 1) + #endif From nobody Sat Mar 29 15:24:59 2025 X-Original-To: dev-commits-src-all@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 4ZQ1RH2qNPz5rbw9; Sat, 29 Mar 2025 15:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQ1RH242Bz3QD9; Sat, 29 Mar 2025 15:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743261899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=269Cve1WrlL+JaHdALqLKwEj1ZYo9FlT84MA3XKr4SI=; b=id1HVVO66AvCttxGmUIeupF4ib41GlqMLC57S81FupNKAf9HzMqwOkXIbNo2cqdpO1byx9 BGsxIQzwaFNeBwCIl3PdJ3IuP9Zw0k4IgSIlXh2BsK3XYczgXS9bkQDeJupvp1JLcEUTyf vt5s6pEsWW9bHczWPitG4aKnzvq2nA5/PAFMbsB6JavwiSvZcfC5kI/5yVuPiHU0N5WGY7 CCD/D0SDaKlh9IKGVUvQkE3BZOkUcIJx4glAnB82MXsaAFXDhiJF9yec+HX1FdVmBeVxQA A4f0mf1AD5pKoIIHVYLnqG4Fhtm8t6DrqLVUWXxvQXG5dhGqUfkpEiutuWHDBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743261899; a=rsa-sha256; cv=none; b=lchliBUZsgwm3hp7AGCyrSfVNSTVZrE40lU9TUEwADkPreFA1kQz28qhDOYDCrz4XfCyPG vu4nSowUrejRf0TUfgi9AAFMxa97uT6TrT3ByAPeqplJn4PeXgPDcvX4CJFOrfhlLqaGW/ eKOrntj45VSgbd2Ti04JcvzwLmrPTJF0YwgIvBFJkdojGeYxLnnYLnXGTIlmGiB6TFz3NZ MZHo8Kf2nQt4l9q+a7tOp0BxFZD+E9LDWOiI5JE0d6k7PsiZEHOOLlIa2kAjszYcBDt1I6 i5eke8gSnfMRb4O1EocwruwkKhbiEA/7RabVHpq+487jT9lkf8d1r3kMNnLjIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743261899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=269Cve1WrlL+JaHdALqLKwEj1ZYo9FlT84MA3XKr4SI=; b=LrQjYdwsg8B3siXdEKBaiWzyT4bIdBaBITOPeSI5CbsEEJNZjpWnMfAN1aD0lXidG3vA5K 3YWqU8U38knNwrtfe2h38rANutqMbhyTeduZ8q2t1RP0MHUxQ54s+JyBYEdKknkDNWQGoj HM4fA8MXYriXu0JL8gLDO1y3YIiASyvdZgMazWj38g8BvqzOvdCV4GQ6ejFMST8yTm1taE dUSrkkgnrMxLyXB/VqOgmkhjm55zeNsbytWSmvJv3O/Gdw5D65Lyw23s2zxuukKGrdFWmD deL4TJkPV07C3lC545w3R5CCJxj2Hnr22aUqnvFQi5rbuy+WGwsGb2p74YTspA== 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 4ZQ1RH1MgzzbQN; Sat, 29 Mar 2025 15:24: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 52TFOxD9004623; Sat, 29 Mar 2025 15:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TFOxxD004620; Sat, 29 Mar 2025 15:24:59 GMT (envelope-from git) Date: Sat, 29 Mar 2025 15:24:59 GMT Message-Id: <202503291524.52TFOxxD004620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 0b02cfb9488a - main - linuxkpi: Add `pwm_apply_might_sleep()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b02cfb9488a3ac6b75836ca9cee8227b9d4b54c Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=0b02cfb9488a3ac6b75836ca9cee8227b9d4b54c commit 0b02cfb9488a3ac6b75836ca9cee8227b9d4b54c Author: Jean-Sébastien Pédron AuthorDate: 2025-03-03 19:33:18 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2025-03-29 15:18:08 +0000 linuxkpi: Add `pwm_apply_might_sleep()` The i915 DRM driver started to use it in Linux 6.8. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49386 --- sys/compat/linuxkpi/common/include/linux/pwm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pwm.h b/sys/compat/linuxkpi/common/include/linux/pwm.h index 59a17f525c91..c0740db675e8 100644 --- a/sys/compat/linuxkpi/common/include/linux/pwm.h +++ b/sys/compat/linuxkpi/common/include/linux/pwm.h @@ -91,4 +91,10 @@ pwm_apply_state(struct pwm_device *pwm, const struct pwm_state *state) return (-ENOTSUPP); } +static inline int +pwm_apply_might_sleep(struct pwm_device *pwm, const struct pwm_state *state) +{ + return (0); +} + #endif /* _LINUXKPI_LINUX_PWM_H_ */ From nobody Sat Mar 29 20:18:06 2025 X-Original-To: dev-commits-src-all@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 4ZQ7xV4Zgjz5s2GY; Sat, 29 Mar 2025 20:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQ7xV1wX9z3h9v; Sat, 29 Mar 2025 20:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743279486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/659T9Qrz2CzhIvf8dEqbMhvWEo1PAR5ccx32xEuZFM=; b=K6T1ElhKvdZQjPL3F2GbY2xNn0D/xhbAHxrkPTVs70kVw9+W1w79T7T1R6WEyxA0s3aH6f nK6PR/3byfW/6k+hAmmnMjprxOASZ7mvmb7cJ0b7aJc7/Oyd9rLhg/aWQy282ux7kPK1NT WabmepfmdZ31FfS63sKXK/QgBswHjMkQy8T3mq1V8ehF2q7dud6uvKchexa8Q+/IgbByGS oHtUEXuLPaytr6ecBqK9o1tgFofVoxRPDUACZ5JtyLDaM/34s9hwP2f2yS0+ZPRRXiHDBN l5ak/+zq4TxBeh3ryVE1WU7W7/a7u3YYLFA/dRAJEwEBSph7UZeTwEUd9aLJyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743279486; a=rsa-sha256; cv=none; b=PgMb/QOnbvzpGrAba4p9CWheFAcxzLRaIt8w8sr/gGq7Ekjgf4aqo7WCvGDX1Uv6W2nr5J v+MjNN1jolcceMC3ge4bMef5B36U/wG4JTh8A85LFiJakJs434Z5oOztIX3EQBSAZop/YM oF0IkHBsBSU5iRUuovlPyGaTjYsKN0Ze1A1r7SEPTIGyZsbCrVrueGfDtCOq2JY7vCWafA 3R5R7frgMHVwwrIb0UYFxFMu4nZqiQ0jeFgSfkJSJ05ynQXMjC9uY+J5kBeCBx1PlQWYSI UEUhYFG28w2/C89FAf3qo7eL98YuRxO/gvsWZNuoBDW17ALzxXJoEw3yYP4Kiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743279486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/659T9Qrz2CzhIvf8dEqbMhvWEo1PAR5ccx32xEuZFM=; b=YdpWUvr0NBTDW4SnDUQY3SMGol21ntumN5Doe2ezui/5MEQ7+1YLty2QZs7hlZj2CLPkIQ rEaokYzoZhAfyPAYLH1JiS2ef4/09X3J4fLj6w4wVKFL3Ty88sPGJnTAHXeiOOKWJTxz1K tS5S0+lbCQYhqbm4ThL3iLRYE8N2hvZa04zNZSDEp0gRkstMzYnI3vxsdPgSOtl6uP/VW5 cK2wLIDZAtbZzDZTfBNL6jVS2k2oWY7GbDqVf2UR53GE5gUmokYAW7+IRwvXOUw/mfBvGm SyTAJeANCSlVbkWGtKttUZMMnksYt8vVcFRqdQafZ1f/TH36tb9loY7vh71oMQ== 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 4ZQ7xV1WNWzkpx; Sat, 29 Mar 2025 20:18: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 52TKI6K9048347; Sat, 29 Mar 2025 20:18:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TKI6bb048344; Sat, 29 Mar 2025 20:18:06 GMT (envelope-from git) Date: Sat, 29 Mar 2025 20:18:06 GMT Message-Id: <202503292018.52TKI6bb048344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 4cb527be7a25 - main - Correctly track index of first free irq map entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cb527be7a251d89fa5955532300e08eec136051 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4cb527be7a251d89fa5955532300e08eec136051 commit 4cb527be7a251d89fa5955532300e08eec136051 Author: Colin Percival AuthorDate: 2025-03-27 23:17:10 +0000 Commit: Colin Percival CommitDate: 2025-03-29 20:17:29 +0000 Correctly track index of first free irq map entry Any time an IRQ map entry was removed, irq_map_first_free_idx was being set to the index of the removed entry; this caused problems when entries were removed in random order since irq_map_first_free_idx was set to a larger value than the index of the first free map entry, and in 9beb195fd9fd ("Continue searching for an irq map from the start") the IRQ map allocation code was adjusted to use irq_map_first_free_idx as a starting point but ultimately scan the entire map if necessary, including values less than irq_map_first_free_idx. Remove that workaround and instead make irq_map_first_free_idx do what the name suggests -- tracking the index of the first free map entry -- by only setting to the index of a newly-freed entry if that index is lower than the existing irq_map_first_free_idx value. Reviewed by: imp, mhorne Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49543 --- sys/kern/subr_intr.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index b7cb088f58c7..dec40aa04e4a 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -1733,14 +1733,6 @@ intr_map_irq(device_t dev, intptr_t xref, struct intr_map_data *data) return (i); } } - for (i = 0; i < irq_map_first_free_idx; i++) { - if (irq_map[i] == NULL) { - irq_map[i] = entry; - irq_map_first_free_idx = i + 1; - mtx_unlock(&irq_map_lock); - return (i); - } - } mtx_unlock(&irq_map_lock); /* XXX Expand irq_map table */ @@ -1760,7 +1752,8 @@ intr_unmap_irq(u_int res_id) panic("Attempt to unmap invalid resource id: %u\n", res_id); entry = irq_map[res_id]; irq_map[res_id] = NULL; - irq_map_first_free_idx = res_id; + if (res_id < irq_map_first_free_idx) + irq_map_first_free_idx = res_id; mtx_unlock(&irq_map_lock); intr_free_intr_map_data(entry->map_data); free(entry, M_INTRNG); From nobody Sat Mar 29 20:18:07 2025 X-Original-To: dev-commits-src-all@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 4ZQ7xW4kFKz5s2B5; Sat, 29 Mar 2025 20:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQ7xW3CtLz3h9x; Sat, 29 Mar 2025 20:18:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743279487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m+opeSJxXGisQZaIY6mQ3YYGSXGJqhmDCaUz4FFCZbw=; b=M2y2RTuo+Wfzeq3D1U+KAv8ccbx6mAnaCLnTVJiusGcoD+G5dOR/2LQEiSy1a29tFtiqgO XYvKvVC9/zUowImPo1+rClqHnPemQkSmQP1rv6ZTwwMbCdvh9GOsJnzIRkZgipru/b6OT/ os74WW6dTf2KLIt3RDDu3ESvTZTfqHkHgiD5s/uZQIpVfGbPq2QjbQSxQrkqJKnG+BCyo0 Q7MkGA450ytDl3nnfL9hZv5GRCa3W9yCgBteVKOYApq6s0ijO63NIJPdabcUxCG/dFtpb+ WxDrI2YOJ3IiFERrbIxkVaAIN57KNC7mgwIpPLxltZHRDweKRfrsBWPcEuzLKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743279487; a=rsa-sha256; cv=none; b=rq1WO+6/iaBHZEO5YL5iVfOUvexdWS0qXL16yT8SsP/7mDSoPqM+zhMrWEX2YV3JYDob/B hy8pQDPZN734MdSB5QuqzZ7iAwyvq6AWblNwGtZz91ByQsuZblmaqYttnncQHSEhwA/u8W Fyl5/b5y2kKdxh2spAfG8TnoXo/LKJEbdWb8wUA94SyFtRTkNy5B/8qpThvlYe9lh+Oies Z+2Ef4nkeHhPK0O6qSXkvW2rsmzD8UWxbS4kpOmxj2gZw7luxe6Y9CjZiRfBVox1rpKj0E MOVPPilWbheiIedQYTSGfXFLh86nrVmc/GerFvfN6iNLTywDZ8iPtUXC6sZqbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743279487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m+opeSJxXGisQZaIY6mQ3YYGSXGJqhmDCaUz4FFCZbw=; b=ggaFZIS/mnZVyHvHqFFVQklCTJXc0lt0JIKWLuAlE2uPs8lJ9emMED6q3n8qRjgdX4B2jP W/PlTeEijMkoObUrbxSIbxyJ40Rnj9XgE9hdXp5jW+yfbfZXcAv7LEaQO8CmSOiJV/HIQT Lq415MLJi7oDWrp6gYkAuamNQ56ftDdXwWQdEL+SBxs0GYI2RmVORABSs1c5CjhH0KzGAL R/kMsYnSL2PnA0m7Kfd2M0AgZlg/mZGZltQnxSrcx3JF5m6KW3dZQ5jovhBGv0aX7PYz9u soVCGhcs2HRxYgdqUVru+LciQ2bNssBxOz6h8A2CqyMlJgdP5035M6+Xl9aHjg== 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 4ZQ7xW2THnzks5; Sat, 29 Mar 2025 20:18: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 52TKI71Q048380; Sat, 29 Mar 2025 20:18:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TKI7va048377; Sat, 29 Mar 2025 20:18:07 GMT (envelope-from git) Date: Sat, 29 Mar 2025 20:18:07 GMT Message-Id: <202503292018.52TKI7va048377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 0e33c2e6df7a - main - pci: Only re-route IRQs based on firmware on x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e33c2e6df7a5de65db40c7cc0fc97f66da28ccd Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0e33c2e6df7a5de65db40c7cc0fc97f66da28ccd commit 0e33c2e6df7a5de65db40c7cc0fc97f66da28ccd Author: Colin Percival AuthorDate: 2025-03-28 18:07:01 +0000 Commit: Colin Percival CommitDate: 2025-03-29 20:17:29 +0000 pci: Only re-route IRQs based on firmware on x86 There is a (very historical) call to pci_assign_interrupt for the purpose of routing IRQs which may have been set up wrong by x86 BIOS or firmware. On non-x86 systems, this is unnecessary; and on INTRNG systems it results in a (synthetic) IRQ leak and ultimately a kernel panic after many hotplug/unplug cycles. Suggested by: jhb Reviewed by: jhb MFC after: 2 weeks Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49560 --- sys/dev/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index fe99d6beb029..3a51e4c38296 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -4175,6 +4175,7 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) if (q->devid == devid && q->type == PCI_QUIRK_MAP_REG) pci_add_map(bus, dev, q->arg1, rl, force, 0); +#if defined(__i386__) || defined(__amd64__) if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { /* * Try to re-route interrupts. Sometimes the BIOS or @@ -4184,6 +4185,7 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) */ pci_assign_interrupt(bus, dev, 1); } +#endif if (pci_usb_takeover && pci_get_class(dev) == PCIC_SERIALBUS && pci_get_subclass(dev) == PCIS_SERIALBUS_USB) { From nobody Sat Mar 29 20:48:18 2025 X-Original-To: dev-commits-src-all@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 4ZQ8cL5dcKz5s3yh; Sat, 29 Mar 2025 20:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQ8cL1qs4z49Kt; Sat, 29 Mar 2025 20:48:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743281298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AT4shs6X5v80z/RFK60Ruc9aC3x/zCZ4mYOvjpudGtg=; b=XpLmD4HfFTxbfWfOhylch02xmblnZ3cutv8khh2oty6aFlx5EKBEC/6REtQyLzo/Ffl4sQ AkZQ6UyPhK4F094OsyuDSOqLNvbk6TB3haWUvPAdQzcyhwBLlxqxLZ9IMc5QpV/aL1Fjuw LsTJ2YuXggNZYkaZTC/8c/hRCS1EEdxKuvMtnhzv0l5tAC6oT+1Aom9gphC7jY55zPDNVF PfkCBqxx08AHAKwOg8glJS8689Uq5wIHccBn+tRaKgInVMaedBnre+G8NKD2yKNHlFJUjl htYCQVsC0LQDy8H84EJKPdGdv+aLWUZrfklRskyeTJPfivsU5deHm4+BwvYrbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743281298; a=rsa-sha256; cv=none; b=bsJkDDurRrjZRCZ2OSra+iwqo0yKjVBvGkShBEgm9MKECRVh75VXgvB5+B77RrWFFfLhTE fLO3XYTBaNuAnFnfaQI6MnmGqJmc+sEOmc2RUW5Qupe7Pfy9icPqqUl1s2Sc3Ux1sNLK3W /BNY/G9vwo/+mUkqqwvWNQhJTSgg6zldGVrmv24rxhaPSzdfN9Jinn6/CZvQatWwJGI1NS GXHr19zdvSAwK9JDOOASGO9DF/ufn6Y7d/fsi+/DouxoNaXlS2wxwT+Irh5PmyaYdq2/xw +ZEFO4u5IiMOn/h9sJizyjt5OwUQVOH1aGqoCMszKaHOO7rVia/Fv/t4/cp0zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743281298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AT4shs6X5v80z/RFK60Ruc9aC3x/zCZ4mYOvjpudGtg=; b=qBYIdWObKEK0kFTBPhUMe4kx5HjXLJrHbS9iyRLFBWL3d++2fr3d9eYTtPjuhIwixiwI6c Y0MN3CZX/RMiuVP//0fom2290BgsBUd49T9HsE2PAVZEQV7HTUbNQ3IgNvD5wEoOU7CJwj bnP1oILATlfaIYz2kY15bscno5qEEeEkYkgng91ZqmB8wM3fQwsvRlXJ5XVCqr3tg4fWr8 MUnxFnxZvSAW50xBu1vJgQCNY2dmwHx2RpA28sIM5O7+W/IfEAtt2PEgzDwXZVZhaDng2u 2oUnO1H94Y6q0q1cmxzEAQnLLhY7djx9mmox1IN0Z+UdbzE+tdN0tuh1wGfQbQ== 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 4ZQ8cL1R85zlLF; Sat, 29 Mar 2025 20:48: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 52TKmI03004599; Sat, 29 Mar 2025 20:48:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TKmIRQ004596; Sat, 29 Mar 2025 20:48:18 GMT (envelope-from git) Date: Sat, 29 Mar 2025 20:48:18 GMT Message-Id: <202503292048.52TKmIRQ004596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: d2859cd9e33c - main - uefisign.8: fix indent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2859cd9e33c26dd792c113fbe16460bfde44035 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d2859cd9e33c26dd792c113fbe16460bfde44035 commit d2859cd9e33c26dd792c113fbe16460bfde44035 Author: Mitchell Horne AuthorDate: 2025-03-29 20:45:47 +0000 Commit: Mitchell Horne CommitDate: 2025-03-29 20:48:06 +0000 uefisign.8: fix indent The current version has every item description beginning on a new line; not the intention. --- usr.sbin/uefisign/uefisign.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/uefisign/uefisign.8 b/usr.sbin/uefisign/uefisign.8 index 753751ce5c75..e80fa8737d48 100644 --- a/usr.sbin/uefisign/uefisign.8 +++ b/usr.sbin/uefisign/uefisign.8 @@ -48,7 +48,7 @@ utility signs PE binary files using Authenticode scheme, as required by UEFI Secure Boot specification. Alternatively, it can be used to view and verify existing signatures. These options are available: -.Bl -tag -width ".Fl l" +.Bl -tag -width indent .It Fl V Determine whether the file is signed. Note that this does not verify the correctness of the signature; From nobody Sat Mar 29 22:09:47 2025 X-Original-To: dev-commits-src-all@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 4ZQBQM21rYz5s8wx; Sat, 29 Mar 2025 22:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQBQM1RV0z40wQ; Sat, 29 Mar 2025 22:09:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743286187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9kebwEujABo5GTAzebFk+JOEN/3hbLcEPf1qbzT4DJw=; b=MwWz9zZJyycfEB5NyH8CErh+kxVwV1Q3IcgZuoa9twYFa1wyh7va6tuDbkiTvXW6qRQqHK LqpXBQTZrMICSpJzm3XWxE79Rz+nIqluCnkhvbrv+BvYKcQdh0p14xubKhHcXzu70s7/Yz pfZAaoWD3zPnOh0cED6GLDl+a/7txjNQB2sWvpuEG6bdW1l+shHJacgDNGHIjoU9QkiN4w N3ZjRlduNtrm87LJ/ZBS997jd9xb5yx6UYsh8O7dektQJbLhmfsP6Ska1zA8lVO0/AglAu 81w7NTE8Y70Igsmx04JPzzmrMolOqp9pabRRqeslulm5jPpx9SAKfBtP44Gcgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743286187; a=rsa-sha256; cv=none; b=OZylYGEEqfxycDWp0+2vGpKm6bhUEQIeOTUcuhpwWjg53BPt40IcEcSrJ01zJXl0wCHqkI uIe9XPaJjD659uDwzu6unv1kwbMP30euNcAiSHuEkzVeuV/ddimZLfwFxTMbsJQXcqtdfL WYry+xSCel+usJEXM2txkjDCIm+b8GHK6V67oGMuhQ7ctrdrR49HweFXMIQU3tZYiYvDcw TMU9FNIckCTxXHUHgkcE2uIFH3qK4ow7eAdnkkInIq2j50DxQvsWscXmXuOF5BpdjlBwnN agpDpPpdOe+xEuIxaDcsgCd9W99Ott0K0wXPmd8hAbRRyuDijx7O/zmLd+e7ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743286187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9kebwEujABo5GTAzebFk+JOEN/3hbLcEPf1qbzT4DJw=; b=iAtEMATuncKMueCPTUBCjS3muBirXPahfnnCHf3KBQuGFK8V3F4++05M2MXqy5zEbFSMOv HGJ93y/Nbq7PNnl4nz3IQnkKB9Ji75jwi5XtSSMS5IRA0himkUl0i03W90xHa5+4IGUiXB YAnbLTRshABFzlPX2gVd8mI9LDfU15a67ReOrqJW5AzsDyoIq5ZcMo2McVOoxjwCZBQZnT rSOaWKFA6JUW2Ofj6KZh4an3p1dMr4Mi/aovT79MKxW5gcR4wtB0NSL5SJm2M34052yryW KRkunmU3B9x6xHaI0bqit1zZUf3XF2TuWA+2CuL6Jqr/Szr8AowwKjTzSEhDVw== 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 4ZQBQM0rZyznpR; Sat, 29 Mar 2025 22:09: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 52TM9lbM054836; Sat, 29 Mar 2025 22:09:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52TM9lLc054833; Sat, 29 Mar 2025 22:09:47 GMT (envelope-from git) Date: Sat, 29 Mar 2025 22:09:47 GMT Message-Id: <202503292209.52TM9lLc054833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: cd46e980134f - main - cred: fix struct credbatch to use long for refcount List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd46e980134f6fc765b28ee9c8bf41e8fc1b0261 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=cd46e980134f6fc765b28ee9c8bf41e8fc1b0261 commit cd46e980134f6fc765b28ee9c8bf41e8fc1b0261 Author: Gleb Smirnoff AuthorDate: 2025-03-29 22:09:15 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-29 22:09:15 +0000 cred: fix struct credbatch to use long for refcount This structure collects count from multiple cred structures. Of course it can't use a smaller type. PR: 283747 Reviewed by: olce, mjg, markj Differential Revision: https://reviews.freebsd.org/D49562 Fixes: 37337709d3334f32650ba3a7c529fa013ed5e1f2 --- sys/kern/kern_prot.c | 2 +- sys/sys/ucred.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 2517b2bc2d4d..cc140d28e13d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2365,7 +2365,7 @@ crunuse(struct thread *td) } static void -crunusebatch(struct ucred *cr, int users, int ref) +crunusebatch(struct ucred *cr, u_int users, long ref) { KASSERT(users > 0, ("%s: passed users %d not > 0 ; cred %p", diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 32fa942493a4..7d04ea7de97f 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -192,8 +192,8 @@ struct proc; struct credbatch { struct ucred *cred; - int users; - int ref; + u_int users; + long ref; }; static inline void From nobody Sun Mar 30 04:01:29 2025 X-Original-To: dev-commits-src-all@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 4ZQLDB4w82z5rPZG; Sun, 30 Mar 2025 04:01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQLDB13DRz3hf8; Sun, 30 Mar 2025 04:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743307290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3I517b3COzJf7nj6KFqLxfSadjFp+5y+ZALpo+CRxjY=; b=oOofNi29x6bFn6aRHc1+JJZXHdO5W6ZdqO7TmWIdPzbt5GH6RpwVutJxK2iNAPkr25eKsW Ere+RGBzDQw+w+PRg5lUmrfpThT5mFgisvddrBXTTIkBwDtxaZVir8fk/GKdMdN/O99hj3 /PTZy7hRdRTOxW490U/f5a+OVegDKhSfglnyWz7kAFQMe4b5sVIgi9JAytKJqskHAvpCBA UgZ4Pnmk1viiXqR3HHLPRADpkiyinSsZabKLAh6pNtyk5QpLYcFwZ9jsxKdotGKz6QuE7x iBR5EVjn31WePC3RwHtx0SSl/9crxg3RPQ7adNYfjoQgzKQAIoxNj+IDdmjXvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743307290; a=rsa-sha256; cv=none; b=WN6PDkyDmnj6SFqDI/ApnXPuVCX2ERn2otHfVoRp+nKdPZMF6Y7KBbHmYVrpuTG7lHdVlB KyJEIVrFQNiDyQj++ii/n+yaPrk6lr6E/CbcWu6gjOgw4jb1YSRjrRLySVh08dRS0X39pJ nDUmACmHYe1ETsFUtjhPmYux+zPozaQvMSboZYxzRS0UgdQyp9NF96GOj990wPxuSmnYQg AzgjQmjyZC4WuSj2TGapDKeO/uzE0qLm12kKm6Mm4CiDTLACy/7RuRVT7amuQtDGvSXEHU SBU2b1CYpYyNaW/BkfORegZq4NR7kI+FQx4sSVs2SNevV7gIP29S5NqaBvshqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743307290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3I517b3COzJf7nj6KFqLxfSadjFp+5y+ZALpo+CRxjY=; b=WpXTQKZ9GIdefyfAUW+vAkiG7WSLR3QzHTZFpzbdK0lt9K2aRKqUAJRK/IT1irLH2YtRN2 qH02sRdYY8Ckbu5/yyRtghgGaefLk1L+g4o5yWuLKxcrgaxXULbWH8wdMI+P5XgM/vEAJJ fkBbnu4PFDL/1q5OLHJCRhbhCxV5h0hD9lPHKEYQdT4SrCpP1OtLueRj2HugKklAQn8EhN 9vOiphYyY4nnkI5L+/kejExFnHvYqXkrJMcXHmhpIQmftoQOc0CD+FJMBqo0oIOnj6hXUc B9XAkh/tpxt2MkzpjuGyoJLz4UlzErjyiweWA4OXBXvj/n+oeQGoPdlHIHTYiw== 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 4ZQLDB0cnhzy6m; Sun, 30 Mar 2025 04:01: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 52U41The021642; Sun, 30 Mar 2025 04:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52U41TKf021639; Sun, 30 Mar 2025 04:01:29 GMT (envelope-from git) Date: Sun, 30 Mar 2025 04:01:29 GMT Message-Id: <202503300401.52U41TKf021639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 83d13d836b32 - main - locks: run the extra NULL check only with INVARIANTS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83d13d836b32af86bba62ddf86c2ef78389d13fd Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=83d13d836b32af86bba62ddf86c2ef78389d13fd commit 83d13d836b32af86bba62ddf86c2ef78389d13fd Author: Gleb Smirnoff AuthorDate: 2025-03-30 03:55:31 +0000 Commit: Gleb Smirnoff CommitDate: 2025-03-30 03:56:05 +0000 locks: run the extra NULL check only with INVARIANTS This reverts commit 73da0265c29c79641dab3e6b98452bd5afca01fb. This reverts commit 87ee63bac69dc49291f55590b8baa57cad6c7d85. Discussed with: mjg --- sys/kern/kern_mutex.c | 4 +--- sys/kern/kern_rwlock.c | 16 ++++------------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index d52f7e1eebd1..f952b3fc8805 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -1073,9 +1073,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) turnstile_chain_lock(&m->lock_object); _mtx_release_lock_quick(m); ts = turnstile_lookup(&m->lock_object); - if (__predict_false(ts == NULL)) { - panic("got NULL turnstile on mutex %p v %p", m, (void *)v); - } + MPASS(ts != NULL); if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index ed6ca75bc7a5..e182d1fe9baf 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -784,12 +784,11 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td, uintptr_t v LOCK_FILE_LINE_ARG_DEF) { struct turnstile *ts; - uintptr_t setv, passedv, queue; + uintptr_t setv, queue; if (SCHEDULER_STOPPED()) return; - passedv = v; if (__rw_runlock_try(rw, td, &v)) goto out_lockstat; @@ -842,10 +841,7 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td, uintptr_t v * release the lock. */ ts = turnstile_lookup(&rw->lock_object); - if (__predict_false(ts == NULL)) { - panic("got NULL turnstile on rwlock %p passedv %p v %p", - rw, (void *)passedv, (void *)v); - } + MPASS(ts != NULL); turnstile_broadcast(ts, queue); turnstile_unpend(ts); td->td_rw_rlocks--; @@ -1223,7 +1219,7 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) { struct rwlock *rw; struct turnstile *ts; - uintptr_t tid, setv, passedv; + uintptr_t tid, setv; int queue; tid = (uintptr_t)curthread; @@ -1271,7 +1267,6 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) * of waiters or doing some complicated lock handoff gymnastics. */ setv = RW_UNLOCKED; - passedv = v; v = RW_READ_VALUE(rw); queue = TS_SHARED_QUEUE; if (v & RW_LOCK_WRITE_WAITERS) { @@ -1286,10 +1281,7 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) queue == TS_SHARED_QUEUE ? "read" : "write"); ts = turnstile_lookup(&rw->lock_object); - if (__predict_false(ts == NULL)) { - panic("got NULL turnstile on rwlock %p passedv %p v %p", rw, - (void *)passedv, (void *)v); - } + MPASS(ts != NULL); turnstile_broadcast(ts, queue); turnstile_unpend(ts); turnstile_chain_unlock(&rw->lock_object); From nobody Sun Mar 30 14:32:58 2025 X-Original-To: dev-commits-src-all@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 4ZQcDq18Drz5rWrJ; Sun, 30 Mar 2025 14:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQcDp2WKTz3Q88; Sun, 30 Mar 2025 14:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743345178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpXJKEbNpg6uWd45D9NxU7tPC4wV5fy6bRnCDHLjl5Q=; b=XyXQJ3qn16vLActfjF3ofMqRT16+HDlZtGH0l2fj6TQ8w1pmq4OvZamX/jJc7LhM5yVhrT 9AgizCN8Y2HtZgDPS9lGUR+BF9MY5NXOFnuuQUW93CfjH/cgxWQhjIKj+g55QFq0ic7t2U 8cBFe/0DBsLU91Cygkqt1s7OKA0pKDviqKQYXeyEpgTVXDfasdKtvQi6OQCjR3a3tbcI24 eKHpNNSW1G6DLf6hZGy/BFKZSq6iMoAOel/a6nepnb4o84W2kyiLaPzPkRv+qu0vCLOBSA Y5HIWlIX4ukiyFQRPiP6cleL9JZXZ27UHR8U5jpiASz7SeDyLwbTjmqx+FY75Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743345178; a=rsa-sha256; cv=none; b=eCD7qfevZNpVmMYcdaMpcMGON41s9oSvo4olJy3XC2izqGHa1I8OvTaXhlwTB5mSr3VO38 0HeGWdy9m/YFYpx4g7Ui34Lh1s50+QTReAYCFLhnBd/c7oiY6VfhcDyzNDJs/pJx8U0jEH InDB1Eub8RLDB3yw4kvm34D4AoomQm/qgaxfrT0BGWy2AmjmzH80Rc2159amlvimipy2of y+EtA8wirf9KQZ+EYZZ3JJnm1Ru/D0L3Siv/MK9PhVrhfT0V8HPGNuoQrgIIiv5OypqzXD ggwUFB2qzkvGytkF7rNB+lUw2evDF9b3YIHpvprbzHwf85f4zg9tBqkVeFpO6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743345178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpXJKEbNpg6uWd45D9NxU7tPC4wV5fy6bRnCDHLjl5Q=; b=WW6iwOP4twkUvD1rtcWpiZPJF4qeX01Avu+nwD1gAN+Q7MlDnmgFLqUDDpOH0pU+OUCd8M 5Au0bCBQuAH7YVlf7R7g8n5nbGIlvSGbXY8xwpXp3SoyBQx4a3lgWuivpFevI0kK5115wQ dIdVY0a1ylGuiMRsGpTVQ7IB0CShyHBM364eBSzPjk8KscnWeka42NdMTQkueRG4TAuqR/ WyWicCksnk6OZ1ydLOP3RitGb22hG0KoqUHFG6HO9Im7st5hGUyyyaeoAcrSwLYX07qNGH 8IH94hjukUMVYcykaI0w1c7UobyaQLDDTXm77CgrEKXDoGxIWrOwMMQBBXWbSA== 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 4ZQcDp26YDz1HQ0; Sun, 30 Mar 2025 14:32: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 52UEWwHB003421; Sun, 30 Mar 2025 14:32:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52UEWwYL003418; Sun, 30 Mar 2025 14:32:58 GMT (envelope-from git) Date: Sun, 30 Mar 2025 14:32:58 GMT Message-Id: <202503301432.52UEWwYL003418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0cc5e57d2d31 - main - src.conf.5: regen after riscv EFI change List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cc5e57d2d31581a95209100e1d63dd3fcbd16ef Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0cc5e57d2d31581a95209100e1d63dd3fcbd16ef commit 0cc5e57d2d31581a95209100e1d63dd3fcbd16ef Author: Ed Maste AuthorDate: 2025-03-30 14:31:12 +0000 Commit: Ed Maste CommitDate: 2025-03-30 14:31:57 +0000 src.conf.5: regen after riscv EFI change Reported by: jlduran Fixes: 269cbe092da3 ("kern.opts.mk: Remove EFI from riscv BROKEN_OPTIONS") --- share/man/man5/src.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 321eea708d04..ac938b47a9e1 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd March 14, 2025 +.Dd March 30, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -646,7 +646,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. +i386/i386, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. .It Va WITH_EFI Build .Xr efivar 3 @@ -654,7 +654,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -amd64/amd64, arm/armv7 and arm64/aarch64. +amd64/amd64, arm/armv7, arm64/aarch64 and riscv/riscv64. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP Do not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) From nobody Sun Mar 30 17:48:25 2025 X-Original-To: dev-commits-src-all@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 4ZQhZL1W3lz5rp4d; Sun, 30 Mar 2025 17:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQhZK6fYPz3RNS; Sun, 30 Mar 2025 17:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=At9QrgFUJAOknBCne9KsDXJfBL2YvT6oJ41vgL9noro=; b=MHjllBHJ4AURGT9xaDi8NV4J0pkHw5CkdSt1C5y2/22Kogxut3ZzitA9x2LODjgLB7Qb0h OE4JS+ZwveT3gwPcZSse2EoFteAhU6Qvhhly4iOpHetcbFLndFcjMe/y7UVL7brRWtVcJP iXuu1IkS9zGj52J/rgmGLa83Lw8BpJgwCavua5NRzFM/E32UdopJocHAK/IKktpryY4+wl 60Gh1Bssw8TODNRG+jPKqn7zy9mTS+vUVCCtuTiFXIWtiS8q8x6ek6Xn+E7aRASt+WJXjv 0ShoAY3D6KKKK26sLjSX1xQRE6DrH3u18vWTJYLRZDAbBcXGyLUNIkFrTg6rFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743356905; a=rsa-sha256; cv=none; b=EvdamIiVmpxdd0uT58EU1wyiLQYBDpHB5ubHQABr2wU78iH7HuDKzgTBmdCRy4LvwAcsey 2MGM3uYLt6PeJP/gQj5XGoFPMhF3vSANtMI6ladPC2s+il+jsn/e1kQgIirnXOKplhFHHY XWK/br/COxuOHCxXa6M3BfFuxA6GmH9XjCUAKDf6xSQqmKUKsNxpHfaez8svaM0oUDEd/p 8tKHjU4YaHcGQUBgjse0ohsPU9l5O/ZScKGaiSB3c76gmDkbjXXn/l9FGQsTSXQ4r4Xidj Xmrm2ojNQEtjv8LD1wtIfnWDopvCPA2Bi6hNX3kY3tphzduaFe1kKuP4GKWl4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=At9QrgFUJAOknBCne9KsDXJfBL2YvT6oJ41vgL9noro=; b=E+b2gKoMVvtFkr9dsCdJ+Cqw3GB0rH8pHQgmK4P3sASs7jssJEtYtAqk/keCx7A40k9Cdx lnwznSprf7PaHMFiW0905+qyvWlICMOxFCY9gLeOYjzjbJcyjHosTXIL5OcIWcavLo4JlX 8+seT8UGJkPo2ZXfSvWzTcj1QL8yaQnpX18LDU8BylPTQSCNT1dWeyzadmA4uS5yZ6DJFF c2dApdBGARlH9I7BgE4sIpY7kLR5v2z4yL9TbeVMyzLEi5G/bAxDU9A3XXCJSPqlQQ+97d HfqMhfnfjB3uITD6/maaOX8R7wx51bNdSHy83RP+nAXlDl3jR4gmZRCA5Kcu5A== 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 4ZQhZK6Dxjz1NMT; Sun, 30 Mar 2025 17:48: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 52UHmPmo060203; Sun, 30 Mar 2025 17:48:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52UHmPRF060200; Sun, 30 Mar 2025 17:48:25 GMT (envelope-from git) Date: Sun, 30 Mar 2025 17:48:25 GMT Message-Id: <202503301748.52UHmPRF060200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: e1bbaa71d62c - main - sound: Implement AFMT_FLOAT support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e1bbaa71d62c8681a576f9f5bedf475c7541bd35 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e1bbaa71d62c8681a576f9f5bedf475c7541bd35 commit e1bbaa71d62c8681a576f9f5bedf475c7541bd35 Author: Christos Margiolis AuthorDate: 2025-03-30 17:45:38 +0000 Commit: Christos Margiolis CommitDate: 2025-03-30 17:45:38 +0000 sound: Implement AFMT_FLOAT support Even though the OSS manual [1] advises against using AFMT_FLOAT, there are applications that expect the sound driver to support it, and might not work properly without it. This patch adds AFMT_F32_LE|BE (as well as AFMT_FLOAT for OSS compatibility) in sys/soundcard.h and implements AFMT_F32_LE|BE <-> AFMT_S32_LE|BE conversion functions. As a result, applications can write/read floats to/from sound(4), but internally, because sound(4) works with integers, we convert floating point samples to integer ones, before doing any processing. The reason for encoding/decoding IEEE754s manually, instead of using fpu_kern(9), is that fpu_kern(9) is not supported by all architectures, and also introduces significant overhead. The IEEE754 encoding/decoding implementation has been written by Ariff Abdullah [2]. [1] http://manuals.opensound.com/developer/AFMT_FLOAT.html [2] https://people.freebsd.org/~ariff/utils/ieee754.c PR: 157050, 184380, 264973, 280612, 281390 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D47638 --- sys/dev/sound/pcm/channel.c | 4 +++ sys/dev/sound/pcm/feeder_chain.c | 2 ++ sys/dev/sound/pcm/feeder_rate.c | 4 +++ sys/dev/sound/pcm/feeder_volume.c | 2 ++ sys/dev/sound/pcm/pcm.h | 67 +++++++++++++++++++++++++++++++++++++-- sys/dev/sound/pcm/sound.h | 13 +++++--- sys/sys/soundcard.h | 8 +++++ tests/sys/sound/pcm_read_write.c | 6 ++++ 8 files changed, 98 insertions(+), 8 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 4a96505ada66..3aa7cf219d81 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -977,9 +977,13 @@ static const struct { #if BYTE_ORDER == LITTLE_ENDIAN { "s32le", "s32", "32", AFMT_S32_LE }, { "s32be", NULL, NULL, AFMT_S32_BE }, + { "f32le", "f32", NULL, AFMT_F32_LE }, + { "f32be", NULL, NULL, AFMT_F32_BE }, #else { "s32le", NULL, NULL, AFMT_S32_LE }, { "s32be", "s32", "32", AFMT_S32_BE }, + { "f32le", NULL, NULL, AFMT_F32_LE }, + { "f32be", "f32", NULL, AFMT_F32_BE }, #endif { "u32le", NULL, NULL, AFMT_U32_LE }, { "u32be", NULL, NULL, AFMT_U32_BE }, diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 1c4ddca6cdd5..56de32441de7 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -102,6 +102,7 @@ static uint32_t feeder_chain_formats_multi[] = { AFMT_S16_LE, AFMT_S16_BE, AFMT_U16_LE, AFMT_U16_BE, AFMT_S24_LE, AFMT_S24_BE, AFMT_U24_LE, AFMT_U24_BE, AFMT_S32_LE, AFMT_S32_BE, AFMT_U32_LE, AFMT_U32_BE, + AFMT_F32_LE, AFMT_F32_BE, 0 }; @@ -111,6 +112,7 @@ static uint32_t feeder_chain_formats_fullmulti[] = { AFMT_S16_LE, AFMT_S16_BE, AFMT_U16_LE, AFMT_U16_BE, AFMT_S24_LE, AFMT_S24_BE, AFMT_U24_LE, AFMT_U24_BE, AFMT_S32_LE, AFMT_S32_BE, AFMT_U32_LE, AFMT_U32_BE, + AFMT_F32_LE, AFMT_F32_BE, 0 }; diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 1610211ff5f5..9ea454cdee1e 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -639,6 +639,8 @@ Z_DECLARE(U, 32, LE) Z_DECLARE(U, 16, BE) Z_DECLARE(U, 24, BE) Z_DECLARE(U, 32, BE) +Z_DECLARE(F, 32, LE) +Z_DECLARE(F, 32, BE) #endif enum { @@ -687,6 +689,8 @@ static const struct { Z_RESAMPLER_ENTRY(U, 16, BE), Z_RESAMPLER_ENTRY(U, 24, BE), Z_RESAMPLER_ENTRY(U, 32, BE), + Z_RESAMPLER_ENTRY(F, 32, LE), + Z_RESAMPLER_ENTRY(F, 32, BE), #endif }; diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index f72c6aa7ef4f..2d35bb56ef8f 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -93,6 +93,8 @@ FEEDVOLUME_DECLARE(U, 32, LE) FEEDVOLUME_DECLARE(U, 16, BE) FEEDVOLUME_DECLARE(U, 24, BE) FEEDVOLUME_DECLARE(U, 32, BE) +FEEDVOLUME_DECLARE(F, 32, LE) +FEEDVOLUME_DECLARE(F, 32, BE) #endif struct feed_volume_info { diff --git a/sys/dev/sound/pcm/pcm.h b/sys/dev/sound/pcm/pcm.h index 1de686b04097..7d0a8f0f431b 100644 --- a/sys/dev/sound/pcm/pcm.h +++ b/sys/dev/sound/pcm/pcm.h @@ -128,7 +128,8 @@ static const struct { static __always_inline __unused intpcm_t pcm_sample_read(const uint8_t *src, uint32_t fmt) { - intpcm_t v; + intpcm_t v, e, m; + bool s; fmt = AFMT_ENCODING(fmt); @@ -190,6 +191,34 @@ pcm_sample_read(const uint8_t *src, uint32_t fmt) v = INTPCM_T(src[3] | src[2] << 8 | src[1] << 16 | (int8_t)(src[0] ^ 0x80) << 24); break; + case AFMT_F32_LE: /* FALLTHROUGH */ + case AFMT_F32_BE: + if (fmt == AFMT_F32_LE) { + v = INTPCM_T(src[0] | src[1] << 8 | src[2] << 16 | + (int8_t)src[3] << 24); + } else { + v = INTPCM_T(src[3] | src[2] << 8 | src[1] << 16 | + (int8_t)src[0] << 24); + } + e = (v >> 23) & 0xff; + /* NaN, +/- Inf or too small */ + if (e == 0xff || e < 96) { + v = INTPCM_T(0); + break; + } + s = v & 0x80000000U; + if (e > 126) { + v = INTPCM_T((s == 0) ? PCM_S32_MAX : PCM_S32_MIN); + break; + } + m = 0x800000 | (v & 0x7fffff); + e += 8 - 127; + if (e < 0) + m >>= -e; + else + m <<= e; + v = INTPCM_T((s == 0) ? m : -m); + break; default: v = 0; printf("%s(): unknown format: 0x%08x\n", __func__, fmt); @@ -241,8 +270,38 @@ pcm_sample_read_calc(const uint8_t *src, uint32_t fmt) static __always_inline __unused void pcm_sample_write(uint8_t *dst, intpcm_t v, uint32_t fmt) { + intpcm_t r, e; + fmt = AFMT_ENCODING(fmt); + if (fmt & (AFMT_F32_LE | AFMT_F32_BE)) { + if (v == 0) + r = 0; + else if (v == PCM_S32_MAX) + r = 0x3f800000; + else if (v == PCM_S32_MIN) + r = 0x80000000U | 0x3f800000; + else { + r = 0; + if (v < 0) { + r |= 0x80000000U; + v = -v; + } + e = 127 - 8; + while ((v & 0x7f000000) != 0) { + v >>= 1; + e++; + } + while ((v & 0x7f800000) == 0) { + v <<= 1; + e--; + } + r |= (e & 0xff) << 23; + r |= v & 0x7fffff; + } + v = r; + } + switch (fmt) { case AFMT_AC3: *(int16_t *)dst = 0; @@ -295,13 +354,15 @@ pcm_sample_write(uint8_t *dst, intpcm_t v, uint32_t fmt) dst[1] = v >> 8; dst[0] = (v >> 16) ^ 0x80; break; - case AFMT_S32_LE: + case AFMT_S32_LE: /* FALLTHROUGH */ + case AFMT_F32_LE: dst[0] = v; dst[1] = v >> 8; dst[2] = v >> 16; dst[3] = v >> 24; break; - case AFMT_S32_BE: + case AFMT_S32_BE: /* FALLTHROUGH */ + case AFMT_F32_BE: dst[3] = v; dst[2] = v >> 8; dst[1] = v >> 16; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 637bcbbe1b00..a1370180f350 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -451,15 +451,17 @@ 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_32BIT (AFMT_S32_LE | AFMT_S32_BE | AFMT_U32_LE | AFMT_U32_BE | \ + AFMT_F32_LE | AFMT_F32_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 | \ +#define AFMT_SIGNED (AFMT_S32_LE | AFMT_S32_BE | AFMT_F32_LE | AFMT_F32_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_BIGENDIAN (AFMT_S32_BE | AFMT_U32_BE | AFMT_F32_BE | \ + AFMT_S24_BE | AFMT_U24_BE | AFMT_S16_BE | AFMT_U16_BE) #define AFMT_CONVERTIBLE (AFMT_8BIT | AFMT_16BIT | AFMT_24BIT | \ AFMT_32BIT) @@ -509,7 +511,8 @@ int sound_oss_card_info(oss_card_info *); #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_SIGNED_NE (AFMT_S8_NE | AFMT_S16_NE | AFMT_S24_NE | \ + AFMT_S32_NE | AFMT_F32_NE) #define AFMT_NE (AFMT_SIGNED_NE | AFMT_U8_NE | AFMT_U16_NE | \ AFMT_U24_NE | AFMT_U32_NE) diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index 304ae38c08d4..aab67532503e 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -184,6 +184,8 @@ struct snd_size { #define AFMT_S24_BE 0x00020000 /* Big endian signed 24-bit */ #define AFMT_U24_LE 0x00040000 /* Little endian unsigned 24-bit */ #define AFMT_U24_BE 0x00080000 /* Big endian unsigned 24-bit */ +#define AFMT_F32_LE 0x10000000 /* Little endian 32-bit floating point */ +#define AFMT_F32_BE 0x20000000 /* Big endian 32-bit floating point */ /* Machine dependent AFMT_* definitions. */ #if BYTE_ORDER == LITTLE_ENDIAN @@ -199,6 +201,8 @@ struct snd_size { #define AFMT_U16_OE AFMT_U16_BE #define AFMT_U24_OE AFMT_U24_BE #define AFMT_U32_OE AFMT_U32_BE +#define AFMT_F32_NE AFMT_F32_LE +#define AFMT_F32_OE AFMT_F32_BE #else #define AFMT_S16_OE AFMT_S16_LE #define AFMT_S24_OE AFMT_S24_LE @@ -212,8 +216,12 @@ struct snd_size { #define AFMT_U16_NE AFMT_U16_BE #define AFMT_U24_NE AFMT_U24_BE #define AFMT_U32_NE AFMT_U32_BE +#define AFMT_F32_NE AFMT_F32_BE +#define AFMT_F32_OE AFMT_F32_LE #endif +#define AFMT_FLOAT AFMT_F32_NE /* compatibility alias */ + #define AFMT_STEREO 0x10000000 /* can do/want stereo */ /* diff --git a/tests/sys/sound/pcm_read_write.c b/tests/sys/sound/pcm_read_write.c index 2aba19840735..a77b953a78a0 100644 --- a/tests/sys/sound/pcm_read_write.c +++ b/tests/sys/sound/pcm_read_write.c @@ -70,6 +70,12 @@ static struct afmt_test_data { {"u32be_1", {0x01, 0x02, 0x03, 0x04}, 4, AFMT_U32_BE, 0x81020304}, {"u32be_2", {0x81, 0x82, 0x83, 0x84}, 4, AFMT_U32_BE, 0x01828384}, + /* 32 bit floating point sample formats. */ + {"f32le_1", {0x00, 0x00, 0x00, 0x3f}, 4, AFMT_F32_LE, 0x40000000}, + {"f32le_2", {0x00, 0x00, 0x00, 0xbf}, 4, AFMT_F32_LE, 0xc0000000}, + {"f32be_1", {0x3f, 0x00, 0x00, 0x00}, 4, AFMT_F32_BE, 0x40000000}, + {"f32be_2", {0xbf, 0x00, 0x00, 0x00}, 4, AFMT_F32_BE, 0xc0000000}, + /* 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}, From nobody Sun Mar 30 17:48:26 2025 X-Original-To: dev-commits-src-all@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 4ZQhZM3XHnz5rp8x; Sun, 30 Mar 2025 17:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQhZM15k1z3RLV; Sun, 30 Mar 2025 17:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VZupORQF3GrA73Ig8v6AlDOhf71nbWGS0675fUH8VMM=; b=ypBXjeb5GNpFJ4+vlEvlR00qKexe4tf90myXi56AhcoU/7HoNWZAcIgptaiVqHHibiDWAK C5rAEmCu3LEF8U+Sb2KrdSbm/X5u0CMJFAWHuRvm6huNPeK3swnxlbsmkR+LAzc/hknw8t MGaRSm3xDbniwbKKfrtlULg05uP71d5O3xQvZb03xuLN4uWdVpi9+0HX5bhz11mXJ8Sgq2 JbankRq3CHRTbspRAK3cnCS3yOyHFYtxOcMtbbjOPS94PLDEOHlOV3CY5GlC4ftKN6EE1c A8/LXdI+7bBej7RUxM23KW1X16SF1WXHsjkXti5MEoiGSGyuVG/P4MdEvfSPrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743356907; a=rsa-sha256; cv=none; b=ohyttg3yfm/XkjdrG+dXWB2Dpd6MMiZvXgpxWSFFT0Kl5KAToXEGEzDi5CH0N2ahaIx16K iGrFtljXOKglG/uge2RESl0D5ELMAXQ/bZ1N/+JDOk99cmYTRON9CdeeUGjIV1+8djbzFg WXguQgrqSTqYd80uznUWXFUETH14vNd1YXMwQoTuVvYqMojP6qH6DW96r59Js0w6XOZMkC 3eaGg/cVbc6mi2AvL+OseAeHwJhHICAxS/yUF9KC4nlxz8L9yDI9ez5NtJEDUDqJ4VGo1m qG/K1A5LMnk2vE2KRxZeozFK27igDAp0KaBXsCvDm0vwHvVVy+JZzaXJHT2MSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VZupORQF3GrA73Ig8v6AlDOhf71nbWGS0675fUH8VMM=; b=JaiqvAkOOJYEWmOvf4dLUCv+B8RkAZiKD6EkT64Xek8CXNVwh+JF/F6tFTrGzfeV9xqxGo LLs0CC+lWareRCnocRCDo3NaoXKw9ZCg7hWnmU4HFwIA2xyjJI5CSZASDisEN1nIj/3UI8 Ml+Lv37T2bC+VB4N3evLf/UZEreAVKG5f46QrgJ+9nqJWqH9BxIbt+FSYE8EIJFxxLIUGR dcoz8bk+H2Qp9ARWsOmMZM1h/2LdLmxNrDXgDm57I1G8oH0XE2UTt5fVykbO/C/jX2rYth tnuV0rK4E4ikkuTweugQaDVZ6LIDgjSHgk9bBy3UBV3OjCQ0dxpvADURqld+yw== 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 4ZQhZM01rxz1P01; Sun, 30 Mar 2025 17:48: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 52UHmQDC060236; Sun, 30 Mar 2025 17:48:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52UHmQ0H060233; Sun, 30 Mar 2025 17:48:26 GMT (envelope-from git) Date: Sun, 30 Mar 2025 17:48:26 GMT Message-Id: <202503301748.52UHmQ0H060233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 1166cfd96f34 - main - beep(1): Use AFMT_FLOAT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1166cfd96f3403edb082387fbc3a4d4aa249bce8 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1166cfd96f3403edb082387fbc3a4d4aa249bce8 commit 1166cfd96f3403edb082387fbc3a4d4aa249bce8 Author: Christos Margiolis AuthorDate: 2025-03-30 17:45:48 +0000 Commit: Christos Margiolis CommitDate: 2025-03-30 17:45:48 +0000 beep(1): Use AFMT_FLOAT AFMT_FLOAT is supported by sound(4) as of FILLME, so use it here, since the whole program works with floats already. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47639 --- usr.bin/beep/beep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c index 2696bacfacf4..0bdfe2cf97a7 100644 --- a/usr.bin/beep/beep.c +++ b/usr.bin/beep/beep.c @@ -152,7 +152,7 @@ usage(void) int main(int argc, char **argv) { - int32_t *buffer; + float *buffer; size_t slope; size_t size; size_t off; @@ -208,9 +208,9 @@ main(int argc, char **argv) if (ioctl(f, SOUND_PCM_WRITE_CHANNELS, &c) != 0) errx(1, "ioctl SOUND_PCM_WRITE_CHANNELS(1) failed"); - c = AFMT_S32_NE; + c = AFMT_FLOAT; if (ioctl(f, SNDCTL_DSP_SETFMT, &c) != 0) - errx(1, "ioctl SNDCTL_DSP_SETFMT(AFMT_S32_NE) failed"); + errx(1, "ioctl SNDCTL_DSP_SETFMT(AFMT_FLOAT) failed"); if (ioctl(f, SNDCTL_DSP_SPEED, &sample_rate) != 0) errx(1, "ioctl SNDCTL_DSP_SPEED(%d) failed", sample_rate); @@ -251,7 +251,7 @@ main(int argc, char **argv) else if (off > (size - slope)) sample = sample * (size - off - 1) / (float)slope; - buffer[off] = sample * 0x7fffff00; + buffer[off] = sample; } if (write(f, buffer, size * sizeof(buffer[0])) != From nobody Sun Mar 30 17:48:28 2025 X-Original-To: dev-commits-src-all@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 4ZQhZN3l6Sz5rp6d; Sun, 30 Mar 2025 17:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQhZN1Mk3z3RTG; Sun, 30 Mar 2025 17:48:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qwKI+C1G5HR1lyS3cUXRZtPbtaFKWOi1nyHYQpvpK4=; b=K41ZR4tpjcgULCA4tBySG8+I/0rg6paOuHAun3Obiu4Y3buyPnk7IU5T+WKQnjyhnrxhoO A5d9OWytk+6FrlWoae9XXKV7U8jIYh2BZV3u9hoVfcfRKR0fbAqTBJ5QTit9BgVORH+Him JG/0mt9jyciz+EAjjwOVLkt3GT2xZtjgdMEHBiOBl6w6YRzEBbcmZtlz3t8HP/UmgjrPdm Ar7uON1fpFF/iAdcErPdsXcVgKkqRPtPJA0vW0NUpbNiZ4UdM3YBfgBLAIDDDYd8Nm2SC2 4CPXVrFkDtmmsB5eas05eJWnVeA7z3WV45f0VFuXRyAnLAD+ZLrykFjIQDbi5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743356908; a=rsa-sha256; cv=none; b=eL2iAjjf32WlqP4F1Op6SFqdD995If1fckiWMU2PAFGozFIhIXgEGYBnnuiH1M8XWN7aSB exZ7wuW2WYBcgVYJNfXc1Q5yIGy6KVsTz0lxH09AuerIZehW/uQU6HM1sjfQvytbk4vF+j 9+xK84fJprjehm8UyWr1jab+/Lo4qI7kvuGmHDY7PO1WoNmo6yo1K/8qZmVSDFHbgwCj+M mDYlP8cDns1cFaCczmPuyR7UkvbfcABrJVRQzyXraErtZQjjPowsq8A2ICzLp5Igrbek7F dcl5gAIMWEK9Jf1JV3yjUnguAfW0sg7iQ/i6w+PgR3kwVaAsXZ3jOzOuYiD0Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qwKI+C1G5HR1lyS3cUXRZtPbtaFKWOi1nyHYQpvpK4=; b=oJ4Zcf5udBCyQdoDFyjEtx5djwvcnt+obbTdv1yufOhi0FjBvtwYAwceDRqak0aejatTuD 847XR4ydiW8/fo4vCbn/vCMkTS5laBateu23I6JdZvZUPkV4KxbkAP7SBua97RLkvZrhsV TnYtnYaLVwOe40ud9Hrf2odRmdBfuDZwqU6/2Xgcfbg+FS7UMsW/p69ORY0XvnHddDq4Rl 9d+0e4IvZwVNIFSeAq6T5TLql81OOpWoOkPfHbnQIjxVOB0Vmu2DzwCZ3vKohT2ayhsLQI Mu8lVt14FG/Tga21tEaZ7hCLleGA2I6OUa9lhIhrmD/0zciQjVTKsnKC2N1Z8g== 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 4ZQhZN0yrsz1NMV; Sun, 30 Mar 2025 17:48: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 52UHmSfN060269; Sun, 30 Mar 2025 17:48:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52UHmSFw060266; Sun, 30 Mar 2025 17:48:28 GMT (envelope-from git) Date: Sun, 30 Mar 2025 17:48:28 GMT Message-Id: <202503301748.52UHmSFw060266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: a4aff024fd53 - main - sound: Improve afmt_tab List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a4aff024fd53a38ba08bbf5309589e1865ffe024 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a4aff024fd53a38ba08bbf5309589e1865ffe024 commit a4aff024fd53a38ba08bbf5309589e1865ffe024 Author: Christos Margiolis AuthorDate: 2025-03-30 17:45:53 +0000 Commit: Christos Margiolis CommitDate: 2025-03-30 17:45:53 +0000 sound: Improve afmt_tab Reduce ifdefs, and add aliases for the unsigned formats. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D48009 --- sys/dev/sound/pcm/channel.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 3aa7cf219d81..31a56a8b82e2 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -961,33 +961,38 @@ static const struct { { "mulaw", NULL, NULL, AFMT_MU_LAW }, { "u8", "8", NULL, AFMT_U8 }, { "s8", NULL, NULL, AFMT_S8 }, + { "ac3", NULL, NULL, AFMT_AC3 }, #if BYTE_ORDER == LITTLE_ENDIAN { "s16le", "s16", "16", AFMT_S16_LE }, { "s16be", NULL, NULL, AFMT_S16_BE }, -#else - { "s16le", NULL, NULL, AFMT_S16_LE }, - { "s16be", "s16", "16", AFMT_S16_BE }, -#endif - { "u16le", NULL, NULL, AFMT_U16_LE }, - { "u16be", NULL, NULL, AFMT_U16_BE }, - { "s24le", NULL, NULL, AFMT_S24_LE }, + { "s24le", "s24", "24", AFMT_S24_LE }, { "s24be", NULL, NULL, AFMT_S24_BE }, - { "u24le", NULL, NULL, AFMT_U24_LE }, - { "u24be", NULL, NULL, AFMT_U24_BE }, -#if BYTE_ORDER == LITTLE_ENDIAN { "s32le", "s32", "32", AFMT_S32_LE }, { "s32be", NULL, NULL, AFMT_S32_BE }, { "f32le", "f32", NULL, AFMT_F32_LE }, { "f32be", NULL, NULL, AFMT_F32_BE }, + { "u16le", "u16", NULL, AFMT_U16_LE }, + { "u16be", NULL, NULL, AFMT_U16_BE }, + { "u24le", "u24", NULL, AFMT_U24_LE }, + { "u24be", NULL, NULL, AFMT_U24_BE }, + { "u32le", "u32", NULL, AFMT_U32_LE }, + { "u32be", NULL, NULL, AFMT_U32_BE }, #else + { "s16le", NULL, NULL, AFMT_S16_LE }, + { "s16be", "s16", "16", AFMT_S16_BE }, + { "s24le", NULL, NULL, AFMT_S24_LE }, + { "s24be", "s24", "24", AFMT_S24_BE }, { "s32le", NULL, NULL, AFMT_S32_LE }, { "s32be", "s32", "32", AFMT_S32_BE }, { "f32le", NULL, NULL, AFMT_F32_LE }, { "f32be", "f32", NULL, AFMT_F32_BE }, -#endif + { "u16le", NULL, NULL, AFMT_U16_LE }, + { "u16be", "u16", NULL, AFMT_U16_BE }, + { "u24le", NULL, NULL, AFMT_U24_LE }, + { "u24be", "u24", NULL, AFMT_U24_BE }, { "u32le", NULL, NULL, AFMT_U32_LE }, - { "u32be", NULL, NULL, AFMT_U32_BE }, - { "ac3", NULL, NULL, AFMT_AC3 }, + { "u32be", "u32", NULL, AFMT_U32_BE }, +#endif { NULL, NULL, NULL, 0 } }; From nobody Sun Mar 30 17:48:29 2025 X-Original-To: dev-commits-src-all@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 4ZQhZP4tNhz5rpHJ; Sun, 30 Mar 2025 17:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQhZP25zwz3RNh; Sun, 30 Mar 2025 17:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHq2E14kWYoMQiKVbr6ba0Emsu3n4ubyelv+sGLYAww=; b=yepkQPYDAaGMQok4deT6hodXqE8t8aF48k9Tj2TTWl3REsURAFcKsnblZP9XRmvF3SSuuG 58XHjl8EKInDN5sNsjzoe7E5skwlmyPzLANUKQiVYWRYU1vrvx/TFUJr+9fBTymajKx539 eAkGuLSs4TaAxphMMbRQlXzlzyVmHMMz5kuye1YiZfmPgE9HEd0mLwux2UcTlRVYIo8g5A YASY1D0D9rvAtM/SJ8Mo5+cpXQjgO9JRjgMFqcyW6aNaMQzx2r1BGZyR/khWDnsdy71ecj KxquzwxyZlZx4lHZPCCKG0tUqW0F3DD6q0xoZKlKHQBAckUkNKFtIGVg4iTO7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743356909; a=rsa-sha256; cv=none; b=WMIvpuMdM12TRWhPPh7LaQHWCO7D18f8QgbcJdMq0KBxb8/nnQn3NjdcTjDKgd9wbzltCd VJyJDEPzi0BXPUQHm65cY7nXAL+6Hq8emgPTQvOUYW2tpjai2zo6P54MGvRxe4bug0hZDS TH+hFfTzayCS/Y7jPmS1nI6V3aqzz4IJk8ScNQykNQeWzmmFyXEtiU05AMqxwx8IXDBHub DAM6UkIvlByGHuUOUxqXfEzIOGeeD7cZDAMlwHsRl/gxqXGqstegyg+2kw3WNikyqo7uKm LJs66mXVngcZaFIGHcgJmNLVr/7w/ctyM48rOmQ5KWyBzgP82nioa88RaVB5wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743356909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHq2E14kWYoMQiKVbr6ba0Emsu3n4ubyelv+sGLYAww=; b=omeK5XhuXYGq8KhMjGSu5Gp6oMatxELXRw5m3DS01NBAEthDFD2K3fsRNSah67jIypkYGI 8bN6nYoOpcsIngiZbnnx/IQYgv0AQsN4Wl+TBab/9iaACbBNF72maAav2akrwsNE+rZZUs 3CxXXxmtXt4jSPUqi1c28Y5RXA/ILwBEH16K2RoYb7upvJia+X7JijecIkM3wKRB0Rgtk+ pkCavfiZOXrEn/9bZ4UCwvatJfSryUmuYg72rsnogDwBQEjmEcXCXFTL/dvAriPox3PsbO PGyW1ifWXm17N3RI7B4A/UonGSHEa+N7LBWQc2D+AgIWjRw3jusrvd6fdpgipw== 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 4ZQhZP1hjFz1NQ7; Sun, 30 Mar 2025 17:48: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 52UHmTwE060302; Sun, 30 Mar 2025 17:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52UHmToa060299; Sun, 30 Mar 2025 17:48:29 GMT (envelope-from git) Date: Sun, 30 Mar 2025 17:48:29 GMT Message-Id: <202503301748.52UHmToa060299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 35400672df83 - main - sound: Use bus_topo_lock() where appropriate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 35400672df83e337f8792df1972a15003b603930 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=35400672df83e337f8792df1972a15003b603930 commit 35400672df83e337f8792df1972a15003b603930 Author: Christos Margiolis AuthorDate: 2025-03-30 17:46:14 +0000 Commit: Christos Margiolis CommitDate: 2025-03-30 17:46:14 +0000 sound: Use bus_topo_lock() where appropriate Lock around uses of devclass_*() and replace leftover CTLFLAG_NEEDGIANTs with CTLFLAG_MPSAFE. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D46700 --- sys/dev/sound/pcm/channel.c | 6 ++++-- sys/dev/sound/pcm/dsp.c | 6 ++++++ sys/dev/sound/pcm/feeder_rate.c | 4 +++- sys/dev/sound/pcm/mixer.c | 5 +++++ sys/dev/sound/pcm/sound.c | 19 +++++++++++++++++-- sys/dev/sound/pcm/vchan.c | 28 +++++++++++++++++++++++----- 6 files changed, 58 insertions(+), 10 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 31a56a8b82e2..4d13f20a5262 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -132,6 +132,7 @@ chn_vpc_proc(int reset, int db) struct pcm_channel *c; int i; + bus_topo_lock(); for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); @@ -150,6 +151,7 @@ chn_vpc_proc(int reset, int db) PCM_RELEASE(d); PCM_UNLOCK(d); } + bus_topo_unlock(); } static int @@ -170,7 +172,7 @@ sysctl_hw_snd_vpc_0db(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_hw_snd, OID_AUTO, vpc_0db, - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, sizeof(int), + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_vpc_0db, "I", "0db relative level"); @@ -190,7 +192,7 @@ sysctl_hw_snd_vpc_reset(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_hw_snd, OID_AUTO, vpc_reset, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(int), + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_vpc_reset, "I", "reset volume on all channels"); diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 422c64c1b880..c5caeea8a002 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2016,6 +2016,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) if (ai->dev == -1 && i_dev->si_devsw != &dsp_cdevsw) return (EINVAL); + bus_topo_lock(); for (unit = 0; pcm_devclass != NULL && unit < devclass_get_maxunit(pcm_devclass); unit++) { d = devclass_get_softc(pcm_devclass, unit); @@ -2023,6 +2024,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) if ((ai->dev == -1 && unit == snd_unit) || ai->dev == unit) { dsp_oss_audioinfo_unavail(ai, unit); + bus_topo_unlock(); return (0); } else { d = NULL; @@ -2041,6 +2043,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) d = NULL; } } + bus_topo_unlock(); /* Exhausted the search -- nothing is locked, so return. */ if (d == NULL) @@ -2197,6 +2200,7 @@ dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) * Search for the requested audio device (channel). Start by * iterating over pcm devices. */ + bus_topo_lock(); for (unit = 0; pcm_devclass != NULL && unit < devclass_get_maxunit(pcm_devclass); unit++) { d = devclass_get_softc(pcm_devclass, unit); @@ -2346,9 +2350,11 @@ dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) CHN_UNLOCK(ch); PCM_UNLOCK(d); + bus_topo_unlock(); return (0); } + bus_topo_unlock(); /* Exhausted the search -- nothing is locked, so return. */ return (EINVAL); diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 9ea454cdee1e..9c29142b9d6b 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -258,6 +258,7 @@ sysctl_hw_snd_feeder_rate_quality(SYSCTL_HANDLER_ARGS) * set resampler quality if and only if it is exist as * part of feeder chains and the channel is idle. */ + bus_topo_lock(); for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); @@ -279,11 +280,12 @@ sysctl_hw_snd_feeder_rate_quality(SYSCTL_HANDLER_ARGS) PCM_RELEASE(d); PCM_UNLOCK(d); } + bus_topo_unlock(); return (0); } SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_quality, - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, sizeof(int), + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_feeder_rate_quality, "I", "sample rate converter quality ("__XSTRING(Z_QUALITY_MIN)"=low .. " __XSTRING(Z_QUALITY_MAX)"=high)"); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 7bd0a2e14c46..092af3298f0e 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1444,12 +1444,14 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) * There's a 1:1 relationship between mixers and PCM devices, so * begin by iterating over PCM devices and search for our mixer. */ + bus_topo_lock(); for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); if (!PCM_REGISTERED(d)) { if ((mi->dev == -1 && i == snd_unit) || mi->dev == i) { mixer_oss_mixerinfo_unavail(mi, i); + bus_topo_unlock(); return (0); } else continue; @@ -1470,6 +1472,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) if (d->mixer_dev->si_drv1 == NULL) { mixer_oss_mixerinfo_unavail(mi, i); PCM_UNLOCK(d); + bus_topo_unlock(); return (0); } @@ -1550,8 +1553,10 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) PCM_UNLOCK(d); + bus_topo_unlock(); return (0); } + bus_topo_unlock(); return (EINVAL); } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 3bd6087b54da..f6c35769e7f3 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -116,17 +116,21 @@ sysctl_hw_snd_default_unit(SYSCTL_HANDLER_ARGS) unit = snd_unit; error = sysctl_handle_int(oidp, &unit, 0, req); if (error == 0 && req->newptr != NULL) { + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, unit); - if (!PCM_REGISTERED(d) || CHN_EMPTY(d, channels.pcm)) + if (!PCM_REGISTERED(d) || CHN_EMPTY(d, channels.pcm)) { + bus_topo_unlock(); return EINVAL; + } snd_unit = unit; snd_unit_auto = 0; + bus_topo_unlock(); } return (error); } /* XXX: do we need a way to let the user change the default unit? */ SYSCTL_PROC(_hw_snd, OID_AUTO, default_unit, - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_ANYBODY | CTLFLAG_NEEDGIANT, 0, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_default_unit, "I", "default sound device"); @@ -213,6 +217,7 @@ pcm_best_unit(int old) best = -1; bestprio = -100; + bus_topo_lock(); for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); @@ -228,6 +233,8 @@ pcm_best_unit(int old) bestprio = prio; } } + bus_topo_unlock(); + return (best); } @@ -557,6 +564,7 @@ sound_oss_sysinfo(oss_sysinfo *si) j = 0; + bus_topo_lock(); for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); @@ -583,6 +591,7 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCK(d); } + bus_topo_unlock(); si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** @@ -603,9 +612,11 @@ sound_oss_sysinfo(oss_sysinfo *si) * break if they try to loop through all mixers and some of them are * not available. */ + bus_topo_lock(); si->nummixers = devclass_get_maxunit(pcm_devclass); si->numcards = devclass_get_maxunit(pcm_devclass); si->numaudios = devclass_get_maxunit(pcm_devclass); + bus_topo_unlock(); /* OSSv4 docs: Intended only for test apps; API doesn't really have much of a concept of cards. Shouldn't be used by applications. */ @@ -631,6 +642,7 @@ sound_oss_card_info(oss_card_info *si) struct snddev_info *d; int i; + bus_topo_lock(); for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); @@ -658,8 +670,11 @@ sound_oss_card_info(oss_card_info *si) PCM_UNLOCK(d); } + bus_topo_unlock(); return (0); } + bus_topo_unlock(); + return (ENXIO); } diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 1f184f21807e..31a4f7db8d70 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -259,9 +259,13 @@ sysctl_dev_pcm_vchans(SYSCTL_HANDLER_ARGS) struct snddev_info *d; int err, enabled, flag; + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, VCHAN_SYSCTL_UNIT(oidp->oid_arg1)); - if (!PCM_REGISTERED(d)) + if (!PCM_REGISTERED(d)) { + bus_topo_unlock(); return (EINVAL); + } + bus_topo_unlock(); PCM_LOCK(d); PCM_WAIT(d); @@ -317,9 +321,13 @@ sysctl_dev_pcm_vchanmode(SYSCTL_HANDLER_ARGS) int *vchanmode, direction, ret; char dtype[16]; + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, VCHAN_SYSCTL_UNIT(oidp->oid_arg1)); - if (!PCM_REGISTERED(d)) + if (!PCM_REGISTERED(d)) { + bus_topo_unlock(); return (EINVAL); + } + bus_topo_unlock(); PCM_LOCK(d); PCM_WAIT(d); @@ -407,9 +415,13 @@ sysctl_dev_pcm_vchanrate(SYSCTL_HANDLER_ARGS) struct pcm_channel *c, *ch; int *vchanrate, direction, ret, newspd, restart; + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, VCHAN_SYSCTL_UNIT(oidp->oid_arg1)); - if (!PCM_REGISTERED(d)) + if (!PCM_REGISTERED(d)) { + bus_topo_unlock(); return (EINVAL); + } + bus_topo_unlock(); PCM_LOCK(d); PCM_WAIT(d); @@ -499,9 +511,13 @@ sysctl_dev_pcm_vchanformat(SYSCTL_HANDLER_ARGS) int *vchanformat, direction, ret, restart; char fmtstr[AFMTSTR_LEN]; + bus_topo_lock(); d = devclass_get_softc(pcm_devclass, VCHAN_SYSCTL_UNIT(oidp->oid_arg1)); - if (!PCM_REGISTERED(d)) + if (!PCM_REGISTERED(d)) { + bus_topo_unlock(); return (EINVAL); + } + bus_topo_unlock(); PCM_LOCK(d); PCM_WAIT(d); @@ -749,6 +765,7 @@ sysctl_hw_snd_vchans_enable(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); + bus_topo_lock(); snd_vchans_enable = v >= 1; for (i = 0; pcm_devclass != NULL && @@ -766,11 +783,12 @@ sysctl_hw_snd_vchans_enable(SYSCTL_HANDLER_ARGS) d->flags &= ~(SD_F_PVCHANS | SD_F_RVCHANS); PCM_RELEASE_QUICK(d); } + bus_topo_unlock(); return (0); } SYSCTL_PROC(_hw_snd, OID_AUTO, vchans_enable, - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, sizeof(int), + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_vchans_enable, "I", "global virtual channel switch"); void From nobody Sun Mar 30 21:29:30 2025 X-Original-To: dev-commits-src-all@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 4ZQnTR0cfYz5s6nF; Sun, 30 Mar 2025 21:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQnTQ5Mkjz3GBN; Sun, 30 Mar 2025 21:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743370170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CvtBFKYVHBTZvWomW1w5avSrjq1yYsZd56JdmLv96+I=; b=YV5ENHO892Jpd5bR5tbWOmD18NA8gTVO8vXWY3RvBlXySmUK/7IJh6m8t3HbjrNIvOXG9L clrd/fFXsjgqoeIJ2x2xPqKb8sNrXKvGupJdB/axdcu2mEz8M7hGyv9HkxazwWqBUSrHM0 YgFBImEF5Qj2G+rR9rPINvvvuqCncVKo6PClV99gDh5b3PQ1dM3CouMcwbRHBUw2x+Wzae 0CoHbY1zl7O6u3gYnKDdtPVGoAvaclbVYOZ2yZ6Q5pfv02PJHNmTf46SRIhxL2mA/n0k6S zLwUCsyd0PTC0XrDF10R92+gfuGzHOyypiUrttqbkBw6wK0AHNU69xusX5ki2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743370170; a=rsa-sha256; cv=none; b=ijw0G3fJ7VVRCaf4543xJ9e1yyEVM3My1FoFd8WjDNB4OhJ2htnSn7lkysILTL9Cgu0h/R I88a4v5pj3U8OqqZCy64QL0q0zR+Ak1mtvqICPgNI8TkadDK6DZXgUhYOepdgtaQlwXmbN liHTomY4GlbIUje4L0KfQTop0Uyok+5w7rlCmBuAi+wX6q4yCw8fGvtOpK2OgqWDEAW7Nn Kog2o/5N2TQI+qAkA0W49HD4nXXACCd/NnamW6VZReQH4Tw6M6IDSFlLy1HWzEOI09NX67 HnPAdZn9NvBXNPdwnQGikVNS71vzlupmxqMuVCZNNqPUkQi01DAgb0Ab1GGbrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743370170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CvtBFKYVHBTZvWomW1w5avSrjq1yYsZd56JdmLv96+I=; b=bUvVk3TB3yw2Aa76mjU+wWsTeZcZ2Rw9ePXBqmBnvmfAL7Wo/GCbqcHIzRs/qFACppcEph UKbvjXavHYfyI4HeifLnCdJFaunabcRv3bk1my3WnOJ+W4eLnmKWO9VeNS10PzkNZL/87B dMYQiid3Dln11iXS8vVXzfBJIZepM70wWxZBm2/CwYtnoxjYnZdocEzrb5kmsDxLIlobCS jSQR0aoyjKc9J/3/gI60SoJHOJkfjZB279p+BpNPihsv42pkDgk+TZ8uzHl5LxwaTC5xzM PcG7Gn+T1i0xPWyFYwsPajLKIUaibQ6mq3BKCUOAYd9yVPRAU5ghjQN8IKZ4RQ== 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 4ZQnTQ4J1Zz28c; Sun, 30 Mar 2025 21:29: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 52ULTUdd071986; Sun, 30 Mar 2025 21:29:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52ULTUO7071984; Sun, 30 Mar 2025 21:29:30 GMT (envelope-from git) Date: Sun, 30 Mar 2025 21:29:30 GMT Message-Id: <202503302129.52ULTUO7071984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: b6420b5ea5bc - main - sound: Fix regression in pcm/feeder_mixer.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b6420b5ea5bcdeb859a2b3357e5dbaafe7aaff88 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b6420b5ea5bcdeb859a2b3357e5dbaafe7aaff88 commit b6420b5ea5bcdeb859a2b3357e5dbaafe7aaff88 Author: Christos Margiolis AuthorDate: 2025-03-30 21:27:09 +0000 Commit: Christos Margiolis CommitDate: 2025-03-30 21:27:09 +0000 sound: Fix regression in pcm/feeder_mixer.c This call was meant to be the default case in the first place, but somehow missed this. Reported by: glebius Fixes: 4021fa32d92d ("sound: Simplify pcm/feeder_mixer.c") MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/sound/pcm/feeder_mixer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c index 1d3b7e31d055..b6b81ad9a51c 100644 --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -337,9 +337,11 @@ feed_mixer_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, feed_mixer_apply(tmp, b, cnt, AFMT_S32_NE); break; + default: + feed_mixer_apply(tmp, b, cnt, + info->format); + break; } - feed_mixer_apply(tmp, b, cnt, - info->format); if (cnt > rcnt) rcnt = cnt; } From nobody Sun Mar 30 23:45:36 2025 X-Original-To: dev-commits-src-all@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 4ZQrVT1pzXz5sGkM; Sun, 30 Mar 2025 23:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZQrVT0X6Jz40lJ; Sun, 30 Mar 2025 23:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743378337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBF73yvCwiecHmIWJZrN8Do3R4bg8ktEmDPGUnK2bkE=; b=PKfQwA9//Mt+7iAK96LmJgJE8wDeEIM2E7FCLTnx671AZSasLfdw++q7jiNRGfedtw3Q6H 2izMV2LEk1AZZLUi7L9bK8c3hRpyVJY6W/I05DleJ5MZytmdNbjcYKV3KgPtnHZ8d9xfT6 JUDFrE49fMyy7XcG4t6rpYTpgDojKFQ4gy+H8mhjmQlxuHBv/7k9/B1NaXD1DBqWknfJnA qS8KtHmqzXKBbLWhSe73HNzPt+Ugez70vzQvLGqVHXHXLEoORGclkN9DxWpOkuAuDkOdp4 8gP+nNzQIFQsQIcWe0RSe+7/8X5u9mwCsSEv2/kSts3ZlBXtELn2ctJsG0uiuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743378337; a=rsa-sha256; cv=none; b=O0eKz9IgU4H+s6dv4QN72sdRilv0ZDtN6BILBOpPiEdB2Q4hOemJdFLl0XHRv5GqwHn8Hw W2HtpeAdA4lY34ZBPHMGBuGImNslsLm73JOOmbMPDvbPW+OMnsPNRmckDtsmNrXNtvzTQY 6ksiHTKlgALfth0Owe/7QFTYALy7tdoQLEUolBOhWHjQ3AbHD0jR+ItJ+c461TRnKQqQV+ uCocO+QmKUQaz/soHj9VRtHcuFPW3IJvCxtFRfRXEiGUf31TIu+anUT+w0MrXvFw1nYPyH Pbg5G+/iGmdDnPpgxM/VsotZ/PzinLE20l1BrO7UdwStEmicBy93f7bVOQB7BA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743378337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBF73yvCwiecHmIWJZrN8Do3R4bg8ktEmDPGUnK2bkE=; b=S+YmcDKU+GL1NDYYhnD5km4GYmnk/Ri1jMh0R9V21EDmi9LSBaeWmFJmn2576maY1XuaNs vXb/FpECB/gyJNI+OxsZfeGfhkav5ji1pQblM5cDreFw6CI5ItmVAVwz1I8pIHtcy2q+ke uqEqiG+EabavilYyfiAPqiefTUQ4fEZOd5r9p40FvIKgtEHNnWI7Hn+lK3xv2IqYk5i5Rv yFdwo1uxeSAWaqMh+Yh0yHCQC4sFhH+gKkS4iwYogQk2PCcIzazQE+2S5Tohi56XiVRfka orVu49jWAL88vYIViasyTQUHoZkCesBcyjaACEaZrxs5IzR1f4SgNrRgJiTa3Q== 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 4ZQrVS6pBXz4hM; Sun, 30 Mar 2025 23:45: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 52UNjawv032727; Sun, 30 Mar 2025 23:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52UNjaC0032724; Sun, 30 Mar 2025 23:45:36 GMT (envelope-from git) Date: Sun, 30 Mar 2025 23:45:36 GMT Message-Id: <202503302345.52UNjaC0032724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 25df691800f0 - stable/14 - nvme: Fix hotplug on one of the amazon platforms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 25df691800f08756228d3ac52ac64d80e9fe998d Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=25df691800f08756228d3ac52ac64d80e9fe998d commit 25df691800f08756228d3ac52ac64d80e9fe998d Author: Warner Losh AuthorDate: 2025-02-25 16:29:14 +0000 Commit: Colin Percival CommitDate: 2025-03-30 23:44:57 +0000 nvme: Fix hotplug on one of the amazon platforms Amazon EC2 m7i cloud instances use PCI hotplug rather than ACPI hotplug. The card is removed and detach is called to remove the drive from the system. The hardware is no longer present at this point, but the bridge doesn't translate the now-missing hardware reads to all ff's leading us to conclude the hardware is there and we need to do a proper shutdown of it. Fix this oversight by asking the bridge if the device is still present as well. We need both tests since some systems one cane remove the card w/o a hotplug event and we want to fail-safe in those cases. Convert gone to a bool while I'm here and update a comment about shutting down the controller and why that's important. Tested by: cperciva Sponsored by: Netflix (cherry picked from commit dc95228d98474aba940e3885164912b419c5579d) --- sys/dev/nvme/nvme_ctrlr.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 5a825c10f584..6f5d6ae74add 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1513,7 +1513,8 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) void nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) { - int gone, i; + int i; + bool gone; ctrlr->is_dying = true; @@ -1523,10 +1524,16 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) goto noadminq; /* - * Check whether it is a hot unplug or a clean driver detach. - * If device is not there any more, skip any shutdown commands. + * Check whether it is a hot unplug or a clean driver detach. If device + * is not there any more, skip any shutdown commands. Some hotplug + * bridges will return zeros instead of ff's when the device is + * departing, so ask the bridge if the device is gone. Some systems can + * remove the drive w/o the bridge knowing its gone (they don't really + * do hotplug), so failsafe with detecting all ff's (impossible with + * this hardware) as the device being gone. */ - gone = (nvme_mmio_read_4(ctrlr, csts) == NVME_GONE); + gone = bus_child_present(dev) == 0 || + (nvme_mmio_read_4(ctrlr, csts) == NVME_GONE); if (gone) nvme_ctrlr_fail(ctrlr); else @@ -1554,17 +1561,17 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) nvme_admin_qpair_destroy(&ctrlr->adminq); /* - * Notify the controller of a shutdown, even though this is due to - * a driver unload, not a system shutdown (this path is not invoked - * during shutdown). This ensures the controller receives a - * shutdown notification in case the system is shutdown before - * reloading the driver. + * Notify the controller of a shutdown, even though this is due to a + * driver unload, not a system shutdown (this path is not invoked uring + * shutdown). This ensures the controller receives a shutdown + * notification in case the system is shutdown before reloading the + * driver. Some NVMe drives need this to flush their cache to stable + * media and consider it a safe shutdown in SMART stats. */ - if (!gone) + if (!gone) { nvme_ctrlr_shutdown(ctrlr); - - if (!gone) nvme_ctrlr_disable(ctrlr); + } noadminq: if (ctrlr->taskqueue)