From owner-svn-src-stable@freebsd.org Sun Dec 6 07:09:36 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 036664743EB; Sun, 6 Dec 2020 07:09:36 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpcy76ccZz3Hg4; Sun, 6 Dec 2020 07:09:35 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D17453B8D; Sun, 6 Dec 2020 07:09:35 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B679ZYb044166; Sun, 6 Dec 2020 07:09:35 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B679ZgZ044163; Sun, 6 Dec 2020 07:09:35 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060709.0B679ZgZ044163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368376 - in stable/12/usr.sbin: crashinfo moused syslogd X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12/usr.sbin: crashinfo moused syslogd X-SVN-Commit-Revision: 368376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:09:36 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:09:34 2020 New Revision: 368376 URL: https://svnweb.freebsd.org/changeset/base/368376 Log: MFC r367900, r367902, r367903 r367900: syslog.conf(5): Fix a few mandoc warnings - new sentence, new line - skipping paragraph macro: Pp at the end of Sh r367902: crashinfo(8): Fix a few mandoc warnings - new sentence, new line r367903: moused(8): Fix a few mandoc warnings - new sentence, new line Modified: stable/12/usr.sbin/crashinfo/crashinfo.8 stable/12/usr.sbin/moused/moused.8 stable/12/usr.sbin/syslogd/syslog.conf.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/crashinfo/crashinfo.8 ============================================================================== --- stable/12/usr.sbin/crashinfo/crashinfo.8 Sun Dec 6 04:59:24 2020 (r368375) +++ stable/12/usr.sbin/crashinfo/crashinfo.8 Sun Dec 6 07:09:34 2020 (r368376) @@ -89,9 +89,11 @@ and The options are as follows: .Bl -tag -width indent .It Fl b -Run in batch mode. Write most messages to the +Run in batch mode. +Write most messages to the .Pa core.txt.XX -file instead of the terminal. This flag is used when +file instead of the terminal. +This flag is used when .Nm is run during boot. .It Fl d Ar crashdir Modified: stable/12/usr.sbin/moused/moused.8 ============================================================================== --- stable/12/usr.sbin/moused/moused.8 Sun Dec 6 04:59:24 2020 (r368375) +++ stable/12/usr.sbin/moused/moused.8 Sun Dec 6 07:09:34 2020 (r368376) @@ -147,7 +147,8 @@ is enabled, the option can be used to set the .Ar distance (in pixels) that the mouse must move before a scroll event -is generated. This effectively controls the scrolling speed. +is generated. +This effectively controls the scrolling speed. The default .Ar distance is 2 pixels. @@ -240,20 +241,21 @@ drive the pointer quickly across the screen. The .Ar exp value specifies the exponent, which is basically -the amount of acceleration. Useful values are in the -range 1.1 to 2.0, but it depends on your mouse hardware -and your personal preference. A value of 1.0 means no -exponential acceleration. A value of 2.0 means squared -acceleration (i.e. if you move the mouse twice as fast, -the pointer will move four times as fast on the screen). +the amount of acceleration. +Useful values are in the range 1.1 to 2.0, but it depends on +your mouse hardware and your personal preference. +A value of 1.0 means no exponential acceleration. +A value of 2.0 means squared acceleration (i.e. if +you move the mouse twice as fast, the pointer will move +four times as fast on the screen). Values beyond 2.0 are possible but not recommended. A good value to start is probably 1.5. .Pp The optional .Ar offset -value specifies the distance at which the acceleration -begins. The default is 1.0, which means that the -acceleration is applied to movements larger than one unit. +value specifies the distance at which the acceleration begins. +The default is 1.0, which means that the acceleration is applied +to movements larger than one unit. If you specify a larger value, it takes more speed for the acceleration to kick in, i.e. the speed range for small and accurate movements is wider. @@ -263,8 +265,8 @@ not satisfied with the behaviour, try a value of 2.0. Note that the .Fl A option interacts badly with the X server's own acceleration, -which doesn't work very well anyway. Therefore it is -recommended to switch it off if necessary: +which doesn't work very well anyway. +Therefore it is recommended to switch it off if necessary: .Dq xset m 1 . .It Fl a Ar X Ns Op , Ns Ar Y Accelerate or decelerate the mouse input. Modified: stable/12/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/12/usr.sbin/syslogd/syslog.conf.5 Sun Dec 6 04:59:24 2020 (r368375) +++ stable/12/usr.sbin/syslogd/syslog.conf.5 Sun Dec 6 07:09:34 2020 (r368376) @@ -245,7 +245,8 @@ specification is a line beginning with or .Ql \&: and the following blocks will be applied only when filter value -matches given filter propertie's value. See +matches given filter propertie's value. +See .Sx PROPERTY-BASED FILTERS section for more details. .Pp @@ -464,8 +465,8 @@ or .Ql \&: followed by three comma-separated fields .Em property , operator , \&"value\&" . -Value must be double-quoted. A double quote and backslash must be escaped by -a backslash. +Value must be double-quoted. +A double quote and backslash must be escaped by a backslash. .Pp Following .Em properties @@ -521,7 +522,6 @@ Operator may be prefixed by .Ql icase_ - to make comparison function case insensitive .El -.Pp .Sh IMPLEMENTATION NOTES The .Dq kern From owner-svn-src-stable@freebsd.org Sun Dec 6 07:22:39 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5757C474BE1; Sun, 6 Dec 2020 07:22:39 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CpdFC20FWz3JcH; Sun, 6 Dec 2020 07:22:39 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 372923C7F; Sun, 6 Dec 2020 07:22:39 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B67MdKK055849; Sun, 6 Dec 2020 07:22:39 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B67McsH055848; Sun, 6 Dec 2020 07:22:38 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060722.0B67McsH055848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368377 - in stable/12: usr.bin/iscsictl usr.sbin/bsnmpd/modules/snmp_wlan X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: usr.bin/iscsictl usr.sbin/bsnmpd/modules/snmp_wlan X-SVN-Commit-Revision: 368377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:22:39 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:22:38 2020 New Revision: 368377 URL: https://svnweb.freebsd.org/changeset/base/368377 Log: MFC r367898, r367899 r367898: iscsi.conf(5): Fix a mandoc warning - new sentence, new line r367899: snmp_wlan(3): Fix mandoc warnings - new sentence, new line Modified: stable/12/usr.bin/iscsictl/iscsi.conf.5 stable/12/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/iscsictl/iscsi.conf.5 ============================================================================== --- stable/12/usr.bin/iscsictl/iscsi.conf.5 Sun Dec 6 07:09:34 2020 (r368376) +++ stable/12/usr.bin/iscsictl/iscsi.conf.5 Sun Dec 6 07:22:38 2020 (r368377) @@ -146,9 +146,9 @@ for iSCSI over RDMA, or Default is .Qq Ar iSCSI . .It Cm dscp -The DiffServ Codepoint used for sending data. The DSCP can be -set to numeric, or hexadecimal values directly, as well as the -well-defined +The DiffServ Codepoint used for sending data. +The DSCP can be set to numeric, or hexadecimal values directly, +as well as the well-defined .Qq Ar cs and .Qq Ar af Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 ============================================================================== --- stable/12/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Sun Dec 6 07:09:34 2020 (r368376) +++ stable/12/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Sun Dec 6 07:22:38 2020 (r368377) @@ -41,8 +41,8 @@ The .Nm snmp_wlan module implements a private BEGEMOT-WIRELESS-MIB, which allows -management of virtual wireless interfaces. The MIB defines objects similar to the -state data and configuration capabilities of +management of virtual wireless interfaces. +The MIB defines objects similar to the state data and configuration capabilities of .Xr ifconfig 8 for configuring virtual wireless interfaces. Therefore one should consider adding write communities or loading the @@ -52,15 +52,15 @@ module on systems where security is crucial. A short description of the Tables and interesting objects in the MIB follows. .Bl -tag -width "XXXXXXXXX" .It Va wlanInterfaceTable -The table is used for creation and deletion of virtual wireless interfaces. To -add a new interface, a SET should be executed on the +The table is used for creation and deletion of virtual wireless interfaces. +To add a new interface, a SET should be executed on the .Va wlanIfaceName column with -value the desired name of the interface. Next the parent interface must be set -via +value the desired name of the interface. +Next the parent interface must be set via .Va wlanParentIfName -column. Any optional parameters may be set -via the +column. +Any optional parameters may be set via the .Va wlanIfaceOperatingMode , .Va wlanIfaceFlags , .Va wlanIfaceBssid @@ -78,9 +78,9 @@ The table contains information about the hardware capa a wireless interface. .It Va wlanIfaceConfigTable The table is used to get or set various configuration parameters for a virtual -wireless interface. Depending on the operating mode of the interface and the -hardware capabilities of the underlying hardware interface, not all parameters -and values may be supported. +wireless interface. +Depending on the operating mode of the interface and the hardware capabilities +of the underlying hardware interface, not all parameters and values may be supported. .It Va wlanIfacePeerTable The table contains information about the associated stations for interfaces operating as access points, or the stations identified as neighbors in the IBSS @@ -106,8 +106,9 @@ Access Control configuration for wireless interfaces o The table with Access Control MAC entries for which the configured Access Control Policy on wireless interfaces operating in Host AP mode is applied. .Va wlanMACAccessControlMACStatus -column is used to add or delete MAC ACL entries. A set with value createAndGo(4) -will add new entry, while with value destroy(6) will delete an existing one. +column is used to add or delete MAC ACL entries. +A set with value createAndGo(4) will add new entry, while with value destroy(6) +will delete an existing one. .It Va wlanMeshRoutingConfig The subtree contains system configuration related to Wireless Mesh Routing. .It Va wlanMeshInterfaceTable @@ -121,8 +122,9 @@ The mesh routing table for interfaces operating as mes forwarding packets on a mesh network. .Va wlanMeshRouteStatus column is used to add or delete entries in the mesh routing table for an -interface. A set with value createAndGo(4) will add new entry, while with value -destroy(6) will delete an existing one. +interface. +A set with value createAndGo(4) will add new entry, while with value destroy(6) +will delete an existing one. .It Va wlanMeshStatsTable Summary statistics for each virtual wireless interface operating as mesh point. .It Va wlanMeshHWMPConfig From owner-svn-src-stable@freebsd.org Sun Dec 6 07:38:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59BC5474C11; Sun, 6 Dec 2020 07:38:59 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpdc31mlFz3K27; Sun, 6 Dec 2020 07:38:59 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B93A489F; Sun, 6 Dec 2020 07:38:59 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B67cwqb062627; Sun, 6 Dec 2020 07:38:58 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B67cwgv062626; Sun, 6 Dec 2020 07:38:58 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060738.0B67cwgv062626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368378 - stable/12/sbin/fsck X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/sbin/fsck X-SVN-Commit-Revision: 368378 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:38:59 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:38:58 2020 New Revision: 368378 URL: https://svnweb.freebsd.org/changeset/base/368378 Log: MFC r344922 (by wosch): explain ``fsck -f'' more in detail PR: 223491 Approved by: mckusick, 0mp, imp Differential Revision: https://reviews.freebsd.org/D19437 Modified: stable/12/sbin/fsck/fsck.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/fsck/fsck.8 ============================================================================== --- stable/12/sbin/fsck/fsck.8 Sun Dec 6 07:22:38 2020 (r368377) +++ stable/12/sbin/fsck/fsck.8 Sun Dec 6 07:38:58 2020 (r368378) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2016 +.Dd March 5, 2019 .Dt FSCK 8 .Os .Sh NAME @@ -142,8 +142,12 @@ only if .Nm is compiled to support it. .It Fl f -Force checking of file systems, even when they are marked clean (for file systems -that support this). +Force checking of file systems. +Running +.Dq Li fsck -f +ignores the journal and does a full +consistency check of the disk so will find and fix the errors about which the +journal is unaware. .It Fl n Causes .Nm From owner-svn-src-stable@freebsd.org Sun Dec 6 07:47:11 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26394474C79; Sun, 6 Dec 2020 07:47:11 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CpdnW0cr7z3KcH; Sun, 6 Dec 2020 07:47:11 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0826844E4; Sun, 6 Dec 2020 07:47:11 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B67lA45068762; Sun, 6 Dec 2020 07:47:10 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B67lAs4068761; Sun, 6 Dec 2020 07:47:10 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060747.0B67lAs4068761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368379 - stable/12/usr.sbin/mountd X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/usr.sbin/mountd X-SVN-Commit-Revision: 368379 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:47:11 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:47:10 2020 New Revision: 368379 URL: https://svnweb.freebsd.org/changeset/base/368379 Log: MFC r344013 and r344015 (by cracauer) r344013: Clarify NFSv4 /etc/exports semantics, with working example. The existing wording has been confusing users for years. r344015: Bump .Dd for today's edit. Thank you Enji Cooper Modified: stable/12/usr.sbin/mountd/exports.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/mountd/exports.5 ============================================================================== --- stable/12/usr.sbin/mountd/exports.5 Sun Dec 6 07:38:58 2020 (r368378) +++ stable/12/usr.sbin/mountd/exports.5 Sun Dec 6 07:47:10 2020 (r368379) @@ -28,7 +28,7 @@ .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd May 20, 2017 +.Dd Feb 11, 2019 .Dt EXPORTS 5 .Os .Sh NAME @@ -498,6 +498,40 @@ and any client within the 131.104.48 subnet is permitt operations on the server, so long as valid Kerberos credentials are provided. The machine grumpy.cis.uoguelph.ca is permitted to perform NFSv4 state operations on the server using AUTH_SYS credentials, as well as Kerberos ones. +.Pp +In the following example some directories are exported as NFSv3 and NFSv4: +.Bd -literal -offset indent +V4: /wingsdl/nfsv4 +/wingsdl/nfsv4/usr-ports -maproot=root -network 172.16.0.0 -mask 255.255.0.0 +/wingsdl/nfsv4/clasper -maproot=root clasper +.Ed +.Pp +Only one V4: line is needed or allowed to declare where NFSv4 is +rooted. The other lines declare specific exported directories with +their absolute paths given in /etc/exports. +.Pp +The exported directories' paths are used for both v3 and v4. +However, they are interpreted differently for v3 and v4. A client +mount command for usr-ports would use the server-absolute name when +using nfsv3: +.Bd -literal -offset indent +mount server:/wingsdl/nfsv4/usr-ports /mnt/tmp +.Ed +.Pp +A mount command using NFSv4 would use the path relative to the NFSv4 +root: +.Bd -literal -offset indent +mount server:/usr-ports /mnt/tmp +.Ed +.Pp +This also differentiates which version you want if the client can do +both v3 and v4. The former will only ever do a v3 mount and the +latter will only ever do a v4 mount. +.Pp +Note that due to different mount behavior between NFSv3 and NFSv4 a +NFSv4 mount request for a directory that the client does not have +permission for will succeed and read/write access will fail +afterwards, whereas NFSv3 rejects the mount request. .Sh SEE ALSO .Xr nfsv4 4 , .Xr netgroup 5 , From owner-svn-src-stable@freebsd.org Sun Dec 6 07:50:18 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB8544755B1; Sun, 6 Dec 2020 07:50:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpds66Bk3z3KZy; Sun, 6 Dec 2020 07:50:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCBD245DC; Sun, 6 Dec 2020 07:50:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B67oIYH069109; Sun, 6 Dec 2020 07:50:18 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B67oGdj069094; Sun, 6 Dec 2020 07:50:16 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060750.0B67oGdj069094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368380 - in stable/12: sbin/devmatch sbin/fsck sbin/mount_msdosfs usr.bin/chat usr.bin/du usr.bin/setchannel usr.bin/tftp usr.sbin/ctladm usr.sbin/extattrctl usr.sbin/i2c usr.sbin/moun... X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: sbin/devmatch sbin/fsck sbin/mount_msdosfs usr.bin/chat usr.bin/du usr.bin/setchannel usr.bin/tftp usr.sbin/ctladm usr.sbin/extattrctl usr.sbin/i2c usr.sbin/mountd usr.sbin/nfsuserd usr.... X-SVN-Commit-Revision: 368380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:50:19 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:50:15 2020 New Revision: 368380 URL: https://svnweb.freebsd.org/changeset/base/368380 Log: MFC r366572: Fix a few mandoc issues - no blank before trailing delimiter - whitespace at end of input line - sections out of conventional order - normalizing date format - AUTHORS section without An macro Modified: stable/12/sbin/devmatch/devmatch.8 stable/12/sbin/fsck/fsck.8 stable/12/sbin/mount_msdosfs/mount_msdosfs.8 stable/12/usr.bin/chat/chat.8 stable/12/usr.bin/du/du.1 stable/12/usr.bin/setchannel/setchannel.1 stable/12/usr.bin/tftp/tftp.1 stable/12/usr.sbin/ctladm/ctladm.8 stable/12/usr.sbin/extattrctl/extattrctl.8 stable/12/usr.sbin/i2c/i2c.8 stable/12/usr.sbin/mountd/exports.5 stable/12/usr.sbin/nfsuserd/nfsuserd.8 stable/12/usr.sbin/pmcstudy/pmcstudy.8 stable/12/usr.sbin/traceroute6/traceroute6.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/devmatch/devmatch.8 ============================================================================== --- stable/12/sbin/devmatch/devmatch.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/sbin/devmatch/devmatch.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -69,6 +69,8 @@ Produce more verbose output. .Sh SEE ALSO .Xr devinfo 8 , .Xr MODULE_PNP_INFO 9 +.Sh AUTHORS +.An Warner Losh Aq Mt imp@FreeBSD.org .Sh BUGS The kernel has hints in it, but we exclude it from the list of modules to suggest for unmatched devices. @@ -92,5 +94,3 @@ logical equivalent in USB, PCI, and others. .Pp Many drivers currently lack proper PNP table decorations and need to be updated. -.Sh AUTHORS -.An Warner Losh Aq Mt imp@FreeBSD.org Modified: stable/12/sbin/fsck/fsck.8 ============================================================================== --- stable/12/sbin/fsck/fsck.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/sbin/fsck/fsck.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -143,7 +143,7 @@ only if is compiled to support it. .It Fl f Force checking of file systems. -Running +Running .Dq Li fsck -f ignores the journal and does a full consistency check of the disk so will find and fix the errors about which the Modified: stable/12/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- stable/12/sbin/mount_msdosfs/mount_msdosfs.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/sbin/mount_msdosfs/mount_msdosfs.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -202,7 +202,7 @@ and first appeared in was renamed to the more aptly-named .Nm in -.Fx 5.0. +.Fx 5.0 . The character code conversion routine was added in 2003. .Sh AUTHORS Initial implementation as Modified: stable/12/usr.bin/chat/chat.8 ============================================================================== --- stable/12/usr.bin/chat/chat.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.bin/chat/chat.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -291,7 +291,8 @@ The .Dv SAY strings could be used to give progress messages in sections of the script where you want to have 'ECHO OFF' but still let the user -know what is happening. An example is: +know what is happening. +An example is: .Bd -literal -offset indent ABORT BUSY ECHO OFF Modified: stable/12/usr.bin/du/du.1 ============================================================================== --- stable/12/usr.bin/du/du.1 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.bin/du/du.1 Sun Dec 6 07:50:15 2020 (r368380) @@ -63,7 +63,7 @@ Calculate block counts in .Ar blocksize byte blocks. This is different from the -.Fl h, k, m, +.Fl h , k , m , .Fl Fl si and .Fl g @@ -172,7 +172,7 @@ options override each other and the command's actions by the last one specified. .Pp The -.Fl h, k, m +.Fl h , k , m and .Fl Fl si options all override each other; the last one specified determines @@ -183,7 +183,7 @@ the block counts used. If the environment variable .Ev BLOCKSIZE is set, and the -.Fl h, k, m +.Fl h , k , m or .Fl Fl si options are not specified, the block counts will be displayed in units of @@ -191,7 +191,7 @@ that block size. If .Ev BLOCKSIZE is not set, and the -.Fl h, k, m +.Fl h , k , m or .Fl Fl si options are not specified, the block counts will be displayed in 512-byte Modified: stable/12/usr.bin/setchannel/setchannel.1 ============================================================================== --- stable/12/usr.bin/setchannel/setchannel.1 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.bin/setchannel/setchannel.1 Sun Dec 6 07:50:15 2020 (r368380) @@ -61,8 +61,8 @@ Select svideo input. .It Fl t Select tuner. .It Fl g Cm geom -Select geometry. The first resolution is for NTSC, the second for -PAL. +Select geometry. +The first resolution is for NTSC, the second for PAL. .Pp VCD: 352x240 or 352x288 SVCD: 480x480 or 480x576 @@ -91,7 +91,8 @@ Frequency in MHz (must include decimal point). .Sh HISTORY The .Nm -program first appeared in the -multimedia mailing-list in January 2004. The +program first appeared in the -multimedia mailing-list in January 2004. +The .Nm program first appeared in the FreeBSD Ports collection in October 2004. .Sh AUTHORS Modified: stable/12/usr.bin/tftp/tftp.1 ============================================================================== --- stable/12/usr.bin/tftp/tftp.1 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.bin/tftp/tftp.1 Sun Dec 6 07:50:15 2020 (r368380) @@ -74,7 +74,8 @@ Shorthand for "mode binary" Sets the TFTP blksize option in TFTP Read Request or Write Request packets to .Ar [size] -as specified in RFC 2348. Valid values are between 8 and 65464. +as specified in RFC 2348. +Valid values are between 8 and 65464. If no blocksize is specified, then by default a blocksize of 512 bytes will be used. .Pp @@ -82,8 +83,8 @@ will be used. Sets the TFTP blksize2 option in TFTP Read Request or Write Request packets to .Ar [size] . -Values are restricted to powers of 2 between 8 and 32768. This is a -non-standard TFTP option. +Values are restricted to powers of 2 between 8 and 32768. +This is a non-standard TFTP option. .Pp .It Cm connect Ar host Op Ar port Set the @@ -109,7 +110,8 @@ or commands. .Pp .It Cm debug Ar level -Enable or disable debugging levels during verbose output. The value of +Enable or disable debugging levels during verbose output. +The value of .Ar level can be one of .Cm packet , simple , options , @@ -156,7 +158,8 @@ The default is .It Cm packetdrop [arg] Randomly drop .Ar arg -out of 100 packets during a transfer. This is a debugging feature. +out of 100 packets during a transfer. +This is a debugging feature. .Pp .It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename .It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory @@ -178,7 +181,8 @@ see the example under the command. .Pp .It Cm options Ar [arg] -Enable or disable support for TFTP options. The valid values of +Enable or disable support for TFTP options. +The valid values of .Ar arg are .Cm on @@ -198,8 +202,8 @@ Set the per-packet retransmission timeout, in seconds. .Pp .It Cm rollover [arg] Specify the rollover option in TFTP Read Request or Write -Request packets. After 65535 packets have been transmitted, set the block -counter to +Request packets. +After 65535 packets have been transmitted, set the block counter to .Ar arg . Valid values of .Ar arg Modified: stable/12/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/12/usr.sbin/ctladm/ctladm.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/ctladm/ctladm.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -233,8 +233,8 @@ utility take the following optional arguments: .It Fl C Ar retries Specify the number of times to retry a command in the event of failure. .It Fl D Ar device -Specify the device to open. This allows opening a device other than the -default device, +Specify the device to open. +This allows opening a device other than the default device, .Pa /dev/cam/ctl , to be opened for sending commands. .It Fl I Ar id @@ -272,29 +272,31 @@ READ command to the device, and write the requested da stdout. .Bl -tag -width 12n .It Fl l Ar lba -Specify the starting Logical Block Address for the READ. This can be -specified in decimal, octal (starting with 0), hexadecimal (starting with -0x) or any other base supported by +Specify the starting Logical Block Address for the READ. +This can be specified in decimal, octal (starting with 0), +hexadecimal (starting with 0x) or any other base supported by .Xr strtoull 3 . .It Fl d Ar datalen Specify the length, in 512 byte blocks, of the READ request. .It Fl f Ar file -Specify the destination for the data read by the READ command. Either a -filename or +Specify the destination for the data read by the READ command. +Either a filename or .Sq - for stdout may be specified. .It Fl c Ar cdbsize Specify the minimum .Tn SCSI -CDB (Command Data Block) size to be used for the READ request. Allowable -values are 6, 10, 12 and 16. Depending upon the LBA and amount of data -requested, a larger CDB size may be used to satisfy the request. (e.g., -for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.) +CDB (Command Data Block) size to be used for the READ request. +Allowable values are 6, 10, 12 and 16. +Depending upon the LBA and amount of data requested, a larger CDB +size may be used to satisfy the request. (e.g., for LBAs above 0xffffffff, +READ(16) must be used to satisfy the request.) .It Fl b Ar blocksize Specify the blocksize of the underlying .Tn SCSI device, so the transfer length -can be calculated accurately. The blocksize can be obtained via the +can be calculated accurately. +The blocksize can be obtained via the .Tn SCSI READ CAPACITY command. .It Fl N @@ -310,29 +312,31 @@ Read data from a file or stdin, and write the data to WRITE command. .Bl -tag -width 12n .It Fl l Ar lba -Specify the starting Logical Block Address for the WRITE. This can be -specified in decimal, octal (starting with 0), hexadecimal (starting with -0x) or any other base supported by +Specify the starting Logical Block Address for the WRITE. +This can be specified in decimal, octal (starting with 0), hexadecimal +(starting with 0x) or any other base supported by .Xr strtoull 3 . .It Fl d Ar atalen Specify the length, in 512 byte blocks, of the WRITE request. .It Fl f Ar file -Specify the source for the data to be written by the WRITE command. Either a -filename or +Specify the source for the data to be written by the WRITE command. +Either a filename or .Sq - for stdin may be specified. .It Fl c Ar cdbsize Specify the minimum .Tn SCSI -CDB (Command Data Block) size to be used for the READ request. Allowable -values are 6, 10, 12 and 16. Depending upon the LBA and amount of data -requested, a larger CDB size may be used to satisfy the request. (e.g., -for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.) +CDB (Command Data Block) size to be used for the READ request. +Allowable values are 6, 10, 12 and 16. +Depending upon the LBA and amount of data requested, a larger CDB size +may be used to satisfy the request. (e.g., for LBAs above 0xffffffff, READ(16) +must be used to satisfy the request.) .It Fl b Ar blocksize Specify the blocksize of the underlying .Tn SCSI device, so the transfer length -can be calculated accurately. The blocksize can be obtained via the +can be calculated accurately. +The blocksize can be obtained via the .Tn SCSI READ CAPACITY command. .It Fl N @@ -346,18 +350,20 @@ This is to be used for performance testing. Send the .Tn SCSI READ CAPACITY command to the device and display the device size and device -block size. By default, READ CAPACITY(10) is -used. If the device returns a maximum LBA of 0xffffffff, however, +block size. +By default, READ CAPACITY(10) is used. +If the device returns a maximum LBA of 0xffffffff, however, .Nm will automatically issue a READ CAPACITY(16), which is implemented as a -service action of the SERVICE ACTION IN(16) opcode. The user can specify -the minimum CDB size with the +service action of the SERVICE ACTION IN(16) opcode. +The user can specify the minimum CDB size with the .Fl c -argument. Valid values for the +argument. +Valid values for the .Fl c -option are 10 and 16. If a 10 byte CDB is specified, the request will be -automatically reissued with a 16 byte CDB if the maximum LBA returned is -0xffffffff. +option are 10 and 16. +If a 10 byte CDB is specified, the request will be automatically reissued +with a 16 byte CDB if the maximum LBA returned is 0xffffffff. .It Ic modesense Send a .Tn SCSI @@ -365,17 +371,21 @@ MODE SENSE command to the device, and display the requ page list. .Bl -tag -width 10n .It Fl m Ar page -Specify the mode page to display. This option and the +Specify the mode page to display. +This option and the .Fl l -option are mutually exclusive. One of the two must be specified, though. +option are mutually exclusive. +One of the two must be specified, though. Mode page numbers may be specified in decimal or hexadecimal. .It Fl l Request that the list of mode pages supported by the device be returned. This option and the .Fl m -option are mutually exclusive. One of the two must be specified, though. +option are mutually exclusive. +One of the two must be specified, though. .It Fl P Ar pc -Specify the mode page control value. Possible values are: +Specify the mode page control value. +Possible values are: .Bl -tag -width 2n -compact .It 0 Current values. @@ -391,8 +401,8 @@ Disable block descriptors when sending the mode sense .It Fl S Ar subpage Specify the subpage used with the mode sense request. .It Fl c Ar cdbsize -Specify the CDB size used for the mode sense request. Supported values are -6 and 10. +Specify the CDB size used for the mode sense request. +Supported values are 6 and 10. .El .It Ic start Send the @@ -401,54 +411,56 @@ START STOP UNIT command to the specified LUN with the bit set. .Bl -tag -width 4n .It Fl i -Set the immediate bit in the CDB. Note that CTL does not support the -immediate bit, so this is primarily useful for making sure that CTL returns -the proper error. +Set the immediate bit in the CDB. +Note that CTL does not support the immediate bit, so this is primarily +useful for making sure that CTL returns the proper error. .El .It Ic stop Send the .Tn SCSI START STOP UNIT command to the specified LUN with the start -bit cleared. We use an ordered tag to stop the LUN, so we can guarantee -that all pending I/O executes before it is stopped. (CTL guarantees this -anyway, but +bit cleared. +We use an ordered tag to stop the LUN, so we can guarantee that all pending +I/O executes before it is stopped. +(CTL guarantees this anyway, but .Nm sends an ordered tag for completeness.) .Bl -tag -width 4n .It Fl i -Set the immediate bit in the CDB. Note that CTL does not support the -immediate bit, so this is primarily useful for making sure that CTL returns -the proper error. +Set the immediate bit in the CDB. +Note that CTL does not support the immediate bit, so this is primarily +useful for making sure that CTL returns the proper error. .El .It Ic synccache Send the .Tn SCSI -SYNCHRONIZE CACHE command to the device. By default, SYNCHRONIZE -CACHE(10) is used. If the specified starting LBA is greater than -0xffffffff or the length is greater than 0xffff, though, -SYNCHRONIZE CACHE(16) will be used. The 16 byte command will also be used -if the user specifies a 16 byte CDB with the +SYNCHRONIZE CACHE command to the device. +By default, SYNCHRONIZE CACHE(10) is used. +If the specified starting LBA is greater than 0xffffffff or the length is +greater than 0xffff, though, SYNCHRONIZE CACHE(16) will be used. +The 16 byte command will also be used if the user specifies a 16 byte CDB with the .Fl c argument. .Bl -tag -width 14n .It Fl l Ar lba -Specify the starting LBA of the cache region to synchronize. This option is a -no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the -cache for the entire LUN. +Specify the starting LBA of the cache region to synchronize. +This option is a no-op for CTL. +If you send a SYNCHRONIZE CACHE command, it will sync the cache for the entire LUN. .It Fl b Ar blockcount -Specify the length of the cache region to synchronize. This option is a -no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the -cache for the entire LUN. +Specify the length of the cache region to synchronize. +This option is a no-op for CTL. +If you send a SYNCHRONIZE CACHE command, it will sync the cache for the entire LUN. .It Fl r -Specify relative addressing for the starting LBA. CTL does not support -relative addressing, since it only works for linked commands, and CTL -does not support linked commands. +Specify relative addressing for the starting LBA. +CTL does not support relative addressing, since it only works for linked commands, +and CTL does not support linked commands. .It Fl i Tell the target to return status immediately after issuing the SYNCHRONIZE CACHE -command rather than waiting for the cache to finish syncing. CTL does not -support this bit. +command rather than waiting for the cache to finish syncing. +CTL does not support this bit. .It Fl c Ar cdbsize -Specify the minimum CDB size. Valid values are 10 and 16 bytes. +Specify the minimum CDB size. +Valid values are 10 and 16 bytes. .El .It Ic lunlist List all LUNs registered with CTL. @@ -457,14 +469,15 @@ Because this command uses the ioctl port, it will only This command is the equivalent of doing a REPORT LUNS on one LUN and then an INQUIRY on each LUN in the system. .It Ic delay -Delay commands at the given location. There are two places where commands -may be delayed currently: before data is transferred +Delay commands at the given location. +There are two places where commands may be delayed currently: before data is transferred .Pq Dq datamove and just prior to sending status to the host .Pq Dq done . One of the two must be supplied as an argument to the .Fl l -option. The +option. +The .Fl t option must also be specified. .Bl -tag -width 12n @@ -473,9 +486,10 @@ Delay command(s) at the specified location. This can either be at the data movement stage (datamove) or prior to command completion (done). .It Fl t Ar delaytime -Delay command(s) for the specified number of seconds. This must be -specified. If set to 0, it will clear out any previously set delay for -this particular location (datamove or done). +Delay command(s) for the specified number of seconds. +This must be specified. +If set to 0, it will clear out any previously set delay for this particular +location (datamove or done). .It Fl T Ar delaytype Specify the delay type. By default, the @@ -898,11 +912,12 @@ as write protected. Set to "on", makes LUN removable. .It Va reordering Set to "unrestricted", allows target to process commands with SIMPLE task -attribute in arbitrary order. Any data integrity exposures related to -command sequence order shall be explicitly handled by the application -client through the selection of appropriate commands and task attributes. -The default value is "restricted". It improves data integrity, but may -introduce some additional delays. +attribute in arbitrary order. +Any data integrity exposures related to command sequence order shall be +explicitly handled by the application client through the selection of +appropriate commands and task attributes. +The default value is "restricted". +It improves data integrity, but may introduce some additional delays. .It Va serseq Set to "on" to serialize consecutive reads/writes. Set to "read" to serialize consecutive reads. Modified: stable/12/usr.sbin/extattrctl/extattrctl.8 ============================================================================== --- stable/12/usr.sbin/extattrctl/extattrctl.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/extattrctl/extattrctl.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -178,4 +178,4 @@ and introduced in It was developed to support security extensions requiring additional labels to be associated with each file or directory. .Sh AUTHORS -Robert N M Watson +.An Robert N M Watson Modified: stable/12/usr.sbin/i2c/i2c.8 ============================================================================== --- stable/12/usr.sbin/i2c/i2c.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/i2c/i2c.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -55,8 +55,8 @@ The .Nm utility can be used to perform raw data transfers (read or write) with devices -on the I2C bus. It can also scan the bus for available devices and reset the -I2C controller. +on the I2C bus. +It can also scan the bus for available devices and reset the I2C controller. .Pp The options are as follows: .Bl -tag -width ".Fl d Ar direction" @@ -124,10 +124,10 @@ Zero means that the offset is ignored and not passed t .Sh WARNINGS Great care must be taken when manipulating slave I2C devices with the .Nm -utility. Often times important configuration data for the system is kept in -non-volatile but write enabled memories located on the I2C bus, for example -Ethernet hardware addresses, RAM module parameters (SPD), processor reset -configuration word etc. +utility. +Often times important configuration data for the system is kept in non-volatile +but write enabled memories located on the I2C bus, for example Ethernet hardware +addresses, RAM module parameters (SPD), processor reset configuration word etc. .Pp It is very easy to render the whole system unusable when such configuration data is deleted or altered, so use the @@ -135,13 +135,14 @@ data is deleted or altered, so use the (write) command only if you know exactly what you are doing. .Pp Also avoid ungraceful interrupting of an ongoing transaction on the I2C bus, -as it can lead to potentially dangerous effects. Consider the following -scenario: when the host CPU is reset (for whatever reason) in the middle of a -started I2C transaction, the I2C slave device could be left in write mode -waiting for data or offset to arrive. When the CPU reinitializes itself and -talks to this I2C slave device again, the commands and other control info it -sends are treated by the slave device as data or offset it was waiting for, -and there's great potential for corruption if such a write is performed. +as it can lead to potentially dangerous effects. +Consider the following scenario: when the host CPU is reset (for whatever reason) +in the middle of a started I2C transaction, the I2C slave device could be left +in write mode waiting for data or offset to arrive. +When the CPU reinitializes itself and talks to this I2C slave device again, +the commands and other control info it sends are treated by the slave device +as data or offset it was waiting for, and there's great potential for +corruption if such a write is performed. .Sh EXAMPLES .Bl -bullet .It Modified: stable/12/usr.sbin/mountd/exports.5 ============================================================================== --- stable/12/usr.sbin/mountd/exports.5 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/mountd/exports.5 Sun Dec 6 07:50:15 2020 (r368380) @@ -28,7 +28,7 @@ .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd Feb 11, 2019 +.Dd February 11, 2019 .Dt EXPORTS 5 .Os .Sh NAME @@ -316,9 +316,10 @@ There can only be one NFSv4 root directory per server. As such, all entries of this form must specify the same directory path. For file systems other than ZFS, this location can be any directory and does not -need to be within an exported file system. If it is not in an exported -file system, a very limited set of operations are permitted, so that an -NFSv4 client can traverse the tree to an exported file system. +need to be within an exported file system. +If it is not in an exported file system, a very limited set of operations +are permitted, so that an NFSv4 client can traverse the tree to an +exported file system. Although parts of the NFSv4 tree can be non-exported, the entire NFSv4 tree must consist of local file systems capable of being exported via NFS. All ZFS file systems in the subtree below the NFSv4 tree root must be @@ -330,10 +331,11 @@ mount points. The .Fl sec option on these line(s) specifies what security flavors may be used for -NFSv4 operations that do not use file handles. Since these operations -(SetClientID, SetClientIDConfirm, Renew, DelegPurge and ReleaseLockOnwer) -allocate/modify state in the server, it is possible to restrict some clients to -the use of the krb5[ip] security flavors, via this option. +NFSv4 operations that do not use file handles. +Since these operations (SetClientID, SetClientIDConfirm, Renew, DelegPurge +and ReleaseLockOnwer) allocate/modify state in the server, it is possible +to restrict some clients to the use of the krb5[ip] security flavors, +via this option. See the .Sx EXAMPLES section below. @@ -507,12 +509,13 @@ V4: /wingsdl/nfsv4 .Ed .Pp Only one V4: line is needed or allowed to declare where NFSv4 is -rooted. The other lines declare specific exported directories with +rooted. +The other lines declare specific exported directories with their absolute paths given in /etc/exports. .Pp The exported directories' paths are used for both v3 and v4. -However, they are interpreted differently for v3 and v4. A client -mount command for usr-ports would use the server-absolute name when +However, they are interpreted differently for v3 and v4. +A client mount command for usr-ports would use the server-absolute name when using nfsv3: .Bd -literal -offset indent mount server:/wingsdl/nfsv4/usr-ports /mnt/tmp @@ -525,8 +528,9 @@ mount server:/usr-ports /mnt/tmp .Ed .Pp This also differentiates which version you want if the client can do -both v3 and v4. The former will only ever do a v3 mount and the -latter will only ever do a v4 mount. +both v3 and v4. +The former will only ever do a v3 mount and the latter will only ever +do a v4 mount. .Pp Note that due to different mount behavior between NFSv3 and NFSv4 a NFSv4 mount request for a directory that the client does not have Modified: stable/12/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- stable/12/usr.sbin/nfsuserd/nfsuserd.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/nfsuserd/nfsuserd.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -53,11 +53,12 @@ owner and owner_group strings. It also provides support for manage-gids and must be running on the server if this is being used for any version of NFS. .Pp -Upon startup, it loads the machines DNS domain name, plus timeout and -cache size limit into the kernel. It then preloads the cache with group -and user information, up to the cache size limit and forks off N children -(default 4), that service requests from the kernel for cache misses. The -master server is there for the sole purpose of killing off the slaves. +Upon startup, it loads the machines DNS domain name, plus timeout and cache size +limit into the kernel. +It then preloads the cache with group and user information, up to the cache size +limit and forks off N children (default 4), that service requests from the kernel +for cache misses. +The master server is there for the sole purpose of killing off the slaves. To stop the nfsuserd, send a SIGUSR1 to the master server. .Pp The following options are available: @@ -72,13 +73,14 @@ reported by Overrides the default timeout for cache entries, in minutes. The longer the time out, the better the performance, but the longer it takes for replaced -entries to be seen. If your user/group database management system almost -never re-uses the same names or id numbers, a large timeout is recommended. +entries to be seen. +If your user/group database management system almost never re-uses the same names +or id numbers, a large timeout is recommended. The default is 1 minute. .It Fl usermax Ar max_cache_size -Overrides the default upper bound on the cache size. The larger the cache, -the more kernel memory is used, but the better the performance. If your -system can afford the memory use, make this the sum of the number of +Overrides the default upper bound on the cache size. +The larger the cache, the more kernel memory is used, but the better the performance. +If your system can afford the memory use, make this the sum of the number of entries in your group and password databases. The default is 200 entries. .It Fl verbose @@ -98,12 +100,13 @@ on the server instead of the list of groups provided i This can be used to avoid the 16 group limit for AUTH_SYS. .It Ar num_servers Specifies how many servers to create (max 20). -The default of 4 may be sufficient. You should run enough servers, so that +The default of 4 may be sufficient. +You should run enough servers, so that .Xr ps 1 shows almost no running time for one or two of the slaves after the system -has been running for a long period. Running too few will have a major -performance impact, whereas running too many will only tie up some resources, -such as a process table entry and swap space. +has been running for a long period. +Running too few will have a major performance impact, whereas running too many +will only tie up some resources, such as a process table entry and swap space. .El .Sh SEE ALSO .Xr getgrent 3 , @@ -126,7 +129,8 @@ use and .Xr getpwent 3 library calls to resolve requests and will hang if the servers handling -those requests fail and the library functions don't return. See +those requests fail and the library functions don't return. +See .Xr group 5 and .Xr passwd 5 Modified: stable/12/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- stable/12/usr.sbin/pmcstudy/pmcstudy.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/pmcstudy/pmcstudy.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 26, 2015 +.Dd March 26, 2015 .Dt PMCSTUDY 8 .Os .Sh NAME @@ -140,6 +140,6 @@ Run all canned tests. The .Nm utility first appeared in -.Fx 11.0. +.Fx 11.0 . .Sh AUTHORS .An Randall Stewart Aq Mt rrs@FreeBSD.org Modified: stable/12/usr.sbin/traceroute6/traceroute6.8 ============================================================================== --- stable/12/usr.sbin/traceroute6/traceroute6.8 Sun Dec 6 07:47:10 2020 (r368379) +++ stable/12/usr.sbin/traceroute6/traceroute6.8 Sun Dec 6 07:50:15 2020 (r368380) @@ -99,7 +99,8 @@ Debug mode. .It Fl f Ar firsthop Specify how many hops to skip in trace. .It Fl g Ar gateway -Specify intermediate gateway. Please note that +Specify intermediate gateway. +Please note that .Nm tries to use routing headers. .It Fl I @@ -150,7 +151,8 @@ The size of probe packets must be a multiple of 4. If .Ar datalen is up to 28, probe packets consist of a SHUTDOWN-ACK chunk possibly bundled -with a PAD chunk. For larger probe packets, an INIT chunk is used. +with a PAD chunk. +For larger probe packets, an INIT chunk is used. .It Fl t Ar tclass .Ar tclass specifies the From owner-svn-src-stable@freebsd.org Sun Dec 6 07:55:12 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB9874755FB; Sun, 6 Dec 2020 07:55:12 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpdym4LgMz3L2Y; Sun, 6 Dec 2020 07:55:12 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83E214BA1; Sun, 6 Dec 2020 07:55:12 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B67tCOV074787; Sun, 6 Dec 2020 07:55:12 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B67tC1F074786; Sun, 6 Dec 2020 07:55:12 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060755.0B67tC1F074786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368381 - stable/12/sbin/devmatch X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/sbin/devmatch X-SVN-Commit-Revision: 368381 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:55:12 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:55:12 2020 New Revision: 368381 URL: https://svnweb.freebsd.org/changeset/base/368381 Log: MFC r366662 (by imp), r367897 r366662: devmatch: First appeared in 12.0 Document that devmatch first appeared in FreeBSD 12.0. Also can't -> can not. But it doesn't help the sentence much. r367897: devmatch(8): Fix section ordering - sections out of conventional order: Sh HISTORY Modified: stable/12/sbin/devmatch/devmatch.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/devmatch/devmatch.8 ============================================================================== --- stable/12/sbin/devmatch/devmatch.8 Sun Dec 6 07:50:15 2020 (r368380) +++ stable/12/sbin/devmatch/devmatch.8 Sun Dec 6 07:55:12 2020 (r368381) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2018 +.Dd October 12, 2020 .Dt DEVMATCH 8 .Os .Sh NAME @@ -62,13 +62,17 @@ Parse and use a standard NOMATCH event from for matching instead of searching the device tree. .It Fl u Fl -unbound Attempt to produce a list of those drivers with PNP info whose driver -tables with that PNP info can't be found. +tables with that PNP info can not be found. .It Fl v Fl -verbose Produce more verbose output. .El .Sh SEE ALSO .Xr devinfo 8 , .Xr MODULE_PNP_INFO 9 +.Sh HISTORY +.Nm +first appeared in +.Fx 12.0 . .Sh AUTHORS .An Warner Losh Aq Mt imp@FreeBSD.org .Sh BUGS From owner-svn-src-stable@freebsd.org Sun Dec 6 07:57:56 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7F3947597D; Sun, 6 Dec 2020 07:57:56 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpf1w5p04z3LPR; Sun, 6 Dec 2020 07:57:56 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9EC948E6; Sun, 6 Dec 2020 07:57:56 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B67vurN075071; Sun, 6 Dec 2020 07:57:56 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B67vuwp075070; Sun, 6 Dec 2020 07:57:56 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060757.0B67vuwp075070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 07:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368382 - stable/12/sbin/camcontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/sbin/camcontrol X-SVN-Commit-Revision: 368382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 07:57:56 -0000 Author: gbe (doc committer) Date: Sun Dec 6 07:57:56 2020 New Revision: 368382 URL: https://svnweb.freebsd.org/changeset/base/368382 Log: MFC r367889: camcontrol(8): Fix some warnings spotted by mandoc - skipping paragraph macro: Pp before Bl Modified: stable/12/sbin/camcontrol/camcontrol.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/12/sbin/camcontrol/camcontrol.8 Sun Dec 6 07:55:12 2020 (r368381) +++ stable/12/sbin/camcontrol/camcontrol.8 Sun Dec 6 07:57:56 2020 (r368382) @@ -2276,7 +2276,6 @@ These zones must be written sequentially. If they are not written sequentially, starting at the write pointer, the command will fail. .El -.Pp .Bl -tag -width 12n .It Fl c Ar cmd Specify the zone subcommand: @@ -2831,7 +2830,6 @@ This will read and decode the attribute values from pa in tape drive sa0, and will display any .Tn SCSI errors that result. -.Pp .Bd -literal -offset indent camcontrol zone da0 -v -c rz -P summary .Ed @@ -2842,7 +2840,6 @@ summary of the zone parameters, and display any or .Tn ATA errors that result. -.Pp .Bd -literal -offset indent camcontrol zone da0 -v -c rz -o reset .Ed @@ -2853,7 +2850,6 @@ pointer reset from the disk da0, and display any or .Tn ATA errors that result. -.Pp .Bd -literal -offset indent camcontrol zone da0 -v -c rwp -l 0x2c80000 .Ed @@ -2864,7 +2860,6 @@ that starts at LBA 0x2c80000 and display any or .Tn ATA errors that result. -.Pp .Bd -literal -offset indent camcontrol epc ada0 -c timer -T 60.1 -p Idle_a -e -s .Ed @@ -2873,7 +2868,6 @@ Set the timer for the Idle_a power condition on drive .Pa ada0 to 60.1 seconds, enable that particular power condition, and save the timer value and the enabled state of the power condition. -.Pp .Bd -literal -offset indent camcontrol epc da4 -c goto -p Standby_z -H .Ed @@ -2885,7 +2879,6 @@ the drive's lowest power state) and hold in that state explicitly released by another .Cm goto command. -.Pp .Bd -literal -offset indent camcontrol epc da2 -c status -P .Ed @@ -2903,7 +2896,6 @@ to only send the .Tn ATA CHECK POWER MODE command, which should not trigger a change in the drive's power state. -.Pp .Bd -literal -offset indent camcontrol epc ada0 -c list .Ed @@ -2911,7 +2903,6 @@ camcontrol epc ada0 -c list Display the ATA Power Conditions log (Log Address 0x08) for drive .Pa ada0 . -.Pp .Bd -literal -offset indent camcontrol timestamp sa0 -s -f "%a, %d %b %Y %T %z" \e -T "Wed, 26 Oct 2016 21:43:57 -0600" From owner-svn-src-stable@freebsd.org Sun Dec 6 08:01:28 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 196C4475EAD; Sun, 6 Dec 2020 08:01:28 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpf600HZfz3Ln0; Sun, 6 Dec 2020 08:01:28 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0B794C1B; Sun, 6 Dec 2020 08:01:27 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B681RIt076850; Sun, 6 Dec 2020 08:01:27 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B681RrI076849; Sun, 6 Dec 2020 08:01:27 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012060801.0B681RrI076849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 6 Dec 2020 08:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368383 - stable/12/usr.sbin/wpa/hostapd X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/usr.sbin/wpa/hostapd X-SVN-Commit-Revision: 368383 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 08:01:28 -0000 Author: gbe (doc committer) Date: Sun Dec 6 08:01:27 2020 New Revision: 368383 URL: https://svnweb.freebsd.org/changeset/base/368383 Log: MFC r367901 and r367904 r367901: hostapd.conf(5): Fix a mandoc warning -new sentence, new line r367904: hostapd.conf(5): Add missing 'l' In r367901 I accidentally deleted the 'l' while fixing a few mandoc erros. Spotted by: Yuri Pankov Modified: stable/12/usr.sbin/wpa/hostapd/hostapd.conf.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- stable/12/usr.sbin/wpa/hostapd/hostapd.conf.5 Sun Dec 6 07:57:56 2020 (r368382) +++ stable/12/usr.sbin/wpa/hostapd/hostapd.conf.5 Sun Dec 6 08:01:27 2020 (r368383) @@ -67,8 +67,9 @@ The following parameters are recognized: Interface name. Should be set in .Dq hostap -mode. Make certain that there are no spaces after the interface name, -or hostapd will complain that the interface does not exist. +mode. +Make certain that there are no spaces after the interface name, or hostapd will +complain that the interface does not exist. .It Va debug Debugging mode: 0 = no, 1 = minimal, 2 = verbose, 3 = msg dumps, 4 = excessive. From owner-svn-src-stable@freebsd.org Sun Dec 6 16:22:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D40914A19DC; Sun, 6 Dec 2020 16:22:27 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CpsD35hNXz4Vmb; Sun, 6 Dec 2020 16:22:27 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B216F13320; Sun, 6 Dec 2020 16:22:27 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B6GMR7a093278; Sun, 6 Dec 2020 16:22:27 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6GMRAh093276; Sun, 6 Dec 2020 16:22:27 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202012061622.0B6GMRAh093276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 6 Dec 2020 16:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368389 - in stable/12/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/12/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 368389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 16:22:27 -0000 Author: eugen Date: Sun Dec 6 16:22:26 2020 New Revision: 368389 URL: https://svnweb.freebsd.org/changeset/base/368389 Log: MFC r364027 by arichardson: Fix linker error in libuutil with recent LLVM This also fixes nanobsd-style build (cross-compiling). Original commit log: Not marking the function as static can result in a linker error: undefined reference to __assfail [--no-allow-shlib-undefined] I noticed this error after updating our CHERI LLVM to the latest upstream LLVM HEAD revision. This change effectively reverts r329984 and marks dmu_buf_init_user as static (which keeps the GCC build happy). Reviewed By: #zfs, asomers, freqlabs, mav Differential Revision: https://reviews.freebsd.org/D25663 Modified: stable/12/sys/cddl/compat/opensolaris/sys/assfail.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/compat/opensolaris/sys/assfail.h ============================================================================== --- stable/12/sys/cddl/compat/opensolaris/sys/assfail.h Sun Dec 6 15:58:50 2020 (r368388) +++ stable/12/sys/cddl/compat/opensolaris/sys/assfail.h Sun Dec 6 16:22:26 2020 (r368389) @@ -48,9 +48,7 @@ void assfail3(const char *, uintmax_t, const char *, u #ifndef HAVE_ASSFAIL extern int aok; -__inline int __assfail(const char *expr, const char *file, int line); - -__inline int +static __inline int __assfail(const char *expr, const char *file, int line) { Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Dec 6 15:58:50 2020 (r368388) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Dec 6 16:22:26 2020 (r368389) @@ -175,13 +175,6 @@ static int __dbuf_hold_impl(struct dbuf_hold_impl_data static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx); static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx); -#ifndef __lint -extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu, - dmu_buf_evict_func_t *evict_func_sync, - dmu_buf_evict_func_t *evict_func_async, - dmu_buf_t **clear_on_evict_dbufp); -#endif /* ! __lint */ - /* * Global data structures and functions for the dbuf cache. */ Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Sun Dec 6 15:58:50 2020 (r368388) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Sun Dec 6 16:22:26 2020 (r368389) @@ -610,7 +610,7 @@ typedef struct dmu_buf_user { * To allow enforcement of this, dbu must already be zeroed on entry. */ /*ARGSUSED*/ -inline void +static inline void dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) { From owner-svn-src-stable@freebsd.org Mon Dec 7 01:02:21 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 224244727DB; Mon, 7 Dec 2020 01:02:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cq4lx0Wt5z3Pgx; Mon, 7 Dec 2020 01:02:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04FCD199BA; Mon, 7 Dec 2020 01:02:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B712KHs019642; Mon, 7 Dec 2020 01:02:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B712KDl019641; Mon, 7 Dec 2020 01:02:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012070102.0B712KDl019641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 7 Dec 2020 01:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368401 - stable/12/lib/libthr/thread X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libthr/thread X-SVN-Commit-Revision: 368401 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 01:02:21 -0000 Author: kib Date: Mon Dec 7 01:02:20 2020 New Revision: 368401 URL: https://svnweb.freebsd.org/changeset/base/368401 Log: MFC r368190: Ensure that threading library is initialized in pthread_mutex_init(). Modified: stable/12/lib/libthr/thread/thr_mutex.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/12/lib/libthr/thread/thr_mutex.c Sun Dec 6 22:45:50 2020 (r368400) +++ stable/12/lib/libthr/thread/thr_mutex.c Mon Dec 7 01:02:20 2020 (r368401) @@ -384,6 +384,8 @@ __Tthr_mutex_init(pthread_mutex_t * __restrict mutex, struct pthread_mutex *pmtx; int ret; + _thr_check_init(); + if (mutex_attr != NULL) { ret = mutex_check_attr(*mutex_attr); if (ret != 0) From owner-svn-src-stable@freebsd.org Mon Dec 7 01:05:40 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 548AB472D05; Mon, 7 Dec 2020 01:05:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cq4qm20TSz3PTN; Mon, 7 Dec 2020 01:05:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 332BC19A22; Mon, 7 Dec 2020 01:05:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B715eUN019852; Mon, 7 Dec 2020 01:05:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B715eq3019851; Mon, 7 Dec 2020 01:05:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012070105.0B715eq3019851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 7 Dec 2020 01:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368402 - stable/12/sys/ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/ufs/ffs X-SVN-Commit-Revision: 368402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 01:05:40 -0000 Author: kib Date: Mon Dec 7 01:05:39 2020 New Revision: 368402 URL: https://svnweb.freebsd.org/changeset/base/368402 Log: MFC r368191: ffs: do not read full direct blocks if they are going to be overwritten. Modified: stable/12/sys/ufs/ffs/ffs_balloc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_balloc.c Mon Dec 7 01:02:20 2020 (r368401) +++ stable/12/sys/ufs/ffs/ffs_balloc.c Mon Dec 7 01:05:39 2020 (r368402) @@ -172,10 +172,17 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, i panic("ffs_balloc_ufs1: BA_METAONLY for direct block"); nb = dp->di_db[lbn]; if (nb != 0 && ip->i_size >= smalllblktosize(fs, lbn + 1)) { - error = bread(vp, lbn, fs->fs_bsize, NOCRED, &bp); - if (error) { - brelse(bp); - return (error); + if ((flags & BA_CLRBUF) != 0) { + error = bread(vp, lbn, fs->fs_bsize, NOCRED, + &bp); + if (error != 0) + return (error); + } else { + bp = getblk(vp, lbn, fs->fs_bsize, 0, 0, + gbflags); + if (bp == NULL) + return (EIO); + vfs_bio_clrbuf(bp); } bp->b_blkno = fsbtodb(fs, nb); *bpp = bp; @@ -770,11 +777,17 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, i panic("ffs_balloc_ufs2: BA_METAONLY for direct block"); nb = dp->di_db[lbn]; if (nb != 0 && ip->i_size >= smalllblktosize(fs, lbn + 1)) { - error = bread_gb(vp, lbn, fs->fs_bsize, NOCRED, - gbflags, &bp); - if (error) { - brelse(bp); - return (error); + if ((flags & BA_CLRBUF) != 0) { + error = bread_gb(vp, lbn, fs->fs_bsize, NOCRED, + gbflags, &bp); + if (error != 0) + return (error); + } else { + bp = getblk(vp, lbn, fs->fs_bsize, 0, 0, + gbflags); + if (bp == NULL) + return (EIO); + vfs_bio_clrbuf(bp); } bp->b_blkno = fsbtodb(fs, nb); *bpp = bp; From owner-svn-src-stable@freebsd.org Mon Dec 7 01:09:46 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CA9F472D96; Mon, 7 Dec 2020 01:09:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cq4wV2Xtsz3PpY; Mon, 7 Dec 2020 01:09:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45F3719848; Mon, 7 Dec 2020 01:09:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B719kYl020097; Mon, 7 Dec 2020 01:09:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B719ka6020096; Mon, 7 Dec 2020 01:09:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012070109.0B719ka6020096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 7 Dec 2020 01:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368403 - stable/11/lib/libthr/thread X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libthr/thread X-SVN-Commit-Revision: 368403 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 01:09:46 -0000 Author: kib Date: Mon Dec 7 01:09:45 2020 New Revision: 368403 URL: https://svnweb.freebsd.org/changeset/base/368403 Log: MFC r368190: Ensure that threading library is initialized in pthread_mutex_init(). Modified: stable/11/lib/libthr/thread/thr_mutex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/11/lib/libthr/thread/thr_mutex.c Mon Dec 7 01:05:39 2020 (r368402) +++ stable/11/lib/libthr/thread/thr_mutex.c Mon Dec 7 01:09:45 2020 (r368403) @@ -380,6 +380,8 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mute struct pthread_mutex *pmtx; int ret; + _thr_check_init(); + if (mutex_attr != NULL) { ret = mutex_check_attr(*mutex_attr); if (ret != 0) From owner-svn-src-stable@freebsd.org Mon Dec 7 20:36:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32D2E4B574D; Mon, 7 Dec 2020 20:36:59 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqZqH0KfYz3nyQ; Mon, 7 Dec 2020 20:36:59 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F28E627EBF; Mon, 7 Dec 2020 20:36:58 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B7KawYS060004; Mon, 7 Dec 2020 20:36:58 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7Kawhq060003; Mon, 7 Dec 2020 20:36:58 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012072036.0B7Kawhq060003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Mon, 7 Dec 2020 20:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368418 - in stable/12: sbin/mount share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: sbin/mount share/man/man5 X-SVN-Commit-Revision: 368418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:36:59 -0000 Author: gbe (doc committer) Date: Mon Dec 7 20:36:58 2020 New Revision: 368418 URL: https://svnweb.freebsd.org/changeset/base/368418 Log: MFC r350224 by sobomax: Allow "update" option to be used in the fstab(5). Document possible use case. Approved by: sobomax Differential Revision: https://reviews.freebsd.org/D18586 Modified: stable/12/sbin/mount/mount.c stable/12/share/man/man5/fstab.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/mount/mount.c ============================================================================== --- stable/12/sbin/mount/mount.c Mon Dec 7 18:58:08 2020 (r368417) +++ stable/12/sbin/mount/mount.c Mon Dec 7 20:36:58 2020 (r368418) @@ -361,6 +361,7 @@ main(int argc, char *argv[]) else failok = 0; if (!(init_flags & MNT_UPDATE) && + !hasopt(fs->fs_mntops, "update") && ismounted(fs, mntbuf, mntsize)) continue; options = update_options(options, fs->fs_mntops, Modified: stable/12/share/man/man5/fstab.5 ============================================================================== --- stable/12/share/man/man5/fstab.5 Mon Dec 7 18:58:08 2020 (r368417) +++ stable/12/share/man/man5/fstab.5 Mon Dec 7 20:36:58 2020 (r368418) @@ -190,6 +190,32 @@ see the .Xr mount 8 manual page. .Pp +If the option +.Dq update +is specified, it indicates that the status of an already mounted file +system should be changed accordingly. +This allows, for example, file systems mounted read-only to be upgraded +read-write and vice-versa. +By default, an entry corresponding to a file systems that is already +mounted is going to be skipped over when processing +.Nm , +unless it's a root file system, in which case logic similar to +.Dq update +is applied automatically. +.Pp +The +.Dq update +option is typically used in conjuction with two +.Nm +files. +The first +.Nm +file is used to set up the initial set of file systems. +The second +.Nm +file is then run to update the initial set of file systems and +to add additional file systems. +.Pp The type of the mount is extracted from the .Fa fs_mntops field and stored separately in the From owner-svn-src-stable@freebsd.org Mon Dec 7 20:57:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54ECC4B680D for ; Mon, 7 Dec 2020 20:57:50 +0000 (UTC) (envelope-from 3SpfOXwsJDrcmXZhXo.hXkbdjXfi.Zljpsk-poZ-pqXYibcobbYpa.lod@trix.bounces.google.com) Received: from mail-qv1-xf45.google.com (mail-qv1-xf45.google.com [IPv6:2607:f8b0:4864:20::f45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqbHK5ZNVz3qZ5 for ; Mon, 7 Dec 2020 20:57:48 +0000 (UTC) (envelope-from 3SpfOXwsJDrcmXZhXo.hXkbdjXfi.Zljpsk-poZ-pqXYibcobbYpa.lod@trix.bounces.google.com) Received: by mail-qv1-xf45.google.com with SMTP id m8so4833728qvk.1 for ; Mon, 07 Dec 2020 12:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:message-id:date:subject:from:to; bh=zWW7OSVgmvoD85dl8Va3J1ERf+m2hq5pxDjRuVjuiLs=; b=I7l4vmc+2SAr6Ko0q8m9Gr8v8Eszcobn+ghCtpVkjOjeIucjAQgWc03aJCbcEO//20 bI70ilxP1r/MzWKYkZel0urEaOI0q57kSiMyoGOiDc8rZcp2+HZgW+Kp/A6Eg1/eObyo Hceigdk6hoQJgOyAfY0IK55ND5FYBJH7/+RYW9hdVI+6G2YF9A/dvAYEOwQDZTF/Oy/q MtTtbZc6alUencNt5AAYdr5WZ0RV6mX8oa+4VmNCbh4o+us4O3ty8UYh9/PzQAoKsgY5 LUq0BQmH9moEPEsCCk2Hs7EG3tAojpsPzmJjRGuwuMqQ51SG9Bn+BaAWzNUXtksirKcN KyEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:message-id:date:subject :from:to; bh=zWW7OSVgmvoD85dl8Va3J1ERf+m2hq5pxDjRuVjuiLs=; b=kF50nzf0N7Kh/tOf8MFEgX3vDQlaPHcEFebEuyvFR/iEyXmqudLDcQ2yxwkUqwMp7s yCNwzfirIAN5QPEPg5/xfMlSVUZ/2PDBDuyQJ1RwzRKZf3MWeVSJC86DSzpxX+IXACtb T1smj3q1ihXiPqSV4OnSff2/bZgmNd/7HA+f7UB9nG9LJYotxwOwnwSSMB/6CzZVsAt3 Z8Pf5+Qfb9lsnwjmQH99r1gQveF8Tf9udtjSQcaXr7Oa0EKH2gT2v92ltLU+VQxw/Xm3 hKAcw6y8t8zWpQa81d9XtlukOCuAr5WH3VTpsrqW5JHTMPJsX4V9fR3Ml7lBtnVMFgVn yCJw== X-Gm-Message-State: AOAM533MsVb1/CHnwFlfaE0oOMb7AfHAu2U07onvJaWi0WgAfiYWaTxW oXSKvguT6ujumBMIr4CdmV6+ouG1xQEhu25Bnl7t MIME-Version: 1.0 X-Received: by 2002:a05:6214:768:: with SMTP id f8mt23686812qvz.1.1607374666198; Mon, 07 Dec 2020 12:57:46 -0800 (PST) Reply-To: packar.kane@gmail.com X-No-Auto-Attachment: 1 Message-ID: <0000000000000014c905b5e6143d@google.com> Date: Mon, 07 Dec 2020 20:57:47 +0000 Subject: You get my email From: packar.kane@gmail.com To: svn-src-stable@freebsd.org X-Rspamd-Queue-Id: 4CqbHK5ZNVz3qZ5 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=I7l4vmc+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of 3SpfOXwsJDrcmXZhXo.hXkbdjXfi.Zljpsk-poZ-pqXYibcobbYpa.lod@trix.bounces.google.com designates 2607:f8b0:4864:20::f45 as permitted sender) smtp.mailfrom=3SpfOXwsJDrcmXZhXo.hXkbdjXfi.Zljpsk-poZ-pqXYibcobbYpa.lod@trix.bounces.google.com X-Spamd-Result: default: False [-3.70 / 15.00]; HAS_REPLYTO(0.00)[packar.kane@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[packarkane@gmail.com,3SpfOXwsJDrcmXZhXo.hXkbdjXfi.Zljpsk-poZ-pqXYibcobbYpa.lod@trix.bounces.google.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::f45:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[packarkane@gmail.com,3SpfOXwsJDrcmXZhXo.hXkbdjXfi.Zljpsk-poZ-pqXYibcobbYpa.lod@trix.bounces.google.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[svn-src-stable@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::f45:from:127.0.2.255]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f45:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-stable] Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:57:50 -0000 I've invited you to fill out the following form: Untitled form To fill it out, visit: https://docs.google.com/forms/d/e/1FAIpQLSfnEHD2_CNTJYIVH7sDpLJ-xXgrkXb-MenDNrMni0actgeXhQ/viewform?vc=0&c=0&w=1&flr=0&usp=mail_form_link Hello, I contacted you because I want to invest in your country,if you confirm your interest that you can handle the fund in a good investment. reply on this email only: reem.alhashimi@kakao.com Regards, Ms. Reem Al-hashimi Google Forms: Create and analyze surveys. From owner-svn-src-stable@freebsd.org Tue Dec 8 00:58:03 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81AA64BC044; Tue, 8 Dec 2020 00:58:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqhcW3Fx6z4Z1L; Tue, 8 Dec 2020 00:58:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DF773902; Tue, 8 Dec 2020 00:58:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B80w3Hk022946; Tue, 8 Dec 2020 00:58:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B80w3EO022945; Tue, 8 Dec 2020 00:58:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202012080058.0B80w3EO022945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 8 Dec 2020 00:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368426 - stable/12/sys/dev/isp X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/isp X-SVN-Commit-Revision: 368426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 00:58:03 -0000 Author: mav Date: Tue Dec 8 00:58:02 2020 New Revision: 368426 URL: https://svnweb.freebsd.org/changeset/base/368426 Log: MFC r367985: Remove unneeded locking around xpt_bus_[de]register(). Modified: stable/12/sys/dev/isp/isp_freebsd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/12/sys/dev/isp/isp_freebsd.c Tue Dec 8 00:49:31 2020 (r368425) +++ stable/12/sys/dev/isp/isp_freebsd.c Tue Dec 8 00:58:02 2020 (r368426) @@ -121,17 +121,12 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq if (sim == NULL) return (ENOMEM); - ISP_LOCK(isp); if (xpt_bus_register(sim, isp->isp_dev, chan) != CAM_SUCCESS) { - ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); return (EIO); } - ISP_UNLOCK(isp); if (xpt_create_path(&path, NULL, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(sim)); - ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); return (ENXIO); } @@ -167,7 +162,6 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq struct sysctl_oid *tree = device_get_sysctl_tree(isp->isp_osinfo.dev); char name[16]; - ISP_LOCK(isp); fc->sim = sim; fc->path = path; fc->isp = isp; @@ -189,7 +183,6 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq LIST_INIT(&fc->atused[i]); #endif isp_loop_changed(isp, chan); - ISP_UNLOCK(isp); if (kproc_create(isp_kthread, fc, &fc->kproc, 0, 0, "%s_%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { xpt_free_path(fc->path); @@ -317,9 +310,7 @@ unwind: ISP_GET_PC(isp, chan, sim, sim); ISP_GET_PC(isp, chan, path, path); xpt_free_path(path); - ISP_LOCK(isp); xpt_bus_deregister(cam_sim_path(sim)); - ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } cam_simq_free(isp->isp_osinfo.devq); From owner-svn-src-stable@freebsd.org Tue Dec 8 01:44:17 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 901E64BDEE4; Tue, 8 Dec 2020 01:44:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cqjds3jrZz4d2Q; Tue, 8 Dec 2020 01:44:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 728F93F55; Tue, 8 Dec 2020 01:44:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B81iHKN053902; Tue, 8 Dec 2020 01:44:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B81iHkS053900; Tue, 8 Dec 2020 01:44:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012080144.0B81iHkS053900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 8 Dec 2020 01:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368427 - in stable/12: libexec/rtld-elf sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: libexec/rtld-elf sys/sys X-SVN-Commit-Revision: 368427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 01:44:17 -0000 Author: kib Date: Tue Dec 8 01:44:16 2020 New Revision: 368427 URL: https://svnweb.freebsd.org/changeset/base/368427 Log: MFC r368260: rtld: bump r_debug.r_version to 1 from current 0. Add r_ldbase. Modified: stable/12/libexec/rtld-elf/rtld.c stable/12/sys/sys/link_elf.h Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Tue Dec 8 00:58:02 2020 (r368426) +++ stable/12/libexec/rtld-elf/rtld.c Tue Dec 8 01:44:16 2020 (r368427) @@ -2238,8 +2238,10 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) parse_rtld_phdr(&obj_rtld); obj_enforce_relro(&obj_rtld); + r_debug.r_version = R_DEBUG_VERSION; r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; + r_debug.r_ldbase = obj_rtld.relocbase; } /* Modified: stable/12/sys/sys/link_elf.h ============================================================================== --- stable/12/sys/sys/link_elf.h Tue Dec 8 00:58:02 2020 (r368426) +++ stable/12/sys/sys/link_elf.h Tue Dec 8 01:44:16 2020 (r368427) @@ -69,7 +69,7 @@ typedef struct link_map { } Link_map; struct r_debug { - int r_version; /* not used */ + int r_version; /* Currently '1' */ struct link_map *r_map; /* list of loaded images */ void (*r_brk)(struct r_debug *, struct link_map *); /* pointer to break point */ @@ -78,7 +78,10 @@ struct r_debug { RT_ADD, /* adding a shared library */ RT_DELETE /* removing a shared library */ } r_state; + void *r_ldbase; /* Base address of rtld */ }; + +#define R_DEBUG_VERSION 1 struct dl_phdr_info { From owner-svn-src-stable@freebsd.org Tue Dec 8 01:45:37 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77F9B4BDDDC; Tue, 8 Dec 2020 01:45:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqjgP2y1Hz4d59; Tue, 8 Dec 2020 01:45:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5828841FC; Tue, 8 Dec 2020 01:45:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B81jbu2054045; Tue, 8 Dec 2020 01:45:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B81jbhb054044; Tue, 8 Dec 2020 01:45:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012080145.0B81jbhb054044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 8 Dec 2020 01:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368428 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 368428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 01:45:37 -0000 Author: kib Date: Tue Dec 8 01:45:36 2020 New Revision: 368428 URL: https://svnweb.freebsd.org/changeset/base/368428 Log: MFC r368262: vfs_aio.c: correct comment. Modified: stable/12/sys/kern/vfs_aio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_aio.c ============================================================================== --- stable/12/sys/kern/vfs_aio.c Tue Dec 8 01:44:16 2020 (r368427) +++ stable/12/sys/kern/vfs_aio.c Tue Dec 8 01:45:36 2020 (r368428) @@ -248,8 +248,8 @@ struct aioproc { */ struct aioliojob { int lioj_flags; /* (a) listio flags */ - int lioj_count; /* (a) listio flags */ - int lioj_finished_count; /* (a) listio flags */ + int lioj_count; /* (a) count of jobs */ + int lioj_finished_count; /* (a) count of finished jobs */ struct sigevent lioj_signal; /* (a) signal on all I/O done */ TAILQ_ENTRY(aioliojob) lioj_list; /* (a) lio list */ struct knlist klist; /* (a) list of knotes */ From owner-svn-src-stable@freebsd.org Tue Dec 8 01:46:44 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAE014BE0A9; Tue, 8 Dec 2020 01:46:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cqjhh4T91z4dB5; Tue, 8 Dec 2020 01:46:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81F2C41FD; Tue, 8 Dec 2020 01:46:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B81kiJF054158; Tue, 8 Dec 2020 01:46:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B81kix1054157; Tue, 8 Dec 2020 01:46:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012080146.0B81kix1054157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 8 Dec 2020 01:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368429 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 368429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 01:46:44 -0000 Author: kib Date: Tue Dec 8 01:46:44 2020 New Revision: 368429 URL: https://svnweb.freebsd.org/changeset/base/368429 Log: MFC r368264: vfs_aio.c: style. Modified: stable/12/sys/kern/vfs_aio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_aio.c ============================================================================== --- stable/12/sys/kern/vfs_aio.c Tue Dec 8 01:45:36 2020 (r368428) +++ stable/12/sys/kern/vfs_aio.c Tue Dec 8 01:46:44 2020 (r368429) @@ -905,10 +905,10 @@ aio_bio_done_notify(struct proc *userp, struct kaiocb lj->lioj_flags |= LIOJ_KEVENT_POSTED; KNOTE_LOCKED(&lj->klist, 1); } - if ((lj->lioj_flags & (LIOJ_SIGNAL|LIOJ_SIGNAL_POSTED)) - == LIOJ_SIGNAL - && (lj->lioj_signal.sigev_notify == SIGEV_SIGNAL || - lj->lioj_signal.sigev_notify == SIGEV_THREAD_ID)) { + if ((lj->lioj_flags & (LIOJ_SIGNAL | LIOJ_SIGNAL_POSTED)) + == LIOJ_SIGNAL && + (lj->lioj_signal.sigev_notify == SIGEV_SIGNAL || + lj->lioj_signal.sigev_notify == SIGEV_THREAD_ID)) { aio_sendsig(userp, &lj->lioj_signal, &lj->lioj_ksi); lj->lioj_flags |= LIOJ_SIGNAL_POSTED; } @@ -2228,12 +2228,11 @@ kern_lio_listio(struct thread *td, int mode, struct ai lj->lioj_flags |= LIOJ_KEVENT_POSTED; KNOTE_LOCKED(&lj->klist, 1); } - if ((lj->lioj_flags & (LIOJ_SIGNAL|LIOJ_SIGNAL_POSTED)) - == LIOJ_SIGNAL - && (lj->lioj_signal.sigev_notify == SIGEV_SIGNAL || + if ((lj->lioj_flags & (LIOJ_SIGNAL | + LIOJ_SIGNAL_POSTED)) == LIOJ_SIGNAL && + (lj->lioj_signal.sigev_notify == SIGEV_SIGNAL || lj->lioj_signal.sigev_notify == SIGEV_THREAD_ID)) { - aio_sendsig(p, &lj->lioj_signal, - &lj->lioj_ksi); + aio_sendsig(p, &lj->lioj_signal, &lj->lioj_ksi); lj->lioj_flags |= LIOJ_SIGNAL_POSTED; } } From owner-svn-src-stable@freebsd.org Tue Dec 8 01:47:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4F8F4BE1E1; Tue, 8 Dec 2020 01:47:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cqjk75C0Lz4dt1; Tue, 8 Dec 2020 01:47:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A551741FE; Tue, 8 Dec 2020 01:47:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B81lx6M054466; Tue, 8 Dec 2020 01:47:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B81lxJR054465; Tue, 8 Dec 2020 01:47:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012080147.0B81lxJR054465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 8 Dec 2020 01:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368430 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 368430 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 01:47:59 -0000 Author: kib Date: Tue Dec 8 01:47:59 2020 New Revision: 368430 URL: https://svnweb.freebsd.org/changeset/base/368430 Log: MFC r368265: lio_listio(2): send signal even if number of jobs is zero. Modified: stable/12/sys/kern/vfs_aio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_aio.c ============================================================================== --- stable/12/sys/kern/vfs_aio.c Tue Dec 8 01:46:44 2020 (r368429) +++ stable/12/sys/kern/vfs_aio.c Tue Dec 8 01:47:59 2020 (r368430) @@ -466,7 +466,7 @@ aio_init_aioinfo(struct proc *p) } static int -aio_sendsig(struct proc *p, struct sigevent *sigev, ksiginfo_t *ksi) +aio_sendsig(struct proc *p, struct sigevent *sigev, ksiginfo_t *ksi, bool ext) { struct thread *td; int error; @@ -477,7 +477,7 @@ aio_sendsig(struct proc *p, struct sigevent *sigev, ks if (!KSI_ONQ(ksi)) { ksiginfo_set_sigev(ksi, sigev); ksi->ksi_code = SI_ASYNCIO; - ksi->ksi_flags |= KSI_EXT | KSI_INS; + ksi->ksi_flags |= ext ? (KSI_EXT | KSI_INS) : 0; tdsendsignal(p, td, ksi->ksi_signo, ksi); } PROC_UNLOCK(p); @@ -896,7 +896,7 @@ aio_bio_done_notify(struct proc *userp, struct kaiocb if (job->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || job->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) - aio_sendsig(userp, &job->uaiocb.aio_sigevent, &job->ksi); + aio_sendsig(userp, &job->uaiocb.aio_sigevent, &job->ksi, true); KNOTE_LOCKED(&job->klist, 1); @@ -909,7 +909,8 @@ aio_bio_done_notify(struct proc *userp, struct kaiocb == LIOJ_SIGNAL && (lj->lioj_signal.sigev_notify == SIGEV_SIGNAL || lj->lioj_signal.sigev_notify == SIGEV_THREAD_ID)) { - aio_sendsig(userp, &lj->lioj_signal, &lj->lioj_ksi); + aio_sendsig(userp, &lj->lioj_signal, &lj->lioj_ksi, + true); lj->lioj_flags |= LIOJ_SIGNAL_POSTED; } } @@ -2232,7 +2233,8 @@ kern_lio_listio(struct thread *td, int mode, struct ai LIOJ_SIGNAL_POSTED)) == LIOJ_SIGNAL && (lj->lioj_signal.sigev_notify == SIGEV_SIGNAL || lj->lioj_signal.sigev_notify == SIGEV_THREAD_ID)) { - aio_sendsig(p, &lj->lioj_signal, &lj->lioj_ksi); + aio_sendsig(p, &lj->lioj_signal, &lj->lioj_ksi, + lj->lioj_count != 1); lj->lioj_flags |= LIOJ_SIGNAL_POSTED; } } From owner-svn-src-stable@freebsd.org Tue Dec 8 07:47:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A49A9475027; Tue, 8 Dec 2020 07:47:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cqshy4KWBz3CyZ; Tue, 8 Dec 2020 07:47:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8790110BB8; Tue, 8 Dec 2020 07:47:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B87lUvt091461; Tue, 8 Dec 2020 07:47:30 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B87lTkl091458; Tue, 8 Dec 2020 07:47:29 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012080747.0B87lTkl091458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Tue, 8 Dec 2020 07:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368437 - stable/12/share/timedef X-SVN-Group: stable-12 X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: stable/12/share/timedef X-SVN-Commit-Revision: 368437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 07:47:30 -0000 Author: yuripv Date: Tue Dec 8 07:47:29 2020 New Revision: 368437 URL: https://svnweb.freebsd.org/changeset/base/368437 Log: MFC r340354: Use blank am_pm and t_fmt_ampm for de_AT and de_DE locales as apparently they use 24-hour clock notation. The visible change is that w(1) now uses 24-hour clock format as it checks for t_fmt_ampm presence. PR: 231771 Submitted by: Christoph Schönweiler Modified: stable/12/share/timedef/de_AT.ISO8859-15.src stable/12/share/timedef/de_AT.UTF-8.src stable/12/share/timedef/de_DE.ISO8859-15.src stable/12/share/timedef/de_DE.UTF-8.src Directory Properties: stable/12/ (props changed) Modified: stable/12/share/timedef/de_AT.ISO8859-15.src ============================================================================== --- stable/12/share/timedef/de_AT.ISO8859-15.src Tue Dec 8 04:18:16 2020 (r368436) +++ stable/12/share/timedef/de_AT.ISO8859-15.src Tue Dec 8 07:47:29 2020 (r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# ----------------------------------------------------------------------------- # # Short month names Jn. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: stable/12/share/timedef/de_AT.UTF-8.src ============================================================================== --- stable/12/share/timedef/de_AT.UTF-8.src Tue Dec 8 04:18:16 2020 (r368436) +++ stable/12/share/timedef/de_AT.UTF-8.src Tue Dec 8 07:47:29 2020 (r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# ----------------------------------------------------------------------------- # # Short month names Jän. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: stable/12/share/timedef/de_DE.ISO8859-15.src ============================================================================== --- stable/12/share/timedef/de_DE.ISO8859-15.src Tue Dec 8 04:18:16 2020 (r368436) +++ stable/12/share/timedef/de_DE.ISO8859-15.src Tue Dec 8 07:47:29 2020 (r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# ----------------------------------------------------------------------------- # # Short month names Jan. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: stable/12/share/timedef/de_DE.UTF-8.src ============================================================================== --- stable/12/share/timedef/de_DE.UTF-8.src Tue Dec 8 04:18:16 2020 (r368436) +++ stable/12/share/timedef/de_DE.UTF-8.src Tue Dec 8 07:47:29 2020 (r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# ----------------------------------------------------------------------------- # # Short month names Jan. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF From owner-svn-src-stable@freebsd.org Tue Dec 8 08:20:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA67C4767EF; Tue, 8 Dec 2020 08:20:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqtR25vc9z3GQs; Tue, 8 Dec 2020 08:20:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD85D110FE; Tue, 8 Dec 2020 08:20:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B88KUFt010519; Tue, 8 Dec 2020 08:20:30 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B88KUvl010518; Tue, 8 Dec 2020 08:20:30 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012080820.0B88KUvl010518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Tue, 8 Dec 2020 08:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368438 - stable/12/usr.bin/awk X-SVN-Group: stable-12 X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: stable/12/usr.bin/awk X-SVN-Commit-Revision: 368438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 08:20:30 -0000 Author: yuripv Date: Tue Dec 8 08:20:30 2020 New Revision: 368438 URL: https://svnweb.freebsd.org/changeset/base/368438 Log: MFC r362147: awk(1): use -version instead of -V -V is OpenBSD specific, use -version instead. While here, fix issue reported by mandoc lint and drop nonexistent script(7) reference. PR: 247004 Modified: stable/12/usr.bin/awk/awk.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/awk/awk.1 ============================================================================== --- stable/12/usr.bin/awk/awk.1 Tue Dec 8 07:47:29 2020 (r368437) +++ stable/12/usr.bin/awk/awk.1 Tue Dec 8 08:20:30 2020 (r368438) @@ -23,7 +23,7 @@ .\" THIS SOFTWARE. .\" .\" $FreeBSD$ -.Dd $Mdocdate: September 14 2015 $ +.Dd $Mdocdate: June 6 2020 $ .Dt AWK 1 .Os .Sh NAME @@ -32,7 +32,7 @@ .Sh SYNOPSIS .Nm awk .Op Fl safe -.Op Fl V +.Op Fl version .Op Fl d Ns Op Ar n .Op Fl F Ar fs .Op Fl v Ar var Ns = Ns Ar value @@ -101,7 +101,7 @@ approximation to a .Dq safe version of .Nm . -.It Fl V +.It Fl version Print the version number of .Nm to standard output and exit. @@ -265,7 +265,7 @@ and concatenation .Pq indicated by whitespace . The operators .Ic \&! ++ \-\- += \-= *= /= %= ^= -.Ic > >= < <= == != ?: +.Ic > >= < <= == != ?\&: are also available in expressions. Variables may be scalars, array elements (denoted @@ -752,8 +752,7 @@ Print an error message to standard error: .Xr lex 1 , .Xr printf 1 , .Xr sed 1 , -.Xr re_format 7 , -.Xr script 7 +.Xr re_format 7 .Rs .%A A. V. Aho .%A B. W. Kernighan @@ -774,9 +773,10 @@ except does not support {n,m} pattern matching. .Pp The flags -.Op Fl \&dV +.Fl d , +.Fl safe , and -.Op Fl safe , +.Fl version as well as the commands .Cm fflush , compl , and , or , .Cm xor , lshift , rshift , From owner-svn-src-stable@freebsd.org Tue Dec 8 18:28:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72B164A8B4E; Tue, 8 Dec 2020 18:28:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cr7wz2n6Mz4l4W; Tue, 8 Dec 2020 18:28:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D5D218E00; Tue, 8 Dec 2020 18:28:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8ISp0U002378; Tue, 8 Dec 2020 18:28:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8ISovw002373; Tue, 8 Dec 2020 18:28:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012081828.0B8ISovw002373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 8 Dec 2020 18:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368459 - in stable/12/crypto/openssl: crypto/asn1 crypto/err crypto/x509v3 include/openssl X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12/crypto/openssl: crypto/asn1 crypto/err crypto/x509v3 include/openssl X-SVN-Commit-Revision: 368459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:28:51 -0000 Author: emaste Date: Tue Dec 8 18:28:49 2020 New Revision: 368459 URL: https://svnweb.freebsd.org/changeset/base/368459 Log: MFC r368447: OpenSSL: address CVE-2020-1971 OpenSSL commit 3db2c9f3: Complain if we are attempting to encode with an invalid ASN.1 template OpenSSL commit 43a7033: Check that multi-strings/CHOICE types don't use implicit tagging OpenSSL commit f960d812: Correctly compare EdiPartyName in GENERAL_NAME_cmp() Obtained from: OpenSSL 3db2c9f3, 43a7033, f960d812 Security: CVE-2020-1971 Modified: stable/12/crypto/openssl/crypto/asn1/asn1_err.c stable/12/crypto/openssl/crypto/asn1/tasn_dec.c stable/12/crypto/openssl/crypto/asn1/tasn_enc.c stable/12/crypto/openssl/crypto/err/openssl.txt stable/12/crypto/openssl/crypto/x509v3/v3_genn.c stable/12/crypto/openssl/include/openssl/asn1err.h Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- stable/12/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 18:24:33 2020 (r368458) +++ stable/12/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 18:28:49 2020 (r368459) @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -49,6 +49,7 @@ static const ERR_STRING_DATA ASN1_str_functs[] = { "asn1_item_embed_d2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EMBED_NEW, 0), "asn1_item_embed_new"}, + {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EX_I2D, 0), "ASN1_item_ex_i2d"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_FLAGS_I2D, 0), "asn1_item_flags_i2d"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_BIO, 0), "ASN1_item_i2d_bio"}, @@ -160,6 +161,7 @@ static const ERR_STRING_DATA ASN1_str_reasons[] = { "asn1 sig parse error"}, {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_AUX_ERROR), "aux error"}, {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BAD_OBJECT_HEADER), "bad object header"}, + {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BAD_TEMPLATE), "bad template"}, {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BMPSTRING_IS_WRONG_LENGTH), "bmpstring is wrong length"}, {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BN_LIB), "bn lib"}, Modified: stable/12/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- stable/12/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 18:24:33 2020 (r368458) +++ stable/12/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 18:28:49 2020 (r368459) @@ -182,6 +182,15 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, cons tag, aclass, opt, ctx); case ASN1_ITYPE_MSTRING: + /* + * It never makes sense for multi-strings to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EMBED_D2I, ASN1_R_BAD_TEMPLATE); + goto err; + } + p = *in; /* Just read in tag and class */ ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL, @@ -199,6 +208,7 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, cons ASN1err(ASN1_F_ASN1_ITEM_EMBED_D2I, ASN1_R_MSTRING_NOT_UNIVERSAL); goto err; } + /* Check tag matches bit map */ if (!(ASN1_tag2bit(otag) & it->utype)) { /* If OPTIONAL, assume this is OK */ @@ -215,6 +225,15 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, cons return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx); case ASN1_ITYPE_CHOICE: + /* + * It never makes sense for CHOICE types to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EMBED_D2I, ASN1_R_BAD_TEMPLATE); + goto err; + } + if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) goto auxerr; if (*pval) { Modified: stable/12/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/12/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 18:24:33 2020 (r368458) +++ stable/12/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 18:28:49 2020 (r368459) @@ -103,9 +103,25 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char return asn1_i2d_ex_primitive(pval, out, it, tag, aclass); case ASN1_ITYPE_MSTRING: + /* + * It never makes sense for multi-strings to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE); + return -1; + } return asn1_i2d_ex_primitive(pval, out, it, -1, aclass); case ASN1_ITYPE_CHOICE: + /* + * It never makes sense for CHOICE types to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE); + return -1; + } if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL)) return 0; i = asn1_get_choice_selector(pval, it); Modified: stable/12/crypto/openssl/crypto/err/openssl.txt ============================================================================== --- stable/12/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 18:24:33 2020 (r368458) +++ stable/12/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 18:28:49 2020 (r368459) @@ -36,6 +36,7 @@ ASN1_F_ASN1_ITEM_D2I_FP:206:ASN1_item_d2i_fp ASN1_F_ASN1_ITEM_DUP:191:ASN1_item_dup ASN1_F_ASN1_ITEM_EMBED_D2I:120:asn1_item_embed_d2i ASN1_F_ASN1_ITEM_EMBED_NEW:121:asn1_item_embed_new +ASN1_F_ASN1_ITEM_EX_I2D:144:ASN1_item_ex_i2d ASN1_F_ASN1_ITEM_FLAGS_I2D:118:asn1_item_flags_i2d ASN1_F_ASN1_ITEM_I2D_BIO:192:ASN1_item_i2d_bio ASN1_F_ASN1_ITEM_I2D_FP:193:ASN1_item_i2d_fp @@ -1771,6 +1772,7 @@ ASN1_R_ASN1_PARSE_ERROR:203:asn1 parse error ASN1_R_ASN1_SIG_PARSE_ERROR:204:asn1 sig parse error ASN1_R_AUX_ERROR:100:aux error ASN1_R_BAD_OBJECT_HEADER:102:bad object header +ASN1_R_BAD_TEMPLATE:230:bad template ASN1_R_BMPSTRING_IS_WRONG_LENGTH:214:bmpstring is wrong length ASN1_R_BN_LIB:105:bn lib ASN1_R_BOOLEAN_IS_WRONG_LENGTH:106:boolean is wrong length Modified: stable/12/crypto/openssl/crypto/x509v3/v3_genn.c ============================================================================== --- stable/12/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 18:24:33 2020 (r368458) +++ stable/12/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 18:28:49 2020 (r368459) @@ -22,8 +22,9 @@ ASN1_SEQUENCE(OTHERNAME) = { IMPLEMENT_ASN1_FUNCTIONS(OTHERNAME) ASN1_SEQUENCE(EDIPARTYNAME) = { - ASN1_IMP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0), - ASN1_IMP_OPT(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1) + /* DirectoryString is a CHOICE type so use explicit tagging */ + ASN1_EXP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0), + ASN1_EXP(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1) } ASN1_SEQUENCE_END(EDIPARTYNAME) IMPLEMENT_ASN1_FUNCTIONS(EDIPARTYNAME) @@ -57,6 +58,37 @@ GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a) (char *)a); } +static int edipartyname_cmp(const EDIPARTYNAME *a, const EDIPARTYNAME *b) +{ + int res; + + if (a == NULL || b == NULL) { + /* + * Shouldn't be possible in a valid GENERAL_NAME, but we handle it + * anyway. OTHERNAME_cmp treats NULL != NULL so we do the same here + */ + return -1; + } + if (a->nameAssigner == NULL && b->nameAssigner != NULL) + return -1; + if (a->nameAssigner != NULL && b->nameAssigner == NULL) + return 1; + /* If we get here then both have nameAssigner set, or both unset */ + if (a->nameAssigner != NULL) { + res = ASN1_STRING_cmp(a->nameAssigner, b->nameAssigner); + if (res != 0) + return res; + } + /* + * partyName is required, so these should never be NULL. We treat it in + * the same way as the a == NULL || b == NULL case above + */ + if (a->partyName == NULL || b->partyName == NULL) + return -1; + + return ASN1_STRING_cmp(a->partyName, b->partyName); +} + /* Returns 0 if they are equal, != 0 otherwise. */ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) { @@ -66,8 +98,11 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: + result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address); + break; + case GEN_EDIPARTY: - result = ASN1_TYPE_cmp(a->d.other, b->d.other); + result = edipartyname_cmp(a->d.ediPartyName, b->d.ediPartyName); break; case GEN_OTHERNAME: @@ -114,8 +149,11 @@ void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type { switch (type) { case GEN_X400: + a->d.x400Address = value; + break; + case GEN_EDIPARTY: - a->d.other = value; + a->d.ediPartyName = value; break; case GEN_OTHERNAME: @@ -149,8 +187,10 @@ void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, i *ptype = a->type; switch (a->type) { case GEN_X400: + return a->d.x400Address; + case GEN_EDIPARTY: - return a->d.other; + return a->d.ediPartyName; case GEN_OTHERNAME: return a->d.otherName; Modified: stable/12/crypto/openssl/include/openssl/asn1err.h ============================================================================== --- stable/12/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 18:24:33 2020 (r368458) +++ stable/12/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 18:28:49 2020 (r368459) @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -11,9 +11,7 @@ #ifndef HEADER_ASN1ERR_H # define HEADER_ASN1ERR_H -# ifndef HEADER_SYMHACKS_H -# include -# endif +# include # ifdef __cplusplus extern "C" @@ -53,6 +51,7 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_ASN1_ITEM_DUP 191 # define ASN1_F_ASN1_ITEM_EMBED_D2I 120 # define ASN1_F_ASN1_ITEM_EMBED_NEW 121 +# define ASN1_F_ASN1_ITEM_EX_I2D 144 # define ASN1_F_ASN1_ITEM_FLAGS_I2D 118 # define ASN1_F_ASN1_ITEM_I2D_BIO 192 # define ASN1_F_ASN1_ITEM_I2D_FP 193 @@ -145,6 +144,7 @@ int ERR_load_ASN1_strings(void); # define ASN1_R_ASN1_SIG_PARSE_ERROR 204 # define ASN1_R_AUX_ERROR 100 # define ASN1_R_BAD_OBJECT_HEADER 102 +# define ASN1_R_BAD_TEMPLATE 230 # define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214 # define ASN1_R_BN_LIB 105 # define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 From owner-svn-src-stable@freebsd.org Tue Dec 8 22:37:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B3764AD87C; Tue, 8 Dec 2020 22:37:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrFRt5xwxz3GGN; Tue, 8 Dec 2020 22:37:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAD0B1BD65; Tue, 8 Dec 2020 22:37:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8MbUtO065800; Tue, 8 Dec 2020 22:37:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8MbUAw065799; Tue, 8 Dec 2020 22:37:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202012082237.0B8MbUAw065799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 8 Dec 2020 22:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368466 - stable/12/sbin/mount_nfs X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sbin/mount_nfs X-SVN-Commit-Revision: 368466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 22:37:31 -0000 Author: rmacklem Date: Tue Dec 8 22:37:30 2020 New Revision: 368466 URL: https://svnweb.freebsd.org/changeset/base/368466 Log: MFC: r368268 Improve man page for AmazonEFS mounts. PR#250770 was actually just a misunderstanding of what NFS mount options are needed for AmazonEFS mounts. This patch attempts to clarify the manpage to clarify this. This is a content change. PR: 250770 Modified: stable/12/sbin/mount_nfs/mount_nfs.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- stable/12/sbin/mount_nfs/mount_nfs.8 Tue Dec 8 21:24:24 2020 (r368465) +++ stable/12/sbin/mount_nfs/mount_nfs.8 Tue Dec 8 22:37:30 2020 (r368466) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 13, 2017 +.Dd November 30, 2020 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -215,9 +215,17 @@ Make a minor version 1 of the NFS Version 4 protocol m for all Opens. This may be useful for a server with a very low limit on OpenOwners, such as AmazonEFS. -It can only be used with an NFSv4.1 mount. +This option cannot be used for an NFS Version 4, minor version 0 mount. +As such, this option requires the +.Cm minorversion +option be specified with a value of 1 for AmazonEFS. It may not work correctly when Delegations are being issued by a server, but note that the AmazonEFS server does not issued delegations at this time. +This option is only meaningful when used with the +.Cm nfsv4 +and +.Cm minorversion +options. .It Cm pnfs Enable support for parallel NFS (pNFS) for minor version 1 of the NFS Version 4 protocol. From owner-svn-src-stable@freebsd.org Wed Dec 9 00:28:28 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B0424B0365; Wed, 9 Dec 2020 00:28:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrHvv6r0hz3MfH; Wed, 9 Dec 2020 00:28:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D92871D377; Wed, 9 Dec 2020 00:28:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B90SRwo035530; Wed, 9 Dec 2020 00:28:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B90SRxB035528; Wed, 9 Dec 2020 00:28:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012090028.0B90SRxB035528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 9 Dec 2020 00:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368469 - in stable/12: share/man/man4 sys/dev/mn X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/mn X-SVN-Commit-Revision: 368469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 00:28:28 -0000 Author: emaste Date: Wed Dec 9 00:28:27 2020 New Revision: 368469 URL: https://svnweb.freebsd.org/changeset/base/368469 Log: MFC r368397: Add deprecation notice to mn(4) Sync serial (T1/E1) interfaces are largely irrelevant today and phk confirms this driver is unnecessary in review D23928. This leaves ce(4) and cp(4) in the tree. They're likely not relevant either, but glebius contacted the manufacturer and those devices are still available for purchase. At glebius' suggestion leave them in the tree as long as they do not impose a maintenace burden. [Build fix from hps included in MFC] Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/mn.4 stable/12/sys/dev/mn/if_mn.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/mn.4 ============================================================================== --- stable/12/share/man/man4/mn.4 Tue Dec 8 23:54:09 2020 (r368468) +++ stable/12/share/man/man4/mn.4 Wed Dec 9 00:28:27 2020 (r368469) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2005 +.Dd December 6, 2020 .Dt MN 4 .Os .Sh NAME @@ -33,6 +33,12 @@ .Sh SYNOPSIS .Cd "device mn" .Cd "options NETGRAPH" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh HARDWARE The .Nm Modified: stable/12/sys/dev/mn/if_mn.c ============================================================================== --- stable/12/sys/dev/mn/if_mn.c Tue Dec 8 23:54:09 2020 (r368468) +++ stable/12/sys/dev/mn/if_mn.c Wed Dec 9 00:28:27 2020 (r368469) @@ -1395,6 +1395,7 @@ mn_attach (device_t self) default: printf(" Rev 0x%x\n", sc->f54r->vstr); } + gone_in_dev(self, 13, "sync serial (T1/E1) driver"); if (ng_make_node_common(&mntypestruct, &sc->node) != 0) { printf("ng_make_node_common failed\n"); From owner-svn-src-stable@freebsd.org Wed Dec 9 00:56:15 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81B164B0F40; Wed, 9 Dec 2020 00:56:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrJWz3FZNz3PG7; Wed, 9 Dec 2020 00:56:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61F671D9CB; Wed, 9 Dec 2020 00:56:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B90uF8x054476; Wed, 9 Dec 2020 00:56:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B90uFaE054475; Wed, 9 Dec 2020 00:56:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012090056.0B90uFaE054475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 9 Dec 2020 00:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368470 - stable/12/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/netpfil/pf X-SVN-Commit-Revision: 368470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 00:56:15 -0000 Author: markj Date: Wed Dec 9 00:56:14 2020 New Revision: 368470 URL: https://svnweb.freebsd.org/changeset/base/368470 Log: MFC r368276: pf: Fix table entry counter toggling PR: 251414 Modified: stable/12/sys/netpfil/pf/pf_table.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/pf/pf_table.c ============================================================================== --- stable/12/sys/netpfil/pf/pf_table.c Wed Dec 9 00:28:27 2020 (r368469) +++ stable/12/sys/netpfil/pf/pf_table.c Wed Dec 9 00:56:14 2020 (r368470) @@ -1642,6 +1642,7 @@ pfr_ina_commit(struct pfr_table *trs, u_int32_t ticket static void pfr_commit_ktable(struct pfr_ktable *kt, long tzero) { + counter_u64_t *pkc, *qkc; struct pfr_ktable *shadow = kt->pfrkt_shadow; int nflags; @@ -1663,14 +1664,17 @@ pfr_commit_ktable(struct pfr_ktable *kt, long tzero) SLIST_INIT(&delq); SLIST_INIT(&garbageq); pfr_clean_node_mask(shadow, &addrq); - for (p = SLIST_FIRST(&addrq); p != NULL; p = next) { - next = SLIST_NEXT(p, pfrke_workq); /* XXX */ + SLIST_FOREACH_SAFE(p, &addrq, pfrke_workq, next) { pfr_copyout_addr(&ad, p); q = pfr_lookup_addr(kt, &ad, 1); if (q != NULL) { if (q->pfrke_not != p->pfrke_not) SLIST_INSERT_HEAD(&changeq, q, pfrke_workq); + pkc = &p->pfrke_counters.pfrkc_counters; + qkc = &q->pfrke_counters.pfrkc_counters; + if ((*pkc == NULL) != (*qkc == NULL)) + SWAP(counter_u64_t, *pkc, *qkc); q->pfrke_mark = 1; SLIST_INSERT_HEAD(&garbageq, p, pfrke_workq); } else { From owner-svn-src-stable@freebsd.org Wed Dec 9 00:56:39 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4955E4B0FBE; Wed, 9 Dec 2020 00:56:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrJXR1YCVz3PCx; Wed, 9 Dec 2020 00:56:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2897F1DBE8; Wed, 9 Dec 2020 00:56:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B90udSY054557; Wed, 9 Dec 2020 00:56:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B90ucrt054553; Wed, 9 Dec 2020 00:56:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012090056.0B90ucrt054553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 9 Dec 2020 00:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368471 - stable/12/usr.sbin/rtsold X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.sbin/rtsold X-SVN-Commit-Revision: 368471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 00:56:39 -0000 Author: markj Date: Wed Dec 9 00:56:38 2020 New Revision: 368471 URL: https://svnweb.freebsd.org/changeset/base/368471 Log: MFC r368278: rtsold: Fix bugs reported by Coverity Modified: stable/12/usr.sbin/rtsold/cap_llflags.c stable/12/usr.sbin/rtsold/dump.c stable/12/usr.sbin/rtsold/if.c stable/12/usr.sbin/rtsold/rtsock.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/rtsold/cap_llflags.c ============================================================================== --- stable/12/usr.sbin/rtsold/cap_llflags.c Wed Dec 9 00:56:14 2020 (r368470) +++ stable/12/usr.sbin/rtsold/cap_llflags.c Wed Dec 9 00:56:38 2020 (r368471) @@ -72,9 +72,12 @@ llflags_get(const char *ifname, int *flagsp) if (s < 0) return (-1); - if (getifaddrs(&ifap) != 0) - return (-1); - error = -1; + ifap = NULL; + if (getifaddrs(&ifap) != 0) { + error = errno; + goto out; + } + error = ENOENT; for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { if (strcmp(ifa->ifa_name, ifname) != 0) continue; @@ -88,27 +91,29 @@ llflags_get(const char *ifname, int *flagsp) memset(&ifr6, 0, sizeof(ifr6)); if (strlcpy(ifr6.ifr_name, ifname, sizeof(ifr6.ifr_name)) >= sizeof(ifr6.ifr_name)) { - freeifaddrs(ifap); - errno = EINVAL; - return (-1); + error = errno; + goto out; } memcpy(&ifr6.ifr_ifru.ifru_addr, sin6, sin6->sin6_len); if (ioctl(s, SIOCGIFAFLAG_IN6, &ifr6) < 0) { error = errno; - freeifaddrs(ifap); - errno = error; - return (-1); + goto out; } *flagsp = ifr6.ifr_ifru.ifru_flags6; error = 0; break; } +out: (void)close(s); - freeifaddrs(ifap); - if (error == -1) - errno = ENOENT; - return (error); + if (ifap != NULL) + freeifaddrs(ifap); + if (error != 0) { + errno = error; + return (-1); + } else { + return (0); + } } int Modified: stable/12/usr.sbin/rtsold/dump.c ============================================================================== --- stable/12/usr.sbin/rtsold/dump.c Wed Dec 9 00:56:14 2020 (r368470) +++ stable/12/usr.sbin/rtsold/dump.c Wed Dec 9 00:56:38 2020 (r368471) @@ -148,6 +148,7 @@ rtsold_init_dumpfile(const char *dumpfile) if (caph_rights_limit(fileno(fp), &rights) != 0) { warnmsg(LOG_WARNING, __func__, "caph_rights_limit(%s): %s", dumpfile, strerror(errno)); + (void)fclose(fp); return (NULL); } return (fp); Modified: stable/12/usr.sbin/rtsold/if.c ============================================================================== --- stable/12/usr.sbin/rtsold/if.c Wed Dec 9 00:56:14 2020 (r368470) +++ stable/12/usr.sbin/rtsold/if.c Wed Dec 9 00:56:38 2020 (r368471) @@ -327,7 +327,7 @@ if_nametosdl(char *name) } } } - if (next == lim) { + if (next >= lim) { /* search failed */ free(buf); return (NULL); Modified: stable/12/usr.sbin/rtsold/rtsock.c ============================================================================== --- stable/12/usr.sbin/rtsold/rtsock.c Wed Dec 9 00:56:14 2020 (r368470) +++ stable/12/usr.sbin/rtsold/rtsock.c Wed Dec 9 00:56:38 2020 (r368471) @@ -84,7 +84,7 @@ rtsock_open(void) if (caph_rights_limit(s, &rights) != 0) { error = errno; (void)close(s); - errno = errno; + errno = error; return (-1); } return (s); From owner-svn-src-stable@freebsd.org Wed Dec 9 02:47:41 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B4474B3F4F; Wed, 9 Dec 2020 02:47:41 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrM0X73Ldz3mv7; Wed, 9 Dec 2020 02:47:40 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9CA91EEDA; Wed, 9 Dec 2020 02:47:40 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B92lemQ024381; Wed, 9 Dec 2020 02:47:40 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B92ldOj024376; Wed, 9 Dec 2020 02:47:39 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202012090247.0B92ldOj024376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Wed, 9 Dec 2020 02:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368477 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 368477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:47:41 -0000 Author: grehan Date: Wed Dec 9 02:47:39 2020 New Revision: 368477 URL: https://svnweb.freebsd.org/changeset/base/368477 Log: MFC r367762 Add legacy debug/test interfaces for kvm unit tests. Added: stable/12/usr.sbin/bhyve/pctestdev.c - copied unchanged from r367762, head/usr.sbin/bhyve/pctestdev.c stable/12/usr.sbin/bhyve/pctestdev.h - copied unchanged from r367762, head/usr.sbin/bhyve/pctestdev.h Modified: stable/12/usr.sbin/bhyve/Makefile stable/12/usr.sbin/bhyve/bhyve.8 stable/12/usr.sbin/bhyve/pci_lpc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/Makefile ============================================================================== --- stable/12/usr.sbin/bhyve/Makefile Wed Dec 9 02:21:25 2020 (r368476) +++ stable/12/usr.sbin/bhyve/Makefile Wed Dec 9 02:47:39 2020 (r368477) @@ -50,6 +50,7 @@ SRCS= \ pci_virtio_scsi.c \ pci_uart.c \ pci_xhci.c \ + pctestdev.c \ pm.c \ post.c \ ps2kbd.c \ Modified: stable/12/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/12/usr.sbin/bhyve/bhyve.8 Wed Dec 9 02:21:25 2020 (r368476) +++ stable/12/usr.sbin/bhyve/bhyve.8 Wed Dec 9 02:47:39 2020 (r368477) @@ -168,9 +168,11 @@ Allow devices behind the LPC PCI-ISA bridge to be conf The only supported devices are the TTY-class devices .Ar com1 and -.Ar com2 -and the boot ROM device -.Ar bootrom . +.Ar com2 , +the boot ROM device +.Ar bootrom , +and the debug/test device +.Ar pc-testdev . .Pp .Ar help print a list of supported LPC devices. @@ -259,7 +261,8 @@ Intel e82545 network interface. .It Li uart PCI 16550 serial device. .It Li lpc -LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports and a boot ROM. +LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports, a boot ROM, and, +optionally, the debug/test device. The LPC bridge emulation can only be configured on bus 0. .It Li fbuf Raw framebuffer device attached to VNC server. Modified: stable/12/usr.sbin/bhyve/pci_lpc.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_lpc.c Wed Dec 9 02:21:25 2020 (r368476) +++ stable/12/usr.sbin/bhyve/pci_lpc.c Wed Dec 9 02:47:39 2020 (r368477) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" #include "pci_irq.h" #include "pci_lpc.h" +#include "pctestdev.h" #include "uart_emul.h" #define IO_ICU1 0x20 @@ -79,6 +80,8 @@ static struct lpc_uart_softc { static const char *lpc_uart_names[LPC_UART_NUM] = { "COM1", "COM2" }; +static bool pctestdev_present; + /* * LPC device configuration is in the following form: * [,] @@ -106,6 +109,18 @@ lpc_device_parse(const char *opts) goto done; } } + if (strcasecmp(lpcdev, pctestdev_getname()) == 0) { + if (pctestdev_present) { + EPRINTLN("More than one %s device conf is " + "specified; only one is allowed.", + pctestdev_getname()); + } else if (pctestdev_parse(str) == 0) { + pctestdev_present = true; + error = 0; + free(cpy); + goto done; + } + } } done: @@ -123,6 +138,7 @@ lpc_print_supported_devices() printf("bootrom\n"); for (i = 0; i < LPC_UART_NUM; i++) printf("%s\n", lpc_uart_names[i]); + printf("%s\n", pctestdev_getname()); } const char * @@ -229,6 +245,13 @@ lpc_init(struct vmctx *ctx) error = register_inout(&iop); assert(error == 0); sc->enabled = 1; + } + + /* pc-testdev */ + if (pctestdev_present) { + error = pctestdev_init(ctx); + if (error) + return (error); } return (0); Copied: stable/12/usr.sbin/bhyve/pctestdev.c (from r367762, head/usr.sbin/bhyve/pctestdev.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/bhyve/pctestdev.c Wed Dec 9 02:47:39 2020 (r368477, copy of r367762, head/usr.sbin/bhyve/pctestdev.c) @@ -0,0 +1,270 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Adam Fenn + * + * 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. + */ + +/* + * Emulation of selected legacy test/debug interfaces expected by KVM-unit-tests + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "debug.h" +#include "inout.h" +#include "mem.h" +#include "pctestdev.h" + +#define DEBUGEXIT_BASE 0xf4 +#define DEBUGEXIT_LEN 4 +#define DEBUGEXIT_NAME "isa-debug-exit" + +#define IOMEM_BASE 0xff000000 +#define IOMEM_LEN 0x10000 +#define IOMEM_NAME "pc-testdev-iomem" + +#define IOPORT_BASE 0xe0 +#define IOPORT_LEN 4 +#define IOPORT_NAME "pc-testdev-ioport" + +#define IRQ_BASE 0x2000 +#define IRQ_IOAPIC_PINCOUNT_MIN 24 +#define IRQ_IOAPIC_PINCOUNT_MAX 32 +#define IRQ_NAME "pc-testdev-irq-line" + +#define PCTESTDEV_NAME "pc-testdev" + +static bool pctestdev_inited; +static uint8_t pctestdev_iomem_buf[IOMEM_LEN]; +static uint32_t pctestdev_ioport_data; + +static int pctestdev_debugexit_io(struct vmctx *ctx, int vcpu, int in, + int port, int bytes, uint32_t *eax, void *arg); +static int pctestdev_iomem_io(struct vmctx *ctx, int vcpu, int dir, + uint64_t addr, int size, uint64_t *val, void *arg1, + long arg2); +static int pctestdev_ioport_io(struct vmctx *ctx, int vcpu, int in, + int port, int bytes, uint32_t *eax, void *arg); +static int pctestdev_irq_io(struct vmctx *ctx, int vcpu, int in, + int port, int bytes, uint32_t *eax, void *arg); + +const char * +pctestdev_getname(void) +{ + return (PCTESTDEV_NAME); +} + +int +pctestdev_parse(const char *opts) +{ + if (opts != NULL && *opts != '\0') + return (-1); + + return (0); +} + +int +pctestdev_init(struct vmctx *ctx) +{ + struct mem_range iomem; + struct inout_port debugexit, ioport, irq; + int err, pincount; + + if (pctestdev_inited) { + EPRINTLN("Only one pc-testdev device is allowed."); + + return (-1); + } + + err = vm_ioapic_pincount(ctx, &pincount); + if (err != 0) { + EPRINTLN("pc-testdev: Failed to obtain IOAPIC pin count."); + + return (-1); + } + if (pincount < IRQ_IOAPIC_PINCOUNT_MIN || + pincount > IRQ_IOAPIC_PINCOUNT_MAX) { + EPRINTLN("pc-testdev: Unsupported IOAPIC pin count: %d.", + pincount); + + return (-1); + } + + debugexit.name = DEBUGEXIT_NAME; + debugexit.port = DEBUGEXIT_BASE; + debugexit.size = DEBUGEXIT_LEN; + debugexit.flags = IOPORT_F_INOUT; + debugexit.handler = pctestdev_debugexit_io; + debugexit.arg = NULL; + + iomem.name = IOMEM_NAME; + iomem.flags = MEM_F_RW | MEM_F_IMMUTABLE; + iomem.handler = pctestdev_iomem_io; + iomem.arg1 = NULL; + iomem.arg2 = 0; + iomem.base = IOMEM_BASE; + iomem.size = IOMEM_LEN; + + ioport.name = IOPORT_NAME; + ioport.port = IOPORT_BASE; + ioport.size = IOPORT_LEN; + ioport.flags = IOPORT_F_INOUT; + ioport.handler = pctestdev_ioport_io; + ioport.arg = NULL; + + irq.name = IRQ_NAME; + irq.port = IRQ_BASE; + irq.size = pincount; + irq.flags = IOPORT_F_INOUT; + irq.handler = pctestdev_irq_io; + irq.arg = NULL; + + err = register_inout(&debugexit); + if (err != 0) + goto fail; + + err = register_inout(&ioport); + if (err != 0) + goto fail_after_debugexit_reg; + + err = register_inout(&irq); + if (err != 0) + goto fail_after_ioport_reg; + + err = register_mem(&iomem); + if (err != 0) + goto fail_after_irq_reg; + + pctestdev_inited = true; + + return (0); + +fail_after_irq_reg: + (void)unregister_inout(&irq); + +fail_after_ioport_reg: + (void)unregister_inout(&ioport); + +fail_after_debugexit_reg: + (void)unregister_inout(&debugexit); + +fail: + return (err); +} + +static int +pctestdev_debugexit_io(struct vmctx *ctx, int vcpu, int in, int port, + int bytes, uint32_t *eax, void *arg) +{ + if (in) + *eax = 0; + else + exit((*eax << 1) | 1); + + return (0); +} + +static int +pctestdev_iomem_io(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, + int size, uint64_t *val, void *arg1, long arg2) +{ + uint64_t offset; + + if (addr + size > IOMEM_BASE + IOMEM_LEN) + return (-1); + + offset = addr - IOMEM_BASE; + if (dir == MEM_F_READ) { + (void)memcpy(val, pctestdev_iomem_buf + offset, size); + } else { + assert(dir == MEM_F_WRITE); + (void)memcpy(pctestdev_iomem_buf + offset, val, size); + } + + return (0); +} + +static int +pctestdev_ioport_io(struct vmctx *ctx, int vcpu, int in, int port, + int bytes, uint32_t *eax, void *arg) +{ + uint32_t mask; + int lsb; + + if (port + bytes > IOPORT_BASE + IOPORT_LEN) + return (-1); + + lsb = (port & 0x3) * 8; + mask = (-1UL >> (32 - (bytes * 8))) << lsb; + + if (in) + *eax = (pctestdev_ioport_data & mask) >> lsb; + else { + pctestdev_ioport_data &= ~mask; + pctestdev_ioport_data |= *eax << lsb; + } + + return (0); +} + +static int +pctestdev_irq_io(struct vmctx *ctx, int vcpu, int in, int port, int bytes, + uint32_t *eax, void *arg) +{ + int irq; + + if (bytes != 1) + return (-1); + + if (in) { + *eax = 0; + return (0); + } else { + irq = port - IRQ_BASE; + if (irq < 16) { + if (*eax) + return (vm_isa_assert_irq(ctx, irq, irq)); + else + return (vm_isa_deassert_irq(ctx, irq, irq)); + } else { + if (*eax) + return (vm_ioapic_assert_irq(ctx, irq)); + else + return (vm_ioapic_deassert_irq(ctx, irq)); + } + } +} Copied: stable/12/usr.sbin/bhyve/pctestdev.h (from r367762, head/usr.sbin/bhyve/pctestdev.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/bhyve/pctestdev.h Wed Dec 9 02:47:39 2020 (r368477, copy of r367762, head/usr.sbin/bhyve/pctestdev.h) @@ -0,0 +1,43 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Adam Fenn + * + * 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. + * + * $FreeBSD$ + */ + +/* + * Emulation of selected legacy test/debug interfaces expected by KVM-unit-tests + */ + +#ifndef _PCTESTDEV_H_ +#define _PCTESTDEV_H_ + +struct vmctx; + +const char *pctestdev_getname(void); +int pctestdev_init(struct vmctx *ctx); +int pctestdev_parse(const char *opts); + +#endif From owner-svn-src-stable@freebsd.org Wed Dec 9 17:17:45 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEA814AAA05; Wed, 9 Dec 2020 17:17:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrkJT50CDz3PKd; Wed, 9 Dec 2020 17:17:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E4311BF4; Wed, 9 Dec 2020 17:17:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B9HHjAa069349; Wed, 9 Dec 2020 17:17:45 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9HHj6H069348; Wed, 9 Dec 2020 17:17:45 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202012091717.0B9HHj6H069348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 9 Dec 2020 17:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368488 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 368488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 17:17:45 -0000 Author: kp Date: Wed Dec 9 17:17:45 2020 New Revision: 368488 URL: https://svnweb.freebsd.org/changeset/base/368488 Log: MFC r368277: pf tests: Test case for bug #251414 Changing a table from not having counters to having counters (or vice versa) may trigger panics. PR: 251414 Modified: stable/12/tests/sys/netpfil/pf/table.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/netpfil/pf/table.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/table.sh Wed Dec 9 15:28:56 2020 (r368487) +++ stable/12/tests/sys/netpfil/pf/table.sh Wed Dec 9 17:17:45 2020 (r368488) @@ -108,8 +108,47 @@ v6_counters_cleanup() pft_cleanup } +atf_test_case "pr251414" "cleanup" +pr251414_head() +{ + atf_set descr 'Test PR 251414' + atf_set require.user root +} + +pr251414_body() +{ + pft_init + + epair_send=$(vnet_mkepair) + ifconfig ${epair_send}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair_send}b + jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "pass all" \ + "table { self }" \ + "pass in log to " + + pft_set_rules noflush alcatraz \ + "pass all" \ + "table counters { self }" \ + "pass in log to " + + atf_check -s exit:0 -o ignore ping -c 3 192.0.2.2 + + jexec alcatraz pfctl -t tab -T show -vv +} + +pr251414_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" atf_add_test_case "v6_counters" + atf_add_test_case "pr251414" } From owner-svn-src-stable@freebsd.org Wed Dec 9 20:06:38 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89BF64AE508; Wed, 9 Dec 2020 20:06:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Crp3L38vdz3pH8; Wed, 9 Dec 2020 20:06:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F6723E40; Wed, 9 Dec 2020 20:06:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B9K6cW3076735; Wed, 9 Dec 2020 20:06:38 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9K6cuO076734; Wed, 9 Dec 2020 20:06:38 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202012092006.0B9K6cuO076734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 9 Dec 2020 20:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368491 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 368491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 20:06:38 -0000 Author: asomers Date: Wed Dec 9 20:06:37 2020 New Revision: 368491 URL: https://svnweb.freebsd.org/changeset/base/368491 Log: ZFS: fix spurious EBUSY after zfs receive to an existing dataset If you do a "zfs send -p | zfs receive -F " to an existing but empty dataset, the receive will complete successfully but spuriously fail with exit status 1 and the message "cannot mount 'pool/dataset': mountpoint or dataset is busy". The root cause is a merge error made in r344569 and MFCed in r345578, which merged changes a10d50f999 and e63ac16d25 from ZoL. The merge: * failed to flip a == to an != like the upstream change did, and * Left out one chunk Direct commit to stable/12 because head has moved on to OpenZFS. PR: 251694 Reviewed by: bapt Sponsored by: Axcient Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Dec 9 18:43:58 2020 (r368490) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Dec 9 20:06:37 2020 (r368491) @@ -895,13 +895,25 @@ libzfs_mnttab_add(libzfs_handle_t *hdl, const char *sp mnttab_node_t *mtn; pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock); - if (avl_numnodes(&hdl->libzfs_mnttab_cache) == 0) { + if (avl_numnodes(&hdl->libzfs_mnttab_cache) != 0) { mtn = zfs_alloc(hdl, sizeof (mnttab_node_t)); mtn->mtn_mt.mnt_special = zfs_strdup(hdl, special); mtn->mtn_mt.mnt_mountp = zfs_strdup(hdl, mountp); mtn->mtn_mt.mnt_fstype = zfs_strdup(hdl, MNTTYPE_ZFS); mtn->mtn_mt.mnt_mntopts = zfs_strdup(hdl, mntopts); - avl_add(&hdl->libzfs_mnttab_cache, mtn); + /* + * Another thread may have already added this entry + * via libzfs_mnttab_update. If so we should skip it. + */ + if (avl_find(&hdl->libzfs_mnttab_cache, mtn, NULL) != NULL) { + free(mtn->mtn_mt.mnt_special); + free(mtn->mtn_mt.mnt_mountp); + free(mtn->mtn_mt.mnt_fstype); + free(mtn->mtn_mt.mnt_mntopts); + free(mtn); + } else { + avl_add(&hdl->libzfs_mnttab_cache, mtn); + } } pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock); } From owner-svn-src-stable@freebsd.org Wed Dec 9 22:37:24 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AECFC4B1A05; Wed, 9 Dec 2020 22:37:24 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrsPJ4Wdyz4SF8; Wed, 9 Dec 2020 22:37:24 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89AC55FA5; Wed, 9 Dec 2020 22:37:24 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B9MbOkW074994; Wed, 9 Dec 2020 22:37:24 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9MbO1B074992; Wed, 9 Dec 2020 22:37:24 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202012092237.0B9MbO1B074992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 9 Dec 2020 22:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368494 - in stable/12/sys: fs/ext2fs ufs/ufs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in stable/12/sys: fs/ext2fs ufs/ufs X-SVN-Commit-Revision: 368494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 22:37:24 -0000 Author: mckusick Date: Wed Dec 9 22:37:23 2020 New Revision: 368494 URL: https://svnweb.freebsd.org/changeset/base/368494 Log: MFC of 368396 and 368425. Document BA_CLRBUF flag. Sponsored by: Netflix Modified: stable/12/sys/fs/ext2fs/ext2_extern.h stable/12/sys/ufs/ufs/ufs_extern.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_extern.h Wed Dec 9 20:38:26 2020 (r368493) +++ stable/12/sys/fs/ext2fs/ext2_extern.h Wed Dec 9 22:37:23 2020 (r368494) @@ -135,6 +135,13 @@ void ext2_gd_csum_set(struct m_ext2fs *); /* Flags to low-level allocation routines. * The low 16-bits are reserved for IO_ flags from vnode.h. + * + * The BA_CLRBUF flag specifies that the existing content of the block + * will not be completely overwritten by the caller, so buffers for new + * blocks must be cleared and buffers for existing blocks must be read. + * When BA_CLRBUF is not set the buffer will be completely overwritten + * and there is no reason to clear them or to spend I/O fetching existing + * data. The BA_CLRBUF flag is handled in the ext2_balloc() functions. */ #define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */ #define BA_SEQMASK 0x7F000000 /* Bits holding seq heuristic. */ Modified: stable/12/sys/ufs/ufs/ufs_extern.h ============================================================================== --- stable/12/sys/ufs/ufs/ufs_extern.h Wed Dec 9 20:38:26 2020 (r368493) +++ stable/12/sys/ufs/ufs/ufs_extern.h Wed Dec 9 22:37:23 2020 (r368494) @@ -119,6 +119,13 @@ void softdep_revert_rmdir(struct inode *, struct inode * * Note: The general vfs code typically limits the sequential heuristic * count to 127. See sequential_heuristic() in kern/vfs_vnops.c + * + * The BA_CLRBUF flag specifies that the existing content of the block + * will not be completely overwritten by the caller, so buffers for new + * blocks must be cleared and buffers for existing blocks must be read. + * When BA_CLRBUF is not set the buffer will be completely overwritten + * and there is no reason to clear them or to spend I/O fetching existing + * data. The BA_CLRBUF flag is handled in the UFS_BALLOC() functions. */ #define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */ #define BA_METAONLY 0x00020000 /* Return indirect block buffer. */ From owner-svn-src-stable@freebsd.org Thu Dec 10 00:43:33 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF2534B7036; Thu, 10 Dec 2020 00:43:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrwBs4bgnz4g5s; Thu, 10 Dec 2020 00:43:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 909F879BD; Thu, 10 Dec 2020 00:43:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA0hXCV057455; Thu, 10 Dec 2020 00:43:33 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA0hXoH057454; Thu, 10 Dec 2020 00:43:33 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202012100043.0BA0hXoH057454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 10 Dec 2020 00:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368495 - stable/12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/12/lib/libc/gen X-SVN-Commit-Revision: 368495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 00:43:33 -0000 Author: cy Date: Thu Dec 10 00:43:33 2020 New Revision: 368495 URL: https://svnweb.freebsd.org/changeset/base/368495 Log: MFC r368294: Remove trailing whitespace. Modified: stable/12/lib/libc/gen/glob-compat11.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/glob-compat11.c ============================================================================== --- stable/12/lib/libc/gen/glob-compat11.c Wed Dec 9 22:37:23 2020 (r368494) +++ stable/12/lib/libc/gen/glob-compat11.c Thu Dec 10 00:43:33 2020 (r368495) @@ -77,8 +77,8 @@ __FBSDID("$FreeBSD$"); struct glob_limit { size_t l_brace_cnt; size_t l_path_lim; - size_t l_readdir_cnt; - size_t l_stat_cnt; + size_t l_readdir_cnt; + size_t l_stat_cnt; size_t l_string_cnt; }; @@ -402,8 +402,8 @@ globtilde(const Char *pattern, Char *patbuf, size_t pa if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE)) return (pattern); - /* - * Copy up to the end of the string or / + /* + * Copy up to the end of the string or / */ eb = &patbuf[patbuf_len - 1]; for (p = pattern + 1, b = patbuf; From owner-svn-src-stable@freebsd.org Thu Dec 10 08:48:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02E4D4795F0; Thu, 10 Dec 2020 08:48:06 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs6xx6Yyxz3MdL; Thu, 10 Dec 2020 08:48:05 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D39E3158EF; Thu, 10 Dec 2020 08:48:05 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA8m5fN057864; Thu, 10 Dec 2020 08:48:05 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA8m3mR057853; Thu, 10 Dec 2020 08:48:03 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012100848.0BA8m3mR057853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Thu, 10 Dec 2020 08:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368501 - in stable/12: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/manuals contrib/bc/manuals/bc contrib/bc/manuals/dc contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc co... X-SVN-Group: stable-12 X-SVN-Commit-Author: se X-SVN-Commit-Paths: in stable/12: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/manuals contrib/bc/manuals/bc contrib/bc/manuals/dc contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history cont... X-SVN-Commit-Revision: 368501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 08:48:06 -0000 Author: se Date: Thu Dec 10 08:48:03 2020 New Revision: 368501 URL: https://svnweb.freebsd.org/changeset/base/368501 Log: MFC: r366318, r368072, r368080, r368097, r368387 Upgrade to version 3.2.3 Added: stable/12/contrib/bc/exec-install.sh - copied unchanged from r368072, head/contrib/bc/exec-install.sh - copied unchanged from r368072, head/contrib/bc/include/bcl.h - copied unchanged from r368072, head/contrib/bc/include/library.h - copied unchanged from r368072, head/contrib/bc/manuals/bcl.3 stable/12/contrib/bc/manuals/bcl.3.md - copied unchanged from r368072, head/contrib/bc/manuals/bcl.3.md - copied unchanged from r368072, head/contrib/bc/manuals/header.txt - copied unchanged from r368072, head/contrib/bc/manuals/header_bc.txt - copied unchanged from r368072, head/contrib/bc/manuals/header_bcl.txt - copied unchanged from r368072, head/contrib/bc/manuals/header_dc.txt stable/12/contrib/bc/src/bc.c - copied unchanged from r368072, head/contrib/bc/src/bc.c stable/12/contrib/bc/src/bc_lex.c - copied unchanged from r368072, head/contrib/bc/src/bc_lex.c stable/12/contrib/bc/src/bc_parse.c - copied unchanged from r368072, head/contrib/bc/src/bc_parse.c stable/12/contrib/bc/src/dc.c - copied unchanged from r368072, head/contrib/bc/src/dc.c stable/12/contrib/bc/src/dc_lex.c - copied unchanged from r368072, head/contrib/bc/src/dc_lex.c stable/12/contrib/bc/src/dc_parse.c - copied unchanged from r368072, head/contrib/bc/src/dc_parse.c stable/12/contrib/bc/src/history.c - copied unchanged from r368072, head/contrib/bc/src/history.c - copied unchanged from r368072, head/contrib/bc/src/library.c stable/12/contrib/bc/src/rand.c - copied unchanged from r368072, head/contrib/bc/src/rand.c - copied unchanged from r368072, head/contrib/bc/tests/bcl.c Directory Properties: stable/12/contrib/bc/include/bcl.h (props changed) stable/12/contrib/bc/include/library.h (props changed) stable/12/contrib/bc/manuals/bcl.3 (props changed) stable/12/contrib/bc/manuals/header.txt (props changed) stable/12/contrib/bc/manuals/header_bc.txt (props changed) stable/12/contrib/bc/manuals/header_bcl.txt (props changed) stable/12/contrib/bc/manuals/header_dc.txt (props changed) stable/12/contrib/bc/src/library.c (props changed) stable/12/contrib/bc/tests/bcl.c (props changed) Deleted: stable/12/contrib/bc/install.sh stable/12/contrib/bc/src/bc/ stable/12/contrib/bc/src/dc/ stable/12/contrib/bc/src/history/ stable/12/contrib/bc/src/rand/ Modified: stable/12/contrib/bc/.gitignore stable/12/contrib/bc/Makefile.in stable/12/contrib/bc/NEWS.md stable/12/contrib/bc/README.md stable/12/contrib/bc/configure.sh stable/12/contrib/bc/gen/lib.bc stable/12/contrib/bc/gen/strgen.c stable/12/contrib/bc/gen/strgen.sh stable/12/contrib/bc/include/bc.h stable/12/contrib/bc/include/file.h stable/12/contrib/bc/include/lex.h stable/12/contrib/bc/include/num.h stable/12/contrib/bc/include/parse.h stable/12/contrib/bc/include/rand.h stable/12/contrib/bc/include/status.h stable/12/contrib/bc/include/vector.h stable/12/contrib/bc/include/vm.h stable/12/contrib/bc/manpage.sh stable/12/contrib/bc/manuals/bc.1.md.in stable/12/contrib/bc/manuals/bc/A.1 stable/12/contrib/bc/manuals/bc/A.1.md stable/12/contrib/bc/manuals/bc/E.1 stable/12/contrib/bc/manuals/bc/E.1.md stable/12/contrib/bc/manuals/bc/EH.1 stable/12/contrib/bc/manuals/bc/EH.1.md stable/12/contrib/bc/manuals/bc/EHN.1 stable/12/contrib/bc/manuals/bc/EHN.1.md stable/12/contrib/bc/manuals/bc/EHNP.1 stable/12/contrib/bc/manuals/bc/EHNP.1.md stable/12/contrib/bc/manuals/bc/EHP.1 stable/12/contrib/bc/manuals/bc/EHP.1.md stable/12/contrib/bc/manuals/bc/EN.1 stable/12/contrib/bc/manuals/bc/EN.1.md stable/12/contrib/bc/manuals/bc/ENP.1 stable/12/contrib/bc/manuals/bc/ENP.1.md stable/12/contrib/bc/manuals/bc/EP.1 stable/12/contrib/bc/manuals/bc/EP.1.md stable/12/contrib/bc/manuals/bc/H.1 stable/12/contrib/bc/manuals/bc/H.1.md stable/12/contrib/bc/manuals/bc/HN.1 stable/12/contrib/bc/manuals/bc/HN.1.md stable/12/contrib/bc/manuals/bc/HNP.1 stable/12/contrib/bc/manuals/bc/HNP.1.md stable/12/contrib/bc/manuals/bc/HP.1 stable/12/contrib/bc/manuals/bc/HP.1.md stable/12/contrib/bc/manuals/bc/N.1 stable/12/contrib/bc/manuals/bc/N.1.md stable/12/contrib/bc/manuals/bc/NP.1 stable/12/contrib/bc/manuals/bc/NP.1.md stable/12/contrib/bc/manuals/bc/P.1 stable/12/contrib/bc/manuals/bc/P.1.md stable/12/contrib/bc/manuals/build.md stable/12/contrib/bc/manuals/dc.1.md.in stable/12/contrib/bc/manuals/dc/A.1 stable/12/contrib/bc/manuals/dc/A.1.md stable/12/contrib/bc/manuals/dc/E.1 stable/12/contrib/bc/manuals/dc/E.1.md stable/12/contrib/bc/manuals/dc/EH.1 stable/12/contrib/bc/manuals/dc/EH.1.md stable/12/contrib/bc/manuals/dc/EHN.1 stable/12/contrib/bc/manuals/dc/EHN.1.md stable/12/contrib/bc/manuals/dc/EHNP.1 stable/12/contrib/bc/manuals/dc/EHNP.1.md stable/12/contrib/bc/manuals/dc/EHP.1 stable/12/contrib/bc/manuals/dc/EHP.1.md stable/12/contrib/bc/manuals/dc/EN.1 stable/12/contrib/bc/manuals/dc/EN.1.md stable/12/contrib/bc/manuals/dc/ENP.1 stable/12/contrib/bc/manuals/dc/ENP.1.md stable/12/contrib/bc/manuals/dc/EP.1 stable/12/contrib/bc/manuals/dc/EP.1.md stable/12/contrib/bc/manuals/dc/H.1 stable/12/contrib/bc/manuals/dc/H.1.md stable/12/contrib/bc/manuals/dc/HN.1 stable/12/contrib/bc/manuals/dc/HN.1.md stable/12/contrib/bc/manuals/dc/HNP.1 stable/12/contrib/bc/manuals/dc/HNP.1.md stable/12/contrib/bc/manuals/dc/HP.1 stable/12/contrib/bc/manuals/dc/HP.1.md stable/12/contrib/bc/manuals/dc/N.1 stable/12/contrib/bc/manuals/dc/N.1.md stable/12/contrib/bc/manuals/dc/NP.1 stable/12/contrib/bc/manuals/dc/NP.1.md stable/12/contrib/bc/manuals/dc/P.1 stable/12/contrib/bc/manuals/dc/P.1.md stable/12/contrib/bc/release.sh stable/12/contrib/bc/src/args.c stable/12/contrib/bc/src/data.c stable/12/contrib/bc/src/file.c stable/12/contrib/bc/src/lang.c stable/12/contrib/bc/src/lex.c stable/12/contrib/bc/src/main.c stable/12/contrib/bc/src/num.c stable/12/contrib/bc/src/opt.c stable/12/contrib/bc/src/parse.c stable/12/contrib/bc/src/program.c stable/12/contrib/bc/src/read.c stable/12/contrib/bc/src/vector.c stable/12/contrib/bc/src/vm.c stable/12/usr.bin/gh-bc/Makefile Directory Properties: stable/12/contrib/bc/tests/bc/stdin1.txt (props changed) stable/12/contrib/bc/tests/bc/stdin1_results.txt (props changed) stable/12/contrib/bc/tests/bc/stdin2.txt (props changed) stable/12/contrib/bc/tests/bc/stdin2_results.txt (props changed) Modified: stable/12/contrib/bc/.gitignore ============================================================================== --- stable/12/contrib/bc/.gitignore Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/.gitignore Thu Dec 10 08:48:03 2020 (r368501) @@ -9,6 +9,7 @@ bin/*bc bin/*bc.exe bin/*dc bin/*dc.exe +bin/bcl bc.old *.o *.a Modified: stable/12/contrib/bc/Makefile.in ============================================================================== --- stable/12/contrib/bc/Makefile.in Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/Makefile.in Thu Dec 10 08:48:03 2020 (r368501) @@ -29,33 +29,13 @@ # .POSIX: -VERSION = 3.1.5 +VERSION = 3.2.3 SRC = %%SRC%% OBJ = %%OBJ%% GCDA = %%GCDA%% GCNO = %%GCNO%% -BC_SRC = %%BC_SRC%% -BC_OBJ = %%BC_OBJ%% -BC_GCDA = %%BC_GCDA%% -BC_GCNO = %%BC_GCNO%% - -DC_SRC = %%DC_SRC%% -DC_OBJ = %%DC_OBJ%% -DC_GCDA = %%DC_GCDA%% -DC_GCNO = %%DC_GCNO%% - -HISTORY_SRC = %%HISTORY_SRC%% -HISTORY_OBJ = %%HISTORY_OBJ%% -HISTORY_GCDA = %%HISTORY_GCDA%% -HISTORY_GCNO = %%HISTORY_GCNO%% - -RAND_SRC = %%RAND_SRC%% -RAND_OBJ = %%RAND_OBJ%% -RAND_GCDA = %%RAND_GCDA%% -RAND_GCNO = %%RAND_GCNO%% - BC_ENABLED_NAME = BC_ENABLED BC_ENABLED = %%BC_ENABLED%% DC_ENABLED_NAME = DC_ENABLED @@ -102,6 +82,13 @@ DC = dc BC_EXEC = $(BIN)/$(EXEC_PREFIX)$(BC) DC_EXEC = $(BIN)/$(EXEC_PREFIX)$(DC) +LIB = libbcl +LIB_NAME = $(LIB).a +LIBBC = $(BIN)/$(LIB_NAME) +BCL = bcl +BCL_TEST = $(BIN)/$(BCL) +BCL_TEST_C = tests/$(BCL).c + MANUALS = manuals BC_MANPAGE_NAME = $(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX).1 BC_MANPAGE = $(MANUALS)/$(BC).1 @@ -109,16 +96,28 @@ BC_MD = $(BC_MANPAGE).md DC_MANPAGE_NAME = $(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX).1 DC_MANPAGE = $(MANUALS)/$(DC).1 DC_MD = $(DC_MANPAGE).md +BCL_MANPAGE_NAME = bcl.3 +BCL_MANPAGE = $(MANUALS)/$(BCL_MANPAGE_NAME) +BCL_MD = $(BCL_MANPAGE).md MANPAGE_INSTALL_ARGS = -Dm644 +BINARY_INSTALL_ARGS = -Dm755 +BCL_HEADER_NAME = bcl.h +BCL_HEADER = include/$(BCL_HEADER_NAME) + %%DESTDIR%% BINDIR = %%BINDIR%% +INCLUDEDIR = %%INCLUDEDIR%% +LIBDIR = %%LIBDIR%% MAN1DIR = %%MAN1DIR%% +MAN3DIR = %%MAN3DIR%% MAIN_EXEC = $(EXEC_PREFIX)$(%%MAIN_EXEC%%)$(EXEC_SUFFIX) EXEC = $(%%EXEC%%) NLSPATH = %%NLSPATH%% +BC_ENABLE_LIBRARY = %%LIBRARY%% + BC_ENABLE_HISTORY = %%HISTORY%% BC_ENABLE_EXTRA_MATH_NAME = BC_ENABLE_EXTRA_MATH BC_ENABLE_EXTRA_MATH = %%EXTRA_MATH%% @@ -129,7 +128,7 @@ BC_LONG_BIT = %%LONG_BIT%% RM = rm MKDIR = mkdir -INSTALL = ./install.sh +INSTALL = ./exec-install.sh SAFE_INSTALL = ./safe-install.sh LINK = ./link.sh MANPAGE = ./manpage.sh @@ -148,7 +147,7 @@ CPPFLAGS4 = $(CPPFLAGS3) -D_POSIX_C_SOURCE=200809L -D_ CPPFLAGS5 = $(CPPFLAGS4) -DBC_NUM_KARATSUBA_LEN=$(BC_NUM_KARATSUBA_LEN) CPPFLAGS6 = $(CPPFLAGS5) -DBC_ENABLE_NLS=$(BC_ENABLE_NLS) -DBC_ENABLE_PROMPT=$(BC_ENABLE_PROMPT) CPPFLAGS7 = $(CPPFLAGS6) -D$(BC_ENABLE_EXTRA_MATH_NAME)=$(BC_ENABLE_EXTRA_MATH) -CPPFLAGS = $(CPPFLAGS7) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) +CPPFLAGS = $(CPPFLAGS7) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) -DBC_ENABLE_LIBRARY=$(BC_ENABLE_LIBRARY) CFLAGS = $(CPPFLAGS) %%CPPFLAGS%% %%CFLAGS%% LDFLAGS = %%LDFLAGS%% @@ -157,21 +156,24 @@ HOSTCFLAGS = %%HOSTCFLAGS%% CC = %%CC%% HOSTCC = %%HOSTCC%% -BC_LIB_C_ARGS = bc_lib bc.h bc_lib_name $(BC_ENABLED_NAME) 1 -BC_LIB2_C_ARGS = bc_lib2 bc.h bc_lib2_name "$(BC_ENABLED_NAME) && $(BC_ENABLE_EXTRA_MATH_NAME)" 1 +BC_LIB_C_ARGS = bc_lib bc_lib_name $(BC_ENABLED_NAME) 1 +BC_LIB2_C_ARGS = bc_lib2 bc_lib2_name "$(BC_ENABLED_NAME) && $(BC_ENABLE_EXTRA_MATH_NAME)" 1 -OBJS1 = $(OBJ) $(DC_OBJ) $(BC_OBJ) $(HISTORY_OBJ) $(RAND_OBJ) $(BC_HELP_O) $(DC_HELP_O) -OBJS = $(OBJS1) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) -OBJ_TARGETS1 = $(DC_HELP_O) $(BC_HELP_O) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) -OBJ_TARGETS = $(OBJ_TARGETS1) $(BC_OBJ) $(DC_OBJ) $(HISTORY_OBJ) $(RAND_OBJ) $(OBJ) +OBJS = $(BC_HELP_O) $(DC_HELP_O) $(BC_LIB_O) $(BC_LIB2_O) $(OBJ) +OBJ_TARGETS = $(DC_HELP_O) $(BC_HELP_O) $(BC_LIB_O) $(BC_LIB2_O) $(OBJ) .c.o: $(CC) $(CFLAGS) -o $@ -c $< -all: make_bin $(OBJ_TARGETS) +all: %%ALL_PREREQ%% + +execs: make_bin $(OBJ_TARGETS) $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) %%LINK%% +library: make_bin $(OBJ) $(BC_LIB_O) $(BC_LIB2_O) + ar -r -cu $(LIBBC) $(BC_LIB_O) $(BC_LIB2_O) $(OBJ) + $(GEN_EXEC): %%GEN_EXEC_TARGET%% @@ -182,10 +184,10 @@ $(BC_LIB2_C): $(GEN_EXEC) $(BC_LIB2) $(GEN_EMU) $(GEN_EXEC) $(BC_LIB2) $(BC_LIB2_C) $(BC_LIB2_C_ARGS) $(BC_HELP_C): $(GEN_EXEC) $(BC_HELP) - $(GEN_EMU) $(GEN_EXEC) $(BC_HELP) $(BC_HELP_C) bc_help bc.h "" $(BC_ENABLED_NAME) + $(GEN_EMU) $(GEN_EXEC) $(BC_HELP) $(BC_HELP_C) bc_help "" $(BC_ENABLED_NAME) $(DC_HELP_C): $(GEN_EXEC) $(DC_HELP) - $(GEN_EMU) $(GEN_EXEC) $(DC_HELP) $(DC_HELP_C) dc_help dc.h "" $(DC_ENABLED_NAME) + $(GEN_EMU) $(GEN_EXEC) $(DC_HELP) $(DC_HELP_C) dc_help "" $(DC_ENABLED_NAME) make_bin: $(MKDIR) -p $(BIN) @@ -222,7 +224,7 @@ help: check: test -test: test_bc timeconst test_dc +test: %%TESTS%% test_bc: %%BC_TEST%% @@ -241,6 +243,12 @@ time_test_dc: timeconst: %%TIMECONST%% +library_test: library + $(CC) $(CFLAGS) $(BCL_TEST_C) $(LIBBC) -o $(BCL_TEST) + +test_library: library_test + $(BCL_TEST) + valgrind: valgrind_bc valgrind_dc valgrind_bc: @@ -272,6 +280,7 @@ extra_math: manpages: $(MANPAGE) bc $(MANPAGE) dc + $(MANPAGE) bcl clean_gen: @$(RM) -f $(GEN_EXEC) @@ -279,10 +288,6 @@ clean_gen: clean:%%CLEAN_PREREQS%% @printf 'Cleaning files...\n' @$(RM) -f $(OBJ) - @$(RM) -f $(BC_OBJ) - @$(RM) -f $(DC_OBJ) - @$(RM) -f $(HISTORY_OBJ) - @$(RM) -f $(RAND_OBJ) @$(RM) -f $(BC_EXEC) @$(RM) -f $(DC_EXEC) @$(RM) -fr $(BIN) @@ -343,9 +348,20 @@ install_bc_manpage: install_dc_manpage: $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(DC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(DC_MANPAGE_NAME) -install:%%INSTALL_LOCALES_PREREQS%%%%INSTALL_PREREQS%% +install_bcl_manpage: + $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(BCL_MANPAGE) $(DESTDIR)$(MAN3DIR)/$(BCL_MANPAGE_NAME) + +install_bcl_header: + $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(BCL_HEADER) $(DESTDIR)$(INCLUDEDIR)/$(BCL_HEADER_NAME) + +install_execs: $(INSTALL) $(DESTDIR)$(BINDIR) "$(EXEC_SUFFIX)" +install_library: + $(SAFE_INSTALL) $(BINARY_INSTALL_ARGS) $(LIBBC) $(DESTDIR)$(LIBDIR)/$(LIB_NAME) + +install:%%INSTALL_LOCALES_PREREQS%%%%INSTALL_MAN_PREREQS%%%%INSTALL_PREREQS%% + uninstall_locales: $(LOCALE_UNINSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) @@ -360,5 +376,14 @@ uninstall_dc_manpage: uninstall_dc: $(RM) -f $(DESTDIR)$(BINDIR)/$(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX) + +uninstall_library: + $(RM) -f $(DESTDIR)$(LIBDIR)/$(LIB_NAME) + +uninstall_bcl_header: + $(RM) -f $(DESTDIR)$(INCLUDEDIR)/$(BCL_HEADER_NAME) + +uninstall_bcl_manpage: + $(RM) -f $(DESTDIR)$(MAN3DIR)/$(BCL_MANPAGE_NAME) uninstall:%%UNINSTALL_LOCALES_PREREQS%%%%UNINSTALL_MAN_PREREQS%%%%UNINSTALL_PREREQS%% Modified: stable/12/contrib/bc/NEWS.md ============================================================================== --- stable/12/contrib/bc/NEWS.md Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/NEWS.md Thu Dec 10 08:48:03 2020 (r368501) @@ -1,5 +1,50 @@ # News +## 3.2.3 + +This is a production release that fixes a bug in `gen/strgen.sh`. I recently +changed `gen/strgen.c`, but I did not change `gen/strgen.sh`. + +Users that do not use `gen/strgen.sh` do not need to upgrade. + +## 3.2.2 + +This is a production release that fixes a portability bug in `configure.sh`. The +bug was using the GNU `find` extension `-wholename`. + +## 3.2.1 + +This is a production release that has one fix for `bcl(3)`. It is technically +not a bug fix since the behavior is undefined, but the `BclNumber`s that +`bcl_divmod()` returns will be set to `BCL_ERROR_INVALID_NUM` if there is an +error. Previously, they were not set. + +## 3.2.0 + +This is a production release that has one bug fix and a major addition. + +The bug fix was a missing `auto` variable in the bessel `j()` function in the +math library. + +The major addition is a way to build a version of `bc`'s math code as a library. +This is done with the `-a` option to `configure.sh`. The API for the library can +be read in `./manuals/bcl.3.md` or `man bcl` once the library is installed with +`make install`. + +This library was requested by developers before I even finished version 1.0, but +I could not figure out how to do it until now. + +If the library has API breaking changes, the major version of `bc` will be +incremented. + +## 3.1.6 + +This is a production release that fixes a new warning from Clang 12 for FreeBSD +and also removes some possible undefined behavior found by UBSan that compilers +did not seem to take advantage of. + +Users do ***NOT*** need to upgrade, if they do not want to. + ## 3.1.5 This is a production release that fixes the Chinese locales (which caused `bc` Modified: stable/12/contrib/bc/README.md ============================================================================== --- stable/12/contrib/bc/README.md Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/README.md Thu Dec 10 08:48:03 2020 (r368501) @@ -107,6 +107,23 @@ other locations, use the `PREFIX` environment variable `configure.sh` or pass the `--prefix=` option to `configure.sh`. See the [build manual][5], or run `./configure.sh --help`, for more details. +### Library + +This `bc` does provide a way to build a math library with C bindings. This is +done by the `-a` or `--library` options to `configure.sh`: + +``` +./configure.sh -a +``` + +When building the library, the executables are not built. For more information, +see the [build manual][5]. + +The library API can be found in [`manuals/bcl.3.md`][26] or `man bcl` once the +library is installed. + +The library is built as `bin/libbcl.a`. + ### Package and Distro Maintainers #### Recommended Compiler @@ -335,3 +352,4 @@ Folders: [23]: https://svnweb.freebsd.org/base/head/contrib/bc/ [24]: https://bugs.freebsd.org/ [25]: https://reviews.freebsd.org/ +[26]: ./manuals/bcl.3.md Modified: stable/12/contrib/bc/configure.sh ============================================================================== --- stable/12/contrib/bc/configure.sh Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/configure.sh Thu Dec 10 08:48:03 2020 (r368501) @@ -45,22 +45,27 @@ usage() { _usage_val=0 fi - printf 'usage: %s -h\n' "$script" - printf ' %s --help\n' "$script" - printf ' %s [-bD|-dB|-c] [-EfgGHlMNPT] [-O OPT_LEVEL] [-k KARATSUBA_LEN]\n' "$script" - printf ' %s \\\n' "$script" - printf ' [--bc-only --disable-dc|--dc-only --disable-bc|--coverage] \\\n' - printf ' [--debug --disable-extra-math --disable-generated-tests] \\\n' - printf ' [--disable-history --disable-man-pages --disable-nls] \\\n' - printf ' [--disable-prompt --disable-strip] [--install-all-locales] \\\n' - printf ' [--opt=OPT_LEVEL] [--karatsuba-len=KARATSUBA_LEN] \\\n' - printf ' [--prefix=PREFIX] [--bindir=BINDIR] [--datarootdir=DATAROOTDIR] \\\n' - printf ' [--datadir=DATADIR] [--mandir=MANDIR] [--man1dir=MAN1DIR] \\\n' - printf ' [--force] \\\n' + printf 'usage:\n' + printf ' %s -h\n' "$script" + printf ' %s --help\n' "$script" + printf ' %s [-a|-bD|-dB|-c] [-EfgGHlMNPT] [-O OPT_LEVEL] [-k KARATSUBA_LEN]\n' "$script" + printf ' %s \\\n' "$script" + printf ' [--library|--bc-only --disable-dc|--dc-only --disable-bc|--coverage]\\\n' + printf ' [--force --debug --disable-extra-math --disable-generated-tests] \\\n' + printf ' [--disable-history --disable-man-pages --disable-nls] \\\n' + printf ' [--disable-prompt --disable-strip] [--install-all-locales] \\\n' + printf ' [--opt=OPT_LEVEL] [--karatsuba-len=KARATSUBA_LEN] \\\n' + printf ' [--prefix=PREFIX] [--bindir=BINDIR] [--datarootdir=DATAROOTDIR] \\\n' + printf ' [--datadir=DATADIR] [--mandir=MANDIR] [--man1dir=MAN1DIR] \\\n' printf '\n' + printf ' -a, --library\n' + printf ' Build the libbc instead of the programs. This is meant to be used with\n' + printf ' Other software like programming languages that want to make use of the\n' + printf ' parsing and math capabilities. This option will install headers using\n' + printf ' `make install`.\n' printf ' -b, --bc-only\n' - printf ' Build bc only. It is an error if "-d", "--dc-only", "-B", or "--disable-bc"\n' - printf ' are specified too.\n' + printf ' Build bc only. It is an error if "-d", "--dc-only", "-B", or\n' + printf ' "--disable-bc" are specified too.\n' printf ' -B, --disable-bc\n' printf ' Disable bc. It is an error if "-b", "--bc-only", "-D", or "--disable-dc"\n' printf ' are specified too.\n' @@ -69,10 +74,10 @@ usage() { printf ' It is an error if either "-b" ("-D") or "-d" ("-B") is specified.\n' printf ' Requires a compiler that use gcc-compatible coverage options\n' printf ' -d, --dc-only\n' - printf ' Build dc only. It is an error if "-b", "--bc-only", "-D", or "--disable-dc"\n' - printf ' are specified too.\n' + printf ' Build dc only. It is an error if "-b", "--bc-only", "-D", or\n' + printf ' "--disable-dc" are specified too.\n' printf ' -D, --disable-dc\n' - printf ' Disable dc. It is an error if "-d", "--dc-only" "-B", or "--disable-bc"\n' + printf ' Disable dc. It is an error if "-d", "--dc-only", "-B", or "--disable-bc"\n' printf ' are specified too.\n' printf ' -E, --disable-extra-math\n' printf ' Disable extra math. This includes: "$" operator (truncate to integer),\n' @@ -122,8 +127,14 @@ usage() { printf ' If PREFIX is "/usr", install path will be "/usr/bin".\n' printf ' Default is "/usr/local".\n' printf ' --bindir BINDIR\n' - printf ' The directory to install binaries. Overrides "$BINDIR" if it exists.\n' + printf ' The directory to install binaries in. Overrides "$BINDIR" if it exists.\n' printf ' Default is "$PREFIX/bin".\n' + printf ' --includedir INCLUDEDIR\n' + printf ' The directory to install headers in. Overrides "$INCLUDEDIR" if it\n' + printf ' exists. Default is "$PREFIX/include".\n' + printf ' --libdir LIBDIR\n' + printf ' The directory to install libraries in. Overrides "$LIBDIR" if it exists.\n' + printf ' Default is "$PREFIX/lib".\n' printf ' --datarootdir DATAROOTDIR\n' printf ' The root location for data files. Overrides "$DATAROOTDIR" if it exists.\n' printf ' Default is "$PREFIX/share".\n' @@ -136,6 +147,9 @@ usage() { printf ' --man1dir MAN1DIR\n' printf ' The location to install Section 1 manpages to. Overrides "$MAN1DIR" if\n' printf ' it exists. Default is "$MANDIR/man1".\n' + printf ' --man3dir MAN3DIR\n' + printf ' The location to install Section 3 manpages to. Overrides "$MAN3DIR" if\n' + printf ' it exists. Default is "$MANDIR/man3".\n' printf '\n' printf 'In addition, the following environment variables are used:\n' printf '\n' @@ -157,12 +171,18 @@ usage() { printf ' LDFLAGS Linker flags. Default is "".\n' printf ' PREFIX The prefix to install to. Default is "/usr/local".\n' printf ' If PREFIX is "/usr", install path will be "/usr/bin".\n' - printf ' BINDIR The directory to install binaries. Default is "$PREFIX/bin".\n' + printf ' BINDIR The directory to install binaries in. Default is "$PREFIX/bin".\n' + printf ' INCLUDEDIR The directory to install header files in. Default is\n' + printf ' "$PREFIX/include".\n' + printf ' LIBDIR The directory to install libraries in. Default is\n' + printf ' "$PREFIX/lib".\n' printf ' DATAROOTDIR The root location for data files. Default is "$PREFIX/share".\n' printf ' DATADIR The location for data files. Default is "$DATAROOTDIR".\n' printf ' MANDIR The location to install manpages to. Default is "$DATADIR/man".\n' printf ' MAN1DIR The location to install Section 1 manpages to. Default is\n' printf ' "$MANDIR/man1".\n' + printf ' MAN3DIR The location to install Section 3 manpages to. Default is\n' + printf ' "$MANDIR/man3".\n' printf ' NLSPATH The location to install locale catalogs to. Must be an absolute\n' printf ' path (or contain one). This is treated the same as the POSIX\n' printf ' definition of $NLSPATH (see POSIX environment variables for\n' @@ -257,56 +277,55 @@ replace() { substring_replace "$_replace_str" "%%$_replace_needle%%" "$_replace_replacement" } -gen_file_lists() { +gen_file_list() { - if [ "$#" -lt 3 ]; then + if [ "$#" -lt 1 ]; then err_exit "Invalid number of args to $0" fi - _gen_file_lists_contents="$1" + _gen_file_list_contents="$1" shift - _gen_file_lists_filedir="$1" - shift + p=$(pwd) - _gen_file_lists_typ="$1" - shift + cd "$scriptdir" - # If there is an extra argument, and it - # is zero, we keep the file lists empty. - if [ "$#" -gt 0 ]; then - _gen_file_lists_use="$1" + if [ "$#" -ge 1 ]; then + + while [ "$#" -ge 1 ]; do + a="$1" + shift + args="$args ! -path src/${a}" + done + else - _gen_file_lists_use="1" + args="-print" fi - _gen_file_lists_needle_src="${_gen_file_lists_typ}SRC" - _gen_file_lists_needle_obj="${_gen_file_lists_typ}OBJ" - _gen_file_lists_needle_gcda="${_gen_file_lists_typ}GCDA" - _gen_file_lists_needle_gcno="${_gen_file_lists_typ}GCNO" + _gen_file_list_needle_src="SRC" + _gen_file_list_needle_obj="OBJ" + _gen_file_list_needle_gcda="GCDA" + _gen_file_list_needle_gcno="GCNO" - if [ "$_gen_file_lists_use" -ne 0 ]; then + _gen_file_list_replacement=$(find src/ -depth -name "*.c" $args | tr '\n' ' ') + _gen_file_list_contents=$(replace "$_gen_file_list_contents" \ + "$_gen_file_list_needle_src" "$_gen_file_list_replacement") - _gen_file_lists_replacement=$(cd "$_gen_file_lists_filedir" && find . ! -name . -prune -name "*.c" | cut -d/ -f2 | sed "s@^@$_gen_file_lists_filedir/@g" | tr '\n' ' ') - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_src" "$_gen_file_lists_replacement") + _gen_file_list_replacement=$(replace_exts "$_gen_file_list_replacement" "c" "o") + _gen_file_list_contents=$(replace "$_gen_file_list_contents" \ + "$_gen_file_list_needle_obj" "$_gen_file_list_replacement") - _gen_file_lists_replacement=$(replace_exts "$_gen_file_lists_replacement" "c" "o") - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_obj" "$_gen_file_lists_replacement") + _gen_file_list_replacement=$(replace_exts "$_gen_file_list_replacement" "o" "gcda") + _gen_file_list_contents=$(replace "$_gen_file_list_contents" \ + "$_gen_file_list_needle_gcda" "$_gen_file_list_replacement") - _gen_file_lists_replacement=$(replace_exts "$_gen_file_lists_replacement" "o" "gcda") - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_gcda" "$_gen_file_lists_replacement") + _gen_file_list_replacement=$(replace_exts "$_gen_file_list_replacement" "gcda" "gcno") + _gen_file_list_contents=$(replace "$_gen_file_list_contents" \ + "$_gen_file_list_needle_gcno" "$_gen_file_list_replacement") - _gen_file_lists_replacement=$(replace_exts "$_gen_file_lists_replacement" "gcda" "gcno") - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_gcno" "$_gen_file_lists_replacement") + cd "$p" - else - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_src" "") - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_obj" "") - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_gcda" "") - _gen_file_lists_contents=$(replace "$_gen_file_lists_contents" "$_gen_file_lists_needle_gcno" "") - fi - - printf '%s\n' "$_gen_file_lists_contents" + printf '%s\n' "$_gen_file_list_contents" } bc_only=0 @@ -324,10 +343,12 @@ prompt=1 force=0 strip_bin=1 all_locales=0 +library=0 -while getopts "bBcdDEfgGhHk:lMNO:PST-" opt; do +while getopts "abBcdDEfgGhHk:lMNO:PST-" opt; do case "$opt" in + a) library=1 ;; b) bc_only=1 ;; B) dc_only=1 ;; c) coverage=1 ;; @@ -352,6 +373,7 @@ while getopts "bBcdDEfgGhHk:lMNO:PST-" opt; do LONG_OPTARG="${arg#*=}" case $arg in help) usage ;; + library) library=1 ;; bc-only) bc_only=1 ;; dc-only) dc_only=1 ;; coverage) coverage=1 ;; @@ -371,6 +393,20 @@ while getopts "bBcdDEfgGhHk:lMNO:PST-" opt; do fi BINDIR="$2" shift ;; + includedir=?*) INCLUDEDIR="$LONG_OPTARG" ;; + includedir) + if [ "$#" -lt 2 ]; then + usage "No argument given for '--$arg' option" + fi + INCLUDEDIR="$2" + shift ;; + libdir=?*) LIBDIR="$LONG_OPTARG" ;; + libdir) + if [ "$#" -lt 2 ]; then + usage "No argument given for '--$arg' option" + fi + LIBDIR="$2" + shift ;; datarootdir=?*) DATAROOTDIR="$LONG_OPTARG" ;; datarootdir) if [ "$#" -lt 2 ]; then @@ -399,6 +435,13 @@ while getopts "bBcdDEfgGhHk:lMNO:PST-" opt; do fi MAN1DIR="$2" shift ;; + man3dir=?*) MAN3DIR="$LONG_OPTARG" ;; + man3dir) + if [ "$#" -lt 2 ]; then + usage "No argument given for '--$arg' option" + fi + MAN3DIR="$2" + shift ;; localedir=?*) LOCALEDIR="$LONG_OPTARG" ;; localedir) if [ "$#" -lt 2 ]; then @@ -454,6 +497,12 @@ if [ "$bc_only" -eq 1 ] && [ "$dc_only" -eq 1 ]; then usage "Can only specify one of -b(-D) or -d(-B)" fi +if [ "$library" -ne 0 ]; then + if [ "$bc_only" -eq 1 ] || [ "$dc_only" -eq 1 ]; then + usage "Must not specify -b(-D) or -d(-B) when building the library" + fi +fi + case $karatsuba_len in (*[!0-9]*|'') usage "KARATSUBA_LEN is not a number" ;; (*) ;; @@ -529,6 +578,8 @@ link="@printf 'No link necessary\\\\n'" main_exec="BC" executable="BC_EXEC" +tests="test_bc timeconst test_dc" + bc_test="@tests/all.sh bc $extra_math 1 $generate_tests 0 \$(BC_EXEC)" bc_time_test="@tests/all.sh bc $extra_math 1 $generate_tests 1 \$(BC_EXEC)" @@ -567,7 +618,8 @@ if [ "$bc_only" -eq 1 ]; then dc_time_test="@printf 'No dc tests to run\\\\n'" vg_dc_test="@printf 'No dc tests to run\\\\n'" - install_prereqs=" install_bc_manpage" + install_prereqs=" install_execs" + install_man_prereqs=" install_bc_manpage" uninstall_prereqs=" uninstall_bc" uninstall_man_prereqs=" uninstall_bc_manpage" @@ -590,7 +642,8 @@ elif [ "$dc_only" -eq 1 ]; then timeconst="@printf 'timeconst cannot be run because bc is not built\\\\n'" - install_prereqs=" install_dc_manpage" + install_prereqs=" install_execs" + install_man_prereqs=" install_dc_manpage" uninstall_prereqs=" uninstall_dc" uninstall_man_prereqs=" uninstall_dc_manpage" @@ -606,9 +659,18 @@ else karatsuba="@\$(KARATSUBA) 30 0 \$(BC_EXEC)" karatsuba_test="@\$(KARATSUBA) 1 100 \$(BC_EXEC)" - install_prereqs=" install_bc_manpage install_dc_manpage" - uninstall_prereqs=" uninstall_bc uninstall_dc" - uninstall_man_prereqs=" uninstall_bc_manpage uninstall_dc_manpage" + if [ "$library" -eq 0 ]; then + install_prereqs=" install_execs" + install_man_prereqs=" install_bc_manpage install_dc_manpage" + uninstall_prereqs=" uninstall_bc uninstall_dc" + uninstall_man_prereqs=" uninstall_bc_manpage uninstall_dc_manpage" + else + install_prereqs=" install_library install_bcl_header" + install_man_prereqs=" install_bcl_manpage" + uninstall_prereqs=" uninstall_library uninstall_bcl_header" + uninstall_man_prereqs=" uninstall_bcl_manpage" + tests="test_library" + fi fi @@ -664,6 +726,14 @@ if [ -z "${BINDIR+set}" ]; then BINDIR="$PREFIX/bin" fi +if [ -z "${INCLUDEDIR+set}" ]; then + INCLUDEDIR="$PREFIX/include" +fi + +if [ -z "${LIBDIR+set}" ]; then + LIBDIR="$PREFIX/lib" +fi + if [ "$install_manpages" -ne 0 ] || [ "$nls" -ne 0 ]; then if [ -z "${DATAROOTDIR+set}" ]; then DATAROOTDIR="$PREFIX/share" @@ -684,11 +754,25 @@ if [ "$install_manpages" -ne 0 ]; then MAN1DIR="$MANDIR/man1" fi + if [ -z "${MAN3DIR+set}" ]; then + MAN3DIR="$MANDIR/man3" + fi + else - install_prereqs="" + install_man_prereqs="" uninstall_man_prereqs="" fi +if [ "$library" -ne 0 ]; then + extra_math=1 + nls=0 + hist=0 + prompt=0 + ALL_PREREQ="library" +else + ALL_PREREQ="execs" +fi + if [ "$nls" -ne 0 ]; then set +e @@ -776,11 +860,11 @@ if [ "$hist" -eq 1 ]; then printf 'Testing history...\n' flags="-DBC_ENABLE_HISTORY=1 -DBC_ENABLED=$bc -DDC_ENABLED=$dc" - flags="$flags -DBC_ENABLE_NLS=$nls" + flags="$flags -DBC_ENABLE_NLS=$nls -DBC_ENABLE_LIBRARY=0" flags="$flags -DBC_ENABLE_EXTRA_MATH=$extra_math -I./include/" flags="$flags -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700" - "$CC" $CPPFLAGS $CFLAGS $flags -c "src/history/history.c" -o "$scriptdir/history.o" > /dev/null 2>&1 + "$CC" $CPPFLAGS $CFLAGS $flags -c "src/history.c" -o "$scriptdir/history.o" > /dev/null 2>&1 err="$?" @@ -804,7 +888,11 @@ if [ "$hist" -eq 1 ]; then fi -if [ "$extra_math" -eq 1 ] && [ "$bc" -ne 0 ]; then +if [ "$library" -eq 1 ]; then + bc_lib="" +fi + +if [ "$extra_math" -eq 1 ] && [ "$bc" -ne 0 ] && [ "$library" -eq 0 ]; then BC_LIB2_O="\$(GEN_DIR)/lib2.o" else BC_LIB2_O="" @@ -846,6 +934,33 @@ if [ "$manpage_args" = "" ]; then manpage_args="A" fi +unneeded="" + +if [ "$hist" -eq 0 ]; then + unneeded="$unneeded history.c" +fi + +if [ "$bc" -eq 0 ]; then + unneeded="$unneeded bc.c bc_lex.c bc_parse.c" +fi + +if [ "$dc" -eq 0 ]; then + unneeded="$unneeded dc.c dc_lex.c dc_parse.c" +fi + +if [ "$extra_math" -eq 0 ]; then + unneeded="$unneeded rand.c" +fi + +if [ "$library" -ne 0 ]; then + unneeded="$unneeded args.c opt.c read.c file.c main.c" + unneeded="$unneeded lang.c lex.c parse.c program.c" + unneeded="$unneeded bc.c bc_lex.c bc_parse.c" + unneeded="$unneeded dc.c dc_lex.c dc_parse.c" +else + unneeded="$unneeded library.c" +fi + # Print out the values; this is for debugging. if [ "$bc" -ne 0 ]; then printf 'Building bc\n' @@ -858,6 +973,7 @@ else printf 'Not building dc\n' fi printf '\n' +printf 'BC_ENABLE_LIBRARY=%s\n\n' "$library" printf 'BC_ENABLE_HISTORY=%s\n' "$hist" printf 'BC_ENABLE_EXTRA_MATH=%s\n' "$extra_math" printf 'BC_ENABLE_NLS=%s\n' "$nls" @@ -873,10 +989,13 @@ printf 'CPPFLAGS=%s\n' "$CPPFLAGS" printf 'LDFLAGS=%s\n' "$LDFLAGS" printf 'PREFIX=%s\n' "$PREFIX" printf 'BINDIR=%s\n' "$BINDIR" +printf 'INCLUDEDIR=%s\n' "$INCLUDEDIR" +printf 'LIBDIR=%s\n' "$LIBDIR" printf 'DATAROOTDIR=%s\n' "$DATAROOTDIR" printf 'DATADIR=%s\n' "$DATADIR" printf 'MANDIR=%s\n' "$MANDIR" printf 'MAN1DIR=%s\n' "$MAN1DIR" +printf 'MAN3DIR=%s\n' "$MAN3DIR" printf 'NLSPATH=%s\n' "$NLSPATH" printf 'EXECSUFFIX=%s\n' "$EXECSUFFIX" printf 'EXECPREFIX=%s\n' "$EXECPREFIX" @@ -892,16 +1011,17 @@ replacement='*** WARNING: Autogenerated from Makefile. contents=$(replace "$contents" "$needle" "$replacement") -contents=$(gen_file_lists "$contents" "$scriptdir/src" "") -contents=$(gen_file_lists "$contents" "$scriptdir/src/bc" "BC_" "$bc") -contents=$(gen_file_lists "$contents" "$scriptdir/src/dc" "DC_" "$dc") -contents=$(gen_file_lists "$contents" "$scriptdir/src/history" "HISTORY_" "$hist") -contents=$(gen_file_lists "$contents" "$scriptdir/src/rand" "RAND_" "$extra_math") +if [ "$unneeded" = "" ]; then + contents=$(gen_file_list "$contents" "library.c") +else + contents=$(gen_file_list "$contents" $unneeded) +fi contents=$(replace "$contents" "BC_ENABLED" "$bc") contents=$(replace "$contents" "DC_ENABLED" "$dc") contents=$(replace "$contents" "LINK" "$link") +contents=$(replace "$contents" "LIBRARY" "$library") contents=$(replace "$contents" "HISTORY" "$hist") contents=$(replace "$contents" "EXTRA_MATH" "$extra_math") contents=$(replace "$contents" "NLS" "$nls") @@ -917,7 +1037,10 @@ contents=$(replace "$contents" "DESTDIR" "$destdir") contents=$(replace "$contents" "EXECSUFFIX" "$EXECSUFFIX") contents=$(replace "$contents" "EXECPREFIX" "$EXECPREFIX") contents=$(replace "$contents" "BINDIR" "$BINDIR") +contents=$(replace "$contents" "INCLUDEDIR" "$INCLUDEDIR") +contents=$(replace "$contents" "LIBDIR" "$LIBDIR") contents=$(replace "$contents" "MAN1DIR" "$MAN1DIR") +contents=$(replace "$contents" "MAN3DIR" "$MAN3DIR") contents=$(replace "$contents" "CFLAGS" "$CFLAGS") contents=$(replace "$contents" "HOSTCFLAGS" "$HOSTCFLAGS") contents=$(replace "$contents" "CPPFLAGS" "$CPPFLAGS") @@ -927,15 +1050,19 @@ contents=$(replace "$contents" "HOSTCC" "$HOSTCC") contents=$(replace "$contents" "COVERAGE_OUTPUT" "$COVERAGE_OUTPUT") contents=$(replace "$contents" "COVERAGE_PREREQS" "$COVERAGE_PREREQS") contents=$(replace "$contents" "INSTALL_PREREQS" "$install_prereqs") +contents=$(replace "$contents" "INSTALL_MAN_PREREQS" "$install_man_prereqs") contents=$(replace "$contents" "INSTALL_LOCALES" "$install_locales") contents=$(replace "$contents" "INSTALL_LOCALES_PREREQS" "$install_locales_prereqs") contents=$(replace "$contents" "UNINSTALL_MAN_PREREQS" "$uninstall_man_prereqs") contents=$(replace "$contents" "UNINSTALL_PREREQS" "$uninstall_prereqs") contents=$(replace "$contents" "UNINSTALL_LOCALES_PREREQS" "$uninstall_locales_prereqs") +contents=$(replace "$contents" "ALL_PREREQ" "$ALL_PREREQ") + contents=$(replace "$contents" "EXECUTABLES" "$executables") contents=$(replace "$contents" "MAIN_EXEC" "$main_exec") contents=$(replace "$contents" "EXEC" "$executable") +contents=$(replace "$contents" "TESTS" "$tests") contents=$(replace "$contents" "BC_TEST" "$bc_test") contents=$(replace "$contents" "BC_TIME_TEST" "$bc_time_test") Copied: stable/12/contrib/bc/exec-install.sh (from r368072, head/contrib/bc/exec-install.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/bc/exec-install.sh Thu Dec 10 08:48:03 2020 (r368501, copy of r368072, head/contrib/bc/exec-install.sh) @@ -0,0 +1,63 @@ +#! /bin/sh +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2020 Gavin D. Howard and contributors. +# +# 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. +# +# 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 HOLDER 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. +# + +usage() { + printf "usage: %s install_dir exec_suffix\n" "$0" 1>&2 + exit 1 +} + +script="$0" +scriptdir=$(dirname "$script") + +. "$scriptdir/functions.sh" + +INSTALL="$scriptdir/safe-install.sh" + +test "$#" -ge 2 || usage + +installdir="$1" +shift + +exec_suffix="$1" +shift + +bindir="$scriptdir/bin" + +for exe in $bindir/*; do + + base=$(basename "$exe") + + if [ -L "$exe" ]; then + link=$(readlink "$exe") + "$INSTALL" -Dlm 755 "$link$exec_suffix" "$installdir/$base$exec_suffix" + else + "$INSTALL" -Dm 755 "$exe" "$installdir/$base$exec_suffix" + fi + +done Modified: stable/12/contrib/bc/gen/lib.bc ============================================================================== --- stable/12/contrib/bc/gen/lib.bc Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/gen/lib.bc Thu Dec 10 08:48:03 2020 (r368501) @@ -173,7 +173,7 @@ define a(x){ return((m*a+r)/n) } define j(n,x){ - auto b,s,o,a,i,v,f + auto b,s,o,a,i,r,v,f b=ibase ibase=A s=scale Modified: stable/12/contrib/bc/gen/strgen.c ============================================================================== --- stable/12/contrib/bc/gen/strgen.c Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/gen/strgen.c Thu Dec 10 08:48:03 2020 (r368501) @@ -45,13 +45,14 @@ static const char* const bc_gen_header = "// Copyright (c) 2018-2020 Gavin D. Howard and contributors.\n" "// Licensed under the 2-clause BSD license.\n" - "// *** AUTOMATICALLY GENERATED FROM %s. DO NOT MODIFY. ***\n"; + "// *** AUTOMATICALLY GENERATED FROM %s. DO NOT MODIFY. ***\n\n"; -static const char* const bc_gen_include = "#include <%s>\n\n"; static const char* const bc_gen_label = "const char *%s = \"%s\";\n\n"; +static const char* const bc_gen_label_extern = "extern const char *%s;\n\n"; static const char* const bc_gen_ifdef = "#if %s\n"; static const char* const bc_gen_endif = "#endif // %s\n"; static const char* const bc_gen_name = "const char %s[] = {\n"; +static const char* const bc_gen_name_extern = "extern const char %s[];\n\n"; #define IO_ERR (1) #define INVALID_INPUT_FILE (2) @@ -62,7 +63,7 @@ static const char* const bc_gen_name = "const char %s[ int main(int argc, char *argv[]) { FILE *in, *out; - char *label, *define, *name, *include; + char *label, *define, *name; int c, count, slashes, err = IO_ERR; bool has_label, has_define, remove_tabs; @@ -72,15 +73,14 @@ int main(int argc, char *argv[]) { } name = argv[3]; - include = argv[4]; - has_label = (argc > 5 && strcmp("", argv[5]) != 0); - label = has_label ? argv[5] : ""; + has_label = (argc > 4 && strcmp("", argv[4]) != 0); + label = has_label ? argv[4] : ""; - has_define = (argc > 6 && strcmp("", argv[6]) != 0); - define = has_define ? argv[6] : ""; + has_define = (argc > 5 && strcmp("", argv[5]) != 0); + define = has_define ? argv[5] : ""; - remove_tabs = (argc > 7); + remove_tabs = (argc > 6); in = fopen(argv[1], "r"); if (!in) return INVALID_INPUT_FILE; @@ -89,8 +89,9 @@ int main(int argc, char *argv[]) { if (!out) goto out_err; if (fprintf(out, bc_gen_header, argv[1]) < 0) goto err; + if (has_label && fprintf(out, bc_gen_label_extern, label) < 0) goto err; + if (fprintf(out, bc_gen_name_extern, name) < 0) goto err; if (has_define && fprintf(out, bc_gen_ifdef, define) < 0) goto err; - if (fprintf(out, bc_gen_include, include) < 0) goto err; if (has_label && fprintf(out, bc_gen_label, label, argv[1]) < 0) goto err; if (fprintf(out, bc_gen_name, name) < 0) goto err; Modified: stable/12/contrib/bc/gen/strgen.sh ============================================================================== --- stable/12/contrib/bc/gen/strgen.sh Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/gen/strgen.sh Thu Dec 10 08:48:03 2020 (r368501) @@ -32,24 +32,24 @@ export LC_CTYPE=C progname=${0##*/} -if [ $# -lt 4 ]; then - echo "usage: $progname input output name header [label [define [remove_tabs]]]" +if [ $# -lt 3 ]; then + echo "usage: $progname input output name [label [define [remove_tabs]]]" exit 1 fi input="$1" output="$2" name="$3" -header="$4" -label="$5" -define="$6" -remove_tabs="$7" +label="$4" +define="$5" +remove_tabs="$6" exec < "$input" exec > "$output" if [ -n "$label" ]; then nameline="const char *${label} = \"${input}\";" + labelexternline="extern const char *${label};" fi if [ -n "$define" ]; then @@ -64,11 +64,14 @@ if [ -n "$remove_tabs" ]; then fi cat< +$labelexternline + +extern const char $name[]; $nameline Modified: stable/12/contrib/bc/include/bc.h ============================================================================== --- stable/12/contrib/bc/include/bc.h Thu Dec 10 07:13:15 2020 (r368500) +++ stable/12/contrib/bc/include/bc.h Thu Dec 10 08:48:03 2020 (r368501) @@ -173,6 +173,10 @@ extern const BcParseNext bc_parse_next_elem; extern const BcParseNext bc_parse_next_for; extern const BcParseNext bc_parse_next_read; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu Dec 10 09:30:10 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D88647A659; Thu, 10 Dec 2020 09:30:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs7tV0D5pz3PTp; Thu, 10 Dec 2020 09:30:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA20B16531; Thu, 10 Dec 2020 09:30:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA9U9oa082651; Thu, 10 Dec 2020 09:30:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9U9cQ082650; Thu, 10 Dec 2020 09:30:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012100930.0BA9U9cQ082650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 10 Dec 2020 09:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368502 - stable/12/sbin/ifconfig X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sbin/ifconfig X-SVN-Commit-Revision: 368502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:30:10 -0000 Author: hselasky Date: Thu Dec 10 09:30:09 2020 New Revision: 368502 URL: https://svnweb.freebsd.org/changeset/base/368502 Log: Fix bug in ifconfig preventing proper VLAN creation. Detection of VLAN interface type must happen before detection of interface type by prefix. Else the following sequence of commands will try to create a LAGG interface instead of a VLAN interface, which accidentially worked previously, because the data pointed to by the ifr_data pointer was not parsed by the VLAN create ioctl(2). This is a regression after r368229, because the VLAN creation now parses the ifr_data field. How to reproduce: # ifconfig lagg0 create # ifconfig lagg0.256 create This is a direct commit, until r366917, stacked VLANs has been MFC'ed. Differential Revision: https://reviews.freebsd.org/D27521 Tested by: raul.munoz@custos.es Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: stable/12/sbin/ifconfig/ifclone.c Modified: stable/12/sbin/ifconfig/ifclone.c ============================================================================== --- stable/12/sbin/ifconfig/ifclone.c Thu Dec 10 08:48:03 2020 (r368501) +++ stable/12/sbin/ifconfig/ifclone.c Thu Dec 10 09:30:09 2020 (r368502) @@ -124,6 +124,7 @@ ifclonecreate(int s, void *arg) struct ifreq ifr; struct clone_defcb *dcp; clone_callback_func *clone_cb = NULL; + const char *ifr_name = strchr(name, '.') ? "vlan" : name; memset(&ifr, 0, sizeof(ifr)); (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); @@ -131,7 +132,7 @@ ifclonecreate(int s, void *arg) if (clone_cb == NULL) { /* Try to find a default callback */ SLIST_FOREACH(dcp, &clone_defcbh, next) { - if (strncmp(dcp->ifprefix, ifr.ifr_name, + if (strncmp(dcp->ifprefix, ifr_name, strlen(dcp->ifprefix)) == 0) { clone_cb = dcp->clone_cb; break; From owner-svn-src-stable@freebsd.org Thu Dec 10 09:37:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C138947B400; Thu, 10 Dec 2020 09:37:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs82V554gz3Q19; Thu, 10 Dec 2020 09:37:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A04B2167EE; Thu, 10 Dec 2020 09:37:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA9b67X089044; Thu, 10 Dec 2020 09:37:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9b6ex089043; Thu, 10 Dec 2020 09:37:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012100937.0BA9b6ex089043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 10 Dec 2020 09:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368504 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 368504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:37:06 -0000 Author: hselasky Date: Thu Dec 10 09:37:06 2020 New Revision: 368504 URL: https://svnweb.freebsd.org/changeset/base/368504 Log: Fix bug in ifconfig regarding VLAN creation. Detection of VLAN interface type must happen before detection of interface type by prefix. Else the following sequence of commands will try to create a LAGG interface instead of a VLAN interface, which accidentially works, because the data pointed to by the ifr_data pointer is not parsed by the VLAN create ioctl(2). How to reproduce: # ifconfig lagg0 create # ifconfig lagg0.256 create Differential Revision: https://reviews.freebsd.org/D27521 Tested by: raul.munoz@custos.es Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: stable/11/sbin/ifconfig/ifclone.c Modified: stable/11/sbin/ifconfig/ifclone.c ============================================================================== --- stable/11/sbin/ifconfig/ifclone.c Thu Dec 10 09:31:05 2020 (r368503) +++ stable/11/sbin/ifconfig/ifclone.c Thu Dec 10 09:37:06 2020 (r368504) @@ -122,6 +122,7 @@ ifclonecreate(int s, void *arg) struct ifreq ifr; struct clone_defcb *dcp; clone_callback_func *clone_cb = NULL; + const char *ifr_name = strchr(name, '.') ? "vlan" : name; memset(&ifr, 0, sizeof(ifr)); (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); @@ -129,7 +130,7 @@ ifclonecreate(int s, void *arg) if (clone_cb == NULL) { /* Try to find a default callback */ SLIST_FOREACH(dcp, &clone_defcbh, next) { - if (strncmp(dcp->ifprefix, ifr.ifr_name, + if (strncmp(dcp->ifprefix, ifr_name, strlen(dcp->ifprefix)) == 0) { clone_cb = dcp->clone_cb; break; From owner-svn-src-stable@freebsd.org Thu Dec 10 09:39:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A874947B035; Thu, 10 Dec 2020 09:39:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs85C4Rynz3QKS; Thu, 10 Dec 2020 09:39:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B8EC1682A; Thu, 10 Dec 2020 09:39:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA9dRgT089199; Thu, 10 Dec 2020 09:39:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9dRGH089198; Thu, 10 Dec 2020 09:39:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012100939.0BA9dRGH089198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 10 Dec 2020 09:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r368505 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sbin/ifconfig X-SVN-Commit-Revision: 368505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:39:27 -0000 Author: hselasky Date: Thu Dec 10 09:39:27 2020 New Revision: 368505 URL: https://svnweb.freebsd.org/changeset/base/368505 Log: Fix bug in ifconfig regarding VLAN creation. Detection of VLAN interface type must happen before detection of interface type by prefix. Else the following sequence of commands will try to create a LAGG interface instead of a VLAN interface, which accidentially works, because the data pointed to by the ifr_data pointer is not parsed by the VLAN create ioctl(2). How to reproduce: # ifconfig lagg0 create # ifconfig lagg0.256 create This is a direct commit. Differential Revision: https://reviews.freebsd.org/D27521 Tested by: raul.munoz@custos.es Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: stable/10/sbin/ifconfig/ifclone.c Modified: stable/10/sbin/ifconfig/ifclone.c ============================================================================== --- stable/10/sbin/ifconfig/ifclone.c Thu Dec 10 09:37:06 2020 (r368504) +++ stable/10/sbin/ifconfig/ifclone.c Thu Dec 10 09:39:27 2020 (r368505) @@ -122,6 +122,7 @@ ifclonecreate(int s, void *arg) struct ifreq ifr; struct clone_defcb *dcp; clone_callback_func *clone_cb = NULL; + const char *ifr_name = strchr(name, '.') ? "vlan" : name; memset(&ifr, 0, sizeof(ifr)); (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); @@ -129,7 +130,7 @@ ifclonecreate(int s, void *arg) if (clone_cb == NULL) { /* Try to find a default callback */ SLIST_FOREACH(dcp, &clone_defcbh, next) { - if (strncmp(dcp->ifprefix, ifr.ifr_name, + if (strncmp(dcp->ifprefix, ifr_name, strlen(dcp->ifprefix)) == 0) { clone_cb = dcp->clone_cb; break; From owner-svn-src-stable@freebsd.org Thu Dec 10 09:51:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D020547BA02; Thu, 10 Dec 2020 09:51:50 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs8MV5T2Xz3RG6; Thu, 10 Dec 2020 09:51:50 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE60516D29; Thu, 10 Dec 2020 09:51:50 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA9podI000655; Thu, 10 Dec 2020 09:51:50 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9poSp000654; Thu, 10 Dec 2020 09:51:50 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012100951.0BA9poSp000654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 09:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368506 - stable/12/share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man5 X-SVN-Commit-Revision: 368506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:51:50 -0000 Author: gbe (doc committer) Date: Thu Dec 10 09:51:50 2020 New Revision: 368506 URL: https://svnweb.freebsd.org/changeset/base/368506 Log: MFC r362226 (by bapt): Fix typo in the documentation about the daily ntpd status PR: 245679 Submitted by: Taylor Stearns Modified: stable/12/share/man/man5/periodic.conf.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/periodic.conf.5 ============================================================================== --- stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:39:27 2020 (r368505) +++ stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:51:50 2020 (r368506) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 7, 2018 +.Dd June 16, 2020 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -518,7 +518,7 @@ for the previous day. .Pq Vt num Set to the number of maillog files that should be checked for yesterday's mail rejects. -.It Va daily_status_ntpd +.It Va daily_status_ntpd_enable .Pq Vt bool Set to .Dq Li YES From owner-svn-src-stable@freebsd.org Thu Dec 10 09:55:05 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E408C47B973; Thu, 10 Dec 2020 09:55:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs8RF5zyHz3RLX; Thu, 10 Dec 2020 09:55:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC566166F1; Thu, 10 Dec 2020 09:55:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA9t5et001819; Thu, 10 Dec 2020 09:55:05 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9t5gY001807; Thu, 10 Dec 2020 09:55:05 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012100955.0BA9t5gY001807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 09:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368507 - in stable/12: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 368507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:55:06 -0000 Author: gbe (doc committer) Date: Thu Dec 10 09:55:04 2020 New Revision: 368507 URL: https://svnweb.freebsd.org/changeset/base/368507 Log: MFC r363110 (by allanjude): Add a periodic script to backup the partition table and boot code Optionally, alert you if the contents change from the previous backup PR: 86388 Submitted by: Rob Fairbanks , Miroslav Lachman <000.fbsd@quip.cz> (Original Version) Relnotes: yes Sponsored by: Klara Inc. Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25628 Added: stable/12/usr.sbin/periodic/etc/daily/221.backup-gpart - copied unchanged from r363110, head/usr.sbin/periodic/etc/daily/221.backup-gpart Modified: stable/12/share/man/man5/periodic.conf.5 stable/12/usr.sbin/periodic/periodic.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/periodic.conf.5 ============================================================================== --- stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:51:50 2020 (r368506) +++ stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:55:04 2020 (r368507) @@ -252,6 +252,22 @@ Files will be deleted using the same criteria as would normally use when determining whether to believe the cached information, as configured in .Pa /etc/mail/sendmail.cf . +.It Va daily_backup_efi_enable +.Pq Vt bool +Set to +.Dq Li YES +To create backup of EFI System Partion (ESP). +.It Va daily_backup_gpart_enable +.Pq Vt bool +Set to +.Dq Li YES +To create backups of partition tables, and bootcode partition contents. +.It Va daily_backup_gpart_verbose +.Pq Vt bool +Set to +.Dq Li YES +To be verbose if existing backups for kern.geom.conftxt or the partition tables differ +from the new backups. .It Va daily_backup_passwd_enable .Pq Vt bool Set to Copied: stable/12/usr.sbin/periodic/etc/daily/221.backup-gpart (from r363110, head/usr.sbin/periodic/etc/daily/221.backup-gpart) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/periodic/etc/daily/221.backup-gpart Thu Dec 10 09:55:04 2020 (r368507, copy of r363110, head/usr.sbin/periodic/etc/daily/221.backup-gpart) @@ -0,0 +1,124 @@ +#!/bin/sh + +## $FreeBSD$ +## Created by: Miroslav Lachman <000.fbsd@quip.cz> + +## Backup of disk partitions layout, useful for gpart restore. +## Data are stored on local filesystem, in /var/backup. +## It is recommended to copy those files to off-site storage. + + +## If there is a global system configuration file, suck it in. +## +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +bak_dir=/var/backups + +rotate() { + base_name=$1 + show_diff=$2 + file="$bak_dir/$base_name" + + if [ -f "${file}.bak" ] ; then + rc=0 + if cmp -s "${file}.bak" "${file}.tmp"; then + rm "${file}.tmp" + else + rc=1 + [ -n "$show_diff" ] && diff "${file}.bak" "${file}.tmp" + mv "${file}.bak" "${file}.bak2" || rc=3 + mv "${file}.tmp" "${file}.bak" || rc=3 + fi + else + rc=1 + mv "${file}.tmp" "${file}.bak" || rc=3 + [ -n "$show_diff" ] && cat "${file}.bak" + fi +} + +case "$daily_backup_gpart_verbose" in + [Yy][Ee][Ss]) show="YES" +esac + +case "$daily_backup_gpart_enable" in + [Yy][Ee][Ss]) + + echo "" + echo "Dump of kern.geom.conftxt:"; + sysctl -n kern.geom.conftxt > "$bak_dir/kern.geom.conftxt.tmp" + rotate "kern.geom.conftxt" $show + + gpart_devs=$(gpart show | awk '$1 == "=>" { print $4 }') + if [ -n "$daily_backup_gpart_exclude" ]; then + gpart_devs=$(echo ${gpart_devs} | grep -E -v "${daily_backup_gpart_exclude}") + fi + + if [ -z "$gpart_devs" ]; then + echo '$daily_backup_gpart_enable is set but no disk probed by kernel.' \ + "perhaps NFS diskless client." + rc=2 + else + echo "" + echo "Backup of partitions information for:"; + + for d in ${gpart_devs}; do + echo "$d" + safe_name=$(echo "gpart.${d}" | tr -cs ".[:alnum:]\n" "_") + gpart backup "$d" > "$bak_dir/$safe_name.tmp" + rotate "$safe_name" $show + done + + gpart_show=$(gpart show -p) + boot_part=$(echo "$gpart_show" | awk '$4 ~ /(bios|freebsd)-boot/ { print $3 }') + if [ -n "$boot_part" ]; then + echo "" + echo "Backup of boot partition content:" + for b in ${boot_part}; do + echo "$b" + safe_name=$(echo "boot.${b}" | tr -cs ".[:alnum:]\n" "_") + dd if="/dev/${b}" of="$bak_dir/$safe_name.tmp" 2> /dev/null + rotate "$safe_name" + done + fi + + mbr_part=$(echo "$gpart_show" | awk '$1 == "=>" && $5 == "MBR" { print $4 }') + if [ -n "$mbr_part" ]; then + echo "" + echo "Backup of MBR record:" + for mb in ${mbr_part}; do + echo "$mb" + safe_name=$(echo "boot.${mb}" | tr -cs ".[:alnum:]\n" "_") + dd if="/dev/${mb}" of="$bak_dir/$safe_name.tmp" bs=512 count=1 2> /dev/null + rotate "$safe_name" + done + fi + + fi + ;; + + *) rc=0 + ;; +esac + +case "$daily_backup_efi_enable" in + [Yy][Ee][Ss]) + + efi_part=$(gpart show -p | awk '$4 ~ /efi/ {print $3}') + if [ -n "$efi_part" ]; then + echo "" + echo "Backup of EFI partition content:" + for efi in ${efi_part}; do + echo "$efi" + safe_name=$(echo "efi.${efi}" | tr -cs ".[:alnum:]\n" "_") + dd if="/dev/${efi}" of="$bak_dir/$safe_name.tmp" 2> /dev/null + rotate "$safe_name" + done + fi + ;; +esac + +exit $rc Modified: stable/12/usr.sbin/periodic/periodic.conf ============================================================================== --- stable/12/usr.sbin/periodic/periodic.conf Thu Dec 10 09:51:50 2020 (r368506) +++ stable/12/usr.sbin/periodic/periodic.conf Thu Dec 10 09:55:04 2020 (r368507) @@ -77,6 +77,11 @@ daily_backup_passwd_enable="YES" # Backup passwd & g # 210.backup-aliases daily_backup_aliases_enable="YES" # Backup mail aliases +# 221.backup-gpart +daily_backup_gpart_enable="YES" # Backup partition table/boot partition/MBR +daily_backup_gpart_verbose="NO" # Be verbose if new backup differs from the new one +daily_backup_efi_enable="NO" # Backup EFI system partition (ESP) + # 300.calendar daily_calendar_enable="NO" # Run calendar -a From owner-svn-src-stable@freebsd.org Thu Dec 10 09:57:18 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5EE647BB7D; Thu, 10 Dec 2020 09:57:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs8Tp5m6Hz3hVR; Thu, 10 Dec 2020 09:57:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B882F166F3; Thu, 10 Dec 2020 09:57:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA9vIg4002112; Thu, 10 Dec 2020 09:57:18 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9vI5B002111; Thu, 10 Dec 2020 09:57:18 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012100957.0BA9vI5B002111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 09:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368508 - stable/12/share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man5 X-SVN-Commit-Revision: 368508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:57:18 -0000 Author: gbe (doc committer) Date: Thu Dec 10 09:57:18 2020 New Revision: 368508 URL: https://svnweb.freebsd.org/changeset/base/368508 Log: MFC r363114 (by allanjude) periodic.conf: correct capitailization in the middle of a sentence Reported by: yuripv Event: July 2020 Bugathon Modified: stable/12/share/man/man5/periodic.conf.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/periodic.conf.5 ============================================================================== --- stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:55:04 2020 (r368507) +++ stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:57:18 2020 (r368508) @@ -256,17 +256,17 @@ as configured in .Pq Vt bool Set to .Dq Li YES -To create backup of EFI System Partion (ESP). +to create backup of EFI System Partion (ESP). .It Va daily_backup_gpart_enable .Pq Vt bool Set to .Dq Li YES -To create backups of partition tables, and bootcode partition contents. +to create backups of partition tables, and bootcode partition contents. .It Va daily_backup_gpart_verbose .Pq Vt bool Set to .Dq Li YES -To be verbose if existing backups for kern.geom.conftxt or the partition tables differ +to be verbose if existing backups for kern.geom.conftxt or the partition tables differ from the new backups. .It Va daily_backup_passwd_enable .Pq Vt bool From owner-svn-src-stable@freebsd.org Thu Dec 10 10:00:44 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BFDF47BA6F; Thu, 10 Dec 2020 10:00:44 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs8Ym2zvnz3hcG; Thu, 10 Dec 2020 10:00:44 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 546F6166F7; Thu, 10 Dec 2020 10:00:44 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAA0iIA005681; Thu, 10 Dec 2020 10:00:44 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAA0hPp005679; Thu, 10 Dec 2020 10:00:43 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012101000.0BAA0hPp005679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 10:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368509 - in stable/12: share/man/man5 usr.sbin/periodic X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: share/man/man5 usr.sbin/periodic X-SVN-Commit-Revision: 368509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 10:00:44 -0000 Author: gbe (doc committer) Date: Thu Dec 10 10:00:43 2020 New Revision: 368509 URL: https://svnweb.freebsd.org/changeset/base/368509 Log: MFC r365508 (by rew): periodic.conf(5): don't truncate interface names reported by 420.status-network. The daily periodic script, 420.status-network uses netstat(1) to report interface status. By default, netstat(1) truncates interface names. Add the '-W' flag (avoid truncating interface names) as the default for 'daily_status_network_netstat_flags' in periodic.conf(5). The default 420.status-network command is now 'netstat -i -d -W -n'. PR: 163572 Reported by: kes-kes@yandex.ru Reviewed by: allanjude (mentor), bcr (manpages) Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D26023 Modified: stable/12/share/man/man5/periodic.conf.5 stable/12/usr.sbin/periodic/periodic.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/periodic.conf.5 ============================================================================== --- stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 09:57:18 2020 (r368508) +++ stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 10:00:43 2020 (r368509) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2020 +.Dd September 9, 2020 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -439,7 +439,7 @@ utility when is set to .Dq Li YES . The default is -.Fl d . +.Fl d W . .It Va daily_status_network_usedns .Pq Vt bool Set to Modified: stable/12/usr.sbin/periodic/periodic.conf ============================================================================== --- stable/12/usr.sbin/periodic/periodic.conf Thu Dec 10 09:57:18 2020 (r368508) +++ stable/12/usr.sbin/periodic/periodic.conf Thu Dec 10 10:00:43 2020 (r368509) @@ -123,7 +123,7 @@ daily_status_mfi_enable="NO" # Check mfiutil(8) # 420.status-network daily_status_network_enable="YES" # Check network status daily_status_network_usedns="YES" # DNS lookups are ok -daily_status_network_netstat_flags="-d" # netstat(1) flags +daily_status_network_netstat_flags="-d -W" # netstat(1) flags # 430.status-uptime daily_status_uptime_enable="YES" # Check system uptime From owner-svn-src-stable@freebsd.org Thu Dec 10 13:08:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A3D64AA00A; Thu, 10 Dec 2020 13:08:07 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsDjz1dn9z3w05; Thu, 10 Dec 2020 13:08:07 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AE951903D; Thu, 10 Dec 2020 13:08:07 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAD87Ks020276; Thu, 10 Dec 2020 13:08:07 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAD86nE020273; Thu, 10 Dec 2020 13:08:06 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012101308.0BAD86nE020273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 13:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368512 - stable/12/share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man5 X-SVN-Commit-Revision: 368512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 13:08:07 -0000 Author: gbe (doc committer) Date: Thu Dec 10 13:08:06 2020 New Revision: 368512 URL: https://svnweb.freebsd.org/changeset/base/368512 Log: MFC r366615: man5: Fix a few typos spotted by igor - fstab(5): conjuction -> conjunction - mount.conf(5): repeated 'the' - periodic.conf(5): Partion -> Partition Modified: stable/12/share/man/man5/fstab.5 stable/12/share/man/man5/mount.conf.5 stable/12/share/man/man5/periodic.conf.5 Modified: stable/12/share/man/man5/fstab.5 ============================================================================== --- stable/12/share/man/man5/fstab.5 Thu Dec 10 10:58:30 2020 (r368511) +++ stable/12/share/man/man5/fstab.5 Thu Dec 10 13:08:06 2020 (r368512) @@ -205,7 +205,7 @@ is applied automatically. .Pp The .Dq update -option is typically used in conjuction with two +option is typically used in conjunction with two .Nm files. The first Modified: stable/12/share/man/man5/mount.conf.5 ============================================================================== --- stable/12/share/man/man5/mount.conf.5 Thu Dec 10 10:58:30 2020 (r368511) +++ stable/12/share/man/man5/mount.conf.5 Thu Dec 10 13:08:06 2020 (r368512) @@ -123,8 +123,7 @@ is performed. When the kernel processes this line, a .Li mountroot> command-line prompt is displayed. -At this prompt, the operator can enter the -the root mount. +At this prompt, the operator can enter the root mount. .It Ic .md Ar file Create a memory backed .Xr md 4 Modified: stable/12/share/man/man5/periodic.conf.5 ============================================================================== --- stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 10:58:30 2020 (r368511) +++ stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 13:08:06 2020 (r368512) @@ -256,7 +256,7 @@ as configured in .Pq Vt bool Set to .Dq Li YES -to create backup of EFI System Partion (ESP). +to create backup of EFI System Partition (ESP). .It Va daily_backup_gpart_enable .Pq Vt bool Set to From owner-svn-src-stable@freebsd.org Thu Dec 10 13:25:46 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF0E94AA0E1; Thu, 10 Dec 2020 13:25:46 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsF6L5cp1z4R9M; Thu, 10 Dec 2020 13:25:46 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B392D193EA; Thu, 10 Dec 2020 13:25:46 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BADPkWE032953; Thu, 10 Dec 2020 13:25:46 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BADPjcU032948; Thu, 10 Dec 2020 13:25:45 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012101325.0BADPjcU032948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 13:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368514 - in stable/12: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 368514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 13:25:46 -0000 Author: gbe (doc committer) Date: Thu Dec 10 13:25:45 2020 New Revision: 368514 URL: https://svnweb.freebsd.org/changeset/base/368514 Log: MFC r367436 and r367443 by rew: r367436 Add a periodic script to backup output generated from `zfs list`, `zfs get`, `zpool list`, and `zpool get` commands. Disabled by default. r367443 Add a periodic script to backup output generated from `gmirror list`. Disabled by default. PR: 86388 Submitted by: Miroslav Lachman <000 dot fbsd at quip dot cz> Reported by: Seklecki Reviewed by: allanjude, 0mp, gbe Event: July 2020 Bugathon Differential Revision: https://reviews.freebsd.org/D25638 Differential Revision: https://reviews.freebsd.org/D25631 Added: stable/12/usr.sbin/periodic/etc/daily/222.backup-gmirror - copied unchanged from r367443, head/usr.sbin/periodic/etc/daily/222.backup-gmirror stable/12/usr.sbin/periodic/etc/daily/223.backup-zfs - copied unchanged from r367436, head/usr.sbin/periodic/etc/daily/223.backup-zfs Modified: stable/12/share/man/man5/periodic.conf.5 stable/12/usr.sbin/periodic/etc/daily/Makefile stable/12/usr.sbin/periodic/periodic.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/periodic.conf.5 ============================================================================== --- stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 13:11:52 2020 (r368513) +++ stable/12/share/man/man5/periodic.conf.5 Thu Dec 10 13:25:45 2020 (r368514) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 9, 2020 +.Dd November 7, 2020 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -257,6 +257,20 @@ as configured in Set to .Dq Li YES to create backup of EFI System Partition (ESP). +.It Va daily_backup_gmirror_enable +.Pq Vt bool +Set to +.Dq Li YES +to create backup of gmirror information (i.e., output of +.Nm gmirror Cm list ) , +see +.Xr gmirror 8 . +.It Va daily_backup_gmirror_verbose +.Pq Vt bool +Set to +.Dq Li YES +to report a diff between the new backup and the existing backup +in the daily output. .It Va daily_backup_gpart_enable .Pq Vt bool Set to @@ -289,6 +303,57 @@ Set to if you want the .Pa /etc/mail/aliases file backed up and modifications to be displayed in your daily output. +.It Va daily_backup_zfs_enable +.Pq Vt bool +Set to +.Dq Li YES +to create backup of the output generated from the +.Xr zfs-list 8 +and +.Xr zpool-list 8 +utilities. +.It Va daily_backup_zfs_list_flags +.Pq Vt str +Set to the arguments for the +.Xr zfs-list 8 +utility. +The default is standard behavior. +.It Va daily_backup_zpool_list_flags +.Pq Vt str +Set to the arguments for the +.Xr zpool-list 8 +utility. +The default is +.Fl v . +.It Va daily_backup_zfs_props_enable +.Pq Vt bool +Set to +.Dq Li YES +to create backup of the output generated from the +.Xr zfs-get 8 +and +.Xr zpool-get 8 +utilities. +.It Va daily_backup_zfs_get_flags +.Pq Vt str +Set to the arguments for the +.Xr zfs-get 8 +utility. +The default is +.Cm all . +.It Va daily_backup_zpool_get_flags +.Pq Vt str +Set to the arguments for the +.Xr zpool-get 8 +utility. +The default is +.Cm all . +.It Va daily_backup_zfs_verbose +.Pq Vt bool +Set to +.Dq Li YES +to report a diff between the new backup and the existing backup +in the daily output. .It Va daily_calendar_enable .Pq Vt bool Set to Copied: stable/12/usr.sbin/periodic/etc/daily/222.backup-gmirror (from r367443, head/usr.sbin/periodic/etc/daily/222.backup-gmirror) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/periodic/etc/daily/222.backup-gmirror Thu Dec 10 13:25:45 2020 (r368514, copy of r367443, head/usr.sbin/periodic/etc/daily/222.backup-gmirror) @@ -0,0 +1,72 @@ +#!/bin/sh + +# $FreeBSD$ +# Created by: Miroslav Lachman <000.fbsd@quip.cz> + +# Backup output from `gmirror list`, which provides detailed information +# of all gmirrors. The backup will be stored in /var/backups/. + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +bak_dir=/var/backups + +rotate() { + base_name=$1 + show_diff=$2 + file="$bak_dir/$base_name" + + if [ -f "${file}.bak" ]; then + rc=0 + if cmp -s "${file}.bak" "${file}.tmp"; then + rm "${file}.tmp" + else + rc=1 + [ -n "$show_diff" ] && diff "${file}.bak" "${file}.tmp" + mv "${file}.bak" "${file}.bak2" || rc=3 + mv "${file}.tmp" "${file}.bak" || rc=3 + fi + else + rc=1 + mv "${file}.tmp" "${file}.bak" || rc=3 + [ -n "$show_diff" ] && cat "${file}.bak" + fi +} + +case "$daily_backup_gmirror_verbose" in + [Yy][Ee][Ss]) show="YES" +esac + +case "$daily_backup_gmirror_enable" in + [Yy][Ee][Ss]) + + gmirrors=$(gmirror status 2> /dev/null | \ + awk '$1 ~ /^mirror\// { sub(/mirror\//, ""); print $1 }') + + if [ -z "$gmirrors" ]; then + echo "" + echo "daily_backup_gmirror_enable is set to YES but no gmirrors found." + rc=2 + else + echo "" + echo "Backup of gmirror information for:"; + + for m in ${gmirrors}; do + echo "$m" + safe_name=$(echo "gmirror.${m}" | tr -cs ".[:alnum:]\n" "_") + if ! gmirror status -s "${m}" | grep -F -v "COMPLETE"; then + gmirror list "${m}" > "$bak_dir/$safe_name.tmp" + rotate "$safe_name" $show + fi + done + fi + ;; + *) rc=0;; +esac + +exit $rc Copied: stable/12/usr.sbin/periodic/etc/daily/223.backup-zfs (from r367436, head/usr.sbin/periodic/etc/daily/223.backup-zfs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/periodic/etc/daily/223.backup-zfs Thu Dec 10 13:25:45 2020 (r368514, copy of r367436, head/usr.sbin/periodic/etc/daily/223.backup-zfs) @@ -0,0 +1,78 @@ +#!/bin/sh + +# $FreeBSD$ +# Created by: Miroslav Lachman <000.fbsd@quip.cz> + +# Backup of zpool list, zfs list, zpool properties and zfs properties +# for each filesystem. The backup will be stored in /var/backups. + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +bak_dir=/var/backups + +rotate() { + base_name=$1 + show_diff=$2 + file="$bak_dir/$base_name" + + if [ -f "${file}.bak" ] ; then + rc=0 + if cmp -s "${file}.bak" "${file}.tmp"; then + rm "${file}.tmp" + else + rc=1 + [ -n "$show_diff" ] && diff "${file}.bak" "${file}.tmp" + mv "${file}.bak" "${file}.bak2" || rc=3 + mv "${file}.tmp" "${file}.bak" || rc=3 + fi + else + rc=1 + mv "${file}.tmp" "${file}.bak" || rc=3 + [ -n "$show_diff" ] && cat "${file}.bak" + fi +} + +case "$daily_backup_zfs_verbose" in + [Yy][Ee][Ss]) show="YES" +esac + +case "$daily_backup_zfs_enable" in + [Yy][Ee][Ss]) + + zpools=$(zpool list $daily_backup_zpool_list_flags) + + if [ -z "$zpools" ]; then + echo 'daily_backup_zfs_enable is set to YES but no zpools found.' + rc=2 + else + echo "" + echo "Backup of ZFS information for all imported pools"; + + echo "$zpools" > "$bak_dir/zpool_list.tmp" + rotate "zpool_list" $show + + zfs list $daily_backup_zfs_list_flags > "$bak_dir/zfs_list.tmp" + rotate "zfs_list" $show + fi + ;; + *) rc=0;; +esac + +case "$daily_backup_zfs_props_enable" in + [Yy][Ee][Ss]) + + zfs get $daily_backup_zfs_get_flags > "$bak_dir/zfs_props.tmp" + rotate "zfs_props" + + zpool get $daily_backup_zpool_get_flags > "$bak_dir/zpool_props.tmp" + rotate "zpool_props" + ;; +esac + +exit $rc Modified: stable/12/usr.sbin/periodic/etc/daily/Makefile ============================================================================== --- stable/12/usr.sbin/periodic/etc/daily/Makefile Thu Dec 10 13:11:52 2020 (r368513) +++ stable/12/usr.sbin/periodic/etc/daily/Makefile Thu Dec 10 13:25:45 2020 (r368514) @@ -10,6 +10,7 @@ CONFS= 100.clean-disks \ 140.clean-rwho \ 200.backup-passwd \ 210.backup-aliases \ + 222.backup-gmirror \ 330.news \ 400.status-disks \ 401.status-graid \ @@ -54,7 +55,8 @@ CONFS+= 150.clean-hoststat \ .endif .if ${MK_ZFS} != "no" -CONFS+= 404.status-zfs \ +CONFS+= 223.backup-zfs \ + 404.status-zfs \ 800.scrub-zfs .endif Modified: stable/12/usr.sbin/periodic/periodic.conf ============================================================================== --- stable/12/usr.sbin/periodic/periodic.conf Thu Dec 10 13:11:52 2020 (r368513) +++ stable/12/usr.sbin/periodic/periodic.conf Thu Dec 10 13:25:45 2020 (r368514) @@ -79,8 +79,21 @@ daily_backup_aliases_enable="YES" # Backup mail alia # 221.backup-gpart daily_backup_gpart_enable="YES" # Backup partition table/boot partition/MBR -daily_backup_gpart_verbose="NO" # Be verbose if new backup differs from the new one +daily_backup_gpart_verbose="NO" # Be verbose if new backup differs from the old one daily_backup_efi_enable="NO" # Backup EFI system partition (ESP) + +# 222.backup-gmirror +daily_backup_gmirror_enable="NO" # Backup of gmirror info (i.e., output of `gmirror list`) +daily_backup_gmirror_verbose="NO" # Log diff if new backup differs from the old one + +# 223.backup-zfs +daily_backup_zfs_enable="NO" # Backup output from zpool/zfs list +daily_backup_zfs_props_enable="NO" # Backup zpool/zfs filesystem properties +daily_backup_zfs_get_flags="all" # flags passed to `zfs get` +daily_backup_zfs_list_flags="" # flags passed to `zfs list` +daily_backup_zpool_get_flags="all" # flags passed to `zpool get` +daily_backup_zpool_list_flags="-v" # flags passed to `zpool list` +daily_backup_zfs_verbose="NO" # Report diff between the old and new backups. # 300.calendar daily_calendar_enable="NO" # Run calendar -a From owner-svn-src-stable@freebsd.org Thu Dec 10 13:32:52 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58C9E4AA276; Thu, 10 Dec 2020 13:32:52 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsFGX26RZz4RZN; Thu, 10 Dec 2020 13:32:52 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B5FB197B7; Thu, 10 Dec 2020 13:32:52 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BADWqFc038774; Thu, 10 Dec 2020 13:32:52 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BADWqEG038773; Thu, 10 Dec 2020 13:32:52 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012101332.0BADWqEG038773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Thu, 10 Dec 2020 13:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368515 - stable/12/usr.sbin/periodic/etc/daily X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/usr.sbin/periodic/etc/daily X-SVN-Commit-Revision: 368515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 13:32:52 -0000 Author: gbe (doc committer) Date: Thu Dec 10 13:32:51 2020 New Revision: 368515 URL: https://svnweb.freebsd.org/changeset/base/368515 Log: MFC r363169 by allanjude: Actually install the new 221.backup-gpart periodic script PR: 86388 Submitted by: Rob Fairbanks Reported by: Michael Butler Sponsored by: Klara Inc. Modified: stable/12/usr.sbin/periodic/etc/daily/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/periodic/etc/daily/Makefile ============================================================================== --- stable/12/usr.sbin/periodic/etc/daily/Makefile Thu Dec 10 13:25:45 2020 (r368514) +++ stable/12/usr.sbin/periodic/etc/daily/Makefile Thu Dec 10 13:32:51 2020 (r368515) @@ -11,6 +11,7 @@ CONFS= 100.clean-disks \ 200.backup-passwd \ 210.backup-aliases \ 222.backup-gmirror \ + 221.backup-gpart \ 330.news \ 400.status-disks \ 401.status-graid \ From owner-svn-src-stable@freebsd.org Thu Dec 10 13:37:14 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4115B4AAA0D; Thu, 10 Dec 2020 13:37:14 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsFMZ1Np3z4RmZ; Thu, 10 Dec 2020 13:37:14 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p5486153a.dip0.t-ipconnect.de [84.134.21.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id BE85C58FA; Thu, 10 Dec 2020 13:37:13 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Thu, 10 Dec 2020 14:37:12 +0100 From: Gordon Bergling To: Helge Oldach Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r368507 - in stable/12: share/man/man5 usr.sbin/periodic usr.sbin/periodic/etc/daily Message-ID: References: <202012100955.0BA9t5gY001807@repo.freebsd.org> <202012101208.0BAC8fcS090558@nuc.oldach.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202012101208.0BAC8fcS090558@nuc.oldach.net> X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 2:33PM up 1 day, 7:12, 4 users, load averages: 0.27, 0.25, 0.23 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 13:37:14 -0000 On Thu, Dec 10, 2020 at 01:08:41PM +0100, Helge Oldach wrote: > Hi, > > Gordon Bergling wrote on Thu, 10 Dec 2020 10:55:05 +0100 (CET): > > Author: gbe (doc committer) > > Date: Thu Dec 10 09:55:04 2020 > > New Revision: 368507 > > URL: https://svnweb.freebsd.org/changeset/base/368507 > > > > Log: > > MFC r363110 (by allanjude): > > > > Add a periodic script to backup the partition table and boot code > > > > Optionally, alert you if the contents change from the previous backup > > > > PR: 86388 > > Submitted by: Rob Fairbanks , Miroslav Lachman <000.fbsd@quip.cz> (Original Version) > > Relnotes: yes > > Sponsored by: Klara Inc. > > Event: July 2020 Bugathon > > Differential Revision: https://reviews.freebsd.org/D25628 > > > > Added: > > stable/12/usr.sbin/periodic/etc/daily/221.backup-gpart > > - copied unchanged from r363110, head/usr.sbin/periodic/etc/daily/221.backup-gpart > > Modified: > > stable/12/share/man/man5/periodic.conf.5 > > stable/12/usr.sbin/periodic/periodic.conf > > Directory Properties: > > stable/12/ (props changed) > > > > Please MFC r363169 as well, else 221.backup-gpart won't be installed. > > Kind regards > Helge There were a few missing commits for PR 86388 including r363169. I have merge them all to -STABLE. Thanks for spotting this! --Gordon From owner-svn-src-stable@freebsd.org Thu Dec 10 17:48:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 167CA4B15D7; Thu, 10 Dec 2020 17:48:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsLxV6DhNz4lNy; Thu, 10 Dec 2020 17:48:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4D301CBA8; Thu, 10 Dec 2020 17:48:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAHmUoG096965; Thu, 10 Dec 2020 17:48:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAHmUPs096963; Thu, 10 Dec 2020 17:48:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202012101748.0BAHmUPs096963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 10 Dec 2020 17:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368517 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 368517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 17:48:31 -0000 Author: gjb Date: Thu Dec 10 17:48:30 2020 New Revision: 368517 URL: https://svnweb.freebsd.org/changeset/base/368517 Log: Document recent SAs/ENs. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml ============================================================================== --- stable/11/release/doc/share/xml/errata.xml Thu Dec 10 17:17:22 2020 (r368516) +++ stable/11/release/doc/share/xml/errata.xml Thu Dec 10 17:48:30 2020 (r368517) @@ -38,6 +38,14 @@ 2 September 2020 Kernel panic + + + FreeBSD-EN-20:20.tzdata + 1 December 2020 + Timezone database information + update + Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Thu Dec 10 17:17:22 2020 (r368516) +++ stable/11/release/doc/share/xml/security.xml Thu Dec 10 17:48:30 2020 (r368517) @@ -108,6 +108,21 @@ 15 September 2020 Privilege escalation + + + FreeBSD-SA-20:31.icmp6 + 1 December 2019 + Use-after-free in error message + handling + + + + FreeBSD-SA-20:32.rtsold + 1 December 2019 + Multiple vulnerabilities + From owner-svn-src-stable@freebsd.org Thu Dec 10 20:44:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2E364B5ECA; Thu, 10 Dec 2020 20:44:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsQr56Z0Vz3DXT; Thu, 10 Dec 2020 20:44:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D448D1F302; Thu, 10 Dec 2020 20:44:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAKi5df011709; Thu, 10 Dec 2020 20:44:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAKi5SQ011708; Thu, 10 Dec 2020 20:44:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012102044.0BAKi5SQ011708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 10 Dec 2020 20:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368522 - stable/12/sys/dev/drm2 X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/drm2 X-SVN-Commit-Revision: 368522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 20:44:06 -0000 Author: jhb Date: Thu Dec 10 20:44:05 2020 New Revision: 368522 URL: https://svnweb.freebsd.org/changeset/base/368522 Log: MFC 366494: Don't permit DRM buffer mappings to be upgraded to executable. Modified: stable/12/sys/dev/drm2/drm_bufs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/drm2/drm_bufs.c ============================================================================== --- stable/12/sys/dev/drm2/drm_bufs.c Thu Dec 10 19:36:33 2020 (r368521) +++ stable/12/sys/dev/drm2/drm_bufs.c Thu Dec 10 20:44:05 2020 (r368522) @@ -1635,14 +1635,12 @@ int drm_mapbufs(struct drm_device *dev, void *data, goto done; } retcode = vm_mmap(&vms->vm_map, &virtual, map->size, - VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, - MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, - file_priv->minor->device, token); + VM_PROT_RW, VM_PROT_RW, MAP_SHARED | MAP_NOSYNC, + OBJT_DEVICE, file_priv->minor->device, token); } else { retcode = vm_mmap(&vms->vm_map, &virtual, dma->byte_count, - VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, - MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, - file_priv->minor->device, 0); + VM_PROT_RW, VM_PROT_RW, MAP_SHARED | MAP_NOSYNC, + OBJT_DEVICE, file_priv->minor->device, 0); } if (retcode) { /* Real error */ From owner-svn-src-stable@freebsd.org Thu Dec 10 21:12:26 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67F8B4B6C8A; Thu, 10 Dec 2020 21:12:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsRSp2Y0kz3GPj; Thu, 10 Dec 2020 21:12:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A5881F3FE; Thu, 10 Dec 2020 21:12:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BALCQbX031081; Thu, 10 Dec 2020 21:12:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BALCPee031079; Thu, 10 Dec 2020 21:12:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012102112.0BALCPee031079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 10 Dec 2020 21:12:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368526 - in stable/12/sys: conf dev/md X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12/sys: conf dev/md X-SVN-Commit-Revision: 368526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 21:12:26 -0000 Author: jhb Date: Thu Dec 10 21:12:25 2020 New Revision: 368526 URL: https://svnweb.freebsd.org/changeset/base/368526 Log: MFC 366897: Use a template assembly file to generate the embedded MFS. This uses the .incbin directive to pull in the MFS image contents. Using assembly directly ensures that symbols can be defined with the name and properties (such as .size) desired without having to rename symbols, etc. via a second objcopy invocation. Since it is compiled by the C compiler driver, it also avoids the need for all of the EMBEDFS* make variables. Added: stable/12/sys/dev/md/embedfs.S - copied unchanged from r366897, head/sys/dev/md/embedfs.S Modified: stable/12/sys/conf/kern.post.mk stable/12/sys/conf/kern.pre.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/kern.post.mk ============================================================================== --- stable/12/sys/conf/kern.post.mk Thu Dec 10 21:06:06 2020 (r368525) +++ stable/12/sys/conf/kern.post.mk Thu Dec 10 21:12:25 2020 (r368526) @@ -426,24 +426,9 @@ vnode_if_typedef.h: .if ${MFS_IMAGE:Uno} != "no" .if empty(MD_ROOT_SIZE_CONFIGURED) -# Generate an object file from the file system image to embed in the kernel -# via linking. Make sure the contents are in the mfs section and rename the -# start/end/size variables to __start_mfs, __stop_mfs, and mfs_size, -# respectively. -embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} - ${OBJCOPY} --input-target binary \ - --output-target ${EMBEDFS_FORMAT.${MACHINE_ARCH}} \ - --binary-architecture ${EMBEDFS_ARCH.${MACHINE_ARCH}} \ - ${MFS_IMAGE} ${.TARGET} - ${OBJCOPY} \ - --rename-section .data=mfs,contents,alloc,load,readonly,data \ - --redefine-sym \ - _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_size=__mfs_root_size \ - --redefine-sym \ - _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_start=mfs_root \ - --redefine-sym \ - _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_end=mfs_root_end \ - ${.TARGET} +embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} $S/dev/md/embedfs.S + ${CC} ${CFLAGS} ${ACFLAGS} -DMFS_IMAGE="${MFS_IMAGE}" -c \ + $S/dev/md/embedfs.S -o ${.TARGET} .endif .endif Modified: stable/12/sys/conf/kern.pre.mk ============================================================================== --- stable/12/sys/conf/kern.pre.mk Thu Dec 10 21:06:06 2020 (r368525) +++ stable/12/sys/conf/kern.pre.mk Thu Dec 10 21:12:25 2020 (r368526) @@ -277,37 +277,6 @@ MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" MKMODULESENV+= __MPATH="${__MPATH}" .endif -# Architecture and output format arguments for objcopy to convert image to -# object file - -.if ${MFS_IMAGE:Uno} != "no" -.if empty(MD_ROOT_SIZE_CONFIGURED) -.if !defined(EMBEDFS_FORMAT.${MACHINE_ARCH}) -EMBEDFS_FORMAT.${MACHINE_ARCH}!= awk -F'"' '/OUTPUT_FORMAT/ {print $$2}' ${LDSCRIPT} -.if empty(EMBEDFS_FORMAT.${MACHINE_ARCH}) -.undef EMBEDFS_FORMAT.${MACHINE_ARCH} -.endif -.endif - -.if !defined(EMBEDFS_ARCH.${MACHINE_ARCH}) -EMBEDFS_ARCH.${MACHINE_ARCH}!= sed -n '/OUTPUT_ARCH/s/.*(\(.*\)).*/\1/p' ${LDSCRIPT} -.if empty(EMBEDFS_ARCH.${MACHINE_ARCH}) -.undef EMBEDFS_ARCH.${MACHINE_ARCH} -.endif -.endif - -EMBEDFS_FORMAT.arm?= elf32-littlearm -EMBEDFS_FORMAT.armv6?= elf32-littlearm -EMBEDFS_FORMAT.armv7?= elf32-littlearm -EMBEDFS_FORMAT.aarch64?= elf64-littleaarch64 -EMBEDFS_FORMAT.mips?= elf32-tradbigmips -EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips -EMBEDFS_FORMAT.mips64?= elf64-tradbigmips -EMBEDFS_FORMAT.mips64el?= elf64-tradlittlemips -EMBEDFS_FORMAT.riscv64?= elf64-littleriscv -.endif -.endif - # Detect kernel config options that force stack frames to be turned on. DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo Copied: stable/12/sys/dev/md/embedfs.S (from r366897, head/sys/dev/md/embedfs.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/dev/md/embedfs.S Thu Dec 10 21:12:25 2020 (r368526, copy of r366897, head/sys/dev/md/embedfs.S) @@ -0,0 +1,46 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 John Baldwin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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. + * + * $FreeBSD$ + */ + +#include + + .section mfs, "a", %progbits + .globl mfs_root + .type mfs_root, %object +mfs_root: + .incbin __XSTRING(MFS_IMAGE) + .size mfs_root, . - mfs_root + .globl mfs_root_end + .type mfs_root_end, %object +mfs_root_end: + .size mfs_root_end, . - mfs_root_end From owner-svn-src-stable@freebsd.org Thu Dec 10 22:26:52 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 579F44BB303; Thu, 10 Dec 2020 22:26:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsT6h20q8z4RFF; Thu, 10 Dec 2020 22:26:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3713E20558; Thu, 10 Dec 2020 22:26:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAMQpe8003476; Thu, 10 Dec 2020 22:26:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAMQpPU003475; Thu, 10 Dec 2020 22:26:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012102226.0BAMQpPU003475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 10 Dec 2020 22:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368528 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 368528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 22:26:52 -0000 Author: jhb Date: Thu Dec 10 22:26:51 2020 New Revision: 368528 URL: https://svnweb.freebsd.org/changeset/base/368528 Log: MFC 366584: Don't invoke semunload() if seminit() fails during MOD_LOAD. The module handler code invokes a MOD_UNLOAD event immediately if MOD_LOAD fails. The result was that if seminit() failed, semunload() was invoked twice. semunload() is not idempotent however and would try to remove it's process_exit eventhandler twice resulting in a panic. Modified: stable/12/sys/kern/sysv_sem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sysv_sem.c ============================================================================== --- stable/12/sys/kern/sysv_sem.c Thu Dec 10 22:20:20 2020 (r368527) +++ stable/12/sys/kern/sysv_sem.c Thu Dec 10 22:26:51 2020 (r368528) @@ -382,8 +382,6 @@ sysvsem_modload(struct module *module, int cmd, void * switch (cmd) { case MOD_LOAD: error = seminit(); - if (error != 0) - semunload(); break; case MOD_UNLOAD: error = semunload(); From owner-svn-src-stable@freebsd.org Thu Dec 10 23:43:30 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC9714BC60B; Thu, 10 Dec 2020 23:43:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsVq64ynYz4VKs; Thu, 10 Dec 2020 23:43:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D48C2162D; Thu, 10 Dec 2020 23:43:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BANhUHG052824; Thu, 10 Dec 2020 23:43:30 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BANhTeE052820; Thu, 10 Dec 2020 23:43:29 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012102343.0BANhTeE052820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 10 Dec 2020 23:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368530 - in stable/11/crypto/openssl/crypto: asn1 x509v3 X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/11/crypto/openssl/crypto: asn1 x509v3 X-SVN-Commit-Revision: 368530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 23:43:30 -0000 Author: jkim Date: Thu Dec 10 23:43:29 2020 New Revision: 368530 URL: https://svnweb.freebsd.org/changeset/base/368530 Log: OpenSSL: backport fixes for CVE-2020-1971 from head (r368447) Note this is a direct commit because we have OpenSSL 1.0.2u in this branch. Modified: stable/11/crypto/openssl/crypto/asn1/asn1.h stable/11/crypto/openssl/crypto/asn1/asn1_err.c stable/11/crypto/openssl/crypto/asn1/tasn_dec.c stable/11/crypto/openssl/crypto/asn1/tasn_enc.c stable/11/crypto/openssl/crypto/x509v3/v3_genn.c Modified: stable/11/crypto/openssl/crypto/asn1/asn1.h ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/asn1.h Thu Dec 10 23:23:42 2020 (r368529) +++ stable/11/crypto/openssl/crypto/asn1/asn1.h Thu Dec 10 23:43:29 2020 (r368530) @@ -1203,6 +1203,7 @@ void ERR_load_ASN1_strings(void); # define ASN1_F_ASN1_ITEM_DUP 191 # define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW 121 # define ASN1_F_ASN1_ITEM_EX_D2I 120 +# define ASN1_F_ASN1_ITEM_EX_I2D 224 # define ASN1_F_ASN1_ITEM_I2D_BIO 192 # define ASN1_F_ASN1_ITEM_I2D_FP 193 # define ASN1_F_ASN1_ITEM_PACK 198 @@ -1304,6 +1305,7 @@ void ERR_load_ASN1_strings(void); # define ASN1_R_BAD_OBJECT_HEADER 102 # define ASN1_R_BAD_PASSWORD_READ 103 # define ASN1_R_BAD_TAG 104 +# define ASN1_R_BAD_TEMPLATE 221 # define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214 # define ASN1_R_BN_LIB 105 # define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 Modified: stable/11/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/asn1_err.c Thu Dec 10 23:23:42 2020 (r368529) +++ stable/11/crypto/openssl/crypto/asn1/asn1_err.c Thu Dec 10 23:43:29 2020 (r368530) @@ -1,6 +1,6 @@ /* crypto/asn1/asn1_err.c */ /* ==================================================================== - * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2020 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -103,6 +103,7 @@ static ERR_STRING_DATA ASN1_str_functs[] = { {ERR_FUNC(ASN1_F_ASN1_ITEM_DUP), "ASN1_item_dup"}, {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW), "ASN1_ITEM_EX_COMBINE_NEW"}, {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I), "ASN1_ITEM_EX_D2I"}, + {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_I2D), "ASN1_item_ex_i2d"}, {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_BIO), "ASN1_item_i2d_bio"}, {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"}, {ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"}, @@ -207,6 +208,7 @@ static ERR_STRING_DATA ASN1_str_reasons[] = { {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER), "bad object header"}, {ERR_REASON(ASN1_R_BAD_PASSWORD_READ), "bad password read"}, {ERR_REASON(ASN1_R_BAD_TAG), "bad tag"}, + {ERR_REASON(ASN1_R_BAD_TEMPLATE), "bad template"}, {ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH), "bmpstring is wrong length"}, {ERR_REASON(ASN1_R_BN_LIB), "bn lib"}, Modified: stable/11/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/tasn_dec.c Thu Dec 10 23:23:42 2020 (r368529) +++ stable/11/crypto/openssl/crypto/asn1/tasn_dec.c Thu Dec 10 23:43:29 2020 (r368530) @@ -223,6 +223,15 @@ static int asn1_item_ex_d2i(ASN1_VALUE **pval, const u break; case ASN1_ITYPE_MSTRING: + /* + * It never makes sense for multi-strings to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_BAD_TEMPLATE); + goto err; + } + p = *in; /* Just read in tag and class */ ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL, @@ -240,6 +249,7 @@ static int asn1_item_ex_d2i(ASN1_VALUE **pval, const u ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_MSTRING_NOT_UNIVERSAL); goto err; } + /* Check tag matches bit map */ if (!(ASN1_tag2bit(otag) & it->utype)) { /* If OPTIONAL, assume this is OK */ @@ -316,6 +326,15 @@ static int asn1_item_ex_d2i(ASN1_VALUE **pval, const u goto err; case ASN1_ITYPE_CHOICE: + /* + * It never makes sense for CHOICE types to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_BAD_TEMPLATE); + goto err; + } + if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) goto auxerr; if (*pval) { Modified: stable/11/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/11/crypto/openssl/crypto/asn1/tasn_enc.c Thu Dec 10 23:23:42 2020 (r368529) +++ stable/11/crypto/openssl/crypto/asn1/tasn_enc.c Thu Dec 10 23:43:29 2020 (r368530) @@ -151,9 +151,25 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char break; case ASN1_ITYPE_MSTRING: + /* + * It never makes sense for multi-strings to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE); + return -1; + } return asn1_i2d_ex_primitive(pval, out, it, -1, aclass); case ASN1_ITYPE_CHOICE: + /* + * It never makes sense for CHOICE types to have implicit tagging, so + * if tag != -1, then this looks like an error in the template. + */ + if (tag != -1) { + ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE); + return -1; + } if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL)) return 0; i = asn1_get_choice_selector(pval, it); Modified: stable/11/crypto/openssl/crypto/x509v3/v3_genn.c ============================================================================== --- stable/11/crypto/openssl/crypto/x509v3/v3_genn.c Thu Dec 10 23:23:42 2020 (r368529) +++ stable/11/crypto/openssl/crypto/x509v3/v3_genn.c Thu Dec 10 23:43:29 2020 (r368530) @@ -72,8 +72,9 @@ ASN1_SEQUENCE(OTHERNAME) = { IMPLEMENT_ASN1_FUNCTIONS(OTHERNAME) ASN1_SEQUENCE(EDIPARTYNAME) = { - ASN1_IMP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0), - ASN1_IMP_OPT(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1) + /* DirectoryString is a CHOICE type so use explicit tagging */ + ASN1_EXP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0), + ASN1_EXP(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1) } ASN1_SEQUENCE_END(EDIPARTYNAME) IMPLEMENT_ASN1_FUNCTIONS(EDIPARTYNAME) @@ -107,6 +108,37 @@ GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a) (char *)a); } +static int edipartyname_cmp(const EDIPARTYNAME *a, const EDIPARTYNAME *b) +{ + int res; + + if (a == NULL || b == NULL) { + /* + * Shouldn't be possible in a valid GENERAL_NAME, but we handle it + * anyway. OTHERNAME_cmp treats NULL != NULL so we do the same here + */ + return -1; + } + if (a->nameAssigner == NULL && b->nameAssigner != NULL) + return -1; + if (a->nameAssigner != NULL && b->nameAssigner == NULL) + return 1; + /* If we get here then both have nameAssigner set, or both unset */ + if (a->nameAssigner != NULL) { + res = ASN1_STRING_cmp(a->nameAssigner, b->nameAssigner); + if (res != 0) + return res; + } + /* + * partyName is required, so these should never be NULL. We treat it in + * the same way as the a == NULL || b == NULL case above + */ + if (a->partyName == NULL || b->partyName == NULL) + return -1; + + return ASN1_STRING_cmp(a->partyName, b->partyName); +} + /* Returns 0 if they are equal, != 0 otherwise. */ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) { @@ -116,8 +148,11 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: + result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address); + break; + case GEN_EDIPARTY: - result = ASN1_TYPE_cmp(a->d.other, b->d.other); + result = edipartyname_cmp(a->d.ediPartyName, b->d.ediPartyName); break; case GEN_OTHERNAME: @@ -164,8 +199,11 @@ void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type { switch (type) { case GEN_X400: + a->d.x400Address = value; + break; + case GEN_EDIPARTY: - a->d.other = value; + a->d.ediPartyName = value; break; case GEN_OTHERNAME: @@ -199,8 +237,10 @@ void *GENERAL_NAME_get0_value(GENERAL_NAME *a, int *pt *ptype = a->type; switch (a->type) { case GEN_X400: + return a->d.x400Address; + case GEN_EDIPARTY: - return a->d.other; + return a->d.ediPartyName; case GEN_OTHERNAME: return a->d.otherName; From owner-svn-src-stable@freebsd.org Thu Dec 10 23:58:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA0A54BCA76; Thu, 10 Dec 2020 23:58:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsW8M5M7Bz4W86; Thu, 10 Dec 2020 23:58:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAB13213F5; Thu, 10 Dec 2020 23:58:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BANwRqs059402; Thu, 10 Dec 2020 23:58:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BANwRj2059401; Thu, 10 Dec 2020 23:58:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012102358.0BANwRj2059401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 10 Dec 2020 23:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368531 - stable/12/lib/csu/common X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/lib/csu/common X-SVN-Commit-Revision: 368531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 23:58:27 -0000 Author: jhb Date: Thu Dec 10 23:58:27 2020 New Revision: 368531 URL: https://svnweb.freebsd.org/changeset/base/368531 Log: MFC 367574: Rename __JCR_LIST__ to __JCR_END__ in crtend.c. This is more consistent with the names used for .ctor and .dtor symbols and better reflects __JCR_END__'s role. Modified: stable/12/lib/csu/common/crtend.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/csu/common/crtend.c ============================================================================== --- stable/12/lib/csu/common/crtend.c Thu Dec 10 23:43:29 2020 (r368530) +++ stable/12/lib/csu/common/crtend.c Thu Dec 10 23:58:27 2020 (r368531) @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); typedef void (*crt_func)(void); -static crt_func __JCR_LIST__[] __section(".jcr") __used = { +static crt_func __JCR_END__[] __section(".jcr") __used = { (crt_func)0 }; From owner-svn-src-stable@freebsd.org Fri Dec 11 00:25:35 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A96B4BD1E9; Fri, 11 Dec 2020 00:25:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsWlg3FJ8z4XgP; Fri, 11 Dec 2020 00:25:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 624CA21E2C; Fri, 11 Dec 2020 00:25:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0PZat078024; Fri, 11 Dec 2020 00:25:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0PZh3078023; Fri, 11 Dec 2020 00:25:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012110025.0BB0PZh3078023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 11 Dec 2020 00:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368535 - stable/12/sys/arm/include X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/arm/include X-SVN-Commit-Revision: 368535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:25:35 -0000 Author: markj Date: Fri Dec 11 00:25:34 2020 New Revision: 368535 URL: https://svnweb.freebsd.org/changeset/base/368535 Log: MFC r368108: arm: Correctly report the size of FPA registers to GDB PR: 251022 Modified: stable/12/sys/arm/include/gdb_machdep.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/include/gdb_machdep.h ============================================================================== --- stable/12/sys/arm/include/gdb_machdep.h Fri Dec 11 00:20:04 2020 (r368534) +++ stable/12/sys/arm/include/gdb_machdep.h Fri Dec 11 00:25:34 2020 (r368535) @@ -36,9 +36,13 @@ #define GDB_REG_PC 15 static __inline size_t -gdb_cpu_regsz(int regnum __unused) +gdb_cpu_regsz(int regnum) { - return (sizeof(int)); + /* + * GDB expects the FPA registers f0-f7, each 96 bits wide, to be placed + * in between the PC and CSPR in response to a "g" packet. + */ + return (regnum >= 16 && regnum <= 23 ? 12 : sizeof(int)); } static __inline int From owner-svn-src-stable@freebsd.org Fri Dec 11 00:30:42 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FBAF4BDA82; Fri, 11 Dec 2020 00:30:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsWsZ1PDzz4YGH; Fri, 11 Dec 2020 00:30:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22BE521A76; Fri, 11 Dec 2020 00:30:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0Uf6P078458; Fri, 11 Dec 2020 00:30:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0UfSh078457; Fri, 11 Dec 2020 00:30:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012110030.0BB0UfSh078457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 11 Dec 2020 00:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368538 - stable/12/sys/cam/mmc X-SVN-Group: stable-12 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/12/sys/cam/mmc X-SVN-Commit-Revision: 368538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:30:42 -0000 Author: jkim Date: Fri Dec 11 00:30:41 2020 New Revision: 368538 URL: https://svnweb.freebsd.org/changeset/base/368538 Log: MFC: r367997 Do not truncate the last character from serial number. strlcpy() requires one more byte for the NULL character. Modified: stable/12/sys/cam/mmc/mmc_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/mmc/mmc_da.c ============================================================================== --- stable/12/sys/cam/mmc/mmc_da.c Fri Dec 11 00:28:28 2020 (r368537) +++ stable/12/sys/cam/mmc/mmc_da.c Fri Dec 11 00:30:41 2020 (r368538) @@ -1262,12 +1262,12 @@ sdda_start_init(void *context, union ccb *start_ccb) device->serial_num_len = strlen(softc->card_sn_string); device->serial_num = (u_int8_t *)malloc((device->serial_num_len + 1), M_CAMXPT, M_NOWAIT); - strlcpy(device->serial_num, softc->card_sn_string, device->serial_num_len); + strlcpy(device->serial_num, softc->card_sn_string, device->serial_num_len + 1); device->device_id_len = strlen(softc->card_id_string); device->device_id = (u_int8_t *)malloc((device->device_id_len + 1), M_CAMXPT, M_NOWAIT); - strlcpy(device->device_id, softc->card_id_string, device->device_id_len); + strlcpy(device->device_id, softc->card_id_string, device->device_id_len + 1); strlcpy(mmcp->model, softc->card_id_string, sizeof(mmcp->model)); From owner-svn-src-stable@freebsd.org Fri Dec 11 00:35:05 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 225574BDD8D; Fri, 11 Dec 2020 00:35:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsWyd0R6xz4YcQ; Fri, 11 Dec 2020 00:35:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01BAB2210D; Fri, 11 Dec 2020 00:35:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0Z4lm084420; Fri, 11 Dec 2020 00:35:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0Z4rk084419; Fri, 11 Dec 2020 00:35:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012110035.0BB0Z4rk084419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 11 Dec 2020 00:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368539 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 368539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:35:05 -0000 Author: kib Date: Fri Dec 11 00:35:04 2020 New Revision: 368539 URL: https://svnweb.freebsd.org/changeset/base/368539 Log: MFC r368342: Add kern_ntp_adjtime(9). Modified: stable/12/sys/kern/kern_ntptime.c stable/12/sys/sys/syscallsubr.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_ntptime.c ============================================================================== --- stable/12/sys/kern/kern_ntptime.c Fri Dec 11 00:30:41 2020 (r368538) +++ stable/12/sys/kern/kern_ntptime.c Fri Dec 11 00:35:04 2020 (r368539) @@ -337,24 +337,13 @@ SYSCTL_S64(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG * the timex.constant structure member has a dual purpose to set the time * constant and to set the TAI offset. */ -#ifndef _SYS_SYSPROTO_H_ -struct ntp_adjtime_args { - struct timex *tp; -}; -#endif - int -sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_args *uap) +kern_ntp_adjtime(struct thread *td, struct timex *ntv, int *retvalp) { - struct timex ntv; /* temporary structure */ long freq; /* frequency ns/s) */ int modes; /* mode bits from structure */ int error, retval; - error = copyin((caddr_t)uap->tp, (caddr_t)&ntv, sizeof(ntv)); - if (error) - return (error); - /* * Update selected clock variables - only the superuser can * change anything. Note that there is no error checking here on @@ -364,18 +353,19 @@ sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_ * the STA_PLL bit in the status word is cleared, the state and * status words are reset to the initial values at boot. */ - modes = ntv.modes; + modes = ntv->modes; + error = 0; if (modes) error = priv_check(td, PRIV_NTP_ADJTIME); if (error != 0) return (error); NTP_LOCK(); if (modes & MOD_MAXERROR) - time_maxerror = ntv.maxerror; + time_maxerror = ntv->maxerror; if (modes & MOD_ESTERROR) - time_esterror = ntv.esterror; + time_esterror = ntv->esterror; if (modes & MOD_STATUS) { - if (time_status & STA_PLL && !(ntv.status & STA_PLL)) { + if (time_status & STA_PLL && !(ntv->status & STA_PLL)) { time_state = TIME_OK; time_status = STA_UNSYNC; #ifdef PPS_SYNC @@ -383,28 +373,28 @@ sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_ #endif /* PPS_SYNC */ } time_status &= STA_RONLY; - time_status |= ntv.status & ~STA_RONLY; + time_status |= ntv->status & ~STA_RONLY; } if (modes & MOD_TIMECONST) { - if (ntv.constant < 0) + if (ntv->constant < 0) time_constant = 0; - else if (ntv.constant > MAXTC) + else if (ntv->constant > MAXTC) time_constant = MAXTC; else - time_constant = ntv.constant; + time_constant = ntv->constant; } if (modes & MOD_TAI) { - if (ntv.constant > 0) /* XXX zero & negative numbers ? */ - time_tai = ntv.constant; + if (ntv->constant > 0) /* XXX zero & negative numbers ? */ + time_tai = ntv->constant; } #ifdef PPS_SYNC if (modes & MOD_PPSMAX) { - if (ntv.shift < PPS_FAVG) + if (ntv->shift < PPS_FAVG) pps_shiftmax = PPS_FAVG; - else if (ntv.shift > PPS_FAVGMAX) + else if (ntv->shift > PPS_FAVGMAX) pps_shiftmax = PPS_FAVGMAX; else - pps_shiftmax = ntv.shift; + pps_shiftmax = ntv->shift; } #endif /* PPS_SYNC */ if (modes & MOD_NANO) @@ -416,17 +406,17 @@ sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_ if (modes & MOD_CLKA) time_status &= ~STA_CLK; if (modes & MOD_FREQUENCY) { - freq = (ntv.freq * 1000LL) >> 16; + freq = (ntv->freq * 1000LL) >> 16; if (freq > MAXFREQ) L_LINT(time_freq, MAXFREQ); else if (freq < -MAXFREQ) L_LINT(time_freq, -MAXFREQ); else { /* - * ntv.freq is [PPM * 2^16] = [us/s * 2^16] + * ntv->freq is [PPM * 2^16] = [us/s * 2^16] * time_freq is [ns/s * 2^32] */ - time_freq = ntv.freq * 1000LL * 65536LL; + time_freq = ntv->freq * 1000LL * 65536LL; } #ifdef PPS_SYNC pps_freq = time_freq; @@ -434,9 +424,9 @@ sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_ } if (modes & MOD_OFFSET) { if (time_status & STA_NANO) - hardupdate(ntv.offset); + hardupdate(ntv->offset); else - hardupdate(ntv.offset * 1000); + hardupdate(ntv->offset * 1000); } /* @@ -444,38 +434,60 @@ sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_ * returned only by ntp_gettime(); */ if (time_status & STA_NANO) - ntv.offset = L_GINT(time_offset); + ntv->offset = L_GINT(time_offset); else - ntv.offset = L_GINT(time_offset) / 1000; /* XXX rounding ? */ - ntv.freq = L_GINT((time_freq / 1000LL) << 16); - ntv.maxerror = time_maxerror; - ntv.esterror = time_esterror; - ntv.status = time_status; - ntv.constant = time_constant; + ntv->offset = L_GINT(time_offset) / 1000; /* XXX rounding ? */ + ntv->freq = L_GINT((time_freq / 1000LL) << 16); + ntv->maxerror = time_maxerror; + ntv->esterror = time_esterror; + ntv->status = time_status; + ntv->constant = time_constant; if (time_status & STA_NANO) - ntv.precision = time_precision; + ntv->precision = time_precision; else - ntv.precision = time_precision / 1000; - ntv.tolerance = MAXFREQ * SCALE_PPM; + ntv->precision = time_precision / 1000; + ntv->tolerance = MAXFREQ * SCALE_PPM; #ifdef PPS_SYNC - ntv.shift = pps_shift; - ntv.ppsfreq = L_GINT((pps_freq / 1000LL) << 16); + ntv->shift = pps_shift; + ntv->ppsfreq = L_GINT((pps_freq / 1000LL) << 16); if (time_status & STA_NANO) - ntv.jitter = pps_jitter; + ntv->jitter = pps_jitter; else - ntv.jitter = pps_jitter / 1000; - ntv.stabil = pps_stabil; - ntv.calcnt = pps_calcnt; - ntv.errcnt = pps_errcnt; - ntv.jitcnt = pps_jitcnt; - ntv.stbcnt = pps_stbcnt; + ntv->jitter = pps_jitter / 1000; + ntv->stabil = pps_stabil; + ntv->calcnt = pps_calcnt; + ntv->errcnt = pps_errcnt; + ntv->jitcnt = pps_jitcnt; + ntv->stbcnt = pps_stbcnt; #endif /* PPS_SYNC */ retval = ntp_is_time_error(time_status) ? TIME_ERROR : time_state; NTP_UNLOCK(); - error = copyout((caddr_t)&ntv, (caddr_t)uap->tp, sizeof(ntv)); - if (error == 0) - td->td_retval[0] = retval; + *retvalp = retval; + return (0); +} + +#ifndef _SYS_SYSPROTO_H_ +struct ntp_adjtime_args { + struct timex *tp; +}; +#endif + +int +sys_ntp_adjtime(struct thread *td, struct ntp_adjtime_args *uap) +{ + struct timex ntv; + int error, retval; + + error = copyin(uap->tp, &ntv, sizeof(ntv)); + if (error == 0) { + error = kern_ntp_adjtime(td, &ntv, &retval); + if (error == 0) { + error = copyout(&ntv, uap->tp, sizeof(ntv)); + if (error == 0) + td->td_retval[0] = retval; + } + } return (error); } Modified: stable/12/sys/sys/syscallsubr.h ============================================================================== --- stable/12/sys/sys/syscallsubr.h Fri Dec 11 00:30:41 2020 (r368538) +++ stable/12/sys/sys/syscallsubr.h Fri Dec 11 00:35:04 2020 (r368539) @@ -61,6 +61,7 @@ union semun; struct sockaddr; struct stat; struct thr_param; +struct timex; struct uio; struct vm_map; struct vmspace; @@ -198,6 +199,7 @@ int kern_munlock(struct thread *td, uintptr_t addr, si int kern_munmap(struct thread *td, uintptr_t addr, size_t size); int kern_nanosleep(struct thread *td, struct timespec *rqt, struct timespec *rmt); +int kern_ntp_adjtime(struct thread *td, struct timex *ntv, int *retvalp); int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, long *ploff); int kern_openat(struct thread *td, int fd, char *path, From owner-svn-src-stable@freebsd.org Fri Dec 11 00:37:52 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C902E4BDB76; Fri, 11 Dec 2020 00:37:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsX1r5LsKz4Yjn; Fri, 11 Dec 2020 00:37:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5E8722283; Fri, 11 Dec 2020 00:37:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0bqUl084627; Fri, 11 Dec 2020 00:37:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0bpj5084624; Fri, 11 Dec 2020 00:37:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012110037.0BB0bpj5084624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 11 Dec 2020 00:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368540 - stable/12/sys/compat/freebsd32 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/compat/freebsd32 X-SVN-Commit-Revision: 368540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:37:52 -0000 Author: kib Date: Fri Dec 11 00:37:51 2020 New Revision: 368540 URL: https://svnweb.freebsd.org/changeset/base/368540 Log: MFC r368343: Fix compat32 for ntp_adjtime(2). Modified: stable/12/sys/compat/freebsd32/freebsd32.h stable/12/sys/compat/freebsd32/freebsd32_misc.c stable/12/sys/compat/freebsd32/syscalls.master Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32.h Fri Dec 11 00:35:04 2020 (r368539) +++ stable/12/sys/compat/freebsd32/freebsd32.h Fri Dec 11 00:37:51 2020 (r368540) @@ -388,4 +388,24 @@ struct procctl_reaper_pids32 { uint32_t rp_pids; }; +struct timex32 { + unsigned int modes; + int32_t offset; + int32_t freq; + int32_t maxerror; + int32_t esterror; + int status; + int32_t constant; + int32_t precision; + int32_t tolerance; + int32_t ppsfreq; + int32_t jitter; + int shift; + int32_t stabil; + int32_t jitcnt; + int32_t calcnt; + int32_t errcnt; + int32_t stbcnt; +}; + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_misc.c Fri Dec 11 00:35:04 2020 (r368539) +++ stable/12/sys/compat/freebsd32/freebsd32_misc.c Fri Dec 11 00:37:51 2020 (r368540) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3540,6 +3541,71 @@ freebsd32_sched_rr_get_interval(struct thread *td, CP(ts, ts32, tv_sec); CP(ts, ts32, tv_nsec); error = copyout(&ts32, uap->interval, sizeof(ts32)); + } + return (error); +} + +static void +timex_to_32(struct timex32 *dst, struct timex *src) +{ + CP(*src, *dst, modes); + CP(*src, *dst, offset); + CP(*src, *dst, freq); + CP(*src, *dst, maxerror); + CP(*src, *dst, esterror); + CP(*src, *dst, status); + CP(*src, *dst, constant); + CP(*src, *dst, precision); + CP(*src, *dst, tolerance); + CP(*src, *dst, ppsfreq); + CP(*src, *dst, jitter); + CP(*src, *dst, shift); + CP(*src, *dst, stabil); + CP(*src, *dst, jitcnt); + CP(*src, *dst, calcnt); + CP(*src, *dst, errcnt); + CP(*src, *dst, stbcnt); +} + +static void +timex_from_32(struct timex *dst, struct timex32 *src) +{ + CP(*src, *dst, modes); + CP(*src, *dst, offset); + CP(*src, *dst, freq); + CP(*src, *dst, maxerror); + CP(*src, *dst, esterror); + CP(*src, *dst, status); + CP(*src, *dst, constant); + CP(*src, *dst, precision); + CP(*src, *dst, tolerance); + CP(*src, *dst, ppsfreq); + CP(*src, *dst, jitter); + CP(*src, *dst, shift); + CP(*src, *dst, stabil); + CP(*src, *dst, jitcnt); + CP(*src, *dst, calcnt); + CP(*src, *dst, errcnt); + CP(*src, *dst, stbcnt); +} + +int +freebsd32_ntp_adjtime(struct thread *td, struct freebsd32_ntp_adjtime_args *uap) +{ + struct timex tx; + struct timex32 tx32; + int error, retval; + + error = copyin(uap->tp, &tx32, sizeof(tx32)); + if (error == 0) { + timex_from_32(&tx, &tx32); + error = kern_ntp_adjtime(td, &tx, &retval); + if (error == 0) { + timex_to_32(&tx32, &tx); + error = copyout(&tx32, uap->tp, sizeof(tx32)); + if (error == 0) + td->td_retval[0] = retval; + } } return (error); } Modified: stable/12/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/12/sys/compat/freebsd32/syscalls.master Fri Dec 11 00:35:04 2020 (r368539) +++ stable/12/sys/compat/freebsd32/syscalls.master Fri Dec 11 00:37:51 2020 (r368540) @@ -333,7 +333,8 @@ const void *buf, size_t nbyte, int pad, \ uint32_t offset1, uint32_t offset2); } 175 AUE_NULL UNIMPL nosys -176 AUE_NTP_ADJTIME NOPROTO { int ntp_adjtime(struct timex *tp); } +176 AUE_NTP_ADJTIME STD { int freebsd32_ntp_adjtime( \ + struct timex32 *tp); } 177 AUE_NULL UNIMPL sfork (BSD/OS 2.x) 178 AUE_NULL UNIMPL getdescriptor (BSD/OS 2.x) 179 AUE_NULL UNIMPL setdescriptor (BSD/OS 2.x) From owner-svn-src-stable@freebsd.org Fri Dec 11 00:38:10 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75FCC4BDDD4; Fri, 11 Dec 2020 00:38:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsX2B2x3pz4Z0c; Fri, 11 Dec 2020 00:38:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 578AE21E42; Fri, 11 Dec 2020 00:38:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0cA8m084691; Fri, 11 Dec 2020 00:38:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0c9k0084686; Fri, 11 Dec 2020 00:38:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012110038.0BB0c9k0084686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 11 Dec 2020 00:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368541 - stable/12/sys/compat/freebsd32 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/compat/freebsd32 X-SVN-Commit-Revision: 368541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:38:10 -0000 Author: kib Date: Fri Dec 11 00:38:08 2020 New Revision: 368541 URL: https://svnweb.freebsd.org/changeset/base/368541 Log: Regen Modified: stable/12/sys/compat/freebsd32/freebsd32_proto.h stable/12/sys/compat/freebsd32/freebsd32_syscall.h stable/12/sys/compat/freebsd32/freebsd32_syscalls.c stable/12/sys/compat/freebsd32/freebsd32_sysent.c stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: stable/12/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_proto.h Fri Dec 11 00:37:51 2020 (r368540) +++ stable/12/sys/compat/freebsd32/freebsd32_proto.h Fri Dec 11 00:38:08 2020 (r368541) @@ -162,6 +162,9 @@ struct freebsd32_shmsys_args { char a3_l_[PADL_(uint32_t)]; uint32_t a3; char a3_r_[PADR_(uint32_t)]; char a4_l_[PADL_(uint32_t)]; uint32_t a4; char a4_r_[PADR_(uint32_t)]; }; +struct freebsd32_ntp_adjtime_args { + char tp_l_[PADL_(struct timex32 *)]; struct timex32 * tp; char tp_r_[PADR_(struct timex32 *)]; +}; struct freebsd32___sysctl_args { char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)]; char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; @@ -762,6 +765,7 @@ int freebsd32_sysarch(struct thread *, struct freebsd3 int freebsd32_semsys(struct thread *, struct freebsd32_semsys_args *); int freebsd32_msgsys(struct thread *, struct freebsd32_msgsys_args *); int freebsd32_shmsys(struct thread *, struct freebsd32_shmsys_args *); +int freebsd32_ntp_adjtime(struct thread *, struct freebsd32_ntp_adjtime_args *); int freebsd32___sysctl(struct thread *, struct freebsd32___sysctl_args *); int freebsd32_futimes(struct thread *, struct freebsd32_futimes_args *); int freebsd32_msgsnd(struct thread *, struct freebsd32_msgsnd_args *); @@ -1310,6 +1314,7 @@ int freebsd11_freebsd32_fstatat(struct thread *, struc #define FREEBSD32_SYS_AUE_freebsd32_shmsys AUE_SHMSYS #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd6_freebsd32_pwrite AUE_PWRITE +#define FREEBSD32_SYS_AUE_freebsd32_ntp_adjtime AUE_NTP_ADJTIME #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_stat AUE_STAT #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_fstat AUE_FSTAT #define FREEBSD32_SYS_AUE_freebsd11_freebsd32_lstat AUE_LSTAT Modified: stable/12/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_syscall.h Fri Dec 11 00:37:51 2020 (r368540) +++ stable/12/sys/compat/freebsd32/freebsd32_syscall.h Fri Dec 11 00:38:08 2020 (r368541) @@ -167,7 +167,7 @@ #define FREEBSD32_SYS_freebsd32_shmsys 171 /* 173 is freebsd6 freebsd32_pread */ /* 174 is freebsd6 freebsd32_pwrite */ -#define FREEBSD32_SYS_ntp_adjtime 176 +#define FREEBSD32_SYS_freebsd32_ntp_adjtime 176 #define FREEBSD32_SYS_setgid 181 #define FREEBSD32_SYS_setegid 182 #define FREEBSD32_SYS_seteuid 183 Modified: stable/12/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_syscalls.c Fri Dec 11 00:37:51 2020 (r368540) +++ stable/12/sys/compat/freebsd32/freebsd32_syscalls.c Fri Dec 11 00:38:08 2020 (r368541) @@ -185,7 +185,7 @@ const char *freebsd32_syscallnames[] = { "compat6.freebsd32_pread", /* 173 = freebsd6 freebsd32_pread */ "compat6.freebsd32_pwrite", /* 174 = freebsd6 freebsd32_pwrite */ "#175", /* 175 = nosys */ - "ntp_adjtime", /* 176 = ntp_adjtime */ + "freebsd32_ntp_adjtime", /* 176 = freebsd32_ntp_adjtime */ "#177", /* 177 = sfork */ "#178", /* 178 = getdescriptor */ "#179", /* 179 = setdescriptor */ Modified: stable/12/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_sysent.c Fri Dec 11 00:37:51 2020 (r368540) +++ stable/12/sys/compat/freebsd32/freebsd32_sysent.c Fri Dec 11 00:38:08 2020 (r368541) @@ -232,7 +232,7 @@ struct sysent freebsd32_sysent[] = { { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 173 = freebsd6 freebsd32_pread */ { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 174 = freebsd6 freebsd32_pwrite */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 175 = nosys */ - { AS(ntp_adjtime_args), (sy_call_t *)sys_ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = ntp_adjtime */ + { AS(freebsd32_ntp_adjtime_args), (sy_call_t *)freebsd32_ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = freebsd32_ntp_adjtime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 177 = sfork */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 178 = getdescriptor */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 179 = setdescriptor */ Modified: stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Dec 11 00:37:51 2020 (r368540) +++ stable/12/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Dec 11 00:38:08 2020 (r368541) @@ -870,10 +870,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 4; break; } - /* ntp_adjtime */ + /* freebsd32_ntp_adjtime */ case 176: { - struct ntp_adjtime_args *p = params; - uarg[0] = (intptr_t) p->tp; /* struct timex * */ + struct freebsd32_ntp_adjtime_args *p = params; + uarg[0] = (intptr_t) p->tp; /* struct timex32 * */ *n_args = 1; break; } @@ -4733,11 +4733,11 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* ntp_adjtime */ + /* freebsd32_ntp_adjtime */ case 176: switch(ndx) { case 0: - p = "userland struct timex *"; + p = "userland struct timex32 *"; break; default: break; @@ -9472,7 +9472,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; - /* ntp_adjtime */ + /* freebsd32_ntp_adjtime */ case 176: if (ndx == 0 || ndx == 1) p = "int"; From owner-svn-src-stable@freebsd.org Fri Dec 11 01:04:37 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A0854BE50B; Fri, 11 Dec 2020 01:04:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsXcj0h8Dz4Zvg; Fri, 11 Dec 2020 01:04:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 060A722569; Fri, 11 Dec 2020 01:04:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB14a5d003556; Fri, 11 Dec 2020 01:04:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB14aA2003555; Fri, 11 Dec 2020 01:04:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012110104.0BB14aA2003555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 11 Dec 2020 01:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368544 - stable/12/lib/csu/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/lib/csu/tests X-SVN-Commit-Revision: 368544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 01:04:37 -0000 Author: jhb Date: Fri Dec 11 01:04:36 2020 New Revision: 368544 URL: https://svnweb.freebsd.org/changeset/base/368544 Log: MFC 367575: Fix dso_handle_check for PIE executables. PIE executables use crtbeginS.o and have a non-NULL dso_handle as a result. Modified: stable/12/lib/csu/tests/fini_test.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/csu/tests/fini_test.c ============================================================================== --- stable/12/lib/csu/tests/fini_test.c Fri Dec 11 01:00:07 2020 (r368543) +++ stable/12/lib/csu/tests/fini_test.c Fri Dec 11 01:04:36 2020 (r368544) @@ -141,9 +141,9 @@ dso_handle_check(void) { void *dso = __dso_handle; -#ifdef DSO_LIB +#if defined(DSO_LIB) || defined(__PIE__) ATF_REQUIRE_MSG(dso != NULL, - "Null __dso_handle in DSO"); + "Null __dso_handle in DSO/PIE"); #else ATF_REQUIRE_MSG(dso == NULL, "Invalid __dso_handle in non-DSO"); From owner-svn-src-stable@freebsd.org Fri Dec 11 01:06:50 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6466B4BE687; Fri, 11 Dec 2020 01:06:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsXgG27t2z4b6R; Fri, 11 Dec 2020 01:06:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37D02225B7; Fri, 11 Dec 2020 01:06:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB16oFF003756; Fri, 11 Dec 2020 01:06:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB16nAN003755; Fri, 11 Dec 2020 01:06:49 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012110106.0BB16nAN003755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 11 Dec 2020 01:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368545 - in stable/12/lib/csu/tests: . dynamic dynamicpie X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12/lib/csu/tests: . dynamic dynamicpie X-SVN-Commit-Revision: 368545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 01:06:50 -0000 Author: jhb Date: Fri Dec 11 01:06:49 2020 New Revision: 368545 URL: https://svnweb.freebsd.org/changeset/base/368545 Log: MFC 367576: Add C startup code tests for PIE binaries. - Force dynamic to be a non-PIE binary. - Add a dynamicpie test which uses a PIE binary. Added: stable/12/lib/csu/tests/dynamicpie/ - copied from r367576, head/lib/csu/tests/dynamicpie/ Modified: stable/12/lib/csu/tests/Makefile stable/12/lib/csu/tests/dynamic/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/csu/tests/Makefile ============================================================================== --- stable/12/lib/csu/tests/Makefile Fri Dec 11 01:04:36 2020 (r368544) +++ stable/12/lib/csu/tests/Makefile Fri Dec 11 01:06:49 2020 (r368545) @@ -3,6 +3,7 @@ SUBDIR= dso TESTS_SUBDIRS= dynamic TESTS_SUBDIRS+= dynamiclib +TESTS_SUBDIRS+= dynamicpie TESTS_SUBDIRS+= static SUBDIR_DEPEND_dynamiclib=dso Modified: stable/12/lib/csu/tests/dynamic/Makefile ============================================================================== --- stable/12/lib/csu/tests/dynamic/Makefile Fri Dec 11 01:04:36 2020 (r368544) +++ stable/12/lib/csu/tests/dynamic/Makefile Fri Dec 11 01:06:49 2020 (r368545) @@ -2,5 +2,8 @@ .PATH: ${.CURDIR:H} +.include +MK_PIE= no + .include "../Makefile.tests" .include From owner-svn-src-stable@freebsd.org Fri Dec 11 14:11:42 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D6124B0AE1; Fri, 11 Dec 2020 14:11:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cst4t39hSz3tt1; Fri, 11 Dec 2020 14:11:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6050D451E; Fri, 11 Dec 2020 14:11:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBEBgrk095226; Fri, 11 Dec 2020 14:11:42 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBEBgD2095225; Fri, 11 Dec 2020 14:11:42 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202012111411.0BBEBgD2095225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 11 Dec 2020 14:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368552 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 368552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 14:11:42 -0000 Author: kp Date: Fri Dec 11 14:11:41 2020 New Revision: 368552 URL: https://svnweb.freebsd.org/changeset/base/368552 Log: MFC r368015: if: Remove ifnet_rwlock It no longer serves any purpose, as evidenced by the fact that we never take it without ifnet_sxlock. This differs slightly from r368015 in that we keep the ifnet_rwlock instance (but no longer take the lock) in case there are external users who still take the lock. Sponsored by: Modirum MDPay Modified: stable/12/sys/net/if.c stable/12/sys/net/if_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if.c ============================================================================== --- stable/12/sys/net/if.c Fri Dec 11 13:23:59 2020 (r368551) +++ stable/12/sys/net/if.c Fri Dec 11 14:11:41 2020 (r368552) @@ -305,12 +305,8 @@ VNET_DEFINE(struct ifnet **, ifindex_table); /* * The global network interface list (V_ifnet) and related state (such as - * if_index, if_indexlim, and ifindex_table) are protected by an sxlock and - * an rwlock. Either may be acquired shared to stablize the list, but both - * must be acquired writable to modify the list. This model allows us to - * both stablize the interface list during interrupt thread processing, but - * also to stablize it over long-running ioctls, without introducing priority - * inversions and deadlocks. + * if_index, if_indexlim, and ifindex_table) are protected by an sxlock. + * This may be acquired to stabilise the list, or we may rely on NET_EPOCH. */ struct rwlock ifnet_rwlock; RW_SYSINIT_FLAGS(ifnet_rw, &ifnet_rwlock, "ifnet_rw", RW_RECURSE); Modified: stable/12/sys/net/if_var.h ============================================================================== --- stable/12/sys/net/if_var.h Fri Dec 11 13:23:59 2020 (r368551) +++ stable/12/sys/net/if_var.h Fri Dec 11 14:11:41 2020 (r368552) @@ -569,27 +569,11 @@ struct ifmultiaddr { extern struct rwlock ifnet_rwlock; extern struct sx ifnet_sxlock; -#define IFNET_WLOCK() do { \ - sx_xlock(&ifnet_sxlock); \ - rw_wlock(&ifnet_rwlock); \ -} while (0) - -#define IFNET_WUNLOCK() do { \ - rw_wunlock(&ifnet_rwlock); \ - sx_xunlock(&ifnet_sxlock); \ -} while (0) - -/* - * To assert the ifnet lock, you must know not only whether it's for read or - * write, but also whether it was acquired with sleep support or not. - */ -#define IFNET_RLOCK_ASSERT() sx_assert(&ifnet_sxlock, SA_SLOCKED) +#define IFNET_WLOCK() sx_xlock(&ifnet_sxlock) +#define IFNET_WUNLOCK() sx_xunlock(&ifnet_sxlock) +#define IFNET_RLOCK_ASSERT() sx_assert(&ifnet_sxlock, SA_SLOCKED) #define IFNET_RLOCK_NOSLEEP_ASSERT() MPASS(in_epoch(net_epoch_preempt)) -#define IFNET_WLOCK_ASSERT() do { \ - sx_assert(&ifnet_sxlock, SA_XLOCKED); \ - rw_assert(&ifnet_rwlock, RA_WLOCKED); \ -} while (0) - +#define IFNET_WLOCK_ASSERT() sx_assert(&ifnet_sxlock, SA_XLOCKED) #define IFNET_RLOCK() sx_slock(&ifnet_sxlock) #define IFNET_RLOCK_NOSLEEP() struct epoch_tracker ifnet_rlock_et; epoch_enter_preempt(net_epoch_preempt, &ifnet_rlock_et) #define IFNET_RUNLOCK() sx_sunlock(&ifnet_sxlock) From owner-svn-src-stable@freebsd.org Fri Dec 11 15:39:23 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BE684B2D0F; Fri, 11 Dec 2020 15:39:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Csw233Chvz4Vwv; Fri, 11 Dec 2020 15:39:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CB1D53DB; Fri, 11 Dec 2020 15:39:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBFdNbH050355; Fri, 11 Dec 2020 15:39:23 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBFdNWV050354; Fri, 11 Dec 2020 15:39:23 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202012111539.0BBFdNWV050354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 11 Dec 2020 15:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368554 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 368554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 15:39:23 -0000 Author: kp Date: Fri Dec 11 15:39:22 2020 New Revision: 368554 URL: https://svnweb.freebsd.org/changeset/base/368554 Log: MFC r368020, r368025: if: Protect V_ifnet in vnet_if_return() When we terminate a vnet (i.e. jail) we move interfaces back to their home vnet. We need to protect our access to the V_ifnet CK_LIST. We could enter NET_EPOCH, but if_detach_internal() (called from if_vmove()) waits for net epoch callback completion. That's not possible from NET_EPOCH. Instead, we take the IFNET_WLOCK, build a list of the interfaces that need to move and, once we've released the lock, move them back to their home vnet. We cannot hold the IFNET_WLOCK() during if_vmove(), because that results in a LOR between ifnet_sx, in_multi_sx and iflib ctx lock. Separate out moving the ifp into or out of V_ifnet, so we can hold the lock as we do the list manipulation, but do not hold it as we if_vmove(). if: Fix non-VIMAGE build if_link_ifnet() and if_unlink_ifnet() are needed even when VIMAGE is not enabled. Sponsored by: Modirum MDPay Modified: stable/12/sys/net/if.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if.c ============================================================================== --- stable/12/sys/net/if.c Fri Dec 11 14:32:42 2020 (r368553) +++ stable/12/sys/net/if.c Fri Dec 11 15:39:22 2020 (r368554) @@ -274,6 +274,8 @@ static int if_getgroupmembers(struct ifgroupreq *); static void if_delgroups(struct ifnet *); static void if_attach_internal(struct ifnet *, int, struct if_clone *); static int if_detach_internal(struct ifnet *, int, struct if_clone **); +static void if_link_ifnet(struct ifnet *); +static bool if_unlink_ifnet(struct ifnet *, bool); #ifdef VIMAGE static void if_vmove(struct ifnet *, struct vnet *); #endif @@ -472,17 +474,85 @@ vnet_if_uninit(const void *unused __unused) } VNET_SYSUNINIT(vnet_if_uninit, SI_SUB_INIT_IF, SI_ORDER_FIRST, vnet_if_uninit, NULL); +#endif static void +if_link_ifnet(struct ifnet *ifp) +{ + + IFNET_WLOCK(); + CK_STAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); +#ifdef VIMAGE + curvnet->vnet_ifcnt++; +#endif + IFNET_WUNLOCK(); +} + +static bool +if_unlink_ifnet(struct ifnet *ifp, bool vmove) +{ + struct ifnet *iter; + int found = 0; + + IFNET_WLOCK(); + CK_STAILQ_FOREACH(iter, &V_ifnet, if_link) + if (iter == ifp) { + CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link); + if (!vmove) + ifp->if_flags |= IFF_DYING; + found = 1; + break; + } +#ifdef VIMAGE + curvnet->vnet_ifcnt--; +#endif + IFNET_WUNLOCK(); + + return (found); +} + +#ifdef VIMAGE +static void vnet_if_return(const void *unused __unused) { struct ifnet *ifp, *nifp; + struct ifnet **pending; + int found, i; + i = 0; + + /* + * We need to protect our access to the V_ifnet tailq. Ordinarily we'd + * enter NET_EPOCH, but that's not possible, because if_vmove() calls + * if_detach_internal(), which waits for NET_EPOCH callbacks to + * complete. We can't do that from within NET_EPOCH. + * + * However, we can also use the IFNET_xLOCK, which is the V_ifnet + * read/write lock. We cannot hold the lock as we call if_vmove() + * though, as that presents LOR w.r.t ifnet_sx, in_multi_sx and iflib + * ctx lock. + */ + IFNET_WLOCK(); + + pending = malloc(sizeof(struct ifnet *) * curvnet->vnet_ifcnt, + M_IFNET, M_WAITOK | M_ZERO); + /* Return all inherited interfaces to their parent vnets. */ CK_STAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) { - if (ifp->if_home_vnet != ifp->if_vnet) - if_vmove(ifp, ifp->if_home_vnet); + if (ifp->if_home_vnet != ifp->if_vnet) { + found = if_unlink_ifnet(ifp, true); + MPASS(found); + + pending[i++] = ifp; + } } + IFNET_WUNLOCK(); + + for (int j = 0; j < i; j++) { + if_vmove(pending[j], pending[j]->if_home_vnet); + } + + free(pending, M_IFNET); } VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_ANY, vnet_if_return, NULL); @@ -890,12 +960,7 @@ if_attach_internal(struct ifnet *ifp, int vmove, struc } #endif - IFNET_WLOCK(); - CK_STAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); -#ifdef VIMAGE - curvnet->vnet_ifcnt++; -#endif - IFNET_WUNLOCK(); + if_link_ifnet(ifp); if (domain_init_status >= 2) if_attachdomain1(ifp); @@ -1033,9 +1098,12 @@ if_purgemaddrs(struct ifnet *ifp) void if_detach(struct ifnet *ifp) { + bool found; CURVNET_SET_QUIET(ifp->if_vnet); - if_detach_internal(ifp, 0, NULL); + found = if_unlink_ifnet(ifp, false); + if (found) + if_detach_internal(ifp, 0, NULL); CURVNET_RESTORE(); } @@ -1055,47 +1123,17 @@ if_detach_internal(struct ifnet *ifp, int vmove, struc struct ifaddr *ifa; int i; struct domain *dp; - struct ifnet *iter; - int found = 0; #ifdef VIMAGE int shutdown; shutdown = (ifp->if_vnet->vnet_state > SI_SUB_VNET && ifp->if_vnet->vnet_state < SI_SUB_VNET_DONE) ? 1 : 0; #endif - IFNET_WLOCK(); - CK_STAILQ_FOREACH(iter, &V_ifnet, if_link) - if (iter == ifp) { - CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link); - if (!vmove) - ifp->if_flags |= IFF_DYING; - found = 1; - break; - } - IFNET_WUNLOCK(); - if (!found) { - /* - * While we would want to panic here, we cannot - * guarantee that the interface is indeed still on - * the list given we don't hold locks all the way. - */ - return (ENOENT); -#if 0 - if (vmove) - panic("%s: ifp=%p not on the ifnet tailq %p", - __func__, ifp, &V_ifnet); - else - return; /* XXX this should panic as well? */ -#endif - } /* * At this point we know the interface still was on the ifnet list * and we removed it so we are in a stable state. */ -#ifdef VIMAGE - curvnet->vnet_ifcnt--; -#endif epoch_wait_preempt(net_epoch_preempt); /* @@ -1322,6 +1360,7 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, ch struct prison *pr; struct ifnet *difp; int shutdown; + bool found; /* Try to find the prison within our visibility. */ sx_slock(&allprison_lock); @@ -1358,6 +1397,9 @@ if_vmove_loan(struct thread *td, struct ifnet *ifp, ch } CURVNET_RESTORE(); + found = if_unlink_ifnet(ifp, true); + MPASS(found); + /* Move the interface into the child jail/vnet. */ if_vmove(ifp, pr->pr_vnet); @@ -1374,7 +1416,8 @@ if_vmove_reclaim(struct thread *td, char *ifname, int struct prison *pr; struct vnet *vnet_dst; struct ifnet *ifp; - int shutdown; + int shutdown; + bool found; /* Try to find the prison within our visibility. */ sx_slock(&allprison_lock); @@ -1412,6 +1455,8 @@ if_vmove_reclaim(struct thread *td, char *ifname, int } /* Get interface back from child jail/vnet. */ + found = if_unlink_ifnet(ifp, true); + MPASS(found); if_vmove(ifp, vnet_dst); CURVNET_RESTORE(); From owner-svn-src-stable@freebsd.org Sat Dec 12 16:55:24 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65AB44BA19D; Sat, 12 Dec 2020 16:55:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtYgJ2FbTz3NwB; Sat, 12 Dec 2020 16:55:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 401CD206E9; Sat, 12 Dec 2020 16:55:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCGtOn2011452; Sat, 12 Dec 2020 16:55:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCGtNUF011448; Sat, 12 Dec 2020 16:55:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012121655.0BCGtNUF011448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 12 Dec 2020 16:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368581 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 368581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 16:55:24 -0000 Author: jhb Date: Sat Dec 12 16:55:23 2020 New Revision: 368581 URL: https://svnweb.freebsd.org/changeset/base/368581 Log: MFC 366854: Re-enable receive flow control for TOE TLS sockets. Flow control was disabled during initial TOE TLS development to workaround a hang (and to match the Linux TOE TLS support for T6). The rest of the TOE TLS code maintained credits as if flow control was enabled which was inherited from before the workaround was added with the exception that the receive window was allowed to go negative. This negative receive window handling (rcv_over) was because I hadn't realized the full implications of disabling flow control. To clean this up, re-enable flow control on TOE TLS sockets. The existing TPF_FORCE_CREDITS workaround is sufficient for the original hang. Now that flow control is enabled, remove the rcv_over workaround and instead assert that the receive window never goes negative matching plain TCP TOE sockets. Modified: stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c stable/12/sys/dev/cxgbe/tom/t4_tls.c stable/12/sys/dev/cxgbe/tom/t4_tls.h stable/12/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Dec 12 15:38:32 2020 (r368580) +++ stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Dec 12 16:55:23 2020 (r368581) @@ -467,16 +467,6 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) SOCKBUF_LOCK_ASSERT(sb); rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; - if (ulp_mode(toep) == ULP_MODE_TLS) { - if (toep->tls.rcv_over >= rx_credits) { - toep->tls.rcv_over -= rx_credits; - rx_credits = 0; - } else { - rx_credits -= toep->tls.rcv_over; - toep->tls.rcv_over = 0; - } - } - if (rx_credits > 0 && (tp->rcv_wnd <= 32 * 1024 || rx_credits >= 64 * 1024 || (rx_credits >= 16 * 1024 && tp->rcv_wnd <= 128 * 1024) || Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tls.c Sat Dec 12 15:38:32 2020 (r368580) +++ stable/12/sys/dev/cxgbe/tom/t4_tls.c Sat Dec 12 16:55:23 2020 (r368581) @@ -1491,11 +1491,9 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_head #endif tp->rcv_nxt += pdu_length; - if (tp->rcv_wnd < pdu_length) { - toep->tls.rcv_over += pdu_length - tp->rcv_wnd; - tp->rcv_wnd = 0; - } else - tp->rcv_wnd -= pdu_length; + KASSERT(tp->rcv_wnd >= pdu_length, + ("%s: negative window size", __func__)); + tp->rcv_wnd -= pdu_length; /* XXX: Not sure what to do about urgent data. */ Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.h ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tls.h Sat Dec 12 15:38:32 2020 (r368580) +++ stable/12/sys/dev/cxgbe/tom/t4_tls.h Sat Dec 12 16:55:23 2020 (r368581) @@ -268,7 +268,6 @@ struct tls_ofld_info { struct tls_scmd scmd0; u_int sb_off; struct callout handshake_timer; - u_int rcv_over; }; struct tls_key_req { Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Sat Dec 12 15:38:32 2020 (r368580) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Sat Dec 12 16:55:23 2020 (r368581) @@ -1021,8 +1021,6 @@ calc_options2(struct vi_info *vi, struct conn_params * if (cp->ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_DDP; #endif - if (cp->ulp_mode == ULP_MODE_TLS) - opt2 |= F_RX_FC_DISABLE; return (htobe32(opt2)); } From owner-svn-src-stable@freebsd.org Sat Dec 12 17:04:55 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 215204BAA00; Sat, 12 Dec 2020 17:04:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtYtH0Sbvz3Pmf; Sat, 12 Dec 2020 17:04:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0293B20C98; Sat, 12 Dec 2020 17:04:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCH4sN3019572; Sat, 12 Dec 2020 17:04:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCH4s2h019568; Sat, 12 Dec 2020 17:04:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012121704.0BCH4s2h019568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 12 Dec 2020 17:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368582 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 368582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 17:04:55 -0000 Author: jhb Date: Sat Dec 12 17:04:54 2020 New Revision: 368582 URL: https://svnweb.freebsd.org/changeset/base/368582 Log: MFC 366955: Handle CPL_RX_DATA on active TLS sockets. In certain edge cases, the NIC might have only received a partial TLS record which it needs to return to the driver. For example, if the local socket was closed while data was still in flight, a partial TLS record might be pending when the connection is closed. Receiving a RST in the middle of a TLS record is another example. When this happens, the firmware returns the the partial TLS record as plain TCP data via CPL_RX_DATA. Handle these requests by returning an error to OpenSSL (via so_error for KTLS or via an error TLS record header for the older Chelsio OpenSSL interface). Modified: stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c stable/12/sys/dev/cxgbe/tom/t4_tls.c stable/12/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Dec 12 16:55:23 2020 (r368581) +++ stable/12/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Dec 12 17:04:54 2020 (r368582) @@ -1550,6 +1550,15 @@ do_rx_data(struct sge_iq *iq, const struct rss_header tp = intotcpcb(inp); + if (__predict_false(ulp_mode(toep) == ULP_MODE_TLS && + toep->flags & TPF_TLS_RECEIVE)) { + /* Received "raw" data on a TLS socket. */ + CTR3(KTR_CXGBE, "%s: tid %u, raw TLS data (%d bytes)", + __func__, tid, len); + do_rx_data_tls(cpl, toep, m); + return (0); + } + if (__predict_false(tp->rcv_nxt != be32toh(cpl->seq))) ddp_placed = be32toh(cpl->seq) - tp->rcv_nxt; Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tls.c Sat Dec 12 16:55:23 2020 (r368581) +++ stable/12/sys/dev/cxgbe/tom/t4_tls.c Sat Dec 12 17:04:54 2020 (r368582) @@ -691,6 +691,8 @@ program_key_context(struct tcpcb *tp, struct toepcb *t V_TCB_TLS_SEQ(M_TCB_TLS_SEQ), V_TCB_TLS_SEQ(0)); t4_clear_rx_quiesce(toep); + + toep->flags |= TPF_TLS_RECEIVE; } else { unsigned short pdus_per_ulp; @@ -1597,6 +1599,135 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_head INP_WUNLOCK(inp); CURVNET_RESTORE(); return (0); +} + +void +do_rx_data_tls(const struct cpl_rx_data *cpl, struct toepcb *toep, + struct mbuf *m) +{ + struct inpcb *inp = toep->inp; + struct tls_ofld_info *tls_ofld = &toep->tls; + struct tls_hdr *hdr; + struct tcpcb *tp; + struct socket *so; + struct sockbuf *sb; + int error, len, rx_credits; + + len = m->m_pkthdr.len; + + INP_WLOCK_ASSERT(inp); + + so = inp_inpcbtosocket(inp); + tp = intotcpcb(inp); + sb = &so->so_rcv; + SOCKBUF_LOCK(sb); + CURVNET_SET(toep->vnet); + + tp->rcv_nxt += len; + KASSERT(tp->rcv_wnd >= len, ("%s: negative window size", __func__)); + tp->rcv_wnd -= len; + + /* Do we have a full TLS header? */ + if (len < sizeof(*hdr)) { + CTR3(KTR_CXGBE, "%s: tid %u len %d: too short for a TLS header", + __func__, toep->tid, len); + so->so_error = EMSGSIZE; + goto out; + } + hdr = mtod(m, struct tls_hdr *); + + /* Is the header valid? */ + if (be16toh(hdr->version) != tls_ofld->k_ctx.proto_ver) { + CTR3(KTR_CXGBE, "%s: tid %u invalid version %04x", + __func__, toep->tid, be16toh(hdr->version)); + error = EINVAL; + goto report_error; + } + if (be16toh(hdr->length) < sizeof(*hdr)) { + CTR3(KTR_CXGBE, "%s: tid %u invalid length %u", + __func__, toep->tid, be16toh(hdr->length)); + error = EBADMSG; + goto report_error; + } + + /* Did we get a truncated record? */ + if (len < be16toh(hdr->length)) { + CTR4(KTR_CXGBE, "%s: tid %u truncated TLS record (%d vs %u)", + __func__, toep->tid, len, be16toh(hdr->length)); + + error = EMSGSIZE; + goto report_error; + } + + /* Is the header type unknown? */ + switch (hdr->type) { + case CONTENT_TYPE_CCS: + case CONTENT_TYPE_ALERT: + case CONTENT_TYPE_APP_DATA: + case CONTENT_TYPE_HANDSHAKE: + break; + default: + CTR3(KTR_CXGBE, "%s: tid %u invalid TLS record type %u", + __func__, toep->tid, hdr->type); + error = EBADMSG; + goto report_error; + } + + /* + * Just punt. Although this could fall back to software + * decryption, this case should never really happen. + */ + CTR4(KTR_CXGBE, "%s: tid %u dropping TLS record type %u, length %u", + __func__, toep->tid, hdr->type, be16toh(hdr->length)); + error = EBADMSG; + +report_error: +#ifdef KERN_TLS + if (toep->tls.mode == TLS_MODE_KTLS) + so->so_error = error; + else +#endif + { + /* + * Report errors by sending an empty TLS record + * with an error record type. + */ + hdr->type = CONTENT_TYPE_ERROR; + + /* Trim this CPL's mbuf to only include the TLS header. */ + KASSERT(m->m_len == len && m->m_next == NULL, + ("%s: CPL spans multiple mbufs", __func__)); + m->m_len = TLS_HEADER_LENGTH; + m->m_pkthdr.len = TLS_HEADER_LENGTH; + + sbappendstream_locked(sb, m, 0); + m = NULL; + } + +out: + /* + * This connection is going to die anyway, so probably don't + * need to bother with returning credits. + */ + rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; +#ifdef VERBOSE_TRACES + CTR4(KTR_CXGBE, "%s: tid %u rx_credits %u rcv_wnd %u", + __func__, toep->tid, rx_credits, tp->rcv_wnd); +#endif + if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) { + rx_credits = send_rx_credits(toep->vi->adapter, toep, + rx_credits); + tp->rcv_wnd += rx_credits; + tp->rcv_adv += rx_credits; + } + + sorwakeup_locked(so); + SOCKBUF_UNLOCK_ASSERT(sb); + + INP_WUNLOCK(inp); + CURVNET_RESTORE(); + + m_freem(m); } void Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.h Sat Dec 12 16:55:23 2020 (r368581) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.h Sat Dec 12 17:04:54 2020 (r368582) @@ -73,6 +73,7 @@ enum { TPF_SYNQE_EXPANDED = (1 << 9), /* toepcb ready, tid context updated */ TPF_FORCE_CREDITS = (1 << 10), /* always send credits */ TPF_INITIALIZED = (1 << 12), /* init_toepcb has been called */ + TPF_TLS_RECEIVE = (1 << 13), /* should receive TLS records */ }; enum { @@ -451,6 +452,7 @@ const struct offload_settings *lookup_offload_policy(s /* t4_tls.c */ bool can_tls_offload(struct adapter *); +void do_rx_data_tls(const struct cpl_rx_data *, struct toepcb *, struct mbuf *); int t4_ctloutput_tls(struct socket *, struct sockopt *); void t4_push_tls_records(struct adapter *, struct toepcb *, int); void t4_tls_mod_load(void); From owner-svn-src-stable@freebsd.org Sat Dec 12 17:07:33 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F35D14BA927; Sat, 12 Dec 2020 17:07:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtYxK6d8hz3QJL; Sat, 12 Dec 2020 17:07:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D663420C9B; Sat, 12 Dec 2020 17:07:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCH7XQS019884; Sat, 12 Dec 2020 17:07:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCH7XqM019883; Sat, 12 Dec 2020 17:07:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012121707.0BCH7XqM019883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 12 Dec 2020 17:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368583 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 368583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 17:07:34 -0000 Author: jhb Date: Sat Dec 12 17:07:33 2020 New Revision: 368583 URL: https://svnweb.freebsd.org/changeset/base/368583 Log: MFC 367578: Clear tp->tod in t4_pcb_detach(). Otherwise, a socket can have a non-NULL tp->tod while TF_TOE is clear. In particular, if a newly accepted socket falls back to non-TOE due to an active open failure, the non-TOE socket will still have tp->tod set even though TF_TOE is clear. Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Sat Dec 12 17:04:54 2020 (r368582) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Sat Dec 12 17:07:33 2020 (r368583) @@ -381,6 +381,7 @@ t4_pcb_detach(struct toedev *tod __unused, struct tcpc } #endif + tp->tod = NULL; tp->t_toe = NULL; tp->t_flags &= ~TF_TOE; toep->flags &= ~TPF_ATTACHED; From owner-svn-src-stable@freebsd.org Sat Dec 12 17:11:23 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55FFA4BA9B0; Sat, 12 Dec 2020 17:11:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtZ1l1zzFz3QSd; Sat, 12 Dec 2020 17:11:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36DAD20A29; Sat, 12 Dec 2020 17:11:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCHBMWr023908; Sat, 12 Dec 2020 17:11:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCHBMAU023907; Sat, 12 Dec 2020 17:11:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012121711.0BCHBMAU023907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 12 Dec 2020 17:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368584 - stable/12/sbin/sysctl X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sbin/sysctl X-SVN-Commit-Revision: 368584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 17:11:23 -0000 Author: jhb Date: Sat Dec 12 17:11:22 2020 New Revision: 368584 URL: https://svnweb.freebsd.org/changeset/base/368584 Log: MFC 367188: Use a dynamic buffer for the copy of a node's new value. This permits setting a node's value to a string longer than BUFSIZ. Modified: stable/12/sbin/sysctl/sysctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/sysctl/sysctl.c ============================================================================== --- stable/12/sbin/sysctl/sysctl.c Sat Dec 12 17:07:33 2020 (r368583) +++ stable/12/sbin/sysctl/sysctl.c Sat Dec 12 17:11:22 2020 (r368584) @@ -344,13 +344,13 @@ parse_numeric(const char *newvalstr, const char *fmt, static int parse(const char *string, int lineno) { - int len, i, j; + int len, i, j, save_errno; const void *newval; char *newvalstr = NULL; void *newbuf; size_t newsize = Bflag; int mib[CTL_MAXNAME]; - char *cp, *bufp, buf[BUFSIZ], fmt[BUFSIZ], line[BUFSIZ]; + char *cp, *bufp, *buf, fmt[BUFSIZ], line[BUFSIZ]; u_int kind; if (lineno) @@ -365,11 +365,7 @@ parse(const char *string, int lineno) * Whitespace surrounding the delimiter is trimmed. * Quotes around the value are stripped. */ - cp = buf; - if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ) { - warnx("oid too long: '%s'%s", string, line); - return (1); - } + cp = buf = strdup(string); bufp = strsep(&cp, "=:"); if (cp != NULL) { /* Tflag just lists tunables, do not allow assignment */ @@ -403,22 +399,24 @@ parse(const char *string, int lineno) */ len = name2oid(bufp, mib); if (len < 0) { - if (iflag) + if (iflag) { + free(buf); return (0); - if (qflag) - return (1); - else { + } + if (!qflag) { if (errno == ENOENT) { warnx("unknown oid '%s'%s", bufp, line); } else { warn("unknown oid '%s'%s", bufp, line); } - return (1); } + free(buf); + return (1); } if (oidfmt(mib, len, fmt, &kind)) { warn("couldn't find format of oid '%s'%s", bufp, line); + free(buf); if (iflag) return (1); else @@ -430,6 +428,7 @@ parse(const char *string, int lineno) * show the node and its children. Otherwise, set the new value. */ if (newvalstr == NULL || dflag) { + free(buf); if ((kind & CTLTYPE) == CTLTYPE_NODE) { if (dflag) { i = show_var(mib, len, false); @@ -450,6 +449,7 @@ parse(const char *string, int lineno) */ if ((kind & CTLTYPE) == CTLTYPE_NODE) { warnx("oid '%s' isn't a leaf node%s", bufp, line); + free(buf); return (1); } @@ -459,6 +459,7 @@ parse(const char *string, int lineno) warnx("Tunable values are set in /boot/loader.conf"); } else warnx("oid '%s' is read only%s", bufp, line); + free(buf); return (1); } @@ -477,6 +478,7 @@ parse(const char *string, int lineno) case CTLTYPE_U64: if (strlen(newvalstr) == 0) { warnx("empty numeric value"); + free(buf); return (1); } /* FALLTHROUGH */ @@ -485,6 +487,7 @@ parse(const char *string, int lineno) default: warnx("oid '%s' is type %d, cannot set that%s", bufp, kind & CTLTYPE, line); + free(buf); return (1); } @@ -503,6 +506,7 @@ parse(const char *string, int lineno) warnx("invalid %s '%s'%s", ctl_typename[kind & CTLTYPE], cp, line); free(newbuf); + free(buf); return (1); } } @@ -515,10 +519,12 @@ parse(const char *string, int lineno) */ i = show_var(mib, len, false); if (sysctl(mib, len, 0, 0, newval, newsize) == -1) { + save_errno = errno; free(newbuf); + free(buf); if (!i && !bflag) putchar('\n'); - switch (errno) { + switch (save_errno) { case EOPNOTSUPP: warnx("%s: value is not available%s", string, line); @@ -532,11 +538,12 @@ parse(const char *string, int lineno) string, line); return (1); default: - warn("%s%s", string, line); + warnc(save_errno, "%s%s", string, line); return (1); } } free(newbuf); + free(buf); if (!bflag) printf(" -> "); i = nflag; From owner-svn-src-stable@freebsd.org Sat Dec 12 20:40:42 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 960884C0838; Sat, 12 Dec 2020 20:40:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtfgG3f0Gz3vr9; Sat, 12 Dec 2020 20:40:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FEE0235AB; Sat, 12 Dec 2020 20:40:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCKegDd053410; Sat, 12 Dec 2020 20:40:42 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCKeg1m053409; Sat, 12 Dec 2020 20:40:42 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202012122040.0BCKeg1m053409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 12 Dec 2020 20:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368589 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 368589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 20:40:42 -0000 Author: 0mp (doc,ports committer) Date: Sat Dec 12 20:40:42 2020 New Revision: 368589 URL: https://svnweb.freebsd.org/changeset/base/368589 Log: MFC r367678: Document the PAGER environment variable Sometimes users want to use freebsd-update(8) in a non-interactive way and what they often miss is that they have to set PAGER to cat(1) in order to avoid interactive prompts from less(1). Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.8 Sat Dec 12 20:14:39 2020 (r368588) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.8 Sat Dec 12 20:40:42 2020 (r368589) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2019 +.Dd November 14, 2020 .Dt FREEBSD-UPDATE 8 .Os .Sh NAME @@ -193,6 +193,20 @@ System", since if the system has been tampered with it cannot be trusted to operate correctly. If you intend to use this command for intrusion-detection purposes, make sure you boot from a secure disk (e.g., a CD). +.El +.Sh ENVIRONMENT +.Bl -tag -width "PAGER" +.It Ev PAGER +The pager program used to present various reports during the execution. +.Po +Default: +.Dq Pa /usr/bin/less . +.Pc +.Pp +.Ev PAGER +can be set to +.Dq cat +when a non-interactive pager is desired. .El .Sh FILES .Bl -tag -width "/etc/freebsd-update.conf" From owner-svn-src-stable@freebsd.org Sat Dec 12 21:02:25 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 055D84C0D18; Sat, 12 Dec 2020 21:02:25 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ctg8J6p5vz4R4h; Sat, 12 Dec 2020 21:02:24 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC3A823877; Sat, 12 Dec 2020 21:02:24 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCL2ORp071800; Sat, 12 Dec 2020 21:02:24 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCL2OQn071799; Sat, 12 Dec 2020 21:02:24 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202012122102.0BCL2OQn071799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 12 Dec 2020 21:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368590 - stable/11/usr.sbin/freebsd-update X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.sbin/freebsd-update X-SVN-Commit-Revision: 368590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 21:02:25 -0000 Author: 0mp (doc,ports committer) Date: Sat Dec 12 21:02:24 2020 New Revision: 368590 URL: https://svnweb.freebsd.org/changeset/base/368590 Log: MFC r367678: Document the PAGER environment variable Sometimes users want to use freebsd-update(8) in a non-interactive way and what they often miss is that they have to set PAGER to cat(1) in order to avoid interactive prompts from less(1). Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/11/usr.sbin/freebsd-update/freebsd-update.8 Sat Dec 12 20:40:42 2020 (r368589) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.8 Sat Dec 12 21:02:24 2020 (r368590) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2019 +.Dd November 14, 2020 .Dt FREEBSD-UPDATE 8 .Os .Sh NAME @@ -193,6 +193,20 @@ System", since if the system has been tampered with it cannot be trusted to operate correctly. If you intend to use this command for intrusion-detection purposes, make sure you boot from a secure disk (e.g., a CD). +.El +.Sh ENVIRONMENT +.Bl -tag -width "PAGER" +.It Ev PAGER +The pager program used to present various reports during the execution. +.Po +Default: +.Dq Pa /usr/bin/less . +.Pc +.Pp +.Ev PAGER +can be set to +.Dq cat +when a non-interactive pager is desired. .El .Sh FILES .Bl -tag -width "/etc/freebsd-update.conf" From owner-svn-src-stable@freebsd.org Sat Dec 12 22:47:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F02A94C359E; Sat, 12 Dec 2020 22:47:59 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtjV76NGLz4WcW; Sat, 12 Dec 2020 22:47:59 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDAA724FA0; Sat, 12 Dec 2020 22:47:59 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCMlx61034802; Sat, 12 Dec 2020 22:47:59 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCMlvuP034790; Sat, 12 Dec 2020 22:47:57 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012122247.0BCMlvuP034790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Sat, 12 Dec 2020 22:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368594 - in stable/12: etc/mtree share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale tools/tools/locale/etc X-SVN-Group: stable-12 X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in stable/12: etc/mtree share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale tools/tools/locale/etc X-SVN-Commit-Revision: 368594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 22:48:00 -0000 Author: yuripv Date: Sat Dec 12 22:47:57 2020 New Revision: 368594 URL: https://svnweb.freebsd.org/changeset/base/368594 Log: MFC r340992: Add ga_IE.UTF-8 locale. PR: 228587 Submitted by: Micil (LC_TIME) Added: stable/12/share/monetdef/ga_IE.UTF-8.src - copied unchanged from r340992, head/share/monetdef/ga_IE.UTF-8.src stable/12/share/msgdef/ga_IE.UTF-8.src - copied unchanged from r340992, head/share/msgdef/ga_IE.UTF-8.src stable/12/share/timedef/ga_IE.UTF-8.src - copied unchanged from r340992, head/share/timedef/ga_IE.UTF-8.src Deleted: stable/12/share/monetdef/en_IE.UTF-8.src Modified: stable/12/etc/mtree/BSD.usr.dist stable/12/share/colldef/Makefile stable/12/share/ctypedef/Makefile stable/12/share/monetdef/Makefile stable/12/share/msgdef/Makefile stable/12/share/numericdef/Makefile stable/12/share/timedef/Makefile stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/etc/charmaps.xml Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.usr.dist ============================================================================== --- stable/12/etc/mtree/BSD.usr.dist Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/etc/mtree/BSD.usr.dist Sat Dec 12 22:47:57 2020 (r368594) @@ -665,6 +665,8 @@ .. fr_FR.UTF-8 .. + ga_IE.UTF-8 + .. he_IL.UTF-8 .. hi_IN.ISCII-DEV Modified: stable/12/share/colldef/Makefile ============================================================================== --- stable/12/share/colldef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/colldef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -184,6 +184,7 @@ SAME+= en_US.UTF-8 nl_NL.UTF-8 SAME+= en_US.UTF-8 nl_BE.UTF-8 SAME+= en_US.UTF-8 it_IT.UTF-8 SAME+= en_US.UTF-8 it_CH.UTF-8 +SAME+= en_US.UTF-8 ga_IE.UTF-8 SAME+= en_US.UTF-8 fr_FR.UTF-8 SAME+= en_US.UTF-8 fr_CH.UTF-8 SAME+= en_US.UTF-8 fr_BE.UTF-8 Modified: stable/12/share/ctypedef/Makefile ============================================================================== --- stable/12/share/ctypedef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/ctypedef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -82,6 +82,7 @@ SAME+= C.UTF-8 hu_HU.UTF-8 SAME+= C.UTF-8 hr_HR.UTF-8 SAME+= C.UTF-8 hi_IN.UTF-8 SAME+= C.UTF-8 he_IL.UTF-8 +SAME+= C.UTF-8 ga_IE.UTF-8 SAME+= C.UTF-8 fr_FR.UTF-8 SAME+= C.UTF-8 fr_CH.UTF-8 SAME+= C.UTF-8 fr_CA.UTF-8 Modified: stable/12/share/monetdef/Makefile ============================================================================== --- stable/12/share/monetdef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/monetdef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -31,7 +31,6 @@ LOCALES+= en_GB.US-ASCII LOCALES+= en_GB.UTF-8 LOCALES+= en_IE.ISO8859-1 LOCALES+= en_IE.ISO8859-15 -LOCALES+= en_IE.UTF-8 LOCALES+= en_NZ.UTF-8 LOCALES+= en_PH.UTF-8 LOCALES+= en_SG.UTF-8 @@ -47,6 +46,7 @@ LOCALES+= fr_CA.UTF-8 LOCALES+= fr_CH.ISO8859-15 LOCALES+= fr_CH.UTF-8 LOCALES+= fr_FR.UTF-8 +LOCALES+= ga_IE.UTF-8 LOCALES+= he_IL.UTF-8 LOCALES+= hi_IN.ISCII-DEV LOCALES+= hi_IN.UTF-8 @@ -156,6 +156,7 @@ SAME+= en_CA.UTF-8 en_CA.ISO8859-1 SAME+= en_GB.ISO8859-15 en_GB.ISO8859-1 SAME+= zh_HK.UTF-8 en_HK.UTF-8 SAME+= zh_HK.UTF-8 en_HK.ISO8859-1 +SAME+= ga_IE.UTF-8 en_IE.UTF-8 SAME+= en_NZ.UTF-8 en_NZ.US-ASCII SAME+= en_NZ.UTF-8 en_NZ.ISO8859-15 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-1 Copied: stable/12/share/monetdef/ga_IE.UTF-8.src (from r340992, head/share/monetdef/ga_IE.UTF-8.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/monetdef/ga_IE.UTF-8.src Sat Dec 12 22:47:57 2020 (r368594, copy of r340992, head/share/monetdef/ga_IE.UTF-8.src) @@ -0,0 +1,50 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# ----------------------------------------------------------------------------- +# +# int_curr_symbol (last character always SPACE) +EUR +# +# currency_symbol +€ +# +# mon_decimal_point +. +# +# mon_thousands_sep +, +# +# mon_grouping +3 +# +# positive_sign + +# +# negative_sign +- +# +# int_frac_digits +2 +# +# frac_digits +2 +# +# p_cs_precedes +1 +# +# p_sep_by_space +0 +# +# n_cs_precedes +1 +# +# n_sep_by_space +0 +# +# p_sign_posn +1 +# +# n_sign_posn +1 +# EOF Modified: stable/12/share/msgdef/Makefile ============================================================================== --- stable/12/share/msgdef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/msgdef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -28,6 +28,7 @@ LOCALES+= eu_ES.UTF-8 LOCALES+= fi_FI.ISO8859-15 LOCALES+= fi_FI.UTF-8 LOCALES+= fr_FR.UTF-8 +LOCALES+= ga_IE.UTF-8 LOCALES+= he_IL.UTF-8 LOCALES+= hi_IN.ISCII-DEV LOCALES+= hi_IN.UTF-8 Copied: stable/12/share/msgdef/ga_IE.UTF-8.src (from r340992, head/share/msgdef/ga_IE.UTF-8.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/msgdef/ga_IE.UTF-8.src Sat Dec 12 22:47:57 2020 (r368594, copy of r340992, head/share/msgdef/ga_IE.UTF-8.src) @@ -0,0 +1,17 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# ----------------------------------------------------------------------------- +# +# yesexpr +^(([tT]([áÁ])?)|([tT])|([yY]([eE][sS])?)|([yY])) +# +# noexpr +^(([nN]([íÍ][lL])?)|([nN])|([nN]([oO])?)|([nN])) +# +# yesstr +tá:t:TÁ:T:yes:y:YES:Y +# +# nostr +níl:n:NÍL:N:no:n:NO:N +# EOF Modified: stable/12/share/numericdef/Makefile ============================================================================== --- stable/12/share/numericdef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/numericdef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -105,6 +105,7 @@ SAME+= en_US.UTF-8 ja_JP.UTF-8 SAME+= en_US.UTF-8 ja_JP.SJIS SAME+= en_US.UTF-8 ja_JP.eucJP SAME+= en_US.UTF-8 he_IL.UTF-8 +SAME+= en_US.UTF-8 ga_IE.UTF-8 SAME+= en_US.UTF-8 es_MX.UTF-8 SAME+= en_US.UTF-8 es_MX.ISO8859-1 SAME+= en_US.UTF-8 en_US.US-ASCII Modified: stable/12/share/timedef/Makefile ============================================================================== --- stable/12/share/timedef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/timedef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -58,6 +58,7 @@ LOCALES+= fr_CH.ISO8859-15 LOCALES+= fr_CH.UTF-8 LOCALES+= fr_FR.ISO8859-15 LOCALES+= fr_FR.UTF-8 +LOCALES+= ga_IE.UTF-8 LOCALES+= he_IL.UTF-8 LOCALES+= hi_IN.ISCII-DEV LOCALES+= hi_IN.UTF-8 Copied: stable/12/share/timedef/ga_IE.UTF-8.src (from r340992, head/share/timedef/ga_IE.UTF-8.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/timedef/ga_IE.UTF-8.src Sat Dec 12 22:47:57 2020 (r368594, copy of r340992, head/share/timedef/ga_IE.UTF-8.src) @@ -0,0 +1,83 @@ +# +# Short month names +Ean +Fea +Már +Abr +Bea +Mei +Iul +Lún +Mnf +Drf +Sam +Nol +# +# Long month names (as in a date) +Mí Eanair +Mí na Feabhra +Mí an Mhárta +Mí Aibreáin +Mí na Bealtaine +Mí an Mheithimh +Mí Iúil +Mí na Lúnasa +Mí Meán Fhómhair +Mí Deireadh Fómhair +Mí na Samhna +Mí na Nollag +# +# Short weekday names +Dom +Lua +Már +Céa +Déa +Aoi +Sat +# +# Long weekday names +Dé Domhnaigh +Dé Luain +Dé Máirt +Dé Céadaoin +Déardaoin +Dé hAoine +Dé Sathairn +# +# X_fmt +%H:%M:%S +# +# x_fmt +%d/%m/%Y +# +# c_fmt +%a %e %b %X %Y +# +# AM/PM +r.n. +i.n. +# +# date_fmt +%a %e %b %Y %X %Z +# +# Long month names (without case ending) +Mí Eanair +Mí na Feabhra +Mí an Mhárta +Mí Aibreáin +Mí na Bealtaine +Mí an Mheithimh +Mí Iúil +Mí na Lúnasa +Mí Meán Fhómhair +Mí Deireadh Fómhair +Mí na Samhna +Mí na Nollag +# +# md_order +dm +# +# ampm_fmt +%I:%M:%S %p +# EOF Modified: stable/12/tools/tools/locale/Makefile ============================================================================== --- stable/12/tools/tools/locale/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/tools/tools/locale/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -111,7 +111,7 @@ BASE_LOCALES_OF_INTEREST?= \ cs_CZ da_DK de_AT de_CH de_DE el_GR en_AU en_CA \ en_GB en_HK en_IE en_NZ en_PH en_SG en_US en_ZA \ es_AR es_CR es_ES es_MX et_EE eu_ES fi_FI fr_BE \ - fr_CA fr_CH fr_FR he_IL hi_IN hr_HR hu_HU hy_AM \ + fr_CA fr_CH fr_FR ga_IE he_IL hi_IN hr_HR hu_HU hy_AM \ is_IS it_CH it_IT ja_JP ko_KR lt_LT lv_LV \ nb_NO nl_BE nl_NL nn_NO pl_PL pt_BR pt_PT ro_RO \ ru_RU se_FI se_NO sk_SK sl_SI sv_FI sv_SE tr_TR \ Modified: stable/12/tools/tools/locale/etc/charmaps.xml ============================================================================== --- stable/12/tools/tools/locale/etc/charmaps.xml Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/tools/tools/locale/etc/charmaps.xml Sat Dec 12 22:47:57 2020 (r368594) @@ -93,6 +93,8 @@ + Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 853134C3877; Sat, 12 Dec 2020 22:57:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ctjj63CXjz4XPV; Sat, 12 Dec 2020 22:57:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55F4125222; Sat, 12 Dec 2020 22:57:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCMvU8F041179; Sat, 12 Dec 2020 22:57:30 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCMvSLt041166; Sat, 12 Dec 2020 22:57:28 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202012122257.0BCMvSLt041166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 12 Dec 2020 22:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368596 - stable/12/tests/sys/fs/fusefs X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/tests/sys/fs/fusefs X-SVN-Commit-Revision: 368596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 22:57:30 -0000 Author: asomers Date: Sat Dec 12 22:57:28 2020 New Revision: 368596 URL: https://svnweb.freebsd.org/changeset/base/368596 Log: MFC r366365: fusefs tests: quell Coverity "Argument cannot be negative" warnings Must abort tests early if open(2) fails. Reported by: Coverity Coverity CID: 1432810 and many others Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D26635 Modified: stable/12/tests/sys/fs/fusefs/allow_other.cc stable/12/tests/sys/fs/fusefs/create.cc stable/12/tests/sys/fs/fusefs/default_permissions.cc stable/12/tests/sys/fs/fusefs/flush.cc stable/12/tests/sys/fs/fusefs/open.cc stable/12/tests/sys/fs/fusefs/opendir.cc stable/12/tests/sys/fs/fusefs/release.cc stable/12/tests/sys/fs/fusefs/releasedir.cc stable/12/tests/sys/fs/fusefs/write.cc Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/fs/fusefs/allow_other.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/allow_other.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/allow_other.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -168,7 +168,7 @@ TEST_F(AllowOther, privilege_escalation) .WillRepeatedly(Invoke(ReturnErrno(EPERM))); fd1 = open(FULLPATH, O_RDONLY); - EXPECT_LE(0, fd1) << strerror(errno); + ASSERT_LE(0, fd1) << strerror(errno); }, [] { int fd0; Modified: stable/12/tests/sys/fs/fusefs/create.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/create.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/create.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -143,7 +143,7 @@ TEST_F(Create, attr_cache) ).Times(0); fd = open(FULLPATH, O_CREAT | O_EXCL, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } @@ -184,7 +184,7 @@ TEST_F(Create, clear_attr_cache) EXPECT_EQ(0, stat("mountpoint", &sb)) << strerror(errno); fd = open(FULLPATH, O_CREAT | O_EXCL, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); EXPECT_EQ(0, stat("mountpoint", &sb)) << strerror(errno); leak(fd); @@ -254,7 +254,7 @@ TEST_F(Create, Enosys) }))); fd = open(FULLPATH, O_CREAT | O_EXCL, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } @@ -366,7 +366,7 @@ TEST_F(Create, ok) })); fd = open(FULLPATH, O_CREAT | O_EXCL, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } @@ -398,7 +398,7 @@ TEST_F(Create, wronly_0444) })); fd = open(FULLPATH, O_CREAT | O_WRONLY, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } @@ -422,7 +422,7 @@ TEST_F(Create_7_8, ok) })); fd = open(FULLPATH, O_CREAT | O_EXCL, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } @@ -446,6 +446,6 @@ TEST_F(Create_7_11, ok) })); fd = open(FULLPATH, O_CREAT | O_EXCL, mode); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } Modified: stable/12/tests/sys/fs/fusefs/default_permissions.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/default_permissions.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/default_permissions.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -490,7 +490,7 @@ TEST_F(Create, ok) expect_create(RELPATH, ino); fd = open(FULLPATH, O_CREAT | O_EXCL, 0644); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } @@ -765,7 +765,7 @@ TEST_F(Open, ok) expect_open(ino, 0, 1); fd = open(FULLPATH, O_RDONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } Modified: stable/12/tests/sys/fs/fusefs/flush.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/flush.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/flush.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -102,10 +102,10 @@ TEST_F(Flush, open_twice) expect_release(); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); fd2 = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd2) << strerror(errno); + ASSERT_LE(0, fd2) << strerror(errno); EXPECT_EQ(0, close(fd2)) << strerror(errno); EXPECT_EQ(0, close(fd)) << strerror(errno); @@ -132,7 +132,7 @@ TEST_F(Flush, eio) expect_release(); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_TRUE(0 == close(fd) || errno == EIO) << strerror(errno); } @@ -186,7 +186,7 @@ TEST_F(Flush, flush) expect_release(); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_TRUE(0 == close(fd)) << strerror(errno); } Modified: stable/12/tests/sys/fs/fusefs/open.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/open.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/open.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -67,7 +67,7 @@ void test_ok(int os_flags, int fuse_flags) { }))); fd = open(FULLPATH, os_flags); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } }; @@ -201,7 +201,7 @@ TEST_F(Open, multiple_creds) expect_release(ino, fh1); fd1 = open(FULLPATH, O_RDONLY); - EXPECT_LE(0, fd1) << strerror(errno); + ASSERT_LE(0, fd1) << strerror(errno); }, [] { int fd0; Modified: stable/12/tests/sys/fs/fusefs/opendir.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/opendir.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/opendir.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -132,7 +132,7 @@ TEST_F(Opendir, open) })); fd = open(FULLPATH, O_DIRECTORY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); leak(fd); } Modified: stable/12/tests/sys/fs/fusefs/release.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/release.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/release.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -87,7 +87,7 @@ TEST_F(Release, dup) expect_release(ino, getpid(), O_RDONLY, 0); fd = open(FULLPATH, O_RDONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); fd2 = dup(fd); ASSERT_LE(0, fd2) << strerror(errno); @@ -117,7 +117,7 @@ TEST_F(Release, eio) expect_release(ino, getpid(), O_WRONLY, EIO); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_TRUE(0 == close(fd) || errno == EIO) << strerror(errno); } @@ -139,7 +139,7 @@ TEST_F(Release, DISABLED_flags) expect_release(ino, getpid(), O_RDWR | O_APPEND, 0); fd = open(FULLPATH, O_RDWR | O_APPEND); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(0, close(fd)) << strerror(errno); } @@ -162,11 +162,11 @@ TEST_F(Release, multiple_opens) expect_release(ino, getpid(), O_RDONLY, 0); fd = open(FULLPATH, O_RDONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); expect_release(ino, getpid(), O_WRONLY, 0); fd2 = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd2) << strerror(errno); + ASSERT_LE(0, fd2) << strerror(errno); ASSERT_EQ(0, close(fd2)) << strerror(errno); ASSERT_EQ(0, close(fd)) << strerror(errno); @@ -185,7 +185,7 @@ TEST_F(Release, ok) expect_release(ino, getpid(), O_RDONLY, 0); fd = open(FULLPATH, O_RDONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(0, close(fd)) << strerror(errno); } Modified: stable/12/tests/sys/fs/fusefs/releasedir.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/releasedir.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/releasedir.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -112,7 +112,7 @@ TEST_F(ReleaseDir, o_exec) expect_releasedir(ino, ReturnErrno(0)); fd = open(FULLPATH, O_EXEC | O_DIRECTORY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(0, close(fd)) << strerror(errno); } Modified: stable/12/tests/sys/fs/fusefs/write.cc ============================================================================== --- stable/12/tests/sys/fs/fusefs/write.cc Sat Dec 12 22:51:30 2020 (r368595) +++ stable/12/tests/sys/fs/fusefs/write.cc Sat Dec 12 22:57:28 2020 (r368596) @@ -216,7 +216,7 @@ TEST_F(AioWrite, DISABLED_aio_write) expect_write(ino, offset, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); iocb.aio_nbytes = bufsize; iocb.aio_fildes = fd; @@ -258,7 +258,7 @@ TEST_F(Write, append) /* Must open O_RDWR or fuse(4) implicitly sets direct_io */ fd = open(FULLPATH, O_RDWR | O_APPEND); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); leak(fd); @@ -291,7 +291,7 @@ TEST_F(Write, append_to_cached) /* Must open O_RDWR or fuse(4) implicitly sets direct_io */ fd = open(FULLPATH, O_RDWR | O_APPEND); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); /* Read the old data into the cache */ ASSERT_EQ((ssize_t)oldsize, read(fd, oldbuf, oldsize)) @@ -319,7 +319,7 @@ TEST_F(Write, append_direct_io) expect_write(ino, initial_offset, BUFSIZE, BUFSIZE, CONTENTS); fd = open(FULLPATH, O_WRONLY | O_APPEND); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); leak(fd); @@ -343,7 +343,7 @@ TEST_F(Write, direct_io_evicts_cache) expect_write(ino, 0, bufsize, bufsize, CONTENTS1); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); // Prime cache ASSERT_EQ(bufsize, read(fd, readbuf, bufsize)) << strerror(errno); @@ -387,7 +387,7 @@ TEST_F(Write, indirect_io_short_write) expect_write(ino, bufsize0, bufsize1, bufsize1, contents1); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); leak(fd); @@ -412,7 +412,7 @@ TEST_F(Write, direct_io_short_write) expect_write(ino, 0, bufsize, halfbufsize, CONTENTS); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(halfbufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); leak(fd); @@ -442,7 +442,7 @@ TEST_F(Write, direct_io_short_write_iov) expect_write(ino, 0, totalsize, size0, EXPECTED0); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); iov[0].iov_base = __DECONST(void*, CONTENTS0); iov[0].iov_len = strlen(CONTENTS0); @@ -474,7 +474,7 @@ TEST_F(Write, rlimit_fsize) fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(-1, pwrite(fd, CONTENTS, bufsize, offset)); EXPECT_EQ(EFBIG, errno); @@ -508,7 +508,7 @@ TEST_F(Write, eof_during_rmw) maybe_expect_write(ino, offset, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, pwrite(fd, CONTENTS, bufsize, offset)) << strerror(errno); @@ -553,7 +553,7 @@ TEST_F(Write, mmap) expect_release(ino, ReturnErrno(0)); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ASSERT_NE(MAP_FAILED, p) << strerror(errno); @@ -584,7 +584,7 @@ TEST_F(Write, pwrite) expect_write(ino, offset, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, pwrite(fd, CONTENTS, bufsize, offset)) << strerror(errno); @@ -607,7 +607,7 @@ TEST_F(Write, timestamps) maybe_expect_write(ino, 0, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(0, fstat(fd, &sb0)) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); @@ -636,7 +636,7 @@ TEST_F(Write, write) expect_write(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); leak(fd); @@ -667,7 +667,7 @@ TEST_F(Write, write_large) &contents[halfbufsize / sizeof(int)]); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, contents, bufsize)) << strerror(errno); leak(fd); @@ -688,7 +688,7 @@ TEST_F(Write, write_nothing) expect_open(ino, 0, 1); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); leak(fd); @@ -708,7 +708,7 @@ TEST_F(Write_7_8, write) expect_write_7_8(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); leak(fd); @@ -854,7 +854,7 @@ TEST_F(WriteBack, rmw) maybe_expect_write(ino, offset, bufsize, CONTENTS); fd = open(FULLPATH, O_WRONLY); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, pwrite(fd, CONTENTS, bufsize, offset)) << strerror(errno); @@ -879,7 +879,7 @@ TEST_F(WriteBack, cache) expect_write(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); /* @@ -913,7 +913,7 @@ TEST_F(WriteBack, o_direct) expect_read(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR | O_DIRECT); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); /* A subsequent read must query the daemon because cache is empty */ @@ -940,7 +940,7 @@ TEST_F(WriteBack, direct_io) expect_read(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); /* A subsequent read must query the daemon because cache is empty */ @@ -980,7 +980,7 @@ TEST_F(WriteBack, mmap_direct_io) expect_release(ino, ReturnErrno(0)); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ASSERT_NE(MAP_FAILED, p) << strerror(errno); @@ -1016,7 +1016,7 @@ TEST_F(WriteBackAsync, delay) ).Times(0); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); @@ -1051,7 +1051,7 @@ TEST_F(WriteBackAsync, direct_io_ignores_unrelated_cac CONTENTS1); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); // Cache first block with dirty data. This will entail first reading // the existing data. @@ -1105,7 +1105,7 @@ TEST_F(WriteBackAsync, direct_io_partially_overlaps_ca expect_open(ino, 0, 1); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); /* Cache first and third blocks with dirty data. */ ASSERT_EQ(3 * bs, pwrite(fd, zeros, 3 * bs, 0)) << strerror(errno); @@ -1178,7 +1178,7 @@ TEST_F(WriteBackAsync, eof) expect_read(ino, 0, m_maxbcachebuf, old_filesize, CONTENTS0); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); /* Write and cache data beyond EOF */ ASSERT_EQ(wbufsize, pwrite(fd, CONTENTS1, wbufsize, offset)) @@ -1248,7 +1248,7 @@ TEST_F(WriteBackAsync, timestamps) }))); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); ASSERT_EQ(0, fstat(fd, &sb)) << strerror(errno); @@ -1287,7 +1287,7 @@ TEST_F(WriteBackAsync, timestamps_during_setattr) }))); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); ASSERT_EQ(0, fchmod(fd, newmode)) << strerror(errno); @@ -1324,7 +1324,7 @@ TEST_P(TimeGran, timestamps_during_setattr) }))); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); ASSERT_EQ(0, fchmod(fd, newmode)) << strerror(errno); @@ -1351,7 +1351,7 @@ TEST_F(Write, writethrough) expect_write(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); /* @@ -1379,7 +1379,7 @@ TEST_F(Write, update_file_size) expect_write(ino, 0, bufsize, bufsize, CONTENTS); fd = open(FULLPATH, O_RDWR); - EXPECT_LE(0, fd) << strerror(errno); + ASSERT_LE(0, fd) << strerror(errno); ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno); /* Get cached attributes */ From owner-svn-src-stable@freebsd.org Sat Dec 12 23:01:12 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59DDA4C3C15; Sat, 12 Dec 2020 23:01:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtjnN27tXz4Xr8; Sat, 12 Dec 2020 23:01:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C2D1250AE; Sat, 12 Dec 2020 23:01:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCN1Cbo043000; Sat, 12 Dec 2020 23:01:12 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCN1CR8042999; Sat, 12 Dec 2020 23:01:12 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202012122301.0BCN1CR8042999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 12 Dec 2020 23:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368597 - stable/12/sbin/ping6 X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/sbin/ping6 X-SVN-Commit-Revision: 368597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 23:01:12 -0000 Author: asomers Date: Sat Dec 12 23:01:11 2020 New Revision: 368597 URL: https://svnweb.freebsd.org/changeset/base/368597 Log: MFC r367976: ping6: update usage text after r365547 Modified: stable/12/sbin/ping6/ping6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ping6/ping6.c ============================================================================== --- stable/12/sbin/ping6/ping6.c Sat Dec 12 22:57:28 2020 (r368596) +++ stable/12/sbin/ping6/ping6.c Sat Dec 12 23:01:11 2020 (r368597) @@ -2838,7 +2838,7 @@ usage(void) "\n" " [-p pattern] [-S sourceaddr] [-s packetsize] " "[-x waittime]\n" - " [-X timeout] [hops ...] host\n"); + " [-X timeout] [-z tclass] [hops ...] host\n"); exit(1); } From owner-svn-src-stable@freebsd.org Sat Dec 12 23:59:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10FBD4C4DFF; Sat, 12 Dec 2020 23:59:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ctl4971r3z4bXY; Sat, 12 Dec 2020 23:59:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3E2B25FE5; Sat, 12 Dec 2020 23:59:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCNx50h079298; Sat, 12 Dec 2020 23:59:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCNx5FD079297; Sat, 12 Dec 2020 23:59:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202012122359.0BCNx5FD079297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 12 Dec 2020 23:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368599 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/clang/lib/Basic/Targets X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/clang/lib/Basic/Targets X-SVN-Commit-Revision: 368599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 23:59:06 -0000 Author: dim Date: Sat Dec 12 23:59:05 2020 New Revision: 368599 URL: https://svnweb.freebsd.org/changeset/base/368599 Log: MFC r368489: Merge commit 28de0fb48 from llvm git (by Luís Marques): [RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines The RISCV target did not set the GCC atomic compare and swap defines, unlike other targets. This broke builds for things like glib on RISCV. Patch by Kristof Provost (kprovost) Differential Revision: https://reviews.llvm.org/D91784 This should fix building glib20 on RISC-V and unblock a number of dependent ports. Requested by: kp Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp ============================================================================== --- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Sat Dec 12 23:41:47 2020 (r368598) +++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Sat Dec 12 23:59:05 2020 (r368599) @@ -114,8 +114,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio Builder.defineMacro("__riscv_muldiv"); } - if (HasA) + if (HasA) { Builder.defineMacro("__riscv_atomic"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); + if (Is64Bit) + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + } if (HasF || HasD) { Builder.defineMacro("__riscv_flen", HasD ? "64" : "32"); From owner-svn-src-stable@freebsd.org Sat Dec 12 23:59:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6040F4C4C43; Sat, 12 Dec 2020 23:59:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ctl4B2JdKz4bVV; Sat, 12 Dec 2020 23:59:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41FC425E3C; Sat, 12 Dec 2020 23:59:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCNx6FH079305; Sat, 12 Dec 2020 23:59:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCNx6xk079304; Sat, 12 Dec 2020 23:59:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202012122359.0BCNx6xk079304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 12 Dec 2020 23:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368599 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/clang/lib/Basic/Targets X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/clang/lib/Basic/Targets X-SVN-Commit-Revision: 368599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 23:59:06 -0000 Author: dim Date: Sat Dec 12 23:59:05 2020 New Revision: 368599 URL: https://svnweb.freebsd.org/changeset/base/368599 Log: MFC r368489: Merge commit 28de0fb48 from llvm git (by Luís Marques): [RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines The RISCV target did not set the GCC atomic compare and swap defines, unlike other targets. This broke builds for things like glib on RISCV. Patch by Kristof Provost (kprovost) Differential Revision: https://reviews.llvm.org/D91784 This should fix building glib20 on RISC-V and unblock a number of dependent ports. Requested by: kp Modified: stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp ============================================================================== --- stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Sat Dec 12 23:41:47 2020 (r368598) +++ stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Sat Dec 12 23:59:05 2020 (r368599) @@ -114,8 +114,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio Builder.defineMacro("__riscv_muldiv"); } - if (HasA) + if (HasA) { Builder.defineMacro("__riscv_atomic"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); + if (Is64Bit) + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + } if (HasF || HasD) { Builder.defineMacro("__riscv_flen", HasD ? "64" : "32");