From owner-svn-src-stable-11@freebsd.org Mon Feb 17 09:54:52 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 500B2253C06; Mon, 17 Feb 2020 09:54:52 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48LfV41RJdz4MRL; Mon, 17 Feb 2020 09:54: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 0D54051DE; Mon, 17 Feb 2020 09:54:52 +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 01H9spJr084720; Mon, 17 Feb 2020 09:54:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01H9spNv084716; Mon, 17 Feb 2020 09:54:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002170954.01H9spNv084716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 17 Feb 2020 09:54:51 +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: r358015 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 358015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2020 09:54:52 -0000 Author: hselasky Date: Mon Feb 17 09:54:50 2020 New Revision: 358015 URL: https://svnweb.freebsd.org/changeset/base/358015 Log: MFC r357801: Add support for disabling and polling MSIX interrupts in mlx5core. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/driver.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/driver.h ============================================================================== --- stable/11/sys/dev/mlx5/driver.h Mon Feb 17 09:53:23 2020 (r358014) +++ stable/11/sys/dev/mlx5/driver.h Mon Feb 17 09:54:50 2020 (r358015) @@ -1146,4 +1146,7 @@ static inline int mlx5_core_is_pf(struct mlx5_core_dev return !(dev->priv.pci_dev_data & MLX5_PCI_DEV_IS_VF); } +void mlx5_disable_interrupts(struct mlx5_core_dev *); +void mlx5_poll_interrupts(struct mlx5_core_dev *); + #endif /* MLX5_DRIVER_H */ Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Mon Feb 17 09:53:23 2020 (r358014) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Mon Feb 17 09:54:50 2020 (r358015) @@ -739,3 +739,28 @@ static void mlx5_port_general_notification_event(struc } } +void +mlx5_disable_interrupts(struct mlx5_core_dev *dev) +{ + int nvec = dev->priv.eq_table.num_comp_vectors + MLX5_EQ_VEC_COMP_BASE; + int x; + + for (x = 0; x != nvec; x++) + disable_irq(dev->priv.msix_arr[x].vector); +} + +void +mlx5_poll_interrupts(struct mlx5_core_dev *dev) +{ + struct mlx5_eq *eq; + + if (unlikely(dev->priv.disable_irqs != 0)) + return; + + mlx5_eq_int(dev, &dev->priv.eq_table.cmd_eq); + mlx5_eq_int(dev, &dev->priv.eq_table.async_eq); + mlx5_eq_int(dev, &dev->priv.eq_table.pages_eq); + + list_for_each_entry(eq, &dev->priv.eq_table.comp_eqs_list, list) + mlx5_eq_int(dev, eq); +} Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Feb 17 09:53:23 2020 (r358014) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Feb 17 09:54:50 2020 (r358015) @@ -1567,7 +1567,7 @@ done: return 0; } -static void mlx5_disable_interrupts(struct mlx5_core_dev *mdev) +static void mlx5_shutdown_disable_interrupts(struct mlx5_core_dev *mdev) { int nvec = mdev->priv.eq_table.num_comp_vectors + MLX5_EQ_VEC_COMP_BASE; int x; @@ -1591,7 +1591,7 @@ static void shutdown_one(struct pci_dev *pdev) set_bit(MLX5_INTERFACE_STATE_TEARDOWN, &dev->intf_state); /* disable all interrupts */ - mlx5_disable_interrupts(dev); + mlx5_shutdown_disable_interrupts(dev); err = mlx5_try_fast_unload(dev); if (err) From owner-svn-src-stable-11@freebsd.org Mon Feb 17 09:57:41 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40D18253DFC; Mon, 17 Feb 2020 09:57:41 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48LfYK12pTz4PDd; Mon, 17 Feb 2020 09:57:40 +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 DF8D651E2; Mon, 17 Feb 2020 09:57:40 +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 01H9vej6085279; Mon, 17 Feb 2020 09:57:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01H9vee6085277; Mon, 17 Feb 2020 09:57:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002170957.01H9vee6085277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 17 Feb 2020 09:57:40 +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: r358017 - stable/11/sys/dev/usb/controller X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/controller X-SVN-Commit-Revision: 358017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2020 09:57:41 -0000 Author: hselasky Date: Mon Feb 17 09:57:40 2020 New Revision: 358017 URL: https://svnweb.freebsd.org/changeset/base/358017 Log: MFC r357726: Add USB host controller PCI ID's for Hygon. Differential Revision: https://reviews.freebsd.org/D23564 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/controller/ehci_pci.c stable/11/sys/dev/usb/controller/ohci_pci.c stable/11/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/11/sys/dev/usb/controller/ehci_pci.c Mon Feb 17 09:57:03 2020 (r358016) +++ stable/11/sys/dev/usb/controller/ehci_pci.c Mon Feb 17 09:57:40 2020 (r358017) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #define PCI_EHCI_VENDORID_APPLE 0x106b #define PCI_EHCI_VENDORID_ATI 0x1002 #define PCI_EHCI_VENDORID_CMDTECH 0x1095 +#define PCI_EHCI_VENDORID_HYGON 0x1d94 #define PCI_EHCI_VENDORID_INTEL 0x8086 #define PCI_EHCI_VENDORID_NEC 0x1033 #define PCI_EHCI_VENDORID_OPTI 0x1045 @@ -369,6 +370,9 @@ ehci_pci_attach(device_t self) break; case PCI_EHCI_VENDORID_CMDTECH: sprintf(sc->sc_vendor, "CMDTECH"); + break; + case PCI_EHCI_VENDORID_HYGON: + sprintf(sc->sc_vendor, "Hygon"); break; case PCI_EHCI_VENDORID_INTEL: sprintf(sc->sc_vendor, "Intel"); Modified: stable/11/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/11/sys/dev/usb/controller/ohci_pci.c Mon Feb 17 09:57:03 2020 (r358016) +++ stable/11/sys/dev/usb/controller/ohci_pci.c Mon Feb 17 09:57:40 2020 (r358017) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #define PCI_OHCI_VENDORID_APPLE 0x106b #define PCI_OHCI_VENDORID_ATI 0x1002 #define PCI_OHCI_VENDORID_CMDTECH 0x1095 +#define PCI_OHCI_VENDORID_HYGON 0x1d94 #define PCI_OHCI_VENDORID_NEC 0x1033 #define PCI_OHCI_VENDORID_NVIDIA 0x12D2 #define PCI_OHCI_VENDORID_NVIDIA2 0x10DE @@ -277,6 +278,9 @@ ohci_pci_attach(device_t self) break; case PCI_OHCI_VENDORID_CMDTECH: sprintf(sc->sc_vendor, "CMDTECH"); + break; + case PCI_OHCI_VENDORID_HYGON: + sprintf(sc->sc_vendor, "Hygon"); break; case PCI_OHCI_VENDORID_NEC: sprintf(sc->sc_vendor, "NEC"); Modified: stable/11/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/11/sys/dev/usb/controller/xhci_pci.c Mon Feb 17 09:57:03 2020 (r358016) +++ stable/11/sys/dev/usb/controller/xhci_pci.c Mon Feb 17 09:57:40 2020 (r358017) @@ -105,6 +105,9 @@ xhci_pci_match(device_t self) case 0x78141022: return ("AMD FCH USB 3.0 controller"); + case 0x145f1d94: + return ("Hygon USB 3.0 controller"); + case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); case 0x00151912: From owner-svn-src-stable-11@freebsd.org Mon Feb 17 09:59:29 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCB24253F1D; Mon, 17 Feb 2020 09:59:29 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48LfbP4Y7pz4QKp; Mon, 17 Feb 2020 09:59:29 +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 554A151E4; Mon, 17 Feb 2020 09:59:29 +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 01H9xTkU085668; Mon, 17 Feb 2020 09:59:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01H9xTwJ085667; Mon, 17 Feb 2020 09:59:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002170959.01H9xTwJ085667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 17 Feb 2020 09:59: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: r358019 - stable/11/sys/dev/usb/controller X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/controller X-SVN-Commit-Revision: 358019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2020 09:59:29 -0000 Author: hselasky Date: Mon Feb 17 09:59:28 2020 New Revision: 358019 URL: https://svnweb.freebsd.org/changeset/base/358019 Log: MFC r356597: Define the XHCI endpoint states. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/controller/xhci.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/11/sys/dev/usb/controller/xhci.h Mon Feb 17 09:58:55 2020 (r358018) +++ stable/11/sys/dev/usb/controller/xhci.h Mon Feb 17 09:59:28 2020 (r358019) @@ -113,6 +113,14 @@ struct xhci_endp_ctx { volatile uint32_t dwEpCtx0; #define XHCI_EPCTX_0_EPSTATE_SET(x) ((x) & 0x7) #define XHCI_EPCTX_0_EPSTATE_GET(x) ((x) & 0x7) +#define XHCI_EPCTX_0_EPSTATE_DISABLED 0 +#define XHCI_EPCTX_0_EPSTATE_RUNNING 1 +#define XHCI_EPCTX_0_EPSTATE_HALTED 2 +#define XHCI_EPCTX_0_EPSTATE_STOPPED 3 +#define XHCI_EPCTX_0_EPSTATE_ERROR 4 +#define XHCI_EPCTX_0_EPSTATE_RESERVED_5 5 +#define XHCI_EPCTX_0_EPSTATE_RESERVED_6 6 +#define XHCI_EPCTX_0_EPSTATE_RESERVED_7 7 #define XHCI_EPCTX_0_MULT_SET(x) (((x) & 0x3) << 8) #define XHCI_EPCTX_0_MULT_GET(x) (((x) >> 8) & 0x3) #define XHCI_EPCTX_0_MAXP_STREAMS_SET(x) (((x) & 0x1F) << 10) From owner-svn-src-stable-11@freebsd.org Mon Feb 17 19:40:26 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF353244058; Mon, 17 Feb 2020 19:40:26 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48LvTk42h6z3GsG; Mon, 17 Feb 2020 19:40:26 +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 85F11C150; Mon, 17 Feb 2020 19:40:26 +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 01HJeQ6x045165; Mon, 17 Feb 2020 19:40:26 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01HJeQGM045164; Mon, 17 Feb 2020 19:40:26 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202002171940.01HJeQGM045164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 17 Feb 2020 19:40:26 +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: r358037 - stable/11/sys/fs/nfsserver X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/sys/fs/nfsserver X-SVN-Commit-Revision: 358037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2020 19:40:26 -0000 Author: rmacklem Date: Mon Feb 17 19:40:26 2020 New Revision: 358037 URL: https://svnweb.freebsd.org/changeset/base/358037 Log: MFC: r357149 Fix a crash in the NFSv4 server. The PR reported a crash that occurred when a file was removed while client(s) were actively doing lock operations on it. Since nfsvno_getvp() will return NULL when the file does not exist, the bug was obvious and easy to fix via this patch. It is a little surprising that this wasn't found sooner, but I guess the above case rarely occurs. PR: 242768 Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Mon Feb 17 19:32:54 2020 (r358036) +++ stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Mon Feb 17 19:40:26 2020 (r358037) @@ -1483,7 +1483,8 @@ nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp tvp = NULL; else if (vp == NULL && cansleep != 0) { tvp = nfsvno_getvp(&lfp->lf_fh); - NFSVOPUNLOCK(tvp, 0); + if (tvp != NULL) + NFSVOPUNLOCK(tvp, 0); } else tvp = vp; gottvp = 1; From owner-svn-src-stable-11@freebsd.org Tue Feb 18 18:03:05 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D645F241CE1; Tue, 18 Feb 2020 18:03:05 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48MTGx561Nz4JFL; Tue, 18 Feb 2020 18:03: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 A7D7423F6B; Tue, 18 Feb 2020 18:03: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 01II35wZ054306; Tue, 18 Feb 2020 18:03:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01II35BS054305; Tue, 18 Feb 2020 18:03:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002181803.01II35BS054305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 18 Feb 2020 18:03:05 +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: r358076 - in stable: 11/share/mk 12/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/share/mk 12/share/mk X-SVN-Commit-Revision: 358076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 18:03:05 -0000 Author: dim Date: Tue Feb 18 18:03:04 2020 New Revision: 358076 URL: https://svnweb.freebsd.org/changeset/base/358076 Log: MFC r357661: Correctly recognize linker versions greater than 10.0. Modified: stable/11/share/mk/bsd.linker.mk Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/mk/bsd.linker.mk Directory Properties: stable/12/ (props changed) Modified: stable/11/share/mk/bsd.linker.mk ============================================================================== --- stable/11/share/mk/bsd.linker.mk Tue Feb 18 17:59:37 2020 (r358075) +++ stable/11/share/mk/bsd.linker.mk Tue Feb 18 18:03:04 2020 (r358076) @@ -55,7 +55,7 @@ _ld_version!= (${${ld}} --version || echo none) | sed .endif .if ${_ld_version:[1..2]} == "GNU ld" ${X_}LINKER_TYPE= bfd -_v= ${_ld_version:M[1-9].[0-9]*:[1]} +_v= ${_ld_version:M[1-9]*.[0-9]*:[1]} .elif ${_ld_version:[1]} == "LLD" ${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} @@ -64,7 +64,7 @@ _v= ${_ld_version:[2]} ${X_}LINKER_TYPE= bfd _v= 2.17.50 .endif -${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \ +${X_}LINKER_VERSION!= echo "${_v:M[1-9]*.[0-9]*}" | \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' .undef _ld_version .undef _v From owner-svn-src-stable-11@freebsd.org Tue Feb 18 18:13:10 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C92424212C; Tue, 18 Feb 2020 18:13:10 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48MTVZ2qxVz4XR7; Tue, 18 Feb 2020 18:13:10 +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 54D7F24135; Tue, 18 Feb 2020 18:13:10 +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 01IIDAkx060347; Tue, 18 Feb 2020 18:13:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01IID9hf060343; Tue, 18 Feb 2020 18:13:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002181813.01IID9hf060343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 18 Feb 2020 18:13:09 +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: r358077 - in stable: 11/sys/conf 11/sys/modules/ce 11/sys/modules/cp 12/sys/conf 12/sys/modules/ce 12/sys/modules/cp X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/conf 11/sys/modules/ce 11/sys/modules/cp 12/sys/conf 12/sys/modules/ce 12/sys/modules/cp X-SVN-Commit-Revision: 358077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 18:13:10 -0000 Author: dim Date: Tue Feb 18 18:13:08 2020 New Revision: 358077 URL: https://svnweb.freebsd.org/changeset/base/358077 Log: MFC r357874: Merge r357872 from the clang1000-import branch: Disable new clang 10.0.0 warnings about misleading indentation in ce(4) and cp(4). These are false positives, since some of the driver source has been deliberately obfuscated. Modified: stable/11/sys/conf/files.i386 stable/11/sys/conf/kern.mk stable/11/sys/modules/ce/Makefile stable/11/sys/modules/cp/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/conf/files.i386 stable/12/sys/conf/kern.mk stable/12/sys/modules/ce/Makefile stable/12/sys/modules/cp/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Tue Feb 18 18:03:04 2020 (r358076) +++ stable/11/sys/conf/files.i386 Tue Feb 18 18:13:08 2020 (r358077) @@ -197,10 +197,11 @@ dev/bxe/57712_init_values.c optional bxe pci dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce \ - compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION} ${NO_WMISLEADING_INDENTATION}" dev/cm/if_cm_isa.c optional cm isa dev/coretemp/coretemp.c optional coretemp -dev/cp/cpddk.c optional cp +dev/cp/cpddk.c optional cp \ + compile-with "${NORMAL_C} ${NO_WMISLEADING_INDENTATION}" dev/cp/if_cp.c optional cp dev/cpuctl/cpuctl.c optional cpuctl dev/ctau/ctau.c optional ctau Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Tue Feb 18 18:03:04 2020 (r358076) +++ stable/11/sys/conf/kern.mk Tue Feb 18 18:13:08 2020 (r358077) @@ -36,6 +36,9 @@ CWARNEXTRA+= -Wno-error-shift-negative-value .if ${COMPILER_VERSION} >= 40000 CWARNEXTRA+= -Wno-error-address-of-packed-member .endif +.if ${COMPILER_VERSION} >= 100000 +NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.endif CLANG_NO_IAS= -no-integrated-as .if ${COMPILER_VERSION} < 30500 Modified: stable/11/sys/modules/ce/Makefile ============================================================================== --- stable/11/sys/modules/ce/Makefile Tue Feb 18 18:03:04 2020 (r358076) +++ stable/11/sys/modules/ce/Makefile Tue Feb 18 18:13:08 2020 (r358077) @@ -27,4 +27,5 @@ opt_ng_cronyx.h: .include -CWARNFLAGS.tau32-ddk.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.tau32-ddk.c+= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.tau32-ddk.c+= ${NO_WMISLEADING_INDENTATION} Modified: stable/11/sys/modules/cp/Makefile ============================================================================== --- stable/11/sys/modules/cp/Makefile Tue Feb 18 18:03:04 2020 (r358076) +++ stable/11/sys/modules/cp/Makefile Tue Feb 18 18:13:08 2020 (r358077) @@ -26,3 +26,5 @@ opt_ng_cronyx.h: .endif .include + +CWARNFLAGS.cpddk.c+= ${NO_WMISLEADING_INDENTATION} From owner-svn-src-stable-11@freebsd.org Tue Feb 18 18:15:34 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FD6B24222F; Tue, 18 Feb 2020 18:15:34 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48MTYK6wMsz4bWL; Tue, 18 Feb 2020 18:15:33 +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 DB8D224137; Tue, 18 Feb 2020 18:15:33 +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 01IIFXKV060533; Tue, 18 Feb 2020 18:15:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01IIFXoF060532; Tue, 18 Feb 2020 18:15:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002181815.01IIFXoF060532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 18 Feb 2020 18:15:33 +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: r358078 - in stable: 11/sbin/sconfig 12/sbin/sconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sbin/sconfig 12/sbin/sconfig X-SVN-Commit-Revision: 358078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 18:15:34 -0000 Author: dim Date: Tue Feb 18 18:15:33 2020 New Revision: 358078 URL: https://svnweb.freebsd.org/changeset/base/358078 Log: MFC r357873: Merge r357864 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0 in sconfig: sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation] exit (-1); ^ sbin/sconfig/sconfig.c:907:6: note: previous statement is here } else ^ The intent was to group the exit() call with the previous fprintf() call. Modified: stable/11/sbin/sconfig/sconfig.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sbin/sconfig/sconfig.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sbin/sconfig/sconfig.c ============================================================================== --- stable/11/sbin/sconfig/sconfig.c Tue Feb 18 18:13:08 2020 (r358077) +++ stable/11/sbin/sconfig/sconfig.c Tue Feb 18 18:15:33 2020 (r358078) @@ -904,9 +904,10 @@ setup_chan (int fd, int argc, char **argv) } else if (strncasecmp ("rs449", argv[i]+5, 5) == 0) { port = 2; ioctl (fd, SERIAL_SETPORT, &port); - } else + } else { fprintf (stderr, "invalid port type\n"); exit (-1); + } #if 1 } else if (strcasecmp ("reset", argv[i]) == 0) { ioctl (fd, SERIAL_RESET, 0); From owner-svn-src-stable-11@freebsd.org Tue Feb 18 18:17:04 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A78F24232C; Tue, 18 Feb 2020 18:17:04 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48MTb431XFz4dWg; Tue, 18 Feb 2020 18:17:04 +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 5C98024139; Tue, 18 Feb 2020 18:17:04 +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 01IIH49R060674; Tue, 18 Feb 2020 18:17:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01IIH4Em060673; Tue, 18 Feb 2020 18:17:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002181817.01IIH4Em060673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 18 Feb 2020 18:17:04 +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: r358079 - in stable: 11/sys/dev/hptmv 12/sys/dev/hptmv X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/dev/hptmv 12/sys/dev/hptmv X-SVN-Commit-Revision: 358079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 18:17:04 -0000 Author: dim Date: Tue Feb 18 18:17:03 2020 New Revision: 358079 URL: https://svnweb.freebsd.org/changeset/base/358079 Log: MFC r357976: Merge r357970 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0 in hptmv(4): sys/dev/hptmv/ioctl.c:240:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] _vbus_p=pArray->pVBus; ^ sys/dev/hptmv/ioctl.c:237:10: note: previous statement is here if(!mIsArray(pArray)) ^ This is because the return statement after the if statement was not indented. (Note that this file has been idented assuming 4-space tabs.) Modified: stable/11/sys/dev/hptmv/ioctl.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/hptmv/ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/hptmv/ioctl.c ============================================================================== --- stable/11/sys/dev/hptmv/ioctl.c Tue Feb 18 18:15:33 2020 (r358078) +++ stable/11/sys/dev/hptmv/ioctl.c Tue Feb 18 18:17:03 2020 (r358079) @@ -233,7 +233,7 @@ int Kernel_DeviceIoControl(_VBUS_ARG return -1; if(!mIsArray(pArray)) - return -1; + return -1; _vbus_p=pArray->pVBus; pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt; From owner-svn-src-stable-11@freebsd.org Wed Feb 19 01:50:52 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B50D24BE16; Wed, 19 Feb 2020 01:50:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Mgfh2rlBz4CGX; Wed, 19 Feb 2020 01:50:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CA82154E; Wed, 19 Feb 2020 01:50:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01J1oqXd031629; Wed, 19 Feb 2020 01:50:52 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01J1om1L030786; Wed, 19 Feb 2020 01:50:48 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202002190150.01J1om1L030786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Wed, 19 Feb 2020 01:50:48 +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: r358088 - in stable/11: contrib/libarchive contrib/libarchive/cat contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/... X-SVN-Group: stable-11 X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in stable/11: contrib/libarchive contrib/libarchive/cat contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/tes... X-SVN-Commit-Revision: 358088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2020 01:50:52 -0000 Author: mm Date: Wed Feb 19 01:50:47 2020 New Revision: 358088 URL: https://svnweb.freebsd.org/changeset/base/358088 Log: MFC r356212,r356366,r356416,r357785 Update libarchive to version 3.4.2 Relevant vendor changes (r356212): Issue #351: Refactor and implement private state logic for write filters PR #1252: RAR5 reader - verify window size for solid files (OSS-Fuzz 15482) PR #1255: zip writer - don't append unused NUL for directories PR #1260: Fix sparse file offset overflow on 32-bit systems PR #1263: UNICODE filename support for reading lha/lzh format Issue #1276: Bugfix and optimize archive_wstring_append_from_mbs() PR #1288: Add the "xattrhdr" option to pax write options PR #1295: 7z reader - fix reading archives with digests in PackInfo PR #1296: RAR5 reader - verify window size for multivolume archives PR #1297: ZIP reader - support LZMA_STREAM_END marker in 'lzma alone' files Issue #1298: Fix a heap-buffer-overflow in archive_string_append_from_wcs() OSS-Fuzz 19360, 19362: LHA reader - plug two memory leaks on error Fix possible off-by-one when dealing with readlink(2) Relevant vendor changes (r356366): Issue #1302: Plug memory leak on failure of archive_write_client_open() Relevant vendor changes (r356416): Issue #1302: Re-do fix for archive_write_client_open() Relevant vendor changes (r357785): PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime() Added: stable/11/contrib/libarchive/libarchive/archive_write_set_format_private.h - copied unchanged from r357785, head/contrib/libarchive/libarchive/archive_write_set_format_private.h stable/11/contrib/libarchive/libarchive/test/test_pax_xattr_header.c - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_pax_xattr_header.c stable/11/contrib/libarchive/libarchive/test/test_pax_xattr_header_all.tar.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_pax_xattr_header_all.tar.uu stable/11/contrib/libarchive/libarchive/test/test_pax_xattr_header_libarchive.tar.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_pax_xattr_header_libarchive.tar.uu stable/11/contrib/libarchive/libarchive/test/test_pax_xattr_header_schily.tar.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_pax_xattr_header_schily.tar.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu - copied unchanged from r357785, head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu - copied unchanged from r357785, head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_7zip_packinfo_digests.c - copied, changed from r356212, head/contrib/libarchive/libarchive/test/test_read_format_7zip_packinfo_digests.c stable/11/contrib/libarchive/libarchive/test/test_read_format_lha_filename_utf16.c - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_read_format_lha_filename_utf16.c stable/11/contrib/libarchive/libarchive/test/test_read_format_lha_filename_utf16.lzh.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_read_format_lha_filename_utf16.lzh.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu - copied unchanged from r357785, head/contrib/libarchive/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu stable/11/contrib/libarchive/libarchive/test/test_read_format_rar5_different_winsize_on_merge.rar.uu - copied unchanged from r356212, head/contrib/libarchive/libarchive/test/test_read_format_rar5_different_winsize_on_merge.rar.uu stable/11/contrib/libarchive/tar/test/test_option_safe_writes.c - copied unchanged from r357785, head/contrib/libarchive/tar/test/test_option_safe_writes.c Modified: stable/11/contrib/libarchive/NEWS stable/11/contrib/libarchive/cat/bsdcat.h stable/11/contrib/libarchive/cat/test/test_0.c stable/11/contrib/libarchive/cpio/cpio.c stable/11/contrib/libarchive/cpio/test/test_basic.c stable/11/contrib/libarchive/cpio/test/test_format_newc.c stable/11/contrib/libarchive/libarchive/archive.h stable/11/contrib/libarchive/libarchive/archive_acl_private.h stable/11/contrib/libarchive/libarchive/archive_blake2.h stable/11/contrib/libarchive/libarchive/archive_blake2_impl.h stable/11/contrib/libarchive/libarchive/archive_cmdline_private.h stable/11/contrib/libarchive/libarchive/archive_crc32.h stable/11/contrib/libarchive/libarchive/archive_cryptor.c stable/11/contrib/libarchive/libarchive/archive_cryptor_private.h stable/11/contrib/libarchive/libarchive/archive_digest.c stable/11/contrib/libarchive/libarchive/archive_digest_private.h stable/11/contrib/libarchive/libarchive/archive_endian.h stable/11/contrib/libarchive/libarchive/archive_entry.c stable/11/contrib/libarchive/libarchive/archive_entry.h stable/11/contrib/libarchive/libarchive/archive_entry_acl.3 stable/11/contrib/libarchive/libarchive/archive_entry_locale.h stable/11/contrib/libarchive/libarchive/archive_entry_private.h stable/11/contrib/libarchive/libarchive/archive_getdate.c stable/11/contrib/libarchive/libarchive/archive_getdate.h stable/11/contrib/libarchive/libarchive/archive_hmac.c stable/11/contrib/libarchive/libarchive/archive_hmac_private.h stable/11/contrib/libarchive/libarchive/archive_openssl_evp_private.h stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h stable/11/contrib/libarchive/libarchive/archive_options_private.h stable/11/contrib/libarchive/libarchive/archive_pack_dev.c stable/11/contrib/libarchive/libarchive/archive_pack_dev.h stable/11/contrib/libarchive/libarchive/archive_pathmatch.h stable/11/contrib/libarchive/libarchive/archive_platform_acl.h stable/11/contrib/libarchive/libarchive/archive_platform_xattr.h stable/11/contrib/libarchive/libarchive/archive_ppmd7.c stable/11/contrib/libarchive/libarchive/archive_ppmd7_private.h stable/11/contrib/libarchive/libarchive/archive_ppmd8_private.h stable/11/contrib/libarchive/libarchive/archive_ppmd_private.h stable/11/contrib/libarchive/libarchive/archive_private.h stable/11/contrib/libarchive/libarchive/archive_random_private.h stable/11/contrib/libarchive/libarchive/archive_rb.h stable/11/contrib/libarchive/libarchive/archive_read.c stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_read_disk_private.h stable/11/contrib/libarchive/libarchive/archive_read_private.h stable/11/contrib/libarchive/libarchive/archive_read_set_options.3 stable/11/contrib/libarchive/libarchive/archive_read_support_filter_uu.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_7zip.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_lha.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar5.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_xar.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_zip.c stable/11/contrib/libarchive/libarchive/archive_string.c stable/11/contrib/libarchive/libarchive/archive_string.h stable/11/contrib/libarchive/libarchive/archive_string_composition.h stable/11/contrib/libarchive/libarchive/archive_util.c stable/11/contrib/libarchive/libarchive/archive_write.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_b64encode.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_bzip2.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_compress.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_gzip.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_lz4.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_lzop.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_program.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_uuencode.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_xz.c stable/11/contrib/libarchive/libarchive/archive_write_add_filter_zstd.c stable/11/contrib/libarchive/libarchive/archive_write_disk.3 stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/11/contrib/libarchive/libarchive/archive_write_disk_private.h stable/11/contrib/libarchive/libarchive/archive_write_private.h stable/11/contrib/libarchive/libarchive/archive_write_set_format.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_7zip.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_ar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_shar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_ustar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_warc.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_xar.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_zip.c stable/11/contrib/libarchive/libarchive/archive_write_set_options.3 stable/11/contrib/libarchive/libarchive/archive_xxhash.h stable/11/contrib/libarchive/libarchive/filter_fork.h stable/11/contrib/libarchive/libarchive/test/test_archive_write_set_format_filter_by_ext.c stable/11/contrib/libarchive/libarchive/test/test_compat_zip.c stable/11/contrib/libarchive/libarchive/test/test_fuzz.c stable/11/contrib/libarchive/libarchive/test/test_open_failure.c stable/11/contrib/libarchive/libarchive/test/test_open_fd.c stable/11/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c stable/11/contrib/libarchive/libarchive/test/test_read_extract.c stable/11/contrib/libarchive/libarchive/test/test_read_format_7zip.c stable/11/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c stable/11/contrib/libarchive/libarchive/test/test_read_format_rar5.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_comment_stored.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_jar.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_mac_metadata.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_malformed.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_msdos.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_nested.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_nofiletype.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_padded.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_sfx.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_zip64.c stable/11/contrib/libarchive/libarchive/test/test_read_pax_truncated.c stable/11/contrib/libarchive/libarchive/test/test_read_truncated_filter.c stable/11/contrib/libarchive/libarchive/test/test_sparse_basic.c stable/11/contrib/libarchive/libarchive/test/test_write_disk.c stable/11/contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c stable/11/contrib/libarchive/libarchive/test/test_write_format_pax.c stable/11/contrib/libarchive/libarchive/test/test_write_format_shar_empty.c stable/11/contrib/libarchive/libarchive/test/test_write_format_tar.c stable/11/contrib/libarchive/libarchive/test/test_write_format_tar_sparse.c stable/11/contrib/libarchive/libarchive/test/test_write_format_xar.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_file.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_file_zip64.c stable/11/contrib/libarchive/libarchive_fe/err.h stable/11/contrib/libarchive/tar/bsdtar.1 stable/11/contrib/libarchive/tar/bsdtar.c stable/11/contrib/libarchive/tar/bsdtar.h stable/11/contrib/libarchive/tar/cmdline.c stable/11/contrib/libarchive/tar/test/test_basic.c stable/11/contrib/libarchive/tar/test/test_copy.c stable/11/contrib/libarchive/tar/test/test_option_C_upper.c stable/11/contrib/libarchive/tar/test/test_option_s.c stable/11/contrib/libarchive/tar/util.c stable/11/contrib/libarchive/test_utils/test_common.h stable/11/contrib/libarchive/test_utils/test_main.c stable/11/lib/libarchive/tests/Makefile stable/11/usr.bin/bsdcat/Makefile stable/11/usr.bin/cpio/Makefile stable/11/usr.bin/tar/Makefile stable/11/usr.bin/tar/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/NEWS ============================================================================== --- stable/11/contrib/libarchive/NEWS Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/NEWS Wed Feb 19 01:50:47 2020 (r358088) @@ -1,3 +1,17 @@ +Feb 11, 2020: libarchive 3.4.2 released + +Jan 23, 2020: Important fixes for writing XAR archives + +Jan 20, 2020: New tar option: --safe-writes (atomical file extraction) + +Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider + +Dec 30, 2019: libarchive 3.4.1 released + +Dec 11, 2019: New pax write option "xattrhdr" + +Nov 17, 2019: Unicode filename support for reading lha/lzh archives + Jun 11, 2019: libarchive 3.4.0 released May 18, 2019: Fixes for reading Android APK and JAR archives Modified: stable/11/contrib/libarchive/cat/bsdcat.h ============================================================================== --- stable/11/contrib/libarchive/cat/bsdcat.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/cat/bsdcat.h Wed Feb 19 01:50:47 2020 (r358088) @@ -23,6 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef BSDCAT_H_INCLUDED +#define BSDCAT_H_INCLUDED + #if defined(PLATFORM_CONFIG_H) /* Use hand-built config.h in environments that need it. */ #include PLATFORM_CONFIG_H @@ -54,3 +57,5 @@ void usage(FILE *stream, int eval); void bsdcat_next(void); void bsdcat_print_error(void); void bsdcat_read_to_stdout(const char* filename); + +#endif Modified: stable/11/contrib/libarchive/cat/test/test_0.c ============================================================================== --- stable/11/contrib/libarchive/cat/test/test_0.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/cat/test/test_0.c Wed Feb 19 01:50:47 2020 (r358088) @@ -59,7 +59,7 @@ DEFINE_TEST(test_0) * we know some option that will succeed. */ if (0 != systemf("%s --version >" DEV_NULL, testprog)) { - failure("Unable to successfully run: %s --version\n", testprog, testprog); + failure("Unable to successfully run: %s --version\n", testprog); assert(0); } Modified: stable/11/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/11/contrib/libarchive/cpio/cpio.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/cpio/cpio.c Wed Feb 19 01:50:47 2020 (r358088) @@ -1139,6 +1139,14 @@ list_item_verbose(struct cpio *cpio, struct archive_en const char *fmt; time_t mtime; static time_t now; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (!now) time(&now); @@ -1186,7 +1194,19 @@ list_item_verbose(struct cpio *cpio, struct archive_en else fmt = cpio->day_first ? "%e %b %H:%M" : "%b %e %H:%M"; #endif - strftime(date, sizeof(date), fmt, localtime(&mtime)); +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&mtime, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = mtime; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&mtime); +#endif + strftime(date, sizeof(date), fmt, ltime); fprintf(out, "%s%3d %-8s %-8s %8s %12s %s", archive_entry_strmode(entry), Modified: stable/11/contrib/libarchive/cpio/test/test_basic.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_basic.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/cpio/test/test_basic.c Wed Feb 19 01:50:47 2020 (r358088) @@ -33,15 +33,15 @@ verify_files(const char *msg) */ /* Regular file with 2 links. */ - failure(msg); + failure("%s", msg); assertIsReg("file", 0644); - failure(msg); + failure("%s", msg); assertFileSize("file", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file", 2); /* Another name for the same file. */ - failure(msg); + failure("%s", msg); assertIsHardlink("linkfile", "file"); /* Symlink */ @@ -49,11 +49,11 @@ verify_files(const char *msg) assertIsSymlink("symlink", "file", 0); /* Another file with 1 link and different permissions. */ - failure(msg); + failure("%s", msg); assertIsReg("file2", 0777); - failure(msg); + failure("%s", msg); assertFileSize("file2", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file2", 1); /* dir */ Modified: stable/11/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_format_newc.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/cpio/test/test_format_newc.c Wed Feb 19 01:50:47 2020 (r358088) @@ -205,9 +205,11 @@ DEFINE_TEST(test_format_newc) gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ - failure("t=0x%08x now=0x%08x=%d", t, now, now); + failure("t=%#08jx now=%#08jx=%jd", (intmax_t)t, (intmax_t)now, + (intmax_t)now); assert(t <= now); /* File wasn't created in future. */ - failure("t=0x%08x now - 2=0x%08x = %d", t, now - 2, now - 2); + failure("t=%#08jx now - 2=%#08jx=%jd", (intmax_t)t, (intmax_t)now - 2, + (intmax_t)now - 2); assert(t >= now - 2); /* File was created w/in last 2 secs. */ failure("newc format stores body only with last appearance of a link\n" " first appearance should be empty, so this file size\n" @@ -243,7 +245,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000001", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created" + " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ fs = from_hex(e + 54, 8); @@ -278,7 +281,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(nlinks("dir"), from_hex(e + 38, 8)); /* nlinks */ #endif t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ fs = from_hex(e + 54, 8); @@ -311,7 +315,8 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ fs = from_hex(e + 54, 8); Modified: stable/11/contrib/libarchive/libarchive/archive.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive.h Wed Feb 19 01:50:47 2020 (r358088) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3004000 +#define ARCHIVE_VERSION_NUMBER 3004002 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.4.0" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.2" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -693,6 +693,8 @@ __LA_DECL int archive_read_set_passphrase_callback(str #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) /* Default: Do not clear no-change flags when unlinking object */ #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000) +/* Default: Do not extract atomically (using rename) */ +#define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000) __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, int flags); Modified: stable/11/contrib/libarchive/libarchive/archive_acl_private.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_acl_private.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_acl_private.h Wed Feb 19 01:50:47 2020 (r358088) @@ -25,12 +25,12 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED +#define ARCHIVE_ACL_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED -#define ARCHIVE_ACL_PRIVATE_H_INCLUDED #include "archive_string.h" Modified: stable/11/contrib/libarchive/libarchive/archive_blake2.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_blake2.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_blake2.h Wed Feb 19 01:50:47 2020 (r358088) @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_H -#define BLAKE2_H + +#ifndef ARCHIVE_BLAKE2_H +#define ARCHIVE_BLAKE2_H #include #include Modified: stable/11/contrib/libarchive/libarchive/archive_blake2_impl.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_blake2_impl.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_blake2_impl.h Wed Feb 19 01:50:47 2020 (r358088) @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_IMPL_H -#define BLAKE2_IMPL_H + +#ifndef ARCHIVE_BLAKE2_IMPL_H +#define ARCHIVE_BLAKE2_IMPL_H #include #include Modified: stable/11/contrib/libarchive/libarchive/archive_cmdline_private.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_cmdline_private.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_cmdline_private.h Wed Feb 19 01:50:47 2020 (r358088) @@ -25,14 +25,14 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_CMDLINE_PRIVATE_H +#define ARCHIVE_CMDLINE_PRIVATE_H + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif - -#ifndef ARCHIVE_CMDLINE_PRIVATE_H -#define ARCHIVE_CMDLINE_PRIVATE_H struct archive_cmdline { char *path; Modified: stable/11/contrib/libarchive/libarchive/archive_crc32.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_crc32.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_crc32.h Wed Feb 19 01:50:47 2020 (r358088) @@ -25,6 +25,9 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_CRC32_H +#define ARCHIVE_CRC32_H + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif @@ -76,3 +79,5 @@ crc32(unsigned long crc, const void *_p, size_t len) crc = crc_tbl[(crc ^ *p++) & 0xff] ^ (crc >> 8); return (crc ^ 0xffffffffUL); } + +#endif Modified: stable/11/contrib/libarchive/libarchive/archive_cryptor.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_cryptor.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_cryptor.c Wed Feb 19 01:50:47 2020 (r358088) @@ -85,6 +85,35 @@ pbkdf2_sha1(const char *pw, size_t pw_len, const uint8 return (BCRYPT_SUCCESS(status)) ? 0: -1; } +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_PKCS5_H) + +static int +pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, + size_t salt_len, unsigned rounds, uint8_t *derived_key, + size_t derived_key_len) +{ + mbedtls_md_context_t ctx; + const mbedtls_md_info_t *info; + int ret; + + mbedtls_md_init(&ctx); + info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA1); + if (info == NULL) { + mbedtls_md_free(&ctx); + return (-1); + } + ret = mbedtls_md_setup(&ctx, info, 1); + if (ret != 0) { + mbedtls_md_free(&ctx); + return (-1); + } + ret = mbedtls_pkcs5_pbkdf2_hmac(&ctx, (const unsigned char *)pw, + pw_len, salt, salt_len, rounds, derived_key_len, derived_key); + + mbedtls_md_free(&ctx); + return (ret); +} + #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_PBKDF2_H) static int @@ -265,6 +294,39 @@ aes_ctr_release(archive_crypto_ctx *ctx) HeapFree(GetProcessHeap(), 0, ctx->keyObj); ctx->keyObj = NULL; } + memset(ctx, 0, sizeof(*ctx)); + return 0; +} + +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_AES_H) + +static int +aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) +{ + mbedtls_aes_init(&ctx->ctx); + ctx->key_len = key_len; + memcpy(ctx->key, key, key_len); + memset(ctx->nonce, 0, sizeof(ctx->nonce)); + ctx->encr_pos = AES_BLOCK_SIZE; + return 0; +} + +static int +aes_ctr_encrypt_counter(archive_crypto_ctx *ctx) +{ + if (mbedtls_aes_setkey_enc(&ctx->ctx, ctx->key, + ctx->key_len * 8) != 0) + return (-1); + if (mbedtls_aes_crypt_ecb(&ctx->ctx, MBEDTLS_AES_ENCRYPT, ctx->nonce, + ctx->encr_buf) != 0) + return (-1); + return 0; +} + +static int +aes_ctr_release(archive_crypto_ctx *ctx) +{ + mbedtls_aes_free(&ctx->ctx); memset(ctx, 0, sizeof(*ctx)); return 0; } Modified: stable/11/contrib/libarchive/libarchive/archive_cryptor_private.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_cryptor_private.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_cryptor_private.h Wed Feb 19 01:50:47 2020 (r358088) @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - #ifndef ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * On systems that do not support any recognized crypto libraries, * the archive_cryptor.c file will normally define no usable symbols. @@ -78,6 +77,23 @@ typedef struct { BCRYPT_KEY_HANDLE hKey; PBYTE keyObj; DWORD keyObj_len; + uint8_t nonce[AES_BLOCK_SIZE]; + uint8_t encr_buf[AES_BLOCK_SIZE]; + unsigned encr_pos; +} archive_crypto_ctx; + +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_AES_H) +#include +#include +#include + +#define AES_MAX_KEY_SIZE 32 +#define AES_BLOCK_SIZE 16 + +typedef struct { + mbedtls_aes_context ctx; + uint8_t key[AES_MAX_KEY_SIZE]; + unsigned key_len; uint8_t nonce[AES_BLOCK_SIZE]; uint8_t encr_buf[AES_BLOCK_SIZE]; unsigned encr_pos; Modified: stable/11/contrib/libarchive/libarchive/archive_digest.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_digest.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_digest.c Wed Feb 19 01:50:47 2020 (r358088) @@ -178,6 +178,40 @@ __archive_libsystem_md5final(archive_md5_ctx *ctx, voi return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) + +static int +__archive_mbedtls_md5init(archive_md5_ctx *ctx) +{ + mbedtls_md5_init(ctx); + if (mbedtls_md5_starts_ret(ctx) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_md5update(archive_md5_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_md5final(archive_md5_ctx *ctx, void *md) +{ + if (mbedtls_md5_finish_ret(ctx, md) == 0) { + mbedtls_md5_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_md5_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) static int @@ -335,6 +369,40 @@ __archive_libmd_ripemd160final(archive_rmd160_ctx *ctx return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) + +static int +__archive_mbedtls_ripemd160init(archive_rmd160_ctx *ctx) +{ + mbedtls_ripemd160_init(ctx); + if (mbedtls_ripemd160_starts_ret(ctx) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_ripemd160final(archive_rmd160_ctx *ctx, void *md) +{ + if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { + mbedtls_ripemd160_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_ripemd160_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) static int @@ -491,6 +559,40 @@ __archive_libsystem_sha1final(archive_sha1_ctx *ctx, v return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) + +static int +__archive_mbedtls_sha1init(archive_sha1_ctx *ctx) +{ + mbedtls_sha1_init(ctx); + if (mbedtls_sha1_starts_ret(ctx) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha1update(archive_sha1_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha1final(archive_sha1_ctx *ctx, void *md) +{ + if (mbedtls_sha1_finish_ret(ctx, md) == 0) { + mbedtls_sha1_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha1_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) static int @@ -720,6 +822,40 @@ __archive_libsystem_sha256final(archive_sha256_ctx *ct return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) + +static int +__archive_mbedtls_sha256init(archive_sha256_ctx *ctx) +{ + mbedtls_sha256_init(ctx); + if (mbedtls_sha256_starts_ret(ctx, 0) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha256update(archive_sha256_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha256final(archive_sha256_ctx *ctx, void *md) +{ + if (mbedtls_sha256_finish_ret(ctx, md) == 0) { + mbedtls_sha256_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha256_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) static int @@ -921,6 +1057,40 @@ __archive_libsystem_sha384final(archive_sha384_ctx *ct return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) + +static int +__archive_mbedtls_sha384init(archive_sha384_ctx *ctx) +{ + mbedtls_sha512_init(ctx); + if (mbedtls_sha512_starts_ret(ctx, 1) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha384update(archive_sha384_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha384final(archive_sha384_ctx *ctx, void *md) +{ + if (mbedtls_sha512_finish_ret(ctx, md) == 0) { + mbedtls_sha512_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha512_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) static int @@ -1146,6 +1316,40 @@ __archive_libsystem_sha512final(archive_sha512_ctx *ct return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) + +static int +__archive_mbedtls_sha512init(archive_sha512_ctx *ctx) +{ + mbedtls_sha512_init(ctx); + if (mbedtls_sha512_starts_ret(ctx, 0) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha512update(archive_sha512_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_mbedtls_sha512final(archive_sha512_ctx *ctx, void *md) +{ + if (mbedtls_sha512_finish_ret(ctx, md) == 0) { + mbedtls_sha512_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha512_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) static int @@ -1276,6 +1480,10 @@ const struct archive_digest __archive_digest = &__archive_libsystem_md5init, &__archive_libsystem_md5update, &__archive_libsystem_md5final, +#elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) + &__archive_mbedtls_md5init, + &__archive_mbedtls_md5update, + &__archive_mbedtls_md5final, #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) &__archive_nettle_md5init, &__archive_nettle_md5update, @@ -1303,6 +1511,10 @@ const struct archive_digest __archive_digest = &__archive_libmd_ripemd160init, &__archive_libmd_ripemd160update, &__archive_libmd_ripemd160final, +#elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) + &__archive_mbedtls_ripemd160init, + &__archive_mbedtls_ripemd160update, + &__archive_mbedtls_ripemd160final, #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) &__archive_nettle_ripemd160init, &__archive_nettle_ripemd160update, @@ -1330,6 +1542,10 @@ const struct archive_digest __archive_digest = &__archive_libsystem_sha1init, &__archive_libsystem_sha1update, &__archive_libsystem_sha1final, +#elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) + &__archive_mbedtls_sha1init, + &__archive_mbedtls_sha1update, + &__archive_mbedtls_sha1final, #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) &__archive_nettle_sha1init, &__archive_nettle_sha1update, @@ -1369,6 +1585,10 @@ const struct archive_digest __archive_digest = &__archive_libsystem_sha256init, &__archive_libsystem_sha256update, &__archive_libsystem_sha256final, +#elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) + &__archive_mbedtls_sha256init, + &__archive_mbedtls_sha256update, + &__archive_mbedtls_sha256final, #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) &__archive_nettle_sha256init, &__archive_nettle_sha256update, @@ -1404,6 +1624,10 @@ const struct archive_digest __archive_digest = &__archive_libsystem_sha384init, &__archive_libsystem_sha384update, &__archive_libsystem_sha384final, +#elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) + &__archive_mbedtls_sha384init, + &__archive_mbedtls_sha384update, + &__archive_mbedtls_sha384final, #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) &__archive_nettle_sha384init, &__archive_nettle_sha384update, @@ -1443,6 +1667,10 @@ const struct archive_digest __archive_digest = &__archive_libsystem_sha512init, &__archive_libsystem_sha512update, &__archive_libsystem_sha512final +#elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) + &__archive_mbedtls_sha512init, + &__archive_mbedtls_sha512update, + &__archive_mbedtls_sha512final #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) &__archive_nettle_sha512init, &__archive_nettle_sha512update, Modified: stable/11/contrib/libarchive/libarchive/archive_digest_private.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_digest_private.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_digest_private.h Wed Feb 19 01:50:47 2020 (r358088) @@ -24,13 +24,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_DIGEST_PRIVATE_H_INCLUDED +#define ARCHIVE_DIGEST_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED -#define ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED - /* * Crypto support in various Operating Systems: * @@ -112,6 +111,24 @@ #include #endif +/* mbed TLS crypto headers */ +#if defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) +#include +#endif +#if defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) +#include +#endif +#if defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) +#include +#endif +#if defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) +#include +#endif +#if defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) ||\ + defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) +#include +#endif + /* Nettle crypto headers */ #if defined(ARCHIVE_CRYPTO_MD5_NETTLE) #include @@ -159,6 +176,8 @@ typedef MD5_CTX archive_md5_ctx; typedef MD5_CTX archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) typedef CC_MD5_CTX archive_md5_ctx; +#elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) +typedef mbedtls_md5_context archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) typedef struct md5_ctx archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) @@ -173,6 +192,8 @@ typedef unsigned char archive_md5_ctx; typedef RMD160_CTX archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) typedef RIPEMD160_CTX archive_rmd160_ctx; +#elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) +typedef mbedtls_ripemd160_context archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) typedef struct ripemd160_ctx archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) @@ -187,6 +208,8 @@ typedef SHA1_CTX archive_sha1_ctx; typedef SHA1_CTX archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) typedef CC_SHA1_CTX archive_sha1_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) +typedef mbedtls_sha1_context archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) typedef struct sha1_ctx archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) @@ -207,6 +230,8 @@ typedef SHA2_CTX archive_sha256_ctx; typedef SHA256_CTX archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) typedef CC_SHA256_CTX archive_sha256_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) +typedef mbedtls_sha256_context archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) typedef struct sha256_ctx archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) @@ -225,6 +250,8 @@ typedef SHA384_CTX archive_sha384_ctx; typedef SHA2_CTX archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) typedef CC_SHA512_CTX archive_sha384_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) +typedef mbedtls_sha512_context archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) typedef struct sha384_ctx archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) @@ -245,6 +272,8 @@ typedef SHA2_CTX archive_sha512_ctx; typedef SHA512_CTX archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) typedef CC_SHA512_CTX archive_sha512_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) +typedef mbedtls_sha512_context archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) typedef struct sha512_ctx archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) @@ -259,6 +288,7 @@ typedef unsigned char archive_sha512_ctx; #if defined(ARCHIVE_CRYPTO_MD5_LIBC) ||\ defined(ARCHIVE_CRYPTO_MD5_LIBMD) || \ defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_MD5_NETTLE) ||\ defined(ARCHIVE_CRYPTO_MD5_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_MD5_WIN) @@ -272,6 +302,7 @@ typedef unsigned char archive_sha512_ctx; __archive_digest.md5update(ctx, buf, n) #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) ||\ + defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_RMD160_NETTLE) ||\ defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) #define ARCHIVE_HAS_RMD160 @@ -286,6 +317,7 @@ typedef unsigned char archive_sha512_ctx; #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) ||\ defined(ARCHIVE_CRYPTO_SHA1_LIBMD) || \ defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA1_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA1_WIN) @@ -303,6 +335,7 @@ typedef unsigned char archive_sha512_ctx; defined(ARCHIVE_CRYPTO_SHA256_LIBC3) ||\ defined(ARCHIVE_CRYPTO_SHA256_LIBMD) ||\ defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA256_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA256_WIN) @@ -319,6 +352,7 @@ typedef unsigned char archive_sha512_ctx; defined(ARCHIVE_CRYPTO_SHA384_LIBC2) ||\ defined(ARCHIVE_CRYPTO_SHA384_LIBC3) ||\ defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA384_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA384_WIN) @@ -336,6 +370,7 @@ typedef unsigned char archive_sha512_ctx; defined(ARCHIVE_CRYPTO_SHA512_LIBC3) ||\ defined(ARCHIVE_CRYPTO_SHA512_LIBMD) ||\ defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA512_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA512_WIN) Modified: stable/11/contrib/libarchive/libarchive/archive_endian.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_endian.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_endian.h Wed Feb 19 01:50:47 2020 (r358088) @@ -28,16 +28,15 @@ * Borrowed from FreeBSD's */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif +#ifndef ARCHIVE_ENDIAN_H_INCLUDED +#define ARCHIVE_ENDIAN_H_INCLUDED /* Note: This is a purely internal header! */ /* Do not use this outside of libarchive internal code! */ -#ifndef ARCHIVE_ENDIAN_H_INCLUDED -#define ARCHIVE_ENDIAN_H_INCLUDED - +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * Disabling inline keyword for compilers known to choke on it: Modified: stable/11/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_entry.c Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_entry.c Wed Feb 19 01:50:47 2020 (r358088) @@ -1699,7 +1699,7 @@ static const struct flag { const wchar_t *wname; unsigned long set; unsigned long clear; -} flags[] = { +} fileflags[] = { /* Preferred (shorter) names per flag first, all prefixed by "no" */ #ifdef SF_APPEND { "nosappnd", L"nosappnd", SF_APPEND, 0}, @@ -1876,7 +1876,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bit bits = bitset | bitclear; length = 0; - for (flag = flags; flag->name != NULL; flag++) + for (flag = fileflags; flag->name != NULL; flag++) if (bits & (flag->set | flag->clear)) { length += strlen(flag->name) + 1; bits &= ~(flag->set | flag->clear); @@ -1889,7 +1889,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bit return (NULL); dp = string; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { if (bitset & flag->set || bitclear & flag->clear) { sp = flag->name + 2; } else if (bitset & flag->clear || bitclear & flag->set) { @@ -1941,7 +1941,7 @@ ae_strtofflags(const char *s, unsigned long *setp, uns *end != ' ' && *end != ',') end++; length = end - start; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { size_t flag_length = strlen(flag->name); if (length == flag_length && memcmp(start, flag->name, length) == 0) { @@ -2009,7 +2009,7 @@ ae_wcstofflags(const wchar_t *s, unsigned long *setp, *end != L' ' && *end != L',') end++; length = end - start; - for (flag = flags; flag->wname != NULL; flag++) { + for (flag = fileflags; flag->wname != NULL; flag++) { size_t flag_length = wcslen(flag->wname); if (length == flag_length && wmemcmp(start, flag->wname, length) == 0) { Modified: stable/11/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_entry.h Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_entry.h Wed Feb 19 01:50:47 2020 (r358088) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3004000 +#define ARCHIVE_VERSION_NUMBER 3004002 /* * Note: archive_entry.h is for use outside of libarchive; the @@ -524,9 +524,6 @@ __LA_DECL int archive_entry_acl_reset(struct archive_ __LA_DECL int archive_entry_acl_next(struct archive_entry *, int /* want_type */, int * /* type */, int * /* permset */, int * /* tag */, int * /* qual */, const char ** /* name */); -__LA_DECL int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, - int * /* type */, int * /* permset */, int * /* tag */, - int * /* qual */, const wchar_t ** /* name */); /* * Construct a text-format ACL. The flags argument is a bitmask that Modified: stable/11/contrib/libarchive/libarchive/archive_entry_acl.3 ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_entry_acl.3 Wed Feb 19 01:46:43 2020 (r358087) +++ stable/11/contrib/libarchive/libarchive/archive_entry_acl.3 Wed Feb 19 01:50:47 2020 (r358088) @@ -34,7 +34,6 @@ .Nm archive_entry_acl_from_text , .Nm archive_entry_acl_from_text_w , .Nm archive_entry_acl_next , -.Nm archive_entry_acl_next_w , .Nm archive_entry_acl_reset , .Nm archive_entry_acl_to_text , .Nm archive_entry_acl_to_text_w , @@ -89,16 +88,6 @@ Streaming Archive Library (libarchive, -larchive) .Fa "const char **ret_name" .Fc .Ft int -.Fo archive_entry_acl_next_w -.Fa "struct archive_entry *a" -.Fa "int type" -.Fa "int *ret_type" -.Fa "int *ret_permset" -.Fa "int *ret_tag" -.Fa "int *ret_qual" -.Fa "const wchar_t **ret_name" -.Fc -.Ft int .Fn archive_entry_acl_reset "struct archive_entry *a" "int type" .Ft char * .Fo archive_entry_acl_to_text @@ -349,8 +338,6 @@ character are skipped. .Pp .Fn archive_entry_acl_next -and -.Fn archive_entry_acl_next_w return the next entry of the ACL list. This functions may only be called after .Fn archive_entry_acl_reset @@ -358,9 +345,7 @@ has indicated the presence of extended ACL entries. .Pp .Fn archive_entry_acl_reset prepare reading the list of ACL entries with -.Fn archive_entry_acl_next -or -.Fn archive_entry_acl_next_w . +.Fn archive_entry_acl_next . *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Wed Feb 19 14:27:22 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4F6D23B9A5; Wed, 19 Feb 2020 14:27:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48N0RZ3ld0z491N; Wed, 19 Feb 2020 14:27:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 726A5A147; Wed, 19 Feb 2020 14:27:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01JERMa6085814; Wed, 19 Feb 2020 14:27:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01JERMv2085813; Wed, 19 Feb 2020 14:27:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202002191427.01JERMv2085813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 19 Feb 2020 14:27:22 +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: r358107 - stable/11/share/man/man7 X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/man/man7 X-SVN-Commit-Revision: 358107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2020 14:27:22 -0000 Author: bapt Date: Wed Feb 19 14:27:22 2020 New Revision: 358107 URL: https://svnweb.freebsd.org/changeset/base/358107 Log: MFC r356918: The ports tree now accepts /usr/local/share/man as a directory for manpage and will slowly transition from /usr/local/man to it. To reflect this remove the documentation of the manpages being an exception in the layout of /usr/local Reported by: Dan Nelson (via IRC) Modified: stable/11/share/man/man7/hier.7 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man7/hier.7 ============================================================================== --- stable/11/share/man/man7/hier.7 Wed Feb 19 14:26:27 2020 (r358106) +++ stable/11/share/man/man7/hier.7 Wed Feb 19 14:27:22 2020 (r358107) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 10, 2019 +.Dd January 20, 2020 .Dt HIER 7 .Os .Sh NAME @@ -435,12 +435,6 @@ for .Pa /usr should be used. Exceptions are the -.Pa man -directory -.Po directly under -.Pa local/ -rather than under -.Pa local/share/ Ns Pc , ports documentation .Po in .Pa share/doc// Ns Pc , From owner-svn-src-stable-11@freebsd.org Wed Feb 19 16:18:27 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAE9123EB2B; Wed, 19 Feb 2020 16:18:27 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48N2vl4ynFz43FC; Wed, 19 Feb 2020 16:18:27 +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 9E572B555; Wed, 19 Feb 2020 16:18:27 +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 01JGIREo052418; Wed, 19 Feb 2020 16:18:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01JGIRcq052417; Wed, 19 Feb 2020 16:18:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002191618.01JGIRcq052417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 19 Feb 2020 16:18:27 +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: r358122 - stable/11/lib/libc/rpc X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/lib/libc/rpc X-SVN-Commit-Revision: 358122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2020 16:18:27 -0000 Author: markj Date: Wed Feb 19 16:18:27 2020 New Revision: 358122 URL: https://svnweb.freebsd.org/changeset/base/358122 Log: MFC r357576: Fix a use of an uninitialized pointer in xdr_rpcbs_rmtcalllist(). PR: 243759 Modified: stable/11/lib/libc/rpc/rpcb_st_xdr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/rpc/rpcb_st_xdr.c ============================================================================== --- stable/11/lib/libc/rpc/rpcb_st_xdr.c Wed Feb 19 16:17:51 2020 (r358121) +++ stable/11/lib/libc/rpc/rpcb_st_xdr.c Wed Feb 19 16:18:27 2020 (r358122) @@ -52,29 +52,28 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) { struct rpcbs_addrlist **pnext; - if (!xdr_rpcprog(xdrs, &objp->prog)) { + if (!xdr_rpcprog(xdrs, &objp->prog)) { return (FALSE); - } - if (!xdr_rpcvers(xdrs, &objp->vers)) { + } + if (!xdr_rpcvers(xdrs, &objp->vers)) { return (FALSE); - } - if (!xdr_int(xdrs, &objp->success)) { + } + if (!xdr_int(xdrs, &objp->success)) { return (FALSE); - } - if (!xdr_int(xdrs, &objp->failure)) { + } + if (!xdr_int(xdrs, &objp->failure)) { return (FALSE); - } - if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { + } + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); - } + } - pnext = &objp->next; - - if (!xdr_pointer(xdrs, (char **) pnext, + pnext = &objp->next; + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_addrlist), (xdrproc_t)xdr_rpcbs_addrlist)) { return (FALSE); - } + } return (TRUE); } @@ -84,86 +83,86 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp) bool_t xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp) { - int32_t *buf; struct rpcbs_rmtcalllist **pnext; + int32_t *buf; + pnext = &objp->next; if (xdrs->x_op == XDR_ENCODE) { - buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_rpcprog(xdrs, &objp->prog)) { - return (FALSE); + buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_rpcprog(xdrs, &objp->prog)) { + return (FALSE); + } + if (!xdr_rpcvers(xdrs, &objp->vers)) { + return (FALSE); + } + if (!xdr_rpcproc(xdrs, &objp->proc)) { + return (FALSE); + } + if (!xdr_int(xdrs, &objp->success)) { + return (FALSE); + } + if (!xdr_int(xdrs, &objp->failure)) { + return (FALSE); + } + if (!xdr_int(xdrs, &objp->indirect)) { + return (FALSE); + } + } else { + IXDR_PUT_U_INT32(buf, objp->prog); + IXDR_PUT_U_INT32(buf, objp->vers); + IXDR_PUT_U_INT32(buf, objp->proc); + IXDR_PUT_INT32(buf, objp->success); + IXDR_PUT_INT32(buf, objp->failure); + IXDR_PUT_INT32(buf, objp->indirect); } - if (!xdr_rpcvers(xdrs, &objp->vers)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_rpcproc(xdrs, &objp->proc)) { + if (!xdr_pointer(xdrs, (char **) pnext, + sizeof (rpcbs_rmtcalllist), + (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); } - if (!xdr_int(xdrs, &objp->success)) { - return (FALSE); - } - if (!xdr_int(xdrs, &objp->failure)) { - return (FALSE); - } - if (!xdr_int(xdrs, &objp->indirect)) { - return (FALSE); - } - } else { - IXDR_PUT_U_INT32(buf, objp->prog); - IXDR_PUT_U_INT32(buf, objp->vers); - IXDR_PUT_U_INT32(buf, objp->proc); - IXDR_PUT_INT32(buf, objp->success); - IXDR_PUT_INT32(buf, objp->failure); - IXDR_PUT_INT32(buf, objp->indirect); - } - if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { - return (FALSE); - } - pnext = &objp->next; - if (!xdr_pointer(xdrs, (char **) pnext, - sizeof (rpcbs_rmtcalllist), - (xdrproc_t)xdr_rpcbs_rmtcalllist)) { - return (FALSE); - } - return (TRUE); + return (TRUE); } else if (xdrs->x_op == XDR_DECODE) { - buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_rpcprog(xdrs, &objp->prog)) { - return (FALSE); + buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_rpcprog(xdrs, &objp->prog)) { + return (FALSE); + } + if (!xdr_rpcvers(xdrs, &objp->vers)) { + return (FALSE); + } + if (!xdr_rpcproc(xdrs, &objp->proc)) { + return (FALSE); + } + if (!xdr_int(xdrs, &objp->success)) { + return (FALSE); + } + if (!xdr_int(xdrs, &objp->failure)) { + return (FALSE); + } + if (!xdr_int(xdrs, &objp->indirect)) { + return (FALSE); + } + } else { + objp->prog = (rpcprog_t)IXDR_GET_U_INT32(buf); + objp->vers = (rpcvers_t)IXDR_GET_U_INT32(buf); + objp->proc = (rpcproc_t)IXDR_GET_U_INT32(buf); + objp->success = (int)IXDR_GET_INT32(buf); + objp->failure = (int)IXDR_GET_INT32(buf); + objp->indirect = (int)IXDR_GET_INT32(buf); } - if (!xdr_rpcvers(xdrs, &objp->vers)) { + if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { return (FALSE); } - if (!xdr_rpcproc(xdrs, &objp->proc)) { + if (!xdr_pointer(xdrs, (char **) pnext, + sizeof (rpcbs_rmtcalllist), + (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); } - if (!xdr_int(xdrs, &objp->success)) { - return (FALSE); - } - if (!xdr_int(xdrs, &objp->failure)) { - return (FALSE); - } - if (!xdr_int(xdrs, &objp->indirect)) { - return (FALSE); - } - } else { - objp->prog = (rpcprog_t)IXDR_GET_U_INT32(buf); - objp->vers = (rpcvers_t)IXDR_GET_U_INT32(buf); - objp->proc = (rpcproc_t)IXDR_GET_U_INT32(buf); - objp->success = (int)IXDR_GET_INT32(buf); - objp->failure = (int)IXDR_GET_INT32(buf); - objp->indirect = (int)IXDR_GET_INT32(buf); - } - if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) { - return (FALSE); - } - if (!xdr_pointer(xdrs, (char **) pnext, - sizeof (rpcbs_rmtcalllist), - (xdrproc_t)xdr_rpcbs_rmtcalllist)) { - return (FALSE); - } - return (TRUE); + return (TRUE); } if (!xdr_rpcprog(xdrs, &objp->prog)) { return (FALSE); From owner-svn-src-stable-11@freebsd.org Thu Feb 20 01:22:10 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A270E24B2B9; Thu, 20 Feb 2020 01:22: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NGz60vclz4XnZ; Thu, 20 Feb 2020 01:22: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 1291D19DC8; Thu, 20 Feb 2020 01:22: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 01K1M9cT085776; Thu, 20 Feb 2020 01:22:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01K1M9wj085775; Thu, 20 Feb 2020 01:22:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002200122.01K1M9wj085775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 20 Feb 2020 01:22:09 +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: r358139 - stable/11/sys/dev/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/pci X-SVN-Commit-Revision: 358139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2020 01:22:10 -0000 Author: kib Date: Thu Feb 20 01:22:09 2020 New Revision: 358139 URL: https://svnweb.freebsd.org/changeset/base/358139 Log: MFC r358021: Fix typo. Modified: stable/11/sys/dev/pci/pcireg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pcireg.h ============================================================================== --- stable/11/sys/dev/pci/pcireg.h Thu Feb 20 01:16:42 2020 (r358138) +++ stable/11/sys/dev/pci/pcireg.h Thu Feb 20 01:22:09 2020 (r358139) @@ -191,7 +191,7 @@ #define PCIZ_PMUX 0x001a /* Protocol Multiplexing */ #define PCIZ_PASID 0x001b /* Process Address Space ID */ #define PCIZ_LN_REQ 0x001c /* LN Requester */ -#define PCIZ_DPC 0x001d /* Downstream Porto Containment */ +#define PCIZ_DPC 0x001d /* Downstream Port Containment */ #define PCIZ_L1PM 0x001e /* L1 PM Substates */ /* config registers for header type 0 devices */ From owner-svn-src-stable-11@freebsd.org Thu Feb 20 01:24:46 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2751D24B539; Thu, 20 Feb 2020 01:24: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NH260Fpxz4byw; Thu, 20 Feb 2020 01:24: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 01BD719DF8; Thu, 20 Feb 2020 01:24: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 01K1OjOx086001; Thu, 20 Feb 2020 01:24:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01K1OjEO086000; Thu, 20 Feb 2020 01:24:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002200124.01K1OjEO086000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 20 Feb 2020 01:24:45 +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: r358141 - 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: 358141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2020 01:24:46 -0000 Author: kib Date: Thu Feb 20 01:24:45 2020 New Revision: 358141 URL: https://svnweb.freebsd.org/changeset/base/358141 Log: MFC r357894: Return success, instead of ESRCH, from pthread_cancel(3) applied to the exited but not yet joined thread. Modified: stable/11/lib/libthr/thread/thr_cancel.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_cancel.c ============================================================================== --- stable/11/lib/libthr/thread/thr_cancel.c Thu Feb 20 01:23:39 2020 (r358140) +++ stable/11/lib/libthr/thread/thr_cancel.c Thu Feb 20 01:24:45 2020 (r358141) @@ -63,7 +63,7 @@ _pthread_cancel(pthread_t pthread) * _thr_find_thread and THR_THREAD_UNLOCK will enter and leave critical * region automatically. */ - if ((ret = _thr_find_thread(curthread, pthread, 0)) == 0) { + if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { if (!pthread->cancel_pending) { pthread->cancel_pending = 1; if (pthread->state != PS_DEAD) From owner-svn-src-stable-11@freebsd.org Thu Feb 20 01:35:31 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADAEC24BEE5; Thu, 20 Feb 2020 01:35:31 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NHGW33Rhz3wcY; Thu, 20 Feb 2020 01:35:31 +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 5391019FEF; Thu, 20 Feb 2020 01:35:31 +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 01K1ZV6L092511; Thu, 20 Feb 2020 01:35:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01K1ZVRH092510; Thu, 20 Feb 2020 01:35:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002200135.01K1ZVRH092510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 20 Feb 2020 01:35:31 +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: r358145 - stable/11/usr.sbin/pciconf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/usr.sbin/pciconf X-SVN-Commit-Revision: 358145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2020 01:35:31 -0000 Author: kib Date: Thu Feb 20 01:35:30 2020 New Revision: 358145 URL: https://svnweb.freebsd.org/changeset/base/358145 Log: MFC r358022: pciconf: List names of all known extended PCIe capabilities. Modified: stable/11/usr.sbin/pciconf/cap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pciconf/cap.c ============================================================================== --- stable/11/usr.sbin/pciconf/cap.c Thu Feb 20 01:34:29 2020 (r358144) +++ stable/11/usr.sbin/pciconf/cap.c Thu Feb 20 01:35:30 2020 (r358145) @@ -950,20 +950,35 @@ static struct { uint16_t id; const char *name; } ecap_names[] = { + { PCIZ_AER, "AER" }, + { PCIZ_VC, "Virtual Channel" }, + { PCIZ_SERNUM, "Device Serial Number" }, { PCIZ_PWRBDGT, "Power Budgeting" }, { PCIZ_RCLINK_DCL, "Root Complex Link Declaration" }, { PCIZ_RCLINK_CTL, "Root Complex Internal Link Control" }, { PCIZ_RCEC_ASSOC, "Root Complex Event Collector ASsociation" }, { PCIZ_MFVC, "MFVC" }, + { PCIZ_VC2, "Virtual Channel 2" }, { PCIZ_RCRB, "RCRB" }, + { PCIZ_CAC, "Configuration Access Correction" }, { PCIZ_ACS, "ACS" }, { PCIZ_ARI, "ARI" }, { PCIZ_ATS, "ATS" }, + { PCIZ_SRIOV, "SRIOV" }, + { PCIZ_MRIOV, "MRIOV" }, { PCIZ_MULTICAST, "Multicast" }, + { PCIZ_PAGE_REQ, "Page Page Request" }, + { PCIZ_AMD, "AMD proprietary "}, { PCIZ_RESIZE_BAR, "Resizable BAR" }, { PCIZ_DPA, "DPA" }, { PCIZ_TPH_REQ, "TPH Requester" }, { PCIZ_LTR, "LTR" }, + { PCIZ_SEC_PCIE, "Secondary PCI Express" }, + { PCIZ_PMUX, "Protocol Multiplexing" }, + { PCIZ_PASID, "Process Address Space ID" }, + { PCIZ_LN_REQ, "LN Requester" }, + { PCIZ_DPC, "Downstream Port Containment" }, + { PCIZ_L1PM, "L1 PM Substates" }, { 0, NULL } }; From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:20:11 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79AD5250187; Fri, 21 Feb 2020 04:20:11 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nyt31h2Rz3yVQ; Fri, 21 Feb 2020 04:20:11 +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 186315123; Fri, 21 Feb 2020 04:20:11 +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 01L4KADd056706; Fri, 21 Feb 2020 04:20:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4KAGt056705; Fri, 21 Feb 2020 04:20:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202002210420.01L4KAGt056705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 21 Feb 2020 04:20:10 +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: r358195 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Commit-Revision: 358195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:20:11 -0000 Author: cy Date: Fri Feb 21 04:20:10 2020 New Revision: 358195 URL: https://svnweb.freebsd.org/changeset/base/358195 Log: MFC r358068: Add missing SYNOPSIS section. Reported by: ports/textproc/igor Modified: stable/11/lib/libpam/modules/pam_login_access/login.access.5 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libpam/modules/pam_login_access/login.access.5 Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libpam/modules/pam_login_access/login.access.5 ============================================================================== --- stable/11/lib/libpam/modules/pam_login_access/login.access.5 Fri Feb 21 04:18:15 2020 (r358194) +++ stable/11/lib/libpam/modules/pam_login_access/login.access.5 Fri Feb 21 04:20:10 2020 (r358195) @@ -1,12 +1,14 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2019 +.Dd January 27, 2020 .Dt LOGIN.ACCESS 5 .Os .Sh NAME .Nm login.access .Nd login access control table +.Sh SYNOPSIS +.Pa /etc/login.access .Sh DESCRIPTION The .Nm From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:22:31 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB1EA250578; Fri, 21 Feb 2020 04:22:31 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nywk1hGYz41Vb; Fri, 21 Feb 2020 04:22:30 +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 F1A9D52DB; Fri, 21 Feb 2020 04:22:29 +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 01L4MTWm062031; Fri, 21 Feb 2020 04:22:29 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4MTqt062030; Fri, 21 Feb 2020 04:22:29 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202002210422.01L4MTqt062030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 21 Feb 2020 04:22: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: r358196 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Commit-Revision: 358196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:22:32 -0000 Author: cy Date: Fri Feb 21 04:22:29 2020 New Revision: 358196 URL: https://svnweb.freebsd.org/changeset/base/358196 Log: MFC r358067: There is no pam(8) man page, it is pam(3). Approved by: des (implicit, blanket) Modified: stable/11/lib/libpam/modules/pam_login_access/pam_login_access.8 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libpam/modules/pam_login_access/pam_login_access.8 Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libpam/modules/pam_login_access/pam_login_access.8 ============================================================================== --- stable/11/lib/libpam/modules/pam_login_access/pam_login_access.8 Fri Feb 21 04:20:10 2020 (r358195) +++ stable/11/lib/libpam/modules/pam_login_access/pam_login_access.8 Fri Feb 21 04:22:29 2020 (r358196) @@ -69,9 +69,9 @@ remote host (in the case of a remote login), according restrictions listed in .Xr login.access 5 . .Sh SEE ALSO +.Xr pam 3 , .Xr login.access 5 , -.Xr pam.conf 5 , -.Xr pam 8 +.Xr pam.conf 5 .Sh AUTHORS The .Xr login.access 5 From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:23:55 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B48E250845; Fri, 21 Feb 2020 04:23:55 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NyyM0Qhsz42hC; Fri, 21 Feb 2020 04:23:55 +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 0506F52E1; Fri, 21 Feb 2020 04:23:55 +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 01L4NsGA062161; Fri, 21 Feb 2020 04:23:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4Nswt062160; Fri, 21 Feb 2020 04:23:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202002210423.01L4Nswt062160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 21 Feb 2020 04:23:54 +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: r358197 - in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libpam/modules/pam_login_access 12/lib/libpam/modules/pam_login_access X-SVN-Commit-Revision: 358197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:23:55 -0000 Author: cy Date: Fri Feb 21 04:23:54 2020 New Revision: 358197 URL: https://svnweb.freebsd.org/changeset/base/358197 Log: MFC r358069: strchr() returns a pointer not an int. Reported by: bjk Approved by: des (blanket, implicit) Modified: stable/11/lib/libpam/modules/pam_login_access/login_access.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libpam/modules/pam_login_access/login_access.c Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libpam/modules/pam_login_access/login_access.c ============================================================================== --- stable/11/lib/libpam/modules/pam_login_access/login_access.c Fri Feb 21 04:22:29 2020 (r358196) +++ stable/11/lib/libpam/modules/pam_login_access/login_access.c Fri Feb 21 04:23:54 2020 (r358197) @@ -220,7 +220,7 @@ from_match(const char *tok, const char *string) && strcasecmp(tok, string + str_len - tok_len) == 0) return (YES); } else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */ - if (strchr(string, '.') == 0) + if (strchr(string, '.') == NULL) return (YES); } else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */ && strncmp(tok, string, tok_len) == 0) { From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:25:11 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFEEC2509CE; Fri, 21 Feb 2020 04:25:11 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nyzq0W3mz43YJ; Fri, 21 Feb 2020 04:25:11 +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 ECC3452E9; Fri, 21 Feb 2020 04:25:10 +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 01L4PA9n062320; Fri, 21 Feb 2020 04:25:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4PAEB062319; Fri, 21 Feb 2020 04:25:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210425.01L4PAEB062319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:25:10 +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: r358198 - in stable: 11/stand/common 12/stand/common X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/common 12/stand/common X-SVN-Commit-Revision: 358198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:25:12 -0000 Author: kevans Date: Fri Feb 21 04:25:10 2020 New Revision: 358198 URL: https://svnweb.freebsd.org/changeset/base/358198 Log: MFC r357827: lualoader: disable autoboot on high-level interpreter errors If we hit an error at this level, we are almost certainly not in any kind of sane state where autoboot can do the right thing. Instead of letting it try and probably failing, disable autoboot so they immediately get kicked into a loader prompt for manual remediation/diagnosis. Modified: stable/11/stand/common/interp_lua.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/common/interp_lua.c Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/common/interp_lua.c ============================================================================== --- stable/11/stand/common/interp_lua.c Fri Feb 21 04:23:54 2020 (r358197) +++ stable/11/stand/common/interp_lua.c Fri Feb 21 04:25:10 2020 (r358198) @@ -128,6 +128,7 @@ interp_init(void) errstr = errstr == NULL ? "unknown" : errstr; printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); lua_pop(luap, 1); + setenv("autoboot_delay", "NO", 1); } } From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:29:09 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68C6D250D4E; Fri, 21 Feb 2020 04:29:09 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nz4P1mJGz46bp; Fri, 21 Feb 2020 04:29:09 +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 08A7F52F4; Fri, 21 Feb 2020 04:29:08 +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 01L4T7gN062636; Fri, 21 Feb 2020 04:29:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4T7nI062635; Fri, 21 Feb 2020 04:29:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002210429.01L4T7nI062635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 21 Feb 2020 04:29:07 +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: r358200 - stable/11/sys/dev/ahci X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ahci X-SVN-Commit-Revision: 358200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:29:09 -0000 Author: mav Date: Fri Feb 21 04:29:07 2020 New Revision: 358200 URL: https://svnweb.freebsd.org/changeset/base/358200 Log: MFC r357919: Add Hygon PCI ID and description for AHCI SATA controller. Modified: stable/11/sys/dev/ahci/ahci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci_pci.c Fri Feb 21 04:28:42 2020 (r358199) +++ stable/11/sys/dev/ahci/ahci_pci.c Fri Feb 21 04:29:07 2020 (r358200) @@ -90,6 +90,7 @@ static const struct { {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX}, + {0x79011d94, 0x00, "Hygon KERNCZ", 0}, {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, {0x26818086, 0x00, "Intel ESB2", 0}, From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:30:23 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E31D9250EE4; Fri, 21 Feb 2020 04:30: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nz5p63h6z47R2; Fri, 21 Feb 2020 04:30:22 +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 8487852FB; Fri, 21 Feb 2020 04:30:22 +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 01L4UMI6062880; Fri, 21 Feb 2020 04:30:22 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4ULC4062872; Fri, 21 Feb 2020 04:30:21 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210430.01L4ULC4062872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:30:21 +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: r358202 - in stable: 11/sys/kern 11/sys/sys 12/sys/kern 12/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/kern 11/sys/sys 12/sys/kern 12/sys/sys X-SVN-Commit-Revision: 358202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:30:24 -0000 Author: kevans Date: Fri Feb 21 04:30:21 2020 New Revision: 358202 URL: https://svnweb.freebsd.org/changeset/base/358202 Log: MFC r357899: u_char -> vm_prot_t in a couple of places, NFC The latter is a typedef of the former; the typedef exists and these bits are representing vmprot values, so use the correct type. Modified: stable/11/sys/kern/kern_descrip.c stable/11/sys/kern/sys_capability.c stable/11/sys/sys/capsicum.h stable/11/sys/sys/file.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/kern/kern_descrip.c stable/12/sys/kern/sys_capability.c stable/12/sys/sys/capsicum.h stable/12/sys/sys/file.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/kern/kern_descrip.c ============================================================================== --- stable/11/sys/kern/kern_descrip.c Fri Feb 21 04:29:50 2020 (r358201) +++ stable/11/sys/kern/kern_descrip.c Fri Feb 21 04:30:21 2020 (r358202) @@ -2684,7 +2684,7 @@ fget(struct thread *td, int fd, cap_rights_t *rightsp, } int -fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, u_char *maxprotp, +fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp, struct file **fpp) { int error; Modified: stable/11/sys/kern/sys_capability.c ============================================================================== --- stable/11/sys/kern/sys_capability.c Fri Feb 21 04:29:50 2020 (r358201) +++ stable/11/sys/kern/sys_capability.c Fri Feb 21 04:30:21 2020 (r358202) @@ -178,10 +178,10 @@ cap_check(const cap_rights_t *havep, const cap_rights_ /* * Convert capability rights into VM access flags. */ -u_char +vm_prot_t cap_rights_to_vmprot(cap_rights_t *havep) { - u_char maxprot; + vm_prot_t maxprot; maxprot = VM_PROT_NONE; if (cap_rights_is_set(havep, CAP_MMAP_R)) Modified: stable/11/sys/sys/capsicum.h ============================================================================== --- stable/11/sys/sys/capsicum.h Fri Feb 21 04:29:50 2020 (r358201) +++ stable/11/sys/sys/capsicum.h Fri Feb 21 04:30:21 2020 (r358202) @@ -355,7 +355,7 @@ int cap_check(const cap_rights_t *havep, const cap_rig /* * Convert capability rights into VM access flags. */ -u_char cap_rights_to_vmprot(cap_rights_t *havep); +vm_prot_t cap_rights_to_vmprot(cap_rights_t *havep); /* * For the purposes of procstat(1) and similar tools, allow kern_descrip.c to Modified: stable/11/sys/sys/file.h ============================================================================== --- stable/11/sys/sys/file.h Fri Feb 21 04:29:50 2020 (r358201) +++ stable/11/sys/sys/file.h Fri Feb 21 04:30:21 2020 (r358202) @@ -232,7 +232,7 @@ extern volatile int openfiles; /* actual number of ope int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp); int fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, - u_char *maxprotp, struct file **fpp); + vm_prot_t *maxprotp, struct file **fpp); int fget_read(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp); int fget_write(struct thread *td, int fd, cap_rights_t *rightsp, From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:31:30 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D627E251164; Fri, 21 Feb 2020 04:31:30 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nz764wFpz48G3; Fri, 21 Feb 2020 04:31:30 +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 95C225358; Fri, 21 Feb 2020 04:31:30 +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 01L4VUIQ067569; Fri, 21 Feb 2020 04:31:30 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4VULq067568; Fri, 21 Feb 2020 04:31:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210431.01L4VULq067568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:31: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: r358203 - in stable: 11/contrib/ncurses/ncurses/base 12/contrib/ncurses/ncurses/base X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/contrib/ncurses/ncurses/base 12/contrib/ncurses/ncurses/base X-SVN-Commit-Revision: 358203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:31:30 -0000 Author: kevans Date: Fri Feb 21 04:31:30 2020 New Revision: 358203 URL: https://svnweb.freebsd.org/changeset/base/358203 Log: MFC r357903: ncurses: correct check for gcc >= 5.0 The hack in question is intended to workaround seemingly bogus #line markers in cpp output. As far as I can tell, llvm cpp doesn't do this by default, so there's no reason to add -P. In our /bin/sh, the main incantation should be placed in a sub-shell in order to properly pipe the output to fgrep. The main motivation for this change is admittedly to stop emitting the noise about clang not being gcc in make -s buildworld Modified: stable/11/contrib/ncurses/ncurses/base/MKlib_gen.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/ncurses/ncurses/base/MKlib_gen.sh Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/ncurses/ncurses/base/MKlib_gen.sh ============================================================================== --- stable/11/contrib/ncurses/ncurses/base/MKlib_gen.sh Fri Feb 21 04:30:21 2020 (r358202) +++ stable/11/contrib/ncurses/ncurses/base/MKlib_gen.sh Fri Feb 21 04:31:30 2020 (r358203) @@ -73,7 +73,7 @@ USE="$3" # determine if we are using gcc, and if so, what version because the proposed # solution uses a nonstandard option. PRG=`echo "$1" | $AWK '{ sub(/^[[:space:]]*/,""); sub(/[[:space:]].*$/, ""); print; }' || exit 0` -FSF=`"$PRG" --version 2>/dev/null || exit 0 | fgrep "Free Software Foundation" | head -n 1` +FSF=`("$PRG" --version 2>/dev/null || exit 0) | fgrep "Free Software Foundation" | head -n 1` ALL=`"$PRG" -dumpversion 2>/dev/null || exit 0` ONE=`echo "$ALL" | sed -e 's/\..*$//'` if test -n "$FSF" && test -n "$ALL" && test -n "$ONE" ; then From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:34:58 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03706251375; Fri, 21 Feb 2020 04:34:58 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NzC55FsGz4C6f; Fri, 21 Feb 2020 04:34:55 +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 91EAF54D3; Fri, 21 Feb 2020 04:34: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 01L4YtSX068714; Fri, 21 Feb 2020 04:34:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4Yt7n068711; Fri, 21 Feb 2020 04:34:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210434.01L4Yt7n068711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:34:55 +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: r358205 - in stable: 11/usr.bin/dtc 12/usr.bin/dtc X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/dtc 12/usr.bin/dtc X-SVN-Commit-Revision: 358205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:34:58 -0000 Author: kevans Date: Fri Feb 21 04:34:54 2020 New Revision: 358205 URL: https://svnweb.freebsd.org/changeset/base/358205 Log: MFC r357923-r357924: dtc fixes for /memreserve/ and -I/-O defaults r357923: Pull in latest fixes from dtc, up to 0060471 This includes a small battery of /memreserve/ fixes to make sure dtc is properly writing these regions into the output file and reading them back out. As of this update, dtc will now also assume common defaults for -I/-O if only one is specified; namely, dts for one implies dtb for the other and vice versa (Requested by: jhibbits, preserves GPL dtc behavior too). r357924: dtc: re-apply r353961, r354115 I missed in final review of r357923's diff that these ones hadn't yet been sent upstream and inadvertently reverted them. =-( Re-apply now. Modified: stable/11/usr.bin/dtc/dtc.cc stable/11/usr.bin/dtc/fdt.cc stable/11/usr.bin/dtc/fdt.hh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/dtc/dtc.cc stable/12/usr.bin/dtc/fdt.cc stable/12/usr.bin/dtc/fdt.hh Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/dtc/dtc.cc ============================================================================== --- stable/11/usr.bin/dtc/dtc.cc Fri Feb 21 04:33:14 2020 (r358204) +++ stable/11/usr.bin/dtc/dtc.cc Fri Feb 21 04:34:54 2020 (r358205) @@ -94,6 +94,8 @@ void version(const char* progname) } // Anonymous namespace using fdt::device_tree; +using fdt::tree_write_fn_ptr; +using fdt::tree_read_fn_ptr; int main(int argc, char **argv) @@ -104,8 +106,8 @@ main(int argc, char **argv) const char *in_file = "-"; FILE *depfile = 0; bool debug_mode = false; - auto write_fn = &device_tree::write_binary; - auto read_fn = &device_tree::parse_dts; + tree_write_fn_ptr write_fn = nullptr; + tree_read_fn_ptr read_fn = nullptr; uint32_t boot_cpu = 0; bool boot_cpu_specified = false; bool keep_going = false; @@ -135,6 +137,10 @@ main(int argc, char **argv) if (arg == "dtb") { read_fn = &device_tree::parse_dtb; + if (write_fn == nullptr) + { + write_fn = &device_tree::write_dts; + } } else if (arg == "dts") { @@ -161,6 +167,10 @@ main(int argc, char **argv) else if (arg == "dts") { write_fn = &device_tree::write_dts; + if (read_fn == nullptr) + { + read_fn = &device_tree::parse_dtb; + } } else { @@ -297,6 +307,14 @@ main(int argc, char **argv) fprintf(stderr, "Unknown option %c\n", ch); return EXIT_FAILURE; } + } + if (read_fn == nullptr) + { + read_fn = &device_tree::parse_dts; + } + if (write_fn == nullptr) + { + write_fn = &device_tree::write_binary; } if (optind < argc) { Modified: stable/11/usr.bin/dtc/fdt.cc ============================================================================== --- stable/11/usr.bin/dtc/fdt.cc Fri Feb 21 04:33:14 2020 (r358204) +++ stable/11/usr.bin/dtc/fdt.cc Fri Feb 21 04:34:54 2020 (r358205) @@ -1589,9 +1589,12 @@ device_tree::parse_file(text_input_buffer &input, { input.parse_error("Expected size on /memreserve/ node."); } + else + { + reservations.push_back(reservation(start, len)); + } input.next_token(); input.consume(';'); - reservations.push_back(reservation(start, len)); input.next_token(); } while (valid && !input.finished()) @@ -1661,7 +1664,7 @@ device_tree::write(int fd) reservation_writer.write_comment(string("Reservation start")); reservation_writer.write_data(i.first); reservation_writer.write_comment(string("Reservation length")); - reservation_writer.write_data(i.first); + reservation_writer.write_data(i.second); } // Write n spare reserve map entries, plus the trailing 0. for (uint32_t i=0 ; i<=spare_reserve_map_entries ; i++) @@ -1747,10 +1750,11 @@ device_tree::write_dts(int fd) if (!reservations.empty()) { const char msg[] = "/memreserve/"; - fwrite(msg, sizeof(msg), 1, file); + // Exclude the null byte when we're writing it out to the file. + fwrite(msg, sizeof(msg) - 1, 1, file); for (auto &i : reservations) { - fprintf(file, " %" PRIx64 " %" PRIx64, i.first, i.second); + fprintf(file, " 0x%" PRIx64 " 0x%" PRIx64, i.first, i.second); } fputs(";\n\n", file); } @@ -1793,6 +1797,10 @@ device_tree::parse_dtb(const string &fn, FILE *) fprintf(stderr, "Failed to read memory reservation table\n"); valid = false; return; + } + if (start != 0 || length != 0) + { + reservations.push_back(reservation(start, length)); } } while (!((start == 0) && (length == 0))); input_buffer struct_table = Modified: stable/11/usr.bin/dtc/fdt.hh ============================================================================== --- stable/11/usr.bin/dtc/fdt.hh Fri Feb 21 04:33:14 2020 (r358204) +++ stable/11/usr.bin/dtc/fdt.hh Fri Feb 21 04:34:54 2020 (r358205) @@ -58,6 +58,14 @@ class property; class node; class device_tree; /** + * Type for device tree write functions. + */ +typedef void (device_tree::* tree_write_fn_ptr)(int); +/** + * Type for device tree read functions. + */ +typedef void (device_tree::* tree_read_fn_ptr)(const std::string &, FILE *); +/** * Type for (owned) pointers to properties. */ typedef std::shared_ptr property_ptr; From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:39:00 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 861E62518E0; Fri, 21 Feb 2020 04:39:00 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NzHm22ndz4HQJ; Fri, 21 Feb 2020 04:39:00 +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 213E354DB; Fri, 21 Feb 2020 04:39:00 +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 01L4cxDE068984; Fri, 21 Feb 2020 04:38:59 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4cxhk068983; Fri, 21 Feb 2020 04:38:59 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210438.01L4cxhk068983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:38:59 +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: r358206 - in stable: 11/usr.bin/dtc 12/usr.bin/dtc X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/dtc 12/usr.bin/dtc X-SVN-Commit-Revision: 358206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:39:00 -0000 Author: kevans Date: Fri Feb 21 04:38:59 2020 New Revision: 358206 URL: https://svnweb.freebsd.org/changeset/base/358206 Log: MFC r347445, r353961: dtc build issues r347445: Fix build issue with clang 8.0.1 The algorithm header is needed to use std::remove_if r353961: exit requires stdlib.h to be included to use. FreeBSD 10.3 requires this, and dtc is a bootstrap tool so it needs to compile there. Modified: stable/11/usr.bin/dtc/dtb.cc stable/11/usr.bin/dtc/fdt.hh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/dtc/dtb.cc stable/12/usr.bin/dtc/fdt.hh Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/dtc/dtb.cc ============================================================================== --- stable/11/usr.bin/dtc/dtb.cc Fri Feb 21 04:34:54 2020 (r358205) +++ stable/11/usr.bin/dtc/dtb.cc Fri Feb 21 04:38:59 2020 (r358206) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include Modified: stable/11/usr.bin/dtc/fdt.hh ============================================================================== --- stable/11/usr.bin/dtc/fdt.hh Fri Feb 21 04:34:54 2020 (r358205) +++ stable/11/usr.bin/dtc/fdt.hh Fri Feb 21 04:38:59 2020 (r358206) @@ -34,6 +34,7 @@ #ifndef _FDT_HH_ #define _FDT_HH_ +#include #include #include #include From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:41:22 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F038B251A2A; Fri, 21 Feb 2020 04:41:22 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NzLV4YKFz4McT; Fri, 21 Feb 2020 04:41:22 +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 873E3564F; Fri, 21 Feb 2020 04:41:22 +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 01L4fMaJ070821; Fri, 21 Feb 2020 04:41:22 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4fMBa070820; Fri, 21 Feb 2020 04:41:22 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210441.01L4fMBa070820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:41:22 +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: r358207 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 358207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:41:23 -0000 Author: kevans Date: Fri Feb 21 04:41:22 2020 New Revision: 358207 URL: https://svnweb.freebsd.org/changeset/base/358207 Log: MFC r357840: sys/kern sysent: re-add dependency on capabilities.conf r356868 inadvertently removed this, so changes to capabilities.conf were no longer considered for being outdated. Modified: stable/11/sys/kern/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/kern/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/kern/Makefile ============================================================================== --- stable/11/sys/kern/Makefile Fri Feb 21 04:38:59 2020 (r358206) +++ stable/11/sys/kern/Makefile Fri Feb 21 04:41:22 2020 (r358207) @@ -3,6 +3,7 @@ # # Makefile for init_sysent +SRCS+= capabilities.conf SYSENT_CONF= GENERATED= init_sysent.c \ syscalls.c \ From owner-svn-src-stable-11@freebsd.org Fri Feb 21 04:42:17 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8198251D28; Fri, 21 Feb 2020 04:42:17 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48NzMY2n1wz4P7F; Fri, 21 Feb 2020 04:42:17 +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 DA03A56A3; Fri, 21 Feb 2020 04:42:16 +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 01L4gGM1074976; Fri, 21 Feb 2020 04:42:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4gGVP074975; Fri, 21 Feb 2020 04:42:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002210442.01L4gGVP074975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 21 Feb 2020 04:42:16 +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: r358208 - in stable: 11/stand/efi/loader 12/stand/efi/loader X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/efi/loader 12/stand/efi/loader X-SVN-Commit-Revision: 358208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:42:17 -0000 Author: kevans Date: Fri Feb 21 04:42:16 2020 New Revision: 358208 URL: https://svnweb.freebsd.org/changeset/base/358208 Log: MFC r357845: efiloader: don't execute hooks when setting currdev/loaddev We still need to set the hooks to prevent improper manipulations thereafter at the loader prompt, but as it is we're actively preventing loaddev from being set correctly in some circumstances (ZFS in particular) and doing more work than needed with currdev -- that hook in particular validates it as a correct device, which we can assume isn't needed in this context. Modified: stable/11/stand/efi/loader/main.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/efi/loader/main.c Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/efi/loader/main.c ============================================================================== --- stable/11/stand/efi/loader/main.c Fri Feb 21 04:41:22 2020 (r358207) +++ stable/11/stand/efi/loader/main.c Fri Feb 21 04:42:16 2020 (r358208) @@ -169,8 +169,17 @@ static void set_currdev(const char *devname) { - env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, env_noset, env_nounset); + /* + * Don't execute hooks here; we may need to try setting these more than + * once here if we're probing for the ZFS pool we're supposed to boot. + * The currdev hook is intended to just validate user input anyways, + * while the loaddev hook makes it immutable once we've determined what + * the proper currdev is. + */ + env_setenv("currdev", EV_VOLATILE | EV_NOHOOK, devname, efi_setcurrdev, + env_nounset); + env_setenv("loaddev", EV_VOLATILE | EV_NOHOOK, devname, env_noset, + env_nounset); } static void From owner-svn-src-stable-11@freebsd.org Fri Feb 21 08:35:09 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BCB52565F5; Fri, 21 Feb 2020 08:35:09 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48P4XF0WZ4z4W0Z; Fri, 21 Feb 2020 08:35:09 +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 DB0CF8068; Fri, 21 Feb 2020 08:35:08 +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 01L8Z8pu013247; Fri, 21 Feb 2020 08:35:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L8Z8uE013246; Fri, 21 Feb 2020 08:35:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002210835.01L8Z8uE013246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 21 Feb 2020 08:35:08 +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: r358212 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 08:35:09 -0000 Author: hselasky Date: Fri Feb 21 08:35:08 2020 New Revision: 358212 URL: https://svnweb.freebsd.org/changeset/base/358212 Log: MFC r304567: Fix translation of the PrintScreen/SysRq and Pause/Break keys. Almost everything was broken. The cases that I noticed were Ctrl-PrintScreen not being mapped to the virtual scancode 0x5c (debug) and Pause not being mapped to the physical/virtual scancode 0x46 (slock). These keys are the most complicated ones due to kludges to give some compatibility back to before AT keyboards. Alt-PrintScreen must pretend to be a separate key from PrintScreen even at the "raw" level. The (unique) usb code for it is 0x8a and we just have to map this to our unique virtual scancode 0x54, but we mapped it first to the internal code 0x7e and then to 0x79 which is a key on the Japanese 106/109 keyboard. This fix is under the UKBD_EMULATE_ATASCANCODE option which shouldn't be used for non-AT keyboards. If it is, then the syscons Japanese keymaps have nothing of importance for code 0x79 and can easily be changed. 0x54 is also unimportant in Japanese and US keymaps. NonAlt-PrintScreen and NonCtl-Pause/Break had many much larger bugs with smaller compatibility problems from fixing them. The details are too ugly to give here. Summary of the changed (hex) codes: K_RAW PrintScreen (Ctl, Shift, Ctl-Shift): E0-2A-E0-37 -> E0-37 K_RAW Alt-PrintScreen (all shift states): 79 -> 54 K_RAW Pause/Break (unshifted, Shift, Alt, Alt-Shift)): E0-46 -> E1-1D-45 K_CODE ALT-PrintScreen (all shift states): 79 -> 54 That is 15 of 32 shift combinations for 2 keys fixed, with 8 easy cases from the 79 -> 54 remapping. The difference is only large and with no workaround using a keymap for for K_RAW, but this affects other modes when ukbd is layered under kbmux because kbmux keeps all subdevices in K_RAW mode and translates. Oops. I used kbdmux to generate the above table of changes. Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:30:34 2020 (r358211) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:35:08 2020 (r358212) @@ -332,7 +332,7 @@ static const uint8_t ukbd_trtab[256] = { NN, NN, NN, NN, 115, 108, 111, 113, /* 70 - 77 */ 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ - 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ + 124, 125, 84, 127, 128, NN, NN, NN, /* 88 - 8F */ 129, 130, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ @@ -1757,17 +1757,6 @@ next_code: } } break; - /* XXX: I don't like these... */ - case 0x5c: /* print screen */ - if (sc->sc_flags & ALTS) { - keycode = 0x54; /* sysrq */ - } - break; - case 0x68: /* pause/break */ - if (sc->sc_flags & CTLS) { - keycode = 0x6c; /* break */ - } - break; } /* return the key code in the K_CODE mode */ @@ -2158,7 +2147,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shi /* 90-99 */ 0x11d, /* Ctrl-R */ 0x135, /* Divide */ - 0x137 | SCAN_PREFIX_SHIFT, /* PrintScreen */ + 0x137, /* PrintScreen */ 0x138, /* Alt-R */ 0x147, /* Home */ 0x148, /* Up */ @@ -2209,12 +2198,14 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shi if ((code >= 89) && (code < (int)(89 + nitems(scan)))) { code = scan[code - 89]; } + /* PrintScreen */ + if (code == 0x137 && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R | + MOD_ALT_L | MOD_ALT_R | MOD_SHIFT_L | MOD_SHIFT_R)))) { + code |= SCAN_PREFIX_SHIFT; + } /* Pause/Break */ - if ((code == 104) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))) { + if ((code == 0x146) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))) { code = (0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL); - } - if (shift & (MOD_SHIFT_L | MOD_SHIFT_R)) { - code &= ~SCAN_PREFIX_SHIFT; } code |= (up ? SCAN_RELEASE : SCAN_PRESS); From owner-svn-src-stable-11@freebsd.org Fri Feb 21 08:41:45 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8767C256A01; Fri, 21 Feb 2020 08:41:45 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48P4gr74Fkz3DYj; Fri, 21 Feb 2020 08:41:44 +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 7DA17824D; Fri, 21 Feb 2020 08:41:44 +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 01L8fi1r017268; Fri, 21 Feb 2020 08:41:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L8fiYJ017267; Fri, 21 Feb 2020 08:41:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002210841.01L8fiYJ017267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 21 Feb 2020 08:41:44 +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: r358213 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 08:41:45 -0000 Author: hselasky Date: Fri Feb 21 08:41:44 2020 New Revision: 358213 URL: https://svnweb.freebsd.org/changeset/base/358213 Log: MFC r304612: Further fixes for translation of PrintScreen/SysRq. The previous fix was tested mainly on 3 AT keyboards with USB adaptors where it works. 1 USB keyboard doesn't translate Alt-PrintScreen, so the software has to do it. Reorganize a little to share some code and to not translate the unusual usb scan code0x8a unless an Alt modified is set. Remove redundant check of Alt modifiers. Translation now more clearly filters out Alt-PrintScreen before the check. The table of errors fixed in the previous commit had many bugs. Correct table: K_RAW Ctl-PrintScreen: E0-2A-E0-37 -> E0-37 K_RAW Alt-PrintScreen (with 4 comb. of Ctl/Shift): 79 -> 54 K_RAW Pause/Break (with 4 comb. of Alt/Shift): E0-46 -> E1-1D-45 K_CODE PrintScreen (with 4 comb. of Ctl/Shift): 54 -> 5c K_CODE Alt-PrintScreen (with 4 comb. of Ctl/Shift): 7e -> 54 K_CODE Pause/Break (with 8 comb. of Ctl/Alt/Shift): 6c -> 68 That is 25 of 32 shift combinations for 2 keys fixed. All 16 combinations were broken for K_CODE and thus also for K_XLATE. Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:35:08 2020 (r358212) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:41:44 2020 (r358213) @@ -332,7 +332,7 @@ static const uint8_t ukbd_trtab[256] = { NN, NN, NN, NN, 115, 108, 111, 113, /* 70 - 77 */ 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ - 124, 125, 84, 127, 128, NN, NN, NN, /* 88 - 8F */ + 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ 129, 130, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ @@ -370,6 +370,7 @@ static void ukbd_timeout(void *); static void ukbd_set_leds(struct ukbd_softc *, uint8_t); static int ukbd_set_typematic(keyboard_t *, int); #ifdef UKBD_EMULATE_ATSCANCODE +static uint32_t ukbd_atkeycode(int, int); static int ukbd_key2scan(struct ukbd_softc *, int, int, int); #endif static uint32_t ukbd_read_char(keyboard_t *, int); @@ -1647,7 +1648,7 @@ ukbd_read(keyboard_t *kbd, int wait) ++(kbd->kb_count); #ifdef UKBD_EMULATE_ATSCANCODE - keycode = ukbd_trtab[KEY_INDEX(usbcode)]; + keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.modifiers); if (keycode == NN) { return -1; } @@ -1718,7 +1719,7 @@ next_code: #ifdef UKBD_EMULATE_ATSCANCODE /* USB key index -> key code -> AT scan code */ - keycode = ukbd_trtab[KEY_INDEX(usbcode)]; + keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.modifiers); if (keycode == NN) { return (NOKEY); } @@ -2138,6 +2139,31 @@ ukbd_set_typematic(keyboard_t *kbd, int code) } #ifdef UKBD_EMULATE_ATSCANCODE +static uint32_t +ukbd_atkeycode(int usbcode, int shift) +{ + uint32_t keycode; + + keycode = ukbd_trtab[KEY_INDEX(usbcode)]; + /* + * Translate Alt-PrintScreen to SysRq. + * + * Some or all AT keyboards connected through USB have already + * mapped Alted PrintScreens to an unusual usbcode (0x8a). + * ukbd_trtab translates this to 0x7e, and key2scan() would + * translate that to 0x79 (Intl' 4). Assume that if we have + * an Alted 0x7e here then it actually is an Alted PrintScreen. + * + * The usual usbcode for all PrintScreens is 0x46. ukbd_trtab + * translates this to 0x5c, so the Alt check to classify 0x5c + * is routine. + */ + if ((keycode == 0x5c || keycode == 0x7e) && + shift & (MOD_ALT_L | MOD_ALT_R)) + return (0x54); + return (keycode); +} + static int ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up) { @@ -2160,7 +2186,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shi 0x151, /* PageDown */ 0x152, /* Insert */ 0x153, /* Delete */ - 0x146, /* XXX Pause/Break */ + 0x146, /* Pause/Break */ 0x15b, /* Win_L(Super_L) */ 0x15c, /* Win_R(Super_R) */ 0x15d, /* Application(Menu) */ @@ -2200,7 +2226,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shi } /* PrintScreen */ if (code == 0x137 && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R | - MOD_ALT_L | MOD_ALT_R | MOD_SHIFT_L | MOD_SHIFT_R)))) { + MOD_SHIFT_L | MOD_SHIFT_R)))) { code |= SCAN_PREFIX_SHIFT; } /* Pause/Break */ From owner-svn-src-stable-11@freebsd.org Fri Feb 21 08:48:25 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34300256D1A; Fri, 21 Feb 2020 08:48:25 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48P4qY0MLvz3xkm; Fri, 21 Feb 2020 08:48:25 +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 DDCF282FD; Fri, 21 Feb 2020 08:48:24 +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 01L8mOS7019533; Fri, 21 Feb 2020 08:48:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L8mO99019532; Fri, 21 Feb 2020 08:48:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002210848.01L8mO99019532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 21 Feb 2020 08:48: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: r358214 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 08:48:25 -0000 Author: hselasky Date: Fri Feb 21 08:48:24 2020 New Revision: 358214 URL: https://svnweb.freebsd.org/changeset/base/358214 Log: MFC r304699: Fix key delay and repeat, part 1. kbdcontrol -r fast is documented to give a non-emulated atkbd's fastest rate of 250.34, but is misimplemented to request this as 0.0. ukbd supports many nonstandard rates, although it is currently too inaccurate by a factor of several hundred for non-huge nonstandard rates to be useful. It mapped 0.0 to 200.0. A repeat delay of 0 means a rate of infinity which is quite fast, but physical constraints limit this to a few MHz and the inaccuracies made it almost usable. Convert 0.0 to the documented 250.34. Also convert negative args and small args to the 250.34 minimal ones, like atkbd does. This is for KDSETREPEAT -- the 2 versions of the deprecated KDSETRAD have bounds checking. Keep not doing any bounds checking or conversions for upper limits since nonstandard large delays are useful for testing. The inaccuracies are dependent on HZ and the timeout implementation. With the old timeout implementation and HZ = 1000, 200.0 probably worked better to emulate 250.34 than 250.34 itself. HZ = 100 gives roundoff errors that accidentally reduce the inaaccuracies, and event timers reduce the inaccuracies even more, so 200.0 was giving more like itself (perhaps 215.15 on average but sometimes close to 10 msec repeat which is noticebly too fast). This commit makes 0.0 noticeably too slow, like 250.34 always was. Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:41:44 2020 (r358213) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:48:24 2020 (r358214) @@ -1954,17 +1954,14 @@ ukbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t if (!KBD_HAS_DEVICE(kbd)) { return (0); } - if (((int *)arg)[1] < 0) { - return (EINVAL); - } - if (((int *)arg)[0] < 0) { - return (EINVAL); - } - if (((int *)arg)[0] < 200) /* fastest possible value */ - kbd->kb_delay1 = 200; - else - kbd->kb_delay1 = ((int *)arg)[0]; - kbd->kb_delay2 = ((int *)arg)[1]; + /* + * Convert negative, zero and tiny args to the same limits + * as atkbd. We could support delays of 1 msec, but + * anything much shorter than the shortest atkbd value + * of 250.34 is almost unusable as well as incompatible. + */ + kbd->kb_delay1 = imax(((int *)arg)[0], 250); + kbd->kb_delay2 = imax(((int *)arg)[1], 34); #ifdef EVDEV_SUPPORT if (sc->sc_evdev != NULL) evdev_push_repeats(sc->sc_evdev, kbd); From owner-svn-src-stable-11@freebsd.org Fri Feb 21 08:59:21 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9711E2570C1; Fri, 21 Feb 2020 08:59:21 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48P5492cKFz4JkX; Fri, 21 Feb 2020 08:59:21 +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 4D76184BF; Fri, 21 Feb 2020 08:59:21 +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 01L8xLZP025582; Fri, 21 Feb 2020 08:59:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L8xLMV025581; Fri, 21 Feb 2020 08:59:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002210859.01L8xLMV025581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 21 Feb 2020 08:59:21 +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: r358215 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 08:59:21 -0000 Author: hselasky Date: Fri Feb 21 08:59:20 2020 New Revision: 358215 URL: https://svnweb.freebsd.org/changeset/base/358215 Log: MFC r304735 and r331692: Fix key delay and repeat, part 2. Use sbintime_t timeouts with precision control to get very accurate timing. It costs little to always ask for about 1% accuracy, and the not so new event timer implementation usual delivers that, and when it can't it gets much closer than our previous coarse timeouts and buggy simple countdown. The 2 fastest atkbd repeat rates have periods 34 and 38 msec, and ukbd pretended to support rates in between these. This requires sub-microsecond precision and accuracy even to handle the 4 msec difference very well, but ukbd asked the timeout subsystem for timeouts of 25 msec and the buggy simple countdown of this gave a a wide range of precisions and accuracies depending on HZ and other timer configuration (sometimes better than 25 msec but usually more like 50 msec). We now ask for and usually get precision and accuracy of about 1% for each repeat and much better on average. The 1% accuracy is overkill. Rounding of 30 cps to 34 msec instead of 33 already gives an error of +2% instead of -1%, and ut AT keyboards on PS/2 interfaces have similar errors. A timeout is now scheduled for every keypress and release. This allows some simplifications that are not done. It allows removing the timeout scheduling for exiting polled mode where it was unsafe in ddb mode. This is done. Exiting polled mode had some problems with extra repeats. Now exiting polled mode lets an extra timeout fire and the state is fudged so that the timeout handler does very little. The sc->time_ms variable is unsigned to avoid overflow. Differences of it need to be signed. Signed comparisons were emulated by testing an emulated sign bits. This only works easily for '<' comparisonss, but we now need a '<=' comparison. Change the difference variable to signed and use a signed comparison. Using unsigned types here didn't prevent overflow bugs but just reduced them. Overflow occurs with n repeats at the silly repeat period of [U]INT_MAX / n. The old countdown had an off by 1 error, and the simplifications would simply count down 1 to 0 and not need to accumulate possibly-large repeat repeats. PR: 226968 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:48:24 2020 (r358214) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:59:20 2020 (r358215) @@ -171,6 +171,8 @@ struct ukbd_softc { struct evdev_dev *sc_evdev; #endif + sbintime_t sc_co_basetime; + int sc_delay; uint32_t sc_ntime[UKBD_NKEYCODE]; uint32_t sc_otime[UKBD_NKEYCODE]; uint32_t sc_input[UKBD_IN_BUF_SIZE]; /* input buffer */ @@ -190,7 +192,6 @@ struct ukbd_softc { #define UKBD_FLAG_APPLE_EJECT 0x00000040 #define UKBD_FLAG_APPLE_FN 0x00000080 #define UKBD_FLAG_APPLE_SWAP 0x00000100 -#define UKBD_FLAG_TIMER_RUNNING 0x00000200 #define UKBD_FLAG_CTRL_L 0x00000400 #define UKBD_FLAG_CTRL_R 0x00000800 #define UKBD_FLAG_SHIFT_L 0x00001000 @@ -407,8 +408,26 @@ ukbd_any_key_pressed(struct ukbd_softc *sc) static void ukbd_start_timer(struct ukbd_softc *sc) { - sc->sc_flags |= UKBD_FLAG_TIMER_RUNNING; - usb_callout_reset(&sc->sc_callout, hz / 40, &ukbd_timeout, sc); + sbintime_t delay, now, prec; + + now = sbinuptime(); + + /* check if initial delay passed and fallback to key repeat delay */ + if (sc->sc_delay == 0) + sc->sc_delay = sc->sc_kbd.kb_delay2; + + /* compute timeout */ + delay = SBT_1MS * sc->sc_delay; + sc->sc_co_basetime += delay; + + /* check if we are running behind */ + if (sc->sc_co_basetime < now) + sc->sc_co_basetime = now; + + /* This is rarely called, so prefer precision to efficiency. */ + prec = qmin(delay >> 7, SBT_1MS * 10); + callout_reset_sbt(&sc->sc_callout.co, sc->sc_co_basetime, prec, + ukbd_timeout, sc, C_ABSOLUTE); } static void @@ -528,7 +547,7 @@ ukbd_interrupt(struct ukbd_softc *sc) uint32_t n_mod; uint32_t o_mod; uint32_t now = sc->sc_time_ms; - uint32_t dtime; + int32_t dtime; uint8_t key; uint8_t i; uint8_t j; @@ -586,7 +605,7 @@ rfound: ; sc->sc_ntime[i] = sc->sc_otime[j]; dtime = (sc->sc_otime[j] - now); - if (!(dtime & 0x80000000)) { + if (dtime > 0) { /* time has not elapsed */ goto pfound; } @@ -594,6 +613,12 @@ rfound: ; break; } } + if (j == UKBD_NKEYCODE) { + /* New key - set initial delay and [re]start timer */ + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); + } ukbd_put_key(sc, key | KEY_PRESS); /* @@ -648,7 +673,8 @@ ukbd_timeout(void *arg) UKBD_LOCK_ASSERT(); - sc->sc_time_ms += 25; /* milliseconds */ + sc->sc_time_ms += sc->sc_delay; + sc->sc_delay = 0; ukbd_interrupt(sc); @@ -657,8 +683,6 @@ ukbd_timeout(void *arg) if (ukbd_any_key_pressed(sc) || (sc->sc_inputs != 0)) { ukbd_start_timer(sc); - } else { - sc->sc_flags &= ~UKBD_FLAG_TIMER_RUNNING; } } @@ -844,12 +868,6 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t ukbd_interrupt(sc); - if (!(sc->sc_flags & UKBD_FLAG_TIMER_RUNNING)) { - if (ukbd_any_key_pressed(sc)) { - ukbd_start_timer(sc); - } - } - case USB_ST_SETUP: tr_setup: if (sc->sc_inputs < UKBD_IN_BUF_FULL) { @@ -2087,7 +2105,7 @@ ukbd_poll(keyboard_t *kbd, int on) sc->sc_poll_thread = curthread; } else { sc->sc_flags &= ~UKBD_FLAG_POLLING; - ukbd_start_timer(sc); /* start timer */ + sc->sc_delay = 0; } UKBD_UNLOCK(); From owner-svn-src-stable-11@freebsd.org Fri Feb 21 09:07:01 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BE5525762F; Fri, 21 Feb 2020 09:07: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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48P5F13yNpz4PFk; Fri, 21 Feb 2020 09:07: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 791728688; Fri, 21 Feb 2020 09:07: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 01L971Z7031381; Fri, 21 Feb 2020 09:07:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L971uj031380; Fri, 21 Feb 2020 09:07:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202002210907.01L971uj031380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 21 Feb 2020 09:07:01 +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: r358216 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 09:07:01 -0000 Author: hselasky Date: Fri Feb 21 09:07:01 2020 New Revision: 358216 URL: https://svnweb.freebsd.org/changeset/base/358216 Log: MFC r357861 and r357898: Improve USB gaming keyboard support. Add support for decoding pressed keys as a bitmap. The keys in the bitmap are described in the interface specific HID descriptor. Some keyboards even have multiple input interfaces, only using the bitmap method when the event array is full. That typically means when more than seven keys are pressed simultaneously. The internals of the USB keyboard driver have been slightly reworked to keep track of all keys in a single bitmap having 256 bits. This bitmap is then divided into blocks of 64-bits as an optimisation. Simplify automatic key repeat logic, because only the last key pressed can be repeated. PR: 224592 PR: 233884 Tested by: Alex V. Petrov Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 08:59:20 2020 (r358215) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Feb 21 09:07:01 2020 (r358216) @@ -110,27 +110,21 @@ SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, pollrate, CTLFLAG_R #define UKBD_EMULATE_ATSCANCODE 1 #define UKBD_DRIVER_NAME "ukbd" -#define UKBD_NMOD 8 /* units */ -#define UKBD_NKEYCODE 6 /* units */ -#define UKBD_IN_BUF_SIZE (2*(UKBD_NMOD + (2*UKBD_NKEYCODE))) /* bytes */ -#define UKBD_IN_BUF_FULL ((UKBD_IN_BUF_SIZE / 2) - 1) /* bytes */ +#define UKBD_NKEYCODE 256 /* units */ +#define UKBD_IN_BUF_SIZE (4 * UKBD_NKEYCODE) /* scancodes */ +#define UKBD_IN_BUF_FULL ((UKBD_IN_BUF_SIZE / 2) - 1) /* scancodes */ #define UKBD_NFKEY (sizeof(fkey_tab)/sizeof(fkey_tab[0])) /* units */ #define UKBD_BUFFER_SIZE 64 /* bytes */ +#define UKBD_KEY_PRESSED(map, key) ({ \ + CTASSERT((key) >= 0 && (key) < UKBD_NKEYCODE); \ + ((map)[(key) / 64] & (1ULL << ((key) % 64))); \ +}) +#define MOD_EJECT 0x01 +#define MOD_FN 0x02 + struct ukbd_data { - uint16_t modifiers; -#define MOD_CONTROL_L 0x01 -#define MOD_CONTROL_R 0x10 -#define MOD_SHIFT_L 0x02 -#define MOD_SHIFT_R 0x20 -#define MOD_ALT_L 0x04 -#define MOD_ALT_R 0x40 -#define MOD_WIN_L 0x08 -#define MOD_WIN_R 0x80 -/* internal */ -#define MOD_EJECT 0x0100 -#define MOD_FN 0x0200 - uint8_t keycode[UKBD_NKEYCODE]; + uint64_t bitmap[howmany(UKBD_NKEYCODE, 64)]; }; enum { @@ -145,17 +139,10 @@ struct ukbd_softc { keymap_t sc_keymap; accentmap_t sc_accmap; fkeytab_t sc_fkeymap[UKBD_NFKEY]; + uint64_t sc_loc_key_valid[howmany(UKBD_NKEYCODE, 64)]; struct hid_location sc_loc_apple_eject; struct hid_location sc_loc_apple_fn; - struct hid_location sc_loc_ctrl_l; - struct hid_location sc_loc_ctrl_r; - struct hid_location sc_loc_shift_l; - struct hid_location sc_loc_shift_r; - struct hid_location sc_loc_alt_l; - struct hid_location sc_loc_alt_r; - struct hid_location sc_loc_win_l; - struct hid_location sc_loc_win_r; - struct hid_location sc_loc_events; + struct hid_location sc_loc_key[UKBD_NKEYCODE]; struct hid_location sc_loc_numlock; struct hid_location sc_loc_capslock; struct hid_location sc_loc_scrolllock; @@ -173,8 +160,7 @@ struct ukbd_softc { sbintime_t sc_co_basetime; int sc_delay; - uint32_t sc_ntime[UKBD_NKEYCODE]; - uint32_t sc_otime[UKBD_NKEYCODE]; + uint32_t sc_repeat_time; uint32_t sc_input[UKBD_IN_BUF_SIZE]; /* input buffer */ uint32_t sc_time_ms; uint32_t sc_composed_char; /* composed char code, if non-zero */ @@ -192,15 +178,6 @@ struct ukbd_softc { #define UKBD_FLAG_APPLE_EJECT 0x00000040 #define UKBD_FLAG_APPLE_FN 0x00000080 #define UKBD_FLAG_APPLE_SWAP 0x00000100 -#define UKBD_FLAG_CTRL_L 0x00000400 -#define UKBD_FLAG_CTRL_R 0x00000800 -#define UKBD_FLAG_SHIFT_L 0x00001000 -#define UKBD_FLAG_SHIFT_R 0x00002000 -#define UKBD_FLAG_ALT_L 0x00004000 -#define UKBD_FLAG_ALT_R 0x00008000 -#define UKBD_FLAG_WIN_L 0x00010000 -#define UKBD_FLAG_WIN_R 0x00020000 -#define UKBD_FLAG_EVENTS 0x00040000 #define UKBD_FLAG_NUMLOCK 0x00080000 #define UKBD_FLAG_CAPSLOCK 0x00100000 #define UKBD_FLAG_SCROLLLOCK 0x00200000 @@ -215,31 +192,23 @@ struct ukbd_softc { uint16_t sc_inputs; uint16_t sc_inputhead; uint16_t sc_inputtail; - uint16_t sc_modifiers; uint8_t sc_leds; /* store for async led requests */ uint8_t sc_iface_index; uint8_t sc_iface_no; uint8_t sc_id_apple_eject; uint8_t sc_id_apple_fn; - uint8_t sc_id_ctrl_l; - uint8_t sc_id_ctrl_r; - uint8_t sc_id_shift_l; - uint8_t sc_id_shift_r; - uint8_t sc_id_alt_l; - uint8_t sc_id_alt_r; - uint8_t sc_id_win_l; - uint8_t sc_id_win_r; - uint8_t sc_id_event; + uint8_t sc_id_loc_key[UKBD_NKEYCODE]; uint8_t sc_id_numlock; uint8_t sc_id_capslock; uint8_t sc_id_scrolllock; - uint8_t sc_id_events; uint8_t sc_kbd_id; + uint8_t sc_repeat_key; uint8_t sc_buffer[UKBD_BUFFER_SIZE]; }; +#define KEY_NONE 0x00 #define KEY_ERROR 0x01 #define KEY_PRESS 0 @@ -283,21 +252,6 @@ struct ukbd_softc { #endif -struct ukbd_mods { - uint32_t mask, key; -}; - -static const struct ukbd_mods ukbd_mods[UKBD_NMOD] = { - {MOD_CONTROL_L, 0xe0}, - {MOD_CONTROL_R, 0xe4}, - {MOD_SHIFT_L, 0xe1}, - {MOD_SHIFT_R, 0xe5}, - {MOD_ALT_L, 0xe2}, - {MOD_ALT_R, 0xe6}, - {MOD_WIN_L, 0xe3}, - {MOD_WIN_R, 0xe7}, -}; - #define NN 0 /* no translation */ /* * Translate USB keycodes to AT keyboard scancodes. @@ -371,8 +325,8 @@ static void ukbd_timeout(void *); static void ukbd_set_leds(struct ukbd_softc *, uint8_t); static int ukbd_set_typematic(keyboard_t *, int); #ifdef UKBD_EMULATE_ATSCANCODE -static uint32_t ukbd_atkeycode(int, int); -static int ukbd_key2scan(struct ukbd_softc *, int, int, int); +static uint32_t ukbd_atkeycode(int, const uint64_t *); +static int ukbd_key2scan(struct ukbd_softc *, int, const uint64_t *, int); #endif static uint32_t ukbd_read_char(keyboard_t *, int); static void ukbd_clear_state(keyboard_t *); @@ -393,18 +347,35 @@ static const struct evdev_methods ukbd_evdev_methods = }; #endif -static uint8_t +static bool ukbd_any_key_pressed(struct ukbd_softc *sc) { - uint8_t i; - uint8_t j; + bool ret = false; + unsigned i; - for (j = i = 0; i < UKBD_NKEYCODE; i++) - j |= sc->sc_odata.keycode[i]; + for (i = 0; i != howmany(UKBD_NKEYCODE, 64); i++) + ret |= (sc->sc_odata.bitmap[i] != 0); + return (ret); +} - return (j ? 1 : 0); +static bool +ukbd_any_key_valid(struct ukbd_softc *sc) +{ + bool ret = false; + unsigned i; + + for (i = 0; i != howmany(UKBD_NKEYCODE, 64); i++) + ret |= (sc->sc_loc_key_valid[i] != 0); + return (ret); } +static bool +ukbd_is_modifier_key(uint32_t key) +{ + + return (key >= 0xe0 && key <= 0xe7); +} + static void ukbd_start_timer(struct ukbd_softc *sc) { @@ -544,99 +515,66 @@ ukbd_get_key(struct ukbd_softc *sc, uint8_t wait) static void ukbd_interrupt(struct ukbd_softc *sc) { - uint32_t n_mod; - uint32_t o_mod; - uint32_t now = sc->sc_time_ms; - int32_t dtime; - uint8_t key; - uint8_t i; - uint8_t j; + const uint32_t now = sc->sc_time_ms; + unsigned key; UKBD_CTX_LOCK_ASSERT(); - if (sc->sc_ndata.keycode[0] == KEY_ERROR) - return; + /* Check for key changes */ + for (key = 0; key != UKBD_NKEYCODE; key++) { + const uint64_t mask = 1ULL << (key % 64); + const uint64_t delta = + sc->sc_odata.bitmap[key / 64] ^ + sc->sc_ndata.bitmap[key / 64]; - n_mod = sc->sc_ndata.modifiers; - o_mod = sc->sc_odata.modifiers; - if (n_mod != o_mod) { - for (i = 0; i < UKBD_NMOD; i++) { - if ((n_mod & ukbd_mods[i].mask) != - (o_mod & ukbd_mods[i].mask)) { - ukbd_put_key(sc, ukbd_mods[i].key | - ((n_mod & ukbd_mods[i].mask) ? - KEY_PRESS : KEY_RELEASE)); - } - } - } - /* Check for released keys. */ - for (i = 0; i < UKBD_NKEYCODE; i++) { - key = sc->sc_odata.keycode[i]; - if (key == 0) { - continue; - } - for (j = 0; j < UKBD_NKEYCODE; j++) { - if (sc->sc_ndata.keycode[j] == 0) { - continue; - } - if (key == sc->sc_ndata.keycode[j]) { - goto rfound; - } - } - ukbd_put_key(sc, key | KEY_RELEASE); -rfound: ; - } + if (mask == 1 && delta == 0) { + key += 63; + continue; /* skip empty areas */ + } else if (delta & mask) { + if (sc->sc_odata.bitmap[key / 64] & mask) { + ukbd_put_key(sc, key | KEY_RELEASE); - /* Check for pressed keys. */ - for (i = 0; i < UKBD_NKEYCODE; i++) { - key = sc->sc_ndata.keycode[i]; - if (key == 0) { - continue; - } - sc->sc_ntime[i] = now + sc->sc_kbd.kb_delay1; - for (j = 0; j < UKBD_NKEYCODE; j++) { - if (sc->sc_odata.keycode[j] == 0) { - continue; - } - if (key == sc->sc_odata.keycode[j]) { + /* clear repeating key, if any */ + if (sc->sc_repeat_key == key) + sc->sc_repeat_key = 0; + } else { + ukbd_put_key(sc, key | KEY_PRESS); - /* key is still pressed */ + if (ukbd_is_modifier_key(key)) + continue; - sc->sc_ntime[i] = sc->sc_otime[j]; - dtime = (sc->sc_otime[j] - now); - - if (dtime > 0) { - /* time has not elapsed */ - goto pfound; + /* + * Check for first new key and set + * initial delay and [re]start timer: + */ + if (sc->sc_repeat_key == 0) { + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); } - sc->sc_ntime[i] = now + sc->sc_kbd.kb_delay2; - break; + + /* set repeat time for last key */ + sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; + sc->sc_repeat_key = key; } } - if (j == UKBD_NKEYCODE) { - /* New key - set initial delay and [re]start timer */ - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } - ukbd_put_key(sc, key | KEY_PRESS); - - /* - * If any other key is presently down, force its repeat to be - * well in the future (100s). This makes the last key to be - * pressed do the autorepeat. - */ - for (j = 0; j != UKBD_NKEYCODE; j++) { - if (j != i) - sc->sc_ntime[j] = now + (100 * 1000); - } -pfound: ; } + /* synchronize old data with new data */ sc->sc_odata = sc->sc_ndata; + + /* check if last key is still pressed */ + if (sc->sc_repeat_key != 0) { + const int32_t dtime = (sc->sc_repeat_time - now); - memcpy(sc->sc_otime, sc->sc_ntime, sizeof(sc->sc_otime)); + /* check if time has elapsed */ + if (dtime <= 0) { + ukbd_put_key(sc, sc->sc_repeat_key | KEY_PRESS); + sc->sc_repeat_time = now + sc->sc_kbd.kb_delay2; + } + } + /* wakeup keyboard system */ ukbd_event_keyinput(sc); } @@ -686,8 +624,9 @@ ukbd_timeout(void *arg) } } -static uint8_t -ukbd_apple_fn(uint8_t keycode) { +static uint32_t +ukbd_apple_fn(uint32_t keycode) +{ switch (keycode) { case 0x28: return 0x49; /* RETURN -> INSERT */ case 0x2a: return 0x4c; /* BACKSPACE -> DEL */ @@ -699,8 +638,9 @@ ukbd_apple_fn(uint8_t keycode) { } } -static uint8_t -ukbd_apple_swap(uint8_t keycode) { +static uint32_t +ukbd_apple_swap(uint32_t keycode) +{ switch (keycode) { case 0x35: return 0x64; case 0x64: return 0x35; @@ -713,9 +653,10 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t { struct ukbd_softc *sc = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint8_t i; - uint8_t offset; + uint32_t i; uint8_t id; + uint8_t modifiers; + int offset; int len; UKBD_LOCK_ASSERT(); @@ -755,117 +696,72 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t /* clear temporary storage */ memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); + /* clear modifiers */ + modifiers = 0; + /* scan through HID data */ if ((sc->sc_flags & UKBD_FLAG_APPLE_EJECT) && (id == sc->sc_id_apple_eject)) { if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_eject)) - sc->sc_modifiers |= MOD_EJECT; - else - sc->sc_modifiers &= ~MOD_EJECT; + modifiers |= MOD_EJECT; } if ((sc->sc_flags & UKBD_FLAG_APPLE_FN) && (id == sc->sc_id_apple_fn)) { if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_fn)) - sc->sc_modifiers |= MOD_FN; - else - sc->sc_modifiers &= ~MOD_FN; + modifiers |= MOD_FN; } - if ((sc->sc_flags & UKBD_FLAG_CTRL_L) && - (id == sc->sc_id_ctrl_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_ctrl_l)) - sc-> sc_modifiers |= MOD_CONTROL_L; - else - sc-> sc_modifiers &= ~MOD_CONTROL_L; - } - if ((sc->sc_flags & UKBD_FLAG_CTRL_R) && - (id == sc->sc_id_ctrl_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_ctrl_r)) - sc->sc_modifiers |= MOD_CONTROL_R; - else - sc->sc_modifiers &= ~MOD_CONTROL_R; - } - if ((sc->sc_flags & UKBD_FLAG_SHIFT_L) && - (id == sc->sc_id_shift_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_shift_l)) - sc->sc_modifiers |= MOD_SHIFT_L; - else - sc->sc_modifiers &= ~MOD_SHIFT_L; - } - if ((sc->sc_flags & UKBD_FLAG_SHIFT_R) && - (id == sc->sc_id_shift_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_shift_r)) - sc->sc_modifiers |= MOD_SHIFT_R; - else - sc->sc_modifiers &= ~MOD_SHIFT_R; - } - if ((sc->sc_flags & UKBD_FLAG_ALT_L) && - (id == sc->sc_id_alt_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_alt_l)) - sc->sc_modifiers |= MOD_ALT_L; - else - sc->sc_modifiers &= ~MOD_ALT_L; - } - if ((sc->sc_flags & UKBD_FLAG_ALT_R) && - (id == sc->sc_id_alt_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_alt_r)) - sc->sc_modifiers |= MOD_ALT_R; - else - sc->sc_modifiers &= ~MOD_ALT_R; - } - if ((sc->sc_flags & UKBD_FLAG_WIN_L) && - (id == sc->sc_id_win_l)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_win_l)) - sc->sc_modifiers |= MOD_WIN_L; - else - sc->sc_modifiers &= ~MOD_WIN_L; - } - if ((sc->sc_flags & UKBD_FLAG_WIN_R) && - (id == sc->sc_id_win_r)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_win_r)) - sc->sc_modifiers |= MOD_WIN_R; - else - sc->sc_modifiers &= ~MOD_WIN_R; - } - sc->sc_ndata.modifiers = sc->sc_modifiers; + for (i = 0; i != UKBD_NKEYCODE; i++) { + const uint64_t valid = sc->sc_loc_key_valid[i / 64]; + const uint64_t mask = 1ULL << (i % 64); - if ((sc->sc_flags & UKBD_FLAG_EVENTS) && - (id == sc->sc_id_events)) { - i = sc->sc_loc_events.count; - if (i > UKBD_NKEYCODE) - i = UKBD_NKEYCODE; - if (i > len) - i = len; - while (i--) { - sc->sc_ndata.keycode[i] = - hid_get_data(sc->sc_buffer + i, len - i, - &sc->sc_loc_events); - } - } + if (mask == 1 && valid == 0) { + i += 63; + continue; /* skip empty areas */ + } else if (~valid & mask) { + continue; /* location is not valid */ + } else if (id != sc->sc_id_loc_key[i]) { + continue; /* invalid HID ID */ + } else if (i == 0) { + offset = sc->sc_loc_key[0].count; + if (offset < 0 || offset > len) + offset = len; + while (offset--) { + uint32_t key = + hid_get_data(sc->sc_buffer + offset, len - offset, + &sc->sc_loc_key[i]); + if (modifiers & MOD_FN) + key = ukbd_apple_fn(key); + if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) + key = ukbd_apple_swap(key); + if (key == KEY_NONE || key == KEY_ERROR || key >= UKBD_NKEYCODE) + continue; + /* set key in bitmap */ + sc->sc_ndata.bitmap[key / 64] |= 1ULL << (key % 64); + } + } else if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_key[i])) { + uint32_t key = i; -#ifdef USB_DEBUG - DPRINTF("modifiers = 0x%04x\n", (int)sc->sc_modifiers); - for (i = 0; i < UKBD_NKEYCODE; i++) { - if (sc->sc_ndata.keycode[i]) { - DPRINTF("[%d] = 0x%02x\n", - (int)i, (int)sc->sc_ndata.keycode[i]); + if (modifiers & MOD_FN) + key = ukbd_apple_fn(key); + if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) + key = ukbd_apple_swap(key); + if (key == KEY_NONE || key == KEY_ERROR || key >= UKBD_NKEYCODE) + continue; + /* set key in bitmap */ + sc->sc_ndata.bitmap[key / 64] |= 1ULL << (key % 64); } } -#endif - if (sc->sc_modifiers & MOD_FN) { - for (i = 0; i < UKBD_NKEYCODE; i++) { - sc->sc_ndata.keycode[i] = - ukbd_apple_fn(sc->sc_ndata.keycode[i]); - } - } +#ifdef USB_DEBUG + DPRINTF("modifiers = 0x%04x\n", modifiers); + for (i = 0; i != UKBD_NKEYCODE; i++) { + const uint64_t valid = sc->sc_ndata.bitmap[i / 64]; + const uint64_t mask = 1ULL << (i % 64); - if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) { - for (i = 0; i < UKBD_NKEYCODE; i++) { - sc->sc_ndata.keycode[i] = - ukbd_apple_swap(sc->sc_ndata.keycode[i]); - } + if (valid & mask) + DPRINTF("Key 0x%02x pressed\n", i); } - +#endif ukbd_interrupt(sc); case USB_ST_SETUP: @@ -1094,10 +990,14 @@ static void ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *ptr, uint32_t len) { uint32_t flags; + uint32_t key; /* reset detected bits */ sc->sc_flags &= ~UKBD_FLAG_HID_MASK; + /* reset detected keys */ + memset(sc->sc_loc_key_valid, 0, sizeof(sc->sc_loc_key_valid)); + /* check if there is an ID byte */ sc->sc_kbd_size = hid_report_size(ptr, len, hid_input, &sc->sc_kbd_id); @@ -1120,84 +1020,34 @@ ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *p sc->sc_flags |= UKBD_FLAG_APPLE_FN; DPRINTFN(1, "Found Apple FN-key\n"); } - /* figure out some keys */ - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE0), - hid_input, 0, &sc->sc_loc_ctrl_l, &flags, - &sc->sc_id_ctrl_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_CTRL_L; - DPRINTFN(1, "Found left control\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE4), - hid_input, 0, &sc->sc_loc_ctrl_r, &flags, - &sc->sc_id_ctrl_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_CTRL_R; - DPRINTFN(1, "Found right control\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE1), - hid_input, 0, &sc->sc_loc_shift_l, &flags, - &sc->sc_id_shift_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_SHIFT_L; - DPRINTFN(1, "Found left shift\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE5), - hid_input, 0, &sc->sc_loc_shift_r, &flags, - &sc->sc_id_shift_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_SHIFT_R; - DPRINTFN(1, "Found right shift\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE2), - hid_input, 0, &sc->sc_loc_alt_l, &flags, - &sc->sc_id_alt_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_ALT_L; - DPRINTFN(1, "Found left alt\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE6), - hid_input, 0, &sc->sc_loc_alt_r, &flags, - &sc->sc_id_alt_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_ALT_R; - DPRINTFN(1, "Found right alt\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE3), - hid_input, 0, &sc->sc_loc_win_l, &flags, - &sc->sc_id_win_l)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_WIN_L; - DPRINTFN(1, "Found left GUI\n"); - } - if (hid_locate(ptr, len, - HID_USAGE2(HUP_KEYBOARD, 0xE7), - hid_input, 0, &sc->sc_loc_win_r, &flags, - &sc->sc_id_win_r)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_WIN_R; - DPRINTFN(1, "Found right GUI\n"); - } + /* figure out event buffer */ if (hid_locate(ptr, len, HID_USAGE2(HUP_KEYBOARD, 0x00), - hid_input, 0, &sc->sc_loc_events, &flags, - &sc->sc_id_events)) { + hid_input, 0, &sc->sc_loc_key[0], &flags, + &sc->sc_id_loc_key[0])) { if (flags & HIO_VARIABLE) { DPRINTFN(1, "Ignoring keyboard event control\n"); } else { - sc->sc_flags |= UKBD_FLAG_EVENTS; + sc->sc_loc_key_valid[0] |= 1; DPRINTFN(1, "Found keyboard event array\n"); } } + /* figure out the keys */ + for (key = 1; key != UKBD_NKEYCODE; key++) { + if (hid_locate(ptr, len, + HID_USAGE2(HUP_KEYBOARD, key), + hid_input, 0, &sc->sc_loc_key[key], &flags, + &sc->sc_id_loc_key[key])) { + if (flags & HIO_VARIABLE) { + sc->sc_loc_key_valid[key / 64] |= + 1ULL << (key % 64); + DPRINTFN(1, "Found key 0x%02x\n", key); + } + } + } + /* figure out leds on keyboard */ sc->sc_led_size = hid_report_size(ptr, len, hid_output, NULL); @@ -1323,7 +1173,7 @@ ukbd_attach(device_t dev) /* check if we should use the boot protocol */ if (usb_test_quirk(uaa, UQ_KBD_BOOTPROTO) || - (err != 0) || (!(sc->sc_flags & UKBD_FLAG_EVENTS))) { + (err != 0) || ukbd_any_key_valid(sc) == false) { DPRINTF("Forcing boot protocol\n"); @@ -1666,11 +1516,11 @@ ukbd_read(keyboard_t *kbd, int wait) ++(kbd->kb_count); #ifdef UKBD_EMULATE_ATSCANCODE - keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.modifiers); + keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.bitmap); if (keycode == NN) { return -1; } - return (ukbd_key2scan(sc, keycode, sc->sc_ndata.modifiers, + return (ukbd_key2scan(sc, keycode, sc->sc_ndata.bitmap, (usbcode & KEY_RELEASE))); #else /* !UKBD_EMULATE_ATSCANCODE */ return (usbcode); @@ -1737,13 +1587,13 @@ next_code: #ifdef UKBD_EMULATE_ATSCANCODE /* USB key index -> key code -> AT scan code */ - keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.modifiers); + keycode = ukbd_atkeycode(usbcode, sc->sc_ndata.bitmap); if (keycode == NN) { return (NOKEY); } /* return an AT scan code for the K_RAW mode */ if (sc->sc_mode == K_RAW) { - return (ukbd_key2scan(sc, keycode, sc->sc_ndata.modifiers, + return (ukbd_key2scan(sc, keycode, sc->sc_ndata.bitmap, (usbcode & KEY_RELEASE))); } #else /* !UKBD_EMULATE_ATSCANCODE */ @@ -2067,8 +1917,8 @@ ukbd_clear_state(keyboard_t *kbd) #endif memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); memset(&sc->sc_odata, 0, sizeof(sc->sc_odata)); - memset(&sc->sc_ntime, 0, sizeof(sc->sc_ntime)); - memset(&sc->sc_otime, 0, sizeof(sc->sc_otime)); + sc->sc_repeat_time = 0; + sc->sc_repeat_key = 0; } /* save the internal state, not used */ @@ -2155,11 +2005,12 @@ ukbd_set_typematic(keyboard_t *kbd, int code) #ifdef UKBD_EMULATE_ATSCANCODE static uint32_t -ukbd_atkeycode(int usbcode, int shift) +ukbd_atkeycode(int usbcode, const uint64_t *bitmap) { uint32_t keycode; keycode = ukbd_trtab[KEY_INDEX(usbcode)]; + /* * Translate Alt-PrintScreen to SysRq. * @@ -2174,13 +2025,14 @@ ukbd_atkeycode(int usbcode, int shift) * is routine. */ if ((keycode == 0x5c || keycode == 0x7e) && - shift & (MOD_ALT_L | MOD_ALT_R)) + (UKBD_KEY_PRESSED(bitmap, 0xe2 /* ALT-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe6 /* ALT-R */))) return (0x54); return (keycode); } static int -ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up) +ukbd_key2scan(struct ukbd_softc *sc, int code, const uint64_t *bitmap, int up) { static const int scan[] = { /* 89 */ @@ -2240,12 +2092,17 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shi code = scan[code - 89]; } /* PrintScreen */ - if (code == 0x137 && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R | - MOD_SHIFT_L | MOD_SHIFT_R)))) { + if (code == 0x137 && (!( + UKBD_KEY_PRESSED(bitmap, 0xe0 /* CTRL-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe4 /* CTRL-R */) || + UKBD_KEY_PRESSED(bitmap, 0xe1 /* SHIFT-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe5 /* SHIFT-R */)))) { code |= SCAN_PREFIX_SHIFT; } /* Pause/Break */ - if ((code == 0x146) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))) { + if ((code == 0x146) && (!( + UKBD_KEY_PRESSED(bitmap, 0xe0 /* CTRL-L */) || + UKBD_KEY_PRESSED(bitmap, 0xe4 /* CTRL-R */)))) { code = (0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL); } code |= (up ? SCAN_RELEASE : SCAN_PRESS); From owner-svn-src-stable-11@freebsd.org Fri Feb 21 21:54:04 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE2F9244AA8; Fri, 21 Feb 2020 21:54:04 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48PQG43HFnz4bld; Fri, 21 Feb 2020 21:54:04 +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 6455E1953F; Fri, 21 Feb 2020 21:54:04 +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 01LLs4Aa003174; Fri, 21 Feb 2020 21:54:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01LLs4p0003173; Fri, 21 Feb 2020 21:54:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002212154.01LLs4p0003173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 21 Feb 2020 21:54:04 +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: r358229 - in stable: 11/sys/powerpc/conf/dpaa 12/sys/powerpc/conf/dpaa X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/powerpc/conf/dpaa 12/sys/powerpc/conf/dpaa X-SVN-Commit-Revision: 358229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 21:54:05 -0000 Author: dim Date: Fri Feb 21 21:54:03 2020 New Revision: 358229 URL: https://svnweb.freebsd.org/changeset/base/358229 Log: MFC r358045: Merge r358034 from the clang1000-import branch: Disable new clang 10.0.0 warnings about misleading indentation in sys/contrib/ncsw/Peripherals/FM/fman_ncsw.c. This is horribly formatted contributed code, and fixing it is not worth the effort. Modified: stable/11/sys/powerpc/conf/dpaa/files.dpaa Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/powerpc/conf/dpaa/files.dpaa Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/powerpc/conf/dpaa/files.dpaa ============================================================================== --- stable/11/sys/powerpc/conf/dpaa/files.dpaa Fri Feb 21 20:57:32 2020 (r358228) +++ stable/11/sys/powerpc/conf/dpaa/files.dpaa Fri Feb 21 21:54:03 2020 (r358229) @@ -56,7 +56,7 @@ contrib/ncsw/Peripherals/FM/fm_muram.c optional dpaa contrib/ncsw/Peripherals/FM/fm_guest.c optional dpaa \ no-depend compile-with "${DPAA_COMPILE_CMD}" contrib/ncsw/Peripherals/FM/fm.c optional dpaa \ - no-depend compile-with "${DPAA_COMPILE_CMD}" + no-depend compile-with "${DPAA_COMPILE_CMD} ${NO_WMISLEADING_INDENTATION}" contrib/ncsw/Peripherals/QM/qm.c optional dpaa \ no-depend compile-with "${DPAA_COMPILE_CMD}" contrib/ncsw/Peripherals/QM/qm_portal_fqr.c optional dpaa \ From owner-svn-src-stable-11@freebsd.org Fri Feb 21 21:57:30 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAE98244E4C; Fri, 21 Feb 2020 21:57:29 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48PQL06LNZz4h3l; Fri, 21 Feb 2020 21:57:28 +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 BC70619546; Fri, 21 Feb 2020 21:57:28 +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 01LLvS8V003446; Fri, 21 Feb 2020 21:57:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01LLvQVu003436; Fri, 21 Feb 2020 21:57:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002212157.01LLvQVu003436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 21 Feb 2020 21:57:26 +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: r358230 - in stable: 11/lib/libc/quad 12/lib/libc/quad X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/libc/quad 12/lib/libc/quad X-SVN-Commit-Revision: 358230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 21:57:30 -0000 Author: dim Date: Fri Feb 21 21:57:24 2020 New Revision: 358230 URL: https://svnweb.freebsd.org/changeset/base/358230 Log: MFC r358046: Merge r358042 from the clang1000-import branch: Add casts and L suffixes to libc quad support, to work around various -Werror warnings from clang 10.0.0, such as: lib/libc/quad/fixdfdi.c:57:12: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] if (x >= QUAD_MAX) ~~ ^~~~~~~~ /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/limits.h:89:19: note: expanded from macro 'QUAD_MAX' #define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */ ^~~~~~~~~~ /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:91:20: note: expanded from macro '__QUAD_MAX' #define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ ^~~~~~~~~~~ /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:75:21: note: expanded from macro '__LLONG_MAX' #define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ ^~~~~~~~~~~~~~~~~~~~ and many instances of: lib/libc/quad/fixunsdfdi.c:73:17: error: shift count >= width of type [-Werror,-Wshift-count-overflow] toppart = (x - ONE_HALF) / ONE; ^~~~~~~~ lib/libc/quad/fixunsdfdi.c:45:19: note: expanded from macro 'ONE_HALF' #define ONE_HALF (ONE_FOURTH * 2.0) ^~~~~~~~~~ lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH' #define ONE_FOURTH (1 << (LONG_BITS - 2)) ^ ~~~~~~~~~~~~~~~ lib/libc/quad/fixunsdfdi.c:73:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] toppart = (x - ONE_HALF) / ONE; ^~~ lib/libc/quad/fixunsdfdi.c:46:15: note: expanded from macro 'ONE' #define ONE (ONE_FOURTH * 4.0) ^~~~~~~~~~ lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH' #define ONE_FOURTH (1 << (LONG_BITS - 2)) ^ ~~~~~~~~~~~~~~~ Modified: stable/11/lib/libc/quad/fixdfdi.c stable/11/lib/libc/quad/fixsfdi.c stable/11/lib/libc/quad/fixunsdfdi.c stable/11/lib/libc/quad/fixunssfdi.c stable/11/lib/libc/quad/floatdidf.c stable/11/lib/libc/quad/floatdisf.c stable/11/lib/libc/quad/floatunsdidf.c stable/11/lib/libc/quad/qdivrem.c stable/11/lib/libc/quad/quad.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libc/quad/fixdfdi.c stable/12/lib/libc/quad/fixsfdi.c stable/12/lib/libc/quad/fixunsdfdi.c stable/12/lib/libc/quad/fixunssfdi.c stable/12/lib/libc/quad/floatdidf.c stable/12/lib/libc/quad/floatdisf.c stable/12/lib/libc/quad/floatunsdidf.c stable/12/lib/libc/quad/qdivrem.c stable/12/lib/libc/quad/quad.h Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libc/quad/fixdfdi.c ============================================================================== --- stable/11/lib/libc/quad/fixdfdi.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/fixdfdi.c Fri Feb 21 21:57:24 2020 (r358230) @@ -48,12 +48,12 @@ __fixdfdi(x) double x; { if (x < 0) - if (x <= QUAD_MIN) + if (x <= (double)QUAD_MIN) return (QUAD_MIN); else return ((quad_t)-(u_quad_t)-x); else - if (x >= QUAD_MAX) + if (x >= (double)QUAD_MAX) return (QUAD_MAX); else return ((quad_t)(u_quad_t)x); Modified: stable/11/lib/libc/quad/fixsfdi.c ============================================================================== --- stable/11/lib/libc/quad/fixsfdi.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/fixsfdi.c Fri Feb 21 21:57:24 2020 (r358230) @@ -49,12 +49,12 @@ long long __fixsfdi(float x) { if (x < 0) - if (x <= QUAD_MIN) + if (x <= (float)QUAD_MIN) return (QUAD_MIN); else return ((quad_t)-(u_quad_t)-x); else - if (x >= QUAD_MAX) + if (x >= (float)QUAD_MAX) return (QUAD_MAX); else return ((quad_t)(u_quad_t)x); Modified: stable/11/lib/libc/quad/fixunsdfdi.c ============================================================================== --- stable/11/lib/libc/quad/fixunsdfdi.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/fixunsdfdi.c Fri Feb 21 21:57:24 2020 (r358230) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include "quad.h" -#define ONE_FOURTH (1 << (LONG_BITS - 2)) +#define ONE_FOURTH (1L << (LONG_BITS - 2)) #define ONE_HALF (ONE_FOURTH * 2.0) #define ONE (ONE_FOURTH * 4.0) @@ -83,11 +83,11 @@ __fixunsdfdi(x) x -= (double)t.uq; if (x < 0) { t.ul[H]--; - x += ULONG_MAX; + x += (double)ULONG_MAX; } - if (x > ULONG_MAX) { + if (x > (double)ULONG_MAX) { t.ul[H]++; - x -= ULONG_MAX; + x -= (double)ULONG_MAX; } t.ul[L] = (u_long)x; return (t.uq); Modified: stable/11/lib/libc/quad/fixunssfdi.c ============================================================================== --- stable/11/lib/libc/quad/fixunssfdi.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/fixunssfdi.c Fri Feb 21 21:57:24 2020 (r358230) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include "quad.h" -#define ONE_FOURTH (1 << (LONG_BITS - 2)) +#define ONE_FOURTH (1L << (LONG_BITS - 2)) #define ONE_HALF (ONE_FOURTH * 2.0) #define ONE (ONE_FOURTH * 4.0) @@ -87,11 +87,11 @@ __fixunssfdi(float f) x -= (double)t.uq; if (x < 0) { t.ul[H]--; - x += ULONG_MAX; + x += (double)ULONG_MAX; } - if (x > ULONG_MAX) { + if (x > (double)ULONG_MAX) { t.ul[H]++; - x -= ULONG_MAX; + x -= (double)ULONG_MAX; } t.ul[L] = (u_long)x; return (t.uq); Modified: stable/11/lib/libc/quad/floatdidf.c ============================================================================== --- stable/11/lib/libc/quad/floatdidf.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/floatdidf.c Fri Feb 21 21:57:24 2020 (r358230) @@ -65,7 +65,7 @@ __floatdidf(x) * code and does not know how to get at an exponent. Machine- * specific code may be able to do this more efficiently. */ - d = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0); + d = (double)u.ul[H] * ((1L << (LONG_BITS - 2)) * 4.0); d += u.ul[L]; return (neg ? -d : d); Modified: stable/11/lib/libc/quad/floatdisf.c ============================================================================== --- stable/11/lib/libc/quad/floatdisf.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/floatdisf.c Fri Feb 21 21:57:24 2020 (r358230) @@ -67,7 +67,7 @@ __floatdisf(x) * * Using double here may be excessive paranoia. */ - f = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0); + f = (double)u.ul[H] * ((1L << (LONG_BITS - 2)) * 4.0); f += u.ul[L]; return (neg ? -f : f); Modified: stable/11/lib/libc/quad/floatunsdidf.c ============================================================================== --- stable/11/lib/libc/quad/floatunsdidf.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/floatunsdidf.c Fri Feb 21 21:57:24 2020 (r358230) @@ -51,7 +51,7 @@ __floatunsdidf(x) union uu u; u.uq = x; - d = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0); + d = (double)u.ul[H] * ((1L << (LONG_BITS - 2)) * 4.0); d += u.ul[L]; return (d); } Modified: stable/11/lib/libc/quad/qdivrem.c ============================================================================== --- stable/11/lib/libc/quad/qdivrem.c Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/qdivrem.c Fri Feb 21 21:57:24 2020 (r358230) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "quad.h" -#define B (1 << HALF_BITS) /* digit base */ +#define B (1L << HALF_BITS) /* digit base */ /* Combine two `digits' to make a single two-digit number. */ #define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b)) Modified: stable/11/lib/libc/quad/quad.h ============================================================================== --- stable/11/lib/libc/quad/quad.h Fri Feb 21 21:54:03 2020 (r358229) +++ stable/11/lib/libc/quad/quad.h Fri Feb 21 21:57:24 2020 (r358230) @@ -89,7 +89,7 @@ union uu { * (sizeof(long)*CHAR_BIT/2). */ #define HHALF(x) ((x) >> HALF_BITS) -#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1)) +#define LHALF(x) ((x) & ((1L << HALF_BITS) - 1)) #define LHUP(x) ((x) << HALF_BITS) int __cmpdi2(quad_t a, quad_t b); From owner-svn-src-stable-11@freebsd.org Sat Feb 22 11:04:25 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 425332384E3; Sat, 22 Feb 2020 11:04:25 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Plp06t2Yz4PkX; Sat, 22 Feb 2020 11:04:24 +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 A14A12282A; Sat, 22 Feb 2020 11:04:24 +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 01MB4OhM077694; Sat, 22 Feb 2020 11:04:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01MB4OU9077693; Sat, 22 Feb 2020 11:04:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002221104.01MB4OU9077693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 22 Feb 2020 11:04: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: r358243 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 358243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 11:04:25 -0000 Author: kib Date: Sat Feb 22 11:04:24 2020 New Revision: 358243 URL: https://svnweb.freebsd.org/changeset/base/358243 Log: MFC r357982: Use designated initializers for seminfo. Modified: stable/11/sys/kern/sysv_sem.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sysv_sem.c ============================================================================== --- stable/11/sys/kern/sysv_sem.c Sat Feb 22 10:55:49 2020 (r358242) +++ stable/11/sys/kern/sysv_sem.c Sat Feb 22 11:04:24 2020 (r358243) @@ -190,15 +190,15 @@ struct sem_undo { * semaphore info struct */ struct seminfo seminfo = { - SEMMNI, /* # of semaphore identifiers */ - SEMMNS, /* # of semaphores in system */ - SEMMNU, /* # of undo structures in system */ - SEMMSL, /* max # of semaphores per id */ - SEMOPM, /* max # of operations per semop call */ - SEMUME, /* max # of undo entries per process */ - SEMUSZ, /* size in bytes of undo structure */ - SEMVMX, /* semaphore maximum value */ - SEMAEM /* adjust on exit max value */ + .semmni = SEMMNI, /* # of semaphore identifiers */ + .semmns = SEMMNS, /* # of semaphores in system */ + .semmnu = SEMMNU, /* # of undo structures in system */ + .semmsl = SEMMSL, /* max # of semaphores per id */ + .semopm = SEMOPM, /* max # of operations per semop call */ + .semume = SEMUME, /* max # of undo entries per process */ + .semusz = SEMUSZ, /* size in bytes of undo structure */ + .semvmx = SEMVMX, /* semaphore maximum value */ + .semaem = SEMAEM, /* adjust on exit max value */ }; SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0, From owner-svn-src-stable-11@freebsd.org Sat Feb 22 11:05:28 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 229CA2385A5; Sat, 22 Feb 2020 11:05:28 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48PlqC6WzNz4QFG; Sat, 22 Feb 2020 11:05:27 +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 DACA32282C; Sat, 22 Feb 2020 11:05:27 +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 01MB5RF5077809; Sat, 22 Feb 2020 11:05:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01MB5Rp3077808; Sat, 22 Feb 2020 11:05:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002221105.01MB5Rp3077808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 22 Feb 2020 11:05:27 +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: r358244 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 358244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 11:05:28 -0000 Author: kib Date: Sat Feb 22 11:05:27 2020 New Revision: 358244 URL: https://svnweb.freebsd.org/changeset/base/358244 Log: MFC r357983: sem_remove(): add some asserts. Modified: stable/11/sys/kern/sysv_sem.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sysv_sem.c ============================================================================== --- stable/11/sys/kern/sysv_sem.c Sat Feb 22 11:04:24 2020 (r358243) +++ stable/11/sys/kern/sysv_sem.c Sat Feb 22 11:05:27 2020 (r358244) @@ -550,8 +550,14 @@ sem_remove(int semidx, struct ucred *cred) int i; KASSERT(semidx >= 0 && semidx < seminfo.semmni, - ("semidx out of bounds")); + ("semidx out of bounds")); + mtx_assert(&sem_mtx, MA_OWNED); semakptr = &sema[semidx]; + KASSERT(semakptr->u.__sem_base - sem + semakptr->u.sem_nsems <= semtot, + ("sem_remove: sema %d corrupted sem pointer %p %p %d %d", + semidx, semakptr->u.__sem_base, sem, semakptr->u.sem_nsems, + semtot)); + semakptr->u.sem_perm.cuid = cred ? cred->cr_uid : 0; semakptr->u.sem_perm.uid = cred ? cred->cr_uid : 0; semakptr->u.sem_perm.mode = 0; From owner-svn-src-stable-11@freebsd.org Sat Feb 22 11:08:02 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE88B238706; Sat, 22 Feb 2020 11:08:02 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48PltB14DSz4VH0; Sat, 22 Feb 2020 11:08:02 +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 183EF22831; Sat, 22 Feb 2020 11:08:02 +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 01MB817B077982; Sat, 22 Feb 2020 11:08:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01MB81cs077981; Sat, 22 Feb 2020 11:08:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002221108.01MB81cs077981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 22 Feb 2020 11:08:01 +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: r358245 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 358245 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 11:08:02 -0000 Author: kib Date: Sat Feb 22 11:08:01 2020 New Revision: 358245 URL: https://svnweb.freebsd.org/changeset/base/358245 Log: MFC r357984: sem_remove(): fix the loop that compacts sem array on semaphores removal. Modified: stable/11/sys/kern/sysv_sem.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sysv_sem.c ============================================================================== --- stable/11/sys/kern/sysv_sem.c Sat Feb 22 11:05:27 2020 (r358244) +++ stable/11/sys/kern/sysv_sem.c Sat Feb 22 11:08:01 2020 (r358245) @@ -576,8 +576,9 @@ sem_remove(int semidx, struct ucred *cred) sema[i].u.sem_base > semakptr->u.sem_base) mtx_lock_flags(&sema_mtx[i], LOP_DUPOK); } - for (i = semakptr->u.sem_base - sem; i < semtot; i++) - sem[i] = sem[i + semakptr->u.sem_nsems]; + for (i = semakptr->u.sem_base - sem + semakptr->u.sem_nsems; + i < semtot; i++) + sem[i - semakptr->u.sem_nsems] = sem[i]; for (i = 0; i < seminfo.semmni; i++) { if ((sema[i].u.sem_perm.mode & SEM_ALLOC) && sema[i].u.sem_base > semakptr->u.sem_base) { From owner-svn-src-stable-11@freebsd.org Sat Feb 22 12:10:43 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85A3E23B3CD; Sat, 22 Feb 2020 12:10:43 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48PnGV1DPGz4PHH; Sat, 22 Feb 2020 12:10:42 +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 EA98B23355; Sat, 22 Feb 2020 12:10:41 +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 01MCAfFq014761; Sat, 22 Feb 2020 12:10:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01MCAfJt014760; Sat, 22 Feb 2020 12:10:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202002221210.01MCAfJt014760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 22 Feb 2020 12:10:41 +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: r358246 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 358246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 12:10:43 -0000 Author: kib Date: Sat Feb 22 12:10:41 2020 New Revision: 358246 URL: https://svnweb.freebsd.org/changeset/base/358246 Log: Fix build with INVARIANTS turned on. This is a direct commit to stable/11. Modified: stable/11/sys/kern/sysv_sem.c Modified: stable/11/sys/kern/sysv_sem.c ============================================================================== --- stable/11/sys/kern/sysv_sem.c Sat Feb 22 11:08:01 2020 (r358245) +++ stable/11/sys/kern/sysv_sem.c Sat Feb 22 12:10:41 2020 (r358246) @@ -553,9 +553,9 @@ sem_remove(int semidx, struct ucred *cred) ("semidx out of bounds")); mtx_assert(&sem_mtx, MA_OWNED); semakptr = &sema[semidx]; - KASSERT(semakptr->u.__sem_base - sem + semakptr->u.sem_nsems <= semtot, + KASSERT(semakptr->u.sem_base - sem + semakptr->u.sem_nsems <= semtot, ("sem_remove: sema %d corrupted sem pointer %p %p %d %d", - semidx, semakptr->u.__sem_base, sem, semakptr->u.sem_nsems, + semidx, semakptr->u.sem_base, sem, semakptr->u.sem_nsems, semtot)); semakptr->u.sem_perm.cuid = cred ? cred->cr_uid : 0; From owner-svn-src-stable-11@freebsd.org Sat Feb 22 21:44:01 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77A3824D625; Sat, 22 Feb 2020 21:44:01 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q20055R9z4HP6; Sat, 22 Feb 2020 21:44:00 +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 764761FA0; Sat, 22 Feb 2020 21:44:00 +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 01MLi055072854; Sat, 22 Feb 2020 21:44:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01MLi0k6072853; Sat, 22 Feb 2020 21:44:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002222144.01MLi0k6072853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 22 Feb 2020 21:44:00 +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: r358253 - in stable: 11/usr.bin/kdump 12/usr.bin/kdump X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.bin/kdump 12/usr.bin/kdump X-SVN-Commit-Revision: 358253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Feb 2020 21:44:01 -0000 Author: kevans Date: Sat Feb 22 21:44:00 2020 New Revision: 358253 URL: https://svnweb.freebsd.org/changeset/base/358253 Log: MFC r358109: kdump: decode SHM_ANON as first arg to legacy shm_open(2) The first argument to shm_open(2) as well as shm_open2(2) may be a path or SHM_ANON. Decode SHM_ANON, at least- paths will show up as namei results in kdump output, which may be sufficient; in those cases, we'll have printed an address. Modified: stable/11/usr.bin/kdump/kdump.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/kdump/kdump.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/kdump/kdump.c ============================================================================== --- stable/11/usr.bin/kdump/kdump.c Sat Feb 22 20:50:30 2020 (r358252) +++ stable/11/usr.bin/kdump/kdump.c Sat Feb 22 21:44:00 2020 (r358253) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1311,7 +1312,12 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags) narg--; break; case SYS_shm_open: - print_number(ip, narg, c); + if (ip[0] == (uintptr_t)SHM_ANON) { + printf("(SHM_ANON"); + ip++; + } else { + print_number(ip, narg, c); + } putchar(','); print_mask_arg(sysdecode_open_flags, ip[0]); putchar(',');