From owner-svn-src-all@freebsd.org Sun Dec 6 04:59:25 2020 Return-Path: Delivered-To: svn-src-all@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 58FB146BF84; Sun, 6 Dec 2020 04:59:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CpZ3x1rdwz58QR; Sun, 6 Dec 2020 04:59:25 +0000 (UTC) (envelope-from mjg@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 2DF0C251A; Sun, 6 Dec 2020 04:59:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B64xOqe064251; Sun, 6 Dec 2020 04:59:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B64xO7Z064250; Sun, 6 Dec 2020 04:59:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012060459.0B64xO7Z064250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 6 Dec 2020 04:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368375 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368375 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 04:59:25 -0000 Author: mjg Date: Sun Dec 6 04:59:24 2020 New Revision: 368375 URL: https://svnweb.freebsd.org/changeset/base/368375 Log: vfs: factor buffer allocation/copyin out of namei Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sat Dec 5 22:04:30 2020 (r368374) +++ head/sys/kern/vfs_lookup.c Sun Dec 6 04:59:24 2020 (r368375) @@ -464,6 +464,43 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, return (0); } +static int +namei_getpath(struct nameidata *ndp) +{ + struct componentname *cnp; + int error; + + cnp = &ndp->ni_cnd; + + /* + * Get a buffer for the name to be translated, and copy the + * name into the buffer. + */ + cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); + if (ndp->ni_segflg == UIO_SYSSPACE) { + error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, + &ndp->ni_pathlen); + } else { + error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, + &ndp->ni_pathlen); + } + + if (__predict_false(error != 0)) { + return (error); + } + + /* + * Don't allow empty pathnames. + */ + if (__predict_false(*cnp->cn_pnbuf == '\0')) { + namei_cleanup_cnp(cnp); + return (ENOENT); + } + + cnp->cn_nameptr = cnp->cn_pnbuf; + return (0); +} + /* * Convert a pathname into a pointer to a locked vnode. * @@ -531,31 +568,11 @@ namei(struct nameidata *ndp) ndp->ni_lcf = 0; ndp->ni_vp = NULL; - /* - * Get a buffer for the name to be translated, and copy the - * name into the buffer. - */ - cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); - if (ndp->ni_segflg == UIO_SYSSPACE) - error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, - &ndp->ni_pathlen); - else - error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, - &ndp->ni_pathlen); - + error = namei_getpath(ndp); if (__predict_false(error != 0)) { - namei_cleanup_cnp(cnp); return (error); } - /* - * Don't allow empty pathnames. - */ - if (__predict_false(*cnp->cn_pnbuf == '\0')) { - namei_cleanup_cnp(cnp); - return (ENOENT); - } - #ifdef KTRACE if (KTRPOINT(td, KTR_NAMEI)) { KASSERT(cnp->cn_thread == curthread, @@ -563,8 +580,6 @@ namei(struct nameidata *ndp) ktrnamei(cnp->cn_pnbuf); } #endif - - cnp->cn_nameptr = cnp->cn_pnbuf; /* * First try looking up the target without locking any vnodes. From owner-svn-src-all@freebsd.org Sun Dec 6 07:09:36 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 07:22:39 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 07:38:59 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 07:47:11 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 07:50:18 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 07:55:12 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 07:57:56 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 08:01:28 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 10:58:56 2020 Return-Path: Delivered-To: svn-src-all@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 3D11A479246; Sun, 6 Dec 2020 10:58:56 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cpk2m176zz3kS9; Sun, 6 Dec 2020 10:58:56 +0000 (UTC) (envelope-from tijl@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 1548F68FD; Sun, 6 Dec 2020 10:58:56 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B6AwtOP088273; Sun, 6 Dec 2020 10:58:55 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6AwtdG088271; Sun, 6 Dec 2020 10:58:55 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <202012061058.0B6AwtdG088271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sun, 6 Dec 2020 10:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368384 - in head/sys: compat/linux conf X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: in head/sys: compat/linux conf X-SVN-Commit-Revision: 368384 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 10:58:56 -0000 Author: tijl Date: Sun Dec 6 10:58:55 2020 New Revision: 368384 URL: https://svnweb.freebsd.org/changeset/base/368384 Log: Move V4L feature declarations and DTrace provider definitions from linux_common.c to linux_util.c so they become available on i386. linux_common.c defines the linux_common kernel module but this module does not exist on i386 and linux_common.c is not included in the linux module. linux_util.c is included in the linux_common module on amd64 and the linux module on i386. Remove linux_common.c from files.i386 again. It was added recently in r367433 when the DTrace provider definitions were moved. The V4L feature declarations were moved to linux_common in r283423. Modified: head/sys/compat/linux/linux_common.c head/sys/compat/linux/linux_util.c head/sys/conf/files.i386 Modified: head/sys/compat/linux/linux_common.c ============================================================================== --- head/sys/compat/linux/linux_common.c Sun Dec 6 08:01:27 2020 (r368383) +++ head/sys/compat/linux/linux_common.c Sun Dec 6 10:58:55 2020 (r368384) @@ -36,33 +36,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include #include -FEATURE(linuxulator_v4l, "V4L ioctl wrapper support in the linuxulator"); -FEATURE(linuxulator_v4l2, "V4L2 ioctl wrapper support in the linuxulator"); - MODULE_VERSION(linux_common, 1); - -/** - * Special DTrace provider for the linuxulator. - * - * In this file we define the provider for the entire linuxulator. All - * modules (= files of the linuxulator) use it. - * - * We define a different name depending on the emulated bitsize, see - * ../..//linux{,32}/linux.h, e.g.: - * native bitsize = linuxulator - * amd64, 32bit emulation = linuxulator32 - */ -LIN_SDT_PROVIDER_DEFINE(linuxulator); -LIN_SDT_PROVIDER_DEFINE(linuxulator32); SET_DECLARE(linux_device_handler_set, struct linux_device_handler); Modified: head/sys/compat/linux/linux_util.c ============================================================================== --- head/sys/compat/linux/linux_util.c Sun Dec 6 08:01:27 2020 (r368383) +++ head/sys/compat/linux/linux_util.c Sun Dec 6 10:58:55 2020 (r368384) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -61,6 +62,23 @@ MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures MALLOC_DEFINE(M_EPOLL, "lepoll", "Linux events structures"); MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes"); MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futex waiting proc"); + +FEATURE(linuxulator_v4l, "V4L ioctl wrapper support in the linuxulator"); +FEATURE(linuxulator_v4l2, "V4L2 ioctl wrapper support in the linuxulator"); + +/** + * Special DTrace provider for the linuxulator. + * + * In this file we define the provider for the entire linuxulator. All + * modules (= files of the linuxulator) use it. + * + * We define a different name depending on the emulated bitsize, see + * ../..//linux{,32}/linux.h, e.g.: + * native bitsize = linuxulator + * amd64, 32bit emulation = linuxulator32 + */ +LIN_SDT_PROVIDER_DEFINE(linuxulator); +LIN_SDT_PROVIDER_DEFINE(linuxulator32); char linux_emul_path[MAXPATHLEN] = "/compat/linux"; Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sun Dec 6 08:01:27 2020 (r368383) +++ head/sys/conf/files.i386 Sun Dec 6 10:58:55 2020 (r368384) @@ -52,7 +52,6 @@ cddl/dev/dtrace/i386/dtrace_asm.S optional dtrace co cddl/dev/dtrace/i386/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -compat/linux/linux_common.c optional compat_linux compat/linux/linux_dummy.c optional compat_linux compat/linux/linux_event.c optional compat_linux compat/linux/linux_emul.c optional compat_linux From owner-svn-src-all@freebsd.org Sun Dec 6 11:38:47 2020 Return-Path: Delivered-To: svn-src-all@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 9636F47A592; Sun, 6 Dec 2020 11:38:47 +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 4Cpkwl3jjXz3mbb; Sun, 6 Dec 2020 11:38:47 +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 6E1ED6DF0; Sun, 6 Dec 2020 11:38:47 +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 0B6Bclvf013402; Sun, 6 Dec 2020 11:38:47 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6BckuF013398; Sun, 6 Dec 2020 11:38:46 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012061138.0B6BckuF013398@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: Sun, 6 Dec 2020 11:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368385 - in vendor/bc/dist: . gen X-SVN-Group: vendor X-SVN-Commit-Author: se X-SVN-Commit-Paths: in vendor/bc/dist: . gen X-SVN-Commit-Revision: 368385 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 11:38:47 -0000 Author: se Date: Sun Dec 6 11:38:46 2020 New Revision: 368385 URL: https://svnweb.freebsd.org/changeset/base/368385 Log: Import version 3.2.3 Modified: vendor/bc/dist/Makefile.in vendor/bc/dist/NEWS.md vendor/bc/dist/configure.sh vendor/bc/dist/gen/strgen.sh Modified: vendor/bc/dist/Makefile.in ============================================================================== --- vendor/bc/dist/Makefile.in Sun Dec 6 10:58:55 2020 (r368384) +++ vendor/bc/dist/Makefile.in Sun Dec 6 11:38:46 2020 (r368385) @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.2.0 +VERSION = 3.2.3 SRC = %%SRC%% OBJ = %%OBJ%% Modified: vendor/bc/dist/NEWS.md ============================================================================== --- vendor/bc/dist/NEWS.md Sun Dec 6 10:58:55 2020 (r368384) +++ vendor/bc/dist/NEWS.md Sun Dec 6 11:38:46 2020 (r368385) @@ -1,5 +1,24 @@ # 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. Modified: vendor/bc/dist/configure.sh ============================================================================== --- vendor/bc/dist/configure.sh Sun Dec 6 10:58:55 2020 (r368384) +++ vendor/bc/dist/configure.sh Sun Dec 6 11:38:46 2020 (r368385) @@ -295,7 +295,7 @@ gen_file_list() { while [ "$#" -ge 1 ]; do a="$1" shift - args="$args ! -wholename src/${a}" + args="$args ! -path src/${a}" done else Modified: vendor/bc/dist/gen/strgen.sh ============================================================================== --- vendor/bc/dist/gen/strgen.sh Sun Dec 6 10:58:55 2020 (r368384) +++ vendor/bc/dist/gen/strgen.sh Sun Dec 6 11:38:46 2020 (r368385) @@ -32,18 +32,17 @@ 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" From owner-svn-src-all@freebsd.org Sun Dec 6 11:43:31 2020 Return-Path: Delivered-To: svn-src-all@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 7491447A728; Sun, 6 Dec 2020 11:43:31 +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 4Cpl2C2mFrz3n7R; Sun, 6 Dec 2020 11:43:31 +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 471D075D7; Sun, 6 Dec 2020 11:43:31 +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 0B6BhVID019664; Sun, 6 Dec 2020 11:43:31 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6BhVXS019663; Sun, 6 Dec 2020 11:43:31 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012061143.0B6BhVXS019663@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: Sun, 6 Dec 2020 11:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368386 - vendor/bc/3.2.3 X-SVN-Group: vendor X-SVN-Commit-Author: se X-SVN-Commit-Paths: vendor/bc/3.2.3 X-SVN-Commit-Revision: 368386 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 11:43:31 -0000 Author: se Date: Sun Dec 6 11:43:30 2020 New Revision: 368386 URL: https://svnweb.freebsd.org/changeset/base/368386 Log: Tag version 3.2.3 Added: vendor/bc/3.2.3/ - copied from r368385, vendor/bc/dist/ From owner-svn-src-all@freebsd.org Sun Dec 6 11:49:23 2020 Return-Path: Delivered-To: svn-src-all@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 3F9D247A3F3; Sun, 6 Dec 2020 11:49:23 +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 4Cpl8z0pTTz3mvy; Sun, 6 Dec 2020 11:49:23 +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 0E5BF74D8; Sun, 6 Dec 2020 11:49:23 +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 0B6BnM2k019988; Sun, 6 Dec 2020 11:49:22 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6BnM9t019984; Sun, 6 Dec 2020 11:49:22 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012061149.0B6BnM9t019984@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: Sun, 6 Dec 2020 11:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368387 - in head/contrib/bc: . gen include manuals src tests tests/bc X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/contrib/bc: . gen include manuals src tests tests/bc X-SVN-Commit-Revision: 368387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 11:49:23 -0000 Author: se Date: Sun Dec 6 11:49:21 2020 New Revision: 368387 URL: https://svnweb.freebsd.org/changeset/base/368387 Log: Upgrade to version 3.2.3 Modified: head/contrib/bc/Makefile.in head/contrib/bc/NEWS.md head/contrib/bc/configure.sh head/contrib/bc/gen/strgen.sh Directory Properties: head/contrib/bc/ (props changed) head/contrib/bc/include/bcl.h (props changed) head/contrib/bc/include/library.h (props changed) head/contrib/bc/manuals/bcl.3 (props changed) head/contrib/bc/manuals/header.txt (props changed) head/contrib/bc/manuals/header_bc.txt (props changed) head/contrib/bc/manuals/header_bcl.txt (props changed) head/contrib/bc/manuals/header_dc.txt (props changed) head/contrib/bc/src/library.c (props changed) head/contrib/bc/tests/bc/stdin1.txt (props changed) head/contrib/bc/tests/bc/stdin1_results.txt (props changed) head/contrib/bc/tests/bc/stdin2.txt (props changed) head/contrib/bc/tests/bc/stdin2_results.txt (props changed) head/contrib/bc/tests/bcl.c (props changed) Modified: head/contrib/bc/Makefile.in ============================================================================== --- head/contrib/bc/Makefile.in Sun Dec 6 11:43:30 2020 (r368386) +++ head/contrib/bc/Makefile.in Sun Dec 6 11:49:21 2020 (r368387) @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.2.0 +VERSION = 3.2.3 SRC = %%SRC%% OBJ = %%OBJ%% Modified: head/contrib/bc/NEWS.md ============================================================================== --- head/contrib/bc/NEWS.md Sun Dec 6 11:43:30 2020 (r368386) +++ head/contrib/bc/NEWS.md Sun Dec 6 11:49:21 2020 (r368387) @@ -1,5 +1,24 @@ # 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. Modified: head/contrib/bc/configure.sh ============================================================================== --- head/contrib/bc/configure.sh Sun Dec 6 11:43:30 2020 (r368386) +++ head/contrib/bc/configure.sh Sun Dec 6 11:49:21 2020 (r368387) @@ -295,7 +295,7 @@ gen_file_list() { while [ "$#" -ge 1 ]; do a="$1" shift - args="$args ! -wholename src/${a}" + args="$args ! -path src/${a}" done else Modified: head/contrib/bc/gen/strgen.sh ============================================================================== --- head/contrib/bc/gen/strgen.sh Sun Dec 6 11:43:30 2020 (r368386) +++ head/contrib/bc/gen/strgen.sh Sun Dec 6 11:49:21 2020 (r368387) @@ -33,7 +33,7 @@ export LC_CTYPE=C progname=${0##*/} if [ $# -lt 3 ]; then - echo "usage: $progname input output name header [label [define [remove_tabs]]]" + echo "usage: $progname input output name [label [define [remove_tabs]]]" exit 1 fi From owner-svn-src-all@freebsd.org Sun Dec 6 15:58:51 2020 Return-Path: Delivered-To: svn-src-all@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 A4A234A18A3; Sun, 6 Dec 2020 15:58:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cprhq4FRBz4Tkp; Sun, 6 Dec 2020 15:58:51 +0000 (UTC) (envelope-from kevans@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 8059C12D8A; Sun, 6 Dec 2020 15:58:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B6FwpN6074861; Sun, 6 Dec 2020 15:58:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6FwpKd074860; Sun, 6 Dec 2020 15:58:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012061558.0B6FwpKd074860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 6 Dec 2020 15:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368388 - head/sbin/bectl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/bectl X-SVN-Commit-Revision: 368388 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 15:58:51 -0000 Author: kevans Date: Sun Dec 6 15:58:50 2020 New Revision: 368388 URL: https://svnweb.freebsd.org/changeset/base/368388 Log: bectl: simplify the tail end of the jail cmd This has already confused me once (and I'm pretty sure I wrote it), so let's clarify: unjailing after the command has completed will only happen if we're interactive and -U has not been specified. This just folds two conditionals together to make it obvious how -b/-U interact with each other. MFC after: 3 days Modified: head/sbin/bectl/bectl_jail.c Modified: head/sbin/bectl/bectl_jail.c ============================================================================== --- head/sbin/bectl/bectl_jail.c Sun Dec 6 11:49:21 2020 (r368387) +++ head/sbin/bectl/bectl_jail.c Sun Dec 6 15:58:50 2020 (r368388) @@ -356,10 +356,8 @@ bectl_cmd_jail(int argc, char *argv[]) } free(jargv); - if (!interactive) - return (0); - - if (unjail) { + /* Non-interactive (-b) mode means the jail sticks around. */ + if (interactive && unjail) { /* * We're not checking the jail id result here because in the * case of invalid param, or last command in jail was an error From owner-svn-src-all@freebsd.org Sun Dec 6 16:22:27 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 6 16:44:42 2020 Return-Path: Delivered-To: svn-src-all@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 F11334A23C2; Sun, 6 Dec 2020 16:44:42 +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 4Cpsjk3mBBz4Wvk; Sun, 6 Dec 2020 16:44:42 +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 6FD3B13611; Sun, 6 Dec 2020 16:44:42 +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 0B6Gig5J005947; Sun, 6 Dec 2020 16:44:42 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6GifBe005944; Sun, 6 Dec 2020 16:44:41 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012061644.0B6GifBe005944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Sun, 6 Dec 2020 16:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368390 - in head/tools/tools/locale: . etc/final-maps tools X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in head/tools/tools/locale: . etc/final-maps tools X-SVN-Commit-Revision: 368390 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 16:44:43 -0000 Author: yuripv Date: Sun Dec 6 16:44:41 2020 New Revision: 368390 URL: https://svnweb.freebsd.org/changeset/base/368390 Log: update wcwidth data from utf8proc Character width data being out of date is a constant source of weird rendering issues and wasted time trying to diagnose those, e.g. as reported by Jeremy Chadwick: https://gitlab.com/muttmua/mutt/-/issues/67 Sadly, there is no real ("standard") wcwidth data source, so this tries to rectify the problem using the utf8proc one (through its C API) which would hopefully benefeat both FreeBSD and utf8proc through bug reports (if any). Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D27259 Added: head/tools/tools/locale/tools/getwidths.c (contents, props changed) head/tools/tools/locale/tools/mkwidths.pl (contents, props changed) Modified: head/tools/tools/locale/Makefile head/tools/tools/locale/README head/tools/tools/locale/etc/final-maps/widths.txt (contents, props changed) Modified: head/tools/tools/locale/Makefile ============================================================================== --- head/tools/tools/locale/Makefile Sun Dec 6 16:22:26 2020 (r368389) +++ head/tools/tools/locale/Makefile Sun Dec 6 16:44:41 2020 (r368390) @@ -225,7 +225,7 @@ posix/${enc}.cm: .for area in ${BASE_LOCALES_OF_INTEREST} posixsrc: build-tools posix/${area}.UTF-8.src .ORDER: build-tools posix/${area}.UTF-8.src -posix/${area}.UTF-8.src: +posix/${area}.UTF-8.src: mkdir -p posix && \ ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ -d posix -m ${area} -c UTF-8 @@ -238,5 +238,21 @@ posix/${area}.${encoding}.src: ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ -d posix -m ${area} -c ${encoding} .endfor + +# generate widths.txt using the data from libut8proc +GETWIDTHS=${TOOLSDIR}/getwidths +MKWIDTHS=${TOOLSDIR}/mkwidths.pl +WIDTHS= ${ETCDIR}/final-maps/widths.txt + +U8CFLAGS!=pkgconf --cflags libutf8proc +U8LIBS!=pkgconf --libs libutf8proc +CFLAGS+=${U8CFLAGS} +LDFLAGS+=${U8LIBS} + +CLEANFILES+=${TOOLSDIR}/getwidths + +widths: ${WIDTHS} +${WIDTHS}: posixcm ${GETWIDTHS} + ${GETWIDTHS} | ${MKWIDTHS} ${.OBJDIR}/posix/UTF-8.cm ${.TARGET} .include Modified: head/tools/tools/locale/README ============================================================================== --- head/tools/tools/locale/README Sun Dec 6 16:22:26 2020 (r368389) +++ head/tools/tools/locale/README Sun Dec 6 16:44:41 2020 (r368390) @@ -55,4 +55,8 @@ Targets: make install Install the build results into $LOCALESRCDIR. + + make widths + Generate widths.txt. Requires pkgconf and utf8proc + packages to be installed. [EOF] Modified: head/tools/tools/locale/etc/final-maps/widths.txt ============================================================================== --- head/tools/tools/locale/etc/final-maps/widths.txt Sun Dec 6 16:22:26 2020 (r368389) +++ head/tools/tools/locale/etc/final-maps/widths.txt Sun Dec 6 16:44:41 2020 (r368390) @@ -1,26 +1,73 @@ -# -# Width Table. Credit for the input into this table, which is derived from -# the Unicode standards, is due to Markus Kuhn's implementation of wcwidth -# which can be found at http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c -# -# Some key differences: The numbers here are translated to the values found -# in the UTF-8 character map, and where symbolic names are missing for -# values from that table, we have omitted the values here. This means that -# characters which lack a symbolic name but are not 1 screen column wide -# are going to be mis-handled. This emphasizes the importance of having -# symbolic names for all characters that are to be handled properly. -# -# Also, to support use with different encodings, we avoid the use of ranges -# as some encodings may not have the same contiguous ranges as stock Unicode. -# -# This table must be processed *after* the charmap, as the symbolic names -# need to be defined there. -# -# Everything after this comment was generated automatically using the -# the mkwidths.py python script. To make corrections, fix the widths-0.txt -# or widths-2.txt files, and re-run mkwidths.py. But preserve this header. -# +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# utf8proc 2.5.0. +# ----------------------------------------------------------------------------- WIDTH + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 @@ -137,6 +184,7 @@ WIDTH 0 0 0 + 0 0 0 0 @@ -194,12 +242,20 @@ WIDTH 0 0 0 + 0 + 0 0 0 0 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 @@ -220,6 +276,7 @@ WIDTH 0 0 0 + 0 0 0 0 @@ -229,7 +286,6 @@ WIDTH 0 0 0 - 0 0 0 0 @@ -291,9 +347,86 @@ WIDTH 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 + 0 + 0 + 0 0 + 0 + 0 + 0 0 0 0 @@ -302,25 +435,49 @@ WIDTH 0 0 0 + 0 + 0 + 0 + 0 0 + 0 + 0 0 0 0 0 + 0 + 0 + 0 0 0 0 + 0 + 0 0 + 0 + 0 + 0 0 0 0 0 + 0 + 0 + 0 + 0 0 + 0 0 0 + 0 0 0 + 0 0 + 0 + 0 + 0 0 0 0 @@ -328,11 +485,17 @@ WIDTH 0 0 0 + 0 0 0 + 0 0 0 + 0 0 + 0 + 0 + 0 0 0 0 @@ -340,23 +503,64 @@ WIDTH 0 0 0 + 0 + 0 + 0 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 0 + 0 0 + 0 0 0 0 + 0 + 0 + 0 + 0 + 0 0 0 + 0 + 0 + 0 0 + 0 + 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 + 0 + 0 + 0 + 0 0 0 0 @@ -366,22 +570,73 @@ WIDTH 0 0 0 + 0 + 0 + 0 + 0 + 0 0 + 0 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 + 0 + 0 0 0 + 0 + 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 + 0 0 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 @@ -405,6 +660,7 @@ WIDTH 0 0 0 + 0 0 0 0 @@ -418,6 +674,8 @@ WIDTH 0 0 0 + 0 + 0 0 0 0 @@ -432,6 +690,7 @@ WIDTH 0 0 0 + 0 0 0 0 @@ -439,6 +698,9 @@ WIDTH 0 0 0 + 0 + 0 + 0 0 0 0 @@ -484,176 +746,162 @@ WIDTH 0 0 0 + 0 + 0 0 0 0 0 + 0 0 + 0 + 0 + 0 0 0 + 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 0 0 0 0 @@ -667,6 +915,7 @@ WIDTH 0 0 0 + 0 0 0 0 @@ -674,7 +923,17 @@ WIDTH 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 0 0 0 @@ -690,30 +949,116 @@ WIDTH 0 0 0 + 0 + 0 + 0 0 0 0 0 + 0 + 0 + 0 + 0 0 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 0 + 0 0 + 0 0 0 0 0 0 + 0 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 0 0 0 @@ -723,6 +1068,85 @@ WIDTH 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Dec 6 17:03:35 2020 Return-Path: Delivered-To: svn-src-all@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 7796B4A2D0C for ; Sun, 6 Dec 2020 17:03:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cpt7W2qsqz4XkN for ; Sun, 6 Dec 2020 17:03:35 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f54.google.com with SMTP id x22so9486615wmc.5 for ; Sun, 06 Dec 2020 09:03:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=G3bSvctU8Erd2N8kOBTy3z9A1tXG1SqQrMa8B27FJTI=; b=OrYpc5E96S8XyJENSsupj0IkWbSDY1Q+fCdo8YvkmltgL/YmLeULBVx9a4boj/Z7/7 BACtXB5ApT2kkTRoB+gTiFNOSsQ4FlasuoJperNUTnmKi9pM7aFQo8uQTGStzztLvMDu 95/ZnQWRGz71JuBd1+gbQeI+u7i2o5VTM8eWNqB5eWkrY8S8S1Z5MwcK7iVl3RE4eqe/ g03zC3/c6vDkOHnY8g/WQ5BtznoXfjNifxAyVLQkTu15KcaUMsSCQ2YQLDnqT8J1RpGX 4wk9TPqxIKAb9M2T8FZwM59d15J+70ciJl5LLL5HK7+o+RYFAgnlYzaHGb5pRO3Colxv d18Q== X-Gm-Message-State: AOAM533FJXdxIPNfnXIpzTJTLkqe6BrqRsT+lchXmK2yuhRI62PrSQ0/ 6/eyeJAUPeixsgfRRKlh5NFa/g== X-Google-Smtp-Source: ABdhPJwvWs00S7z0RJVEYOV0Oe1vuRHNRmS4us44Pjq40FqGsrRKjCUAu02NmGwsapKA5UGEOsmHNA== X-Received: by 2002:a05:600c:2042:: with SMTP id p2mr14735572wmg.152.1607274213552; Sun, 06 Dec 2020 09:03:33 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id n17sm2517104wmc.33.2020.12.06.09.03.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Dec 2020 09:03:32 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r368375 - head/sys/kern From: Jessica Clarke In-Reply-To: <202012060459.0B64xO7Z064250@repo.freebsd.org> Date: Sun, 6 Dec 2020 17:03:31 +0000 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202012060459.0B64xO7Z064250@repo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Cpt7W2qsqz4XkN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 17:03:35 -0000 Hi Mateusz, This looks like a behavioural change to me. Was that intended and a bug fix (in which case, it should have been documented in the commit message) or not? See below for the exact change. On 6 Dec 2020, at 04:59, Mateusz Guzik wrote: > +static int > +namei_getpath(struct nameidata *ndp) > +{ > + struct componentname *cnp; > + int error; > + > + cnp = &ndp->ni_cnd; > + > + /* > + * Get a buffer for the name to be translated, and copy the > + * name into the buffer. > + */ > + cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); > + if (ndp->ni_segflg == UIO_SYSSPACE) { > + error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, > + &ndp->ni_pathlen); > + } else { > + error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, > + &ndp->ni_pathlen); > + } > + > + if (__predict_false(error != 0)) { > + return (error); This does not call namei_cleanup_cnp. > @@ -531,31 +568,11 @@ namei(struct nameidata *ndp) > ndp->ni_lcf = 0; > ndp->ni_vp = NULL; > > - /* > - * Get a buffer for the name to be translated, and copy the > - * name into the buffer. > - */ > - cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); > - if (ndp->ni_segflg == UIO_SYSSPACE) > - error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, > - &ndp->ni_pathlen); > - else > - error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, > - &ndp->ni_pathlen); > - > + error = namei_getpath(ndp); > if (__predict_false(error != 0)) { > - namei_cleanup_cnp(cnp); But it used to be called in that case here. > return (error); > } Jess From owner-svn-src-all@freebsd.org Sun Dec 6 17:44:29 2020 Return-Path: Delivered-To: svn-src-all@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 355A74A448E; Sun, 6 Dec 2020 17:44:29 +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 4Cpv2j1132z4bWF; Sun, 6 Dec 2020 17:44:29 +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 156FE13A6E; Sun, 6 Dec 2020 17:44:29 +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 0B6HiSsJ043975; Sun, 6 Dec 2020 17:44:28 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6HiSJP043974; Sun, 6 Dec 2020 17:44:28 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202012061744.0B6HiSJP043974@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 17:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368391 - head/sys/modules/em X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/modules/em X-SVN-Commit-Revision: 368391 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 17:44:29 -0000 Author: eugen Date: Sun Dec 6 17:44:28 2020 New Revision: 368391 URL: https://svnweb.freebsd.org/changeset/base/368391 Log: if_em.ko: fix module build outside of kernel build environment MFC after: 3 days Modified: head/sys/modules/em/Makefile Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Sun Dec 6 16:44:41 2020 (r368390) +++ head/sys/modules/em/Makefile Sun Dec 6 17:44:28 2020 (r368391) @@ -4,7 +4,7 @@ .PATH: ${SRCTOP}/sys/dev/e1000 KMOD = if_em SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_inet.h \ - opt_inet6.h ifdi_if.h + opt_inet6.h opt_rss.h ifdi_if.h SRCS += $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c em_txrx.c e1000_osdep.c From owner-svn-src-all@freebsd.org Sun Dec 6 17:45:42 2020 Return-Path: Delivered-To: svn-src-all@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 CCF4E4A451D; Sun, 6 Dec 2020 17:45:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cpv465RJ3z4bX0; Sun, 6 Dec 2020 17:45:42 +0000 (UTC) (envelope-from kevans@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 ADC6913CDF; Sun, 6 Dec 2020 17:45:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B6HjgAL044087; Sun, 6 Dec 2020 17:45:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6HjgZO044086; Sun, 6 Dec 2020 17:45:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012061745.0B6HjgZO044086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 6 Dec 2020 17:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368392 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 368392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 17:45:42 -0000 Author: kevans Date: Sun Dec 6 17:45:42 2020 New Revision: 368392 URL: https://svnweb.freebsd.org/changeset/base/368392 Log: bsdgrep: don't link against libregex for bootstrap r368355 removed the GNU_GREP_COMPAT knob (off by default) and forgot that bsdgrep may be built/used for bootstrap on some systems. All base uses should strive to use only POSIX-compliant expressions anyways and we haven't had libregex by default here up to this point, so just don't do that if we're bootstrapping. Note that the resulting binary has the wrong `grep -V` information as it falsely claims to be GNU compatible, but it is only for bootstrap. Reported by: GitHub cross-builds via yuripv Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Sun Dec 6 17:44:28 2020 (r368391) +++ head/usr.bin/grep/Makefile Sun Dec 6 17:45:42 2020 (r368392) @@ -60,7 +60,9 @@ MLINKS+= grep.1 egrep.1 \ grep.1 rgrep.1 .endif +.if !defined(BOOTSTRAPPING) LIBADD+= regex +.endif HAS_TESTS= SUBDIR.${MK_TESTS}+= tests From owner-svn-src-all@freebsd.org Sun Dec 6 18:09:15 2020 Return-Path: Delivered-To: svn-src-all@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 0B5714A4E94; Sun, 6 Dec 2020 18:09:15 +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 4CpvbG6t3Rz4cwF; Sun, 6 Dec 2020 18:09:14 +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 DF4EE14063; Sun, 6 Dec 2020 18:09:14 +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 0B6I9Eo2057273; Sun, 6 Dec 2020 18:09:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6I9Ep8057271; Sun, 6 Dec 2020 18:09:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012061809.0B6I9Ep8057271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 6 Dec 2020 18:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368393 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 368393 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 18:09:15 -0000 Author: kib Date: Sun Dec 6 18:09:14 2020 New Revision: 368393 URL: https://svnweb.freebsd.org/changeset/base/368393 Log: ufs: handle two more cases of possible VNON vnode returned from VFS_VGET(). Reported by: kevans Reviewed by: mckusick, mjg Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27457 Modified: head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Sun Dec 6 17:45:42 2020 (r368392) +++ head/sys/ufs/ufs/ufs_lookup.c Sun Dec 6 18:09:14 2020 (r368393) @@ -745,6 +745,11 @@ found: *vpp = vdp; } else { error = VFS_VGET(pdp->v_mount, ino, cnp->cn_lkflags, &tdp); + if (error == 0 && VTOI(tdp)->i_mode == 0) { + vgone(tdp); + vput(tdp); + error = ENOENT; + } if (error) return (error); *vpp = tdp; Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Sun Dec 6 17:45:42 2020 (r368392) +++ head/sys/ufs/ufs/ufs_vfsops.c Sun Dec 6 18:09:14 2020 (r368393) @@ -240,6 +240,8 @@ ufs_fhtovp(mp, ufhp, flags, vpp) ip = VTOI(nvp); if (ip->i_mode == 0 || ip->i_gen != ufhp->ufid_gen || ip->i_effnlink <= 0) { + if (ip->i_mode == 0) + vgone(nvp); vput(nvp); *vpp = NULLVP; return (ESTALE); From owner-svn-src-all@freebsd.org Sun Dec 6 18:43:12 2020 Return-Path: Delivered-To: svn-src-all@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 8D6154A5A3C; Sun, 6 Dec 2020 18:43:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CpwLS3d1Wz4fq5; Sun, 6 Dec 2020 18:43:12 +0000 (UTC) (envelope-from tuexen@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 6F66114E8D; Sun, 6 Dec 2020 18:43:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B6IhCD5081790; Sun, 6 Dec 2020 18:43:12 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6IhCxD081789; Sun, 6 Dec 2020 18:43:12 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202012061843.0B6IhCxD081789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 6 Dec 2020 18:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368394 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 368394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 18:43:12 -0000 Author: tuexen Date: Sun Dec 6 18:43:12 2020 New Revision: 368394 URL: https://svnweb.freebsd.org/changeset/base/368394 Log: When dropping packets (RRQ or WRQ) for debugging, report the send operation as successful. Reporting a failure stops the transfer instead of using timeouts. MFC after: 1 week Modified: head/libexec/tftpd/tftp-io.c Modified: head/libexec/tftpd/tftp-io.c ============================================================================== --- head/libexec/tftpd/tftp-io.c Sun Dec 6 18:09:14 2020 (r368393) +++ head/libexec/tftpd/tftp-io.c Sun Dec 6 18:43:12 2020 (r368394) @@ -190,7 +190,7 @@ send_wrq(int peer, char *filename, char *mode) filename, mode ); - DROPPACKETn("send_wrq", 1); + DROPPACKETn("send_wrq", 0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)WRQ); @@ -238,7 +238,7 @@ send_rrq(int peer, char *filename, char *mode) filename, mode ); - DROPPACKETn("send_rrq", 1); + DROPPACKETn("send_rrq", 0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)RRQ); From owner-svn-src-all@freebsd.org Sun Dec 6 19:24:38 2020 Return-Path: Delivered-To: svn-src-all@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 9D84D4A8C08; Sun, 6 Dec 2020 19:24:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CpxGG45gwz4k53; Sun, 6 Dec 2020 19:24:38 +0000 (UTC) (envelope-from mjg@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 7F95E15741; Sun, 6 Dec 2020 19:24:38 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B6JOcNJ006924; Sun, 6 Dec 2020 19:24:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6JOcfg006923; Sun, 6 Dec 2020 19:24:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012061924.0B6JOcfg006923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 6 Dec 2020 19:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368395 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 19:24:38 -0000 Author: mjg Date: Sun Dec 6 19:24:38 2020 New Revision: 368395 URL: https://svnweb.freebsd.org/changeset/base/368395 Log: vfs: add cleanup on error missed in r368375 Noted by: jrtc27 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Dec 6 18:43:12 2020 (r368394) +++ head/sys/kern/vfs_lookup.c Sun Dec 6 19:24:38 2020 (r368395) @@ -486,6 +486,7 @@ namei_getpath(struct nameidata *ndp) } if (__predict_false(error != 0)) { + namei_cleanup_cnp(cnp); return (error); } From owner-svn-src-all@freebsd.org Sun Dec 6 19:25:05 2020 Return-Path: Delivered-To: svn-src-all@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 098624A8ADA; Sun, 6 Dec 2020 19:25:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 4CpxGm6kdHz4k5f; Sun, 6 Dec 2020 19:25:04 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x432.google.com with SMTP id r3so10666812wrt.2; Sun, 06 Dec 2020 11:25:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=g7qk1LiKBDI+3Suw79ikXz4KD3lt4vNJTR91UJX87FM=; b=RkR/VBvW5UCpITVM722rnezFvaRndnp4mmZlCJx30W+iOd5uo4bsTTjcA5D5NaLsXs KSElRHvDgvR7s2y9q+exfkOahjDAyP2lmw3KkOIlYqC9V3QZKMdYsAAdIj3cXycTHj66 q8EwGTkoHxddGZr7lvly6+KIFcpY5n/4sZ8/ThAEAPYKJPk07VqZamecFXwGCJ8FJ4kC 2yhw8UNV/TIbb/NWIWe6qemRqtvdkCcWdHyhbUF0v5bQsQOonflZCku3osfkkxKN6BXW c0cFotwX9OHGehTT6oixUdMb9iYQiWwHMdOg8oltHYKeudxGoObdTABXyBBI1FgXVt2+ gGFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g7qk1LiKBDI+3Suw79ikXz4KD3lt4vNJTR91UJX87FM=; b=KDXfUuNdy6fjcO9aRlcFZYsIlNacP/GP4bQfZSf5zxmXUZIT0CaiGSm3XOyJI2XOs/ 4izaKgJE6Y1fZSueL4Z8h+g8p34EnighKp2ztiXKrXOHufMVzaSDBUlNt7CoSWObx2ka tl8yQQ7DSzrHTciDX9VpEqXGRaKwgxdU2EC/EX4BOpzrTKXdiZ3XP14hB0wZsndMPT34 OO0Kyt72UdI8OKpYJb2aI9CXWlXFgpl87qfGMSKgHgUVwti0W1C2wu7zEvC31hMuVyzj bZXbkPZO2MQb2x9ZEbWPFMRBac8CTUyCao3oznOpspCPUAk2ka1ZWoSKXhXHN2kxjLZ7 OPkA== X-Gm-Message-State: AOAM530p0nksQPqpRo776lX39VAglxFpcMBKN0AUnUmO+wHPeHNgCVu8 6YQUFepThoYjcw8YEqBB+3wJVZGhTLOazvCKKotoO4YKQo8= X-Google-Smtp-Source: ABdhPJx9N7SeEUweNfiQz679eeZaGYn6EmfcxkAabMPMr+x1ohwo0borVPni55fsRk76Go3zXt98aaTZDKCPeYsW044= X-Received: by 2002:a5d:4d02:: with SMTP id z2mr16508621wrt.109.1607282703101; Sun, 06 Dec 2020 11:25:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a5d:4d47:0:0:0:0:0 with HTTP; Sun, 6 Dec 2020 11:25:02 -0800 (PST) In-Reply-To: References: <202012060459.0B64xO7Z064250@repo.freebsd.org> From: Mateusz Guzik Date: Sun, 6 Dec 2020 20:25:02 +0100 Message-ID: Subject: Re: svn commit: r368375 - head/sys/kern To: Jessica Clarke Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CpxGm6kdHz4k5f X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 19:25:05 -0000 Thanks for the report. Fixed in r368395. On 12/6/20, Jessica Clarke wrote: > Hi Mateusz, > This looks like a behavioural change to me. Was that intended and a bug > fix (in which case, it should have been documented in the commit > message) or not? See below for the exact change. > > On 6 Dec 2020, at 04:59, Mateusz Guzik wrote: >> +static int >> +namei_getpath(struct nameidata *ndp) >> +{ >> + struct componentname *cnp; >> + int error; >> + >> + cnp = &ndp->ni_cnd; >> + >> + /* >> + * Get a buffer for the name to be translated, and copy the >> + * name into the buffer. >> + */ >> + cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); >> + if (ndp->ni_segflg == UIO_SYSSPACE) { >> + error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> + &ndp->ni_pathlen); >> + } else { >> + error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> + &ndp->ni_pathlen); >> + } >> + >> + if (__predict_false(error != 0)) { >> + return (error); > > This does not call namei_cleanup_cnp. > >> @@ -531,31 +568,11 @@ namei(struct nameidata *ndp) >> ndp->ni_lcf = 0; >> ndp->ni_vp = NULL; >> >> - /* >> - * Get a buffer for the name to be translated, and copy the >> - * name into the buffer. >> - */ >> - cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); >> - if (ndp->ni_segflg == UIO_SYSSPACE) >> - error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> - &ndp->ni_pathlen); >> - else >> - error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, >> - &ndp->ni_pathlen); >> - >> + error = namei_getpath(ndp); >> if (__predict_false(error != 0)) { >> - namei_cleanup_cnp(cnp); > > But it used to be called in that case here. > >> return (error); >> } > > Jess > > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sun Dec 6 20:50:22 2020 Return-Path: Delivered-To: svn-src-all@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 B3A724AA5A2; Sun, 6 Dec 2020 20:50:22 +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 4Cpz9B4WnDz4p2m; Sun, 6 Dec 2020 20:50:22 +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 89444162D0; Sun, 6 Dec 2020 20:50:22 +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 0B6KoMDn057355; Sun, 6 Dec 2020 20:50:22 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6KoMcE057354; Sun, 6 Dec 2020 20:50:22 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202012062050.0B6KoMcE057354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 6 Dec 2020 20:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368396 - in head/sys: fs/ext2fs ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head/sys: fs/ext2fs ufs/ufs X-SVN-Commit-Revision: 368396 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 20:50:22 -0000 Author: mckusick Date: Sun Dec 6 20:50:21 2020 New Revision: 368396 URL: https://svnweb.freebsd.org/changeset/base/368396 Log: Document the BA_CLRBUF flag used in ufs and ext2fs filesystems. Suggested by: kib MFC after: 3 days Sponsored by: Netflix Modified: head/sys/fs/ext2fs/ext2_extern.h head/sys/ufs/ufs/ufs_extern.h Modified: head/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extern.h Sun Dec 6 19:24:38 2020 (r368395) +++ head/sys/fs/ext2fs/ext2_extern.h Sun Dec 6 20:50:21 2020 (r368396) @@ -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 UFS_BALLOC() functions. */ #define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */ #define BA_SEQMASK 0x7F000000 /* Bits holding seq heuristic. */ Modified: head/sys/ufs/ufs/ufs_extern.h ============================================================================== --- head/sys/ufs/ufs/ufs_extern.h Sun Dec 6 19:24:38 2020 (r368395) +++ head/sys/ufs/ufs/ufs_extern.h Sun Dec 6 20:50:21 2020 (r368396) @@ -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-all@freebsd.org Sun Dec 6 21:34:05 2020 Return-Path: Delivered-To: svn-src-all@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 9F8514AC935; Sun, 6 Dec 2020 21:34:05 +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 4Cq07d49G8z4tHq; Sun, 6 Dec 2020 21:34:05 +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 819B31708D; Sun, 6 Dec 2020 21:34:05 +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 0B6LY5Dc087989; Sun, 6 Dec 2020 21:34:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6LY5r8087987; Sun, 6 Dec 2020 21:34:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012062134.0B6LY5r8087987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 6 Dec 2020 21:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368397 - in head: share/man/man4 sys/dev/mn X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/mn X-SVN-Commit-Revision: 368397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 21:34:05 -0000 Author: emaste Date: Sun Dec 6 21:34:04 2020 New Revision: 368397 URL: https://svnweb.freebsd.org/changeset/base/368397 Log: 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. Approved by: phk MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/mn.4 head/sys/dev/mn/if_mn.c Modified: head/share/man/man4/mn.4 ============================================================================== --- head/share/man/man4/mn.4 Sun Dec 6 20:50:21 2020 (r368396) +++ head/share/man/man4/mn.4 Sun Dec 6 21:34:04 2020 (r368397) @@ -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: head/sys/dev/mn/if_mn.c ============================================================================== --- head/sys/dev/mn/if_mn.c Sun Dec 6 20:50:21 2020 (r368396) +++ head/sys/dev/mn/if_mn.c Sun Dec 6 21:34:04 2020 (r368397) @@ -1392,6 +1392,7 @@ mn_attach (device_t self) default: printf(" Rev 0x%x\n", sc->f54r->vstr); } + gone_in_dev(dev, 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-all@freebsd.org Sun Dec 6 22:45:22 2020 Return-Path: Delivered-To: svn-src-all@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 C29DD4AF61D; Sun, 6 Dec 2020 22:45:22 +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 4Cq1jt59bSz3FlN; Sun, 6 Dec 2020 22:45:22 +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 A454B17F8D; Sun, 6 Dec 2020 22:45:22 +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 0B6MjM8U032509; Sun, 6 Dec 2020 22:45:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6MjM65032508; Sun, 6 Dec 2020 22:45:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012062245.0B6MjM65032508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 6 Dec 2020 22:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368398 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 368398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 22:45:22 -0000 Author: markj Date: Sun Dec 6 22:45:22 2020 New Revision: 368398 URL: https://svnweb.freebsd.org/changeset/base/368398 Log: uma: Use atomic load for uz_sleepers This field is updated locklessly. Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Dec 6 21:34:04 2020 (r368397) +++ head/sys/vm/uma_core.c Sun Dec 6 22:45:22 2020 (r368398) @@ -4186,7 +4186,7 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata * a little longer for the limits to be reset. */ if (__predict_false(uz_flags & UMA_ZFLAG_LIMIT)) { - if (zone->uz_sleepers > 0) + if (atomic_load_32(&zone->uz_sleepers) > 0) goto zfree_item; } From owner-svn-src-all@freebsd.org Sun Dec 6 22:45:40 2020 Return-Path: Delivered-To: svn-src-all@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 79BED4AF46E; Sun, 6 Dec 2020 22:45:40 +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 4Cq1kD2bKdz3G4n; Sun, 6 Dec 2020 22:45:40 +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 4B78D17B4D; Sun, 6 Dec 2020 22:45:40 +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 0B6MjegW032565; Sun, 6 Dec 2020 22:45:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6MjdUJ032563; Sun, 6 Dec 2020 22:45:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012062245.0B6MjdUJ032563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 6 Dec 2020 22:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368399 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 368399 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 22:45:40 -0000 Author: markj Date: Sun Dec 6 22:45:39 2020 New Revision: 368399 URL: https://svnweb.freebsd.org/changeset/base/368399 Log: uma: Enforce the use of uz_bucket_size_max in the free path uz_bucket_size_max is the maximum permitted bucket size. When filling a new bucket to satisfy uma_zalloc(), the bucket is populated with at most uz_bucket_size_max items. The maximum number of entries in the bucket may be larger. When freeing items, however, we will fill per-CPPU buckets up to their maximum number of entries, potentially exceeding uz_bucket_size_max. This makes it difficult to precisely limit the number of items that may be cached in a zone. For example, if one wants to limit buckets to 1 entry for a particular zone, that's not possible since the smallest bucket holds up to 2 entries. Try to solve the problem by using uz_bucket_size_max to limit the number of entries in a bucket. Note that the ub_entries field is initialized upon every bucket allocation. Most zones are not affected since they do not impose any specific limit on the maximum bucket size. While here, remove the UMA_ZONE_MINBUCKET flag. It was unused and we now have uma_zone_set_maxcache() to control the zone's cache size more precisely. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27167 Modified: head/sys/vm/uma.h head/sys/vm/uma_core.c Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Sun Dec 6 22:45:22 2020 (r368398) +++ head/sys/vm/uma.h Sun Dec 6 22:45:39 2020 (r368399) @@ -250,7 +250,6 @@ uma_zone_t uma_zcache_create(const char *name, int siz #define UMA_ZONE_SECONDARY 0x0200 /* Zone is a Secondary Zone */ #define UMA_ZONE_NOBUCKET 0x0400 /* Do not use buckets. */ #define UMA_ZONE_MAXBUCKET 0x0800 /* Use largest buckets. */ -#define UMA_ZONE_MINBUCKET 0x1000 /* Use smallest buckets. */ #define UMA_ZONE_CACHESPREAD 0x2000 /* * Spread memory start locations across * all possible cache lines. May Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Dec 6 22:45:22 2020 (r368398) +++ head/sys/vm/uma_core.c Sun Dec 6 22:45:39 2020 (r368399) @@ -248,7 +248,6 @@ struct uma_bucket_zone { (((sizeof(void *) * (n)) - sizeof(struct uma_bucket)) / sizeof(void *)) #define BUCKET_MAX BUCKET_SIZE(256) -#define BUCKET_MIN 2 struct uma_bucket_zone bucket_zones[] = { /* Literal bucket sizes. */ @@ -507,7 +506,7 @@ bucket_alloc(uma_zone_t zone, void *udata, int flags) } if (((uintptr_t)udata & UMA_ZONE_VM) != 0) flags |= M_NOVM; - ubz = bucket_zone_lookup(zone->uz_bucket_size); + ubz = bucket_zone_lookup(atomic_load_16(&zone->uz_bucket_size)); if (ubz->ubz_zone == zone && (ubz + 1)->ubz_entries != 0) ubz++; bucket = uma_zalloc_arg(ubz->ubz_zone, udata, flags); @@ -516,7 +515,8 @@ bucket_alloc(uma_zone_t zone, void *udata, int flags) bzero(bucket->ub_bucket, sizeof(void *) * ubz->ubz_entries); #endif bucket->ub_cnt = 0; - bucket->ub_entries = ubz->ubz_entries; + bucket->ub_entries = min(ubz->ubz_entries, + zone->uz_bucket_size_max); bucket->ub_seq = SMR_SEQ_INVALID; CTR3(KTR_UMA, "bucket_alloc: zone %s(%p) allocated bucket %p", zone->uz_name, zone, bucket); @@ -2724,8 +2724,6 @@ out: zone->uz_bucket_size_max = zone->uz_bucket_size = 0; if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0) zone->uz_bucket_size = BUCKET_MAX; - else if ((arg->flags & UMA_ZONE_MINBUCKET) != 0) - zone->uz_bucket_size_max = zone->uz_bucket_size = BUCKET_MIN; else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0) zone->uz_bucket_size = 0; else From owner-svn-src-all@freebsd.org Sun Dec 6 22:45:51 2020 Return-Path: Delivered-To: svn-src-all@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 ADF6E4AF5D9; Sun, 6 Dec 2020 22:45:51 +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 4Cq1kR4Pkzz3G0v; Sun, 6 Dec 2020 22:45:51 +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 886A817E9A; Sun, 6 Dec 2020 22:45:51 +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 0B6Mjp4r032619; Sun, 6 Dec 2020 22:45:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B6MjpvX032617; Sun, 6 Dec 2020 22:45:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012062245.0B6MjpvX032617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 6 Dec 2020 22:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368400 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 368400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 22:45:51 -0000 Author: markj Date: Sun Dec 6 22:45:50 2020 New Revision: 368400 URL: https://svnweb.freebsd.org/changeset/base/368400 Log: uma: Make uma_zone_set_maxcache() work better with small limits The old implementation chose the largest bucket zone such that if the per-CPU caches are fully populated, the total number of items cached is no larger than the specified limit. If no such zone existed, UMA would not do any caching. We can now use uz_bucket_size_max to set a precise limit on the number of items in a zone's bucket, so the total size of per-CPU caches can be bounded more easily. Implement a new policy in uma_zone_set_maxcache(): choose a bucket size such that up to half of the limit can be cached in per-CPU caches, with the rest going to the full bucket cache. This fixes a problem with the kstack_cache zone: the limit of 4 * mp_ncpus items meant that the zone would not do any caching, defeating the whole purpose of the zone. That's because the smallest bucket size holds up to 2 items and we may cache up to 3 full buckets per CPU, and 2 * 3 * mp_ncpus > 4 * mp_ncpus. Reported by: mjg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27168 Modified: head/sys/vm/uma.h head/sys/vm/uma_core.c Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Sun Dec 6 22:45:39 2020 (r368399) +++ head/sys/vm/uma.h Sun Dec 6 22:45:50 2020 (r368400) @@ -492,7 +492,7 @@ void uma_zone_reserve(uma_zone_t zone, int nitems); int uma_zone_reserve_kva(uma_zone_t zone, int nitems); /* - * Sets a high limit on the number of items allowed in a zone + * Sets an upper limit on the number of items allocated from a zone * * Arguments: * zone The zone to limit @@ -504,7 +504,7 @@ int uma_zone_reserve_kva(uma_zone_t zone, int nitems); int uma_zone_set_max(uma_zone_t zone, int nitems); /* - * Sets a high limit on the number of items allowed in zone's bucket cache + * Sets an upper limit on the number of items allowed in zone's caches * * Arguments: * zone The zone to limit Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Dec 6 22:45:39 2020 (r368399) +++ head/sys/vm/uma_core.c Sun Dec 6 22:45:50 2020 (r368400) @@ -438,27 +438,6 @@ bucket_zone_lookup(int entries) return (ubz); } -static struct uma_bucket_zone * -bucket_zone_max(uma_zone_t zone, int nitems) -{ - struct uma_bucket_zone *ubz; - int bpcpu; - - bpcpu = 2; - if ((zone->uz_flags & UMA_ZONE_FIRSTTOUCH) != 0) - /* Count the cross-domain bucket. */ - bpcpu++; - - for (ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) - if (ubz->ubz_entries * bpcpu * mp_ncpus > nitems) - break; - if (ubz == &bucket_zones[0]) - ubz = NULL; - else - ubz--; - return (ubz); -} - static int bucket_select(int size) { @@ -2478,10 +2457,10 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused) SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, "items", CTLFLAG_RD | CTLTYPE_U64 | CTLFLAG_MPSAFE, zone, 0, sysctl_handle_uma_zone_items, "QU", - "current number of allocated items if limit is set"); + "Current number of allocated items if limit is set"); SYSCTL_ADD_U64(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, "max_items", CTLFLAG_RD, &zone->uz_max_items, 0, - "Maximum number of cached items"); + "Maximum number of allocated and cached items"); SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, "sleepers", CTLFLAG_RD, &zone->uz_sleepers, 0, "Number of threads sleeping at limit"); @@ -4570,20 +4549,19 @@ zone_free_item(uma_zone_t zone, void *item, void *udat int uma_zone_set_max(uma_zone_t zone, int nitems) { - struct uma_bucket_zone *ubz; - int count; /* + * If the limit is small, we may need to constrain the maximum per-CPU + * cache size, or disable caching entirely. + */ + uma_zone_set_maxcache(zone, nitems); + + /* * XXX This can misbehave if the zone has any allocations with * no limit and a limit is imposed. There is currently no * way to clear a limit. */ ZONE_LOCK(zone); - ubz = bucket_zone_max(zone, nitems); - count = ubz != NULL ? ubz->ubz_entries : 0; - zone->uz_bucket_size_max = zone->uz_bucket_size = count; - if (zone->uz_bucket_size_min > zone->uz_bucket_size_max) - zone->uz_bucket_size_min = zone->uz_bucket_size_max; zone->uz_max_items = nitems; zone->uz_flags |= UMA_ZFLAG_LIMIT; zone_update_caches(zone); @@ -4598,24 +4576,35 @@ uma_zone_set_max(uma_zone_t zone, int nitems) void uma_zone_set_maxcache(uma_zone_t zone, int nitems) { - struct uma_bucket_zone *ubz; - int bpcpu; + int bpcpu, bpdom, bsize, nb; ZONE_LOCK(zone); - ubz = bucket_zone_max(zone, nitems); - if (ubz != NULL) { - bpcpu = 2; - if ((zone->uz_flags & UMA_ZONE_FIRSTTOUCH) != 0) - /* Count the cross-domain bucket. */ - bpcpu++; - nitems -= ubz->ubz_entries * bpcpu * mp_ncpus; - zone->uz_bucket_size_max = ubz->ubz_entries; - } else { - zone->uz_bucket_size_max = zone->uz_bucket_size = 0; + + /* + * Compute a lower bound on the number of items that may be cached in + * the zone. Each CPU gets at least two buckets, and for cross-domain + * frees we use an additional bucket per CPU and per domain. Select the + * largest bucket size that does not exceed half of the requested limit, + * with the left over space given to the full bucket cache. + */ + bpdom = 0; + bpcpu = 2; +#ifdef NUMA + if ((zone->uz_flags & UMA_ZONE_FIRSTTOUCH) != 0 && vm_ndomains > 1) { + bpcpu++; + bpdom++; } +#endif + nb = bpcpu * mp_ncpus + bpdom * vm_ndomains; + bsize = nitems / nb / 2; + if (bsize > BUCKET_MAX) + bsize = BUCKET_MAX; + else if (bsize == 0 && nitems / nb > 0) + bsize = 1; + zone->uz_bucket_size_max = zone->uz_bucket_size = bsize; if (zone->uz_bucket_size_min > zone->uz_bucket_size_max) zone->uz_bucket_size_min = zone->uz_bucket_size_max; - zone->uz_bucket_max = nitems / vm_ndomains; + zone->uz_bucket_max = nitems - nb * bsize; ZONE_UNLOCK(zone); } From owner-svn-src-all@freebsd.org Mon Dec 7 01:02:21 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Dec 7 01:05:40 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Dec 7 01:09:46 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Dec 7 04:45:29 2020 Return-Path: Delivered-To: svn-src-all@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 F00FC476BE5; Mon, 7 Dec 2020 04:45:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cq9jP6T4Bz3qth; Mon, 7 Dec 2020 04:45:29 +0000 (UTC) (envelope-from hrs@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 CC9D41C682; Mon, 7 Dec 2020 04:45:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B74jTA9057890; Mon, 7 Dec 2020 04:45:29 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B74jTB1057889; Mon, 7 Dec 2020 04:45:29 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202012070445.0B74jTB1057889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 7 Dec 2020 04:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368404 - head/tools/tools/locale X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/tools/tools/locale X-SVN-Commit-Revision: 368404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 04:45:30 -0000 Author: hrs Date: Mon Dec 7 04:45:29 2020 New Revision: 368404 URL: https://svnweb.freebsd.org/changeset/base/368404 Log: Fix the source directory when installing the results. The install target did not install them actually. Spotted by: Thomas Munro, bapt, yuripv Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile ============================================================================== --- head/tools/tools/locale/Makefile Mon Dec 7 01:09:45 2020 (r368403) +++ head/tools/tools/locale/Makefile Mon Dec 7 04:45:29 2020 (r368404) @@ -95,6 +95,7 @@ install: install-${t} install-${t}: cd ${LOCALESRCDIR}/${t} && \ rm -f Makefile *.src && \ + cd ${.OBJDIR} && \ install -c ${t}/* ${LOCALESRCDIR}/${t} . endif .endfor From owner-svn-src-all@freebsd.org Mon Dec 7 04:51:51 2020 Return-Path: Delivered-To: svn-src-all@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 06378476F73; Mon, 7 Dec 2020 04:51:51 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mouf.net", Issuer "mouf.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cq9rk6dPzz3rWt; Mon, 7 Dec 2020 04:51:50 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from lrrr.mouf.net (2603-6080-7702-bf01-8495-f196-3b7c-6650.res6.spectrum.com [IPv6:2603:6080:7702:bf01:8495:f196:3b7c:6650]) (authenticated bits=0) by mouf.net (8.14.9/8.14.9) with ESMTP id 0B74pgfP001544 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 7 Dec 2020 04:51:48 GMT (envelope-from swills@FreeBSD.org) Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202011250010.0AP0AtH3061986@repo.freebsd.org> From: Steve Wills Message-ID: <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> Date: Sun, 6 Dec 2020 23:51:37 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202011250010.0AP0AtH3061986@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]); Mon, 07 Dec 2020 04:51:48 +0000 (UTC) X-Spam-Status: No, score=0.3 required=4.5 tests=KHOP_HELO_FCRDNS, NICE_REPLY_A autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mouf.net X-Virus-Scanned: clamav-milter 0.99.2 at mouf.net X-Virus-Status: Clean X-Rspamd-Queue-Id: 4Cq9rk6dPzz3rWt X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:36236, ipnet:2607:fc50::/36, country:US]; local_wl_from(0.00)[FreeBSD.org] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 04:51:51 -0000 Hi, On 11/24/20 7:10 PM, John Baldwin wrote: > Author: jhb > Date: Wed Nov 25 00:10:54 2020 > New Revision: 368005 > URL: https://svnweb.freebsd.org/changeset/base/368005 > > Log: > Remove the cloned file descriptors for /dev/crypto. > Would this change warrant a bump of __FreeBSD_version? I only noticed because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). Cheers, Steve From owner-svn-src-all@freebsd.org Mon Dec 7 09:21:07 2020 Return-Path: Delivered-To: svn-src-all@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 6E02747CBC4; Mon, 7 Dec 2020 09:21:07 +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 4CqHqR2lkfz4Yks; Mon, 7 Dec 2020 09:21:07 +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 515C81F7D8; Mon, 7 Dec 2020 09:21:07 +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 0B79L7xa038789; Mon, 7 Dec 2020 09:21:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B79L748038788; Mon, 7 Dec 2020 09:21:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012070921.0B79L748038788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Dec 2020 09:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368405 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 368405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 09:21:07 -0000 Author: hselasky Date: Mon Dec 7 09:21:06 2020 New Revision: 368405 URL: https://svnweb.freebsd.org/changeset/base/368405 Log: Allow sys/refcount.h to be used by standalone builds. No functional change. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Mon Dec 7 04:45:29 2020 (r368404) +++ head/sys/sys/refcount.h Mon Dec 7 09:21:06 2020 (r368405) @@ -32,7 +32,7 @@ #include -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_STANDALONE) #include #else #include From owner-svn-src-all@freebsd.org Mon Dec 7 09:48:07 2020 Return-Path: Delivered-To: svn-src-all@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 A262247D16A; Mon, 7 Dec 2020 09:48:07 +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 4CqJQb4CzKz4b1s; Mon, 7 Dec 2020 09:48:07 +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 840721FC5C; Mon, 7 Dec 2020 09:48:07 +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 0B79m7a6056117; Mon, 7 Dec 2020 09:48:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B79m7Hx056116; Mon, 7 Dec 2020 09:48:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012070948.0B79m7Hx056116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Dec 2020 09:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368406 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 368406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 09:48:07 -0000 Author: hselasky Date: Mon Dec 7 09:48:06 2020 New Revision: 368406 URL: https://svnweb.freebsd.org/changeset/base/368406 Log: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Dec 7 09:21:06 2020 (r368405) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Dec 7 09:48:06 2020 (r368406) @@ -360,7 +360,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); - nbitsinlong = min(nbits_reg, BITS_PER_LONG); + nbitsinlong = MIN(nbits_reg, BITS_PER_LONG); mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Mon Dec 7 09:21:06 2020 (r368405) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Mon Dec 7 09:48:06 2020 (r368406) @@ -343,7 +343,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } seg_size = ((j - cur) << PAGE_SHIFT) - off; - sg_set_page(s, pages[cur], min(size, seg_size), off); + sg_set_page(s, pages[cur], MIN(size, seg_size), off); size -= seg_size; off = 0; cur = j; From owner-svn-src-all@freebsd.org Mon Dec 7 10:21:01 2020 Return-Path: Delivered-To: svn-src-all@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 BDDAB47DDC8; Mon, 7 Dec 2020 10:21:01 +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 4CqK8Y4p4zz4cRt; Mon, 7 Dec 2020 10:21:01 +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 9794E201FF; Mon, 7 Dec 2020 10:21:01 +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 0B7AL1Y4076623; Mon, 7 Dec 2020 10:21:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7AL1VO076622; Mon, 7 Dec 2020 10:21:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012071021.0B7AL1VO076622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Dec 2020 10:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368407 - head/stand/kshim X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/stand/kshim X-SVN-Commit-Revision: 368407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 10:21:01 -0000 Author: hselasky Date: Mon Dec 7 10:21:01 2020 New Revision: 368407 URL: https://svnweb.freebsd.org/changeset/base/368407 Log: Tidy up code a bit. Add missing section comments. No functional change. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/stand/kshim/bsd_kernel.c Modified: head/stand/kshim/bsd_kernel.c ============================================================================== --- head/stand/kshim/bsd_kernel.c Mon Dec 7 09:48:06 2020 (r368406) +++ head/stand/kshim/bsd_kernel.c Mon Dec 7 10:21:01 2020 (r368407) @@ -30,23 +30,14 @@ struct usb_process usb_process[USB_PROC_MAX]; static device_t usb_pci_root; -/*------------------------------------------------------------------------* - * Implementation of mutex API - *------------------------------------------------------------------------*/ - -struct mtx Giant; int (*bus_alloc_resource_any_cb)(struct resource *res, device_t dev, int type, int *rid, unsigned int flags); int (*ofw_bus_status_ok_cb)(device_t dev); int (*ofw_bus_is_compatible_cb)(device_t dev, char *name); -static void -mtx_system_init(void *arg) -{ - mtx_init(&Giant, "Giant", NULL, MTX_DEF | MTX_RECURSE); -} -SYSINIT(mtx_system_init, SI_SUB_LOCK, SI_ORDER_MIDDLE, mtx_system_init, NULL); - +/*------------------------------------------------------------------------* + * Implementation of busdma API + *------------------------------------------------------------------------*/ int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, bus_size_t boundary, bus_addr_t lowaddr, @@ -115,6 +106,10 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (0); } +/*------------------------------------------------------------------------* + * Implementation of resource management API + *------------------------------------------------------------------------*/ + struct resource * bus_alloc_resource_any(device_t dev, int type, int *rid, unsigned int flags) { @@ -254,6 +249,19 @@ ofw_bus_is_compatible(device_t dev, char *name) return ((*ofw_bus_is_compatible_cb)(dev, name)); } + +/*------------------------------------------------------------------------* + * Implementation of mutex API + *------------------------------------------------------------------------*/ + +struct mtx Giant; + +static void +mtx_system_init(void *arg) +{ + mtx_init(&Giant, "Giant", NULL, MTX_DEF | MTX_RECURSE); +} +SYSINIT(mtx_system_init, SI_SUB_LOCK, SI_ORDER_MIDDLE, mtx_system_init, NULL); void mtx_init(struct mtx *mtx, const char *name, const char *type, int opt) From owner-svn-src-all@freebsd.org Mon Dec 7 10:44:14 2020 Return-Path: Delivered-To: svn-src-all@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 7AECF47E388; Mon, 7 Dec 2020 10:44:14 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqKgL2Mp4z4dc4; Mon, 7 Dec 2020 10:44:13 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 27A9D2601C5; Mon, 7 Dec 2020 11:44:12 +0100 (CET) Subject: Re: svn commit: r368397 - in head: share/man/man4 sys/dev/mn To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012062134.0B6LY5r8087987@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <47c53f43-c4a7-4389-0a47-77a3625c4e23@selasky.org> Date: Mon, 7 Dec 2020 11:44:04 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202012062134.0B6LY5r8087987@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CqKgL2Mp4z4dc4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 10:44:14 -0000 On 12/6/20 10:34 PM, Ed Maste wrote: > + gone_in_dev(dev, 13, "sync serial (T1/E1) driver"); > Should be "self" instead of "dev" . --HPS From owner-svn-src-all@freebsd.org Mon Dec 7 10:51:20 2020 Return-Path: Delivered-To: svn-src-all@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 7ADC147E582; Mon, 7 Dec 2020 10:51:20 +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 4CqKqX37tlz4dWm; Mon, 7 Dec 2020 10:51:20 +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 5EF1B20B75; Mon, 7 Dec 2020 10:51:20 +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 0B7ApK88093018; Mon, 7 Dec 2020 10:51:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7ApKfA093016; Mon, 7 Dec 2020 10:51:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012071051.0B7ApKfA093016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Dec 2020 10:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368408 - head/stand/kshim X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/stand/kshim X-SVN-Commit-Revision: 368408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 10:51:20 -0000 Author: hselasky Date: Mon Dec 7 10:51:19 2020 New Revision: 368408 URL: https://svnweb.freebsd.org/changeset/base/368408 Log: Add missing busdma prototypes for load and unload and implement dummy sync function for kernel bootloader shim code. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/stand/kshim/bsd_kernel.c head/stand/kshim/bsd_kernel.h Modified: head/stand/kshim/bsd_kernel.c ============================================================================== --- head/stand/kshim/bsd_kernel.c Mon Dec 7 10:21:01 2020 (r368407) +++ head/stand/kshim/bsd_kernel.c Mon Dec 7 10:51:19 2020 (r368408) @@ -92,6 +92,13 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, } void +bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) +{ + /* Assuming coherent memory */ + __asm__ __volatile__("": : :"memory"); +} + +void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) { Modified: head/stand/kshim/bsd_kernel.h ============================================================================== --- head/stand/kshim/bsd_kernel.h Mon Dec 7 10:21:01 2020 (r368407) +++ head/stand/kshim/bsd_kernel.h Mon Dec 7 10:51:19 2020 (r368408) @@ -669,6 +669,11 @@ extern int delay(unsigned int); #define BUS_DMA_BUS3 0x40 #define BUS_DMA_BUS4 0x80 +#define BUS_DMASYNC_PREREAD 0x01 +#define BUS_DMASYNC_POSTREAD 0x02 +#define BUS_DMASYNC_PREWRITE 0x04 +#define BUS_DMASYNC_POSTWRITE 0x08 + typedef void bus_dmamap_callback_t(void *, bus_dma_segment_t *, int, int); int @@ -679,9 +684,14 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, void *lockfuncarg, bus_dma_tag_t *dmat); -int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, - bus_dmamap_t *mapp); -void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map); -int bus_dma_tag_destroy(bus_dma_tag_t dmat); +int bus_dmamem_alloc(bus_dma_tag_t, void** vaddr, int flags, bus_dmamap_t *); +void bus_dmamem_free(bus_dma_tag_t, void *vaddr, bus_dmamap_t); +int bus_dma_tag_destroy(bus_dma_tag_t); + +int bus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *buf, + bus_size_t buflen, bus_dmamap_callback_t *, + void *callback_arg, int flags); +void bus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t); +void bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int flags); #endif /* _BSD_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Mon Dec 7 11:18:54 2020 Return-Path: Delivered-To: svn-src-all@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 A8C8747EBBD; Mon, 7 Dec 2020 11:18:54 +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 4CqLRK44N5z4ftN; Mon, 7 Dec 2020 11:18:52 +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 0161320F3F; Mon, 7 Dec 2020 11:18:51 +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 0B7BIprj011625; Mon, 7 Dec 2020 11:18:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7BIp3A011624; Mon, 7 Dec 2020 11:18:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012071118.0B7BIp3A011624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Dec 2020 11:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368409 - head/sys/dev/mn X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mn X-SVN-Commit-Revision: 368409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 11:18:54 -0000 Author: hselasky Date: Mon Dec 7 11:18:51 2020 New Revision: 368409 URL: https://svnweb.freebsd.org/changeset/base/368409 Log: Fix compilation after r368397. MFC after: 3 days Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/mn/if_mn.c Modified: head/sys/dev/mn/if_mn.c ============================================================================== --- head/sys/dev/mn/if_mn.c Mon Dec 7 10:51:19 2020 (r368408) +++ head/sys/dev/mn/if_mn.c Mon Dec 7 11:18:51 2020 (r368409) @@ -1392,7 +1392,7 @@ mn_attach (device_t self) default: printf(" Rev 0x%x\n", sc->f54r->vstr); } - gone_in_dev(dev, 13, "sync serial (T1/E1) driver"); + 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-all@freebsd.org Mon Dec 7 11:19:21 2020 Return-Path: Delivered-To: svn-src-all@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 0D52C47EBD0; Mon, 7 Dec 2020 11:19:21 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqLRr14kdz4gRw; Mon, 7 Dec 2020 11:19:19 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9118A2601C5; Mon, 7 Dec 2020 12:19:18 +0100 (CET) Subject: Re: svn commit: r368397 - in head: share/man/man4 sys/dev/mn From: Hans Petter Selasky To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012062134.0B6LY5r8087987@repo.freebsd.org> <47c53f43-c4a7-4389-0a47-77a3625c4e23@selasky.org> Message-ID: <5095f668-78f1-9552-0f29-608a741df3cb@selasky.org> Date: Mon, 7 Dec 2020 12:19:11 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <47c53f43-c4a7-4389-0a47-77a3625c4e23@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4CqLRr14kdz4gRw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-1.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.82.50:from]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[88.99.82.50:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 11:19:21 -0000 On 12/7/20 11:44 AM, Hans Petter Selasky wrote: > On 12/6/20 10:34 PM, Ed Maste wrote: >> +    gone_in_dev(dev, 13, "sync serial (T1/E1) driver"); > > Should be "self" instead of "dev" . > Ed: I just fixed it. Don't forget to include this when MFC'ing. --HPS From owner-svn-src-all@freebsd.org Mon Dec 7 11:25:18 2020 Return-Path: Delivered-To: svn-src-all@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 7E3B447F06A; Mon, 7 Dec 2020 11:25:18 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CqLZk37pmz4gZk; Mon, 7 Dec 2020 11:25:18 +0000 (UTC) (envelope-from tsoome@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 53E212133F; Mon, 7 Dec 2020 11:25:18 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B7BPILG017681; Mon, 7 Dec 2020 11:25:18 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7BPIt4017680; Mon, 7 Dec 2020 11:25:18 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202012071125.0B7BPIt4017680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 7 Dec 2020 11:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368410 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 368410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 11:25:18 -0000 Author: tsoome Date: Mon Dec 7 11:25:18 2020 New Revision: 368410 URL: https://svnweb.freebsd.org/changeset/base/368410 Log: loader: xdr_array is missing count The integer arrays are encoded in nvlist as counted array , loader xdr_array() is missing the count. This will affect the pool import when there are hole devices in pool. Also fix the new data add and print functions. Modified: head/stand/libsa/zfs/nvlist.c Modified: head/stand/libsa/zfs/nvlist.c ============================================================================== --- head/stand/libsa/zfs/nvlist.c Mon Dec 7 11:18:51 2020 (r368409) +++ head/stand/libsa/zfs/nvlist.c Mon Dec 7 11:25:18 2020 (r368410) @@ -63,7 +63,7 @@ static int _getint(struct xdr *xdr, int *ip) { *ip = be32dec(xdr->xdr_idx); - return (sizeof (int)); + return (sizeof(int)); } static int @@ -72,14 +72,14 @@ _putint(struct xdr *xdr, int i) int *ip = (int *)xdr->xdr_idx; *ip = htobe32(i); - return (sizeof (int)); + return (sizeof(int)); } static int _getuint(struct xdr *xdr, unsigned *ip) { *ip = be32dec(xdr->xdr_idx); - return (sizeof (unsigned)); + return (sizeof(unsigned)); } static int @@ -88,9 +88,41 @@ _putuint(struct xdr *xdr, unsigned i) unsigned *up = (unsigned *)xdr->xdr_idx; *up = htobe32(i); - return (sizeof (int)); + return (sizeof(int)); } +static int +_getint_mem(struct xdr *xdr, int *ip) +{ + *ip = *(int *)xdr->xdr_idx; + return (sizeof(int)); +} + +static int +_putint_mem(struct xdr *xdr, int i) +{ + int *ip = (int *)xdr->xdr_idx; + + *ip = i; + return (sizeof(int)); +} + +static int +_getuint_mem(struct xdr *xdr, unsigned *ip) +{ + *ip = *(unsigned *)xdr->xdr_idx; + return (sizeof(unsigned)); +} + +static int +_putuint_mem(struct xdr *xdr, unsigned i) +{ + unsigned *up = (unsigned *)xdr->xdr_idx; + + *up = i; + return (sizeof(int)); +} + /* * XDR data translations. */ @@ -131,7 +163,7 @@ xdr_int(xdr_t *xdr, int *ip) bool rv = false; int *i = (int *)xdr->xdr_idx; - if (xdr->xdr_idx + sizeof (int) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(int) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { @@ -160,7 +192,7 @@ xdr_u_int(xdr_t *xdr, unsigned *ip) bool rv = false; unsigned *u = (unsigned *)xdr->xdr_idx; - if (xdr->xdr_idx + sizeof (unsigned) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(unsigned) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { @@ -183,28 +215,29 @@ xdr_u_int(xdr_t *xdr, unsigned *ip) static bool xdr_int64(xdr_t *xdr, int64_t *lp) { - int hi; - unsigned lo; bool rv = false; - if (xdr->xdr_idx + sizeof (int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { case XDR_OP_ENCODE: /* Encode value *lp, store to buf */ - hi = *lp >> 32; - lo = *lp & UINT32_MAX; - xdr->xdr_idx += xdr->xdr_putint(xdr, hi); - xdr->xdr_idx += xdr->xdr_putint(xdr, lo); + if (xdr->xdr_putint == _putint) + *(int64_t *)xdr->xdr_idx = htobe64(*lp); + else + *(int64_t *)xdr->xdr_idx = *lp; + xdr->xdr_idx += sizeof(int64_t); rv = true; break; case XDR_OP_DECODE: /* Decode buf, return value to *ip */ - xdr->xdr_idx += xdr->xdr_getint(xdr, &hi); - xdr->xdr_idx += xdr->xdr_getuint(xdr, &lo); - *lp = (((int64_t)hi) << 32) | lo; + if (xdr->xdr_getint == _getint) + *lp = be64toh(*(int64_t *)xdr->xdr_idx); + else + *lp = *(int64_t *)xdr->xdr_idx; + xdr->xdr_idx += sizeof(int64_t); rv = true; } return (rv); @@ -213,27 +246,29 @@ xdr_int64(xdr_t *xdr, int64_t *lp) static bool xdr_uint64(xdr_t *xdr, uint64_t *lp) { - unsigned hi, lo; bool rv = false; - if (xdr->xdr_idx + sizeof (uint64_t) > xdr->xdr_buf + xdr->xdr_buf_size) + if (xdr->xdr_idx + sizeof(uint64_t) > xdr->xdr_buf + xdr->xdr_buf_size) return (rv); switch (xdr->xdr_op) { case XDR_OP_ENCODE: /* Encode value *ip, store to buf */ - hi = *lp >> 32; - lo = *lp & UINT32_MAX; - xdr->xdr_idx += xdr->xdr_putint(xdr, hi); - xdr->xdr_idx += xdr->xdr_putint(xdr, lo); + if (xdr->xdr_putint == _putint) + *(uint64_t *)xdr->xdr_idx = htobe64(*lp); + else + *(uint64_t *)xdr->xdr_idx = *lp; + xdr->xdr_idx += sizeof(uint64_t); rv = true; break; case XDR_OP_DECODE: /* Decode buf, return value to *ip */ - xdr->xdr_idx += xdr->xdr_getuint(xdr, &hi); - xdr->xdr_idx += xdr->xdr_getuint(xdr, &lo); - *lp = (((uint64_t)hi) << 32) | lo; + if (xdr->xdr_getuint == _getuint) + *lp = be64toh(*(uint64_t *)xdr->xdr_idx); + else + *lp = *(uint64_t *)xdr->xdr_idx; + xdr->xdr_idx += sizeof(uint64_t); rv = true; } return (rv); @@ -262,7 +297,7 @@ xdr_string(xdr_t *xdr, nv_string_t *s) switch (xdr->xdr_op) { case XDR_OP_ENCODE: size = s->nv_size; - if (xdr->xdr_idx + sizeof (unsigned) + NV_ALIGN4(size) > + if (xdr->xdr_idx + sizeof(unsigned) + NV_ALIGN4(size) > xdr->xdr_buf + xdr->xdr_buf_size) break; xdr->xdr_idx += xdr->xdr_putuint(xdr, s->nv_size); @@ -271,7 +306,7 @@ xdr_string(xdr_t *xdr, nv_string_t *s) break; case XDR_OP_DECODE: - if (xdr->xdr_idx + sizeof (unsigned) > + if (xdr->xdr_idx + sizeof(unsigned) > xdr->xdr_buf + xdr->xdr_buf_size) break; size = xdr->xdr_getuint(xdr, &s->nv_size); @@ -289,7 +324,11 @@ static bool xdr_array(xdr_t *xdr, const unsigned nelem, const xdrproc_t elproc) { bool rv = true; + unsigned c = nelem; + if (!xdr_u_int(xdr, &c)) + return (false); + for (unsigned i = 0; i < nelem; i++) { if (!elproc(xdr, xdr->xdr_idx)) return (false); @@ -334,14 +373,14 @@ nvlist_create(int flag) nvlist_t *nvl; nvs_data_t *nvs; - nvl = calloc(1, sizeof (*nvl)); + nvl = calloc(1, sizeof(*nvl)); if (nvl == NULL) return (nvl); nvl->nv_header.nvh_encoding = NV_ENCODE_XDR; nvl->nv_header.nvh_endian = _BYTE_ORDER == _LITTLE_ENDIAN; - nvl->nv_asize = nvl->nv_size = sizeof (*nvs); + nvl->nv_asize = nvl->nv_size = sizeof(*nvs); nvs = calloc(1, nvl->nv_asize); if (nvs == NULL) { free(nvl); @@ -378,7 +417,7 @@ nvlist_xdr_nvp(xdr_t *xdr, nvlist_t *nvl) switch (type) { case DATA_TYPE_NVLIST: case DATA_TYPE_NVLIST_ARRAY: - bzero(&nvlist, sizeof (nvlist)); + bzero(&nvlist, sizeof(nvlist)); nvlist.nv_data = xdr->xdr_idx; nvlist.nv_idx = nvlist.nv_data; @@ -514,7 +553,7 @@ nvlist_xdr_nvlist(xdr_t *xdr, nvlist_t *nvl) if (!xdr_u_int(xdr, &nvph->decoded_size)) return (EINVAL); } else { - xdr->xdr_idx += 2 * sizeof (unsigned); + xdr->xdr_idx += 2 * sizeof(unsigned); } rv = 0; @@ -531,7 +570,7 @@ nvlist_xdr_nvlist(xdr_t *xdr, nvlist_t *nvl) if (!xdr_u_int(xdr, &nvph->decoded_size)) return (EINVAL); } else { - xdr->xdr_idx += 2 * sizeof (unsigned); + xdr->xdr_idx += 2 * sizeof(unsigned); } } return (rv); @@ -546,7 +585,7 @@ nvlist_size_xdr(xdr_t *xdr, size_t *size) uint8_t *pair; unsigned encoded_size, decoded_size; - xdr->xdr_idx += 2 * sizeof (unsigned); + xdr->xdr_idx += 2 * sizeof(unsigned); pair = xdr->xdr_idx; if (!xdr_u_int(xdr, &encoded_size) || !xdr_u_int(xdr, &decoded_size)) @@ -578,7 +617,7 @@ nvlist_next_nvpair(nvlist_t *nvl, nvp_header_t *nvh) xdr.xdr_idx = nvl->nv_data; xdr.xdr_buf_size = nvl->nv_size; - xdr.xdr_idx += 2 * sizeof (unsigned); + xdr.xdr_idx += 2 * sizeof(unsigned); /* Skip tp current pair */ if (nvh != NULL) { @@ -590,12 +629,12 @@ nvlist_next_nvpair(nvlist_t *nvl, nvp_header_t *nvh) return (NULL); encoded_size = *(unsigned *)xdr.xdr_idx; - xdr.xdr_idx += sizeof (unsigned); + xdr.xdr_idx += sizeof(unsigned); if (xdr.xdr_idx > xdr.xdr_buf + xdr.xdr_buf_size) return (NULL); decoded_size = *(unsigned *)xdr.xdr_idx; - xdr.xdr_idx += sizeof (unsigned); + xdr.xdr_idx += sizeof(unsigned); if (xdr.xdr_idx > xdr.xdr_buf + xdr.xdr_buf_size) return (NULL); @@ -610,11 +649,11 @@ nvlist_next_nvpair(nvlist_t *nvl, nvp_header_t *nvh) return (NULL); encoded_size = *(unsigned *)xdr.xdr_idx; - xdr.xdr_idx += sizeof (unsigned); + xdr.xdr_idx += sizeof(unsigned); if (xdr.xdr_idx > xdr.xdr_buf + xdr.xdr_buf_size) return (NULL); decoded_size = *(unsigned *)xdr.xdr_idx; - xdr.xdr_idx += sizeof (unsigned); + xdr.xdr_idx += sizeof(unsigned); if (xdr.xdr_idx > xdr.xdr_buf + xdr.xdr_buf_size) return (NULL); @@ -634,29 +673,29 @@ nvlist_size_native(xdr_t *xdr, size_t *size) uint8_t *pair; unsigned encoded_size, decoded_size; - xdr->xdr_idx += 2 * sizeof (unsigned); + xdr->xdr_idx += 2 * sizeof(unsigned); pair = xdr->xdr_idx; if (xdr->xdr_idx > xdr->xdr_buf + xdr->xdr_buf_size) return (false); encoded_size = *(unsigned *)xdr->xdr_idx; - xdr->xdr_idx += sizeof (unsigned); + xdr->xdr_idx += sizeof(unsigned); if (xdr->xdr_idx > xdr->xdr_buf + xdr->xdr_buf_size) return (false); decoded_size = *(unsigned *)xdr->xdr_idx; - xdr->xdr_idx += sizeof (unsigned); + xdr->xdr_idx += sizeof(unsigned); while (encoded_size && decoded_size) { xdr->xdr_idx = pair + encoded_size; pair = xdr->xdr_idx; if (xdr->xdr_idx > xdr->xdr_buf + xdr->xdr_buf_size) return (false); encoded_size = *(unsigned *)xdr->xdr_idx; - xdr->xdr_idx += sizeof (unsigned); + xdr->xdr_idx += sizeof(unsigned); if (xdr->xdr_idx > xdr->xdr_buf + xdr->xdr_buf_size) return (false); decoded_size = *(unsigned *)xdr->xdr_idx; - xdr->xdr_idx += sizeof (unsigned); + xdr->xdr_idx += sizeof(unsigned); } *size = xdr->xdr_idx - xdr->xdr_buf; @@ -711,7 +750,7 @@ nvlist_import(const char *stream, size_t size) be32toh(*(uint32_t *)(stream + 8)) != NV_UNIQUE_NAME) return (NULL); - nvl = malloc(sizeof (*nvl)); + nvl = malloc(sizeof(*nvl)); if (nvl == NULL) return (nvl); @@ -810,7 +849,7 @@ clone_nvlist(const nvlist_t *nvl, const uint8_t *ptr, { nvlist_t *nv; - nv = calloc(1, sizeof (*nv)); + nv = calloc(1, sizeof(*nv)); if (nv == NULL) return (ENOMEM); @@ -843,7 +882,7 @@ nvlist_next(const uint8_t *ptr) while (nvp->encoded_size != 0 && nvp->decoded_size != 0) { nvp = (nvp_header_t *)((uint8_t *)nvp + nvp->encoded_size); } - return ((uint8_t *)nvp + sizeof (*nvp)); + return ((uint8_t *)nvp + sizeof(*nvp)); } /* @@ -868,7 +907,7 @@ nvlist_find(const nvlist_t *nvl, const char *name, dat nvp = &data->nvl_pair; /* first pair in nvlist */ while (nvp->encoded_size != 0 && nvp->decoded_size != 0) { - nvp_name = (nv_string_t *)((uint8_t *)nvp + sizeof (*nvp)); + nvp_name = (nv_string_t *)((uint8_t *)nvp + sizeof(*nvp)); if (nvl->nv_data + nvl->nv_size < nvp_name->nv_data + nvp_name->nv_size) return (EIO); @@ -885,7 +924,7 @@ nvlist_find(const nvlist_t *nvl, const char *name, dat switch (nvp_data->nv_type) { case DATA_TYPE_UINT64: bcopy(nvp_data->nv_data, valuep, - sizeof (uint64_t)); + sizeof(uint64_t)); return (0); case DATA_TYPE_STRING: nvp_name = (nv_string_t *)nvp_data->nv_data; @@ -906,7 +945,7 @@ nvlist_find(const nvlist_t *nvl, const char *name, dat case DATA_TYPE_NVLIST_ARRAY: nvlist = calloc(nvp_data->nv_nelem, - sizeof (nvlist_t *)); + sizeof(nvlist_t *)); if (nvlist == NULL) return (ENOMEM); ptr = &nvp_data->nv_data[0]; @@ -957,14 +996,14 @@ get_value_size(data_type_t type, const void *data, uin case DATA_TYPE_INT32: case DATA_TYPE_UINT32: /* Our smallest data unit is 32-bit */ - value_sz = sizeof (uint32_t); + value_sz = sizeof(uint32_t); break; case DATA_TYPE_HRTIME: case DATA_TYPE_INT64: - value_sz = sizeof (int64_t); + value_sz = sizeof(int64_t); break; case DATA_TYPE_UINT64: - value_sz = sizeof (uint64_t); + value_sz = sizeof(uint64_t); break; case DATA_TYPE_STRING: if (data == NULL) @@ -973,7 +1012,7 @@ get_value_size(data_type_t type, const void *data, uin value_sz = strlen(data) + 1; break; case DATA_TYPE_BYTE_ARRAY: - value_sz = nelem * sizeof (uint8_t); + value_sz = nelem * sizeof(uint8_t); break; case DATA_TYPE_BOOLEAN_ARRAY: case DATA_TYPE_INT8_ARRAY: @@ -982,16 +1021,16 @@ get_value_size(data_type_t type, const void *data, uin case DATA_TYPE_UINT16_ARRAY: case DATA_TYPE_INT32_ARRAY: case DATA_TYPE_UINT32_ARRAY: - value_sz = (uint64_t)nelem * sizeof (uint32_t); + value_sz = (uint64_t)nelem * sizeof(uint32_t); break; case DATA_TYPE_INT64_ARRAY: - value_sz = (uint64_t)nelem * sizeof (int64_t); + value_sz = (uint64_t)nelem * sizeof(int64_t); break; case DATA_TYPE_UINT64_ARRAY: - value_sz = (uint64_t)nelem * sizeof (uint64_t); + value_sz = (uint64_t)nelem * sizeof(uint64_t); break; case DATA_TYPE_STRING_ARRAY: - value_sz = (uint64_t)nelem * sizeof (uint64_t); + value_sz = (uint64_t)nelem * sizeof(uint64_t); if (data != NULL) { char *const *strs = data; @@ -1011,7 +1050,7 @@ get_value_size(data_type_t type, const void *data, uin value_sz = NV_ALIGN(6 * 4); /* sizeof nvlist_t */ break; case DATA_TYPE_NVLIST_ARRAY: - value_sz = (uint64_t)nelem * sizeof (uint64_t) + + value_sz = (uint64_t)nelem * sizeof(uint64_t) + (uint64_t)nelem * NV_ALIGN(6 * 4); /* sizeof nvlist_t */ break; default: @@ -1041,12 +1080,12 @@ get_nvp_data_size(data_type_t type, const void *data, case DATA_TYPE_INT32: case DATA_TYPE_UINT32: /* Our smallest data unit is 32-bit */ - value_sz = sizeof (uint32_t); + value_sz = sizeof(uint32_t); break; case DATA_TYPE_HRTIME: case DATA_TYPE_INT64: case DATA_TYPE_UINT64: - value_sz = sizeof (uint64_t); + value_sz = sizeof(uint64_t); break; case DATA_TYPE_STRING: value_sz = 4 + NV_ALIGN4(strlen(data)); @@ -1061,11 +1100,11 @@ get_nvp_data_size(data_type_t type, const void *data, case DATA_TYPE_UINT16_ARRAY: case DATA_TYPE_INT32_ARRAY: case DATA_TYPE_UINT32_ARRAY: - value_sz = 4 + (uint64_t)nelem * sizeof (uint32_t); + value_sz = 4 + (uint64_t)nelem * sizeof(uint32_t); break; case DATA_TYPE_INT64_ARRAY: case DATA_TYPE_UINT64_ARRAY: - value_sz = 4 + (uint64_t)nelem * sizeof (uint64_t); + value_sz = 4 + (uint64_t)nelem * sizeof(uint64_t); break; case DATA_TYPE_STRING_ARRAY: if (data != NULL) { @@ -1120,7 +1159,14 @@ nvlist_add_common(nvlist_t *nvl, const char *name, dat uint8_t *ptr; size_t namelen; int decoded_size, encoded_size; - xdr_t xdr; + xdr_t xdr = { + .xdr_op = XDR_OP_ENCODE, + .xdr_putint = _putint_mem, + .xdr_putuint = _putuint_mem, + .xdr_buf = nvl->nv_data, + .xdr_idx = nvl->nv_data, + .xdr_buf_size = nvl->nv_size + }; nvs = (nvs_data_t *)nvl->nv_data; if (nvs->nvl_nvflag & NV_UNIQUE_NAME) @@ -1146,7 +1192,7 @@ nvlist_add_common(nvlist_t *nvl, const char *name, dat * * The decoded size is calculated as: * Note: namelen is with terminating 0. - * NV_ALIGN(sizeof (nvpair_t) (4 * 4) + namelen + 1) + + * NV_ALIGN(sizeof(nvpair_t) (4 * 4) + namelen + 1) + * NV_ALIGN(data_len) */ @@ -1160,88 +1206,133 @@ nvlist_add_common(nvlist_t *nvl, const char *name, dat nvl->nv_data = ptr; nvl->nv_asize += head.encoded_size; } - nvl->nv_idx = nvl->nv_data + nvl->nv_size - sizeof (*hp); + nvl->nv_idx = nvl->nv_data + nvl->nv_size - sizeof(*hp); bzero(nvl->nv_idx, head.encoded_size + 8); hp = (nvp_header_t *)nvl->nv_idx; *hp = head; - nvl->nv_idx += sizeof (*hp); - *(unsigned *)nvl->nv_idx = namelen; - nvl->nv_idx += sizeof (unsigned); - strlcpy((char *)nvl->nv_idx, name, namelen + 1); - nvl->nv_idx += NV_ALIGN4(namelen); - *(unsigned *)nvl->nv_idx = type; - nvl->nv_idx += sizeof (unsigned); - *(unsigned *)nvl->nv_idx = nelem; - nvl->nv_idx += sizeof (unsigned); + nvl->nv_idx += sizeof(*hp); + xdr.xdr_buf = nvl->nv_data; + xdr.xdr_idx = nvl->nv_idx; + + xdr.xdr_idx += xdr.xdr_putuint(&xdr, namelen); + strlcpy((char *)xdr.xdr_idx, name, namelen + 1); + xdr.xdr_idx += NV_ALIGN4(namelen); + xdr.xdr_idx += xdr.xdr_putuint(&xdr, type); + xdr.xdr_idx += xdr.xdr_putuint(&xdr, nelem); + switch (type) { case DATA_TYPE_BOOLEAN: break; + case DATA_TYPE_BYTE_ARRAY: - *(unsigned *)nvl->nv_idx = encoded_size; - nvl->nv_idx += sizeof (unsigned); - bcopy(data, nvl->nv_idx, nelem); - nvl->nv_idx += encoded_size; + xdr.xdr_idx += xdr.xdr_putuint(&xdr, encoded_size); + bcopy(data, xdr.xdr_idx, nelem); + xdr.xdr_idx += NV_ALIGN4(encoded_size); break; + case DATA_TYPE_STRING: encoded_size = strlen(data); - *(unsigned *)nvl->nv_idx = encoded_size; - nvl->nv_idx += sizeof (unsigned); - strlcpy((char *)nvl->nv_idx, data, encoded_size + 1); - nvl->nv_idx += NV_ALIGN4(encoded_size); + xdr.xdr_idx += xdr.xdr_putuint(&xdr, encoded_size); + strlcpy((char *)xdr.xdr_idx, data, encoded_size + 1); + xdr.xdr_idx += NV_ALIGN4(encoded_size); break; + case DATA_TYPE_STRING_ARRAY: for (uint32_t i = 0; i < nelem; i++) { encoded_size = strlen(((char **)data)[i]); - *(unsigned *)nvl->nv_idx = encoded_size; - nvl->nv_idx += sizeof (unsigned); - strlcpy((char *)nvl->nv_idx, ((char **)data)[i], + xdr.xdr_idx += xdr.xdr_putuint(&xdr, encoded_size); + strlcpy((char *)xdr.xdr_idx, ((char **)data)[i], encoded_size + 1); - nvl->nv_idx += NV_ALIGN4(encoded_size); + xdr.xdr_idx += NV_ALIGN4(encoded_size); } break; + case DATA_TYPE_BYTE: case DATA_TYPE_INT8: case DATA_TYPE_UINT8: + xdr_char(&xdr, (char *)data); + break; + case DATA_TYPE_INT8_ARRAY: case DATA_TYPE_UINT8_ARRAY: - for (uint32_t i = 0; i < nelem; i++) { - *(unsigned *)nvl->nv_idx = ((uint8_t *)data)[i]; - nvl->nv_idx += sizeof (unsigned); - } + xdr_array(&xdr, nelem, (xdrproc_t)xdr_char); break; + case DATA_TYPE_INT16: + xdr_short(&xdr, (short *)data); + break; + case DATA_TYPE_UINT16: + xdr_u_short(&xdr, (unsigned short *)data); + break; + case DATA_TYPE_INT16_ARRAY: + xdr_array(&xdr, nelem, (xdrproc_t)xdr_short); + break; + case DATA_TYPE_UINT16_ARRAY: - for (uint32_t i = 0; i < nelem; i++) { - *(unsigned *)nvl->nv_idx = ((uint16_t *)data)[i]; - nvl->nv_idx += sizeof (unsigned); - } + xdr_array(&xdr, nelem, (xdrproc_t)xdr_u_short); break; + + case DATA_TYPE_BOOLEAN_VALUE: + case DATA_TYPE_INT32: + xdr_int(&xdr, (int *)data); + break; + + case DATA_TYPE_UINT32: + xdr_u_int(&xdr, (unsigned int *)data); + break; + + case DATA_TYPE_BOOLEAN_ARRAY: + case DATA_TYPE_INT32_ARRAY: + xdr_array(&xdr, nelem, (xdrproc_t)xdr_int); + break; + + case DATA_TYPE_UINT32_ARRAY: + xdr_array(&xdr, nelem, (xdrproc_t)xdr_u_int); + break; + + case DATA_TYPE_INT64: + xdr_int64(&xdr, (int64_t *)data); + break; + + case DATA_TYPE_UINT64: + xdr_uint64(&xdr, (uint64_t *)data); + break; + + case DATA_TYPE_INT64_ARRAY: + xdr_array(&xdr, nelem, (xdrproc_t)xdr_int64); + break; + + case DATA_TYPE_UINT64_ARRAY: + xdr_array(&xdr, nelem, (xdrproc_t)xdr_uint64); + break; + case DATA_TYPE_NVLIST: - bcopy(((nvlist_t *)data)->nv_data, nvl->nv_idx, encoded_size); + bcopy(((nvlist_t *)data)->nv_data, xdr.xdr_idx, encoded_size); break; + case DATA_TYPE_NVLIST_ARRAY: { - uint8_t *buf = nvl->nv_idx; size_t size; - xdr_t xdr; + xdr_t xdr_nv; for (uint32_t i = 0; i < nelem; i++) { - xdr.xdr_idx = ((nvlist_t **)data)[i]->nv_data; - xdr.xdr_buf = xdr.xdr_idx; - xdr.xdr_buf_size = ((nvlist_t **)data)[i]->nv_size; + xdr_nv.xdr_idx = ((nvlist_t **)data)[i]->nv_data; + xdr_nv.xdr_buf = xdr_nv.xdr_idx; + xdr_nv.xdr_buf_size = ((nvlist_t **)data)[i]->nv_size; - if (!nvlist_size_native(&xdr, &size)) + if (!nvlist_size_native(&xdr_nv, &size)) return (EINVAL); - bcopy(((nvlist_t **)data)[i]->nv_data, buf, size); - buf += size; + bcopy(((nvlist_t **)data)[i]->nv_data, xdr.xdr_idx, + size); + xdr.xdr_idx += size; } break; } default: - bcopy(data, nvl->nv_idx, encoded_size); + bcopy(data, xdr.xdr_idx, encoded_size); } nvl->nv_size += head.encoded_size; @@ -1465,11 +1556,17 @@ nvpair_print(nvp_header_t *nvp, unsigned int indent) nv_string_t *nvp_name; nv_pair_data_t *nvp_data; nvlist_t nvlist; - xdr_t xdr; - unsigned i, j, u; - uint64_t u64; + unsigned i, j; + xdr_t xdr = { + .xdr_op = XDR_OP_DECODE, + .xdr_getint = _getint_mem, + .xdr_getuint = _getuint_mem, + .xdr_buf = (const uint8_t *)nvp, + .xdr_idx = NULL, + .xdr_buf_size = nvp->encoded_size + }; - nvp_name = (nv_string_t *)((uintptr_t)nvp + sizeof (*nvp)); + nvp_name = (nv_string_t *)((uintptr_t)nvp + sizeof(*nvp)); nvp_data = (nv_pair_data_t *) NV_ALIGN4((uintptr_t)&nvp_name->nv_data[0] + nvp_name->nv_size); @@ -1479,32 +1576,60 @@ nvpair_print(nvp_header_t *nvp, unsigned int indent) printf("%s [%d] %.*s", typenames[nvp_data->nv_type], nvp_data->nv_nelem, nvp_name->nv_size, nvp_name->nv_data); + xdr.xdr_idx = nvp_data->nv_data; switch (nvp_data->nv_type) { case DATA_TYPE_BYTE: case DATA_TYPE_INT8: - case DATA_TYPE_UINT8: - bcopy(nvp_data->nv_data, &u, sizeof (u)); - printf(" = 0x%x\n", (unsigned char)u); + case DATA_TYPE_UINT8: { + char c; + + if (xdr_char(&xdr, &c)) + printf(" = 0x%x\n", c); break; + } case DATA_TYPE_INT16: - case DATA_TYPE_UINT16: - bcopy(nvp_data->nv_data, &u, sizeof (u)); - printf(" = 0x%hx\n", (unsigned short)u); + case DATA_TYPE_UINT16: { + unsigned short u; + + if (xdr_u_short(&xdr, &u)) + printf(" = 0x%hx\n", u); break; + } case DATA_TYPE_BOOLEAN_VALUE: case DATA_TYPE_INT32: - case DATA_TYPE_UINT32: - bcopy(nvp_data->nv_data, &u, sizeof (u)); - printf(" = 0x%x\n", u); + case DATA_TYPE_UINT32: { + unsigned u; + + if (xdr_u_int(&xdr, &u)) + printf(" = 0x%x\n", u); break; + } case DATA_TYPE_INT64: - case DATA_TYPE_UINT64: - bcopy(nvp_data->nv_data, &u64, sizeof (u64)); - printf(" = 0x%jx\n", (uintmax_t)u64); + case DATA_TYPE_UINT64: { + uint64_t u; + + if (xdr_uint64(&xdr, &u)) + printf(" = 0x%jx\n", (uintmax_t)u); break; + } + + case DATA_TYPE_INT64_ARRAY: + case DATA_TYPE_UINT64_ARRAY: { + uint64_t *u; + + if (xdr_array(&xdr, nvp_data->nv_nelem, + (xdrproc_t)xdr_uint64)) { + u = (uint64_t *)(nvp_data->nv_data + sizeof(unsigned)); + for (i = 0; i < nvp_data->nv_nelem; i++) + printf(" [%u] = 0x%jx", i, (uintmax_t)u[i]); + printf("\n"); + } + + break; + } case DATA_TYPE_STRING: case DATA_TYPE_STRING_ARRAY: From owner-svn-src-all@freebsd.org Mon Dec 7 12:11:50 2020 Return-Path: Delivered-To: svn-src-all@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 8C2CD4A8EA3 for ; Mon, 7 Dec 2020 12:11:50 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 4CqMcQ3LGJz4kVL for ; Mon, 7 Dec 2020 12:11:50 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f51.google.com with SMTP id a12so5730216wrv.8 for ; Mon, 07 Dec 2020 04:11:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yiOhNQ1CHVVKSYrSl4f7xCMNqaM8D6A17zM9HSARdB8=; b=swlSVMuSiNnFA840meOGo3uVRhRBG2dCTjDI+7ipWbfqOFn8KL/khuqcjgtzKGEaNS 0Hbaa1UPrOtGoYy5ReSF51s9/7Rs/ruavb5DZEjzOutwNx/ckgW2HOfuZGY0Z2Qz+Ga2 gr0WtQW7WXCjGycCdaLZ7tKmQrYkr4hXwWYxMYSsFhtzFdeJKtthFoNMToJkCQMnJqkO 1cL8RvZC5iFWjc7UirGXXGD4sXxx0jNk9KzGOTa1UxNxHbmtZT7QlLkKqlaxyELgvSq+ 254cHM7NEOSTxAQuA6U/EA+P+C8WD71B7B6vzZG4n1EnG0894v/CHKtxdkshMqnZn/H/ Aftw== X-Gm-Message-State: AOAM530SmxqKYlxbBPJnz1DAW/XoZ0AoUng3axC5QkpeI9l1N9rQ9jyM dGQszJLbYZpdLKfSk38t3m24mg== X-Google-Smtp-Source: ABdhPJzbo7OMFK5bYPutRdLj5tCl3AMbyLXHh5Y976oQtRdbmfRwMj7vEEspnLjdmbuRnODT77PB3g== X-Received: by 2002:a05:6000:112:: with SMTP id o18mr19044763wrx.7.1607343108757; Mon, 07 Dec 2020 04:11:48 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id u26sm14626787wmm.24.2020.12.07.04.11.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2020 04:11:48 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r368410 - head/stand/libsa/zfs From: Jessica Clarke In-Reply-To: <202012071125.0B7BPIt4017680@repo.freebsd.org> Date: Mon, 7 Dec 2020 12:11:46 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202012071125.0B7BPIt4017680@repo.freebsd.org> To: Toomas Soome X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CqMcQ3LGJz4kVL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 12:11:50 -0000 On 7 Dec 2020, at 11:25, Toomas Soome wrote: > @@ -183,28 +215,29 @@ xdr_u_int(xdr_t *xdr, unsigned *ip) > static bool > xdr_int64(xdr_t *xdr, int64_t *lp) > { > - int hi; > - unsigned lo; > bool rv = false; > > - if (xdr->xdr_idx + sizeof (int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) > + if (xdr->xdr_idx + sizeof(int64_t) > xdr->xdr_buf + xdr->xdr_buf_size) > return (rv); > > switch (xdr->xdr_op) { > case XDR_OP_ENCODE: > /* Encode value *lp, store to buf */ > - hi = *lp >> 32; > - lo = *lp & UINT32_MAX; > - xdr->xdr_idx += xdr->xdr_putint(xdr, hi); > - xdr->xdr_idx += xdr->xdr_putint(xdr, lo); > + if (xdr->xdr_putint == _putint) > + *(int64_t *)xdr->xdr_idx = htobe64(*lp); > + else > + *(int64_t *)xdr->xdr_idx = *lp; I don't know the details here, but inspecting the callback function and comparing it against a known one to decide what to do is generally not good practice. Can this be pushed down into the function in question, up into the caller or additional information passed to be explicit about this behaviour rather than brittle magic behaviour? Jess Jess From owner-svn-src-all@freebsd.org Mon Dec 7 14:41:26 2020 Return-Path: Delivered-To: svn-src-all@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 D3D9F4ABD53; Mon, 7 Dec 2020 14:41:26 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (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 4CqQx25cM9z4rfV; Mon, 7 Dec 2020 14:41:26 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f53.google.com with SMTP id r9so13541383ioo.7; Mon, 07 Dec 2020 06:41:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WOsaJOLZ7wyZXPdAXVQdAuM7i0o+SZSAtuCVBnrRElI=; b=DI+NU6Jbtc/2hJW92wY63dwu8Ukcteu6ZuM2PJpvzzPHEnEganfS6v5PXZuUAtsnwY 3ZGF1rUwmAucePIwbmL7kjVxxOdvoEdjohN9g6IhHDPN6FYhV8/krQNenKamGGmN+sWs JWGW3Miiytjxq4n1Z305KvdF0Z5dPTMABnPuqDO+2RaTCnGplmcDiP1I1fYbG+z2qnxM 3/6mZHdGyFaovytH2rKYeN55rzhR16+4e4MCXJpcpMD8nxuN/2NL1GI34rGp5N/jySCN HMhBPnSNekQ+oPmb1l9wpKLqrSvECheWG5nAfXUHHFJ4t85mv6kQ6tMfILVnWiwfd8Oe RMAw== X-Gm-Message-State: AOAM533noA/GLrgHuP/CMgGXSARipCUCcxPaBRs0ubPnsUncuvncH2gL T9SMRAefrO3dN5K1ewgGj0IOf2yXnfyEqlUrbYCQhG2pu3Q= X-Google-Smtp-Source: ABdhPJz4ehsxRI41K2fAEizGmgK+gBZs2FKi5n32iJ+qVKOkY0h0bX/KxyY4Qc1RzcblO15UYfbkGElcBWbaZKpG/zg= X-Received: by 2002:a02:cc54:: with SMTP id i20mr22740175jaq.136.1607352084780; Mon, 07 Dec 2020 06:41:24 -0800 (PST) MIME-Version: 1.0 References: <202012071118.0B7BIp3A011624@repo.freebsd.org> In-Reply-To: <202012071118.0B7BIp3A011624@repo.freebsd.org> From: Ed Maste Date: Mon, 7 Dec 2020 09:41:12 -0500 Message-ID: Subject: Re: svn commit: r368409 - head/sys/dev/mn To: Hans Petter Selasky Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CqQx25cM9z4rfV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 14:41:26 -0000 On Mon, 7 Dec 2020 at 06:19, Hans Petter Selasky wrote: > > Author: hselasky > Date: Mon Dec 7 11:18:51 2020 > New Revision: 368409 > URL: https://svnweb.freebsd.org/changeset/base/368409 > > Log: > Fix compilation after r368397. > > MFC after: 3 days > Sponsored by: Mellanox Technologies // NVIDIA Networking Thanks. I will be sure to pick this up with the MFC. From owner-svn-src-all@freebsd.org Mon Dec 7 14:52:58 2020 Return-Path: Delivered-To: svn-src-all@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 729694ABE67; Mon, 7 Dec 2020 14:52:58 +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 4CqRBL2s3xz4sXJ; Mon, 7 Dec 2020 14:52:58 +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 54B7423C2D; Mon, 7 Dec 2020 14:52:58 +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 0B7Eqwr6047946; Mon, 7 Dec 2020 14:52:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7EqwFP047945; Mon, 7 Dec 2020 14:52:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012071452.0B7EqwFP047945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 7 Dec 2020 14:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368411 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 14:52:58 -0000 Author: markj Date: Mon Dec 7 14:52:57 2020 New Revision: 368411 URL: https://svnweb.freebsd.org/changeset/base/368411 Log: iflib: Detach tasks upon device registration failure In some error paths we would fail to detach from the iflib taskqueue groups. Also move the detach code into its own subroutine instead of duplicating it. Submitted by: Sai Rajesh Tallamraju MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D27342 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Dec 7 11:25:18 2020 (r368410) +++ head/sys/net/iflib.c Mon Dec 7 14:52:57 2020 (r368411) @@ -142,6 +142,7 @@ struct iflib_ctx; static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid); static void iflib_timer(void *arg); +static void iflib_tqg_detach(if_ctx_t ctx); typedef struct iflib_filter_info { driver_filter_t *ifi_filter; @@ -4842,7 +4843,7 @@ fail_intr_free: fail_queues: iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); - taskqgroup_detach(qgroup_if_config_tqg, &ctx->ifc_admin_task); + iflib_tqg_detach(ctx); IFDI_DETACH(ctx); fail_unlock: CTX_UNLOCK(ctx); @@ -5042,6 +5043,7 @@ fail_detach: fail_queues: iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); + iflib_tqg_detach(ctx); fail_iflib_detach: IFDI_DETACH(ctx); fail_unlock: @@ -5058,11 +5060,6 @@ iflib_pseudo_deregister(if_ctx_t ctx) { if_t ifp = ctx->ifc_ifp; if_shared_ctx_t sctx = ctx->ifc_sctx; - iflib_txq_t txq; - iflib_rxq_t rxq; - int i, j; - struct taskqgroup *tqg; - iflib_fl_t fl; /* Unregister VLAN event handlers early */ iflib_unregister_vlan_handlers(ctx); @@ -5074,30 +5071,8 @@ iflib_pseudo_deregister(if_ctx_t ctx) } else { ether_ifdetach(ifp); } - /* XXX drain any dependent tasks */ - tqg = qgroup_if_io_tqg; - for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { - callout_drain(&txq->ift_timer); -#ifdef DEV_NETMAP - callout_drain(&txq->ift_netmap_timer); -#endif /* DEV_NETMAP */ - if (txq->ift_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &txq->ift_task); - } - for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { - callout_drain(&rxq->ifr_watchdog); - if (rxq->ifr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &rxq->ifr_task); - for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) - free(fl->ifl_rx_bitmap, M_IFLIB); - } - tqg = qgroup_if_config_tqg; - if (ctx->ifc_admin_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &ctx->ifc_admin_task); - if (ctx->ifc_vflr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &ctx->ifc_vflr_task); - + iflib_tqg_detach(ctx); iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); @@ -5127,12 +5102,7 @@ int iflib_device_deregister(if_ctx_t ctx) { if_t ifp = ctx->ifc_ifp; - iflib_txq_t txq; - iflib_rxq_t rxq; device_t dev = ctx->ifc_dev; - int i, j; - struct taskqgroup *tqg; - iflib_fl_t fl; /* Make sure VLANS are not using driver */ if (if_vlantrunkinuse(ifp)) { @@ -5163,28 +5133,8 @@ iflib_device_deregister(if_ctx_t ctx) iflib_rem_pfil(ctx); if (ctx->ifc_led_dev != NULL) led_destroy(ctx->ifc_led_dev); - /* XXX drain any dependent tasks */ - tqg = qgroup_if_io_tqg; - for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { - callout_drain(&txq->ift_timer); -#ifdef DEV_NETMAP - callout_drain(&txq->ift_netmap_timer); -#endif /* DEV_NETMAP */ - if (txq->ift_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &txq->ift_task); - } - for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { - if (rxq->ifr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &rxq->ifr_task); - for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) - free(fl->ifl_rx_bitmap, M_IFLIB); - } - tqg = qgroup_if_config_tqg; - if (ctx->ifc_admin_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &ctx->ifc_admin_task); - if (ctx->ifc_vflr_task.gt_uniq != NULL) - taskqgroup_detach(tqg, &ctx->ifc_vflr_task); + iflib_tqg_detach(ctx); CTX_LOCK(ctx); IFDI_DETACH(ctx); CTX_UNLOCK(ctx); @@ -5205,6 +5155,35 @@ iflib_device_deregister(if_ctx_t ctx) unref_ctx_core_offset(ctx); free(ctx, M_IFLIB); return (0); +} + +static void +iflib_tqg_detach(if_ctx_t ctx) +{ + iflib_txq_t txq; + iflib_rxq_t rxq; + int i; + struct taskqgroup *tqg; + + /* XXX drain any dependent tasks */ + tqg = qgroup_if_io_tqg; + for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) { + callout_drain(&txq->ift_timer); +#ifdef DEV_NETMAP + callout_drain(&txq->ift_netmap_timer); +#endif /* DEV_NETMAP */ + if (txq->ift_task.gt_uniq != NULL) + taskqgroup_detach(tqg, &txq->ift_task); + } + for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { + if (rxq->ifr_task.gt_uniq != NULL) + taskqgroup_detach(tqg, &rxq->ifr_task); + } + tqg = qgroup_if_config_tqg; + if (ctx->ifc_admin_task.gt_uniq != NULL) + taskqgroup_detach(tqg, &ctx->ifc_admin_task); + if (ctx->ifc_vflr_task.gt_uniq != NULL) + taskqgroup_detach(tqg, &ctx->ifc_vflr_task); } static void From owner-svn-src-all@freebsd.org Mon Dec 7 14:53:15 2020 Return-Path: Delivered-To: svn-src-all@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 58DF54ABDE1; Mon, 7 Dec 2020 14:53: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 4CqRBg1p1Lz4sHP; Mon, 7 Dec 2020 14:53: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 307C923E7E; Mon, 7 Dec 2020 14:53: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 0B7ErFN8048004; Mon, 7 Dec 2020 14:53:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7ErFgo048003; Mon, 7 Dec 2020 14:53:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012071453.0B7ErFgo048003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 7 Dec 2020 14:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368412 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 14:53:15 -0000 Author: markj Date: Mon Dec 7 14:53:14 2020 New Revision: 368412 URL: https://svnweb.freebsd.org/changeset/base/368412 Log: iflib: Avoid leaking the freelist bitmaps upon driver detach Submitted by: Sai Rajesh Tallamraju MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D27342 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Dec 7 14:52:57 2020 (r368411) +++ head/sys/net/iflib.c Mon Dec 7 14:53:14 2020 (r368412) @@ -2259,10 +2259,12 @@ iflib_rx_sds_free(iflib_rxq_t rxq) free(fl->ifl_sds.ifsd_cl, M_IFLIB); free(fl->ifl_sds.ifsd_ba, M_IFLIB); free(fl->ifl_sds.ifsd_map, M_IFLIB); + free(fl->ifl_rx_bitmap, M_IFLIB); fl->ifl_sds.ifsd_m = NULL; fl->ifl_sds.ifsd_cl = NULL; fl->ifl_sds.ifsd_ba = NULL; fl->ifl_sds.ifsd_map = NULL; + fl->ifl_rx_bitmap = NULL; } free(rxq->ifr_fl, M_IFLIB); rxq->ifr_fl = NULL; From owner-svn-src-all@freebsd.org Mon Dec 7 14:53:34 2020 Return-Path: Delivered-To: svn-src-all@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 C4DF64ABE78; Mon, 7 Dec 2020 14:53:34 +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 4CqRC2443Pz4scG; Mon, 7 Dec 2020 14:53:34 +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 7B25323B46; Mon, 7 Dec 2020 14:53:34 +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 0B7ErYBj048062; Mon, 7 Dec 2020 14:53:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7ErYYU048061; Mon, 7 Dec 2020 14:53:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012071453.0B7ErYYU048061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 7 Dec 2020 14:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368413 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 14:53:34 -0000 Author: markj Date: Mon Dec 7 14:53:34 2020 New Revision: 368413 URL: https://svnweb.freebsd.org/changeset/base/368413 Log: Add missing refcount.9 MLINKS Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Dec 7 14:53:14 2020 (r368412) +++ head/share/man/man9/Makefile Mon Dec 7 14:53:34 2020 (r368413) @@ -1778,8 +1778,13 @@ MLINKS+=random_harvest.9 random_harvest_direct.9 \ random_harvest.9 random_harvest_queue.9 MLINKS+=ratecheck.9 ppsratecheck.9 MLINKS+=refcount.9 refcount_acquire.9 \ + refcount.9 refcount_acquire_checked.9 \ + refcount.9 refcount_acquire_if_not_zero.9 \ refcount.9 refcount_init.9 \ - refcount.9 refcount_release.9 + refcount.9 refcount_load.9 \ + refcount.9 refcount_release.9 \ + refcount.9 refcount_release_if_last.9 \ + refcount.9 refcount_release_if_not_last.9 MLINKS+=resource_int_value.9 resource_long_value.9 \ resource_int_value.9 resource_string_value.9 MLINKS+=rman.9 rman_activate_resource.9 \ From owner-svn-src-all@freebsd.org Mon Dec 7 15:09:29 2020 Return-Path: Delivered-To: svn-src-all@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 888804AC787; Mon, 7 Dec 2020 15:09:29 +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 4CqRYP3TxLz4t6p; Mon, 7 Dec 2020 15:09:29 +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 6A5C823F27; Mon, 7 Dec 2020 15:09:29 +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 0B7F9Tpn054525; Mon, 7 Dec 2020 15:09:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7F9Tfn054524; Mon, 7 Dec 2020 15:09:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012071509.0B7F9Tfn054524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 7 Dec 2020 15:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368414 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 368414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 15:09:29 -0000 Author: markj Date: Mon Dec 7 15:09:28 2020 New Revision: 368414 URL: https://svnweb.freebsd.org/changeset/base/368414 Log: arm: Let the GDB stub write to SP, LR and GP registers This can be handy if gdb's stack unwinder fails, for example because of a bug in kgdb's trap frame unwinder. PR: 251463 Submitted by: Dmitry Salychev MFC after: 1 week Modified: head/sys/arm/arm/gdb_machdep.c head/sys/arm/include/gdb_machdep.h Modified: head/sys/arm/arm/gdb_machdep.c ============================================================================== --- head/sys/arm/arm/gdb_machdep.c Mon Dec 7 14:53:34 2020 (r368413) +++ head/sys/arm/arm/gdb_machdep.c Mon Dec 7 15:09:28 2020 (r368414) @@ -97,11 +97,25 @@ gdb_cpu_getreg(int regnum, size_t *regsz) void gdb_cpu_setreg(int regnum, void *val) { + if (kdb_thread != curthread) + return; switch (regnum) { case GDB_REG_PC: - if (kdb_thread == curthread) - kdb_frame->tf_pc = *(register_t *)val; + kdb_frame->tf_pc = *(register_t *)val; + break; + case GDB_REG_SP: + kdb_frame->tf_svc_sp = *(register_t *)val; + break; + case GDB_REG_LR: + kdb_frame->tf_svc_lr = *(register_t *)val; + break; + default: + /* Write to the general purpose registers r0-r12. */ + if (regnum >= 0 && regnum <= 12) { + *(&kdb_frame->tf_r0 + regnum) = *(register_t *)val; + } + break; } } Modified: head/sys/arm/include/gdb_machdep.h ============================================================================== --- head/sys/arm/include/gdb_machdep.h Mon Dec 7 14:53:34 2020 (r368413) +++ head/sys/arm/include/gdb_machdep.h Mon Dec 7 15:09:28 2020 (r368414) @@ -33,6 +33,8 @@ #define GDB_BUFSZ 400 #define GDB_NREGS 26 +#define GDB_REG_SP 13 +#define GDB_REG_LR 14 #define GDB_REG_PC 15 static __inline size_t From owner-svn-src-all@freebsd.org Mon Dec 7 16:08:32 2020 Return-Path: Delivered-To: svn-src-all@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 6E26B4ADED8; Mon, 7 Dec 2020 16:08:32 +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 4CqSsX2dDSz3DDK; Mon, 7 Dec 2020 16:08:32 +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 4874524B63; Mon, 7 Dec 2020 16:08:32 +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 0B7G8WuH091698; Mon, 7 Dec 2020 16:08:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7G8WM6091697; Mon, 7 Dec 2020 16:08:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012071608.0B7G8WM6091697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 7 Dec 2020 16:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368415 - head/stand/kshim X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/stand/kshim X-SVN-Commit-Revision: 368415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 16:08:32 -0000 Author: hselasky Date: Mon Dec 7 16:08:31 2020 New Revision: 368415 URL: https://svnweb.freebsd.org/changeset/base/368415 Log: Properly define the bool type in the BSD kernel shim. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/stand/kshim/bsd_kernel.h Modified: head/stand/kshim/bsd_kernel.h ============================================================================== --- head/stand/kshim/bsd_kernel.h Mon Dec 7 15:09:28 2020 (r368414) +++ head/stand/kshim/bsd_kernel.h Mon Dec 7 16:08:31 2020 (r368415) @@ -274,7 +274,12 @@ typedef uint8_t *bus_space_handle_t; typedef int bus_dma_filter_t(void *, bus_addr_t); typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); -typedef uint32_t bool; +#ifndef __bool_true_false_are_defined +#define __bool_true_false_are_defined +typedef _Bool bool; +#define true 1 +#define false 0 +#endif /* SYSINIT API */ From owner-svn-src-all@freebsd.org Mon Dec 7 17:54:49 2020 Return-Path: Delivered-To: svn-src-all@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 905C34AF7B8; Mon, 7 Dec 2020 17:54:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CqWD93hJvz3KkS; Mon, 7 Dec 2020 17:54:49 +0000 (UTC) (envelope-from andrew@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 6FA7C25F2B; Mon, 7 Dec 2020 17:54:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B7Hsns2060294; Mon, 7 Dec 2020 17:54:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7Hsnmc060293; Mon, 7 Dec 2020 17:54:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202012071754.0B7Hsnmc060293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 7 Dec 2020 17:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368416 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 368416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 17:54:49 -0000 Author: andrew Date: Mon Dec 7 17:54:49 2020 New Revision: 368416 URL: https://svnweb.freebsd.org/changeset/base/368416 Log: Ensure the boot CPU is CPU 0 on arm64 We assume the boot CPU is always CPU 0 on arm64. To allow for this reserve cpuid 0 for the boot CPU in the ACPI and FDT cases but otherwise start the CPU as normal. We then check for the boot CPU in start_cpu and return as if it was started. While here extract the FDT CPU init code into a new function to simplify cpu_mp_start and return FALSE from start_cpu when the CPU fails to start. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D27497 Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Mon Dec 7 16:08:31 2020 (r368415) +++ head/sys/arm64/arm64/mp_machdep.c Mon Dec 7 17:54:49 2020 (r368416) @@ -148,6 +148,13 @@ static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; +static bool +is_boot_cpu(uint64_t target_cpu) +{ + + return (__pcpu[0].pc_mpidr == (target_cpu & CPU_AFF_MASK)); +} + static void release_aps(void *dummy __unused) { @@ -428,6 +435,10 @@ cpu_mp_probe(void) return (1); } +/* + * Starts a given CPU. If the CPU is already running, i.e. it is the boot CPU, + * do nothing. Returns true if the CPU is present and running. + */ static bool start_cpu(u_int cpuid, uint64_t target_cpu) { @@ -439,9 +450,11 @@ start_cpu(u_int cpuid, uint64_t target_cpu) if (cpuid > mp_maxid) return (false); + /* Skip boot CPU */ + if (is_boot_cpu(target_cpu)) + return (true); + KASSERT(cpuid < MAXCPU, ("Too many CPUs")); - KASSERT(__pcpu[0].pc_mpidr != (target_cpu & CPU_AFF_MASK), - ("Start_cpu() was called on the boot CPU")); pcpup = &__pcpu[cpuid]; pcpu_init(pcpup, cpuid, sizeof(struct pcpu)); @@ -475,14 +488,14 @@ start_cpu(u_int cpuid, uint64_t target_cpu) kmem_free((vm_offset_t)bootstacks[cpuid], PAGE_SIZE); bootstacks[cpuid] = NULL; mp_ncpus--; - - } else { - /* Wait for the AP to switch to its boot stack. */ - while (atomic_load_int(&aps_started) < naps + 1) - cpu_spinwait(); - CPU_SET(cpuid, &all_cpus); + return (false); } + /* Wait for the AP to switch to its boot stack. */ + while (atomic_load_int(&aps_started) < naps + 1) + cpu_spinwait(); + CPU_SET(cpuid, &all_cpus); + return (true); } @@ -498,17 +511,22 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) case ACPI_MADT_TYPE_GENERIC_INTERRUPT: intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; cpuid = arg; - id = *cpuid; - /* Skip the boot CPU, but save its ACPI id. */ - if (__pcpu[0].pc_mpidr == (intr->ArmMpidr & CPU_AFF_MASK)) { - __pcpu[0].pc_acpi_id = intr->Uid; - break; + if (is_boot_cpu(intr->ArmMpidr)) + id = 0; + else + id = *cpuid; + + if (start_cpu(id, intr->ArmMpidr)) { + __pcpu[id].pc_acpi_id = intr->Uid; + /* + * Don't increment for the boot CPU, its CPU ID is + * reserved. + */ + if (!is_boot_cpu(intr->ArmMpidr)) + (*cpuid)++; } - start_cpu(id, intr->ArmMpidr); - __pcpu[id].pc_acpi_id = intr->Uid; - (*cpuid)++; break; default: break; @@ -546,10 +564,11 @@ cpu_init_acpi(void) #ifdef FDT static boolean_t -cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) +start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { uint64_t target_cpu; int domain; + int cpuid; target_cpu = reg[0]; if (addr_size == 2) { @@ -557,35 +576,51 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size target_cpu |= reg[1]; } - /* Skip boot CPU */ - if (__pcpu[0].pc_mpidr == (target_cpu & CPU_AFF_MASK)) - return (TRUE); + if (is_boot_cpu(target_cpu)) + cpuid = 0; + else + cpuid = fdt_cpuid; - if (!start_cpu(fdt_cpuid, target_cpu)) + if (!start_cpu(cpuid, target_cpu)) return (FALSE); - fdt_cpuid++; + /* + * Don't increment for the boot CPU, its CPU ID is reserved. + */ + if (!is_boot_cpu(target_cpu)) + fdt_cpuid++; + /* Try to read the numa node of this cpu */ if (vm_ndomains == 1 || OF_getencprop(node, "numa-node-id", &domain, sizeof(domain)) <= 0) domain = 0; - __pcpu[fdt_cpuid].pc_domain = domain; + __pcpu[cpuid].pc_domain = domain; if (domain < MAXMEMDOM) - CPU_SET(fdt_cpuid, &cpuset_domain[domain]); - + CPU_SET(cpuid, &cpuset_domain[domain]); return (TRUE); } +static void +cpu_init_fdt(void) +{ + phandle_t node; + int i; + + node = OF_peer(0); + for (i = 0; fdt_quirks[i].compat != NULL; i++) { + if (ofw_bus_node_is_compatible(node, + fdt_quirks[i].compat) != 0) { + mp_quirks = fdt_quirks[i].quirks; + } + } + fdt_cpuid = 1; + ofw_cpu_early_foreach(start_cpu_fdt, true); +} #endif /* Initialize and fire up non-boot processors */ void cpu_mp_start(void) { -#ifdef FDT - phandle_t node; -#endif - int i; - mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); /* CPU 0 is always boot CPU. */ @@ -601,15 +636,7 @@ cpu_mp_start(void) #endif #ifdef FDT case ARM64_BUS_FDT: - node = OF_peer(0); - for (i = 0; fdt_quirks[i].compat != NULL; i++) { - if (ofw_bus_node_is_compatible(node, - fdt_quirks[i].compat) != 0) { - mp_quirks = fdt_quirks[i].quirks; - } - } - fdt_cpuid = 1; - ofw_cpu_early_foreach(cpu_init_fdt, true); + cpu_init_fdt(); break; #endif default: From owner-svn-src-all@freebsd.org Mon Dec 7 18:58:09 2020 Return-Path: Delivered-To: svn-src-all@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 6A1894B13A0; Mon, 7 Dec 2020 18:58:09 +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 4CqXdF2WjYz3PL9; Mon, 7 Dec 2020 18:58:09 +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 497D326B3D; Mon, 7 Dec 2020 18:58:09 +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 0B7Iw9av097014; Mon, 7 Dec 2020 18:58:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B7Iw9pG097013; Mon, 7 Dec 2020 18:58:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012071858.0B7Iw9pG097013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 7 Dec 2020 18:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368417 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 368417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 18:58:09 -0000 Author: jhb Date: Mon Dec 7 18:58:08 2020 New Revision: 368417 URL: https://svnweb.freebsd.org/changeset/base/368417 Log: Bump __FreeBSD_version for removal of crypto fd's in r368005. Requested by: swills Sponsored by: Chelsio Communications Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Dec 7 17:54:49 2020 (r368416) +++ head/sys/sys/param.h Mon Dec 7 18:58:08 2020 (r368417) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300130 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300131 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Mon Dec 7 18:58:16 2020 Return-Path: Delivered-To: svn-src-all@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 7434A4B13AC; Mon, 7 Dec 2020 18:58:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqXdN0NVkz3PZy; Mon, 7 Dec 2020 18:58:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:2dc8:c727:7113:a46c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 9C61A60CB; Mon, 7 Dec 2020 18:58:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: Steve Wills , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202011250010.0AP0AtH3061986@repo.freebsd.org> <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> Date: Mon, 7 Dec 2020 10:58:13 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 18:58:16 -0000 On 12/6/20 8:51 PM, Steve Wills wrote: > Hi, > > On 11/24/20 7:10 PM, John Baldwin wrote: >> Author: jhb >> Date: Wed Nov 25 00:10:54 2020 >> New Revision: 368005 >> URL: https://svnweb.freebsd.org/changeset/base/368005 >> >> Log: >> Remove the cloned file descriptors for /dev/crypto. >> > > Would this change warrant a bump of __FreeBSD_version? I only noticed > because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and that is probably preferred for anything using C). Looks like we haven't yet had another bump of __FreeBSD_version so I can do that. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Dec 7 19:11:24 2020 Return-Path: Delivered-To: svn-src-all@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 991214B1730; Mon, 7 Dec 2020 19:11:24 +0000 (UTC) (envelope-from kevans@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 4CqXwX3Xjjz3QTH; Mon, 7 Dec 2020 19:11:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6C7E07301; Mon, 7 Dec 2020 19:11:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-vs1-f52.google.com with SMTP id s85so8197858vsc.3; Mon, 07 Dec 2020 11:11:24 -0800 (PST) X-Gm-Message-State: AOAM530ZNpKENjWbLak1mClJTf2C5CYeeQhsZu6V6w8OI8AX4Yd2gi6W db6GRIY0vBxzyHq3y0hOrsIVZ08UbukhihEnKTY= X-Google-Smtp-Source: ABdhPJy4Y4fxU6Bl/9d7EbR3SJoYycFb0Q/osAmlN4WHFGEnCThSd4I+rOQ67RBq14cBBtWl8TmRje2QN0dMTi536iM= X-Received: by 2002:a67:ea02:: with SMTP id g2mr14007260vso.3.1607368283986; Mon, 07 Dec 2020 11:11:23 -0800 (PST) MIME-Version: 1.0 References: <202011250010.0AP0AtH3061986@repo.freebsd.org> <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> In-Reply-To: <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> From: Kyle Evans Date: Mon, 7 Dec 2020 13:11:10 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: John Baldwin Cc: Steve Wills , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 19:11:24 -0000 On Mon, Dec 7, 2020 at 12:58 PM John Baldwin wrote: > > On 12/6/20 8:51 PM, Steve Wills wrote: > > Hi, > > > > On 11/24/20 7:10 PM, John Baldwin wrote: > >> Author: jhb > >> Date: Wed Nov 25 00:10:54 2020 > >> New Revision: 368005 > >> URL: https://svnweb.freebsd.org/changeset/base/368005 > >> > >> Log: > >> Remove the cloned file descriptors for /dev/crypto. > >> > > > > Would this change warrant a bump of __FreeBSD_version? I only noticed > > because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). > > Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and > that is probably preferred for anything using C). Looks like we haven't > yet had another bump of __FreeBSD_version so I can do that. > There's surely a better way, but this version bump would've actually been really handy for detecting the resulting qemu-user-static fallout. The build was broken for about ~9 days, neither the official builder or my local builder felt compelled to rebuild it absent the bump because I had just built it a couple revisions prior. =-( I'm kind of leaning towards trying to shoehorn a qemu-user-static build into ci.f.o somewhere, though, since it's used as a part of producing some of the weekly snapshot images and digs pretty deeply in other areas. I've got a Cirrus config for qemu-user-static and Cirrus builds it regularly for me, but that's not so helpful when the image it builds against is also tied to the weekly snapshot process. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Mon Dec 7 20:36:34 2020 Return-Path: Delivered-To: svn-src-all@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 60F904B58A8; Mon, 7 Dec 2020 20:36:34 +0000 (UTC) (envelope-from jhb@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 4CqZpp25NBz3nPx; Mon, 7 Dec 2020 20:36:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:b179:6ac9:5f27:584b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id AE6E37D1D; Mon, 7 Dec 2020 20:36:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: Kyle Evans Cc: Steve Wills , src-committers , svn-src-all , svn-src-head References: <202011250010.0AP0AtH3061986@repo.freebsd.org> <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7506dfff-0d35-b71d-fedf-b9c0300205a2@FreeBSD.org> Date: Mon, 7 Dec 2020 12:36:32 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:36:34 -0000 On 12/7/20 11:11 AM, Kyle Evans wrote: > On Mon, Dec 7, 2020 at 12:58 PM John Baldwin wrote: >> >> On 12/6/20 8:51 PM, Steve Wills wrote: >>> Hi, >>> >>> On 11/24/20 7:10 PM, John Baldwin wrote: >>>> Author: jhb >>>> Date: Wed Nov 25 00:10:54 2020 >>>> New Revision: 368005 >>>> URL: https://svnweb.freebsd.org/changeset/base/368005 >>>> >>>> Log: >>>> Remove the cloned file descriptors for /dev/crypto. >>>> >>> >>> Would this change warrant a bump of __FreeBSD_version? I only noticed >>> because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). >> >> Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and >> that is probably preferred for anything using C). Looks like we haven't >> yet had another bump of __FreeBSD_version so I can do that. >> > > There's surely a better way, but this version bump would've actually > been really handy for detecting the resulting qemu-user-static > fallout. The build was broken for about ~9 days, neither the official > builder or my local builder felt compelled to rebuild it absent the > bump because I had just built it a couple revisions prior. =-( > > I'm kind of leaning towards trying to shoehorn a qemu-user-static > build into ci.f.o somewhere, though, since it's used as a part of > producing some of the weekly snapshot images and digs pretty deeply in > other areas. I've got a Cirrus config for qemu-user-static and Cirrus > builds it regularly for me, but that's not so helpful when the image > it builds against is also tied to the weekly snapshot process. qemu-user uses this flag? What on earth can it be using it for? -- John Baldwin From owner-svn-src-all@freebsd.org Mon Dec 7 20:36:59 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Dec 7 20:37:52 2020 Return-Path: Delivered-To: svn-src-all@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 657014B5988; Mon, 7 Dec 2020 20:37:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqZrJ2P67z3nnh; Mon, 7 Dec 2020 20:37:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 43F0D756C; Mon, 7 Dec 2020 20:37:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f41.google.com with SMTP id b18so3680681qvt.10; Mon, 07 Dec 2020 12:37:52 -0800 (PST) X-Gm-Message-State: AOAM532nYi+j1AwyXqkwS30sNWXTM9KRlpxrQJasX308g6ljRweTDy5l gu2aJtX9XXOrgovETpBK2bFX5pAcsUAw5IdiP8E= X-Google-Smtp-Source: ABdhPJy4pkkBAwokjBLFXvGvlhztBAc6LsYltjPeYuL8N8F5WiFjK88EgisoS7fa52AcmK+iG7T8gXrKwJvtXoNArQw= X-Received: by 2002:a0c:b59a:: with SMTP id g26mr23149778qve.26.1607373471877; Mon, 07 Dec 2020 12:37:51 -0800 (PST) MIME-Version: 1.0 References: <202011250010.0AP0AtH3061986@repo.freebsd.org> <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> <7506dfff-0d35-b71d-fedf-b9c0300205a2@FreeBSD.org> In-Reply-To: <7506dfff-0d35-b71d-fedf-b9c0300205a2@FreeBSD.org> From: Kyle Evans Date: Mon, 7 Dec 2020 14:37:36 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: John Baldwin Cc: Steve Wills , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:37:52 -0000 On Mon, Dec 7, 2020 at 2:36 PM John Baldwin wrote: > > On 12/7/20 11:11 AM, Kyle Evans wrote: > > On Mon, Dec 7, 2020 at 12:58 PM John Baldwin wrote: > >> > >> On 12/6/20 8:51 PM, Steve Wills wrote: > >>> Hi, > >>> > >>> On 11/24/20 7:10 PM, John Baldwin wrote: > >>>> Author: jhb > >>>> Date: Wed Nov 25 00:10:54 2020 > >>>> New Revision: 368005 > >>>> URL: https://svnweb.freebsd.org/changeset/base/368005 > >>>> > >>>> Log: > >>>> Remove the cloned file descriptors for /dev/crypto. > >>>> > >>> > >>> Would this change warrant a bump of __FreeBSD_version? I only noticed > >>> because PR 251470 (radare2 not building due to KF_TYPE_CRYPTO). > >> > >> Hmm, perhaps so, though ports could also use #ifdef KF_TYPE_CRYPTO (and > >> that is probably preferred for anything using C). Looks like we haven't > >> yet had another bump of __FreeBSD_version so I can do that. > >> > > > > There's surely a better way, but this version bump would've actually > > been really handy for detecting the resulting qemu-user-static > > fallout. The build was broken for about ~9 days, neither the official > > builder or my local builder felt compelled to rebuild it absent the > > bump because I had just built it a couple revisions prior. =-( > > > > I'm kind of leaning towards trying to shoehorn a qemu-user-static > > build into ci.f.o somewhere, though, since it's used as a part of > > producing some of the weekly snapshot images and digs pretty deeply in > > other areas. I've got a Cirrus config for qemu-user-static and Cirrus > > builds it regularly for me, but that's not so helpful when the image > > it builds against is also tied to the weekly snapshot process. > > qemu-user uses this flag? What on earth can it be using it for? > It was faithfully responding that it wasn't implemented to any target-application usage, apparently. :-) From owner-svn-src-all@freebsd.org Mon Dec 7 20:41:46 2020 Return-Path: Delivered-To: svn-src-all@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 63BEB4B58FB; Mon, 7 Dec 2020 20:41:46 +0000 (UTC) (envelope-from jhb@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 4CqZwp24jRz3pQR; Mon, 7 Dec 2020 20:41:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:b179:6ac9:5f27:584b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id AE7DD763F; Mon, 7 Dec 2020 20:41:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: Kyle Evans Cc: Steve Wills , src-committers , svn-src-all , svn-src-head References: <202011250010.0AP0AtH3061986@repo.freebsd.org> <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> <7506dfff-0d35-b71d-fedf-b9c0300205a2@FreeBSD.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <63620a02-ba74-7728-385d-41f473d80afe@FreeBSD.org> Date: Mon, 7 Dec 2020 12:41:44 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:41:46 -0000 On 12/7/20 12:37 PM, Kyle Evans wrote: > On Mon, Dec 7, 2020 at 2:36 PM John Baldwin wrote: >> >> qemu-user uses this flag? What on earth can it be using it for? >> > > It was faithfully responding that it wasn't implemented to any > target-application usage, apparently. :-) I mean, it is only a flag in the struct kinfo_file flags field. Even if it is doing some kind of compat shim for kinfo_file it should just copy the flags field across, not be checking any of the bits. Does it try to log the type of a file descriptor in debug traces perhaps? -- John Baldwin From owner-svn-src-all@freebsd.org Mon Dec 7 20:44:54 2020 Return-Path: Delivered-To: svn-src-all@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 A21E94B59FA; Mon, 7 Dec 2020 20:44:54 +0000 (UTC) (envelope-from kevans@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 4Cqb0Q44Qyz3plc; Mon, 7 Dec 2020 20:44:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 79FF07B96; Mon, 7 Dec 2020 20:44:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f178.google.com with SMTP id z11so4835339qkj.7; Mon, 07 Dec 2020 12:44:54 -0800 (PST) X-Gm-Message-State: AOAM532dumpZgeA8WzJhM0AJm+gmivp0HeQD6ZwD0gU6qXB7KHL8vYnl EcT3aoTVRJANIcNxj9SGbjNEreiJk3ZZG2KIQAM= X-Google-Smtp-Source: ABdhPJyzBEeDZEQ0DZbDXCJO+CMP9zpqZRsmaUHbQjeeeTOhNysMVkrXgTFMwdF46xnZ1RaXTh3EthkplqJaJQqczW8= X-Received: by 2002:a05:620a:14a:: with SMTP id e10mr9046512qkn.103.1607373894100; Mon, 07 Dec 2020 12:44:54 -0800 (PST) MIME-Version: 1.0 References: <202011250010.0AP0AtH3061986@repo.freebsd.org> <9f48b622-2596-f3c4-0aff-f0b57e8022ea@FreeBSD.org> <43f82b24-a1d0-8e48-a405-58e8bbda0c12@FreeBSD.org> <7506dfff-0d35-b71d-fedf-b9c0300205a2@FreeBSD.org> <63620a02-ba74-7728-385d-41f473d80afe@FreeBSD.org> In-Reply-To: <63620a02-ba74-7728-385d-41f473d80afe@FreeBSD.org> From: Kyle Evans Date: Mon, 7 Dec 2020 14:44:40 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368005 - in head: lib/libprocstat share/man/man4 sys/opencrypto sys/sys tools/tools/crypto usr.bin/procstat To: John Baldwin Cc: Steve Wills , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:44:54 -0000 On Mon, Dec 7, 2020 at 2:41 PM John Baldwin wrote: > > On 12/7/20 12:37 PM, Kyle Evans wrote: > > On Mon, Dec 7, 2020 at 2:36 PM John Baldwin wrote: > >> > >> qemu-user uses this flag? What on earth can it be using it for? > >> > > > > It was faithfully responding that it wasn't implemented to any > > target-application usage, apparently. :-) > > I mean, it is only a flag in the struct kinfo_file flags field. Even > if it is doing some kind of compat shim for kinfo_file it should just > copy the flags field across, not be checking any of the bits. Does it > try to log the type of a file descriptor in debug traces perhaps? > Apparently we were just that convinced we needed to enumerate the values we didn't have to touch, see: https://github.com/seanbruno/qemu-bsd-user/pull/150/files -> it was actually CRIOGET that we referenced for the sole purpose of declaring it unsupported. From owner-svn-src-all@freebsd.org Mon Dec 7 20:57:49 2020 Return-Path: Delivered-To: svn-src-all@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 8D23F4B6663 for ; Mon, 7 Dec 2020 20:57:49 +0000 (UTC) (envelope-from 3SpfOXwsJC7cmXZhXo.hXkbdjXfi.Zljpsk-poZ-XiicobbYpa.lod@trix.bounces.google.com) Received: from mail-qk1-x747.google.com (mail-qk1-x747.google.com [IPv6:2607:f8b0:4864:20::747]) (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 4CqbHK0pfNz3qh8 for ; Mon, 7 Dec 2020 20:57:48 +0000 (UTC) (envelope-from 3SpfOXwsJC7cmXZhXo.hXkbdjXfi.Zljpsk-poZ-XiicobbYpa.lod@trix.bounces.google.com) Received: by mail-qk1-x747.google.com with SMTP id g28so13628636qka.4 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=SiBocvJLQGRBNvWK8BRLLvRMBxh2ffY772uX7Sr4lJc=; b=OYUyptLwSXpOBOHvZrAFkHjefu4dzZGe7+m28+bamFvPW0EW/RQKPI70RyVRPOrV06 fOrXfhdizQZ7G10f7YoAw8UaN+UCup9zlPls23dit91jop42x0ugodbt2l6dP2aGyFzd cJjbyIZJa0uJfvUJ5TBOxYVREZrrvWDRg7WqEvhxbAm+iT9wnw35HLrEJM41QG2K84kw 8Fci7FoRhIfAZkyIPjlnJJqZQmbkGcgek3T0x/P4lm58BQRkUR6rVXy1o4FVJHiOjrXj d9banKmOItUys5Vh8Er/a9Y6KY2IgCJvlNAr8DiczN5Fd2cFxcmflGijfWCkukqghZX8 sGGQ== 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=SiBocvJLQGRBNvWK8BRLLvRMBxh2ffY772uX7Sr4lJc=; b=hk9EaGsJ16aaA9Hn8dkt+OryPfMABGZwEm8J+KueTu2xitI5IYKovC/iGtVt2qXkcf vtOIVmXhZIZ5JjKTBQq4BO7WSDGFGRkp4ch0w5VofaRJMr/T7KdtRi0dBzyELz1CbKTC z/Ggmv5zSeEIt0nDb5vCSLtmHfzlPw7DO+LfYfu7YBGRHEhpDgJbE0Vh37qpXr7YxFei 5FRsqQon81UOrrmg/KC4NDd4pyaq01DpUbNjxAObXN5ncHnTKqjzuSwEcC5ZiAwtUF21 tGQu7mj3eS2pdHuxAHTN4AcLhGIx41tfSzAW2vbO0Wy8DkISpzcpXTJjAVaOElC7S4MR doag== X-Gm-Message-State: AOAM530GpBF6fqTIWd5VgiIaPpa8hj06drWG/PWDsrUjS+2R0t6TVxt8 CgEVUwlnPVnHvIYhlapRzZB54eb4xAwY1YrK4uzM MIME-Version: 1.0 X-Received: by 2002:a05:6214:768:: with SMTP id f8mt23686755qvz.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:46 +0000 Subject: You get my email From: packar.kane@gmail.com To: svn-src-all@freebsd.org X-Rspamd-Queue-Id: 4CqbHK0pfNz3qh8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=OYUyptLw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of 3SpfOXwsJC7cmXZhXo.hXkbdjXfi.Zljpsk-poZ-XiicobbYpa.lod@trix.bounces.google.com designates 2607:f8b0:4864:20::747 as permitted sender) smtp.mailfrom=3SpfOXwsJC7cmXZhXo.hXkbdjXfi.Zljpsk-poZ-XiicobbYpa.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,3SpfOXwsJC7cmXZhXo.hXkbdjXfi.Zljpsk-poZ-XiicobbYpa.lod@trix.bounces.google.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::747:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[packarkane@gmail.com,3SpfOXwsJC7cmXZhXo.hXkbdjXfi.Zljpsk-poZ-XiicobbYpa.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-all@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::747:from:127.0.2.255]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::747:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 20:57:49 -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-all@freebsd.org Tue Dec 8 00:35:13 2020 Return-Path: Delivered-To: svn-src-all@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 D945F4BB452; Tue, 8 Dec 2020 00:35:13 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cqh695npnz4XQk; Tue, 8 Dec 2020 00:35:13 +0000 (UTC) (envelope-from mhorne@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 B55212FB5; Tue, 8 Dec 2020 00:35:13 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B80ZDoc009934; Tue, 8 Dec 2020 00:35:13 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B80ZDIr009933; Tue, 8 Dec 2020 00:35:13 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012080035.0B80ZDIr009933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 8 Dec 2020 00:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368421 - in head/release: . tools X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/release: . tools X-SVN-Commit-Revision: 368421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 00:35:13 -0000 Author: mhorne Date: Tue Dec 8 00:35:13 2020 New Revision: 368421 URL: https://svnweb.freebsd.org/changeset/base/368421 Log: release.sh: add support for RISC-V embedded builds Since the few existing RISC-V hardware platforms are single board computers, we can piggyback off of arm/arm64's embedded build support for generating SD card images. I don't see a pressing need to change the naming in this file at this time. Reviewed by: gjb, manu Differential Revision: https://reviews.freebsd.org/D27043 Modified: head/release/release.sh head/release/tools/arm.subr Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Tue Dec 8 00:05:43 2020 (r368420) +++ head/release/release.sh Tue Dec 8 00:35:13 2020 (r368421) @@ -144,7 +144,7 @@ env_check() { WITH_COMPRESSED_IMAGES= NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in - arm:arm*|arm64:aarch64) + arm:arm*|arm64:aarch64|riscv:riscv64*) chroot_build_release_cmd="chroot_arm_build_release" ;; *) @@ -400,6 +400,9 @@ efi_boot_name() amd64) echo "bootx64.efi" ;; + riscv) + echo "bootriscv64.efi" + ;; esac } @@ -407,7 +410,7 @@ efi_boot_name() chroot_arm_build_release() { load_target_env case ${EMBEDDED_TARGET} in - arm|arm64) + arm|arm64|riscv) if [ -e "${RELENGDIR}/tools/arm.subr" ]; then . "${RELENGDIR}/tools/arm.subr" fi Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Tue Dec 8 00:05:43 2020 (r368420) +++ head/release/tools/arm.subr Tue Dec 8 00:35:13 2020 (r368421) @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# Common subroutines used to build arm SD card images. +# Common subroutines used to build arm, arm64, or RISC-V SD card images. # # $FreeBSD$ # @@ -265,11 +265,11 @@ arm_install_boot() { } arm_install_uboot() { - # Override in the arm/KERNEL.conf file. + # Override in the ${EMBEDDED_TARGET}/${BOARDNAME}.conf file. return 0 } arm_do_quirk() { - # Override in the arm{,64}/BOARD.conf file. + # Override in the ${EMBEDDED_TARGET}/${BOARDNAME}.conf file. } From owner-svn-src-all@freebsd.org Tue Dec 8 00:37:12 2020 Return-Path: Delivered-To: svn-src-all@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 500BE4BB5E5; Tue, 8 Dec 2020 00:37:12 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cqh8S1r77z4Xmv; Tue, 8 Dec 2020 00:37:12 +0000 (UTC) (envelope-from mhorne@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 31D742C6F; Tue, 8 Dec 2020 00:37:12 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B80bC90010062; Tue, 8 Dec 2020 00:37:12 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B80bBfk010060; Tue, 8 Dec 2020 00:37:11 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012080037.0B80bBfk010060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 8 Dec 2020 00:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368422 - in head: release/tools tools/boot X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head: release/tools tools/boot X-SVN-Commit-Revision: 368422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 00:37:12 -0000 Author: mhorne Date: Tue Dec 8 00:37:11 2020 New Revision: 368422 URL: https://svnweb.freebsd.org/changeset/base/368422 Log: riscv: allow building virtual machine images RISC-V has the same booting requirements as arm64 (loader.efi, no legacy boot options), so generated images for both architectures have the same partition layout. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D27044 Modified: head/release/tools/vmimage.subr head/tools/boot/install-boot.sh Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Tue Dec 8 00:35:13 2020 (r368421) +++ head/release/tools/vmimage.subr Tue Dec 8 00:37:11 2020 (r368422) @@ -30,7 +30,7 @@ write_partition_layout() { -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" ;; - arm64:aarch64) + arm64:aarch64 | riscv:riscv64*) ESP=yes SCHEME=gpt BOOTPARTS= Modified: head/tools/boot/install-boot.sh ============================================================================== --- head/tools/boot/install-boot.sh Tue Dec 8 00:35:13 2020 (r368421) +++ head/tools/boot/install-boot.sh Tue Dec 8 00:37:11 2020 (r368422) @@ -38,6 +38,7 @@ get_uefi_bootname() { arm64) echo bootaa64 ;; i386) echo bootia32 ;; arm) echo bootarm ;; + riscv) echo bootriscv64 ;; *) die "machine type $(uname -m) doesn't support UEFI" ;; esac } From owner-svn-src-all@freebsd.org Tue Dec 8 00:42:04 2020 Return-Path: Delivered-To: svn-src-all@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 822E84BB94F; Tue, 8 Dec 2020 00:42:04 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CqhG43JhBz4YD7; Tue, 8 Dec 2020 00:42:04 +0000 (UTC) (envelope-from mhorne@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 64D7C2FD1; Tue, 8 Dec 2020 00:42:04 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B80g4Zu013705; Tue, 8 Dec 2020 00:42:04 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B80g3un013704; Tue, 8 Dec 2020 00:42:03 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012080042.0B80g3un013704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 8 Dec 2020 00:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368423 - head/release/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/release/riscv X-SVN-Commit-Revision: 368423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 00:42:04 -0000 Author: mhorne Date: Tue Dec 8 00:42:03 2020 New Revision: 368423 URL: https://svnweb.freebsd.org/changeset/base/368423 Log: RISC-V release confs Add two release flavors for RISC-V. First, the traditional "big-iron" images, capable of generating distribution sets and VM images. Installer images won't be built yet, but can be trivially enabled in the future with the addition of riscv/make-memstick.sh. Second, a GENERICSD embedded image. I've opted for this instead of board-specific SD card images as it allows users to just dd the u-boot they want. The RISC-V hardware ecosystem is still young, so a configuration for e.g. the new PolarFire SoC Icicle Kit would likely see very few users. Reviewed by: gjb Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27045 Added: head/release/riscv/ head/release/riscv/GENERICSD.conf (contents, props changed) head/release/riscv/riscv64.conf (contents, props changed) Added: head/release/riscv/GENERICSD.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/riscv/GENERICSD.conf Tue Dec 8 00:42:03 2020 (r368423) @@ -0,0 +1,16 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDED_TARGET_ARCH="riscv64" +EMBEDDED_TARGET="riscv" +EMBEDDEDBUILD=1 +FAT_SIZE="54m -b 1m" +FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" +MD_ARGS="-x 63 -y 255" +NODOC=1 +PART_SCHEME="GPT" +export BOARDNAME="GENERICSD" Added: head/release/riscv/riscv64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/riscv/riscv64.conf Tue Dec 8 00:42:03 2020 (r368423) @@ -0,0 +1,8 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +TARGET="riscv" +TARGET_ARCH="riscv64" +KERNEL="GENERIC" From owner-svn-src-all@freebsd.org Tue Dec 8 00:48:53 2020 Return-Path: Delivered-To: svn-src-all@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 3C1034BB9C3; Tue, 8 Dec 2020 00:48:53 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CqhPw440Qz4YYV; Tue, 8 Dec 2020 00:48:51 +0000 (UTC) (envelope-from mhorne@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 753472DEA; Tue, 8 Dec 2020 00:48:51 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B80mpoC016850; Tue, 8 Dec 2020 00:48:51 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B80mp77016849; Tue, 8 Dec 2020 00:48:51 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012080048.0B80mp77016849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 8 Dec 2020 00:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368424 - head/release X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 368424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 00:48:54 -0000 Author: mhorne Date: Tue Dec 8 00:48:50 2020 New Revision: 368424 URL: https://svnweb.freebsd.org/changeset/base/368424 Log: release: don't checksum images if there are none For platforms that don't have any of the memstick, cdrom, or dvdrom release images (i.e. riscv64), the release-install target will trip up when invoking md5(1) on the non-existent image files. Skipping this allows the install to complete successfully. Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Dec 8 00:42:03 2020 (r368423) +++ head/release/Makefile Tue Dec 8 00:48:50 2020 (r368424) @@ -317,6 +317,7 @@ release-install: mkdir -p ${DESTDIR} .endif cp -a ftp ${DESTDIR}/ +.if !empty(IMAGES) .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} . if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -325,6 +326,7 @@ release-install: .endfor cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 +.endif .include "${.CURDIR}/Makefile.inc1" .include "${.CURDIR}/Makefile.vm" From owner-svn-src-all@freebsd.org Tue Dec 8 00:49:32 2020 Return-Path: Delivered-To: svn-src-all@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 019444BB8F8; Tue, 8 Dec 2020 00:49:32 +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 4CqhQg6g5nz4YQh; Tue, 8 Dec 2020 00:49:31 +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 D7B9732BC; Tue, 8 Dec 2020 00:49:31 +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 0B80nVNZ016928; Tue, 8 Dec 2020 00:49:31 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B80nVO7016927; Tue, 8 Dec 2020 00:49:31 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202012080049.0B80nVO7016927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 8 Dec 2020 00:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368425 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 368425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 00:49:32 -0000 Author: mckusick Date: Tue Dec 8 00:49:31 2020 New Revision: 368425 URL: https://svnweb.freebsd.org/changeset/base/368425 Log: In ext2fs, BA_CLRBUF is used in ext2_balloc() not UFS_BALLOC(). Noted by: kib MFC after: 3 days Sponsored by: Netflix Modified: head/sys/fs/ext2fs/ext2_extern.h Modified: head/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extern.h Tue Dec 8 00:48:50 2020 (r368424) +++ head/sys/fs/ext2fs/ext2_extern.h Tue Dec 8 00:49:31 2020 (r368425) @@ -141,7 +141,7 @@ void ext2_gd_csum_set(struct m_ext2fs *); * 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. + * 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. */ From owner-svn-src-all@freebsd.org Tue Dec 8 00:58:03 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 01:44:17 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 01:45:37 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 01:46:44 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 01:47:59 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 03:43:01 2020 Return-Path: Delivered-To: svn-src-all@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 221D94706E2; Tue, 8 Dec 2020 03:43:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CqmGs0XMKz4lmp; Tue, 8 Dec 2020 03:43:01 +0000 (UTC) (envelope-from ngie@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 05D2B5C12; Tue, 8 Dec 2020 03:43:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B83h0c5029356; Tue, 8 Dec 2020 03:43:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B83h0U0029355; Tue, 8 Dec 2020 03:43:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012080343.0B83h0U0029355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 8 Dec 2020 03:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368431 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 03:43:01 -0000 Author: ngie Date: Tue Dec 8 03:43:00 2020 New Revision: 368431 URL: https://svnweb.freebsd.org/changeset/base/368431 Log: extattr_get_fd(2): fix manlint errors - The CAVEATS section was misspelled as "CAVEAT". - The CAVEATS section should come before the "BUGS" section and after other existing sections by convention. MFC after: 1 week Reported by: make manlint Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 ============================================================================== --- head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 01:47:59 2020 (r368430) +++ head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 03:43:00 2020 (r368431) @@ -167,10 +167,6 @@ is attribute-specific. .Pp For more information on named extended attributes, please see .Xr extattr 9 . -.Sh CAVEAT -This interface is under active development, and as such is subject to -change as applications are adapted to use it. -Developers are discouraged from relying on its stability. .Sh RETURN VALUES If successful, the .Fn extattr_get_file , @@ -264,6 +260,10 @@ Project, and introduced in .Fx 5.0 . It was developed to support security extensions requiring additional labels to be associated with each file or directory. +.Sh CAVEATS +This interface is under active development, and as such is subject to +change as applications are adapted to use it. +Developers are discouraged from relying on its stability. .Sh BUGS In earlier versions of this API, passing an empty string for the attribute name to From owner-svn-src-all@freebsd.org Tue Dec 8 03:48:06 2020 Return-Path: Delivered-To: svn-src-all@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 2E1304706F6; Tue, 8 Dec 2020 03:48:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CqmNk0pxgz4lr0; Tue, 8 Dec 2020 03:48:06 +0000 (UTC) (envelope-from ngie@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 0EE5D5C13; Tue, 8 Dec 2020 03:48:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B83m5SJ029680; Tue, 8 Dec 2020 03:48:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B83m5oh029679; Tue, 8 Dec 2020 03:48:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012080348.0B83m5oh029679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 8 Dec 2020 03:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368432 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 03:48:06 -0000 Author: ngie Date: Tue Dec 8 03:48:05 2020 New Revision: 368432 URL: https://svnweb.freebsd.org/changeset/base/368432 Log: lio_listio(2): fix manlint error The date with .Dd prior to this change isn't canonically spelled out: it should have been "December", not "Dec". MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/lio_listio.2 Modified: head/lib/libc/sys/lio_listio.2 ============================================================================== --- head/lib/libc/sys/lio_listio.2 Tue Dec 8 03:43:00 2020 (r368431) +++ head/lib/libc/sys/lio_listio.2 Tue Dec 8 03:48:05 2020 (r368432) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 7, 2019 +.Dd December 7, 2019 .Dt LIO_LISTIO 2 .Os .Sh NAME From owner-svn-src-all@freebsd.org Tue Dec 8 04:01:04 2020 Return-Path: Delivered-To: svn-src-all@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 7DB95470ECE; Tue, 8 Dec 2020 04:01:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cqmgh3DCrz4m73; Tue, 8 Dec 2020 04:01:04 +0000 (UTC) (envelope-from ngie@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 618935D1E; Tue, 8 Dec 2020 04:01:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8414e9036927; Tue, 8 Dec 2020 04:01:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8414cc036926; Tue, 8 Dec 2020 04:01:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012080401.0B8414cc036926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 8 Dec 2020 04:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368433 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 04:01:04 -0000 Author: ngie Date: Tue Dec 8 04:01:03 2020 New Revision: 368433 URL: https://svnweb.freebsd.org/changeset/base/368433 Log: extattr_get_file(2): sort syscalls alphabetically Although some sections of the manpage sort the syscalls alphabetically, many core areas of the manpage do not. Sort the syscalls so it is easier to pick out functional changes and to improve manpage readability. This formatting change is also being done to make future functional changes easier to spot. MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 ============================================================================== --- head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 03:48:05 2020 (r368432) +++ head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:01:03 2020 (r368433) @@ -30,48 +30,48 @@ .Dt EXTATTR 2 .Os .Sh NAME -.Nm extattr_get_fd , -.Nm extattr_set_fd , .Nm extattr_delete_fd , -.Nm extattr_list_fd , -.Nm extattr_get_file , -.Nm extattr_set_file , .Nm extattr_delete_file , -.Nm extattr_list_file , -.Nm extattr_get_link , -.Nm extattr_set_link , .Nm extattr_delete_link , -.Nm extattr_list_link +.Nm extattr_get_fd , +.Nm extattr_get_file , +.Nm extattr_get_link , +.Nm extattr_list_fd , +.Nm extattr_list_file , +.Nm extattr_list_link , +.Nm extattr_set_fd , +.Nm extattr_set_file , +.Nm extattr_set_link .Nd system calls to manipulate VFS extended attributes .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In sys/types.h .In sys/extattr.h -.Ft ssize_t -.Fn extattr_get_fd "int fd" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" -.Ft ssize_t -.Fn extattr_set_fd "int fd" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft int .Fn extattr_delete_fd "int fd" "int attrnamespace" "const char *attrname" +.Ft int +.Fn extattr_delete_file "const char *path" "int attrnamespace" "const char *attrname" +.Ft int +.Fn extattr_delete_link "const char *path" "int attrnamespace" "const char *attrname" .Ft ssize_t -.Fn extattr_list_fd "int fd" "int attrnamespace" "void *data" "size_t nbytes" +.Fn extattr_get_fd "int fd" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" .Ft ssize_t .Fn extattr_get_file "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_set_file "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" -.Ft int -.Fn extattr_delete_file "const char *path" "int attrnamespace" "const char *attrname" +.Fn extattr_get_link "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" .Ft ssize_t +.Fn extattr_list_fd "int fd" "int attrnamespace" "void *data" "size_t nbytes" +.Ft ssize_t .Fn extattr_list_file "const char *path" "int attrnamespace" "void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_get_link "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" +.Fn extattr_list_link "const char *path" "int attrnamespace" "void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_set_link "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" -.Ft int -.Fn extattr_delete_link "const char *path" "int attrnamespace" "const char *attrname" +.Fn extattr_set_fd "int fd" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft ssize_t -.Fn extattr_list_link "const char *path" "int attrnamespace" "void *data" "size_t nbytes" +.Fn extattr_set_file "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" +.Ft ssize_t +.Fn extattr_set_link "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Sh DESCRIPTION Named extended attributes are meta-data associated with vnodes representing files and directories. From owner-svn-src-all@freebsd.org Tue Dec 8 04:05:20 2020 Return-Path: Delivered-To: svn-src-all@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 114CC471399; Tue, 8 Dec 2020 04:05:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cqmmc039sz4mVR; Tue, 8 Dec 2020 04:05:20 +0000 (UTC) (envelope-from ngie@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 E481F5A59; Tue, 8 Dec 2020 04:05:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B845Juw042007; Tue, 8 Dec 2020 04:05:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B845JUS042006; Tue, 8 Dec 2020 04:05:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012080405.0B845JUS042006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 8 Dec 2020 04:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368434 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 04:05:20 -0000 Author: ngie Date: Tue Dec 8 04:05:19 2020 New Revision: 368434 URL: https://svnweb.freebsd.org/changeset/base/368434 Log: extattr_get_file(2): fix more formatting - Remove an unnecessary trailing comma separating a two-item clause. - Sort more function calls alphabetically (in the same vein as r368433). MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 ============================================================================== --- head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:01:03 2020 (r368433) +++ head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:05:19 2020 (r368434) @@ -101,7 +101,7 @@ Each list entry consists of a single byte containing t of the attribute name, followed by the attribute name. The attribute name is not terminated by ASCII 0 (nul). The -.Fn extattr_get_file , +.Fn extattr_get_file and .Fn extattr_list_file calls consume the @@ -135,10 +135,10 @@ they do not follow symlinks. .Pp The .Fn extattr_get_fd , -.Fn extattr_set_fd , .Fn extattr_delete_fd , -and .Fn extattr_list_fd , +and +.Fn extattr_set_fd calls are identical to their .Qq Li _file counterparts except for the first argument. From owner-svn-src-all@freebsd.org Tue Dec 8 04:16:05 2020 Return-Path: Delivered-To: svn-src-all@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 B68DB47163A; Tue, 8 Dec 2020 04:16:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cqn114jDGz4n33; Tue, 8 Dec 2020 04:16:05 +0000 (UTC) (envelope-from ngie@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 9446E601D; Tue, 8 Dec 2020 04:16:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B84G5LD048394; Tue, 8 Dec 2020 04:16:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B84G5kJ048393; Tue, 8 Dec 2020 04:16:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012080416.0B84G5kJ048393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 8 Dec 2020 04:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368435 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 04:16:05 -0000 Author: ngie Date: Tue Dec 8 04:16:05 2020 New Revision: 368435 URL: https://svnweb.freebsd.org/changeset/base/368435 Log: extattr_get_file(2): clarify RETURN VALUES While some of the syscalls' behavior were documented and implied in the RETURN VALUES section by earlier, e.g., the DESCRIPTION sections, as having behavior of the other calls (`*_fd` vs `*_file` vs `*_link`), there was a lot of implied return value behavior in the section prior to this change. Explicitly document the syscall behavior per the current implementation in sys/kern/vfs_extattr.c so others can better develop based on its explicit documented behavior instead of having to digest the context of the manpage to understand the appropriate behavior. MFC after: 1 week MFC with: r368431, r368433, r368434 Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 ============================================================================== --- head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:05:19 2020 (r368434) +++ head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:16:05 2020 (r368435) @@ -169,21 +169,32 @@ For more information on named extended attributes, ple .Xr extattr 9 . .Sh RETURN VALUES If successful, the +.Fn extattr_get_fd , .Fn extattr_get_file , +.Fn extattr_get_link , +.Fn extattr_list_fd , +.Fn extattr_list_file , +.Fn extattr_list_link , +.Fn extattr_set_fd , .Fn extattr_set_file , and -.Fn extattr_list_file +.Fn extattr_set_link calls return the number of bytes that were read or written from the .Fa data , -respectively, or if +respectively. +If .Fa data was .Dv NULL , then -.Fn extattr_get_file +.Fn extattr_get_fd , +.Fn extattr_get_file , +.Fn extattr_get_link , +.Fn extattr_list_fd , +.Fn extattr_list_file , and -.Fn extattr_list_file +.Fn extattr_list_link return the number of bytes available to read. If any of the calls are unsuccessful, the value \-1 is returned and the global variable From owner-svn-src-all@freebsd.org Tue Dec 8 04:18:16 2020 Return-Path: Delivered-To: svn-src-all@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 EE8484713E4; Tue, 8 Dec 2020 04:18:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cqn3X6SRNz4n1F; Tue, 8 Dec 2020 04:18:16 +0000 (UTC) (envelope-from ngie@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 CC31E5ED2; Tue, 8 Dec 2020 04:18:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B84IGuh048537; Tue, 8 Dec 2020 04:18:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B84IGWG048536; Tue, 8 Dec 2020 04:18:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012080418.0B84IGWG048536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 8 Dec 2020 04:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368436 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 04:18:17 -0000 Author: ngie Date: Tue Dec 8 04:18:16 2020 New Revision: 368436 URL: https://svnweb.freebsd.org/changeset/base/368436 Log: extattr_get_file(20: bump .Dd This is being done for the formatting and context changes. While the net content hasn't been changed, the content/context changes were sufficient to warrant the date bump. MFC after: 1 week MFC with: r368431, r368433, r368434, r368435 Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/extattr_get_file.2 Modified: head/lib/libc/sys/extattr_get_file.2 ============================================================================== --- head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:16:05 2020 (r368435) +++ head/lib/libc/sys/extattr_get_file.2 Tue Dec 8 04:18:16 2020 (r368436) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 29, 2008 +.Dd December 7, 2020 .Dt EXTATTR 2 .Os .Sh NAME From owner-svn-src-all@freebsd.org Tue Dec 8 07:47:30 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 08:20:30 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 14:05:26 2020 Return-Path: Delivered-To: svn-src-all@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 45FA94A12B3; Tue, 8 Dec 2020 14:05:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr2521VL8z3rPv; Tue, 8 Dec 2020 14:05:26 +0000 (UTC) (envelope-from kevans@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 2197A15826; Tue, 8 Dec 2020 14:05:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8E5P2g029096; Tue, 8 Dec 2020 14:05:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8E5PJM029095; Tue, 8 Dec 2020 14:05:25 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012081405.0B8E5PJM029095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 8 Dec 2020 14:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368439 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 368439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 14:05:26 -0000 Author: kevans Date: Tue Dec 8 14:05:25 2020 New Revision: 368439 URL: https://svnweb.freebsd.org/changeset/base/368439 Log: src.opts.mk: switch to bsdgrep as /usr/bin/grep This has been years in the making, and we all knew it was bound to happen some day. Switch to the BSDL grep implementation now that it's been a little more thoroughly tested and theoretically supports all of the extensions that gnugrep in base had with our libregex(3). Folks shouldn't really notice much from this update; bsdgrep is slower than gnugrep, but this is currently the price to pay for fewer bugs. Those dissatisfied with the speed of grep and in need of a faster implementation should check out what textproc/ripgrep and textproc/the_silver_searcher can do for them. I have some WIP to make bsdgrep faster, but do not consider it a blocker when compared to the pros of switching now (aforementioned bugs, licensing). PR: 228798 (exp-run) PR: 128645, 156704, 166842, 166862, 180937, 193835, 201650 PR: 232565, 242308, 246000, 251081, 191086, 194397 Relnotes: yes, please Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Dec 8 08:20:30 2020 (r368438) +++ head/share/mk/src.opts.mk Tue Dec 8 14:05:25 2020 (r368439) @@ -68,6 +68,7 @@ __DEFAULT_YES_OPTIONS = \ BOOTPARAMD \ BOOTPD \ BSD_CPIO \ + BSD_GREP \ BSDINSTALL \ BSNMP \ BZIP2 \ @@ -203,7 +204,6 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BEARSSL \ BHYVE_SNAPSHOT \ - BSD_GREP \ CLANG_EXTRAS \ CLANG_FORMAT \ DTRACE_TESTS \ From owner-svn-src-all@freebsd.org Tue Dec 8 14:05:56 2020 Return-Path: Delivered-To: svn-src-all@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 C48444A12D0; Tue, 8 Dec 2020 14:05:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr25c2N4dz3rss; Tue, 8 Dec 2020 14:05:56 +0000 (UTC) (envelope-from kevans@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 5D37B1582F; Tue, 8 Dec 2020 14:05:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8E5tgo029329; Tue, 8 Dec 2020 14:05:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8E5tuB029328; Tue, 8 Dec 2020 14:05:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012081405.0B8E5tuB029328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 8 Dec 2020 14:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368440 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 368440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 14:05:56 -0000 Author: kevans Date: Tue Dec 8 14:05:54 2020 New Revision: 368440 URL: https://svnweb.freebsd.org/changeset/base/368440 Log: src.conf(5): regen after r368439 (WITH_BSD_GREP default) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Dec 8 14:05:25 2020 (r368439) +++ head/share/man/man5/src.conf.5 Tue Dec 8 14:05:54 2020 (r368440) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd November 13, 2020 +.Dd December 8, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -222,8 +222,8 @@ and related programs. .It Va WITHOUT_BSD_CPIO Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . -.It Va WITH_BSD_GREP -Install BSD-licensed grep as '[ef]grep' instead of GNU grep. +.It Va WITHOUT_BSD_GREP +Install GNU grep as '[ef]grep' instead of BSD grep. .It Va WITHOUT_BSNMP Set to not build or install .Xr bsnmpd 1 @@ -680,10 +680,6 @@ Set to not build GNU .It Va WITHOUT_GNU_GREP Set to not build GNU .Xr grep 1 . -.It Va WITH_GNU_GREP_COMPAT -Set this option to include GNU extensions in -.Xr bsdgrep 1 -by linking against libgnuregex. .It Va WITHOUT_GOOGLETEST Set to neither build nor install .Lb libgmock , From owner-svn-src-all@freebsd.org Tue Dec 8 14:56:15 2020 Return-Path: Delivered-To: svn-src-all@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 CF0534A298E; Tue, 8 Dec 2020 14:56:15 +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 4Cr3Cg59Ghz4RDd; Tue, 8 Dec 2020 14:56:15 +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 9F4A11634C; Tue, 8 Dec 2020 14:56:15 +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 0B8EuFlG060673; Tue, 8 Dec 2020 14:56:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8EuFDo060672; Tue, 8 Dec 2020 14:56:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012081456.0B8EuFDo060672@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 14:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368441 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 368441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 14:56:15 -0000 Author: emaste Date: Tue Dec 8 14:56:15 2020 New Revision: 368441 URL: https://svnweb.freebsd.org/changeset/base/368441 Log: Default to WITHOUT_GDB (GDB 6.1.1) for FreeBSD 13 As discussed on -current, -stable, -toolchain, and with jhb@ and imp@, disable the obsolete in-tree GDB 6.1.1 by default. This was kept only to provide kgdb for the crashinfo tool, but is long-obsolete, does not support all architectures that FreeBSD does, and held back other work (such as forcing the use of DWARF2 for kernel debug). Crashinfo will use kgdb from the gdb package or devel/gdb port, and will privde a message referencing those if no kgdb is found. Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Dec 8 14:05:54 2020 (r368440) +++ head/share/mk/src.opts.mk Tue Dec 8 14:56:15 2020 (r368441) @@ -106,7 +106,6 @@ __DEFAULT_YES_OPTIONS = \ FREEBSD_UPDATE \ FTP \ GAMES \ - GDB \ GH_BC \ GNU_DIFF \ GNU_GREP \ @@ -208,6 +207,7 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ + GDB \ HESIOD \ LIBSOFT \ LOADER_FIREWIRE \ From owner-svn-src-all@freebsd.org Tue Dec 8 15:00:08 2020 Return-Path: Delivered-To: svn-src-all@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 2FFEB4A2B1A; Tue, 8 Dec 2020 15:00:08 +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 4Cr3J80gKDz4RQx; Tue, 8 Dec 2020 15:00:08 +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 09D4D16391; Tue, 8 Dec 2020 15:00:08 +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 0B8F07jE060977; Tue, 8 Dec 2020 15:00:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8F07E3060976; Tue, 8 Dec 2020 15:00:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012081500.0B8F07E3060976@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 15:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368442 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 368442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 15:00:08 -0000 Author: emaste Date: Tue Dec 8 15:00:07 2020 New Revision: 368442 URL: https://svnweb.freebsd.org/changeset/base/368442 Log: regen src.conf.5 after r368441, WITHOUT_GDB default Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Dec 8 14:56:15 2020 (r368441) +++ head/share/man/man5/src.conf.5 Tue Dec 8 15:00:07 2020 (r368442) @@ -656,18 +656,9 @@ and .Xr ftpd 8 . .It Va WITHOUT_GAMES Set to not build games. -.It Va WITHOUT_GDB -Set to not build -.Xr gdb 1 . -.Pp -This is a default setting on -arm64/aarch64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_GDB Set to build .Xr gdb 1 . -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_GH_BC Set to not build and install the enhanced .Xr bc 1 From owner-svn-src-all@freebsd.org Tue Dec 8 15:09:44 2020 Return-Path: Delivered-To: svn-src-all@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 4BBA24A2D8D; Tue, 8 Dec 2020 15:09:44 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr3WD1crwz4S3y; Tue, 8 Dec 2020 15:09:44 +0000 (UTC) (envelope-from n_hibma@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 1F92F16170; Tue, 8 Dec 2020 15:09:44 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8F9iav066945; Tue, 8 Dec 2020 15:09:44 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8F9hm1066939; Tue, 8 Dec 2020 15:09:43 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <202012081509.0B8F9hm1066939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 8 Dec 2020 15:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368443 - in head: share/man/man4 sys/conf sys/modules/netgraph sys/modules/netgraph/macfilter sys/netgraph tests/sys tests/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: in head: share/man/man4 sys/conf sys/modules/netgraph sys/modules/netgraph/macfilter sys/netgraph tests/sys tests/sys/netgraph X-SVN-Commit-Revision: 368443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 15:09:44 -0000 Author: n_hibma Date: Tue Dec 8 15:09:42 2020 New Revision: 368443 URL: https://svnweb.freebsd.org/changeset/base/368443 Log: New Netgraph module ng_macfilter: Macfilter to route packets through different hooks based on sender MAC address. Based on ng_macfilter written by Pekka Nikander Sponsered by Retina b.v. Reviewed by: afedorov MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27268 Added: head/share/man/man4/ng_macfilter.4 (contents, props changed) head/sys/modules/netgraph/macfilter/ head/sys/modules/netgraph/macfilter/Makefile (contents, props changed) - copied, changed from r367755, head/sys/modules/netgraph/tag/Makefile head/sys/netgraph/ng_macfilter.c (contents, props changed) head/sys/netgraph/ng_macfilter.h (contents, props changed) head/tests/sys/netgraph/ head/tests/sys/netgraph/Makefile (contents, props changed) head/tests/sys/netgraph/ng_macfilter_test.sh (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files head/sys/modules/netgraph/Makefile head/tests/sys/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Dec 8 15:00:07 2020 (r368442) +++ head/share/man/man4/Makefile Tue Dec 8 15:09:42 2020 (r368443) @@ -356,6 +356,7 @@ MAN= aac.4 \ ng_l2cap.4 \ ng_l2tp.4 \ ng_lmi.4 \ + ng_macfilter.4 \ ng_mppc.4 \ ng_nat.4 \ ng_netflow.4 \ Added: head/share/man/man4/ng_macfilter.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ng_macfilter.4 Tue Dec 8 15:09:42 2020 (r368443) @@ -0,0 +1,222 @@ +.\" Copyright (c) 2012-2017 Pekka Nikander +.\" Copyright (c) 2018 Retina b.v. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE 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$ +.\" +.Dd December 10, 2018 +.Dt NG_MACFILTER 4 +.Os +.Sh NAME +.Nm ng_macfilter +.Nd packet filtering netgraph node using ethernet MAC addresses +.Sh SYNOPSIS +.In sys/types.h +.In netgraph/ng_macfilter.h +.Sh DESCRIPTION +The +.Nm macfilter +allows routing ethernet packets over different hooks based on the sender MAC +address. +.Pp +This processing is done when traffic flows from the +.Dq ether +hook trough +.Nm macfilter +to one of the outgoing hooks. +Outbound hooks can be added to and remove from +.Nm macfilter +and arbitrarily named. +By default one hook called +.Dq default +is present and used for all packets which have no MAC address in the MAC table. +By adding MAC addresses to the MAC table traffic coming from this host can be +directed out other hooks. +.Nm macfilter +keeps track of packets and bytes from and to this MAC address in the MAC table. +.Pp +Packets are not altered in any way. +If hooks are not connected, packets are +dropped. +.Sh HOOKS +This node type by default has an +.Dv ether +hook, to be connected to the +.Dv lower +hook of the NIC, and a +.Dv default +hook where packets are sent if the MAC adddress is not found in the table. +.Nm macfilter +supports up to +.Dv NG_MACFILTER_UPPER_NUM +hooks to be connected to the NIC's upper hook. +Other nodes can be inserted to provide additional processing. +All outbound can be combined back into one by using +.Dv ng_one2many . +.Sh CONTROL MESSAGES +This node type supports the generic control messages, plus the +following: +.Bl -tag -width foo +.It Dv NGM_MACFILTER_RESET Pq Ic reset +Resets the MAC table in the node. +.It Dv NGM_MACFILTER_DIRECT Pq Ic direct +Takes the following argument struct: +.Bd -literal -offset indent +struct ngm_macfilter_direct { + u_char ether[ETHER_ADDR_LEN]; /* MAC address */ + u_char hookname[NG_HOOKSIZ]; /* Upper hook name*/ +}; +.Ed +The given ethernet MAC address will be forwarded out the named hook. +.It Dv NGM_MACFILTER_DIRECT_HOOKID Pq Ic directi +Takes the following argument struct: +.Bd -literal -offset indent +struct ngm_macfilter_direct_hookid { + u_char ether[ETHER_ADDR_LEN]; /* MAC address */ + u_int16_t hookid; /* Upper hook hookid */ +}; +.Ed +The given ethernet MAC address will be forwarded out the hook at id +.Dv hookid . +.It Dv NGM_MACFILTER_GET_MACS Pq Ic getmacs +Returns the list of MAC addresses in the node in the following structure: +.Bd -literal -offset indent +struct ngm_macfilter_mac { + u_char ether[ETHER_ADDR_LEN]; /* MAC address */ + u_int16_t hookid; /* Upper hook hookid */ + u_int64_t packets_in; /* packets in from downstream */ + u_int64_t bytes_in; /* bytes in from upstream */ + u_int64_t packets_out; /* packets out towards downstream */ + u_int64_t bytes_out; /* bytes out towards downstream */ +}; +struct ngm_macfilter_macs { + u_int32_t n; /* Number of entries in macs */ + struct ngm_macfilter_mac macs[]; /* Macs table */ +}; +.Ed +.It Dv NGM_MACFILTER_GETCLR_MACS Pq Ic getclrmacs +Same as above, but will also atomically clear the +.Dv packets_in , +.Dv bytes_in , +.Dv packets_out , and +.Dv bytes_out +fields in the table. +.It Dv NGM_MACFILTER_CLR_STATS Pq Ic clrmacs +Will clear the per MAC address packet and byte counters. +.It Dv NGM_MACFILTER_GET_HOOKS Pq Ic gethooks +Will return a list of hooks and their hookids in an array of the following struct's: +.Bd -literal -offset indent +struct ngm_macfilter_hook { + u_char hookname[NG_HOOKSIZ]; /* Upper hook name*/ + u_int16_t hookid; /* Upper hook hookid */ + u_int32_t maccnt; /* Number of mac addresses associated with hook */ +}; +.Ed +.El +.Sh SHUTDOWN +This node shuts down upon receipt of a +.Dv NGM_SHUTDOWN +control message or when all have been disconnected. +.Sh EXAMPLES +The following netgraph configuration will apply +.Xr ipfw 8 +tag 42 to each packet that is routed over the +.Dq accepted +hook. +The graph looks like the following: +.Bd -literal -offset indent + /-------[combiner]---------\\ + | + / \\ +[em0] | [tagger] + \\ / + | + \\-----[macfilter]------/ +.Ed +.Pp +Commands: +.Bd -literal -offset indent + ngctl mkpeer em0: macfilter lower ether + ngctl name em0:lower macfilter + + # Funnel both streams back into ether:upper + ngctl mkpeer em0: one2many upper one + ngctl name em0:upper recombiner + # Connect macfilter:default to recombiner:many0 + ngctl connect macfilter: recombiner: default many0 + # Connect macfilter:accepted to tagger:in + ngctl mkpeer macfilter: tag accepted in + ngctl name macfilter:accepted tagger + # Connect tagger:out to recombiner:many1 + ngctl connect tagger: recombiner: out many1 + + # Mark tag all traffic through tagger in -> out with an ipfw tag 42 + ngctl msg tagger: sethookin '{ thisHook="in" ifNotMatch="out" }' + ngctl msg tagger: sethookout '{ thisHook="out" tag_cookie=1148380143 tag_id=42 }' + + # Pass traffic from ether:upper / combiner:one via combiner:many0 on to + # macfilter:default and on to ether:lower. + ngctl msg recombiner: setconfig '{ xmitAlg=3 failAlg=1 enabledLinks=[ 1 1 ] }' +.Ed +.Pp +.Em Note : +The tag_cookie 1148380143 was retrieved from +.Dv MTAG_IPFW +in +.Pa /usr/include/netinet/ip_var.h . +.Pp +The following command can be used to add a MAC address to be output via +.Dv macfilter:accepted : +.Bd -literal -offset indent + ngctl msg macfilter: direct '{ hookname="known" ether=08:00:27:92:eb:aa }' +.Ed +.Pp +The following command can be used to retrieve the packet and byte counters : +.Bd -literal -offset indent + ngctl msg macfilter: getmacs +.Ed +.Pp +It will return the contents of the MAC table: +.Bd -literal -offset indent + Rec'd response "getmacs" (4) from "[54]:": + Args: { n=1 macs=[ { ether=08:00:27:92:eb:aa hookid=1 packets_in=3571 bytes_in=592631 packets_out=3437 bytes_out=777142 } ] } +.Ed +.Sh SEE ALSO +.Xr divert 4 , +.Xr ipfw 4 , +.Xr netgraph 4 , +.Xr ng_ether 4 , +.Xr ng_one2many 4 , +.Xr ng_tag 4 , +.Xr ngctl 8 +.Sh AUTHORS +.An -nosplit +The original version of this code was written by Pekka Nikander, and +subsequently modified heavily by +.An Nick Hibma Aq Mt n_hibma@FreeBSD.org . +.Sh BUGS +None known. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Dec 8 15:00:07 2020 (r368442) +++ head/sys/conf/files Tue Dec 8 15:09:42 2020 (r368443) @@ -4299,6 +4299,7 @@ netgraph/ng_ipfw.c optional netgraph_ipfw inet ipfire netgraph/ng_ksocket.c optional netgraph_ksocket netgraph/ng_l2tp.c optional netgraph_l2tp netgraph/ng_lmi.c optional netgraph_lmi +netgraph/ng_macfilter.c optional netgraph_macfilter netgraph/ng_mppc.c optional netgraph_mppc_compression | \ netgraph_mppc_encryption netgraph/ng_nat.c optional netgraph_nat inet libalias Modified: head/sys/modules/netgraph/Makefile ============================================================================== --- head/sys/modules/netgraph/Makefile Tue Dec 8 15:00:07 2020 (r368442) +++ head/sys/modules/netgraph/Makefile Tue Dec 8 15:09:42 2020 (r368443) @@ -31,6 +31,7 @@ SUBDIR= async \ ksocket \ l2tp \ lmi \ + macfilter \ ${_mppc} \ nat \ netflow \ Copied and modified: head/sys/modules/netgraph/macfilter/Makefile (from r367755, head/sys/modules/netgraph/tag/Makefile) ============================================================================== --- head/sys/modules/netgraph/tag/Makefile Tue Nov 17 10:27:42 2020 (r367755, copy source) +++ head/sys/modules/netgraph/macfilter/Makefile Tue Dec 8 15:09:42 2020 (r368443) @@ -1,6 +1,9 @@ # $FreeBSD$ -KMOD= ng_tag -SRCS= ng_tag.c +KMOD= ng_macfilter +SRCS= ng_macfilter.c .include + +#CFLAGS+= -DNG_MACFILTER_DEBUG +#CFLAGS+= -DNG_MACFILTER_DEBUG_RECVDATA Added: head/sys/netgraph/ng_macfilter.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netgraph/ng_macfilter.c Tue Dec 8 15:09:42 2020 (r368443) @@ -0,0 +1,878 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2002 Ericsson Research & Pekka Nikander + * Copyright (c) 2020 Nick Hibma + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, 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$ + */ + +/* + * MACFILTER NETGRAPH NODE TYPE + * + * This node type routes packets from the ether hook to either the default hook + * if sender MAC address is not in the MAC table, or out over the specified + * hook if it is. + * + * Other node types can then be used to apply specific processing to the + * packets on each hook. + * + * If compiled with NG_MACFILTER_DEBUG the flow and resizing of the MAC table + * are logged to the console. + * + * If compiled with NG_MACFILTER_DEBUG_RECVDATA every packet handled is logged + * on the console. + */ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include "ng_macfilter.h" + +#ifdef NG_SEPARATE_MALLOC +MALLOC_DEFINE(M_NETGRAPH_MACFILTER, "netgraph_macfilter", "netgraph macfilter node "); +#else +#define M_NETGRAPH_MACFILTER M_NETGRAPH +#endif + +#define MACTABLE_BLOCKSIZE 128 /* block size for incrementing table */ + +#ifdef NG_MACFILTER_DEBUG +#define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__) +#else +#define DEBUG(fmt, ...) +#endif +#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" +#define MAC_S_ARGS(v) (v)[0], (v)[1], (v)[2], (v)[3], (v)[4], (v)[5] + +/* + * Parse type for struct ngm_macfilter_direct + */ + +static const struct ng_parse_struct_field macfilter_direct_fields[] + = NGM_MACFILTER_DIRECT_FIELDS; +static const struct ng_parse_type ng_macfilter_direct_type = { + &ng_parse_struct_type, + &macfilter_direct_fields +}; + +/* + * Parse type for struct ngm_macfilter_direct_hookid. + */ + +static const struct ng_parse_struct_field macfilter_direct_ndx_fields[] + = NGM_MACFILTER_DIRECT_NDX_FIELDS; +static const struct ng_parse_type ng_macfilter_direct_hookid_type = { + &ng_parse_struct_type, + &macfilter_direct_ndx_fields +}; + +/* + * Parse types for struct ngm_macfilter_get_macs. + */ +static int +macfilter_get_macs_count(const struct ng_parse_type *type, + const u_char *start, const u_char *buf) +{ + const struct ngm_macfilter_macs *const ngm_macs = + (const struct ngm_macfilter_macs *)(buf - OFFSETOF(struct ngm_macfilter_macs, macs)); + + return ngm_macs->n; +} +static const struct ng_parse_struct_field ng_macfilter_mac_fields[] + = NGM_MACFILTER_MAC_FIELDS; +static const struct ng_parse_type ng_macfilter_mac_type = { + &ng_parse_struct_type, + ng_macfilter_mac_fields, +}; +static const struct ng_parse_array_info ng_macfilter_macs_array_info = { + &ng_macfilter_mac_type, + macfilter_get_macs_count +}; +static const struct ng_parse_type ng_macfilter_macs_array_type = { + &ng_parse_array_type, + &ng_macfilter_macs_array_info +}; +static const struct ng_parse_struct_field ng_macfilter_macs_fields[] + = NGM_MACFILTER_MACS_FIELDS; +static const struct ng_parse_type ng_macfilter_macs_type = { + &ng_parse_struct_type, + &ng_macfilter_macs_fields +}; + +/* + * Parse types for struct ngm_macfilter_get_hooks. + */ +static int +macfilter_get_upper_hook_count(const struct ng_parse_type *type, + const u_char *start, const u_char *buf) +{ + const struct ngm_macfilter_hooks *const ngm_hooks = + (const struct ngm_macfilter_hooks *)(buf - OFFSETOF(struct ngm_macfilter_hooks, hooks)); + + DEBUG("buf %p, ngm_hooks %p, n %d", buf, ngm_hooks, ngm_hooks->n); + + return ngm_hooks->n; +} + +static const struct ng_parse_struct_field ng_macfilter_hook_fields[] + = NGM_MACFILTER_HOOK_FIELDS; +static const struct ng_parse_type ng_macfilter_hook_type = { + &ng_parse_struct_type, + ng_macfilter_hook_fields, +}; +static const struct ng_parse_array_info ng_macfilter_hooks_array_info = { + &ng_macfilter_hook_type, + macfilter_get_upper_hook_count +}; +static const struct ng_parse_type ng_macfilter_hooks_array_type = { + &ng_parse_array_type, + &ng_macfilter_hooks_array_info +}; +static const struct ng_parse_struct_field ng_macfilter_hooks_fields[] + = NGM_MACFILTER_HOOKS_FIELDS; +static const struct ng_parse_type ng_macfilter_hooks_type = { + &ng_parse_struct_type, + &ng_macfilter_hooks_fields +}; + +/* + * List of commands and how to convert arguments to/from ASCII + */ +static const struct ng_cmdlist ng_macfilter_cmdlist[] = { + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_RESET, + "reset", + NULL, + NULL + }, + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_DIRECT, + "direct", + &ng_macfilter_direct_type, + NULL + }, + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_DIRECT_HOOKID, + "directi", + &ng_macfilter_direct_hookid_type, + NULL + }, + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_GET_MACS, + "getmacs", + NULL, + &ng_macfilter_macs_type + }, + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_GETCLR_MACS, + "getclrmacs", + NULL, + &ng_macfilter_macs_type + }, + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_CLR_MACS, + "clrmacs", + NULL, + NULL, + }, + { + NGM_MACFILTER_COOKIE, + NGM_MACFILTER_GET_HOOKS, + "gethooks", + NULL, + &ng_macfilter_hooks_type + }, + { 0 } +}; + +/* + * Netgraph node type descriptor + */ +static ng_constructor_t ng_macfilter_constructor; +static ng_rcvmsg_t ng_macfilter_rcvmsg; +static ng_shutdown_t ng_macfilter_shutdown; +static ng_newhook_t ng_macfilter_newhook; +static ng_rcvdata_t ng_macfilter_rcvdata; +static ng_disconnect_t ng_macfilter_disconnect; + +static struct ng_type typestruct = { + .version = NG_ABI_VERSION, + .name = NG_MACFILTER_NODE_TYPE, + .constructor = ng_macfilter_constructor, + .rcvmsg = ng_macfilter_rcvmsg, + .shutdown = ng_macfilter_shutdown, + .newhook = ng_macfilter_newhook, + .rcvdata = ng_macfilter_rcvdata, + .disconnect = ng_macfilter_disconnect, + .cmdlist = ng_macfilter_cmdlist +}; +NETGRAPH_INIT(macfilter, &typestruct); + +/* + * Per MAC address info: the hook where to send to, the address + * Note: We use the same struct as in the netgraph message, so we can bcopy the + * array. + */ +typedef struct ngm_macfilter_mac *mf_mac_p; + +/* + * Node info + */ +typedef struct { + hook_p mf_ether_hook; /* Ethernet hook */ + + hook_p *mf_upper; /* Upper hooks */ + u_int mf_upper_cnt; /* Allocated # of upper slots */ + + struct mtx mtx; /* Mutex for MACs table */ + mf_mac_p mf_macs; /* MAC info: dynamically allocated */ + u_int mf_mac_allocated;/* Allocated # of MAC slots */ + u_int mf_mac_used; /* Used # of MAC slots */ +} *macfilter_p; + +/* + * Resize the MAC table to accommodate at least mfp->mf_mac_used + 1 entries. + * + * Note: mtx already held + */ +static int +macfilter_mactable_resize(macfilter_p mfp) +{ + int error = 0; + + int n = mfp->mf_mac_allocated; + if (mfp->mf_mac_used < 2*MACTABLE_BLOCKSIZE-1) /* minimum size */ + n = 2*MACTABLE_BLOCKSIZE-1; + else if (mfp->mf_mac_used + 2*MACTABLE_BLOCKSIZE < mfp->mf_mac_allocated) /* reduce size */ + n = mfp->mf_mac_allocated - MACTABLE_BLOCKSIZE; + else if (mfp->mf_mac_used == mfp->mf_mac_allocated) /* increase size */ + n = mfp->mf_mac_allocated + MACTABLE_BLOCKSIZE; + + if (n != mfp->mf_mac_allocated) { + DEBUG("used=%d allocated=%d->%d", + mfp->mf_mac_used, mfp->mf_mac_allocated, n); + + mf_mac_p mfp_new = realloc(mfp->mf_macs, + sizeof(mfp->mf_macs[0])*n, + M_NETGRAPH, M_NOWAIT | M_ZERO); + if (mfp_new == NULL) { + error = -1; + } else { + mfp->mf_macs = mfp_new; + mfp->mf_mac_allocated = n; + } + } + + return error; +} + +/* + * Resets the macfilter to pass all received packets + * to the default hook. + * + * Note: mtx already held + */ +static void +macfilter_reset(macfilter_p mfp) +{ + mfp->mf_mac_used = 0; + + macfilter_mactable_resize(mfp); +} + +/* + * Resets the counts for each MAC address. + * + * Note: mtx already held + */ +static void +macfilter_reset_stats(macfilter_p mfp) +{ + int i; + + for (i = 0; i < mfp->mf_mac_used; i++) { + mf_mac_p p = &mfp->mf_macs[i]; + p->packets_in = p->packets_out = 0; + p->bytes_in = p->bytes_out = 0; + } +} + +/* + * Count the number of matching macs routed to this hook. + * + * Note: mtx already held + */ +static int +macfilter_mac_count(macfilter_p mfp, int hookid) +{ + int i; + int cnt = 0; + + for (i = 0; i < mfp->mf_mac_used; i++) + if (mfp->mf_macs[i].hookid == hookid) + cnt++; + + return cnt; +} + +/* + * Find a MAC address in the mac table. + * + * Returns 0 on failure with *ri set to index before which to insert a new + * element. Or returns 1 on success with *ri set to the index of the element + * that matches. + * + * Note: mtx already held. + */ +static u_int +macfilter_find_mac(macfilter_p mfp, const u_char *ether, u_int *ri) +{ + mf_mac_p mf_macs = mfp->mf_macs; + + u_int base = 0; + u_int range = mfp->mf_mac_used; + while (range > 0) { + u_int middle = base + (range >> 1); /* middle */ + int d = bcmp(ether, mf_macs[middle].ether, ETHER_ADDR_LEN); + if (d == 0) { /* match */ + *ri = middle; + return 1; + } else if (d > 0) { /* move right */ + range -= middle - base + 1; + base = middle + 1; + } else { /* move left */ + range = middle - base; + } + } + + *ri = base; + return 0; +} + +/* + * Change the upper hook for the given MAC address. If the hook id is zero (the + * default hook), the MAC address is removed from the table. Otherwise it is + * inserted to the table at a proper location, and the id of the hook is + * marked. + * + * Note: mtx already held. + */ +static int +macfilter_mactable_change(macfilter_p mfp, u_char *ether, int hookid) +{ + u_int i; + int found = macfilter_find_mac(mfp, ether, &i); + + mf_mac_p mf_macs = mfp->mf_macs; + + DEBUG("ether=" MAC_FMT " found=%d i=%d ether=" MAC_FMT " hookid=%d->%d used=%d allocated=%d", + MAC_S_ARGS(ether), found, i, MAC_S_ARGS(mf_macs[i].ether), + (found? mf_macs[i].hookid:NG_MACFILTER_HOOK_DEFAULT_ID), hookid, + mfp->mf_mac_used, mfp->mf_mac_allocated); + + if (found) { + if (hookid == NG_MACFILTER_HOOK_DEFAULT_ID) { /* drop */ + /* Compress table */ + mfp->mf_mac_used--; + size_t len = (mfp->mf_mac_used - i) * sizeof(mf_macs[0]); + if (len > 0) + bcopy(&mf_macs[i+1], &mf_macs[i], len); + + macfilter_mactable_resize(mfp); + } else { /* modify */ + mf_macs[i].hookid = hookid; + } + } else { + if (hookid == NG_MACFILTER_HOOK_DEFAULT_ID) { /* not found */ + /* not present and not inserted */ + return 0; + } else { /* add */ + if (macfilter_mactable_resize(mfp) == -1) { + return ENOMEM; + } else { + mf_macs = mfp->mf_macs; /* reassign; might have moved during resize */ + + /* make room for new entry, unless appending */ + size_t len = (mfp->mf_mac_used - i) * sizeof(mf_macs[0]); + if (len > 0) + bcopy(&mf_macs[i], &mf_macs[i+1], len); + + mf_macs[i].hookid = hookid; + bcopy(ether, mf_macs[i].ether, ETHER_ADDR_LEN); + + mfp->mf_mac_used++; + } + } + } + + return 0; +} + +static int +macfilter_mactable_remove_by_hookid(macfilter_p mfp, int hookid) +{ + int i, j; + + for (i = 0, j = 0; i < mfp->mf_mac_used; i++) { + if (mfp->mf_macs[i].hookid != hookid) { + if (i != j) + bcopy(&mfp->mf_macs[i], &mfp->mf_macs[j], sizeof(mfp->mf_macs[0])); + j++; + } + } + + int removed = i - j; + mfp->mf_mac_used = j; + macfilter_mactable_resize(mfp); + + return removed; +} + +static int +macfilter_find_hook(macfilter_p mfp, const char *hookname) +{ + int hookid; + + for (hookid = 0; hookid < mfp->mf_upper_cnt; hookid++) { + if (mfp->mf_upper[hookid]) { + if (strncmp(NG_HOOK_NAME(mfp->mf_upper[hookid]), + hookname, NG_HOOKSIZ) == 0) { + return hookid; + } + } + } + + return 0; +} + +static int +macfilter_direct(macfilter_p mfp, struct ngm_macfilter_direct *md) +{ + DEBUG("ether=" MAC_FMT " hook=%s", + MAC_S_ARGS(md->ether), md->hookname); + + int hookid = macfilter_find_hook(mfp, md->hookname); + if (hookid < 0) + return ENOENT; + + return macfilter_mactable_change(mfp, md->ether, hookid); +} + +static int +macfilter_direct_hookid(macfilter_p mfp, struct ngm_macfilter_direct_hookid *mdi) +{ + DEBUG("ether=" MAC_FMT " hookid=%d", + MAC_S_ARGS(mdi->ether), mdi->hookid); + + if (mdi->hookid >= mfp->mf_upper_cnt) + return EINVAL; + else if (mfp->mf_upper[mdi->hookid] == NULL) + return EINVAL; + + return macfilter_mactable_change(mfp, mdi->ether, mdi->hookid); +} + +/* + * Packet handling + */ + +/* + * Pass packets received from any upper hook to + * a lower hook + */ +static int +macfilter_ether_output(hook_p hook, macfilter_p mfp, struct mbuf *m, hook_p *next_hook) +{ + struct ether_header *ether_header = mtod(m, struct ether_header *); + u_char *ether = ether_header->ether_dhost; + + *next_hook = mfp->mf_ether_hook; + + mtx_lock(&mfp->mtx); + + u_int i; + int found = macfilter_find_mac(mfp, ether, &i); + if (found) { + mf_mac_p mf_macs = mfp->mf_macs; + + mf_macs[i].packets_out++; + if (m->m_len > ETHER_HDR_LEN) + mf_macs[i].bytes_out += m->m_len - ETHER_HDR_LEN; + +#ifdef NG_MACFILTER_DEBUG_RECVDATA + DEBUG("ether=" MAC_FMT " len=%db->%lldb: bytes: %s -> %s", + MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, mf_macs[i].bytes_out, + NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); +#endif + } else { +#ifdef NG_MACFILTER_DEBUG_RECVDATA + DEBUG("ether=" MAC_FMT " len=%db->?b: bytes: %s->%s", + MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, + NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); +#endif + } + + mtx_unlock(&mfp->mtx); + + return 0; +} + +/* + * Search for the right upper hook, based on the source ethernet + * address. If not found, pass to the default upper hook. + */ +static int +macfilter_ether_input(hook_p hook, macfilter_p mfp, struct mbuf *m, hook_p *next_hook) +{ + struct ether_header *ether_header = mtod(m, struct ether_header *); + u_char *ether = ether_header->ether_shost; + int hookid = NG_MACFILTER_HOOK_DEFAULT_ID; + + mtx_lock(&mfp->mtx); + + u_int i; + int found = macfilter_find_mac(mfp, ether, &i); + if (found) { + mf_mac_p mf_macs = mfp->mf_macs; + + mf_macs[i].packets_in++; + if (m->m_len > ETHER_HDR_LEN) + mf_macs[i].bytes_in += m->m_len - ETHER_HDR_LEN; + + hookid = mf_macs[i].hookid; + +#ifdef NG_MACFILTER_DEBUG_RECVDATA + DEBUG("ether=" MAC_FMT " len=%db->%lldb: bytes: %s->%s", + MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, mf_macs[i].bytes_in, + NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); +#endif + } else { +#ifdef NG_MACFILTER_DEBUG_RECVDATA + DEBUG("ether=" MAC_FMT " len=%db->?b: bytes: %s->%s", + MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, + NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); +#endif + } + + if (hookid >= mfp->mf_upper_cnt) + *next_hook = NULL; + else + *next_hook = mfp->mf_upper[hookid]; + + mtx_unlock(&mfp->mtx); + + return 0; +} + +/* + * ====================================================================== + * Netgraph hooks + * ====================================================================== + */ + +/* + * See basic netgraph code for comments on the individual functions. + */ + +static int +ng_macfilter_constructor(node_p node) +{ + macfilter_p mfp = malloc(sizeof(*mfp), M_NETGRAPH, M_NOWAIT | M_ZERO); + if (mfp == NULL) + return ENOMEM; + + int error = macfilter_mactable_resize(mfp); + if (error) + return error; + + NG_NODE_SET_PRIVATE(node, mfp); + + mtx_init(&mfp->mtx, "Macfilter table", NULL, MTX_DEF); + + return (0); +} + +static int +ng_macfilter_newhook(node_p node, hook_p hook, const char *hookname) +{ + const macfilter_p mfp = NG_NODE_PRIVATE(node); + + DEBUG("%s", hookname); + + if (strcmp(hookname, NG_MACFILTER_HOOK_ETHER) == 0) { + mfp->mf_ether_hook = hook; + } else { + int hookid; + if (strcmp(hookname, NG_MACFILTER_HOOK_DEFAULT) == 0) { + hookid = NG_MACFILTER_HOOK_DEFAULT_ID; + } else { + for (hookid = 1; hookid < mfp->mf_upper_cnt; hookid++) + if (mfp->mf_upper[hookid] == NULL) + break; + } + + if (hookid >= mfp->mf_upper_cnt) { + DEBUG("upper cnt %d -> %d", mfp->mf_upper_cnt, hookid + 1); + + mfp->mf_upper_cnt = hookid + 1; + mfp->mf_upper = realloc(mfp->mf_upper, + sizeof(mfp->mf_upper[0])*mfp->mf_upper_cnt, + M_NETGRAPH, M_NOWAIT | M_ZERO); + } + + mfp->mf_upper[hookid] = hook; + } + + return(0); +} + +static int +ng_macfilter_rcvmsg(node_p node, item_p item, hook_p lasthook) +{ + const macfilter_p mfp = NG_NODE_PRIVATE(node); + struct ng_mesg *resp = NULL; + struct ng_mesg *msg; + int error = 0; + struct ngm_macfilter_macs *ngm_macs; + struct ngm_macfilter_hooks *ngm_hooks; + struct ngm_macfilter_direct *md; + struct ngm_macfilter_direct_hookid *mdi; + int n = 0, i = 0; + int hookid = 0; + int resplen; + + NGI_GET_MSG(item, msg); + + mtx_lock(&mfp->mtx); + + switch (msg->header.typecookie) { + case NGM_MACFILTER_COOKIE: + switch (msg->header.cmd) { + + case NGM_MACFILTER_RESET: + macfilter_reset(mfp); + break; + + case NGM_MACFILTER_DIRECT: + if (msg->header.arglen != sizeof(struct ngm_macfilter_direct)) { + DEBUG("direct: wrong type length (%d, expected %d)", + msg->header.arglen, sizeof(struct ngm_macfilter_direct)); + error = EINVAL; + break; + } + md = (struct ngm_macfilter_direct *)msg->data; + error = macfilter_direct(mfp, md); + break; + case NGM_MACFILTER_DIRECT_HOOKID: + if (msg->header.arglen != sizeof(struct ngm_macfilter_direct_hookid)) { + DEBUG("direct hookid: wrong type length (%d, expected %d)", + msg->header.arglen, sizeof(struct ngm_macfilter_direct)); + error = EINVAL; + break; + } + mdi = (struct ngm_macfilter_direct_hookid *)msg->data; + error = macfilter_direct_hookid(mfp, mdi); + break; + + case NGM_MACFILTER_GET_MACS: + case NGM_MACFILTER_GETCLR_MACS: + n = mfp->mf_mac_used; + resplen = sizeof(struct ngm_macfilter_macs) + n * sizeof(struct ngm_macfilter_mac); + NG_MKRESPONSE(resp, msg, resplen, M_NOWAIT); + if (resp == NULL) { + error = ENOMEM; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 8 15:41:19 2020 Return-Path: Delivered-To: svn-src-all@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 988DC4A396F; Tue, 8 Dec 2020 15:41:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr4Cg3WZ2z4VYv; Tue, 8 Dec 2020 15:41:19 +0000 (UTC) (envelope-from andrew@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 6B96C16876; Tue, 8 Dec 2020 15:41:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8FfJXV087255; Tue, 8 Dec 2020 15:41:19 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8FfJSN087234; Tue, 8 Dec 2020 15:41:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202012081541.0B8FfJSN087234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 8 Dec 2020 15:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368444 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 368444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 15:41:19 -0000 Author: andrew Date: Tue Dec 8 15:41:18 2020 New Revision: 368444 URL: https://svnweb.freebsd.org/changeset/base/368444 Log: Free the arm64 bootparams memory after initarm This is only needed in initarm, we can return this memory to the stack used by mi_startup. Sponsored by: Innivate UK Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Tue Dec 8 15:09:42 2020 (r368443) +++ head/sys/arm64/arm64/locore.S Tue Dec 8 15:41:18 2020 (r368444) @@ -173,6 +173,8 @@ virtdone: mov fp, #0 /* Branch to C code */ bl initarm + /* We are done with the boot params */ + add sp, sp, #BOOTPARAMS_SIZE bl mi_startup /* We should not get here */ From owner-svn-src-all@freebsd.org Tue Dec 8 15:51:08 2020 Return-Path: Delivered-To: svn-src-all@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 95B904A422F; Tue, 8 Dec 2020 15:51:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr4Qx6zn0z4WSv; Tue, 8 Dec 2020 15:51:05 +0000 (UTC) (envelope-from andrew@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 BC67816E07; Tue, 8 Dec 2020 15:51:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8Fp5lp094029; Tue, 8 Dec 2020 15:51:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8Fp5Z5094027; Tue, 8 Dec 2020 15:51:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202012081551.0B8Fp5Z5094027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 8 Dec 2020 15:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368445 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 368445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 15:51:09 -0000 Author: andrew Date: Tue Dec 8 15:51:05 2020 New Revision: 368445 URL: https://svnweb.freebsd.org/changeset/base/368445 Log: Use a macro to find the offset of kern_ttbr0 Rather than hard coding the offset of kern_ttbr0 within arm64_bootparams use a macro like the other fields. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Dec 8 15:41:18 2020 (r368444) +++ head/sys/arm64/arm64/genassym.c Tue Dec 8 15:51:05 2020 (r368445) @@ -45,6 +45,7 @@ ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams, kern_l0pt)); +ASSYM(BP_KERN_TTBR0, offsetof(struct arm64_bootparams, kern_ttbr0)); ASSYM(BP_BOOT_EL, offsetof(struct arm64_bootparams, boot_el)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Tue Dec 8 15:41:18 2020 (r368444) +++ head/sys/arm64/arm64/locore.S Tue Dec 8 15:51:05 2020 (r368445) @@ -166,8 +166,8 @@ virtdone: adr x25, initstack str x25, [x0, #BP_KERN_STACK] str x24, [x0, #BP_KERN_L0PT] + str x27, [x0, #BP_KERN_TTBR0] str x23, [x0, #BP_BOOT_EL] - str x27, [x0, 40] /* kern_ttbr0 */ /* trace back starts here */ mov fp, #0 From owner-svn-src-all@freebsd.org Tue Dec 8 16:36:47 2020 Return-Path: Delivered-To: svn-src-all@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 6174F4A5C2D; Tue, 8 Dec 2020 16:36:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr5Rg2JrSz4cVY; Tue, 8 Dec 2020 16:36:47 +0000 (UTC) (envelope-from glebius@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 41F0817800; Tue, 8 Dec 2020 16:36:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8GalU1024380; Tue, 8 Dec 2020 16:36:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8GalJE024379; Tue, 8 Dec 2020 16:36:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202012081636.0B8GalJE024379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 8 Dec 2020 16:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368446 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 16:36:47 -0000 Author: glebius Date: Tue Dec 8 16:36:46 2020 New Revision: 368446 URL: https://svnweb.freebsd.org/changeset/base/368446 Log: Convert LAGG_RLOCK() to NET_EPOCH_ENTER(). No functional changes. Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue Dec 8 15:51:05 2020 (r368445) +++ head/sys/net/if_lagg.c Tue Dec 8 16:36:46 2020 (r368446) @@ -84,11 +84,6 @@ __FBSDID("$FreeBSD$"); extern void nd6_setmtu(struct ifnet *); #endif -#define LAGG_RLOCK() struct epoch_tracker lagg_et; epoch_enter_preempt(net_epoch_preempt, &lagg_et) -#define LAGG_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &lagg_et) -#define LAGG_RLOCK_ASSERT() NET_EPOCH_ASSERT() -#define LAGG_UNLOCK_ASSERT() MPASS(!in_epoch(net_epoch_preempt)) - #define LAGG_SX_INIT(_sc) sx_init(&(_sc)->sc_sx, "if_lagg sx") #define LAGG_SX_DESTROY(_sc) sx_destroy(&(_sc)->sc_sx) #define LAGG_XLOCK(_sc) sx_xlock(&(_sc)->sc_sx) @@ -476,16 +471,17 @@ lagg_proto_portreq(struct lagg_softc *sc, struct lagg_ static void lagg_register_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag) { + struct epoch_tracker et; struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_config, lp->lp_ifp, vtag); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); } /* @@ -495,16 +491,17 @@ lagg_register_vlan(void *arg, struct ifnet *ifp, u_int static void lagg_unregister_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag) { + struct epoch_tracker et; struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_unconfig, lp->lp_ifp, vtag); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); } static int @@ -1011,6 +1008,7 @@ lagg_port_destroy(struct lagg_port *lp, int rundelport static int lagg_port_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { + struct epoch_tracker et; struct lagg_reqport *rp = (struct lagg_reqport *)data; struct lagg_softc *sc; struct lagg_port *lp = NULL; @@ -1035,15 +1033,15 @@ lagg_port_ioctl(struct ifnet *ifp, u_long cmd, caddr_t break; } - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); if ((lp = ifp->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); break; case SIOCSIFCAP: @@ -1096,6 +1094,7 @@ fallback: static uint64_t lagg_get_counter(struct ifnet *ifp, ift_counter cnt) { + struct epoch_tracker et; struct lagg_softc *sc; struct lagg_port *lp; struct ifnet *lpifp; @@ -1107,7 +1106,7 @@ lagg_get_counter(struct ifnet *ifp, ift_counter cnt) sc = (struct lagg_softc *)ifp->if_softc; vsum = 0; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { /* Saved attached value */ oldval = lp->port_counters.val[cnt]; @@ -1117,7 +1116,7 @@ lagg_get_counter(struct ifnet *ifp, ift_counter cnt) /* Calculate diff and save new */ vsum += newval - oldval; } - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); /* * Add counter data which might be added by upper @@ -1218,6 +1217,7 @@ lagg_port2req(struct lagg_port *lp, struct lagg_reqpor static void lagg_watchdog_infiniband(void *arg) { + struct epoch_tracker et; struct lagg_softc *sc; struct lagg_port *lp; struct ifnet *ifp; @@ -1234,7 +1234,7 @@ lagg_watchdog_infiniband(void *arg) * a guarantee against too frequent events. This operation * does not have to be atomic. */ - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); lp = lagg_link_active(sc, sc->sc_primary); if (lp != NULL) { ifp = sc->sc_ifp; @@ -1248,7 +1248,7 @@ lagg_watchdog_infiniband(void *arg) CURVNET_RESTORE(); } } - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); callout_reset(&sc->sc_watchdog, hz, &lagg_watchdog_infiniband, arg); } @@ -1314,6 +1314,7 @@ lagg_stop(struct lagg_softc *sc) static int lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { + struct epoch_tracker et; struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_reqall *ra = (struct lagg_reqall *)data; struct lagg_reqopts *ro = (struct lagg_reqopts *)data; @@ -1372,7 +1373,6 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data } LAGG_XLOCK(sc); lagg_proto_detach(sc); - LAGG_UNLOCK_ASSERT(); lagg_proto_attach(sc, ra->ra_proto); LAGG_XUNLOCK(sc); break; @@ -1564,17 +1564,17 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data break; } - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); if_rele(tpif); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); if_rele(tpif); break; case SIOCSLAGGPORT: @@ -1795,6 +1795,7 @@ lagg_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **ppmt) { + struct epoch_tracker et; struct lagg_snd_tag *lst; struct lagg_softc *sc; struct lagg_port *lp; @@ -1803,7 +1804,7 @@ lagg_snd_tag_alloc(struct ifnet *ifp, sc = ifp->if_softc; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); lp = lookup_snd_tag_port(ifp, params->hdr.flowid, params->hdr.flowtype, params->hdr.numa_domain); if (lp == NULL) { @@ -1816,7 +1817,7 @@ lagg_snd_tag_alloc(struct ifnet *ifp, } lp_ifp = lp->lp_ifp; if_ref(lp_ifp); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); lst = malloc(sizeof(*lst), M_LAGG, M_NOWAIT); if (lst == NULL) { @@ -2002,6 +2003,7 @@ lagg_setflags(struct lagg_port *lp, int status) static int lagg_transmit_ethernet(struct ifnet *ifp, struct mbuf *m) { + struct epoch_tracker et; struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; int error; @@ -2009,10 +2011,10 @@ lagg_transmit_ethernet(struct ifnet *ifp, struct mbuf if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) MPASS(m->m_pkthdr.snd_tag->ifp == ifp); #endif - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); /* We need a Tx algorithm and at least one port */ if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) { - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENXIO); @@ -2021,13 +2023,14 @@ lagg_transmit_ethernet(struct ifnet *ifp, struct mbuf ETHER_BPF_MTAP(ifp, m); error = lagg_proto_start(sc, m); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); return (error); } static int lagg_transmit_infiniband(struct ifnet *ifp, struct mbuf *m) { + struct epoch_tracker et; struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; int error; @@ -2035,10 +2038,10 @@ lagg_transmit_infiniband(struct ifnet *ifp, struct mbu if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) MPASS(m->m_pkthdr.snd_tag->ifp == ifp); #endif - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); /* We need a Tx algorithm and at least one port */ if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) { - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENXIO); @@ -2047,7 +2050,7 @@ lagg_transmit_infiniband(struct ifnet *ifp, struct mbu INFINIBAND_BPF_MTAP(ifp, m); error = lagg_proto_start(sc, m); - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); return (error); } @@ -2062,15 +2065,16 @@ lagg_qflush(struct ifnet *ifp __unused) static struct mbuf * lagg_input_ethernet(struct ifnet *ifp, struct mbuf *m) { + struct epoch_tracker et; struct lagg_port *lp = ifp->if_lagg; struct lagg_softc *sc = lp->lp_softc; struct ifnet *scifp = sc->sc_ifp; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || lp->lp_detaching != 0 || sc->sc_proto == LAGG_PROTO_NONE) { - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return (NULL); } @@ -2083,22 +2087,23 @@ lagg_input_ethernet(struct ifnet *ifp, struct mbuf *m) m = NULL; } - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); return (m); } static struct mbuf * lagg_input_infiniband(struct ifnet *ifp, struct mbuf *m) { + struct epoch_tracker et; struct lagg_port *lp = ifp->if_lagg; struct lagg_softc *sc = lp->lp_softc; struct ifnet *scifp = sc->sc_ifp; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || lp->lp_detaching != 0 || sc->sc_proto == LAGG_PROTO_NONE) { - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); m_freem(m); return (NULL); } @@ -2111,7 +2116,7 @@ lagg_input_infiniband(struct ifnet *ifp, struct mbuf * m = NULL; } - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); return (m); } @@ -2130,23 +2135,25 @@ lagg_media_change(struct ifnet *ifp) static void lagg_media_status(struct ifnet *ifp, struct ifmediareq *imr) { + struct epoch_tracker et; struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_port *lp; imr->ifm_status = IFM_AVALID; imr->ifm_active = IFM_ETHER | IFM_AUTO; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (LAGG_PORTACTIVE(lp)) imr->ifm_status |= IFM_ACTIVE; } - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); } static void lagg_linkstate(struct lagg_softc *sc) { + struct epoch_tracker et; struct lagg_port *lp; int new_link = LINK_STATE_DOWN; uint64_t speed; @@ -2158,14 +2165,14 @@ lagg_linkstate(struct lagg_softc *sc) return; /* Our link is considered up if at least one of our ports is active */ - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (lp->lp_ifp->if_link_state == LINK_STATE_UP) { new_link = LINK_STATE_UP; break; } } - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); if_link_state_change(sc->sc_ifp, new_link); /* Update if_baudrate to reflect the max possible speed */ @@ -2178,10 +2185,10 @@ lagg_linkstate(struct lagg_softc *sc) case LAGG_PROTO_LOADBALANCE: case LAGG_PROTO_BROADCAST: speed = 0; - LAGG_RLOCK(); + NET_EPOCH_ENTER(et); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) speed += lp->lp_ifp->if_baudrate; - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); sc->sc_ifp->if_baudrate = speed; break; case LAGG_PROTO_LACP: @@ -2218,8 +2225,8 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_po #ifdef INVARIANTS /* - * This is called with either LAGG_RLOCK() held or - * LAGG_XLOCK(sc) held. + * This is called with either in the network epoch + * or with LAGG_XLOCK(sc) held. */ if (!in_epoch(net_epoch_preempt)) LAGG_XLOCK_ASSERT(sc); @@ -2330,7 +2337,7 @@ lagg_bcast_start(struct lagg_softc *sc, struct mbuf *m struct lagg_port *lp, *last = NULL; struct mbuf *m0; - LAGG_RLOCK_ASSERT(); + NET_EPOCH_ASSERT(); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (!LAGG_PORTACTIVE(lp)) continue; From owner-svn-src-all@freebsd.org Tue Dec 8 16:43:36 2020 Return-Path: Delivered-To: svn-src-all@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 AE8D94A6187; Tue, 8 Dec 2020 16:43:36 +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 4Cr5bX4Wgnz4d5T; Tue, 8 Dec 2020 16:43:36 +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 8E1FB17823; Tue, 8 Dec 2020 16:43:36 +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 0B8Gha4t030571; Tue, 8 Dec 2020 16:43:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8GhZgA030565; Tue, 8 Dec 2020 16:43:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012081643.0B8GhZgA030565@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 16:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368447 - in head/crypto/openssl: crypto/asn1 crypto/err crypto/x509v3 include/openssl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/crypto/openssl: crypto/asn1 crypto/err crypto/x509v3 include/openssl X-SVN-Commit-Revision: 368447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 16:43:36 -0000 Author: emaste Date: Tue Dec 8 16:43:35 2020 New Revision: 368447 URL: https://svnweb.freebsd.org/changeset/base/368447 Log: 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: head/crypto/openssl/crypto/asn1/asn1_err.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/tasn_enc.c head/crypto/openssl/crypto/err/openssl.txt head/crypto/openssl/crypto/x509v3/v3_genn.c head/crypto/openssl/include/openssl/asn1err.h Modified: head/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- head/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 16:36:46 2020 (r368446) +++ head/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 16:43:35 2020 (r368447) @@ -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: head/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 16:36:46 2020 (r368446) +++ head/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 16:43:35 2020 (r368447) @@ -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: head/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 16:36:46 2020 (r368446) +++ head/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 16:43:35 2020 (r368447) @@ -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: head/crypto/openssl/crypto/err/openssl.txt ============================================================================== --- head/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 16:36:46 2020 (r368446) +++ head/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 16:43:35 2020 (r368447) @@ -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: head/crypto/openssl/crypto/x509v3/v3_genn.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 16:36:46 2020 (r368446) +++ head/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 16:43:35 2020 (r368447) @@ -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: head/crypto/openssl/include/openssl/asn1err.h ============================================================================== --- head/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 16:36:46 2020 (r368446) +++ head/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 16:43:35 2020 (r368447) @@ -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-all@freebsd.org Tue Dec 8 16:46:01 2020 Return-Path: Delivered-To: svn-src-all@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 2C91E4A5FE4; Tue, 8 Dec 2020 16:46:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr5fK0pcRz4dCs; Tue, 8 Dec 2020 16:46:01 +0000 (UTC) (envelope-from glebius@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 0E5D6175E3; Tue, 8 Dec 2020 16:46:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8Gk0gm030765; Tue, 8 Dec 2020 16:46:00 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8Gk0n5030764; Tue, 8 Dec 2020 16:46:00 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202012081646.0B8Gk0n5030764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 8 Dec 2020 16:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368448 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 16:46:01 -0000 Author: glebius Date: Tue Dec 8 16:46:00 2020 New Revision: 368448 URL: https://svnweb.freebsd.org/changeset/base/368448 Log: The list of ports in configuration path shall be protected by locks, epoch shall be used only for fast path. Thus use LAGG_XLOCK() in lagg_[un]register_vlan. This fixes sleeping in epoch panic. PR: 240609 Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue Dec 8 16:43:35 2020 (r368447) +++ head/sys/net/if_lagg.c Tue Dec 8 16:46:00 2020 (r368448) @@ -471,17 +471,16 @@ lagg_proto_portreq(struct lagg_softc *sc, struct lagg_ static void lagg_register_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag) { - struct epoch_tracker et; struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; if (ifp->if_softc != arg) /* Not our event */ return; - NET_EPOCH_ENTER(et); + LAGG_XLOCK(sc); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_config, lp->lp_ifp, vtag); - NET_EPOCH_EXIT(et); + LAGG_XUNLOCK(sc); } /* @@ -491,17 +490,16 @@ lagg_register_vlan(void *arg, struct ifnet *ifp, u_int static void lagg_unregister_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag) { - struct epoch_tracker et; struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; if (ifp->if_softc != arg) /* Not our event */ return; - NET_EPOCH_ENTER(et); + LAGG_XLOCK(sc); CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_unconfig, lp->lp_ifp, vtag); - NET_EPOCH_EXIT(et); + LAGG_XUNLOCK(sc); } static int From owner-svn-src-all@freebsd.org Tue Dec 8 17:26:00 2020 Return-Path: Delivered-To: svn-src-all@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 7E0AD4A6EF2; Tue, 8 Dec 2020 17:26:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr6XS39ydz4gGG; Tue, 8 Dec 2020 17:26:00 +0000 (UTC) (envelope-from adrian@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 5BC5A17BDC; Tue, 8 Dec 2020 17:26:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8HQ02j055445; Tue, 8 Dec 2020 17:26:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8HQ0sx055444; Tue, 8 Dec 2020 17:26:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202012081726.0B8HQ0sx055444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 8 Dec 2020 17:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368449 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 368449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 17:26:00 -0000 Author: adrian Date: Tue Dec 8 17:25:59 2020 New Revision: 368449 URL: https://svnweb.freebsd.org/changeset/base/368449 Log: [ath] replace the hard-coded magic values in if_athioctl.h with constant defines Replace some hard-coded magic values in the ioctl stats struct with #defines. I'm going to follow up with some more sanity checking in the receive path that also use these values so we don't do bad things if the hardware is (more) confused. Modified: head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Tue Dec 8 16:46:00 2020 (r368448) +++ head/sys/dev/ath/if_athioctl.h Tue Dec 8 17:25:59 2020 (r368449) @@ -48,10 +48,14 @@ struct ath_tx_aggr_stats { u_int32_t aggr_rts_aggr_limited; }; +#define ATH_IOCTL_INTR_NUM_SYNC_INTR 32 struct ath_intr_stats { - u_int32_t sync_intr[32]; + u_int32_t sync_intr[ATH_IOCTL_INTR_NUM_SYNC_INTR]; }; +#define ATH_IOCTL_STATS_NUM_RX_PHYERR 64 +#define ATH_IOCTL_STATS_NUM_TX_ANTENNA 8 +#define ATH_IOCTL_STATS_NUM_RX_ANTENNA 8 struct ath_stats { u_int32_t ast_watchdog; /* device reset by watchdog */ u_int32_t ast_hardware; /* fatal hardware error interrupts */ @@ -96,7 +100,8 @@ struct ath_stats { u_int32_t ast_rx_badcrypt;/* rx failed 'cuz decryption */ u_int32_t ast_rx_badmic; /* rx failed 'cuz MIC failure */ u_int32_t ast_rx_phyerr; /* rx failed 'cuz of PHY err */ - u_int32_t ast_rx_phy[64]; /* rx PHY error per-code counts */ + u_int32_t ast_rx_phy[ATH_IOCTL_STATS_NUM_RX_PHYERR]; + /* rx PHY error per-code counts */ u_int32_t ast_rx_tooshort;/* rx discarded 'cuz frame too short */ u_int32_t ast_rx_toobig; /* rx discarded 'cuz frame too large */ u_int32_t ast_rx_packets; /* packet recv on the interface */ @@ -115,8 +120,10 @@ struct ath_stats { u_int32_t ast_rate_drop; /* rate control dropped xmit rate */ u_int32_t ast_ant_defswitch;/* rx/default antenna switches */ u_int32_t ast_ant_txswitch;/* tx antenna switches */ - u_int32_t ast_ant_rx[8]; /* rx frames with antenna */ - u_int32_t ast_ant_tx[8]; /* tx frames with antenna */ + u_int32_t ast_ant_rx[ATH_IOCTL_STATS_NUM_RX_ANTENNA]; + /* rx frames with antenna */ + u_int32_t ast_ant_tx[ATH_IOCTL_STATS_NUM_TX_ANTENNA]; + /* tx frames with antenna */ u_int32_t ast_cabq_xmit; /* cabq frames transmitted */ u_int32_t ast_cabq_busy; /* cabq found busy */ u_int32_t ast_tx_raw; /* tx frames through raw api */ From owner-svn-src-all@freebsd.org Tue Dec 8 17:27:25 2020 Return-Path: Delivered-To: svn-src-all@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 5E82A4A7073; Tue, 8 Dec 2020 17:27:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr6Z52BzSz4gMg; Tue, 8 Dec 2020 17:27:25 +0000 (UTC) (envelope-from adrian@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 3E76817DFA; Tue, 8 Dec 2020 17:27:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8HRPaE055556; Tue, 8 Dec 2020 17:27:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8HRPoV055555; Tue, 8 Dec 2020 17:27:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202012081727.0B8HRPoV055555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 8 Dec 2020 17:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368450 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 368450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 17:27:25 -0000 Author: adrian Date: Tue Dec 8 17:27:24 2020 New Revision: 368450 URL: https://svnweb.freebsd.org/changeset/base/368450 Log: [ath] Don't use hard-coded values in the sanity check. Don't use hard-coded values in the phy error and receive antenna checks. Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Tue Dec 8 17:25:59 2020 (r368449) +++ head/sys/dev/ath/if_ath_rx.c Tue Dec 8 17:27:24 2020 (r368450) @@ -706,8 +706,11 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status ath_dfs_process_phy_err(sc, m, rstamp, rs); } - /* Be suitably paranoid about receiving phy errors out of the stats array bounds */ - if (rs->rs_phyerr < 64) + /* + * Be suitably paranoid about receiving phy errors + * out of the stats array bounds + */ + if (rs->rs_phyerr < ATH_IOCTL_STATS_NUM_RX_PHYERR) sc->sc_stats.ast_rx_phy[rs->rs_phyerr]++; goto rx_error; /* NB: don't count in ierrors */ } @@ -835,7 +838,7 @@ rx_accept: * the majority of the statistics are only valid * for the last frame in an aggregate. */ - if (rs->rs_antenna > 7) { + if (rs->rs_antenna >= ATH_IOCTL_STATS_NUM_RX_ANTENNA) { device_printf(sc->sc_dev, "%s: rs_antenna > 7 (%d)\n", __func__, rs->rs_antenna); #ifdef ATH_DEBUG From owner-svn-src-all@freebsd.org Tue Dec 8 17:28:43 2020 Return-Path: Delivered-To: svn-src-all@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 0D31B4A7326; Tue, 8 Dec 2020 17:28:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr6bZ6gd6z4gFc; Tue, 8 Dec 2020 17:28:42 +0000 (UTC) (envelope-from adrian@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 D817217BDD; Tue, 8 Dec 2020 17:28:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8HSgtB055666; Tue, 8 Dec 2020 17:28:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8HSguc055665; Tue, 8 Dec 2020 17:28:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202012081728.0B8HSguc055665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 8 Dec 2020 17:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368451 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 368451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 17:28:43 -0000 Author: adrian Date: Tue Dec 8 17:28:42 2020 New Revision: 368451 URL: https://svnweb.freebsd.org/changeset/base/368451 Log: [ath] also remove the magic size value here for the transmit antenna statistics. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Tue Dec 8 17:27:24 2020 (r368450) +++ head/sys/dev/ath/if_athvar.h Tue Dec 8 17:28:42 2020 (r368451) @@ -780,7 +780,8 @@ struct ath_softc { ath_bufhead sc_bbuf; /* beacon buffers */ u_int sc_bhalq; /* HAL q for outgoing beacons */ u_int sc_bmisscount; /* missed beacon transmits */ - u_int32_t sc_ant_tx[8]; /* recent tx frames/antenna */ + u_int32_t sc_ant_tx[ATH_IOCTL_STATS_NUM_TX_ANTENNA]; + /* recent tx frames/antenna */ struct ath_txq *sc_cabq; /* tx q for cab frames */ struct task sc_bmisstask; /* bmiss int processing */ struct task sc_bstucktask; /* stuck beacon processing */ From owner-svn-src-all@freebsd.org Tue Dec 8 17:42:33 2020 Return-Path: Delivered-To: svn-src-all@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 5CCC24A755A; Tue, 8 Dec 2020 17:42:33 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr6vY24qJz4h9J; Tue, 8 Dec 2020 17:42:33 +0000 (UTC) (envelope-from n_hibma@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 3A80D18496; Tue, 8 Dec 2020 17:42:33 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8HgXJ9067675; Tue, 8 Dec 2020 17:42:33 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8HgXl5067674; Tue, 8 Dec 2020 17:42:33 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <202012081742.0B8HgXl5067674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 8 Dec 2020 17:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368452 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 368452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 17:42:33 -0000 Author: n_hibma Date: Tue Dec 8 17:42:32 2020 New Revision: 368452 URL: https://svnweb.freebsd.org/changeset/base/368452 Log: Fix indenting for netmap. Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Dec 8 17:28:42 2020 (r368451) +++ head/etc/mtree/BSD.tests.dist Tue Dec 8 17:42:32 2020 (r368452) @@ -808,8 +808,8 @@ tunnel .. .. - netmap - .. + netmap + .. netpfil common .. From owner-svn-src-all@freebsd.org Tue Dec 8 17:44:35 2020 Return-Path: Delivered-To: svn-src-all@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 9402F4A772F; Tue, 8 Dec 2020 17:44:35 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr6xv3nKGz4hVC; Tue, 8 Dec 2020 17:44:35 +0000 (UTC) (envelope-from n_hibma@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 74A74183AD; Tue, 8 Dec 2020 17:44:35 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8HiZ7q067847; Tue, 8 Dec 2020 17:44:35 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8HiZZN067846; Tue, 8 Dec 2020 17:44:35 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <202012081744.0B8HiZZN067846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Tue, 8 Dec 2020 17:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368453 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 368453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 17:44:35 -0000 Author: n_hibma Date: Tue Dec 8 17:44:34 2020 New Revision: 368453 URL: https://svnweb.freebsd.org/changeset/base/368453 Log: Missed adding netgraph to mtree in r368443: New Netgraph module ng_macfilter: Macfilter to route packets through different hooks based on sender MAC address. Based on ng_macfilter written by Pekka Nikander Sponsered by Retina b.v. Reviewed by: afedorov MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27268 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Dec 8 17:42:32 2020 (r368452) +++ head/etc/mtree/BSD.tests.dist Tue Dec 8 17:44:34 2020 (r368453) @@ -798,6 +798,8 @@ .. net .. + netgraph + .. netinet .. netinet6 From owner-svn-src-all@freebsd.org Tue Dec 8 17:57:20 2020 Return-Path: Delivered-To: svn-src-all@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 194A44A7BBB; Tue, 8 Dec 2020 17:57:20 +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 4Cr7Dc05KNz4hr8; Tue, 8 Dec 2020 17:57:20 +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 E5C28184C4; Tue, 8 Dec 2020 17:57:19 +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 0B8HvJuq078729; Tue, 8 Dec 2020 17:57:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8HvIi4078718; Tue, 8 Dec 2020 17:57:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012081757.0B8HvIi4078718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 8 Dec 2020 17:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368454 - in head/sys: cddl/dev/dtrace/riscv cddl/dev/fbt riscv/include riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: cddl/dev/dtrace/riscv cddl/dev/fbt riscv/include riscv/riscv X-SVN-Commit-Revision: 368454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 17:57:20 -0000 Author: jhb Date: Tue Dec 8 17:57:18 2020 New Revision: 368454 URL: https://svnweb.freebsd.org/changeset/base/368454 Log: Stack unwinding robustness fixes for RISC-V. - Push the kstack_contains check down into unwind_frame() so that it is honored by DDB and DTrace. - Check that the trapframe for an exception frame is contained in the traced thread's kernel stack for DDB traces. Reviewed by: markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27357 Modified: head/sys/cddl/dev/dtrace/riscv/dtrace_isa.c head/sys/cddl/dev/fbt/fbt.c head/sys/riscv/include/stack.h head/sys/riscv/riscv/db_trace.c head/sys/riscv/riscv/stack_machdep.c head/sys/riscv/riscv/unwind.c Modified: head/sys/cddl/dev/dtrace/riscv/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/riscv/dtrace_isa.c Tue Dec 8 17:44:34 2020 (r368453) +++ head/sys/cddl/dev/dtrace/riscv/dtrace_isa.c Tue Dec 8 17:57:18 2020 (r368454) @@ -90,7 +90,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in state.pc = (uintptr_t)dtrace_getpcstack; while (depth < pcstack_limit) { - if (unwind_frame(&state)) + if (!unwind_frame(curthread, &state)) break; if (!INKERNEL(state.pc) || !INKERNEL(state.fp)) @@ -259,10 +259,10 @@ dtrace_getstackdepth(int aframes) int scp_offset; register_t sp; int depth; - int done; + bool done; depth = 1; - done = 0; + done = false; __asm __volatile("mv %0, sp" : "=&r" (sp)); @@ -271,7 +271,7 @@ dtrace_getstackdepth(int aframes) state.pc = (uintptr_t)dtrace_getstackdepth; do { - done = unwind_frame(&state); + done = !unwind_frame(curthread, &state); if (!INKERNEL(state.pc) || !INKERNEL(state.fp)) break; depth++; Modified: head/sys/cddl/dev/fbt/fbt.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt.c Tue Dec 8 17:44:34 2020 (r368453) +++ head/sys/cddl/dev/fbt/fbt.c Tue Dec 8 17:57:18 2020 (r368454) @@ -137,6 +137,15 @@ fbt_excluded(const char *name) return (1); /* + * Stack unwinders may be called from probe context on some + * platforms. + */ +#if defined(__riscv) + if (strcmp(name, "unwind_frame") == 0) + return (1); +#endif + + /* * When DTrace is built into the kernel we need to exclude * the FBT functions from instrumentation. */ Modified: head/sys/riscv/include/stack.h ============================================================================== --- head/sys/riscv/include/stack.h Tue Dec 8 17:44:34 2020 (r368453) +++ head/sys/riscv/include/stack.h Tue Dec 8 17:57:18 2020 (r368454) @@ -46,6 +46,6 @@ struct unwind_state { uintptr_t pc; }; -int unwind_frame(struct unwind_state *); +bool unwind_frame(struct thread *, struct unwind_state *); #endif /* !_MACHINE_STACK_H_ */ Modified: head/sys/riscv/riscv/db_trace.c ============================================================================== --- head/sys/riscv/riscv/db_trace.c Tue Dec 8 17:44:34 2020 (r368453) +++ head/sys/riscv/riscv/db_trace.c Tue Dec 8 17:57:18 2020 (r368454) @@ -73,7 +73,7 @@ db_md_set_watchpoint(db_expr_t addr, db_expr_t size) } static void -db_stack_trace_cmd(struct unwind_state *frame) +db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) { const char *name; db_expr_t offset; @@ -100,6 +100,11 @@ db_stack_trace_cmd(struct unwind_state *frame) struct trapframe *tf; tf = (struct trapframe *)(uintptr_t)frame->sp; + if (!kstack_contains(td, (vm_offset_t)tf, + sizeof(*tf))) { + db_printf("--- invalid trapframe %p\n", tf); + break; + } if ((tf->tf_scause & SCAUSE_INTR) != 0) db_printf("--- interrupt %ld\n", @@ -119,7 +124,7 @@ db_stack_trace_cmd(struct unwind_state *frame) if (strcmp(name, "fork_trampoline") == 0) break; - if (unwind_frame(frame) < 0) + if (!unwind_frame(td, frame)) break; } } @@ -135,7 +140,7 @@ db_trace_thread(struct thread *thr, int count) frame.sp = ctx->pcb_sp; frame.fp = ctx->pcb_s[0]; frame.pc = ctx->pcb_ra; - db_stack_trace_cmd(&frame); + db_stack_trace_cmd(thr, &frame); return (0); } @@ -150,5 +155,5 @@ db_trace_self(void) frame.sp = sp; frame.fp = (uintptr_t)__builtin_frame_address(0); frame.pc = (uintptr_t)db_trace_self; - db_stack_trace_cmd(&frame); + db_stack_trace_cmd(curthread, &frame); } Modified: head/sys/riscv/riscv/stack_machdep.c ============================================================================== --- head/sys/riscv/riscv/stack_machdep.c Tue Dec 8 17:44:34 2020 (r368453) +++ head/sys/riscv/riscv/stack_machdep.c Tue Dec 8 17:57:18 2020 (r368454) @@ -53,10 +53,8 @@ stack_capture(struct thread *td, struct stack *st, str stack_zero(st); while (1) { - if (!kstack_contains(td, (vm_offset_t)frame->fp - - (sizeof(uintptr_t) * 2), sizeof(uintptr_t) * 2)) + if (!unwind_frame(td, frame)) break; - unwind_frame(frame); if (!INKERNEL((vm_offset_t)frame->pc)) break; if (stack_put(st, frame->pc) == -1) Modified: head/sys/riscv/riscv/unwind.c ============================================================================== --- head/sys/riscv/riscv/unwind.c Tue Dec 8 17:44:34 2020 (r368453) +++ head/sys/riscv/riscv/unwind.c Tue Dec 8 17:57:18 2020 (r368454) @@ -35,23 +35,24 @@ #include __FBSDID("$FreeBSD$"); #include +#include #include #include -int -unwind_frame(struct unwind_state *frame) +bool +unwind_frame(struct thread *td, struct unwind_state *frame) { uintptr_t fp; fp = frame->fp; - if (!INKERNEL(fp)) - return (-1); + if (!kstack_contains(td, fp - sizeof(fp) * 2, sizeof(fp) * 2)) + return (false); frame->sp = fp; frame->fp = ((uintptr_t *)fp)[-2]; frame->pc = ((uintptr_t *)fp)[-1] - 4; - return (0); + return (true); } From owner-svn-src-all@freebsd.org Tue Dec 8 18:01:00 2020 Return-Path: Delivered-To: svn-src-all@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 1EFB74A7E15; Tue, 8 Dec 2020 18:01:00 +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 4Cr7Jr0QRWz4jGw; Tue, 8 Dec 2020 18:01:00 +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 013D4185E5; Tue, 8 Dec 2020 18:01:00 +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 0B8I0xSf080375; Tue, 8 Dec 2020 18:00:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8I0wXc080359; Tue, 8 Dec 2020 18:00:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012081800.0B8I0wXc080359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 8 Dec 2020 18:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368455 - in head/sys: arm64/arm64 arm64/include cddl/dev/dtrace/aarch64 cddl/dev/fbt X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: arm64/arm64 arm64/include cddl/dev/dtrace/aarch64 cddl/dev/fbt X-SVN-Commit-Revision: 368455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:01:00 -0000 Author: jhb Date: Tue Dec 8 18:00:58 2020 New Revision: 368455 URL: https://svnweb.freebsd.org/changeset/base/368455 Log: Check that the frame pointer is within the current stack. This same check is used on other architectures. Previously this would permit a stack frame to unwind into any arbitrary kernel address (including unmapped addresses). Reviewed by: andrew, markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27362 Modified: head/sys/arm64/arm64/db_trace.c head/sys/arm64/arm64/stack_machdep.c head/sys/arm64/arm64/unwind.c head/sys/arm64/include/csan.h head/sys/arm64/include/stack.h head/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c head/sys/cddl/dev/fbt/fbt.c Modified: head/sys/arm64/arm64/db_trace.c ============================================================================== --- head/sys/arm64/arm64/db_trace.c Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/arm64/arm64/db_trace.c Tue Dec 8 18:00:58 2020 (r368455) @@ -65,7 +65,7 @@ db_md_set_watchpoint(db_expr_t addr, db_expr_t size) } static void -db_stack_trace_cmd(struct unwind_state *frame) +db_stack_trace_cmd(struct thread *td, struct unwind_state *frame) { c_db_sym_t sym; const char *name; @@ -74,10 +74,8 @@ db_stack_trace_cmd(struct unwind_state *frame) while (1) { uintptr_t pc = frame->pc; - int ret; - ret = unwind_frame(frame); - if (ret < 0) + if (!unwind_frame(td, frame)) break; sym = db_search_symbol(pc, DB_STGY_ANY, &offset); @@ -112,7 +110,7 @@ db_trace_thread(struct thread *thr, int count) frame.sp = (uintptr_t)ctx->pcb_sp; frame.fp = (uintptr_t)ctx->pcb_x[29]; frame.pc = (uintptr_t)ctx->pcb_x[30]; - db_stack_trace_cmd(&frame); + db_stack_trace_cmd(thr, &frame); } else db_trace_self(); return (0); @@ -129,5 +127,5 @@ db_trace_self(void) frame.sp = sp; frame.fp = (uintptr_t)__builtin_frame_address(0); frame.pc = (uintptr_t)db_trace_self; - db_stack_trace_cmd(&frame); + db_stack_trace_cmd(curthread, &frame); } Modified: head/sys/arm64/arm64/stack_machdep.c ============================================================================== --- head/sys/arm64/arm64/stack_machdep.c Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/arm64/arm64/stack_machdep.c Tue Dec 8 18:00:58 2020 (r368455) @@ -43,15 +43,15 @@ __FBSDID("$FreeBSD$"); #include static void -stack_capture(struct stack *st, struct unwind_state *frame) +stack_capture(struct thread *td, struct stack *st, struct unwind_state *frame) { stack_zero(st); while (1) { - unwind_frame(frame); - if (!INKERNEL((vm_offset_t)frame->fp) || - !INKERNEL((vm_offset_t)frame->pc)) + if (!unwind_frame(td, frame)) break; + if (!INKERNEL((vm_offset_t)frame->pc)) + break; if (stack_put(st, frame->pc) == -1) break; } @@ -73,7 +73,7 @@ stack_save_td(struct stack *st, struct thread *td) frame.fp = td->td_pcb->pcb_x[29]; frame.pc = td->td_pcb->pcb_x[30]; - stack_capture(st, &frame); + stack_capture(td, st, &frame); return (0); } @@ -89,5 +89,5 @@ stack_save(struct stack *st) frame.fp = (uintptr_t)__builtin_frame_address(0); frame.pc = (uintptr_t)stack_save; - stack_capture(st, &frame); + stack_capture(curthread, st, &frame); } Modified: head/sys/arm64/arm64/unwind.c ============================================================================== --- head/sys/arm64/arm64/unwind.c Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/arm64/arm64/unwind.c Tue Dec 8 18:00:58 2020 (r368455) @@ -30,24 +30,26 @@ #include __FBSDID("$FreeBSD$"); #include +#include #include #include -int -unwind_frame(struct unwind_state *frame) +bool +unwind_frame(struct thread *td, struct unwind_state *frame) { uintptr_t fp; fp = frame->fp; - if (!INKERNEL(fp)) - return (-1); + if (!kstack_contains(td, fp, sizeof(uintptr_t) * 2)) + return (false); + frame->sp = fp + sizeof(uintptr_t) * 2; /* FP to previous frame (X29) */ frame->fp = ((uintptr_t *)fp)[0]; /* LR (X30) */ frame->pc = ((uintptr_t *)fp)[1] - 4; - return (0); + return (true); } Modified: head/sys/arm64/include/csan.h ============================================================================== --- head/sys/arm64/include/csan.h Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/arm64/include/csan.h Tue Dec 8 18:00:58 2020 (r368455) @@ -87,9 +87,9 @@ kcsan_md_unwind(void) nsym = 0; while (1) { - unwind_frame(&frame); - if (!INKERNEL((vm_offset_t)frame.fp) || - !INKERNEL((vm_offset_t)frame.pc)) + if (!unwind_frame(curthread, &frame)) + break; + if (!INKERNEL((vm_offset_t)frame.pc)) break; #ifdef DDB Modified: head/sys/arm64/include/stack.h ============================================================================== --- head/sys/arm64/include/stack.h Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/arm64/include/stack.h Tue Dec 8 18:00:58 2020 (r368455) @@ -38,6 +38,6 @@ struct unwind_state { uintptr_t pc; }; -int unwind_frame(struct unwind_state *); +bool unwind_frame(struct thread *, struct unwind_state *); #endif /* !_MACHINE_STACK_H_ */ Modified: head/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Tue Dec 8 18:00:58 2020 (r368455) @@ -70,7 +70,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in { struct unwind_state state; int scp_offset; - register_t sp, fp; + register_t sp; int depth; depth = 0; @@ -88,16 +88,11 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in state.pc = (uintptr_t)dtrace_getpcstack; while (depth < pcstack_limit) { - if (!INKERNEL(state.pc) || !INKERNEL(state.fp)) + if (!unwind_frame(curthread, &state)) break; + if (!INKERNEL(state.pc)) + break; - fp = state.fp; - state.sp = fp + 0x10; - /* FP to previous frame (X29) */ - state.fp = *(register_t *)(fp); - /* LR (X30) */ - state.pc = *(register_t *)(fp + 8) - 4; - /* * NB: Unlike some other architectures, we don't need to * explicitly insert cpu_dtrace_caller as it appears in the @@ -274,10 +269,10 @@ dtrace_getstackdepth(int aframes) int scp_offset; register_t sp; int depth; - int done; + bool done; depth = 1; - done = 0; + done = false; __asm __volatile("mov %0, sp" : "=&r" (sp)); @@ -286,7 +281,7 @@ dtrace_getstackdepth(int aframes) state.pc = (uintptr_t)dtrace_getstackdepth; do { - done = unwind_frame(&state); + done = !unwind_frame(curthread, &state); if (!INKERNEL(state.pc) || !INKERNEL(state.fp)) break; depth++; Modified: head/sys/cddl/dev/fbt/fbt.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt.c Tue Dec 8 17:57:18 2020 (r368454) +++ head/sys/cddl/dev/fbt/fbt.c Tue Dec 8 18:00:58 2020 (r368455) @@ -140,7 +140,7 @@ fbt_excluded(const char *name) * Stack unwinders may be called from probe context on some * platforms. */ -#if defined(__riscv) +#if defined(__aarch64__) || defined(__riscv) if (strcmp(name, "unwind_frame") == 0) return (1); #endif From owner-svn-src-all@freebsd.org Tue Dec 8 18:10:25 2020 Return-Path: Delivered-To: svn-src-all@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 4BC044A7E34; Tue, 8 Dec 2020 18:10:25 +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 4Cr7Wj1ZNjz4jS3; Tue, 8 Dec 2020 18:10:25 +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 2890018982; Tue, 8 Dec 2020 18:10:25 +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 0B8IAPrq088708; Tue, 8 Dec 2020 18:10:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8IAHKa088637; Tue, 8 Dec 2020 18:10:17 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012081810.0B8IAHKa088637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 8 Dec 2020 18:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368456 - in vendor-crypto/openssl/dist: . apps crypto/aes/asm crypto/asn1 crypto/bio crypto/chacha/asm crypto/cms crypto/err crypto/evp crypto/modes crypto/pkcs7 crypto/poly1305/asm cr... X-SVN-Group: vendor-crypto X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-crypto/openssl/dist: . apps crypto/aes/asm crypto/asn1 crypto/bio crypto/chacha/asm crypto/cms crypto/err crypto/evp crypto/modes crypto/pkcs7 crypto/poly1305/asm crypto/rand crypto/sha/asm ... X-SVN-Commit-Revision: 368456 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:10:25 -0000 Author: jkim Date: Tue Dec 8 18:10:16 2020 New Revision: 368456 URL: https://svnweb.freebsd.org/changeset/base/368456 Log: Import OpenSSL 1.1.1i. Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/ca.c vendor-crypto/openssl/dist/apps/cms.c vendor-crypto/openssl/dist/config vendor-crypto/openssl/dist/crypto/aes/asm/aesv8-armx.pl vendor-crypto/openssl/dist/crypto/asn1/asn1_err.c vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c vendor-crypto/openssl/dist/crypto/asn1/tasn_enc.c vendor-crypto/openssl/dist/crypto/bio/b_addr.c vendor-crypto/openssl/dist/crypto/chacha/asm/chacha-armv8.pl vendor-crypto/openssl/dist/crypto/cms/cms_smime.c vendor-crypto/openssl/dist/crypto/err/openssl.txt vendor-crypto/openssl/dist/crypto/evp/bio_ok.c vendor-crypto/openssl/dist/crypto/modes/modes_local.h vendor-crypto/openssl/dist/crypto/pkcs7/pk7_smime.c vendor-crypto/openssl/dist/crypto/poly1305/asm/poly1305-armv8.pl vendor-crypto/openssl/dist/crypto/rand/rand_unix.c vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv8.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv8.pl vendor-crypto/openssl/dist/crypto/x509/x509_att.c vendor-crypto/openssl/dist/crypto/x509/x509_cmp.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/crypto/x509v3/v3_genn.c vendor-crypto/openssl/dist/doc/man1/verify.pod vendor-crypto/openssl/dist/doc/man3/BN_set_bit.pod vendor-crypto/openssl/dist/doc/man3/X509_STORE_set_verify_cb_func.pod vendor-crypto/openssl/dist/include/openssl/asn1err.h vendor-crypto/openssl/dist/include/openssl/opensslv.h vendor-crypto/openssl/dist/include/openssl/x509.h vendor-crypto/openssl/dist/ssl/record/rec_layer_d1.c vendor-crypto/openssl/dist/ssl/s3_lib.c vendor-crypto/openssl/dist/ssl/ssl_lib.c vendor-crypto/openssl/dist/ssl/ssl_sess.c vendor-crypto/openssl/dist/ssl/statem/statem_clnt.c vendor-crypto/openssl/dist/ssl/statem/statem_srvr.c Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/CHANGES Tue Dec 8 18:10:16 2020 (r368456) @@ -7,6 +7,38 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1h and 1.1.1i [8 Dec 2020] + + *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function + This function could crash if both GENERAL_NAMEs contain an EDIPARTYNAME. + If an attacker can control both items being compared then this could lead + to a possible denial of service attack. OpenSSL itself uses the + GENERAL_NAME_cmp function for two purposes: + 1) Comparing CRL distribution point names between an available CRL and a + CRL distribution point embedded in an X509 certificate + 2) When verifying that a timestamp response token signer matches the + timestamp authority name (exposed via the API functions + TS_RESP_verify_response and TS_RESP_verify_token) + (CVE-2020-1971) + [Matt Caswell] + + *) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target. + [Stuart Carnie] + + *) The security callback, which can be customised by application code, supports + the security operation SSL_SECOP_TMP_DH. This is defined to take an EVP_PKEY + in the "other" parameter. In most places this is what is passed. All these + places occur server side. However there was one client side call of this + security operation and it passed a DH object instead. This is incorrect + according to the definition of SSL_SECOP_TMP_DH, and is inconsistent with all + of the other locations. Therefore this client side call has been changed to + pass an EVP_PKEY instead. + [Matt Caswell] + + *) In 1.1.1h, an expired trusted (root) certificate was not anymore rejected + when validating a certificate path. This check is restored in 1.1.1i. + [David von Oheimb] + Changes between 1.1.1g and 1.1.1h [22 Sep 2020] *) Certificates with explicit curve parameters are now disallowed in @@ -31,6 +63,10 @@ *) Handshake now fails if Extended Master Secret extension is dropped on renegotiation. [Tomas Mraz] + + *) Accidentally, an expired trusted (root) certificate is not anymore rejected + when validating a certificate path. + [David von Oheimb] *) The Oracle Developer Studio compiler will start reporting deprecated APIs Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/NEWS Tue Dec 8 18:10:16 2020 (r368456) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020] + + o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971) + Major changes between OpenSSL 1.1.1g and OpenSSL 1.1.1h [22 Sep 2020] o Disallow explicit curve parameters in verifications chains when Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/README Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1h 22 Sep 2020 + OpenSSL 1.1.1i 8 Dec 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/apps/ca.c ============================================================================== --- vendor-crypto/openssl/dist/apps/ca.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/apps/ca.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * 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 @@ -1862,8 +1862,8 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 * row[DB_exp_date][tm->length] = '\0'; row[DB_rev_date] = NULL; row[DB_file] = OPENSSL_strdup("unknown"); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || - (row[DB_file] == NULL) || (row[DB_name] == NULL)) { + if ((row[DB_type] == NULL) || (row[DB_file] == NULL) + || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto end; } Modified: vendor-crypto/openssl/dist/apps/cms.c ============================================================================== --- vendor-crypto/openssl/dist/apps/cms.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/apps/cms.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-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 @@ -545,9 +545,11 @@ int cms_main(int argc, char **argv) if (key_param == NULL || key_param->idx != keyidx) { cms_key_param *nparam; nparam = app_malloc(sizeof(*nparam), "key param buffer"); - nparam->idx = keyidx; - if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) + if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) { + OPENSSL_free(nparam); goto end; + } + nparam->idx = keyidx; nparam->next = NULL; if (key_first == NULL) key_first = nparam; Modified: vendor-crypto/openssl/dist/config ============================================================================== --- vendor-crypto/openssl/dist/config Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/config Tue Dec 8 18:10:16 2020 (r368456) @@ -253,11 +253,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in Power*) echo "ppc-apple-darwin${VERSION}" ;; - x86_64) - echo "x86_64-apple-darwin${VERSION}" - ;; *) - echo "i686-apple-darwin${VERSION}" + echo "${MACHINE}-apple-darwin${VERSION}" ;; esac exit 0 @@ -497,6 +494,9 @@ case "$GUESSOS" in else OUT="darwin64-x86_64-cc" fi ;; + $MACHINE-apple-darwin*) + OUT="darwin64-$MACHINE-cc" + ;; armv6+7-*-iphoneos) __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" Modified: vendor-crypto/openssl/dist/crypto/aes/asm/aesv8-armx.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/aes/asm/aesv8-armx.pl Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/aes/asm/aesv8-armx.pl Tue Dec 8 18:10:16 2020 (r368456) @@ -183,7 +183,12 @@ $code.=<<___; .Loop192: vtbl.8 $key,{$in1},$mask vext.8 $tmp,$zero,$in0,#12 +#ifdef __ARMEB__ + vst1.32 {$in1},[$out],#16 + sub $out,$out,#8 +#else vst1.32 {$in1},[$out],#8 +#endif aese $key,$zero subs $bits,$bits,#1 @@ -715,8 +720,11 @@ $code.=<<___; ldr $rounds,[$key,#240] ldr $ctr, [$ivp, #12] +#ifdef __ARMEB__ + vld1.8 {$dat0},[$ivp] +#else vld1.32 {$dat0},[$ivp] - +#endif vld1.32 {q8-q9},[$key] // load key schedule... sub $rounds,$rounds,#4 mov $step,#16 @@ -732,17 +740,17 @@ $code.=<<___; #ifndef __ARMEB__ rev $ctr, $ctr #endif - vorr $dat1,$dat0,$dat0 add $tctr1, $ctr, #1 - vorr $dat2,$dat0,$dat0 - add $ctr, $ctr, #2 vorr $ivec,$dat0,$dat0 rev $tctr1, $tctr1 - vmov.32 ${dat1}[3],$tctr1 + vmov.32 ${ivec}[3],$tctr1 + add $ctr, $ctr, #2 + vorr $dat1,$ivec,$ivec b.ls .Lctr32_tail rev $tctr2, $ctr + vmov.32 ${ivec}[3],$tctr2 sub $len,$len,#3 // bias - vmov.32 ${dat2}[3],$tctr2 + vorr $dat2,$ivec,$ivec b .Loop3x_ctr32 .align 4 @@ -769,11 +777,11 @@ $code.=<<___; aese $dat1,q8 aesmc $tmp1,$dat1 vld1.8 {$in0},[$inp],#16 - vorr $dat0,$ivec,$ivec + add $tctr0,$ctr,#1 aese $dat2,q8 aesmc $dat2,$dat2 vld1.8 {$in1},[$inp],#16 - vorr $dat1,$ivec,$ivec + rev $tctr0,$tctr0 aese $tmp0,q9 aesmc $tmp0,$tmp0 aese $tmp1,q9 @@ -782,8 +790,6 @@ $code.=<<___; mov $key_,$key aese $dat2,q9 aesmc $tmp2,$dat2 - vorr $dat2,$ivec,$ivec - add $tctr0,$ctr,#1 aese $tmp0,q12 aesmc $tmp0,$tmp0 aese $tmp1,q12 @@ -799,20 +805,22 @@ $code.=<<___; aese $tmp1,q13 aesmc $tmp1,$tmp1 veor $in2,$in2,$rndlast - rev $tctr0,$tctr0 + vmov.32 ${ivec}[3], $tctr0 aese $tmp2,q13 aesmc $tmp2,$tmp2 - vmov.32 ${dat0}[3], $tctr0 + vorr $dat0,$ivec,$ivec rev $tctr1,$tctr1 aese $tmp0,q14 aesmc $tmp0,$tmp0 + vmov.32 ${ivec}[3], $tctr1 + rev $tctr2,$ctr aese $tmp1,q14 aesmc $tmp1,$tmp1 - vmov.32 ${dat1}[3], $tctr1 - rev $tctr2,$ctr + vorr $dat1,$ivec,$ivec + vmov.32 ${ivec}[3], $tctr2 aese $tmp2,q14 aesmc $tmp2,$tmp2 - vmov.32 ${dat2}[3], $tctr2 + vorr $dat2,$ivec,$ivec subs $len,$len,#3 aese $tmp0,q15 aese $tmp1,q15 Modified: vendor-crypto/openssl/dist/crypto/asn1/asn1_err.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/asn1_err.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/asn1/asn1_err.c Tue Dec 8 18:10:16 2020 (r368456) @@ -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: vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-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 @@ -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: vendor-crypto/openssl/dist/crypto/asn1/tasn_enc.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/asn1/tasn_enc.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/asn1/tasn_enc.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-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 @@ -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: vendor-crypto/openssl/dist/crypto/bio/b_addr.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/bio/b_addr.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/bio/b_addr.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,11 +1,15 @@ /* - * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-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 * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ + +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #include Modified: vendor-crypto/openssl/dist/crypto/chacha/asm/chacha-armv8.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/chacha/asm/chacha-armv8.pl Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/chacha/asm/chacha-armv8.pl Tue Dec 8 18:10:16 2020 (r368456) @@ -125,6 +125,7 @@ $code.=<<___; .text .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P .align 5 .Lsigma: Modified: vendor-crypto/openssl/dist/crypto/cms/cms_smime.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/cms/cms_smime.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/cms/cms_smime.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-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 @@ -341,7 +341,7 @@ int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *c char *ptr; long len; len = BIO_get_mem_data(dcont, &ptr); - tmpin = BIO_new_mem_buf(ptr, len); + tmpin = (len == 0) ? dcont : BIO_new_mem_buf(ptr, len); if (tmpin == NULL) { CMSerr(CMS_F_CMS_VERIFY, ERR_R_MALLOC_FAILURE); goto err2; Modified: vendor-crypto/openssl/dist/crypto/err/openssl.txt ============================================================================== --- vendor-crypto/openssl/dist/crypto/err/openssl.txt Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/err/openssl.txt Tue Dec 8 18:10:16 2020 (r368456) @@ -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: vendor-crypto/openssl/dist/crypto/evp/bio_ok.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/evp/bio_ok.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/evp/bio_ok.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * 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 @@ -203,7 +203,7 @@ static int ok_read(BIO *b, char *out, int outl) /* * copy start of the next block into proper place */ - if (ctx->buf_len_save - ctx->buf_off_save > 0) { + if (ctx->buf_len_save > ctx->buf_off_save) { ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; memmove(ctx->buf, &(ctx->buf[ctx->buf_off_save]), ctx->buf_len); Modified: vendor-crypto/openssl/dist/crypto/modes/modes_local.h ============================================================================== --- vendor-crypto/openssl/dist/crypto/modes/modes_local.h Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/modes/modes_local.h Tue Dec 8 18:10:16 2020 (r368456) @@ -63,12 +63,15 @@ typedef u32 u32_a1; asm ("bswapl %0" \ : "+r"(ret_)); ret_; }) # elif defined(__aarch64__) -# define BSWAP8(x) ({ u64 ret_; \ +# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ + __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ +# define BSWAP8(x) ({ u64 ret_; \ asm ("rev %0,%1" \ : "=r"(ret_) : "r"(x)); ret_; }) -# define BSWAP4(x) ({ u32 ret_; \ +# define BSWAP4(x) ({ u32 ret_; \ asm ("rev %w0,%w1" \ : "=r"(ret_) : "r"(x)); ret_; }) +# endif # elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT) # define BSWAP8(x) ({ u32 lo_=(u64)(x)>>32,hi_=(x); \ asm ("rev %0,%0; rev %1,%1" \ Modified: vendor-crypto/openssl/dist/crypto/pkcs7/pk7_smime.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/pkcs7/pk7_smime.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/pkcs7/pk7_smime.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-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 @@ -301,7 +301,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X50 char *ptr; long len; len = BIO_get_mem_data(indata, &ptr); - tmpin = BIO_new_mem_buf(ptr, len); + tmpin = (len == 0) ? indata : BIO_new_mem_buf(ptr, len); if (tmpin == NULL) { PKCS7err(PKCS7_F_PKCS7_VERIFY, ERR_R_MALLOC_FAILURE); goto err; Modified: vendor-crypto/openssl/dist/crypto/poly1305/asm/poly1305-armv8.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/poly1305/asm/poly1305-armv8.pl Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/poly1305/asm/poly1305-armv8.pl Tue Dec 8 18:10:16 2020 (r368456) @@ -57,10 +57,14 @@ $code.=<<___; // forward "declarations" are required for Apple .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P +.globl poly1305_init +.hidden poly1305_init .globl poly1305_blocks +.hidden poly1305_blocks .globl poly1305_emit +.hidden poly1305_emit -.globl poly1305_init .type poly1305_init,%function .align 5 poly1305_init: @@ -860,8 +864,8 @@ poly1305_blocks_neon: st1 {$ACC4}[0],[$ctx] .Lno_data_neon: - .inst 0xd50323bf // autiasp ldr x29,[sp],#80 + .inst 0xd50323bf // autiasp ret .size poly1305_blocks_neon,.-poly1305_blocks_neon Modified: vendor-crypto/openssl/dist/crypto/rand/rand_unix.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/rand/rand_unix.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/rand/rand_unix.c Tue Dec 8 18:10:16 2020 (r368456) @@ -365,12 +365,19 @@ static ssize_t syscall_random(void *buf, size_t buflen * - OpenBSD since 5.6 * - Linux since 3.17 with glibc 2.25 * - FreeBSD since 12.0 (1200061) + * + * Note: Sometimes getentropy() can be provided but not implemented + * internally. So we need to check errno for ENOSYS */ # if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux) extern int getentropy(void *buffer, size_t length) __attribute__((weak)); - if (getentropy != NULL) - return getentropy(buf, buflen) == 0 ? (ssize_t)buflen : -1; + if (getentropy != NULL) { + if (getentropy(buf, buflen) == 0) + return (ssize_t)buflen; + if (errno != ENOSYS) + return -1; + } # else union { void *p; Modified: vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv8.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv8.pl Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv8.pl Tue Dec 8 18:10:16 2020 (r368456) @@ -176,6 +176,7 @@ $code.=<<___; .text .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P .globl sha1_block_data_order .type sha1_block_data_order,%function .align 6 @@ -329,7 +330,6 @@ $code.=<<___; #endif .asciz "SHA1 block transform for ARMv8, CRYPTOGAMS by " .align 2 -.comm OPENSSL_armcap_P,4,4 ___ }}} Modified: vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv8.pl ============================================================================== --- vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv8.pl Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv8.pl Tue Dec 8 18:10:16 2020 (r368456) @@ -193,6 +193,7 @@ $code.=<<___; .text .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P .globl $func .type $func,%function .align 6 @@ -839,12 +840,6 @@ $code.=<<___; #endif ___ } - -$code.=<<___; -#ifndef __KERNEL__ -.comm OPENSSL_armcap_P,4,4 -#endif -___ { my %opcode = ( "sha256h" => 0x5e004000, "sha256h2" => 0x5e005000, Modified: vendor-crypto/openssl/dist/crypto/x509/x509_att.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/x509/x509_att.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/x509/x509_att.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * 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 @@ -149,7 +149,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STAC return ret; } -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, +void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, int lastpos, int type) { int i; Modified: vendor-crypto/openssl/dist/crypto/x509/x509_cmp.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/x509/x509_cmp.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/x509/x509_cmp.c Tue Dec 8 18:10:16 2020 (r368456) @@ -135,6 +135,8 @@ int X509_cmp(const X509 *a, const X509 *b) { int rv; + if (a == b) /* for efficiency */ + return 0; /* ensure hash is valid */ if (X509_check_purpose((X509 *)a, -1, 0) != 1) return -2; Modified: vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c Tue Dec 8 18:10:16 2020 (r368456) @@ -312,8 +312,20 @@ int X509_verify_cert(X509_STORE_CTX *ctx) return ret; } +static int sk_X509_contains(STACK_OF(X509) *sk, X509 *cert) +{ + int i, n = sk_X509_num(sk); + + for (i = 0; i < n; i++) + if (X509_cmp(sk_X509_value(sk, i), cert) == 0) + return 1; + return 0; +} + /* - * Given a STACK_OF(X509) find the issuer of cert (if any) + * Find in given STACK_OF(X509) sk a non-expired issuer cert (if any) of given cert x. + * The issuer must not be the same as x and must not yet be in ctx->chain, where the + * exceptional case x is self-issued and ctx->chain has just one element is allowed. */ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x) { @@ -322,7 +334,13 @@ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF for (i = 0; i < sk_X509_num(sk); i++) { issuer = sk_X509_value(sk, i); - if (ctx->check_issued(ctx, x, issuer)) { + /* + * Below check 'issuer != x' is an optimization and safety precaution: + * Candidate issuer cert cannot be the same as the subject cert 'x'. + */ + if (issuer != x && ctx->check_issued(ctx, x, issuer) + && (((x->ex_flags & EXFLAG_SI) != 0 && sk_X509_num(ctx->chain) == 1) + || !sk_X509_contains(ctx->chain, issuer))) { rv = issuer; if (x509_check_cert_time(ctx, rv, -1)) break; @@ -331,30 +349,13 @@ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF return rv; } -/* - * Check that the given certificate 'x' is issued by the certificate 'issuer' - * and the issuer is not yet in ctx->chain, where the exceptional case - * that 'x' is self-issued and ctx->chain has just one element is allowed. - */ +/* Check that the given certificate 'x' is issued by the certificate 'issuer' */ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) { - if (x509_likely_issued(issuer, x) != X509_V_OK) - return 0; - if ((x->ex_flags & EXFLAG_SI) == 0 || sk_X509_num(ctx->chain) != 1) { - int i; - X509 *ch; - - for (i = 0; i < sk_X509_num(ctx->chain); i++) { - ch = sk_X509_value(ctx->chain, i); - if (ch == issuer || X509_cmp(ch, issuer) == 0) - return 0; - } - } - return 1; + return x509_likely_issued(issuer, x) == X509_V_OK; } /* Alternative lookup method: look from a STACK stored in other_ctx */ - static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) { *issuer = find_issuer(ctx, ctx->other_ctx, x); @@ -1740,7 +1741,7 @@ static int internal_verify(X509_STORE_CTX *ctx) if (ctx->bare_ta_signed) { xs = xi; xi = NULL; - goto check_cert; + goto check_cert_time; } if (ctx->check_issued(ctx, xi, xi)) @@ -1748,11 +1749,17 @@ static int internal_verify(X509_STORE_CTX *ctx) else { if (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) { xs = xi; - goto check_cert; + goto check_cert_time; } - if (n <= 0) - return verify_cb_cert(ctx, xi, 0, - X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE); + if (n <= 0) { + if (!verify_cb_cert(ctx, xi, 0, + X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE)) + return 0; + + xs = xi; + goto check_cert_time; + } + n--; ctx->error_depth = n; xs = sk_X509_value(ctx->chain, n); @@ -1811,7 +1818,7 @@ static int internal_verify(X509_STORE_CTX *ctx) } } - check_cert: + check_cert_time: /* in addition to RFC 5280, do also for trusted (root) cert */ /* Calls verify callback as needed */ if (!x509_check_cert_time(ctx, xs, n)) return 0; Modified: vendor-crypto/openssl/dist/crypto/x509v3/v3_genn.c ============================================================================== --- vendor-crypto/openssl/dist/crypto/x509v3/v3_genn.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/crypto/x509v3/v3_genn.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-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 @@ -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: vendor-crypto/openssl/dist/doc/man1/verify.pod ============================================================================== --- vendor-crypto/openssl/dist/doc/man1/verify.pod Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/doc/man1/verify.pod Tue Dec 8 18:10:16 2020 (r368456) @@ -382,10 +382,14 @@ should be trusted for the supplied purpose. For compatibility with previous versions of OpenSSL, a certificate with no trust settings is considered to be valid for all purposes. -The final operation is to check the validity of the certificate chain. The validity -period is checked against the current system time and the notBefore and notAfter -dates in the certificate. The certificate signatures are also checked at this -point. +The final operation is to check the validity of the certificate chain. +For each element in the chain, including the root CA certificate, +the validity period as specified by the C and C fields +is checked against the current system time. +The B<-attime> flag may be used to use a reference time other than "now." +The certificate signature is checked as well +(except for the signature of the typically self-signed root CA certificate, +which is verified only if the B<-check_ss_sig> option is given). If all operations complete successfully then certificate is considered valid. If any operation fails then the certificate is not valid. Modified: vendor-crypto/openssl/dist/doc/man3/BN_set_bit.pod ============================================================================== --- vendor-crypto/openssl/dist/doc/man3/BN_set_bit.pod Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/doc/man3/BN_set_bit.pod Tue Dec 8 18:10:16 2020 (r368456) @@ -33,7 +33,7 @@ error occurs if B is shorter than B bits. BN_is_bit_set() tests if bit B in B is set. BN_mask_bits() truncates B to an B bit number -(CEn)>). An error occurs if B already is +(CEn)>). An error occurs if B already is shorter than B bits. BN_lshift() shifts B left by B bits and places the result in Modified: vendor-crypto/openssl/dist/doc/man3/X509_STORE_set_verify_cb_func.pod ============================================================================== --- vendor-crypto/openssl/dist/doc/man3/X509_STORE_set_verify_cb_func.pod Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/doc/man3/X509_STORE_set_verify_cb_func.pod Tue Dec 8 18:10:16 2020 (r368456) @@ -137,9 +137,7 @@ I X509_STORE_set_check_issued() sets the function to check that a given -certificate B is issued by the issuer certificate B and -the issuer is not yet in the chain contained in , where the exceptional -case that B is self-issued and ctx->chain has just one element is allowed. +certificate B is issued by the issuer certificate B. This function must return 0 on failure (among others if B hasn't been issued with B) and 1 on success. I -# 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 Modified: vendor-crypto/openssl/dist/include/openssl/opensslv.h ============================================================================== --- vendor-crypto/openssl/dist/include/openssl/opensslv.h Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/include/openssl/opensslv.h Tue Dec 8 18:10:16 2020 (r368456) @@ -39,8 +39,8 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1010108fL -# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1h 22 Sep 2020" +# define OPENSSL_VERSION_NUMBER 0x1010109fL +# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1i 8 Dec 2020" /*- * The macros below are to be used for shared library (.so, .dll, ...) Modified: vendor-crypto/openssl/dist/include/openssl/x509.h ============================================================================== --- vendor-crypto/openssl/dist/include/openssl/x509.h Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/include/openssl/x509.h Tue Dec 8 18:10:16 2020 (r368456) @@ -933,7 +933,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STAC int type, const unsigned char *bytes, int len); -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, +void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, int lastpos, int type); X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, int atrtype, const void *data, Modified: vendor-crypto/openssl/dist/ssl/record/rec_layer_d1.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/record/rec_layer_d1.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/ssl/record/rec_layer_d1.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 2005-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2005-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 @@ -808,8 +808,8 @@ int do_dtls1_write(SSL *s, int type, const unsigned ch wb = &s->rlayer.wbuf[0]; /* - * first check if there is a SSL3_BUFFER still being written out. This - * will happen with non blocking IO + * DTLS writes whole datagrams, so there can't be anything left in + * the buffer. */ if (!ossl_assert(SSL3_BUFFER_get_left(wb) == 0)) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_DO_DTLS1_WRITE, Modified: vendor-crypto/openssl/dist/ssl/s3_lib.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/s3_lib.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/ssl/s3_lib.c Tue Dec 8 18:10:16 2020 (r368456) @@ -4072,9 +4072,10 @@ const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id) const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname) { - SSL_CIPHER *c = NULL, *tbl; - SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers}; - size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS}; + SSL_CIPHER *tbl; + SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers, ssl3_scsvs}; + size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, + SSL3_NUM_SCSVS}; /* this is not efficient, necessary to optimize this? */ for (j = 0; j < OSSL_NELEM(alltabs); j++) { @@ -4082,21 +4083,11 @@ const SSL_CIPHER *ssl3_get_cipher_by_std_name(const ch if (tbl->stdname == NULL) continue; if (strcmp(stdname, tbl->stdname) == 0) { - c = tbl; - break; + return tbl; } } } - if (c == NULL) { - tbl = ssl3_scsvs; - for (i = 0; i < SSL3_NUM_SCSVS; i++, tbl++) { - if (strcmp(stdname, tbl->stdname) == 0) { - c = tbl; - break; - } - } - } - return c; + return NULL; } /* Modified: vendor-crypto/openssl/dist/ssl/ssl_lib.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/ssl_lib.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/ssl/ssl_lib.c Tue Dec 8 18:10:16 2020 (r368456) @@ -2678,7 +2678,7 @@ const char *SSL_get_servername(const SSL *s, const int * - Otherwise it returns NULL * * During/after the handshake (TLSv1.2 or below resumption occurred): - * - If the session from the orignal handshake had a servername accepted + * - If the session from the original handshake had a servername accepted * by the server then it will return that servername. * - Otherwise it returns the servername set via * SSL_set_tlsext_host_name() (or NULL if it was not called). Modified: vendor-crypto/openssl/dist/ssl/ssl_sess.c ============================================================================== --- vendor-crypto/openssl/dist/ssl/ssl_sess.c Tue Dec 8 18:00:58 2020 (r368455) +++ vendor-crypto/openssl/dist/ssl/ssl_sess.c Tue Dec 8 18:10:16 2020 (r368456) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -107,7 +107,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int tic { SSL_SESSION *dest; - dest = OPENSSL_malloc(sizeof(*src)); + dest = OPENSSL_malloc(sizeof(*dest)); if (dest == NULL) { goto err; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 8 18:11:29 2020 Return-Path: Delivered-To: svn-src-all@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 4DA6A4A8441; Tue, 8 Dec 2020 18:11:29 +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 4Cr7Xx0QsKz4k6l; Tue, 8 Dec 2020 18:11:29 +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 EBC4818832; Tue, 8 Dec 2020 18:11:28 +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 0B8IBSJ1091732; Tue, 8 Dec 2020 18:11:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8IBS4R091730; Tue, 8 Dec 2020 18:11:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012081811.0B8IBS4R091730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 8 Dec 2020 18:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368457 - vendor-crypto/openssl/1.1.1i X-SVN-Group: vendor-crypto X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-crypto/openssl/1.1.1i X-SVN-Commit-Revision: 368457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:11:29 -0000 Author: jkim Date: Tue Dec 8 18:11:28 2020 New Revision: 368457 URL: https://svnweb.freebsd.org/changeset/base/368457 Log: Tag OpenSSL 1.1.1i. Added: vendor-crypto/openssl/1.1.1i/ - copied from r368456, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Tue Dec 8 18:24:34 2020 Return-Path: Delivered-To: svn-src-all@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 1048C4A8858; Tue, 8 Dec 2020 18:24:34 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr7r15x6vz4kvB; Tue, 8 Dec 2020 18:24:33 +0000 (UTC) (envelope-from mhorne@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 BEBDA18A3D; Tue, 8 Dec 2020 18:24:33 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8IOX3f002127; Tue, 8 Dec 2020 18:24:33 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8IOX3T002126; Tue, 8 Dec 2020 18:24:33 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012081824.0B8IOX3T002126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Tue, 8 Dec 2020 18:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368458 - head/sys/arm64/linux X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/arm64/linux X-SVN-Commit-Revision: 368458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:24:34 -0000 Author: mhorne Date: Tue Dec 8 18:24:33 2020 New Revision: 368458 URL: https://svnweb.freebsd.org/changeset/base/368458 Log: arm64: fix struct l_sigaction_t layout The definition was copied from amd64, but the layout of the struct differs slightly between these platforms. This fixes spurious `unsupported sigaction flag 0xXXXXXXXX` messages when executing some Linux binaries on arm64. Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27460 Modified: head/sys/arm64/linux/linux.h Modified: head/sys/arm64/linux/linux.h ============================================================================== --- head/sys/arm64/linux/linux.h Tue Dec 8 18:11:28 2020 (r368457) +++ head/sys/arm64/linux/linux.h Tue Dec 8 18:24:33 2020 (r368458) @@ -163,9 +163,9 @@ typedef void (*l_handler_t)(l_int); typedef struct { l_handler_t lsa_handler; - l_sigset_t lsa_mask; l_ulong lsa_flags; l_uintptr_t lsa_restorer; + l_sigset_t lsa_mask; } l_sigaction_t; /* XXX */ typedef struct { From owner-svn-src-all@freebsd.org Tue Dec 8 18:28:51 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 18:44:07 2020 Return-Path: Delivered-To: svn-src-all@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 56B4D4A8AC7; Tue, 8 Dec 2020 18:44:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr8Gb23H1z4ltQ; Tue, 8 Dec 2020 18:44:07 +0000 (UTC) (envelope-from kevans@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 39B6619192; Tue, 8 Dec 2020 18:44:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8Ii7XD014625; Tue, 8 Dec 2020 18:44:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8Ii7W3014624; Tue, 8 Dec 2020 18:44:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012081844.0B8Ii7W3014624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 8 Dec 2020 18:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368460 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:44:07 -0000 Author: kevans Date: Tue Dec 8 18:44:06 2020 New Revision: 368460 URL: https://svnweb.freebsd.org/changeset/base/368460 Log: kern: cpuset: plug a unr leak cpuset_rel_defer() is supposed to be functionally equivalent to cpuset_rel() but with anything that might sleep deferred until cpuset_rel_complete -- this setup is used specifically for cpuset_setproc. Add in the missing unr free to match cpuset_rel. This fixes a leak that was observed when I wrote a small userland application to try and debug another issue, which effectively did: cpuset(&newid); cpuset(&scratch); newid gets leaked when scratch is created; it's off the list, so there's no mechanism for anything else to relinquish it. A more realistic reproducer would likely be a process that inherits some cpuset that it's the only ref for, but it creates a new one to modify. Alternatively, administratively reassigning a process' cpuset that it's the last ref for will have the same effect. Discovered through D27498. MFC after: 1 week Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Tue Dec 8 18:28:49 2020 (r368459) +++ head/sys/kern/kern_cpuset.c Tue Dec 8 18:44:06 2020 (r368460) @@ -246,9 +246,14 @@ cpuset_rel_defer(struct setlist *head, struct cpuset * static void cpuset_rel_complete(struct cpuset *set) { + cpusetid_t id; + + id = set->cs_id; LIST_REMOVE(set, cs_link); cpuset_rel(set->cs_parent); uma_zfree(cpuset_zone, set); + if (id != CPUSET_INVALID) + free_unr(cpuset_unr, id); } /* From owner-svn-src-all@freebsd.org Tue Dec 8 18:45:53 2020 Return-Path: Delivered-To: svn-src-all@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 58F9E4A8CF4; Tue, 8 Dec 2020 18:45:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr8Jb5bL2z4m40; Tue, 8 Dec 2020 18:45:50 +0000 (UTC) (envelope-from kevans@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 763D218E6A; Tue, 8 Dec 2020 18:45:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8IjlI5014759; Tue, 8 Dec 2020 18:45:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8Ijlfc014758; Tue, 8 Dec 2020 18:45:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012081845.0B8Ijlfc014758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 8 Dec 2020 18:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368461 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:45:53 -0000 Author: kevans Date: Tue Dec 8 18:45:47 2020 New Revision: 368461 URL: https://svnweb.freebsd.org/changeset/base/368461 Log: kern: cpuset: resolve race between cpuset_lookup/cpuset_rel The race plays out like so between threads A and B: 1. A ref's cpuset 10 2. B does a lookup of cpuset 10, grabs the cpuset lock and searches cpuset_ids 3. A rel's cpuset 10 and observes the last ref, waits on the cpuset lock while B is still searching and not yet ref'd 4. B ref's cpuset 10 and drops the cpuset lock 5. A proceeds to free the cpuset out from underneath B Resolve the race by only releasing the last reference under the cpuset lock. Thread A now picks up the spinlock and observes that the cpuset has been revived, returning immediately for B to deal with later. Reported by: syzbot+92dff413e201164c796b@syzkaller.appspotmail.com Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27498 Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Tue Dec 8 18:44:06 2020 (r368460) +++ head/sys/kern/kern_cpuset.c Tue Dec 8 18:45:47 2020 (r368461) @@ -207,9 +207,13 @@ cpuset_rel(struct cpuset *set) { cpusetid_t id; - if (refcount_release(&set->cs_ref) == 0) + if (refcount_release_if_not_last(&set->cs_ref)) return; mtx_lock_spin(&cpuset_lock); + if (!refcount_release(&set->cs_ref)) { + mtx_unlock_spin(&cpuset_lock); + return; + } LIST_REMOVE(set, cs_siblings); id = set->cs_id; if (id != CPUSET_INVALID) @@ -229,9 +233,13 @@ static void cpuset_rel_defer(struct setlist *head, struct cpuset *set) { - if (refcount_release(&set->cs_ref) == 0) + if (refcount_release_if_not_last(&set->cs_ref)) return; mtx_lock_spin(&cpuset_lock); + if (!refcount_release(&set->cs_ref)) { + mtx_unlock_spin(&cpuset_lock); + return; + } LIST_REMOVE(set, cs_siblings); if (set->cs_id != CPUSET_INVALID) LIST_REMOVE(set, cs_link); From owner-svn-src-all@freebsd.org Tue Dec 8 18:47:23 2020 Return-Path: Delivered-To: svn-src-all@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 7617E4A8D67; Tue, 8 Dec 2020 18:47:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr8LM2xCdz4mQX; Tue, 8 Dec 2020 18:47:23 +0000 (UTC) (envelope-from kevans@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 5792518E6D; Tue, 8 Dec 2020 18:47:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8IlNab014883; Tue, 8 Dec 2020 18:47:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8IlNwE014882; Tue, 8 Dec 2020 18:47:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012081847.0B8IlNwE014882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 8 Dec 2020 18:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368462 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:47:23 -0000 Author: kevans Date: Tue Dec 8 18:47:22 2020 New Revision: 368462 URL: https://svnweb.freebsd.org/changeset/base/368462 Log: cpuset_set{affinity,domain}: do not allow empty masks cpuset_modify() would not currently catch this, because it only checks that the new mask is a subset of the root set and circumvents the EDEADLK check in cpuset_testupdate(). This change both directly validates the mask coming in since we can trivially detect an empty mask, and it updates cpuset_testupdate to catch stuff like this going forward by always ensuring we don't end up with an empty mask. The check_mask argument has been renamed because the 'check' verbiage does not imply to me that it's actually doing a different operation. We're either augmenting the existing mask, or we are replacing it entirely. Reported by: syzbot+4e3b1009de98d2fabcda@syzkaller.appspotmail.com Discussed with: andrew Reviewed by: andrew, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27511 Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Tue Dec 8 18:45:47 2020 (r368461) +++ head/sys/kern/kern_cpuset.c Tue Dec 8 18:47:22 2020 (r368462) @@ -633,7 +633,7 @@ domainset_shadow(const struct domainset *pdomain, * empty as well as RDONLY flags. */ static int -cpuset_testupdate(struct cpuset *set, cpuset_t *mask, int check_mask) +cpuset_testupdate(struct cpuset *set, cpuset_t *mask, int augment_mask) { struct cpuset *nset; cpuset_t newmask; @@ -642,13 +642,14 @@ cpuset_testupdate(struct cpuset *set, cpuset_t *mask, mtx_assert(&cpuset_lock, MA_OWNED); if (set->cs_flags & CPU_SET_RDONLY) return (EPERM); - if (check_mask) { - if (!CPU_OVERLAP(&set->cs_mask, mask)) - return (EDEADLK); + if (augment_mask) { CPU_COPY(&set->cs_mask, &newmask); CPU_AND(&newmask, mask); } else CPU_COPY(mask, &newmask); + + if (CPU_EMPTY(&newmask)) + return (EDEADLK); error = 0; LIST_FOREACH(nset, &set->cs_children, cs_siblings) if ((error = cpuset_testupdate(nset, &newmask, 1)) != 0) @@ -723,7 +724,7 @@ out: */ static int cpuset_testupdate_domain(struct cpuset *set, struct domainset *dset, - struct domainset *orig, int *count, int check_mask) + struct domainset *orig, int *count, int augment_mask __unused) { struct cpuset *nset; struct domainset *domain; @@ -2001,6 +2002,10 @@ kern_cpuset_setaffinity(struct thread *td, cpulevel_t goto out; } } + if (CPU_EMPTY(mask)) { + error = EDEADLK; + goto out; + } switch (level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: @@ -2254,6 +2259,10 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t le error = EINVAL; goto out; } + } + if (DOMAINSET_EMPTY(mask)) { + error = EDEADLK; + goto out; } DOMAINSET_COPY(mask, &domain.ds_mask); domain.ds_policy = policy; From owner-svn-src-all@freebsd.org Tue Dec 8 19:10:44 2020 Return-Path: Delivered-To: svn-src-all@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 772964A9AE6; Tue, 8 Dec 2020 19:10:44 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cr8sJ2wRLz4ncq; Tue, 8 Dec 2020 19:10:44 +0000 (UTC) (envelope-from gordon@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 4D18B19587; Tue, 8 Dec 2020 19:10:44 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8JAifW028280; Tue, 8 Dec 2020 19:10:44 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8JAeOP028259; Tue, 8 Dec 2020 19:10:40 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202012081910.0B8JAeOP028259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 8 Dec 2020 19:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r368463 - in releng: 12.1 12.1/crypto/openssl/crypto/asn1 12.1/crypto/openssl/crypto/err 12.1/crypto/openssl/crypto/x509v3 12.1/crypto/openssl/include/openssl 12.1/sys/conf 12.2 12.2/cr... X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 12.1 12.1/crypto/openssl/crypto/asn1 12.1/crypto/openssl/crypto/err 12.1/crypto/openssl/crypto/x509v3 12.1/crypto/openssl/include/openssl 12.1/sys/conf 12.2 12.2/crypto/openssl/crypto/asn1 ... X-SVN-Commit-Revision: 368463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 19:10:44 -0000 Author: gordon Date: Tue Dec 8 19:10:40 2020 New Revision: 368463 URL: https://svnweb.freebsd.org/changeset/base/368463 Log: Fix OpenSSL NULL pointer de-reference. Approved by: so Security: FreeBSD-SA-20:33.openssl Security: CVE-2020-1971 Modified: releng/12.1/UPDATING releng/12.1/crypto/openssl/crypto/asn1/asn1_err.c releng/12.1/crypto/openssl/crypto/asn1/tasn_dec.c releng/12.1/crypto/openssl/crypto/asn1/tasn_enc.c releng/12.1/crypto/openssl/crypto/err/openssl.txt releng/12.1/crypto/openssl/crypto/x509v3/v3_genn.c releng/12.1/crypto/openssl/include/openssl/asn1err.h releng/12.1/sys/conf/newvers.sh releng/12.2/UPDATING releng/12.2/crypto/openssl/crypto/asn1/asn1_err.c releng/12.2/crypto/openssl/crypto/asn1/tasn_dec.c releng/12.2/crypto/openssl/crypto/asn1/tasn_enc.c releng/12.2/crypto/openssl/crypto/err/openssl.txt releng/12.2/crypto/openssl/crypto/x509v3/v3_genn.c releng/12.2/crypto/openssl/include/openssl/asn1err.h releng/12.2/sys/conf/newvers.sh Modified: releng/12.1/UPDATING ============================================================================== --- releng/12.1/UPDATING Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/UPDATING Tue Dec 8 19:10:40 2020 (r368463) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20201208: p12 FreeBSD-SA-20:33.openssl + + Fix OpenSSL NULL pointer de-reference. [SA-20:33.openssl] + 20201201: p11 FreeBSD-EN-20:20.tzdata FreeBSD-SA-20:31.icmp6 FreeBSD-SA-20:32.rtsold Modified: releng/12.1/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- releng/12.1/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.1/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- releng/12.1/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.1/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- releng/12.1/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.1/crypto/openssl/crypto/err/openssl.txt ============================================================================== --- releng/12.1/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 19:10:40 2020 (r368463) @@ -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 @@ -1765,6 +1766,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: releng/12.1/crypto/openssl/crypto/x509v3/v3_genn.c ============================================================================== --- releng/12.1/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.1/crypto/openssl/include/openssl/asn1err.h ============================================================================== --- releng/12.1/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 19:10:40 2020 (r368463) @@ -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 Modified: releng/12.1/sys/conf/newvers.sh ============================================================================== --- releng/12.1/sys/conf/newvers.sh Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.1/sys/conf/newvers.sh Tue Dec 8 19:10:40 2020 (r368463) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.1" -BRANCH="RELEASE-p11" +BRANCH="RELEASE-p12" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/12.2/UPDATING ============================================================================== --- releng/12.2/UPDATING Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/UPDATING Tue Dec 8 19:10:40 2020 (r368463) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20201208: p2 FreeBSD-SA-20:33.openssl + + Fix OpenSSL NULL pointer de-reference. [SA-20:33.openssl] + 20201201: p1 FreeBSD-EN-20:19.audit FreeBSD-EN-20:20.tzdata FreeBSD-EN-20:21.ipfw Modified: releng/12.2/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- releng/12.2/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/crypto/openssl/crypto/asn1/asn1_err.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.2/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- releng/12.2/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/crypto/openssl/crypto/asn1/tasn_dec.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.2/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- releng/12.2/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/crypto/openssl/crypto/asn1/tasn_enc.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.2/crypto/openssl/crypto/err/openssl.txt ============================================================================== --- releng/12.2/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/crypto/openssl/crypto/err/openssl.txt Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.2/crypto/openssl/crypto/x509v3/v3_genn.c ============================================================================== --- releng/12.2/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/crypto/openssl/crypto/x509v3/v3_genn.c Tue Dec 8 19:10:40 2020 (r368463) @@ -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: releng/12.2/crypto/openssl/include/openssl/asn1err.h ============================================================================== --- releng/12.2/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/crypto/openssl/include/openssl/asn1err.h Tue Dec 8 19:10:40 2020 (r368463) @@ -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 Modified: releng/12.2/sys/conf/newvers.sh ============================================================================== --- releng/12.2/sys/conf/newvers.sh Tue Dec 8 18:47:22 2020 (r368462) +++ releng/12.2/sys/conf/newvers.sh Tue Dec 8 19:10:40 2020 (r368463) @@ -49,7 +49,7 @@ TYPE="FreeBSD" REVISION="12.2" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Tue Dec 8 20:12:36 2020 Return-Path: Delivered-To: svn-src-all@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 1DA684AAF9C for ; Tue, 8 Dec 2020 20:12:36 +0000 (UTC) (envelope-from tijarama@ams-node10.websitehostserver.net) Received: from ams-node10.websitehostserver.net (ams-node10.websitehostserver.net [107.6.183.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrBDg3W35z4rcH for ; Tue, 8 Dec 2020 20:12:35 +0000 (UTC) (envelope-from tijarama@ams-node10.websitehostserver.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=l-application.com; s=default; h=Date:Sender:Message-Id:Content-type: MIME-Version:From:Subject:To:Reply-To:Cc:Content-Transfer-Encoding:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ntah+/KcsMGxy+6YhD9rb+wL1zGH5WfN3EYG08zn0NM=; b=tsH2WepsCUsx+EC+SeuPbCbhrc JXj8qM8PSokq3lqqywuUkzPdsrjPc5om/Fs/kQSp+N2LRzVPaL2h1tj7IeaD1Tle6Y6auGeR/0lyy bXSrCmEuhpVc21MAz9rpUnCwXFtUX/Wv9wo5BZofd9T9+Dh7GCxkDX4VfaN4ft1SU4XGypW1WdRFX JkI8AZd7aNh5WgPTIBnGS5LmLzmGGM+vzlG8wCQXcWQYR+ozfzFuSCtKCDb21Uz7XxjwRYS6Ix1+L uz/85gdMISxuc9sQIizyyhpXTQByA0vStx7D2oyN9rTtpl9ZcHiNwvgZ6YyFL00JcoWXWnXa49sy3 QUp4Tmhg==; Received: from tijarama by ams-node10.websitehostserver.net with local (Exim 4.93) (envelope-from ) id 1kmiXT-0003TT-DX for svn-src-all@freebsd.org; Tue, 08 Dec 2020 20:20:43 +0100 To: svn-src-all@freebsd.org Subject: concernant : gcu.info X-PHP-Script: l-application.com/marketing/envois_recup.php for 34.89.138.100 X-PHP-Filename: /home/tijarama/public_html/lapplication/marketing/envois_recup.php REMOTE_ADDR: 34.89.138.100 From: service.commercial@l-application.com Message-Id: Sender: Date: Tue, 08 Dec 2020 20:20:43 +0100 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ams-node10.websitehostserver.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [1483 1488] / [47 12] X-AntiAbuse: Sender Address Domain - ams-node10.websitehostserver.net X-Get-Message-Sender-Via: ams-node10.websitehostserver.net: authenticated_id: tijarama/from_h X-Authenticated-Sender: ams-node10.websitehostserver.net: service.commercial@l-application.com X-Rspamd-Queue-Id: 4CrBDg3W35z4rcH X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=l-application.com header.s=default header.b=tsH2Weps; dmarc=none; spf=none (mx1.freebsd.org: domain of tijarama@ams-node10.websitehostserver.net has no SPF policy when checking 107.6.183.178) smtp.mailfrom=tijarama@ams-node10.websitehostserver.net X-Spamd-Result: default: False [-0.60 / 15.00]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[l-application.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.997]; FORGED_SENDER(0.30)[service.commercial@l-application.com,tijarama@ams-node10.websitehostserver.net]; HAS_X_ANTIABUSE(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[107.6.183.178:from]; ASN(0.00)[asn:32475, ipnet:107.6.176.0/21, country:US]; MIME_TRACE(0.00)[0:~]; FROM_NEQ_ENVFROM(0.00)[service.commercial@l-application.com,tijarama@ams-node10.websitehostserver.net]; HAS_X_AS(0.00)[service.commercial@l-application.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[l-application.com:s=default]; AUTOGEN_PHP_SPAMMY(1.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_BAD_CTE_7BIT(1.05)[7bit,utf8]; DMARC_NA(0.00)[l-application.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[107.6.183.178:from:127.0.2.255]; MANY_INVISIBLE_PARTS(0.05)[1]; FROM_NO_DN(0.00)[]; MIME_HTML_ONLY(0.20)[]; HAS_X_GMSV(0.00)[tijarama/from_h]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; HAS_X_PHP_SCRIPT(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 20:12:36 -0000 From owner-svn-src-all@freebsd.org Tue Dec 8 21:23:05 2020 Return-Path: Delivered-To: svn-src-all@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 8B7294AC261; Tue, 8 Dec 2020 21:23:05 +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 4CrCp13Hrwz4vcg; Tue, 8 Dec 2020 21:23:05 +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 590A61AEB1; Tue, 8 Dec 2020 21:23:05 +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 0B8LN5vR021820; Tue, 8 Dec 2020 21:23:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8LN4OT021815; Tue, 8 Dec 2020 21:23:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202012082123.0B8LN4OT021815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 8 Dec 2020 21:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368464 - in vendor/unbound/dist: . contrib daemon dnstap doc libunbound pythonmod pythonmod/doc/examples pythonmod/doc/modules pythonmod/examples respip services services/cache smallap... X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in vendor/unbound/dist: . contrib daemon dnstap doc libunbound pythonmod pythonmod/doc/examples pythonmod/doc/modules pythonmod/examples respip services services/cache smallapp testcode testdata testd... X-SVN-Commit-Revision: 368464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 21:23:05 -0000 Author: cy Date: Tue Dec 8 21:23:03 2020 New Revision: 368464 URL: https://svnweb.freebsd.org/changeset/base/368464 Log: Vendor import of Unbound 1.13.0. Security: CVE-2020-28935 Added: vendor/unbound/dist/contrib/metrics.awk (contents, props changed) vendor/unbound/dist/testdata/doh_downstream_notls.tdir/ vendor/unbound/dist/testdata/doh_downstream_notls.tdir/doh_downstream_notls.conf (contents, props changed) vendor/unbound/dist/testdata/doh_downstream_notls.tdir/doh_downstream_notls.dsc vendor/unbound/dist/testdata/doh_downstream_notls.tdir/doh_downstream_notls.post vendor/unbound/dist/testdata/doh_downstream_notls.tdir/doh_downstream_notls.pre vendor/unbound/dist/testdata/doh_downstream_notls.tdir/doh_downstream_notls.test vendor/unbound/dist/testdata/doh_downstream_notls.tdir/doh_downstream_notls.testns vendor/unbound/dist/testdata/doh_downstream_notls.tdir/unbound_server.key vendor/unbound/dist/testdata/doh_downstream_notls.tdir/unbound_server.pem (contents, props changed) vendor/unbound/dist/testdata/edns_client_string.rpl vendor/unbound/dist/testdata/edns_client_string_opcode.rpl vendor/unbound/dist/testdata/tcp_reuse.tdir/ vendor/unbound/dist/testdata/tcp_reuse.tdir/tcp_reuse.conf (contents, props changed) vendor/unbound/dist/testdata/tcp_reuse.tdir/tcp_reuse.conf2 vendor/unbound/dist/testdata/tcp_reuse.tdir/tcp_reuse.dsc vendor/unbound/dist/testdata/tcp_reuse.tdir/tcp_reuse.post vendor/unbound/dist/testdata/tcp_reuse.tdir/tcp_reuse.pre vendor/unbound/dist/testdata/tcp_reuse.tdir/tcp_reuse.test vendor/unbound/dist/testdata/tls_reuse.tdir/ vendor/unbound/dist/testdata/tls_reuse.tdir/tls_reuse.conf (contents, props changed) vendor/unbound/dist/testdata/tls_reuse.tdir/tls_reuse.conf2 vendor/unbound/dist/testdata/tls_reuse.tdir/tls_reuse.dsc vendor/unbound/dist/testdata/tls_reuse.tdir/tls_reuse.post vendor/unbound/dist/testdata/tls_reuse.tdir/tls_reuse.pre vendor/unbound/dist/testdata/tls_reuse.tdir/tls_reuse.test vendor/unbound/dist/testdata/tls_reuse.tdir/unbound_control.key vendor/unbound/dist/testdata/tls_reuse.tdir/unbound_control.pem (contents, props changed) vendor/unbound/dist/testdata/tls_reuse.tdir/unbound_server.key vendor/unbound/dist/testdata/tls_reuse.tdir/unbound_server.pem (contents, props changed) Deleted: vendor/unbound/dist/testdata/edns_client_tag.rpl Modified: vendor/unbound/dist/config.guess vendor/unbound/dist/config.sub vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/contrib/README vendor/unbound/dist/contrib/unbound.service.in vendor/unbound/dist/contrib/unbound_portable.service.in vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/dnstap/dnstap.c vendor/unbound/dist/dnstap/dtstream.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/libunbound/context.c vendor/unbound/dist/libunbound/libunbound.c vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/pythonmod/doc/examples/example6.rst vendor/unbound/dist/pythonmod/doc/modules/functions.rst vendor/unbound/dist/pythonmod/examples/inplace_callbacks.py vendor/unbound/dist/pythonmod/interface.i vendor/unbound/dist/respip/respip.c vendor/unbound/dist/services/authzone.c vendor/unbound/dist/services/cache/infra.c vendor/unbound/dist/services/cache/infra.h vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/listen_dnsport.h vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/services/rpz.c vendor/unbound/dist/smallapp/unbound-control-setup.sh.in vendor/unbound/dist/testcode/do-tests.sh vendor/unbound/dist/testcode/dohclient.c vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testcode/run_vm.sh vendor/unbound/dist/testcode/testbound.c vendor/unbound/dist/testcode/unitmain.c vendor/unbound/dist/testdata/dnstap.tdir/dnstap.pre vendor/unbound/dist/testdata/dnstap.tdir/dnstap.test vendor/unbound/dist/testdata/fwd_oneport.tdir/fwd_oneport.conf vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/data/msgencode.c vendor/unbound/dist/util/data/msgreply.h vendor/unbound/dist/util/edns.c vendor/unbound/dist/util/edns.h vendor/unbound/dist/util/fptr_wlist.c vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/module.h vendor/unbound/dist/util/netevent.c vendor/unbound/dist/util/netevent.h vendor/unbound/dist/util/regional.c vendor/unbound/dist/util/regional.h vendor/unbound/dist/validator/val_secalgo.c Modified: vendor/unbound/dist/config.guess ============================================================================== --- vendor/unbound/dist/config.guess Tue Dec 8 19:10:40 2020 (r368463) +++ vendor/unbound/dist/config.guess Tue Dec 8 21:23:03 2020 (r368464) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-09-19' +timestamp='2020-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,12 +27,12 @@ timestamp='2020-09-19' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] @@ -103,7 +103,7 @@ set_cc_for_build() { test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } @@ -131,16 +131,14 @@ if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown +UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown +UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown +UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -149,16 +147,30 @@ Linux|GNU|GNU/*) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu #else #include + /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl - #else - LIBC=gnu #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi ;; esac @@ -177,19 +189,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` + echo unknown)) case "$UNAME_MACHINE_ARCH" in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') + endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; @@ -220,7 +233,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") ;; esac # The OS release @@ -233,7 +246,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA release='-gnu' ;; *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: @@ -242,15 +255,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) @@ -286,17 +299,17 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; @@ -334,7 +347,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -368,7 +381,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then + if test "$( (/bin/universe) 2>/dev/null)" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd @@ -381,17 +394,17 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in + case $(/usr/bin/uname -p) in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" @@ -410,30 +423,30 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case "$(/usr/bin/arch -k)" in Series*|S4*) - UNAME_RELEASE=`uname -v` + UNAME_RELEASE=$(uname -v) ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case "$(/bin/arch)" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; @@ -513,8 +526,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && + dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && + SYSTEM_NAME=$("$dummy" "$dummyarg") && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; @@ -541,7 +554,7 @@ EOF exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=$(/usr/bin/uname -p) if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ @@ -569,17 +582,17 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=`/usr/bin/oslevel` + IBM_REV=$(/usr/bin/oslevel) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi @@ -599,7 +612,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") then echo "$SYSTEM_NAME" else @@ -612,15 +625,15 @@ EOF fi exit ;; *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi @@ -648,14 +661,14 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) + sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 @@ -702,7 +715,7 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac @@ -730,7 +743,7 @@ EOF echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) @@ -760,7 +773,7 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; @@ -829,14 +842,14 @@ EOF echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -849,25 +862,25 @@ EOF echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf fi exit ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=$(/usr/bin/uname -p) case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin @@ -903,15 +916,15 @@ EOF echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" exit ;; *:Minix:*:*) echo "$UNAME_MACHINE"-unknown-minix @@ -924,7 +937,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -1033,7 +1046,7 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) @@ -1053,7 +1066,7 @@ EOF exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; @@ -1143,7 +1156,7 @@ EOF echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else @@ -1152,7 +1165,7 @@ EOF exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in + case $(/bin/uname -X | grep "^Machine") in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; @@ -1161,10 +1174,10 @@ EOF exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1214,7 +1227,7 @@ EOF 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1225,7 +1238,7 @@ EOF NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1258,7 +1271,7 @@ EOF exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=$( (uname -p) 2>/dev/null) echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv @@ -1344,7 +1357,7 @@ EOF echo aarch64-apple-darwin"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac @@ -1381,7 +1394,7 @@ EOF echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc @@ -1449,10 +1462,10 @@ EOF echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=$( (uname -p) 2>/dev/null) case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1462,7 +1475,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos @@ -1520,7 +1533,7 @@ main () #define __ARCHITECTURE__ "m68k" #endif int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1612,7 +1625,7 @@ main () } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1637,14 +1650,14 @@ This script (version $timestamp), has failed to recogn operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub EOF -year=`echo $timestamp | sed 's,-.*,,'` +year=$(echo $timestamp | sed 's,-.*,,') # shellcheck disable=SC2003 -if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then +if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then cat >&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` +uname -m = $( (uname -m) 2>/dev/null || echo unknown) +uname -r = $( (uname -r) 2>/dev/null || echo unknown) +uname -s = $( (uname -s) 2>/dev/null || echo unknown) +uname -v = $( (uname -v) 2>/dev/null || echo unknown) -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` +/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) +/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` +hostinfo = $( (hostinfo) 2>/dev/null) +/bin/universe = $( (/bin/universe) 2>/dev/null) +/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) +/bin/arch = $( (/bin/arch) 2>/dev/null) +/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) +/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" Modified: vendor/unbound/dist/config.sub ============================================================================== --- vendor/unbound/dist/config.sub Tue Dec 8 19:10:40 2020 (r368463) +++ vendor/unbound/dist/config.sub Tue Dec 8 21:23:03 2020 (r368464) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-09-08' +timestamp='2020-12-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2020-09-08' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,7 +50,7 @@ timestamp='2020-09-08' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -769,22 +769,22 @@ case $basic_machine in vendor=hp ;; i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv32 ;; i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv4 ;; i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv ;; i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=solaris2 ;; @@ -917,7 +917,7 @@ case $basic_machine in ;; leon-*|leon[3-9]-*) cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` + vendor=$(echo "$basic_machine" | sed 's/-.*//') ;; *-*) @@ -1084,7 +1084,7 @@ case $cpu-$vendor in cpu=mipsisa64sb1el ;; sh5e[lb]-*) - cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/') ;; spur-*) cpu=spur @@ -1102,7 +1102,7 @@ case $cpu-$vendor in cpu=x86_64 ;; xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + cpu=$(echo "$cpu" | sed 's/^xscale/arm/') ;; arm64-*) cpu=aarch64 @@ -1241,6 +1241,7 @@ case $cpu-$vendor in | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | spu \ | tahoe \ + | thumbv7* \ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | tron \ | ubicom32 \ @@ -1286,11 +1287,15 @@ then case $basic_os in gnu/linux*) kernel=linux - os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'` + os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') ;; + os2-emx) + kernel=os2 + os=$(echo $basic_os | sed -e 's|os2-emx|emx|') + ;; nto-qnx*) kernel=nto - os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'` + os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') ;; *-*) # shellcheck disable=SC2162 @@ -1301,11 +1306,11 @@ EOF # Default OS when just kernel was specified nto*) kernel=nto - os=`echo $basic_os | sed -e 's|nto|qnx|'` + os=$(echo $basic_os | sed -e 's|nto|qnx|') ;; linux*) kernel=linux - os=`echo $basic_os | sed -e 's|linux|gnu|'` + os=$(echo $basic_os | sed -e 's|linux|gnu|') ;; *) kernel= @@ -1326,7 +1331,7 @@ case $os in os=cnk ;; solaris1 | solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` + os=$(echo $os | sed -e 's|solaris1|sunos4|') ;; solaris) os=solaris2 @@ -1355,7 +1360,7 @@ case $os in os=sco3.2v4 ;; sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + os=$(echo $os | sed -e 's/sco3.2./sco3.2v/') ;; sco*v* | scout) # Don't match below @@ -1385,7 +1390,7 @@ case $os in os=lynxos ;; mac[0-9]*) - os=`echo "$os" | sed -e 's|mac|macos|'` + os=$(echo "$os" | sed -e 's|mac|macos|') ;; opened*) os=openedition @@ -1394,10 +1399,10 @@ case $os in os=os400 ;; sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + os=$(echo "$os" | sed -e 's|sunos5|solaris2|') ;; sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + os=$(echo "$os" | sed -e 's|sunos6|solaris3|') ;; wince*) os=wince @@ -1431,7 +1436,7 @@ case $os in ;; # Preserve the version number of sinix5. sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` + os=$(echo $os | sed -e 's|sinix|sysv|') ;; sinix*) os=sysv4 @@ -1716,7 +1721,7 @@ case $os in | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* | qnx* ) + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1746,6 +1751,8 @@ case $kernel-$os in kfreebsd*-gnu* | kopensolaris*-gnu*) ;; nto-qnx*) + ;; + os2-emx) ;; *-eabi* | *-gnueabi*) ;; Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Tue Dec 8 19:10:40 2020 (r368463) +++ vendor/unbound/dist/configure Tue Dec 8 21:23:03 2020 (r368464) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.12.0. +# Generated by GNU Autoconf 2.69 for unbound 1.13.0. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.12.0' -PACKAGE_STRING='unbound 1.12.0' +PACKAGE_VERSION='1.13.0' +PACKAGE_STRING='unbound 1.13.0' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -1459,7 +1459,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.12.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.13.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1524,7 +1524,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.12.0:";; + short | recursive ) echo "Configuration of unbound 1.13.0:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.12.0 +unbound configure 1.13.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2461,7 +2461,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.12.0, which was +It was created by unbound $as_me 1.13.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2811,13 +2811,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu UNBOUND_VERSION_MAJOR=1 -UNBOUND_VERSION_MINOR=12 +UNBOUND_VERSION_MINOR=13 UNBOUND_VERSION_MICRO=0 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=10 +LIBUNBOUND_REVISION=11 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2895,6 +2895,7 @@ LIBUNBOUND_AGE=1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 # 1.12.0 had 9:10:1 +# 1.13.0 had 9:11:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -14728,7 +14729,7 @@ $as_echo "no" >&6; } fi # Checks for header files. -for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h net/if.h +for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default @@ -14742,7 +14743,35 @@ fi done +# net/if.h portability for Darwin see: +# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html +for ac_header in net/if.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +" +if test "x$ac_cv_header_net_if_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF + +fi + +done + + # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH for ac_header in TargetConditionals.h do : @@ -21686,7 +21715,7 @@ _ACEOF -version=1.12.0 +version=1.13.0 date=`date +'%b %e, %Y'` @@ -22205,7 +22234,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.12.0, which was +This file was extended by unbound $as_me 1.13.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22271,7 +22300,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.12.0 +unbound config.status 1.13.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Tue Dec 8 19:10:40 2020 (r368463) +++ vendor/unbound/dist/configure.ac Tue Dec 8 21:23:03 2020 (r368464) @@ -10,7 +10,7 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) -m4_define([VERSION_MINOR],[12]) +m4_define([VERSION_MINOR],[13]) m4_define([VERSION_MICRO],[0]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) @@ -18,7 +18,7 @@ AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=10 +LIBUNBOUND_REVISION=11 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -96,6 +96,7 @@ LIBUNBOUND_AGE=1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 # 1.12.0 had 9:10:1 +# 1.13.0 had 9:11:1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 8 21:24:24 2020 Return-Path: Delivered-To: svn-src-all@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 B7E8F4AC26A; Tue, 8 Dec 2020 21:24:24 +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 4CrCqX4rKJz4vv7; Tue, 8 Dec 2020 21:24:24 +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 8EA261AEB3; Tue, 8 Dec 2020 21:24:24 +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 0B8LOOND021916; Tue, 8 Dec 2020 21:24:24 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8LOO35021915; Tue, 8 Dec 2020 21:24:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202012082124.0B8LOO35021915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 8 Dec 2020 21:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368465 - vendor/unbound/1.13.0 X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: vendor/unbound/1.13.0 X-SVN-Commit-Revision: 368465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 21:24:24 -0000 Author: cy Date: Tue Dec 8 21:24:24 2020 New Revision: 368465 URL: https://svnweb.freebsd.org/changeset/base/368465 Log: Tag unbound 1.13.0. Added: vendor/unbound/1.13.0/ - copied from r368464, vendor/unbound/dist/ From owner-svn-src-all@freebsd.org Tue Dec 8 22:23:02 2020 Return-Path: Delivered-To: svn-src-all@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 0E2C84AD6F2 for ; Tue, 8 Dec 2020 22:23:02 +0000 (UTC) (envelope-from kevans@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 4CrF7972Wxz3FVd for ; Tue, 8 Dec 2020 22:23:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id DFD88234CF for ; Tue, 8 Dec 2020 22:23:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id 1so265731qka.0 for ; Tue, 08 Dec 2020 14:23:01 -0800 (PST) X-Gm-Message-State: AOAM532Je/EtyddIY52mndu0d3Its8gOyQI7wLQdzLPHxOh94BuEgvAk P44/jM2bnh4C05owr8NzExQQI9BeGx4f2haN2CQ= X-Received: by 2002:a37:ef05:: with SMTP id j5mt34134852qkk.120.1607466181456; Tue, 08 Dec 2020 14:23:01 -0800 (PST) MIME-Version: 1.0 References: <202012081405.0B8E5PJM029095@repo.freebsd.org> In-Reply-To: <202012081405.0B8E5PJM029095@repo.freebsd.org> From: Kyle Evans Date: Tue, 8 Dec 2020 16:22:46 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368439 - head/share/mk Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 22:23:02 -0000 On Tue, Dec 8, 2020 at 8:05 AM Kyle Evans wrote: > > Author: kevans > Date: Tue Dec 8 14:05:25 2020 > New Revision: 368439 > URL: https://svnweb.freebsd.org/changeset/base/368439 > > Log: > src.opts.mk: switch to bsdgrep as /usr/bin/grep > > [.. snip ...] > > I have some WIP to make bsdgrep faster, but do not consider it a blocker > when compared to the pros of switching now (aforementioned bugs, licensing). > > [.. snip ...] I was asked to collect some stats from that patch to speed up bsdgrep; while the patch isn't ready yet, I decided to do a (really really) rough comparison between gnugrep/bsdgrep as well to follow-up on the speed aspect and perhaps provide a baseline. You can view the results of those comparisons (user time(1) output), which felt 'representative enough' of the difference, here: https://people.freebsd.org/~kevans/stable/grep-stats.txt Some notes, to help with interpretation: - This hardware is not great - All runs were doing a recursive grep from the root of a non-active base/head checkout, -I was not specified, in search of instances of the same pattern (but actually literal) - ${grep}-non == ${grep} -r 'closefrom' . - ${grep}-n == ${grep} -nr 'closefrom' . - ${grep}-c8 == ${grep} -rC8 'closefrom' . The sampling was low enough quality that we can probably just discard all of this, but I found the final two comparisons (gnugrep vs. gnugrep -n vs. gnugrep -C8 and bsdgrep vs. bsdgrep -n vs. bsdgrep -C8) interesting enough that I decided to share this despite the quality. Here are the key points that I find interesting: gnugrep sees a pretty significant difference from the baseline to either of the other two modes. This was expected to some extent- both -n and -C8 will imply some level of line tracking when you're taking the chunked search approach, as you need to count lines even in chunks that don't have any matches for -n and you might even need to do the same for -C8. I think the much smaller difference between the gnugrep baseline and -C8 indicates that they probably don't take the simple/slow approach of counting all newlines to determine that you have 8 and where the 8th prior started, but instead wait for a match then start backtracking. The surprising part about the bsdgrep comparison was that there is significant slowdown when we're checking context. There is almost certainly room for improvement there. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Tue Dec 8 22:37:31 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Dec 8 23:38:30 2020 Return-Path: Delivered-To: svn-src-all@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 775A94AF0B2; Tue, 8 Dec 2020 23:38:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrGpG2t7Tz3KJT; Tue, 8 Dec 2020 23:38:30 +0000 (UTC) (envelope-from bdrewery@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 559F01C99E; Tue, 8 Dec 2020 23:38:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8NcUo9003880; Tue, 8 Dec 2020 23:38:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8NcQLb003864; Tue, 8 Dec 2020 23:38:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <202012082338.0B8NcQLb003864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 8 Dec 2020 23:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368467 - in head: bin/chflags bin/chmod bin/cp bin/ls bin/rm bin/setfacl contrib/mtree usr.bin/du usr.bin/grep usr.bin/gzip usr.sbin/chown usr.sbin/ckdist usr.sbin/fmtree usr.sbin/setfmac X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: bin/chflags bin/chmod bin/cp bin/ls bin/rm bin/setfacl contrib/mtree usr.bin/du usr.bin/grep usr.bin/gzip usr.sbin/chown usr.sbin/ckdist usr.sbin/fmtree usr.sbin/setfmac X-SVN-Commit-Revision: 368467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 23:38:30 -0000 Author: bdrewery Date: Tue Dec 8 23:38:26 2020 New Revision: 368467 URL: https://svnweb.freebsd.org/changeset/base/368467 Log: fts_read: Handle error from a NULL return better. This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work. As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations. gzip is ignoring most errors and could be improved separately. Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27184 Modified: head/bin/chflags/chflags.c head/bin/chmod/chmod.c head/bin/cp/cp.c head/bin/ls/ls.c head/bin/rm/rm.c head/bin/setfacl/setfacl.c head/contrib/mtree/create.c head/contrib/mtree/verify.c head/usr.bin/du/du.c head/usr.bin/grep/util.c head/usr.bin/gzip/gzip.c head/usr.sbin/chown/chown.c head/usr.sbin/ckdist/ckdist.c head/usr.sbin/fmtree/create.c head/usr.sbin/fmtree/verify.c head/usr.sbin/setfmac/setfmac.c Modified: head/bin/chflags/chflags.c ============================================================================== --- head/bin/chflags/chflags.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/bin/chflags/chflags.c Tue Dec 8 23:38:26 2020 (r368467) @@ -163,7 +163,7 @@ main(int argc, char *argv[]) if ((ftsp = fts_open(++argv, fts_options , 0)) == NULL) err(1, NULL); - for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) { int atflag; if ((fts_options & FTS_LOGICAL) || Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/bin/chmod/chmod.c Tue Dec 8 23:38:26 2020 (r368467) @@ -164,7 +164,7 @@ done: argv += optind; if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL) err(1, "fts_open"); - for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) { int atflag; if ((fts_options & FTS_LOGICAL) || Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/bin/cp/cp.c Tue Dec 8 23:38:26 2020 (r368467) @@ -282,7 +282,8 @@ copy(char *argv[], enum op type, int fts_options) if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); - for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { + for (badcp = rval = 0; errno = 0, (curr = fts_read(ftsp)) != NULL; + badcp = 0) { switch (curr->fts_info) { case FTS_NS: case FTS_DNR: Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/bin/ls/ls.c Tue Dec 8 23:38:26 2020 (r368467) @@ -645,7 +645,7 @@ traverse(int argc, char *argv[], int options) ch_options = !f_recursive && !f_label && options & FTS_NOSTAT ? FTS_NAMEONLY : 0; - while ((p = fts_read(ftsp)) != NULL) + while (errno = 0, (p = fts_read(ftsp)) != NULL) switch (p->fts_info) { case FTS_DC: warnx("%s: directory causes a cycle", p->fts_name); Modified: head/bin/rm/rm.c ============================================================================== --- head/bin/rm/rm.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/bin/rm/rm.c Tue Dec 8 23:38:26 2020 (r368467) @@ -207,7 +207,7 @@ rm_tree(char **argv) return; err(1, "fts_open"); } - while ((p = fts_read(fts)) != NULL) { + while (errno = 0, (p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_DNR: if (!fflag || p->fts_errno != ENOENT) { Modified: head/bin/setfacl/setfacl.c ============================================================================== --- head/bin/setfacl/setfacl.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/bin/setfacl/setfacl.c Tue Dec 8 23:38:26 2020 (r368467) @@ -498,8 +498,10 @@ main(int argc, char *argv[]) /* Open all files. */ if ((ftsp = fts_open(files_list, fts_options | FTS_NOSTAT, 0)) == NULL) err(1, "fts_open"); - while ((file = fts_read(ftsp)) != NULL) + while (errno = 0, (file = fts_read(ftsp)) != NULL) carried_error += handle_file(ftsp, file); + if (errno != 0) + err(1, "fts_read"); return (carried_error); } Modified: head/contrib/mtree/create.c ============================================================================== --- head/contrib/mtree/create.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/contrib/mtree/create.c Tue Dec 8 23:38:26 2020 (r368467) @@ -129,7 +129,7 @@ cwalk(FILE *fp) if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL) mtree_err("fts_open: %s", strerror(errno)); - while ((p = fts_read(t)) != NULL) { + while (errno = 0, (p = fts_read(t)) != NULL) { if (jflag) indent = p->fts_level * 4; if (check_excludes(p->fts_name, p->fts_path)) { @@ -173,6 +173,8 @@ cwalk(FILE *fp) } } + if (errno != 0) + mtree_err("fts_read: %s", strerror(errno)); fts_close(t); if (sflag && keys & F_CKSUM) mtree_err("%s checksum: %u", fullpath, crc_total); Modified: head/contrib/mtree/verify.c ============================================================================== --- head/contrib/mtree/verify.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/contrib/mtree/verify.c Tue Dec 8 23:38:26 2020 (r368467) @@ -90,7 +90,7 @@ vwalk(void) mtree_err("fts_open: %s", strerror(errno)); level = root; specdepth = rval = 0; - while ((p = fts_read(t)) != NULL) { + while (errno = 0, (p = fts_read(t)) != NULL) { if (check_excludes(p->fts_name, p->fts_path)) { fts_set(t, p, FTS_SKIP); continue; @@ -160,6 +160,8 @@ vwalk(void) } fts_set(t, p, FTS_SKIP); } + if (errno != 0) + mtree_err("fts_read: %s", strerror(errno)); fts_close(t); if (sflag) warnx("%s checksum: %u", fullpath, crc_total); Modified: head/usr.bin/du/du.c ============================================================================== --- head/usr.bin/du/du.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.bin/du/du.c Tue Dec 8 23:38:26 2020 (r368467) @@ -268,7 +268,7 @@ main(int argc, char *argv[]) if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL) err(1, "fts_open"); - while ((p = fts_read(fts)) != NULL) { + while (errno = 0, (p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_D: /* Ignore. */ if (ignorep(p)) Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.bin/grep/util.c Tue Dec 8 23:38:26 2020 (r368467) @@ -154,7 +154,7 @@ grep_tree(char **argv) __DECONST(char * const *, wd) : argv, fts_flags, NULL); if (fts == NULL) err(2, "fts_open"); - while ((p = fts_read(fts)) != NULL) { + while (errno = 0, (p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_DNR: /* FALLTHROUGH */ @@ -187,6 +187,8 @@ grep_tree(char **argv) break; } } + if (errno != 0) + err(2, "fts_read"); fts_close(fts); return (matched); Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.bin/gzip/gzip.c Tue Dec 8 23:38:26 2020 (r368467) @@ -2075,7 +2075,7 @@ handle_dir(char *dir) return; } - while ((entry = fts_read(fts))) { + while (errno = 0, (entry = fts_read(fts))) { switch(entry->fts_info) { case FTS_D: case FTS_DP: @@ -2090,6 +2090,8 @@ handle_dir(char *dir) handle_file(entry->fts_path, entry->fts_statp); } } + if (errno != 0) + warn("error with fts_read %s", dir); (void)fts_close(fts); } #endif Modified: head/usr.sbin/chown/chown.c ============================================================================== --- head/usr.sbin/chown/chown.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.sbin/chown/chown.c Tue Dec 8 23:38:26 2020 (r368467) @@ -177,7 +177,7 @@ main(int argc, char **argv) if ((ftsp = fts_open(++argv, fts_options, NULL)) == NULL) err(1, NULL); - for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + for (rval = 0; errno = 0, (p = fts_read(ftsp)) != NULL;) { int atflag; if ((fts_options & FTS_LOGICAL) || Modified: head/usr.sbin/ckdist/ckdist.c ============================================================================== --- head/usr.sbin/ckdist/ckdist.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.sbin/ckdist/ckdist.c Tue Dec 8 23:38:26 2020 (r368467) @@ -151,7 +151,7 @@ main(int argc, char *argv[]) arg[0] = *argv; if ((ftsp = fts_open(arg, FTS_LOGICAL, NULL)) == NULL) err(2, "fts_open"); - while ((f = fts_read(ftsp)) != NULL) + while (errno = 0, (f = fts_read(ftsp)) != NULL) switch (f->fts_info) { case FTS_DC: rval = fail(f->fts_path, "Directory causes a cycle"); Modified: head/usr.sbin/fmtree/create.c ============================================================================== --- head/usr.sbin/fmtree/create.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.sbin/fmtree/create.c Tue Dec 8 23:38:26 2020 (r368467) @@ -102,7 +102,7 @@ cwalk(void) argv[1] = NULL; if ((t = fts_open(argv, ftsoptions, dsort)) == NULL) err(1, "fts_open()"); - while ((p = fts_read(t))) { + while (errno = 0, (p = fts_read(t))) { if (iflag) indent = p->fts_level * 4; if (check_excludes(p->fts_name, p->fts_path)) { @@ -137,6 +137,8 @@ cwalk(void) } } + if (errno != 0) + err(1, "fts_read()"); (void)fts_close(t); if (sflag && keys & F_CKSUM) warnx("%s checksum: %lu", fullpath, (unsigned long)crc_total); Modified: head/usr.sbin/fmtree/verify.c ============================================================================== --- head/usr.sbin/fmtree/verify.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.sbin/fmtree/verify.c Tue Dec 8 23:38:26 2020 (r368467) @@ -86,7 +86,7 @@ vwalk(void) err(1, "line %d: fts_open", lineno); level = root; specdepth = rval = 0; - while ((p = fts_read(t))) { + while (errno = 0, (p = fts_read(t))) { if (check_excludes(p->fts_name, p->fts_path)) { fts_set(t, p, FTS_SKIP); continue; @@ -149,6 +149,8 @@ extra: } (void)fts_set(t, p, FTS_SKIP); } + if (errno != 0) + err(1, "fts_read()"); (void)fts_close(t); if (sflag) warnx("%s checksum: %lu", fullpath, (unsigned long)crc_total); Modified: head/usr.sbin/setfmac/setfmac.c ============================================================================== --- head/usr.sbin/setfmac/setfmac.c Tue Dec 8 22:37:30 2020 (r368466) +++ head/usr.sbin/setfmac/setfmac.c Tue Dec 8 23:38:26 2020 (r368467) @@ -142,7 +142,7 @@ main(int argc, char **argv) fts = fts_open(argv, hflag | xflag, NULL); if (fts == NULL) err(1, "cannot traverse filesystem%s", argc ? "s" : ""); - while ((ftsent = fts_read(fts)) != NULL) { + while (errno = 0, (ftsent = fts_read(fts)) != NULL) { switch (ftsent->fts_info) { case FTS_DP: /* skip post-order */ break; @@ -176,6 +176,8 @@ main(int argc, char **argv) ftsent->fts_info, ftsent->fts_path); } } + if (errno != 0) + err(1, "fts_read"); fts_close(fts); exit(0); } From owner-svn-src-all@freebsd.org Tue Dec 8 23:54:10 2020 Return-Path: Delivered-To: svn-src-all@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 435184AF611; Tue, 8 Dec 2020 23:54:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrH8L1BmGz3KhJ; Tue, 8 Dec 2020 23:54:10 +0000 (UTC) (envelope-from glebius@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 1C0241CCAC; Tue, 8 Dec 2020 23:54:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B8Ns9qC016553; Tue, 8 Dec 2020 23:54:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B8Ns94i016552; Tue, 8 Dec 2020 23:54:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202012082354.0B8Ns94i016552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 8 Dec 2020 23:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368468 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 23:54:10 -0000 Author: glebius Date: Tue Dec 8 23:54:09 2020 New Revision: 368468 URL: https://svnweb.freebsd.org/changeset/base/368468 Log: Fixup r368446 with KERN_TLS. Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue Dec 8 23:38:26 2020 (r368467) +++ head/sys/net/if_lagg.c Tue Dec 8 23:54:09 2020 (r368468) @@ -1806,11 +1806,11 @@ lagg_snd_tag_alloc(struct ifnet *ifp, lp = lookup_snd_tag_port(ifp, params->hdr.flowid, params->hdr.flowtype, params->hdr.numa_domain); if (lp == NULL) { - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); return (EOPNOTSUPP); } if (lp->lp_ifp == NULL) { - LAGG_RUNLOCK(); + NET_EPOCH_EXIT(et); return (EOPNOTSUPP); } lp_ifp = lp->lp_ifp; From owner-svn-src-all@freebsd.org Wed Dec 9 00:28:28 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Dec 9 00:56:15 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Dec 9 00:56:39 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Dec 9 02:05:25 2020 Return-Path: Delivered-To: svn-src-all@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 2ABDA4B2A77; Wed, 9 Dec 2020 02:05:25 +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 4CrL3n0Xvlz3k8F; Wed, 9 Dec 2020 02:05:25 +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 00BBE1E5CE; Wed, 9 Dec 2020 02:05:24 +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 0B925OXq098584; Wed, 9 Dec 2020 02:05:24 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B925EKC098532; Wed, 9 Dec 2020 02:05:14 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012090205.0B925EKC098532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 9 Dec 2020 02:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368472 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/chac... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/chacha/asm crypto/openssl/cry... X-SVN-Commit-Revision: 368472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:05:25 -0000 Author: jkim Date: Wed Dec 9 02:05:14 2020 New Revision: 368472 URL: https://svnweb.freebsd.org/changeset/base/368472 Log: Merge OpenSSL 1.1.1i. Modified: head/crypto/openssl/CHANGES head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/cms.c head/crypto/openssl/config head/crypto/openssl/crypto/aes/asm/aesv8-armx.pl head/crypto/openssl/crypto/armcap.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/tasn_enc.c head/crypto/openssl/crypto/bio/b_addr.c head/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/evp/bio_ok.c head/crypto/openssl/crypto/modes/modes_local.h head/crypto/openssl/crypto/pkcs7/pk7_smime.c head/crypto/openssl/crypto/poly1305/asm/poly1305-armv8.pl head/crypto/openssl/crypto/rand/rand_unix.c head/crypto/openssl/crypto/sha/asm/sha1-armv8.pl head/crypto/openssl/crypto/sha/asm/sha512-armv8.pl head/crypto/openssl/crypto/x509/x509_att.c head/crypto/openssl/crypto/x509/x509_cmp.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509v3/v3_genn.c head/crypto/openssl/doc/man1/verify.pod head/crypto/openssl/doc/man3/BN_set_bit.pod head/crypto/openssl/doc/man3/X509_STORE_set_verify_cb_func.pod head/crypto/openssl/include/openssl/opensslv.h head/crypto/openssl/include/openssl/x509.h head/crypto/openssl/ssl/record/rec_layer_d1.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/statem/statem_clnt.c head/crypto/openssl/ssl/statem/statem_srvr.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 head/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 head/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 head/secure/lib/libcrypto/man/man3/BF_encrypt.3 head/secure/lib/libcrypto/man/man3/BIO_ADDR.3 head/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 head/secure/lib/libcrypto/man/man3/BIO_connect.3 head/secure/lib/libcrypto/man/man3/BIO_ctrl.3 head/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 head/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 head/secure/lib/libcrypto/man/man3/BIO_f_md.3 head/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 head/secure/lib/libcrypto/man/man3/BIO_find_type.3 head/secure/lib/libcrypto/man/man3/BIO_get_data.3 head/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/BIO_meth_new.3 head/secure/lib/libcrypto/man/man3/BIO_new.3 head/secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 head/secure/lib/libcrypto/man/man3/BIO_printf.3 head/secure/lib/libcrypto/man/man3/BIO_push.3 head/secure/lib/libcrypto/man/man3/BIO_read.3 head/secure/lib/libcrypto/man/man3/BIO_s_accept.3 head/secure/lib/libcrypto/man/man3/BIO_s_bio.3 head/secure/lib/libcrypto/man/man3/BIO_s_connect.3 head/secure/lib/libcrypto/man/man3/BIO_s_fd.3 head/secure/lib/libcrypto/man/man3/BIO_s_file.3 head/secure/lib/libcrypto/man/man3/BIO_s_mem.3 head/secure/lib/libcrypto/man/man3/BIO_s_socket.3 head/secure/lib/libcrypto/man/man3/BIO_set_callback.3 head/secure/lib/libcrypto/man/man3/BIO_should_retry.3 head/secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_start.3 head/secure/lib/libcrypto/man/man3/BN_add.3 head/secure/lib/libcrypto/man/man3/BN_add_word.3 head/secure/lib/libcrypto/man/man3/BN_bn2bin.3 head/secure/lib/libcrypto/man/man3/BN_cmp.3 head/secure/lib/libcrypto/man/man3/BN_copy.3 head/secure/lib/libcrypto/man/man3/BN_generate_prime.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/man3/BN_new.3 head/secure/lib/libcrypto/man/man3/BN_num_bytes.3 head/secure/lib/libcrypto/man/man3/BN_rand.3 head/secure/lib/libcrypto/man/man3/BN_set_bit.3 head/secure/lib/libcrypto/man/man3/BN_zero.3 head/secure/lib/libcrypto/man/man3/BUF_MEM_new.3 head/secure/lib/libcrypto/man/man3/CMS_add0_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_signer.3 head/secure/lib/libcrypto/man/man3/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_type.3 head/secure/lib/libcrypto/man/man3/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/man3/CMS_verify.3 head/secure/lib/libcrypto/man/man3/CONF_modules_free.3 head/secure/lib/libcrypto/man/man3/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/man3/CRYPTO_THREAD_run_once.3 head/secure/lib/libcrypto/man/man3/CRYPTO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 head/secure/lib/libcrypto/man/man3/CTLOG_new.3 head/secure/lib/libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 head/secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 head/secure/lib/libcrypto/man/man3/DES_random_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DH_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DH_get_1024_160.3 head/secure/lib/libcrypto/man/man3/DH_meth_new.3 head/secure/lib/libcrypto/man/man3/DH_new.3 head/secure/lib/libcrypto/man/man3/DH_new_by_nid.3 head/secure/lib/libcrypto/man/man3/DH_set_method.3 head/secure/lib/libcrypto/man/man3/DH_size.3 head/secure/lib/libcrypto/man/man3/DSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/DSA_do_sign.3 head/secure/lib/libcrypto/man/man3/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DSA_meth_new.3 head/secure/lib/libcrypto/man/man3/DSA_new.3 head/secure/lib/libcrypto/man/man3/DSA_set_method.3 head/secure/lib/libcrypto/man/man3/DSA_sign.3 head/secure/lib/libcrypto/man/man3/DSA_size.3 head/secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 head/secure/lib/libcrypto/man/man3/DTLSv1_listen.3 head/secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/ECPKParameters_print.3 head/secure/lib/libcrypto/man/man3/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_new.3 head/secure/lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 head/secure/lib/libcrypto/man/man3/EC_KEY_new.3 head/secure/lib/libcrypto/man/man3/EC_POINT_add.3 head/secure/lib/libcrypto/man/man3/EC_POINT_new.3 head/secure/lib/libcrypto/man/man3/ENGINE_add.3 head/secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/man3/ERR_error_string.3 head/secure/lib/libcrypto/man/man3/ERR_get_error.3 head/secure/lib/libcrypto/man/man3/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/man3/ERR_load_strings.3 head/secure/lib/libcrypto/man/man3/ERR_print_errors.3 head/secure/lib/libcrypto/man/man3/ERR_put_error.3 head/secure/lib/libcrypto/man/man3/ERR_remove_state.3 head/secure/lib/libcrypto/man/man3/ERR_set_mark.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_CTX_get_cipher_data.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_DigestInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_OpenInit.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/man3/EVP_SealInit.3 head/secure/lib/libcrypto/man/man3/EVP_SignInit.3 head/secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_aes.3 head/secure/lib/libcrypto/man/man3/EVP_aria.3 head/secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_blake2b512.3 head/secure/lib/libcrypto/man/man3/EVP_camellia.3 head/secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_chacha20.3 head/secure/lib/libcrypto/man/man3/EVP_des.3 head/secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_md5.3 head/secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_rc4.3 head/secure/lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_sha224.3 head/secure/lib/libcrypto/man/man3/EVP_sha3_224.3 head/secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 head/secure/lib/libcrypto/man/man3/HMAC.3 head/secure/lib/libcrypto/man/man3/MD5.3 head/secure/lib/libcrypto/man/man3/MDC2_Init.3 head/secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 head/secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 head/secure/lib/libcrypto/man/man3/OCSP_request_add1_nonce.3 head/secure/lib/libcrypto/man/man3/OCSP_resp_find_status.3 head/secure/lib/libcrypto/man/man3/OCSP_response_status.3 head/secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 head/secure/lib/libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/man3/OPENSSL_config.3 head/secure/lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_crypto.3 head/secure/lib/libcrypto/man/man3/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/man3/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 head/secure/lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 head/secure/lib/libcrypto/man/man3/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 head/secure/lib/libcrypto/man/man3/PEM_read.3 head/secure/lib/libcrypto/man/man3/PEM_read_CMS.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_PrivateKey.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 head/secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 head/secure/lib/libcrypto/man/man3/PKCS7_verify.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_callbacks.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 head/secure/lib/libcrypto/man/man3/RAND_add.3 head/secure/lib/libcrypto/man/man3/RAND_bytes.3 head/secure/lib/libcrypto/man/man3/RAND_egd.3 head/secure/lib/libcrypto/man/man3/RAND_load_file.3 head/secure/lib/libcrypto/man/man3/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/man3/RC4_set_key.3 head/secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 head/secure/lib/libcrypto/man/man3/RSA_blinding_on.3 head/secure/lib/libcrypto/man/man3/RSA_check_key.3 head/secure/lib/libcrypto/man/man3/RSA_generate_key.3 head/secure/lib/libcrypto/man/man3/RSA_get0_key.3 head/secure/lib/libcrypto/man/man3/RSA_meth_new.3 head/secure/lib/libcrypto/man/man3/RSA_new.3 head/secure/lib/libcrypto/man/man3/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/man3/RSA_print.3 head/secure/lib/libcrypto/man/man3/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_set_method.3 head/secure/lib/libcrypto/man/man3/RSA_sign.3 head/secure/lib/libcrypto/man/man3/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/man3/RSA_size.3 head/secure/lib/libcrypto/man/man3/SCT_new.3 head/secure/lib/libcrypto/man/man3/SCT_print.3 head/secure/lib/libcrypto/man/man3/SCT_validate.3 head/secure/lib/libcrypto/man/man3/SHA256_Init.3 head/secure/lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 head/secure/lib/libcrypto/man/man3/SSL_COMP_add_compression_method.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_session.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_config.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get_verify_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_load_verify_locations.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_number.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cipher_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_hello_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ct_validation_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ctlog_list_file.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_generate_session_id.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_info_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_keylog_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_min_proto_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_msg_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_num_tickets.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_options.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_read_ahead.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_record_padding_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_ticket_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_split_send_fragment.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ssl_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_stateless_cookie_generate_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_servername_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_use_srtp.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_serverinfo.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_hostname.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_protocol_version.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_time.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_has_ticket.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 head/secure/lib/libcrypto/man/man3/SSL_alert_type_string.3 head/secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 head/secure/lib/libcrypto/man/man3/SSL_export_keying_material.3 head/secure/lib/libcrypto/man/man3/SSL_extension_supported.3 head/secure/lib/libcrypto/man/man3/SSL_get_all_async_fds.3 head/secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 head/secure/lib/libcrypto/man/man3/SSL_get_client_random.3 head/secure/lib/libcrypto/man/man3/SSL_get_current_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_get_fd.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_cert_chain.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_signature_nid.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 head/secure/lib/libcrypto/man/man3/SSL_get_psk_identity.3 head/secure/lib/libcrypto/man/man3/SSL_get_rbio.3 head/secure/lib/libcrypto/man/man3/SSL_get_session.3 head/secure/lib/libcrypto/man/man3/SSL_get_shared_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_get_version.3 head/secure/lib/libcrypto/man/man3/SSL_in_init.3 head/secure/lib/libcrypto/man/man3/SSL_key_update.3 head/secure/lib/libcrypto/man/man3/SSL_library_init.3 head/secure/lib/libcrypto/man/man3/SSL_load_client_CA_file.3 head/secure/lib/libcrypto/man/man3/SSL_new.3 head/secure/lib/libcrypto/man/man3/SSL_pending.3 head/secure/lib/libcrypto/man/man3/SSL_read.3 head/secure/lib/libcrypto/man/man3/SSL_read_early_data.3 head/secure/lib/libcrypto/man/man3/SSL_rstate_string.3 head/secure/lib/libcrypto/man/man3/SSL_set1_host.3 head/secure/lib/libcrypto/man/man3/SSL_set_bio.3 head/secure/lib/libcrypto/man/man3/SSL_set_connect_state.3 head/secure/lib/libcrypto/man/man3/SSL_set_fd.3 head/secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_state_string.3 head/secure/lib/libcrypto/man/man3/SSL_want.3 head/secure/lib/libcrypto/man/man3/SSL_write.3 head/secure/lib/libcrypto/man/man3/UI_STRING.3 head/secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 head/secure/lib/libcrypto/man/man3/UI_create_method.3 head/secure/lib/libcrypto/man/man3/UI_new.3 head/secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 head/secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 head/secure/lib/libcrypto/man/man3/X509_CRL_get0_by_serial.3 head/secure/lib/libcrypto/man/man3/X509_EXTENSION_set_object.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 head/secure/lib/libcrypto/man/man3/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/man3/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 head/secure/lib/libcrypto/man/man3/X509_SIG_get0.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/man3/X509_STORE_add_cert.3 head/secure/lib/libcrypto/man/man3/X509_STORE_get0_param.3 head/secure/lib/libcrypto/man/man3/X509_STORE_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/man3/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/man3/X509_check_host.3 head/secure/lib/libcrypto/man/man3/X509_check_private_key.3 head/secure/lib/libcrypto/man/man3/X509_cmp.3 head/secure/lib/libcrypto/man/man3/X509_cmp_time.3 head/secure/lib/libcrypto/man/man3/X509_digest.3 head/secure/lib/libcrypto/man/man3/X509_dup.3 head/secure/lib/libcrypto/man/man3/X509_get0_notBefore.3 head/secure/lib/libcrypto/man/man3/X509_get0_signature.3 head/secure/lib/libcrypto/man/man3/X509_get_extension_flags.3 head/secure/lib/libcrypto/man/man3/X509_get_pubkey.3 head/secure/lib/libcrypto/man/man3/X509_get_serialNumber.3 head/secure/lib/libcrypto/man/man3/X509_get_subject_name.3 head/secure/lib/libcrypto/man/man3/X509_get_version.3 head/secure/lib/libcrypto/man/man3/X509_new.3 head/secure/lib/libcrypto/man/man3/X509_sign.3 head/secure/lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 head/secure/lib/libcrypto/man/man3/d2i_DHparams.3 head/secure/lib/libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 head/secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 head/secure/lib/libcrypto/man/man3/d2i_X509.3 head/secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 head/secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 head/secure/lib/libcrypto/man/man5/x509v3_config.5 head/secure/lib/libcrypto/man/man7/Ed25519.7 head/secure/lib/libcrypto/man/man7/X25519.7 head/secure/lib/libcrypto/opensslconf.h.in head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/engine.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/list.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/prime.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/srp.1 head/secure/usr.bin/openssl/man/storeutl.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/sys/crypto/openssl/aarch64/aesv8-armx.S head/sys/crypto/openssl/aarch64/chacha-armv8.S head/sys/crypto/openssl/aarch64/poly1305-armv8.S head/sys/crypto/openssl/aarch64/sha1-armv8.S head/sys/crypto/openssl/aarch64/sha256-armv8.S head/sys/crypto/openssl/aarch64/sha512-armv8.S head/sys/crypto/openssl/arm/aesv8-armx.S Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/CHANGES Wed Dec 9 02:05:14 2020 (r368472) @@ -7,6 +7,38 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1h and 1.1.1i [8 Dec 2020] + + *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function + This function could crash if both GENERAL_NAMEs contain an EDIPARTYNAME. + If an attacker can control both items being compared then this could lead + to a possible denial of service attack. OpenSSL itself uses the + GENERAL_NAME_cmp function for two purposes: + 1) Comparing CRL distribution point names between an available CRL and a + CRL distribution point embedded in an X509 certificate + 2) When verifying that a timestamp response token signer matches the + timestamp authority name (exposed via the API functions + TS_RESP_verify_response and TS_RESP_verify_token) + (CVE-2020-1971) + [Matt Caswell] + + *) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target. + [Stuart Carnie] + + *) The security callback, which can be customised by application code, supports + the security operation SSL_SECOP_TMP_DH. This is defined to take an EVP_PKEY + in the "other" parameter. In most places this is what is passed. All these + places occur server side. However there was one client side call of this + security operation and it passed a DH object instead. This is incorrect + according to the definition of SSL_SECOP_TMP_DH, and is inconsistent with all + of the other locations. Therefore this client side call has been changed to + pass an EVP_PKEY instead. + [Matt Caswell] + + *) In 1.1.1h, an expired trusted (root) certificate was not anymore rejected + when validating a certificate path. This check is restored in 1.1.1i. + [David von Oheimb] + Changes between 1.1.1g and 1.1.1h [22 Sep 2020] *) Certificates with explicit curve parameters are now disallowed in @@ -31,6 +63,10 @@ *) Handshake now fails if Extended Master Secret extension is dropped on renegotiation. [Tomas Mraz] + + *) Accidentally, an expired trusted (root) certificate is not anymore rejected + when validating a certificate path. + [David von Oheimb] *) The Oracle Developer Studio compiler will start reporting deprecated APIs Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/NEWS Wed Dec 9 02:05:14 2020 (r368472) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020] + + o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971) + Major changes between OpenSSL 1.1.1g and OpenSSL 1.1.1h [22 Sep 2020] o Disallow explicit curve parameters in verifications chains when Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/README Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1h 22 Sep 2020 + OpenSSL 1.1.1i 8 Dec 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/ca.c ============================================================================== --- head/crypto/openssl/apps/ca.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/apps/ca.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * 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 @@ -1862,8 +1862,8 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 * row[DB_exp_date][tm->length] = '\0'; row[DB_rev_date] = NULL; row[DB_file] = OPENSSL_strdup("unknown"); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || - (row[DB_file] == NULL) || (row[DB_name] == NULL)) { + if ((row[DB_type] == NULL) || (row[DB_file] == NULL) + || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto end; } Modified: head/crypto/openssl/apps/cms.c ============================================================================== --- head/crypto/openssl/apps/cms.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/apps/cms.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-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 @@ -545,9 +545,11 @@ int cms_main(int argc, char **argv) if (key_param == NULL || key_param->idx != keyidx) { cms_key_param *nparam; nparam = app_malloc(sizeof(*nparam), "key param buffer"); - nparam->idx = keyidx; - if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) + if ((nparam->param = sk_OPENSSL_STRING_new_null()) == NULL) { + OPENSSL_free(nparam); goto end; + } + nparam->idx = keyidx; nparam->next = NULL; if (key_first == NULL) key_first = nparam; Modified: head/crypto/openssl/config ============================================================================== --- head/crypto/openssl/config Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/config Wed Dec 9 02:05:14 2020 (r368472) @@ -253,11 +253,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in Power*) echo "ppc-apple-darwin${VERSION}" ;; - x86_64) - echo "x86_64-apple-darwin${VERSION}" - ;; *) - echo "i686-apple-darwin${VERSION}" + echo "${MACHINE}-apple-darwin${VERSION}" ;; esac exit 0 @@ -497,6 +494,9 @@ case "$GUESSOS" in else OUT="darwin64-x86_64-cc" fi ;; + $MACHINE-apple-darwin*) + OUT="darwin64-$MACHINE-cc" + ;; armv6+7-*-iphoneos) __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" Modified: head/crypto/openssl/crypto/aes/asm/aesv8-armx.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesv8-armx.pl Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/aes/asm/aesv8-armx.pl Wed Dec 9 02:05:14 2020 (r368472) @@ -183,7 +183,12 @@ $code.=<<___; .Loop192: vtbl.8 $key,{$in1},$mask vext.8 $tmp,$zero,$in0,#12 +#ifdef __ARMEB__ + vst1.32 {$in1},[$out],#16 + sub $out,$out,#8 +#else vst1.32 {$in1},[$out],#8 +#endif aese $key,$zero subs $bits,$bits,#1 @@ -715,8 +720,11 @@ $code.=<<___; ldr $rounds,[$key,#240] ldr $ctr, [$ivp, #12] +#ifdef __ARMEB__ + vld1.8 {$dat0},[$ivp] +#else vld1.32 {$dat0},[$ivp] - +#endif vld1.32 {q8-q9},[$key] // load key schedule... sub $rounds,$rounds,#4 mov $step,#16 @@ -732,17 +740,17 @@ $code.=<<___; #ifndef __ARMEB__ rev $ctr, $ctr #endif - vorr $dat1,$dat0,$dat0 add $tctr1, $ctr, #1 - vorr $dat2,$dat0,$dat0 - add $ctr, $ctr, #2 vorr $ivec,$dat0,$dat0 rev $tctr1, $tctr1 - vmov.32 ${dat1}[3],$tctr1 + vmov.32 ${ivec}[3],$tctr1 + add $ctr, $ctr, #2 + vorr $dat1,$ivec,$ivec b.ls .Lctr32_tail rev $tctr2, $ctr + vmov.32 ${ivec}[3],$tctr2 sub $len,$len,#3 // bias - vmov.32 ${dat2}[3],$tctr2 + vorr $dat2,$ivec,$ivec b .Loop3x_ctr32 .align 4 @@ -769,11 +777,11 @@ $code.=<<___; aese $dat1,q8 aesmc $tmp1,$dat1 vld1.8 {$in0},[$inp],#16 - vorr $dat0,$ivec,$ivec + add $tctr0,$ctr,#1 aese $dat2,q8 aesmc $dat2,$dat2 vld1.8 {$in1},[$inp],#16 - vorr $dat1,$ivec,$ivec + rev $tctr0,$tctr0 aese $tmp0,q9 aesmc $tmp0,$tmp0 aese $tmp1,q9 @@ -782,8 +790,6 @@ $code.=<<___; mov $key_,$key aese $dat2,q9 aesmc $tmp2,$dat2 - vorr $dat2,$ivec,$ivec - add $tctr0,$ctr,#1 aese $tmp0,q12 aesmc $tmp0,$tmp0 aese $tmp1,q12 @@ -799,20 +805,22 @@ $code.=<<___; aese $tmp1,q13 aesmc $tmp1,$tmp1 veor $in2,$in2,$rndlast - rev $tctr0,$tctr0 + vmov.32 ${ivec}[3], $tctr0 aese $tmp2,q13 aesmc $tmp2,$tmp2 - vmov.32 ${dat0}[3], $tctr0 + vorr $dat0,$ivec,$ivec rev $tctr1,$tctr1 aese $tmp0,q14 aesmc $tmp0,$tmp0 + vmov.32 ${ivec}[3], $tctr1 + rev $tctr2,$ctr aese $tmp1,q14 aesmc $tmp1,$tmp1 - vmov.32 ${dat1}[3], $tctr1 - rev $tctr2,$ctr + vorr $dat1,$ivec,$ivec + vmov.32 ${ivec}[3], $tctr2 aese $tmp2,q14 aesmc $tmp2,$tmp2 - vmov.32 ${dat2}[3], $tctr2 + vorr $dat2,$ivec,$ivec subs $len,$len,#3 aese $tmp0,q15 aese $tmp1,q15 Modified: head/crypto/openssl/crypto/armcap.c ============================================================================== --- head/crypto/openssl/crypto/armcap.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/armcap.c Wed Dec 9 02:05:14 2020 (r368472) @@ -17,7 +17,6 @@ #include "arm_arch.h" -__attribute__ ((visibility("hidden"))) unsigned int OPENSSL_armcap_P = 0; #if __ARM_MAX_ARCH__<7 Modified: head/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_dec.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/asn1/tasn_dec.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-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 Modified: head/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_enc.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/asn1/tasn_enc.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-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 Modified: head/crypto/openssl/crypto/bio/b_addr.c ============================================================================== --- head/crypto/openssl/crypto/bio/b_addr.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/bio/b_addr.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,11 +1,15 @@ /* - * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-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 * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ + +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #include Modified: head/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl ============================================================================== --- head/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/chacha/asm/chacha-armv8.pl Wed Dec 9 02:05:14 2020 (r368472) @@ -125,6 +125,7 @@ $code.=<<___; .text .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P .align 5 .Lsigma: Modified: head/crypto/openssl/crypto/cms/cms_smime.c ============================================================================== --- head/crypto/openssl/crypto/cms/cms_smime.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/cms/cms_smime.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-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 @@ -341,7 +341,7 @@ int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *c char *ptr; long len; len = BIO_get_mem_data(dcont, &ptr); - tmpin = BIO_new_mem_buf(ptr, len); + tmpin = (len == 0) ? dcont : BIO_new_mem_buf(ptr, len); if (tmpin == NULL) { CMSerr(CMS_F_CMS_VERIFY, ERR_R_MALLOC_FAILURE); goto err2; Modified: head/crypto/openssl/crypto/evp/bio_ok.c ============================================================================== --- head/crypto/openssl/crypto/evp/bio_ok.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/evp/bio_ok.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * 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 @@ -203,7 +203,7 @@ static int ok_read(BIO *b, char *out, int outl) /* * copy start of the next block into proper place */ - if (ctx->buf_len_save - ctx->buf_off_save > 0) { + if (ctx->buf_len_save > ctx->buf_off_save) { ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; memmove(ctx->buf, &(ctx->buf[ctx->buf_off_save]), ctx->buf_len); Modified: head/crypto/openssl/crypto/modes/modes_local.h ============================================================================== --- head/crypto/openssl/crypto/modes/modes_local.h Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/modes/modes_local.h Wed Dec 9 02:05:14 2020 (r368472) @@ -63,12 +63,15 @@ typedef u32 u32_a1; asm ("bswapl %0" \ : "+r"(ret_)); ret_; }) # elif defined(__aarch64__) -# define BSWAP8(x) ({ u64 ret_; \ +# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ + __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ +# define BSWAP8(x) ({ u64 ret_; \ asm ("rev %0,%1" \ : "=r"(ret_) : "r"(x)); ret_; }) -# define BSWAP4(x) ({ u32 ret_; \ +# define BSWAP4(x) ({ u32 ret_; \ asm ("rev %w0,%w1" \ : "=r"(ret_) : "r"(x)); ret_; }) +# endif # elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT) # define BSWAP8(x) ({ u32 lo_=(u64)(x)>>32,hi_=(x); \ asm ("rev %0,%0; rev %1,%1" \ Modified: head/crypto/openssl/crypto/pkcs7/pk7_smime.c ============================================================================== --- head/crypto/openssl/crypto/pkcs7/pk7_smime.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/pkcs7/pk7_smime.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-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 @@ -301,7 +301,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X50 char *ptr; long len; len = BIO_get_mem_data(indata, &ptr); - tmpin = BIO_new_mem_buf(ptr, len); + tmpin = (len == 0) ? indata : BIO_new_mem_buf(ptr, len); if (tmpin == NULL) { PKCS7err(PKCS7_F_PKCS7_VERIFY, ERR_R_MALLOC_FAILURE); goto err; Modified: head/crypto/openssl/crypto/poly1305/asm/poly1305-armv8.pl ============================================================================== --- head/crypto/openssl/crypto/poly1305/asm/poly1305-armv8.pl Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/poly1305/asm/poly1305-armv8.pl Wed Dec 9 02:05:14 2020 (r368472) @@ -57,10 +57,14 @@ $code.=<<___; // forward "declarations" are required for Apple .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P +.globl poly1305_init +.hidden poly1305_init .globl poly1305_blocks +.hidden poly1305_blocks .globl poly1305_emit +.hidden poly1305_emit -.globl poly1305_init .type poly1305_init,%function .align 5 poly1305_init: @@ -860,8 +864,8 @@ poly1305_blocks_neon: st1 {$ACC4}[0],[$ctx] .Lno_data_neon: - .inst 0xd50323bf // autiasp ldr x29,[sp],#80 + .inst 0xd50323bf // autiasp ret .size poly1305_blocks_neon,.-poly1305_blocks_neon Modified: head/crypto/openssl/crypto/rand/rand_unix.c ============================================================================== --- head/crypto/openssl/crypto/rand/rand_unix.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/rand/rand_unix.c Wed Dec 9 02:05:14 2020 (r368472) @@ -365,12 +365,19 @@ static ssize_t syscall_random(void *buf, size_t buflen * - OpenBSD since 5.6 * - Linux since 3.17 with glibc 2.25 * - FreeBSD since 12.0 (1200061) + * + * Note: Sometimes getentropy() can be provided but not implemented + * internally. So we need to check errno for ENOSYS */ # if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux) extern int getentropy(void *buffer, size_t length) __attribute__((weak)); - if (getentropy != NULL) - return getentropy(buf, buflen) == 0 ? (ssize_t)buflen : -1; + if (getentropy != NULL) { + if (getentropy(buf, buflen) == 0) + return (ssize_t)buflen; + if (errno != ENOSYS) + return -1; + } # else union { void *p; Modified: head/crypto/openssl/crypto/sha/asm/sha1-armv8.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha1-armv8.pl Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/sha/asm/sha1-armv8.pl Wed Dec 9 02:05:14 2020 (r368472) @@ -176,6 +176,7 @@ $code.=<<___; .text .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P .globl sha1_block_data_order .type sha1_block_data_order,%function .align 6 @@ -329,7 +330,6 @@ $code.=<<___; #endif .asciz "SHA1 block transform for ARMv8, CRYPTOGAMS by " .align 2 -.comm OPENSSL_armcap_P,4,4 ___ }}} Modified: head/crypto/openssl/crypto/sha/asm/sha512-armv8.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha512-armv8.pl Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/sha/asm/sha512-armv8.pl Wed Dec 9 02:05:14 2020 (r368472) @@ -193,6 +193,7 @@ $code.=<<___; .text .extern OPENSSL_armcap_P +.hidden OPENSSL_armcap_P .globl $func .type $func,%function .align 6 @@ -839,12 +840,6 @@ $code.=<<___; #endif ___ } - -$code.=<<___; -#ifndef __KERNEL__ -.comm OPENSSL_armcap_P,4,4 -#endif -___ { my %opcode = ( "sha256h" => 0x5e004000, "sha256h2" => 0x5e005000, Modified: head/crypto/openssl/crypto/x509/x509_att.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_att.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/x509/x509_att.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * 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 @@ -149,7 +149,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STAC return ret; } -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, +void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, int lastpos, int type) { int i; Modified: head/crypto/openssl/crypto/x509/x509_cmp.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_cmp.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/x509/x509_cmp.c Wed Dec 9 02:05:14 2020 (r368472) @@ -135,6 +135,8 @@ int X509_cmp(const X509 *a, const X509 *b) { int rv; + if (a == b) /* for efficiency */ + return 0; /* ensure hash is valid */ if (X509_check_purpose((X509 *)a, -1, 0) != 1) return -2; Modified: head/crypto/openssl/crypto/x509/x509_vfy.c ============================================================================== --- head/crypto/openssl/crypto/x509/x509_vfy.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/x509/x509_vfy.c Wed Dec 9 02:05:14 2020 (r368472) @@ -312,8 +312,20 @@ int X509_verify_cert(X509_STORE_CTX *ctx) return ret; } +static int sk_X509_contains(STACK_OF(X509) *sk, X509 *cert) +{ + int i, n = sk_X509_num(sk); + + for (i = 0; i < n; i++) + if (X509_cmp(sk_X509_value(sk, i), cert) == 0) + return 1; + return 0; +} + /* - * Given a STACK_OF(X509) find the issuer of cert (if any) + * Find in given STACK_OF(X509) sk a non-expired issuer cert (if any) of given cert x. + * The issuer must not be the same as x and must not yet be in ctx->chain, where the + * exceptional case x is self-issued and ctx->chain has just one element is allowed. */ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x) { @@ -322,7 +334,13 @@ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF for (i = 0; i < sk_X509_num(sk); i++) { issuer = sk_X509_value(sk, i); - if (ctx->check_issued(ctx, x, issuer)) { + /* + * Below check 'issuer != x' is an optimization and safety precaution: + * Candidate issuer cert cannot be the same as the subject cert 'x'. + */ + if (issuer != x && ctx->check_issued(ctx, x, issuer) + && (((x->ex_flags & EXFLAG_SI) != 0 && sk_X509_num(ctx->chain) == 1) + || !sk_X509_contains(ctx->chain, issuer))) { rv = issuer; if (x509_check_cert_time(ctx, rv, -1)) break; @@ -331,30 +349,13 @@ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF return rv; } -/* - * Check that the given certificate 'x' is issued by the certificate 'issuer' - * and the issuer is not yet in ctx->chain, where the exceptional case - * that 'x' is self-issued and ctx->chain has just one element is allowed. - */ +/* Check that the given certificate 'x' is issued by the certificate 'issuer' */ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) { - if (x509_likely_issued(issuer, x) != X509_V_OK) - return 0; - if ((x->ex_flags & EXFLAG_SI) == 0 || sk_X509_num(ctx->chain) != 1) { - int i; - X509 *ch; - - for (i = 0; i < sk_X509_num(ctx->chain); i++) { - ch = sk_X509_value(ctx->chain, i); - if (ch == issuer || X509_cmp(ch, issuer) == 0) - return 0; - } - } - return 1; + return x509_likely_issued(issuer, x) == X509_V_OK; } /* Alternative lookup method: look from a STACK stored in other_ctx */ - static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) { *issuer = find_issuer(ctx, ctx->other_ctx, x); @@ -1740,7 +1741,7 @@ static int internal_verify(X509_STORE_CTX *ctx) if (ctx->bare_ta_signed) { xs = xi; xi = NULL; - goto check_cert; + goto check_cert_time; } if (ctx->check_issued(ctx, xi, xi)) @@ -1748,11 +1749,17 @@ static int internal_verify(X509_STORE_CTX *ctx) else { if (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) { xs = xi; - goto check_cert; + goto check_cert_time; } - if (n <= 0) - return verify_cb_cert(ctx, xi, 0, - X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE); + if (n <= 0) { + if (!verify_cb_cert(ctx, xi, 0, + X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE)) + return 0; + + xs = xi; + goto check_cert_time; + } + n--; ctx->error_depth = n; xs = sk_X509_value(ctx->chain, n); @@ -1811,7 +1818,7 @@ static int internal_verify(X509_STORE_CTX *ctx) } } - check_cert: + check_cert_time: /* in addition to RFC 5280, do also for trusted (root) cert */ /* Calls verify callback as needed */ if (!x509_check_cert_time(ctx, xs, n)) return 0; Modified: head/crypto/openssl/crypto/x509v3/v3_genn.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_genn.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/crypto/x509v3/v3_genn.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-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 Modified: head/crypto/openssl/doc/man1/verify.pod ============================================================================== --- head/crypto/openssl/doc/man1/verify.pod Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/doc/man1/verify.pod Wed Dec 9 02:05:14 2020 (r368472) @@ -382,10 +382,14 @@ should be trusted for the supplied purpose. For compatibility with previous versions of OpenSSL, a certificate with no trust settings is considered to be valid for all purposes. -The final operation is to check the validity of the certificate chain. The validity -period is checked against the current system time and the notBefore and notAfter -dates in the certificate. The certificate signatures are also checked at this -point. +The final operation is to check the validity of the certificate chain. +For each element in the chain, including the root CA certificate, +the validity period as specified by the C and C fields +is checked against the current system time. +The B<-attime> flag may be used to use a reference time other than "now." +The certificate signature is checked as well +(except for the signature of the typically self-signed root CA certificate, +which is verified only if the B<-check_ss_sig> option is given). If all operations complete successfully then certificate is considered valid. If any operation fails then the certificate is not valid. Modified: head/crypto/openssl/doc/man3/BN_set_bit.pod ============================================================================== --- head/crypto/openssl/doc/man3/BN_set_bit.pod Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/doc/man3/BN_set_bit.pod Wed Dec 9 02:05:14 2020 (r368472) @@ -33,7 +33,7 @@ error occurs if B is shorter than B bits. BN_is_bit_set() tests if bit B in B is set. BN_mask_bits() truncates B to an B bit number -(CEn)>). An error occurs if B already is +(CEn)>). An error occurs if B already is shorter than B bits. BN_lshift() shifts B left by B bits and places the result in Modified: head/crypto/openssl/doc/man3/X509_STORE_set_verify_cb_func.pod ============================================================================== --- head/crypto/openssl/doc/man3/X509_STORE_set_verify_cb_func.pod Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/doc/man3/X509_STORE_set_verify_cb_func.pod Wed Dec 9 02:05:14 2020 (r368472) @@ -137,9 +137,7 @@ I X509_STORE_set_check_issued() sets the function to check that a given -certificate B is issued by the issuer certificate B and -the issuer is not yet in the chain contained in , where the exceptional -case that B is self-issued and ctx->chain has just one element is allowed. +certificate B is issued by the issuer certificate B. This function must return 0 on failure (among others if B hasn't been issued with B) and 1 on success. Irlayer.wbuf[0]; /* - * first check if there is a SSL3_BUFFER still being written out. This - * will happen with non blocking IO + * DTLS writes whole datagrams, so there can't be anything left in + * the buffer. */ if (!ossl_assert(SSL3_BUFFER_get_left(wb) == 0)) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_DO_DTLS1_WRITE, Modified: head/crypto/openssl/ssl/s3_lib.c ============================================================================== --- head/crypto/openssl/ssl/s3_lib.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/ssl/s3_lib.c Wed Dec 9 02:05:14 2020 (r368472) @@ -4072,9 +4072,10 @@ const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id) const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname) { - SSL_CIPHER *c = NULL, *tbl; - SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers}; - size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS}; + SSL_CIPHER *tbl; + SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers, ssl3_scsvs}; + size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, + SSL3_NUM_SCSVS}; /* this is not efficient, necessary to optimize this? */ for (j = 0; j < OSSL_NELEM(alltabs); j++) { @@ -4082,21 +4083,11 @@ const SSL_CIPHER *ssl3_get_cipher_by_std_name(const ch if (tbl->stdname == NULL) continue; if (strcmp(stdname, tbl->stdname) == 0) { - c = tbl; - break; + return tbl; } } } - if (c == NULL) { - tbl = ssl3_scsvs; - for (i = 0; i < SSL3_NUM_SCSVS; i++, tbl++) { - if (strcmp(stdname, tbl->stdname) == 0) { - c = tbl; - break; - } - } - } - return c; + return NULL; } /* Modified: head/crypto/openssl/ssl/ssl_lib.c ============================================================================== --- head/crypto/openssl/ssl/ssl_lib.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/ssl/ssl_lib.c Wed Dec 9 02:05:14 2020 (r368472) @@ -2678,7 +2678,7 @@ const char *SSL_get_servername(const SSL *s, const int * - Otherwise it returns NULL * * During/after the handshake (TLSv1.2 or below resumption occurred): - * - If the session from the orignal handshake had a servername accepted + * - If the session from the original handshake had a servername accepted * by the server then it will return that servername. * - Otherwise it returns the servername set via * SSL_set_tlsext_host_name() (or NULL if it was not called). Modified: head/crypto/openssl/ssl/ssl_sess.c ============================================================================== --- head/crypto/openssl/ssl/ssl_sess.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/ssl/ssl_sess.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -107,7 +107,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int tic { SSL_SESSION *dest; - dest = OPENSSL_malloc(sizeof(*src)); + dest = OPENSSL_malloc(sizeof(*dest)); if (dest == NULL) { goto err; } Modified: head/crypto/openssl/ssl/statem/statem_clnt.c ============================================================================== --- head/crypto/openssl/ssl/statem/statem_clnt.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/ssl/statem/statem_clnt.c Wed Dec 9 02:05:14 2020 (r368472) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * @@ -2145,15 +2145,17 @@ static int tls_process_ske_dhe(SSL *s, PACKET *pkt, EV } bnpub_key = NULL; - if (!ssl_security(s, SSL_SECOP_TMP_DH, DH_security_bits(dh), 0, dh)) { - SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_F_TLS_PROCESS_SKE_DHE, - SSL_R_DH_KEY_TOO_SMALL); - goto err; - } - if (EVP_PKEY_assign_DH(peer_tmp, dh) == 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_SKE_DHE, ERR_R_EVP_LIB); + goto err; + } + dh = NULL; + + if (!ssl_security(s, SSL_SECOP_TMP_DH, EVP_PKEY_security_bits(peer_tmp), + 0, peer_tmp)) { + SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_F_TLS_PROCESS_SKE_DHE, + SSL_R_DH_KEY_TOO_SMALL); goto err; } Modified: head/crypto/openssl/ssl/statem/statem_srvr.c ============================================================================== --- head/crypto/openssl/ssl/statem/statem_srvr.c Wed Dec 9 00:56:38 2020 (r368471) +++ head/crypto/openssl/ssl/statem/statem_srvr.c Wed Dec 9 02:05:14 2020 (r368472) @@ -2577,7 +2577,7 @@ int tls_construct_server_key_exchange(SSL *s, WPACKET s->s3->tmp.pkey = ssl_generate_pkey(pkdhp); if (s->s3->tmp.pkey == NULL) { - /* SSLfatal() already called */ + SSLfatal(s, SSL_AD_INTERNAL_ERROR, 0, ERR_R_INTERNAL_ERROR); goto err; } Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/Makefile.inc Wed Dec 9 02:05:14 2020 (r368472) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1h -OPENSSL_DATE= 2020-09-22 +OPENSSL_VER= 1.1.1i +OPENSSL_DATE= 2020-12-08 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc Modified: head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ADMISSIONS 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_TIME_SET 3 "2020-12-08" "1.1.1i" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 ============================================================================== --- head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 Wed Dec 9 00:56:38 2020 (r368471) +++ head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 Wed Dec 9 02:05:14 2020 (r368472) @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2020-12-08" "1.1.1i" "OpenSSL" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Dec 9 02:07:02 2020 Return-Path: Delivered-To: svn-src-all@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 9C18A4B2FB7; Wed, 9 Dec 2020 02:07:02 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrL5f43CHz3k4N; Wed, 9 Dec 2020 02:07:02 +0000 (UTC) (envelope-from jhibbits@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 7DDAF1E75B; Wed, 9 Dec 2020 02:07:02 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B927280098700; Wed, 9 Dec 2020 02:07:02 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9272V2098699; Wed, 9 Dec 2020 02:07:02 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202012090207.0B9272V2098699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 9 Dec 2020 02:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368473 - head/sys/dev/mfi X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/mfi X-SVN-Commit-Revision: 368473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:07:02 -0000 Author: jhibbits Date: Wed Dec 9 02:07:01 2020 New Revision: 368473 URL: https://svnweb.freebsd.org/changeset/base/368473 Log: dev/mfi: Make a seemingly bogus conditional unconditional Summary: r358689 attempted to fix a clang warning/error by inferring the intent of the condition "(cdb[0] != 0x28 || cdb[0] != 0x2A)". Unfortunately, it looks like this broke things. Instead, fix this by making this path unconditional, effectively reverting to the previous state. PR: kern/251483 Reviewed By: ambrisko MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D27515 Modified: head/sys/dev/mfi/mfi_tbolt.c Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Wed Dec 9 02:05:14 2020 (r368472) +++ head/sys/dev/mfi/mfi_tbolt.c Wed Dec 9 02:07:01 2020 (r368473) @@ -1104,16 +1104,12 @@ mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_ if (hdr->cmd == MFI_CMD_PD_SCSI_IO) { /* check for inquiry commands coming from CLI */ - if (cdb[0] != 0x28 && cdb[0] != 0x2A) { - if ((req_desc = mfi_tbolt_build_mpt_cmd(sc, cm)) == - NULL) { - device_printf(sc->mfi_dev, "Mapping from MFI " - "to MPT Failed \n"); - return 1; - } + if ((req_desc = mfi_tbolt_build_mpt_cmd(sc, cm)) == + NULL) { + device_printf(sc->mfi_dev, "Mapping from MFI " + "to MPT Failed \n"); + return 1; } - else - device_printf(sc->mfi_dev, "DJA NA XXX SYSPDIO\n"); } else if (hdr->cmd == MFI_CMD_LD_SCSI_IO || hdr->cmd == MFI_CMD_LD_READ || hdr->cmd == MFI_CMD_LD_WRITE) { cm->cm_flags |= MFI_CMD_SCSI; From owner-svn-src-all@freebsd.org Wed Dec 9 02:11:59 2020 Return-Path: Delivered-To: svn-src-all@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 7578C4B3329; Wed, 9 Dec 2020 02:11:59 +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 4CrLCM2w53z3kkr; Wed, 9 Dec 2020 02:11:59 +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 56F5C1E938; Wed, 9 Dec 2020 02:11:59 +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 0B92Bxij003191; Wed, 9 Dec 2020 02:11:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B92Bxcq003190; Wed, 9 Dec 2020 02:11:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012090211.0B92Bxcq003190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 9 Dec 2020 02:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368474 - vendor-crypto/openssl/dist X-SVN-Group: vendor-crypto X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-crypto/openssl/dist X-SVN-Commit-Revision: 368474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:11:59 -0000 Author: jkim Date: Wed Dec 9 02:11:58 2020 New Revision: 368474 URL: https://svnweb.freebsd.org/changeset/base/368474 Log: Update OpenSSL upgrade procedure. Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Wed Dec 9 02:07:01 2020 (r368473) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Wed Dec 9 02:11:58 2020 (r368474) @@ -11,7 +11,7 @@ First, read http://wiki.freebsd.org/SubversionPrimer/V # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://repo.freebsd.org/base" -setenv OSSLVER 1.1.1h +setenv OSSLVER 1.1.1i ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` @@ -64,16 +64,11 @@ cd secure/lib/libcrypto # Regen assembly files if necessary make -f Makefile.asm all -mv *.[Ss] ${MACHINE_CPUARCH} +mv *.S sys/crypto/openssl/${MACHINE_CPUARCH} make -f Makefile.asm clean - -# Regen manual pages -make man-makefile-update && make man-update -cd ../libssl -make man-makefile-update && make man-update -cd ../../usr.bin/openssl -make man-makefile-update && make man-update cd ../../.. + +# Regen manual pages and update makefiles accordingly # Commit! svn ci crypto/openssl secure/lib/libcrypto secure/lib/libssl secure/usr.bin/openssl From owner-svn-src-all@freebsd.org Wed Dec 9 02:18:26 2020 Return-Path: Delivered-To: svn-src-all@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 DC9E24B3603; Wed, 9 Dec 2020 02:18:26 +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 4CrLLp5yLxz3lB7; Wed, 9 Dec 2020 02:18:26 +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 BB24C1E949; Wed, 9 Dec 2020 02:18:26 +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 0B92IQR6005400; Wed, 9 Dec 2020 02:18:26 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B92IQKD005399; Wed, 9 Dec 2020 02:18:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012090218.0B92IQKD005399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 9 Dec 2020 02:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r368475 - vendor-crypto/openssl/dist X-SVN-Group: vendor-crypto X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-crypto/openssl/dist X-SVN-Commit-Revision: 368475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:18:26 -0000 Author: jkim Date: Wed Dec 9 02:18:26 2020 New Revision: 368475 URL: https://svnweb.freebsd.org/changeset/base/368475 Log: Update OpenSSL upgrade procedure for the new assembly file path. Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Wed Dec 9 02:11:58 2020 (r368474) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Wed Dec 9 02:18:26 2020 (r368475) @@ -55,6 +55,7 @@ svn merge ^/vendor-crypto/openssl/dist crypto/openssl svn co $FSVN/head/secure/lib/libcrypto secure/lib/libcrypto svn co $FSVN/head/secure/lib/libssl secure/lib/libssl svn co $FSVN/head/secure/usr.bin/openssl secure/usr.bin/openssl +svn co $FSVN/head/sys/crypto/openssl sys/crypto/openssl cd secure/lib/libcrypto @@ -71,7 +72,8 @@ cd ../../.. # Regen manual pages and update makefiles accordingly # Commit! -svn ci crypto/openssl secure/lib/libcrypto secure/lib/libssl secure/usr.bin/openssl +svn ci crypto/openssl secure/lib/libcrypto secure/lib/libssl \ + secure/usr.bin/openssl sys/crypto/openssl -- simon@, jkim@ From owner-svn-src-all@freebsd.org Wed Dec 9 02:21:26 2020 Return-Path: Delivered-To: svn-src-all@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 A78244B379C; Wed, 9 Dec 2020 02:21:26 +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 4CrLQG4Qylz3lW4; Wed, 9 Dec 2020 02:21:26 +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 8ABF71EC0C; Wed, 9 Dec 2020 02:21:26 +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 0B92LQXY007070; Wed, 9 Dec 2020 02:21:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B92LQ0Y007068; Wed, 9 Dec 2020 02:21:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202012090221.0B92LQ0Y007068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 9 Dec 2020 02:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368476 - head/release/riscv X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/riscv X-SVN-Commit-Revision: 368476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:21:26 -0000 Author: gjb Date: Wed Dec 9 02:21:25 2020 New Revision: 368476 URL: https://svnweb.freebsd.org/changeset/base/368476 Log: Copy arm64 make-memstick.sh and mkisoimages.sh to the riscv directory to allow properly building *.iso and *.img files. Sponsored by: Rubicon Communications, LLC (netgate.com) Added: head/release/riscv/make-memstick.sh - copied unchanged from r368474, head/release/arm64/make-memstick.sh head/release/riscv/mkisoimages.sh - copied unchanged from r368474, head/release/arm64/mkisoimages.sh Copied: head/release/riscv/make-memstick.sh (from r368474, head/release/arm64/make-memstick.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/riscv/make-memstick.sh Wed Dec 9 02:21:25 2020 (r368476, copy of r368474, head/release/arm64/make-memstick.sh) @@ -0,0 +1,52 @@ +#!/bin/sh +# +# This script generates a "memstick image" (image that can be copied to a +# USB memory stick) from a directory tree. Note that the script does not +# clean up after itself very well for error conditions on purpose so the +# problem can be diagnosed (full filesystem most likely but ...). +# +# Usage: make-memstick.sh +# +# $FreeBSD$ +# + +set -e + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +export PATH + +scriptdir=$(dirname $(realpath $0)) +. ${scriptdir}/../../tools/boot/install-boot.sh + +if [ $# -ne 2 ]; then + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 +fi + +if [ ! -d ${1} ]; then + echo "${1} must be a directory" + exit 1 +fi + +if [ -e ${2} ]; then + echo "won't overwrite ${2}" + exit 1 +fi + +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local +makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1} +rm ${1}/etc/fstab +rm ${1}/etc/rc.conf.local + +# Make an ESP in a file. +espfilename=$(mktemp /tmp/efiboot.XXXXXX) +make_esp_file ${espfilename} ${fat32min} ${1}/boot/loader.efi + +mkimg -s gpt \ + -p efi:=${espfilename} \ + -p freebsd-ufs:=${2}.part \ + -o ${2} +rm ${espfilename} +rm ${2}.part + Copied: head/release/riscv/mkisoimages.sh (from r368474, head/release/arm64/mkisoimages.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/riscv/mkisoimages.sh Wed Dec 9 02:21:25 2020 (r368476, copy of r368474, head/release/arm64/mkisoimages.sh) @@ -0,0 +1,93 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# This script is used by release/Makefile to build the (optional) ISO images +# for a FreeBSD release. It is considered architecture dependent since each +# platform has a slightly unique way of making bootable CDs. This script is +# also allowed to generate any number of images since that is more of +# publishing decision than anything else. +# +# Usage: +# +# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir] +# +# Where -b is passed if the ISO image should be made "bootable" by +# whatever standards this architecture supports (may be unsupported), +# image-label is the ISO image label, image-name is the filename of the +# resulting ISO image, base-bits-dir contains the image contents and +# extra-bits-dir, if provided, contains additional files to be merged +# into base-bits-dir as part of making the image. + +set -e + +scriptdir=$(dirname $(realpath $0)) +. ${scriptdir}/../../tools/boot/install-boot.sh + +if [ -z $ETDUMP ]; then + ETDUMP=etdump +fi + +if [ -z $MAKEFS ]; then + MAKEFS=makefs +fi + +if [ -z $MKIMG ]; then + MKIMG=mkimg +fi + +if [ "$1" = "-b" ]; then + BASEBITSDIR="$4" + + # Make an EFI system partition. + espfilename=$(mktemp /tmp/efiboot.XXXXXX) + # ESP file size in KB. + espsize="2048" + make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi + + bootable="-o bootimage=efi;${espfilename} -o no-emul-boot -o platformid=efi" + + shift +else + BASEBITSDIR="$3" + bootable="" +fi + +if [ $# -lt 3 ]; then + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" + exit 1 +fi + +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift + +publisher="The FreeBSD Project. https://www.FreeBSD.org/" +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab" +$MAKEFS -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" +rm -f "$BASEBITSDIR/etc/fstab" +rm -f ${espfilename} + +if [ "$bootable" != "" ]; then + # Look for the EFI System Partition image we dropped in the ISO image. + for entry in `$ETDUMP --format shell $NAME`; do + eval $entry + # XXX: etdump(8) returns "default" for the initial entry + if [ "$et_platform" = "default" ]; then + espstart=`expr $et_lba \* 2048` + espsize=`expr $et_sectors \* 512` + espparam="-p efi::$espsize:$espstart" + break + fi + done + + # Create a GPT image containing the EFI partition. + imgsize=`stat -f %z "$NAME"` + $MKIMG -s gpt \ + --capacity $imgsize \ + $espparam \ + -o efi.img + + # Drop the GPT into the System Area of the ISO. + dd if=efi.img of="$NAME" bs=32k count=1 conv=notrunc + rm -f efi.img +fi From owner-svn-src-all@freebsd.org Wed Dec 9 02:47:41 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Dec 9 02:59:25 2020 Return-Path: Delivered-To: svn-src-all@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 A9CB94B4E8A; Wed, 9 Dec 2020 02:59:25 +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 4CrMG54HC7z3p7l; Wed, 9 Dec 2020 02:59:25 +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 857C71F380; Wed, 9 Dec 2020 02:59:25 +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 0B92xPaD031427; Wed, 9 Dec 2020 02:59:25 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B92xOLD031422; Wed, 9 Dec 2020 02:59:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202012090259.0B92xOLD031422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 9 Dec 2020 02:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368478 - in head/contrib/unbound: . contrib daemon dnstap doc libunbound respip services services/cache smallapp util util/data validator X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/unbound: . contrib daemon dnstap doc libunbound respip services services/cache smallapp util util/data validator X-SVN-Commit-Revision: 368478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 02:59:25 -0000 Author: cy Date: Wed Dec 9 02:59:24 2020 New Revision: 368478 URL: https://svnweb.freebsd.org/changeset/base/368478 Log: MFV r368464: Update unbound from 1.12.0 to 1.13.0 MFC after: 1 week Security: CVE-2020-28935 Added: head/contrib/unbound/contrib/metrics.awk - copied unchanged from r368464, vendor/unbound/dist/contrib/metrics.awk Modified: head/contrib/unbound/config.guess head/contrib/unbound/config.sub head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/contrib/README head/contrib/unbound/contrib/unbound.service.in head/contrib/unbound/contrib/unbound_portable.service.in head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/dnstap/dnstap.c head/contrib/unbound/dnstap/dtstream.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/libunbound/context.c head/contrib/unbound/libunbound/libunbound.c head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/respip/respip.c head/contrib/unbound/services/authzone.c head/contrib/unbound/services/cache/infra.c head/contrib/unbound/services/cache/infra.h head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/services/localzone.c head/contrib/unbound/services/mesh.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/outside_network.h head/contrib/unbound/services/rpz.c head/contrib/unbound/smallapp/unbound-control-setup.sh.in head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/data/msgencode.c head/contrib/unbound/util/data/msgreply.h head/contrib/unbound/util/edns.c head/contrib/unbound/util/edns.h head/contrib/unbound/util/fptr_wlist.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/module.h head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/util/regional.c head/contrib/unbound/util/regional.h head/contrib/unbound/validator/val_secalgo.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/config.guess ============================================================================== --- head/contrib/unbound/config.guess Wed Dec 9 02:47:39 2020 (r368477) +++ head/contrib/unbound/config.guess Wed Dec 9 02:59:24 2020 (r368478) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-09-19' +timestamp='2020-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,12 +27,12 @@ timestamp='2020-09-19' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] @@ -103,7 +103,7 @@ set_cc_for_build() { test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } @@ -131,16 +131,14 @@ if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown +UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown +UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown +UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -149,16 +147,30 @@ Linux|GNU|GNU/*) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu #else #include + /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl - #else - LIBC=gnu #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi ;; esac @@ -177,19 +189,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` + echo unknown)) case "$UNAME_MACHINE_ARCH" in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') + endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; @@ -220,7 +233,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") ;; esac # The OS release @@ -233,7 +246,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA release='-gnu' ;; *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: @@ -242,15 +255,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) @@ -286,17 +299,17 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; @@ -334,7 +347,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -368,7 +381,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then + if test "$( (/bin/universe) 2>/dev/null)" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd @@ -381,17 +394,17 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in + case $(/usr/bin/uname -p) in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" @@ -410,30 +423,30 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case "$(/usr/bin/arch -k)" in Series*|S4*) - UNAME_RELEASE=`uname -v` + UNAME_RELEASE=$(uname -v) ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case "$(/bin/arch)" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; @@ -513,8 +526,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNA } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && + dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && + SYSTEM_NAME=$("$dummy" "$dummyarg") && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; @@ -541,7 +554,7 @@ EOF exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=$(/usr/bin/uname -p) if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ @@ -569,17 +582,17 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=`/usr/bin/oslevel` + IBM_REV=$(/usr/bin/oslevel) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi @@ -599,7 +612,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") then echo "$SYSTEM_NAME" else @@ -612,15 +625,15 @@ EOF fi exit ;; *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi @@ -648,14 +661,14 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) + sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 @@ -702,7 +715,7 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac @@ -730,7 +743,7 @@ EOF echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) @@ -760,7 +773,7 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; @@ -829,14 +842,14 @@ EOF echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -849,25 +862,25 @@ EOF echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf fi exit ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=$(/usr/bin/uname -p) case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin @@ -903,15 +916,15 @@ EOF echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" exit ;; *:Minix:*:*) echo "$UNAME_MACHINE"-unknown-minix @@ -924,7 +937,7 @@ EOF echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -1033,7 +1046,7 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) @@ -1053,7 +1066,7 @@ EOF exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; @@ -1143,7 +1156,7 @@ EOF echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else @@ -1152,7 +1165,7 @@ EOF exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in + case $(/bin/uname -X | grep "^Machine") in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; @@ -1161,10 +1174,10 @@ EOF exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1214,7 +1227,7 @@ EOF 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1225,7 +1238,7 @@ EOF NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1258,7 +1271,7 @@ EOF exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=$( (uname -p) 2>/dev/null) echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv @@ -1344,7 +1357,7 @@ EOF echo aarch64-apple-darwin"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac @@ -1381,7 +1394,7 @@ EOF echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc @@ -1449,10 +1462,10 @@ EOF echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=$( (uname -p) 2>/dev/null) case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1462,7 +1475,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos @@ -1520,7 +1533,7 @@ main () #define __ARCHITECTURE__ "m68k" #endif int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1612,7 +1625,7 @@ main () } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1637,14 +1650,14 @@ This script (version $timestamp), has failed to recogn operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub EOF -year=`echo $timestamp | sed 's,-.*,,'` +year=$(echo $timestamp | sed 's,-.*,,') # shellcheck disable=SC2003 -if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then +if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then cat >&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` +uname -m = $( (uname -m) 2>/dev/null || echo unknown) +uname -r = $( (uname -r) 2>/dev/null || echo unknown) +uname -s = $( (uname -s) 2>/dev/null || echo unknown) +uname -v = $( (uname -v) 2>/dev/null || echo unknown) -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` +/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) +/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` +hostinfo = $( (hostinfo) 2>/dev/null) +/bin/universe = $( (/bin/universe) 2>/dev/null) +/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) +/bin/arch = $( (/bin/arch) 2>/dev/null) +/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) +/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" Modified: head/contrib/unbound/config.sub ============================================================================== --- head/contrib/unbound/config.sub Wed Dec 9 02:47:39 2020 (r368477) +++ head/contrib/unbound/config.sub Wed Dec 9 02:59:24 2020 (r368478) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-09-08' +timestamp='2020-12-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2020-09-08' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,7 +50,7 @@ timestamp='2020-09-08' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -769,22 +769,22 @@ case $basic_machine in vendor=hp ;; i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv32 ;; i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv4 ;; i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv ;; i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` + cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=solaris2 ;; @@ -917,7 +917,7 @@ case $basic_machine in ;; leon-*|leon[3-9]-*) cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` + vendor=$(echo "$basic_machine" | sed 's/-.*//') ;; *-*) @@ -1084,7 +1084,7 @@ case $cpu-$vendor in cpu=mipsisa64sb1el ;; sh5e[lb]-*) - cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/') ;; spur-*) cpu=spur @@ -1102,7 +1102,7 @@ case $cpu-$vendor in cpu=x86_64 ;; xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + cpu=$(echo "$cpu" | sed 's/^xscale/arm/') ;; arm64-*) cpu=aarch64 @@ -1241,6 +1241,7 @@ case $cpu-$vendor in | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | spu \ | tahoe \ + | thumbv7* \ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | tron \ | ubicom32 \ @@ -1286,11 +1287,15 @@ then case $basic_os in gnu/linux*) kernel=linux - os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'` + os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') ;; + os2-emx) + kernel=os2 + os=$(echo $basic_os | sed -e 's|os2-emx|emx|') + ;; nto-qnx*) kernel=nto - os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'` + os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') ;; *-*) # shellcheck disable=SC2162 @@ -1301,11 +1306,11 @@ EOF # Default OS when just kernel was specified nto*) kernel=nto - os=`echo $basic_os | sed -e 's|nto|qnx|'` + os=$(echo $basic_os | sed -e 's|nto|qnx|') ;; linux*) kernel=linux - os=`echo $basic_os | sed -e 's|linux|gnu|'` + os=$(echo $basic_os | sed -e 's|linux|gnu|') ;; *) kernel= @@ -1326,7 +1331,7 @@ case $os in os=cnk ;; solaris1 | solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` + os=$(echo $os | sed -e 's|solaris1|sunos4|') ;; solaris) os=solaris2 @@ -1355,7 +1360,7 @@ case $os in os=sco3.2v4 ;; sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + os=$(echo $os | sed -e 's/sco3.2./sco3.2v/') ;; sco*v* | scout) # Don't match below @@ -1385,7 +1390,7 @@ case $os in os=lynxos ;; mac[0-9]*) - os=`echo "$os" | sed -e 's|mac|macos|'` + os=$(echo "$os" | sed -e 's|mac|macos|') ;; opened*) os=openedition @@ -1394,10 +1399,10 @@ case $os in os=os400 ;; sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + os=$(echo "$os" | sed -e 's|sunos5|solaris2|') ;; sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + os=$(echo "$os" | sed -e 's|sunos6|solaris3|') ;; wince*) os=wince @@ -1431,7 +1436,7 @@ case $os in ;; # Preserve the version number of sinix5. sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` + os=$(echo $os | sed -e 's|sinix|sysv|') ;; sinix*) os=sysv4 @@ -1716,7 +1721,7 @@ case $os in | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* | qnx* ) + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1746,6 +1751,8 @@ case $kernel-$os in kfreebsd*-gnu* | kopensolaris*-gnu*) ;; nto-qnx*) + ;; + os2-emx) ;; *-eabi* | *-gnueabi*) ;; Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Wed Dec 9 02:47:39 2020 (r368477) +++ head/contrib/unbound/configure Wed Dec 9 02:59:24 2020 (r368478) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.12.0. +# Generated by GNU Autoconf 2.69 for unbound 1.13.0. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.12.0' -PACKAGE_STRING='unbound 1.12.0' +PACKAGE_VERSION='1.13.0' +PACKAGE_STRING='unbound 1.13.0' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' @@ -1459,7 +1459,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.12.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.13.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1524,7 +1524,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.12.0:";; + short | recursive ) echo "Configuration of unbound 1.13.0:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.12.0 +unbound configure 1.13.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2461,7 +2461,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.12.0, which was +It was created by unbound $as_me 1.13.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2811,13 +2811,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu UNBOUND_VERSION_MAJOR=1 -UNBOUND_VERSION_MINOR=12 +UNBOUND_VERSION_MINOR=13 UNBOUND_VERSION_MICRO=0 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=10 +LIBUNBOUND_REVISION=11 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2895,6 +2895,7 @@ LIBUNBOUND_AGE=1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 # 1.12.0 had 9:10:1 +# 1.13.0 had 9:11:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -14728,7 +14729,7 @@ $as_echo "no" >&6; } fi # Checks for header files. -for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h net/if.h +for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default @@ -14742,7 +14743,35 @@ fi done +# net/if.h portability for Darwin see: +# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html +for ac_header in net/if.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +" +if test "x$ac_cv_header_net_if_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF + +fi + +done + + # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH for ac_header in TargetConditionals.h do : @@ -21686,7 +21715,7 @@ _ACEOF -version=1.12.0 +version=1.13.0 date=`date +'%b %e, %Y'` @@ -22205,7 +22234,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.12.0, which was +This file was extended by unbound $as_me 1.13.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22271,7 +22300,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.12.0 +unbound config.status 1.13.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Wed Dec 9 02:47:39 2020 (r368477) +++ head/contrib/unbound/configure.ac Wed Dec 9 02:59:24 2020 (r368478) @@ -10,7 +10,7 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) -m4_define([VERSION_MINOR],[12]) +m4_define([VERSION_MINOR],[13]) m4_define([VERSION_MICRO],[0]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) @@ -18,7 +18,7 @@ AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=10 +LIBUNBOUND_REVISION=11 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -96,6 +96,7 @@ LIBUNBOUND_AGE=1 # 1.10.1 had 9:8:1 # 1.11.0 had 9:9:1 # 1.12.0 had 9:10:1 +# 1.13.0 had 9:11:1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Dec 9 03:20:51 2020 Return-Path: Delivered-To: svn-src-all@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 DA5714B598B; Wed, 9 Dec 2020 03:20:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrMkq5h3Fz3r2Q; Wed, 9 Dec 2020 03:20:51 +0000 (UTC) (envelope-from kevans@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 B5C951F982; Wed, 9 Dec 2020 03:20:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B93KpHV045111; Wed, 9 Dec 2020 03:20:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B93KplP045110; Wed, 9 Dec 2020 03:20:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012090320.0B93KplP045110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Dec 2020 03:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368479 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 03:20:51 -0000 Author: kevans Date: Wed Dec 9 03:20:51 2020 New Revision: 368479 URL: https://svnweb.freebsd.org/changeset/base/368479 Log: _umtx_op(2): document recent addition of 32bit compat flags This was part of D27325. Reviewed by: kib Modified: head/lib/libc/sys/_umtx_op.2 Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Wed Dec 9 02:59:24 2020 (r368478) +++ head/lib/libc/sys/_umtx_op.2 Wed Dec 9 03:20:51 2020 (r368479) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 16, 2020 +.Dd November 23, 2020 .Dt _UMTX_OP 2 .Os .Sh NAME @@ -1272,6 +1272,79 @@ See .Sx ROBUST UMUTEXES subsection for details. .El +.Pp +The +.Fa op +argument may be a bitwise OR of a single command from above with one or more of +the following flags: +.Bl -tag -width indent +.It Dv UMTX_OP__I386 +Request i386 ABI compatibility from the native +.Nm +system call. +Specifically, this implies that: +.Bl -hang -offset indent +.It +.Fa obj +arguments that point to a word, point to a 32-bit integer. +.It +The +.Dv UMTX_OP_NWAKE_PRIVATE +.Fa obj +argument is a pointer to an array of 32-bit pointers. +.It +The +.Dv m_rb_lnk +member of +.Vt struct umutex +is a 32-bit pointer. +.It +.Vt struct timespec +uses a 32-bit time_t. +.El +.Pp +.Dv UMTX_OP__32BIT +has no effect if this flag is set. +This flag is valid for all architectures, but it is ignored on i386. +.It Dv UMTX_OP__32BIT +Request non-i386, 32-bit ABI compatibility from the native +.Nm +system call. +Specifically, this implies that: +.Bl -hang -offset indent +.It +.Fa obj +arguments that point to a word, point to a 32-bit integer. +.It +The +.Dv UMTX_OP_NWAKE_PRIVATE +.Fa obj +argument is a pointer to an array of 32-bit pointers. +.It +The +.Dv m_rb_lnk +member of +.Vt struct umutex +is a 32-bit pointer. +.It +.Vt struct timespec +uses a 64-bit time_t. +.El +.Pp +This flag has no effect if +.Dv UMTX_OP__I386 +is set. +This flag is valid for all architectures. +.El +.Pp +Note that if any 32-bit ABI compatibility is being requested, then care must be +taken with robust lists. +A single thread may not mix 32-bit compatible robust lists with native +robust lists. +The first +.Dv UMTX_OP_ROBUST_LISTS +call in a given thread determines which ABI that thread will use for robust +lists going forward. .Sh RETURN VALUES If successful, all requests, except From owner-svn-src-all@freebsd.org Wed Dec 9 03:22:45 2020 Return-Path: Delivered-To: svn-src-all@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 83DBC4B5830; Wed, 9 Dec 2020 03:22:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrMn13FLwz3r3f; Wed, 9 Dec 2020 03:22:45 +0000 (UTC) (envelope-from kevans@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 580B21F549; Wed, 9 Dec 2020 03:22:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B93MjIo050883; Wed, 9 Dec 2020 03:22:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B93Mi7u050878; Wed, 9 Dec 2020 03:22:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012090322.0B93Mi7u050878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Dec 2020 03:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368480 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 368480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 03:22:45 -0000 Author: kevans Date: Wed Dec 9 03:22:44 2020 New Revision: 368480 URL: https://svnweb.freebsd.org/changeset/base/368480 Log: libsysdecode: decode _UMTX_OP flags Assume that UMTX_OP with a double underbar following is a flag, while any underbar+alphanumeric combination immeiately following is an op. This was a part of D27325. Reviewed by: kib Modified: head/lib/libsysdecode/flags.c head/lib/libsysdecode/mktables head/lib/libsysdecode/sysdecode.h Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Wed Dec 9 03:20:51 2020 (r368479) +++ head/lib/libsysdecode/flags.c Wed Dec 9 03:22:44 2020 (r368480) @@ -941,6 +941,20 @@ sysdecode_umtx_op(int op) return (lookup_value(umtxop, op)); } +bool +sysdecode_umtx_op_flags(FILE *fp, int op, int *rem) +{ + uintmax_t val; + bool printed; + + printed = false; + val = (unsigned)op; + print_mask_part(fp, umtxopflags, &val, &printed); + if (rem != NULL) + *rem = val; + return (printed); +} + const char * sysdecode_vmresult(int result) { Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Wed Dec 9 03:20:51 2020 (r368479) +++ head/lib/libsysdecode/mktables Wed Dec 9 03:22:44 2020 (r368480) @@ -145,7 +145,8 @@ gen_table "sockoptudp" "UDP_[[:alnum:]]+[[:space: gen_table "sockoptudplite" "UDPLITE_[[:alnum:]_]+[[:space:]]+[0-9]+" "netinet/udplite.h" gen_table "socktype" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" -gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" +gen_table "umtxop" "UMTX_OP_[[:alnum:]][[:alnum:]_]*[[:space:]]+[0-9]+" "sys/umtx.h" +gen_table "umtxopflags" "UMTX_OP__[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)[[:space:]]+0x[0-9]+\)" "vm/vm.h" gen_table "vmresult" "KERN_[A-Z_]+[[:space:]]+[0-9]+" "vm/vm_param.h" gen_table "wait6opt" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Wed Dec 9 03:20:51 2020 (r368479) +++ head/lib/libsysdecode/sysdecode.h Wed Dec 9 03:22:44 2020 (r368480) @@ -121,6 +121,7 @@ const char *sysdecode_sysarch_number(int _number); bool sysdecode_thr_create_flags(FILE *_fp, int _flags, int *_rem); bool sysdecode_umtx_cvwait_flags(FILE *_fp, u_long _flags, u_long *_rem); const char *sysdecode_umtx_op(int _op); +bool sysdecode_umtx_op_flags(FILE *_fp, int op, int *_rem); bool sysdecode_umtx_rwlock_flags(FILE *_fp, u_long _flags, u_long *_rem); int sysdecode_utrace(FILE *_fp, void *_buf, size_t _len); bool sysdecode_vmprot(FILE *_fp, int _type, int *_rem); From owner-svn-src-all@freebsd.org Wed Dec 9 03:24:09 2020 Return-Path: Delivered-To: svn-src-all@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 E337C4B5746; Wed, 9 Dec 2020 03:24:09 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrMpd64xqz3r4L; Wed, 9 Dec 2020 03:24:09 +0000 (UTC) (envelope-from kevans@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 C3CB01F9A4; Wed, 9 Dec 2020 03:24:09 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B93O9gZ050994; Wed, 9 Dec 2020 03:24:09 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B93O9JP050993; Wed, 9 Dec 2020 03:24:09 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012090324.0B93O9JP050993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Dec 2020 03:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368481 - in head/usr.bin: kdump truss X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.bin: kdump truss X-SVN-Commit-Revision: 368481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 03:24:09 -0000 Author: kevans Date: Wed Dec 9 03:24:09 2020 New Revision: 368481 URL: https://svnweb.freebsd.org/changeset/base/368481 Log: kdump/truss: decode new _umtx_op flags In both cases, print the flag bits first followed by the command. Output now looks something like this: (ktrace) _umtx_op(0x8605f7008,0xf,0,0,0) _umtx_op(0x9fffdce8,0x80000003,0x1,0,0) (truss) _umtx_op(0x7fffffffda50,UMTX_OP_WAKE,0x1,0x0,0x0) = 0 (0x0) _umtx_op(0x9fffdd08,UMTX_OP__32BIT|UMTX_OP_WAKE,0x1,0x0,0x0) = 0 (0x0) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D27325 Modified: head/usr.bin/kdump/kdump.c head/usr.bin/truss/syscalls.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Wed Dec 9 03:22:44 2020 (r368480) +++ head/usr.bin/kdump/kdump.c Wed Dec 9 03:24:09 2020 (r368481) @@ -254,14 +254,21 @@ print_integer_arg_valid(const char *(*decoder)(int), i } } +static bool +print_mask_arg_part(bool (*decoder)(FILE *, int, int *), int value, int *rem) +{ + + printf("%#x<", value); + return (decoder(stdout, value, rem)); +} + static void print_mask_arg(bool (*decoder)(FILE *, int, int *), int value) { bool invalid; int rem; - printf("%#x<", value); - invalid = !decoder(stdout, value, &rem); + invalid = !print_mask_arg_part(decoder, value, &rem); printf(">"); if (invalid) printf("%u", rem); @@ -1455,10 +1462,16 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) ip++; narg--; break; - case SYS__umtx_op: + case SYS__umtx_op: { + int op; + print_number(ip, narg, c); putchar(','); - print_integer_arg(sysdecode_umtx_op, *ip); + if (print_mask_arg_part(sysdecode_umtx_op_flags, + *ip, &op)) + putchar('|'); + print_integer_arg(sysdecode_umtx_op, op); + putchar('>'); switch (*ip) { case UMTX_OP_CV_WAIT: ip++; @@ -1478,6 +1491,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) ip++; narg--; break; + } case SYS_ftruncate: case SYS_truncate: print_number(ip, narg, c); Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Wed Dec 9 03:22:44 2020 (r368480) +++ head/usr.bin/truss/syscalls.c Wed Dec 9 03:24:09 2020 (r368481) @@ -888,12 +888,20 @@ print_integer_arg(const char *(*decoder)(int), FILE *f fprintf(fp, "%d", value); } +static bool +print_mask_arg_part(bool (*decoder)(FILE *, int, int *), FILE *fp, int value, + int *rem) +{ + + return (decoder(fp, value, rem)); +} + static void print_mask_arg(bool (*decoder)(FILE *, int, int *), FILE *fp, int value) { int rem; - if (!decoder(fp, value, &rem)) + if (!print_mask_arg_part(decoder, fp, value, &rem)) fprintf(fp, "0x%x", rem); else if (rem != 0) fprintf(fp, "|0x%x", rem); @@ -2303,9 +2311,15 @@ print_arg(struct syscall_args *sc, unsigned long *args case Procctl: print_integer_arg(sysdecode_procctl_cmd, fp, args[sc->offset]); break; - case Umtxop: - print_integer_arg(sysdecode_umtx_op, fp, args[sc->offset]); + case Umtxop: { + int rem; + + if (print_mask_arg_part(sysdecode_umtx_op_flags, fp, + args[sc->offset], &rem)) + fprintf(fp, "|"); + print_integer_arg(sysdecode_umtx_op, fp, rem); break; + } case Atfd: print_integer_arg(sysdecode_atfd, fp, args[sc->offset]); break; From owner-svn-src-all@freebsd.org Wed Dec 9 05:12:04 2020 Return-Path: Delivered-To: svn-src-all@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 C44704B7032; Wed, 9 Dec 2020 05:12:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrQC85F1Tz3w1N; Wed, 9 Dec 2020 05:12:04 +0000 (UTC) (envelope-from kevans@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 A6D4820977; Wed, 9 Dec 2020 05:12:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B95C4mT019020; Wed, 9 Dec 2020 05:12:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B95C4tR019019; Wed, 9 Dec 2020 05:12:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012090512.0B95C4tR019019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Dec 2020 05:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368482 - head/usr.bin/grep/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep/tests X-SVN-Commit-Revision: 368482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 05:12:04 -0000 Author: kevans Date: Wed Dec 9 05:12:04 2020 New Revision: 368482 URL: https://svnweb.freebsd.org/changeset/base/368482 Log: grep: tests: stop expecting a failure of gnuext w/ bsdgrep libregex now supports these and we no longer offer to not link against libregex. Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh ============================================================================== --- head/usr.bin/grep/tests/grep_freebsd_test.sh Wed Dec 9 03:24:09 2020 (r368481) +++ head/usr.bin/grep/tests/grep_freebsd_test.sh Wed Dec 9 05:12:04 2020 (r368482) @@ -87,9 +87,7 @@ gnuext_body() { grep_type _type=$? - if [ $_type -eq $GREP_TYPE_BSD ]; then - atf_expect_fail "this test requires GNU extensions in regex(3)" - elif [ $_type -eq $GREP_TYPE_GNU_FREEBSD ]; then + if [ $_type -eq $GREP_TYPE_GNU_FREEBSD ]; then atf_expect_fail "\\s and \\S are known to be buggy in base gnugrep" fi From owner-svn-src-all@freebsd.org Wed Dec 9 05:27:46 2020 Return-Path: Delivered-To: svn-src-all@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 82D234B6DF2; Wed, 9 Dec 2020 05:27:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrQYG3HvBz4RF8; Wed, 9 Dec 2020 05:27:46 +0000 (UTC) (envelope-from kevans@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 63C6D212E1; Wed, 9 Dec 2020 05:27:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B95RkWV026542; Wed, 9 Dec 2020 05:27:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B95Rj5M026539; Wed, 9 Dec 2020 05:27:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012090527.0B95Rj5M026539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Dec 2020 05:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368483 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 368483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 05:27:46 -0000 Author: kevans Date: Wed Dec 9 05:27:45 2020 New Revision: 368483 URL: https://svnweb.freebsd.org/changeset/base/368483 Log: grep: replace the internal queue with a ring buffer We know up front how many items we can have in the queue (-B/Bflag), so pay the cost of those particular allocations early on. The reduced queue maintenance overhead seemed to yield about an ~8% improvement for my earlier `grep -C8 -r closefrom .` test. MFC after: 2 weeks Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Wed Dec 9 05:12:04 2020 (r368482) +++ head/usr.bin/grep/grep.c Wed Dec 9 05:27:45 2020 (r368483) @@ -707,6 +707,8 @@ main(int argc, char *argv[]) if ((aargc == 0 || aargc == 1) && !Hflag) hflag = true; + initqueue(); + if (aargc == 0 && dirbehave != DIR_RECURSE) exit(!procfile("-")); Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Wed Dec 9 05:12:04 2020 (r368482) +++ head/usr.bin/grep/grep.h Wed Dec 9 05:27:45 2020 (r368483) @@ -149,6 +149,7 @@ char *grep_strdup(const char *str); void grep_printline(struct str *line, int sep); /* queue.c */ +void initqueue(void); bool enqueue(struct str *x); void printqueue(void); void clearqueue(void); Modified: head/usr.bin/grep/queue.c ============================================================================== --- head/usr.bin/grep/queue.c Wed Dec 9 05:12:04 2020 (r368482) +++ head/usr.bin/grep/queue.c Wed Dec 9 05:27:45 2020 (r368483) @@ -6,6 +6,7 @@ * * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * All rights reserved. + * Copyright (c) 2020 Kyle Evans * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,77 +46,99 @@ __FBSDID("$FreeBSD$"); #include "grep.h" -struct qentry { - STAILQ_ENTRY(qentry) list; - struct str data; -}; +typedef struct str qentry_t; -static STAILQ_HEAD(, qentry) queue = STAILQ_HEAD_INITIALIZER(queue); -static long long count; +static long long filled; +static qentry_t *qend, *qpool; -static struct qentry *dequeue(void); - /* - * Enqueue another line; return true if we've dequeued a line as a result + * qnext is the next entry to populate. qlist is where the list actually + * starts, for the purposes of printing. */ -bool -enqueue(struct str *x) +static qentry_t *qlist, *qnext; + +void +initqueue(void) { - struct qentry *item; - item = grep_malloc(sizeof(struct qentry)); - item->data.dat = grep_malloc(sizeof(char) * x->len); - item->data.len = x->len; - item->data.line_no = x->line_no; - item->data.boff = x->boff; - item->data.off = x->off; - memcpy(item->data.dat, x->dat, x->len); - item->data.file = x->file; + qlist = qnext = qpool = grep_calloc(Bflag, sizeof(*qpool)); + qend = qpool + (Bflag - 1); +} - STAILQ_INSERT_TAIL(&queue, item, list); +static qentry_t * +advqueue(qentry_t *itemp) +{ - if (++count > Bflag) { - item = dequeue(); - free(item->data.dat); - free(item); - return (true); - } - return (false); + if (itemp == qend) + return (qpool); + return (itemp + 1); } -static struct qentry * -dequeue(void) +/* + * Enqueue another line; return true if we've dequeued a line as a result + */ +bool +enqueue(struct str *x) { - struct qentry *item; + qentry_t *item; + bool rotated; - item = STAILQ_FIRST(&queue); - if (item == NULL) - return (NULL); + item = qnext; + qnext = advqueue(qnext); + rotated = false; - STAILQ_REMOVE_HEAD(&queue, list); - --count; - return (item); + if (filled < Bflag) { + filled++; + } else if (filled == Bflag) { + /* We had already filled up coming in; just rotate. */ + qlist = advqueue(qlist); + rotated = true; + free(item->dat); + } + item->dat = grep_malloc(sizeof(char) * x->len); + item->len = x->len; + item->line_no = x->line_no; + item->boff = x->boff; + item->off = x->off; + memcpy(item->dat, x->dat, x->len); + item->file = x->file; + + return (rotated); } void printqueue(void) { - struct qentry *item; + qentry_t *item; - while ((item = dequeue()) != NULL) { - grep_printline(&item->data, '-'); - free(item->data.dat); - free(item); - } + item = qlist; + do { + /* Buffer must have ended early. */ + if (item->dat == NULL) + break; + + grep_printline(item, '-'); + free(item->dat); + item->dat = NULL; + item = advqueue(item); + } while (item != qlist); + + qlist = qnext = qpool; + filled = 0; } void clearqueue(void) { - struct qentry *item; + qentry_t *item; - while ((item = dequeue()) != NULL) { - free(item->data.dat); - free(item); - } + item = qlist; + do { + free(item->dat); + item->dat = NULL; + item = advqueue(item); + } while (item != qlist); + + qlist = qnext = qpool; + filled = 0; } From owner-svn-src-all@freebsd.org Wed Dec 9 13:26:57 2020 Return-Path: Delivered-To: svn-src-all@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 AB8D247CD81 for ; Wed, 9 Dec 2020 13:26:57 +0000 (UTC) (envelope-from jodie.yorke@eventsprobrite.com) Received: from IND01-BO1-obe.outbound.protection.outlook.com (mail-eopbgr1390047.outbound.protection.outlook.com [40.107.139.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrdB84Hzyz4thf for ; Wed, 9 Dec 2020 13:26:56 +0000 (UTC) (envelope-from jodie.yorke@eventsprobrite.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lhZzjOBnoArFtgL51fUrWYrz5lyOUqOJ9l25o+3hioumOpG+ANYYG4XsLt8aIlx3B8UIkbYB3gZSEbkQQszlnjBcR5HRLtRPj5yMnyd7eEbeIVYClyNjXZjV90fL2ghvbv7GF2kYsw96cw9v1jsnJP5KQ3hja5oUiS7wFn4NyP87pdeOZmHrLAjpGMH3DKubEZJgn9ygMCz/o/YX2Ubyq1O+2wtzVbt9FAj1HgFcyfoWPo+YSAawhlQgWjW16P4qYs5QaVEfrPs7HX0yLYpXRbmlLdXcACfj4M8+gyvQL1bx1zWaloPeCPhvphyISQqC2aWbdxSzQa9o3mmbN1s2kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UlhtZhEYK9+35nCnKlQsPkwLcJ3mmkCkviUWPB702qY=; b=IXWhrJIXQdZZugU2Uw5XzD9obaZ9yXO594XFXhWNgOohxiQrjNem5q1N2NG5BOfqJLzuczZ8OaVpEkWg5owJfr8dEaVS2nWIm6ad98jxerms6YUwky165oPTFbsYUq3QsQ+POP8FsY25x4W0YV3FT2vq2Vja6jzROl7OkcBfpM+KRXvFGaGvvxWtfjhmuMRbIKFtVlHMZpbCcSRmZdllH4IkKOtMV6yugWJONcSF6e8syS0eJai9tq+yaG+YGy5OMGJfRMeO22cs8Q6MwMNXK/msJmB4IDrcfZjeXf4LU9tFmnRl8bcpZj8ZlTPItNe6NJBSP9BmVBQGwKEaJTAZUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eventsprobrite.com; dmarc=pass action=none header.from=eventsprobrite.com; dkim=pass header.d=eventsprobrite.com; arc=none Received: from BM1PR01MB0706.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:2::17) by BM1PR01MB2785.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:4b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.19; Wed, 9 Dec 2020 13:26:52 +0000 Received: from BM1PR01MB0706.INDPRD01.PROD.OUTLOOK.COM ([fe80::d945:cded:247c:b40d]) by BM1PR01MB0706.INDPRD01.PROD.OUTLOOK.COM ([fe80::d945:cded:247c:b40d%6]) with mapi id 15.20.3632.024; Wed, 9 Dec 2020 13:26:52 +0000 From: Jodie Yorke To: "svn-src-all@freebsd.org" Subject: Freebsd Thread-Topic: Freebsd Thread-Index: AdbOLuyOk7hwELHyRBaoo6htyNilsQ== Date: Wed, 9 Dec 2020 13:26:52 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [143.244.51.174] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 31ddf136-f24d-48b3-4dfb-08d89c46170d x-ms-traffictypediagnostic: BM1PR01MB2785: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vECdVkMoTfmZRgCSCHjECYxXm9U2Pe4FQfH80mrFqWY3/YWyk+rsko0tj50NeprMATMC/zBX6qctBJf5LgppiOcJ6lg2CDY5O50lVgNYe6i1R+iAxsf+BpcW1MtUjhYYHr/NR2o0FUQlQ5C/TdA+4oy8/mB0DHI9bLte3zMFxJFT3qcgdNCm/x7uWg9LFOoVrijJcRX1PovrQBGW1OUWCeN2BzVSZGY8QkP8xePP5K1oQkYDdTqjeOVRdPSIU8k6Dqmo/UPbaxxRTNTxzjXyhQhUXJQTOBrKQYTrrD4KMUjddEWdv09hVqTd1i+5zJMqUbxADDlxHePEj8ow+Vwq6g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BM1PR01MB0706.INDPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(346002)(136003)(366004)(376002)(34096005)(3480700007)(64756008)(4744005)(83380400001)(186003)(6506007)(316002)(26005)(66476007)(71200400001)(55016002)(66556008)(7696005)(33656002)(44832011)(478600001)(86362001)(66446008)(76116006)(8676002)(2906002)(5660300002)(66946007)(8936002)(6916009)(7116003)(9686003)(9326002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Ow7bDUMrTykKiZgL2zYcBDslNtTQwXDOgJr8YeEcvHDlcDuAmV6gkNM44mev?= =?us-ascii?Q?vQTN0B2NJTZrotMVyenlUmtYG5JL8mhShxisO4gmJ8uIiq/68FsfUuu8N+aj?= =?us-ascii?Q?7qy/R8hpEuCL9+zl/VhgINiN5UpXPJ4zTfBz/KWPNALjbFiy9Oxu074Igt+j?= =?us-ascii?Q?/XEsrfuWCMteEkiKdBq+imDe3y6/0OeEkRG/JRiDuyck3KGS7aYc5q2mzvye?= =?us-ascii?Q?zGNLR8wdLiWCSSgSdAULFVznKdg14ZLE0xrADvkjTD6tVtru6PdBXc6ZOmuw?= =?us-ascii?Q?8z7WtryUVo1InZUDoTfJdbL61BNpIYARmLhYhgtA9FXX5eA+plLkfQWhEc5p?= =?us-ascii?Q?1SB6us0jFikD7zXXNL6L8L2/xMypDpibYsQ718Mh3wemuBqIz6TvrMrEbvni?= =?us-ascii?Q?C6vbPO76QfqKSV/6fnpL6e97Hr2n5YZJWaMVnfEi8xvRol8FzYABK8429T4I?= =?us-ascii?Q?kTlGDtqLzsbxCoBpGf07zugNBYUayrvfLW/pO6BziHy8AaZdoKTO7GkKV0M7?= =?us-ascii?Q?7GtYsIm3w1mTZSqj8XT9yBFARs4NmdiCb2aBVUC0ITRsKDz8w5lNREJzPKyl?= =?us-ascii?Q?gB8upKNDgljA8SZigzvOx9NhiNcDbjOupn6AL1wz4HCwIpeB6tuHlJGLRsme?= =?us-ascii?Q?g8g41IROhk2mqulfppaoO6DEbMMYkvUQQEOTz3eW0xbwwUAt23dby5W0Wxtq?= =?us-ascii?Q?bb556GMInt0T27N5gBZ2hcpSzmk3LLMced6AfRPoxVfwdISrsrfisx/mAJco?= =?us-ascii?Q?lxJSZs34/D6baNa7zR6T38e4Q5RfyL8a8qDYVUTKwdjVyeaSZeBZC6kUzJ1u?= =?us-ascii?Q?/ZyU7KG0DSjIhyNXcomZw42AvObFZfmEnre4X+AodAlDylVztiaaPmRuXGnL?= =?us-ascii?Q?khq1mIG7a1f+bDYvr1c21000ldaT0e533ZTSG6hdxazyH8wCe/Na+KleP7OA?= =?us-ascii?Q?MMVqWdHmaE7XIL6butYjONa+TVjKsEA+krlEn3aFfqo=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: eventsprobrite.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BM1PR01MB0706.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 31ddf136-f24d-48b3-4dfb-08d89c46170d X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Dec 2020 13:26:52.0397 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0c6de0fa-785b-47d3-bc65-165d7ddfd125 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qUxrfYUmE+bPHOy4Oq+IA8mKtX5siynt4IcUco/wOrrclBvhTvbiXOYnvsKpF3r8r/x4NO4CMZnfBofr5Ku4NKmwjBVB9kQK68hdwoUydaU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BM1PR01MB2785 X-Rspamd-Queue-Id: 4CrdB84Hzyz4thf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; arc=pass (microsoft.com:s=arcselector9901:i=1); dmarc=none; spf=pass (mx1.freebsd.org: domain of jodie.yorke@eventsprobrite.com designates 40.107.139.47 as permitted sender) smtp.mailfrom=jodie.yorke@eventsprobrite.com X-Spamd-Result: default: False [-4.26 / 15.00]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[40.107.139.47:from]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[eventsprobrite.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[40.107.139.47:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.961]; RCVD_IN_DNSWL_NONE(0.00)[40.107.139.47:from]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; MAILMAN_DEST(0.00)[svn-src-all]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.107.139.47:from] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 13:26:57 -0000 Hi, I am following up to confirm if you are interested in acquiring the Visitor= s/Registrants List. Usenix Security Symposium 2020 Aug 12, 2020 (Postponed) Boston, United States Registrants Counts: 3,100 Each record of the list contains: Contact Name, Email Address, Company Name= , URL/Website, Phone No, Title/Designation. Currently the best way to grow your business is through digital. This list = will help you pass information about your organization and products directl= y and digitally to the buyer. This list will help you to acquire many poten= tial clients/leads. If you are interested in acquiring the list, we can provide you the cost an= d additional details. I look forward to hearing from you. Thanks & Regards, Jodie Yorke Business Analyst If you don't want to hear from me again Please unsub From owner-svn-src-all@freebsd.org Wed Dec 9 14:04:55 2020 Return-Path: Delivered-To: svn-src-all@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 2526C47DE9A; Wed, 9 Dec 2020 14:04:55 +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 4Crf1z0Ynnz3D7V; Wed, 9 Dec 2020 14:04:55 +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 01776274C2; Wed, 9 Dec 2020 14:04:55 +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 0B9E4s3d050511; Wed, 9 Dec 2020 14:04:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9E4sTq050510; Wed, 9 Dec 2020 14:04:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012091404.0B9E4sTq050510@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 14:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368485 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 14:04:55 -0000 Author: markj Date: Wed Dec 9 14:04:54 2020 New Revision: 368485 URL: https://svnweb.freebsd.org/changeset/base/368485 Log: Use refcount_load(9) to load fd table reference counts No functional change intended. Reviewed by: kib, mjg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27512 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Dec 9 09:53:21 2020 (r368484) +++ head/sys/kern/kern_descrip.c Wed Dec 9 14:04:54 2020 (r368485) @@ -1830,7 +1830,8 @@ fdgrowtable(struct filedesc *fdp, int nfd) * which must not be freed. */ if (onfiles > NDFILE) { - if (curproc->p_numthreads == 1 && fdp->fd_refcnt == 1) + if (curproc->p_numthreads == 1 && + refcount_load(&fdp->fd_refcnt) == 1) free(otable, M_FILEDESC); else { ft = (struct freetable *)&otable->fdt_ofiles[onfiles]; @@ -2160,7 +2161,7 @@ static void fddrop(struct filedesc *fdp) { - if (fdp->fd_holdcnt > 1) { + if (refcount_load(&fdp->fd_holdcnt) > 1) { if (refcount_release(&fdp->fd_holdcnt) == 0) return; } @@ -2221,7 +2222,7 @@ fdunshare(struct thread *td) struct filedesc *tmp; struct proc *p = td->td_proc; - if (p->p_fd->fd_refcnt == 1) + if (refcount_load(&p->p_fd->fd_refcnt) == 1) return; tmp = fdcopy(p->p_fd); @@ -2570,7 +2571,8 @@ fdsetugidsafety(struct thread *td) int i; fdp = td->td_proc->p_fd; - KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); + KASSERT(refcount_load(&fdp->fd_refcnt) == 1, + ("the fdtable should not be shared")); MPASS(fdp->fd_nfiles >= 3); for (i = 0; i <= 2; i++) { fp = fdp->fd_ofiles[i].fde_file; @@ -2621,7 +2623,8 @@ fdcloseexec(struct thread *td) int i, lastfile; fdp = td->td_proc->p_fd; - KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); + KASSERT(refcount_load(&fdp->fd_refcnt) == 1, + ("the fdtable should not be shared")); lastfile = fdlastfile_single(fdp); for (i = 0; i <= lastfile; i++) { fde = &fdp->fd_ofiles[i]; @@ -2651,7 +2654,8 @@ fdcheckstd(struct thread *td) int i, error, devnull; fdp = td->td_proc->p_fd; - KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared")); + KASSERT(refcount_load(&fdp->fd_refcnt) == 1, + ("the fdtable should not be shared")); MPASS(fdp->fd_nfiles >= 3); devnull = -1; for (i = 0; i <= 2; i++) { @@ -3974,7 +3978,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) continue; FILEDESC_SLOCK(fdp); lastfile = fdlastfile(fdp); - for (n = 0; fdp->fd_refcnt > 0 && n <= lastfile; ++n) { + for (n = 0; refcount_load(&fdp->fd_refcnt) > 0 && n <= lastfile; + n++) { if ((fp = fdp->fd_ofiles[n].fde_file) == NULL) continue; xf.xf_fd = n; @@ -4245,7 +4250,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s pwd_drop(pwd); FILEDESC_SLOCK(fdp); lastfile = fdlastfile(fdp); - for (i = 0; fdp->fd_refcnt > 0 && i <= lastfile; i++) { + for (i = 0; refcount_load(&fdp->fd_refcnt) > 0 && i <= lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; #ifdef CAPABILITIES @@ -4400,7 +4405,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) pwd_drop(pwd); FILEDESC_SLOCK(fdp); lastfile = fdlastfile(fdp); - for (i = 0; fdp->fd_refcnt > 0 && i <= lastfile; i++) { + for (i = 0; refcount_load(&fdp->fd_refcnt) > 0 && i <= lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; export_file_to_kinfo(fp, i, NULL, kif, fdp, From owner-svn-src-all@freebsd.org Wed Dec 9 14:05:09 2020 Return-Path: Delivered-To: svn-src-all@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 3EEB947DE1C; Wed, 9 Dec 2020 14:05:09 +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 4Crf2F1Lmbz3CwJ; Wed, 9 Dec 2020 14:05:09 +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 158B027847; Wed, 9 Dec 2020 14:05:09 +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 0B9E58es050583; Wed, 9 Dec 2020 14:05:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9E58Yq050582; Wed, 9 Dec 2020 14:05:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012091405.0B9E58Yq050582@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 14:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368486 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 14:05:09 -0000 Author: markj Date: Wed Dec 9 14:05:08 2020 New Revision: 368486 URL: https://svnweb.freebsd.org/changeset/base/368486 Log: Plug a race between fd table teardown and several loops To export information from fd tables we have several loops which do this: FILDESC_SLOCK(fdp); for (i = 0; fdp->fd_refcount > 0 && i <= lastfile; i++) ; FILDESC_SUNLOCK(fdp); Before r367777, fdescfree() acquired the fd table exclusive lock between decrementing fdp->fd_refcount and freeing table entries. This serialized with the loop above, so the file at descriptor i would remain valid until the lock is dropped. Now there is no serialization, so the loops may race with teardown of file descriptor tables. Acquire the exclusive fdtable lock after releasing the final table reference to provide a barrier synchronizing with these loops. Reported by: pho Reviewed by: kib (previous version), mjg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27513 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Dec 9 14:04:54 2020 (r368485) +++ head/sys/kern/kern_descrip.c Wed Dec 9 14:05:08 2020 (r368486) @@ -2463,6 +2463,13 @@ fdescfree_fds(struct thread *td, struct filedesc *fdp, struct file *fp; int i, lastfile; + KASSERT(refcount_load(&fdp->fd_refcnt) == 0, + ("%s: fd table %p carries references", __func__, fdp)); + + /* Serialize with threads iterating over the table. */ + FILEDESC_XLOCK(fdp); + FILEDESC_XUNLOCK(fdp); + lastfile = fdlastfile_single(fdp); for (i = 0; i <= lastfile; i++) { fde = &fdp->fd_ofiles[i]; @@ -2536,6 +2543,11 @@ pdescfree(struct thread *td) void fdescfree_remapped(struct filedesc *fdp) { +#ifdef INVARIANTS + /* fdescfree_fds() asserts that fd_refcnt == 0. */ + if (!refcount_release(&fdp->fd_refcnt)) + panic("%s: fd table %p has extra references", __func__, fdp); +#endif fdescfree_fds(curthread, fdp, 0); } From owner-svn-src-all@freebsd.org Wed Dec 9 15:28:56 2020 Return-Path: Delivered-To: svn-src-all@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 C766947FD70; Wed, 9 Dec 2020 15:28:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Crgtw4ytRz3JKF; Wed, 9 Dec 2020 15:28:56 +0000 (UTC) (envelope-from kevans@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 9D599635; Wed, 9 Dec 2020 15:28:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B9FSu56000327; Wed, 9 Dec 2020 15:28:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9FSuS0000326; Wed, 9 Dec 2020 15:28:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012091528.0B9FSuS0000326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 9 Dec 2020 15:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368487 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 368487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 15:28:56 -0000 Author: kevans Date: Wed Dec 9 15:28:56 2020 New Revision: 368487 URL: https://svnweb.freebsd.org/changeset/base/368487 Log: netgraph: macfilter: small fixes Two issues: - The DEBUG macro defined is in direct conflict with the DEBUG kernel option, which broke the -LINT build[0] - Building with NG_MACFILTER_DEBUG did not compile on LP64 systems due to using %d for sizeof(). Reported by: Jenkins[0] Modified: head/sys/netgraph/ng_macfilter.c Modified: head/sys/netgraph/ng_macfilter.c ============================================================================== --- head/sys/netgraph/ng_macfilter.c Wed Dec 9 14:05:08 2020 (r368486) +++ head/sys/netgraph/ng_macfilter.c Wed Dec 9 15:28:56 2020 (r368487) @@ -76,9 +76,9 @@ MALLOC_DEFINE(M_NETGRAPH_MACFILTER, "netgraph_macfilte #define MACTABLE_BLOCKSIZE 128 /* block size for incrementing table */ #ifdef NG_MACFILTER_DEBUG -#define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__) +#define MACFILTER_DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__) #else -#define DEBUG(fmt, ...) +#define MACFILTER_DEBUG(fmt, ...) #endif #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" #define MAC_S_ARGS(v) (v)[0], (v)[1], (v)[2], (v)[3], (v)[4], (v)[5] @@ -148,7 +148,7 @@ macfilter_get_upper_hook_count(const struct ng_parse_t const struct ngm_macfilter_hooks *const ngm_hooks = (const struct ngm_macfilter_hooks *)(buf - OFFSETOF(struct ngm_macfilter_hooks, hooks)); - DEBUG("buf %p, ngm_hooks %p, n %d", buf, ngm_hooks, ngm_hooks->n); + MACFILTER_DEBUG("buf %p, ngm_hooks %p, n %d", buf, ngm_hooks, ngm_hooks->n); return ngm_hooks->n; } @@ -294,7 +294,7 @@ macfilter_mactable_resize(macfilter_p mfp) n = mfp->mf_mac_allocated + MACTABLE_BLOCKSIZE; if (n != mfp->mf_mac_allocated) { - DEBUG("used=%d allocated=%d->%d", + MACFILTER_DEBUG("used=%d allocated=%d->%d", mfp->mf_mac_used, mfp->mf_mac_allocated, n); mf_mac_p mfp_new = realloc(mfp->mf_macs, @@ -410,7 +410,7 @@ macfilter_mactable_change(macfilter_p mfp, u_char *eth mf_mac_p mf_macs = mfp->mf_macs; - DEBUG("ether=" MAC_FMT " found=%d i=%d ether=" MAC_FMT " hookid=%d->%d used=%d allocated=%d", + MACFILTER_DEBUG("ether=" MAC_FMT " found=%d i=%d ether=" MAC_FMT " hookid=%d->%d used=%d allocated=%d", MAC_S_ARGS(ether), found, i, MAC_S_ARGS(mf_macs[i].ether), (found? mf_macs[i].hookid:NG_MACFILTER_HOOK_DEFAULT_ID), hookid, mfp->mf_mac_used, mfp->mf_mac_allocated); @@ -493,7 +493,7 @@ macfilter_find_hook(macfilter_p mfp, const char *hookn static int macfilter_direct(macfilter_p mfp, struct ngm_macfilter_direct *md) { - DEBUG("ether=" MAC_FMT " hook=%s", + MACFILTER_DEBUG("ether=" MAC_FMT " hook=%s", MAC_S_ARGS(md->ether), md->hookname); int hookid = macfilter_find_hook(mfp, md->hookname); @@ -506,7 +506,7 @@ macfilter_direct(macfilter_p mfp, struct ngm_macfilter static int macfilter_direct_hookid(macfilter_p mfp, struct ngm_macfilter_direct_hookid *mdi) { - DEBUG("ether=" MAC_FMT " hookid=%d", + MACFILTER_DEBUG("ether=" MAC_FMT " hookid=%d", MAC_S_ARGS(mdi->ether), mdi->hookid); if (mdi->hookid >= mfp->mf_upper_cnt) @@ -545,13 +545,13 @@ macfilter_ether_output(hook_p hook, macfilter_p mfp, s mf_macs[i].bytes_out += m->m_len - ETHER_HDR_LEN; #ifdef NG_MACFILTER_DEBUG_RECVDATA - DEBUG("ether=" MAC_FMT " len=%db->%lldb: bytes: %s -> %s", + MACFILTER_DEBUG("ether=" MAC_FMT " len=%db->%lldb: bytes: %s -> %s", MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, mf_macs[i].bytes_out, NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); #endif } else { #ifdef NG_MACFILTER_DEBUG_RECVDATA - DEBUG("ether=" MAC_FMT " len=%db->?b: bytes: %s->%s", + MACFILTER_DEBUG("ether=" MAC_FMT " len=%db->?b: bytes: %s->%s", MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); #endif @@ -587,13 +587,13 @@ macfilter_ether_input(hook_p hook, macfilter_p mfp, st hookid = mf_macs[i].hookid; #ifdef NG_MACFILTER_DEBUG_RECVDATA - DEBUG("ether=" MAC_FMT " len=%db->%lldb: bytes: %s->%s", + MACFILTER_DEBUG("ether=" MAC_FMT " len=%db->%lldb: bytes: %s->%s", MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, mf_macs[i].bytes_in, NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); #endif } else { #ifdef NG_MACFILTER_DEBUG_RECVDATA - DEBUG("ether=" MAC_FMT " len=%db->?b: bytes: %s->%s", + MACFILTER_DEBUG("ether=" MAC_FMT " len=%db->?b: bytes: %s->%s", MAC_S_ARGS(ether), m->m_len - ETHER_HDR_LEN, NG_HOOK_NAME(hook), NG_HOOK_NAME(*next_hook)); #endif @@ -642,7 +642,7 @@ ng_macfilter_newhook(node_p node, hook_p hook, const c { const macfilter_p mfp = NG_NODE_PRIVATE(node); - DEBUG("%s", hookname); + MACFILTER_DEBUG("%s", hookname); if (strcmp(hookname, NG_MACFILTER_HOOK_ETHER) == 0) { mfp->mf_ether_hook = hook; @@ -657,7 +657,7 @@ ng_macfilter_newhook(node_p node, hook_p hook, const c } if (hookid >= mfp->mf_upper_cnt) { - DEBUG("upper cnt %d -> %d", mfp->mf_upper_cnt, hookid + 1); + MACFILTER_DEBUG("upper cnt %d -> %d", mfp->mf_upper_cnt, hookid + 1); mfp->mf_upper_cnt = hookid + 1; mfp->mf_upper = realloc(mfp->mf_upper, @@ -700,7 +700,7 @@ ng_macfilter_rcvmsg(node_p node, item_p item, hook_p l case NGM_MACFILTER_DIRECT: if (msg->header.arglen != sizeof(struct ngm_macfilter_direct)) { - DEBUG("direct: wrong type length (%d, expected %d)", + MACFILTER_DEBUG("direct: wrong type length (%d, expected %zu)", msg->header.arglen, sizeof(struct ngm_macfilter_direct)); error = EINVAL; break; @@ -710,7 +710,7 @@ ng_macfilter_rcvmsg(node_p node, item_p item, hook_p l break; case NGM_MACFILTER_DIRECT_HOOKID: if (msg->header.arglen != sizeof(struct ngm_macfilter_direct_hookid)) { - DEBUG("direct hookid: wrong type length (%d, expected %d)", + MACFILTER_DEBUG("direct hookid: wrong type length (%d, expected %zu)", msg->header.arglen, sizeof(struct ngm_macfilter_direct)); error = EINVAL; break; @@ -793,7 +793,7 @@ ng_macfilter_rcvdata(hook_p hook, item_p item) struct mbuf *m; m = NGI_M(item); /* 'item' still owns it. We are peeking */ - DEBUG("%s", NG_HOOK_NAME(hook)); + MACFILTER_DEBUG("%s", NG_HOOK_NAME(hook)); if (hook == mfp->mf_ether_hook) error = macfilter_ether_input(hook, mfp, m, &next_hook); @@ -820,7 +820,7 @@ ng_macfilter_disconnect(hook_p hook) if (mfp->mf_ether_hook == hook) { mfp->mf_ether_hook = NULL; - DEBUG("%s", NG_HOOK_NAME(hook)); + MACFILTER_DEBUG("%s", NG_HOOK_NAME(hook)); } else { int hookid; @@ -833,7 +833,7 @@ ng_macfilter_disconnect(hook_p hook) #else int cnt = macfilter_mactable_remove_by_hookid(mfp, hookid); - DEBUG("%s: removed %d MACs", NG_HOOK_NAME(hook), cnt); + MACFILTER_DEBUG("%s: removed %d MACs", NG_HOOK_NAME(hook), cnt); #endif break; } @@ -844,7 +844,7 @@ ng_macfilter_disconnect(hook_p hook) for (--hookid; hookid >= 0 && mfp->mf_upper[hookid] == NULL; hookid--) ; - DEBUG("upper cnt %d -> %d", mfp->mf_upper_cnt, hookid + 1); + MACFILTER_DEBUG("upper cnt %d -> %d", mfp->mf_upper_cnt, hookid + 1); mfp->mf_upper_cnt = hookid + 1; mfp->mf_upper = realloc(mfp->mf_upper, sizeof(mfp->mf_upper[0])*mfp->mf_upper_cnt, From owner-svn-src-all@freebsd.org Wed Dec 9 15:47:35 2020 Return-Path: Delivered-To: svn-src-all@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 72F934A8B33 for ; Wed, 9 Dec 2020 15:47:35 +0000 (UTC) (envelope-from 3I_DQXw0JC0ws9szC1xoB21EFu0owz.q20691-65q-ozzt5ssp6r.25u@trix.bounces.google.com) Received: from mail-qt1-x848.google.com (mail-qt1-x848.google.com [IPv6:2607:f8b0:4864:20::848]) (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 4CrhJQ4V8Pz3KKN for ; Wed, 9 Dec 2020 15:47:34 +0000 (UTC) (envelope-from 3I_DQXw0JC0ws9szC1xoB21EFu0owz.q20691-65q-ozzt5ssp6r.25u@trix.bounces.google.com) Received: by mail-qt1-x848.google.com with SMTP id f33so1493317qtb.1 for ; Wed, 09 Dec 2020 07:47:34 -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=0uOvvTOl/iczYgiGe3+4OjFo3iAM4dSelxPAn5lBElw=; b=CrS5qHJVAAbxSSL3eZfmT+8DuVrwdIWrFaj4x2CWqA7Jss51EDgXSIWNoJjbSaZfYR hxV16Ce60enHKOZhh5Hd046lEc18X60rWlEdEyh2Vzgk5r0UOouvLFJYrWWhd4lwOy9X MFZ3CbHM6BqUywXpTQAgy21W13Iv53mFJG5WvLNW3Ra13KavSNgtiIXVhIr3Sy9tmH1Y 9vI7ezIj4OdMTuqoByf2OUREEOT22VuHRqADHa/78FzrwxXfAy0LpvmtcEpFLd3shXR6 Mfx8J4DFTdg/THmoXIDFprdevvDB87+HwRmCDBswOKodlQ/Of0VKiCtY7i+hkRxJ21kD zBnA== 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=0uOvvTOl/iczYgiGe3+4OjFo3iAM4dSelxPAn5lBElw=; b=dVzVl8G1fRwV6hjY7Xb2peE2BPF71qvN4Embkp94/1/2u2CkIZhfXW+XUpsIzUxVkG KRtFkrE7qzUdgy4G5IgJafTkdyMtvrL/hwnL0aQxFr6e+DPvrjADy5NFboOt3D7Ln3hh PyQxH08N28hs55fkQmzsY1kD4A7nPnAG2kFMbHDXIKYLzAjtUyO1zrV5IKdUmrKXlzWJ 773LN6oxvo+rCfAjQ5AXVCi94XAaUZAjQ2aw3wb58gB39+E0xngu6PSqZS6L0W0myfja CFUODRDwld14ZlytouZHyOWKVFRpUHL4fGumfawBRrFS9rQQjA5WHCtjsriENJ92NGjL FIVA== X-Gm-Message-State: AOAM532pMtHIIbqxWKpIBzwCgK0HkUOKnd71paF++ioRIxO31Ru/TG2Q dcp0tiE89AweczbC/AHoXpBa7gihiMUmpaFdIEHI MIME-Version: 1.0 X-Received: by 2002:ac8:44cb:: with SMTP id b11mt3956402qto.60.1607528483572; Wed, 09 Dec 2020 07:41:23 -0800 (PST) Reply-To: evelynjaxon01@gmail.com X-No-Auto-Attachment: 1 Message-ID: <0000000000003ae1d905b609e4ca@google.com> Date: Wed, 09 Dec 2020 15:47:33 +0000 Subject: Donation From Mrs. Evelyn From: evelynjaxon01@gmail.com To: svn-src-all@freebsd.org X-Rspamd-Queue-Id: 4CrhJQ4V8Pz3KKN X-Spamd-Bar: ++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=CrS5qHJV; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of 3I_DQXw0JC0ws9szC1xoB21EFu0owz.q20691-65q-ozzt5ssp6r.25u@trix.bounces.google.com designates 2607:f8b0:4864:20::848 as permitted sender) smtp.mailfrom=3I_DQXw0JC0ws9szC1xoB21EFu0owz.q20691-65q-ozzt5ssp6r.25u@trix.bounces.google.com X-Spamd-Result: default: False [10.80 / 15.00]; HAS_REPLYTO(0.00)[evelynjaxon01@gmail.com]; MSBL_EBL(7.50)[evelynjaxon9@gmail.com:email]; GREYLIST(0.00)[pass,meta]; R_SPF_ALLOW(0.00)[+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.00)[gmail.com,none]; FORGED_SENDER(0.30)[evelynjaxon01@gmail.com,3I_DQXw0JC0ws9szC1xoB21EFu0owz.q20691-65q-ozzt5ssp6r.25u@trix.bounces.google.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::848:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[evelynjaxon01@gmail.com,3I_DQXw0JC0ws9szC1xoB21EFu0owz.q20691-65q-ozzt5ssp6r.25u@trix.bounces.google.com]; R_PARTS_DIFFER(0.00)[50.0%]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[gmail.com:s=20161025]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::848:from:127.0.2.255]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_LONG(1.00)[1.000]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::848:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] X-Spam: Yes Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 15:47:35 -0000 I've invited you to fill out the following form: Donation From Mrs. Evelyn To fill it out, visit: https://docs.google.com/forms/d/e/1FAIpQLSfBNgBc_zExrtQ4F6E4G1GN7S3Wm8Bn8lzeOD_oh8VJ7qevYg/viewform?vc=0&c=0&w=1&flr=0&usp=mail_form_link Mrs. Evelyn Jaxon Google Forms: Create and analyze surveys. From owner-svn-src-all@freebsd.org Wed Dec 9 17:17:45 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Dec 9 18:37:44 2020 Return-Path: Delivered-To: svn-src-all@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 3360A4AC14B; Wed, 9 Dec 2020 18:37:44 +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 4Crm4m0z8sz3k2C; Wed, 9 Dec 2020 18:37:44 +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 103662F01; Wed, 9 Dec 2020 18:37:44 +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 0B9IbhUV019571; Wed, 9 Dec 2020 18:37:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9IbhkV019570; Wed, 9 Dec 2020 18:37:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202012091837.0B9IbhkV019570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 9 Dec 2020 18:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368489 - head/contrib/llvm-project/clang/lib/Basic/Targets X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/clang/lib/Basic/Targets X-SVN-Commit-Revision: 368489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 18:37:44 -0000 Author: dim Date: Wed Dec 9 18:37:43 2020 New Revision: 368489 URL: https://svnweb.freebsd.org/changeset/base/368489 Log: 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 MFC after: 3 days Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Wed Dec 9 17:17:45 2020 (r368488) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Wed Dec 9 18:37:43 2020 (r368489) @@ -115,8 +115,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-all@freebsd.org Wed Dec 9 18:43:59 2020 Return-Path: Delivered-To: svn-src-all@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 578B44AC429; Wed, 9 Dec 2020 18:43:59 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CrmCz21Y4z3kQX; Wed, 9 Dec 2020 18:43:59 +0000 (UTC) (envelope-from rlibby@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 37E612D61; Wed, 9 Dec 2020 18:43:59 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B9IhxVE025561; Wed, 9 Dec 2020 18:43:59 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9IhwSJ025558; Wed, 9 Dec 2020 18:43:58 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012091843.0B9IhwSJ025558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Wed, 9 Dec 2020 18:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368490 - in head/sys: dev/iommu x86/iommu X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head/sys: dev/iommu x86/iommu X-SVN-Commit-Revision: 368490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 18:43:59 -0000 Author: rlibby Date: Wed Dec 9 18:43:58 2020 New Revision: 368490 URL: https://svnweb.freebsd.org/changeset/base/368490 Log: dmar: reserve memory windows of PCIe root port PCI memory address space is shared between memory-mapped devices (MMIO) and host memory (which may be remapped by an IOMMU). Device accesses to an address within a memory aperture in a PCIe root port will be treated as peer-to-peer and not forwarded to an IOMMU. To avoid this, reserve the address space of the root port's memory apertures in the address space used by the IOMMU for remapping. Reviewed by: kib, tychon Discussed with: Anton Rang Tested by: tychon Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27503 Modified: head/sys/dev/iommu/iommu.h head/sys/dev/iommu/iommu_gas.c head/sys/x86/iommu/intel_ctx.c Modified: head/sys/dev/iommu/iommu.h ============================================================================== --- head/sys/dev/iommu/iommu.h Wed Dec 9 18:37:43 2020 (r368489) +++ head/sys/dev/iommu/iommu.h Wed Dec 9 18:43:58 2020 (r368490) @@ -199,6 +199,8 @@ int iommu_gas_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry, u_int eflags, u_int flags, vm_page_t *ma); int iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start, iommu_gaddr_t end, struct iommu_map_entry **entry0); +int iommu_gas_reserve_region_extend(struct iommu_domain *domain, + iommu_gaddr_t start, iommu_gaddr_t end); void iommu_set_buswide_ctx(struct iommu_unit *unit, u_int busno); bool iommu_is_buswide_ctx(struct iommu_unit *unit, u_int busno); Modified: head/sys/dev/iommu/iommu_gas.c ============================================================================== --- head/sys/dev/iommu/iommu_gas.c Wed Dec 9 18:37:43 2020 (r368489) +++ head/sys/dev/iommu/iommu_gas.c Wed Dec 9 18:43:58 2020 (r368490) @@ -677,6 +677,22 @@ iommu_gas_map_region(struct iommu_domain *domain, stru return (0); } +static int +iommu_gas_reserve_region_locked(struct iommu_domain *domain, + iommu_gaddr_t start, iommu_gaddr_t end, struct iommu_map_entry *entry) +{ + int error; + + IOMMU_DOMAIN_ASSERT_LOCKED(domain); + + entry->start = start; + entry->end = end; + error = iommu_gas_alloc_region(domain, entry, IOMMU_MF_CANWAIT); + if (error == 0) + entry->flags |= IOMMU_MAP_ENTRY_UNMAPPED; + return (error); +} + int iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start, iommu_gaddr_t end, struct iommu_map_entry **entry0) @@ -685,17 +701,63 @@ iommu_gas_reserve_region(struct iommu_domain *domain, int error; entry = iommu_gas_alloc_entry(domain, IOMMU_PGF_WAITOK); - entry->start = start; - entry->end = end; IOMMU_DOMAIN_LOCK(domain); - error = iommu_gas_alloc_region(domain, entry, IOMMU_MF_CANWAIT); - if (error == 0) - entry->flags |= IOMMU_MAP_ENTRY_UNMAPPED; + error = iommu_gas_reserve_region_locked(domain, start, end, entry); IOMMU_DOMAIN_UNLOCK(domain); if (error != 0) iommu_gas_free_entry(domain, entry); else if (entry0 != NULL) *entry0 = entry; + return (error); +} + +/* + * As in iommu_gas_reserve_region, reserve [start, end), but allow for existing + * entries. + */ +int +iommu_gas_reserve_region_extend(struct iommu_domain *domain, + iommu_gaddr_t start, iommu_gaddr_t end) +{ + struct iommu_map_entry *entry, *next, *prev, key = {}; + iommu_gaddr_t entry_start, entry_end; + int error; + + error = 0; + entry = NULL; + end = ummin(end, domain->end); + while (start < end) { + /* Preallocate an entry. */ + if (entry == NULL) + entry = iommu_gas_alloc_entry(domain, + IOMMU_PGF_WAITOK); + /* Calculate the free region from here to the next entry. */ + key.start = key.end = start; + IOMMU_DOMAIN_LOCK(domain); + next = RB_NFIND(iommu_gas_entries_tree, &domain->rb_root, &key); + KASSERT(next != NULL, ("domain %p with end %#jx has no entry " + "after %#jx", domain, (uintmax_t)domain->end, + (uintmax_t)start)); + entry_end = ummin(end, next->start); + prev = RB_PREV(iommu_gas_entries_tree, &domain->rb_root, next); + if (prev != NULL) + entry_start = ummax(start, prev->end); + else + entry_start = start; + start = next->end; + /* Reserve the region if non-empty. */ + if (entry_start != entry_end) { + error = iommu_gas_reserve_region_locked(domain, + entry_start, entry_end, entry); + if (error != 0) + break; + entry = NULL; + } + IOMMU_DOMAIN_UNLOCK(domain); + } + /* Release a preallocated entry if it was not used. */ + if (entry != NULL) + iommu_gas_free_entry(domain, entry); return (error); } Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Wed Dec 9 18:37:43 2020 (r368489) +++ head/sys/x86/iommu/intel_ctx.c Wed Dec 9 18:43:58 2020 (r368490) @@ -317,6 +317,66 @@ domain_init_rmrr(struct dmar_domain *domain, device_t return (error); } +/* + * PCI memory address space is shared between memory-mapped devices (MMIO) and + * host memory (which may be remapped by an IOMMU). Device accesses to an + * address within a memory aperture in a PCIe root port will be treated as + * peer-to-peer and not forwarded to an IOMMU. To avoid this, reserve the + * address space of the root port's memory apertures in the address space used + * by the IOMMU for remapping. + */ +static int +dmar_reserve_pci_regions(struct dmar_domain *domain, device_t dev) +{ + struct iommu_domain *iodom; + device_t root; + uint32_t val; + uint64_t base, limit; + int error; + + iodom = DOM2IODOM(domain); + + root = pci_find_pcie_root_port(dev); + if (root == NULL) + return (0); + + /* Disable downstream memory */ + base = PCI_PPBMEMBASE(0, pci_read_config(root, PCIR_MEMBASE_1, 2)); + limit = PCI_PPBMEMLIMIT(0, pci_read_config(root, PCIR_MEMLIMIT_1, 2)); + error = iommu_gas_reserve_region_extend(iodom, base, limit + 1); + if (bootverbose || error != 0) + device_printf(dev, "DMAR reserve [%#jx-%#jx] (error %d)\n", + base, limit + 1, error); + if (error != 0) + return (error); + + /* Disable downstream prefetchable memory */ + val = pci_read_config(root, PCIR_PMBASEL_1, 2); + if (val != 0 || pci_read_config(root, PCIR_PMLIMITL_1, 2) != 0) { + if ((val & PCIM_BRPM_MASK) == PCIM_BRPM_64) { + base = PCI_PPBMEMBASE( + pci_read_config(root, PCIR_PMBASEH_1, 4), + val); + limit = PCI_PPBMEMLIMIT( + pci_read_config(root, PCIR_PMLIMITH_1, 4), + pci_read_config(root, PCIR_PMLIMITL_1, 2)); + } else { + base = PCI_PPBMEMBASE(0, val); + limit = PCI_PPBMEMLIMIT(0, + pci_read_config(root, PCIR_PMLIMITL_1, 2)); + } + error = iommu_gas_reserve_region_extend(iodom, base, + limit + 1); + if (bootverbose || error != 0) + device_printf(dev, "DMAR reserve [%#jx-%#jx] " + "(error %d)\n", base, limit + 1, error); + if (error != 0) + return (error); + } + + return (error); +} + static struct dmar_domain * dmar_domain_alloc(struct dmar_unit *dmar, bool id_mapped) { @@ -502,6 +562,8 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t error = domain_init_rmrr(domain1, dev, bus, slot, func, dev_domain, dev_busno, dev_path, dev_path_len); + if (error == 0) + error = dmar_reserve_pci_regions(domain1, dev); if (error != 0) { dmar_domain_destroy(domain1); TD_PINNED_ASSERT; From owner-svn-src-all@freebsd.org Wed Dec 9 20:06:38 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Dec 9 20:13:12 2020 Return-Path: Delivered-To: svn-src-all@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 E73D24AE614; Wed, 9 Dec 2020 20:13:12 +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 4CrpBw6Fpxz3pVF; Wed, 9 Dec 2020 20:13:12 +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 BF2373E66; Wed, 9 Dec 2020 20:13:12 +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 0B9KDCgd083176; Wed, 9 Dec 2020 20:13:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9KDCAg083174; Wed, 9 Dec 2020 20:13:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012092013.0B9KDCAg083174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 9 Dec 2020 20:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368492 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 368492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 20:13:13 -0000 Author: hselasky Date: Wed Dec 9 20:13:12 2020 New Revision: 368492 URL: https://svnweb.freebsd.org/changeset/base/368492 Log: Fix bug in ifconfig preventing proper VLAN creation. Detection of interface type by filter 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 date pointed to by the ifr_data pointer was not parsed by 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 Differential Revision: https://reviews.freebsd.org/D27521 Reviewed by: kib@ and kevans@ Reported by: raul.munoz@custos.es Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sbin/ifconfig/ifclone.c Modified: head/sbin/ifconfig/ifclone.c ============================================================================== --- head/sbin/ifconfig/ifclone.c Wed Dec 9 20:06:37 2020 (r368491) +++ head/sbin/ifconfig/ifclone.c Wed Dec 9 20:13:12 2020 (r368492) @@ -128,32 +128,32 @@ ifclonecreate(int s, void *arg) { struct ifreq ifr; struct clone_defcb *dcp; - clone_callback_func *clone_cb = NULL; memset(&ifr, 0, sizeof(ifr)); (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - if (clone_cb == NULL) { - /* Try to find a default callback */ + /* Try to find a default callback by filter */ + SLIST_FOREACH(dcp, &clone_defcbh, next) { + if (dcp->clone_mt == MT_FILTER && + dcp->ifmatch(ifr.ifr_name) != 0) + break; + } + + if (dcp == NULL) { + /* Try to find a default callback by prefix */ SLIST_FOREACH(dcp, &clone_defcbh, next) { - if ((dcp->clone_mt == MT_PREFIX) && - (strncmp(dcp->ifprefix, ifr.ifr_name, - strlen(dcp->ifprefix)) == 0)) { - clone_cb = dcp->clone_cb; + if (dcp->clone_mt == MT_PREFIX && + strncmp(dcp->ifprefix, ifr.ifr_name, + strlen(dcp->ifprefix)) == 0) break; - } - if ((dcp->clone_mt == MT_FILTER) && - dcp->ifmatch(ifr.ifr_name)) { - clone_cb = dcp->clone_cb; - break; - } } } - if (clone_cb == NULL) { + + if (dcp == NULL || dcp->clone_cb == NULL) { /* NB: no parameters */ ioctl_ifcreate(s, &ifr); } else { - clone_cb(s, &ifr); + dcp->clone_cb(s, &ifr); } /* From owner-svn-src-all@freebsd.org Wed Dec 9 20:19:59 2020 Return-Path: Delivered-To: svn-src-all@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 BB05E4AE5B7; Wed, 9 Dec 2020 20:19:59 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrpLk5dc3z3q13; Wed, 9 Dec 2020 20:19:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 39A8F2601E4; Wed, 9 Dec 2020 21:19:56 +0100 (CET) Subject: Re: svn commit: r368492 - head/sbin/ifconfig From: Hans Petter Selasky To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012092013.0B9KDCAg083174@repo.freebsd.org> Message-ID: Date: Wed, 9 Dec 2020 21:19:41 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202012092013.0B9KDCAg083174@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CrpLk5dc3z3q13 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[selasky.org]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c17:6c4b::2:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c17:6c4b::2:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 20:19:59 -0000 On 12/9/20 9:13 PM, Hans Petter Selasky wrote: > because the date pointed because the data pointed ^^ spelling fix --HPS From owner-svn-src-all@freebsd.org Wed Dec 9 20:38:27 2020 Return-Path: Delivered-To: svn-src-all@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 4AA854AF1C8; Wed, 9 Dec 2020 20:38:27 +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 4Crpm31jvfz3qvP; Wed, 9 Dec 2020 20:38:27 +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 2DFE144D5; Wed, 9 Dec 2020 20:38:27 +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 0B9KcRut097371; Wed, 9 Dec 2020 20:38:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9KcRBW097370; Wed, 9 Dec 2020 20:38:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202012092038.0B9KcRBW097370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 9 Dec 2020 20:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368493 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 368493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 20:38:27 -0000 Author: gjb Date: Wed Dec 9 20:38:26 2020 New Revision: 368493 URL: https://svnweb.freebsd.org/changeset/base/368493 Log: Fix staging riscv images. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Wed Dec 9 20:13:12 2020 (r368492) +++ head/release/Makefile.mirrors Wed Dec 9 20:38:26 2020 (r368493) @@ -21,7 +21,7 @@ STAGE_TARGETS?= iso-images-stage .endif .if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD)) -. if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != "" +. if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != "" || ${TARGET:Mriscv*} != "" EMBEDDED= 1 . endif .endif @@ -41,7 +41,7 @@ TLD?= ${FTPDIR}/releases .endif .if defined(EMBEDDED) && !empty(EMBEDDED) -. if ${TARGET:Marm*} != "" && (${TARGET_ARCH:Marm*} != "" || ${TARGET_ARCH} == "aarch64") +. if ${TARGET:Marm*} != "" && (${TARGET_ARCH:Marm*} != "" || ${TARGET_ARCH} == "aarch64") || ${TARGET:Mriscv*} != "" . if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" || ${BRANCH:MALPHA*} != "" SNAPSHOT= 1 . endif From owner-svn-src-all@freebsd.org Wed Dec 9 20:47:13 2020 Return-Path: Delivered-To: svn-src-all@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 DFEF74AF27C; Wed, 9 Dec 2020 20:47:13 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Crpy86m8Xz3rRQ; Wed, 9 Dec 2020 20:47:12 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 4F02C2601E4; Wed, 9 Dec 2020 21:47:11 +0100 (CET) Subject: Re: svn commit: r368492 - head/sbin/ifconfig From: Hans Petter Selasky To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012092013.0B9KDCAg083174@repo.freebsd.org> Message-ID: <1d264658-6513-e2a2-062b-1b21296b054f@selasky.org> Date: Wed, 9 Dec 2020 21:46:57 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Crpy86m8Xz3rRQ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[selasky.org]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[88.99.82.50:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.82.50:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 20:47:13 -0000 On 12/9/20 9:19 PM, Hans Petter Selasky wrote: > On 12/9/20 9:13 PM, Hans Petter Selasky wrote: >> because the date pointed > > because the data pointed >               ^^ spelling fix Just a heads up: I plan on making this a separate direct-commit to 12-stable tomorrow, because this change depends on, r366917, stacked VLANs, which I have no intention of MFC'ing. The fix for 12-stable looks like this: > Index: sbin/ifconfig/ifclone.c > =================================================================== > --- sbin/ifconfig/ifclone.c (revision 368297) > +++ sbin/ifconfig/ifclone.c (working copy) > @@ -124,6 +124,7 @@ > 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 @@ > 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; --HPS From owner-svn-src-all@freebsd.org Wed Dec 9 22:37:24 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 00:43:33 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 07:13:15 2020 Return-Path: Delivered-To: svn-src-all@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 EF5CB4777FB; Thu, 10 Dec 2020 07:13:15 +0000 (UTC) (envelope-from tmunro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cs4rW5ybmz3HxW; Thu, 10 Dec 2020 07:13:15 +0000 (UTC) (envelope-from tmunro@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 BF51314E2E; Thu, 10 Dec 2020 07:13:15 +0000 (UTC) (envelope-from tmunro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA7DFfq001722; Thu, 10 Dec 2020 07:13:15 GMT (envelope-from tmunro@FreeBSD.org) Received: (from tmunro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA7DFwG001721; Thu, 10 Dec 2020 07:13:15 GMT (envelope-from tmunro@FreeBSD.org) Message-Id: <202012100713.0BA7DFwG001721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tmunro set sender to tmunro@FreeBSD.org using -f From: Thomas Munro Date: Thu, 10 Dec 2020 07:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368500 - head/usr.bin/truss X-SVN-Group: head X-SVN-Commit-Author: tmunro X-SVN-Commit-Paths: head/usr.bin/truss X-SVN-Commit-Revision: 368500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 07:13:16 -0000 Author: tmunro Date: Thu Dec 10 07:13:15 2020 New Revision: 368500 URL: https://svnweb.freebsd.org/changeset/base/368500 Log: truss: Add AIO syscalls. Display the arguments of aio_read(2), aio_write(2), aio_suspend(2), aio_error(2), aio_return(2), aio_cancel(2), aio_fsync(2), aio_mlock(2), aio_waitcomplete(2) and lio_listio(2) in human-readable form. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D27518 Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Thu Dec 10 05:50:45 2020 (r368499) +++ head/usr.bin/truss/syscall.h Thu Dec 10 07:13:15 2020 (r368500) @@ -87,6 +87,7 @@ enum Argtype { /* Encoded scalar values. */ Accessmode, Acltype, + AiofsyncOp, Atfd, Atflags, CapFcntlRights, @@ -101,6 +102,7 @@ enum Argtype { Ioctl, Kldsymcmd, Kldunloadflags, + LioMode, Madvice, Minherit, Msgflags, @@ -139,6 +141,8 @@ enum Argtype { /* Pointers to non-structures. */ Ptr, + AiocbArray, + AiocbPointer, BinString, CapRights, ExecArgs, @@ -157,6 +161,7 @@ enum Argtype { StringArray, /* Pointers to structures. */ + Aiocb, Itimerval, Kevent, Kevent11, @@ -168,6 +173,7 @@ enum Argtype { Schedparam, Sctpsndrcvinfo, Sigaction, + Sigevent, Siginfo, Sigset, Sockaddr, Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Thu Dec 10 05:50:45 2020 (r368499) +++ head/usr.bin/truss/syscalls.c Thu Dec 10 07:13:15 2020 (r368500) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); * arguments. */ +#include #include #include #define _WANT_FREEBSD11_KEVENT @@ -125,6 +126,24 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, { .name = "access", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { Accessmode, 1 } } }, + { .name = "aio_cancel", .ret_type = 1, .nargs = 2, + .args = { { Int, 0 }, { Aiocb, 1 } } }, + { .name = "aio_error", .ret_type = 1, .nargs = 1, + .args = { { Aiocb, 0 } } }, + { .name = "aio_fsync", .ret_type = 1, .nargs = 2, + .args = { { AiofsyncOp, 0 }, { Aiocb, 1 } } }, + { .name = "aio_mlock", .ret_type = 1, .nargs = 1, + .args = { { Aiocb, 0 } } }, + { .name = "aio_read", .ret_type = 1, .nargs = 1, + .args = { { Aiocb, 0 } } }, + { .name = "aio_return", .ret_type = 1, .nargs = 1, + .args = { { Aiocb, 0 } } }, + { .name = "aio_suspend", .ret_type = 1, .nargs = 3, + .args = { { AiocbArray, 0 }, { Int, 1 }, { Timespec, 2 } } }, + { .name = "aio_waitcomplete", .ret_type = 1, .nargs = 2, + .args = { { AiocbPointer | OUT, 0 }, { Timespec, 1 } } }, + { .name = "aio_write", .ret_type = 1, .nargs = 1, + .args = { { Aiocb, 0 } } }, { .name = "bind", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Socklent, 2 } } }, { .name = "bindat", .ret_type = 1, .nargs = 4, @@ -324,6 +343,9 @@ static struct syscall decoded_syscalls[] = { { .name = "linkat", .ret_type = 1, .nargs = 5, .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 }, { Atflags, 4 } } }, + { .name = "lio_listio", .ret_type = 1, .nargs = 4, + .args = { { LioMode, 0 }, { AiocbArray, 1 }, { Int, 2 }, + { Sigevent, 3 } } }, { .name = "listen", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Int, 1 } } }, { .name = "lseek", .ret_type = 2, .nargs = 3, @@ -714,6 +736,21 @@ static struct xlat linux_socketcall_ops[] = { XEND }; +static struct xlat lio_modes[] = { + X(LIO_WAIT) X(LIO_NOWAIT) + XEND +}; + +static struct xlat lio_opcodes[] = { + X(LIO_WRITE) X(LIO_READ) X(LIO_NOP) + XEND +}; + +static struct xlat aio_fsync_ops[] = { + X(O_SYNC) + XEND +}; + #undef X #define X(a) { CLOUDABI_##a, #a }, @@ -1333,6 +1370,59 @@ print_iovec(FILE *fp, struct trussinfo *trussinfo, uin } static void +print_sigval(FILE *fp, union sigval *sv) +{ + fprintf(fp, "{ %d, %p }", sv->sival_int, sv->sival_ptr); +} + +static void +print_sigevent(FILE *fp, struct sigevent *se) +{ + fputs("{ sigev_notify=", fp); + switch (se->sigev_notify) { + case SIGEV_NONE: + fputs("SIGEV_NONE", fp); + break; + case SIGEV_SIGNAL: + fprintf(fp, "SIGEV_SIGNAL, sigev_signo=%s, sigev_value=", + strsig2(se->sigev_signo)); + print_sigval(fp, &se->sigev_value); + break; + case SIGEV_THREAD: + fputs("SIGEV_THREAD, sigev_value=", fp); + print_sigval(fp, &se->sigev_value); + break; + case SIGEV_KEVENT: + fprintf(fp, "SIGEV_KEVENT, sigev_notify_kqueue=%d, sigev_notify_kevent_flags=", + se->sigev_notify_kqueue); + print_mask_arg(sysdecode_kevent_flags, fp, se->sigev_notify_kevent_flags); + break; + case SIGEV_THREAD_ID: + fprintf(fp, "SIGEV_THREAD_ID, sigev_notify_thread_id=%d, sigev_signo=%s, sigev_value=", + se->sigev_notify_thread_id, strsig2(se->sigev_signo)); + print_sigval(fp, &se->sigev_value); + break; + default: + fprintf(fp, "%d", se->sigev_notify); + break; + } + fputs(" }", fp); +} + +static void +print_aiocb(FILE *fp, struct aiocb *cb) +{ + fprintf(fp, "{ %d,%jd,%p,%zu,%s,", + cb->aio_fildes, + cb->aio_offset, + cb->aio_buf, + cb->aio_nbytes, + xlookup(lio_opcodes, cb->aio_lio_opcode)); + print_sigevent(fp, &cb->aio_sigevent); + fputs(" }", fp); +} + +static void print_gen_cmsg(FILE *fp, struct cmsghdr *cmsghdr) { u_char *q; @@ -2115,6 +2205,15 @@ print_arg(struct syscall_args *sc, unsigned long *args print_pointer(fp, args[sc->offset]); break; } + case Sigevent: { + struct sigevent se; + + if (get_struct(pid, args[sc->offset], &se, sizeof(se)) != -1) + print_sigevent(fp, &se); + else + print_pointer(fp, args[sc->offset]); + break; + } case Kevent: { /* * XXX XXX: The size of the array is determined by either the @@ -2481,6 +2580,12 @@ print_arg(struct syscall_args *sc, unsigned long *args print_integer_arg(sysdecode_kldunload_flags, fp, args[sc->offset]); break; + case AiofsyncOp: + fputs(xlookup(aio_fsync_ops, args[sc->offset]), fp); + break; + case LioMode: + fputs(xlookup(lio_modes, args[sc->offset]), fp); + break; case Madvice: print_integer_arg(sysdecode_madvice, fp, args[sc->offset]); break; @@ -2618,6 +2723,67 @@ print_arg(struct syscall_args *sc, unsigned long *args print_iovec(fp, trussinfo, args[sc->offset], (int)args[sc->offset + 1]); break; + case Aiocb: { + struct aiocb cb; + + if (get_struct(pid, args[sc->offset], &cb, sizeof(cb)) != -1) + print_aiocb(fp, &cb); + else + print_pointer(fp, args[sc->offset]); + break; + } + case AiocbArray: { + /* + * Print argment as an array of pointers to struct aiocb, where + * the next syscall argument is the number of elements. + */ + uintptr_t cbs[16]; + unsigned int nent; + bool truncated; + + nent = args[sc->offset + 1]; + truncated = false; + if (nent > nitems(cbs)) { + nent = nitems(cbs); + truncated = true; + } + + if (get_struct(pid, args[sc->offset], cbs, sizeof(uintptr_t) * nent) != -1) { + unsigned int i; + fputs("[", fp); + for (i = 0; i < nent; ++i) { + struct aiocb cb; + if (i > 0) + fputc(',', fp); + if (get_struct(pid, cbs[i], &cb, sizeof(cb)) != -1) + print_aiocb(fp, &cb); + else + print_pointer(fp, cbs[i]); + } + if (truncated) + fputs(",...", fp); + fputs("]", fp); + } else + print_pointer(fp, args[sc->offset]); + break; + } + case AiocbPointer: { + /* + * aio_waitcomplete(2) assigns a pointer to a pointer to struct + * aiocb, so we need to handle the extra layer of indirection. + */ + uintptr_t cbp; + struct aiocb cb; + + if (get_struct(pid, args[sc->offset], &cbp, sizeof(cbp)) != -1) { + if (get_struct(pid, cbp, &cb, sizeof(cb)) != -1) + print_aiocb(fp, &cb); + else + print_pointer(fp, cbp); + } else + print_pointer(fp, args[sc->offset]); + break; + } case Sctpsndrcvinfo: { struct sctp_sndrcvinfo info; From owner-svn-src-all@freebsd.org Thu Dec 10 08:48:06 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 09:30:10 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 09:31:06 2020 Return-Path: Delivered-To: svn-src-all@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 1366447AE5D; Thu, 10 Dec 2020 09:31: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 4Cs7vZ05qBz3PW8; Thu, 10 Dec 2020 09:31:06 +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 EA659167CA; Thu, 10 Dec 2020 09:31: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 0BA9V55W083502; Thu, 10 Dec 2020 09:31:05 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA9V5va083501; Thu, 10 Dec 2020 09:31:05 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012100931.0BA9V5va083501@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 09:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368503 - head/usr.sbin/crunch/crunchgen X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.sbin/crunch/crunchgen X-SVN-Commit-Revision: 368503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 09:31:06 -0000 Author: se Date: Thu Dec 10 09:31:05 2020 New Revision: 368503 URL: https://svnweb.freebsd.org/changeset/base/368503 Log: Lift scope of buf[] to make it extend to a potential access via *basename It can be assumed that the contents of the buffer was still allocated and valid at the point of the out-of-scope access, so there was no security issue in practice. Reported by: Coverity Scan CID 1437697 MFC after: 3 days Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunched_main.c Thu Dec 10 09:30:09 2020 (r368502) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Thu Dec 10 09:31:05 2020 (r368503) @@ -114,6 +114,7 @@ main(int argc, char **argv, char **envp) { struct stub *ep = NULL; const char *basename = NULL; + char buf[MAXPATHLEN]; /* * Look at __progname first (this will be set if the crunched binary is @@ -141,7 +142,6 @@ main(int argc, char **argv, char **envp) * try AT_EXECPATH to get the actual binary that was executed. */ if (ep == NULL) { - char buf[MAXPATHLEN]; int error = elf_aux_info(AT_EXECPATH, &buf, sizeof(buf)); if (error == 0) { From owner-svn-src-all@freebsd.org Thu Dec 10 09:37:06 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 09:39:27 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 09:51:50 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 09:55:05 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 09:57:18 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 10:00:44 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 10:23:18 2020 Return-Path: Delivered-To: svn-src-all@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 AEA5747C0FD; Thu, 10 Dec 2020 10:23:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Cs93p4b6Fz3jv3; Thu, 10 Dec 2020 10:23:18 +0000 (UTC) (envelope-from trasz@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 9058D17139; Thu, 10 Dec 2020 10:23:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAANI4S020661; Thu, 10 Dec 2020 10:23:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAANIqb020660; Thu, 10 Dec 2020 10:23:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202012101023.0BAANIqb020660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 10 Dec 2020 10:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368510 - head/usr.sbin/diskinfo X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/diskinfo X-SVN-Commit-Revision: 368510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 10:23:18 -0000 Author: trasz Date: Thu Dec 10 10:23:18 2020 New Revision: 368510 URL: https://svnweb.freebsd.org/changeset/base/368510 Log: Make "diskinfo -i" also test 1MB reads. Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Thu Dec 10 10:00:43 2020 (r368509) +++ head/usr.sbin/diskinfo/diskinfo.c Thu Dec 10 10:23:18 2020 (r368510) @@ -644,6 +644,9 @@ iopsbench(int fd, off_t mediasize, u_int sectorsize) printf("\t128 kbytes: "); iops(fd, mediasize, 128 * 1024); + printf("\t1024 kbytes: "); + iops(fd, mediasize, 1024 * 1024); + printf("\n"); } From owner-svn-src-all@freebsd.org Thu Dec 10 10:58:31 2020 Return-Path: Delivered-To: svn-src-all@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 33F7C47C743; Thu, 10 Dec 2020 10:58:31 +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 4Cs9rR0tTRz3lcg; Thu, 10 Dec 2020 10:58:31 +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 0CB24170F5; Thu, 10 Dec 2020 10:58:31 +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 0BAAwULm039856; Thu, 10 Dec 2020 10:58:30 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAAwU4F039855; Thu, 10 Dec 2020 10:58:30 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012101058.0BAAwU4F039855@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:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368511 - head/contrib/ee X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/contrib/ee X-SVN-Commit-Revision: 368511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 10:58:31 -0000 Author: gbe (doc committer) Date: Thu Dec 10 10:58:30 2020 New Revision: 368511 URL: https://svnweb.freebsd.org/changeset/base/368511 Log: ee(1): Whitespace cleanup This is a direct commit to -CURRENT since the upstream went away. MFC after: 1 week Modified: head/contrib/ee/ee.1 Modified: head/contrib/ee/ee.1 ============================================================================== --- head/contrib/ee/ee.1 Thu Dec 10 10:23:18 2020 (r368510) +++ head/contrib/ee/ee.1 Thu Dec 10 10:58:30 2020 (r368511) @@ -18,32 +18,33 @@ ree [-e] [-i] [-h] [+#] [\fIfile\fR ...] .fi .ad b .SH DESCRIPTION -The command -.I ee -is a simple screen oriented text editor. It is always in text insertion -mode unless there is a prompt at the bottom of the terminal, or a -menu present (in a box in the middle of the terminal). The command -.I ree -is the same as -.I ee, -but restricted to editing the named -file (no file operations, or shell escapes are allowed). +The command +.I ee +is a simple screen oriented text editor. +It is always in text insertion mode unless there is a prompt at the bottom +of the terminal, or a menu present (in a box in the middle of the terminal). +The command +.I ree +is the same as +.I ee, +but restricted to editing the named file (no file operations, or shell escapes +are allowed). .PP -An editor with similar user-friendly qualities but more features is available -and is called +An editor with similar user-friendly qualities but more features is available +and is called .I aee. .PP -For +For .I ee -to work properly, the environment variable -.SM TERM -must be set to indicate the type of terminal being used. For -example, for an -.SM HP 700/92 -terminal, the -.SM TERM -variable should be set to "70092". See your System Administrator if -you need more information. +to work properly, the environment variable +.SM TERM +must be set to indicate the type of terminal being used. +For example, for an +.SM HP 700/92 +terminal, the +.SM TERM +variable should be set to "70092". +See your System Administrator if you need more information. .\" .\" options .\" @@ -53,13 +54,13 @@ The following options are available from the command l .TP 4 .B -e Turns off expansion of tab character to spaces. -.TP +.TP .B -i Turns off display of information window at top of terminal. .TP .B -h -Turns off highlighting of borders of windows and menus (improves -performance on some terminals). +Turns off highlighting of borders of windows and menus (improves performance on +some terminals). .TP .B +# Moves the cursor to line '#' at startup. @@ -68,21 +69,19 @@ Moves the cursor to line '#' at startup. .\" control keys .\" .SS "Control keys" -To do anything other than insert text, the user must use the control -keys (the -.B Control -key, represented by a "^", pressed in conjunction with an -alphabetic key, e.g., ^a) and function keys available on the keyboard -(such as +To do anything other than insert text, the user must use the control keys (the +.B Control +key, represented by a "^", pressed in conjunction with an +alphabetic key, e.g., ^a) and function keys available on the keyboard +(such as .BR "Next Page" ", " "Prev Page" , arrow keys, etc.). .PP -Since not all terminals have function keys, +Since not all terminals have function keys, .I ee -has the basic cursor movement functions assigned to control keys as -well as more intuitive keys on the keyboard when available. For -instance, to move the cursor up, the user can use the up arrow key, -or +has the basic cursor movement functions assigned to control keys as well as more +intuitive keys on the keyboard when available. +For instance, to move the cursor up, the user can use the up arrow key, or .BR ^u . .RS 4 .nf @@ -119,11 +118,13 @@ or .sp .SS "EMACS keys mode" .PP -Since many shells provide an Emacs mode (for cursor movement and other editing -operations), some bindings that may be more useful for people familiar with -those bindings have been provided. These are accessible via the -.B settings -menu, or via the initialization file (see below). The mappings are as follows: +Since many shells provide an Emacs mode (for cursor movement and other editing +operations), some bindings that may be more useful for people familiar with those +bindings have been provided. +These are accessible via the +.B settings +menu, or via the initialization file (see below). +The mappings are as follows: .RS .nf .ta 1.4i @@ -178,11 +179,12 @@ Move the cursor in the direction indicated. .\" .SS Commands .PP -Some operations require more information than a single keystroke can -provide. For the most basic operations, there is a menu that can be -obtained by pressing the +Some operations require more information than a single keystroke can provide. +For the most basic operations, there is a menu that can be obtained by +pressing the .SM \fBESC\fR -key. The same operations, and more can be performed by obtaining the +key. +The same operations, and more can be performed by obtaining the command prompt (^c) and typing in one of the commands below. .RS 4 .IP "!\fBcmd\fR" @@ -219,50 +221,51 @@ Write the text to the named \fIfile\fR. .\" .SS "Menu Operations" .PP -Pop-up menus can be obtained by pressing the -.B escape -key (or -.B ^[ -if no -.B escape -key is present). When in the menu, the escape key can be -used to leave the menu without performing any operations. Use the up and -down arrow keys, or +Pop-up menus can be obtained by pressing the +.B escape +key (or +.B ^[ +if no +.B escape +key is present). +When in the menu, the escape key can be used to leave the menu without performing +any operations. +Use the up and down arrow keys, or .B ^u -for moving up and -.B ^d -for moving down to move to the desired items in the menu, then press -.B return +for moving up and +.B ^d +for moving down to move to the desired items in the menu, then press +.B return to perform the indicated task. .PP -To the left of each menu item is a letter, which if the corresponding -letter is pressed on the keyboard selects that menu entry. +To the left of each menu item is a letter, which if the corresponding letter is pressed +on the keyboard selects that menu entry. .PP The main menu in \fIee\fR is as follows: .RS 4 -.IP "\fBleave editor\fR" -If changes have been made, the user will get a menu prompting whether or -not the changes should be saved. +.IP "\fBleave editor\fR" +If changes have been made, the user will get a menu prompting whether or not the +changes should be saved. .IP "\fBhelp\fR" Displays a help screen, with all of the keyboard operations and commands. .IP "\fBfile operations\fR" -Pops up a menu for selecting whether to read a file, write to a file, or -save the current contents of the editor, as well as send the contents of -the editor to a print command (see the section \fBInitializing ee from a +Pops up a menu for selecting whether to read a file, write to a file, or +save the current contents of the editor, as well as send the contents of +the editor to a print command (see the section \fBInitializing ee from a file\fR). .IP "\fBredraw screen\fR" Provides a means to repaint the screen if the screen has been corrupted. .IP "\fBsettings\fR" -Shows the current values of the operating modes, and right margin. By -pressing return when the cursor is on a particular item, the value can be -changed. To leave this menu, press the \fBescape\fR key. (See \fBModes\fR -below.) +Shows the current values of the operating modes, and right margin. By +pressing return when the cursor is on a particular item, the value can be +changed. +To leave this menu, press the \fBescape\fR key. (See \fBModes\fR below.) .IP "\fBsearch\fR" .br -Pops up a menu in which the user may choose to enter a string to search +Pops up a menu in which the user may choose to enter a string to search for, or search for a string already entered. .IP "\fBmiscellaneous\fR" -Pops up a menu that allows the user to format the current paragraph, +Pops up a menu that allows the user to format the current paragraph, execute a shell command, or check the spelling of the text in the editor. .RE .\" @@ -273,7 +276,7 @@ execute a shell command, or check the spelling of the Paragraphs are defined for \fIee\fR by a block of text bounded by: .sp .RS 8 -.IP \(bu +.IP \(bu Begin or end of file. .IP \(bu Line with no characters, or only spaces and/or tabs. @@ -281,142 +284,145 @@ Line with no characters, or only spaces and/or tabs. Line starting with a period ('.') or right angle bracket ('>'). .RE .PP -A paragraph may be formatted two ways: explicitly by choosing the -\fBformat paragraph\fR menu item, or by setting \fIee\fR to automatically -format paragraphs. The automatic mode may be set via a menu, or via the +A paragraph may be formatted two ways: explicitly by choosing the +\fBformat paragraph\fR menu item, or by setting \fIee\fR to automatically +format paragraphs. The automatic mode may be set via a menu, or via the initialization file. .PP -There are three states for text operation in \fIee\fR: free-form, margins, +There are three states for text operation in \fIee\fR: free-form, margins, and automatic formatting. .PP -"Free-form" is best used for things like programming. There are no +"Free-form" is best used for things like programming. There are no restrictions on the length of lines, and no formatting takes place. .PP -"Margins" allows the user to type in text without having to worry about going -beyond the right margin (the right margin may be set in the \fBsettings\fR -menu, the default is for the margin to be the right edge of the -terminal). This is the mode that allows the \fBformat paragraph\fR menu -item to work. +"Margins" allows the user to type in text without having to worry about going +beyond the right margin (the right margin may be set in the \fBsettings\fR +menu, the default is for the margin to be the right edge of the terminal). +This is the mode that allows the \fBformat paragraph\fR menu item to work. .PP -"Automatic formatting" provides word-processor-like behavior. The user -may type in text, while \fIee\fR will make sure the entire paragraph fits -within the width of the terminal every time the user inserts a space after -typing or deleting text. Margin observation must also be enabled in order for -automatic formatting to occur. +"Automatic formatting" provides word-processor-like behavior. +The user may type in text, while \fIee\fR will make sure the entire paragraph fits +within the width of the terminal every time the user inserts a space after +typing or deleting text. +Margin observation must also be enabled in order for automatic formatting to occur. .\" .\" modes .\" .SS Modes .PP -Although ee is a 'modeless' editor (it is in text insertion mode all the -time), there are modes in some of the things it does. These include: +Although ee is a 'modeless' editor (it is in text insertion mode all the +time), there are modes in some of the things it does. +These include: .RS 4 .IP "\fBtab expansion\fR" Tabs may be inserted as a single tab character, or replaced with spaces. .IP "\fBcase sensitivity\fR" -The search operation can be sensitive to whether characters are upper- or +The search operation can be sensitive to whether characters are upper- or lower-case, or ignore case completely. .IP "\fBmargins observed\fR" Lines can either be truncated at the right margin, or extend on forever. .IP "\fBauto paragraph formatting\fR" -While typing in text, the editor can try to keep it looking reasonably well +While typing in text, the editor can try to keep it looking reasonably well within the width of the screen. .IP "\fBeightbit characters\fR" -Toggles whether eight bit characters are displayed as their value in angle +Toggles whether eight bit characters are displayed as their value in angle brackets (e.g. "<220>") or as a character. .IP "\fBinfo window\fR" -A window showing the keyboard operations that can be performed can be +A window showing the keyboard operations that can be performed can be displayed or not. .IP "\fBemacs keys\fR" Control keys may be given bindings similar to emacs, or not. .IP "\fB16 bit characters\fR" -Toggles whether sixteen bit characters are handled as one 16-bit quantity or +Toggles whether sixteen bit characters are handled as one 16-bit quantity or two 8-bit quantities. This works primarily with the Chinese Big 5 code set. .RE .PP -You may set these modes via the initialization file (see below), or with a +You may set these modes via the initialization file (see below), or with a menu (see above). .\" .\" spell checking .\" .SS "Spell Checking" .PP -There are two ways to have the spelling in the text checked from \fIee\fR. -One is by the traditional \fIspell\fR(1) command, the other is with the +There are two ways to have the spelling in the text checked from \fIee\fR. +One is by the traditional \fIspell\fR(1) command, the other is with the optional \fIispell\fR(1) command. .PP -Using \fIspell\fR, the words that are not recognized will be placed at the top -of the file. For the \fIispell\fR option, the file is written to disk, -then \fIispell\fR run on the file, and the file read back in once +Using \fIspell\fR, the words that are not recognized will be placed at the top +of the file. For the \fIispell\fR option, the file is written to disk, +then \fIispell\fR run on the file, and the file read back in once \fIispell\fR has completed making changes to the file. .\" .\" printing .\" .SS "Printing the contents of the editor" .PP -The user may select a menu item which prints the contents of the editor. +The user may select a menu item which prints the contents of the editor. .I ee -pipes the text in the editor to the command specified by the -initialization command +pipes the text in the editor to the command specified by the initialization +command .B printcommand -(see the section -.B Initializing ee from a file -below). The default is to send the contents to "lp". +(see the section +.B Initializing ee from a file below). +The default is to send the contents to "lp". .PP -Whatever the user assigns to -.B printcommand -must take input from -standard input. See your system administrator for more details. +Whatever the user assigns to +.B printcommand +must take input from standard input. +See your system administrator for more details. .\" .\" shell operations .\" .SS "Shell operations" .PP -Shell commands can be executed from within -.I ee -by selecting the -.B shell command -item in the -.B miscellaneous -menu, or by placing an exclamation mark ("!") before the command to -execute at the -.B command: -prompt. Additionally, the user may direct the contents of the edit buffer -out to a shell operation (via a pipe) by using the left angle bracket -(">"), followed by a "!" and the shell command to execute. The output of -a shell operation can also be directed into the edit buffer by using a -right angle bracket ("<") before the exclamation mark. These can even be -used together to send output to a shell operation and read back the -results into the editor. So, if the editor contained a list of words -to be sorted, they could be sorted by typing the following at the command -prompt: +Shell commands can be executed from within +.I ee +by selecting the +.B shell command +item in the +.B miscellaneous +menu, or by placing an exclamation mark ("!") before the command to +execute at the +.B command: +prompt. +Additionally, the user may direct the contents of the edit buffer out to +a shell operation (via a pipe) by using the left angle bracket +(">"), followed by a "!" and the shell command to execute. +The output of a shell operation can also be directed into the +edit buffer by using a right angle bracket ("<") before the exclamation mark. +These can even be used together to send output to a shell operation and +read back the results into the editor. +So, if the editor contained a list of words to be sorted, they could be +sorted by typing the following at the command prompt: .RS 4 .sp >"). .IP \fB16bit\fR Turns on handling of 16-bit characters. @@ -473,52 +475,53 @@ Turns off emacs key bindings. .\" .SS "Save Editor Configuration" .PP -When using this entry from the -.B settings -menu, the user may choose to save the current configuration of -the editor (see \fBInitializing ee from a -file\fR above) to a file named -.I .init.ee -in the current directory or the user's home directory. If a file named -.I .init.ee -already exists, it will be renamed +When using this entry from the +.B settings +menu, the user may choose to save the current configuration of +the editor (see \fBInitializing ee from a +file\fR above) to a file named +.I .init.ee +in the current directory or the user's home directory. +If a file named +.I .init.ee +already exists, it will be renamed .IR .init.ee.old . .\" .\" Caveats .\" .SH CAVEATS .PP -THIS MATERIAL IS PROVIDED "AS IS". THERE ARE -NO WARRANTIES OF ANY KIND WITH REGARD TO THIS -MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. Neither -Hewlett-Packard nor Hugh Mahon shall be liable -for errors contained herein, nor for -incidental or consequential damages in -connection with the furnishing, performance or -use of this material. Neither Hewlett-Packard -nor Hugh Mahon assumes any responsibility for -the use or reliability of this software or -documentation. This software and -documentation is totally UNSUPPORTED. There -is no support contract available. Hewlett-Packard -has done NO Quality Assurance on ANY -of the program or documentation. You may find -the quality of the materials inferior to -supported materials. +THIS MATERIAL IS PROVIDED "AS IS". THERE ARE +NO WARRANTIES OF ANY KIND WITH REGARD TO THIS +MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. Neither +Hewlett-Packard nor Hugh Mahon shall be liable +for errors contained herein, nor for +incidental or consequential damages in +connection with the furnishing, performance or +use of this material. Neither Hewlett-Packard +nor Hugh Mahon assumes any responsibility for +the use or reliability of this software or +documentation. This software and +documentation is totally UNSUPPORTED. There +is no support contract available. Hewlett-Packard +has done NO Quality Assurance on ANY +of the program or documentation. You may find +the quality of the materials inferior to +supported materials. .PP -Always make a copy of files that cannot be easily reproduced before +Always make a copy of files that cannot be easily reproduced before editing. Save files early, and save often. .SS "International Code Set Support" -.I ee -supports single-byte character code sets (eight-bit clean), or the -Chinese Big-5 code set. (Other multi-byte code sets may function, but the -reason Big-5 works is that a two-byte character also takes up two columns on -the screen.) +.I ee +supports single-byte character code sets (eight-bit clean), or the +Chinese Big-5 code set. +(Other multi-byte code sets may function, but the reason Big-5 works is +that a two-byte character also takes up two columns on the screen.) .SH WARNINGS -The automatic paragraph formatting operation -may be too slow for slower systems. +The automatic paragraph formatting operation may be too slow for +slower systems. .SH FILES .PP .I /usr/share/misc/init.ee @@ -528,13 +531,13 @@ may be too slow for slower systems. .I .init.ee .SH AUTHOR .PP -The software +The software .I ee was developed by Hugh Mahon. .PP -This software and documentation contains -proprietary information which is protected by -copyright. All rights are reserved. +This software and documentation contains +proprietary information which is protected by +copyright. All rights are reserved. .PP Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996, 2001 Hugh Mahon. .SH "SEE ALSO" From owner-svn-src-all@freebsd.org Thu Dec 10 13:08:07 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 13:11:52 2020 Return-Path: Delivered-To: svn-src-all@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 DACDB4A9FAD; Thu, 10 Dec 2020 13:11:52 +0000 (UTC) (envelope-from bhughes@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsDpJ5tzXz3wDd; Thu, 10 Dec 2020 13:11:52 +0000 (UTC) (envelope-from bhughes@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 BD63918EF3; Thu, 10 Dec 2020 13:11:52 +0000 (UTC) (envelope-from bhughes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BADBqE4022222; Thu, 10 Dec 2020 13:11:52 GMT (envelope-from bhughes@FreeBSD.org) Received: (from bhughes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BADBqdq022221; Thu, 10 Dec 2020 13:11:52 GMT (envelope-from bhughes@FreeBSD.org) Message-Id: <202012101311.0BADBqdq022221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bhughes set sender to bhughes@FreeBSD.org using -f From: "Bradley T. Hughes" Date: Thu, 10 Dec 2020 13:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368513 - head/sys/dev/hyperv/vmbus X-SVN-Group: head X-SVN-Commit-Author: bhughes X-SVN-Commit-Paths: head/sys/dev/hyperv/vmbus X-SVN-Commit-Revision: 368513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 13:11:52 -0000 Author: bhughes (ports committer) Date: Thu Dec 10 13:11:52 2020 New Revision: 368513 URL: https://svnweb.freebsd.org/changeset/base/368513 Log: hyperv/vmbus: avoid crash, panic if vbe fb info is missing Do not assume that VBE framebuffer metadata can be used. Like with the EFI fb metadata, it may be null, so we should take care not to dereference the null vbefb pointer. This avoids a panic when booting -CURRENT on a gen1 VM in Azure. Approved by: tsoome Sponsored by: Miles AS Differential Revision: https://reviews.freebsd.org/D27533 Modified: head/sys/dev/hyperv/vmbus/vmbus.c Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Thu Dec 10 13:08:06 2020 (r368512) +++ head/sys/dev/hyperv/vmbus/vmbus.c Thu Dec 10 13:11:52 2020 (r368513) @@ -1361,35 +1361,33 @@ vmbus_fb_mmio_res(device_t dev) kmdp = preload_search_by_type("elf64 kernel"); efifb = (struct efi_fb *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_FB); - if (efifb == NULL) { - vbefb = (struct vbe_fb *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_VBE_FB); + vbefb = (struct vbe_fb *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_VBE_FB); + if (efifb != NULL) { + fb_start = efifb->fb_addr; + fb_end = efifb->fb_addr + efifb->fb_size; + fb_count = efifb->fb_size; + fb_height = efifb->fb_height; + fb_width = efifb->fb_width; + } else if (vbefb != NULL) { fb_start = vbefb->fb_addr; fb_end = vbefb->fb_addr + vbefb->fb_size; fb_count = vbefb->fb_size; fb_height = vbefb->fb_height; fb_width = vbefb->fb_width; } else { - fb_start = efifb->fb_addr; - fb_end = efifb->fb_addr + efifb->fb_size; - fb_count = efifb->fb_size; - fb_height = efifb->fb_height; - fb_width = efifb->fb_width; - } - - if (fb_start == 0) { if (bootverbose) device_printf(dev, "no preloaded kernel fb information\n"); /* We are on Gen1 VM, just return. */ return; - } else { - if (bootverbose) - device_printf(dev, - "fb: fb_addr: %#jx, size: %#jx, " - "actual size needed: 0x%x\n", - fb_start, fb_count, fb_height * fb_width); } + + if (bootverbose) + device_printf(dev, + "fb: fb_addr: %#jx, size: %#jx, " + "actual size needed: 0x%x\n", + fb_start, fb_count, fb_height * fb_width); hv_fb_res = pcib_host_res_alloc(&sc->vmbus_mmio_res, dev, SYS_RES_MEMORY, &rid, fb_start, fb_end, fb_count, From owner-svn-src-all@freebsd.org Thu Dec 10 13:25:46 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 13:32:52 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 13:37:14 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 17:17:23 2020 Return-Path: Delivered-To: svn-src-all@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 73DF94B1382; Thu, 10 Dec 2020 17:17:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsLFb2vrMz4jxy; Thu, 10 Dec 2020 17:17:23 +0000 (UTC) (envelope-from mjg@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 56E381C69B; Thu, 10 Dec 2020 17:17:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAHHNRS077673; Thu, 10 Dec 2020 17:17:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAHHNZh077672; Thu, 10 Dec 2020 17:17:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012101717.0BAHHNZh077672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 10 Dec 2020 17:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368516 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 17:17:23 -0000 Author: mjg Date: Thu Dec 10 17:17:22 2020 New Revision: 368516 URL: https://svnweb.freebsd.org/changeset/base/368516 Log: fd: make serialization in fdescfree_fds conditional on hold count p_fd nullification in fdescfree serializes against new threads transitioning the count 1 -> 2, meaning that fdescfree_fds observing the count of 1 can safely assume there is nobody else using the table. Losing the race and observing > 1 is harmless. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D27522 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Dec 10 13:32:51 2020 (r368515) +++ head/sys/kern/kern_descrip.c Thu Dec 10 17:17:22 2020 (r368516) @@ -2466,9 +2466,13 @@ fdescfree_fds(struct thread *td, struct filedesc *fdp, KASSERT(refcount_load(&fdp->fd_refcnt) == 0, ("%s: fd table %p carries references", __func__, fdp)); - /* Serialize with threads iterating over the table. */ - FILEDESC_XLOCK(fdp); - FILEDESC_XUNLOCK(fdp); + /* + * Serialize with threads iterating over the table, if any. + */ + if (refcount_load(&fdp->fd_holdcnt) > 1) { + FILEDESC_XLOCK(fdp); + FILEDESC_XUNLOCK(fdp); + } lastfile = fdlastfile_single(fdp); for (i = 0; i <= lastfile; i++) { From owner-svn-src-all@freebsd.org Thu Dec 10 17:48:31 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 17:48:34 2020 Return-Path: Delivered-To: svn-src-all@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 8B5094B1AA8; Thu, 10 Dec 2020 17:48:34 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsLxZ3Zbwz4lKN; Thu, 10 Dec 2020 17:48:34 +0000 (UTC) (envelope-from fernape@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 6E06C1CBA9; Thu, 10 Dec 2020 17:48:34 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAHmYtL097017; Thu, 10 Dec 2020 17:48:34 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAHmYhx097016; Thu, 10 Dec 2020 17:48:34 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202012101748.0BAHmYhx097016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 10 Dec 2020 17:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368518 - head/usr.bin/id X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/id X-SVN-Commit-Revision: 368518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 17:48:34 -0000 Author: fernape (ports committer) Date: Thu Dec 10 17:48:34 2020 New Revision: 368518 URL: https://svnweb.freebsd.org/changeset/base/368518 Log: groups(1): Add EXAMPLE Add a super simple example Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D27538 Modified: head/usr.bin/id/groups.1 Modified: head/usr.bin/id/groups.1 ============================================================================== --- head/usr.bin/id/groups.1 Thu Dec 10 17:48:30 2020 (r368517) +++ head/usr.bin/id/groups.1 Thu Dec 10 17:48:34 2020 (r368518) @@ -55,5 +55,11 @@ utility displays the groups to which you (or the optio belong. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Show groups the root user belongs to: +.Bd -literal -offset indent +$ groups root +wheel operator +.Ed .Sh SEE ALSO .Xr id 1 From owner-svn-src-all@freebsd.org Thu Dec 10 18:07:26 2020 Return-Path: Delivered-To: svn-src-all@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 67C2B4B2410; Thu, 10 Dec 2020 18:07:26 +0000 (UTC) (envelope-from rew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsMML2Xzdz4mSg; Thu, 10 Dec 2020 18:07:26 +0000 (UTC) (envelope-from rew@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 4A2E11D110; Thu, 10 Dec 2020 18:07:26 +0000 (UTC) (envelope-from rew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAI7QuQ009837; Thu, 10 Dec 2020 18:07:26 GMT (envelope-from rew@FreeBSD.org) Received: (from rew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAI7PFi009833; Thu, 10 Dec 2020 18:07:25 GMT (envelope-from rew@FreeBSD.org) Message-Id: <202012101807.0BAI7PFi009833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rew set sender to rew@FreeBSD.org using -f From: Robert Wing Date: Thu, 10 Dec 2020 18:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368519 - in head: sys/dev/bvm usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: rew X-SVN-Commit-Paths: in head: sys/dev/bvm usr.sbin/bhyve X-SVN-Commit-Revision: 368519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 18:07:26 -0000 Author: rew Date: Thu Dec 10 18:07:25 2020 New Revision: 368519 URL: https://svnweb.freebsd.org/changeset/base/368519 Log: Add deprecation notice for bvmconsole and bvmdebug Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed. Mark the '-b' and '-g' flag as deprecated for bhyve(8). These will be removed in 13. Reviewed by: jhb, grehan Approved by: kevans (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27519 Modified: head/sys/dev/bvm/bvm_console.c head/sys/dev/bvm/bvm_dbg.c head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/bhyverun.c Modified: head/sys/dev/bvm/bvm_console.c ============================================================================== --- head/sys/dev/bvm/bvm_console.c Thu Dec 10 17:48:34 2020 (r368518) +++ head/sys/dev/bvm/bvm_console.c Thu Dec 10 18:07:25 2020 (r368519) @@ -107,6 +107,8 @@ static void cn_drvinit(void *unused) { struct tty *tp; + + gone_in(13, "bvmconsole"); if (bvm_consdev.cn_pri != CN_DEAD) { tp = tty_alloc(&bvm_ttydevsw, NULL); Modified: head/sys/dev/bvm/bvm_dbg.c ============================================================================== --- head/sys/dev/bvm/bvm_dbg.c Thu Dec 10 17:48:34 2020 (r368518) +++ head/sys/dev/bvm/bvm_dbg.c Thu Dec 10 18:07:25 2020 (r368519) @@ -61,6 +61,8 @@ bvm_dbg_probe(void) disabled = 0; resource_int_value("bvmdbg", 0, "disabled", &disabled); + gone_in(13, "bvmdebug"); + if (!disabled) { if (resource_int_value("bvmdbg", 0, "port", &port) == 0) bvm_dbg_port = port; Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Thu Dec 10 17:48:34 2020 (r368518) +++ head/usr.sbin/bhyve/bhyve.8 Thu Dec 10 18:07:25 2020 (r368519) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jun 25, 2020 +.Dd December 8, 2020 .Dt BHYVE 8 .Os .Sh NAME @@ -104,7 +104,8 @@ Enable a low-level console device supported by .Fx kernels compiled with .Cd "device bvmconsole" . -This option will be deprecated in a future version. +This option is deprecated and will be removed in +.Fx 13.0 . .It Fl c Op Ar setting ... Number of guest virtual CPUs and/or the CPU topology. @@ -145,7 +146,8 @@ kernels compiled with .Cd "device bvmdebug" , allow a remote kernel kgdb to be relayed to the guest kernel gdb stub via a local IPv4 address and this port. -This option will be deprecated in a future version. +This option is deprecated and will be removed in +.Fx 13.0 . .It Fl G Ar port Start a debug server that uses the GDB protocol to export guest state to a debugger. Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Thu Dec 10 17:48:34 2020 (r368518) +++ head/usr.sbin/bhyve/bhyverun.c Thu Dec 10 18:07:25 2020 (r368519) @@ -1124,6 +1124,7 @@ main(int argc, char *argv[]) acpi = 1; break; case 'b': + warnx("-b flag is deprecated and will be removed in FreeBSD 13.0"); bvmcons = 1; break; case 'D': @@ -1145,6 +1146,7 @@ main(int argc, char *argv[]) memflags |= VM_MEM_F_INCORE; break; case 'g': + warnx("-g flag is deprecated and will be removed in FreeBSD 13.0"); dbg_port = atoi(optarg); break; case 'G': From owner-svn-src-all@freebsd.org Thu Dec 10 18:34:16 2020 Return-Path: Delivered-To: svn-src-all@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 891DD4B2F95; Thu, 10 Dec 2020 18:34:16 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsMyJ3XZSz4pJS; Thu, 10 Dec 2020 18:34:16 +0000 (UTC) (envelope-from fernape@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 6C8051D354; Thu, 10 Dec 2020 18:34:16 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAIYGNs028442; Thu, 10 Dec 2020 18:34:16 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAIYGut028441; Thu, 10 Dec 2020 18:34:16 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202012101834.0BAIYGut028441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 10 Dec 2020 18:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368520 - head/usr.bin/id X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/id X-SVN-Commit-Revision: 368520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 18:34:16 -0000 Author: fernape (ports committer) Date: Thu Dec 10 18:34:15 2020 New Revision: 368520 URL: https://svnweb.freebsd.org/changeset/base/368520 Log: id(1): Add EXAMPLES section Add some examples covering the flags: G, n, P, p, u Add reference to groups(1) Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D27539 Modified: head/usr.bin/id/id.1 Modified: head/usr.bin/id/id.1 ============================================================================== --- head/usr.bin/id/id.1 Thu Dec 10 18:07:25 2020 (r368519) +++ head/usr.bin/id/id.1 Thu Dec 10 18:34:15 2020 (r368520) @@ -136,7 +136,43 @@ Display the effective user ID as a number. .El .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Show information for the user +.Ql bob +as a password file entry: +.Bd -literal -offset indent +$ id -P bob +bob:*:0:0::0:0:Robert:/bob:/usr/local/bin/bash +.Ed +.Pp +Same output as +.Xr groups 1 for the root user: +.Bd -literal -offset indent +$ id -Gn root +wheel operator +.Ed +.Pp +Show human readable information about +.Ql alice : +.Bd -literal -offset indent +$ id -p alice +uid alice +groups alice webcamd vboxusers +.Ed +.Pp +Assuming the user +.Ql bob +executed +.Dq Nm su Fl l +to simulate a root login, compare the result of the following commands: +.Bd -literal -offset indent +# id -un +root +# who am i +bob pts/5 Dec 4 19:51 +.Ed .Sh SEE ALSO +.Xr groups 1 , .Xr who 1 .Sh STANDARDS The From owner-svn-src-all@freebsd.org Thu Dec 10 19:36:33 2020 Return-Path: Delivered-To: svn-src-all@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 8C0674B4334; Thu, 10 Dec 2020 19:36:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsPL93bY1z4sld; Thu, 10 Dec 2020 19:36:33 +0000 (UTC) (envelope-from tuexen@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 6E0C11E39F; Thu, 10 Dec 2020 19:36:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAJaXII066476; Thu, 10 Dec 2020 19:36:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAJaXpH066475; Thu, 10 Dec 2020 19:36:33 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202012101936.0BAJaXpH066475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 10 Dec 2020 19:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368521 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 368521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 19:36:33 -0000 Author: tuexen Date: Thu Dec 10 19:36:33 2020 New Revision: 368521 URL: https://svnweb.freebsd.org/changeset/base/368521 Log: Fix the TFTP client when performing a RRQ for files smaller than 512 bytes and the server not sending an OACK: * Close the file. * Report the correct the number of received blocks. MFC after: 1 week Modified: head/libexec/tftpd/tftp-transfer.c Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Thu Dec 10 18:34:15 2020 (r368520) +++ head/libexec/tftpd/tftp-transfer.c Thu Dec 10 19:36:33 2020 (r368521) @@ -280,6 +280,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st } if (fb_size != segsize) { + ts->blocks++; + write_close(); gettimeofday(&(ts->tstop), NULL); return; } From owner-svn-src-all@freebsd.org Thu Dec 10 20:44:05 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 20:44:30 2020 Return-Path: Delivered-To: svn-src-all@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 1C0F54B5ED7; Thu, 10 Dec 2020 20:44:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsQrZ0JdKz3Dkb; Thu, 10 Dec 2020 20:44:30 +0000 (UTC) (envelope-from bdrewery@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 F188B1EDF5; Thu, 10 Dec 2020 20:44:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAKiTUp011768; Thu, 10 Dec 2020 20:44:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAKiTHh011767; Thu, 10 Dec 2020 20:44:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <202012102044.0BAKiTHh011767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 10 Dec 2020 20:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368523 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 368523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 20:44:30 -0000 Author: bdrewery Date: Thu Dec 10 20:44:29 2020 New Revision: 368523 URL: https://svnweb.freebsd.org/changeset/base/368523 Log: contig allocs: Don't retry forever on M_WAITOK. This restores behavior from before domain iterators were added in r327895 and r327896. The vm_domainset_iter_policy() will do a vm_wait_doms() and then restart its iterator when M_WAITOK is set. It will also force the containing loop to have M_NOWAIT. So we get an unbounded retry loop rather than the intended bounded retries that kmem_alloc_contig_pages() already handles. This also restores M_WAITOK to the vmem_alloc() call in kmem_alloc_attr_domain() and kmem_alloc_contig_domain(). Reviewed by: markj, kib MFC after: 2 weeks Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27507 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Dec 10 20:44:05 2020 (r368522) +++ head/sys/vm/vm_kern.c Thu Dec 10 20:44:29 2020 (r368523) @@ -264,9 +264,15 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz { struct vm_domainset_iter di; vm_offset_t addr; - int domain; + int domain, iflags; - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + /* + * Do not allow the domainset iterator to override wait flags. The + * contiguous memory allocator defines special semantics for M_WAITOK + * that do not match the iterator's implementation. + */ + iflags = (flags & ~M_WAITOK) | M_NOWAIT; + vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -346,9 +352,15 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s { struct vm_domainset_iter di; vm_offset_t addr; - int domain; + int domain, iflags; - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + /* + * Do not allow the domainset iterator to override wait flags. The + * contiguous memory allocator defines special semantics for M_WAITOK + * that do not match the iterator's implementation. + */ + iflags = (flags & ~M_WAITOK) | M_NOWAIT; + vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr); From owner-svn-src-all@freebsd.org Thu Dec 10 20:45:09 2020 Return-Path: Delivered-To: svn-src-all@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 70BB44B6151; Thu, 10 Dec 2020 20:45:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsQsK2nGVz3DnV; Thu, 10 Dec 2020 20:45:09 +0000 (UTC) (envelope-from bdrewery@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 527AE1F286; Thu, 10 Dec 2020 20:45:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAKj9Hw011865; Thu, 10 Dec 2020 20:45:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAKj94H011864; Thu, 10 Dec 2020 20:45:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <202012102045.0BAKj94H011864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 10 Dec 2020 20:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368524 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 368524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 20:45:09 -0000 Author: bdrewery Date: Thu Dec 10 20:45:08 2020 New Revision: 368524 URL: https://svnweb.freebsd.org/changeset/base/368524 Log: linux_dma: Ensure proper flags pass to allocators. Possibly fixes the wrong flags being passed to the kernel allocators in linux_dma_alloc_coherent() and linux_dma_pool_alloc(). Reviewed by: hps MFC after: 2 weeks Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27508 Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Dec 10 20:44:29 2020 (r368523) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Dec 10 20:45:08 2020 (r368524) @@ -625,8 +625,8 @@ linux_dma_alloc_coherent(struct device *dev, size_t si else high = BUS_SPACE_MAXADDR; align = PAGE_SIZE << get_order(size); - mem = (void *)kmem_alloc_contig(size, flag, 0, high, align, 0, - VM_MEMATTR_DEFAULT); + mem = (void *)kmem_alloc_contig(size, flag & GFP_NATIVE_MASK, 0, high, + align, 0, VM_MEMATTR_DEFAULT); if (mem != NULL) { *dma_handle = linux_dma_map_phys(dev, vtophys(mem), size); if (*dma_handle == 0) { @@ -932,7 +932,7 @@ linux_dma_pool_alloc(struct dma_pool *pool, gfp_t mem_ { struct linux_dma_obj *obj; - obj = uma_zalloc_arg(pool->pool_zone, pool, mem_flags); + obj = uma_zalloc_arg(pool->pool_zone, pool, mem_flags & GFP_NATIVE_MASK); if (obj == NULL) return (NULL); From owner-svn-src-all@freebsd.org Thu Dec 10 21:06:07 2020 Return-Path: Delivered-To: svn-src-all@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 2DD904B6358; Thu, 10 Dec 2020 21:06:07 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsRKW0qB6z3FVy; Thu, 10 Dec 2020 21:06:07 +0000 (UTC) (envelope-from ken@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 0EE851F3C7; Thu, 10 Dec 2020 21:06:07 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAL66Qm024645; Thu, 10 Dec 2020 21:06:06 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAL66aW024644; Thu, 10 Dec 2020 21:06:06 GMT (envelope-from ken@FreeBSD.org) Message-Id: <202012102106.0BAL66aW024644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 10 Dec 2020 21:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368525 - in head: lib/libmt usr.bin/mt X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: in head: lib/libmt usr.bin/mt X-SVN-Commit-Revision: 368525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 21:06:07 -0000 Author: ken Date: Thu Dec 10 21:06:06 2020 New Revision: 368525 URL: https://svnweb.freebsd.org/changeset/base/368525 Log: Add the LTO-9 density code to libmt and the mt(1) man page. These values are taken directly from the density report from an IBM LTO-9 tape drive. (Using mt getdensity) A LTO-9 drive stores 18TB raw (45TB with compression) on an LTO-9 tape. lib/libmt/mtlib.c: Add the LTO-9 density code, and bpmm/bpi values. usr.bin/mt/mt.1: Add the LTO-9 density code, bpmm/bpi values and number of tracks. Bump the man page date. MFC after: 3 days Sponsored by: Spectra Logic Modified: head/lib/libmt/mtlib.c head/usr.bin/mt/mt.1 Modified: head/lib/libmt/mtlib.c ============================================================================== --- head/lib/libmt/mtlib.c Thu Dec 10 20:45:08 2020 (r368524) +++ head/lib/libmt/mtlib.c Thu Dec 10 21:06:06 2020 (r368525) @@ -648,6 +648,7 @@ static struct densities { { 0x5C, 19107, 485318, "LTO-7" }, { 0x5D, 19107, 485318, "LTO-M8" }, { 0x5E, 20669, 524993, "LTO-8" }, + { 0x60, 23031, 584987, "LTO-9" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: head/usr.bin/mt/mt.1 ============================================================================== --- head/usr.bin/mt/mt.1 Thu Dec 10 20:45:08 2020 (r368524) +++ head/usr.bin/mt/mt.1 Thu Dec 10 21:06:06 2020 (r368525) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 4, 2019 +.Dd December 10, 2020 .Dt MT 1 .Os .Sh NAME @@ -525,6 +525,7 @@ Value Width Tracks Density Code Typ 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 0x5D 12.7 (0.5) 5376 19,107 (485,318) C LTO-M8 14 0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 +0x60 12.7 (0.5) 8960 23,031 (584,987) C LTO-9 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-all@freebsd.org Thu Dec 10 21:12:26 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 22:20:21 2020 Return-Path: Delivered-To: svn-src-all@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 7DC234BADCC; Thu, 10 Dec 2020 22:20:21 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsSz938y6z4QnL; Thu, 10 Dec 2020 22:20:21 +0000 (UTC) (envelope-from mhorne@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 5F1D4200CD; Thu, 10 Dec 2020 22:20:21 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BAMKLSm097092; Thu, 10 Dec 2020 22:20:21 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BAMKLrj097091; Thu, 10 Dec 2020 22:20:21 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012102220.0BAMKLrj097091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 10 Dec 2020 22:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368527 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 368527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 22:20:21 -0000 Author: mhorne Date: Thu Dec 10 22:20:20 2020 New Revision: 368527 URL: https://svnweb.freebsd.org/changeset/base/368527 Log: riscv: handle debug.debugger_on_trap for fatal page faults Allows recovery or diagnosis of a fatal page fault before panicking the system. Reviewed by: jhb, kp Differential Revision: https://reviews.freebsd.org/D27534 Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Thu Dec 10 21:12:25 2020 (r368526) +++ head/sys/riscv/riscv/trap.c Thu Dec 10 22:20:20 2020 (r368527) @@ -179,6 +179,9 @@ page_fault_handler(struct trapframe *frame, int usermo vm_offset_t va; struct proc *p; int error, sig, ucode; +#ifdef KDB + bool handled; +#endif #ifdef KDB if (kdb_active) { @@ -250,6 +253,15 @@ done: fatal: dump_regs(frame); +#ifdef KDB + if (debugger_on_trap) { + kdb_why = KDB_WHY_TRAP; + handled = kdb_trap(frame->tf_scause & SCAUSE_CODE, 0, frame); + kdb_why = KDB_WHY_UNSET; + if (handled) + return; + } +#endif panic("Fatal page fault at %#lx: %#016lx", frame->tf_sepc, stval); } From owner-svn-src-all@freebsd.org Thu Dec 10 22:26:52 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 23:23:43 2020 Return-Path: Delivered-To: svn-src-all@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 504804BBF31; Thu, 10 Dec 2020 23:23:43 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsVNH1qnMz4Trc; Thu, 10 Dec 2020 23:23:43 +0000 (UTC) (envelope-from jmg@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 31AE020DF4; Thu, 10 Dec 2020 23:23:43 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BANNhB8040339; Thu, 10 Dec 2020 23:23:43 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BANNgN3040338; Thu, 10 Dec 2020 23:23:42 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <202012102323.0BANNgN3040338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 10 Dec 2020 23:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368529 - head/usr.sbin/syslogd X-SVN-Group: head X-SVN-Commit-Author: jmg X-SVN-Commit-Paths: head/usr.sbin/syslogd X-SVN-Commit-Revision: 368529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 23:23:43 -0000 Author: jmg Date: Thu Dec 10 23:23:42 2020 New Revision: 368529 URL: https://svnweb.freebsd.org/changeset/base/368529 Log: fix up documentation/comments: processname is not defined, but programname is.. a couple other minor documentation fixes that igor caught... MFC after: 1 week Modified: head/usr.sbin/syslogd/syslog.conf.5 head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- head/usr.sbin/syslogd/syslog.conf.5 Thu Dec 10 22:26:51 2020 (r368528) +++ head/usr.sbin/syslogd/syslog.conf.5 Thu Dec 10 23:23:42 2020 (r368529) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 26, 2020 +.Dd December 10, 2020 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -73,7 +73,7 @@ Note that if you use spaces as separators, your .Nm might be incompatible with other Unices or Unix-like systems. This functionality was added for ease of configuration -(e.g.\& it is possible to cut-and-paste into +(e.g.,\& it is possible to cut-and-paste into .Nm ) , and to avoid possible mistakes. This change however preserves @@ -547,11 +547,11 @@ A configuration file might appear as follows: # Log all kernel messages, authentication messages of # level notice or higher, and anything of level err or # higher to the console. -# Don't log private authentication messages! +# Do not log private authentication messages! *.err;kern.*;auth.notice;authpriv.none;mail.crit /dev/console # Log anything (except mail) of level info or higher. -# Don't log private authentication messages! +# Do not log private authentication messages! *.info;mail.none;authpriv.none /var/log/messages # Log daemon messages at debug level only @@ -600,7 +600,7 @@ console.* /var/log/console.log !* # Log messages from bird or bird6 into one file -:processname, regex, "^bird6?$" +:programname, regex, "^bird6?$" *.* /var/log/bird-all.log # Log messages from servers in racks 10-19 in multiple locations, case insensitive Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Thu Dec 10 22:26:51 2020 (r368528) +++ head/usr.sbin/syslogd/syslogd.c Thu Dec 10 23:23:42 2020 (r368529) @@ -2761,7 +2761,7 @@ prop_filter_compile(struct prop_filter *pfilter, char /* * Here's some filter examples mentioned in syslog.conf(5) * 'msg, contains, ".*Deny.*"' - * 'processname, regex, "^bird6?$"' + * 'programname, regex, "^bird6?$"' * 'hostname, icase_ereregex, "^server-(dcA|podB)-rack1[0-9]{2}\\..*"' */ From owner-svn-src-all@freebsd.org Thu Dec 10 23:43:30 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Dec 10 23:58:27 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 00:13:39 2020 Return-Path: Delivered-To: svn-src-all@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 E1B874BD18F; Fri, 11 Dec 2020 00:13:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsWTv6792z4Wyx; Fri, 11 Dec 2020 00:13:39 +0000 (UTC) (envelope-from ngie@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 C545E21BB3; Fri, 11 Dec 2020 00:13:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0DdVB071644; Fri, 11 Dec 2020 00:13:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0DdFR071643; Fri, 11 Dec 2020 00:13:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110013.0BB0DdFR071643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 00:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368532 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 368532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:13:39 -0000 Author: ngie Date: Fri Dec 11 00:13:39 2020 New Revision: 368532 URL: https://svnweb.freebsd.org/changeset/base/368532 Log: arc4random(3): fix .Xr issues - pthreads(3) should actually be pthread(3). - getentropy(2) should actually be getentropy(3). This makes the manpage `make manlint` clean. MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/gen/arc4random.3 Modified: head/lib/libc/gen/arc4random.3 ============================================================================== --- head/lib/libc/gen/arc4random.3 Thu Dec 10 23:58:27 2020 (r368531) +++ head/lib/libc/gen/arc4random.3 Fri Dec 11 00:13:39 2020 (r368532) @@ -62,7 +62,7 @@ consumption because the other interfaces are deficient quality, portability, standardization, or availability. These functions can be called in almost all coding environments, including -.Xr pthreads 3 +.Xr pthread 3 and .Xr chroot 2 . .Pp @@ -74,7 +74,7 @@ under program flow can act as additional stirring. The subsystem is re-seeded from the kernel .Xr random 4 subsystem using -.Xr getentropy 2 +.Xr getentropy 3 on a regular basis, and also upon .Xr fork 2 . .Pp From owner-svn-src-all@freebsd.org Fri Dec 11 00:15:57 2020 Return-Path: Delivered-To: svn-src-all@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 D4FE04BD3A4; Fri, 11 Dec 2020 00:15:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsWXY3nsgz4X0h; Fri, 11 Dec 2020 00:15:57 +0000 (UTC) (envelope-from ngie@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 751EC21BB4; Fri, 11 Dec 2020 00:15:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0Fv8M071804; Fri, 11 Dec 2020 00:15:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0FvC9071803; Fri, 11 Dec 2020 00:15:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110015.0BB0FvC9071803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 00:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368533 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 368533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:15:57 -0000 Author: ngie Date: Fri Dec 11 00:15:57 2020 New Revision: 368533 URL: https://svnweb.freebsd.org/changeset/base/368533 Log: getentropy(3): sort SEE ALSO sections Sorting order should be done by manpage section (2 vs 3), then alphabetically. This change fixes the order to sort by the manpage section, first. Reported by: make manlint MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/gen/getentropy.3 Modified: head/lib/libc/gen/getentropy.3 ============================================================================== --- head/lib/libc/gen/getentropy.3 Fri Dec 11 00:13:39 2020 (r368532) +++ head/lib/libc/gen/getentropy.3 Fri Dec 11 00:15:57 2020 (r368533) @@ -66,8 +66,8 @@ invalid address. Too many bytes requested, or some other fatal error occurred. .El .Sh SEE ALSO -.Xr arc4random 3 , .Xr getrandom 2 , +.Xr arc4random 3 , .Xr random 4 .Sh STANDARDS .Fn getentropy From owner-svn-src-all@freebsd.org Fri Dec 11 00:20:04 2020 Return-Path: Delivered-To: svn-src-all@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 AF1E14BD3C3; Fri, 11 Dec 2020 00:20:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsWdJ4bL9z4XSP; Fri, 11 Dec 2020 00:20:04 +0000 (UTC) (envelope-from ngie@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 906A721A49; Fri, 11 Dec 2020 00:20:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0K4xu072077; Fri, 11 Dec 2020 00:20:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0K4Uq072076; Fri, 11 Dec 2020 00:20:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110020.0BB0K4Uq072076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 00:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368534 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 368534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:20:04 -0000 Author: ngie Date: Fri Dec 11 00:20:04 2020 New Revision: 368534 URL: https://svnweb.freebsd.org/changeset/base/368534 Log: posix_spawn(3): fix section that references `vfork` `vfork(2)` should be referenced in paragraphs as `.Fn vfork`, not `vfork()`. This change switches the reference to use `.Fn`, which in turn makes the manpage `make manlint` clean. MFC after: 1 week Reported by: make manlint Sponsored by: DellEMC Isilon Modified: head/lib/libc/gen/posix_spawn.3 Modified: head/lib/libc/gen/posix_spawn.3 ============================================================================== --- head/lib/libc/gen/posix_spawn.3 Fri Dec 11 00:15:57 2020 (r368533) +++ head/lib/libc/gen/posix_spawn.3 Fri Dec 11 00:20:04 2020 (r368534) @@ -300,7 +300,9 @@ had been called to create a child process and then .Fn execve had been called by the child process to execute the new process image. .Pp -The implementation uses vfork(), thus the fork handlers are not run when +The implementation uses +.Fn vfork , +thus the fork handlers are not run when .Fn posix_spawn or .Fn posix_spawnp From owner-svn-src-all@freebsd.org Fri Dec 11 00:25:35 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 00:26:49 2020 Return-Path: Delivered-To: svn-src-all@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 A341C4BD64A; Fri, 11 Dec 2020 00:26:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsWn54JJpz4Xq2; Fri, 11 Dec 2020 00:26:49 +0000 (UTC) (envelope-from ngie@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 86A4221F6F; Fri, 11 Dec 2020 00:26:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0Qni6078133; Fri, 11 Dec 2020 00:26:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0QnEi078132; Fri, 11 Dec 2020 00:26:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110026.0BB0QnEi078132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 00:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368536 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:26:49 -0000 Author: ngie Date: Fri Dec 11 00:26:49 2020 New Revision: 368536 URL: https://svnweb.freebsd.org/changeset/base/368536 Log: cap_enter(2): fix CAVEATS section The CAVEATS section was misspelled as "CAVEAT" before this change. Fix the spelling to identify issues related to the section. Furthermore, given that the section order was incorrect, move the CAVEATS section down to the bottom of the manpage, per the conventional section order. MFC after: 1 week Reported by: make manlint Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/cap_enter.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Fri Dec 11 00:25:34 2020 (r368535) +++ head/lib/libc/sys/cap_enter.2 Fri Dec 11 00:26:49 2020 (r368536) @@ -97,19 +97,6 @@ and operations of the .Xr procctl 2 function for similar per-process functionality. -.Sh CAVEAT -Creating effective process sandboxes is a tricky process that involves -identifying the least possible rights required by the process and then -passing those rights into the process in a safe manner. -Consumers of -.Fn cap_enter -should also be aware of other inherited rights, such as access to VM -resources, memory contents, and other process properties that should be -considered. -It is advisable to use -.Xr fexecve 2 -to create a runtime environment inside the sandbox that has as few implicitly -acquired rights as possible. .Sh RETURN VALUES .Rv -std cap_enter cap_getmode .Pp @@ -162,3 +149,16 @@ These functions and the capability facility were creat .An "Robert N. M. Watson" at the University of Cambridge Computer Laboratory with support from a grant from Google, Inc. +.Sh CAVEATS +Creating effective process sandboxes is a tricky process that involves +identifying the least possible rights required by the process and then +passing those rights into the process in a safe manner. +Consumers of +.Fn cap_enter +should also be aware of other inherited rights, such as access to VM +resources, memory contents, and other process properties that should be +considered. +It is advisable to use +.Xr fexecve 2 +to create a runtime environment inside the sandbox that has as few implicitly +acquired rights as possible. From owner-svn-src-all@freebsd.org Fri Dec 11 00:28:29 2020 Return-Path: Delivered-To: svn-src-all@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 3754C4BD4FF; Fri, 11 Dec 2020 00:28:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsWq116YLz4Xqm; Fri, 11 Dec 2020 00:28:29 +0000 (UTC) (envelope-from ngie@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 148CF21A73; Fri, 11 Dec 2020 00:28:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB0SSFB078266; Fri, 11 Dec 2020 00:28:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0SSue078265; Fri, 11 Dec 2020 00:28:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110028.0BB0SSue078265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 00:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368537 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:28:29 -0000 Author: ngie Date: Fri Dec 11 00:28:28 2020 New Revision: 368537 URL: https://svnweb.freebsd.org/changeset/base/368537 Log: aio_suspend.2: properly canonicalize .Dd Months should be fully spelled as their local-specific equivalents: in this case `Oct` should have been spelled like `October`. Reported by: make manlint MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/aio_suspend.2 Modified: head/lib/libc/sys/aio_suspend.2 ============================================================================== --- head/lib/libc/sys/aio_suspend.2 Fri Dec 11 00:26:49 2020 (r368536) +++ head/lib/libc/sys/aio_suspend.2 Fri Dec 11 00:28:28 2020 (r368537) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 23, 2017 +.Dd October 23, 2017 .Dt AIO_SUSPEND 2 .Os .Sh NAME From owner-svn-src-all@freebsd.org Fri Dec 11 00:30:42 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 00:35:05 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 00:37:52 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 00:38:10 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 00:42:54 2020 Return-Path: Delivered-To: svn-src-all@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 9A2AD4BDF27; Fri, 11 Dec 2020 00:42:54 +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 4CsX7f3ywPz4Z70; Fri, 11 Dec 2020 00:42:54 +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 7B42722049; Fri, 11 Dec 2020 00:42:54 +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 0BB0gsg9090400; Fri, 11 Dec 2020 00:42:54 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB0gscA090399; Fri, 11 Dec 2020 00:42:54 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202012110042.0BB0gscA090399@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:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368542 - head/sys/crypto/ccp X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/crypto/ccp X-SVN-Commit-Revision: 368542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 00:42:54 -0000 Author: jkim Date: Fri Dec 11 00:42:53 2020 New Revision: 368542 URL: https://svnweb.freebsd.org/changeset/base/368542 Log: Revert r366943. It did not work as expected. Modified: head/sys/crypto/ccp/ccp.c Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Fri Dec 11 00:38:08 2020 (r368541) +++ head/sys/crypto/ccp/ccp.c Fri Dec 11 00:42:53 2020 (r368542) @@ -78,7 +78,6 @@ static struct pciid { } ccp_ids[] = { { 0x14561022, "AMD CCP-5a" }, { 0x14681022, "AMD CCP-5b" }, - { 0x14861022, "AMD CCP-5a" }, { 0x15df1022, "AMD CCP-5a" }, }; From owner-svn-src-all@freebsd.org Fri Dec 11 01:00:08 2020 Return-Path: Delivered-To: svn-src-all@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 67EC34BDECA; Fri, 11 Dec 2020 01:00:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsXWX1cFjz4ZqZ; Fri, 11 Dec 2020 01:00:08 +0000 (UTC) (envelope-from brooks@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 16E422226D; Fri, 11 Dec 2020 01:00:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB107q7097438; Fri, 11 Dec 2020 01:00:07 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB107hH097437; Fri, 11 Dec 2020 01:00:07 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012110100.0BB107hH097437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 11 Dec 2020 01:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368543 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 01:00:08 -0000 Author: brooks Date: Fri Dec 11 01:00:07 2020 New Revision: 368543 URL: https://svnweb.freebsd.org/changeset/base/368543 Log: style(9): Correct whitespace in struct definitions struct ifconf and struct ifreq use the odd style "structfoo". struct ifdrv seems to have tried to follow this but was committed with spaces in place of most tabs resulting in "structifdrv". MFC after: 3 days Modified: head/sys/net/if.h Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Fri Dec 11 00:42:53 2020 (r368542) +++ head/sys/net/if.h Fri Dec 11 01:00:07 2020 (r368543) @@ -393,7 +393,7 @@ struct ifreq_buffer { * definitions which begin with ifr_name. The * remainder may be interface specific. */ -struct ifreq { +struct ifreq { char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ union { struct sockaddr ifru_addr; @@ -467,11 +467,11 @@ struct ifmediareq { int *ifm_ulist; /* media words */ }; -struct ifdrv { - char ifd_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - unsigned long ifd_cmd; - size_t ifd_len; - void *ifd_data; +struct ifdrv { + char ifd_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + unsigned long ifd_cmd; + size_t ifd_len; + void *ifd_data; }; /* @@ -493,7 +493,7 @@ struct ifstat { * for machine (useful for programs which * must know all networks accessible). */ -struct ifconf { +struct ifconf { int ifc_len; /* size of associated buffer */ union { caddr_t ifcu_buf; From owner-svn-src-all@freebsd.org Fri Dec 11 01:04:37 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 01:06:50 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 01:52:28 2020 Return-Path: Delivered-To: svn-src-all@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 9829A4BF23E; Fri, 11 Dec 2020 01:52:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsYgw3ysrz4d8b; Fri, 11 Dec 2020 01:52:28 +0000 (UTC) (envelope-from ngie@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 7B23D23016; Fri, 11 Dec 2020 01:52:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB1qS13034053; Fri, 11 Dec 2020 01:52:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB1qRtF034051; Fri, 11 Dec 2020 01:52:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110152.0BB1qRtF034051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 01:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368546 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 368546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 01:52:28 -0000 Author: ngie Date: Fri Dec 11 01:52:27 2020 New Revision: 368546 URL: https://svnweb.freebsd.org/changeset/base/368546 Log: cpuset{,_getaffinity,_getdomain}.2: fix SEE ALSO Sort by manpage section, then sort entries alphabetically. This makes the manpages `make manlint` clean. MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/sys/cpuset.2 head/lib/libc/sys/cpuset_getaffinity.2 head/lib/libc/sys/cpuset_getdomain.2 Modified: head/lib/libc/sys/cpuset.2 ============================================================================== --- head/lib/libc/sys/cpuset.2 Fri Dec 11 01:06:49 2020 (r368545) +++ head/lib/libc/sys/cpuset.2 Fri Dec 11 01:52:27 2020 (r368546) @@ -221,8 +221,8 @@ for allocation. .Sh SEE ALSO .Xr cpuset 1 , .Xr cpuset_getaffinity 2 , -.Xr cpuset_setaffinity 2 , .Xr cpuset_getdomain 2 , +.Xr cpuset_setaffinity 2 , .Xr cpuset_setdomain 2 , .Xr pthread_affinity_np 3 , .Xr pthread_attr_affinity_np 3 , Modified: head/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- head/lib/libc/sys/cpuset_getaffinity.2 Fri Dec 11 01:06:49 2020 (r368545) +++ head/lib/libc/sys/cpuset_getaffinity.2 Fri Dec 11 01:52:27 2020 (r368546) @@ -155,15 +155,15 @@ See .Xr capsicum 4 . .El .Sh SEE ALSO -.Xr capsicum 4 , .Xr cpuset 1 , .Xr cpuset 2 , -.Xr cpuset_getid 2 , -.Xr cpuset_setid 2 , .Xr cpuset_getdomain 2 , +.Xr cpuset_getid 2 , .Xr cpuset_setdomain 2 , +.Xr cpuset_setid 2 , .Xr pthread_affinity_np 3 , .Xr pthread_attr_affinity_np 3 , +.Xr capsicum 4 , .Xr cpuset 9 .Sh HISTORY The Modified: head/lib/libc/sys/cpuset_getdomain.2 ============================================================================== --- head/lib/libc/sys/cpuset_getdomain.2 Fri Dec 11 01:06:49 2020 (r368545) +++ head/lib/libc/sys/cpuset_getdomain.2 Fri Dec 11 01:52:27 2020 (r368546) @@ -174,13 +174,13 @@ See .Xr capsicum 4 . .El .Sh SEE ALSO -.Xr capsicum 4 , .Xr cpuset 1 , .Xr cpuset 2 , -.Xr cpuset_getid 2 , -.Xr cpuset_setid 2 , .Xr cpuset_getaffinity 2 , +.Xr cpuset_getid 2 , .Xr cpuset_setaffinity 2 , +.Xr cpuset_setid 2 , +.Xr capsicum 4 , .Xr cpuset 9 .Sh HISTORY The From owner-svn-src-all@freebsd.org Fri Dec 11 02:22:42 2020 Return-Path: Delivered-To: svn-src-all@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 ABC4B4BF646; Fri, 11 Dec 2020 02:22:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CsZLp4TtYz4f1C; Fri, 11 Dec 2020 02:22:42 +0000 (UTC) (envelope-from ngie@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 8CC92236BA; Fri, 11 Dec 2020 02:22:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB2MgMa052796; Fri, 11 Dec 2020 02:22:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB2Mg6p052795; Fri, 11 Dec 2020 02:22:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <202012110222.0BB2Mg6p052795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 11 Dec 2020 02:22:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368547 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 368547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 02:22:42 -0000 Author: ngie Date: Fri Dec 11 02:22:42 2020 New Revision: 368547 URL: https://svnweb.freebsd.org/changeset/base/368547 Log: timespec_get(3): sort SEE ALSO correctly clock_gettime(2) should be mentioned before gettimeofday(2). Reported by: make manlint MFC after: 1 week Sponsored by: DellEMC Isilon Modified: head/lib/libc/gen/timespec_get.3 Modified: head/lib/libc/gen/timespec_get.3 ============================================================================== --- head/lib/libc/gen/timespec_get.3 Fri Dec 11 01:52:27 2020 (r368546) +++ head/lib/libc/gen/timespec_get.3 Fri Dec 11 02:22:42 2020 (r368547) @@ -66,8 +66,8 @@ if successful, otherwise .Dv 0 on failure. .Sh SEE ALSO -.Xr gettimeofday 2 , .Xr clock_gettime 2 , +.Xr gettimeofday 2 , .Xr time 3 .Sh STANDARDS The From owner-svn-src-all@freebsd.org Fri Dec 11 03:59:42 2020 Return-Path: Delivered-To: svn-src-all@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 784ED479A47; Fri, 11 Dec 2020 03:59:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CscVk2s6Fz4kvN; Fri, 11 Dec 2020 03:59:42 +0000 (UTC) (envelope-from kevans@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 54E3C2483E; Fri, 11 Dec 2020 03:59:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB3xgj6010498; Fri, 11 Dec 2020 03:59:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB3xgvZ010497; Fri, 11 Dec 2020 03:59:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012110359.0BB3xgvZ010497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 11 Dec 2020 03:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368548 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 368548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 03:59:42 -0000 Author: kevans Date: Fri Dec 11 03:59:41 2020 New Revision: 368548 URL: https://svnweb.freebsd.org/changeset/base/368548 Log: Flip the GNU_GREP default to OFF bsdgrep was made the default in r368439. Stop building gnugrep entirely as the natural next step towards removal. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Dec 11 02:22:42 2020 (r368547) +++ head/share/mk/src.opts.mk Fri Dec 11 03:59:41 2020 (r368548) @@ -108,7 +108,6 @@ __DEFAULT_YES_OPTIONS = \ GAMES \ GH_BC \ GNU_DIFF \ - GNU_GREP \ GOOGLETEST \ GPIO \ HAST \ @@ -208,6 +207,7 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EXPERIMENTAL \ GDB \ + GNU_GREP \ HESIOD \ LIBSOFT \ LOADER_FIREWIRE \ From owner-svn-src-all@freebsd.org Fri Dec 11 04:02:19 2020 Return-Path: Delivered-To: svn-src-all@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 91F5B479FAE; Fri, 11 Dec 2020 04:02:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CscYl3pfCz4l2C; Fri, 11 Dec 2020 04:02:19 +0000 (UTC) (envelope-from kevans@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 7598A24C06; Fri, 11 Dec 2020 04:02:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB42JIQ016355; Fri, 11 Dec 2020 04:02:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB42Jf8016354; Fri, 11 Dec 2020 04:02:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012110402.0BB42Jf8016354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 11 Dec 2020 04:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368549 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 368549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 04:02:19 -0000 Author: kevans Date: Fri Dec 11 04:02:19 2020 New Revision: 368549 URL: https://svnweb.freebsd.org/changeset/base/368549 Log: src.conf(5): regenerate after WITHOUT_GNU_GREP became default Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Dec 11 03:59:41 2020 (r368548) +++ head/share/man/man5/src.conf.5 Fri Dec 11 04:02:19 2020 (r368549) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd December 8, 2020 +.Dd December 10, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -668,8 +668,8 @@ programs instead of the traditional FreeBSD versions. .It Va WITHOUT_GNU_DIFF Set to not build GNU .Xr diff3 1 . -.It Va WITHOUT_GNU_GREP -Set to not build GNU +.It Va WITH_GNU_GREP +Build and install GNU .Xr grep 1 . .It Va WITHOUT_GOOGLETEST Set to neither build nor install From owner-svn-src-all@freebsd.org Fri Dec 11 08:04:54 2020 Return-Path: Delivered-To: svn-src-all@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 DBC6D47F7C4; Fri, 11 Dec 2020 08:04:54 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Csjxf5x0Cz3DXs; Fri, 11 Dec 2020 08:04:54 +0000 (UTC) (envelope-from ygy@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 BEA8427B05; Fri, 11 Dec 2020 08:04:54 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BB84sJa064857; Fri, 11 Dec 2020 08:04:54 GMT (envelope-from ygy@FreeBSD.org) Received: (from ygy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BB84sVN064856; Fri, 11 Dec 2020 08:04:54 GMT (envelope-from ygy@FreeBSD.org) Message-Id: <202012110804.0BB84sVN064856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ygy set sender to ygy@FreeBSD.org using -f From: Guangyuan Yang Date: Fri, 11 Dec 2020 08:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368550 - head/usr.bin/locate/locate X-SVN-Group: head X-SVN-Commit-Author: ygy X-SVN-Commit-Paths: head/usr.bin/locate/locate X-SVN-Commit-Revision: 368550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 08:04:54 -0000 Author: ygy (doc committer) Date: Fri Dec 11 08:04:54 2020 New Revision: 368550 URL: https://svnweb.freebsd.org/changeset/base/368550 Log: Fix a grammar error on locate(1). While here, also fix a useless .Tn reported by mandoc. PR: 251746 MFC after: 1 week Sumbitted by: David Schlachter Modified: head/usr.bin/locate/locate/locate.1 Modified: head/usr.bin/locate/locate/locate.1 ============================================================================== --- head/usr.bin/locate/locate/locate.1 Fri Dec 11 04:02:19 2020 (r368549) +++ head/usr.bin/locate/locate/locate.1 Fri Dec 11 08:04:54 2020 (r368550) @@ -29,7 +29,7 @@ .\" @(#)locate.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 17, 2006 +.Dd December 11, 2020 .Dt LOCATE 1 .Os .Sh NAME @@ -75,7 +75,7 @@ is matched as though it were .Pp Historically, locate only stored characters between 32 and 127. The -current implementation store any character except newline +current implementation stores any character except newline .Pq Sq \en and .Dv NUL @@ -88,8 +88,7 @@ are stored in 2 bytes. The following options are available: .Bl -tag -width 10n .It Fl 0 -Print pathnames separated by an -.Tn ASCII +Print pathnames separated by an ASCII .Dv NUL character (character code 0) instead of default NL (newline, character code 10). From owner-svn-src-all@freebsd.org Fri Dec 11 13:24:00 2020 Return-Path: Delivered-To: svn-src-all@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 3463E4B0264; Fri, 11 Dec 2020 13:24:00 +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 4Css1r10Knz3rCc; Fri, 11 Dec 2020 13:24:00 +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 1528E37D4; Fri, 11 Dec 2020 13:24:00 +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 0BBDNxOg067734; Fri, 11 Dec 2020 13:23:59 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBDNx0T067733; Fri, 11 Dec 2020 13:23:59 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012111323.0BBDNx0T067733@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: Fri, 11 Dec 2020 13:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368551 - head/usr.bin/calendar/tests X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar/tests X-SVN-Commit-Revision: 368551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 13:24:00 -0000 Author: se Date: Fri Dec 11 13:23:59 2020 New Revision: 368551 URL: https://svnweb.freebsd.org/changeset/base/368551 Log: Install 2 forgotten shell scripts required to run the tests Submitted by: arichardson (Alexander Richardson) Differential Revision: https://reviews.freebsd.org/D27568 Modified: head/usr.bin/calendar/tests/Makefile Modified: head/usr.bin/calendar/tests/Makefile ============================================================================== --- head/usr.bin/calendar/tests/Makefile Fri Dec 11 08:04:54 2020 (r368550) +++ head/usr.bin/calendar/tests/Makefile Fri Dec 11 13:23:59 2020 (r368551) @@ -10,9 +10,11 @@ TEST_METADATA.legacy_test+= timeout="600" ${PACKAGE}FILES+= calendar.comment ${PACKAGE}FILES+= regress.comment.out +${PACKAGE}FILES+= comment.sh ${PACKAGE}FILES+= calendar.cond ${PACKAGE}FILES+= regress.cond.out +${PACKAGE}FILES+= cond.sh ${PACKAGE}FILES+= calendar.calibrate ${PACKAGE}FILES+= regress.a1.out From owner-svn-src-all@freebsd.org Fri Dec 11 14:11:42 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 14:32:43 2020 Return-Path: Delivered-To: svn-src-all@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 1A0BA4B141A; Fri, 11 Dec 2020 14:32:43 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CstY70CxMz3w2P; Fri, 11 Dec 2020 14:32:43 +0000 (UTC) (envelope-from vangyzen@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 EE93A4BD6; Fri, 11 Dec 2020 14:32:42 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBEWg2I012006; Fri, 11 Dec 2020 14:32:42 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBEWgiR012005; Fri, 11 Dec 2020 14:32:42 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202012111432.0BBEWgiR012005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 11 Dec 2020 14:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368553 - head/sbin/decryptcore X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sbin/decryptcore X-SVN-Commit-Revision: 368553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 14:32:43 -0000 Author: vangyzen Date: Fri Dec 11 14:32:42 2020 New Revision: 368553 URL: https://svnweb.freebsd.org/changeset/base/368553 Log: decryptcore: preload OpenSSL error strings; seed PRNG As in r360226, preload OpenSSL error strings and seed the PRNG before entering capability mode. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sbin/decryptcore/decryptcore.c Modified: head/sbin/decryptcore/decryptcore.c ============================================================================== --- head/sbin/decryptcore/decryptcore.c Fri Dec 11 14:11:41 2020 (r368552) +++ head/sbin/decryptcore/decryptcore.c Fri Dec 11 14:32:42 2020 (r368553) @@ -170,6 +170,19 @@ decrypt(int ofd, const char *privkeyfile, const char * goto failed; } + /* + * Obsolescent OpenSSL only knows about /dev/random, and needs to + * pre-seed before entering cap mode. For whatever reason, + * RSA_pub_encrypt uses the internal PRNG. + */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L + { + unsigned char c[1]; + RAND_bytes(c, 1); + } +#endif + ERR_load_crypto_strings(); + caph_cache_catpages(); if (caph_enter() < 0) { pjdlog_errno(LOG_ERR, "Unable to enter capability mode"); From owner-svn-src-all@freebsd.org Fri Dec 11 15:39:23 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Dec 11 18:14:45 2020 Return-Path: Delivered-To: svn-src-all@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 D6BC84B6BB4; Fri, 11 Dec 2020 18:14:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CszTK5ThWz4jW7; Fri, 11 Dec 2020 18:14:45 +0000 (UTC) (envelope-from kevans@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 AE8CF74FE; Fri, 11 Dec 2020 18:14:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBIEjua050556; Fri, 11 Dec 2020 18:14:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBIEhlM050546; Fri, 11 Dec 2020 18:14:43 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012111814.0BBIEhlM050546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 11 Dec 2020 18:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368555 - in head/secure/caroot: blacklisted trusted X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/secure/caroot: blacklisted trusted X-SVN-Commit-Revision: 368555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 18:14:45 -0000 Author: kevans Date: Fri Dec 11 18:14:43 2020 New Revision: 368555 URL: https://svnweb.freebsd.org/changeset/base/368555 Log: caroot: update bundle Summary: - One (1) added - Ten (10) removed MFC after: 3 days Added: head/secure/caroot/blacklisted/GeoTrust_Global_CA.pem - copied unchanged from r368554, head/secure/caroot/trusted/GeoTrust_Global_CA.pem head/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority.pem - copied unchanged from r368554, head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority.pem head/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G3.pem - copied unchanged from r368554, head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G3.pem head/secure/caroot/blacklisted/GeoTrust_Universal_CA.pem - copied unchanged from r368554, head/secure/caroot/trusted/GeoTrust_Universal_CA.pem head/secure/caroot/blacklisted/GeoTrust_Universal_CA_2.pem - copied unchanged from r368554, head/secure/caroot/trusted/GeoTrust_Universal_CA_2.pem head/secure/caroot/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem - copied unchanged from r368554, head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem head/secure/caroot/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem - copied unchanged from r368554, head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem head/secure/caroot/blacklisted/thawte_Primary_Root_CA.pem - copied unchanged from r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA.pem head/secure/caroot/blacklisted/thawte_Primary_Root_CA_-_G2.pem - copied unchanged from r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G2.pem head/secure/caroot/blacklisted/thawte_Primary_Root_CA_-_G3.pem - copied unchanged from r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G3.pem head/secure/caroot/trusted/NAVER_Global_Root_Certification_Authority.pem (contents, props changed) Deleted: head/secure/caroot/trusted/GeoTrust_Global_CA.pem head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority.pem head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G3.pem head/secure/caroot/trusted/GeoTrust_Universal_CA.pem head/secure/caroot/trusted/GeoTrust_Universal_CA_2.pem head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem head/secure/caroot/trusted/thawte_Primary_Root_CA.pem head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G2.pem head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G3.pem Copied: head/secure/caroot/blacklisted/GeoTrust_Global_CA.pem (from r368554, head/secure/caroot/trusted/GeoTrust_Global_CA.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/GeoTrust_Global_CA.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/GeoTrust_Global_CA.pem) @@ -0,0 +1,90 @@ +## +## GeoTrust Global CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 144470 (0x23456) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = US, O = GeoTrust Inc., CN = GeoTrust Global CA + Validity + Not Before: May 21 04:00:00 2002 GMT + Not After : May 21 04:00:00 2022 GMT + Subject: C = US, O = GeoTrust Inc., CN = GeoTrust Global CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:da:cc:18:63:30:fd:f4:17:23:1a:56:7e:5b:df: + 3c:6c:38:e4:71:b7:78:91:d4:bc:a1:d8:4c:f8:a8: + 43:b6:03:e9:4d:21:07:08:88:da:58:2f:66:39:29: + bd:05:78:8b:9d:38:e8:05:b7:6a:7e:71:a4:e6:c4: + 60:a6:b0:ef:80:e4:89:28:0f:9e:25:d6:ed:83:f3: + ad:a6:91:c7:98:c9:42:18:35:14:9d:ad:98:46:92: + 2e:4f:ca:f1:87:43:c1:16:95:57:2d:50:ef:89:2d: + 80:7a:57:ad:f2:ee:5f:6b:d2:00:8d:b9:14:f8:14: + 15:35:d9:c0:46:a3:7b:72:c8:91:bf:c9:55:2b:cd: + d0:97:3e:9c:26:64:cc:df:ce:83:19:71:ca:4e:e6: + d4:d5:7b:a9:19:cd:55:de:c8:ec:d2:5e:38:53:e5: + 5c:4f:8c:2d:fe:50:23:36:fc:66:e6:cb:8e:a4:39: + 19:00:b7:95:02:39:91:0b:0e:fe:38:2e:d1:1d:05: + 9a:f6:4d:3e:6f:0f:07:1d:af:2c:1e:8f:60:39:e2: + fa:36:53:13:39:d4:5e:26:2b:db:3d:a8:14:bd:32: + eb:18:03:28:52:04:71:e5:ab:33:3d:e1:38:bb:07: + 36:84:62:9c:79:ea:16:30:f4:5f:c0:2b:e8:71:6b: + e4:f9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E + X509v3 Authority Key Identifier: + keyid:C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E + + Signature Algorithm: sha1WithRSAEncryption + 35:e3:29:6a:e5:2f:5d:54:8e:29:50:94:9f:99:1a:14:e4:8f: + 78:2a:62:94:a2:27:67:9e:d0:cf:1a:5e:47:e9:c1:b2:a4:cf: + dd:41:1a:05:4e:9b:4b:ee:4a:6f:55:52:b3:24:a1:37:0a:eb: + 64:76:2a:2e:2c:f3:fd:3b:75:90:bf:fa:71:d8:c7:3d:37:d2: + b5:05:95:62:b9:a6:de:89:3d:36:7b:38:77:48:97:ac:a6:20: + 8f:2e:a6:c9:0c:c2:b2:99:45:00:c7:ce:11:51:22:22:e0:a5: + ea:b6:15:48:09:64:ea:5e:4f:74:f7:05:3e:c7:8a:52:0c:db: + 15:b4:bd:6d:9b:e5:c6:b1:54:68:a9:e3:69:90:b6:9a:a5:0f: + b8:b9:3f:20:7d:ae:4a:b5:b8:9c:e4:1d:b6:ab:e6:94:a5:c1: + c7:83:ad:db:f5:27:87:0e:04:6c:d5:ff:dd:a0:5d:ed:87:52: + b7:2b:15:02:ae:39:a6:6a:74:e9:da:c4:e7:bc:4d:34:1e:a9: + 5c:4d:33:5f:92:09:2f:88:66:5d:77:97:c7:1d:76:13:a9:d5: + e5:f1:16:09:11:35:d5:ac:db:24:71:70:2c:98:56:0b:d9:17: + b4:d1:e3:51:2b:5e:75:e8:d5:d0:dc:4f:34:ed:c2:05:66:80: + a1:cb:e6:33 +SHA1 Fingerprint=DE:28:F4:A4:FF:E5:B9:2F:A3:C5:03:D1:A3:49:A7:F9:96:2A:82:12 +-----BEGIN CERTIFICATE----- +MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT +MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i +YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG +EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg +R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 +9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq +fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv +iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU +1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ +bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW +MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA +ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l +uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn +Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS +tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF +PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un +hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV +5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority.pem (from r368554, head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority.pem) @@ -0,0 +1,91 @@ +## +## GeoTrust Primary Certification Authority +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 18:ac:b5:6a:fd:69:b6:15:3a:63:6c:af:da:fa:c4:a1 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = US, O = GeoTrust Inc., CN = GeoTrust Primary Certification Authority + Validity + Not Before: Nov 27 00:00:00 2006 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C = US, O = GeoTrust Inc., CN = GeoTrust Primary Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:be:b8:15:7b:ff:d4:7c:7d:67:ad:83:64:7b:c8: + 42:53:2d:df:f6:84:08:20:61:d6:01:59:6a:9c:44: + 11:af:ef:76:fd:95:7e:ce:61:30:bb:7a:83:5f:02: + bd:01:66:ca:ee:15:8d:6f:a1:30:9c:bd:a1:85:9e: + 94:3a:f3:56:88:00:31:cf:d8:ee:6a:96:02:d9:ed: + 03:8c:fb:75:6d:e7:ea:b8:55:16:05:16:9a:f4:e0: + 5e:b1:88:c0:64:85:5c:15:4d:88:c7:b7:ba:e0:75: + e9:ad:05:3d:9d:c7:89:48:e0:bb:28:c8:03:e1:30: + 93:64:5e:52:c0:59:70:22:35:57:88:8a:f1:95:0a: + 83:d7:bc:31:73:01:34:ed:ef:46:71:e0:6b:02:a8: + 35:72:6b:97:9b:66:e0:cb:1c:79:5f:d8:1a:04:68: + 1e:47:02:e6:9d:60:e2:36:97:01:df:ce:35:92:df: + be:67:c7:6d:77:59:3b:8f:9d:d6:90:15:94:bc:42: + 34:10:c1:39:f9:b1:27:3e:7e:d6:8a:75:c5:b2:af: + 96:d3:a2:de:9b:e4:98:be:7d:e1:e9:81:ad:b6:6f: + fc:d7:0e:da:e0:34:b0:0d:1a:77:e7:e3:08:98:ef: + 58:fa:9c:84:b7:36:af:c2:df:ac:d2:f4:10:06:70: + 71:35 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 2C:D5:50:41:97:15:8B:F0:8F:36:61:5B:4A:FB:6B:D9:99:C9:33:92 + Signature Algorithm: sha1WithRSAEncryption + 5a:70:7f:2c:dd:b7:34:4f:f5:86:51:a9:26:be:4b:b8:aa:f1: + 71:0d:dc:61:c7:a0:ea:34:1e:7a:77:0f:04:35:e8:27:8f:6c: + 90:bf:91:16:24:46:3e:4a:4e:ce:2b:16:d5:0b:52:1d:fc:1f: + 67:a2:02:45:31:4f:ce:f3:fa:03:a7:79:9d:53:6a:d9:da:63: + 3a:f8:80:d7:d3:99:e1:a5:e1:be:d4:55:71:98:35:3a:be:93: + ea:ae:ad:42:b2:90:6f:e0:fc:21:4d:35:63:33:89:49:d6:9b: + 4e:ca:c7:e7:4e:09:00:f7:da:c7:ef:99:62:99:77:b6:95:22: + 5e:8a:a0:ab:f4:b8:78:98:ca:38:19:99:c9:72:9e:78:cd:4b: + ac:af:19:a0:73:12:2d:fc:c2:41:ba:81:91:da:16:5a:31:b7: + f9:b4:71:80:12:48:99:72:73:5a:59:53:c1:63:52:33:ed:a7: + c9:d2:39:02:70:fa:e0:b1:42:66:29:aa:9b:51:ed:30:54:22: + 14:5f:d9:ab:1d:c1:e4:94:f0:f8:f5:2b:f7:ea:ca:78:46:d6: + b8:91:fd:a6:0d:2b:1a:14:01:3e:80:f0:42:a0:95:07:5e:6d: + cd:cc:4b:a4:45:8d:ab:12:e8:b3:de:5a:e5:a0:7c:e8:0f:22: + 1d:5a:e9:59 +SHA1 Fingerprint=32:3C:11:8E:1B:F7:B8:B6:52:54:E2:E2:10:0D:D6:02:90:37:F0:96 +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY +MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo +R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx +MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK +Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC +AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9 +AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA +ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0 +7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W +kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI +mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ +KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1 +6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl +4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K +oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj +UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU +AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G3.pem (from r368554, head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G3.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/GeoTrust_Primary_Certification_Authority_-_G3.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G3.pem) @@ -0,0 +1,94 @@ +## +## GeoTrust Primary Certification Authority - G3 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 15:ac:6e:94:19:b2:79:4b:41:f6:27:a9:c3:18:0f:1f + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = US, O = GeoTrust Inc., OU = (c) 2008 GeoTrust Inc. - For authorized use only, CN = GeoTrust Primary Certification Authority - G3 + Validity + Not Before: Apr 2 00:00:00 2008 GMT + Not After : Dec 1 23:59:59 2037 GMT + Subject: C = US, O = GeoTrust Inc., OU = (c) 2008 GeoTrust Inc. - For authorized use only, CN = GeoTrust Primary Certification Authority - G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:dc:e2:5e:62:58:1d:33:57:39:32:33:fa:eb:cb: + 87:8c:a7:d4:4a:dd:06:88:ea:64:8e:31:98:a5:38: + 90:1e:98:cf:2e:63:2b:f0:46:bc:44:b2:89:a1:c0: + 28:0c:49:70:21:95:9f:64:c0:a6:93:12:02:65:26: + 86:c6:a5:89:f0:fa:d7:84:a0:70:af:4f:1a:97:3f: + 06:44:d5:c9:eb:72:10:7d:e4:31:28:fb:1c:61:e6: + 28:07:44:73:92:22:69:a7:03:88:6c:9d:63:c8:52: + da:98:27:e7:08:4c:70:3e:b4:c9:12:c1:c5:67:83: + 5d:33:f3:03:11:ec:6a:d0:53:e2:d1:ba:36:60:94: + 80:bb:61:63:6c:5b:17:7e:df:40:94:1e:ab:0d:c2: + 21:28:70:88:ff:d6:26:6c:6c:60:04:25:4e:55:7e: + 7d:ef:bf:94:48:de:b7:1d:dd:70:8d:05:5f:88:a5: + 9b:f2:c2:ee:ea:d1:40:41:6d:62:38:1d:56:06:c5: + 03:47:51:20:19:fc:7b:10:0b:0e:62:ae:76:55:bf: + 5f:77:be:3e:49:01:53:3d:98:25:03:76:24:5a:1d: + b4:db:89:ea:79:e5:b6:b3:3b:3f:ba:4c:28:41:7f: + 06:ac:6a:8e:c1:d0:f6:05:1d:7d:e6:42:86:e3:a5: + d5:47 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + C4:79:CA:8E:A1:4E:03:1D:1C:DC:6B:DB:31:5B:94:3E:3F:30:7F:2D + Signature Algorithm: sha256WithRSAEncryption + 2d:c5:13:cf:56:80:7b:7a:78:bd:9f:ae:2c:99:e7:ef:da:df: + 94:5e:09:69:a7:e7:6e:68:8c:bd:72:be:47:a9:0e:97:12:b8: + 4a:f1:64:d3:39:df:25:34:d4:c1:cd:4e:81:f0:0f:04:c4:24: + b3:34:96:c6:a6:aa:30:df:68:61:73:d7:f9:8e:85:89:ef:0e: + 5e:95:28:4a:2a:27:8f:10:8e:2e:7c:86:c4:02:9e:da:0c:77: + 65:0e:44:0d:92:fd:fd:b3:16:36:fa:11:0d:1d:8c:0e:07:89: + 6a:29:56:f7:72:f4:dd:15:9c:77:35:66:57:ab:13:53:d8:8e: + c1:40:c5:d7:13:16:5a:72:c7:b7:69:01:c4:7a:b1:83:01:68: + 7d:8d:41:a1:94:18:c1:25:5c:fc:f0:fe:83:02:87:7c:0d:0d: + cf:2e:08:5c:4a:40:0d:3e:ec:81:61:e6:24:db:ca:e0:0e:2d: + 07:b2:3e:56:dc:8d:f5:41:85:07:48:9b:0c:0b:cb:49:3f:7d: + ec:b7:fd:cb:8d:67:89:1a:ab:ed:bb:1e:a3:00:08:08:17:2a: + 82:5c:31:5d:46:8a:2d:0f:86:9b:74:d9:45:fb:d4:40:b1:7a: + aa:68:2d:86:b2:99:22:e1:c1:2b:c7:9c:f8:f3:5f:a8:82:12: + eb:19:11:2d +SHA1 Fingerprint=03:9E:ED:B8:0B:E7:A0:3C:69:53:89:3B:20:D2:D9:32:3A:4C:2A:FD +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB +mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT +MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s +eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv +cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ +BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg +MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0 +BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg +LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz ++uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm +hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn +5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W +JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL +DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC +huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw +HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB +AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB +zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN +kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD +AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH +SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G +spki4cErx5z481+oghLrGREt +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/GeoTrust_Universal_CA.pem (from r368554, head/secure/caroot/trusted/GeoTrust_Universal_CA.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/GeoTrust_Universal_CA.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/GeoTrust_Universal_CA.pem) @@ -0,0 +1,134 @@ +## +## GeoTrust Universal CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = US, O = GeoTrust Inc., CN = GeoTrust Universal CA + Validity + Not Before: Mar 4 05:00:00 2004 GMT + Not After : Mar 4 05:00:00 2029 GMT + Subject: C = US, O = GeoTrust Inc., CN = GeoTrust Universal CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:a6:15:55:a0:a3:c6:e0:1f:8c:9d:21:50:d7:c1: + be:2b:5b:b5:a4:9e:a1:d9:72:58:bd:00:1b:4c:bf: + 61:c9:14:1d:45:82:ab:c6:1d:80:d6:3d:eb:10:9c: + 3a:af:6d:24:f8:bc:71:01:9e:06:f5:7c:5f:1e:c1: + 0e:55:ca:83:9a:59:30:ae:19:cb:30:48:95:ed:22: + 37:8d:f4:4a:9a:72:66:3e:ad:95:c0:e0:16:00:e0: + 10:1f:2b:31:0e:d7:94:54:d3:42:33:a0:34:1d:1e: + 45:76:dd:4f:ca:18:37:ec:85:15:7a:19:08:fc:d5: + c7:9c:f0:f2:a9:2e:10:a9:92:e6:3d:58:3d:a9:16: + 68:3c:2f:75:21:18:7f:28:77:a5:e1:61:17:b7:a6: + e9:f8:1e:99:db:73:6e:f4:0a:a2:21:6c:ee:da:aa: + 85:92:66:af:f6:7a:6b:82:da:ba:22:08:35:0f:cf: + 42:f1:35:fa:6a:ee:7e:2b:25:cc:3a:11:e4:6d:af: + 73:b2:76:1d:ad:d0:b2:78:67:1a:a4:39:1c:51:0b: + 67:56:83:fd:38:5d:0d:ce:dd:f0:bb:2b:96:1f:de: + 7b:32:52:fd:1d:bb:b5:06:a1:b2:21:5e:a5:d6:95: + 68:7f:f0:99:9e:dc:45:08:3e:e7:d2:09:0d:35:94: + dd:80:4e:53:97:d7:b5:09:44:20:64:16:17:03:02: + 4c:53:0d:68:de:d5:aa:72:4d:93:6d:82:0e:db:9c: + bd:cf:b4:f3:5c:5d:54:7a:69:09:96:d6:db:11:c1: + 8d:75:a8:b4:cf:39:c8:ce:3c:bc:24:7c:e6:62:ca: + e1:bd:7d:a7:bd:57:65:0b:e4:fe:25:ed:b6:69:10: + dc:28:1a:46:bd:01:1d:d0:97:b5:e1:98:3b:c0:37: + 64:d6:3d:94:ee:0b:e1:f5:28:ae:0b:56:bf:71:8b: + 23:29:41:8e:86:c5:4b:52:7b:d8:71:ab:1f:8a:15: + a6:3b:83:5a:d7:58:01:51:c6:4c:41:d9:7f:d8:41: + 67:72:a2:28:df:60:83:a9:9e:c8:7b:fc:53:73:72: + 59:f5:93:7a:17:76:0e:ce:f7:e5:5c:d9:0b:55:34: + a2:aa:5b:b5:6a:54:e7:13:ca:57:ec:97:6d:f4:5e: + 06:2f:45:8b:58:d4:23:16:92:e4:16:6e:28:63:59: + 30:df:50:01:9c:63:89:1a:9f:db:17:94:82:70:37: + c3:24:9e:9a:47:d6:5a:ca:4e:a8:69:89:72:1f:91: + 6c:db:7e:9e:1b:ad:c7:1f:73:dd:2c:4f:19:65:fd: + 7f:93:40:10:2e:d2:f0:ed:3c:9e:2e:28:3e:69:26: + 33:c5:7b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + DA:BB:2E:AA:B0:0C:B8:88:26:51:74:5C:6D:03:D3:C0:D8:8F:7A:D6 + X509v3 Authority Key Identifier: + keyid:DA:BB:2E:AA:B0:0C:B8:88:26:51:74:5C:6D:03:D3:C0:D8:8F:7A:D6 + + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 31:78:e6:c7:b5:df:b8:94:40:c9:71:c4:a8:35:ec:46:1d:c2: + 85:f3:28:58:86:b0:0b:fc:8e:b2:39:8f:44:55:ab:64:84:5c: + 69:a9:d0:9a:38:3c:fa:e5:1f:35:e5:44:e3:80:79:94:68:a4: + bb:c4:9f:3d:e1:34:cd:30:46:8b:54:2b:95:a5:ef:f7:3f:99: + 84:fd:35:e6:cf:31:c6:dc:6a:bf:a7:d7:23:08:e1:98:5e:c3: + 5a:08:76:a9:a6:af:77:2f:b7:60:bd:44:46:6a:ef:97:ff:73: + 95:c1:8e:e8:93:fb:fd:31:b7:ec:57:11:11:45:9b:30:f1:1a: + 88:39:c1:4f:3c:a7:00:d5:c7:fc:ab:6d:80:22:70:a5:0c:e0: + 5d:04:29:02:fb:cb:a0:91:d1:7c:d6:c3:7e:50:d5:9d:58:be: + 41:38:eb:b9:75:3c:15:d9:9b:c9:4a:83:59:c0:da:53:fd:33: + bb:36:18:9b:85:0f:15:dd:ee:2d:ac:76:93:b9:d9:01:8d:48: + 10:a8:fb:f5:38:86:f1:db:0a:c6:bd:84:a3:23:41:de:d6:77: + 6f:85:d4:85:1c:50:e0:ae:51:8a:ba:8d:3e:76:e2:b9:ca:27: + f2:5f:9f:ef:6e:59:0d:06:d8:2b:17:a4:d2:7c:6b:bb:5f:14: + 1a:48:8f:1a:4c:e7:b3:47:1c:8e:4c:45:2b:20:ee:48:df:e7: + dd:09:8e:18:a8:da:40:8d:92:26:11:53:61:73:5d:eb:bd:e7: + c4:4d:29:37:61:eb:ac:39:2d:67:2e:16:d6:f5:00:83:85:a1: + cc:7f:76:c4:7d:e4:b7:4b:66:ef:03:45:60:69:b6:0c:52:96: + 92:84:5e:a6:a3:b5:a4:3e:2b:d9:cc:d8:1b:47:aa:f2:44:da: + 4f:f9:03:e8:f0:14:cb:3f:f3:83:de:d0:c1:54:e3:b7:e8:0a: + 37:4d:8b:20:59:03:30:19:a1:2c:c8:bd:11:1f:df:ae:c9:4a: + c5:f3:27:66:66:86:ac:68:91:ff:d9:e6:53:1c:0f:8b:5c:69: + 65:0a:26:c8:1e:34:c3:5d:51:7b:d7:a9:9c:06:a1:36:dd:d5: + 89:94:bc:d9:e4:2d:0c:5e:09:6c:08:97:7c:a3:3d:7c:93:ff: + 3f:a1:14:a7:cf:b5:5d:eb:db:db:1c:c4:76:df:88:b9:bd:45: + 05:95:1b:ae:fc:46:6a:4c:af:48:e3:ce:ae:0f:d2:7e:eb:e6: + 6c:9c:4f:81:6a:7a:64:ac:bb:3e:d5:e7:cb:76:2e:c5:a7:48: + c1:5c:90:0f:cb:c8:3f:fa:e6:32:e1:8d:1b:6f:a4:e6:8e:d8: + f9:29:48:8a:ce:73:fe:2c +SHA1 Fingerprint=E6:21:F3:35:43:79:05:9A:4B:68:30:9D:8A:2F:74:22:15:87:EC:79 +-----BEGIN CERTIFICATE----- +MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW +MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy +c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE +BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0 +IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV +VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8 +cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT +QjOgNB0eRXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFh +F7em6fgemdtzbvQKoiFs7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2v +c7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d8Lsrlh/eezJS/R27tQahsiFepdaVaH/w +mZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7VqnJNk22CDtucvc+081xd +VHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3CgaRr0BHdCX +teGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZ +f9hBZ3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfRe +Bi9Fi1jUIxaS5BZuKGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+ +nhutxx9z3SxPGWX9f5NAEC7S8O08ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB +/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0XG0D08DYj3rWMB8GA1UdIwQY +MBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG +9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc +aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fX +IwjhmF7DWgh2qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzyn +ANXH/KttgCJwpQzgXQQpAvvLoJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0z +uzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsKxr2EoyNB3tZ3b4XUhRxQ4K5RirqN +Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja +QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW +koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9 +ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt +DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm +bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw= +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/GeoTrust_Universal_CA_2.pem (from r368554, head/secure/caroot/trusted/GeoTrust_Universal_CA_2.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/GeoTrust_Universal_CA_2.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/GeoTrust_Universal_CA_2.pem) @@ -0,0 +1,134 @@ +## +## GeoTrust Universal CA 2 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = US, O = GeoTrust Inc., CN = GeoTrust Universal CA 2 + Validity + Not Before: Mar 4 05:00:00 2004 GMT + Not After : Mar 4 05:00:00 2029 GMT + Subject: C = US, O = GeoTrust Inc., CN = GeoTrust Universal CA 2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:b3:54:52:c1:c9:3e:f2:d9:dc:b1:53:1a:59:29: + e7:b1:c3:45:28:e5:d7:d1:ed:c5:c5:4b:a1:aa:74: + 7b:57:af:4a:26:fc:d8:f5:5e:a7:6e:19:db:74:0c: + 4f:35:5b:32:0b:01:e3:db:eb:7a:77:35:ea:aa:5a: + e0:d6:e8:a1:57:94:f0:90:a3:74:56:94:44:30:03: + 1e:5c:4e:2b:85:26:74:82:7a:0c:76:a0:6f:4d:ce: + 41:2d:a0:15:06:14:5f:b7:42:cd:7b:8f:58:61:34: + dc:2a:08:f9:2e:c3:01:a6:22:44:1c:4c:07:82:e6: + 5b:ce:d0:4a:7c:04:d3:19:73:27:f0:aa:98:7f:2e: + af:4e:eb:87:1e:24:77:6a:5d:b6:e8:5b:45:ba:dc: + c3:a1:05:6f:56:8e:8f:10:26:a5:49:c3:2e:d7:41: + 87:22:e0:4f:86:ca:60:b5:ea:a1:63:c0:01:97:10: + 79:bd:00:3c:12:6d:2b:15:b1:ac:4b:b1:ee:18:b9: + 4e:96:dc:dc:76:ff:3b:be:cf:5f:03:c0:fc:3b:e8: + be:46:1b:ff:da:40:c2:52:f7:fe:e3:3a:f7:6a:77: + 35:d0:da:8d:eb:5e:18:6a:31:c7:1e:ba:3c:1b:28: + d6:6b:54:c6:aa:5b:d7:a2:2c:1b:19:cc:a2:02:f6: + 9b:59:bd:37:6b:86:b5:6d:82:ba:d8:ea:c9:56:bc: + a9:36:58:fd:3e:19:f3:ed:0c:26:a9:93:38:f8:4f: + c1:5d:22:06:d0:97:ea:e1:ad:c6:55:e0:81:2b:28: + 83:3a:fa:f4:7b:21:51:00:be:52:38:ce:cd:66:79: + a8:f4:81:56:e2:d0:83:09:47:51:5b:50:6a:cf:db: + 48:1a:5d:3e:f7:cb:f6:65:f7:6c:f1:95:f8:02:3b: + 32:56:82:39:7a:5b:bd:2f:89:1b:bf:a1:b4:e8:ff: + 7f:8d:8c:df:03:f1:60:4e:58:11:4c:eb:a3:3f:10: + 2b:83:9a:01:73:d9:94:6d:84:00:27:66:ac:f0:70: + 40:09:42:92:ad:4f:93:0d:61:09:51:24:d8:92:d5: + 0b:94:61:b2:87:b2:ed:ff:9a:35:ff:85:54:ca:ed: + 44:43:ac:1b:3c:16:6b:48:4a:0a:1c:40:88:1f:92: + c2:0b:00:05:ff:f2:c8:02:4a:a4:aa:a9:cc:99:96: + 9c:2f:58:e0:7d:e1:be:bb:07:dc:5f:04:72:5c:31: + 34:c3:ec:5f:2d:e0:3d:64:90:22:e6:d1:ec:b8:2e: + dd:59:ae:d9:a1:37:bf:54:35:dc:73:32:4f:8c:04: + 1e:33:b2:c9:46:f1:d8:5c:c8:55:50:c9:68:bd:a8: + ba:36:09 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 76:F3:55:E1:FA:A4:36:FB:F0:9F:5C:62:71:ED:3C:F4:47:38:10:2B + X509v3 Authority Key Identifier: + keyid:76:F3:55:E1:FA:A4:36:FB:F0:9F:5C:62:71:ED:3C:F4:47:38:10:2B + + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 66:c1:c6:23:f3:d9:e0:2e:6e:5f:e8:cf:ae:b0:b0:25:4d:2b: + f8:3b:58:9b:40:24:37:5a:cb:ab:16:49:ff:b3:75:79:33:a1: + 2f:6d:70:17:34:91:fe:67:7e:8f:ec:9b:e5:5e:82:a9:55:1f: + 2f:dc:d4:51:07:12:fe:ac:16:3e:2c:35:c6:63:fc:dc:10:eb: + 0d:a3:aa:d0:7c:cc:d1:d0:2f:51:2e:c4:14:5a:de:e8:19:e1: + 3e:c6:cc:a4:29:e7:2e:84:aa:06:30:78:76:54:73:28:98:59: + 38:e0:00:0d:62:d3:42:7d:21:9f:ae:3d:3a:8c:d5:fa:77:0d: + 18:2b:16:0e:5f:36:e1:fc:2a:b5:30:24:cf:e0:63:0c:7b:58: + 1a:fe:99:ba:42:12:b1:91:f4:7c:68:e2:c8:e8:af:2c:ea:c9: + 7e:ae:bb:2a:3d:0d:15:dc:34:95:b6:18:74:a8:6a:0f:c7:b4: + f4:13:c4:e4:5b:ed:0a:d2:a4:97:4c:2a:ed:2f:6c:12:89:3d: + f1:27:70:aa:6a:03:52:21:9f:40:a8:67:50:f2:f3:5a:1f:df: + df:23:f6:dc:78:4e:e6:98:4f:55:3a:53:e3:ef:f2:f4:9f:c7: + 7c:d8:58:af:29:22:97:b8:e0:bd:91:2e:b0:76:ec:57:11:cf: + ef:29:44:f3:e9:85:7a:60:63:e4:5d:33:89:17:d9:31:aa:da: + d6:f3:18:35:72:cf:87:2b:2f:63:23:84:5d:84:8c:3f:57:a0: + 88:fc:99:91:28:26:69:99:d4:8f:97:44:be:8e:d5:48:b1:a4: + 28:29:f1:15:b4:e1:e5:9e:dd:f8:8f:a6:6f:26:d7:09:3c:3a: + 1c:11:0e:a6:6c:37:f7:ad:44:87:2c:28:c7:d8:74:82:b3:d0: + 6f:4a:57:bb:35:29:27:a0:8b:e8:21:a7:87:64:36:5d:cc:d8: + 16:ac:c7:b2:27:40:92:55:38:28:8d:51:6e:dd:14:67:53:6c: + 71:5c:26:84:4d:75:5a:b6:7e:60:56:a9:4d:ad:fb:9b:1e:97: + f3:0d:d9:d2:97:54:77:da:3d:12:b7:e0:1e:ef:08:06:ac:f9: + 85:87:e9:a2:dc:af:7e:18:12:83:fd:56:17:41:2e:d5:29:82: + 7d:99:f4:31:f6:71:a9:cf:2c:01:27:a5:05:b9:aa:b2:48:4e: + 2a:ef:9f:93:52:51:95:3c:52:73:8e:56:4c:17:40:c0:09:28: + e4:8b:6a:48:53:db:ec:cd:55:55:f1:c6:f8:e9:a2:2c:4c:a6: + d1:26:5f:7e:af:5a:4c:da:1f:a6:f2:1c:2c:7e:ae:02:16:d2: + 56:d0:2f:57:53:47:e8:92 +SHA1 Fingerprint=37:9A:19:7B:41:85:45:35:0C:A6:03:69:F3:3C:2E:AF:47:4F:20:79 +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW +MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy +c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD +VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1 +c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0DE81 +WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUG +FF+3Qs17j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdq +XbboW0W63MOhBW9Wjo8QJqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxL +se4YuU6W3Nx2/zu+z18DwPw76L5GG//aQMJS9/7jOvdqdzXQ2o3rXhhqMcceujwb +KNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2WP0+GfPtDCapkzj4T8Fd +IgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP20gaXT73 +y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRt +hAAnZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgoc +QIgfksILAAX/8sgCSqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4 +Lt1ZrtmhN79UNdxzMk+MBB4zsslG8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAfBgNV +HSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8EBAMCAYYwDQYJ +KoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z +dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ +L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr +Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo +ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY +T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz +GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m +1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV +OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH +6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX +QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem (from r368554, head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem) @@ -0,0 +1,74 @@ +## +## VeriSign Class 3 Public Primary Certification Authority - G4 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 2f:80:fe:23:8c:0e:22:0f:48:67:12:28:91:87:ac:b3 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = "VeriSign, Inc.", OU = VeriSign Trust Network, OU = "(c) 2007 VeriSign, Inc. - For authorized use only", CN = VeriSign Class 3 Public Primary Certification Authority - G4 + Validity + Not Before: Nov 5 00:00:00 2007 GMT + Not After : Jan 18 23:59:59 2038 GMT + Subject: C = US, O = "VeriSign, Inc.", OU = VeriSign Trust Network, OU = "(c) 2007 VeriSign, Inc. - For authorized use only", CN = VeriSign Class 3 Public Primary Certification Authority - G4 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:a7:56:7a:7c:52:da:64:9b:0e:2d:5c:d8:5e:ac: + 92:3d:fe:01:e6:19:4a:3d:14:03:4b:fa:60:27:20: + d9:83:89:69:fa:54:c6:9a:18:5e:55:2a:64:de:06: + f6:8d:4a:3b:ad:10:3c:65:3d:90:88:04:89:e0:30: + 61:b3:ae:5d:01:a7:7b:de:7c:b2:be:ca:65:61:00: + 86:ae:da:8f:7b:d0:89:ad:4d:1d:59:9a:41:b1:bc: + 47:80:dc:9e:62:c3:f9 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + 1.3.6.1.5.5.7.1.12: + 0_.].[0Y0W0U..image/gif0!0.0...+..............k...j.H.,{..0%.#http://logo.verisign.com/vslogo.gif + X509v3 Subject Key Identifier: + B3:16:91:FD:EE:A6:6E:E4:B5:2E:49:8F:87:78:81:80:EC:E5:B1:B5 + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:30:66:21:0c:18:26:60:5a:38:7b:56:42:e0:a7:fc: + 36:84:51:91:20:2c:76:4d:43:3d:c4:1d:84:23:d0:ac:d6:7c: + 35:06:ce:cd:69:bd:90:0d:db:6c:48:42:1d:0e:aa:42:02:31: + 00:9c:3d:48:39:23:39:58:1a:15:12:59:6a:9e:ef:d5:59:b2: + 1d:52:2c:99:71:cd:c7:29:df:1b:2a:61:7b:71:d1:de:f3:c0: + e5:0d:3a:4a:aa:2d:a7:d8:86:2a:dd:2e:10 +SHA1 Fingerprint=22:D5:D8:DF:8F:02:31:D1:8D:F7:9D:B7:CF:8A:2D:64:C9:3F:6C:3A +-----BEGIN CERTIFICATE----- +MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW +ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp +U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y +aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG +A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp +U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg +SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln +biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm +GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve +fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ +aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj +aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW +kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC +4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga +FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem (from r368554, head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem) @@ -0,0 +1,100 @@ +## +## VeriSign Class 3 Public Primary Certification Authority - G5 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 18:da:d1:9e:26:7d:e8:bb:4a:21:58:cd:cc:6b:3b:4a + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = US, O = "VeriSign, Inc.", OU = VeriSign Trust Network, OU = "(c) 2006 VeriSign, Inc. - For authorized use only", CN = VeriSign Class 3 Public Primary Certification Authority - G5 + Validity + Not Before: Nov 8 00:00:00 2006 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C = US, O = "VeriSign, Inc.", OU = VeriSign Trust Network, OU = "(c) 2006 VeriSign, Inc. - For authorized use only", CN = VeriSign Class 3 Public Primary Certification Authority - G5 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:af:24:08:08:29:7a:35:9e:60:0c:aa:e7:4b:3b: + 4e:dc:7c:bc:3c:45:1c:bb:2b:e0:fe:29:02:f9:57: + 08:a3:64:85:15:27:f5:f1:ad:c8:31:89:5d:22:e8: + 2a:aa:a6:42:b3:8f:f8:b9:55:b7:b1:b7:4b:b3:fe: + 8f:7e:07:57:ec:ef:43:db:66:62:15:61:cf:60:0d: + a4:d8:de:f8:e0:c3:62:08:3d:54:13:eb:49:ca:59: + 54:85:26:e5:2b:8f:1b:9f:eb:f5:a1:91:c2:33:49: + d8:43:63:6a:52:4b:d2:8f:e8:70:51:4d:d1:89:69: + 7b:c7:70:f6:b3:dc:12:74:db:7b:5d:4b:56:d3:96: + bf:15:77:a1:b0:f4:a2:25:f2:af:1c:92:67:18:e5: + f4:06:04:ef:90:b9:e4:00:e4:dd:3a:b5:19:ff:02: + ba:f4:3c:ee:e0:8b:eb:37:8b:ec:f4:d7:ac:f2:f6: + f0:3d:af:dd:75:91:33:19:1d:1c:40:cb:74:24:19: + 21:93:d9:14:fe:ac:2a:52:c7:8f:d5:04:49:e4:8d: + 63:47:88:3c:69:83:cb:fe:47:bd:2b:7e:4f:c5:95: + ae:0e:9d:d4:d1:43:c0:67:73:e3:14:08:7e:e5:3f: + 9f:73:b8:33:0a:cf:5d:3f:34:87:96:8a:ee:53:e8: + 25:15 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + 1.3.6.1.5.5.7.1.12: + 0_.].[0Y0W0U..image/gif0!0.0...+..............k...j.H.,{..0%.#http://logo.verisign.com/vslogo.gif + X509v3 Subject Key Identifier: + 7F:D3:65:A7:C2:DD:EC:BB:F0:30:09:F3:43:39:FA:02:AF:33:31:33 + Signature Algorithm: sha1WithRSAEncryption + 93:24:4a:30:5f:62:cf:d8:1a:98:2f:3d:ea:dc:99:2d:bd:77: + f6:a5:79:22:38:ec:c4:a7:a0:78:12:ad:62:0e:45:70:64:c5: + e7:97:66:2d:98:09:7e:5f:af:d6:cc:28:65:f2:01:aa:08:1a: + 47:de:f9:f9:7c:92:5a:08:69:20:0d:d9:3e:6d:6e:3c:0d:6e: + d8:e6:06:91:40:18:b9:f8:c1:ed:df:db:41:aa:e0:96:20:c9: + cd:64:15:38:81:c9:94:ee:a2:84:29:0b:13:6f:8e:db:0c:dd: + 25:02:db:a4:8b:19:44:d2:41:7a:05:69:4a:58:4f:60:ca:7e: + 82:6a:0b:02:aa:25:17:39:b5:db:7f:e7:84:65:2a:95:8a:bd: + 86:de:5e:81:16:83:2d:10:cc:de:fd:a8:82:2a:6d:28:1f:0d: + 0b:c4:e5:e7:1a:26:19:e1:f4:11:6f:10:b5:95:fc:e7:42:05: + 32:db:ce:9d:51:5e:28:b6:9e:85:d3:5b:ef:a5:7d:45:40:72: + 8e:b7:0e:6b:0e:06:fb:33:35:48:71:b8:9d:27:8b:c4:65:5f: + 0d:86:76:9c:44:7a:f6:95:5c:f6:5d:32:08:33:a4:54:b6:18: + 3f:68:5c:f2:42:4a:85:38:54:83:5f:d1:e8:2c:f2:ac:11:d6: + a8:ed:63:6a +SHA1 Fingerprint=4E:B6:D5:78:49:9B:1C:CF:5F:58:1E:AD:56:BE:3D:9B:67:44:A5:E5 +-----BEGIN CERTIFICATE----- +MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB +yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL +ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp +U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW +ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW +ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp +U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y +aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1 +nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex +t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz +SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG +BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+ +rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/ +NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E +BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH +BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy +aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv +MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE +p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y +5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK +WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ +4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N +hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/thawte_Primary_Root_CA.pem (from r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/thawte_Primary_Root_CA.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA.pem) @@ -0,0 +1,95 @@ +## +## thawte Primary Root CA +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 34:4e:d5:57:20:d5:ed:ec:49:f4:2f:ce:37:db:2b:6d + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA + Validity + Not Before: Nov 17 00:00:00 2006 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:ac:a0:f0:fb:80:59:d4:9c:c7:a4:cf:9d:a1:59: + 73:09:10:45:0c:0d:2c:6e:68:f1:6c:5b:48:68:49: + 59:37:fc:0b:33:19:c2:77:7f:cc:10:2d:95:34:1c: + e6:eb:4d:09:a7:1c:d2:b8:c9:97:36:02:b7:89:d4: + 24:5f:06:c0:cc:44:94:94:8d:02:62:6f:eb:5a:dd: + 11:8d:28:9a:5c:84:90:10:7a:0d:bd:74:66:2f:6a: + 38:a0:e2:d5:54:44:eb:1d:07:9f:07:ba:6f:ee:e9: + fd:4e:0b:29:f5:3e:84:a0:01:f1:9c:ab:f8:1c:7e: + 89:a4:e8:a1:d8:71:65:0d:a3:51:7b:ee:bc:d2:22: + 60:0d:b9:5b:9d:df:ba:fc:51:5b:0b:af:98:b2:e9: + 2e:e9:04:e8:62:87:de:2b:c8:d7:4e:c1:4c:64:1e: + dd:cf:87:58:ba:4a:4f:ca:68:07:1d:1c:9d:4a:c6: + d5:2f:91:cc:7c:71:72:1c:c5:c0:67:eb:32:fd:c9: + 92:5c:94:da:85:c0:9b:bf:53:7d:2b:09:f4:8c:9d: + 91:1f:97:6a:52:cb:de:09:36:a4:77:d8:7b:87:50: + 44:d5:3e:6e:29:69:fb:39:49:26:1e:09:a5:80:7b: + 40:2d:eb:e8:27:85:c9:fe:61:fd:7e:e6:7c:97:1d: + d5:9d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 7B:5B:45:CF:AF:CE:CB:7A:FD:31:92:1A:6A:B6:F3:46:EB:57:48:50 + Signature Algorithm: sha1WithRSAEncryption + 79:11:c0:4b:b3:91:b6:fc:f0:e9:67:d4:0d:6e:45:be:55:e8: + 93:d2:ce:03:3f:ed:da:25:b0:1d:57:cb:1e:3a:76:a0:4c:ec: + 50:76:e8:64:72:0c:a4:a9:f1:b8:8b:d6:d6:87:84:bb:32:e5: + 41:11:c0:77:d9:b3:60:9d:eb:1b:d5:d1:6e:44:44:a9:a6:01: + ec:55:62:1d:77:b8:5c:8e:48:49:7c:9c:3b:57:11:ac:ad:73: + 37:8e:2f:78:5c:90:68:47:d9:60:60:e6:fc:07:3d:22:20:17: + c4:f7:16:e9:c4:d8:72:f9:c8:73:7c:df:16:2f:15:a9:3e:fd: + 6a:27:b6:a1:eb:5a:ba:98:1f:d5:e3:4d:64:0a:9d:13:c8:61: + ba:f5:39:1c:87:ba:b8:bd:7b:22:7f:f6:fe:ac:40:79:e5:ac: + 10:6f:3d:8f:1b:79:76:8b:c4:37:b3:21:18:84:e5:36:00:eb: + 63:20:99:b9:e9:fe:33:04:bb:41:c8:c1:02:f9:44:63:20:9e: + 81:ce:42:d3:d6:3f:2c:76:d3:63:9c:59:dd:8f:a6:e1:0e:a0: + 2e:41:f7:2e:95:47:cf:bc:fd:33:f3:f6:0b:61:7e:7e:91:2b: + 81:47:c2:27:30:ee:a7:10:5d:37:8f:5c:39:2b:e4:04:f0:7b: + 8d:56:8c:68 +SHA1 Fingerprint=91:C6:D6:EE:3E:8A:C8:63:84:E5:48:C2:99:29:5C:75:6C:81:7B:81 +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB +qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf +Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw +MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV +BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw +NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j +LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG +A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs +W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta +3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk +6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6 +Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J +NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP +r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU +DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz +YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX +xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2 +/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/ +LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7 +jVaMaA== +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/thawte_Primary_Root_CA_-_G2.pem (from r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G2.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/thawte_Primary_Root_CA_-_G2.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G2.pem) @@ -0,0 +1,67 @@ +## +## thawte Primary Root CA - G2 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 35:fc:26:5c:d9:84:4f:c9:3d:26:3d:57:9b:ae:d7:56 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = "thawte, Inc.", OU = "(c) 2007 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA - G2 + Validity + Not Before: Nov 5 00:00:00 2007 GMT + Not After : Jan 18 23:59:59 2038 GMT + Subject: C = US, O = "thawte, Inc.", OU = "(c) 2007 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA - G2 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:a2:d5:9c:82:7b:95:9d:f1:52:78:87:fe:8a:16: + bf:05:e6:df:a3:02:4f:0d:07:c6:00:51:ba:0c:02: + 52:2d:22:a4:42:39:c4:fe:8f:ea:c9:c1:be:d4:4d: + ff:9f:7a:9e:e2:b1:7c:9a:ad:a7:86:09:73:87:d1: + e7:9a:e3:7a:a5:aa:6e:fb:ba:b3:70:c0:67:88:a2: + 35:d4:a3:9a:b1:fd:ad:c2:ef:31:fa:a8:b9:f3:fb: + 08:c6:91:d1:fb:29:95 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 9A:D8:00:30:00:E7:6B:7F:85:18:EE:8B:B6:CE:8A:0C:F8:11:E1:BB + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:dd:f8:e0:57:47:5b:a7:e6:0a:c3:bd:f5:80: + 8a:97:35:0d:1b:89:3c:54:86:77:28:ca:a1:f4:79:de:b5:e6: + 38:b0:f0:65:70:8c:7f:02:54:c2:bf:ff:d8:a1:3e:d9:cf:02: + 31:00:c4:8d:94:fc:dc:53:d2:dc:9d:78:16:1f:15:33:23:53: + 52:e3:5a:31:5d:9d:ca:ae:bd:13:29:44:0d:27:5b:a8:e7:68: + 9c:12:f7:58:3f:2e:72:02:57:a3:8f:a1:14:2e +SHA1 Fingerprint=AA:DB:BC:22:23:8F:C4:01:A1:27:BB:38:DD:F4:1D:DB:08:9E:F0:12 +-----BEGIN CERTIFICATE----- +MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL +MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp +IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi +BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw +MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh +d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig +YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v +dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/ +BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6 +papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K +DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3 +KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox +XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== +-----END CERTIFICATE----- Copied: head/secure/caroot/blacklisted/thawte_Primary_Root_CA_-_G3.pem (from r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G3.pem) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/blacklisted/thawte_Primary_Root_CA_-_G3.pem Fri Dec 11 18:14:43 2020 (r368555, copy of r368554, head/secure/caroot/trusted/thawte_Primary_Root_CA_-_G3.pem) @@ -0,0 +1,95 @@ +## +## thawte Primary Root CA - G3 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 60:01:97:b7:46:a7:ea:b4:b4:9a:d6:4b:2f:f7:90:fb + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2008 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA - G3 + Validity + Not Before: Apr 2 00:00:00 2008 GMT + Not After : Dec 1 23:59:59 2037 GMT + Subject: C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2008 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA - G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (2048 bit) + Modulus: + 00:b2:bf:27:2c:fb:db:d8:5b:dd:78:7b:1b:9e:77: + 66:81:cb:3e:bc:7c:ae:f3:a6:27:9a:34:a3:68:31: + 71:38:33:62:e4:f3:71:66:79:b1:a9:65:a3:a5:8b: + d5:8f:60:2d:3f:42:cc:aa:6b:32:c0:23:cb:2c:41: + dd:e4:df:fc:61:9c:e2:73:b2:22:95:11:43:18:5f: + c4:b6:1f:57:6c:0a:05:58:22:c8:36:4c:3a:7c:a5: + d1:cf:86:af:88:a7:44:02:13:74:71:73:0a:42:59: + 02:f8:1b:14:6b:42:df:6f:5f:ba:6b:82:a2:9d:5b: + e7:4a:bd:1e:01:72:db:4b:74:e8:3b:7f:7f:7d:1f: + 04:b4:26:9b:e0:b4:5a:ac:47:3d:55:b8:d7:b0:26: + 52:28:01:31:40:66:d8:d9:24:bd:f6:2a:d8:ec:21: + 49:5c:9b:f6:7a:e9:7f:55:35:7e:96:6b:8d:93:93: + 27:cb:92:bb:ea:ac:40:c0:9f:c2:f8:80:cf:5d:f4: + 5a:dc:ce:74:86:a6:3e:6c:0b:53:ca:bd:92:ce:19: + 06:72:e6:0c:5c:38:69:c7:04:d6:bc:6c:ce:5b:f6: + f7:68:9c:dc:25:15:48:88:a1:e9:a9:f8:98:9c:e0: + f3:d5:31:28:61:11:6c:67:96:8d:39:99:cb:c2:45: + 24:39 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + AD:6C:AA:94:60:9C:ED:E4:FF:FA:3E:0A:74:2B:63:03:F7:B6:59:BF + Signature Algorithm: sha256WithRSAEncryption + 1a:40:d8:95:65:ac:09:92:89:c6:39:f4:10:e5:a9:0e:66:53: + 5d:78:de:fa:24:91:bb:e7:44:51:df:c6:16:34:0a:ef:6a:44: + 51:ea:2b:07:8a:03:7a:c3:eb:3f:0a:2c:52:16:a0:2b:43:b9: + 25:90:3f:70:a9:33:25:6d:45:1a:28:3b:27:cf:aa:c3:29:42: + 1b:df:3b:4c:c0:33:34:5b:41:88:bf:6b:2b:65:af:28:ef:b2: + f5:c3:aa:66:ce:7b:56:ee:b7:c8:cb:67:c1:c9:9c:1a:18:b8: + c4:c3:49:03:f1:60:0e:50:cd:46:c5:f3:77:79:f7:b6:15:e0: + 38:db:c7:2f:28:a0:0c:3f:77:26:74:d9:25:12:da:31:da:1a: + 1e:dc:29:41:91:22:3c:69:a7:bb:02:f2:b6:5c:27:03:89:f4: + 06:ea:9b:e4:72:82:e3:a1:09:c1:e9:00:19:d3:3e:d4:70:6b: + ba:71:a6:aa:58:ae:f4:bb:e9:6c:b6:ef:87:cc:9b:bb:ff:39: + e6:56:61:d3:0a:a7:c4:5c:4c:60:7b:05:77:26:7a:bf:d8:07: + 52:2c:62:f7:70:63:d9:39:bc:6f:1c:c2:79:dc:76:29:af:ce: + c5:2c:64:04:5e:88:36:6e:31:d4:40:1a:62:34:36:3f:35:01: + ae:ac:63:a0 +SHA1 Fingerprint=F1:8B:53:8D:1B:E9:03:B6:A6:F0:56:43:5B:17:15:89:CA:F3:6B:F2 +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB +rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf +Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw +MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV +BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa +Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl +LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u +MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl +ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm +gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8 +YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf +b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9 +9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S +zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk +OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA +2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW +oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu +t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 11 19:27:22 2020 Return-Path: Delivered-To: svn-src-all@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 0A9B14B86F4; Fri, 11 Dec 2020 19:27:22 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct1556tw0z4mfK; Fri, 11 Dec 2020 19:27:21 +0000 (UTC) (envelope-from fernape@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 DF4821032C; Fri, 11 Dec 2020 19:27:21 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBJRLHL000405; Fri, 11 Dec 2020 19:27:21 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBJRLHo000404; Fri, 11 Dec 2020 19:27:21 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202012111927.0BBJRLHo000404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Fri, 11 Dec 2020 19:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368556 - head/usr.bin/lock X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/lock X-SVN-Commit-Revision: 368556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 19:27:22 -0000 Author: fernape (ports committer) Date: Fri Dec 11 19:27:21 2020 New Revision: 368556 URL: https://svnweb.freebsd.org/changeset/base/368556 Log: lock(1): Add EXAMPLES section Add simple example showing the use of the flags: p, t, v Reviewed by: gbe@, yuripv@ Approved by: manpages (yuripv@) Differential Revision: https://reviews.freebsd.org/D27541 Modified: head/usr.bin/lock/lock.1 Modified: head/usr.bin/lock/lock.1 ============================================================================== --- head/usr.bin/lock/lock.1 Fri Dec 11 18:14:43 2020 (r368555) +++ head/usr.bin/lock/lock.1 Fri Dec 11 19:27:21 2020 (r368556) @@ -28,7 +28,7 @@ .\" @(#)lock.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 10, 2002 +.Dd December 11, 2020 .Dt LOCK 1 .Os .Sh NAME @@ -73,6 +73,11 @@ or .Xr vt 4 virtual terminal. .El +.Sh EXAMPLES +Lock the terminal for 5 minutes, disable switching virtual terminals and +require the user's login password to unlock: +.Pp +.Dl $ lock -p -t 5 -v .Sh SEE ALSO .Xr vidcontrol 1 , .Xr syscons 4 , From owner-svn-src-all@freebsd.org Fri Dec 11 19:45:41 2020 Return-Path: Delivered-To: svn-src-all@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 42F2A4B877A; Fri, 11 Dec 2020 19:45:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct1VF1PYRz4npv; Fri, 11 Dec 2020 19:45:41 +0000 (UTC) (envelope-from np@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 1EE5110364; Fri, 11 Dec 2020 19:45:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBJje6g012185; Fri, 11 Dec 2020 19:45:40 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBJje2p012184; Fri, 11 Dec 2020 19:45:40 GMT (envelope-from np@FreeBSD.org) Message-Id: <202012111945.0BBJje2p012184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 11 Dec 2020 19:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368557 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 19:45:41 -0000 Author: np Date: Fri Dec 11 19:45:40 2020 New Revision: 368557 URL: https://svnweb.freebsd.org/changeset/base/368557 Log: vnet.9: Use correct location of vnet.h. MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27557 Modified: head/share/man/man9/vnet.9 Modified: head/share/man/man9/vnet.9 ============================================================================== --- head/share/man/man9/vnet.9 Fri Dec 11 19:27:21 2020 (r368556) +++ head/share/man/man9/vnet.9 Fri Dec 11 19:45:40 2020 (r368557) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 2018 +.Dd December 10, 2020 .Dt VNET 9 .Os .Sh NAME @@ -38,7 +38,7 @@ .Cd "options VIMAGE" .Cd "options VNET_DEBUG" .Pp -.In sys/vnet.h +.In net/vnet.h .\"------------------------------------------------------------ .Ss "Constants and Global Variables" .\" From owner-svn-src-all@freebsd.org Fri Dec 11 20:01:45 2020 Return-Path: Delivered-To: svn-src-all@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 BDA814B8DC7; Fri, 11 Dec 2020 20:01:45 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct1rn53mFz4pZT; Fri, 11 Dec 2020 20:01:45 +0000 (UTC) (envelope-from mhorne@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 A0ADA10CF1; Fri, 11 Dec 2020 20:01:45 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBK1jXM021351; Fri, 11 Dec 2020 20:01:45 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBK1jJU021350; Fri, 11 Dec 2020 20:01:45 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012112001.0BBK1jJU021350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 11 Dec 2020 20:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368558 - head/sys/riscv/include X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/include X-SVN-Commit-Revision: 368558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 20:01:45 -0000 Author: mhorne Date: Fri Dec 11 20:01:45 2020 New Revision: 368558 URL: https://svnweb.freebsd.org/changeset/base/368558 Log: riscv: small counter(9) improvements Prefer atomics to critical section. This reduces the cost of the increment operation and removes the possibility of it being interrupted by counter_u64_zero(). Use CPU_FOREACH() macro to skip absent CPUs. Replace hand-rolled address calculation with zpcpu_get(). Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D27536 Modified: head/sys/riscv/include/counter.h Modified: head/sys/riscv/include/counter.h ============================================================================== --- head/sys/riscv/include/counter.h Fri Dec 11 19:45:40 2020 (r368557) +++ head/sys/riscv/include/counter.h Fri Dec 11 20:01:45 2020 (r368558) @@ -30,14 +30,12 @@ #define _MACHINE_COUNTER_H_ #include -#ifdef INVARIANTS -#include -#endif +#include #define EARLY_COUNTER &__pcpu[0].pc_early_dummy_counter -#define counter_enter() critical_enter() -#define counter_exit() critical_exit() +#define counter_enter() do {} while (0) +#define counter_exit() do {} while (0) #ifdef IN_SUBR_COUNTER_C static inline uint64_t @@ -54,19 +52,17 @@ counter_u64_fetch_inline(uint64_t *p) int i; r = 0; - for (i = 0; i < mp_ncpus; i++) - r += counter_u64_read_one((uint64_t *)p, i); + CPU_FOREACH(i) + r += counter_u64_read_one(p, i); return (r); } -/* XXXKIB might interrupt increment */ static void counter_u64_zero_one_cpu(void *arg) { - *((uint64_t *)((char *)arg + UMA_PCPU_ALLOC_SIZE * - PCPU_GET(cpuid))) = 0; + *(zpcpu_get((counter_u64_t *)arg)) = 0; } static inline void @@ -78,18 +74,13 @@ counter_u64_zero_inline(counter_u64_t c) } #endif -#define counter_u64_add_protected(c, inc) do { \ - CRITICAL_ASSERT(curthread); \ - *(uint64_t *)zpcpu_get(c) += (inc); \ -} while (0) +#define counter_u64_add_protected(c, inc) counter_u64_add(c, inc) static inline void counter_u64_add(counter_u64_t c, int64_t inc) { - counter_enter(); - counter_u64_add_protected(c, inc); - counter_exit(); + atomic_add_64((uint64_t *)zpcpu_get(c), inc); } #endif /* ! _MACHINE_COUNTER_H_ */ From owner-svn-src-all@freebsd.org Fri Dec 11 21:40:41 2020 Return-Path: Delivered-To: svn-src-all@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 C938B4BB99A; Fri, 11 Dec 2020 21:40:41 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct42x5HDYz4vZw; Fri, 11 Dec 2020 21:40:41 +0000 (UTC) (envelope-from brooks@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 A84A211EC8; Fri, 11 Dec 2020 21:40:41 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBLefco082630; Fri, 11 Dec 2020 21:40:41 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBLedDf082615; Fri, 11 Dec 2020 21:40:39 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012112140.0BBLedDf082615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 11 Dec 2020 21:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368559 - in head: . share/man/man4 sys/amd64/conf sys/conf sys/dev/hme sys/dev/sk sys/i386/conf sys/modules sys/modules/hme sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: . share/man/man4 sys/amd64/conf sys/conf sys/dev/hme sys/dev/sk sys/i386/conf sys/modules sys/modules/hme sys/netpfil/pf X-SVN-Commit-Revision: 368559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 21:40:41 -0000 Author: brooks Date: Fri Dec 11 21:40:38 2020 New Revision: 368559 URL: https://svnweb.freebsd.org/changeset/base/368559 Log: hme(4): Remove as previous announced The hme (Happy Meal Ethernet) driver was the onboard NIC in most supported sparc64 platforms. A few PCI NICs do exist, but we have seen no evidence of use on non-sparc systems. Reviewed by: imp, emaste, bcr Sponsored by: DARPA Deleted: head/share/man/man4/hme.4 head/sys/dev/hme/if_hme.c head/sys/dev/hme/if_hme_pci.c head/sys/dev/hme/if_hmereg.h head/sys/dev/hme/if_hmevar.h head/sys/modules/hme/Makefile Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/share/man/man4/altq.4 head/share/man/man4/miibus.4 head/share/man/man4/vlan.4 head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files head/sys/dev/sk/if_sk.c head/sys/i386/conf/GENERIC head/sys/modules/Makefile head/sys/netpfil/pf/pf.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Dec 11 20:01:45 2020 (r368558) +++ head/ObsoleteFiles.inc Fri Dec 11 21:40:38 2020 (r368559) @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20201211: hme(4) removed +OLD_FILES+=usr/share/man/man4/hme.4.gz +OLD_FILES+=usr/share/man/man4/if_hme.4.gz # 20201124: ping6(8) was merged into ping(8) OLD_FILES+=usr/lib/debug/sbin/ping6.debug OLD_FILES+=usr/share/man/man8/ping6.8.gz Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Dec 11 20:01:45 2020 (r368558) +++ head/share/man/man4/Makefile Fri Dec 11 21:40:38 2020 (r368559) @@ -180,7 +180,6 @@ MAN= aac.4 \ gre.4 \ h_ertt.4 \ hifn.4 \ - hme.4 \ hpet.4 \ ${_hpt27xx.4} \ ${_hptiop.4} \ @@ -665,7 +664,6 @@ MLINKS+=gpio.4 gpiobus.4 MLINKS+=gpioths.4 dht11.4 MLINKS+=gpioths.4 dht22.4 MLINKS+=gre.4 if_gre.4 -MLINKS+=hme.4 if_hme.4 MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Fri Dec 11 20:01:45 2020 (r368558) +++ head/share/man/man4/altq.4 Fri Dec 11 21:40:38 2020 (r368559) @@ -148,7 +148,6 @@ They have been applied to the following hardware drive .Xr et 4 , .Xr fxp 4 , .Xr gem 4 , -.Xr hme 4 , .Xr igb 4 , .Xr ixgbe 4 , .Xr jme 4 , Modified: head/share/man/man4/miibus.4 ============================================================================== --- head/share/man/man4/miibus.4 Fri Dec 11 20:01:45 2020 (r368558) +++ head/share/man/man4/miibus.4 Fri Dec 11 21:40:38 2020 (r368559) @@ -77,8 +77,6 @@ Agere ET1310 Gigabit Ethernet Intel EtherExpress PRO/100B .It Xr gem 4 Sun ERI, Sun GEM and Apple GMAC Ethernet -.It Xr hme 4 -Sun HME Ethernet .It Xr jme 4 JMicron JMC250 Gigabit/JMC260 Fast Ethernet .It Xr lge 4 @@ -157,7 +155,6 @@ but as a result are not well behaved newbus device dri .Xr et 4 , .Xr fxp 4 , .Xr gem 4 , -.Xr hme 4 , .Xr jme 4 , .Xr lge 4 , .Xr msk 4 , Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Fri Dec 11 20:01:45 2020 (r368558) +++ head/share/man/man4/vlan.4 Fri Dec 11 21:40:38 2020 (r368559) @@ -172,7 +172,6 @@ These interfaces natively support long frames for .Xr fwe 4 , .Xr fxp 4 , .Xr gem 4 , -.Xr hme 4 , .Xr le 4 , .Xr nfe 4 , .Xr rl 4 , Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/amd64/conf/GENERIC Fri Dec 11 21:40:38 2020 (r368559) @@ -271,7 +271,6 @@ device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) device gem # Sun GEM/Sun ERI/Apple GMAC -device hme # Sun HME (Happy Meal Ethernet) device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet device lge # Level 1 LXT1001 gigabit Ethernet device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/conf/NOTES Fri Dec 11 21:40:38 2020 (r368559) @@ -1867,7 +1867,6 @@ device xmphy # XaQti XMAC II # fxp: Intel EtherExpress Pro/100B # (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping) # gem: Apple GMAC/Sun ERI/Sun GEM -# hme: Sun HME (Happy Meal Ethernet) # jme: JMicron JMC260 Fast Ethernet/JMC250 Gigabit Ethernet based adapters. # le: AMD Am7900 LANCE and Am79C9xx PCnet # lge: Support for PCI gigabit ethernet adapters based on the Level 1 @@ -1956,7 +1955,6 @@ device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) envvar hint.fxp.0.prefer_iomap="0" device gem # Apple GMAC/Sun ERI/Sun GEM -device hme # Sun HME (Happy Meal Ethernet) device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet device lge # Level 1 LXT1001 gigabit Ethernet device mlxfw # Mellanox firmware update module Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/conf/files Fri Dec 11 21:40:38 2020 (r368559) @@ -1816,8 +1816,6 @@ dev/gpio/gpiobus_if.m optional gpio dev/gpio/gpiopps.c optional gpiopps fdt dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hifn/hifn7751.c optional hifn -dev/hme/if_hme.c optional hme -dev/hme/if_hme_pci.c optional hme pci dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc Modified: head/sys/dev/sk/if_sk.c ============================================================================== --- head/sys/dev/sk/if_sk.c Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/dev/sk/if_sk.c Fri Dec 11 21:40:38 2020 (r368559) @@ -272,9 +272,7 @@ TUNABLE_INT("hw.skc.jumbo_disable", &jumbo_disable); * UDP packets in Tx as the hardware can't differenciate UDP packets from * TCP packets. 0 chcecksum value for UDP packet is an invalid one as it * means sender didn't perforam checksum computation. For the safety I - * disabled UDP checksum offload capability at the moment. Alternatively - * we can intrduce a LINK0/LINK1 flag as hme(4) did in its Tx checksum - * offload routine. + * disabled UDP checksum offload capability at the moment. */ #define SK_CSUM_FEATURES (CSUM_TCP) Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/i386/conf/GENERIC Fri Dec 11 21:40:38 2020 (r368559) @@ -241,7 +241,6 @@ device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) device gem # Sun GEM/Sun ERI/Apple GMAC -device hme # Sun HME (Happy Meal Ethernet) device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet device lge # Level 1 LXT1001 gigabit Ethernet device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/modules/Makefile Fri Dec 11 21:40:38 2020 (r368559) @@ -130,7 +130,6 @@ SUBDIR= \ ${_glxsb} \ gpio \ hifn \ - hme \ ${_hpt27xx} \ ${_hptiop} \ ${_hptmv} \ Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Dec 11 20:01:45 2020 (r368558) +++ head/sys/netpfil/pf/pf.c Fri Dec 11 21:40:38 2020 (r368559) @@ -5666,7 +5666,7 @@ bad: * CSUM_DATA_VALID : * network driver performed cksum, needs to additional pseudo header * cksum computation with partial csum_data(i.e. lack of H/W support for - * pseudo header, for instance hme(4), sk(4) and possibly gem(4)) + * pseudo header, for instance sk(4) and possibly gem(4)) * * After validating the cksum of packet, set both flag CSUM_DATA_VALID and * CSUM_PSEUDO_HDR in order to avoid recomputation of the cksum in upper From owner-svn-src-all@freebsd.org Fri Dec 11 21:43:44 2020 Return-Path: Delivered-To: svn-src-all@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 E0AD04BBD56; Fri, 11 Dec 2020 21:43:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct46S61pvz3BrL; Fri, 11 Dec 2020 21:43:44 +0000 (UTC) (envelope-from brooks@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 C1B7311EF8; Fri, 11 Dec 2020 21:43:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBLhiEA088512; Fri, 11 Dec 2020 21:43:44 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBLhig2088511; Fri, 11 Dec 2020 21:43:44 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012112143.0BBLhig2088511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 11 Dec 2020 21:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368560 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 368560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 21:43:44 -0000 Author: brooks Date: Fri Dec 11 21:43:44 2020 New Revision: 368560 URL: https://svnweb.freebsd.org/changeset/base/368560 Log: Note removal of hme(4) Sponsored by: DARPA Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Fri Dec 11 21:40:38 2020 (r368559) +++ head/RELNOTES Fri Dec 11 21:43:44 2020 (r368560) @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r368559: + The hme(4) driver was removed. + r367660: Fixes the case where gssd will not startup because /usr is a separate local file system that is not yet mounted. It does not fix the case From owner-svn-src-all@freebsd.org Fri Dec 11 21:51:52 2020 Return-Path: Delivered-To: svn-src-all@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 011494BBF29; Fri, 11 Dec 2020 21:51:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct4Hq5c5Lz3CQY; Fri, 11 Dec 2020 21:51:51 +0000 (UTC) (envelope-from brooks@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 AA01D12426; Fri, 11 Dec 2020 21:51:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBLppEo094406; Fri, 11 Dec 2020 21:51:51 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBLpo0m093420; Fri, 11 Dec 2020 21:51:50 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012112151.0BBLpo0m093420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 11 Dec 2020 21:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368561 - in head: share/man/man4 sys/dev/if_ndis X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/if_ndis X-SVN-Commit-Revision: 368561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 21:51:52 -0000 Author: brooks Date: Fri Dec 11 21:51:50 2020 New Revision: 368561 URL: https://svnweb.freebsd.org/changeset/base/368561 Log: ndis(4): expand deprecation to the whole driver nids(4) was a clever idea in the early 2000's when the market was flooded with 10/100 NICs with Windows-only drivers, but that hasn't been the case for ages and the driver has had no meaningful maintenance in ages. It only supports Windows-XP era drivers. Reviewed by: imp, bcr MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27527 Modified: head/share/man/man4/ndis.4 head/sys/dev/if_ndis/if_ndis_pccard.c head/sys/dev/if_ndis/if_ndis_pci.c head/sys/dev/if_ndis/if_ndis_usb.c Modified: head/share/man/man4/ndis.4 ============================================================================== --- head/share/man/man4/ndis.4 Fri Dec 11 21:43:44 2020 (r368560) +++ head/share/man/man4/ndis.4 Fri Dec 11 21:51:50 2020 (r368561) @@ -121,7 +121,7 @@ which can be configured via the .Xr sysctl 8 command. .Sh DEPRECATION NOTICE -The PC Card attachment of this driver is scheduled for removal prior to the release of +This driver is scheduled for removal prior to the release of .Fx 13.0 .Sh DIAGNOSTICS .Bl -diag Modified: head/sys/dev/if_ndis/if_ndis_pccard.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis_pccard.c Fri Dec 11 21:43:44 2020 (r368560) +++ head/sys/dev/if_ndis/if_ndis_pccard.c Fri Dec 11 21:51:50 2020 (r368561) @@ -304,7 +304,7 @@ ndis_attach_pccard(dev) error = ndis_attach(dev); if (error == 0) - gone_in_dev(dev, 13, "pccard removed"); + gone_in_dev(dev, 13, "ndis removed"); fail: return(error); Modified: head/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis_pci.c Fri Dec 11 21:43:44 2020 (r368560) +++ head/sys/dev/if_ndis/if_ndis_pci.c Fri Dec 11 21:51:50 2020 (r368561) @@ -337,6 +337,9 @@ ndis_attach_pci(dev) sc->ndis_devidx = devidx; error = ndis_attach(dev); + if (error == 0) + gone_in_dev(dev, 13, "ndis removed"); + fail: return(error); Modified: head/sys/dev/if_ndis/if_ndis_usb.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis_usb.c Fri Dec 11 21:43:44 2020 (r368560) +++ head/sys/dev/if_ndis/if_ndis_usb.c Fri Dec 11 21:51:50 2020 (r368561) @@ -199,6 +199,8 @@ ndisusb_attach(device_t self) if (ndis_attach(self) != 0) return (ENXIO); + gone_in_dev(self, 13, "ndis removed"); + return (0); } From owner-svn-src-all@freebsd.org Fri Dec 11 22:51:45 2020 Return-Path: Delivered-To: svn-src-all@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 413F74BDD06; Fri, 11 Dec 2020 22:51:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5cx1QZvz3GdV; Fri, 11 Dec 2020 22:51:45 +0000 (UTC) (envelope-from rlibby@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 23CEA12CA5; Fri, 11 Dec 2020 22:51:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMpiOY029481; Fri, 11 Dec 2020 22:51:44 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMpilc029480; Fri, 11 Dec 2020 22:51:44 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112251.0BBMpilc029480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368562 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:51:45 -0000 Author: rlibby Date: Fri Dec 11 22:51:44 2020 New Revision: 368562 URL: https://svnweb.freebsd.org/changeset/base/368562 Log: cache_fplookup: quiet gcc -Wreturn-type Reviewed by: markj, mjg Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27555 Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Dec 11 21:51:50 2020 (r368561) +++ head/sys/kern/vfs_cache.c Fri Dec 11 22:51:44 2020 (r368562) @@ -4603,6 +4603,7 @@ out: cache_fpl_cleanup_cnp(cnp); return (error); } + __assert_unreachable(); } /* From owner-svn-src-all@freebsd.org Fri Dec 11 22:51:49 2020 Return-Path: Delivered-To: svn-src-all@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 43C704BDC93; Fri, 11 Dec 2020 22:51:49 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5d116yfz3Gk2; Fri, 11 Dec 2020 22:51:49 +0000 (UTC) (envelope-from rlibby@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 0FEF113011; Fri, 11 Dec 2020 22:51:49 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMpmIX029535; Fri, 11 Dec 2020 22:51:48 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMpmjx029534; Fri, 11 Dec 2020 22:51:48 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112251.0BBMpmjx029534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368563 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 368563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:51:49 -0000 Author: rlibby Date: Fri Dec 11 22:51:48 2020 New Revision: 368563 URL: https://svnweb.freebsd.org/changeset/base/368563 Log: ntb: quiet gcc -Wreturn-type Reviewed by: cem, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27553 Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Fri Dec 11 22:51:44 2020 (r368562) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Fri Dec 11 22:51:48 2020 (r368563) @@ -1309,6 +1309,7 @@ db_ioread(struct ntb_softc *ntb, uint64_t regoff) case NTB_XEON_GEN1: return (intel_ntb_reg_read(2, regoff)); } + __assert_unreachable(); } static inline void From owner-svn-src-all@freebsd.org Fri Dec 11 22:51:58 2020 Return-Path: Delivered-To: svn-src-all@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 B6CE54BDA49; Fri, 11 Dec 2020 22:51:58 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5d8603xz3Gn2; Fri, 11 Dec 2020 22:51:56 +0000 (UTC) (envelope-from rlibby@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 7364E12CA7; Fri, 11 Dec 2020 22:51:54 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMpsr9029588; Fri, 11 Dec 2020 22:51:54 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMpsVs029587; Fri, 11 Dec 2020 22:51:54 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112251.0BBMpsVs029587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368564 - head/sys/dev/qat X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/qat X-SVN-Commit-Revision: 368564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:51:59 -0000 Author: rlibby Date: Fri Dec 11 22:51:53 2020 New Revision: 368564 URL: https://svnweb.freebsd.org/changeset/base/368564 Log: qat: quiet -Wredundant-decls Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27554 Modified: head/sys/dev/qat/qat_ae.c Modified: head/sys/dev/qat/qat_ae.c ============================================================================== --- head/sys/dev/qat/qat_ae.c Fri Dec 11 22:51:48 2020 (r368563) +++ head/sys/dev/qat/qat_ae.c Fri Dec 11 22:51:53 2020 (r368564) @@ -82,8 +82,6 @@ static int qat_ae_write_4(struct qat_softc *, u_char, uint32_t); static int qat_ae_read_4(struct qat_softc *, u_char, bus_size_t, uint32_t *); -static int qat_ae_write_4(struct qat_softc *, u_char, bus_size_t, - uint32_t); static void qat_ae_ctx_indr_write(struct qat_softc *, u_char, uint32_t, bus_size_t, uint32_t); static int qat_ae_ctx_indr_read(struct qat_softc *, u_char, uint32_t, From owner-svn-src-all@freebsd.org Fri Dec 11 22:51:58 2020 Return-Path: Delivered-To: svn-src-all@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 D61C74BDC96; Fri, 11 Dec 2020 22:51:58 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5dB1j1kz3HDv; Fri, 11 Dec 2020 22:51:58 +0000 (UTC) (envelope-from rlibby@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 1229812DF2; Fri, 11 Dec 2020 22:51:58 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMpvJU030560; Fri, 11 Dec 2020 22:51:57 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMpvgD030544; Fri, 11 Dec 2020 22:51:57 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112251.0BBMpvgD030544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368565 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 368565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:51:59 -0000 Author: rlibby Date: Fri Dec 11 22:51:57 2020 New Revision: 368565 URL: https://svnweb.freebsd.org/changeset/base/368565 Log: ffs: quiet -Wstrict-prototypes Reviewed by: kib, markj, mckusick Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27558 Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Dec 11 22:51:53 2020 (r368564) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Dec 11 22:51:57 2020 (r368565) @@ -758,6 +758,7 @@ static struct malloc_type *memtype[] = { */ static void check_clear_deps(struct mount *); static void softdep_error(char *, int); +static int softdep_prerename_vnode(struct ufsmount *, struct vnode *); static int softdep_process_worklist(struct mount *, int); static int softdep_waitidle(struct mount *, int); static void drain_output(struct vnode *); From owner-svn-src-all@freebsd.org Fri Dec 11 22:52:09 2020 Return-Path: Delivered-To: svn-src-all@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 595A74BD9D3; Fri, 11 Dec 2020 22:52:09 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5dM4HPpz3H6Q; Fri, 11 Dec 2020 22:52:07 +0000 (UTC) (envelope-from rlibby@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 83E3E12CA8; Fri, 11 Dec 2020 22:52:04 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMq41f032030; Fri, 11 Dec 2020 22:52:04 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMq3AP032027; Fri, 11 Dec 2020 22:52:03 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112252.0BBMq3AP032027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368566 - in head/sys: dev/if_wg/include/sys dev/if_wg/module modules/if_wg X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head/sys: dev/if_wg/include/sys dev/if_wg/module modules/if_wg X-SVN-Commit-Revision: 368566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:52:09 -0000 Author: rlibby Date: Fri Dec 11 22:52:03 2020 New Revision: 368566 URL: https://svnweb.freebsd.org/changeset/base/368566 Log: if_wg: appease gcc - remove -ferror-limit option - quiet -Wredundant-decls Reviewed by: mmacy Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27559 Modified: head/sys/dev/if_wg/include/sys/if_wg_session_vars.h head/sys/dev/if_wg/include/sys/wg_module.h head/sys/dev/if_wg/module/if_wg_session.c head/sys/modules/if_wg/Makefile Modified: head/sys/dev/if_wg/include/sys/if_wg_session_vars.h ============================================================================== --- head/sys/dev/if_wg/include/sys/if_wg_session_vars.h Fri Dec 11 22:51:57 2020 (r368565) +++ head/sys/dev/if_wg/include/sys/if_wg_session_vars.h Fri Dec 11 22:52:03 2020 (r368566) @@ -274,9 +274,6 @@ struct wg_tag { int t_mtu; }; -int wg_route_add(struct wg_route_table *tbl, struct wg_peer *peer, - const struct wg_allowedip *cidr_); - struct wg_peer *wg_route_lookup(struct wg_route_table *, struct mbuf *, enum route_direction); Modified: head/sys/dev/if_wg/include/sys/wg_module.h ============================================================================== --- head/sys/dev/if_wg/include/sys/wg_module.h Fri Dec 11 22:51:57 2020 (r368565) +++ head/sys/dev/if_wg/include/sys/wg_module.h Fri Dec 11 22:52:03 2020 (r368566) @@ -47,8 +47,6 @@ #include #include -MALLOC_DECLARE(M_WG); - enum noise_lengths { NOISE_PUBLIC_KEY_LEN = CURVE25519_KEY_SIZE, Modified: head/sys/dev/if_wg/module/if_wg_session.c ============================================================================== --- head/sys/dev/if_wg/module/if_wg_session.c Fri Dec 11 22:51:57 2020 (r368565) +++ head/sys/dev/if_wg/module/if_wg_session.c Fri Dec 11 22:52:03 2020 (r368566) @@ -113,7 +113,6 @@ SYSCTL_INT(_net_wg, OID_AUTO, debug, CTLFLAG_RWTUN, &w #define DPRINTF(sc, ...) if (wireguard_debug) if_printf(sc->sc_ifp, ##__VA_ARGS__) /* Socket */ -int wg_socket_close(struct wg_socket *); static int wg_socket_bind(struct wg_softc *sc, struct wg_socket *); static int wg_send(struct wg_softc *, struct wg_endpoint *, struct mbuf *); @@ -145,9 +144,6 @@ static void wg_timers_disable(struct wg_timers *); /* Queue */ static int wg_queue_in(struct wg_peer *, struct mbuf *); static struct mbuf *wg_queue_dequeue(struct wg_queue *, struct wg_tag **); - -/* Route */ -void wg_route_destroy(struct wg_route_table *); /* Cookie */ Modified: head/sys/modules/if_wg/Makefile ============================================================================== --- head/sys/modules/if_wg/Makefile Fri Dec 11 22:51:57 2020 (r368565) +++ head/sys/modules/if_wg/Makefile Fri Dec 11 22:52:03 2020 (r368566) @@ -14,7 +14,6 @@ ZINCDIR= ${SRCTOP}/sys/dev/if_wg/module/crypto/zinc CFLAGS+= -I${INCDIR} CFLAGS+= -D__KERNEL__ -CFLAGS+= -ferror-limit=7 DEBUG_FLAGS=-g From owner-svn-src-all@freebsd.org Fri Dec 11 22:52:13 2020 Return-Path: Delivered-To: svn-src-all@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 1C6DA4BDD19; Fri, 11 Dec 2020 22:52:13 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5dS3StHz3GwV; Fri, 11 Dec 2020 22:52:12 +0000 (UTC) (envelope-from rlibby@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 257C713019; Fri, 11 Dec 2020 22:52:09 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMq9vD032084; Fri, 11 Dec 2020 22:52:09 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMq97T032083; Fri, 11 Dec 2020 22:52:09 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112252.0BBMq97T032083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368567 - head/sys/modules/zfs X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/modules/zfs X-SVN-Commit-Revision: 368567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:52:13 -0000 Author: rlibby Date: Fri Dec 11 22:52:08 2020 New Revision: 368567 URL: https://svnweb.freebsd.org/changeset/base/368567 Log: zfs: quiet gcc -Wmissing-include-dirs Don't tell it to look for headers in a non-existent directory. Reviewed by: imp, mmacy Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27565 Modified: head/sys/modules/zfs/Makefile Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Fri Dec 11 22:52:03 2020 (r368566) +++ head/sys/modules/zfs/Makefile Fri Dec 11 22:52:08 2020 (r368567) @@ -18,7 +18,6 @@ KMOD= zfs CFLAGS+= -I${INCDIR} -CFLAGS+= -I${INCDIR}/spl CFLAGS+= -I${INCDIR}/os/freebsd CFLAGS+= -I${INCDIR}/os/freebsd/spl CFLAGS+= -I${INCDIR}/os/freebsd/zfs From owner-svn-src-all@freebsd.org Fri Dec 11 22:52:17 2020 Return-Path: Delivered-To: svn-src-all@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 395E94BDCAE; Fri, 11 Dec 2020 22:52:17 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5dX5lGJz3Gwf; Fri, 11 Dec 2020 22:52:16 +0000 (UTC) (envelope-from rlibby@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 B436B1301B; Fri, 11 Dec 2020 22:52:12 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMqCEv032138; Fri, 11 Dec 2020 22:52:12 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMqC0N032137; Fri, 11 Dec 2020 22:52:12 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112252.0BBMqC0N032137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368568 - head/sbin/savecore X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sbin/savecore X-SVN-Commit-Revision: 368568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:52:17 -0000 Author: rlibby Date: Fri Dec 11 22:52:12 2020 New Revision: 368568 URL: https://svnweb.freebsd.org/changeset/base/368568 Log: savecore: bail on write error even when decompressing Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27560 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Fri Dec 11 22:52:08 2020 (r368567) +++ head/sbin/savecore/savecore.c Fri Dec 11 22:52:12 2020 (r368568) @@ -491,12 +491,12 @@ sparsefwrite(const char *buf, size_t nr, FILE *fp) static char *zbuf; static size_t zbufsize; -static size_t +static ssize_t GunzipWrite(z_stream *z, char *in, size_t insize, FILE *fp) { static bool firstblock = true; /* XXX not re-entrable/usable */ const size_t hdrlen = 10; - size_t nw = 0; + size_t nw = 0, w; int rv; z->next_in = in; @@ -520,18 +520,21 @@ GunzipWrite(z_stream *z, char *in, size_t insize, FILE logmsg(LOG_ERR, "decompression failed: %s", z->msg); return (-1); } - nw += sparsefwrite(zbuf, zbufsize - z->avail_out, fp); + w = sparsefwrite(zbuf, zbufsize - z->avail_out, fp); + if (w < zbufsize - z->avail_out) + return (-1); + nw += w; } while (z->avail_in > 0 && rv != Z_STREAM_END); return (nw); } -static size_t +static ssize_t ZstdWrite(ZSTD_DCtx *Zctx, char *in, size_t insize, FILE *fp) { ZSTD_inBuffer Zin; ZSTD_outBuffer Zout; - size_t nw = 0; + size_t nw = 0, w; int rv; Zin.src = in; @@ -547,7 +550,10 @@ ZstdWrite(ZSTD_DCtx *Zctx, char *in, size_t insize, FI ZSTD_getErrorName(rv)); return (-1); } - nw += sparsefwrite(zbuf, Zout.pos, fp); + w = sparsefwrite(zbuf, Zout.pos, fp); + if (w < Zout.pos) + return (-1); + nw += w; } while (Zin.pos < Zin.size && rv != 0); return (nw); @@ -558,7 +564,8 @@ DoRegularFile(int fd, off_t dumpsize, u_int sectorsize uint8_t compression, char *buf, const char *device, const char *filename, FILE *fp) { - size_t nr, nw, wl; + size_t nr, wl; + ssize_t nw; off_t dmpcnt, origsize; z_stream z; /* gzip */ ZSTD_DCtx *Zctx; /* zstd */ @@ -609,8 +616,8 @@ DoRegularFile(int fd, off_t dumpsize, u_int sectorsize nw = fwrite(buf, 1, wl, fp); else nw = sparsefwrite(buf, wl, fp); - if ((compression == KERNELDUMP_COMP_NONE && nw != wl) || - (compression != KERNELDUMP_COMP_NONE && nw < 0)) { + if (nw < 0 || (compression == KERNELDUMP_COMP_NONE && + (size_t)nw != wl)) { logmsg(LOG_ERR, "write error on %s file: %m", filename); logmsg(LOG_WARNING, From owner-svn-src-all@freebsd.org Fri Dec 11 22:52:23 2020 Return-Path: Delivered-To: svn-src-all@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 938EE4BDAD2; Fri, 11 Dec 2020 22:52:23 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5df3l6Vz3HB9; Fri, 11 Dec 2020 22:52:22 +0000 (UTC) (envelope-from rlibby@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 51A2213170; Fri, 11 Dec 2020 22:52:17 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMqHK4032190; Fri, 11 Dec 2020 22:52:17 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMqHCw032189; Fri, 11 Dec 2020 22:52:17 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112252.0BBMqHCw032189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368569 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 368569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:52:23 -0000 Author: rlibby Date: Fri Dec 11 22:52:16 2020 New Revision: 368569 URL: https://svnweb.freebsd.org/changeset/base/368569 Log: fdgrowtable_test.c: appease gcc Work around bogus gcc -Wreturn-type. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511 Reviewed by: kevans, rew Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27563 Modified: head/tests/sys/kern/fdgrowtable_test.c Modified: head/tests/sys/kern/fdgrowtable_test.c ============================================================================== --- head/tests/sys/kern/fdgrowtable_test.c Fri Dec 11 22:52:12 2020 (r368568) +++ head/tests/sys/kern/fdgrowtable_test.c Fri Dec 11 22:52:16 2020 (r368569) @@ -151,7 +151,7 @@ ATF_TC_BODY(free_oldtables, tc) ATF_CHECK(old_tables(kd,kp) == 0); } -static void * +static _Noreturn void * exec_thread(void *args) { for (;;) From owner-svn-src-all@freebsd.org Fri Dec 11 22:52:26 2020 Return-Path: Delivered-To: svn-src-all@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 889F64BDA68; Fri, 11 Dec 2020 22:52:26 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct5dj1jZNz3HBP; Fri, 11 Dec 2020 22:52:25 +0000 (UTC) (envelope-from rlibby@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 04F251318A; Fri, 11 Dec 2020 22:52:21 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBMqK1S032243; Fri, 11 Dec 2020 22:52:20 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBMqK49032242; Fri, 11 Dec 2020 22:52:20 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012112252.0BBMqK49032242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 11 Dec 2020 22:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368570 - head/tests/sys/posixshm X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/tests/sys/posixshm X-SVN-Commit-Revision: 368570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 22:52:26 -0000 Author: rlibby Date: Fri Dec 11 22:52:20 2020 New Revision: 368570 URL: https://svnweb.freebsd.org/changeset/base/368570 Log: posixshm_test.c: remove tautological checks Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27564 Modified: head/tests/sys/posixshm/posixshm_test.c Modified: head/tests/sys/posixshm/posixshm_test.c ============================================================================== --- head/tests/sys/posixshm/posixshm_test.c Fri Dec 11 22:52:16 2020 (r368569) +++ head/tests/sys/posixshm/posixshm_test.c Fri Dec 11 22:52:20 2020 (r368570) @@ -1322,7 +1322,6 @@ ATF_TC_BODY(largepage_mlock, tc) error = sysctlbyname("vm.max_user_wired", &max_wired, &sz, NULL, 0); ATF_REQUIRE_MSG(error == 0, "sysctlbyname(vm.max_user_wired) failed; error=%d", errno); - ATF_REQUIRE(max_wired >= 0); sz = sizeof(wired); error = sysctlbyname("vm.stats.vm.v_user_wire_count", &wired, &sz, NULL, @@ -1330,7 +1329,6 @@ ATF_TC_BODY(largepage_mlock, tc) ATF_REQUIRE_MSG(error == 0, "sysctlbyname(vm.stats.vm.v_user_wire_count) failed; error=%d", errno); - ATF_REQUIRE(wired >= 0); pscnt = pagesizes(ps); for (int i = 1; i < pscnt; i++) { From owner-svn-src-all@freebsd.org Fri Dec 11 23:57:31 2020 Return-Path: Delivered-To: svn-src-all@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 014BA4BF41D; Fri, 11 Dec 2020 23:57:31 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct74p6ckBz3M8D; Fri, 11 Dec 2020 23:57:30 +0000 (UTC) (envelope-from melifaro@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 D193B13D92; Fri, 11 Dec 2020 23:57:30 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BBNvU7o069610; Fri, 11 Dec 2020 23:57:30 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BBNvUn0069609; Fri, 11 Dec 2020 23:57:30 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202012112357.0BBNvUn0069609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 11 Dec 2020 23:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368571 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 368571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 23:57:31 -0000 Author: melifaro Date: Fri Dec 11 23:57:30 2020 New Revision: 368571 URL: https://svnweb.freebsd.org/changeset/base/368571 Log: ipfw kfib algo: Use rt accessors instead of accessing rib/rtentry directly. This removes assumptions on prefix storage and rtentry layout from an external code. Differential Revision: https://reviews.freebsd.org/D27450 Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Dec 11 22:52:20 2020 (r368570) +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Dec 11 23:57:30 2020 (r368571) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -3781,11 +3781,10 @@ static int ta_init_kfib(struct ip_fw_chain *ch, void * static void ta_destroy_kfib(void *ta_state, struct table_info *ti); static void ta_dump_kfib_tinfo(void *ta_state, struct table_info *ti, ipfw_ta_tinfo *tinfo); -static int contigmask(uint8_t *p, int len); static int ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void *e, ipfw_obj_tentry *tent); -static int ta_dump_kfib_tentry_int(struct sockaddr *paddr, - struct sockaddr *pmask, ipfw_obj_tentry *tent); +static int ta_dump_kfib_tentry_int(int familt, const struct rtentry *rt, + ipfw_obj_tentry *tent); static int ta_find_kfib_tentry(void *ta_state, struct table_info *ti, ipfw_obj_tentry *tent); static void ta_foreach_kfib(void *ta_state, struct table_info *ti, @@ -3900,84 +3899,35 @@ ta_dump_kfib_tinfo(void *ta_state, struct table_info * tinfo->flags = IPFW_TATFLAGS_AFDATA; tinfo->taclass4 = IPFW_TACLASS_RADIX; tinfo->count4 = 0; - tinfo->itemsize4 = sizeof(struct rtentry); + tinfo->itemsize4 = 128; /* table is readonly, value does not matter */ tinfo->taclass6 = IPFW_TACLASS_RADIX; tinfo->count6 = 0; - tinfo->itemsize6 = sizeof(struct rtentry); + tinfo->itemsize6 = 128; } static int -contigmask(uint8_t *p, int len) -{ - int i, n; - - for (i = 0; i < len ; i++) - if ( (p[i/8] & (1 << (7 - (i%8)))) == 0) /* first bit unset */ - break; - for (n= i + 1; n < len; n++) - if ( (p[n/8] & (1 << (7 - (n % 8)))) != 0) - return (-1); /* mask not contiguous */ - return (i); -} - -static int -ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void *e, +ta_dump_kfib_tentry_int(int family, const struct rtentry *rt, ipfw_obj_tentry *tent) { - struct rtentry *rte; + uint32_t scopeid; + int plen; - rte = (struct rtentry *)e; - - return ta_dump_kfib_tentry_int(rt_key(rte), rt_mask(rte), tent); -} - -static int -ta_dump_kfib_tentry_int(struct sockaddr *paddr, struct sockaddr *pmask, - ipfw_obj_tentry *tent) -{ #ifdef INET - struct sockaddr_in *addr, *mask; -#endif -#ifdef INET6 - struct sockaddr_in6 *addr6, *mask6; -#endif - int len; - - len = 0; - - /* Guess IPv4/IPv6 radix by sockaddr family */ -#ifdef INET - if (paddr->sa_family == AF_INET) { - addr = (struct sockaddr_in *)paddr; - mask = (struct sockaddr_in *)pmask; - tent->k.addr.s_addr = addr->sin_addr.s_addr; - len = 32; - if (mask != NULL) - len = contigmask((uint8_t *)&mask->sin_addr, 32); - if (len == -1) - len = 0; - tent->masklen = len; + if (family == AF_INET) { + rt_get_inet_prefix_plen(rt, &tent->k.addr, &plen, &scopeid); + tent->masklen = plen; tent->subtype = AF_INET; - tent->v.kidx = 0; /* Do we need to put GW here? */ + tent->v.kidx = 0; } #endif -#ifdef INET6 - if (paddr->sa_family == AF_INET6) { - addr6 = (struct sockaddr_in6 *)paddr; - mask6 = (struct sockaddr_in6 *)pmask; - memcpy(&tent->k.addr6, &addr6->sin6_addr, - sizeof(struct in6_addr)); - len = 128; - if (mask6 != NULL) - len = contigmask((uint8_t *)&mask6->sin6_addr, 128); - if (len == -1) - len = 0; - tent->masklen = len; +#ifdef INET + if (family == AF_INET6) { + rt_get_inet6_prefix_plen(rt, &tent->k.addr6, &plen, &scopeid); + tent->masklen = plen; tent->subtype = AF_INET6; tent->v.kidx = 0; } #endif - return (0); } @@ -3985,66 +3935,61 @@ static int ta_find_kfib_tentry(void *ta_state, struct table_info *ti, ipfw_obj_tentry *tent) { - struct rt_addrinfo info; - struct sockaddr_in6 key6, dst6, mask6; - struct sockaddr *dst, *key, *mask; + struct rtentry *rt; + struct route_nhop_data rnd; + struct epoch_tracker et; + int error; - /* Prepare sockaddr for prefix/mask and info */ - bzero(&dst6, sizeof(dst6)); - dst6.sin6_len = sizeof(dst6); - dst = (struct sockaddr *)&dst6; - bzero(&mask6, sizeof(mask6)); - mask6.sin6_len = sizeof(mask6); - mask = (struct sockaddr *)&mask6; - - bzero(&info, sizeof(info)); - info.rti_info[RTAX_DST] = dst; - info.rti_info[RTAX_NETMASK] = mask; - - /* Prepare the lookup key */ - bzero(&key6, sizeof(key6)); - key6.sin6_family = tent->subtype; - key = (struct sockaddr *)&key6; - + NET_EPOCH_ENTER(et); if (tent->subtype == AF_INET) { - ((struct sockaddr_in *)&key6)->sin_addr = tent->k.addr; - key6.sin6_len = sizeof(struct sockaddr_in); + rt = fib4_lookup_rt(ti->data, tent->k.addr, 0, 0, &rnd); } else { - key6.sin6_addr = tent->k.addr6; - key6.sin6_len = sizeof(struct sockaddr_in6); + rt = fib6_lookup_rt(ti->data, &tent->k.addr6, 0, 0, &rnd); } + if (rt != NULL) + error = ta_dump_kfib_tentry_int(tent->subtype, rt, tent); + else + error = ENOENT; + NET_EPOCH_EXIT(et); - if (rib_lookup_info(ti->data, key, 0, 0, &info) != 0) - return (ENOENT); - if ((info.rti_addrs & RTA_NETMASK) == 0) - mask = NULL; + return (error); +} - ta_dump_kfib_tentry_int(dst, mask, tent); +struct kfib_dump_arg { + struct rtentry *rt; + int family; + ta_foreach_f *f; + void *arg; +}; - return (0); +static int +ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void *e, + ipfw_obj_tentry *tent) +{ + struct kfib_dump_arg *karg = (struct kfib_dump_arg *)e; + + return (ta_dump_kfib_tentry_int(karg->family, karg->rt, tent)); } +static int +walk_wrapper_f(struct rtentry *rt, void *arg) +{ + struct kfib_dump_arg *karg = (struct kfib_dump_arg *)arg; + + karg->rt = rt; + return (karg->f(karg, karg->arg)); +} + static void ta_foreach_kfib(void *ta_state, struct table_info *ti, ta_foreach_f *f, void *arg) { - RIB_RLOCK_TRACKER; - struct rib_head *rh; - int error; + struct kfib_dump_arg karg = { .f = f, .arg = arg }; - rh = rt_tables_get_rnh(ti->data, AF_INET); - if (rh != NULL) { - RIB_RLOCK(rh); - error = rh->rnh_walktree(&rh->head, (walktree_f_t *)f, arg); - RIB_RUNLOCK(rh); - } - - rh = rt_tables_get_rnh(ti->data, AF_INET6); - if (rh != NULL) { - RIB_RLOCK(rh); - error = rh->rnh_walktree(&rh->head, (walktree_f_t *)f, arg); - RIB_RUNLOCK(rh); - } + karg.family = AF_INET; + rib_walk(ti->data, AF_INET, false, walk_wrapper_f, &karg); + karg.family = AF_INET6; + rib_walk(ti->data, AF_INET6, false, walk_wrapper_f, &karg); } struct table_algo addr_kfib = { From owner-svn-src-all@freebsd.org Sat Dec 12 01:05:32 2020 Return-Path: Delivered-To: svn-src-all@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 5134C4792C4; Sat, 12 Dec 2020 01:05:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ct8bJ1rPYz3gyL; Sat, 12 Dec 2020 01:05:32 +0000 (UTC) (envelope-from melifaro@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 3264514834; Sat, 12 Dec 2020 01:05:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BC15W1r014297; Sat, 12 Dec 2020 01:05:32 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BC15Wte014296; Sat, 12 Dec 2020 01:05:32 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202012120105.0BC15Wte014296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 12 Dec 2020 01:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368572 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 368572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 01:05:32 -0000 Author: melifaro Date: Sat Dec 12 01:05:31 2020 New Revision: 368572 URL: https://svnweb.freebsd.org/changeset/base/368572 Log: Fix NOINET6 build broken by r368571. Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Dec 11 23:57:30 2020 (r368571) +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Sat Dec 12 01:05:31 2020 (r368572) @@ -3920,7 +3920,7 @@ ta_dump_kfib_tentry_int(int family, const struct rtent tent->v.kidx = 0; } #endif -#ifdef INET +#ifdef INET6 if (family == AF_INET6) { rt_get_inet6_prefix_plen(rt, &tent->k.addr6, &plen, &scopeid); tent->masklen = plen; From owner-svn-src-all@freebsd.org Sat Dec 12 02:24:34 2020 Return-Path: Delivered-To: svn-src-all@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 E019A47BE28; Sat, 12 Dec 2020 02:24:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtBLV5pfTz3mf7; Sat, 12 Dec 2020 02:24:34 +0000 (UTC) (envelope-from delphij@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 BA639159F2; Sat, 12 Dec 2020 02:24:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BC2OY56065189; Sat, 12 Dec 2020 02:24:34 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BC2OXXj065185; Sat, 12 Dec 2020 02:24:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202012120224.0BC2OXXj065185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 12 Dec 2020 02:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368573 - head/bin/stty X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/bin/stty X-SVN-Commit-Revision: 368573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 02:24:34 -0000 Author: delphij Date: Sat Dec 12 02:24:33 2020 New Revision: 368573 URL: https://svnweb.freebsd.org/changeset/base/368573 Log: Remove unneeded headers. MFC after: 2 weeks Modified: head/bin/stty/cchar.c head/bin/stty/key.c head/bin/stty/modes.c head/bin/stty/stty.c head/bin/stty/util.c Modified: head/bin/stty/cchar.c ============================================================================== --- head/bin/stty/cchar.c Sat Dec 12 01:05:31 2020 (r368572) +++ head/bin/stty/cchar.c Sat Dec 12 02:24:33 2020 (r368573) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/bin/stty/key.c ============================================================================== --- head/bin/stty/key.c Sat Dec 12 01:05:31 2020 (r368572) +++ head/bin/stty/key.c Sat Dec 12 02:24:33 2020 (r368573) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/bin/stty/modes.c ============================================================================== --- head/bin/stty/modes.c Sat Dec 12 01:05:31 2020 (r368572) +++ head/bin/stty/modes.c Sat Dec 12 02:24:33 2020 (r368573) @@ -36,7 +36,6 @@ static char sccsid[] = "@(#)modes.c 8.3 (Berkeley) 4/2 __FBSDID("$FreeBSD$"); #include -#include #include #include "stty.h" Modified: head/bin/stty/stty.c ============================================================================== --- head/bin/stty/stty.c Sat Dec 12 01:05:31 2020 (r368572) +++ head/bin/stty/stty.c Sat Dec 12 02:24:33 2020 (r368573) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/bin/stty/util.c ============================================================================== --- head/bin/stty/util.c Sat Dec 12 01:05:31 2020 (r368572) +++ head/bin/stty/util.c Sat Dec 12 02:24:33 2020 (r368573) @@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include "stty.h" From owner-svn-src-all@freebsd.org Sat Dec 12 02:26:45 2020 Return-Path: Delivered-To: svn-src-all@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 2B6DD47BF4D; Sat, 12 Dec 2020 02:26:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtBP10r8nz3mtt; Sat, 12 Dec 2020 02:26:45 +0000 (UTC) (envelope-from delphij@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 0B1841566E; Sat, 12 Dec 2020 02:26:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BC2QiZh065385; Sat, 12 Dec 2020 02:26:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BC2Qinm065376; Sat, 12 Dec 2020 02:26:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202012120226.0BC2Qinm065376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 12 Dec 2020 02:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368574 - head/bin/setfacl X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/bin/setfacl X-SVN-Commit-Revision: 368574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 02:26:45 -0000 Author: delphij Date: Sat Dec 12 02:26:43 2020 New Revision: 368574 URL: https://svnweb.freebsd.org/changeset/base/368574 Log: Remove unused headers. MFC after: 2 weeks Modified: head/bin/setfacl/mask.c head/bin/setfacl/merge.c head/bin/setfacl/remove.c head/bin/setfacl/util.c Modified: head/bin/setfacl/mask.c ============================================================================== --- head/bin/setfacl/mask.c Sat Dec 12 02:24:33 2020 (r368573) +++ head/bin/setfacl/mask.c Sat Dec 12 02:26:43 2020 (r368574) @@ -32,9 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include #include "setfacl.h" Modified: head/bin/setfacl/merge.c ============================================================================== --- head/bin/setfacl/merge.c Sat Dec 12 02:24:33 2020 (r368573) +++ head/bin/setfacl/merge.c Sat Dec 12 02:26:43 2020 (r368574) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "setfacl.h" Modified: head/bin/setfacl/remove.c ============================================================================== --- head/bin/setfacl/remove.c Sat Dec 12 02:24:33 2020 (r368573) +++ head/bin/setfacl/remove.c Sat Dec 12 02:26:43 2020 (r368574) @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include "setfacl.h" Modified: head/bin/setfacl/util.c ============================================================================== --- head/bin/setfacl/util.c Sat Dec 12 02:24:33 2020 (r368573) +++ head/bin/setfacl/util.c Sat Dec 12 02:26:43 2020 (r368574) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include "setfacl.h" From owner-svn-src-all@freebsd.org Sat Dec 12 05:57:43 2020 Return-Path: Delivered-To: svn-src-all@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 D72CA4A9935; Sat, 12 Dec 2020 05:57:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtH4R5d16z4T3G; Sat, 12 Dec 2020 05:57:43 +0000 (UTC) (envelope-from kevans@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 B452618448; Sat, 12 Dec 2020 05:57:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BC5vh8v098070; Sat, 12 Dec 2020 05:57:43 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BC5vgeL098066; Sat, 12 Dec 2020 05:57:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012120557.0BC5vgeL098066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 12 Dec 2020 05:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368575 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 368575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 05:57:43 -0000 Author: kevans Date: Sat Dec 12 05:57:42 2020 New Revision: 368575 URL: https://svnweb.freebsd.org/changeset/base/368575 Log: lualoader: provide module-manipulation commands Specifically, we have: - enable-module - disable-module - toggle-module These can be used to add/remove modules to be loaded or force modules to be loaded in spite of modules_blacklist. In the typical case, a user is expected to use them to recover an issue happening due to a module directive they've added to their loader.conf or because they discover that they've under-specified what to load. MFC after: 1 week Modified: head/stand/lua/cli.lua head/stand/lua/cli.lua.8 head/stand/lua/config.lua head/stand/lua/config.lua.8 Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Sat Dec 12 02:26:43 2020 (r368574) +++ head/stand/lua/cli.lua Sat Dec 12 05:57:42 2020 (r368575) @@ -65,6 +65,14 @@ local function parseBootArgs(argv, with_kernel) end end +local function setModule(module, loading) + if loading and config.enableModule(module) then + print(module .. " will be loaded") + elseif not loading and config.disableModule(module) then + print(module .. " will not be loaded") + end +end + -- Declares a global function cli_execute that attempts to dispatch the -- arguments passed as a lua function. This gives lua a chance to intercept -- builtin CLI commands like "boot" @@ -132,6 +140,37 @@ end cli['reload-conf'] = function() config.reload() +end + +cli["enable-module"] = function(...) + local _, argv = cli.arguments(...) + if #argv == 0 then + print("usage error: enable-module module") + return + end + + setModule(argv[1], true) +end + +cli["disable-module"] = function(...) + local _, argv = cli.arguments(...) + if #argv == 0 then + print("usage error: disable-module module") + return + end + + setModule(argv[1], false) +end + +cli["toggle-module"] = function(...) + local _, argv = cli.arguments(...) + if #argv == 0 then + print("usage error: toggle-module module") + return + end + + local module = argv[1] + setModule(module, not config.isModuleEnabled(module)) end -- Used for splitting cli varargs into cmd_name and the rest of argv Modified: head/stand/lua/cli.lua.8 ============================================================================== --- head/stand/lua/cli.lua.8 Sat Dec 12 02:26:43 2020 (r368574) +++ head/stand/lua/cli.lua.8 Sat Dec 12 05:57:42 2020 (r368575) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2019 +.Dd December 12, 2020 .Dt CLI.LUA 8 .Os .Sh NAME @@ -77,14 +77,26 @@ This function may be invoked by a user at the loader p .Ic foo . Arguments may be passed to it as usual, space-delimited. .Ss Default Commands -As of present, the +The .Nm -module by default provides commands for -.Ic autoboot , -.Ic boot , -.Ic boot-conf , -and -.Ic reload-conf . +module provides the following default commands: +.Bl -bullet +.\"-width toggle-module -offset indent +.It +.Ic autoboot +.It +.Ic boot +.It +.Ic boot-conf +.It +.Ic reload-conf +.It +.Ic enable-module +.It +.Ic disable-module +.It +.Ic toggle-module +.El .Pp For .Ic autoboot , @@ -103,6 +115,16 @@ The command will reload the configuration from disk. This is useful if you have manually changed currdev and would like to easily reload the configuration from the new device. +.Pp +The +.Ic enable-module , +.Ic disable-module , +and +.Ic toggle-module +commands manipulate the list of modules to be loaded along with the kernel. +Modules blacklisted are considered disabled by +.Ic toggle-module . +These commands will override any such restriction as needed. .Ss Exported Functions The following functions are exported from .Nm : Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Sat Dec 12 02:26:43 2020 (r368574) +++ head/stand/lua/config.lua Sat Dec 12 05:57:42 2020 (r368575) @@ -312,7 +312,7 @@ local function loadModule(mod, silent) for k, v in pairs(mod) do if v.load ~= nil and v.load:lower() == "yes" then local module_name = v.name or k - if blacklist[module_name] ~= nil then + if not v.force and blacklist[module_name] ~= nil then if not silent then print(MSG_MODBLACKLIST:format(module_name)) end @@ -680,6 +680,45 @@ function config.loadelf() status = loadModule(modules, not config.verbose) hook.runAll("modules.loaded") return status +end + +function config.enableModule(modname) + if modules[modname] == nil then + modules[modname] = {} + elseif modules[modname].load == "YES" then + modules[modname].force = true + return true + end + + modules[modname].load = "YES" + modules[modname].force = true + return true +end + +function config.disableModule(modname) + if modules[modname] == nil then + return false + elseif modules[modname].load ~= "YES" then + return true + end + + modules[modname].load = "NO" + modules[modname].force = nil + return true +end + +function config.isModuleEnabled(modname) + local mod = modules[modname] + if not mod or mod.load ~= "YES" then + return false + end + + if mod.force then + return true + end + + local blacklist = getBlacklist() + return blacklist[modname] end hook.registerType("config.loaded") Modified: head/stand/lua/config.lua.8 ============================================================================== --- head/stand/lua/config.lua.8 Sat Dec 12 02:26:43 2020 (r368574) +++ head/stand/lua/config.lua.8 Sat Dec 12 05:57:42 2020 (r368575) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2020 +.Dd December 12, 2020 .Dt CONFIG.LUA 8 .Os .Sh NAME @@ -184,6 +184,25 @@ This will be called by the Lua intercepted and .Ic boot commands. +.It Fn config.enableModule modname +Marks a module named +.Fa modname +to be loaded during +.Fn config.loadelf . +If the module was previously blacklisted, then it will be forcefully allowed to +load. +.It Fn config.disableModule modname +Marks a module named +.Fa modname +to not be loaded during +.Fn config.loadelf . +.It Fn config.isModuleEnabled modname +Checks if the module named +.Fa modname +will be loaded during +.Fn config.loadelf . +It checks both that the module is marked for loading and that it is either +forced or not blacklisted. .El .Ss Defined Hooks The following hooks are defined in From owner-svn-src-all@freebsd.org Sat Dec 12 07:22:39 2020 Return-Path: Delivered-To: svn-src-all@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 0BAFB4ABA3C; Sat, 12 Dec 2020 07:22:39 +0000 (UTC) (envelope-from rew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtJyQ6c6Gz4Z7Z; Sat, 12 Dec 2020 07:22:38 +0000 (UTC) (envelope-from rew@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 D5A51190F3; Sat, 12 Dec 2020 07:22:38 +0000 (UTC) (envelope-from rew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BC7McRh053859; Sat, 12 Dec 2020 07:22:38 GMT (envelope-from rew@FreeBSD.org) Received: (from rew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BC7McvD053858; Sat, 12 Dec 2020 07:22:38 GMT (envelope-from rew@FreeBSD.org) Message-Id: <202012120722.0BC7McvD053858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rew set sender to rew@FreeBSD.org using -f From: Robert Wing Date: Sat, 12 Dec 2020 07:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368576 - head/sbin/geom/core X-SVN-Group: head X-SVN-Commit-Author: rew X-SVN-Commit-Paths: head/sbin/geom/core X-SVN-Commit-Revision: 368576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 07:22:39 -0000 Author: rew Date: Sat Dec 12 07:22:38 2020 New Revision: 368576 URL: https://svnweb.freebsd.org/changeset/base/368576 Log: geom(8): list geoms with /dev/ prefix Allow geom(8) to list geoms with the '/dev/' prefix. `geom part show` accepts the '/dev/' prefix but `geom part list` does not. Modify find_geom() in sbin/geom/core/geom.c to be consistent with the behavior of find_geom() in lib/geom/part/geom_part.c. PR: 188213 Reported by: Ronald F. Guilmette Reviewed by: imp, kevans Approved by: kevans (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27556 Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Sat Dec 12 05:57:42 2020 (r368575) +++ head/sbin/geom/core/geom.c Sat Dec 12 07:22:38 2020 (r368576) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -861,6 +862,9 @@ static struct ggeom * find_geom(struct gclass *classp, const char *name) { struct ggeom *gp; + + if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) + name += sizeof(_PATH_DEV) - 1; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { if (strcmp(gp->lg_name, name) == 0) From owner-svn-src-all@freebsd.org Sat Dec 12 07:35:20 2020 Return-Path: Delivered-To: svn-src-all@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 5308C4ABDAD for ; Sat, 12 Dec 2020 07:35:20 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-zteg10021301.me.com (pv50p00im-zteg10021301.me.com [17.58.6.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtKF415T7z4ZkL for ; Sat, 12 Dec 2020 07:35:19 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-zteg10021301.me.com (Postfix) with ESMTPSA id B2EEECC02C1; Sat, 12 Dec 2020 07:35:11 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: svn commit: r368575 - head/stand/lua From: Toomas Soome In-Reply-To: <202012120557.0BC5vgeL098066@repo.freebsd.org> Date: Sat, 12 Dec 2020 09:35:09 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7FF23CBA-9BF0-4948-B967-0A2CD859A3BB@me.com> References: <202012120557.0BC5vgeL098066@repo.freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3654.20.0.2.21) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-12_02:2020-12-11, 2020-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2012120058 X-Rspamd-Queue-Id: 4CtKF415T7z4ZkL X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 07:35:20 -0000 How about =E2=80=99show-module-options=E2=80=99?=20 rgds, toomas > On 12. Dec 2020, at 07:57, Kyle Evans wrote: >=20 > Author: kevans > Date: Sat Dec 12 05:57:42 2020 > New Revision: 368575 > URL: https://svnweb.freebsd.org/changeset/base/368575 >=20 > Log: > lualoader: provide module-manipulation commands >=20 > Specifically, we have: > - enable-module > - disable-module > - toggle-module >=20 > These can be used to add/remove modules to be loaded or force modules = to be > loaded in spite of modules_blacklist. In the typical case, a user is > expected to use them to recover an issue happening due to a module = directive > they've added to their loader.conf or because they discover that = they've > under-specified what to load. >=20 > MFC after: 1 week >=20 > Modified: > head/stand/lua/cli.lua > head/stand/lua/cli.lua.8 > head/stand/lua/config.lua > head/stand/lua/config.lua.8 >=20 > Modified: head/stand/lua/cli.lua > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/lua/cli.lua Sat Dec 12 02:26:43 2020 = (r368574) > +++ head/stand/lua/cli.lua Sat Dec 12 05:57:42 2020 = (r368575) > @@ -65,6 +65,14 @@ local function parseBootArgs(argv, with_kernel) > end > end >=20 > +local function setModule(module, loading) > + if loading and config.enableModule(module) then > + print(module .. " will be loaded") > + elseif not loading and config.disableModule(module) then > + print(module .. " will not be loaded") > + end > +end > + > -- Declares a global function cli_execute that attempts to dispatch = the > -- arguments passed as a lua function. This gives lua a chance to = intercept > -- builtin CLI commands like "boot" > @@ -132,6 +140,37 @@ end >=20 > cli['reload-conf'] =3D function() > config.reload() > +end > + > +cli["enable-module"] =3D function(...) > + local _, argv =3D cli.arguments(...) > + if #argv =3D=3D 0 then > + print("usage error: enable-module module") > + return > + end > + > + setModule(argv[1], true) > +end > + > +cli["disable-module"] =3D function(...) > + local _, argv =3D cli.arguments(...) > + if #argv =3D=3D 0 then > + print("usage error: disable-module module") > + return > + end > + > + setModule(argv[1], false) > +end > + > +cli["toggle-module"] =3D function(...) > + local _, argv =3D cli.arguments(...) > + if #argv =3D=3D 0 then > + print("usage error: toggle-module module") > + return > + end > + > + local module =3D argv[1] > + setModule(module, not config.isModuleEnabled(module)) > end >=20 > -- Used for splitting cli varargs into cmd_name and the rest of argv >=20 > Modified: head/stand/lua/cli.lua.8 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/lua/cli.lua.8 Sat Dec 12 02:26:43 2020 = (r368574) > +++ head/stand/lua/cli.lua.8 Sat Dec 12 05:57:42 2020 = (r368575) > @@ -26,7 +26,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd September 13, 2019 > +.Dd December 12, 2020 > .Dt CLI.LUA 8 > .Os > .Sh NAME > @@ -77,14 +77,26 @@ This function may be invoked by a user at the = loader p > .Ic foo . > Arguments may be passed to it as usual, space-delimited. > .Ss Default Commands > -As of present, the > +The > .Nm > -module by default provides commands for > -.Ic autoboot , > -.Ic boot , > -.Ic boot-conf , > -and > -.Ic reload-conf . > +module provides the following default commands: > +.Bl -bullet > +.\"-width toggle-module -offset indent > +.It > +.Ic autoboot > +.It > +.Ic boot > +.It > +.Ic boot-conf > +.It > +.Ic reload-conf > +.It > +.Ic enable-module > +.It > +.Ic disable-module > +.It > +.Ic toggle-module > +.El > .Pp > For > .Ic autoboot , > @@ -103,6 +115,16 @@ The > command will reload the configuration from disk. > This is useful if you have manually changed currdev and would like to = easily > reload the configuration from the new device. > +.Pp > +The > +.Ic enable-module , > +.Ic disable-module , > +and > +.Ic toggle-module > +commands manipulate the list of modules to be loaded along with the = kernel. > +Modules blacklisted are considered disabled by > +.Ic toggle-module . > +These commands will override any such restriction as needed. > .Ss Exported Functions > The following functions are exported from > .Nm : >=20 > Modified: head/stand/lua/config.lua > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/lua/config.lua Sat Dec 12 02:26:43 2020 = (r368574) > +++ head/stand/lua/config.lua Sat Dec 12 05:57:42 2020 = (r368575) > @@ -312,7 +312,7 @@ local function loadModule(mod, silent) > for k, v in pairs(mod) do > if v.load ~=3D nil and v.load:lower() =3D=3D "yes" then > local module_name =3D v.name or k > - if blacklist[module_name] ~=3D nil then > + if not v.force and blacklist[module_name] ~=3D = nil then > if not silent then > = print(MSG_MODBLACKLIST:format(module_name)) > end > @@ -680,6 +680,45 @@ function config.loadelf() > status =3D loadModule(modules, not config.verbose) > hook.runAll("modules.loaded") > return status > +end > + > +function config.enableModule(modname) > + if modules[modname] =3D=3D nil then > + modules[modname] =3D {} > + elseif modules[modname].load =3D=3D "YES" then > + modules[modname].force =3D true > + return true > + end > + > + modules[modname].load =3D "YES" > + modules[modname].force =3D true > + return true > +end > + > +function config.disableModule(modname) > + if modules[modname] =3D=3D nil then > + return false > + elseif modules[modname].load ~=3D "YES" then > + return true > + end > + > + modules[modname].load =3D "NO" > + modules[modname].force =3D nil > + return true > +end > + > +function config.isModuleEnabled(modname) > + local mod =3D modules[modname] > + if not mod or mod.load ~=3D "YES" then > + return false > + end > + > + if mod.force then > + return true > + end > + > + local blacklist =3D getBlacklist() > + return blacklist[modname] > end >=20 > hook.registerType("config.loaded") >=20 > Modified: head/stand/lua/config.lua.8 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/lua/config.lua.8 Sat Dec 12 02:26:43 2020 = (r368574) > +++ head/stand/lua/config.lua.8 Sat Dec 12 05:57:42 2020 = (r368575) > @@ -26,7 +26,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd April 30, 2020 > +.Dd December 12, 2020 > .Dt CONFIG.LUA 8 > .Os > .Sh NAME > @@ -184,6 +184,25 @@ This will be called by the Lua intercepted > and > .Ic boot > commands. > +.It Fn config.enableModule modname > +Marks a module named > +.Fa modname > +to be loaded during > +.Fn config.loadelf . > +If the module was previously blacklisted, then it will be forcefully = allowed to > +load. > +.It Fn config.disableModule modname > +Marks a module named > +.Fa modname > +to not be loaded during > +.Fn config.loadelf . > +.It Fn config.isModuleEnabled modname > +Checks if the module named > +.Fa modname > +will be loaded during > +.Fn config.loadelf . > +It checks both that the module is marked for loading and that it is = either > +forced or not blacklisted. > .El > .Ss Defined Hooks > The following hooks are defined in From owner-svn-src-all@freebsd.org Sat Dec 12 10:26:45 2020 Return-Path: Delivered-To: svn-src-all@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 3D60A4B065A; Sat, 12 Dec 2020 10:26:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 4CtP2s13SPz4jrN; Sat, 12 Dec 2020 10:26:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x343.google.com with SMTP id c198so9566460wmd.0; Sat, 12 Dec 2020 02:26:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3nAfmOAjzaizayI2IZLNTh9BexcY0C9STbnfZ2GEQ1M=; b=qIvE3iYjMa68orxWaqPLs6bkt+CwmBoK3KeHMmjZ/SRfY6UUbZq/pTfCxabfe0lNKI FOG7u70rxFmaiHJKaxDWZMD2eBu66BHd/tWLA9y5wACLnpy4YTX8HOSvm9nJEQBw9QoW lHw+Y98trexDbYunHTFsshCSm+5eSkPeTJ+vBXxTcjTazv+hYfhzQZS9hzU5seZ5kSpG LRR/TKL8MB6YewcSOrKVKo4kaKO0VOcSmAqyCLT+MtPit9LNaqP42j3eTB8zMa4gYYKI G25JrZfNI4dljC7YxgXH49l9yktOY6LFmuaxipyMDn66kbihAlNOr0O/Xesn+QcjDuOD G09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3nAfmOAjzaizayI2IZLNTh9BexcY0C9STbnfZ2GEQ1M=; b=sWapFpH028PBmHz+RiqfS81TjL4ZOk5HqBN/qcg6CwZCepdDihs3AmYWvoQ/SQFY0Y ujvKTn8kYxhy6rK2K42zKmCUFbUQk3ncdFM9MuliPexsfz8fVIDjhiVkZSYjI6L1eH46 +XMuKWag6i9emWVBCmzEr16V1H8i2zMiwdo8TS0wiVoud2aMaJRcPlZQQ+pumqxChp++ tQqIUnKeZXNzbshU+DpPkzUTS1VTb4xoPvRt1yN82p2NmmOPl3rnHUfSspffZxqhNWrl ibV8TMEIFvsO3qjKSNvBraSRmZQsm11dLsq7VXuUeB3fLFS/nVWI87bog1wHSVKGg/KQ Wwzw== X-Gm-Message-State: AOAM530DLj9XSecZbHCx8eHgqWWNBFHCgfH4YAQJuvFbrDJAjBjMhr+A y7npVU/sINwtE3AYnLjTZLEBVwuZ3BA+fm+GOjArY5DO X-Google-Smtp-Source: ABdhPJyP8frPCj9OBYlb4zDd8k/FtSmQyTvI7Oxrf6Ne1wvTTgX/tQSIrBjHik1pOFDVYhsfGEGjZOAL+L5UeZiblRU= X-Received: by 2002:a1c:6a13:: with SMTP id f19mr17541103wmc.10.1607768803031; Sat, 12 Dec 2020 02:26:43 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Sat, 12 Dec 2020 02:26:41 -0800 (PST) In-Reply-To: <202012112357.0BBNvUn0069609@repo.freebsd.org> References: <202012112357.0BBNvUn0069609@repo.freebsd.org> From: Mateusz Guzik Date: Sat, 12 Dec 2020 11:26:41 +0100 Message-ID: Subject: Re: svn commit: r368571 - head/sys/netpfil/ipfw To: "Alexander V. Chernikov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CtP2s13SPz4jrN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 10:26:45 -0000 This breaks LINT-NOINET6: linking kernel ld: error: undefined symbol: fib6_lookup_rt >>> referenced by ip_fw_table_algo.c >>> ip_fw_table_algo.o:(ta_find_kfib_tentry) >>> did you mean: fib4_lookup_rt On 12/12/20, Alexander V. Chernikov wrote: > Author: melifaro > Date: Fri Dec 11 23:57:30 2020 > New Revision: 368571 > URL: https://svnweb.freebsd.org/changeset/base/368571 > > Log: > ipfw kfib algo: Use rt accessors instead of accessing rib/rtentry > directly. > > This removes assumptions on prefix storage and rtentry layout > from an external code. > > Differential Revision: https://reviews.freebsd.org/D27450 > > Modified: > head/sys/netpfil/ipfw/ip_fw_table_algo.c > > Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c > ============================================================================== > --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Dec 11 22:52:20 > 2020 (r368570) > +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Fri Dec 11 23:57:30 > 2020 (r368571) > @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > +#include > > #include > #include > @@ -3781,11 +3781,10 @@ static int ta_init_kfib(struct ip_fw_chain *ch, void > * > static void ta_destroy_kfib(void *ta_state, struct table_info *ti); > static void ta_dump_kfib_tinfo(void *ta_state, struct table_info *ti, > ipfw_ta_tinfo *tinfo); > -static int contigmask(uint8_t *p, int len); > static int ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void > *e, > ipfw_obj_tentry *tent); > -static int ta_dump_kfib_tentry_int(struct sockaddr *paddr, > - struct sockaddr *pmask, ipfw_obj_tentry *tent); > +static int ta_dump_kfib_tentry_int(int familt, const struct rtentry *rt, > + ipfw_obj_tentry *tent); > static int ta_find_kfib_tentry(void *ta_state, struct table_info *ti, > ipfw_obj_tentry *tent); > static void ta_foreach_kfib(void *ta_state, struct table_info *ti, > @@ -3900,84 +3899,35 @@ ta_dump_kfib_tinfo(void *ta_state, struct table_info > * > tinfo->flags = IPFW_TATFLAGS_AFDATA; > tinfo->taclass4 = IPFW_TACLASS_RADIX; > tinfo->count4 = 0; > - tinfo->itemsize4 = sizeof(struct rtentry); > + tinfo->itemsize4 = 128; /* table is readonly, value does not matter */ > tinfo->taclass6 = IPFW_TACLASS_RADIX; > tinfo->count6 = 0; > - tinfo->itemsize6 = sizeof(struct rtentry); > + tinfo->itemsize6 = 128; > } > > static int > -contigmask(uint8_t *p, int len) > -{ > - int i, n; > - > - for (i = 0; i < len ; i++) > - if ( (p[i/8] & (1 << (7 - (i%8)))) == 0) /* first bit unset */ > - break; > - for (n= i + 1; n < len; n++) > - if ( (p[n/8] & (1 << (7 - (n % 8)))) != 0) > - return (-1); /* mask not contiguous */ > - return (i); > -} > - > -static int > -ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void *e, > +ta_dump_kfib_tentry_int(int family, const struct rtentry *rt, > ipfw_obj_tentry *tent) > { > - struct rtentry *rte; > + uint32_t scopeid; > + int plen; > > - rte = (struct rtentry *)e; > - > - return ta_dump_kfib_tentry_int(rt_key(rte), rt_mask(rte), tent); > -} > - > -static int > -ta_dump_kfib_tentry_int(struct sockaddr *paddr, struct sockaddr *pmask, > - ipfw_obj_tentry *tent) > -{ > #ifdef INET > - struct sockaddr_in *addr, *mask; > -#endif > -#ifdef INET6 > - struct sockaddr_in6 *addr6, *mask6; > -#endif > - int len; > - > - len = 0; > - > - /* Guess IPv4/IPv6 radix by sockaddr family */ > -#ifdef INET > - if (paddr->sa_family == AF_INET) { > - addr = (struct sockaddr_in *)paddr; > - mask = (struct sockaddr_in *)pmask; > - tent->k.addr.s_addr = addr->sin_addr.s_addr; > - len = 32; > - if (mask != NULL) > - len = contigmask((uint8_t *)&mask->sin_addr, 32); > - if (len == -1) > - len = 0; > - tent->masklen = len; > + if (family == AF_INET) { > + rt_get_inet_prefix_plen(rt, &tent->k.addr, &plen, &scopeid); > + tent->masklen = plen; > tent->subtype = AF_INET; > - tent->v.kidx = 0; /* Do we need to put GW here? */ > + tent->v.kidx = 0; > } > #endif > -#ifdef INET6 > - if (paddr->sa_family == AF_INET6) { > - addr6 = (struct sockaddr_in6 *)paddr; > - mask6 = (struct sockaddr_in6 *)pmask; > - memcpy(&tent->k.addr6, &addr6->sin6_addr, > - sizeof(struct in6_addr)); > - len = 128; > - if (mask6 != NULL) > - len = contigmask((uint8_t *)&mask6->sin6_addr, 128); > - if (len == -1) > - len = 0; > - tent->masklen = len; > +#ifdef INET > + if (family == AF_INET6) { > + rt_get_inet6_prefix_plen(rt, &tent->k.addr6, &plen, &scopeid); > + tent->masklen = plen; > tent->subtype = AF_INET6; > tent->v.kidx = 0; > } > #endif > - > return (0); > } > > @@ -3985,66 +3935,61 @@ static int > ta_find_kfib_tentry(void *ta_state, struct table_info *ti, > ipfw_obj_tentry *tent) > { > - struct rt_addrinfo info; > - struct sockaddr_in6 key6, dst6, mask6; > - struct sockaddr *dst, *key, *mask; > + struct rtentry *rt; > + struct route_nhop_data rnd; > + struct epoch_tracker et; > + int error; > > - /* Prepare sockaddr for prefix/mask and info */ > - bzero(&dst6, sizeof(dst6)); > - dst6.sin6_len = sizeof(dst6); > - dst = (struct sockaddr *)&dst6; > - bzero(&mask6, sizeof(mask6)); > - mask6.sin6_len = sizeof(mask6); > - mask = (struct sockaddr *)&mask6; > - > - bzero(&info, sizeof(info)); > - info.rti_info[RTAX_DST] = dst; > - info.rti_info[RTAX_NETMASK] = mask; > - > - /* Prepare the lookup key */ > - bzero(&key6, sizeof(key6)); > - key6.sin6_family = tent->subtype; > - key = (struct sockaddr *)&key6; > - > + NET_EPOCH_ENTER(et); > if (tent->subtype == AF_INET) { > - ((struct sockaddr_in *)&key6)->sin_addr = tent->k.addr; > - key6.sin6_len = sizeof(struct sockaddr_in); > + rt = fib4_lookup_rt(ti->data, tent->k.addr, 0, 0, &rnd); > } else { > - key6.sin6_addr = tent->k.addr6; > - key6.sin6_len = sizeof(struct sockaddr_in6); > + rt = fib6_lookup_rt(ti->data, &tent->k.addr6, 0, 0, &rnd); > } > + if (rt != NULL) > + error = ta_dump_kfib_tentry_int(tent->subtype, rt, tent); > + else > + error = ENOENT; > + NET_EPOCH_EXIT(et); > > - if (rib_lookup_info(ti->data, key, 0, 0, &info) != 0) > - return (ENOENT); > - if ((info.rti_addrs & RTA_NETMASK) == 0) > - mask = NULL; > + return (error); > +} > > - ta_dump_kfib_tentry_int(dst, mask, tent); > +struct kfib_dump_arg { > + struct rtentry *rt; > + int family; > + ta_foreach_f *f; > + void *arg; > +}; > > - return (0); > +static int > +ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void *e, > + ipfw_obj_tentry *tent) > +{ > + struct kfib_dump_arg *karg = (struct kfib_dump_arg *)e; > + > + return (ta_dump_kfib_tentry_int(karg->family, karg->rt, tent)); > } > > +static int > +walk_wrapper_f(struct rtentry *rt, void *arg) > +{ > + struct kfib_dump_arg *karg = (struct kfib_dump_arg *)arg; > + > + karg->rt = rt; > + return (karg->f(karg, karg->arg)); > +} > + > static void > ta_foreach_kfib(void *ta_state, struct table_info *ti, ta_foreach_f *f, > void *arg) > { > - RIB_RLOCK_TRACKER; > - struct rib_head *rh; > - int error; > + struct kfib_dump_arg karg = { .f = f, .arg = arg }; > > - rh = rt_tables_get_rnh(ti->data, AF_INET); > - if (rh != NULL) { > - RIB_RLOCK(rh); > - error = rh->rnh_walktree(&rh->head, (walktree_f_t *)f, arg); > - RIB_RUNLOCK(rh); > - } > - > - rh = rt_tables_get_rnh(ti->data, AF_INET6); > - if (rh != NULL) { > - RIB_RLOCK(rh); > - error = rh->rnh_walktree(&rh->head, (walktree_f_t *)f, arg); > - RIB_RUNLOCK(rh); > - } > + karg.family = AF_INET; > + rib_walk(ti->data, AF_INET, false, walk_wrapper_f, &karg); > + karg.family = AF_INET6; > + rib_walk(ti->data, AF_INET6, false, walk_wrapper_f, &karg); > } > > struct table_algo addr_kfib = { > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sat Dec 12 11:23:53 2020 Return-Path: Delivered-To: svn-src-all@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 A83DA4B1D1A; Sat, 12 Dec 2020 11:23:53 +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 4CtQJn4PjWz4n7J; Sat, 12 Dec 2020 11:23:53 +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 8A3731C271; Sat, 12 Dec 2020 11:23:53 +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 0BCBNrOL003537; Sat, 12 Dec 2020 11:23:53 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCBNrdD003535; Sat, 12 Dec 2020 11:23:53 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012121123.0BCBNrdD003535@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: Sat, 12 Dec 2020 11:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368577 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 368577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 11:23:53 -0000 Author: se Date: Sat Dec 12 11:23:52 2020 New Revision: 368577 URL: https://svnweb.freebsd.org/changeset/base/368577 Log: Change getlocalbase() to not allocate any heap memory After the commit of the current version, Scott Long pointed out, that an attacker might be able to cause a use-after-free access if this function returned the value of the sysctl variable "user.localbase" by freeing the allocated memory without the cached address being cleared in the library function. To resolve this issue, I have proposed the originally suggested version with a statically allocated buffer in a review (D27370). There was no feedback on this review and after waiting for more than 2 weeks, the potential security issue is fixed by this commit. (There was no security risk in practice, since none of the programs converted to use this function attempted to free the buffer. The address could only have pointed into the heap if user.localbase was set to a non-default value, into r/o data or the environment, else.) This version uses a static buffer of size LOCALBASE_CTL_LEN, which defaults to MAXPATHLEN. This does not increase the memory footprint of the library at this time, since its data segment grows from less than 7 KB to less than 8 KB, i.e. it will get two 4 KB pages on typical architectures, anyway. Compiling with LOCALBASE_CTL_LEN defined as 0 will remove the code that accesses the sysctl variable, values between 1 and MAXPATHLEN-1 will limit the maximum size of the prefix. When built with such a value and if too large a value has been configured in user.localbase, the value defined as ILLEGAL_PREFIX will be returned to cause any file operations on that result to fail. (Default value is "/dev/null/", the review contained "/\177", but I assume that "/dev/null" exists and can not be accessed as a directory. Any other string that can be assumed not be a valid path prefix could be used.) I do suggest to use LOCALBASE_CTL_LEN to size the in-kernel buffer for the user.localbase variable, too. Doing this would guarantee that the result always fit into the buffer in this library function (unless run on a kernel built with a different buffer size.) The function always returns a valid string, and only in case it is built with a small static buffer and run on a system with too large a value in user.localbase, the ILLEGAL_PREFIX will be returned, effectively causing the created path to be non-existent. Differential Revision: https://reviews.freebsd.org/D27370 Modified: head/lib/libutil/getlocalbase.3 head/lib/libutil/getlocalbase.c Modified: head/lib/libutil/getlocalbase.3 ============================================================================== --- head/lib/libutil/getlocalbase.3 Sat Dec 12 07:22:38 2020 (r368576) +++ head/lib/libutil/getlocalbase.3 Sat Dec 12 11:23:52 2020 (r368577) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2020 +.Dd November 25, 2020 .Dt GETLOCALBASE 3 .Os .Sh NAME @@ -59,7 +59,7 @@ If that is undefined then the default of .Pa /usr/local is used. .Pp -The value returned by the +The contents of the string returned by the .Fn getlocalbase function shall not be modified. .Sh IMPLEMENTATION NOTES @@ -67,13 +67,34 @@ Calls to .Fn getlocalbase will perform a setugid check on the running binary before checking the environment. +.Pp +The address returned by +.Fn getlocalbase +will point into the executing processes environment if it is the result of +.Fn getenv "LOCALBASE" , +to a static buffer if it is the result of +.Fn sysctl "user.localbase" , +and to a constant string if the compiled in default value is returned. +.Pp +The same value will be returned on successive calls during the run-time +of the program, ignoring any changes to the environment variable or the +sysctl value that might have been made. +.Pp +The +.Fn getlocalbase +function can be compiled with a non-default value of LOCALBASE_CTL_LEN. +A value of 0 will disable fetching of the sysctl value, a value less than +MAXPATHLEN will put a limit on the maximum string length supported for +this sysctl value. +If built with a non-default value of LOCALBASE_CTL_LEN, a value of the +user.localbase sysctl variable longer than this value will make +.Fn getlocalbase +return a valid string that is not a valid path prefix in any filesystem. .Sh RETURN VALUES The .Fn getlocalbase -function always succeeds and returns a pointer to a string, whose length -may exceed MAXPATHLEN if it has been derived from the environment variable -LOCALBASE. -No length checks are performed on the result. +function returns a pointer to a string, whose length may exceed MAXPATHLEN, +if it has been obtained from the environment. .Sh ENVIRONMENT The .Fn getlocalbase @@ -83,7 +104,7 @@ environment variable. .Sh ERRORS The .Fn getlocalbase -function always succeeds. +function always succeeds and returns a valid pointer to a string. .Sh SEE ALSO .Xr env 1 , .Xr src.conf 5 , Modified: head/lib/libutil/getlocalbase.c ============================================================================== --- head/lib/libutil/getlocalbase.c Sat Dec 12 07:22:38 2020 (r368576) +++ head/lib/libutil/getlocalbase.c Sat Dec 12 11:23:52 2020 (r368577) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -40,35 +41,50 @@ __FBSDID("$FreeBSD$"); #define _PATH_LOCALBASE "/usr/local" #endif +#ifndef LOCALBASE_CTL_LEN +#define LOCALBASE_CTL_LEN MAXPATHLEN +#endif + +/* Any prefix guaranteed to not be the start of a valid path name */ +#define ILLEGAL_PREFIX "/dev/null/" + const char * getlocalbase(void) { - static const int localbase_oid[2] = {CTL_USER, USER_LOCALBASE}; +#if LOCALBASE_CTL_LEN > 0 + int localbase_oid[2] = {CTL_USER, USER_LOCALBASE}; + static char localpath[LOCALBASE_CTL_LEN]; + size_t localpathlen = LOCALBASE_CTL_LEN; +#endif char *tmppath; - size_t tmplen; static const char *localbase = NULL; + if (localbase != NULL) + return (localbase); + if (issetugid() == 0) { tmppath = getenv("LOCALBASE"); - if (tmppath != NULL && tmppath[0] != '\0') - return (tmppath); - } - if (sysctl(localbase_oid, 2, NULL, &tmplen, NULL, 0) == 0 && - (tmppath = malloc(tmplen)) != NULL && - sysctl(localbase_oid, 2, tmppath, &tmplen, NULL, 0) == 0) { - /* - * Check for some other thread already having - * set localbase - this should use atomic ops. - * The amount of memory allocated above may leak, - * if a parallel update in another thread is not - * detected and the non-NULL pointer is overwritten. - */ - if (tmppath[0] != '\0' && - (volatile const char*)localbase == NULL) + if (tmppath != NULL && tmppath[0] != '\0') { localbase = tmppath; + return (localbase); + } + } + +#if LOCALBASE_CTL_LEN > 0 + if (sysctl(localbase_oid, 2, localpath, &localpathlen, NULL, 0) != 0) { + if (errno != ENOMEM) + localbase = _PATH_LOCALBASE; else - free((void*)tmppath); - return (localbase); + localbase = ILLEGAL_PREFIX; + } else { + if (localpath[0] != '\0') + localbase = localpath; + else + localbase = _PATH_LOCALBASE; } - return (_PATH_LOCALBASE); +#else + localbase = _PATH_LOCALBASE; +#endif + + return (localbase); } From owner-svn-src-all@freebsd.org Sat Dec 12 11:51:30 2020 Return-Path: Delivered-To: svn-src-all@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 18FD54B21F9; Sat, 12 Dec 2020 11:51:30 +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 4CtQwf0HJhz4pGg; Sat, 12 Dec 2020 11:51:30 +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 F0CDD1C868; Sat, 12 Dec 2020 11:51:29 +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 0BCBpTEU019482; Sat, 12 Dec 2020 11:51:29 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCBpTlV019480; Sat, 12 Dec 2020 11:51:29 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012121151.0BCBpTlV019480@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: Sat, 12 Dec 2020 11:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368578 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 368578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 11:51:30 -0000 Author: se Date: Sat Dec 12 11:51:29 2020 New Revision: 368578 URL: https://svnweb.freebsd.org/changeset/base/368578 Log: Use getlocalbase() instead of compiled in LOCALBASE to locate calendars Modified: head/usr.bin/calendar/io.c head/usr.bin/calendar/pathnames.h Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Sat Dec 12 11:23:52 2020 (r368577) +++ head/usr.bin/calendar/io.c Sat Dec 12 11:51:29 2020 (r368578) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -121,6 +122,7 @@ cal_fopen(const char *file) unsigned int i; struct stat sb; static bool warned = false; + char calendarhome[MAXPATHLEN]; if (home == NULL || *home == '\0') { warnx("Cannot get home directory"); @@ -133,12 +135,16 @@ cal_fopen(const char *file) } for (i = 0; i < nitems(calendarHomes); i++) { - if (chdir(calendarHomes[i]) != 0) + if (snprintf(calendarhome, sizeof (calendarhome), calendarHomes[i], + getlocalbase()) >= (int)sizeof (calendarhome)) continue; + if (chdir(calendarhome) != 0) + continue; + if ((fp = fopen(file, "r")) != NULL) { cal_home = home; - cal_dir = calendarHomes[i]; + cal_dir = calendarhome; cal_file = file; return (fp); } Modified: head/usr.bin/calendar/pathnames.h ============================================================================== --- head/usr.bin/calendar/pathnames.h Sat Dec 12 11:23:52 2020 (r368577) +++ head/usr.bin/calendar/pathnames.h Sat Dec 12 11:51:29 2020 (r368578) @@ -35,4 +35,4 @@ #include #define _PATH_INCLUDE "/usr/share/calendar" -#define _PATH_INCLUDE_LOCAL _PATH_LOCALBASE "/share/calendar" +#define _PATH_INCLUDE_LOCAL "%s/share/calendar" From owner-svn-src-all@freebsd.org Sat Dec 12 14:10:16 2020 Return-Path: Delivered-To: svn-src-all@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 A84304B67C9; Sat, 12 Dec 2020 14:10:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtV0m45pWz3Dg9; Sat, 12 Dec 2020 14:10:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 773222BE2F; Sat, 12 Dec 2020 14:10:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f178.google.com with SMTP id z9so8658341qtn.4; Sat, 12 Dec 2020 06:10:16 -0800 (PST) X-Gm-Message-State: AOAM531PI9kkO+LbYX8UdjOrGqOCn19MIvPSon0wAH9PtrrsU6LERKh5 ZzdLJQX4VSI7jV669el3uA/Qiw5lwwFZ1liZoiM= X-Google-Smtp-Source: ABdhPJxiOcxIWzWtnSrzaHd9y3kzUuYRB/fWHS8ZPnaqLYXSAByncosbVDrF53y9ja42+41+3SEm/Z4w7gmG5NYb3og= X-Received: by 2002:ac8:44cb:: with SMTP id b11mr21879302qto.60.1607782216002; Sat, 12 Dec 2020 06:10:16 -0800 (PST) MIME-Version: 1.0 References: <202012120557.0BC5vgeL098066@repo.freebsd.org> <7FF23CBA-9BF0-4948-B967-0A2CD859A3BB@me.com> In-Reply-To: <7FF23CBA-9BF0-4948-B967-0A2CD859A3BB@me.com> From: Kyle Evans Date: Sat, 12 Dec 2020 08:09:59 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368575 - head/stand/lua To: Toomas Soome Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 14:10:16 -0000 On Sat, Dec 12, 2020 at 1:35 AM Toomas Soome wrote: > > How about =E2=80=99show-module-options=E2=80=99? > > rgds, > toomas > I missed that one. My 4th is a bit rusty, but it looks like this should just be enumerating over config's local modules table and dumping everything in sight? Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Sat Dec 12 14:17:06 2020 Return-Path: Delivered-To: svn-src-all@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 D0A6E4B6B8D for ; Sat, 12 Dec 2020 14:17:06 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st43p00im-ztdg10073201.me.com (st43p00im-ztdg10073201.me.com [17.58.63.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtV8f5DwMz3FCR for ; Sat, 12 Dec 2020 14:17:06 +0000 (UTC) (envelope-from tsoome@me.com) Received: from [10.1.204.90] (204-33-131-46.dyn.estpak.ee [46.131.33.204]) by st43p00im-ztdg10073201.me.com (Postfix) with ESMTPSA id B3DB5220220; Sat, 12 Dec 2020 14:16:59 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Toomas Soome Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r368575 - head/stand/lua Date: Sat, 12 Dec 2020 16:16:56 +0200 Message-Id: <459F28E8-9E4A-48AE-A1B8-7A28B02E5500@me.com> References: Cc: src-committers , svn-src-all , svn-src-head In-Reply-To: To: Kyle Evans X-Mailer: iPhone Mail (18B92) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-12_03:2020-12-11, 2020-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=985 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2012120112 X-Rspamd-Queue-Id: 4CtV8f5DwMz3FCR X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 14:17:06 -0000 Yes, with pager or it is a bit useless. Sent from my iPhone > On 12. Dec 2020, at 16:10, Kyle Evans wrote: >=20 > =EF=BB=BFOn Sat, Dec 12, 2020 at 1:35 AM Toomas Soome wrot= e: >>=20 >> How about =E2=80=99show-module-options=E2=80=99? >>=20 >> rgds, >> toomas >>=20 >=20 > I missed that one. My 4th is a bit rusty, but it looks like this > should just be enumerating over config's local modules table and > dumping everything in sight? >=20 > Thanks, >=20 > Kyle Evans From owner-svn-src-all@freebsd.org Sat Dec 12 14:32:11 2020 Return-Path: Delivered-To: svn-src-all@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 ED4B34B706A; Sat, 12 Dec 2020 14:32:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CtVV36Nyyz3GRy; Sat, 12 Dec 2020 14:32:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CEA0B2C984; Sat, 12 Dec 2020 14:32:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f175.google.com with SMTP id n142so11403479qkn.2; Sat, 12 Dec 2020 06:32:11 -0800 (PST) X-Gm-Message-State: AOAM532JxXQEE/tsKMpxGO6iy4e3nKMNoM+bDGDLkkniES2Wd5wU/+TE ASttik8hNUrX7C+twVNie+NYGjCs0yxAqydW2vg= X-Google-Smtp-Source: ABdhPJzkFfjJDOlTntwTXUGT/3pi0U2ujkQQwC2k2gD6eyGQY9dkV3RYwFUO0d9OrpWu4M0qQuB4iSa0PRm+0gCK74Y= X-Received: by 2002:a05:620a:2010:: with SMTP id c16mr21821931qka.493.1607783531498; Sat, 12 Dec 2020 06:32:11 -0800 (PST) MIME-Version: 1.0 References: <459F28E8-9E4A-48AE-A1B8-7A28B02E5500@me.com> In-Reply-To: <459F28E8-9E4A-48AE-A1B8-7A28B02E5500@me.com> From: Kyle Evans Date: Sat, 12 Dec 2020 08:31:54 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368575 - head/stand/lua To: Toomas Soome Cc: Kyle Evans , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 14:32:12 -0000 On Sat, Dec 12, 2020 at 8:17 AM Toomas Soome wrote: > > On 12. Dec 2020, at 16:10, Kyle Evans wrote: > > > > =EF=BB=BFOn Sat, Dec 12, 2020 at 1:35 AM Toomas Soome w= rote: > >> > >> How about =E2=80=99show-module-options=E2=80=99? > >> > >> rgds, > >> toomas > >> > > > > I missed that one. My 4th is a bit rusty, but it looks like this > > should just be enumerating over config's local modules table and > > dumping everything in sight? > > > > Yes, with pager or it is a bit useless. > Hmm... we don't currently expose the pager routines to lua, so I'll write a quick pager module to do so. I'll write the lua-side to use the pager if it's available but fallback to dumping it all out otherwise (which, thinking about the modules I typically have installed and looking at a test-run of 4thloader's show-module-options on an even more minimal system, 100% agree). From owner-svn-src-all@freebsd.org Sat Dec 12 14:53:35 2020 Return-Path: Delivered-To: svn-src-all@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 3EAE34B7AA8; Sat, 12 Dec 2020 14:53:35 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtVyl1PX0z3Gyq; Sat, 12 Dec 2020 14:53:35 +0000 (UTC) (envelope-from kevans@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 225E41E870; Sat, 12 Dec 2020 14:53:35 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCErZdu035484; Sat, 12 Dec 2020 14:53:35 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCErZxw035483; Sat, 12 Dec 2020 14:53:35 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012121453.0BCErZxw035483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 12 Dec 2020 14:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368579 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 368579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 14:53:35 -0000 Author: kevans Date: Sat Dec 12 14:53:34 2020 New Revision: 368579 URL: https://svnweb.freebsd.org/changeset/base/368579 Log: lualoader: config: fix module enabled check A last minute rewrite left this logically wrong; if it's present in modules_blacklist, then we do not load it. Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Sat Dec 12 11:51:29 2020 (r368578) +++ head/stand/lua/config.lua Sat Dec 12 14:53:34 2020 (r368579) @@ -718,7 +718,7 @@ function config.isModuleEnabled(modname) end local blacklist = getBlacklist() - return blacklist[modname] + return not blacklist[modname] end hook.registerType("config.loaded") From owner-svn-src-all@freebsd.org Sat Dec 12 15:38:32 2020 Return-Path: Delivered-To: svn-src-all@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 9B64E4B85E9; Sat, 12 Dec 2020 15:38:32 +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 4CtWyc3vVJz3Jsv; Sat, 12 Dec 2020 15:38:32 +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 772B31FA89; Sat, 12 Dec 2020 15:38:32 +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 0BCFcWqG061615; Sat, 12 Dec 2020 15:38:32 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCFcW50061612; Sat, 12 Dec 2020 15:38:32 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012121538.0BCFcW50061612@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 15:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368580 - head/usr.bin/xargs X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/usr.bin/xargs X-SVN-Commit-Revision: 368580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 15:38:32 -0000 Author: yuripv Date: Sat Dec 12 15:38:32 2020 New Revision: 368580 URL: https://svnweb.freebsd.org/changeset/base/368580 Log: xargs: compile yesexpr as ERE yesexpr is an extended regular expression for quite some time now, use appropriate flag when compiling it. PR: 238762 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D27509 Modified: head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.c ============================================================================== --- head/usr.bin/xargs/xargs.c Sat Dec 12 14:53:34 2020 (r368579) +++ head/usr.bin/xargs/xargs.c Sat Dec 12 15:38:32 2020 (r368580) @@ -782,7 +782,7 @@ prompt(void) (void)fprintf(stderr, "?..."); (void)fflush(stderr); if ((response = fgetln(ttyfp, &rsize)) == NULL || - regcomp(&cre, nl_langinfo(YESEXPR), REG_BASIC) != 0) { + regcomp(&cre, nl_langinfo(YESEXPR), REG_EXTENDED) != 0) { (void)fclose(ttyfp); return (0); } From owner-svn-src-all@freebsd.org Sat Dec 12 16:55:24 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 17:04:55 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 17:07:33 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 17:11:23 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 18:34:15 2020 Return-Path: Delivered-To: svn-src-all@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 C5F094BC974; Sat, 12 Dec 2020 18:34:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtbsM59Ymz3ljs; Sat, 12 Dec 2020 18:34:15 +0000 (UTC) (envelope-from ian@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 A4E3821B46; Sat, 12 Dec 2020 18:34:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCIYFtX076664; Sat, 12 Dec 2020 18:34:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCIYFAZ076662; Sat, 12 Dec 2020 18:34:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <202012121834.0BCIYFAZ076662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 12 Dec 2020 18:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368585 - in head: sys/dev/gpio sys/sys tools/test tools/test/gpioevents usr.sbin/gpioctl X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: sys/dev/gpio sys/sys tools/test tools/test/gpioevents usr.sbin/gpioctl X-SVN-Commit-Revision: 368585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 18:34:15 -0000 Author: ian Date: Sat Dec 12 18:34:15 2020 New Revision: 368585 URL: https://svnweb.freebsd.org/changeset/base/368585 Log: Provide userland notification of gpio pin changes ("userland gpio interrupts"). This is an import of the Google Summer of Code 2018 project completed by Christian Kramer (and, sadly, ignored by us for two years now). The goals stated for that project were: FreeBSD already has support for interrupts implemented in the GPIO controller drivers of several SoCs, but there are no interfaces to take advantage of them out of user space yet. The goal of this work is to implement such an interface by providing descriptors which integrate with the common I/O system calls and multiplexing mechanisms. The initial imported code supports the following functionality: - A kernel driver that provides an interface to the user space; the existing gpioc(4) driver was enhanced with this functionality. - Implement support for the most common I/O system calls / multiplexing mechanisms: - read() Places the pin number on which the interrupt occurred in the buffer. Blocking and non-blocking behaviour supported. - poll()/select() - kqueue() - signal driven I/O. Posting SIGIO when the O_ASYNC was set. - Many-to-many relationship between pins and file descriptors. - A file descriptor can monitor several GPIO pins. - A GPIO pin can be monitored by multiple file descriptors. - Integration with gpioctl and libgpio. I added some fixes (mostly to locking) and feature enhancements on top of the original gsoc code. The feature ehancements allow the user to choose between detailed and summary event reporting. Detailed reporting provides a record describing each pin change event. Summary reporting provides the time of the first and last change of each pin, and a count of how many times it changed state since the last read(2) call. Another enhancement allows the recording of multiple state change events on multiple pins between each call to read(2) (the original code would track only a single event at a time). The phabricator review for these changes timed out without approval, but I cite it below anyway, because the review contains a series of diffs that show how I evolved the code from its original state in Christian's github repo for the gsoc project to what is being commited here. (In effect, the phab review extends the VC history back to the original code.) Submitted by: Christian Kramer Obtained from: https://github.com/ckraemer/freebsd/tree/gsoc2018 Differential Revision: https://reviews.freebsd.org/D27398 Added: head/tools/test/gpioevents/ head/tools/test/gpioevents/Makefile (contents, props changed) head/tools/test/gpioevents/gpioevents.c (contents, props changed) Modified: head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpioc.c head/sys/sys/gpio.h head/tools/test/README head/usr.sbin/gpioctl/gpioctl.c Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Sat Dec 12 17:11:22 2020 (r368584) +++ head/sys/dev/gpio/gpiobus.c Sat Dec 12 18:34:15 2020 (r368585) @@ -143,6 +143,15 @@ gpio_check_flags(uint32_t caps, uint32_t flags) /* Cannot mix pull-up/pull-down together. */ if (flags & GPIO_PIN_PULLUP && flags & GPIO_PIN_PULLDOWN) return (EINVAL); + /* Cannot mix output and interrupt flags together */ + if (flags & GPIO_PIN_OUTPUT && flags & GPIO_INTR_MASK) + return (EINVAL); + /* Only one interrupt flag can be defined at once */ + if ((flags & GPIO_INTR_MASK) & ((flags & GPIO_INTR_MASK) - 1)) + return (EINVAL); + /* The interrupt attached flag cannot be set */ + if (flags & GPIO_INTR_ATTACHED) + return (EINVAL); return (0); } Modified: head/sys/dev/gpio/gpioc.c ============================================================================== --- head/sys/dev/gpio/gpioc.c Sat Dec 12 17:11:22 2020 (r368584) +++ head/sys/dev/gpio/gpioc.c Sat Dec 12 18:34:15 2020 (r368585) @@ -35,8 +35,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include +#include #include #include +#include +#include +#include #include #include @@ -47,30 +54,510 @@ __FBSDID("$FreeBSD$"); #undef GPIOC_DEBUG #ifdef GPIOC_DEBUG #define dprintf printf +#define ddevice_printf device_printf #else #define dprintf(x, arg...) +#define ddevice_printf(dev, x, arg...) #endif -static int gpioc_probe(device_t dev); -static int gpioc_attach(device_t dev); -static int gpioc_detach(device_t dev); +struct gpioc_softc { + device_t sc_dev; /* gpiocX dev */ + device_t sc_pdev; /* gpioX dev */ + struct cdev *sc_ctl_dev; /* controller device */ + int sc_unit; + int sc_npins; + struct gpioc_pin_intr *sc_pin_intr; +}; +struct gpioc_pin_intr { + struct gpioc_softc *sc; + gpio_pin_t pin; + bool config_locked; + int intr_rid; + struct resource *intr_res; + void *intr_cookie; + struct mtx mtx; + SLIST_HEAD(gpioc_privs_list, gpioc_privs) privs; +}; + + +struct gpioc_cdevpriv { + struct gpioc_softc *sc; + struct selinfo selinfo; + bool async; + uint8_t report_option; + struct sigio *sigio; + struct mtx mtx; + struct gpioc_pin_event *events; + int numevents; + int evidx_head; + int evidx_tail; + SLIST_HEAD(gpioc_pins_list, gpioc_pins) pins; +}; + +struct gpioc_privs { + struct gpioc_cdevpriv *priv; + SLIST_ENTRY(gpioc_privs) next; +}; + +struct gpioc_pins { + struct gpioc_pin_intr *pin; + int eventcount; + int firstevent; + SLIST_ENTRY(gpioc_pins) next; +}; + +struct gpioc_pin_event { + struct gpioc_pins *privpin; + sbintime_t event_time; + bool event_pin_state; +}; + +static MALLOC_DEFINE(M_GPIOC, "gpioc", "gpioc device data"); + +static int gpioc_allocate_pin_intr(struct gpioc_pin_intr*, uint32_t); +static int gpioc_release_pin_intr(struct gpioc_pin_intr*); +static int gpioc_attach_priv_pin(struct gpioc_cdevpriv*, + struct gpioc_pin_intr*); +static int gpioc_detach_priv_pin(struct gpioc_cdevpriv*, + struct gpioc_pin_intr*); +static bool gpioc_intr_reconfig_allowed(struct gpioc_cdevpriv*, + struct gpioc_pin_intr *intr_conf); +static uint32_t gpioc_get_intr_config(struct gpioc_softc*, + struct gpioc_cdevpriv*, uint32_t pin); +static int gpioc_set_intr_config(struct gpioc_softc*, + struct gpioc_cdevpriv*, uint32_t, uint32_t); +static void gpioc_interrupt_handler(void*); + +static int gpioc_kqread(struct knote*, long); +static void gpioc_kqdetach(struct knote*); + +static int gpioc_probe(device_t dev); +static int gpioc_attach(device_t dev); +static int gpioc_detach(device_t dev); + +static void gpioc_cdevpriv_dtor(void*); + +static d_open_t gpioc_open; +static d_read_t gpioc_read; static d_ioctl_t gpioc_ioctl; +static d_poll_t gpioc_poll; +static d_kqfilter_t gpioc_kqfilter; static struct cdevsw gpioc_cdevsw = { .d_version = D_VERSION, + .d_open = gpioc_open, + .d_read = gpioc_read, .d_ioctl = gpioc_ioctl, + .d_poll = gpioc_poll, + .d_kqfilter = gpioc_kqfilter, .d_name = "gpioc", }; -struct gpioc_softc { - device_t sc_dev; /* gpiocX dev */ - device_t sc_pdev; /* gpioX dev */ - struct cdev *sc_ctl_dev; /* controller device */ - int sc_unit; +static struct filterops gpioc_read_filterops = { + .f_isfd = true, + .f_attach = NULL, + .f_detach = gpioc_kqdetach, + .f_event = gpioc_kqread, + .f_touch = NULL }; +static struct gpioc_pin_event * +next_head_event(struct gpioc_cdevpriv *priv) +{ + struct gpioc_pin_event *rv; + + rv = &priv->events[priv->evidx_head++]; + if (priv->evidx_head == priv->numevents) + priv->evidx_head = 0; + return (rv); +} + +static struct gpioc_pin_event * +next_tail_event(struct gpioc_cdevpriv *priv) +{ + struct gpioc_pin_event *rv; + + rv = &priv->events[priv->evidx_tail++]; + if (priv->evidx_tail == priv->numevents) + priv->evidx_tail = 0; + return (rv); +} + +static size_t +number_of_events(struct gpioc_cdevpriv *priv) +{ + if (priv->evidx_head >= priv->evidx_tail) + return (priv->evidx_head - priv->evidx_tail); + else + return (priv->numevents + priv->evidx_head - priv->evidx_tail); +} + static int +gpioc_allocate_pin_intr(struct gpioc_pin_intr *intr_conf, uint32_t flags) +{ + int err; + + intr_conf->config_locked = true; + mtx_unlock(&intr_conf->mtx); + + intr_conf->intr_res = gpio_alloc_intr_resource(intr_conf->pin->dev, + &intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags); + if (intr_conf->intr_res == NULL) { + err = ENXIO; + goto error_exit; + } + + err = bus_setup_intr(intr_conf->pin->dev, intr_conf->intr_res, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, gpioc_interrupt_handler, + intr_conf, &intr_conf->intr_cookie); + if (err != 0) + goto error_exit; + + intr_conf->pin->flags = flags; + +error_exit: + mtx_lock(&intr_conf->mtx); + intr_conf->config_locked = false; + wakeup(&intr_conf->config_locked); + + return (err); +} + +static int +gpioc_release_pin_intr(struct gpioc_pin_intr *intr_conf) +{ + int err; + + intr_conf->config_locked = true; + mtx_unlock(&intr_conf->mtx); + + if (intr_conf->intr_cookie != NULL) { + err = bus_teardown_intr(intr_conf->pin->dev, + intr_conf->intr_res, intr_conf->intr_cookie); + if (err != 0) + goto error_exit; + else + intr_conf->intr_cookie = NULL; + } + + if (intr_conf->intr_res != NULL) { + err = bus_release_resource(intr_conf->pin->dev, SYS_RES_IRQ, + intr_conf->intr_rid, intr_conf->intr_res); + if (err != 0) + goto error_exit; + else { + intr_conf->intr_rid = 0; + intr_conf->intr_res = NULL; + } + } + + intr_conf->pin->flags = 0; + err = 0; + +error_exit: + mtx_lock(&intr_conf->mtx); + intr_conf->config_locked = false; + wakeup(&intr_conf->config_locked); + + return (err); +} + +static int +gpioc_attach_priv_pin(struct gpioc_cdevpriv *priv, + struct gpioc_pin_intr *intr_conf) +{ + struct gpioc_privs *priv_link; + struct gpioc_pins *pin_link; + unsigned int consistency_a, consistency_b; + + consistency_a = 0; + consistency_b = 0; + mtx_assert(&intr_conf->mtx, MA_OWNED); + mtx_lock(&priv->mtx); + SLIST_FOREACH(priv_link, &intr_conf->privs, next) { + if (priv_link->priv == priv) + consistency_a++; + } + KASSERT(consistency_a <= 1, + ("inconsistent links between pin config and cdevpriv")); + SLIST_FOREACH(pin_link, &priv->pins, next) { + if (pin_link->pin == intr_conf) + consistency_b++; + } + KASSERT(consistency_a == consistency_b, + ("inconsistent links between pin config and cdevpriv")); + if (consistency_a == 1 && consistency_b == 1) { + mtx_unlock(&priv->mtx); + return (EEXIST); + } + priv_link = malloc(sizeof(struct gpioc_privs), M_GPIOC, + M_NOWAIT | M_ZERO); + if (priv_link == NULL) + { + mtx_unlock(&priv->mtx); + return (ENOMEM); + } + pin_link = malloc(sizeof(struct gpioc_pins), M_GPIOC, + M_NOWAIT | M_ZERO); + if (pin_link == NULL) { + mtx_unlock(&priv->mtx); + return (ENOMEM); + } + priv_link->priv = priv; + pin_link->pin = intr_conf; + SLIST_INSERT_HEAD(&intr_conf->privs, priv_link, next); + SLIST_INSERT_HEAD(&priv->pins, pin_link, next); + mtx_unlock(&priv->mtx); + + return (0); +} + +static int +gpioc_detach_priv_pin(struct gpioc_cdevpriv *priv, + struct gpioc_pin_intr *intr_conf) +{ + struct gpioc_privs *priv_link, *priv_link_temp; + struct gpioc_pins *pin_link, *pin_link_temp; + unsigned int consistency_a, consistency_b; + + consistency_a = 0; + consistency_b = 0; + mtx_assert(&intr_conf->mtx, MA_OWNED); + mtx_lock(&priv->mtx); + SLIST_FOREACH_SAFE(priv_link, &intr_conf->privs, next, priv_link_temp) { + if (priv_link->priv == priv) { + SLIST_REMOVE(&intr_conf->privs, priv_link, gpioc_privs, + next); + free(priv_link, M_GPIOC); + consistency_a++; + } + } + KASSERT(consistency_a <= 1, + ("inconsistent links between pin config and cdevpriv")); + SLIST_FOREACH_SAFE(pin_link, &priv->pins, next, pin_link_temp) { + if (pin_link->pin == intr_conf) { + /* + * If the pin we're removing has events in the priv's + * event fifo, we can't leave dangling pointers from + * those events to the gpioc_pins struct we're about to + * free. We also can't remove random items and leave + * holes in the events fifo, so just empty it out. + */ + if (pin_link->eventcount > 0) { + priv->evidx_head = priv->evidx_tail = 0; + } + SLIST_REMOVE(&priv->pins, pin_link, gpioc_pins, next); + free(pin_link, M_GPIOC); + consistency_b++; + } + } + KASSERT(consistency_a == consistency_b, + ("inconsistent links between pin config and cdevpriv")); + mtx_unlock(&priv->mtx); + + return (0); +} + +static bool +gpioc_intr_reconfig_allowed(struct gpioc_cdevpriv *priv, + struct gpioc_pin_intr *intr_conf) +{ + struct gpioc_privs *priv_link; + + mtx_assert(&intr_conf->mtx, MA_OWNED); + + if (SLIST_EMPTY(&intr_conf->privs)) + return (true); + + SLIST_FOREACH(priv_link, &intr_conf->privs, next) { + if (priv_link->priv != priv) + return (false); + } + + return (true); +} + + +static uint32_t +gpioc_get_intr_config(struct gpioc_softc *sc, struct gpioc_cdevpriv *priv, + uint32_t pin) +{ + struct gpioc_pin_intr *intr_conf = &sc->sc_pin_intr[pin]; + struct gpioc_privs *priv_link; + uint32_t flags; + + flags = intr_conf->pin->flags; + + if (flags == 0) + return (0); + + mtx_lock(&intr_conf->mtx); + SLIST_FOREACH(priv_link, &intr_conf->privs, next) { + if (priv_link->priv == priv) { + flags |= GPIO_INTR_ATTACHED; + break; + } + } + mtx_unlock(&intr_conf->mtx); + + return (flags); +} + +static int +gpioc_set_intr_config(struct gpioc_softc *sc, struct gpioc_cdevpriv *priv, + uint32_t pin, uint32_t flags) +{ + struct gpioc_pin_intr *intr_conf = &sc->sc_pin_intr[pin]; + int res; + + res = 0; + if (intr_conf->pin->flags == 0 && flags == 0) { + /* No interrupt configured and none requested: Do nothing. */ + return (0); + } + mtx_lock(&intr_conf->mtx); + while (intr_conf->config_locked == true) + mtx_sleep(&intr_conf->config_locked, &intr_conf->mtx, 0, + "gpicfg", 0); + if (intr_conf->pin->flags == 0 && flags != 0) { + /* + * No interrupt is configured, but one is requested: Allocate + * and setup interrupt on the according pin. + */ + res = gpioc_allocate_pin_intr(intr_conf, flags); + if (res == 0) + res = gpioc_attach_priv_pin(priv, intr_conf); + if (res == EEXIST) + res = 0; + } else if (intr_conf->pin->flags == flags) { + /* + * Same interrupt requested as already configured: Attach the + * cdevpriv to the corresponding pin. + */ + res = gpioc_attach_priv_pin(priv, intr_conf); + if (res == EEXIST) + res = 0; + } else if (intr_conf->pin->flags != 0 && flags == 0) { + /* + * Interrupt configured, but none requested: Teardown and + * release the pin when no other cdevpriv is attached. Otherwise + * just detach pin and cdevpriv from each other. + */ + if (gpioc_intr_reconfig_allowed(priv, intr_conf)) { + res = gpioc_release_pin_intr(intr_conf); + } + if (res == 0) + res = gpioc_detach_priv_pin(priv, intr_conf); + } else { + /* + * Other flag requested than configured: Reconfigure when no + * other cdevpriv is are attached to the pin. + */ + if (!gpioc_intr_reconfig_allowed(priv, intr_conf)) + res = EBUSY; + else { + res = gpioc_release_pin_intr(intr_conf); + if (res == 0) + res = gpioc_allocate_pin_intr(intr_conf, flags); + if (res == 0) + res = gpioc_attach_priv_pin(priv, intr_conf); + if (res == EEXIST) + res = 0; + } + } + mtx_unlock(&intr_conf->mtx); + + return (res); +} + +static void +gpioc_interrupt_handler(void *arg) +{ + struct gpioc_pin_intr *intr_conf; + struct gpioc_privs *privs; + struct gpioc_softc *sc; + sbintime_t evtime; + uint32_t pin_state; + + intr_conf = arg; + sc = intr_conf->sc; + + /* Capture time and pin state first. */ + evtime = sbinuptime(); + if (intr_conf->pin->flags & GPIO_INTR_EDGE_BOTH) + GPIO_PIN_GET(sc->sc_pdev, intr_conf->pin->pin, &pin_state); + else if (intr_conf->pin->flags & GPIO_INTR_EDGE_RISING) + pin_state = true; + else + pin_state = false; + + mtx_lock(&intr_conf->mtx); + + if (intr_conf->config_locked == true) { + ddevice_printf(sc->sc_dev, "Interrupt configuration in " + "progress. Discarding interrupt on pin %d.\n", + intr_conf->pin->pin); + mtx_unlock(&intr_conf->mtx); + return; + } + + if (SLIST_EMPTY(&intr_conf->privs)) { + ddevice_printf(sc->sc_dev, "No file descriptor associated with " + "occurred interrupt on pin %d.\n", intr_conf->pin->pin); + mtx_unlock(&intr_conf->mtx); + return; + } + + SLIST_FOREACH(privs, &intr_conf->privs, next) { + struct gpioc_cdevpriv *priv = privs->priv; + struct gpioc_pins *privpin; + struct gpioc_pin_event *event; + mtx_lock(&priv->mtx); + SLIST_FOREACH(privpin, &priv->pins, next) { + if (privpin->pin == intr_conf) + break; + } + if (privpin == NULL) { + /* Should be impossible. */ + ddevice_printf(sc->sc_dev, "Cannot find privpin\n"); + mtx_unlock(&priv->mtx); + continue; + } + + if (priv->report_option == GPIO_EVENT_REPORT_DETAIL) { + event = next_head_event(priv); + /* If head is overtaking tail, advance tail. */ + if (priv->evidx_head == priv->evidx_tail) + next_tail_event(priv); + } else { + if (privpin->eventcount > 0) + event = &priv->events[privpin->firstevent + 1]; + else { + privpin->firstevent = priv->evidx_head; + event = next_head_event(priv); + event->privpin = privpin; + event->event_time = evtime; + event->event_pin_state = pin_state; + event = next_head_event(priv); + } + ++privpin->eventcount; + } + event->privpin = privpin; + event->event_time = evtime; + event->event_pin_state = pin_state; + wakeup(priv); + selwakeup(&priv->selinfo); + KNOTE_LOCKED(&priv->selinfo.si_note, 0); + if (priv->async == true && priv->sigio != NULL) + pgsigio(&priv->sigio, SIGIO, 0); + mtx_unlock(&priv->mtx); + } + + mtx_unlock(&intr_conf->mtx); +} + +static int gpioc_probe(device_t dev) { device_set_desc(dev, "GPIO controller"); @@ -88,6 +575,23 @@ gpioc_attach(device_t dev) sc->sc_dev = dev; sc->sc_pdev = device_get_parent(dev); sc->sc_unit = device_get_unit(dev); + + err = GPIO_PIN_MAX(sc->sc_pdev, &sc->sc_npins); + sc->sc_npins++; /* Number of pins is one more than max pin number. */ + if (err != 0) + return (err); + sc->sc_pin_intr = malloc(sizeof(struct gpioc_pin_intr) * sc->sc_npins, + M_GPIOC, M_WAITOK | M_ZERO); + for (int i = 0; i <= sc->sc_npins; i++) { + sc->sc_pin_intr[i].pin = malloc(sizeof(struct gpiobus_pin), + M_GPIOC, M_WAITOK | M_ZERO); + sc->sc_pin_intr[i].sc = sc; + sc->sc_pin_intr[i].pin->pin = i; + sc->sc_pin_intr[i].pin->dev = sc->sc_pdev; + mtx_init(&sc->sc_pin_intr[i].mtx, "gpioc pin", NULL, MTX_DEF); + SLIST_INIT(&sc->sc_pin_intr[i].privs); + } + make_dev_args_init(&devargs); devargs.mda_devsw = &gpioc_cdevsw; devargs.mda_uid = UID_ROOT; @@ -96,7 +600,7 @@ gpioc_attach(device_t dev) devargs.mda_si_drv1 = sc; err = make_dev_s(&devargs, &sc->sc_ctl_dev, "gpioc%d", sc->sc_unit); if (err != 0) { - printf("Failed to create gpioc%d", sc->sc_unit); + device_printf(dev, "Failed to create gpioc%d", sc->sc_unit); return (ENXIO); } @@ -112,12 +616,160 @@ gpioc_detach(device_t dev) if (sc->sc_ctl_dev) destroy_dev(sc->sc_ctl_dev); + for (int i = 0; i <= sc->sc_npins; i++) { + mtx_destroy(&sc->sc_pin_intr[i].mtx); + free(&sc->sc_pin_intr[i].pin, M_GPIOC); + } + free(sc->sc_pin_intr, M_GPIOC); + if ((err = bus_generic_detach(dev)) != 0) return (err); return (0); } +static void +gpioc_cdevpriv_dtor(void *data) +{ + struct gpioc_cdevpriv *priv; + struct gpioc_privs *priv_link, *priv_link_temp; + struct gpioc_pins *pin_link, *pin_link_temp; + unsigned int consistency; + + priv = data; + + SLIST_FOREACH_SAFE(pin_link, &priv->pins, next, pin_link_temp) { + consistency = 0; + mtx_lock(&pin_link->pin->mtx); + while (pin_link->pin->config_locked == true) + mtx_sleep(&pin_link->pin->config_locked, + &pin_link->pin->mtx, 0, "gpicfg", 0); + SLIST_FOREACH_SAFE(priv_link, &pin_link->pin->privs, next, + priv_link_temp) { + if (priv_link->priv == priv) { + SLIST_REMOVE(&pin_link->pin->privs, priv_link, + gpioc_privs, next); + free(priv_link, M_GPIOC); + consistency++; + } + } + KASSERT(consistency == 1, + ("inconsistent links between pin config and cdevpriv")); + if (gpioc_intr_reconfig_allowed(priv, pin_link->pin)) { + gpioc_release_pin_intr(pin_link->pin); + } + mtx_unlock(&pin_link->pin->mtx); + SLIST_REMOVE(&priv->pins, pin_link, gpioc_pins, next); + free(pin_link, M_GPIOC); + } + + wakeup(&priv); + knlist_clear(&priv->selinfo.si_note, 0); + seldrain(&priv->selinfo); + knlist_destroy(&priv->selinfo.si_note); + funsetown(&priv->sigio); + + mtx_destroy(&priv->mtx); + free(priv->events, M_GPIOC); + free(data, M_GPIOC); +} + +static int +gpioc_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct gpioc_cdevpriv *priv; + int err; + + priv = malloc(sizeof(*priv), M_GPIOC, M_WAITOK | M_ZERO); + priv->sc = dev->si_drv1; + priv->report_option = GPIO_EVENT_REPORT_DETAIL; + err = devfs_set_cdevpriv(priv, gpioc_cdevpriv_dtor); + if (err != 0) { + gpioc_cdevpriv_dtor(priv); + return (err); + } + mtx_init(&priv->mtx, "gpioc priv", NULL, MTX_DEF); + knlist_init_mtx(&priv->selinfo.si_note, &priv->mtx); + + /* + * Allocate a circular buffer for events. The scheme we use for summary + * reporting assumes there will always be a pair of events available to + * record the first/last events on any pin, so we allocate 2 * npins. + * Even though we actually default to detailed event reporting, 2 * + * npins isn't a horrible fifo size for that either. + */ + priv->numevents = priv->sc->sc_npins * 2; + priv->events = malloc(priv->numevents * sizeof(struct gpio_event_detail), + M_GPIOC, M_WAITOK | M_ZERO); + + return (0); +} + +static int +gpioc_read(struct cdev *dev, struct uio *uio, int ioflag) +{ + struct gpioc_cdevpriv *priv; + struct gpioc_pin_event *event; + union { + struct gpio_event_summary sum; + struct gpio_event_detail evt; + uint8_t data[1]; + } recbuf; + size_t recsize; + int err; + + if ((err = devfs_get_cdevpriv((void **)&priv)) != 0) + return (err); + + if (priv->report_option == GPIO_EVENT_REPORT_SUMMARY) + recsize = sizeof(struct gpio_event_summary); + else + recsize = sizeof(struct gpio_event_detail); + + if (uio->uio_resid < recsize) + return (EINVAL); + + mtx_lock(&priv->mtx); + while (priv->evidx_head == priv->evidx_tail) { + if (SLIST_EMPTY(&priv->pins)) { + err = ENXIO; + break; + } else if (ioflag & O_NONBLOCK) { + err = EWOULDBLOCK; + break; + } else { + err = mtx_sleep(priv, &priv->mtx, PCATCH, "gpintr", 0); + if (err != 0) + break; + } + } + + while (err == 0 && uio->uio_resid >= recsize && + priv->evidx_tail != priv->evidx_head) { + event = next_tail_event(priv); + if (priv->report_option == GPIO_EVENT_REPORT_SUMMARY) { + recbuf.sum.gp_first_time = event->event_time; + recbuf.sum.gp_pin = event->privpin->pin->pin->pin; + recbuf.sum.gp_count = event->privpin->eventcount; + recbuf.sum.gp_first_state = event->event_pin_state; + event = next_tail_event(priv); + recbuf.sum.gp_last_time = event->event_time; + recbuf.sum.gp_last_state = event->event_pin_state; + event->privpin->eventcount = 0; + event->privpin->firstevent = 0; + } else { + recbuf.evt.gp_time = event->event_time; + recbuf.evt.gp_pin = event->privpin->pin->pin->pin; + recbuf.evt.gp_pinstate = event->event_pin_state; + } + mtx_unlock(&priv->mtx); + err = uiomove(recbuf.data, recsize, uio); + mtx_lock(&priv->mtx); + } + mtx_unlock(&priv->mtx); + return (err); +} + static int gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, struct thread *td) @@ -125,86 +777,268 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg device_t bus; int max_pin, res; struct gpioc_softc *sc = cdev->si_drv1; + struct gpioc_cdevpriv *priv; struct gpio_pin pin; struct gpio_req req; struct gpio_access_32 *a32; struct gpio_config_32 *c32; - uint32_t caps; + struct gpio_event_config *evcfg; + uint32_t caps, intrflags; bus = GPIO_GET_BUS(sc->sc_pdev); if (bus == NULL) return (EINVAL); switch (cmd) { - case GPIOMAXPIN: - max_pin = -1; - res = GPIO_PIN_MAX(sc->sc_pdev, &max_pin); - bcopy(&max_pin, arg, sizeof(max_pin)); + case GPIOMAXPIN: + max_pin = -1; + res = GPIO_PIN_MAX(sc->sc_pdev, &max_pin); + bcopy(&max_pin, arg, sizeof(max_pin)); + break; + case GPIOGETCONFIG: + bcopy(arg, &pin, sizeof(pin)); + dprintf("get config pin %d\n", pin.gp_pin); + res = GPIO_PIN_GETFLAGS(sc->sc_pdev, pin.gp_pin, + &pin.gp_flags); + /* Fail early */ + if (res) break; - case GPIOGETCONFIG: - bcopy(arg, &pin, sizeof(pin)); - dprintf("get config pin %d\n", pin.gp_pin); - res = GPIO_PIN_GETFLAGS(sc->sc_pdev, pin.gp_pin, - &pin.gp_flags); - /* Fail early */ - if (res) - break; - GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &pin.gp_caps); - GPIOBUS_PIN_GETNAME(bus, pin.gp_pin, pin.gp_name); - bcopy(&pin, arg, sizeof(pin)); + res = devfs_get_cdevpriv((void **)&priv); + if (res) break; - case GPIOSETCONFIG: - bcopy(arg, &pin, sizeof(pin)); - dprintf("set config pin %d\n", pin.gp_pin); - res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &caps); - if (res == 0) - res = gpio_check_flags(caps, pin.gp_flags); - if (res == 0) - res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, - pin.gp_flags); + pin.gp_flags |= gpioc_get_intr_config(sc, priv, + pin.gp_pin); + GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &pin.gp_caps); + GPIOBUS_PIN_GETNAME(bus, pin.gp_pin, pin.gp_name); + bcopy(&pin, arg, sizeof(pin)); + break; + case GPIOSETCONFIG: + bcopy(arg, &pin, sizeof(pin)); + dprintf("set config pin %d\n", pin.gp_pin); + res = devfs_get_cdevpriv((void **)&priv); + if (res != 0) break; - case GPIOGET: - bcopy(arg, &req, sizeof(req)); - res = GPIO_PIN_GET(sc->sc_pdev, req.gp_pin, - &req.gp_value); - dprintf("read pin %d -> %d\n", - req.gp_pin, req.gp_value); - bcopy(&req, arg, sizeof(req)); + res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &caps); + if (res != 0) break; - case GPIOSET: - bcopy(arg, &req, sizeof(req)); - res = GPIO_PIN_SET(sc->sc_pdev, req.gp_pin, - req.gp_value); - dprintf("write pin %d -> %d\n", - req.gp_pin, req.gp_value); + res = gpio_check_flags(caps, pin.gp_flags); + if (res != 0) break; - case GPIOTOGGLE: - bcopy(arg, &req, sizeof(req)); - dprintf("toggle pin %d\n", - req.gp_pin); - res = GPIO_PIN_TOGGLE(sc->sc_pdev, req.gp_pin); + intrflags = pin.gp_flags & GPIO_INTR_MASK; + /* + * We can do only edge interrupts, and only if the + * hardware supports that interrupt type on that pin. + */ + switch (intrflags) { + case GPIO_INTR_NONE: break; - case GPIOSETNAME: - bcopy(arg, &pin, sizeof(pin)); - dprintf("set name on pin %d\n", pin.gp_pin); - res = GPIOBUS_PIN_SETNAME(bus, pin.gp_pin, - pin.gp_name); + case GPIO_INTR_EDGE_RISING: + case GPIO_INTR_EDGE_FALLING: + case GPIO_INTR_EDGE_BOTH: + if ((intrflags & caps) == 0) + res = EOPNOTSUPP; break; - case GPIOACCESS32: - a32 = (struct gpio_access_32 *)arg; - res = GPIO_PIN_ACCESS_32(sc->sc_pdev, a32->first_pin, - a32->clear_pins, a32->change_pins, &a32->orig_pins); + default: + res = EINVAL; break; - case GPIOCONFIG32: - c32 = (struct gpio_config_32 *)arg; - res = GPIO_PIN_CONFIG_32(sc->sc_pdev, c32->first_pin, - c32->num_pins, c32->pin_flags); + } + if (res != 0) break; - default: - return (ENOTTY); + res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, + (pin.gp_flags & ~GPIO_INTR_MASK)); + if (res != 0) break; + res = gpioc_set_intr_config(sc, priv, pin.gp_pin, + intrflags); + break; + case GPIOGET: + bcopy(arg, &req, sizeof(req)); + res = GPIO_PIN_GET(sc->sc_pdev, req.gp_pin, + &req.gp_value); + dprintf("read pin %d -> %d\n", + req.gp_pin, req.gp_value); + bcopy(&req, arg, sizeof(req)); + break; + case GPIOSET: + bcopy(arg, &req, sizeof(req)); + res = GPIO_PIN_SET(sc->sc_pdev, req.gp_pin, + req.gp_value); + dprintf("write pin %d -> %d\n", + req.gp_pin, req.gp_value); + break; + case GPIOTOGGLE: + bcopy(arg, &req, sizeof(req)); + dprintf("toggle pin %d\n", + req.gp_pin); + res = GPIO_PIN_TOGGLE(sc->sc_pdev, req.gp_pin); + break; + case GPIOSETNAME: + bcopy(arg, &pin, sizeof(pin)); + dprintf("set name on pin %d\n", pin.gp_pin); + res = GPIOBUS_PIN_SETNAME(bus, pin.gp_pin, + pin.gp_name); + break; + case GPIOACCESS32: + a32 = (struct gpio_access_32 *)arg; + res = GPIO_PIN_ACCESS_32(sc->sc_pdev, a32->first_pin, + a32->clear_pins, a32->change_pins, &a32->orig_pins); + break; + case GPIOCONFIG32: + c32 = (struct gpio_config_32 *)arg; + res = GPIO_PIN_CONFIG_32(sc->sc_pdev, c32->first_pin, + c32->num_pins, c32->pin_flags); + break; + case GPIOCONFIGEVENTS: + evcfg = (struct gpio_event_config *)arg; + res = devfs_get_cdevpriv((void **)&priv); + if (res != 0) + break; + /* If any pins have been configured, changes aren't allowed. */ + if (!SLIST_EMPTY(&priv->pins)) { + res = EINVAL; + break; + } + if (evcfg->gp_report_type != GPIO_EVENT_REPORT_DETAIL && + evcfg->gp_report_type != GPIO_EVENT_REPORT_SUMMARY) { + res = EINVAL; + break; + } + priv->report_option = evcfg->gp_report_type; + /* Reallocate the events buffer if the user wants it bigger. */ + if (priv->report_option == GPIO_EVENT_REPORT_DETAIL && + priv->numevents < evcfg->gp_fifo_size) { + free(priv->events, M_GPIOC); + priv->numevents = evcfg->gp_fifo_size; + priv->events = malloc(priv->numevents * + sizeof(struct gpio_event_detail), M_GPIOC, + M_WAITOK | M_ZERO); + priv->evidx_head = priv->evidx_tail = 0; + } + break; + case FIONBIO: + /* + * This dummy handler is necessary to prevent fcntl() + * from failing. The actual handling of non-blocking IO + * is done using the O_NONBLOCK ioflag passed to the + * read() syscall. + */ + res = 0; + break; + case FIOASYNC: + res = devfs_get_cdevpriv((void **)&priv); + if (res == 0) { + if (*(int *)arg == FASYNC) + priv->async = true; + else + priv->async = false; + } + break; + case FIOGETOWN: + res = devfs_get_cdevpriv((void **)&priv); + if (res == 0) + *(int *)arg = fgetown(&priv->sigio); + break; + case FIOSETOWN: + res = devfs_get_cdevpriv((void **)&priv); + if (res == 0) + res = fsetown(*(int *)arg, &priv->sigio); + break; + default: + return (ENOTTY); + break; } return (res); +} + +static int +gpioc_poll(struct cdev *dev, int events, struct thread *td) +{ + struct gpioc_cdevpriv *priv; + int err; + int revents; + + revents = 0; + + err = devfs_get_cdevpriv((void **)&priv); + if (err != 0) { + revents = POLLERR; + return (revents); + } + + if (SLIST_EMPTY(&priv->pins)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Dec 12 19:34:13 2020 Return-Path: Delivered-To: svn-src-all@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 976274BE5E1; Sat, 12 Dec 2020 19:34:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtdBY3y1Hz3rFx; Sat, 12 Dec 2020 19:34:13 +0000 (UTC) (envelope-from cem@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 7A79422935; Sat, 12 Dec 2020 19:34:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCJYDJ9016292; Sat, 12 Dec 2020 19:34:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCJYDux016291; Sat, 12 Dec 2020 19:34:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202012121934.0BCJYDux016291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 12 Dec 2020 19:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368586 - in head/sys/dev: amdsmn amdtemp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/dev: amdsmn amdtemp X-SVN-Commit-Revision: 368586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 19:34:13 -0000 Author: cem Date: Sat Dec 12 19:34:12 2020 New Revision: 368586 URL: https://svnweb.freebsd.org/changeset/base/368586 Log: amdsmn(4), amdtemp(4): add support for Family 19h (Zen 3) Zen 3 "Vermeer" support, tested on Ryzen 9 5950X. Model numbers from https://en.wikichip.org/wiki/amd/cpuid "Extended Model" column. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D27552 Modified: head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdsmn/amdsmn.c ============================================================================== --- head/sys/dev/amdsmn/amdsmn.c Sat Dec 12 18:34:15 2020 (r368585) +++ head/sys/dev/amdsmn/amdsmn.c Sat Dec 12 19:34:12 2020 (r368586) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #define PCI_DEVICE_ID_AMD_15H_M60H_ROOT 0x1576 #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 -#define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H. */ +#define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 struct pciid; @@ -187,6 +187,7 @@ amdsmn_probe(device_t dev) switch (family) { case 0x15: case 0x17: + case 0x19: break; default: return (ENXIO); Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sat Dec 12 18:34:15 2020 (r368585) +++ head/sys/dev/amdtemp/amdtemp.c Sat Dec 12 19:34:12 2020 (r368586) @@ -106,7 +106,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC16_M30H 0x1583 #define DEVICEID_AMD_HOSTB17H_ROOT 0x1450 #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 -#define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70h. */ +#define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 static const struct amdtemp_product { @@ -207,6 +207,7 @@ static int32_t amdtemp_gettemp(device_t dev, amdsensor static int32_t amdtemp_gettemp15hm60h(device_t dev, amdsensor_t sensor); static int32_t amdtemp_gettemp17h(device_t dev, amdsensor_t sensor); static void amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t model); +static void amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model); static int amdtemp_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t amdtemp_methods[] = { @@ -294,6 +295,7 @@ amdtemp_probe(device_t dev) case 0x15: case 0x16: case 0x17: + case 0x19: break; default: return (ENXIO); @@ -451,6 +453,7 @@ amdtemp_attach(device_t dev) sc->sc_gettemp = amdtemp_gettemp; break; case 0x17: + case 0x19: sc->sc_ntemps = 1; sc->sc_gettemp = amdtemp_gettemp17h; needsmn = true; @@ -509,6 +512,8 @@ amdtemp_attach(device_t dev) if (family == 0x17) amdtemp_probe_ccd_sensors17h(dev, model); + else if (family == 0x19) + amdtemp_probe_ccd_sensors19h(dev, model); else if (sc->sc_ntemps > 1) { SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), @@ -773,28 +778,13 @@ amdtemp_gettemp17h(device_t dev, amdsensor_t sensor) } static void -amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t model) +amdtemp_probe_ccd_sensors(device_t dev, uint32_t maxreg) { char sensor_name[16], sensor_descr[32]; struct amdtemp_softc *sc; - uint32_t maxreg, i, val; + uint32_t i, val; int error; - switch (model) { - case 0x00 ... 0x1f: /* Zen1, Zen+ */ - maxreg = 4; - break; - case 0x30 ... 0x3f: /* Zen2 TR/Epyc */ - case 0x70 ... 0x7f: /* Zen2 Ryzen */ - maxreg = 8; - _Static_assert((int)NUM_CCDS >= 8, ""); - break; - default: - device_printf(dev, - "Unrecognized Family 17h Model: %02xh\n", model); - return; - } - sc = device_get_softc(dev); for (i = 0; i < maxreg; i++) { error = amdsmn_read(sc->sc_smn, AMDTEMP_17H_CCD_TMP_BASE + @@ -813,4 +803,47 @@ amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t mo sensor_name, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, CCD_BASE + i, amdtemp_sysctl, "IK", sensor_descr); } +} + +static void +amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t model) +{ + uint32_t maxreg; + + switch (model) { + case 0x00 ... 0x1f: /* Zen1, Zen+ */ + maxreg = 4; + break; + case 0x30 ... 0x3f: /* Zen2 TR/EPYC */ + case 0x70 ... 0x7f: /* Zen2 Ryzen */ + maxreg = 8; + _Static_assert((int)NUM_CCDS >= 8, ""); + break; + default: + device_printf(dev, + "Unrecognized Family 17h Model: %02xh\n", model); + return; + } + + amdtemp_probe_ccd_sensors(dev, maxreg); +} + +static void +amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) +{ + uint32_t maxreg; + + switch (model) { + case 0x00 ... 0x0f: /* Zen3 EPYC "Milan" */ + case 0x20 ... 0x2f: /* Zen3 Ryzen "Vermeer" */ + maxreg = 8; + _Static_assert((int)NUM_CCDS >= 8, ""); + break; + default: + device_printf(dev, + "Unrecognized Family 19h Model: %02xh\n", model); + return; + } + + amdtemp_probe_ccd_sensors(dev, maxreg); } From owner-svn-src-all@freebsd.org Sat Dec 12 19:43:39 2020 Return-Path: Delivered-To: svn-src-all@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 5F46D4BEE5F; Sat, 12 Dec 2020 19:43:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CtdPR0w2Yz3rnP; Sat, 12 Dec 2020 19:43:39 +0000 (UTC) (envelope-from cem@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 1291D22B36; Sat, 12 Dec 2020 19:43:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCJhcWY022183; Sat, 12 Dec 2020 19:43:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCJhcCG022182; Sat, 12 Dec 2020 19:43:38 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202012121943.0BCJhcCG022182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 12 Dec 2020 19:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368587 - head/sys/dev/amdtemp X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/amdtemp X-SVN-Commit-Revision: 368587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 19:43:39 -0000 Author: cem Date: Sat Dec 12 19:43:38 2020 New Revision: 368587 URL: https://svnweb.freebsd.org/changeset/base/368587 Log: amdtemp(4): Add missing Family 17h models Add missing model numbers M20h (Dali, Zen1), M60H (Renoir, Zen2), and M90H (Van Gogh, Zen2). Submitted by: Greg V Modified: head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sat Dec 12 19:34:12 2020 (r368586) +++ head/sys/dev/amdtemp/amdtemp.c Sat Dec 12 19:43:38 2020 (r368587) @@ -811,11 +811,12 @@ amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t mo uint32_t maxreg; switch (model) { - case 0x00 ... 0x1f: /* Zen1, Zen+ */ + case 0x00 ... 0x2f: /* Zen1, Zen+ */ maxreg = 4; break; - case 0x30 ... 0x3f: /* Zen2 TR/EPYC */ - case 0x70 ... 0x7f: /* Zen2 Ryzen */ + case 0x30 ... 0x3f: /* Zen2 TR (Castle Peak)/EPYC (Rome) */ + case 0x60 ... 0x7f: /* Zen2 Ryzen (Renoir APU, Matisse) */ + case 0x90 ... 0x9f: /* Zen2 Ryzen (Van Gogh APU) */ maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, ""); break; From owner-svn-src-all@freebsd.org Sat Dec 12 20:14:40 2020 Return-Path: Delivered-To: svn-src-all@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 2FBFE4BF5A2; Sat, 12 Dec 2020 20:14:40 +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 4Ctf5D0rMwz3tLv; Sat, 12 Dec 2020 20:14:40 +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 1018B22FCF; Sat, 12 Dec 2020 20:14:40 +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 0BCKEdDv040947; Sat, 12 Dec 2020 20:14:39 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCKEdKR040946; Sat, 12 Dec 2020 20:14:39 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202012122014.0BCKEdKR040946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 12 Dec 2020 20:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368588 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 368588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 20:14:40 -0000 Author: kp Date: Sat Dec 12 20:14:39 2020 New Revision: 368588 URL: https://svnweb.freebsd.org/changeset/base/368588 Log: pf: Allow net.pf.request_maxcount to be set from loader.conf Mark request_maxcount as RWTUN so we can set it both at runtime and from loader.conf. This avoids usings getting caught out by the change from tunable to run time configuration. Suggested by: Franco Fichtner MFC after: 3 days Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat Dec 12 19:43:38 2020 (r368587) +++ head/sys/netpfil/pf/pf.c Sat Dec 12 20:14:39 2020 (r368588) @@ -382,7 +382,7 @@ SYSCTL_ULONG(_net_pf, OID_AUTO, states_hashsize, CTLFL &pf_hashsize, 0, "Size of pf(4) states hashtable"); SYSCTL_ULONG(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, &pf_srchashsize, 0, "Size of pf(4) source nodes hashtable"); -SYSCTL_ULONG(_net_pf, OID_AUTO, request_maxcount, CTLFLAG_RW, +SYSCTL_ULONG(_net_pf, OID_AUTO, request_maxcount, CTLFLAG_RWTUN, &pf_ioctl_maxcount, 0, "Maximum number of tables, addresses, ... in a single ioctl() call"); VNET_DEFINE(void *, pf_swi_cookie); From owner-svn-src-all@freebsd.org Sat Dec 12 20:34:32 2020 Return-Path: Delivered-To: svn-src-all@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 C7F554C05B4 for ; Sat, 12 Dec 2020 20:34:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (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 4CtfX84KXhz3vfR for ; Sat, 12 Dec 2020 20:34:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf29.google.com with SMTP id 4so5969894qvh.1 for ; Sat, 12 Dec 2020 12:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mvgikb6l+qA6kxWzvO68ZKqFzaZtzww1z/jhBxTVcvM=; b=TU2Q88BrHySM2NWg1uJQnGTfeBTbWlJRCBt7MiYl5opOSo4BeRZz4TiLBibyLC5vVT sGKl5nLJaaIM7e60ihe4lnsLqGNXuY7Th+qRLGmm4+7tnFe/7oN/MQX/HaQQmczIFjh9 NonlInB7W3mKvDIFAqMorvEHWOFNSBj2kmPa4DuDNS8czL7adrTIgkYgFNb8FPqgbWP+ v4tOYUgS3Cc2kVsXMf3A0FKkaxyjoscLWGtv5kjmT0l/C6IIQ9hpoLYVG0laNY4eWUhd z5zAd/dnojFS2FLz/4GL+j6eIk95jHXTlL6pibclbsMKtkDrt5w+HzSX+e+CGgCug7tW mDGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mvgikb6l+qA6kxWzvO68ZKqFzaZtzww1z/jhBxTVcvM=; b=VFOFsKkUNBUKLJnSYbjQM7AntkC8jUqJzl95Ucm1YYPoYasR6ssd/fvodVmUSuwXO4 ch3G3U5fhwaM1j6T7NJtj8MofFd9xd32Vv7iHWJl+HOH/XRQTl5cLj50ay15zzZDQ/QJ hTAc1toQexxqMxfwgDxIWB/4hJR5rOHVUC6AZ8541e9A3PCoPKHqBs5jG6jqtXhn9IKa X6qeZJ3qMbpaG/IDfRBRP4WWXsEcG8sLbcDb6Hf5EJVCURGvo8rxOioQOqTWx4mjHX9t WpAM+EWluVHXh89Ip958SpGuQLMhs5UOvx8Nge7cFYZWHZam1GZQBitNQn+g8Q4qVSP1 i89g== X-Gm-Message-State: AOAM530I+beU67LUlFHdNUh7UEKzbe2UCJUA+Jc6AgRBhnBo6NJl6MEO Zridrz/O06qy0R1BK2jvAe9Wqj82JLYkg5lxYWq+Tg== X-Google-Smtp-Source: ABdhPJwTXOy2wSB4iVvDq3+ZcIgH3rQAaUP3vxDvefdY3GSxNyXZBMqf0D8O6mg2QhXAWGoGikX+UKrJc5AfUfkAdWk= X-Received: by 2002:a05:6214:8c9:: with SMTP id da9mr8593528qvb.29.1607805270973; Sat, 12 Dec 2020 12:34:30 -0800 (PST) MIME-Version: 1.0 References: <202012121834.0BCIYFAZ076662@repo.freebsd.org> In-Reply-To: <202012121834.0BCIYFAZ076662@repo.freebsd.org> From: Warner Losh Date: Sat, 12 Dec 2020 13:34:18 -0700 Message-ID: Subject: Re: svn commit: r368585 - in head: sys/dev/gpio sys/sys tools/test tools/test/gpioevents usr.sbin/gpioctl To: Ian Lepore Cc: src-committers , svn-src-all , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CtfX84KXhz3vfR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 20:34:32 -0000 FWIW I generally approved the code, but didn't have the time to review it in detail. I got the impression people were at least generally happy from the review. Thanks so much for picking this up. Warner On Sat, Dec 12, 2020, 11:34 AM Ian Lepore wrote: > Author: ian > Date: Sat Dec 12 18:34:15 2020 > New Revision: 368585 > URL: https://svnweb.freebsd.org/changeset/base/368585 > > Log: > Provide userland notification of gpio pin changes ("userland gpio > interrupts"). > > This is an import of the Google Summer of Code 2018 project completed by > Christian Kramer (and, sadly, ignored by us for two years now). The > goals > stated for that project were: > > FreeBSD already has support for interrupts implemented in the GPIO > controller drivers of several SoCs, but there are no interfaces to > take > advantage of them out of user space yet. The goal of this work is to > implement such an interface by providing descriptors which integrate > with the common I/O system calls and multiplexing mechanisms. > > The initial imported code supports the following functionality: > > - A kernel driver that provides an interface to the user space; the > existing gpioc(4) driver was enhanced with this functionality. > - Implement support for the most common I/O system calls / multiplexing > mechanisms: > - read() Places the pin number on which the interrupt occurred in > the > buffer. Blocking and non-blocking behaviour supported. > - poll()/select() > - kqueue() > - signal driven I/O. Posting SIGIO when the O_ASYNC was set. > - Many-to-many relationship between pins and file descriptors. > - A file descriptor can monitor several GPIO pins. > - A GPIO pin can be monitored by multiple file descriptors. > - Integration with gpioctl and libgpio. > > I added some fixes (mostly to locking) and feature enhancements on top of > the original gsoc code. The feature ehancements allow the user to choose > between detailed and summary event reporting. Detailed reporting > provides > a record describing each pin change event. Summary reporting provides > the > time of the first and last change of each pin, and a count of how many > times > it changed state since the last read(2) call. Another enhancement allows > the recording of multiple state change events on multiple pins between > each > call to read(2) (the original code would track only a single event at a > time). > > The phabricator review for these changes timed out without approval, but > I > cite it below anyway, because the review contains a series of diffs that > show how I evolved the code from its original state in Christian's github > repo for the gsoc project to what is being commited here. (In effect, > the phab review extends the VC history back to the original code.) > > Submitted by: Christian Kramer > Obtained from: https://github.com/ckraemer/freebsd/tree/gsoc2018 > Differential Revision: https://reviews.freebsd.org/D27398 > > Added: > head/tools/test/gpioevents/ > head/tools/test/gpioevents/Makefile (contents, props changed) > head/tools/test/gpioevents/gpioevents.c (contents, props changed) > Modified: > head/sys/dev/gpio/gpiobus.c > head/sys/dev/gpio/gpioc.c > head/sys/sys/gpio.h > head/tools/test/README > head/usr.sbin/gpioctl/gpioctl.c > > Modified: head/sys/dev/gpio/gpiobus.c > > ============================================================================== > --- head/sys/dev/gpio/gpiobus.c Sat Dec 12 17:11:22 2020 (r368584) > +++ head/sys/dev/gpio/gpiobus.c Sat Dec 12 18:34:15 2020 (r368585) > @@ -143,6 +143,15 @@ gpio_check_flags(uint32_t caps, uint32_t flags) > /* Cannot mix pull-up/pull-down together. */ > if (flags & GPIO_PIN_PULLUP && flags & GPIO_PIN_PULLDOWN) > return (EINVAL); > + /* Cannot mix output and interrupt flags together */ > + if (flags & GPIO_PIN_OUTPUT && flags & GPIO_INTR_MASK) > + return (EINVAL); > + /* Only one interrupt flag can be defined at once */ > + if ((flags & GPIO_INTR_MASK) & ((flags & GPIO_INTR_MASK) - 1)) > + return (EINVAL); > + /* The interrupt attached flag cannot be set */ > + if (flags & GPIO_INTR_ATTACHED) > + return (EINVAL); > > return (0); > } > > Modified: head/sys/dev/gpio/gpioc.c > > ============================================================================== > --- head/sys/dev/gpio/gpioc.c Sat Dec 12 17:11:22 2020 (r368584) > +++ head/sys/dev/gpio/gpioc.c Sat Dec 12 18:34:15 2020 (r368585) > @@ -35,8 +35,15 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > +#include > +#include > +#include > #include > #include > +#include > +#include > +#include > #include > > #include > @@ -47,30 +54,510 @@ __FBSDID("$FreeBSD$"); > #undef GPIOC_DEBUG > #ifdef GPIOC_DEBUG > #define dprintf printf > +#define ddevice_printf device_printf > #else > #define dprintf(x, arg...) > +#define ddevice_printf(dev, x, arg...) > #endif > > -static int gpioc_probe(device_t dev); > -static int gpioc_attach(device_t dev); > -static int gpioc_detach(device_t dev); > +struct gpioc_softc { > + device_t sc_dev; /* gpiocX dev */ > + device_t sc_pdev; /* gpioX dev */ > + struct cdev *sc_ctl_dev; /* controller device */ > + int sc_unit; > + int sc_npins; > + struct gpioc_pin_intr *sc_pin_intr; > +}; > > +struct gpioc_pin_intr { > + struct gpioc_softc *sc; > + gpio_pin_t pin; > + bool config_locked; > + int intr_rid; > + struct resource *intr_res; > + void *intr_cookie; > + struct mtx mtx; > + SLIST_HEAD(gpioc_privs_list, gpioc_privs) privs; > +}; > + > + > +struct gpioc_cdevpriv { > + struct gpioc_softc *sc; > + struct selinfo selinfo; > + bool async; > + uint8_t report_option; > + struct sigio *sigio; > + struct mtx mtx; > + struct gpioc_pin_event *events; > + int numevents; > + int evidx_head; > + int evidx_tail; > + SLIST_HEAD(gpioc_pins_list, gpioc_pins) pins; > +}; > + > +struct gpioc_privs { > + struct gpioc_cdevpriv *priv; > + SLIST_ENTRY(gpioc_privs) next; > +}; > + > +struct gpioc_pins { > + struct gpioc_pin_intr *pin; > + int eventcount; > + int firstevent; > + SLIST_ENTRY(gpioc_pins) next; > +}; > + > +struct gpioc_pin_event { > + struct gpioc_pins *privpin; > + sbintime_t event_time; > + bool event_pin_state; > +}; > + > +static MALLOC_DEFINE(M_GPIOC, "gpioc", "gpioc device data"); > + > +static int gpioc_allocate_pin_intr(struct gpioc_pin_intr*, uint32_t); > +static int gpioc_release_pin_intr(struct gpioc_pin_intr*); > +static int gpioc_attach_priv_pin(struct gpioc_cdevpriv*, > + struct gpioc_pin_intr*); > +static int gpioc_detach_priv_pin(struct gpioc_cdevpriv*, > + struct gpioc_pin_intr*); > +static bool gpioc_intr_reconfig_allowed(struct gpioc_cdevpriv*, > + struct gpioc_pin_intr *intr_conf); > +static uint32_t gpioc_get_intr_config(struct gpioc_softc*, > + struct gpioc_cdevpriv*, uint32_t pin); > +static int gpioc_set_intr_config(struct gpioc_softc*, > + struct gpioc_cdevpriv*, uint32_t, uint32_t); > +static void gpioc_interrupt_handler(void*); > + > +static int gpioc_kqread(struct knote*, long); > +static void gpioc_kqdetach(struct knote*); > + > +static int gpioc_probe(device_t dev); > +static int gpioc_attach(device_t dev); > +static int gpioc_detach(device_t dev); > + > +static void gpioc_cdevpriv_dtor(void*); > + > +static d_open_t gpioc_open; > +static d_read_t gpioc_read; > static d_ioctl_t gpioc_ioctl; > +static d_poll_t gpioc_poll; > +static d_kqfilter_t gpioc_kqfilter; > > static struct cdevsw gpioc_cdevsw = { > .d_version = D_VERSION, > + .d_open = gpioc_open, > + .d_read = gpioc_read, > .d_ioctl = gpioc_ioctl, > + .d_poll = gpioc_poll, > + .d_kqfilter = gpioc_kqfilter, > .d_name = "gpioc", > }; > > -struct gpioc_softc { > - device_t sc_dev; /* gpiocX dev */ > - device_t sc_pdev; /* gpioX dev */ > - struct cdev *sc_ctl_dev; /* controller device */ > - int sc_unit; > +static struct filterops gpioc_read_filterops = { > + .f_isfd = true, > + .f_attach = NULL, > + .f_detach = gpioc_kqdetach, > + .f_event = gpioc_kqread, > + .f_touch = NULL > }; > > +static struct gpioc_pin_event * > +next_head_event(struct gpioc_cdevpriv *priv) > +{ > + struct gpioc_pin_event *rv; > + > + rv = &priv->events[priv->evidx_head++]; > + if (priv->evidx_head == priv->numevents) > + priv->evidx_head = 0; > + return (rv); > +} > + > +static struct gpioc_pin_event * > +next_tail_event(struct gpioc_cdevpriv *priv) > +{ > + struct gpioc_pin_event *rv; > + > + rv = &priv->events[priv->evidx_tail++]; > + if (priv->evidx_tail == priv->numevents) > + priv->evidx_tail = 0; > + return (rv); > +} > + > +static size_t > +number_of_events(struct gpioc_cdevpriv *priv) > +{ > + if (priv->evidx_head >= priv->evidx_tail) > + return (priv->evidx_head - priv->evidx_tail); > + else > + return (priv->numevents + priv->evidx_head - > priv->evidx_tail); > +} > + > static int > +gpioc_allocate_pin_intr(struct gpioc_pin_intr *intr_conf, uint32_t flags) > +{ > + int err; > + > + intr_conf->config_locked = true; > + mtx_unlock(&intr_conf->mtx); > + > + intr_conf->intr_res = gpio_alloc_intr_resource(intr_conf->pin->dev, > + &intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags); > + if (intr_conf->intr_res == NULL) { > + err = ENXIO; > + goto error_exit; > + } > + > + err = bus_setup_intr(intr_conf->pin->dev, intr_conf->intr_res, > + INTR_TYPE_MISC | INTR_MPSAFE, NULL, gpioc_interrupt_handler, > + intr_conf, &intr_conf->intr_cookie); > + if (err != 0) > + goto error_exit; > + > + intr_conf->pin->flags = flags; > + > +error_exit: > + mtx_lock(&intr_conf->mtx); > + intr_conf->config_locked = false; > + wakeup(&intr_conf->config_locked); > + > + return (err); > +} > + > +static int > +gpioc_release_pin_intr(struct gpioc_pin_intr *intr_conf) > +{ > + int err; > + > + intr_conf->config_locked = true; > + mtx_unlock(&intr_conf->mtx); > + > + if (intr_conf->intr_cookie != NULL) { > + err = bus_teardown_intr(intr_conf->pin->dev, > + intr_conf->intr_res, intr_conf->intr_cookie); > + if (err != 0) > + goto error_exit; > + else > + intr_conf->intr_cookie = NULL; > + } > + > + if (intr_conf->intr_res != NULL) { > + err = bus_release_resource(intr_conf->pin->dev, > SYS_RES_IRQ, > + intr_conf->intr_rid, intr_conf->intr_res); > + if (err != 0) > + goto error_exit; > + else { > + intr_conf->intr_rid = 0; > + intr_conf->intr_res = NULL; > + } > + } > + > + intr_conf->pin->flags = 0; > + err = 0; > + > +error_exit: > + mtx_lock(&intr_conf->mtx); > + intr_conf->config_locked = false; > + wakeup(&intr_conf->config_locked); > + > + return (err); > +} > + > +static int > +gpioc_attach_priv_pin(struct gpioc_cdevpriv *priv, > + struct gpioc_pin_intr *intr_conf) > +{ > + struct gpioc_privs *priv_link; > + struct gpioc_pins *pin_link; > + unsigned int consistency_a, consistency_b; > + > + consistency_a = 0; > + consistency_b = 0; > + mtx_assert(&intr_conf->mtx, MA_OWNED); > + mtx_lock(&priv->mtx); > + SLIST_FOREACH(priv_link, &intr_conf->privs, next) { > + if (priv_link->priv == priv) > + consistency_a++; > + } > + KASSERT(consistency_a <= 1, > + ("inconsistent links between pin config and cdevpriv")); > + SLIST_FOREACH(pin_link, &priv->pins, next) { > + if (pin_link->pin == intr_conf) > + consistency_b++; > + } > + KASSERT(consistency_a == consistency_b, > + ("inconsistent links between pin config and cdevpriv")); > + if (consistency_a == 1 && consistency_b == 1) { > + mtx_unlock(&priv->mtx); > + return (EEXIST); > + } > + priv_link = malloc(sizeof(struct gpioc_privs), M_GPIOC, > + M_NOWAIT | M_ZERO); > + if (priv_link == NULL) > + { > + mtx_unlock(&priv->mtx); > + return (ENOMEM); > + } > + pin_link = malloc(sizeof(struct gpioc_pins), M_GPIOC, > + M_NOWAIT | M_ZERO); > + if (pin_link == NULL) { > + mtx_unlock(&priv->mtx); > + return (ENOMEM); > + } > + priv_link->priv = priv; > + pin_link->pin = intr_conf; > + SLIST_INSERT_HEAD(&intr_conf->privs, priv_link, next); > + SLIST_INSERT_HEAD(&priv->pins, pin_link, next); > + mtx_unlock(&priv->mtx); > + > + return (0); > +} > + > +static int > +gpioc_detach_priv_pin(struct gpioc_cdevpriv *priv, > + struct gpioc_pin_intr *intr_conf) > +{ > + struct gpioc_privs *priv_link, *priv_link_temp; > + struct gpioc_pins *pin_link, *pin_link_temp; > + unsigned int consistency_a, consistency_b; > + > + consistency_a = 0; > + consistency_b = 0; > + mtx_assert(&intr_conf->mtx, MA_OWNED); > + mtx_lock(&priv->mtx); > + SLIST_FOREACH_SAFE(priv_link, &intr_conf->privs, next, > priv_link_temp) { > + if (priv_link->priv == priv) { > + SLIST_REMOVE(&intr_conf->privs, priv_link, > gpioc_privs, > + next); > + free(priv_link, M_GPIOC); > + consistency_a++; > + } > + } > + KASSERT(consistency_a <= 1, > + ("inconsistent links between pin config and cdevpriv")); > + SLIST_FOREACH_SAFE(pin_link, &priv->pins, next, pin_link_temp) { > + if (pin_link->pin == intr_conf) { > + /* > + * If the pin we're removing has events in the > priv's > + * event fifo, we can't leave dangling pointers > from > + * those events to the gpioc_pins struct we're > about to > + * free. We also can't remove random items and > leave > + * holes in the events fifo, so just empty it out. > + */ > + if (pin_link->eventcount > 0) { > + priv->evidx_head = priv->evidx_tail = 0; > + } > + SLIST_REMOVE(&priv->pins, pin_link, gpioc_pins, > next); > + free(pin_link, M_GPIOC); > + consistency_b++; > + } > + } > + KASSERT(consistency_a == consistency_b, > + ("inconsistent links between pin config and cdevpriv")); > + mtx_unlock(&priv->mtx); > + > + return (0); > +} > + > +static bool > +gpioc_intr_reconfig_allowed(struct gpioc_cdevpriv *priv, > + struct gpioc_pin_intr *intr_conf) > +{ > + struct gpioc_privs *priv_link; > + > + mtx_assert(&intr_conf->mtx, MA_OWNED); > + > + if (SLIST_EMPTY(&intr_conf->privs)) > + return (true); > + > + SLIST_FOREACH(priv_link, &intr_conf->privs, next) { > + if (priv_link->priv != priv) > + return (false); > + } > + > + return (true); > +} > + > + > +static uint32_t > +gpioc_get_intr_config(struct gpioc_softc *sc, struct gpioc_cdevpriv *priv, > + uint32_t pin) > +{ > + struct gpioc_pin_intr *intr_conf = &sc->sc_pin_intr[pin]; > + struct gpioc_privs *priv_link; > + uint32_t flags; > + > + flags = intr_conf->pin->flags; > + > + if (flags == 0) > + return (0); > + > + mtx_lock(&intr_conf->mtx); > + SLIST_FOREACH(priv_link, &intr_conf->privs, next) { > + if (priv_link->priv == priv) { > + flags |= GPIO_INTR_ATTACHED; > + break; > + } > + } > + mtx_unlock(&intr_conf->mtx); > + > + return (flags); > +} > + > +static int > +gpioc_set_intr_config(struct gpioc_softc *sc, struct gpioc_cdevpriv *priv, > + uint32_t pin, uint32_t flags) > +{ > + struct gpioc_pin_intr *intr_conf = &sc->sc_pin_intr[pin]; > + int res; > + > + res = 0; > + if (intr_conf->pin->flags == 0 && flags == 0) { > + /* No interrupt configured and none requested: Do nothing. > */ > + return (0); > + } > + mtx_lock(&intr_conf->mtx); > + while (intr_conf->config_locked == true) > + mtx_sleep(&intr_conf->config_locked, &intr_conf->mtx, 0, > + "gpicfg", 0); > + if (intr_conf->pin->flags == 0 && flags != 0) { > + /* > + * No interrupt is configured, but one is requested: > Allocate > + * and setup interrupt on the according pin. > + */ > + res = gpioc_allocate_pin_intr(intr_conf, flags); > + if (res == 0) > + res = gpioc_attach_priv_pin(priv, intr_conf); > + if (res == EEXIST) > + res = 0; > + } else if (intr_conf->pin->flags == flags) { > + /* > + * Same interrupt requested as already configured: Attach > the > + * cdevpriv to the corresponding pin. > + */ > + res = gpioc_attach_priv_pin(priv, intr_conf); > + if (res == EEXIST) > + res = 0; > + } else if (intr_conf->pin->flags != 0 && flags == 0) { > + /* > + * Interrupt configured, but none requested: Teardown and > + * release the pin when no other cdevpriv is attached. > Otherwise > + * just detach pin and cdevpriv from each other. > + */ > + if (gpioc_intr_reconfig_allowed(priv, intr_conf)) { > + res = gpioc_release_pin_intr(intr_conf); > + } > + if (res == 0) > + res = gpioc_detach_priv_pin(priv, intr_conf); > + } else { > + /* > + * Other flag requested than configured: Reconfigure when > no > + * other cdevpriv is are attached to the pin. > + */ > + if (!gpioc_intr_reconfig_allowed(priv, intr_conf)) > + res = EBUSY; > + else { > + res = gpioc_release_pin_intr(intr_conf); > + if (res == 0) > + res = gpioc_allocate_pin_intr(intr_conf, > flags); > + if (res == 0) > + res = gpioc_attach_priv_pin(priv, > intr_conf); > + if (res == EEXIST) > + res = 0; > + } > + } > + mtx_unlock(&intr_conf->mtx); > + > + return (res); > +} > + > +static void > +gpioc_interrupt_handler(void *arg) > +{ > + struct gpioc_pin_intr *intr_conf; > + struct gpioc_privs *privs; > + struct gpioc_softc *sc; > + sbintime_t evtime; > + uint32_t pin_state; > + > + intr_conf = arg; > + sc = intr_conf->sc; > + > + /* Capture time and pin state first. */ > + evtime = sbinuptime(); > + if (intr_conf->pin->flags & GPIO_INTR_EDGE_BOTH) > + GPIO_PIN_GET(sc->sc_pdev, intr_conf->pin->pin, &pin_state); > + else if (intr_conf->pin->flags & GPIO_INTR_EDGE_RISING) > + pin_state = true; > + else > + pin_state = false; > + > + mtx_lock(&intr_conf->mtx); > + > + if (intr_conf->config_locked == true) { > + ddevice_printf(sc->sc_dev, "Interrupt configuration in " > + "progress. Discarding interrupt on pin %d.\n", > + intr_conf->pin->pin); > + mtx_unlock(&intr_conf->mtx); > + return; > + } > + > + if (SLIST_EMPTY(&intr_conf->privs)) { > + ddevice_printf(sc->sc_dev, "No file descriptor associated > with " > + "occurred interrupt on pin %d.\n", > intr_conf->pin->pin); > + mtx_unlock(&intr_conf->mtx); > + return; > + } > + > + SLIST_FOREACH(privs, &intr_conf->privs, next) { > + struct gpioc_cdevpriv *priv = privs->priv; > + struct gpioc_pins *privpin; > + struct gpioc_pin_event *event; > + mtx_lock(&priv->mtx); > + SLIST_FOREACH(privpin, &priv->pins, next) { > + if (privpin->pin == intr_conf) > + break; > + } > + if (privpin == NULL) { > + /* Should be impossible. */ > + ddevice_printf(sc->sc_dev, "Cannot find > privpin\n"); > + mtx_unlock(&priv->mtx); > + continue; > + } > + > + if (priv->report_option == GPIO_EVENT_REPORT_DETAIL) { > + event = next_head_event(priv); > + /* If head is overtaking tail, advance tail. */ > + if (priv->evidx_head == priv->evidx_tail) > + next_tail_event(priv); > + } else { > + if (privpin->eventcount > 0) > + event = &priv->events[privpin->firstevent > + 1]; > + else { > + privpin->firstevent = priv->evidx_head; > + event = next_head_event(priv); > + event->privpin = privpin; > + event->event_time = evtime; > + event->event_pin_state = pin_state; > + event = next_head_event(priv); > + } > + ++privpin->eventcount; > + } > + event->privpin = privpin; > + event->event_time = evtime; > + event->event_pin_state = pin_state; > + wakeup(priv); > + selwakeup(&priv->selinfo); > + KNOTE_LOCKED(&priv->selinfo.si_note, 0); > + if (priv->async == true && priv->sigio != NULL) > + pgsigio(&priv->sigio, SIGIO, 0); > + mtx_unlock(&priv->mtx); > + } > + > + mtx_unlock(&intr_conf->mtx); > +} > + > +static int > gpioc_probe(device_t dev) > { > device_set_desc(dev, "GPIO controller"); > @@ -88,6 +575,23 @@ gpioc_attach(device_t dev) > sc->sc_dev = dev; > sc->sc_pdev = device_get_parent(dev); > sc->sc_unit = device_get_unit(dev); > + > + err = GPIO_PIN_MAX(sc->sc_pdev, &sc->sc_npins); > + sc->sc_npins++; /* Number of pins is one more than max pin number. > */ > + if (err != 0) > + return (err); > + sc->sc_pin_intr = malloc(sizeof(struct gpioc_pin_intr) * > sc->sc_npins, > + M_GPIOC, M_WAITOK | M_ZERO); > + for (int i = 0; i <= sc->sc_npins; i++) { > + sc->sc_pin_intr[i].pin = malloc(sizeof(struct gpiobus_pin), > + M_GPIOC, M_WAITOK | M_ZERO); > + sc->sc_pin_intr[i].sc = sc; > + sc->sc_pin_intr[i].pin->pin = i; > + sc->sc_pin_intr[i].pin->dev = sc->sc_pdev; > + mtx_init(&sc->sc_pin_intr[i].mtx, "gpioc pin", NULL, > MTX_DEF); > + SLIST_INIT(&sc->sc_pin_intr[i].privs); > + } > + > make_dev_args_init(&devargs); > devargs.mda_devsw = &gpioc_cdevsw; > devargs.mda_uid = UID_ROOT; > @@ -96,7 +600,7 @@ gpioc_attach(device_t dev) > devargs.mda_si_drv1 = sc; > err = make_dev_s(&devargs, &sc->sc_ctl_dev, "gpioc%d", > sc->sc_unit); > if (err != 0) { > - printf("Failed to create gpioc%d", sc->sc_unit); > + device_printf(dev, "Failed to create gpioc%d", > sc->sc_unit); > return (ENXIO); > } > > @@ -112,12 +616,160 @@ gpioc_detach(device_t dev) > if (sc->sc_ctl_dev) > destroy_dev(sc->sc_ctl_dev); > > + for (int i = 0; i <= sc->sc_npins; i++) { > + mtx_destroy(&sc->sc_pin_intr[i].mtx); > + free(&sc->sc_pin_intr[i].pin, M_GPIOC); > + } > + free(sc->sc_pin_intr, M_GPIOC); > + > if ((err = bus_generic_detach(dev)) != 0) > return (err); > > return (0); > } > > +static void > +gpioc_cdevpriv_dtor(void *data) > +{ > + struct gpioc_cdevpriv *priv; > + struct gpioc_privs *priv_link, *priv_link_temp; > + struct gpioc_pins *pin_link, *pin_link_temp; > + unsigned int consistency; > + > + priv = data; > + > + SLIST_FOREACH_SAFE(pin_link, &priv->pins, next, pin_link_temp) { > + consistency = 0; > + mtx_lock(&pin_link->pin->mtx); > + while (pin_link->pin->config_locked == true) > + mtx_sleep(&pin_link->pin->config_locked, > + &pin_link->pin->mtx, 0, "gpicfg", 0); > + SLIST_FOREACH_SAFE(priv_link, &pin_link->pin->privs, next, > + priv_link_temp) { > + if (priv_link->priv == priv) { > + SLIST_REMOVE(&pin_link->pin->privs, > priv_link, > + gpioc_privs, next); > + free(priv_link, M_GPIOC); > + consistency++; > + } > + } > + KASSERT(consistency == 1, > + ("inconsistent links between pin config and > cdevpriv")); > + if (gpioc_intr_reconfig_allowed(priv, pin_link->pin)) { > + gpioc_release_pin_intr(pin_link->pin); > + } > + mtx_unlock(&pin_link->pin->mtx); > + SLIST_REMOVE(&priv->pins, pin_link, gpioc_pins, next); > + free(pin_link, M_GPIOC); > + } > + > + wakeup(&priv); > + knlist_clear(&priv->selinfo.si_note, 0); > + seldrain(&priv->selinfo); > + knlist_destroy(&priv->selinfo.si_note); > + funsetown(&priv->sigio); > + > + mtx_destroy(&priv->mtx); > + free(priv->events, M_GPIOC); > + free(data, M_GPIOC); > +} > + > +static int > +gpioc_open(struct cdev *dev, int oflags, int devtype, struct thread *td) > +{ > + struct gpioc_cdevpriv *priv; > + int err; > + > + priv = malloc(sizeof(*priv), M_GPIOC, M_WAITOK | M_ZERO); > + priv->sc = dev->si_drv1; > + priv->report_option = GPIO_EVENT_REPORT_DETAIL; > + err = devfs_set_cdevpriv(priv, gpioc_cdevpriv_dtor); > + if (err != 0) { > + gpioc_cdevpriv_dtor(priv); > + return (err); > + } > + mtx_init(&priv->mtx, "gpioc priv", NULL, MTX_DEF); > + knlist_init_mtx(&priv->selinfo.si_note, &priv->mtx); > + > + /* > + * Allocate a circular buffer for events. The scheme we use for > summary > + * reporting assumes there will always be a pair of events > available to > + * record the first/last events on any pin, so we allocate 2 * > npins. > + * Even though we actually default to detailed event reporting, 2 * > + * npins isn't a horrible fifo size for that either. > + */ > + priv->numevents = priv->sc->sc_npins * 2; > + priv->events = malloc(priv->numevents * sizeof(struct > gpio_event_detail), > + M_GPIOC, M_WAITOK | M_ZERO); > + > + return (0); > +} > + > +static int > +gpioc_read(struct cdev *dev, struct uio *uio, int ioflag) > +{ > + struct gpioc_cdevpriv *priv; > + struct gpioc_pin_event *event; > + union { > + struct gpio_event_summary sum; > + struct gpio_event_detail evt; > + uint8_t data[1]; > + } recbuf; > + size_t recsize; > + int err; > + > + if ((err = devfs_get_cdevpriv((void **)&priv)) != 0) > + return (err); > + > + if (priv->report_option == GPIO_EVENT_REPORT_SUMMARY) > + recsize = sizeof(struct gpio_event_summary); > + else > + recsize = sizeof(struct gpio_event_detail); > + > + if (uio->uio_resid < recsize) > + return (EINVAL); > + > + mtx_lock(&priv->mtx); > + while (priv->evidx_head == priv->evidx_tail) { > + if (SLIST_EMPTY(&priv->pins)) { > + err = ENXIO; > + break; > + } else if (ioflag & O_NONBLOCK) { > + err = EWOULDBLOCK; > + break; > + } else { > + err = mtx_sleep(priv, &priv->mtx, PCATCH, > "gpintr", 0); > + if (err != 0) > + break; > + } > + } > + > + while (err == 0 && uio->uio_resid >= recsize && > + priv->evidx_tail != priv->evidx_head) { > + event = next_tail_event(priv); > + if (priv->report_option == GPIO_EVENT_REPORT_SUMMARY) { > + recbuf.sum.gp_first_time = event->event_time; > + recbuf.sum.gp_pin = event->privpin->pin->pin->pin; > + recbuf.sum.gp_count = event->privpin->eventcount; > + recbuf.sum.gp_first_state = event->event_pin_state; > + event = next_tail_event(priv); > + recbuf.sum.gp_last_time = event->event_time; > + recbuf.sum.gp_last_state = event->event_pin_state; > + event->privpin->eventcount = 0; > + event->privpin->firstevent = 0; > + } else { > + recbuf.evt.gp_time = event->event_time; > + recbuf.evt.gp_pin = event->privpin->pin->pin->pin; > + recbuf.evt.gp_pinstate = event->event_pin_state; > + } > + mtx_unlock(&priv->mtx); > + err = uiomove(recbuf.data, recsize, uio); > + mtx_lock(&priv->mtx); > + } > + mtx_unlock(&priv->mtx); > + return (err); > +} > + > static int > gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, > struct thread *td) > @@ -125,86 +777,268 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t > arg > device_t bus; > int max_pin, res; > struct gpioc_softc *sc = cdev->si_drv1; > + struct gpioc_cdevpriv *priv; > struct gpio_pin pin; > struct gpio_req req; > struct gpio_access_32 *a32; > struct gpio_config_32 *c32; > - uint32_t caps; > + struct gpio_event_config *evcfg; > + uint32_t caps, intrflags; > > bus = GPIO_GET_BUS(sc->sc_pdev); > if (bus == NULL) > return (EINVAL); > switch (cmd) { > - case GPIOMAXPIN: > - max_pin = -1; > - res = GPIO_PIN_MAX(sc->sc_pdev, &max_pin); > - bcopy(&max_pin, arg, sizeof(max_pin)); > + case GPIOMAXPIN: > + max_pin = -1; > + res = GPIO_PIN_MAX(sc->sc_pdev, &max_pin); > + bcopy(&max_pin, arg, sizeof(max_pin)); > + break; > + case GPIOGETCONFIG: > + bcopy(arg, &pin, sizeof(pin)); > + dprintf("get config pin %d\n", pin.gp_pin); > + res = GPIO_PIN_GETFLAGS(sc->sc_pdev, pin.gp_pin, > + &pin.gp_flags); > + /* Fail early */ > + if (res) > break; > - case GPIOGETCONFIG: > - bcopy(arg, &pin, sizeof(pin)); > - dprintf("get config pin %d\n", pin.gp_pin); > - res = GPIO_PIN_GETFLAGS(sc->sc_pdev, pin.gp_pin, > - &pin.gp_flags); > - /* Fail early */ > - if (res) > - break; > - GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, > &pin.gp_caps); > - GPIOBUS_PIN_GETNAME(bus, pin.gp_pin, pin.gp_name); > - bcopy(&pin, arg, sizeof(pin)); > + res = devfs_get_cdevpriv((void **)&priv); > + if (res) > break; > - case GPIOSETCONFIG: > - bcopy(arg, &pin, sizeof(pin)); > - dprintf("set config pin %d\n", pin.gp_pin); > - res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, > &caps); > - if (res == 0) > - res = gpio_check_flags(caps, pin.gp_flags); > - if (res == 0) > - res = GPIO_PIN_SETFLAGS(sc->sc_pdev, > pin.gp_pin, > - pin.gp_flags); > + pin.gp_flags |= gpioc_get_intr_config(sc, priv, > + pin.gp_pin); > + GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &pin.gp_caps); > + GPIOBUS_PIN_GETNAME(bus, pin.gp_pin, pin.gp_name); > + bcopy(&pin, arg, sizeof(pin)); > + break; > + case GPIOSETCONFIG: > + bcopy(arg, &pin, sizeof(pin)); > + dprintf("set config pin %d\n", pin.gp_pin); > + res = devfs_get_cdevpriv((void **)&priv); > + if (res != 0) > break; > - case GPIOGET: > - bcopy(arg, &req, sizeof(req)); > - res = GPIO_PIN_GET(sc->sc_pdev, req.gp_pin, > - &req.gp_value); > - dprintf("read pin %d -> %d\n", > - req.gp_pin, req.gp_value); > - bcopy(&req, arg, sizeof(req)); > + res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &caps); > + if (res != 0) > break; > - case GPIOSET: > - bcopy(arg, &req, sizeof(req)); > - res = GPIO_PIN_SET(sc->sc_pdev, req.gp_pin, > - req.gp_value); > - dprintf("write pin %d -> %d\n", > - req.gp_pin, req.gp_value); > + res = gpio_check_flags(caps, pin.gp_flags); > + if (res != 0) > break; > - case GPIOTOGGLE: > - bcopy(arg, &req, sizeof(req)); > - dprintf("toggle pin %d\n", > - req.gp_pin); > - res = GPIO_PIN_TOGGLE(sc->sc_pdev, req.gp_pin); > + intrflags = pin.gp_flags & GPIO_INTR_MASK; > + /* > + * We can do only edge interrupts, and only if the > + * hardware supports that interrupt type on that pin. > + */ > + switch (intrflags) { > + case GPIO_INTR_NONE: > break; > - case GPIOSETNAME: > - bcopy(arg, &pin, sizeof(pin)); > - dprintf("set name on pin %d\n", pin.gp_pin); > - res = GPIOBUS_PIN_SETNAME(bus, pin.gp_pin, > - pin.gp_name); > + case GPIO_INTR_EDGE_RISING: > + case GPIO_INTR_EDGE_FALLING: > + case GPIO_INTR_EDGE_BOTH: > + if ((intrflags & caps) == 0) > + res = EOPNOTSUPP; > break; > - case GPIOACCESS32: > - a32 = (struct gpio_access_32 *)arg; > - res = GPIO_PIN_ACCESS_32(sc->sc_pdev, > a32->first_pin, > - a32->clear_pins, a32->change_pins, > &a32->orig_pins); > + default: > + res = EINVAL; > break; > - case GPIOCONFIG32: > - c32 = (struct gpio_config_32 *)arg; > - res = GPIO_PIN_CONFIG_32(sc->sc_pdev, > c32->first_pin, > - c32->num_pins, c32->pin_flags); > + } > + if (res != 0) > break; > - default: > - return (ENOTTY); > + res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, > + (pin.gp_flags & ~GPIO_INTR_MASK)); > + if (res != 0) > break; > + res = gpioc_set_intr_config(sc, priv, pin.gp_pin, > + intrflags); > + break; > + case GPIOGET: > + bcopy(arg, &req, sizeof(req)); > + res = GPIO_PIN_GET(sc->sc_pdev, req.gp_pin, > + &req.gp_value); > + dprintf("read pin %d -> %d\n", > + req.gp_pin, req.gp_value); > + bcopy(&req, arg, sizeof(req)); > + break; > + case GPIOSET: > + bcopy(arg, &req, sizeof(req)); > + res = GPIO_PIN_SET(sc->sc_pdev, req.gp_pin, > + req.gp_value); > + dprintf("write pin %d -> %d\n", > + req.gp_pin, req.gp_value); > + break; > + case GPIOTOGGLE: > + bcopy(arg, &req, sizeof(req)); > + dprintf("toggle pin %d\n", > + req.gp_pin); > + res = GPIO_PIN_TOGGLE(sc->sc_pdev, req.gp_pin); > + break; > + case GPIOSETNAME: > + bcopy(arg, &pin, sizeof(pin)); > + dprintf("set name on pin %d\n", pin.gp_pin); > + res = GPIOBUS_PIN_SETNAME(bus, pin.gp_pin, > + pin.gp_name); > + break; > + case GPIOACCESS32: > + a32 = (struct gpio_access_32 *)arg; > + res = GPIO_PIN_ACCESS_32(sc->sc_pdev, a32->first_pin, > + a32->clear_pins, a32->change_pins, &a32->orig_pins); > + break; > + case GPIOCONFIG32: > + c32 = (struct gpio_config_32 *)arg; > + res = GPIO_PIN_CONFIG_32(sc->sc_pdev, c32->first_pin, > + c32->num_pins, c32->pin_flags); > + break; > + case GPIOCONFIGEVENTS: > + evcfg = (struct gpio_event_config *)arg; > + res = devfs_get_cdevpriv((void **)&priv); > + if (res != 0) > + break; > + /* If any pins have been configured, changes aren't > allowed. */ > + if (!SLIST_EMPTY(&priv->pins)) { > + res = EINVAL; > + break; > + } > + if (evcfg->gp_report_type != GPIO_EVENT_REPORT_DETAIL && > + evcfg->gp_report_type != GPIO_EVENT_REPORT_SUMMARY) { > + res = EINVAL; > + break; > + } > + priv->report_option = evcfg->gp_report_type; > + /* Reallocate the events buffer if the user wants it > bigger. */ > + if (priv->report_option == GPIO_EVENT_REPORT_DETAIL && > + priv->numevents < evcfg->gp_fifo_size) { > + free(priv->events, M_GPIOC); > + priv->numevents = evcfg->gp_fifo_size; > + priv->events = malloc(priv->numevents * > + sizeof(struct gpio_event_detail), M_GPIOC, > + M_WAITOK | M_ZERO); > + priv->evidx_head = priv->evidx_tail = 0; > + } > + break; > + case FIONBIO: > + /* > + * This dummy handler is necessary to prevent fcntl() > + * from failing. The actual handling of non-blocking IO > + * is done using the O_NONBLOCK ioflag passed to the > + * read() syscall. > + */ > + res = 0; > + break; > + case FIOASYNC: > + res = devfs_get_cdevpriv((void **)&priv); > + if (res == 0) { > + if (*(int *)arg == FASYNC) > + priv->async = true; > + else > + priv->async = false; > + } > + break; > + case FIOGETOWN: > + res = devfs_get_cdevpriv((void **)&priv); > + if (res == 0) > + *(int *)arg = fgetown(&priv->sigio); > + break; > + case FIOSETOWN: > + res = devfs_get_cdevpriv((void **)&priv); > + if (res == 0) > + res = fsetown(*(int *)arg, &priv->sigio); > + break; > + default: > + return (ENOTTY); > + break; > } > > return (res); > +} > + > +static int > +gpioc_poll(struct cdev *dev, int events, struct thread *td) > +{ > + struct gpioc_cdevpriv *priv; > + int err; > + int revents; > + > + revents = 0; > + > + err = devfs_get_cdevpriv((void **)&priv); > + if (err != 0) { > + revents = POLLERR; > + return (revents); > + } > + > + if (SLIST_EMPTY(&priv->pins)) { > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Sat Dec 12 20:40:42 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 21:02:25 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 21:25:40 2020 Return-Path: Delivered-To: svn-src-all@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 2A5524C136A; Sat, 12 Dec 2020 21:25:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4Ctgg80lqpz4SCd; Sat, 12 Dec 2020 21:25:40 +0000 (UTC) (envelope-from kevans@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 0CD3524037; Sat, 12 Dec 2020 21:25:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCLPdXN084868; Sat, 12 Dec 2020 21:25:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCLPdLF084864; Sat, 12 Dec 2020 21:25:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012122125.0BCLPdLF084864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 12 Dec 2020 21:25:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368591 - in head/stand: common liblua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand: common liblua X-SVN-Commit-Revision: 368591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 21:25:40 -0000 Author: kevans Date: Sat Dec 12 21:25:38 2020 New Revision: 368591 URL: https://svnweb.freebsd.org/changeset/base/368591 Log: stand: liblua: add a pager module This is nearly a 1:1 mapping of the pager API from libsa. The only real difference is that pager.output() will accept any number of arguments and coerce all of them to strings for output using luaL_tolstring (i.e. the __tostring metamethod will be used). The only consumer planned at this time is the upcoming "show-module-options" implementation. MFC after: 1 week Added: head/stand/liblua/lpager.c (contents, props changed) Modified: head/stand/common/interp_lua.c head/stand/liblua/Makefile head/stand/liblua/lutils.h Modified: head/stand/common/interp_lua.c ============================================================================== --- head/stand/common/interp_lua.c Sat Dec 12 21:02:24 2020 (r368590) +++ head/stand/common/interp_lua.c Sat Dec 12 21:25:38 2020 (r368591) @@ -95,6 +95,7 @@ static const luaL_Reg loadedlibs[] = { {"io", luaopen_io}, {"lfs", luaopen_lfs}, {"loader", luaopen_loader}, + {"pager", luaopen_pager}, {NULL, NULL} }; Modified: head/stand/liblua/Makefile ============================================================================== --- head/stand/liblua/Makefile Sat Dec 12 21:02:24 2020 (r368590) +++ head/stand/liblua/Makefile Sat Dec 12 21:25:38 2020 (r368591) @@ -23,7 +23,7 @@ SRCS+= lauxlib.c lbaselib.c lstrlib.c loadlib.c #SRCS+= lbitlib.c liolib.c lmathlib.c loslib.c ltablib.c # Our utilities. -SRCS+= lerrno.c lstd.c lutils.c +SRCS+= lerrno.c lpager.c lstd.c lutils.c .PATH: ${FLUASRC}/modules SRCS+= lfs.c Added: head/stand/liblua/lpager.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/liblua/lpager.c Sat Dec 12 21:25:38 2020 (r368591) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2020 Kyle Evans + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "lauxlib.h" + +/* Open the pager. No arguments, no return value. */ +static int +lpager_open(lua_State *L) +{ + + pager_open(); + return (0); +} + +/* + * Output to the pager. All arguments are interpreted as strings and passed to + * pager_output(). No return value. + */ +static int +lpager_output(lua_State *L) +{ + const char *outstr; + int i; + + for (i = 1; i <= lua_gettop(L); i++) { + outstr = luaL_tolstring(L, i, NULL); + pager_output(outstr); + lua_pop(L, -1); + } + + return (0); +} + +/* Output to the pager from a file. Takes a filename, no return value. */ +static int +lpager_file(lua_State *L) +{ + + return (pager_file(luaL_checkstring(L, 1))); +} + +static int +lpager_close(lua_State *L) +{ + + pager_close(); + return (0); +} + +static const struct luaL_Reg pagerlib[] = { + { "open", lpager_open }, + { "output", lpager_output }, + { "file", lpager_file }, + { "close", lpager_close }, + { NULL, NULL }, +}; + +int +luaopen_pager(lua_State *L) +{ + luaL_newlib(L, pagerlib); + return 1; +} Modified: head/stand/liblua/lutils.h ============================================================================== --- head/stand/liblua/lutils.h Sat Dec 12 21:02:24 2020 (r368590) +++ head/stand/liblua/lutils.h Sat Dec 12 21:25:38 2020 (r368591) @@ -30,3 +30,4 @@ int luaopen_loader(lua_State *); int luaopen_io(lua_State *); +int luaopen_pager(lua_State *); From owner-svn-src-all@freebsd.org Sat Dec 12 22:23:46 2020 Return-Path: Delivered-To: svn-src-all@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 4CD4A4C2C30; Sat, 12 Dec 2020 22:23:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-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 4CthyB1jdWz4Vpv; Sat, 12 Dec 2020 22:23:46 +0000 (UTC) (envelope-from tuexen@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 2DE9C24466; Sat, 12 Dec 2020 22:23:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCMNkwp021922; Sat, 12 Dec 2020 22:23:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCMNkXS021921; Sat, 12 Dec 2020 22:23:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202012122223.0BCMNkXS021921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 12 Dec 2020 22:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368593 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 368593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 22:23:46 -0000 Author: tuexen Date: Sat Dec 12 22:23:45 2020 New Revision: 368593 URL: https://svnweb.freebsd.org/changeset/base/368593 Log: Clean up more resouces of an existing SCTP association in case of a restart. This fixes a use-after-free scenario, which was reported by Felix Wilhelm from Google in case a peer is able to modify the cookie. However, this can also be triggered by an assciation restart under some specific conditions. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Dec 12 21:33:19 2020 (r368592) +++ head/sys/netinet/sctp_input.c Sat Dec 12 22:23:45 2020 (r368593) @@ -1428,6 +1428,11 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle struct sctp_association *asoc; struct sctp_init_chunk *init_cp, init_buf; struct sctp_init_ack_chunk *initack_cp, initack_buf; + struct sctp_asconf_addr *aparam, *naparam; + struct sctp_asconf_ack *aack, *naack; + struct sctp_tmit_chunk *chk, *nchk; + struct sctp_stream_reset_list *strrst, *nstrrst; + struct sctp_queued_to_read *sq, *nsq; struct sctp_nets *net; struct mbuf *op_err; struct timeval old; @@ -1705,7 +1710,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle * still take a timeout to move these.. but it can't * hurt to mark them. */ - struct sctp_tmit_chunk *chk; TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { if (chk->sent < SCTP_DATAGRAM_RESEND) { @@ -1868,6 +1872,57 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle stcb->asoc.strmout[i].next_mid_unordered = 0; stcb->asoc.strmout[i].last_msg_incomplete = 0; } + TAILQ_FOREACH_SAFE(strrst, &asoc->resetHead, next_resp, nstrrst) { + TAILQ_REMOVE(&asoc->resetHead, strrst, next_resp); + SCTP_FREE(strrst, SCTP_M_STRESET); + } + TAILQ_FOREACH_SAFE(sq, &asoc->pending_reply_queue, next, nsq) { + TAILQ_REMOVE(&asoc->pending_reply_queue, sq, next); + if (sq->data) { + sctp_m_freem(sq->data); + sq->data = NULL; + } + sctp_free_remote_addr(sq->whoFrom); + sq->whoFrom = NULL; + sq->stcb = NULL; + sctp_free_a_readq(stcb, sq); + } + TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue, sctp_next, nchk) { + TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } + if (chk->holds_key_ref) + sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED); + sctp_free_remote_addr(chk->whoTo); + SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk); + SCTP_DECR_CHK_COUNT(); + } + TAILQ_FOREACH_SAFE(chk, &asoc->asconf_send_queue, sctp_next, nchk) { + TAILQ_REMOVE(&asoc->asconf_send_queue, chk, sctp_next); + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } + if (chk->holds_key_ref) + sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED); + sctp_free_remote_addr(chk->whoTo); + SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk); + SCTP_DECR_CHK_COUNT(); + } + TAILQ_FOREACH_SAFE(aparam, &asoc->asconf_queue, next, naparam) { + TAILQ_REMOVE(&asoc->asconf_queue, aparam, next); + SCTP_FREE(aparam, SCTP_M_ASC_ADDR); + } + TAILQ_FOREACH_SAFE(aack, &asoc->asconf_ack_sent, next, naack) { + TAILQ_REMOVE(&asoc->asconf_ack_sent, aack, next); + if (aack->data != NULL) { + sctp_m_freem(aack->data); + } + SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_asconf_ack), aack); + } + /* process the INIT-ACK info (my info) */ asoc->my_vtag = ntohl(initack_cp->init.initiate_tag); asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd); From owner-svn-src-all@freebsd.org Sat Dec 12 22:47:59 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 23:01:12 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 23:41:48 2020 Return-Path: Delivered-To: svn-src-all@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 51B9D4C44C1; Sat, 12 Dec 2020 23:41:48 +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 4CtkhD1wFHz4ZVm; Sat, 12 Dec 2020 23:41:48 +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 3496125867; Sat, 12 Dec 2020 23:41:48 +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 0BCNfld7071834; Sat, 12 Dec 2020 23:41:47 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BCNflaM071833; Sat, 12 Dec 2020 23:41:47 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012122341.0BCNflaM071833@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 23:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368598 - head/tools/tools/locale X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/tools/tools/locale X-SVN-Commit-Revision: 368598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 23:41:48 -0000 Author: yuripv Date: Sat Dec 12 23:41:47 2020 New Revision: 368598 URL: https://svnweb.freebsd.org/changeset/base/368598 Log: locale: fix mode for installed files to be 644, not 755 While here, drop '-c' flag to install as it's default and provided for backward compatibility only. Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile ============================================================================== --- head/tools/tools/locale/Makefile Sat Dec 12 23:01:11 2020 (r368597) +++ head/tools/tools/locale/Makefile Sat Dec 12 23:41:47 2020 (r368598) @@ -96,7 +96,7 @@ install-${t}: cd ${LOCALESRCDIR}/${t} && \ rm -f Makefile *.src && \ cd ${.OBJDIR} && \ - install -c ${t}/* ${LOCALESRCDIR}/${t} + install -m 644 ${t}/* ${LOCALESRCDIR}/${t} . endif .endfor From owner-svn-src-all@freebsd.org Sat Dec 12 23:59:06 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Dec 12 23:59:06 2020 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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");