From nobody Mon Mar 24 01:41:21 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 05:57:04 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 Tue Mar 25 03:02:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 20:29:44 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:55 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZMjH82QjHz5rnZZ; Tue, 25 Mar 2025 21:09: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 4ZMjH74GJMz3T5q; Tue, 25 Mar 2025 21:09:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742936995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7Naj1g9UV2aNH2B6J8xCawOwRg7ZG4sWwGn8nkClGM=; b=BU9KykydMY5L67m2l1P/zcnBklIoMbBJaX6Awg7lzGtZQJgNv4khqhRLN6HXMPf6JHXSEp VNQEhfXNYzQYQBz8r0Ifn6LY0DRv0Q5CFeEoZYkoTXBAG+FU+BFKPD8lhRwrVpg24c/lOw N6odp27FVyZqWm2qLOwgFzZQwuZTn3JSfIxrrFmRrpjJoUlIDv71nnPQLHbqotXo9kB/d8 MIuoujC26CDz+g3irZq5IT0Fj3EgbyYhhuTLP9O2ClBoUFRAQtk9Edu9Aov3661JObkbPK L3yM1EIhDGHrjDxfsIhw11Qd22NV7CBRmmua6YNgm6Gcc6Y51CQLacYqpF1siQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742936995; a=rsa-sha256; cv=none; b=nN8lm+bEEpr8kI/qEzmpOjZKNiGTgfYlxZWPisj2aK5ME0ru10Uf+IUm6KQ9tBCPNmyTEX PJA7Qy4nu3vd0bQKaTlUBnGn4NXupqebayEznZE2yr5Mzp03uK8NS/K0rocd24kqxOgKbp exe2leYNzeLklE9imFTYKVedtlfToy4Vzbvw/PUUbqxOkei9jQ2fhYW7r8FYZ4XUhtjrsk MiUKIjg+geZueKYLJzo8SQNIVKeAV0uV1BYPMmoijhTzaHZ081gUre2+6i4e+jTzACVeQh r8xlVHJqaTxSG/WKMzaWcxV5We3GgixWBa+WGTLT1PzUV7Pe8zXI9ga6/J5dzQ== 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=1742936995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7Naj1g9UV2aNH2B6J8xCawOwRg7ZG4sWwGn8nkClGM=; b=Cm1M2/EBel7yegtlpc+8XGpWfvLEi/Vu6p42vNmLoYYtXpMibigfTuXLZQZrGqgHamK42d YcBbWGUavW5YFbuG+VEjsUldM/AP/rQr7l/49JEJfSydTSZTnd78cUxJzcyqfdEPHfs98O nOBnH3bE3EUcz+DKZcInXtfYfm+YO+R9S9eFCkAXwBHPSHkNCxcIsSfSg9RhlFCSGtzXVk HiRh0JACRkoGfvGNJU8aT9Uo/ovRnqRPb3vjYc+PxWJeIKOnq8aAUBKT5hZLITJ7ielPaL 0VhEx7AWCTQ0YNXFjmMfyZSgDnKgLiLLaOn70psiz65M2/savg0f8O+pSuJEVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZMjH73sBQzwt1; Tue, 25 Mar 2025 21:09: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 52PL9teX060264; Tue, 25 Mar 2025 21:09:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PL9tld060261; Tue, 25 Mar 2025 21:09:55 GMT (envelope-from git) Date: Tue, 25 Mar 2025 21:09:55 GMT Message-Id: <202503252109.52PL9tld060261@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: 0d61082e3c64 - stable/14 - openssl: update ASM and version info for 3.0.16 import List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0d61082e3c64a43f52ec5f1bf3d85671d97d9514 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0d61082e3c64a43f52ec5f1bf3d85671d97d9514 commit 0d61082e3c64a43f52ec5f1bf3d85671d97d9514 Author: Enji Cooper AuthorDate: 2025-03-06 18:07:54 +0000 Commit: Enji Cooper CommitDate: 2025-03-25 21:07:59 +0000 openssl: update ASM and version info for 3.0.16 import MFC after: 1 week MFC with: 0d0c8621fd181e507f0fb50ffcca606faf66a8c2 Differential Revision: https://reviews.freebsd.org/D49297 (cherry picked from commit d2a55e6a9348bb55038dbc6b727ab041085f22db) --- crypto/openssl/include/openssl/opensslv.h | 10 +++++----- secure/lib/libcrypto/Makefile.inc | 4 ++-- sys/crypto/openssl/aarch64/armv8-mont.S | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h index dd0aece423cd..8e11963343e9 100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@ -29,7 +29,7 @@ extern "C" { */ # define OPENSSL_VERSION_MAJOR 3 # define OPENSSL_VERSION_MINOR 0 -# define OPENSSL_VERSION_PATCH 15 +# define OPENSSL_VERSION_PATCH 16 /* * Additional version information @@ -74,21 +74,21 @@ extern "C" { * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and * OPENSSL_VERSION_BUILD_METADATA_STR appended. */ -# define OPENSSL_VERSION_STR "3.0.15" -# define OPENSSL_FULL_VERSION_STR "3.0.15" +# define OPENSSL_VERSION_STR "3.0.16" +# define OPENSSL_FULL_VERSION_STR "3.0.16" /* * SECTION 3: ADDITIONAL METADATA * * These strings are defined separately to allow them to be parsable. */ -# define OPENSSL_RELEASE_DATE "3 Sep 2024" +# define OPENSSL_RELEASE_DATE "11 Feb 2025" /* * SECTION 4: BACKWARD COMPATIBILITY */ -# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.15 3 Sep 2024" +# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.16 11 Feb 2025" /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ # ifdef OPENSSL_VERSION_PRE_RELEASE diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 174dd5c5bf2e..8a20f1478bd5 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -2,8 +2,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 3.0.15 -OPENSSL_DATE= 2024-09-03 +OPENSSL_VER= 3.0.16 +OPENSSL_DATE= 2025-02-11 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/sys/crypto/openssl/aarch64/armv8-mont.S b/sys/crypto/openssl/aarch64/armv8-mont.S index 8b85fb080aba..b429f39ee326 100644 --- a/sys/crypto/openssl/aarch64/armv8-mont.S +++ b/sys/crypto/openssl/aarch64/armv8-mont.S @@ -17,10 +17,12 @@ bn_mul_mont: cmp x5,#32 b.le .Lscalar_impl #ifndef __KERNEL__ +#ifndef __AARCH64EB__ adrp x17,OPENSSL_armv8_rsa_neonized ldr w17,[x17,#:lo12:OPENSSL_armv8_rsa_neonized] cbnz w17, bn_mul8x_mont_neon #endif +#endif .Lscalar_impl: tst x5,#7 From nobody Tue Mar 25 21:09:54 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:58 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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 Wed Mar 26 01:04:32 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:51 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZMq1w1qXnz5s5vJ; Wed, 26 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 4ZMq1v2Y0Hz3r9P; Wed, 26 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=1742952531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TTEgV6NdqNpmX91sO+7AyAtjEmaoT1YE1spdeNiDOkw=; b=k/Kq9JflH6PI2Y5+U2qVcy6tkKm+YJplDgYgCtPQXWstFyMgfOvUQgYBiN4ZRVPTWX24DZ eHk3GDwSxdUO7p6FQORo6KHEnMLj3vMHmBOOKEPAdQe0oKKXBO+wsxwS4u7pqh96TQjhOV CvAue+MO90jmcuBhhRtS6CY+ibd/KVwTW/k7Lps86+E0qQJeIC83lwRjyUgRaMYgxnGVKY hh8Uit7tHYxh/dVVyaaGPcLIb8W0zcT/iBwNkr/L4Gdqj+QgamzrurFoGhZsKMuvY3vNpN 7jvgRqWqRDu0gp++OIUEqEJTaRlEVYPs3zBibzCuwN7T92MRKwLeq/mFc6yCVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952531; a=rsa-sha256; cv=none; b=r4uFc2aK8//5qQEPVuZgPig3gs6JVJjb1Nf9P25e2q6s/lRkemiRitAwb8fS2IswN0X8tX 3aU8HPi3x1grztPYalwU+B62MlSsxDQRmeT4uhZpI7Xe/U+KYW9gWIdPvSgsu37HLlNYL0 wJjjTf1JQ0lBoSEvhqSPzcN0TvzATNBNyiRxDsjXiMHqY3eyopDnCESQEhjekrdc5cuJZ0 JY3GUm4hG1WYGd/T2gb66bOO05eDHkSfiw9u35qRzr/SXWcagRGmcmYheEQfjt43lNUnoO 2y/EzXW6B9TBKlc1IN5dij1A7WgIvRUafzP+5MdFa2dWAF7Yz4PHGzZRp2rtyQ== 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=1742952531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TTEgV6NdqNpmX91sO+7AyAtjEmaoT1YE1spdeNiDOkw=; b=jdeWyD0Q5CW2Pc2gjO9ZamtqQredbz+BleAUThWGaOz1tm4UZbA/NOzV42xlfvZnOAO+4z aApAlrbQkNuwUcBtD22LASZKgGIv3umFaqDROp38C9YgDzpJq8vrOcN62FBFr9u/u8kO3x asDOm1ZFVKyt+cwQSGPEz7ddI39aweGKslnv6MLaWX8dMbJYXnah9cMl8dzDKBeT1fVDrl 9fBV728L7VmKUNuw4aCvf6Ol+YWI1IJKDW91B9sjFOpAA+5wCCKLiAXfYDkyXpgXurhn0e 5R1eiWC1HPm/L6A0J6Py19Bu+EDg7MT0PQOsbrNmV9Nxh9kHEFibpoe4f/2JGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZMq1v28PBz1544; Wed, 26 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 52Q1Spic046981; Wed, 26 Mar 2025 01:28:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1Spnr046978; Wed, 26 Mar 2025 01:28:51 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:28:51 GMT Message-Id: <202503260128.52Q1Spnr046978@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: 1a8a24e34031 - stable/14 - acpi_iicbus: Shift slave address List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a8a24e34031513e9b311f55c46b9294d7aec426 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8a24e34031513e9b311f55c46b9294d7aec426 commit 1a8a24e34031513e9b311f55c46b9294d7aec426 Author: Ahmad Khalifa AuthorDate: 2024-04-19 22:43:19 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:37 +0000 acpi_iicbus: Shift slave address The address is expected to need shifting. see https://uefi.org/specs/ACPI/6.5/13_System_Mgmt_Bus_Interface_Specification.html#smbus-slave-addresses Reviewed by: imp, markj, Elliott Mitchell Pull Request: https://github.com/freebsd/freebsd-src/pull/1125 (cherry picked from commit 67677a654aa7456f18077ccbaa9c40f39a36d21a) --- sys/dev/iicbus/acpi_iicbus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/iicbus/acpi_iicbus.c b/sys/dev/iicbus/acpi_iicbus.c index c585f241fece..53171a72d995 100644 --- a/sys/dev/iicbus/acpi_iicbus.c +++ b/sys/dev/iicbus/acpi_iicbus.c @@ -255,6 +255,9 @@ acpi_iicbus_space_handler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, sc = __containerof(info, struct acpi_iicbus_softc, space_handler_info); dev = sc->super_sc.dev; + /* the address is expected to need shifting */ + sb->SlaveAddress <<= 1; + switch (Function) { case AML_FIELD_ATTRIO(AML_FIELD_ATTRIB_SEND_RECEIVE, ACPI_READ): val = acpi_iicbus_recvb(dev, sb->SlaveAddress, gsb->data); From nobody Wed Mar 26 01:28:52 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:29:00 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZMq254Zpdz5s5ml; 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 4ZMq241Qm2z3rRs; Wed, 26 Mar 2025 01:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742952540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TEY1fT9ns1535zXPtD8mHA9zPZQRcAzif4iCn9TaK3A=; b=OU8pCGGM+REuzxbS4R3MyOYS0I/5Ytkf1jeJuqGOBkIoRKqf7UprOVAKFygt9nfa57gpbj H6SxW5XtVJEKrTgOG2kpOGp6joBelV8QDXNPmn+HIMg0XSPnSkoiSyWtr/AvdCP9I2UUFS E5Gd99JDJ7Nw+7sGTgK8D7F8x1l2Eo3fWcPZ0+qTTNUD401JQhsIpPb/pwGuAImRh/t7gD 4xQFfCWTkF5+5NWtp/qSNWHm72BANWH/2DIQKHkN7p2k/KwQGtKJ7RngrOvEaSiWuY1krh j97lY1wmWZYQr8BiJHtpKFm+zNNLILe+/F/E5Z1a5jTuLpc9TIxlf73RPkMzXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742952540; a=rsa-sha256; cv=none; b=FevjFpjb/VgzbOtD6/pgtiQ6IPbeSiH1gyagYkhWFkMk8mVJxTrEAWdaMAlESx/Qzhm0qN A9+QLcNh1luSqyP0z0uPrvpiglEprXVWQJObWKNWx0sEycZWYLuXrnnG3ltC7fSTbqb8EJ YmzpOFN1Bi4GWPbsD7/XG8cwKprOq79NIxgJFgw08wxIIBR3hqSuyQLTnaKK/QbzpiXwp0 zf+rKtfHE9CBLyyzy60P4lsjl9F2yBMZwGYcPzGREXFk70I2WWdwBFi1qh2zvLUS94m/HZ poj1T5fADDToXKH74qUC9JOELMUwchuB5VzKX8QfYqaMrvVRJIqdlAxToiBn9Q== 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=1742952540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TEY1fT9ns1535zXPtD8mHA9zPZQRcAzif4iCn9TaK3A=; b=hX9lsr353K107zJ6n32SqKKLCNZZXbeSi+eq2ZB0+F8cq0o/czIivF9RbNEZt5gY28xpsF psgxVlX/A5Fvp1x6TYUUmQ+kHgOloF1RtmtRyj906IilT0FZj/Y5+M4fAH0eDBEW/vPbj0 C3NwgXzxSa8CPMET1cL46V+P/1yvgcRGvc3osz0Kln55TwJfZrKsxDEghOv2oZDZYYnZmq Sr9OW+IDB5z+dSsbQ8bfdgrWtNAwQFSqHU5+z3XC6BFOnAwrZJ9rYrHI9ePKtWyR8FJ8bi 2NRlS5LsuzMLUAOKjILPTbyo149WWgx1AZX8onO2QEzgwTr2Mciz969W/OGxOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZMq240xmXz14cH; Wed, 26 Mar 2025 01:29: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 52Q1T00G047283; Wed, 26 Mar 2025 01:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52Q1T0cZ047280; Wed, 26 Mar 2025 01:29:00 GMT (envelope-from git) Date: Wed, 26 Mar 2025 01:29:00 GMT Message-Id: <202503260129.52Q1T0cZ047280@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: 92aa078752ee - stable/14 - loader: Fix shadow_fb allocation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 92aa078752ee7ae7347710f6be425b3d4c6802eb Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=92aa078752ee7ae7347710f6be425b3d4c6802eb commit 92aa078752ee7ae7347710f6be425b3d4c6802eb Author: Ahmad Khalifa AuthorDate: 2024-05-31 09:41:32 +0000 Commit: Warner Losh CommitDate: 2025-03-26 01:28:38 +0000 loader: Fix shadow_fb allocation Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is treated as the highest address we can receive. Since gfx_state->tg_shadow_fb is NULL, we never receive anything. Use AllocateAnyPages instead. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1098 (cherry picked from commit 95f75b0e6e5f71d34e4eef151f43822e33838663) --- stand/efi/loader/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 2f580309c2f3..c954a2471340 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -656,7 +656,7 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) gfx_state->tg_shadow_sz = EFI_SIZE_TO_PAGES(efifb.fb_height * efifb.fb_width * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); - status = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, gfx_state->tg_shadow_sz, (EFI_PHYSICAL_ADDRESS *)&gfx_state->tg_shadow_fb); if (status != EFI_SUCCESS) From nobody Wed Mar 26 01:28:59 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:01 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:02 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:03 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:04 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:06 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:29:07 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:39:30 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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 05:42:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 15:49:12 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 18:08:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:09:51 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZNKDb6smQz5rCmw; Wed, 26 Mar 2025 21:09: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 4ZNKDb2nHCz3fY4; Wed, 26 Mar 2025 21:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743023391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OBzbC8DFGn3rJ2sXQGiAoTZoYyimpoPHH3dT3t7Bv9M=; b=VWMRnN/ycvQLCCGZMJY/Sm6UjJ5nl3KKsGN1mFr3JqOs+40L/mJFxuEfG5MIgJyYpWmDRb VHXiPoZ5RJnJ+7jKOSjA5UqC8ImNAhLgK+toup2kLRDAp5vGxlqXkya44dXj1V/6NbsYaa wJctyy3K92e7AWP3kR3LPXhcn7Ql+IV5Po+r06C892PpsQpRUlEgIWq3TZu6znaTf6Ywpb 7VEfLT6WxsuODpCDcqFFMH5a/og4+NB+FeqmrvPLKOZl1EkULmudtqQ5r/KuhhWTfoZ7ct 1bV9NW05fczdiYomLe/XSEjkHdCrNcOcYQPvyK85oZMalUQ2Vs+Wwl9u7iPljw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743023391; a=rsa-sha256; cv=none; b=NTNuh3C9j61nW5widJ42zCET136MlT67Pi0FPyx4foN45IXYEwmTZv4DOqoCTQ4iaHeusV RsOyf5Q3I+/OT1gzM1pfCb8fbZBrJcbbozffDROE6wmnyLHIAeAItaMuCApa6wx4AjOCmO oZmTbd7yUGrynfVRcZ4OdcPmOk9n3JpYKDOn555ug+2mRzJ22YO1NFN4uiqSJPHGEwJzBn T681ZGmEsnAG5xNwCgQ4I3EPNaRpZpmCfDaiR2ZyxAkFRgf14mj/VjMFfZm3Q5lf3ZZowl uXJ7IT3QNK4B6yLg68yQrG5E9pmIpH53N1zm5OcQWQADC4SnPgf2TvAHNGAhTA== 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=1743023391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OBzbC8DFGn3rJ2sXQGiAoTZoYyimpoPHH3dT3t7Bv9M=; b=xu4JxRodZgxFiwMfzzqtw2FoiiuQ+y/VrUHOxMuekv+ngjVGtTwjf6tmym1ei3HmOFjBJ7 HuhqSYcomdxzdA6U3TmHKdx7xWe5JNKlW+tdXP14J0wO9Oy9GTl6Xg2CXon+Lk9ogCLZ3w czH5CJ5XMD05WjFneBBH58kzZUdrMwpnfIImW5NE3ApySQabxl/W+RjChjXU2HXLD9RbUD B3sIlcknhr4IxXXA0xJPIwb7kNUFCSuhmJ/n+uyXI8LkhFRklN4WgtUaJilQJ365XNilJ9 jwjVNIted4bdV/8FxJmewGjK0bDvCncszD8SkxmIZaeg99VBuy5NtpU3WDliQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZNKDb2GfGzBPC; Wed, 26 Mar 2025 21:09: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 52QL9pl1052772; Wed, 26 Mar 2025 21:09:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QL9pnp052769; Wed, 26 Mar 2025 21:09:51 GMT (envelope-from git) Date: Wed, 26 Mar 2025 21:09:51 GMT Message-Id: <202503262109.52QL9pnp052769@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: eb331308b0d5 - stable/13 - tests/sys/fs/fusefs: include iomanip header List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb331308b0d59eeb00b40a25580d4091dd9cc07e Auto-Submitted: auto-generated The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=eb331308b0d59eeb00b40a25580d4091dd9cc07e commit eb331308b0d59eeb00b40a25580d4091dd9cc07e Author: Enji Cooper AuthorDate: 2024-10-19 15:34:07 +0000 Commit: Enji Cooper CommitDate: 2025-03-26 19:34:05 +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 f6c7975ac36e..03294b9da2a1 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -38,6 +38,8 @@ extern "C" { #include } +#include + #include "mockfs.hh" #include "utils.hh" From nobody Wed Mar 26 21:12:26 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 Thu Mar 27 17:27:19 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:18:40 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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 Fri Mar 28 00:46:12 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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:14 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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:15 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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:16 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 Sat Mar 29 00:43:41 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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:47 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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 Sun Mar 30 23:45:36 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 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)