From owner-svn-src-head@freebsd.org Sun Sep 8 09:47:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97B25EE654; Sun, 8 Sep 2019 09:47:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46R60B3TCVz3D9Q; Sun, 8 Sep 2019 09:47:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 410171C16E; Sun, 8 Sep 2019 09:47:22 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x889lMl2048856; Sun, 8 Sep 2019 09:47:22 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x889lLRC048852; Sun, 8 Sep 2019 09:47:21 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201909080947.x889lLRC048852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 8 Sep 2019 09:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352028 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 352028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 09:47:22 -0000 Author: gonzo Date: Sun Sep 8 09:47:21 2019 New Revision: 352028 URL: https://svnweb.freebsd.org/changeset/base/352028 Log: [rpi] Inherit framebuffer BPP value from the VideoCore firmware Instead of using hardcoded bpp of 24, obtain current/configured value from VideoCore. This solves certain problems with Xorg/Qt apps that require bpp of 32 to work properly. The mode can be forced by setting framebuffer_depth value in config.txt PR: 235363 Submitted by: Steve Peurifoy Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sun Sep 8 01:58:02 2019 (r352027) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sun Sep 8 09:47:21 2019 (r352028) @@ -85,7 +85,13 @@ bcm_fb_init(struct bcmsc_softc *sc, struct bcm2835_fb_ memset(fb, 0, sizeof(*fb)); if (bcm2835_mbox_fb_get_w_h(fb) != 0) return (ENXIO); - fb->bpp = FB_DEPTH; + if (bcm2835_mbox_fb_get_bpp(fb) != 0) + return (ENXIO); + if (fb->bpp < FB_DEPTH) { + device_printf(sc->dev, "changing fb bpp from %d to %d\n", fb->bpp, FB_DEPTH); + fb->bpp = FB_DEPTH; + } else + device_printf(sc->dev, "keeping existing fb bpp of %d\n", fb->bpp); fb->vxres = fb->xres; fb->vyres = fb->yres; Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Sep 8 01:58:02 2019 (r352027) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Sep 8 09:47:21 2019 (r352028) @@ -499,6 +499,26 @@ bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *fb) } int +bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *fb) +{ + int err; + struct msg_fb_get_bpp msg; + + memset(&msg, 0, sizeof(msg)); + msg.hdr.buf_size = sizeof(msg); + msg.hdr.code = BCM2835_MBOX_CODE_REQ; + BCM2835_MBOX_INIT_TAG(&msg.bpp, GET_DEPTH); + msg.bpp.tag_hdr.val_len = 0; + msg.end_tag = 0; + + err = bcm2835_mbox_property(&msg, sizeof(msg)); + if (err == 0) + fb->bpp = msg.bpp.body.resp.bpp; + + return (err); +} + +int bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb) { int err; Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sun Sep 8 01:58:02 2019 (r352027) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sun Sep 8 09:47:21 2019 (r352028) @@ -474,6 +474,14 @@ struct msg_fb_get_w_h { int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *); +struct msg_fb_get_bpp { + struct bcm2835_mbox_hdr hdr; + struct bcm2835_mbox_tag_depth bpp; + uint32_t end_tag; +}; + +int bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *); + struct msg_fb_setup { struct bcm2835_mbox_hdr hdr; struct bcm2835_mbox_tag_fb_w_h physical_w_h; From owner-svn-src-head@freebsd.org Sun Sep 8 19:39:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8CECDE63C; Sun, 8 Sep 2019 19:39:46 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RM7k4xzLz400k; Sun, 8 Sep 2019 19:39:46 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 895D71E42; Sun, 8 Sep 2019 19:39:46 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88JdkhX098161; Sun, 8 Sep 2019 19:39:46 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88Jdk1u098159; Sun, 8 Sep 2019 19:39:46 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201909081939.x88Jdk1u098159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 8 Sep 2019 19:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352032 - in head/stand: . i386/loader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand: . i386/loader X-SVN-Commit-Revision: 352032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 19:39:46 -0000 Author: tsoome Date: Sun Sep 8 19:39:45 2019 New Revision: 352032 URL: https://svnweb.freebsd.org/changeset/base/352032 Log: loader: --gc-sections needs sections to work with --gc-sections is not really useful unless we generate sections with -ffunction-sections -fdata-sections While there, i386/loader would win from --gc-sections too. Modified: head/stand/defs.mk head/stand/i386/loader/Makefile Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Sun Sep 8 16:24:34 2019 (r352031) +++ head/stand/defs.mk Sun Sep 8 19:39:45 2019 (r352032) @@ -65,6 +65,7 @@ CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=floaty-mc # Experience has shown that problems arise between ~520k to ~530k. CFLAGS.clang+= -Oz CFLAGS.gcc+= -Os +CFLAGS+= -ffunction-sections -fdata-sections .endif # GELI Support, with backward compat hooks (mostly) Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Sun Sep 8 16:24:34 2019 (r352031) +++ head/stand/i386/loader/Makefile Sun Sep 8 19:39:45 2019 (r352032) @@ -47,7 +47,7 @@ HELP_FILES= ${.CURDIR}/help.i386 CLEANFILES+= ${LOADER} ${LOADER}.bin CFLAGS+= -Wall -LDFLAGS+= -static -Ttext 0x0 +LDFLAGS+= -static -Ttext 0x0 -Wl,--gc-sections # i386 standalone support library LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a From owner-svn-src-head@freebsd.org Sun Sep 8 19:40:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE57EDE91D; Sun, 8 Sep 2019 19:40:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RM905xGlz40KR; Sun, 8 Sep 2019 19:40:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B087B1E61; Sun, 8 Sep 2019 19:40:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88Jeq1i098471; Sun, 8 Sep 2019 19:40:52 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88Jequu098469; Sun, 8 Sep 2019 19:40:52 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201909081940.x88Jequu098469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 8 Sep 2019 19:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352033 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 352033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 19:40:53 -0000 Author: mhorne Date: Sun Sep 8 19:40:52 2019 New Revision: 352033 URL: https://svnweb.freebsd.org/changeset/base/352033 Log: Allow for compiler versions >= 10 Both clang and gcc development branches have reached version 10. Since we only parse for a single digit in the major version number, this causes COMPILER_VERSION to be set to its default of 0.0.0, meaning version checks fail with these newer compilers. Reviewed by: emaste Approved by: markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21413 Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Sun Sep 8 19:39:45 2019 (r352032) +++ head/share/mk/bsd.compiler.mk Sun Sep 8 19:40:52 2019 (r352033) @@ -187,7 +187,7 @@ ${X_}COMPILER_TYPE:= clang . endif .endif .if !defined(${X_}COMPILER_VERSION) -${X_}COMPILER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' +${X_}COMPILER_VERSION!=echo "${_v:M[1-9]*.[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' .endif .undef _v .endif From owner-svn-src-head@freebsd.org Sun Sep 8 19:44:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AEFFDEA11; Sun, 8 Sep 2019 19:44:22 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RMF23ZTFz40k4; Sun, 8 Sep 2019 19:44:22 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E9312006; Sun, 8 Sep 2019 19:44:22 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88JiMAN004162; Sun, 8 Sep 2019 19:44:22 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88JiMFM004161; Sun, 8 Sep 2019 19:44:22 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201909081944.x88JiMFM004161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 8 Sep 2019 19:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352034 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 352034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 19:44:22 -0000 Author: mhorne Date: Sun Sep 8 19:44:21 2019 New Revision: 352034 URL: https://svnweb.freebsd.org/changeset/base/352034 Log: RISC-V: fix kernel CFLAGS with clang Use the -march and -mabi flags for both gcc and clang as they are compatible. Specify the "medium" code model separately as it goes by the name "medany" under gcc, although they are equivalent. Reviewed by: markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21436 Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Sep 8 19:40:52 2019 (r352033) +++ head/sys/conf/kern.mk Sun Sep 8 19:44:21 2019 (r352034) @@ -128,8 +128,18 @@ CFLAGS += -ffixed-x18 INLINE_LIMIT?= 8000 .endif +# +# For RISC-V we specify the soft-float ABI (lp64) to avoid the use of floating +# point registers within the kernel. We also specify the "medium" code model, +# which generates code suitable for a 2GiB addressing range located at any +# offset, allowing modules to be located anywhere in the 64-bit address space. +# Note that clang and GCC refer to this code model as "medium" and "medany" +# respectively. +# .if ${MACHINE_CPUARCH} == "riscv" -CFLAGS.gcc+= -mcmodel=medany -march=rv64imafdc -mabi=lp64 +CFLAGS+= -march=rv64imafdc -mabi=lp64 +CFLAGS.clang+= -mcmodel=medium +CFLAGS.gcc+= -mcmodel=medany INLINE_LIMIT?= 8000 .endif From owner-svn-src-head@freebsd.org Sun Sep 8 19:46:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 81BA6DEBC0; Sun, 8 Sep 2019 19:46:35 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RMHb2ghJz40xp; Sun, 8 Sep 2019 19:46:35 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AB74200B; Sun, 8 Sep 2019 19:46:35 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88JkYOg004315; Sun, 8 Sep 2019 19:46:34 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88JkYMi004314; Sun, 8 Sep 2019 19:46:34 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201909081946.x88JkYMi004314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 8 Sep 2019 19:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352035 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 352035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 19:46:35 -0000 Author: mhorne Date: Sun Sep 8 19:46:34 2019 New Revision: 352035 URL: https://svnweb.freebsd.org/changeset/base/352035 Log: Remove a duplicate KTR entry Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D21438 Modified: head/sys/riscv/riscv/intr_machdep.c Modified: head/sys/riscv/riscv/intr_machdep.c ============================================================================== --- head/sys/riscv/riscv/intr_machdep.c Sun Sep 8 19:44:21 2019 (r352034) +++ head/sys/riscv/riscv/intr_machdep.c Sun Sep 8 19:46:34 2019 (r352035) @@ -205,7 +205,7 @@ ipi_send(struct pcpu *pc, int ipi) { u_long mask; - CTR3(KTR_SMP, "%s: cpu=%d, ipi=%x", __func__, pc->pc_cpuid, ipi); + CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x", __func__, pc->pc_cpuid, ipi); atomic_set_32(&pc->pc_pending_ipis, ipi); mask = (1 << pc->pc_hart); @@ -235,7 +235,6 @@ ipi_cpu(int cpu, u_int ipi) CPU_ZERO(&cpus); CPU_SET(cpu, &cpus); - CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x\n", __func__, cpu, ipi); ipi_send(cpuid_to_pcpu[cpu], ipi); } From owner-svn-src-head@freebsd.org Sun Sep 8 19:54:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 829F2DF0CB; Sun, 8 Sep 2019 19:54:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RMSj2xgPz41bv; Sun, 8 Sep 2019 19:54:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E18B21ED; Sun, 8 Sep 2019 19:54:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88JsTpZ010238; Sun, 8 Sep 2019 19:54:29 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88JsTFe010237; Sun, 8 Sep 2019 19:54:29 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201909081954.x88JsTFe010237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 8 Sep 2019 19:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352037 - head/stand/i386/zfsloader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/i386/zfsloader X-SVN-Commit-Revision: 352037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 19:54:29 -0000 Author: tsoome Date: Sun Sep 8 19:54:28 2019 New Revision: 352037 URL: https://svnweb.freebsd.org/changeset/base/352037 Log: remove leftover zfsloader directory It really is empty. Deleted: head/stand/i386/zfsloader/ From owner-svn-src-head@freebsd.org Sun Sep 8 19:53:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FEE8DF05F; Sun, 8 Sep 2019 19:53:12 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RMRD0vsnz41Tk; Sun, 8 Sep 2019 19:53:12 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02D3021E8; Sun, 8 Sep 2019 19:53:12 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88JrBgt010140; Sun, 8 Sep 2019 19:53:11 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88JrBlw010139; Sun, 8 Sep 2019 19:53:11 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201909081953.x88JrBlw010139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 8 Sep 2019 19:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352036 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 352036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 19:53:12 -0000 Author: mhorne Date: Sun Sep 8 19:53:11 2019 New Revision: 352036 URL: https://svnweb.freebsd.org/changeset/base/352036 Log: Fix compilation of locore.S with clang The branch from _start to mpentry has to cross a large section of data; an offset larger than can be specified with a 12-bit branch immediate. Fix this by converting the branch to an unconditional jump. The gcc assembler does this conversion silently but it is not done automatically by clang. Reported by: Jeremy Bennett Reviewed by: markj Approved by: markj (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21437 Modified: head/sys/riscv/riscv/locore.S Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Sun Sep 8 19:46:34 2019 (r352035) +++ head/sys/riscv/riscv/locore.S Sun Sep 8 19:53:11 2019 (r352036) @@ -69,12 +69,18 @@ _start: la t0, hart_lottery li t1, 1 amoadd.w t0, t1, 0(t0) - bnez t0, mpentry /* - * Page tables + * We must jump to mpentry in the non-BSP case because the offset is + * too large to fit in a 12-bit branch immediate. */ + beqz t0, 1f + j mpentry + /* + * Page tables + */ +1: /* Add L1 entry for kernel */ la s1, pagetable_l1 la s2, pagetable_l2 /* Link to next level PN */ From owner-svn-src-head@freebsd.org Sun Sep 8 20:02:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE4D9E01E4; Sun, 8 Sep 2019 20:02:42 +0000 (UTC) (envelope-from bcran@freebsd.org) Received: from muon.bsdio.com (muon.bluestop.org [65.103.231.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46RMfB2v0Kz42Ps; Sun, 8 Sep 2019 20:02:42 +0000 (UTC) (envelope-from bcran@freebsd.org) Received: from muon.bsdio.com (localhost [127.0.0.1]) by muon.bsdio.com (Postfix) with ESMTP id C44F0FD5C7; Sun, 8 Sep 2019 14:02:41 -0600 (MDT) Received: from muon.bsdio.com ([127.0.0.1]) by muon.bsdio.com (muon.bsdio.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yP9C7CySZLAu; Sun, 8 Sep 2019 14:02:40 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [10.0.10.120]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bsdio.com (Postfix) with ESMTPSA; Sun, 8 Sep 2019 14:02:40 -0600 (MDT) From: Rebecca Cran Subject: Re: svn commit: r351831 - in head: . stand/efi/boot1 stand/efi/gptboot tools/build/mk To: Andrew Turner Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201909042055.x84KtnH6078288@repo.freebsd.org> <8273514D-62F3-4ECB-99D0-78A7633A276A@fubar.geek.nz> Autocrypt: addr=bcran@freebsd.org; keydata= mQINBFrUMZ4BEADI1yUEGeZeXeTCPay1ZpTBdDEpGPAw1dq2VCSTc1VhsnrEBa1iZxAfaeSv Uu5Ti7jlhQ/3sQMl0bJMKGB/RtmIW7k8h2w476oZmG8gChk8su5ZEx/pV1gdqInyFmmJKTYc gabJz8pL+m82w07qPv+oalepZ4dbj+HF++RAK/iEju+q9UHlsjj8e3mMNsvtrOz1K6bnpveO jZ+ms/2H3Hs5a4k8y6buwe2RvwhJQaXa13cR3LhzL+nwj4B9PHZZEa2WpEyYpw/bI0V9YSQN QgC1CYRzDyakZge6BCM6wHOgZSUzRPufGilrNKUwIVbRoIBR9/85+0wR+PlFUOUOfOc6ox7T dWcIx6PuPhek48rh4uwmmwsPtPiH4Z3T5p+GmWQ9NLFZKA1YnEdaSkWtYZsDxwVZZeYG2plt MfhXP0Hj4rf9Y3eoUenCaGioxAbUOBCtXdTGNAhNjz1g5NGDBVyhjKkzwJQvt9UrYTseERit 5dX2CMTy8hYLvSXd/Ivy+HylUS5IslfZxW5z9LgWX7Z97kILgkH3N0ewtLkygkG+Y+x7uaAV dFqp9ASOyzaiwKbJdeOI+WxRSh+AqeCR0S+bpkcLudLmbjrPmaFwjKycy1H85Z5R2J3YHyXY oT6OYjD8vLbUU2GWp6Onkcy1Pu8EMbRuzKil6HnpYg3BexbPFwARAQABtCBSZWJlY2NhIENy YW4gPGJjcmFuQGZyZWVic2Qub3JnPokCVAQTAQgAPhYhBB+5fZtkTdO940Yr4g0CK1MRvhAg BQJa2B8pAhsjBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEA0CK1MRvhAgAe0P /R65umdPBVFCYKPZ91HMqlZtn0EWOGwycWEK/feWI+jaYOa+8+VVxFau4gwnBmgCdf5XOAJW QugUlPte9T+dP9QXmgm8z3KMLCj2PATYlmqmQfvIleJPf8w7BFBw/kkd6ZxoEQXaEyZwWuJc vY58uFYizZ8s1gMjD7uV3eg2UuGYd4loBZ3MSanWrhE6mmxAjzcYYb0KTsaTH9ON4uctcTYG 4FN0KzRx5d4nAhnS/yaL+3OI23vUDt+XnOCx8tIOczScOEN5NFChgyvTxzwi7hTVNB7uUCha mN6vcjtrrzi03zHXooldE4gRJ5G+SzuH9yHKrrwYXUeKi8sG8uXVoWwzsLbCxHRe7T9Ow7Im 92Aep3DEIE9whG6Fg3hRQ4/d/9OVCGrV3XwRMEstCvamJQc69ZsULo1ssGmPvcLn8fNaLNeP ICCLQj4JLcYvKKfLIQ/Cm0Orsy8rJGhwF4W1mBUbTdR6pk2azEkrhE7KZDylgikpNNqshKV3 1nD/5SNrTDl0P8rTnu0OKT0IbozIsaz9FD2xMPHPUMPnVSTB96+PhgoBIQlHcys19gftotuN 1tlLs4Ny93xWLSjKWoW5l9E9LbIh+M8gD3A7JyyV9DRZkHdbOt3pGjpaozchDPCpRkcsFXp4 9zSbXtxnbAWfZwoSYQTvznmXpzHMzoLMWf/guQINBFrUMZ4BEADkc4mvMcMcDF1tdNxNQuIB E1F243oZamG3LACCKfc1Yur3CPzHwIk5LXCUmbq23iE5bowxMWw3mlVT0p5xM0WnUidIBwCK u4kRyy/fY4NyWWBuwy9srpTdmUcKRBRNB8zEZE8xIlidD1ijjgqLBfeM7n9ylawAxHLxwU96 sdpdHFzb7Z0yKY2e/bzDaHiG0fUvcCmkgLf+uwKKZid1j8zR5PzKpgPqfy/PF01eKyGV3MNu 8Y90xMoiEMWfCI2IB1m+hTuzZoboFvGV54SiMuvfWK/VMQjhsL6K2ddOqwVuy2nIMI4G3xDQ W/v8KVyn43OSIAyW1eaklhzu0Ir2sO60PXRkvbTUrouvmSvpJfIQS49rU0M/X6FSDgXQLKrZ 3my94+g8ptz9KoVml6s4OAwYVz+sb49nuSxipFKkU5FwhKOLmzbsBxCtytcUJoLmjuJPJPDQ ue6YJiIXyc86GVY2pH3DjemKdbB4dSgqAJIp+lCzKSJzz7bgueh2Ox8vzx1tSxKj7V8Nal+U TKKbkxPmMh+e20YZ4esAVifO3bS6IJP/aDnfagghB71vA7+aWGXPbjPlc2UHpCBiRSsl+Igo QXvdvZBsKRyfBx8neODa2C6JIE5vcaCjilSeKF8SzsFXvimnndhQNhAPU/DwQwSXdCl4gTsF Vi5d8Oxq1sce+wARAQABiQI8BBgBCAAmFiEEH7l9m2RN073jRiviDQIrUxG+ECAFAlrUMZ4C GwwFCQlmAYAACgkQDQIrUxG+ECAWnRAAsmZX+KgNxW3v7R/76Tz4Wjmh4AGeE+Ji3p5QsdTY ny1B6vYBL9vCzPJ/AK8pgKMDRaweUP5eZQpfrdWC8Q7SNGgi4Q+97KEs+i2xZLQ+WJb8a+WE EIc716u0y4ITiHfOgM5jWcFO4MXQATbJgv0drLLesa+LQCvZgPBqupt307EsCubQs+Sxt+RV jf6rOUolp1GJXEQYwGsKklVd6yqLC8M1BSG53/WE5tSv5GzBZ8fp6EtmjT7leuidFtEvKYHQ z4DqG9ELpHUF0X0UUCBK/MgXe3kCVLKE060UrJ4M6uPSx57rmVFA2MvwQR8M7GsWC5UsSM4P YwPWBhwxE7vcx0691YKAHT/5q8LxRVBdUyzPSprMhSQFttsBt+ygm6wRi3Pi3TuCEARNubPk QefyeC34yr40SAUCkOl3eWxSXPF4NfXFQb4AAzZSE5hv3qbDuwo3lrL0LqpIpEQPAz+JZ1QZ 6mMFQ5/JD9Gukj54kZc0X8w3sQt0a8vyE/qrJg8vKgv2rCHrPc5MeDkEUEFiiJiCEDdkJtMy oRlU3S4NrnbyLOLEcHE8fGe3hStPX8hY62id2ecdQ5WZ7vLZW5SFeLarbUciuHIkVL6MHnUj bV7XlY50N7ebeFCIdlCWhdum2FJs/Ni+SSxbZC564vrokwlBBGSo6WTPQTa8IWx1DtU= Message-ID: Date: Sun, 8 Sep 2019 14:02:29 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <8273514D-62F3-4ECB-99D0-78A7633A276A@fubar.geek.nz> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="O2Z1L7znuXQdnPpciO2oDKDp4xaijmwDA" X-Rspamd-Queue-Id: 46RMfB2v0Kz42Ps X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; ASN(0.00)[asn:209, ipnet:65.103.224.0/19, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 20:02:42 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --O2Z1L7znuXQdnPpciO2oDKDp4xaijmwDA Content-Type: multipart/mixed; boundary="5jmEh2KaRAa2nQBFciqRTMqRrcNG2vodQ"; protected-headers="v1" From: Rebecca Cran To: Andrew Turner Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r351831 - in head: . stand/efi/boot1 stand/efi/gptboot tools/build/mk References: <201909042055.x84KtnH6078288@repo.freebsd.org> <8273514D-62F3-4ECB-99D0-78A7633A276A@fubar.geek.nz> In-Reply-To: <8273514D-62F3-4ECB-99D0-78A7633A276A@fubar.geek.nz> --5jmEh2KaRAa2nQBFciqRTMqRrcNG2vodQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2019-09-06 04:02, Andrew Turner wrote: > I use them in a Jenkins instance to test arm64. I specifically don=E2=80= =99t give the Jenkins user any root access so am unable to use mdconfig t= o create the ESP image. I would use makefs however support for generating= fat images hasn=E2=80=99t made it into a release yet, and it doesn=E2=80= =99t build on 12 as many needed structs are protected by _KERNEL. >=20 > I don=E2=80=99t care about the image being installed, but would like to= be able to generate it when needed on the latest 12 release without need= ing root access. Sorry for the delay in replying. I'd prefer not to partially revert the commit, but I'm not sure what the solution would be. Perhaps we could accelerate the MFC of msdos makefs support to 12-STABLE? --=20 Rebecca Cran --5jmEh2KaRAa2nQBFciqRTMqRrcNG2vodQ-- --O2Z1L7znuXQdnPpciO2oDKDp4xaijmwDA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEH7l9m2RN073jRiviDQIrUxG+ECAFAl11XlUACgkQDQIrUxG+ ECCUwA/+I+cI4c81bGgL3/FaqVoMGSUVGm21ODJN/c9JQiLYOK/uPGwbfP4Fk327 mcPjbGGAmOHJarbre+0X9e+WUSdH60g/x6b0Rw4BMzDWZpUkp7p0/VDZyJNE6JX4 hDfX0n4LpKPFoReN28IwBBn0y0XBy/oGlqxALNNr28s8xBVaRuHMhQqE0H+NV/bk dziVzlZXN+5jBtVKLqTV6WibTTzzoEa/xZOsrMZeVXbRi8+t9cAFtUR4dBF7RfjF TivIEJEe6+eEUfLUpeRCgWy8OjZvrLywRpL/LFbXx8wtvpDoNt9rtCPYrDqCMF/Y Uz5WksQm6QU8V3QTGis3bQxV+qE/CRRNVfaqgcdjEiq6mBQY1bwAYjee5l7tvZf5 0yL4htnU3Mzyf2neQI9FeQuac2jY6biurg0A907+sl0zoPh0GwR5iWZa1hmruxgs 74J0KYnwNEZjjIENZ98kxBm639Ah6PLtObxqB0gEpFnZZIs/SxdleycjsUIRgUht yWGZdMymFpdSeeqX3Naf/V7gnPUEVhq+QqO81DJzBP3rZ8lsAw5GYslMT0pH4eZt cojU+dOAPVq0dKzktOh8+8xbIwJ211Q69zbmp73UvDNfYm0B2wZlPrcdjwLh6qur ubalD5RGxZAYbDnroLIA2aLZ0aAdf7/Ii1W/uXhPigm0YBRyyaM= =f6QH -----END PGP SIGNATURE----- --O2Z1L7znuXQdnPpciO2oDKDp4xaijmwDA-- From owner-svn-src-head@freebsd.org Sun Sep 8 20:27:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A4D1E09A2; Sun, 8 Sep 2019 20:27:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46RNC20RDrz43Kb; Sun, 8 Sep 2019 20:27:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd42.google.com with SMTP id h144so24130085iof.7; Sun, 08 Sep 2019 13:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bL823FPjBR5qUjIupXjojBD3rJVDnaCjLe9xvBx1KJk=; b=kDva9FqXT+OUkCdsQwRVdqmA3NsrESsxSF8WW1YG7Fu1xUHcbwDwrzzD7NiMDGsuMx 5sbc3e7VdE5EQ3SzGR0DQtO6vW7wS0zNV/XZT/lMsn3HWy9e1Ok7VqgCWz0gs7xazojN BubUXHgjUNEgrBGWSP9PO/duVrM9wieF+Sbp4MYon97KWtmxf8bL8CkoEHreL2me3l5A SWQfRhjbdTBFDX+rr9ThKtN0GnYR7WDQ7EuCno2NTe1oPcXtdtvsUwr25Fy/EJryMdu2 fkcPzFXc7geP97o5a+/diqGAI5U0wr1G7g/Q4bR8hrfGAxEzAR9KNry/OjDBNS/LswBU RyIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bL823FPjBR5qUjIupXjojBD3rJVDnaCjLe9xvBx1KJk=; b=Ovsj6aRH+xNEdN0mbQeP5bUnEVyRWSK8zqop2xqkEtosXEAtvAaGiGgyfrLCh9l8pB ZZtTZpltZDfiJTbiHLjUm99vqpQ03ZPen2y2ciVcuMTx0TepvnHeqPsvHgiwSB+5xDUY 7cAfStq8azSj0ixVle2Ak+H1jJxOd3c0aDRgFK4To8uO3ddlqOVBFDOx1Sb3bF7k0kqT pu3fIXyQXvDQ48apWZnkp3fKCC+/kKWS2nEE6sMybZgPXu1JmvSE+5N+0hn/JQFR1APQ P2HZktbtaxsBLzA55/zOKFIHwOjkvogwyPKltfH/x2m1IwF+zowZauGIc1ZerEu5lKFy ykdQ== X-Gm-Message-State: APjAAAUgZ15S7y/8YhQshJKvglcrMhICzqftHyn+lo18R3bi3leDo1vz Hd7baxivOjhgYungr8c3v5usQz1G3Dg= X-Google-Smtp-Source: APXvYqysphZqFTGZxgZg6IKPwDnmOTZke1JRc3zTFIF+Gdfa3jtG9TI9iUFZNfVu3tOFRa7rBLvLcA== X-Received: by 2002:a05:6638:692:: with SMTP id i18mr21559519jab.108.1567974460724; Sun, 08 Sep 2019 13:27:40 -0700 (PDT) Received: from raichu (toroon0560w-lp140-01-69-159-39-167.dsl.bell.ca. [69.159.39.167]) by smtp.gmail.com with ESMTPSA id s201sm32893839ios.83.2019.09.08.13.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2019 13:27:39 -0700 (PDT) Sender: Mark Johnston Date: Sun, 8 Sep 2019 16:18:19 -0400 From: Mark Johnston To: Slawa Olhovchenkov Cc: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351673 - in head: lib/libmemstat share/man/man9 sys/cddl/compat/opensolaris/kern sys/kern sys/vm Message-ID: <20190908201819.GA49837@raichu> References: <201909012222.x81MMh0F022462@repo.freebsd.org> <79c74018-1329-ee69-3480-e2f99821fa93@FreeBSD.org> <20190903161427.GA38096@zxy.spb.ru> <20190903220106.GB26733@raichu> <20190904144524.GD3953@zxy.spb.ru> <20190907145034.GB6523@spy> <20190907153110.GG3953@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190907153110.GG3953@zxy.spb.ru> User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 46RNC20RDrz43Kb X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=kDva9FqX; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::d42 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.25 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2.4.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.55)[ip: (2.32), ipnet: 2607:f8b0::/32(-2.75), asn: 15169(-2.27), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 20:27:43 -0000 On Sat, Sep 07, 2019 at 06:31:10PM +0300, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2019 at 10:50:34AM -0400, Mark Johnston wrote: > > > On Wed, Sep 04, 2019 at 05:45:24PM +0300, Slawa Olhovchenkov wrote: > > > On Tue, Sep 03, 2019 at 06:01:06PM -0400, Mark Johnston wrote: > > > > > Mostly problem I am see at this > > > > > work -- very slowly vm_page_free(). May be currenly this is more > > > > > speedy... > > > > > > > > How did you determine this? > > > > > > This is you guess: > > > > So was the guess correct? > > I am just trust to you. > How to check this guess? You can try to measure time spent in pmap_remove() relative to the rest of _kmem_unback(). > > If so, IMO the real solution is to avoid kmem_* > > for data buffers and use ABD instead. > > What problem resolve this? To allocate buffers larger than PAGE_SIZE the kernel must allocate a number of physical pages and map them using the page tables. The step of creating and destroying mappings is expensive and doesn't scale well to many CPUs. With ABD, ZFS avoids this expense when its caches are shrunk. > ABD any way is slowly vs kmem_*. Can we solve this problem instead? > > > ====== > > > > while ((slab = SLIST_FIRST(&freeslabs)) != NULL) { > > > > SLIST_REMOVE(&freeslabs, slab, uma_slab, us_hlink); > > > > keg_free_slab(keg, slab, keg->uk_ipers); > > > > } > > > > 2019 Feb 2 19:49:54.800524364 zio_data_buf_1048576 1032605 cache_reclaim limit 100 dom 0 nitems 1672 imin 298 > > > > 2019 Feb 2 19:49:54.800524364 zio_data_buf_1048576 1033736 cache_reclaim recla 149 dom 0 nitems 1672 imin 298 > > > > 2019 Feb 2 19:49:54.802524468 zio_data_buf_1048576 3119710 cache_reclaim limit 100 dom 1 nitems 1 imin 0 > > > > 2019 Feb 2 19:49:54.802524468 zio_data_buf_1048576 3127550 keg_drain2 > > > > 2019 Feb 2 19:49:54.803524487 zio_data_buf_1048576 4444219 keg_drain3 > > > > 2019 Feb 2 19:49:54.838524634 zio_data_buf_1048576 39553705 keg_drain4 > > > > 2019 Feb 2 19:49:54.838524634 zio_data_buf_1048576 39565323 zone_reclaim:return > > > > > > > > 35109.486 ms for last loop, 149 items to freed. > > > > > > 35ms to free 149MB (38144 4KB pages), so roughly 1us per page. That > > > does seem like a lot, but freeing a page (vm_page_free(m)) is much > > > more expensive than freeing an item to UMA (i.e., uma_zfree()). > > > Most of that time will be spent in _kmem_unback(). > > > ====== From owner-svn-src-head@freebsd.org Sun Sep 8 21:37:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6E49E3D65; Sun, 8 Sep 2019 21:37:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RPm05nHrz48g4; Sun, 8 Sep 2019 21:37:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB12A36C6; Sun, 8 Sep 2019 21:37:52 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88Lbq0l070190; Sun, 8 Sep 2019 21:37:52 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88LbqGP070189; Sun, 8 Sep 2019 21:37:52 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201909082137.x88LbqGP070189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 8 Sep 2019 21:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352048 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 352048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 21:37:53 -0000 Author: mhorne Date: Sun Sep 8 21:37:52 2019 New Revision: 352048 URL: https://svnweb.freebsd.org/changeset/base/352048 Log: Fix cpuwhich_t column width Not bumping .Dd since this is purely a format change. Approved by: markj (mentor) Modified: head/lib/libc/sys/cpuset.2 Modified: head/lib/libc/sys/cpuset.2 ============================================================================== --- head/lib/libc/sys/cpuset.2 Sun Sep 8 21:21:32 2019 (r352047) +++ head/lib/libc/sys/cpuset.2 Sun Sep 8 21:37:52 2019 (r352048) @@ -96,7 +96,7 @@ is interpreted and is of type The .Fa which argument may have the following values: -.Bl -column CPU_WHICH_CPUSET -offset indent +.Bl -column CPU_WHICH_INTRHANDLER -offset indent .It Dv CPU_WHICH_TID Ta "id is lwpid_t (thread id)" .It Dv CPU_WHICH_PID Ta "id is pid_t (process id)" .It Dv CPU_WHICH_JAIL Ta "id is jid (jail id)" From owner-svn-src-head@freebsd.org Sun Sep 8 22:52:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D8C91E5FA8; Sun, 8 Sep 2019 22:52:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RRQS5Q6Rz4D2P; Sun, 8 Sep 2019 22:52:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E92445CE; Sun, 8 Sep 2019 22:52:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88Mqm2S017437; Sun, 8 Sep 2019 22:52:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88Mqm4g017434; Sun, 8 Sep 2019 22:52:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909082252.x88Mqm4g017434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 8 Sep 2019 22:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352050 - head/sys/gdb X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/gdb X-SVN-Commit-Revision: 352050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 22:52:48 -0000 Author: cem Date: Sun Sep 8 22:52:47 2019 New Revision: 352050 URL: https://svnweb.freebsd.org/changeset/base/352050 Log: gdb(4): Root a sysctl tree at 'debug.gdb.' Like debug.ddb and debug.kdb. Rename 'debug.gdbcons' to 'debug.gdb.cons,' but leave the old name as a compatibility alias. Modified: head/sys/gdb/gdb_cons.c head/sys/gdb/gdb_int.h head/sys/gdb/gdb_main.c Modified: head/sys/gdb/gdb_cons.c ============================================================================== --- head/sys/gdb/gdb_cons.c Sun Sep 8 21:43:19 2019 (r352049) +++ head/sys/gdb/gdb_cons.c Sun Sep 8 22:52:47 2019 (r352050) @@ -60,8 +60,11 @@ struct gdbcons { static struct gdbcons state = { -1 }; static int gdbcons_enable = 0; +SYSCTL_INT(_debug_gdb, OID_AUTO, cons, CTLFLAG_RWTUN, &gdbcons_enable, 0, + "copy console messages to GDB"); +/* Legacy sysctl alias */ SYSCTL_INT(_debug, OID_AUTO, gdbcons, CTLFLAG_RWTUN, &gdbcons_enable, - 0, "copy console messages to GDB"); + 0, "copy console messages to GDB"); static void gdb_cnprobe(struct consdev *cp) Modified: head/sys/gdb/gdb_int.h ============================================================================== --- head/sys/gdb/gdb_int.h Sun Sep 8 21:43:19 2019 (r352049) +++ head/sys/gdb/gdb_int.h Sun Sep 8 22:52:47 2019 (r352050) @@ -31,9 +31,13 @@ #ifndef _GDB_GDB_INT_H_ #define _GDB_GDB_INT_H_ +#include + #ifndef EOF #define EOF (-1) #endif + +SYSCTL_DECL(_debug_gdb); extern struct gdb_dbgport *gdb_cur; Modified: head/sys/gdb/gdb_main.c ============================================================================== --- head/sys/gdb/gdb_main.c Sun Sep 8 21:43:19 2019 (r352049) +++ head/sys/gdb/gdb_main.c Sun Sep 8 22:52:47 2019 (r352050) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include #include +SYSCTL_NODE(_debug, OID_AUTO, gdb, CTLFLAG_RW, 0, "GDB settings"); + static dbbe_init_f gdb_init; static dbbe_trap_f gdb_trap; From owner-svn-src-head@freebsd.org Mon Sep 9 01:33:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C3C4EA113; Mon, 9 Sep 2019 01:33:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RW0B38R8z4LkP; Mon, 9 Sep 2019 01:33:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F1286219; Mon, 9 Sep 2019 01:33:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x891Xk2A011444; Mon, 9 Sep 2019 01:33:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x891Xjor011442; Mon, 9 Sep 2019 01:33:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909090133.x891Xjor011442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 9 Sep 2019 01:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352053 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 352053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 01:33:46 -0000 Author: cem Date: Mon Sep 9 01:33:45 2019 New Revision: 352053 URL: https://svnweb.freebsd.org/changeset/base/352053 Log: ddb(4): Move an extern variable declaration to a header Trivial cleanup, no functional change. Modified: head/sys/ddb/db_command.h head/sys/ddb/db_run.c Modified: head/sys/ddb/db_command.h ============================================================================== --- head/sys/ddb/db_command.h Mon Sep 9 01:05:51 2019 (r352052) +++ head/sys/ddb/db_command.h Mon Sep 9 01:33:45 2019 (r352053) @@ -49,6 +49,7 @@ void db_command_init(void); void db_command_loop(void); void db_command_script(const char *command); +extern int db_cmd_loop_done; extern db_addr_t db_dot; /* current location */ extern db_addr_t db_last_addr; /* last explicit address typed */ extern db_addr_t db_prev; /* last address examined Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Mon Sep 9 01:05:51 2019 (r352052) +++ head/sys/ddb/db_run.c Mon Sep 9 01:33:45 2019 (r352053) @@ -48,8 +48,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #define STEP_ONCE 1 #define STEP_RETURN 2 @@ -331,8 +332,6 @@ db_clear_single_step(void) } #endif /* SOFTWARE_SSTEP */ - -extern int db_cmd_loop_done; /* single-step */ /*ARGSUSED*/ From owner-svn-src-head@freebsd.org Mon Sep 9 03:31:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48D86EBFB0; Mon, 9 Sep 2019 03:31:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46RYcM0hVDz4Qt5; Mon, 9 Sep 2019 03:31:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0947777D; Mon, 9 Sep 2019 03:31:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x893VkWr082290; Mon, 9 Sep 2019 03:31:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x893Vkje082289; Mon, 9 Sep 2019 03:31:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201909090331.x893Vkje082289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 9 Sep 2019 03:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352054 - head/sys/dev/ral X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/sys/dev/ral X-SVN-Commit-Revision: 352054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 03:31:47 -0000 Author: pfg Date: Mon Sep 9 03:31:46 2019 New Revision: 352054 URL: https://svnweb.freebsd.org/changeset/base/352054 Log: ral(4): Use unsigned to avoid undefined behavior. Found by NetBSD's kUBSan Obtained from: NetBSD (github 5b153f1) Modified: head/sys/dev/ral/rt2860.c Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Mon Sep 9 01:33:45 2019 (r352053) +++ head/sys/dev/ral/rt2860.c Mon Sep 9 03:31:46 2019 (r352054) @@ -2220,7 +2220,7 @@ static void rt2860_enable_mrr(struct rt2860_softc *sc) { #define CCK(mcs) (mcs) -#define OFDM(mcs) (1 << 3 | (mcs)) +#define OFDM(mcs) (1U << 3 | (mcs)) RAL_WRITE(sc, RT2860_LG_FBK_CFG0, OFDM(6) << 28 | /* 54->48 */ OFDM(5) << 24 | /* 48->36 */ @@ -3325,7 +3325,7 @@ b4inc(uint32_t b32, int8_t delta) b4 = 0; else if (b4 > 0xf) b4 = 0xf; - b32 = b32 >> 4 | b4 << 28; + b32 = b32 >> 4 | (uint32_t)b4 << 28; } return b32; } From owner-svn-src-head@freebsd.org Mon Sep 9 11:15:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3ACC9F5A5D; Mon, 9 Sep 2019 11:15:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rlv70qF4z3KtV; Mon, 9 Sep 2019 11:15:15 +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 F3E29CBD9; Mon, 9 Sep 2019 11:15:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89BFExK055855; Mon, 9 Sep 2019 11:15:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89BFEhg055854; Mon, 9 Sep 2019 11:15:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201909091115.x89BFEhg055854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Sep 2019 11:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352056 - head/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 352056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 11:15:15 -0000 Author: kib Date: Mon Sep 9 11:15:14 2019 New Revision: 352056 URL: https://svnweb.freebsd.org/changeset/base/352056 Log: Make snprintf(3) and vscanf(3) definitions available under appropriate POSIX visibility. Reported by: jbeich Reviewed by: jilles PR: 207287 MFC after: 1 week Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Mon Sep 9 10:44:58 2019 (r352055) +++ head/include/stdio.h Mon Sep 9 11:15:14 2019 (r352056) @@ -294,14 +294,16 @@ int vprintf(const char * __restrict, __va_list); int vsprintf(char * __restrict, const char * __restrict, __va_list); -#if __ISO_C_VISIBLE >= 1999 +#if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 199506 int snprintf(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4); +int vsnprintf(char * __restrict, size_t, const char * __restrict, + __va_list) __printflike(3, 0); +#endif +#if __ISO_C_VISIBLE >= 1999 int vfscanf(FILE * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); int vscanf(const char * __restrict, __va_list) __scanflike(1, 0); -int vsnprintf(char * __restrict, size_t, const char * __restrict, - __va_list) __printflike(3, 0); int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); #endif From owner-svn-src-head@freebsd.org Mon Sep 9 11:22:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54156F5E28; Mon, 9 Sep 2019 11:22:39 +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 46Rm3g16dsz3LSD; Mon, 9 Sep 2019 11:22:39 +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 09AB1CD9F; Mon, 9 Sep 2019 11:22:39 +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 x89BMcrh061511; Mon, 9 Sep 2019 11:22:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89BMc0D061510; Mon, 9 Sep 2019 11:22:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201909091122.x89BMc0D061510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Sep 2019 11:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352058 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 352058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 11:22:39 -0000 Author: kib Date: Mon Sep 9 11:22:38 2019 New Revision: 352058 URL: https://svnweb.freebsd.org/changeset/base/352058 Log: Remove some unneeded vfs_busy() calls in SU code. When softdep_fsync() is running, a caller must already started write for the mount point. Since unmount or remount to ro suspends mount point, it cannot run in parallel with softdep_fsync(), which makes vfs_busy() call there not needed. Doing blocking vfs_busy() there effectively causes lock order reversal between vn_start_write() and setting MNTK_UNMOUNT, because vfs_busy(mp, 0) sleeps waiting for MNTK_UNMOUNT becoming clear, while unmount sets the flag and starts the suspension. Note that all other uses of vfs_busy() in SU code are non-blocking. Reported by: chs by mckusick Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Sep 9 11:20:15 2019 (r352057) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Sep 9 11:22:38 2019 (r352058) @@ -12507,24 +12507,13 @@ restart: FREE_LOCK(ump); if (ffs_vgetf(mp, parentino, LK_NOWAIT | LK_EXCLUSIVE, &pvp, FFSV_FORCEINSMQ)) { - error = vfs_busy(mp, MBF_NOWAIT); - if (error != 0) { - vfs_ref(mp); - VOP_UNLOCK(vp, 0); - error = vfs_busy(mp, 0); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - vfs_rel(mp); - if (error != 0) - return (ENOENT); - if (vp->v_iflag & VI_DOOMED) { - vfs_unbusy(mp); - return (ENOENT); - } - } + /* + * Unmount cannot proceed after unlock because + * caller must have called vn_start_write(). + */ VOP_UNLOCK(vp, 0); error = ffs_vgetf(mp, parentino, LK_EXCLUSIVE, &pvp, FFSV_FORCEINSMQ); - vfs_unbusy(mp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { if (error == 0) From owner-svn-src-head@freebsd.org Mon Sep 9 11:29:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DD6DF6060; Mon, 9 Sep 2019 11:29:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RmD73C4Pz3LqC; Mon, 9 Sep 2019 11:29:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D56BCDE7; Mon, 9 Sep 2019 11:29:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89BTxUE061872; Mon, 9 Sep 2019 11:29:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89BTxvw061871; Mon, 9 Sep 2019 11:29:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201909091129.x89BTxvw061871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Sep 2019 11:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352059 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 11:29:59 -0000 Author: kib Date: Mon Sep 9 11:29:58 2019 New Revision: 352059 URL: https://svnweb.freebsd.org/changeset/base/352059 Log: Make timehands count selectable at boottime. Tested by: O'Connor, Daniel Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21563 Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Mon Sep 9 11:22:38 2019 (r352058) +++ head/sys/kern/kern_tc.c Mon Sep 9 11:29:58 2019 (r352059) @@ -83,19 +83,16 @@ struct timehands { struct timehands *th_next; }; -static struct timehands th0; -static struct timehands th1 = { - .th_next = &th0 -}; -static struct timehands th0 = { +static struct timehands ths[16] = { + [0] = { .th_counter = &dummy_timecounter, .th_scale = (uint64_t)-1 / 1000000, .th_offset = { .sec = 1 }, .th_generation = 1, - .th_next = &th1 + }, }; -static struct timehands *volatile timehands = &th0; +static struct timehands *volatile timehands = &ths[0]; struct timecounter *timecounter = &dummy_timecounter; static struct timecounter *timecounters = &dummy_timecounter; @@ -115,6 +112,10 @@ static int timestepwarnings; SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, ×tepwarnings, 0, "Log time steps"); +static int timehands_count = 2; +SYSCTL_INT(_kern_timecounter, OID_AUTO, timehands_count, CTLFLAG_RDTUN, + &timehands_count, 0, "Count of timehands in rotation"); + struct bintime bt_timethreshold; struct bintime bt_tickthreshold; sbintime_t sbt_timethreshold; @@ -1960,8 +1961,9 @@ done: static void inittimecounter(void *dummy) { + struct timehands *thp; u_int p; - int tick_rate; + int i, tick_rate; /* * Set the initial timeout to @@ -1987,6 +1989,16 @@ inittimecounter(void *dummy) #ifdef FFCLOCK ffclock_init(); #endif + + /* Set up the requested number of timehands. */ + if (timehands_count < 1) + timehands_count = 1; + if (timehands_count > nitems(ths)) + timehands_count = nitems(ths); + for (i = 1, thp = &ths[0]; i < timehands_count; thp = &ths[i++]) + thp->th_next = &ths[i]; + thp->th_next = &ths[0]; + /* warm up new timecounter (again) and get rolling. */ (void)timecounter->tc_get_timecount(timecounter); (void)timecounter->tc_get_timecount(timecounter); From owner-svn-src-head@freebsd.org Mon Sep 9 11:56:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79AA8F6B82; Mon, 9 Sep 2019 11:56:40 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Rmpv4fsCz3NKc; Mon, 9 Sep 2019 11:56:39 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D56FB3C0199; Mon, 9 Sep 2019 11:56:32 +0000 (UTC) Date: Mon, 9 Sep 2019 11:56:32 +0000 From: Brooks Davis To: Philip Paeps Cc: Warner Losh , Ian Lepore , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r351918 - head/sys/kern Message-ID: <20190909115632.GB41333@spindle.one-eyed-alien.net> References: <201909060119.x861JWrG006910@repo.freebsd.org> <4917d7507b6ea6c360dccda261f53052aa085f2b.camel@freebsd.org> <5EE266EE-E650-48D8-9B0E-E674AD026470@freebsd.org> <3cb6429acc7e520932d2c906d1cac47540156355.camel@freebsd.org> <8F03EA29-0F3F-4321-9241-78F7C924FDE1@freebsd.org> <9BC03B61-F8B5-476C-AD34-9DEA5230BFCF@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xgyAXRrhYN0wYx8y" Content-Disposition: inline In-Reply-To: <9BC03B61-F8B5-476C-AD34-9DEA5230BFCF@freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 46Rmpv4fsCz3NKc X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-6.48 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; IP_SCORE(-3.58)[ip: (-9.34), ipnet: 199.48.128.0/22(-4.65), asn: 36236(-3.86), country: US(-0.05)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 11:56:40 -0000 --xgyAXRrhYN0wYx8y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 07, 2019 at 12:23:03PM +0800, Philip Paeps wrote: > On 2019-09-07 12:06:32 (+0800), Warner Losh wrote: > > On Fri, Sep 6, 2019 at 9:54 PM Philip Paeps =20 > > wrote: > >> On 2019-09-06 22:18:36 (+0800), Ian Lepore wrote: > >>> On Fri, 2019-09-06 at 12:15 +0800, Philip Paeps wrote: > >>>> On 2019-09-06 11:15:12 (+0800), Ian Lepore wrote: > >>>>> On Fri, 2019-09-06 at 01:19 +0000, Philip Paeps wrote: > >>>>>> Log: > >>>>>> riscv: default to HZ=3D100 > >>>>> > >>>>> This seems like a bad idea. I've run a 90mhz armv4 chip with=20 > >>>>> HZ=3D1000 and didn't notice any performance hit from doing so. =20 > >>>>> Almost all arm kernel config files set HZ as an option, so that=20 > >>>>> define doesn't do much for arm these days. It probably does still= =20 > >>>>> set HZ for various mips platforms. > >>>>> > >>>>> I would think 1000 is appropriate for anything modern running at=20 > >>>>> 200mhz or more. > >>>>> > >>>>> Setting it to 100 has the bad side effect of making things like=20 > >>>>> msleep(), tsleep(), and pause() (which show up in plenty of=20 > >>>>> drivers) all have a minimum timeout of 10ms, which is a long long= =20 > >>>>> time on modern hardware. > >>>>> > >>>>> What benefit do you think you'll get from the lower number? > >>>> > >>>> On systems running at 10s of MHz (or slower, ick), with HZ=3D1000 yo= u=20 > >>>> spend an awful lot of time servicing the timer interrupt and not=20 > >>>> very much time doing anything else. > >>>> > >>>> My rationale was that most RISC-V systems (including emulation and= =20 > >>>> FPGA prototypes) I've encountered are running slower than the=20 > >>>> tipping point where HZ=3D1000 makes sense. With the default of=20 > >>>> HZ=3D100, faster exceptions can still set HZ=3D1000 in their individ= ual=20 > >>>> configs. > >>>> > >>>> When the RISC-V world evolves to having more actual silicon and=20 > >>>> fewer slow prototypes, I definitely agree this default should be=20 > >>>> flipped again for HZ=3D1000 by default and HZ=3D100 in the config fi= les=20 > >>>> for the exceptions. > >>> > >>> Wait a second... are you saying that the riscv implementation=20 > >>> doesn't support event timers and uses an old-style periodic tick=20 > >>> based on HZ? > >> > >> Depending on the hardware, there may not be an event timer (yet)... > >> > >> As I wrote: I would be more than happy to revert this change when=20 > >> more silicon becomes available. Presently, there is exactly one=20 > >> silicon RISC-V implementation commercially available (HiFive FU540)=20 > >> and even that one is kind of difficult to source. Most people=20 > >> running RISC-V are doing so in emulation or on FPGAs. > >> > >> Given how long these things take to boot to userland (where you=20 > >> really notice how slow things are), HZ=3D100 feels like a more sensibl= e=20 > >> default than HZ=3D1000. > > > > I think it show more that the defaults are bad for MIPS and ARM. All=20 > > the MIPS files, except BERI/CHERI are 1000Hz. Well, Octeon is also=20 > > 100Hz, due to the defaults, but it will be fine at 1000Hz, so maybe we= =20 > > need to attend to this as well. Arm !=3Dv5 is also 1000Hz, so it should= =20 > > be changed... > > > >> I don't feel terribly strongly about this though. I've just been=20 > >> bitten several times in the last week on a <15MHz FPGA forgetting to= =20 > >> set HZ=3D100 in config and figured I'd save others the trouble. ;-) > > > > 15MHz FPGA? FreeBSD 1.0 barely ran on 25MHz i386 machines of the=20 > > time.... How common are these beasts and how well does FreeBSD do on= =20 > > them. I assume these are early prototypes? >=20 > These are early prototypes indeed. >=20 > FreeBSD runs remarkably well on them. Slowly of course. Booting takes= =20 > several minutes and running anything non-trivial can be frustrating. [More context for Warner and others following along.] I don't know what platform Philip is using here, but with architectures supporting CHERI (including MIPS and RISC-V), we typically run on sub-100Mhz FPGA implementations. We also run on simulations or models that range from 100s of MIPS to a few KIPS. Being able to do this is important to help validate that the models we're proving security properties on actually relate to the "more real" implementations we develop on. In all these cases, "run" is a relative thing. We certainly don't expect to self-host until we've got performant hardware (and to the extent that we care about 32-bit, we consider self-hosting an active non-goal.) We often expect to be able to run real software including things like nginx and webkit, but we mostly care about relative performance not interactivity. -- Brooks --xgyAXRrhYN0wYx8y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJddj3wAAoJEKzQXbSebgfADJ8H/1+Tkq0eVRTawWrqyjRBXvVl BV3gNHvoX8jkq+3PzbqDlQvr3E0jXkcJ/EIJgZCbOUy3YeqcCJluj0AjqiIydwV2 QyxTc9lGNGKYET8y2k4PNiARQgUbdt3kH1zBy/MCiEFBIboIv2Z3isizsq4/hNHx rN+b/SuVhAbkhNihQrO4Ayts/zPTBdkS2i9j5oC89x59S98LMpHusRxjNiywqBp8 Hpu+fPWlfbldM/6Swh7T5cjriwbYN0YZSKzQWdwtd9xIheNCk1xukhyttxM6YrtG 8NQl+kMiYGhYYy0PlvJqYkma1C/3TSg8e3YGwKE0DITj1fwBPc2NwKoF8tJGyrU= =C1e4 -----END PGP SIGNATURE----- --xgyAXRrhYN0wYx8y-- From owner-svn-src-head@freebsd.org Mon Sep 9 12:34:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01798D101B; Mon, 9 Sep 2019 12:34:40 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Rnfl5wKXz3RKL; Mon, 9 Sep 2019 12:34:39 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1i7IsJ-000KCu-29; Mon, 09 Sep 2019 15:34:31 +0300 Date: Mon, 9 Sep 2019 15:34:31 +0300 From: Slawa Olhovchenkov To: Mark Johnston Cc: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351673 - in head: lib/libmemstat share/man/man9 sys/cddl/compat/opensolaris/kern sys/kern sys/vm Message-ID: <20190909123430.GI3953@zxy.spb.ru> References: <201909012222.x81MMh0F022462@repo.freebsd.org> <79c74018-1329-ee69-3480-e2f99821fa93@FreeBSD.org> <20190903161427.GA38096@zxy.spb.ru> <20190903220106.GB26733@raichu> <20190904144524.GD3953@zxy.spb.ru> <20190907145034.GB6523@spy> <20190907153110.GG3953@zxy.spb.ru> <20190908201819.GA49837@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190908201819.GA49837@raichu> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 46Rnfl5wKXz3RKL X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 12:34:40 -0000 On Sun, Sep 08, 2019 at 04:18:19PM -0400, Mark Johnston wrote: > On Sat, Sep 07, 2019 at 06:31:10PM +0300, Slawa Olhovchenkov wrote: > > On Sat, Sep 07, 2019 at 10:50:34AM -0400, Mark Johnston wrote: > > > > > On Wed, Sep 04, 2019 at 05:45:24PM +0300, Slawa Olhovchenkov wrote: > > > > On Tue, Sep 03, 2019 at 06:01:06PM -0400, Mark Johnston wrote: > > > > > > Mostly problem I am see at this > > > > > > work -- very slowly vm_page_free(). May be currenly this is more > > > > > > speedy... > > > > > > > > > > How did you determine this? > > > > > > > > This is you guess: > > > > > > So was the guess correct? > > > > I am just trust to you. > > How to check this guess? > > You can try to measure time spent in pmap_remove() relative to the rest > of _kmem_unback(). === fbt:kernel:_kmem_unback:entry { self->kts = timestamp; } fbt:kernel:_kmem_unback:return /self->kts/ { @ts["kts"] = sum(timestamp - self->kts); self->kts = 0; } fbt:kernel:pmap_remove:entry /self->kts/ { self->pts = timestamp; } fbt:kernel:pmap_remove:entry /self->kts == 0/ { self->ats = timestamp; } fbt:kernel:pmap_remove:return /self->pts/ { @ts["pts"] = sum(timestamp - self->pts); self->pts = 0; } fbt:kernel:pmap_remove:return /self->ats/ { @ts["ats"] = sum(timestamp - self->ats); self->ats = 0; } tick-1s { printa("%-8s %20@d\n", @ts); printf("\n"); clear(@ts); } === pts 7166680 ats 8143193 kts 16721822 pts 3458647 ats 5393452 kts 10504523 kts 0 pts 0 ats 2758752 pts 3387748 ats 4322653 kts 8100282 pts 4002444 ats 5422748 kts 11761955 pts 1151713 kts 2742176 ats 8242958 pts 34441 kts 145683 ats 4822328 kts 0 pts 0 ats 5357808 pts 16008 kts 148203 ats 4947368 pts 26945 kts 156011 ats 8368502 pts 323620 kts 1154981 ats 10093137 pts 79504 kts 228135 ats 7131059 pts 734062 kts 1747364 ats 4619796 pts 401453 kts 1036605 ats 8751919 > > > If so, IMO the real solution is to avoid kmem_* > > > for data buffers and use ABD instead. > > > > What problem resolve this? > > To allocate buffers larger than PAGE_SIZE the kernel must allocate a > number of physical pages and map them using the page tables. The step > of creating and destroying mappings is expensive and doesn't scale well > to many CPUs. With ABD, ZFS avoids this expense when its caches are > shrunk. > > > ABD any way is slowly vs kmem_*. > > Can we solve this problem instead? slowly ABD? or expensive of creating and destroying mappings? slowly ABD -- don't use ABD and scatter gather. expensive of creating and destroying mappings: - do kernel more NUMA-aware and go mostly alloc and free to zone cache (curenly may be allocation can do from dom1 and freeing in dom0. I am see this.) - calculate sensible working set size of zone cache and aim trim to do nothing - my be do batch removed/unmaped and do TLB shootdown only once at end of batch? > > > > ====== > > > > > while ((slab = SLIST_FIRST(&freeslabs)) != NULL) { > > > > > SLIST_REMOVE(&freeslabs, slab, uma_slab, us_hlink); > > > > > keg_free_slab(keg, slab, keg->uk_ipers); > > > > > } > > > > > 2019 Feb 2 19:49:54.800524364 zio_data_buf_1048576 1032605 cache_reclaim limit 100 dom 0 nitems 1672 imin 298 > > > > > 2019 Feb 2 19:49:54.800524364 zio_data_buf_1048576 1033736 cache_reclaim recla 149 dom 0 nitems 1672 imin 298 > > > > > 2019 Feb 2 19:49:54.802524468 zio_data_buf_1048576 3119710 cache_reclaim limit 100 dom 1 nitems 1 imin 0 > > > > > 2019 Feb 2 19:49:54.802524468 zio_data_buf_1048576 3127550 keg_drain2 > > > > > 2019 Feb 2 19:49:54.803524487 zio_data_buf_1048576 4444219 keg_drain3 > > > > > 2019 Feb 2 19:49:54.838524634 zio_data_buf_1048576 39553705 keg_drain4 > > > > > 2019 Feb 2 19:49:54.838524634 zio_data_buf_1048576 39565323 zone_reclaim:return > > > > > > > > > > 35109.486 ms for last loop, 149 items to freed. > > > > > > > > 35ms to free 149MB (38144 4KB pages), so roughly 1us per page. That > > > > does seem like a lot, but freeing a page (vm_page_free(m)) is much > > > > more expensive than freeing an item to UMA (i.e., uma_zfree()). > > > > Most of that time will be spent in _kmem_unback(). > > > > ====== From owner-svn-src-head@freebsd.org Mon Sep 9 12:42:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B894AD1581; Mon, 9 Sep 2019 12:42:48 +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 46Rnr84R7Jz3x96; Mon, 9 Sep 2019 12:42:48 +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 7CFE1DC8B; Mon, 9 Sep 2019 12:42:48 +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 x89CgmMZ008987; Mon, 9 Sep 2019 12:42:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89CgmJr008986; Mon, 9 Sep 2019 12:42:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201909091242.x89CgmJr008986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 9 Sep 2019 12:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352060 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 12:42:48 -0000 Author: kib Date: Mon Sep 9 12:42:48 2019 New Revision: 352060 URL: https://svnweb.freebsd.org/changeset/base/352060 Log: Initialize timehands linkage much earlier. Reported and tested by: trasz Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Mon Sep 9 11:29:58 2019 (r352059) +++ head/sys/kern/kern_tc.c Mon Sep 9 12:42:48 2019 (r352060) @@ -113,7 +113,8 @@ SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, ×tepwarnings, 0, "Log time steps"); static int timehands_count = 2; -SYSCTL_INT(_kern_timecounter, OID_AUTO, timehands_count, CTLFLAG_RDTUN, +SYSCTL_INT(_kern_timecounter, OID_AUTO, timehands_count, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &timehands_count, 0, "Count of timehands in rotation"); struct bintime bt_timethreshold; @@ -1958,12 +1959,30 @@ done: return (0); } +/* Set up the requested number of timehands. */ static void -inittimecounter(void *dummy) +inittimehands(void *dummy) { struct timehands *thp; + int i; + + TUNABLE_INT_FETCH("kern.timecounter.timehands_count", + &timehands_count); + if (timehands_count < 1) + timehands_count = 1; + if (timehands_count > nitems(ths)) + timehands_count = nitems(ths); + for (i = 1, thp = &ths[0]; i < timehands_count; thp = &ths[i++]) + thp->th_next = &ths[i]; + thp->th_next = &ths[0]; +} +SYSINIT(timehands, SI_SUB_TUNABLES, SI_ORDER_ANY, inittimehands, NULL); + +static void +inittimecounter(void *dummy) +{ u_int p; - int i, tick_rate; + int tick_rate; /* * Set the initial timeout to @@ -1989,15 +2008,6 @@ inittimecounter(void *dummy) #ifdef FFCLOCK ffclock_init(); #endif - - /* Set up the requested number of timehands. */ - if (timehands_count < 1) - timehands_count = 1; - if (timehands_count > nitems(ths)) - timehands_count = nitems(ths); - for (i = 1, thp = &ths[0]; i < timehands_count; thp = &ths[i++]) - thp->th_next = &ths[i]; - thp->th_next = &ths[0]; /* warm up new timecounter (again) and get rolling. */ (void)timecounter->tc_get_timecount(timecounter); From owner-svn-src-head@freebsd.org Mon Sep 9 14:09:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEC3FD3780; Mon, 9 Sep 2019 14:09:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Rqmc6r9sz4277; Mon, 9 Sep 2019 14:09:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id d10so10625641lfi.0; Mon, 09 Sep 2019 07:09:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=21hAu61De6Yo0Kgxm8Wo/tJSwLrDXId1wJfeVbWzDdo=; b=Svg0ayICJa7G33ooAcDPyL1LCWgdBffcXPSrex1wHwInLJnWtfPQUb1q3hg2GFIME5 xnmM2sZSorflwCfr0yqIGGzWHDj5IeklFkg98nkdIrIockOpgRbaZj+106dzIBFnOjvE hYwq1bTwt+/4qfQzaEk4k9BFGM4DKfnnAGNccaMU76WXH1GD2L+qVnv7yEQuhuKY8pxw P5VkNbh9n1BLiwEsWvPk2l6U9OtZlPjnToCJyxu/u63v14YnJIvotatcm1zZC3+Lmp2Q T0tXCyL9Bz36/NbcEwHXbZl8JrLYcwhI0eX0ALjM1wPTAUpTSdJjXjSQBGP7ZllBSpnQ 7iXw== X-Gm-Message-State: APjAAAV0L+swwJdfmfx8qxQHzW0ag7Txe0E+/5DSiAO/vIG/OG9x600W GFvtyXQkEUgLtKGC78pnomcdNQCd927M6L6ecM7R6g== X-Google-Smtp-Source: APXvYqwSnqnCrnxQ0bUV72jKiyTDzYz9NvWFGRFy0b+C+dsoMUXscdwr6ziDa7im0RyzjxWpGeqrUWXPsv6SjYa/QlE= X-Received: by 2002:ac2:5399:: with SMTP id g25mr16613252lfh.178.1568038190807; Mon, 09 Sep 2019 07:09:50 -0700 (PDT) MIME-Version: 1.0 References: <201811121552.wACFqjLr002955@repo.freebsd.org> In-Reply-To: <201811121552.wACFqjLr002955@repo.freebsd.org> From: Alan Somers Date: Mon, 9 Sep 2019 08:09:39 -0600 Message-ID: Subject: Re: svn commit: r340363 - in head: . contrib/tcpdump contrib/traceroute lib/libcasper/services/cap_dns lib/libcasper/services/cap_dns/tests sbin/ping To: Mariusz Zaborski Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46Rqmc6r9sz4277 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.45 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.24 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; URI_COUNT_ODD(1.00)[3]; IP_SCORE(-1.24)[ip: (-0.56), ipnet: 209.85.128.0/17(-3.32), asn: 15169(-2.27), country: US(-0.05)]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[45.167.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[45.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 14:09:53 -0000 On Mon, Nov 12, 2018 at 8:53 AM Mariusz Zaborski wrote: > Author: oshogbo > Date: Mon Nov 12 15:52:45 2018 > New Revision: 340363 > URL: https://svnweb.freebsd.org/changeset/base/340363 > > Log: > libcasper: ange the name of limits in cap_dns so the intentions are > obvious. > > Reported by: pjd > MFC after: 3 weeks > > Modified: > head/ObsoleteFiles.inc > head/contrib/tcpdump/tcpdump.c > head/contrib/traceroute/traceroute.c > head/lib/libcasper/services/cap_dns/Makefile > head/lib/libcasper/services/cap_dns/cap_dns.3 > head/lib/libcasper/services/cap_dns/cap_dns.c > head/lib/libcasper/services/cap_dns/tests/dns_test.c > head/sbin/ping/ping.c > Are you still planning to MFC this? From owner-svn-src-head@freebsd.org Mon Sep 9 14:51:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED208D4647; Mon, 9 Sep 2019 14:51:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RrhY62NGz44Gx; Mon, 9 Sep 2019 14:51:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B25BEF496; Mon, 9 Sep 2019 14:51:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89EpPgN083047; Mon, 9 Sep 2019 14:51:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89EpPqi083046; Mon, 9 Sep 2019 14:51:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909091451.x89EpPqi083046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Sep 2019 14:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352063 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 352063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 14:51:26 -0000 Author: emaste Date: Mon Sep 9 14:51:25 2019 New Revision: 352063 URL: https://svnweb.freebsd.org/changeset/base/352063 Log: ci-qemu-test: if firmware is not available, hint at pkg to install uefi-edk2-qemu-x86_64 provides the firmware ci-qemu-test.sh expects to use. Sponsored by: The FreeBSD Foundation Modified: head/tools/boot/ci-qemu-test.sh Modified: head/tools/boot/ci-qemu-test.sh ============================================================================== --- head/tools/boot/ci-qemu-test.sh Mon Sep 9 14:41:39 2019 (r352062) +++ head/tools/boot/ci-qemu-test.sh Mon Sep 9 14:51:25 2019 (r352063) @@ -84,6 +84,7 @@ fi # Locate the uefi firmware file used by qemu. : ${OVMF:=/usr/local/share/uefi-edk2-qemu/QEMU_UEFI_CODE-x86_64.fd} if [ ! -r "${OVMF}" ]; then + echo "NOTE: UEFI firmware available in the uefi-edk2-qemu-x86_64 package" >&2 die "Cannot read UEFI firmware file ${OVMF}" fi From owner-svn-src-head@freebsd.org Mon Sep 9 15:18:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D1D3D5038; Mon, 9 Sep 2019 15:18:06 +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 46RsHL0Qs5z45YJ; Mon, 9 Sep 2019 15:18:06 +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 E71F4F8BB; Mon, 9 Sep 2019 15:18:05 +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 x89FI5eF098534; Mon, 9 Sep 2019 15:18:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FI4rI098527; Mon, 9 Sep 2019 15:18:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909091518.x89FI4rI098527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 9 Sep 2019 15:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352065 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 352065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:18:06 -0000 Author: bapt Date: Mon Sep 9 15:18:04 2019 New Revision: 352065 URL: https://svnweb.freebsd.org/changeset/base/352065 Log: Import from OpenBSD: -E flag Add -E flag (make warnings fatal), following the behavior of GNU m4 1.4.9+ Help and direction millert@ espie@ anton@ deraadt@ ok espie@ Obtained from: OpenBSD Modified: head/usr.bin/m4/eval.c head/usr.bin/m4/extern.h head/usr.bin/m4/gnum4.c head/usr.bin/m4/m4.1 head/usr.bin/m4/main.c head/usr.bin/m4/misc.c head/usr.bin/m4/tokenizer.l Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/eval.c Mon Sep 9 15:18:04 2019 (r352065) @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.74 2015/02/05 12:59:57 millert Exp $ */ +/* $OpenBSD: eval.c,v 1.75 2017/06/15 13:48:42 bcallah Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /*- @@ -275,6 +275,10 @@ expand_builtin(const char *argv[], int argc, int td) warn("%s at line %lu: include(%s)", CURRENT_NAME, CURRENT_LINE, argv[2]); exit_code = 1; + if (fatal_warns) { + killdiv(); + exit(exit_code); + } } else err(1, "%s at line %lu: include(%s)", CURRENT_NAME, CURRENT_LINE, argv[2]); Modified: head/usr.bin/m4/extern.h ============================================================================== --- head/usr.bin/m4/extern.h Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/extern.h Mon Sep 9 15:18:04 2019 (r352065) @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $ */ +/* $OpenBSD: extern.h,v 1.55 2017/06/15 13:48:42 bcallah Exp $ */ /* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $ */ /*- @@ -61,6 +61,8 @@ extern void doesyscmd(const char *); extern void getdivfile(const char *); extern void doformat(const char *[], int); +extern void m4_warnx(const char *, ...); + /* look.c */ #define FLAG_UNTRACED 0 @@ -178,4 +180,5 @@ extern int synch_lines; /* line synchronisation direc extern int mimic_gnu; /* behaves like gnu-m4 */ extern int prefix_builtins; /* prefix builtin macros with m4_ */ - +extern int error_warns; /* make warnings cause exit_code = 1 */ +extern int fatal_warns; /* make warnings fatal */ Modified: head/usr.bin/m4/gnum4.c ============================================================================== --- head/usr.bin/m4/gnum4.c Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/gnum4.c Mon Sep 9 15:18:04 2019 (r352065) @@ -1,4 +1,4 @@ -/* $OpenBSD: gnum4.c,v 1.50 2015/04/29 00:13:26 millert Exp $ */ +/* $OpenBSD: gnum4.c,v 1.51 2017/06/15 13:48:42 bcallah Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -259,11 +260,29 @@ exit_regerror(int er, regex_t *re, const char *source) m4errx(1, "regular expression error in %s: %s.", source, errbuf); } +/* warnx() plus check to see if we need to change exit code or exit . + * -E flag functionality. + */ +void +m4_warnx(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + warnx(fmt, ap); + va_end(ap); + + if (fatal_warns) + exit(1); + if (error_warns) + exit_code = 1; +} + static void add_sub(int n, const char *string, regex_t *re, regmatch_t *pm) { if (n > (int)re->re_nsub) - warnx("No subexpression %d", n); + m4_warnx("No subexpression %d", n); /* Subexpressions that did not match are * not an error. */ else if (pm[n].rm_so != -1 && @@ -446,7 +465,7 @@ void dopatsubst(const char *argv[], int argc) { if (argc <= 3) { - warnx("Too few arguments to patsubst"); + m4_warnx("Too few arguments to patsubst"); return; } /* special case: empty regexp */ @@ -498,7 +517,7 @@ doregexp(const char *argv[], int argc) const char *source; if (argc <= 3) { - warnx("Too few arguments to regexp"); + m4_warnx("Too few arguments to regexp"); return; } /* special gnu case */ Modified: head/usr.bin/m4/m4.1 ============================================================================== --- head/usr.bin/m4/m4.1 Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/m4.1 Mon Sep 9 15:18:04 2019 (r352065) @@ -1,5 +1,5 @@ .\" $NetBSD: m4.1,v 1.23 2012/04/08 22:00:39 wiz Exp $ -.\" @(#) $OpenBSD: m4.1,v 1.63 2015/09/14 20:06:58 schwarze Exp $ +.\" @(#) $OpenBSD: m4.1,v 1.64 2017/06/15 13:48:42 bcallah Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd $Mdocdate: September 14 2015 $ +.Dd $Mdocdate: June 15 2017 $ .Dt M4 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Nd macro language processor .Sh SYNOPSIS .Nm -.Op Fl gPs +.Op Fl EgPs .Oo .Sm off .Fl D Ar name Op No = Ar value @@ -130,6 +130,21 @@ turn on all options. .Pp By default, trace is set to .Qq eq . +.It Fl E +Set warnings to be fatal. +When a single +.Fl E +flag is specified, if warnings are issued, execution +continues but +.Nm +will exit with a non-zero exit status. +When multiple +.Fl E +flags are specified, execution will halt upon issuing the +first warning and +.Nm +will exit with a non-zero exit status. +This behaviour matches GNU-m4 1.4.9 and later. .It Fl g Activate GNU-m4 compatibility mode. In this mode, translit handles simple character @@ -437,7 +452,9 @@ Returns the current file's name. .Pp But note that the .Ic m4exit -macro can modify the exit status. +macro can modify the exit status, as can the +.Fl E +flag. .Sh STANDARDS The .Nm @@ -446,7 +463,7 @@ utility is compliant with the specification. .Pp The flags -.Op Fl dgIPot +.Op Fl dEgIPot and the macros .Ic builtin , .Ic esyscmd , Modified: head/usr.bin/m4/main.c ============================================================================== --- head/usr.bin/m4/main.c Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/main.c Mon Sep 9 15:18:04 2019 (r352065) @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.86 2015/11/03 16:21:47 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.87 2017/06/15 13:48:42 bcallah Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- @@ -81,6 +81,8 @@ char scommt[MAXCCHARS+1] = {SCOMMT}; /* start characte char ecommt[MAXCCHARS+1] = {ECOMMT}; /* end character for comment */ int synch_lines = 0; /* line synchronisation for C preprocessor */ int prefix_builtins = 0; /* -P option to prefix builtin keywords */ +int error_warns = 0; /* -E option to make warnings exit_code = 1 */ +int fatal_warns = 0; /* -E -E option to make warnings fatal */ struct keyblk { const char *knam; /* keyword name */ @@ -186,7 +188,7 @@ main(int argc, char *argv[]) outfile = NULL; resizedivs(MAXOUT); - while ((c = getopt(argc, argv, "gst:d:D:U:o:I:P")) != -1) + while ((c = getopt(argc, argv, "gst:d:D:EU:o:I:P")) != -1) switch(c) { case 'D': /* define something..*/ @@ -196,6 +198,12 @@ main(int argc, char *argv[]) if (*p) *p++ = EOS; dodefine(optarg, p); + break; + case 'E': /* like GNU m4 1.4.9+ */ + if (error_warns == 0) + error_warns = 1; + else + fatal_warns = 1; break; case 'I': addtoincludepath(optarg); Modified: head/usr.bin/m4/misc.c ============================================================================== --- head/usr.bin/m4/misc.c Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/misc.c Mon Sep 9 15:18:04 2019 (r352065) @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.46 2015/12/07 14:12:46 espie Exp $ */ +/* $OpenBSD: misc.c,v 1.47 2017/06/15 13:48:42 bcallah Exp $ */ /* $NetBSD: misc.c,v 1.6 1995/09/28 05:37:41 tls Exp $ */ /*- @@ -386,7 +386,7 @@ xstrdup(const char *s) void usage(void) { - fprintf(stderr, "usage: m4 [-gPs] [-Dname[=value]] [-d flags] " + fprintf(stderr, "usage: m4 [-EgPs] [-Dname[=value]] [-d flags] " "[-I dirname] [-o filename]\n" "\t[-t macro] [-Uname] [file ...]\n"); exit(1); Modified: head/usr.bin/m4/tokenizer.l ============================================================================== --- head/usr.bin/m4/tokenizer.l Mon Sep 9 14:56:06 2019 (r352064) +++ head/usr.bin/m4/tokenizer.l Mon Sep 9 15:18:04 2019 (r352065) @@ -1,6 +1,6 @@ %option nounput noinput %{ -/* $OpenBSD: tokenizer.l,v 1.8 2012/04/12 17:00:11 espie Exp $ */ +/* $OpenBSD: tokenizer.l,v 1.9 2017/06/15 13:48:42 bcallah Exp $ */ /* * Copyright (c) 2004 Marc Espie * @@ -25,6 +25,7 @@ #include #include +extern void m4_warnx(const char *, ...); extern int mimic_gnu; extern int32_t yylval; @@ -72,7 +73,7 @@ number(void) l = strtol(yytext, NULL, 0); if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) || l > INT32_MAX || l < INT32_MIN) { - fprintf(stderr, "m4: numeric overflow in expr: %s\n", yytext); + m4_warnx("numeric overflow in expr: %s", yytext); } return l; } @@ -88,7 +89,7 @@ parse_radix(void) l = 0; base = strtol(yytext+2, &next, 0); if (base > 36 || next == NULL) { - fprintf(stderr, "m4: error in number %s\n", yytext); + m4_warnx("error in number %s", yytext); } else { next++; while (*next != 0) { @@ -101,8 +102,7 @@ parse_radix(void) d = *next - 'A' + 10; } if (d >= base) { - fprintf(stderr, - "m4: error in number %s\n", yytext); + m4_warnx("error in number %s", yytext); return 0; } l = base * l + d; From owner-svn-src-head@freebsd.org Mon Sep 9 15:20:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A48EED5154; Mon, 9 Sep 2019 15:20:20 +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 46RsKw3tMJz45rd; Mon, 9 Sep 2019 15:20:20 +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 686B8F8C3; Mon, 9 Sep 2019 15:20:20 +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 x89FKKUs098872; Mon, 9 Sep 2019 15:20:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FKJrF098870; Mon, 9 Sep 2019 15:20:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909091520.x89FKJrF098870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 9 Sep 2019 15:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352066 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 352066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:20:20 -0000 Author: bapt Date: Mon Sep 9 15:20:19 2019 New Revision: 352066 URL: https://svnweb.freebsd.org/changeset/base/352066 Log: Import from OpenBSD a patch which eliminates the link with -ly or -ly patch by ibara@ Obtained from: OpenBSD Modified: head/usr.bin/m4/Makefile head/usr.bin/m4/tokenizer.l Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Mon Sep 9 15:18:04 2019 (r352065) +++ head/usr.bin/m4/Makefile Mon Sep 9 15:20:19 2019 (r352066) @@ -8,7 +8,7 @@ PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${SRCTOP}/lib/libopenbsd -LIBADD= y l m openbsd +LIBADD= m openbsd NO_WMISSING_VARIABLE_DECLARATIONS= Modified: head/usr.bin/m4/tokenizer.l ============================================================================== --- head/usr.bin/m4/tokenizer.l Mon Sep 9 15:18:04 2019 (r352065) +++ head/usr.bin/m4/tokenizer.l Mon Sep 9 15:20:19 2019 (r352066) @@ -43,6 +43,8 @@ oct 0[0-7]* dec [1-9][0-9]* radix 0[rR][0-9]+:[0-9a-zA-Z]+ +%option noyywrap + %% {ws} {/* just skip it */} {hex}|{oct}|{dec} { yylval = number(); return(NUMBER); } From owner-svn-src-head@freebsd.org Mon Sep 9 15:24:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF951D54F5; Mon, 9 Sep 2019 15:24:49 +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 46RsR54C7Mz46ZH; Mon, 9 Sep 2019 15:24:49 +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 6F70EFA77; Mon, 9 Sep 2019 15:24:49 +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 x89FOnLo004656; Mon, 9 Sep 2019 15:24:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FOnpC004655; Mon, 9 Sep 2019 15:24:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909091524.x89FOnpC004655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 9 Sep 2019 15:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352067 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 352067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:24:49 -0000 Author: bapt Date: Mon Sep 9 15:24:48 2019 New Revision: 352067 URL: https://svnweb.freebsd.org/changeset/base/352067 Log: m4: import patch from OpenBSD Use waitpid()/EINTR idiom for the specific pid, rather than generic wait() Patch by: deraadt@ Obtained from: OpenBSD Modified: head/usr.bin/m4/gnum4.c Modified: head/usr.bin/m4/gnum4.c ============================================================================== --- head/usr.bin/m4/gnum4.c Mon Sep 9 15:20:19 2019 (r352066) +++ head/usr.bin/m4/gnum4.c Mon Sep 9 15:24:48 2019 (r352067) @@ -1,4 +1,4 @@ -/* $OpenBSD: gnum4.c,v 1.51 2017/06/15 13:48:42 bcallah Exp $ */ +/* $OpenBSD: gnum4.c,v 1.52 2017/08/21 21:41:13 deraadt Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause @@ -634,7 +634,7 @@ void doesyscmd(const char *cmd) { int p[2]; - pid_t pid, cpid; + pid_t cpid; char *argv[4]; int cc; int status; @@ -672,8 +672,10 @@ doesyscmd(const char *cmd) } while (cc > 0 || (cc == -1 && errno == EINTR)); (void) close(p[0]); - while ((pid = wait(&status)) != cpid && pid >= 0) - continue; + while (waitpid(cpid, &status, 0) == -1) { + if (errno != EINTR) + break; + } pbstr(getstring()); } } From owner-svn-src-head@freebsd.org Mon Sep 9 15:28:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45394D55EA; Mon, 9 Sep 2019 15:28:23 +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 46RsWC0kC9z46pX; Mon, 9 Sep 2019 15:28:23 +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 F1057FA83; Mon, 9 Sep 2019 15:28: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 x89FSM3N004965; Mon, 9 Sep 2019 15:28:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FSMd6004964; Mon, 9 Sep 2019 15:28:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909091528.x89FSMd6004964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 9 Sep 2019 15:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352068 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 352068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:28:23 -0000 Author: bapt Date: Mon Sep 9 15:28:22 2019 New Revision: 352068 URL: https://svnweb.freebsd.org/changeset/base/352068 Log: m4: import patch from OpenBSD by espie@ ifelse is special, fix argv parsing to avoid segfault problem noticed by Matthew Green (netbsd), slightly different fix so that argc counting makes more sense. we might want to warn on wrong number of parameters later, but this is somewhat inconsistent depending on the builtin right now. okay millert@ Obtained from: OpenBSD Modified: head/usr.bin/m4/eval.c Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Mon Sep 9 15:24:48 2019 (r352067) +++ head/usr.bin/m4/eval.c Mon Sep 9 15:28:22 2019 (r352068) @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.75 2017/06/15 13:48:42 bcallah Exp $ */ +/* $OpenBSD: eval.c,v 1.76 2017/10/23 15:21:19 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /*- @@ -201,8 +201,7 @@ expand_builtin(const char *argv[], int argc, int td) } case IFELTYPE: - if (argc > 4) - doifelse(argv, argc); + doifelse(argv, argc); break; case IFDFTYPE: @@ -695,17 +694,17 @@ dotrace(const char *argv[], int argc, int on) static void doifelse(const char *argv[], int argc) { - cycle { - if (STREQ(argv[2], argv[3])) + while (argc > 4) { + if (STREQ(argv[2], argv[3])) { pbstr(argv[4]); - else if (argc == 6) + break; + } else if (argc == 6) { pbstr(argv[5]); - else if (argc > 6) { + break; + } else { argv += 3; argc -= 3; - continue; } - break; } } From owner-svn-src-head@freebsd.org Mon Sep 9 15:35:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61186D594B; Mon, 9 Sep 2019 15:35:35 +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 46RsgW1dkVz47FZ; Mon, 9 Sep 2019 15:35:35 +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 02939FC5E; Mon, 9 Sep 2019 15:35:35 +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 x89FZYWK010604; Mon, 9 Sep 2019 15:35:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FZYQ3010603; Mon, 9 Sep 2019 15:35:34 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909091535.x89FZYQ3010603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 9 Sep 2019 15:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352069 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 352069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:35:35 -0000 Author: bapt Date: Mon Sep 9 15:35:34 2019 New Revision: 352069 URL: https://svnweb.freebsd.org/changeset/base/352069 Log: m4: import from OpenBSD patch by espie@ replace sloppy parsing of numeric values with strtonum (incr, decr, divert) still use integers, so use the natural bounds for these. POSIX says m4 should error when these use non numeric values, and now they do. okay millert@ Obtained from: OpenBSD Modified: head/usr.bin/m4/eval.c Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Mon Sep 9 15:28:22 2019 (r352068) +++ head/usr.bin/m4/eval.c Mon Sep 9 15:35:34 2019 (r352069) @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.76 2017/10/23 15:21:19 espie Exp $ */ +/* $OpenBSD: eval.c,v 1.77 2017/11/11 12:55:59 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /*- @@ -126,6 +126,7 @@ void expand_builtin(const char *argv[], int argc, int td) { int c, n; + const char *errstr; int ac; static int sysval = 0; @@ -186,13 +187,15 @@ expand_builtin(const char *argv[], int argc, int td) if (argc > 3) { base = strtonum(argv[3], 2, 36, &errstr); if (errstr) { - m4errx(1, "expr: base %s invalid.", argv[3]); + m4errx(1, "expr: base is %s: %s.", + errstr, argv[3]); } } if (argc > 4) { maxdigits = strtonum(argv[4], 0, INT_MAX, &errstr); if (errstr) { - m4errx(1, "expr: maxdigits %s invalid.", argv[4]); + m4errx(1, "expr: maxdigits is %s: %s.", + errstr, argv[4]); } } if (argc > 2) @@ -231,8 +234,13 @@ expand_builtin(const char *argv[], int argc, int td) * doincr - increment the value of the * argument */ - if (argc > 2) - pbnum(atoi(argv[2]) + 1); + if (argc > 2) { + n = strtonum(argv[2], INT_MIN, INT_MAX-1, &errstr); + if (errstr != NULL) + m4errx(1, "incr: argument is %s: %s.", + errstr, argv[2]); + pbnum(n + 1); + } break; case DECRTYPE: @@ -240,8 +248,13 @@ expand_builtin(const char *argv[], int argc, int td) * dodecr - decrement the value of the * argument */ - if (argc > 2) - pbnum(atoi(argv[2]) - 1); + if (argc > 2) { + n = strtonum(argv[2], INT_MIN+1, INT_MAX, &errstr); + if (errstr) + m4errx(1, "decr: argument is %s: %s.", + errstr, argv[2]); + pbnum(n - 1); + } break; case SYSCTYPE: @@ -342,12 +355,18 @@ expand_builtin(const char *argv[], int argc, int td) break; case DIVRTYPE: - if (argc > 2 && (n = atoi(argv[2])) != 0) - dodiv(n); - else { - active = stdout; - oindex = 0; + if (argc > 2) { + n = strtonum(argv[2], INT_MIN, INT_MAX, &errstr); + if (errstr) + m4errx(1, "divert: argument is %s: %s.", + errstr, argv[2]); + if (n != 0) { + dodiv(n); + break; + } } + active = stdout; + oindex = 0; break; case UNDVTYPE: From owner-svn-src-head@freebsd.org Mon Sep 9 15:37:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9370AD59DD; Mon, 9 Sep 2019 15:37:41 +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 46Rsjx31Vxz47Nj; Mon, 9 Sep 2019 15:37:41 +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 47276FC5F; Mon, 9 Sep 2019 15:37:41 +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 x89Fbf8N010736; Mon, 9 Sep 2019 15:37:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FbfIV010735; Mon, 9 Sep 2019 15:37:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909091537.x89FbfIV010735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 9 Sep 2019 15:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352070 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 352070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:37:41 -0000 Author: bapt Date: Mon Sep 9 15:37:40 2019 New Revision: 352070 URL: https://svnweb.freebsd.org/changeset/base/352070 Log: m4: import from OpenBSD By deraadt@ mkstemp() returns -1 on failure Obtained from: OpenBSD Modified: head/usr.bin/m4/eval.c Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Mon Sep 9 15:35:34 2019 (r352069) +++ head/usr.bin/m4/eval.c Mon Sep 9 15:37:40 2019 (r352070) @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.77 2017/11/11 12:55:59 espie Exp $ */ +/* $OpenBSD: eval.c,v 1.78 2019/06/28 05:35:34 deraadt Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /*- @@ -846,7 +846,7 @@ dodiv(int n) if (outfile[n] == NULL) { char fname[] = _PATH_DIVNAME; - if ((fd = mkstemp(fname)) < 0 || + if ((fd = mkstemp(fname)) == -1 || unlink(fname) == -1 || (outfile[n] = fdopen(fd, "w+")) == NULL) err(1, "%s: cannot divert", fname); From owner-svn-src-head@freebsd.org Mon Sep 9 15:57:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8497ED6376; Mon, 9 Sep 2019 15:57:25 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rt8j2Ctlz48QS; Mon, 9 Sep 2019 15:57:25 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1193EFFDB; Mon, 9 Sep 2019 15:57:25 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89FvOqw022488; Mon, 9 Sep 2019 15:57:24 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89FvOwd022487; Mon, 9 Sep 2019 15:57:24 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201909091557.x89FvOwd022487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 9 Sep 2019 15:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352071 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 352071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 15:57:25 -0000 Author: kp Date: Mon Sep 9 15:57:24 2019 New Revision: 352071 URL: https://svnweb.freebsd.org/changeset/base/352071 Log: riscv: Ensure that BSS is 8-byte aligned This makes clearing it (from locore.S) work without misaligned accesses (which can trap to machine mode, and be slow). Reviewed by: br Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D21538 Modified: head/sys/conf/ldscript.riscv Modified: head/sys/conf/ldscript.riscv ============================================================================== --- head/sys/conf/ldscript.riscv Mon Sep 9 15:37:40 2019 (r352070) +++ head/sys/conf/ldscript.riscv Mon Sep 9 15:57:24 2019 (r352071) @@ -99,7 +99,7 @@ SECTIONS /* Ensure __bss_start is associated with the next section in case orphan sections are placed directly after .sdata, as has been seen to happen with LLD. */ - . = .; + . = ALIGN(8); __bss_start = .; .sbss : { *(.sbss) *(.scommon) } .bss : From owner-svn-src-head@freebsd.org Mon Sep 9 16:07:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3394FD691F; Mon, 9 Sep 2019 16:07:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RtNh0YM9z497H; Mon, 9 Sep 2019 16:07:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9FAB181AD; Mon, 9 Sep 2019 16:07:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89G7lg2028619; Mon, 9 Sep 2019 16:07:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89G7l2x028617; Mon, 9 Sep 2019 16:07:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201909091607.x89G7l2x028617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 9 Sep 2019 16:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352072 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 352072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 16:07:48 -0000 Author: tuexen Date: Mon Sep 9 16:07:47 2019 New Revision: 352072 URL: https://svnweb.freebsd.org/changeset/base/352072 Log: Only update SACK/DSACK lists when a non-empty segment was received. This fixes hitting a KASSERT with a valid packet exchange. Reviewed by: rrs@, Richard Scheffenegger MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D21567 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Sep 9 15:57:24 2019 (r352071) +++ head/sys/netinet/tcp_input.c Mon Sep 9 16:07:47 2019 (r352072) @@ -3045,9 +3045,8 @@ dodata: /* XXX */ thflags = tcp_reass(tp, th, &temp, &tlen, m); tp->t_flags |= TF_ACKNOW; } - if (tp->t_flags & TF_SACK_PERMIT) { - if (((tlen == 0) && (save_tlen > 0) && - (SEQ_LT(save_start, save_rnxt)))) { + if ((tp->t_flags & TF_SACK_PERMIT) && (save_tlen > 0)) { + if ((tlen == 0) && (SEQ_LT(save_start, save_rnxt))) { /* * DSACK actually handled in the fastpath * above. @@ -3055,20 +3054,20 @@ dodata: /* XXX */ tcp_update_sack_list(tp, save_start, save_start + save_tlen); } else if ((tlen > 0) && SEQ_GT(tp->rcv_nxt, save_rnxt)) { - /* - * Cleaning sackblks by using zero length - * update. - */ if ((tp->rcv_numsacks >= 1) && (tp->sackblks[0].end == save_start)) { - /* partial overlap, recorded at todrop above */ - tcp_update_sack_list(tp, tp->sackblks[0].start, + /* + * Partial overlap, recorded at todrop + * above. + */ + tcp_update_sack_list(tp, + tp->sackblks[0].start, tp->sackblks[0].end); } else { tcp_update_dsack_list(tp, save_start, save_start + save_tlen); } - } else if ((tlen > 0) && (tlen >= save_tlen)) { + } else if (tlen >= save_tlen) { /* Update of sackblks. */ tcp_update_dsack_list(tp, save_start, save_start + save_tlen); Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Mon Sep 9 15:57:24 2019 (r352071) +++ head/sys/netinet/tcp_stacks/rack.c Mon Sep 9 16:07:47 2019 (r352072) @@ -4942,35 +4942,36 @@ dodata: /* XXX */ thflags = tcp_reass(tp, th, &temp, &tlen, m); tp->t_flags |= TF_ACKNOW; } - if (((tlen == 0) && (save_tlen > 0) && - (SEQ_LT(save_start, save_rnxt)))) { - /* - * DSACK actually handled in the fastpath - * above. - */ - tcp_update_sack_list(tp, save_start, - save_start + save_tlen); - } else if ((tlen > 0) && SEQ_GT(tp->rcv_nxt, save_rnxt)) { - /* - * Cleaning sackblks by using zero length - * update. - */ - if ((tp->rcv_numsacks >= 1) && - (tp->sackblks[0].end == save_start)) { - /* partial overlap, recorded at todrop above */ - tcp_update_sack_list(tp, tp->sackblks[0].start, - tp->sackblks[0].end); - } else { + if ((tp->t_flags & TF_SACK_PERMIT) && (save_tlen > 0)) { + if ((tlen == 0) && (SEQ_LT(save_start, save_rnxt))) { + /* + * DSACK actually handled in the fastpath + * above. + */ + tcp_update_sack_list(tp, save_start, + save_start + save_tlen); + } else if ((tlen > 0) && SEQ_GT(tp->rcv_nxt, save_rnxt)) { + if ((tp->rcv_numsacks >= 1) && + (tp->sackblks[0].end == save_start)) { + /* + * Partial overlap, recorded at todrop + * above. + */ + tcp_update_sack_list(tp, + tp->sackblks[0].start, + tp->sackblks[0].end); + } else { + tcp_update_dsack_list(tp, save_start, + save_start + save_tlen); + } + } else if (tlen >= save_tlen) { + /* Update of sackblks. */ tcp_update_dsack_list(tp, save_start, save_start + save_tlen); + } else if (tlen > 0) { + tcp_update_dsack_list(tp, save_start, + save_start + tlen); } - } else if ((tlen > 0) && (tlen >= save_tlen)) { - /* Update of sackblks. */ - tcp_update_dsack_list(tp, save_start, - save_start + save_tlen); - } else if (tlen > 0) { - tcp_update_dsack_list(tp, save_start, - save_start + tlen); } } else { m_freem(m); From owner-svn-src-head@freebsd.org Mon Sep 9 16:25:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 690F2D73D4; Mon, 9 Sep 2019 16:25:10 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rtmk2BN4z4BgV; Mon, 9 Sep 2019 16:25:10 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AA551854F; Mon, 9 Sep 2019 16:25:10 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89GPA1C040572; Mon, 9 Sep 2019 16:25:10 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89GPAGK040571; Mon, 9 Sep 2019 16:25:10 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201909091625.x89GPAGK040571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 9 Sep 2019 16:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352073 - head/lib/csu/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/lib/csu/riscv X-SVN-Commit-Revision: 352073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 16:25:10 -0000 Author: kp Date: Mon Sep 9 16:25:09 2019 New Revision: 352073 URL: https://svnweb.freebsd.org/changeset/base/352073 Log: csu: Add the riscv .init call sequence Reviewed by: br Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D21537 Modified: head/lib/csu/riscv/crt.h Modified: head/lib/csu/riscv/crt.h ============================================================================== --- head/lib/csu/riscv/crt.h Mon Sep 9 16:07:47 2019 (r352072) +++ head/lib/csu/riscv/crt.h Mon Sep 9 16:25:09 2019 (r352073) @@ -1,2 +1,9 @@ /* $FreeBSD$ */ -/* Empty so we can include this unconditionally */ + +#ifndef _CRT_H_ +#define _CRT_H_ + +#define HAVE_CTORS +#define INIT_CALL_SEQ(func) "call " __STRING(func) + +#endif From owner-svn-src-head@freebsd.org Mon Sep 9 16:31:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7634BD7653; Mon, 9 Sep 2019 16:31:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rtvl2YZVz4C49; Mon, 9 Sep 2019 16:31:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B2FB1858D; Mon, 9 Sep 2019 16:31:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89GVFaS044090; Mon, 9 Sep 2019 16:31:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89GVE2A044088; Mon, 9 Sep 2019 16:31:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909091631.x89GVE2A044088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 9 Sep 2019 16:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352074 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 352074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 16:31:15 -0000 Author: cem Date: Mon Sep 9 16:31:14 2019 New Revision: 352074 URL: https://svnweb.freebsd.org/changeset/base/352074 Log: ddb(4): Enhance lexer functionality for specialized commands Add a db_read_token_flags() variant of db_read_token() with configurable parameters. Allow specifying an explicit radix for tNUMBER lexing. It overrides the default inference and db_radix setting. Also provide the option of yielding any lexed whitespace (tWSPACE) (instead of ignoring it). This is useful for whitespace-sensitive CS_OWN commands. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D21459 Modified: head/sys/ddb/db_lex.c head/sys/ddb/db_lex.h Modified: head/sys/ddb/db_lex.c ============================================================================== --- head/sys/ddb/db_lex.c Mon Sep 9 16:25:09 2019 (r352073) +++ head/sys/ddb/db_lex.c Mon Sep 9 16:31:14 2019 (r352074) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -45,7 +46,7 @@ __FBSDID("$FreeBSD$"); static char db_line[DB_MAXLINE]; static char * db_lp, *db_endlp; -static int db_lex(void); +static int db_lex(int); static void db_flush_line(void); static int db_read_char(void); static void db_unread_char(int); @@ -124,23 +125,24 @@ db_unread_char(c) static int db_look_token = 0; void -db_unread_token(t) - int t; +db_unread_token(int t) { db_look_token = t; } int -db_read_token() +db_read_token_flags(int flags) { int t; + MPASS((flags & ~(DRT_VALID_FLAGS_MASK)) == 0); + if (db_look_token) { t = db_look_token; db_look_token = 0; } else - t = db_lex(); + t = db_lex(flags); return (t); } @@ -158,22 +160,46 @@ db_flush_lex(void) } static int -db_lex(void) +db_lex(int flags) { - int c; + int c, n, radix_mode; + bool lex_wspace; + switch (flags & DRT_RADIX_MASK) { + case DRT_DEFAULT_RADIX: + radix_mode = -1; + break; + case DRT_OCTAL: + radix_mode = 8; + break; + case DRT_DECIMAL: + radix_mode = 10; + break; + case DRT_HEXADECIMAL: + radix_mode = 16; + break; + } + + lex_wspace = ((flags & DRT_WSPACE) != 0); + c = db_read_char(); - while (c <= ' ' || c > '~') { + for (n = 0; c <= ' ' || c > '~'; n++) { if (c == '\n' || c == -1) return (tEOL); c = db_read_char(); } + if (lex_wspace && n != 0) { + db_unread_char(c); + return (tWSPACE); + } if (c >= '0' && c <= '9') { /* number */ int r, digit = 0; - if (c > '0') + if (radix_mode != -1) + r = radix_mode; + else if (c > '0') r = db_radix; else { c = db_read_char(); Modified: head/sys/ddb/db_lex.h ============================================================================== --- head/sys/ddb/db_lex.h Mon Sep 9 16:25:09 2019 (r352073) +++ head/sys/ddb/db_lex.h Mon Sep 9 16:31:14 2019 (r352074) @@ -38,13 +38,51 @@ /* * Lexical analyzer. */ + +/* + * Options and flags can configure db_read_token() => db_lex() behavior. + * + * When a radix other than DRT_DEFAULT_RADIX is used, it overrides + * auto-detection, as well as the user-specified db_radix, in db_lex() of + * 'tNUMBER' tokens. + */ +enum { + /* Infer or use db_radix using the old logic. */ + DRT_DEFAULT_RADIX = 0, + /* The following set an explicit base for tNUMBER lex. */ + DRT_OCTAL, + DRT_DECIMAL, + DRT_HEXADECIMAL, +}; +#define DRT_RADIX_MASK 0x3 +/* + * Flag bit powers of two for db_read_token_flags. + * The low 2 bits are reserved for radix selection. + */ +enum { + _DRT_WSPACE = 2, +}; +#ifndef BIT +#define BIT(n) (1ull << (n)) +#endif +enum { + DRT_WSPACE = BIT(_DRT_WSPACE), +}; +#define DRT_VALID_FLAGS_MASK ((int)DRT_RADIX_MASK | DRT_WSPACE) + void db_flush_lex(void); char *db_get_line(void); void db_inject_line(const char *command); int db_read_line(void); -int db_read_token(void); +int db_read_token_flags(int); void db_unread_token(int t); +static inline int +db_read_token(void) +{ + return (db_read_token_flags(0)); +} + extern db_expr_t db_tok_number; #define TOK_STRING_SIZE 120 extern char db_tok_string[TOK_STRING_SIZE]; @@ -84,5 +122,6 @@ extern char db_tok_string[TOK_STRING_SIZE]; #define tSTRING 32 #define tQUESTION 33 #define tBIT_NOT 34 +#define tWSPACE 35 #endif /* !_DDB_DB_LEX_H_ */ From owner-svn-src-head@freebsd.org Mon Sep 9 16:32:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8D61D77CD; Mon, 9 Sep 2019 16:32:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rtx44qJnz4CQK; Mon, 9 Sep 2019 16:32:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87A0E18715; Mon, 9 Sep 2019 16:32:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89GWOXd046171; Mon, 9 Sep 2019 16:32:24 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89GWOhK045835; Mon, 9 Sep 2019 16:32:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909091632.x89GWOhK045835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 9 Sep 2019 16:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352075 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 352075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 16:32:24 -0000 Author: cem Date: Mon Sep 9 16:32:23 2019 New Revision: 352075 URL: https://svnweb.freebsd.org/changeset/base/352075 Log: ddb(4): Add some support for lexing IPv6 addresses Allow commands to specify that (hex) numbers may start with A-F, by adding the DRT_HEX flag for db_read_token_flags(). As before, numbers containing invalid digits for the current radix are rejected. Also, lex ':' and '::' tokens as tCOLON and tCOLONCOLON respectively. There is a mild conflict here with lexed "identifiers" (tIDENT): ddb identifiers may contain arbitrary colons, and the ddb lexer is greedy. So the identifier lex will swallow any colons it finds inside identifiers, and consumers are still unable to expect the token sequence 'tIDENT tCOLON'. That limitation does not matter for IPv6 addresses, because the lexer always attempts to lex numbers before identifiers. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D21509 Modified: head/sys/ddb/db_lex.c head/sys/ddb/db_lex.h Modified: head/sys/ddb/db_lex.c ============================================================================== --- head/sys/ddb/db_lex.c Mon Sep 9 16:31:14 2019 (r352074) +++ head/sys/ddb/db_lex.c Mon Sep 9 16:32:23 2019 (r352075) @@ -163,7 +163,7 @@ static int db_lex(int flags) { int c, n, radix_mode; - bool lex_wspace; + bool lex_wspace, lex_hex_numbers; switch (flags & DRT_RADIX_MASK) { case DRT_DEFAULT_RADIX: @@ -181,6 +181,7 @@ db_lex(int flags) } lex_wspace = ((flags & DRT_WSPACE) != 0); + lex_hex_numbers = ((flags & DRT_HEX) != 0); c = db_read_char(); for (n = 0; c <= ' ' || c > '~'; n++) { @@ -193,13 +194,16 @@ db_lex(int flags) return (tWSPACE); } - if (c >= '0' && c <= '9') { + if ((c >= '0' && c <= '9') || + (lex_hex_numbers && + ((c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F')))) { /* number */ int r, digit = 0; if (radix_mode != -1) r = radix_mode; - else if (c > '0') + else if (c != '0') r = db_radix; else { c = db_read_char(); @@ -328,6 +332,12 @@ db_lex(int flags) } db_unread_char(c); return (tEXCL); + case ':': + c = db_read_char(); + if (c == ':') + return (tCOLONCOLON); + db_unread_char(c); + return (tCOLON); case ';': return (tSEMI); case '&': Modified: head/sys/ddb/db_lex.h ============================================================================== --- head/sys/ddb/db_lex.h Mon Sep 9 16:31:14 2019 (r352074) +++ head/sys/ddb/db_lex.h Mon Sep 9 16:32:23 2019 (r352075) @@ -58,17 +58,26 @@ enum { /* * Flag bit powers of two for db_read_token_flags. * The low 2 bits are reserved for radix selection. + * + * WSPACE: Yield explicit tWSPACE tokens when one or more whitespace characters + * is consumed. + * HEX: Allow tNUMBER tokens to start with 'A'-'F' without explicit "0x" + * prefix. */ enum { _DRT_WSPACE = 2, + _DRT_HEX, }; #ifndef BIT #define BIT(n) (1ull << (n)) #endif enum { DRT_WSPACE = BIT(_DRT_WSPACE), + DRT_HEX = BIT(_DRT_HEX), }; -#define DRT_VALID_FLAGS_MASK ((int)DRT_RADIX_MASK | DRT_WSPACE) +#define DRT_VALID_FLAGS_MASK ((int)DRT_RADIX_MASK | \ + DRT_WSPACE | \ + DRT_HEX) void db_flush_lex(void); char *db_get_line(void); @@ -123,5 +132,7 @@ extern char db_tok_string[TOK_STRING_SIZE]; #define tQUESTION 33 #define tBIT_NOT 34 #define tWSPACE 35 +#define tCOLON 36 +#define tCOLONCOLON 37 #endif /* !_DDB_DB_LEX_H_ */ From owner-svn-src-head@freebsd.org Mon Sep 9 17:36:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BF62D9622; Mon, 9 Sep 2019 17:36:30 +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 46RwM2076Fz4HW9; Mon, 9 Sep 2019 17:36:30 +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 BEBB3191EC; Mon, 9 Sep 2019 17:36:29 +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 x89HaTBs083666; Mon, 9 Sep 2019 17:36:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89HaTrf083664; Mon, 9 Sep 2019 17:36:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909091736.x89HaTrf083664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Sep 2019 17:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352082 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 352082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 17:36:30 -0000 Author: mav Date: Mon Sep 9 17:36:29 2019 New Revision: 352082 URL: https://svnweb.freebsd.org/changeset/base/352082 Log: Fix number of problems found while testing on SAT devices. - Remove incomplete and dangerous ata_res decoding from ata_do_cmd(). Instead switch all functions that need the result to use get_ata_status(), doing the same, but more careful, also reducing code duplication. - Made get_ata_status() to also decode fixed format sense. In many cases it is still not enough to make it useful, since it can only report results of 28-bit command, but it is slightly better then nothing. - Organize error reporting in ata_do_cmd(), so that if caller specified AP_FLAG_CHK_COND, it is responsible for command errors (non-ioctl ones). - Make HPA/AMA errors not fatal for `identify` subcommand. - Fix reprobe() not being called on HPA/AMA when in quiet mode. - Remove not very useful messages from `format` and `sanitize` commands with -y flag. Once they started, they often can't be stopped any way. MFC after: 5 days Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Mon Sep 9 17:34:18 2019 (r352081) +++ head/sbin/camcontrol/camcontrol.c Mon Sep 9 17:36:29 2019 (r352082) @@ -1751,7 +1751,7 @@ atacapprint(struct ata_params *parm) } static int -scsi_cam_pass_16_send(struct cam_device *device, union ccb *ccb, int quiet) +scsi_cam_pass_16_send(struct cam_device *device, union ccb *ccb) { struct ata_pass_16 *ata_pass_16; struct ata_cmd ata_cmd; @@ -1774,24 +1774,21 @@ scsi_cam_pass_16_send(struct cam_device *device, union ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; if (cam_send_ccb(device, ccb) < 0) { - if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { - warn("error sending ATA %s via pass_16", - ata_op_string(&ata_cmd)); - } + warn("error sending ATA %s via pass_16", ata_op_string(&ata_cmd)); return (1); } + /* + * Consider any non-CAM_REQ_CMP status as error and report it here, + * unless caller set AP_FLAG_CHK_COND, in which case it is reponsible. + */ if (!(ata_pass_16->flags & AP_FLAG_CHK_COND) && (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { - warnx("ATA %s via pass_16 failed", - ata_op_string(&ata_cmd)); - } + warnx("ATA %s via pass_16 failed", ata_op_string(&ata_cmd)); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); } - return (1); } @@ -1800,7 +1797,7 @@ scsi_cam_pass_16_send(struct cam_device *device, union static int -ata_cam_send(struct cam_device *device, union ccb *ccb, int quiet) +ata_cam_send(struct cam_device *device, union ccb *ccb) { if (arglist & CAM_ARG_VERBOSE) { warnx("sending ATA %s with timeout of %u msecs", @@ -1815,24 +1812,21 @@ ata_cam_send(struct cam_device *device, union ccb *ccb ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; if (cam_send_ccb(device, ccb) < 0) { - if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { - warn("error sending ATA %s", - ata_op_string(&(ccb->ataio.cmd))); - } + warn("error sending ATA %s", ata_op_string(&(ccb->ataio.cmd))); return (1); } - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { - warnx("ATA %s failed: %d", - ata_op_string(&(ccb->ataio.cmd)), quiet); - } - + /* + * Consider any non-CAM_REQ_CMP status as error and report it here, + * unless caller set AP_FLAG_CHK_COND, in which case it is reponsible. + */ + if (!(ccb->ataio.cmd.flags & CAM_ATAIO_NEEDRESULT) && + (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + warnx("ATA %s failed", ata_op_string(&(ccb->ataio.cmd))); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); } - return (1); } @@ -1844,7 +1838,7 @@ ata_do_pass_16(struct cam_device *device, union ccb *c u_int32_t flags, u_int8_t protocol, u_int8_t ata_flags, u_int8_t tag_action, u_int8_t command, u_int16_t features, u_int64_t lba, u_int16_t sector_count, u_int8_t *data_ptr, - u_int16_t dxfer_len, int timeout, int quiet) + u_int16_t dxfer_len, int timeout) { if (data_ptr != NULL) { if (flags & CAM_DIR_OUT) @@ -1874,7 +1868,7 @@ ata_do_pass_16(struct cam_device *device, union ccb *c /*sense_len*/SSD_FULL_SIZE, timeout); - return scsi_cam_pass_16_send(device, ccb, quiet); + return scsi_cam_pass_16_send(device, ccb); } static int @@ -1910,50 +1904,10 @@ ata_do_cmd(struct cam_device *device, union ccb *ccb, return (1); if (retval == 1) { - int error; - - /* Try using SCSI Passthrough */ - error = ata_do_pass_16(device, ccb, retries, flags, protocol, + return (ata_do_pass_16(device, ccb, retries, flags, protocol, ata_flags, tag_action, command, features, lba, sector_count, data_ptr, dxfer_len, - timeout, 0); - - if (ata_flags & AP_FLAG_CHK_COND) { - /* Decode ata_res from sense data */ - struct ata_res_pass16 *res_pass16; - struct ata_res *res; - u_int i; - u_int16_t *ptr; - - /* sense_data is 4 byte aligned */ - ptr = (uint16_t*)(uintptr_t)&ccb->csio.sense_data; - for (i = 0; i < sizeof(*res_pass16) / 2; i++) - ptr[i] = le16toh(ptr[i]); - - /* sense_data is 4 byte aligned */ - res_pass16 = (struct ata_res_pass16 *)(uintptr_t) - &ccb->csio.sense_data; - res = &ccb->ataio.res; - res->flags = res_pass16->flags; - res->status = res_pass16->status; - res->error = res_pass16->error; - res->lba_low = res_pass16->lba_low; - res->lba_mid = res_pass16->lba_mid; - res->lba_high = res_pass16->lba_high; - res->device = res_pass16->device; - res->lba_low_exp = res_pass16->lba_low_exp; - res->lba_mid_exp = res_pass16->lba_mid_exp; - res->lba_high_exp = res_pass16->lba_high_exp; - res->sector_count = res_pass16->sector_count; - res->sector_count_exp = res_pass16->sector_count_exp; - ccb->ccb_h.status &= ~CAM_STATUS_MASK; - if (res->status & ATA_STATUS_ERROR) - ccb->ccb_h.status |= CAM_ATA_STATUS_ERROR; - else - ccb->ccb_h.status |= CAM_REQ_CMP; - } - - return (error); + timeout)); } CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->ataio); @@ -1974,7 +1928,7 @@ ata_do_cmd(struct cam_device *device, union ccb *ccb, if (ata_flags & AP_FLAG_CHK_COND) ccb->ataio.cmd.flags |= CAM_ATAIO_NEEDRESULT; - return ata_cam_send(device, ccb, 0); + return ata_cam_send(device, ccb); } static void @@ -1994,23 +1948,31 @@ dump_data(uint16_t *ptr, uint32_t len) } static int -atahpa_proc_resp(struct cam_device *device, union ccb *ccb, - int is48bit, u_int64_t *hpasize) +atahpa_proc_resp(struct cam_device *device, union ccb *ccb, u_int64_t *hpasize) { - struct ata_res *res; + uint8_t error = 0, ata_device = 0, status = 0; + uint16_t count = 0; + uint64_t lba = 0; + int retval; - res = &ccb->ataio.res; - if (res->status & ATA_STATUS_ERROR) { + retval = get_ata_status(device, ccb, &error, &count, &lba, &ata_device, + &status); + if (retval == 1) { if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - printf("error = 0x%02x, sector_count = 0x%04x, " - "device = 0x%02x, status = 0x%02x\n", - res->error, res->sector_count, - res->device, res->status); } + warnx("Can't get ATA command status"); + return (retval); + } - if (res->error & ATA_ERROR_ID_NOT_FOUND) { + if (status & ATA_STATUS_ERROR) { + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + + if (error & ATA_ERROR_ID_NOT_FOUND) { warnx("Max address has already been set since " "last power-on or hardware reset"); } @@ -2018,28 +1980,10 @@ atahpa_proc_resp(struct cam_device *device, union ccb return (1); } - if (arglist & CAM_ARG_VERBOSE) { - fprintf(stdout, "%s%d: Raw native max data:\n", - device->device_name, device->dev_unit_num); - /* res is 4 byte aligned */ - dump_data((uint16_t*)(uintptr_t)res, sizeof(struct ata_res)); - - printf("error = 0x%02x, sector_count = 0x%04x, device = 0x%02x, " - "status = 0x%02x\n", res->error, res->sector_count, - res->device, res->status); - } - if (hpasize != NULL) { - if (is48bit) { - *hpasize = (((u_int64_t)((res->lba_high_exp << 16) | - (res->lba_mid_exp << 8) | res->lba_low_exp) << 24) | - ((res->lba_high << 16) | (res->lba_mid << 8) | - res->lba_low)) + 1; - } else { - *hpasize = (((res->device & 0x0f) << 24) | - (res->lba_high << 16) | (res->lba_mid << 8) | - res->lba_low) + 1; - } + if (retval == 2 || retval == 6) + return (1); + *hpasize = lba; } return (0); @@ -2083,7 +2027,7 @@ ata_read_native_max(struct cam_device *device, int ret if (error) return (error); - return atahpa_proc_resp(device, ccb, is48bit, hpasize); + return atahpa_proc_resp(device, ccb, hpasize); } static int @@ -2127,7 +2071,7 @@ atahpa_set_max(struct cam_device *device, int retry_co if (error) return (error); - return atahpa_proc_resp(device, ccb, is48bit, NULL); + return atahpa_proc_resp(device, ccb, NULL); } static int @@ -2135,20 +2079,19 @@ atahpa_password(struct cam_device *device, int retry_c u_int32_t timeout, union ccb *ccb, int is48bit, struct ata_set_max_pwd *pwd) { - int error; u_int cmd; u_int8_t protocol; protocol = AP_PROTO_PIO_OUT; cmd = (is48bit) ? ATA_SET_MAX_ADDRESS48 : ATA_SET_MAX_ADDRESS; - error = ata_do_cmd(device, + return (ata_do_cmd(device, ccb, retry_count, /*flags*/CAM_DIR_OUT, /*protocol*/protocol, /*ata_flags*/AP_FLAG_BYT_BLOK_BLOCKS | - AP_FLAG_TLEN_SECT_CNT | AP_FLAG_CHK_COND, + AP_FLAG_TLEN_SECT_CNT, /*tag_action*/MSG_SIMPLE_Q_TAG, /*command*/cmd, /*features*/ATA_HPA_FEAT_SET_PWD, @@ -2157,31 +2100,25 @@ atahpa_password(struct cam_device *device, int retry_c /*data_ptr*/(u_int8_t*)pwd, /*dxfer_len*/sizeof(*pwd), timeout ? timeout : 1000, - is48bit); - - if (error) - return (error); - - return atahpa_proc_resp(device, ccb, is48bit, NULL); + is48bit)); } static int atahpa_lock(struct cam_device *device, int retry_count, u_int32_t timeout, union ccb *ccb, int is48bit) { - int error; u_int cmd; u_int8_t protocol; protocol = AP_PROTO_NON_DATA; cmd = (is48bit) ? ATA_SET_MAX_ADDRESS48 : ATA_SET_MAX_ADDRESS; - error = ata_do_cmd(device, + return (ata_do_cmd(device, ccb, retry_count, /*flags*/CAM_DIR_NONE, /*protocol*/protocol, - /*ata_flags*/AP_FLAG_CHK_COND, + /*ata_flags*/0, /*tag_action*/MSG_SIMPLE_Q_TAG, /*command*/cmd, /*features*/ATA_HPA_FEAT_LOCK, @@ -2190,12 +2127,7 @@ atahpa_lock(struct cam_device *device, int retry_count /*data_ptr*/NULL, /*dxfer_len*/0, timeout ? timeout : 1000, - is48bit); - - if (error) - return (error); - - return atahpa_proc_resp(device, ccb, is48bit, NULL); + is48bit)); } static int @@ -2203,20 +2135,19 @@ atahpa_unlock(struct cam_device *device, int retry_cou u_int32_t timeout, union ccb *ccb, int is48bit, struct ata_set_max_pwd *pwd) { - int error; u_int cmd; u_int8_t protocol; protocol = AP_PROTO_PIO_OUT; cmd = (is48bit) ? ATA_SET_MAX_ADDRESS48 : ATA_SET_MAX_ADDRESS; - error = ata_do_cmd(device, + return (ata_do_cmd(device, ccb, retry_count, /*flags*/CAM_DIR_OUT, /*protocol*/protocol, /*ata_flags*/AP_FLAG_BYT_BLOK_BLOCKS | - AP_FLAG_TLEN_SECT_CNT | AP_FLAG_CHK_COND, + AP_FLAG_TLEN_SECT_CNT, /*tag_action*/MSG_SIMPLE_Q_TAG, /*command*/cmd, /*features*/ATA_HPA_FEAT_UNLOCK, @@ -2225,31 +2156,25 @@ atahpa_unlock(struct cam_device *device, int retry_cou /*data_ptr*/(u_int8_t*)pwd, /*dxfer_len*/sizeof(*pwd), timeout ? timeout : 1000, - is48bit); - - if (error) - return (error); - - return atahpa_proc_resp(device, ccb, is48bit, NULL); + is48bit)); } static int atahpa_freeze_lock(struct cam_device *device, int retry_count, u_int32_t timeout, union ccb *ccb, int is48bit) { - int error; u_int cmd; u_int8_t protocol; protocol = AP_PROTO_NON_DATA; cmd = (is48bit) ? ATA_SET_MAX_ADDRESS48 : ATA_SET_MAX_ADDRESS; - error = ata_do_cmd(device, + return (ata_do_cmd(device, ccb, retry_count, /*flags*/CAM_DIR_NONE, /*protocol*/protocol, - /*ata_flags*/AP_FLAG_CHK_COND, + /*ata_flags*/0, /*tag_action*/MSG_SIMPLE_Q_TAG, /*command*/cmd, /*features*/ATA_HPA_FEAT_FREEZE, @@ -2258,12 +2183,7 @@ atahpa_freeze_lock(struct cam_device *device, int retr /*data_ptr*/NULL, /*dxfer_len*/0, timeout ? timeout : 1000, - is48bit); - - if (error) - return (error); - - return atahpa_proc_resp(device, ccb, is48bit, NULL); + is48bit)); } static int @@ -2292,7 +2212,7 @@ ata_get_native_max(struct cam_device *device, int retr if (error) return (error); - return atahpa_proc_resp(device, ccb, /*is48bit*/1, nativesize); + return atahpa_proc_resp(device, ccb, nativesize); } static int @@ -2324,21 +2244,20 @@ ataama_set(struct cam_device *device, int retry_count, if (error) return (error); - return atahpa_proc_resp(device, ccb, /*is48bit*/1, NULL); + return atahpa_proc_resp(device, ccb, NULL); } static int ataama_freeze(struct cam_device *device, int retry_count, u_int32_t timeout, union ccb *ccb) { - int error; - error = ata_do_cmd(device, + return (ata_do_cmd(device, ccb, retry_count, /*flags*/CAM_DIR_NONE, /*protocol*/AP_PROTO_NON_DATA | AP_EXTEND, - /*ata_flags*/AP_FLAG_CHK_COND, + /*ata_flags*/0, /*tag_action*/MSG_SIMPLE_Q_TAG, /*command*/ATA_AMAX_ADDR, /*features*/ATA_AMAX_ADDR_FREEZE, @@ -2347,12 +2266,7 @@ ataama_freeze(struct cam_device *device, int retry_cou /*data_ptr*/NULL, /*dxfer_len*/0, timeout ? timeout : 30 * 1000, - /*force48bit*/1); - - if (error) - return (error); - - return atahpa_proc_resp(device, ccb, /*is48bit*/1, NULL); + /*force48bit*/1)); } int @@ -2448,7 +2362,7 @@ ataidentify(struct cam_device *device, int retry_count { union ccb *ccb; struct ata_params *ident_buf; - u_int64_t hpasize, nativesize; + u_int64_t hpasize = 0, nativesize = 0; if ((ccb = cam_getccb(device)) == NULL) { warnx("couldn't allocate CCB"); @@ -2467,22 +2381,12 @@ ataidentify(struct cam_device *device, int retry_count } if (ident_buf->support.command1 & ATA_SUPPORT_PROTECTED) { - if (ata_read_native_max(device, retry_count, timeout, ccb, - ident_buf, &hpasize) != 0) { - cam_freeccb(ccb); - return (1); - } - } else { - hpasize = 0; + ata_read_native_max(device, retry_count, timeout, ccb, + ident_buf, &hpasize); } if (ident_buf->support2 & ATA_SUPPORT_AMAX_ADDR) { - if (ata_get_native_max(device, retry_count, timeout, ccb, - &nativesize) != 0) { - cam_freeccb(ccb); - return (1); - } - } else { - nativesize = 0; + ata_get_native_max(device, retry_count, timeout, ccb, + &nativesize); } printf("%s%d: ", device->device_name, device->dev_unit_num); @@ -3003,10 +2907,11 @@ atahpa(struct cam_device *device, int retry_count, int } if (action == ATA_HPA_ACTION_PRINT) { - error = ata_read_native_max(device, retry_count, timeout, ccb, - ident_buf, &hpasize); - if (error == 0) - atahpa_print(ident_buf, hpasize, 1); + hpasize = 0; + if (ident_buf->support.command1 & ATA_SUPPORT_PROTECTED) + ata_read_native_max(device, retry_count, timeout, ccb, + ident_buf, &hpasize); + atahpa_print(ident_buf, hpasize, 1); cam_freeccb(ccb); free(ident_buf); @@ -3049,12 +2954,14 @@ atahpa(struct cam_device *device, int retry_count, int if (error == 0) { error = atahpa_set_max(device, retry_count, timeout, ccb, is48bit, maxsize, persist); - if (error == 0 && quiet == 0) { - /* redo identify to get new lba values */ - error = ata_do_identify(device, retry_count, - timeout, ccb, - &ident_buf); - atahpa_print(ident_buf, hpasize, 1); + if (error == 0) { + if (quiet == 0) { + /* redo identify to get new values */ + error = ata_do_identify(device, + retry_count, timeout, ccb, + &ident_buf); + atahpa_print(ident_buf, hpasize, 1); + } /* Hint CAM to reprobe the device. */ reprobe(device); } @@ -3170,10 +3077,11 @@ ataama(struct cam_device *device, int retry_count, int } if (action == ATA_AMA_ACTION_PRINT) { - error = ata_get_native_max(device, retry_count, timeout, ccb, + nativesize = 0; + if (ident_buf->support2 & ATA_SUPPORT_AMAX_ADDR) + ata_get_native_max(device, retry_count, timeout, ccb, &nativesize); - if (error == 0) - ataama_print(ident_buf, nativesize, 1); + ataama_print(ident_buf, nativesize, 1); cam_freeccb(ccb); free(ident_buf); @@ -3194,11 +3102,14 @@ ataama(struct cam_device *device, int retry_count, int if (error == 0) { error = ataama_set(device, retry_count, timeout, ccb, maxsize); - if (error == 0 && quiet == 0) { - /* redo identify to get new lba values */ - error = ata_do_identify(device, retry_count, - timeout, ccb, &ident_buf); - ataama_print(ident_buf, nativesize, 1); + if (error == 0) { + if (quiet == 0) { + /* redo identify to get new values */ + error = ata_do_identify(device, + retry_count, timeout, ccb, + &ident_buf); + ataama_print(ident_buf, nativesize, 1); + } /* Hint CAM to reprobe the device. */ reprobe(device); } @@ -5729,16 +5640,21 @@ build_ata_cmd(union ccb *ccb, uint32_t retry_count, ui return (retval); } +/* + * Returns: 0 -- success, 1 -- error, 2 -- lba truncated, + * 4 -- count truncated, 6 -- lba and count truncated. + */ int get_ata_status(struct cam_device *dev, union ccb *ccb, uint8_t *error, uint16_t *count, uint64_t *lba, uint8_t *device, uint8_t *status) { - int retval = 0; + int retval; switch (ccb->ccb_h.func_code) { case XPT_SCSI_IO: { uint8_t opcode; int error_code = 0, sense_key = 0, asc = 0, ascq = 0; + u_int sense_len; /* * In this case, we have SCSI ATA PASS-THROUGH command, 12 @@ -5750,20 +5666,17 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, opcode = ccb->csio.cdb_io.cdb_bytes[0]; if ((opcode != ATA_PASS_12) && (opcode != ATA_PASS_16)) { - retval = 1; warnx("%s: unsupported opcode %02x", __func__, opcode); - goto bailout; + return (1); } retval = scsi_extract_sense_ccb(ccb, &error_code, &sense_key, &asc, &ascq); /* Note: the _ccb() variant returns 0 for an error */ - if (retval == 0) { - retval = 1; - goto bailout; - } else - retval = 0; + if (retval == 0) + return (1); + sense_len = ccb->csio.sense_len - ccb->csio.sense_resid; switch (error_code) { case SSD_DESC_CURRENT_ERROR: case SSD_DESC_DEFERRED_ERROR: { @@ -5774,13 +5687,12 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, sense = (struct scsi_sense_data_desc *) &ccb->csio.sense_data; - desc_ptr = scsi_find_desc(sense, ccb->csio.sense_len - - ccb->csio.sense_resid, SSD_DESC_ATA); + desc_ptr = scsi_find_desc(sense, sense_len, + SSD_DESC_ATA); if (desc_ptr == NULL) { cam_error_print(dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); - retval = 1; - goto bailout; + return (1); } desc = (struct scsi_sense_ata_ret_desc *)desc_ptr; @@ -5812,22 +5724,47 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, } case SSD_CURRENT_ERROR: case SSD_DEFERRED_ERROR: { -#if 0 - struct scsi_sense_data_fixed *sense; -#endif + uint64_t val; + /* - * XXX KDM need to support fixed sense data. + * In my understanding of SAT-5 specification, saying: + * "without interpreting the contents of the STATUS", + * this should not happen if CK_COND was set, but it + * does at least for some devices, so try to revert. */ - warnx("%s: Fixed sense data not supported yet", - __func__); - retval = 1; - goto bailout; - break; /*NOTREACHED*/ + if ((sense_key == SSD_KEY_ABORTED_COMMAND) && + (asc == 0) && (ascq == 0)) { + *status = ATA_STATUS_ERROR; + *error = ATA_ERROR_ABORT; + *device = 0; + *count = 0; + *lba = 0; + return (0); + } + + if ((sense_key != SSD_KEY_RECOVERED_ERROR) || + (asc != 0x00) || (ascq != 0x1d)) + return (1); + + val = 0; + scsi_get_sense_info(&ccb->csio.sense_data, sense_len, + SSD_DESC_INFO, &val, NULL); + *error = (val >> 24) & 0xff; + *status = (val >> 16) & 0xff; + *device = (val >> 8) & 0xff; + *count = val & 0xff; + + val = 0; + scsi_get_sense_info(&ccb->csio.sense_data, sense_len, + SSD_DESC_COMMAND, &val, NULL); + *lba = ((val >> 16) & 0xff) | (val & 0xff00) | + ((val & 0xff) << 16); + + /* Report UPPER NONZERO bits as errors 2, 4 and 6. */ + return ((val >> 28) & 0x06); } default: - retval = 1; - goto bailout; - break; + return (1); } break; @@ -5835,11 +5772,11 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, case XPT_ATA_IO: { struct ata_res *res; - /* - * In this case, we have an ATA command, and we need to - * fill in the requested values from the result register - * set. - */ + /* Only some statuses return ATA result register set. */ + if (cam_ccb_status(ccb) != CAM_REQ_CMP && + cam_ccb_status(ccb) != CAM_ATA_STATUS_ERROR) + return (1); + res = &ccb->ataio.res; *error = res->error; *status = res->status; @@ -5848,7 +5785,7 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, *lba = (res->lba_high << 16) | (res->lba_mid << 8) | (res->lba_low); - if (res->flags & CAM_ATAIO_48BIT) { + if (ccb->ataio.cmd.flags & CAM_ATAIO_48BIT) { *count |= (res->sector_count_exp << 8); *lba |= ((uint64_t)res->lba_low_exp << 24) | ((uint64_t)res->lba_mid_exp << 32) | @@ -5859,11 +5796,9 @@ get_ata_status(struct cam_device *dev, union ccb *ccb, break; } default: - retval = 1; - break; + return (1); } -bailout: - return (retval); + return (0); } static void @@ -6461,7 +6396,7 @@ scsiformat(struct cam_device *device, int argc, char * if (reportonly) goto doreport; - if (quiet == 0) { + if (quiet == 0 && ycount == 0) { fprintf(stdout, "You are about to REMOVE ALL DATA from the " "following device:\n"); @@ -6702,66 +6637,78 @@ scsiformat_bailout: } static int -sanitize_wait_ata(struct cam_device *device, union ccb *ccb, int quiet) +sanitize_wait_ata(struct cam_device *device, union ccb *ccb, int quiet, + camcontrol_devtype devtype) { - struct ata_res *res; int retval; - cam_status status; + uint8_t error = 0, ata_device = 0, status = 0; + uint16_t count = 0; + uint64_t lba = 0; u_int val, perc; do { - retval = ata_do_cmd(device, - ccb, - /*retries*/1, - /*flags*/CAM_DIR_NONE, - /*protocol*/AP_PROTO_NON_DATA | AP_EXTEND, - /*ata_flags*/AP_FLAG_CHK_COND, - /*tag_action*/MSG_SIMPLE_Q_TAG, - /*command*/ATA_SANITIZE, - /*features*/0x00, /* SANITIZE STATUS EXT */ - /*lba*/0, - /*sector_count*/0, - /*data_ptr*/NULL, - /*dxfer_len*/0, - /*timeout*/10000, - /*is48bit*/1); - if (retval < 0) { - warn("error sending CAMIOCOMMAND ioctl"); - if (arglist & CAM_ARG_VERBOSE) { - cam_error_print(device, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); - } + retval = build_ata_cmd(ccb, + /*retries*/ 0, + /*flags*/ CAM_DIR_NONE, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*protocol*/ AP_PROTO_NON_DATA, + /*ata_flags*/ AP_FLAG_CHK_COND, + /*features*/ 0x00, /* SANITIZE STATUS EXT */ + /*sector_count*/ 0, + /*lba*/ 0, + /*command*/ ATA_SANITIZE, + /*auxiliary*/ 0, + /*data_ptr*/ NULL, + /*dxfer_len*/ 0, + /*cdb_storage*/ NULL, + /*cdb_storage_len*/ 0, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ 10000, + /*is48bit*/ 1, + /*devtype*/ devtype); + if (retval != 0) { + warnx("%s: build_ata_cmd() failed, likely " + "programmer error", __func__); return (1); } - status = ccb->ccb_h.status & CAM_STATUS_MASK; - if (status == CAM_REQ_CMP) { - res = &ccb->ataio.res; - if (res->sector_count_exp & 0x40) { - if (quiet == 0) { - val = (res->lba_mid << 8) + res->lba_low; - perc = 10000 * val; - fprintf(stdout, - "Sanitizing: %u.%02u%% (%d/%d)\r", - (perc / (0x10000 * 100)), - ((perc / 0x10000) % 100), - val, 0x10000); - fflush(stdout); - } - sleep(1); - } else if ((res->sector_count_exp & 0x80) == 0) { - warnx("Sanitize complete with an error. "); - return (1); - } else - break; + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + retval = cam_send_ccb(device, ccb); + if (retval != 0) { + warn("error sending SANITIZE STATUS EXT command"); + return (1); + } - } else if (status != CAM_REQ_CMP && status != CAM_REQUEUE_REQ) { - warnx("Unexpected CAM status %#x", status); - if (arglist & CAM_ARG_VERBOSE) - cam_error_print(device, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); + retval = get_ata_status(device, ccb, &error, &count, &lba, + &ata_device, &status); + if (retval != 0) { + warnx("Can't get SANITIZE STATUS EXT status, " + "sanitize may still run."); + return (retval); + } + if (status & ATA_STATUS_ERROR) { + warnx("SANITIZE STATUS EXT failed, " + "sanitize may still run."); return (1); } + if (count & 0x4000) { + if (quiet == 0) { + val = lba & 0xffff; + perc = 10000 * val; + fprintf(stdout, + "Sanitizing: %u.%02u%% (%d/%d)\r", + (perc / (0x10000 * 100)), + ((perc / 0x10000) % 100), + val, 0x10000); + fflush(stdout); + } + sleep(1); + } else if ((count & 0x8000) == 0) { + warnx("Sanitize complete with an error. "); + return (1); + } else + break; } while (1); return (0); } @@ -7041,7 +6988,7 @@ sanitize(struct cam_device *device, int argc, char **a } } - if (quiet == 0) { + if (quiet == 0 && ycount == 0) { fprintf(stdout, "You are about to REMOVE ALL DATA from the " "following device:\n"); @@ -7169,7 +7116,7 @@ sanitize(struct cam_device *device, int argc, char **a retry_count, /*flags*/CAM_DIR_NONE, /*protocol*/AP_PROTO_NON_DATA | AP_EXTEND, - /*ata_flags*/AP_FLAG_CHK_COND, + /*ata_flags*/0, /*tag_action*/MSG_SIMPLE_Q_TAG, /*command*/ATA_SANITIZE, /*features*/feature, @@ -7226,7 +7173,7 @@ doreport: if (dt == CC_DT_SCSI) { error = sanitize_wait_scsi(device, ccb, task_attr, quiet); } else if (dt == CC_DT_ATA || dt == CC_DT_SATL) { - error = sanitize_wait_ata(device, ccb, quiet); + error = sanitize_wait_ata(device, ccb, quiet, dt); } else error = 1; if (error == 0 && quiet == 0) @@ -9199,56 +9146,63 @@ bailout: static int atapm_proc_resp(struct cam_device *device, union ccb *ccb) { - struct ata_res *res; + uint8_t error = 0, ata_device = 0, status = 0; + uint16_t count = 0; + uint64_t lba = 0; + int retval; - res = &ccb->ataio.res; - if (res->status & ATA_STATUS_ERROR) { - if (arglist & CAM_ARG_VERBOSE) { - cam_error_print(device, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); - printf("error = 0x%02x, sector_count = 0x%04x, " - "device = 0x%02x, status = 0x%02x\n", - res->error, res->sector_count, - res->device, res->status); - } + retval = get_ata_status(device, ccb, &error, &count, &lba, &ata_device, + &status); + if (retval == 1) { + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + warnx("Can't get ATA command status"); + return (retval); + } - return (1); - } + if (status & ATA_STATUS_ERROR) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + return (1); + } - if (arglist & CAM_ARG_VERBOSE) { - fprintf(stdout, "%s%d: Raw native check power data:\n", - device->device_name, device->dev_unit_num); - /* res is 4 byte aligned */ - dump_data((uint16_t*)(uintptr_t)res, sizeof(struct ata_res)); + printf("%s%d: ", device->device_name, device->dev_unit_num); + switch (count) { + case 0x00: + printf("Standby mode\n"); + break; + case 0x01: + printf("Standby_y mode\n"); + break; + case 0x40: + printf("NV Cache Power Mode and the spindle is spun down or spinning down\n"); + break; + case 0x41: + printf("NV Cache Power Mode and the spindle is spun up or spinning up\n"); + break; + case 0x80: + printf("Idle mode\n"); + break; + case 0x81: + printf("Idle_a mode\n"); + break; + case 0x82: + printf("Idle_b mode\n"); + break; + case 0x83: + printf("Idle_c mode\n"); + break; + case 0xff: + printf("Active or Idle mode\n"); + break; + default: + printf("Unknown mode 0x%02x\n", count); + break; + } - printf("error = 0x%02x, sector_count = 0x%04x, device = 0x%02x, " - "status = 0x%02x\n", res->error, res->sector_count, - res->device, res->status); - } - - printf("%s%d: ", device->device_name, device->dev_unit_num); - switch (res->sector_count) { - case 0x00: - printf("Standby mode\n"); - break; - case 0x40: - printf("NV Cache Power Mode and the spindle is spun down or spinning down\n"); - break; - case 0x41: - printf("NV Cache Power Mode and the spindle is spun up or spinning up\n"); - break; - case 0x80: - printf("Idle mode\n"); - break; - case 0xff: - printf("Active or Idle mode\n"); - break; - default: - printf("Unknown mode 0x%02x\n", res->sector_count); - break; - } - - return (0); + return (0); } static int From owner-svn-src-head@freebsd.org Mon Sep 9 18:17:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EA4ADAE89; Mon, 9 Sep 2019 18:17:31 +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 46RxGL6YJMz4M4B; Mon, 9 Sep 2019 18:17: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 BFDF419943; Mon, 9 Sep 2019 18:17: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 x89IHUtZ008184; Mon, 9 Sep 2019 18:17:30 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89IHUIi008183; Mon, 9 Sep 2019 18:17:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909091817.x89IHUIi008183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 9 Sep 2019 18:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352092 - head/sbin/bectl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/bectl X-SVN-Commit-Revision: 352092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:17:31 -0000 Author: kevans Date: Mon Sep 9 18:17:30 2019 New Revision: 352092 URL: https://svnweb.freebsd.org/changeset/base/352092 Log: bectl(8): initialize reverse earlier This turns into a warning in GCC 4.2 that 'reverse' may be used uninitialized in this function. While I don't immediately see where it's deciding this from (there's only two paths that make column != NULL, and they both set reverse), initializing reverse earlier is good for clarity. MFC after: 3 days Modified: head/sbin/bectl/bectl_list.c Modified: head/sbin/bectl/bectl_list.c ============================================================================== --- head/sbin/bectl/bectl_list.c Mon Sep 9 18:07:31 2019 (r352091) +++ head/sbin/bectl/bectl_list.c Mon Sep 9 18:17:30 2019 (r352092) @@ -412,6 +412,7 @@ bectl_cmd_list(int argc, char *argv[]) props = NULL; printed = 0; bzero(&pc, sizeof(pc)); + reverse = false; while ((opt = getopt(argc, argv, "aDHsc:C:")) != -1) { switch (opt) { case 'a': @@ -463,10 +464,8 @@ bectl_cmd_list(int argc, char *argv[]) } /* List boot environments in alphabetical order by default */ - if (column == NULL) { + if (column == NULL) column = strdup("name"); - reverse = false; - } prop_list_sort(props, column, reverse); From owner-svn-src-head@freebsd.org Mon Sep 9 18:31:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C298DB716; Mon, 9 Sep 2019 18:31:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46RxZp3dQ7z4N6J; Mon, 9 Sep 2019 18:31:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f51.google.com with SMTP id b136so31132075iof.3; Mon, 09 Sep 2019 11:31:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=dPjwC65Dw8kk+xnc4IxUzGyVYnpw2uP3VQ39HDrW3Pk=; b=YhC8sZIdOB1WRvHWzA2F7FOppQwwKulwqzQBFXsG5nk1bVyNGlMMO+7XliAGYb9fCK 98tJ0S8y6HWPgzoxjUv7OrihCC0TFA/qpV22FU9azJqhg/8SInSSnzrPU4PLlqoGltHk eRWjQZSFDIBCB4GQ6jEU66zLETnW5a0JNJB2cvM/D8VAJDLzK2tkY7ORk6eBEarwhEEl DuIBOj7vs6HJFNY5AjlC/HjQHNtWWzJLCliMU5zQs2avpLvh9QK/y1qxK19NDeYKAbAa gc1WdjyyzlAB/dSPnVA5mO/9GUq3b3th+1haQwVrfWkJm1mUrveyhvNmMdvFL0U04E8o ociQ== X-Gm-Message-State: APjAAAUoSn54iBh+jc5HIZDyA29nkQ2sYbba8i0D5dMvW2Jtat1vDzLY sCjEtPrDJvpgBKnE0FZUzvHCnIst X-Google-Smtp-Source: APXvYqxwp0qGKuS20Jd9Bz6nmXzj002Rxtbim6q/kUlJmaMsmXp5/qQfKYS69RIWf0rtRtzU8U3kPg== X-Received: by 2002:a5e:960f:: with SMTP id a15mr7360448ioq.13.1568053905029; Mon, 09 Sep 2019 11:31:45 -0700 (PDT) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com. [209.85.166.51]) by smtp.gmail.com with ESMTPSA id u10sm16604316ior.81.2019.09.09.11.31.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Sep 2019 11:31:44 -0700 (PDT) Received: by mail-io1-f51.google.com with SMTP id b136so31131900iof.3; Mon, 09 Sep 2019 11:31:44 -0700 (PDT) X-Received: by 2002:a5d:9346:: with SMTP id i6mr9325167ioo.107.1568053904061; Mon, 09 Sep 2019 11:31:44 -0700 (PDT) MIME-Version: 1.0 References: <201909091129.x89BTxvw061871@repo.freebsd.org> In-Reply-To: <201909091129.x89BTxvw061871@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 9 Sep 2019 11:31:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r352059 - head/sys/kern To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 46RxZp3dQ7z4N6J X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:31:46 -0000 What=E2=80=99s the motivation for using more timehands? On Mon, Sep 9, 2019 at 04:30 Konstantin Belousov wrote: > Author: kib > Date: Mon Sep 9 11:29:58 2019 > New Revision: 352059 > URL: https://svnweb.freebsd.org/changeset/base/352059 > > Log: > Make timehands count selectable at boottime. > > Tested by: O'Connor, Daniel > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D21563 > > Modified: > head/sys/kern/kern_tc.c > > Modified: head/sys/kern/kern_tc.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_tc.c Mon Sep 9 11:22:38 2019 (r352058) > +++ head/sys/kern/kern_tc.c Mon Sep 9 11:29:58 2019 (r352059) > @@ -83,19 +83,16 @@ struct timehands { > struct timehands *th_next; > }; > > -static struct timehands th0; > -static struct timehands th1 =3D { > - .th_next =3D &th0 > -}; > -static struct timehands th0 =3D { > +static struct timehands ths[16] =3D { > + [0] =3D { > .th_counter =3D &dummy_timecounter, > .th_scale =3D (uint64_t)-1 / 1000000, > .th_offset =3D { .sec =3D 1 }, > .th_generation =3D 1, > - .th_next =3D &th1 > + }, > }; > > -static struct timehands *volatile timehands =3D &th0; > +static struct timehands *volatile timehands =3D &ths[0]; > struct timecounter *timecounter =3D &dummy_timecounter; > static struct timecounter *timecounters =3D &dummy_timecounter; > > @@ -115,6 +112,10 @@ static int timestepwarnings; > SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, > ×tepwarnings, 0, "Log time steps"); > > +static int timehands_count =3D 2; > +SYSCTL_INT(_kern_timecounter, OID_AUTO, timehands_count, CTLFLAG_RDTUN, > + &timehands_count, 0, "Count of timehands in rotation"); > + > struct bintime bt_timethreshold; > struct bintime bt_tickthreshold; > sbintime_t sbt_timethreshold; > @@ -1960,8 +1961,9 @@ done: > static void > inittimecounter(void *dummy) > { > + struct timehands *thp; > u_int p; > - int tick_rate; > + int i, tick_rate; > > /* > * Set the initial timeout to > @@ -1987,6 +1989,16 @@ inittimecounter(void *dummy) > #ifdef FFCLOCK > ffclock_init(); > #endif > + > + /* Set up the requested number of timehands. */ > + if (timehands_count < 1) > + timehands_count =3D 1; > + if (timehands_count > nitems(ths)) > + timehands_count =3D nitems(ths); > + for (i =3D 1, thp =3D &ths[0]; i < timehands_count; thp =3D &ths= [i++]) > + thp->th_next =3D &ths[i]; > + thp->th_next =3D &ths[0]; > + > /* warm up new timecounter (again) and get rolling. */ > (void)timecounter->tc_get_timecount(timecounter); > (void)timecounter->tc_get_timecount(timecounter); > > From owner-svn-src-head@freebsd.org Mon Sep 9 18:32:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05E36DB7DE; Mon, 9 Sep 2019 18:32:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rxbd6RXWz4NPB; Mon, 9 Sep 2019 18:32:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1ACA19CD2; Mon, 9 Sep 2019 18:32:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89IWTKq019771; Mon, 9 Sep 2019 18:32:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89IWTHj019770; Mon, 9 Sep 2019 18:32:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909091832.x89IWTHj019770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Sep 2019 18:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352095 - head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Commit-Revision: 352095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:32:30 -0000 Author: emaste Date: Mon Sep 9 18:32:29 2019 New Revision: 352095 URL: https://svnweb.freebsd.org/changeset/base/352095 Log: compiler-rt: use more __sanitizer_time_t on FreeBSD A few structs were using long for time_t members. Obtained from: LLVM r370755 Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h Mon Sep 9 18:27:52 2019 (r352094) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h Mon Sep 9 18:32:29 2019 (r352095) @@ -115,15 +115,21 @@ namespace __sanitizer { long key; }; +#if defined(__LP64___) + typedef long long __sanitizer_time_t; +#else + typedef long __sanitizer_time_t; +#endif + struct __sanitizer_shmid_ds { __sanitizer_ipc_perm shm_perm; unsigned long shm_segsz; unsigned int shm_lpid; unsigned int shm_cpid; int shm_nattch; - unsigned long shm_atime; - unsigned long shm_dtime; - unsigned long shm_ctime; + __sanitizer_time_t shm_atime; + __sanitizer_time_t shm_dtime; + __sanitizer_time_t shm_ctime; }; extern unsigned struct_msqid_ds_sz; @@ -154,12 +160,12 @@ namespace __sanitizer { char *pw_passwd; int pw_uid; int pw_gid; - long pw_change; + __sanitizer_time_t pw_change; char *pw_class; char *pw_gecos; char *pw_dir; char *pw_shell; - long pw_expire; + __sanitizer_time_t pw_expire; int pw_fields; }; @@ -169,12 +175,6 @@ namespace __sanitizer { int gr_gid; char **gr_mem; }; - -#if defined(__LP64___) - typedef long long __sanitizer_time_t; -#else - typedef long __sanitizer_time_t; -#endif typedef long __sanitizer_suseconds_t; From owner-svn-src-head@freebsd.org Mon Sep 9 18:33:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6236EDB86E; Mon, 9 Sep 2019 18:33:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46RxcX1vSBz4NXB; Mon, 9 Sep 2019 18:33:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24B9C19CE0; Mon, 9 Sep 2019 18:33:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89IXGSU019872; Mon, 9 Sep 2019 18:33:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89IXGtA019871; Mon, 9 Sep 2019 18:33:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909091833.x89IXGtA019871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Sep 2019 18:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352096 - head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Commit-Revision: 352096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:33:16 -0000 Author: emaste Date: Mon Sep 9 18:33:15 2019 New Revision: 352096 URL: https://svnweb.freebsd.org/changeset/base/352096 Log: compiler-rt: use 64-bit time_t for all FreeBSD archs except i386 Obtained from: LLVM r370756 Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h Mon Sep 9 18:32:29 2019 (r352095) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h Mon Sep 9 18:33:15 2019 (r352096) @@ -115,7 +115,7 @@ namespace __sanitizer { long key; }; -#if defined(__LP64___) +#if !defined(__i386__) typedef long long __sanitizer_time_t; #else typedef long __sanitizer_time_t; From owner-svn-src-head@freebsd.org Mon Sep 9 18:35:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB0CBDB93B; Mon, 9 Sep 2019 18:35:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Rxft41fjz4NgM; Mon, 9 Sep 2019 18:35:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69DCA19CE1; Mon, 9 Sep 2019 18:35:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89IZIg0020023; Mon, 9 Sep 2019 18:35:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89IZIBT020022; Mon, 9 Sep 2019 18:35:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909091835.x89IZIBT020022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Sep 2019 18:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352097 - head/sys/fs/msdosfs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/fs/msdosfs X-SVN-Commit-Revision: 352097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:35:18 -0000 Author: emaste Date: Mon Sep 9 18:35:17 2019 New Revision: 352097 URL: https://svnweb.freebsd.org/changeset/base/352097 Log: msdosfsmount.h: fix ifdef comment Modified: head/sys/fs/msdosfs/msdosfsmount.h Modified: head/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- head/sys/fs/msdosfs/msdosfsmount.h Mon Sep 9 18:33:15 2019 (r352096) +++ head/sys/fs/msdosfs/msdosfsmount.h Mon Sep 9 18:35:17 2019 (r352097) @@ -222,7 +222,7 @@ struct msdosfs_fileno { #define MSDOSFS_ASSERT_MP_LOCKED(pmp) \ lockmgr_assert(&(pmp)->pm_fatlock, KA_XLOCKED) -#endif /* _KERNEL */ +#endif /* _KERNEL || MAKEFS */ #ifndef MAKEFS /* From owner-svn-src-head@freebsd.org Mon Sep 9 18:45:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DFF5DBDB9; Mon, 9 Sep 2019 18:45:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46Rxv51LYQz4PPw; Mon, 9 Sep 2019 18:45:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED0ED19EA6; Mon, 9 Sep 2019 18:45:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89IjqvP026116; Mon, 9 Sep 2019 18:45:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89IjqFY026115; Mon, 9 Sep 2019 18:45:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909091845.x89IjqFY026115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Sep 2019 18:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352099 - head/tools/tools/nanobsd/embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd/embedded X-SVN-Commit-Revision: 352099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:45:53 -0000 Author: imp Date: Mon Sep 9 18:45:52 2019 New Revision: 352099 URL: https://svnweb.freebsd.org/changeset/base/352099 Log: These should have been removed when we removed atmel port before 12. Deleted: head/tools/tools/nanobsd/embedded/sam9260ek.cfg head/tools/tools/nanobsd/embedded/sam9g20ek.cfg From owner-svn-src-head@freebsd.org Mon Sep 9 18:46:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 024F7DBE6A; Mon, 9 Sep 2019 18:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46Rxvm6JtBz4PXt; Mon, 9 Sep 2019 18:46:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC85419EA8; Mon, 9 Sep 2019 18:46:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89IkSdf026203; Mon, 9 Sep 2019 18:46:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89IkSlW026202; Mon, 9 Sep 2019 18:46:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909091846.x89IkSlW026202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 9 Sep 2019 18:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352100 - in head/tools/tools/nanobsd: dhcpd embedded X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/tools/tools/nanobsd: dhcpd embedded X-SVN-Commit-Revision: 352100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:46:29 -0000 Author: imp Date: Mon Sep 9 18:46:28 2019 New Revision: 352100 URL: https://svnweb.freebsd.org/changeset/base/352100 Log: Remove obsolete WITHOUT names that are no longer in the system. Noticed by: swills@ Modified: head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Mon Sep 9 18:45:52 2019 (r352099) +++ head/tools/tools/nanobsd/dhcpd/common Mon Sep 9 18:46:28 2019 (r352100) @@ -103,23 +103,14 @@ CONF_BUILD=" WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true -WITHOUT_BIND_DNSSEC=true -WITHOUT_BIND_ETC=true -WITHOUT_BIND_LIBS_LWRES=true WITHOUT_BLUETOOTH=true WITHOUT_CALENDAR=true -WITHOUT_CVS=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true -WITHOUT_FORTRAN=true WITHOUT_GAMES=true WITHOUT_GCOV=true -WITHOUT_GPIB=true WITHOUT_HTML=true -WITHOUT_I4B=true WITHOUT_IPFILTER=true -WITHOUT_IPX=true -WITHOUT_LIBKSE=true WITHOUT_LOCALES=true WITHOUT_LPR=true WITHOUT_MAN=true @@ -127,7 +118,6 @@ WITHOUT_NETCAT=true WITHOUT_NIS=true WITHOUT_NLS=true WITHOUT_NS_CACHING=true -WITHOUT_OBJC=true WITHOUT_PROFILE=true WITHOUT_SENDMAIL=true WITHOUT_SHAREDOCS=true @@ -142,15 +132,9 @@ NO_INSTALL_MANPAGES=t # The following would help... # WITHOUT_TOOLCHAIN=true can't build ports # WITHOUT_INSTALLLIB=true libgcc.a -# -# from the build -# WITHOUT_INFO=true makeinfo -# WITHOUT_RCS=true PKG_ONLY_MAKE_CONF=" WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true -WITHOUT_INFO=true -WITHOUT_RCS=true " NANO_PACKAGE_ONLY=1 Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Sep 9 18:45:52 2019 (r352099) +++ head/tools/tools/nanobsd/embedded/common Mon Sep 9 18:46:28 2019 (r352100) @@ -134,23 +134,14 @@ LOCAL_XTOOL_DIRS=usr.bin/mkimg WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true -WITHOUT_BIND_DNSSEC=true -WITHOUT_BIND_ETC=true -WITHOUT_BIND_LIBS_LWRES=true WITHOUT_BLUETOOTH=true WITHOUT_CALENDAR=true -WITHOUT_CVS=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true -WITHOUT_FORTRAN=true WITHOUT_GAMES=true WITHOUT_GCOV=true -WITHOUT_GPIB=true WITHOUT_HTML=true -WITHOUT_I4B=true WITHOUT_IPFILTER=true -WITHOUT_IPX=true -WITHOUT_LIBKSE=true WITHOUT_LOCALES=true WITHOUT_LPR=true WITHOUT_MAN=true @@ -158,7 +149,6 @@ WITHOUT_NETCAT=true WITHOUT_NIS=true WITHOUT_NLS=true WITHOUT_NS_CACHING=true -WITHOUT_OBJC=true WITHOUT_PROFILE=true WITHOUT_SENDMAIL=true WITHOUT_SHAREDOCS=true @@ -178,13 +168,9 @@ NO_INSTALL_MANPAGES=t # WITHOUT_INSTALLLIB=true libgcc.a # # from the build -# WITHOUT_INFO=true makeinfo -# WITHOUT_RCS=true PKG_ONLY_MAKE_CONF=" WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true -WITHOUT_INFO=true -WITHOUT_RCS=true " NANO_PACKAGE_ONLY=1 From owner-svn-src-head@freebsd.org Mon Sep 9 18:48:13 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FC44DBF2C; Mon, 9 Sep 2019 18:48:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Rxxn1s6rz4Pgx; Mon, 9 Sep 2019 18:48:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x89Im5Ue083856 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 9 Sep 2019 21:48:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x89Im5Ue083856 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x89Im5iB083855; Mon, 9 Sep 2019 21:48:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 9 Sep 2019 21:48:05 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352059 - head/sys/kern Message-ID: <20190909184805.GV2559@kib.kiev.ua> References: <201909091129.x89BTxvw061871@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46Rxxn1s6rz4Pgx X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 18:48:13 -0000 On Mon, Sep 09, 2019 at 11:31:32AM -0700, Conrad Meyer wrote: > What’s the motivation for using more timehands? See the thread titled 'Is it a good idea to use a usb-serial adapter for PPS input? Yes, it is.' on arm@ and usb@. In short, there are some reports of timecounters misbehaving on single-core systems when only two timehands are enabled. The change eases the experimentation and provides a workaround which does not require modifying the sources to apply. > > On Mon, Sep 9, 2019 at 04:30 Konstantin Belousov wrote: > > > Author: kib > > Date: Mon Sep 9 11:29:58 2019 > > New Revision: 352059 > > URL: https://svnweb.freebsd.org/changeset/base/352059 > > > > Log: > > Make timehands count selectable at boottime. > > > > Tested by: O'Connor, Daniel > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D21563 > > > > Modified: > > head/sys/kern/kern_tc.c > > > > Modified: head/sys/kern/kern_tc.c > > > > ============================================================================== > > --- head/sys/kern/kern_tc.c Mon Sep 9 11:22:38 2019 (r352058) > > +++ head/sys/kern/kern_tc.c Mon Sep 9 11:29:58 2019 (r352059) > > @@ -83,19 +83,16 @@ struct timehands { > > struct timehands *th_next; > > }; > > > > -static struct timehands th0; > > -static struct timehands th1 = { > > - .th_next = &th0 > > -}; > > -static struct timehands th0 = { > > +static struct timehands ths[16] = { > > + [0] = { > > .th_counter = &dummy_timecounter, > > .th_scale = (uint64_t)-1 / 1000000, > > .th_offset = { .sec = 1 }, > > .th_generation = 1, > > - .th_next = &th1 > > + }, > > }; > > > > -static struct timehands *volatile timehands = &th0; > > +static struct timehands *volatile timehands = &ths[0]; > > struct timecounter *timecounter = &dummy_timecounter; > > static struct timecounter *timecounters = &dummy_timecounter; > > > > @@ -115,6 +112,10 @@ static int timestepwarnings; > > SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, > > ×tepwarnings, 0, "Log time steps"); > > > > +static int timehands_count = 2; > > +SYSCTL_INT(_kern_timecounter, OID_AUTO, timehands_count, CTLFLAG_RDTUN, > > + &timehands_count, 0, "Count of timehands in rotation"); > > + > > struct bintime bt_timethreshold; > > struct bintime bt_tickthreshold; > > sbintime_t sbt_timethreshold; > > @@ -1960,8 +1961,9 @@ done: > > static void > > inittimecounter(void *dummy) > > { > > + struct timehands *thp; > > u_int p; > > - int tick_rate; > > + int i, tick_rate; > > > > /* > > * Set the initial timeout to > > @@ -1987,6 +1989,16 @@ inittimecounter(void *dummy) > > #ifdef FFCLOCK > > ffclock_init(); > > #endif > > + > > + /* Set up the requested number of timehands. */ > > + if (timehands_count < 1) > > + timehands_count = 1; > > + if (timehands_count > nitems(ths)) > > + timehands_count = nitems(ths); > > + for (i = 1, thp = &ths[0]; i < timehands_count; thp = &ths[i++]) > > + thp->th_next = &ths[i]; > > + thp->th_next = &ths[0]; > > + > > /* warm up new timecounter (again) and get rolling. */ > > (void)timecounter->tc_get_timecount(timecounter); > > (void)timecounter->tc_get_timecount(timecounter); > > > > From owner-svn-src-head@freebsd.org Mon Sep 9 19:00:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5687DC2E9; Mon, 9 Sep 2019 19:00:37 +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 46RyD53ywmz4QP0; Mon, 9 Sep 2019 19:00:37 +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 6BF881A0A2; Mon, 9 Sep 2019 19:00:37 +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 x89J0bk8033206; Mon, 9 Sep 2019 19:00:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89J0bTh033205; Mon, 9 Sep 2019 19:00:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909091900.x89J0bTh033205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Sep 2019 19:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352103 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 352103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 19:00:37 -0000 Author: mav Date: Mon Sep 9 19:00:37 2019 New Revision: 352103 URL: https://svnweb.freebsd.org/changeset/base/352103 Log: Add one more error message to r352082. MFC after: 5 days Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Mon Sep 9 18:57:17 2019 (r352102) +++ head/sbin/camcontrol/camcontrol.c Mon Sep 9 19:00:37 2019 (r352103) @@ -1975,7 +1975,8 @@ atahpa_proc_resp(struct cam_device *device, union ccb if (error & ATA_ERROR_ID_NOT_FOUND) { warnx("Max address has already been set since " "last power-on or hardware reset"); - } + } else if (hpasize == NULL) + warnx("Command failed with ATA error"); return (1); } From owner-svn-src-head@freebsd.org Mon Sep 9 19:14:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCBC2DC7E7; Mon, 9 Sep 2019 19:14:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46RyX86cxNz4R8q; Mon, 9 Sep 2019 19:14:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f46.google.com with SMTP id k5so6138625iol.5; Mon, 09 Sep 2019 12:14:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=hhI2X15jCro7PjYxaaelw82ZDtzGul8ubBpzdgkWasQ=; b=DpJV3PMX0Qq1BjM4CbaJjfQXpuDejjM5J3PeiTizaWt9j9Nn3V0H3mU+msHRQrBGJn RT5Zrv/crqRVixgtKEcRUVbucrCJ4FtBkw3cAduP8DL2dWWao3g5lu90lb2pvAtRSqKP O/NXclvKzhRDvmNNaPvHbL+JyEDpUiIZCfiLYfeUmagJjaAO7gRdvDPFZ4P9WHRmdaHo AJz0jDYpwMdqHOdxEBqL0S3JTyRz/Nywdq7HMjNZsvEppdDpmc+WOMMcEUMtdIm0T77z W+6jCCOPZFVcqK8zyVdymJ8gTT2MSal/qtl0iKmDjF2p6WYZnJfNd+eR1Iu+jLlFL7J8 PuLQ== X-Gm-Message-State: APjAAAX2LP/hLwkmcwmraoYBBK6V9sWVwmqtgSkTtQmmZhM0p71+4uzo AdcsA+V9b9rxyiLOIFE67h/6mOwq X-Google-Smtp-Source: APXvYqzNAjas1wDJ5fU5UmV+bHmFWJ6FKG+hO9NU1FWwAC+uQvSs+xeQ87e1VIW/WUfK1eJE5mw6Ow== X-Received: by 2002:a02:c94b:: with SMTP id u11mr23154011jao.35.1568056471276; Mon, 09 Sep 2019 12:14:31 -0700 (PDT) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com. [209.85.166.42]) by smtp.gmail.com with ESMTPSA id x5sm9129663ior.46.2019.09.09.12.14.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Sep 2019 12:14:30 -0700 (PDT) Received: by mail-io1-f42.google.com with SMTP id h144so31379447iof.7; Mon, 09 Sep 2019 12:14:30 -0700 (PDT) X-Received: by 2002:a02:cb51:: with SMTP id k17mr26435922jap.119.1568056470389; Mon, 09 Sep 2019 12:14:30 -0700 (PDT) MIME-Version: 1.0 References: <201909091129.x89BTxvw061871@repo.freebsd.org> <20190909184805.GV2559@kib.kiev.ua> In-Reply-To: <20190909184805.GV2559@kib.kiev.ua> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 9 Sep 2019 12:14:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r352059 - head/sys/kern To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 46RyX86cxNz4R8q X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.46 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-4.33 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[46.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.33)[ip: (-6.03), ipnet: 209.85.128.0/17(-3.32), asn: 15169(-2.26), country: US(-0.05)]; RWL_MAILSPIKE_POSSIBLE(0.00)[46.166.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 19:14:33 -0000 Thanks! On Mon, Sep 9, 2019 at 11:48 AM Konstantin Belousov w= rote: > > On Mon, Sep 09, 2019 at 11:31:32AM -0700, Conrad Meyer wrote: > > What=E2=80=99s the motivation for using more timehands? > See the thread titled 'Is it a good idea to use a usb-serial adapter > for PPS input? Yes, it is.' on arm@ and usb@. In short, there are some > reports of timecounters misbehaving on single-core systems when only two > timehands are enabled. > > The change eases the experimentation and provides a workaround which does > not require modifying the sources to apply. > > > > > On Mon, Sep 9, 2019 at 04:30 Konstantin Belousov wrot= e: > > > > > Author: kib > > > Date: Mon Sep 9 11:29:58 2019 > > > New Revision: 352059 > > > URL: https://svnweb.freebsd.org/changeset/base/352059 > > > > > > Log: > > > Make timehands count selectable at boottime. > > > > > > Tested by: O'Connor, Daniel > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 1 week > > > Differential revision: https://reviews.freebsd.org/D21563 > > > > > > Modified: > > > head/sys/kern/kern_tc.c > > > > > > Modified: head/sys/kern/kern_tc.c > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- head/sys/kern/kern_tc.c Mon Sep 9 11:22:38 2019 (r352= 058) > > > +++ head/sys/kern/kern_tc.c Mon Sep 9 11:29:58 2019 (r352= 059) > > > @@ -83,19 +83,16 @@ struct timehands { > > > struct timehands *th_next; > > > }; > > > > > > -static struct timehands th0; > > > -static struct timehands th1 =3D { > > > - .th_next =3D &th0 > > > -}; > > > -static struct timehands th0 =3D { > > > +static struct timehands ths[16] =3D { > > > + [0] =3D { > > > .th_counter =3D &dummy_timecounter, > > > .th_scale =3D (uint64_t)-1 / 1000000, > > > .th_offset =3D { .sec =3D 1 }, > > > .th_generation =3D 1, > > > - .th_next =3D &th1 > > > + }, > > > }; > > > > > > -static struct timehands *volatile timehands =3D &th0; > > > +static struct timehands *volatile timehands =3D &ths[0]; > > > struct timecounter *timecounter =3D &dummy_timecounter; > > > static struct timecounter *timecounters =3D &dummy_timecounter; > > > > > > @@ -115,6 +112,10 @@ static int timestepwarnings; > > > SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, > > > ×tepwarnings, 0, "Log time steps"); > > > > > > +static int timehands_count =3D 2; > > > +SYSCTL_INT(_kern_timecounter, OID_AUTO, timehands_count, CTLFLAG_RDT= UN, > > > + &timehands_count, 0, "Count of timehands in rotation"); > > > + > > > struct bintime bt_timethreshold; > > > struct bintime bt_tickthreshold; > > > sbintime_t sbt_timethreshold; > > > @@ -1960,8 +1961,9 @@ done: > > > static void > > > inittimecounter(void *dummy) > > > { > > > + struct timehands *thp; > > > u_int p; > > > - int tick_rate; > > > + int i, tick_rate; > > > > > > /* > > > * Set the initial timeout to > > > @@ -1987,6 +1989,16 @@ inittimecounter(void *dummy) > > > #ifdef FFCLOCK > > > ffclock_init(); > > > #endif > > > + > > > + /* Set up the requested number of timehands. */ > > > + if (timehands_count < 1) > > > + timehands_count =3D 1; > > > + if (timehands_count > nitems(ths)) > > > + timehands_count =3D nitems(ths); > > > + for (i =3D 1, thp =3D &ths[0]; i < timehands_count; thp =3D = &ths[i++]) > > > + thp->th_next =3D &ths[i]; > > > + thp->th_next =3D &ths[0]; > > > + > > > /* warm up new timecounter (again) and get rolling. */ > > > (void)timecounter->tc_get_timecount(timecounter); > > > (void)timecounter->tc_get_timecount(timecounter); > > > > > > From owner-svn-src-head@freebsd.org Mon Sep 9 19:50:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 214BCDE0D0 for ; Mon, 9 Sep 2019 19:50:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46RzK81ylbz4WwC for ; Mon, 9 Sep 2019 19:50:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x844.google.com with SMTP id r15so17663477qtn.12 for ; Mon, 09 Sep 2019 12:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uAwszEWT091EsN6hk9eivi1UoupE3LUFB6Rxr/EM77M=; b=TfD0bEFPFuTjSBHPdMcXUG0ZGBZwQw+NOoTZZ017/YXe7RsBA30Vad+E6KKcrrwZTe khJSbZEwIhUFLpm5ANNLaSZL2kN23ua6MX6VwQZXcuaWkAhcB0fVoi1+Dlr8BByOIlvm +5RSiAq5+aJuYrEHcFGajy7+6WywTvIq+1gcbPYIT1sSeaMqH48wjJGTCC78CtmrhIRO x7sF6PDNE3Q/nZtLRzOALVlZJALbnxqFGQ5+C+v5OIBQJLI+vE+QP5HFkJXC2dYYcvH9 2CbZcOaVCtn/J/PVNt9euJ//Zb6XbOMxARZspH3y+20SUKFie1P/vLV20PMM3LIHsNxS LyJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uAwszEWT091EsN6hk9eivi1UoupE3LUFB6Rxr/EM77M=; b=U613cG322JuUg1pB8KRBu8+W8hTVYXrljLUmtlgwTP8mDkTcBNkvSovhfP7tziSGVl fVrYyas/5Ylvls2SbKbPXHyD+HQPGVyr1Ooxq1KOtxN2PfElh5blE17JQEKzVZAldCbN nM6Ts/ySPIFNRIN80Oq5vT752hDKd/wYFtdINy4Yj7LgQCdfr5VX1mELN6jBTHk0dl+j I3WkgZTICjVs0a1QT0RoyzeRMwWyok5u3WbWDRcMb/Gez7M4dZ3/+0fMQUUgpuaCMo6A lV6duDsWFzmN/mbpanDp9lumKI9leyLBo5WHgWBSBA39o3IQoq6cAeP420SCNZw8I9yR iWYg== X-Gm-Message-State: APjAAAV3KjNdd5rC425YylaLOkJKyKqaZsPxFnk7PvTDHcDPOz/DsxR6 ms7iVldwPcWN/LvQXVjWkKjBqvtkDwKik9OSIptD9HQkAvk= X-Google-Smtp-Source: APXvYqxFMcGZRAFUa8QRX4Tu99tX3nqg6iFfQMcUvdc/Rd68hJA2613VByg5SEi31jR+iTEs7Gus8wzX2N/8AMEiWWY= X-Received: by 2002:a05:6214:70c:: with SMTP id b12mr15864399qvz.87.1568058603096; Mon, 09 Sep 2019 12:50:03 -0700 (PDT) MIME-Version: 1.0 References: <201909060119.x861JWrG006910@repo.freebsd.org> <4917d7507b6ea6c360dccda261f53052aa085f2b.camel@freebsd.org> <5EE266EE-E650-48D8-9B0E-E674AD026470@freebsd.org> <3cb6429acc7e520932d2c906d1cac47540156355.camel@freebsd.org> <8F03EA29-0F3F-4321-9241-78F7C924FDE1@freebsd.org> <9BC03B61-F8B5-476C-AD34-9DEA5230BFCF@freebsd.org> <20190909115632.GB41333@spindle.one-eyed-alien.net> In-Reply-To: <20190909115632.GB41333@spindle.one-eyed-alien.net> From: Warner Losh Date: Mon, 9 Sep 2019 13:49:50 -0600 Message-ID: Subject: Re: svn commit: r351918 - head/sys/kern To: Brooks Davis Cc: Philip Paeps , Ian Lepore , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46RzK81ylbz4WwC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=TfD0bEFP; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::844) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.4.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.50)[ip: (2.56), ipnet: 2607:f8b0::/32(-2.74), asn: 15169(-2.26), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 19:50:05 -0000 On Mon, Sep 9, 2019, 5:56 AM Brooks Davis wrote: > On Sat, Sep 07, 2019 at 12:23:03PM +0800, Philip Paeps wrote: > > On 2019-09-07 12:06:32 (+0800), Warner Losh wrote: > > > On Fri, Sep 6, 2019 at 9:54 PM Philip Paeps > > > wrote: > > >> On 2019-09-06 22:18:36 (+0800), Ian Lepore wrote: > > >>> On Fri, 2019-09-06 at 12:15 +0800, Philip Paeps wrote: > > >>>> On 2019-09-06 11:15:12 (+0800), Ian Lepore wrote: > > >>>>> On Fri, 2019-09-06 at 01:19 +0000, Philip Paeps wrote: > > >>>>>> Log: > > >>>>>> riscv: default to HZ=100 > > >>>>> > > >>>>> This seems like a bad idea. I've run a 90mhz armv4 chip with > > >>>>> HZ=1000 and didn't notice any performance hit from doing so. > > >>>>> Almost all arm kernel config files set HZ as an option, so that > > >>>>> define doesn't do much for arm these days. It probably does still > > >>>>> set HZ for various mips platforms. > > >>>>> > > >>>>> I would think 1000 is appropriate for anything modern running at > > >>>>> 200mhz or more. > > >>>>> > > >>>>> Setting it to 100 has the bad side effect of making things like > > >>>>> msleep(), tsleep(), and pause() (which show up in plenty of > > >>>>> drivers) all have a minimum timeout of 10ms, which is a long long > > >>>>> time on modern hardware. > > >>>>> > > >>>>> What benefit do you think you'll get from the lower number? > > >>>> > > >>>> On systems running at 10s of MHz (or slower, ick), with HZ=1000 you > > >>>> spend an awful lot of time servicing the timer interrupt and not > > >>>> very much time doing anything else. > > >>>> > > >>>> My rationale was that most RISC-V systems (including emulation and > > >>>> FPGA prototypes) I've encountered are running slower than the > > >>>> tipping point where HZ=1000 makes sense. With the default of > > >>>> HZ=100, faster exceptions can still set HZ=1000 in their individual > > >>>> configs. > > >>>> > > >>>> When the RISC-V world evolves to having more actual silicon and > > >>>> fewer slow prototypes, I definitely agree this default should be > > >>>> flipped again for HZ=1000 by default and HZ=100 in the config files > > >>>> for the exceptions. > > >>> > > >>> Wait a second... are you saying that the riscv implementation > > >>> doesn't support event timers and uses an old-style periodic tick > > >>> based on HZ? > > >> > > >> Depending on the hardware, there may not be an event timer (yet)... > > >> > > >> As I wrote: I would be more than happy to revert this change when > > >> more silicon becomes available. Presently, there is exactly one > > >> silicon RISC-V implementation commercially available (HiFive FU540) > > >> and even that one is kind of difficult to source. Most people > > >> running RISC-V are doing so in emulation or on FPGAs. > > >> > > >> Given how long these things take to boot to userland (where you > > >> really notice how slow things are), HZ=100 feels like a more sensible > > >> default than HZ=1000. > > > > > > I think it show more that the defaults are bad for MIPS and ARM. All > > > the MIPS files, except BERI/CHERI are 1000Hz. Well, Octeon is also > > > 100Hz, due to the defaults, but it will be fine at 1000Hz, so maybe we > > > need to attend to this as well. Arm !=v5 is also 1000Hz, so it should > > > be changed... > > > > > >> I don't feel terribly strongly about this though. I've just been > > >> bitten several times in the last week on a <15MHz FPGA forgetting to > > >> set HZ=100 in config and figured I'd save others the trouble. ;-) > > > > > > 15MHz FPGA? FreeBSD 1.0 barely ran on 25MHz i386 machines of the > > > time.... How common are these beasts and how well does FreeBSD do on > > > them. I assume these are early prototypes? > > > > These are early prototypes indeed. > > > > FreeBSD runs remarkably well on them. Slowly of course. Booting takes > > several minutes and running anything non-trivial can be frustrating. > > [More context for Warner and others following along.] > > I don't know what platform Philip is using here, but with architectures > supporting CHERI (including MIPS and RISC-V), we typically run on > sub-100Mhz FPGA implementations. > > We also run on simulations or models that range from 100s of MIPS to a > few KIPS. Being able to do this is important to help validate that the > models we're proving security properties on actually relate to the > "more real" implementations we develop on. > > In all these cases, "run" is a relative thing. We certainly don't > expect to self-host until we've got performant hardware (and to the > extent that we care about 32-bit, we consider self-hosting an active > non-goal.) We often expect to be able to run real software including > things like nginx and webkit, but we mostly care about relative > performance not interactivity. > Would your needs be adequately covered by the current mechanisms to set HZ? This just covers the defaults for the whole platform. As always, these can be overridden in the boot loader or kernel config file... Warner > From owner-svn-src-head@freebsd.org Mon Sep 9 20:48:12 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1B2FE0C7A; Mon, 9 Sep 2019 20:48:12 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46S0cD4hGwz4cv4; Mon, 9 Sep 2019 20:48:12 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83E781B4DB; Mon, 9 Sep 2019 20:48:12 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89KmCf9003511; Mon, 9 Sep 2019 20:48:12 GMT (envelope-from crees@FreeBSD.org) Received: (from crees@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89KmCb0003510; Mon, 9 Sep 2019 20:48:12 GMT (envelope-from crees@FreeBSD.org) Message-Id: <201909092048.x89KmCb0003510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: crees set sender to crees@FreeBSD.org using -f From: Chris Rees Date: Mon, 9 Sep 2019 20:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352107 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: crees X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 352107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 20:48:12 -0000 Author: crees (doc,ports committer) Date: Mon Sep 9 20:48:12 2019 New Revision: 352107 URL: https://svnweb.freebsd.org/changeset/base/352107 Log: Reverse the referenced tables. If ipv4_prefer is specified, Section 10.3 is relevant. If ipv6_prefer is specified, Section 2.1 is relevant. This change makes the corresponding options/sections 'respective' PR: docs/234249 Submitted by: David Fiander Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Sep 9 20:04:45 2019 (r352106) +++ head/share/man/man5/rc.conf.5 Mon Sep 9 20:48:12 2019 (r352107) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2019 +.Dd September 9, 2019 .Dt RC.CONF 5 .Os .Sh NAME @@ -1779,10 +1779,10 @@ or .Dq Li ipv6_prefer is specified, .Xr ip6addrctl 8 -installs a pre-defined policy table described in Section 2.1 -.Pq IPv6-preferred -or 10.3 +installs a pre-defined policy table described in Section 10.3 .Pq IPv4-preferred +or 2.1 +.Pq IPv6-preferred of RFC 3484. .Pp If From owner-svn-src-head@freebsd.org Mon Sep 9 21:32:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90CB5E235D; Mon, 9 Sep 2019 21:32:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46S1bl437mz4h7C; Mon, 9 Sep 2019 21:32:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E3591BDC8; Mon, 9 Sep 2019 21:32:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89LWpNJ034313; Mon, 9 Sep 2019 21:32:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89LWhBH034270; Mon, 9 Sep 2019 21:32:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201909092132.x89LWhBH034270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 9 Sep 2019 21:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352110 - in head: share/man/man9 sys/amd64/amd64 sys/amd64/sgx sys/amd64/vmm sys/arm/arm sys/arm/nvidia/drm2 sys/arm64/arm64 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/l... X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man9 sys/amd64/amd64 sys/amd64/sgx sys/amd64/vmm sys/arm/arm sys/arm/nvidia/drm2 sys/arm64/arm64 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linuxkpi/common/include/li... X-SVN-Commit-Revision: 352110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 21:32:51 -0000 Author: markj Date: Mon Sep 9 21:32:42 2019 New Revision: 352110 URL: https://svnweb.freebsd.org/changeset/base/352110 Log: Change synchonization rules for vm_page reference counting. There are several mechanisms by which a vm_page reference is held, preventing the page from being freed back to the page allocator. In particular, holding the page's object lock is sufficient to prevent the page from being freed; holding the busy lock or a wiring is sufficent as well. These references are protected by the page lock, which must therefore be acquired for many per-page operations. This results in false sharing since the page locks are external to the vm_page structures themselves and each lock protects multiple structures. Transition to using an atomically updated per-page reference counter. The object's reference is counted using a flag bit in the counter. A second flag bit is used to atomically block new references via pmap_extract_and_hold() while removing managed mappings of a page. Thus, the reference count of a page is guaranteed not to increase if the page is unbusied, unmapped, and the object's write lock is held. As a consequence of this, the page lock no longer protects a page's identity; operations which move pages between objects are now synchronized solely by the objects' locks. The vm_page_wire() and vm_page_unwire() KPIs are changed. The former requires that either the object lock or the busy lock is held. The latter no longer has a return value and may free the page if it releases the last reference to that page. vm_page_unwire_noq() behaves the same as before; the caller is responsible for checking its return value and freeing or enqueuing the page as appropriate. vm_page_wire_mapped() is introduced for use in pmap_extract_and_hold(). It fails if the page is concurrently being unmapped, typically triggering a fallback to the fault handler. vm_page_wire() no longer requires the page lock and vm_page_unwire() now internally acquires the page lock when releasing the last wiring of a page (since the page lock still protects a page's queue state). In particular, synchronization details are no longer leaked into the caller. The change excises the page lock from several frequently executed code paths. In particular, vm_object_terminate() no longer bounces between page locks as it releases an object's pages, and direct I/O and sendfile(SF_NOCACHE) completions no longer require the page lock. In these latter cases we now get linear scalability in the common scenario where different threads are operating on different files. __FreeBSD_version is bumped. The DRM ports have been updated to accomodate the KPI changes. Reviewed by: jeff (earlier version) Tested by: gallatin (earlier version), pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20486 Modified: head/share/man/man9/Makefile head/share/man/man9/vm_page_wire.9 head/sys/amd64/amd64/efirt_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/sgx/sgx.c head/sys/amd64/vmm/vmm.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/pmap-v6.c head/sys/arm/nvidia/drm2/tegra_bo.c head/sys/arm64/arm64/efirt_machdep.c head/sys/arm64/arm64/pmap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/compat/linuxkpi/common/include/linux/mm.h head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c head/sys/dev/agp/agp.c head/sys/dev/agp/agp_i810.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/drm2/ttm/ttm_bo_vm.c head/sys/dev/drm2/ttm/ttm_page_alloc.c head/sys/dev/drm2/ttm/ttm_tt.c head/sys/dev/md/md.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/xen/gntdev/gntdev.c head/sys/dev/xen/privcmd/privcmd.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/i386/i386/pmap.c head/sys/kern/kern_exec.c head/sys/kern/kern_kcov.c head/sys/kern/kern_sendfile.c head/sys/kern/sys_process.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_shm.c head/sys/mips/mips/pmap.c head/sys/net/bpf_zerocopy.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/riscv/riscv/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/sys/param.h head/sys/vm/device_pager.c head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c head/sys/vm/vm_swapout.c Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Sep 9 21:03:08 2019 (r352109) +++ head/share/man/man9/Makefile Mon Sep 9 21:32:42 2019 (r352110) @@ -2223,7 +2223,9 @@ MLINKS+=vm_map_lookup.9 vm_map_lookup_done.9 MLINKS+=vm_map_max.9 vm_map_min.9 \ vm_map_max.9 vm_map_pmap.9 MLINKS+=vm_map_stack.9 vm_map_growstack.9 -MLINKS+=vm_map_wire.9 vm_map_unwire.9 +MLINKS+=vm_map_wire.9 vm_map_wire_mapped.9 \ + vm_page_wire.9 vm_page_unwire.9 \ + vm_page_wire.9 vm_page_unwire_noq.9 MLINKS+=vm_page_bits.9 vm_page_clear_dirty.9 \ vm_page_bits.9 vm_page_dirty.9 \ vm_page_bits.9 vm_page_is_valid.9 \ Modified: head/share/man/man9/vm_page_wire.9 ============================================================================== --- head/share/man/man9/vm_page_wire.9 Mon Sep 9 21:03:08 2019 (r352109) +++ head/share/man/man9/vm_page_wire.9 Mon Sep 9 21:32:42 2019 (r352110) @@ -26,12 +26,13 @@ .\" .\" $FreeBSD$ .\" -.Dd July 13, 2001 +.Dd September 9, 2019 .Dt VM_PAGE_WIRE 9 .Os .Sh NAME .Nm vm_page_wire , -.Nm vm_page_unwire +.Nm vm_page_unwire , +.Nm vm_page_unwire_noq .Nd "wire and unwire pages" .Sh SYNOPSIS .In sys/param.h @@ -39,29 +40,44 @@ .In vm/vm_page.h .Ft void .Fn vm_page_wire "vm_page_t m" +.Ft bool +.Fn vm_page_wire_mapped "vm_page_t m" .Ft void -.Fn vm_page_unwire "vm_page_t m" "int activate" +.Fn vm_page_unwire "vm_page_t m" "int queue" +.Ft bool +.Fn vm_page_unwire_noq "vm_page_t m" .Sh DESCRIPTION The .Fn vm_page_wire -function increments the wire count on a page, and removes it from -whatever queue it is on. +and +.Fn vm_page_wire_mapped +function wire the page, prevent it from being reclaimed by the page +daemon or when its containing object is destroyed. +Both functions require that the page belong to an object. +The +.Fn vm_page_wire_mapped +function is for use by the +.Xr pmap 9 +layer following a lookup. +This function may fail if mappings of the page are concurrently +being destroyed, in which case it will return false. .Pp The .Fn vm_page_unwire -function releases one of the wirings on the page. -When -.Va write_count -reaches zero the page is placed back onto either the active queue -(if -.Fa activate -is non-zero) or onto the inactive queue (if -.Fa activate -is zero). -If the page is unmanaged -.Dv ( PG_UNMANAGED -is set) then the page is left on -.Dv PQ_NONE . +and +.Fn vm_page_unwire_noq +functions release a wiring of a page. +The +.Fn vm_page_unwire +function takes a queue index and will insert the page into the +corresponding page queue upon releasing its last wiring. +If the page does not belong to an object and no other references +to the page exist, +.Fn vm_page_unwire +will free the page. +.Fn vm_page_unwire_noq +releases the wiring and returns true if it was the last wiring +of the page. .Sh AUTHORS This manual page was written by .An Chad David Aq Mt davidc@acns.ab.ca . Modified: head/sys/amd64/amd64/efirt_machdep.c ============================================================================== --- head/sys/amd64/amd64/efirt_machdep.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/amd64/amd64/efirt_machdep.c Mon Sep 9 21:32:42 2019 (r352110) @@ -74,7 +74,7 @@ efi_destroy_1t1_map(void) if (obj_1t1_pt != NULL) { VM_OBJECT_RLOCK(obj_1t1_pt); TAILQ_FOREACH(m, &obj_1t1_pt->memq, listq) - m->wire_count = 0; + m->wire_count = VPRC_OBJREF; vm_wire_sub(obj_1t1_pt->resident_page_count); VM_OBJECT_RUNLOCK(obj_1t1_pt); vm_object_deallocate(obj_1t1_pt); Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/amd64/amd64/pmap.c Mon Sep 9 21:32:42 2019 (r352110) @@ -3071,31 +3071,23 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ m = NULL; PG_RW = pmap_rw_bit(pmap); PG_V = pmap_valid_bit(pmap); + PMAP_LOCK(pmap); -retry: pdep = pmap_pde(pmap, va); if (pdep != NULL && (pde = *pdep)) { if (pde & PG_PS) { - if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) { - if (vm_page_pa_tryrelock(pmap, (pde & - PG_PS_FRAME) | (va & PDRMASK), &pa)) - goto retry; - m = PHYS_TO_VM_PAGE(pa); - } + if ((pde & PG_RW) != 0 || (prot & VM_PROT_WRITE) == 0) + m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) | + (va & PDRMASK)); } else { pte = *pmap_pde_to_pte(pdep, va); - if ((pte & PG_V) && - ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, - &pa)) - goto retry; - m = PHYS_TO_VM_PAGE(pa); - } + if ((pte & PG_V) != 0 && + ((pte & PG_RW) != 0 || (prot & VM_PROT_WRITE) == 0)) + m = PHYS_TO_VM_PAGE(pte & PG_FRAME); } - if (m != NULL) - vm_page_wire(m); + if (m != NULL && !vm_page_wire_mapped(m)) + m = NULL; } - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/amd64/sgx/sgx.c ============================================================================== --- head/sys/amd64/sgx/sgx.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/amd64/sgx/sgx.c Mon Sep 9 21:32:42 2019 (r352110) @@ -357,9 +357,7 @@ sgx_page_remove(struct sgx_softc *sc, vm_page_t p) vm_paddr_t pa; uint64_t offs; - vm_page_lock(p); (void)vm_page_remove(p); - vm_page_unlock(p); dprintf("%s: p->pidx %ld\n", __func__, p->pindex); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/amd64/vmm/vmm.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1002,9 +1002,7 @@ vm_gpa_release(void *cookie) { vm_page_t m = cookie; - vm_page_lock(m); vm_page_unwire(m, PQ_ACTIVE); - vm_page_unlock(m); } int Modified: head/sys/arm/arm/pmap-v4.c ============================================================================== --- head/sys/arm/arm/pmap-v4.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/arm/arm/pmap-v4.c Mon Sep 9 21:32:42 2019 (r352110) @@ -3415,14 +3415,14 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ struct l2_dtable *l2; pd_entry_t l1pd; pt_entry_t *ptep, pte; - vm_paddr_t pa, paddr; - vm_page_t m = NULL; + vm_paddr_t pa; + vm_page_t m; u_int l1idx; + l1idx = L1_IDX(va); - paddr = 0; + m = NULL; PMAP_LOCK(pmap); -retry: l1pd = pmap->pm_l1->l1_kva[l1idx]; if (l1pte_section_p(l1pd)) { /* @@ -3434,11 +3434,10 @@ retry: pa = (l1pd & L1_SUP_FRAME) | (va & L1_SUP_OFFSET); else pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET); - if (vm_page_pa_tryrelock(pmap, pa & PG_FRAME, &paddr)) - goto retry; if (l1pd & L1_S_PROT_W || (prot & VM_PROT_WRITE) == 0) { m = PHYS_TO_VM_PAGE(pa); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } else { /* @@ -3466,15 +3465,12 @@ retry: pa = (pte & L2_L_FRAME) | (va & L2_L_OFFSET); else pa = (pte & L2_S_FRAME) | (va & L2_S_OFFSET); - if (vm_page_pa_tryrelock(pmap, pa & PG_FRAME, &paddr)) - goto retry; m = PHYS_TO_VM_PAGE(pa); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } - PMAP_UNLOCK(pmap); - PA_UNLOCK_COND(paddr); return (m); } Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/arm/arm/pmap-v6.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1986,23 +1986,20 @@ pmap_extract(pmap_t pmap, vm_offset_t va) vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { - vm_paddr_t pa, lockpa; + vm_paddr_t pa; pt1_entry_t pte1; pt2_entry_t pte2, *pte2p; vm_page_t m; - lockpa = 0; m = NULL; PMAP_LOCK(pmap); -retry: pte1 = pte1_load(pmap_pte1(pmap, va)); if (pte1_is_section(pte1)) { if (!(pte1 & PTE1_RO) || !(prot & VM_PROT_WRITE)) { pa = pte1_pa(pte1) | (va & PTE1_OFFSET); - if (vm_page_pa_tryrelock(pmap, pa, &lockpa)) - goto retry; m = PHYS_TO_VM_PAGE(pa); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } else if (pte1_is_link(pte1)) { pte2p = pmap_pte2(pmap, va); @@ -2011,13 +2008,11 @@ retry: if (pte2_is_valid(pte2) && (!(pte2 & PTE2_RO) || !(prot & VM_PROT_WRITE))) { pa = pte2_pa(pte2); - if (vm_page_pa_tryrelock(pmap, pa, &lockpa)) - goto retry; m = PHYS_TO_VM_PAGE(pa); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } - PA_UNLOCK_COND(lockpa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/arm/nvidia/drm2/tegra_bo.c ============================================================================== --- head/sys/arm/nvidia/drm2/tegra_bo.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/arm/nvidia/drm2/tegra_bo.c Mon Sep 9 21:32:42 2019 (r352110) @@ -65,11 +65,9 @@ tegra_bo_destruct(struct tegra_bo *bo) for (i = 0; i < bo->npages; i++) { m = bo->m[i]; cdev_pager_free_page(bo->cdev_pager, m); - vm_page_lock(m); m->flags &= ~PG_FICTITIOUS; vm_page_unwire_noq(m); vm_page_free(m); - vm_page_unlock(m); } VM_OBJECT_WUNLOCK(bo->cdev_pager); Modified: head/sys/arm64/arm64/efirt_machdep.c ============================================================================== --- head/sys/arm64/arm64/efirt_machdep.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/arm64/arm64/efirt_machdep.c Mon Sep 9 21:32:42 2019 (r352110) @@ -74,7 +74,7 @@ efi_destroy_1t1_map(void) if (obj_1t1_pt != NULL) { VM_OBJECT_RLOCK(obj_1t1_pt); TAILQ_FOREACH(m, &obj_1t1_pt->memq, listq) - m->wire_count = 0; + m->wire_count = VPRC_OBJREF; vm_wire_sub(obj_1t1_pt->resident_page_count); VM_OBJECT_RUNLOCK(obj_1t1_pt); vm_object_deallocate(obj_1t1_pt); Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/arm64/arm64/pmap.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1079,14 +1079,11 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ { pt_entry_t *pte, tpte; vm_offset_t off; - vm_paddr_t pa; vm_page_t m; int lvl; - pa = 0; m = NULL; PMAP_LOCK(pmap); -retry: pte = pmap_pte(pmap, va, &lvl); if (pte != NULL) { tpte = pmap_load(pte); @@ -1111,14 +1108,11 @@ retry: default: off = 0; } - if (vm_page_pa_tryrelock(pmap, - (tpte & ~ATTR_MASK) | off, &pa)) - goto retry; m = PHYS_TO_VM_PAGE((tpte & ~ATTR_MASK) | off); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Sep 9 21:32:42 2019 (r352110) @@ -481,9 +481,7 @@ page_wire(vnode_t *vp, int64_t start) } ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_page_lock(pp); vm_page_wire(pp); - vm_page_unlock(pp); } else pp = NULL; break; @@ -495,9 +493,7 @@ static void page_unwire(vm_page_t pp) { - vm_page_lock(pp); vm_page_unwire(pp, PQ_ACTIVE); - vm_page_unlock(pp); } /* @@ -591,16 +587,16 @@ mappedread_sf(vnode_t *vp, int nbytes, uio_t *uio) zfs_unmap_page(sf); zfs_vmobject_wlock(obj); vm_page_sunbusy(pp); - vm_page_lock(pp); if (error) { - if (!vm_page_wired(pp) && pp->valid == 0 && - !vm_page_busied(pp)) + if (!vm_page_busied(pp) && !vm_page_wired(pp) && + pp->valid == 0) vm_page_free(pp); } else { pp->valid = VM_PAGE_BITS_ALL; + vm_page_lock(pp); vm_page_activate(pp); + vm_page_unlock(pp); } - vm_page_unlock(pp); } else { ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); vm_page_sunbusy(pp); Modified: head/sys/compat/linuxkpi/common/include/linux/mm.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/compat/linuxkpi/common/include/linux/mm.h Mon Sep 9 21:32:42 2019 (r352110) @@ -227,9 +227,7 @@ mark_page_accessed(struct vm_page *page) static inline void get_page(struct vm_page *page) { - vm_page_lock(page); vm_page_wire(page); - vm_page_unlock(page); } extern long @@ -250,10 +248,7 @@ get_user_pages_remote(struct task_struct *, struct mm_ static inline void put_page(struct vm_page *page) { - vm_page_lock(page); - if (vm_page_unwire(page, PQ_ACTIVE) && page->object == NULL) - vm_page_free(page); - vm_page_unlock(page); + vm_page_unwire(page, PQ_ACTIVE); } #define copy_highpage(to, from) pmap_copy_page(from, to) Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Sep 9 21:32:42 2019 (r352110) @@ -511,9 +511,7 @@ linux_cdev_pager_fault(vm_object_t vm_obj, vm_ooffset_ vm_page_replace_checked(page, vm_obj, (*mres)->pindex, *mres); - vm_page_lock(*mres); vm_page_free(*mres); - vm_page_unlock(*mres); *mres = page; } page->valid = VM_PAGE_BITS_ALL; Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Mon Sep 9 21:32:42 2019 (r352110) @@ -154,10 +154,8 @@ linux_free_pages(vm_page_t page, unsigned int order) for (x = 0; x != npages; x++) { vm_page_t pgo = page + x; - vm_page_lock(pgo); if (vm_page_unwire_noq(pgo)) vm_page_free(pgo); - vm_page_unlock(pgo); } } else { vm_offset_t vaddr; @@ -295,10 +293,8 @@ linux_shmem_read_mapping_page_gfp(vm_object_t obj, int if (vm_pager_has_page(obj, pindex, NULL, NULL)) { rv = vm_pager_get_pages(obj, &page, 1, NULL, NULL); if (rv != VM_PAGER_OK) { - vm_page_lock(page); vm_page_unwire_noq(page); vm_page_free(page); - vm_page_unlock(page); VM_OBJECT_WUNLOCK(obj); return (ERR_PTR(-EINVAL)); } Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Mon Sep 9 21:32:42 2019 (r352110) @@ -377,10 +377,7 @@ vchiq_platform_handle_timeout(VCHIQ_STATE_T *state) static void pagelist_page_free(vm_page_t pp) { - vm_page_lock(pp); - if (vm_page_unwire(pp, PQ_INACTIVE) && pp->object == NULL) - vm_page_free(pp); - vm_page_unlock(pp); + vm_page_unwire(pp, PQ_INACTIVE); } /* There is a potential problem with partial cache lines (pages?) Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/agp/agp.c Mon Sep 9 21:32:42 2019 (r352110) @@ -616,9 +616,7 @@ bad: m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); if (k >= i) vm_page_xunbusy(m); - vm_page_lock(m); vm_page_unwire(m, PQ_INACTIVE); - vm_page_unlock(m); } VM_OBJECT_WUNLOCK(mem->am_obj); @@ -653,9 +651,7 @@ agp_generic_unbind_memory(device_t dev, struct agp_mem VM_OBJECT_WLOCK(mem->am_obj); for (i = 0; i < mem->am_size; i += PAGE_SIZE) { m = vm_page_lookup(mem->am_obj, atop(i)); - vm_page_lock(m); vm_page_unwire(m, PQ_INACTIVE); - vm_page_unlock(m); } VM_OBJECT_WUNLOCK(mem->am_obj); @@ -1003,7 +999,7 @@ agp_bind_pages(device_t dev, vm_page_t *pages, vm_size mtx_lock(&sc->as_lock); for (i = 0; i < size; i += PAGE_SIZE) { m = pages[OFF_TO_IDX(i)]; - KASSERT(m->wire_count > 0, + KASSERT(vm_page_wired(m), ("agp_bind_pages: page %p hasn't been wired", m)); /* Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/agp/agp_i810.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1795,9 +1795,7 @@ agp_i810_free_memory(device_t dev, struct agp_memory * */ VM_OBJECT_WLOCK(mem->am_obj); m = vm_page_lookup(mem->am_obj, 0); - vm_page_lock(m); vm_page_unwire(m, PQ_INACTIVE); - vm_page_unlock(m); VM_OBJECT_WUNLOCK(mem->am_obj); } else { contigfree(sc->argb_cursor, mem->am_size, M_AGP); Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1910,7 +1910,6 @@ aiotx_free_pgs(struct mbuf *m) { struct mbuf_ext_pgs *ext_pgs; struct kaiocb *job; - struct mtx *mtx; vm_page_t pg; MBUF_EXT_PGS_ASSERT(m); @@ -1921,14 +1920,10 @@ aiotx_free_pgs(struct mbuf *m) m->m_len, jobtotid(job)); #endif - mtx = NULL; for (int i = 0; i < ext_pgs->npgs; i++) { pg = PHYS_TO_VM_PAGE(ext_pgs->pa[i]); - vm_page_change_lock(pg, &mtx); vm_page_unwire(pg, PQ_ACTIVE); } - if (mtx != NULL) - mtx_unlock(mtx); aiotx_free_job(job); } Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Mon Sep 9 21:32:42 2019 (r352110) @@ -114,9 +114,7 @@ free_pageset(struct tom_data *td, struct pageset *ps) for (i = 0; i < ps->npages; i++) { p = ps->pages[i]; - vm_page_lock(p); vm_page_unwire(p, PQ_INACTIVE); - vm_page_unlock(p); } mtx_lock(&ddp_orphan_pagesets_lock); TAILQ_INSERT_TAIL(&ddp_orphan_pagesets, ps, link); Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Mon Sep 9 21:32:42 2019 (r352110) @@ -114,9 +114,7 @@ ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offse vm_object_pip_add(vm_obj, 1); if (*mres != NULL) { - vm_page_lock(*mres); (void)vm_page_remove(*mres); - vm_page_unlock(*mres); } retry: VM_OBJECT_WUNLOCK(vm_obj); @@ -261,9 +259,7 @@ reserve: vm_page_xbusy(m); if (*mres != NULL) { KASSERT(*mres != m, ("losing %p %p", *mres, m)); - vm_page_lock(*mres); vm_page_free(*mres); - vm_page_unlock(*mres); } *mres = m; Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_page_alloc.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/drm2/ttm/ttm_page_alloc.c Mon Sep 9 21:32:42 2019 (r352110) @@ -132,7 +132,7 @@ ttm_vm_page_free(vm_page_t m) { KASSERT(m->object == NULL, ("ttm page %p is owned", m)); - KASSERT(m->wire_count == 1, ("ttm lost wire %p", m)); + KASSERT(vm_page_wired(m), ("ttm lost wire %p", m)); KASSERT((m->flags & PG_FICTITIOUS) != 0, ("ttm lost fictitious %p", m)); KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m)); m->flags &= ~PG_FICTITIOUS; Modified: head/sys/dev/drm2/ttm/ttm_tt.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_tt.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/drm2/ttm/ttm_tt.c Mon Sep 9 21:32:42 2019 (r352110) @@ -294,9 +294,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) rv = vm_pager_get_pages(obj, &from_page, 1, NULL, NULL); if (rv != VM_PAGER_OK) { - vm_page_lock(from_page); vm_page_free(from_page); - vm_page_unlock(from_page); ret = -EIO; goto err_ret; } Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/md/md.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1029,9 +1029,7 @@ md_swap_page_free(vm_page_t m) { vm_page_xunbusy(m); - vm_page_lock(m); vm_page_free(m); - vm_page_unlock(m); } static int Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/netmap/netmap_freebsd.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1052,9 +1052,7 @@ netmap_dev_pager_fault(vm_object_t object, vm_ooffset_ VM_OBJECT_WUNLOCK(object); page = vm_page_getfake(paddr, memattr); VM_OBJECT_WLOCK(object); - vm_page_lock(*mres); vm_page_free(*mres); - vm_page_unlock(*mres); *mres = page; vm_page_insert(page, object, pidx); } Modified: head/sys/dev/xen/gntdev/gntdev.c ============================================================================== --- head/sys/dev/xen/gntdev/gntdev.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/xen/gntdev/gntdev.c Mon Sep 9 21:32:42 2019 (r352110) @@ -826,14 +826,12 @@ gntdev_gmap_pg_fault(vm_object_t object, vm_ooffset_t KASSERT((page->flags & PG_FICTITIOUS) != 0, ("not fictitious %p", page)); - KASSERT(page->wire_count == 1, ("wire_count not 1 %p", page)); - KASSERT(vm_page_busied(page) == 0, ("page %p is busy", page)); + KASSERT(vm_page_wired(page), ("page %p is not wired", page)); + KASSERT(!vm_page_busied(page), ("page %p is busy", page)); if (*mres != NULL) { oldm = *mres; - vm_page_lock(oldm); vm_page_free(oldm); - vm_page_unlock(oldm); *mres = NULL; } Modified: head/sys/dev/xen/privcmd/privcmd.c ============================================================================== --- head/sys/dev/xen/privcmd/privcmd.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/dev/xen/privcmd/privcmd.c Mon Sep 9 21:32:42 2019 (r352110) @@ -169,14 +169,12 @@ privcmd_pg_fault(vm_object_t object, vm_ooffset_t offs KASSERT((page->flags & PG_FICTITIOUS) != 0, ("not fictitious %p", page)); - KASSERT(page->wire_count == 1, ("wire_count not 1 %p", page)); - KASSERT(vm_page_busied(page) == 0, ("page %p is busy", page)); + KASSERT(vm_page_wired(page), ("page %p not wired", page)); + KASSERT(!vm_page_busied(page), ("page %p is busy", page)); if (*mres != NULL) { oldm = *mres; - vm_page_lock(oldm); vm_page_free(oldm); - vm_page_unlock(oldm); *mres = NULL; } Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/fs/tmpfs/tmpfs_subr.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1418,7 +1418,6 @@ retry: goto retry; rv = vm_pager_get_pages(uobj, &m, 1, NULL, NULL); - vm_page_lock(m); if (rv == VM_PAGER_OK) { /* * Since the page was not resident, @@ -1428,12 +1427,12 @@ retry: * current operation is not regarded * as an access. */ + vm_page_lock(m); vm_page_launder(m); vm_page_unlock(m); vm_page_xunbusy(m); } else { vm_page_free(m); - vm_page_unlock(m); if (ignerr) m = NULL; else { Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/i386/i386/pmap.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1690,35 +1690,24 @@ __CONCAT(PMTYPE, extract_and_hold)(pmap_t pmap, vm_off pd_entry_t pde; pt_entry_t pte; vm_page_t m; - vm_paddr_t pa; - pa = 0; m = NULL; PMAP_LOCK(pmap); -retry: pde = *pmap_pde(pmap, va); if (pde != 0) { if (pde & PG_PS) { - if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) { - if (vm_page_pa_tryrelock(pmap, (pde & - PG_PS_FRAME) | (va & PDRMASK), &pa)) - goto retry; - m = PHYS_TO_VM_PAGE(pa); - } + if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) + m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) | + (va & PDRMASK)); } else { pte = pmap_pte_ufast(pmap, va, pde); if (pte != 0 && - ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, - &pa)) - goto retry; - m = PHYS_TO_VM_PAGE(pa); - } + ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) + m = PHYS_TO_VM_PAGE(pte & PG_FRAME); } - if (m != NULL) - vm_page_wire(m); + if (m != NULL && !vm_page_wire_mapped(m)) + m = NULL; } - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/kern/kern_exec.c Mon Sep 9 21:32:42 2019 (r352110) @@ -981,10 +981,8 @@ exec_map_first_page(struct image_params *imgp) if (ma[0]->valid != VM_PAGE_BITS_ALL) { vm_page_xbusy(ma[0]); if (!vm_pager_has_page(object, 0, NULL, &after)) { - vm_page_lock(ma[0]); vm_page_unwire_noq(ma[0]); vm_page_free(ma[0]); - vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); return (EIO); } @@ -1008,13 +1006,9 @@ exec_map_first_page(struct image_params *imgp) initial_pagein = i; rv = vm_pager_get_pages(object, ma, initial_pagein, NULL, NULL); if (rv != VM_PAGER_OK) { - for (i = 0; i < initial_pagein; i++) { - vm_page_lock(ma[i]); - if (i == 0) - vm_page_unwire_noq(ma[i]); + vm_page_unwire_noq(ma[0]); + for (i = 0; i < initial_pagein; i++) vm_page_free(ma[i]); - vm_page_unlock(ma[i]); - } VM_OBJECT_WUNLOCK(object); return (EIO); } @@ -1039,9 +1033,7 @@ exec_unmap_first_page(struct image_params *imgp) m = sf_buf_page(imgp->firstpage); sf_buf_free(imgp->firstpage); imgp->firstpage = NULL; - vm_page_lock(m); vm_page_unwire(m, PQ_ACTIVE); - vm_page_unlock(m); } } Modified: head/sys/kern/kern_kcov.c ============================================================================== --- head/sys/kern/kern_kcov.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/kern/kern_kcov.c Mon Sep 9 21:32:42 2019 (r352110) @@ -408,10 +408,7 @@ kcov_free(struct kcov_info *info) VM_OBJECT_WLOCK(info->bufobj); m = vm_page_lookup(info->bufobj, 0); for (i = 0; i < info->bufsize / PAGE_SIZE; i++) { - vm_page_lock(m); vm_page_unwire_noq(m); - vm_page_unlock(m); - m = vm_page_next(m); } VM_OBJECT_WUNLOCK(info->bufobj); Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/kern/kern_sendfile.c Mon Sep 9 21:32:42 2019 (r352110) @@ -415,11 +415,8 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i &sendfile_iodone, sfio); if (rv != VM_PAGER_OK) { for (j = i; j < i + count; j++) { - if (pa[j] != bogus_page) { - vm_page_lock(pa[j]); + if (pa[j] != bogus_page) vm_page_unwire(pa[j], PQ_INACTIVE); - vm_page_unlock(pa[j]); - } } VM_OBJECT_WUNLOCK(obj); return (EIO); @@ -932,11 +929,8 @@ retry_space: m != NULL ? SFB_NOWAIT : SFB_CATCH); if (sf == NULL) { SFSTAT_INC(sf_allocfail); - for (int j = i; j < npages; j++) { - vm_page_lock(pa[j]); + for (int j = i; j < npages; j++) vm_page_unwire(pa[j], PQ_INACTIVE); - vm_page_unlock(pa[j]); - } if (m == NULL) softerr = ENOBUFS; fixspace(npages, i, off, &space); Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/kern/sys_process.c Mon Sep 9 21:32:42 2019 (r352110) @@ -312,10 +312,7 @@ proc_rwmem(struct proc *p, struct uio *uio) /* * Release the page. */ - vm_page_lock(m); - if (vm_page_unwire(m, PQ_ACTIVE) && m->object == NULL) - vm_page_free(m); - vm_page_unlock(m); + vm_page_unwire(m, PQ_ACTIVE); } while (error == 0 && uio->uio_resid > 0); Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/kern/uipc_mbuf.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1621,10 +1621,6 @@ mb_free_mext_pgs(struct mbuf *m) ext_pgs = m->m_ext.ext_pgs; for (int i = 0; i < ext_pgs->npgs; i++) { pg = PHYS_TO_VM_PAGE(ext_pgs->pa[i]); - /* - * Note: page is not locked, as it has no - * object and is not on any queues. - */ vm_page_unwire_noq(pg); vm_page_free(pg); } Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/kern/uipc_shm.c Mon Sep 9 21:32:42 2019 (r352110) @@ -198,10 +198,8 @@ uiomove_object_page(vm_object_t obj, size_t len, struc printf( "uiomove_object: vm_obj %p idx %jd valid %x pager error %d\n", obj, idx, m->valid, rv); - vm_page_lock(m); vm_page_unwire_noq(m); vm_page_free(m); - vm_page_unlock(m); VM_OBJECT_WUNLOCK(obj); return (EIO); } @@ -217,9 +215,7 @@ uiomove_object_page(vm_object_t obj, size_t len, struc vm_pager_page_unswapped(m); VM_OBJECT_WUNLOCK(obj); } - vm_page_lock(m); vm_page_unwire(m, PQ_ACTIVE); - vm_page_unlock(m); return (error); } @@ -474,7 +470,6 @@ retry: goto retry; rv = vm_pager_get_pages(object, &m, 1, NULL, NULL); - vm_page_lock(m); if (rv == VM_PAGER_OK) { /* * Since the page was not resident, @@ -485,11 +480,9 @@ retry: * as an access. */ vm_page_launder(m); - vm_page_unlock(m); vm_page_xunbusy(m); } else { vm_page_free(m); - vm_page_unlock(m); VM_OBJECT_WUNLOCK(object); return (EIO); } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/mips/mips/pmap.c Mon Sep 9 21:32:42 2019 (r352110) @@ -796,26 +796,22 @@ vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { pt_entry_t pte, *ptep; - vm_paddr_t pa, pte_pa; + vm_paddr_t pa; vm_page_t m; m = NULL; - pa = 0; PMAP_LOCK(pmap); -retry: ptep = pmap_pte(pmap, va); if (ptep != NULL) { pte = *ptep; if (pte_test(&pte, PTE_V) && (!pte_test(&pte, PTE_RO) || (prot & VM_PROT_WRITE) == 0)) { - pte_pa = TLBLO_PTE_TO_PA(pte); - if (vm_page_pa_tryrelock(pmap, pte_pa, &pa)) - goto retry; - m = PHYS_TO_VM_PAGE(pte_pa); - vm_page_wire(m); + pa = TLBLO_PTE_TO_PA(pte); + m = PHYS_TO_VM_PAGE(pa); + if (!vm_page_wire_mapped(m)) + m = NULL; } } - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/net/bpf_zerocopy.c Mon Sep 9 21:32:42 2019 (r352110) @@ -115,10 +115,7 @@ static void zbuf_page_free(vm_page_t pp) { - vm_page_lock(pp); - if (vm_page_unwire(pp, PQ_INACTIVE) && pp->object == NULL) - vm_page_free(pp); - vm_page_unlock(pp); + vm_page_unwire(pp, PQ_INACTIVE); } /* Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/powerpc/aim/mmu_oea.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1264,22 +1264,17 @@ moea_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_offse { struct pvo_entry *pvo; vm_page_t m; - vm_paddr_t pa; m = NULL; - pa = 0; PMAP_LOCK(pmap); -retry: pvo = moea_pvo_find_va(pmap, va & ~ADDR_POFF, NULL); if (pvo != NULL && (pvo->pvo_pte.pte.pte_hi & PTE_VALID) && ((pvo->pvo_pte.pte.pte_lo & PTE_PP) == PTE_RW || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, pvo->pvo_pte.pte.pte_lo & PTE_RPGN, &pa)) - goto retry; m = PHYS_TO_VM_PAGE(pvo->pvo_pte.pte.pte_lo & PTE_RPGN); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/powerpc/aim/mmu_oea64.c Mon Sep 9 21:32:42 2019 (r352110) @@ -1578,21 +1578,15 @@ moea64_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_off { struct pvo_entry *pvo; vm_page_t m; - vm_paddr_t pa; m = NULL; - pa = 0; PMAP_LOCK(pmap); -retry: pvo = moea64_pvo_find_va(pmap, va & ~ADDR_POFF); if (pvo != NULL && (pvo->pvo_pte.prot & prot) == prot) { - if (vm_page_pa_tryrelock(pmap, - pvo->pvo_pte.pa & LPTE_RPGN, &pa)) - goto retry; m = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/powerpc/booke/pmap.c Mon Sep 9 21:32:42 2019 (r352110) @@ -2790,12 +2790,9 @@ mmu_booke_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_ pte_t *pte; vm_page_t m; uint32_t pte_wbit; - vm_paddr_t pa; - + m = NULL; - pa = 0; PMAP_LOCK(pmap); -retry: pte = pte_find(mmu, pmap, va); if ((pte != NULL) && PTE_ISVALID(pte)) { if (pmap == kernel_pmap) @@ -2803,15 +2800,12 @@ retry: else pte_wbit = PTE_UW; - if ((*pte & pte_wbit) || ((prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, PTE_PA(pte), &pa)) - goto retry; + if ((*pte & pte_wbit) != 0 || (prot & VM_PROT_WRITE) == 0) { m = PHYS_TO_VM_PAGE(PTE_PA(pte)); - vm_page_wire(m); + if (!vm_page_wire_mapped(m)) + m = NULL; } } - - PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); return (m); } Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Mon Sep 9 21:03:08 2019 (r352109) +++ head/sys/riscv/riscv/pmap.c Mon Sep 9 21:32:42 2019 (r352110) @@ -870,24 +870,19 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ { pt_entry_t *l3p, l3; vm_paddr_t phys; - vm_paddr_t pa; vm_page_t m; - pa = 0; m = NULL; PMAP_LOCK(pmap); -retry: l3p = pmap_l3(pmap, va); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Sep 9 22:08:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA870E3156; Mon, 9 Sep 2019 22:08:22 +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 46S2Nk4xsGz4jm7; Mon, 9 Sep 2019 22:08:22 +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 8DFBB1C34B; Mon, 9 Sep 2019 22:08:22 +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 x89M8M6m052151; Mon, 9 Sep 2019 22:08:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89M8M60052150; Mon, 9 Sep 2019 22:08:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909092208.x89M8M60052150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Sep 2019 22:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352111 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 352111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 22:08:22 -0000 Author: mav Date: Mon Sep 9 22:08:22 2019 New Revision: 352111 URL: https://svnweb.freebsd.org/changeset/base/352111 Log: Initialize page/subpage in case of `modepage -d`. Previously without -m parameter it worked mostly by concodence. While there, make page/subpage values validation more strict. MFC after: 5 days Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Mon Sep 9 21:32:42 2019 (r352110) +++ head/sbin/camcontrol/camcontrol.c Mon Sep 9 22:08:22 2019 (r352111) @@ -4549,7 +4549,7 @@ modepage(struct cam_device *device, int argc, char **a int task_attr, int retry_count, int timeout) { char *str_subpage; - int c, page = -1, subpage = -1, pc = 0, llbaa = 0; + int c, page = -1, subpage = 0, pc = 0, llbaa = 0; int binary = 0, cdb_len = 10, dbd = 0, desc = 0, edit = 0, list = 0; while ((c = getopt(argc, argv, combinedopt)) != -1) { @@ -4575,11 +4575,9 @@ modepage(struct cam_device *device, int argc, char **a page = strtol(optarg, NULL, 0); if (str_subpage) subpage = strtol(str_subpage, NULL, 0); - else - subpage = 0; - if (page < 0) + if (page < 0 || page > 0x3f) errx(1, "invalid mode page %d", page); - if (subpage < 0) + if (subpage < 0 || subpage > 0xff) errx(1, "invalid mode subpage %d", subpage); break; case 'D': @@ -4598,7 +4596,10 @@ modepage(struct cam_device *device, int argc, char **a } } - if (page == -1 && desc == 0 && list == 0) + if (desc && page == -1) + page = SMS_ALL_PAGES_PAGE; + + if (page == -1 && list == 0) errx(1, "you must specify a mode page!"); if (dbd && desc) From owner-svn-src-head@freebsd.org Mon Sep 9 22:54:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F333FE431B; Mon, 9 Sep 2019 22:54:27 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46S3Pv5fVxz4ltY; Mon, 9 Sep 2019 22:54:27 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A63461CC64; Mon, 9 Sep 2019 22:54:27 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x89MsRZI081400; Mon, 9 Sep 2019 22:54:27 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89MsRaX081398; Mon, 9 Sep 2019 22:54:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909092254.x89MsRaX081398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 9 Sep 2019 22:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352112 - in head: share/man/man4 sys/net X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: share/man/man4 sys/net X-SVN-Commit-Revision: 352112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 22:54:28 -0000 Author: cem Date: Mon Sep 9 22:54:27 2019 New Revision: 352112 URL: https://svnweb.freebsd.org/changeset/base/352112 Log: ddb(4): Add 'show route ' and 'show routetable []' These commands show the route resolved for a specified destination, or print out the entire routing table for a given address family (or all families, if none is explicitly provided). Discussed with: emaste Differential Revision: https://reviews.freebsd.org/D21510 Modified: head/share/man/man4/ddb.4 head/sys/net/rtsock.c Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Mon Sep 9 22:08:22 2019 (r352111) +++ head/share/man/man4/ddb.4 Mon Sep 9 22:54:27 2019 (r352112) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2018 +.Dd September 9, 2019 .Dt DDB 4 .Os .Sh NAME @@ -953,6 +953,20 @@ at address .Ar addr . Addresses of particular pointers can be gathered with "show allrman" command. +.\" +.Pp +.It Ic show Cm route Ar addr +Show route table result for destination +.Ar addr . +At this time, INET and INET6 formatted addresses are supported. +.\" +.Pp +.It Ic show Cm routetable Oo Ar af Oc +Show full route table or tables. +If +.Ar af +is specified, show only routes for the given numeric address family. +If no argument is specified, dump the route table for all address families. .\" .Pp .It Ic show Cm rtc Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Mon Sep 9 22:08:22 2019 (r352111) +++ head/sys/net/rtsock.c Mon Sep 9 22:54:27 2019 (r352112) @@ -31,6 +31,7 @@ * @(#)rtsock.c 8.7 (Berkeley) 10/12/95 * $FreeBSD$ */ +#include "opt_ddb.h" #include "opt_mpath.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -53,6 +54,11 @@ #include #include +#ifdef DDB +#include +#include +#endif + #include #include #include @@ -1995,3 +2001,404 @@ static struct domain routedomain = { }; VNET_DOMAIN_SET(route); + +#ifdef DDB +/* + * Unfortunately, RTF_ values are expressed as raw masks rather than powers of + * 2, so we cannot use them as nice C99 initializer indices below. + */ +static const char * const rtf_flag_strings[] = { + "UP", + "GATEWAY", + "HOST", + "REJECT", + "DYNAMIC", + "MODIFIED", + "DONE", + "UNUSED_0x80", + "UNUSED_0x100", + "XRESOLVE", + "LLDATA", + "STATIC", + "BLACKHOLE", + "UNUSED_0x2000", + "PROTO2", + "PROTO1", + "UNUSED_0x10000", + "UNUSED_0x20000", + "PROTO3", + "FIXEDMTU", + "PINNED", + "LOCAL", + "BROADCAST", + "MULTICAST", + /* Big gap. */ + [28] = "STICKY", + [30] = "RNH_LOCKED", + [31] = "GWFLAG_COMPAT", +}; + +static const char * __pure +rt_flag_name(unsigned idx) +{ + if (idx >= nitems(rtf_flag_strings)) + return ("INVALID_FLAG"); + if (rtf_flag_strings[idx] == NULL) + return ("UNKNOWN"); + return (rtf_flag_strings[idx]); +} + +static void +rt_dumpaddr_ddb(const char *name, const struct sockaddr *sa) +{ + char buf[INET6_ADDRSTRLEN], *res; + + res = NULL; + if (sa == NULL) + res = "NULL"; + else if (sa->sa_family == AF_INET) { + res = inet_ntop(AF_INET, + &((const struct sockaddr_in *)sa)->sin_addr, + buf, sizeof(buf)); + } else if (sa->sa_family == AF_INET6) { + res = inet_ntop(AF_INET6, + &((const struct sockaddr_in6 *)sa)->sin6_addr, + buf, sizeof(buf)); + } else if (sa->sa_family == AF_LINK) { + res = "on link"; + } + + if (res != NULL) { + db_printf("%s <%s> ", name, res); + return; + } + + db_printf("%s ", name, sa->sa_family); +} + +static int +rt_dumpentry_ddb(struct radix_node *rn, void *arg __unused) +{ + struct sockaddr_storage ss; + struct rtentry *rt; + int flags, idx; + + /* If RNTORT is important, put it in a header. */ + rt = (void *)rn; + + rt_dumpaddr_ddb("dst", rt_key(rt)); + rt_dumpaddr_ddb("gateway", rt->rt_gateway); + rt_dumpaddr_ddb("netmask", rtsock_fix_netmask(rt_key(rt), rt_mask(rt), + &ss)); + if (rt->rt_ifp != NULL && (rt->rt_ifp->if_flags & IFF_DYING) == 0) { + rt_dumpaddr_ddb("ifp", rt->rt_ifp->if_addr->ifa_addr); + rt_dumpaddr_ddb("ifa", rt->rt_ifa->ifa_addr); + } + + db_printf("flags "); + flags = rt->rt_flags; + if (flags == 0) + db_printf("none"); + + while ((idx = ffs(flags)) > 0) { + idx--; + + if (flags != rt->rt_flags) + db_printf(","); + db_printf(rt_flag_name(idx)); + + flags &= ~(1ul << idx); + } + + db_printf("\n"); + return (0); +} + +DB_SHOW_COMMAND(routetable, db_show_routetable_cmd) +{ + struct rib_head *rnh; + int error, i, lim; + + if (have_addr) + i = lim = addr; + else { + i = 1; + lim = AF_MAX; + } + + for (; i <= lim; i++) { + rnh = rt_tables_get_rnh(0, i); + if (rnh == NULL) { + if (have_addr) { + db_printf("%s: AF %d not supported?\n", + __func__, i); + break; + } + continue; + } + + if (!have_addr && i > 1) + db_printf("\n"); + + db_printf("Route table for AF %d%s%s%s:\n", i, + (i == AF_INET || i == AF_INET6) ? " (" : "", + (i == AF_INET) ? "INET" : (i == AF_INET6) ? "INET6" : "", + (i == AF_INET || i == AF_INET6) ? ")" : ""); + + error = rnh->rnh_walktree(&rnh->head, rt_dumpentry_ddb, NULL); + if (error != 0) + db_printf("%s: walktree(%d): %d\n", __func__, i, + error); + } +} + +_DB_FUNC(_show, route, db_show_route_cmd, db_show_table, CS_OWN, NULL) +{ + char buf[INET6_ADDRSTRLEN], *bp; + const void *dst_addrp; + struct sockaddr *dstp; + struct rtentry *rt; + union { + struct sockaddr_in dest_sin; + struct sockaddr_in6 dest_sin6; + } u; + uint16_t hextets[8]; + unsigned i, tets; + int t, af, exp, tokflags; + + /* + * Undecoded address family. No double-colon expansion seen yet. + */ + af = -1; + exp = -1; + /* Assume INET6 to start; we can work back if guess was wrong. */ + tokflags = DRT_WSPACE | DRT_HEX | DRT_HEXADECIMAL; + + /* + * db_command has lexed 'show route' for us. + */ + t = db_read_token_flags(tokflags); + if (t == tWSPACE) + t = db_read_token_flags(tokflags); + + /* + * tEOL: Just 'show route' isn't a valid mode. + * tMINUS: It's either '-h' or some invalid option. Regardless, usage. + */ + if (t == tEOL || t == tMINUS) + goto usage; + + db_unread_token(t); + + tets = nitems(hextets); + + /* + * Each loop iteration, we expect to read one octet (v4) or hextet + * (v6), followed by an appropriate field separator ('.' or ':' or + * '::'). + * + * At the start of each loop, we're looking for a number (octet or + * hextet). + * + * INET6 addresses have a special case where they may begin with '::'. + */ + for (i = 0; i < tets; i++) { + t = db_read_token_flags(tokflags); + + if (t == tCOLONCOLON) { + /* INET6 with leading '::' or invalid. */ + if (i != 0) { + db_printf("Parse error: unexpected extra " + "colons.\n"); + goto exit; + } + + af = AF_INET6; + exp = i; + hextets[i] = 0; + continue; + } else if (t == tNUMBER) { + /* + * Lexer separates out '-' as tMINUS, but make the + * assumption explicit here. + */ + MPASS(db_tok_number >= 0); + + if (af == AF_INET && db_tok_number > UINT8_MAX) { + db_printf("Not a valid v4 octet: %ld\n", + db_tok_number); + goto exit; + } + hextets[i] = db_tok_number; + } else if (t == tEOL) { + /* + * We can only detect the end of an IPv6 address in + * compact representation with EOL. + */ + if (af != AF_INET6 || exp < 0) { + db_printf("Parse failed. Got unexpected EOF " + "when the address is not a compact-" + "representation IPv6 address.\n"); + goto exit; + } + break; + } else { + db_printf("Parse failed. Unexpected token %d.\n", t); + goto exit; + } + + /* Next, look for a separator, if appropriate. */ + if (i == tets - 1) + continue; + + t = db_read_token_flags(tokflags); + if (af < 0) { + if (t == tCOLON) { + af = AF_INET6; + continue; + } + if (t == tCOLONCOLON) { + af = AF_INET6; + i++; + hextets[i] = 0; + exp = i; + continue; + } + if (t == tDOT) { + unsigned hn, dn; + + af = AF_INET; + /* Need to fixup the first parsed number. */ + if (hextets[0] > 0x255 || + (hextets[0] & 0xf0) > 0x90 || + (hextets[0] & 0xf) > 9) { + db_printf("Not a valid v4 octet: %x\n", + hextets[0]); + goto exit; + } + + hn = hextets[0]; + dn = (hn >> 8) * 100 + + ((hn >> 4) & 0xf) * 10 + + (hn & 0xf); + + hextets[0] = dn; + + /* Switch to decimal for remaining octets. */ + tokflags &= ~DRT_RADIX_MASK; + tokflags |= DRT_DECIMAL; + + tets = 4; + continue; + } + + db_printf("Parse error. Unexpected token %d.\n", t); + goto exit; + } else if (af == AF_INET) { + if (t == tDOT) + continue; + db_printf("Expected '.' (%d) between octets but got " + "(%d).\n", tDOT, t); + goto exit; + + } else if (af == AF_INET6) { + if (t == tCOLON) + continue; + if (t == tCOLONCOLON) { + if (exp < 0) { + i++; + hextets[i] = 0; + exp = i; + continue; + } + db_printf("Got bogus second '::' in v6 " + "address.\n"); + goto exit; + } + if (t == tEOL) { + /* + * Handle in the earlier part of the loop + * because we need to handle trailing :: too. + */ + db_unread_token(t); + continue; + } + + db_printf("Expected ':' (%d) or '::' (%d) between " + "hextets but got (%d).\n", tCOLON, tCOLONCOLON, t); + goto exit; + } + } + + /* Check for trailing garbage. */ + if (i == tets) { + t = db_read_token_flags(tokflags); + if (t != tEOL) { + db_printf("Got unexpected garbage after address " + "(%d).\n", t); + goto exit; + } + } + + /* + * Need to expand compact INET6 addresses. + * + * Technically '::' for a single ':0:' is MUST NOT but just in case, + * don't bother expanding that form (exp >= 0 && i == tets case). + */ + if (af == AF_INET6 && exp >= 0 && i < tets) { + if (exp + 1 < i) { + memmove(&hextets[exp + 1 + (nitems(hextets) - i)], + &hextets[exp + 1], + (i - (exp + 1)) * sizeof(hextets[0])); + } + memset(&hextets[exp + 1], 0, (nitems(hextets) - i) * + sizeof(hextets[0])); + } + + memset(&u, 0, sizeof(u)); + if (af == AF_INET) { + u.dest_sin.sin_family = AF_INET; + u.dest_sin.sin_len = sizeof(u.dest_sin); + u.dest_sin.sin_addr.s_addr = htonl( + ((uint32_t)hextets[0] << 24) | + ((uint32_t)hextets[1] << 16) | + ((uint32_t)hextets[2] << 8) | + (uint32_t)hextets[3]); + dstp = (void *)&u.dest_sin; + dst_addrp = &u.dest_sin.sin_addr; + } else if (af == AF_INET6) { + u.dest_sin6.sin6_family = AF_INET6; + u.dest_sin6.sin6_len = sizeof(u.dest_sin6); + for (i = 0; i < nitems(hextets); i++) + u.dest_sin6.sin6_addr.s6_addr16[i] = htons(hextets[i]); + dstp = (void *)&u.dest_sin6; + dst_addrp = &u.dest_sin6.sin6_addr; + } else + MPASS(false); + + bp = inet_ntop(af, dst_addrp, buf, sizeof(buf)); + if (bp != NULL) + db_printf("Looking up route to destination '%s'\n", bp); + + CURVNET_SET(vnet0); + rt = rtalloc1(dstp, 0, RTF_RNH_LOCKED); + CURVNET_RESTORE(); + + if (rt == NULL) { + db_printf("Could not get route for that server.\n"); + return; + } + + rt_dumpentry_ddb((void *)rt, NULL); + RTFREE_LOCKED(rt); + + return; +usage: + db_printf("Usage: 'show route
'\n" + " Currently accepts only dotted-decimal INET or colon-separated\n" + " hextet INET6 addresses.\n"); +exit: + db_skip_to_eol(); +} +#endif From owner-svn-src-head@freebsd.org Tue Sep 10 00:38:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6A6CE65D1 for ; Tue, 10 Sep 2019 00:38:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46S5kM4NFDz4qf9; Tue, 10 Sep 2019 00:38:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x8A0calI042867 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Sep 2019 00:38:39 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: imp@bsdimp.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x8A0cVQo024814 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 10 Sep 2019 07:38:31 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r351918 - head/sys/kern To: Warner Losh , Brooks Davis References: <201909060119.x861JWrG006910@repo.freebsd.org> <4917d7507b6ea6c360dccda261f53052aa085f2b.camel@freebsd.org> <5EE266EE-E650-48D8-9B0E-E674AD026470@freebsd.org> <3cb6429acc7e520932d2c906d1cac47540156355.camel@freebsd.org> <8F03EA29-0F3F-4321-9241-78F7C924FDE1@freebsd.org> <9BC03B61-F8B5-476C-AD34-9DEA5230BFCF@freebsd.org> <20190909115632.GB41333@spindle.one-eyed-alien.net> Cc: Philip Paeps , Ian Lepore , src-committers , svn-src-all , svn-src-head From: Eugene Grosbein Message-ID: <788f91ca-be0e-7307-71ca-d29475e386fb@grosbein.net> Date: Tue, 10 Sep 2019 07:38:25 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 46S5kM4NFDz4qf9 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.70 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_PERMFAIL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; IP_SCORE(-1.60)[ip: (-4.26), ipnet: 2a01:4f8::/29(-1.96), asn: 24940(-1.79), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 00:38:52 -0000 10.09.2019 2:49, Warner Losh wrote: > Would your needs be adequately covered by the current mechanisms to set HZ? > This just covers the defaults for the whole platform. > As always, these can be overridden in the boot loader or kernel config file... Several years ago I experimented with FreeBSD/MIPS32 using some real hardware that was both slow and had very small integrated flash, 8MB in total and 128KB for local configuration changes (template overrides). It used compressed root file system and standard /etc/rc.initdiskless script and its /conf/T/M/extract schema to extract local config overrides from the NVRAM very early at startup (called from /etc/rc), before /etc/rc.conf is read and before rcNG starts. Still, it's too late to change kern.hz currently. And that hardware used MIPS32 U-Boot and system had no /boot/loader at all. Maybe we could enable changing kern.hz for single user mode early at startup? From owner-svn-src-head@freebsd.org Tue Sep 10 01:39:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08B1EE8BD2; Tue, 10 Sep 2019 01:39:58 +0000 (UTC) (envelope-from bcran@freebsd.org) Received: from muon.bsdio.com (muon.bluestop.org [65.103.231.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46S74s5R9Kz4vJF; Tue, 10 Sep 2019 01:39:57 +0000 (UTC) (envelope-from bcran@freebsd.org) Received: from muon.bsdio.com (localhost [127.0.0.1]) by muon.bsdio.com (Postfix) with ESMTP id 8859C108580; Mon, 9 Sep 2019 19:40:02 -0600 (MDT) Received: from muon.bsdio.com ([127.0.0.1]) by muon.bsdio.com (muon.bsdio.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id T1A7zOxQ0qC7; Mon, 9 Sep 2019 19:40:02 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [10.0.10.120]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bsdio.com (Postfix) with ESMTPSA; Mon, 9 Sep 2019 19:40:01 -0600 (MDT) Subject: Re: svn commit: r352112 - in head: share/man/man4 sys/net To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201909092254.x89MsRaX081398@repo.freebsd.org> From: Rebecca Cran Autocrypt: addr=bcran@freebsd.org; keydata= mQINBFrUMZ4BEADI1yUEGeZeXeTCPay1ZpTBdDEpGPAw1dq2VCSTc1VhsnrEBa1iZxAfaeSv Uu5Ti7jlhQ/3sQMl0bJMKGB/RtmIW7k8h2w476oZmG8gChk8su5ZEx/pV1gdqInyFmmJKTYc gabJz8pL+m82w07qPv+oalepZ4dbj+HF++RAK/iEju+q9UHlsjj8e3mMNsvtrOz1K6bnpveO jZ+ms/2H3Hs5a4k8y6buwe2RvwhJQaXa13cR3LhzL+nwj4B9PHZZEa2WpEyYpw/bI0V9YSQN QgC1CYRzDyakZge6BCM6wHOgZSUzRPufGilrNKUwIVbRoIBR9/85+0wR+PlFUOUOfOc6ox7T dWcIx6PuPhek48rh4uwmmwsPtPiH4Z3T5p+GmWQ9NLFZKA1YnEdaSkWtYZsDxwVZZeYG2plt MfhXP0Hj4rf9Y3eoUenCaGioxAbUOBCtXdTGNAhNjz1g5NGDBVyhjKkzwJQvt9UrYTseERit 5dX2CMTy8hYLvSXd/Ivy+HylUS5IslfZxW5z9LgWX7Z97kILgkH3N0ewtLkygkG+Y+x7uaAV dFqp9ASOyzaiwKbJdeOI+WxRSh+AqeCR0S+bpkcLudLmbjrPmaFwjKycy1H85Z5R2J3YHyXY oT6OYjD8vLbUU2GWp6Onkcy1Pu8EMbRuzKil6HnpYg3BexbPFwARAQABtCBSZWJlY2NhIENy YW4gPGJjcmFuQGZyZWVic2Qub3JnPokCVAQTAQgAPhYhBB+5fZtkTdO940Yr4g0CK1MRvhAg BQJa2B8pAhsjBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEA0CK1MRvhAgAe0P /R65umdPBVFCYKPZ91HMqlZtn0EWOGwycWEK/feWI+jaYOa+8+VVxFau4gwnBmgCdf5XOAJW QugUlPte9T+dP9QXmgm8z3KMLCj2PATYlmqmQfvIleJPf8w7BFBw/kkd6ZxoEQXaEyZwWuJc vY58uFYizZ8s1gMjD7uV3eg2UuGYd4loBZ3MSanWrhE6mmxAjzcYYb0KTsaTH9ON4uctcTYG 4FN0KzRx5d4nAhnS/yaL+3OI23vUDt+XnOCx8tIOczScOEN5NFChgyvTxzwi7hTVNB7uUCha mN6vcjtrrzi03zHXooldE4gRJ5G+SzuH9yHKrrwYXUeKi8sG8uXVoWwzsLbCxHRe7T9Ow7Im 92Aep3DEIE9whG6Fg3hRQ4/d/9OVCGrV3XwRMEstCvamJQc69ZsULo1ssGmPvcLn8fNaLNeP ICCLQj4JLcYvKKfLIQ/Cm0Orsy8rJGhwF4W1mBUbTdR6pk2azEkrhE7KZDylgikpNNqshKV3 1nD/5SNrTDl0P8rTnu0OKT0IbozIsaz9FD2xMPHPUMPnVSTB96+PhgoBIQlHcys19gftotuN 1tlLs4Ny93xWLSjKWoW5l9E9LbIh+M8gD3A7JyyV9DRZkHdbOt3pGjpaozchDPCpRkcsFXp4 9zSbXtxnbAWfZwoSYQTvznmXpzHMzoLMWf/guQINBFrUMZ4BEADkc4mvMcMcDF1tdNxNQuIB E1F243oZamG3LACCKfc1Yur3CPzHwIk5LXCUmbq23iE5bowxMWw3mlVT0p5xM0WnUidIBwCK u4kRyy/fY4NyWWBuwy9srpTdmUcKRBRNB8zEZE8xIlidD1ijjgqLBfeM7n9ylawAxHLxwU96 sdpdHFzb7Z0yKY2e/bzDaHiG0fUvcCmkgLf+uwKKZid1j8zR5PzKpgPqfy/PF01eKyGV3MNu 8Y90xMoiEMWfCI2IB1m+hTuzZoboFvGV54SiMuvfWK/VMQjhsL6K2ddOqwVuy2nIMI4G3xDQ W/v8KVyn43OSIAyW1eaklhzu0Ir2sO60PXRkvbTUrouvmSvpJfIQS49rU0M/X6FSDgXQLKrZ 3my94+g8ptz9KoVml6s4OAwYVz+sb49nuSxipFKkU5FwhKOLmzbsBxCtytcUJoLmjuJPJPDQ ue6YJiIXyc86GVY2pH3DjemKdbB4dSgqAJIp+lCzKSJzz7bgueh2Ox8vzx1tSxKj7V8Nal+U TKKbkxPmMh+e20YZ4esAVifO3bS6IJP/aDnfagghB71vA7+aWGXPbjPlc2UHpCBiRSsl+Igo QXvdvZBsKRyfBx8neODa2C6JIE5vcaCjilSeKF8SzsFXvimnndhQNhAPU/DwQwSXdCl4gTsF Vi5d8Oxq1sce+wARAQABiQI8BBgBCAAmFiEEH7l9m2RN073jRiviDQIrUxG+ECAFAlrUMZ4C GwwFCQlmAYAACgkQDQIrUxG+ECAWnRAAsmZX+KgNxW3v7R/76Tz4Wjmh4AGeE+Ji3p5QsdTY ny1B6vYBL9vCzPJ/AK8pgKMDRaweUP5eZQpfrdWC8Q7SNGgi4Q+97KEs+i2xZLQ+WJb8a+WE EIc716u0y4ITiHfOgM5jWcFO4MXQATbJgv0drLLesa+LQCvZgPBqupt307EsCubQs+Sxt+RV jf6rOUolp1GJXEQYwGsKklVd6yqLC8M1BSG53/WE5tSv5GzBZ8fp6EtmjT7leuidFtEvKYHQ z4DqG9ELpHUF0X0UUCBK/MgXe3kCVLKE060UrJ4M6uPSx57rmVFA2MvwQR8M7GsWC5UsSM4P YwPWBhwxE7vcx0691YKAHT/5q8LxRVBdUyzPSprMhSQFttsBt+ygm6wRi3Pi3TuCEARNubPk QefyeC34yr40SAUCkOl3eWxSXPF4NfXFQb4AAzZSE5hv3qbDuwo3lrL0LqpIpEQPAz+JZ1QZ 6mMFQ5/JD9Gukj54kZc0X8w3sQt0a8vyE/qrJg8vKgv2rCHrPc5MeDkEUEFiiJiCEDdkJtMy oRlU3S4NrnbyLOLEcHE8fGe3hStPX8hY62id2ecdQ5WZ7vLZW5SFeLarbUciuHIkVL6MHnUj bV7XlY50N7ebeFCIdlCWhdum2FJs/Ni+SSxbZC564vrokwlBBGSo6WTPQTa8IWx1DtU= Message-ID: Date: Mon, 9 Sep 2019 19:39:50 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <201909092254.x89MsRaX081398@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PPMcIKryI2z5mDsojUt5AJ7li27NvvTWF" X-Rspamd-Queue-Id: 46S74s5R9Kz4vJF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 01:39:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PPMcIKryI2z5mDsojUt5AJ7li27NvvTWF Content-Type: multipart/mixed; boundary="JqG3mVWdLCdGA3RereGazQqDe44LiwmMB"; protected-headers="v1" From: Rebecca Cran To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r352112 - in head: share/man/man4 sys/net References: <201909092254.x89MsRaX081398@repo.freebsd.org> In-Reply-To: <201909092254.x89MsRaX081398@repo.freebsd.org> --JqG3mVWdLCdGA3RereGazQqDe44LiwmMB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 Content-Language: en-US T24gMjAxOS0wOS0wOSAxNjo1NCwgQ29ucmFkIE1leWVyIHdyb3RlOgo+IEF1dGhvcjogY2Vt Cj4gICBoZWFkL3NoYXJlL21hbi9tYW40L2RkYi40Cj4gICBoZWFkL3N5cy9uZXQvcnRzb2Nr LmMKCkknbSBzZWVpbmcgdGhlIGZvbGxvd2luZyBlcnJvcnMgd2hlbiBidWlsZGluZzoKCgot LS0gcnRzb2NrLm8gLS0tCnBvaW50ZXItc2lnbiAtV25vLWVycm9yLXNoaWZ0LW5lZ2F0aXZl LXZhbHVlCi1Xbm8tYWRkcmVzcy1vZi1wYWNrZWQtbWVtYmVyIC1Xbm8tZm9ybWF0LXplcm8t bGVuZ3RowqAgLW1uby1hZXMKLW1uby1hdnjCoCAtc3RkPWlzbzk4OTk6MTk5OSAtV2Vycm9y wqAgL3Vzci9zcmMvc3lzL25ldC9ydHNvY2suYwovdXNyL3NyYy9zeXMvbmV0L3J0c29jay5j OjIxMDg6MTM6IGVycm9yOiBmb3JtYXQgc3RyaW5nIGlzIG5vdCBhIHN0cmluZwpsaXRlcmFs IChwb3RlbnRpYWxseSBpbnNlY3VyZSkgWy1XZXJyb3IsLVdmb3JtYXQtc2VjdXJpdHldCsKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBkYl9wcmludGYocnRfZmxhZ19uYW1lKGlk eCkpOwrCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oCBefn5+fn5+fn5+fn5+fn5+fgovdXNyL3NyYy9zeXMvbmV0L3J0c29jay5jOjIxMDg6MTM6 IG5vdGU6IHRyZWF0IHRoZSBzdHJpbmcgYXMgYW4gYXJndW1lbnQKdG8gYXZvaWQgdGhpcwrC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgZGJfcHJpbnRmKHJ0X2ZsYWdfbmFtZShp ZHgpKTsKwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqAgXgrCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oCAiJXMiLAovdXNyL3NyYy9zeXMvbmV0L3J0c29jay5jOjIzNzA6MTM6IGVycm9yOiB2YXJp YWJsZSAnZHN0cCcgaXMgdXNlZAp1bmluaXRpYWxpemVkIHdoZW5ldmVyICdpZicgY29uZGl0 aW9uIGlzIGZhbHNlClstV2Vycm9yLC1Xc29tZXRpbWVzLXVuaW5pdGlhbGl6ZWRdCsKgwqDC oMKgwqDCoMKgIH0gZWxzZSBpZiAoYWYgPT0gQUZfSU5FVDYpIHsKwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgIF5+fn5+fn5+fn5+fn5+Ci91c3Ivc3JjL3N5cy9uZXQv cnRzb2NrLmM6MjM4NToxNjogbm90ZTogdW5pbml0aWFsaXplZCB1c2Ugb2NjdXJzIGhlcmUK wqDCoMKgwqDCoMKgwqAgcnQgPSBydGFsbG9jMShkc3RwLCAwLCBSVEZfUk5IX0xPQ0tFRCk7 CsKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBefn5+CgotLSAK ClJlYmVjY2EgQ3JhbgoK --JqG3mVWdLCdGA3RereGazQqDe44LiwmMB-- --PPMcIKryI2z5mDsojUt5AJ7li27NvvTWF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEH7l9m2RN073jRiviDQIrUxG+ECAFAl12/uoACgkQDQIrUxG+ ECB3HA//UrWrr+KZo2Z9cORVByPYnoDenB8iROBcerUq+l96UCc0of9vwboeoP6O oEs89b9uWx/8rKoLPliRJPd/hiYV3xWqJm5IffBBPRYHWgLBXUyXAndmA3JxshhX tFUCX1cBKTqHoTZE3B9cpLJZ70UMrUwZC3CAbRWJHzuhKoT/Uwj7AhfWon/l6dzW LeJK3xtrWXIRsFm3ckbjUfizyZzUeqNlQ2w1o5gO+uRhwwQsV/pQ/l+KgQnPCMat fLbJVLFlKFlSuzPbW5R6XKl7ISceWO78Xr5uoVzqSRSI9y66vZvWHioYlIEQIxvO WL3NS2FfgG8mVgOHpIU5GbVBwfVPqKU+TdJ+tTPKzCZWL0/3OwP2fmCm5WedjasA UwdB1DS7aj0/grSrcsKVYAhsfxKgrqeNCFZ/V7W7khgMfF8rdNzG5efltZ53nBve vc2HYEsg6UJ0aKU22dwC/KFYGPBV9mVytLMii/g3GUtWDDC3+F9BxnbaYXyDiOS/ 8GWbI3Wh2ECk/Zkk1u60ud/FcA8vhGzgSYEXdHmGR+i3V6dbOqwkV+seTY959BJz RWgjKJx2+YkggViDK7YQAaV+yt3F7YZflhz5a+1LDk/Q/pb2Jtl0C/W+9ReiPwNR NIt3E0Y9ruI3toLnfmFeYeHMvNXiLlwm8Ow+XQDVa0qR7JFshpk= =SdYg -----END PGP SIGNATURE----- --PPMcIKryI2z5mDsojUt5AJ7li27NvvTWF-- From owner-svn-src-head@freebsd.org Tue Sep 10 01:56:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB7B9E9ABA; Tue, 10 Sep 2019 01:56:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46S7SH45J9z3CRG; Tue, 10 Sep 2019 01:56:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 711AD1ED99; Tue, 10 Sep 2019 01:56:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8A1ul7F087904; Tue, 10 Sep 2019 01:56:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A1ulJx087903; Tue, 10 Sep 2019 01:56:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909100156.x8A1ulJx087903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 10 Sep 2019 01:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352113 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 352113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 01:56:47 -0000 Author: cem Date: Tue Sep 10 01:56:47 2019 New Revision: 352113 URL: https://svnweb.freebsd.org/changeset/base/352113 Log: Appease Clang false-positive Werrors in r352112 Reported by: bcran Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Mon Sep 9 22:54:27 2019 (r352112) +++ head/sys/net/rtsock.c Tue Sep 10 01:56:47 2019 (r352113) @@ -2105,7 +2105,7 @@ rt_dumpentry_ddb(struct radix_node *rn, void *arg __un if (flags != rt->rt_flags) db_printf(","); - db_printf(rt_flag_name(idx)); + db_printf("%s", rt_flag_name(idx)); flags &= ~(1ul << idx); } @@ -2374,8 +2374,12 @@ _DB_FUNC(_show, route, db_show_route_cmd, db_show_tabl u.dest_sin6.sin6_addr.s6_addr16[i] = htons(hextets[i]); dstp = (void *)&u.dest_sin6; dst_addrp = &u.dest_sin6.sin6_addr; - } else + } else { MPASS(false); + /* UNREACHABLE */ + /* Appease Clang false positive: */ + dstp = NULL; + } bp = inet_ntop(af, dst_addrp, buf, sizeof(buf)); if (bp != NULL) From owner-svn-src-head@freebsd.org Tue Sep 10 04:01:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5082EEF70; Tue, 10 Sep 2019 04:01:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46SBDP5N56z3Lly; Tue, 10 Sep 2019 04:01:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D1732052A; Tue, 10 Sep 2019 04:01:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8A41fef063067; Tue, 10 Sep 2019 04:01:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A41f3N063065; Tue, 10 Sep 2019 04:01:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201909100401.x8A41f3N063065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 10 Sep 2019 04:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352115 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 352115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 04:01:41 -0000 Author: glebius Date: Tue Sep 10 04:01:41 2019 New Revision: 352115 URL: https://svnweb.freebsd.org/changeset/base/352115 Log: Remove pointless playing with LC_TIME, which should have been done in r205821. Modified: head/usr.bin/calendar/day.c Modified: head/usr.bin/calendar/day.c ============================================================================== --- head/usr.bin/calendar/day.c Tue Sep 10 02:21:17 2019 (r352114) +++ head/usr.bin/calendar/day.c Tue Sep 10 04:01:41 2019 (r352115) @@ -50,7 +50,6 @@ int year1, year2; void settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2) { - char *oldl, *lbufp; struct tm tp; localtime_r(&now, &tp); @@ -67,15 +66,6 @@ settimes(time_t now, int before, int after, int friday year2 = 1900 + tp2->tm_year; strftime(dayname, sizeof(dayname) - 1, "%A, %d %B %Y", tp1); - - oldl = NULL; - lbufp = setlocale(LC_TIME, NULL); - if (lbufp != NULL && (oldl = strdup(lbufp)) == NULL) - errx(1, "cannot allocate memory"); - (void)setlocale(LC_TIME, "C"); - (void)setlocale(LC_TIME, (oldl != NULL ? oldl : "")); - if (oldl != NULL) - free(oldl); setnnames(); } From owner-svn-src-head@freebsd.org Tue Sep 10 04:21:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A218EFB25; Tue, 10 Sep 2019 04:21:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46SBgf0mT1z3MhM; Tue, 10 Sep 2019 04:21:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8EC920A07; Tue, 10 Sep 2019 04:21:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8A4Lnos074512; Tue, 10 Sep 2019 04:21:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A4LnQv074510; Tue, 10 Sep 2019 04:21:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201909100421.x8A4LnQv074510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 10 Sep 2019 04:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352116 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 352116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 04:21:50 -0000 Author: glebius Date: Tue Sep 10 04:21:48 2019 New Revision: 352116 URL: https://svnweb.freebsd.org/changeset/base/352116 Log: Fix 'calendar -a' in several ways. o Do not run any iconv() processing in -a. The locale of root user is not what is desired by most of the users who receive their calendar mail. Just assume that users store their calendars in a format that is readable to them. This fixes regression from r344340. o fork() and setusercontext(LOGIN_SETALL) for every user. This makes LANG set inside a calendar file mostly excessive, as we will pick up user's login class LANG. o This also executes complex function cal() that parses user owned files with appropriate user privileges. Previously it was run with privileges dropped only temporary for execution of cal(), and fully dropped only before invoking sendmail (see r22473). Reviewed by: bapt (older version of patch) Modified: head/usr.bin/calendar/Makefile head/usr.bin/calendar/calendar.c head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Tue Sep 10 04:01:41 2019 (r352115) +++ head/usr.bin/calendar/Makefile Tue Sep 10 04:21:48 2019 (r352116) @@ -6,7 +6,7 @@ PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c -LIBADD= m +LIBADD= m util INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U Modified: head/usr.bin/calendar/calendar.c ============================================================================== --- head/usr.bin/calendar/calendar.c Tue Sep 10 04:01:41 2019 (r352115) +++ head/usr.bin/calendar/calendar.c Tue Sep 10 04:21:48 2019 (r352116) @@ -44,9 +44,11 @@ static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) #include __FBSDID("$FreeBSD$"); +#include #include #include #include +#include #include #include #include @@ -68,7 +70,7 @@ static time_t f_time = 0; double UTCOffset = UTCOFFSET_NOTSET; int EastLongitude = LONGITUDE_NOTSET; #ifdef WITH_ICONV -const char *outputEncoding; +const char *outputEncoding = NULL; #endif static void usage(void) __dead2; @@ -84,12 +86,6 @@ main(int argc, char *argv[]) struct tm tp1, tp2; (void)setlocale(LC_ALL, ""); -#ifdef WITH_ICONV - /* save the information about the encoding used in the terminal */ - outputEncoding = strdup(nl_langinfo(CODESET)); - if (outputEncoding == NULL) - errx(1, "cannot allocate memory"); -#endif while ((ch = getopt(argc, argv, "-A:aB:D:dF:f:l:t:U:W:?")) != -1) switch (ch) { @@ -218,15 +214,33 @@ main(int argc, char *argv[]) if (doall) while ((pw = getpwent()) != NULL) { - (void)setegid(pw->pw_gid); - (void)initgroups(pw->pw_name, pw->pw_gid); - (void)seteuid(pw->pw_uid); - if (!chdir(pw->pw_dir)) + pid_t pid; + + if (chdir(pw->pw_dir) == -1) + continue; + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid == 0) { + login_cap_t *lc; + + lc = login_getpwclass(pw); + if (setusercontext(lc, pw, pw->pw_uid, + LOGIN_SETALL) != 0) + errx(1, "setusercontext"); cal(); - (void)seteuid(0); + exit(0); + } } - else + else { +#ifdef WITH_ICONV + /* Save the information about the encoding used in the terminal. */ + outputEncoding = strdup(nl_langinfo(CODESET)); + if (outputEncoding == NULL) + errx(1, "cannot allocate memory"); +#endif cal(); + } exit(0); } Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Tue Sep 10 04:01:41 2019 (r352115) +++ head/usr.bin/calendar/io.c Tue Sep 10 04:21:48 2019 (r352116) @@ -290,16 +290,24 @@ cal_parse(FILE *in, FILE *out) if (buf[0] == '\0') continue; - /* Parse special definitions: LANG, Easter, Paskha etc */ + /* + * Setting LANG in user's calendar was an old workaround + * for 'calendar -a' being run with C locale to properly + * print user's calendars in their native languages. + * Now that 'calendar -a' does fork with setusercontext(), + * and does not run iconv(), this variable has little use. + */ if (strncmp(buf, "LANG=", 5) == 0) { (void)setlocale(LC_ALL, buf + 5); d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); #ifdef WITH_ICONV - set_new_encoding(); + if (!doall) + set_new_encoding(); #endif setnnames(); continue; } + /* Parse special definitions: Easter, Paskha etc */ REPLACE("Easter=", 7, neaster); REPLACE("Paskha=", 7, npaskha); REPLACE("ChineseNewYear=", 15, ncny); @@ -445,7 +453,6 @@ opencalout(void) void closecal(FILE *fp) { - uid_t uid; struct stat sbuf; int nread, pdes[2], status; char buf[1024]; @@ -470,19 +477,6 @@ closecal(FILE *fp) (void)close(pdes[0]); } (void)close(pdes[1]); - uid = geteuid(); - if (setuid(getuid()) < 0) { - warnx("setuid failed"); - _exit(1); - } - if (setgid(getegid()) < 0) { - warnx("setgid failed"); - _exit(1); - } - if (setuid(uid) < 0) { - warnx("setuid failed"); - _exit(1); - } execl(_PATH_SENDMAIL, "sendmail", "-i", "-t", "-F", "\"Reminder Service\"", (char *)NULL); warn(_PATH_SENDMAIL); From owner-svn-src-head@freebsd.org Tue Sep 10 07:14:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82479F43C0; Tue, 10 Sep 2019 07:14:40 +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 46SGW42w4Bz42th; Tue, 10 Sep 2019 07:14:40 +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 4802222956; Tue, 10 Sep 2019 07:14:40 +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 x8A7EePC079364; Tue, 10 Sep 2019 07:14:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7EekW079363; Tue, 10 Sep 2019 07:14:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100714.x8A7EekW079363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352119 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 352119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:14:40 -0000 Author: bapt Date: Tue Sep 10 07:14:39 2019 New Revision: 352119 URL: https://svnweb.freebsd.org/changeset/base/352119 Log: config: do not link against libl, it is not needed MFC after: 3 days Modified: head/usr.sbin/config/Makefile Modified: head/usr.sbin/config/Makefile ============================================================================== --- head/usr.sbin/config/Makefile Tue Sep 10 06:47:40 2019 (r352118) +++ head/usr.sbin/config/Makefile Tue Sep 10 07:14:39 2019 (r352119) @@ -18,7 +18,7 @@ CFLAGS+= -I. -I${SRCDIR} NO_WMISSING_VARIABLE_DECLARATIONS= -LIBADD= l nv sbuf +LIBADD= nv sbuf CLEANFILES+= kernconf.c From owner-svn-src-head@freebsd.org Tue Sep 10 07:20:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 596B3F45D1; Tue, 10 Sep 2019 07:20:33 +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 46SGds1gdSz439x; Tue, 10 Sep 2019 07:20:33 +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 1898A2295D; Tue, 10 Sep 2019 07:20:33 +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 x8A7KWrR079711; Tue, 10 Sep 2019 07:20:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7KWqq079710; Tue, 10 Sep 2019 07:20:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100720.x8A7KWqq079710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352120 - head/usr.sbin/rrenumd X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/rrenumd X-SVN-Commit-Revision: 352120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:20:33 -0000 Author: bapt Date: Tue Sep 10 07:20:32 2019 New Revision: 352120 URL: https://svnweb.freebsd.org/changeset/base/352120 Log: by specifyng we do not use yywrap we can avoid linking to libl and liby MFC after: 3 days Modified: head/usr.sbin/rrenumd/Makefile head/usr.sbin/rrenumd/lexer.l Modified: head/usr.sbin/rrenumd/Makefile ============================================================================== --- head/usr.sbin/rrenumd/Makefile Tue Sep 10 07:14:39 2019 (r352119) +++ head/usr.sbin/rrenumd/Makefile Tue Sep 10 07:20:32 2019 (r352120) @@ -23,7 +23,7 @@ YFLAGS= -d WARNS?= 2 -LIBADD= ipsec l y +LIBADD= ipsec CLEANFILES= y.tab.h SRCS+= y.tab.h Modified: head/usr.sbin/rrenumd/lexer.l ============================================================================== --- head/usr.sbin/rrenumd/lexer.l Tue Sep 10 07:14:39 2019 (r352119) +++ head/usr.sbin/rrenumd/lexer.l Tue Sep 10 07:20:32 2019 (r352120) @@ -60,6 +60,7 @@ void yyerror(const char *); int yylex(void); %} +%option noyywrap %option nounput /* common section */ From owner-svn-src-head@freebsd.org Tue Sep 10 07:23:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 779BAF4844; Tue, 10 Sep 2019 07:23:02 +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 46SGhk2cy8z43Yn; Tue, 10 Sep 2019 07:23:02 +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 3DD4C22B29; Tue, 10 Sep 2019 07:23:02 +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 x8A7N2Yr085093; Tue, 10 Sep 2019 07:23:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7N1lf085092; Tue, 10 Sep 2019 07:23:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100723.x8A7N1lf085092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352121 - head/usr.sbin/apmd X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/apmd X-SVN-Commit-Revision: 352121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:23:02 -0000 Author: bapt Date: Tue Sep 10 07:23:01 2019 New Revision: 352121 URL: https://svnweb.freebsd.org/changeset/base/352121 Log: Stop linking to libl by specifying we do not need yywrap MFC after: 3 days Modified: head/usr.sbin/apmd/Makefile head/usr.sbin/apmd/apmdlex.l Modified: head/usr.sbin/apmd/Makefile ============================================================================== --- head/usr.sbin/apmd/Makefile Tue Sep 10 07:20:32 2019 (r352120) +++ head/usr.sbin/apmd/Makefile Tue Sep 10 07:23:01 2019 (r352121) @@ -10,8 +10,6 @@ PACKAGE=apm WARNS?= 3 -LIBADD= l - CFLAGS+= -I${.CURDIR} test: Modified: head/usr.sbin/apmd/apmdlex.l ============================================================================== --- head/usr.sbin/apmd/apmdlex.l Tue Sep 10 07:20:32 2019 (r352120) +++ head/usr.sbin/apmd/apmdlex.l Tue Sep 10 07:23:01 2019 (r352121) @@ -44,6 +44,7 @@ int first_time; %} /* We don't need it, avoid the warning. */ +%option noyywrap %option nounput %option noinput From owner-svn-src-head@freebsd.org Tue Sep 10 07:25:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7404F4953; Tue, 10 Sep 2019 07:25:38 +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 46SGlk5NyGz43l0; Tue, 10 Sep 2019 07:25:38 +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 9C2FF22B36; Tue, 10 Sep 2019 07:25:38 +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 x8A7Pc6E085262; Tue, 10 Sep 2019 07:25:38 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7PcYb085260; Tue, 10 Sep 2019 07:25:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100725.x8A7PcYb085260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352122 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 352122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:25:38 -0000 Author: bapt Date: Tue Sep 10 07:25:37 2019 New Revision: 352122 URL: https://svnweb.freebsd.org/changeset/base/352122 Log: Stop linking to libl by specifying we do not need yywrap MFC after: 3 days Modified: head/usr.sbin/jail/Makefile head/usr.sbin/jail/jaillex.l Modified: head/usr.sbin/jail/Makefile ============================================================================== --- head/usr.sbin/jail/Makefile Tue Sep 10 07:23:01 2019 (r352121) +++ head/usr.sbin/jail/Makefile Tue Sep 10 07:25:37 2019 (r352122) @@ -6,7 +6,7 @@ PROG= jail MAN= jail.8 jail.conf.5 SRCS= jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h -LIBADD= jail kvm util l +LIBADD= jail kvm util PACKAGE=jail Modified: head/usr.sbin/jail/jaillex.l ============================================================================== --- head/usr.sbin/jail/jaillex.l Tue Sep 10 07:23:01 2019 (r352121) +++ head/usr.sbin/jail/jaillex.l Tue Sep 10 07:25:37 2019 (r352122) @@ -48,6 +48,7 @@ static int lineno = 1; #define YY_DECL int yylex(void) %} +%option noyywrap %option noinput %option nounput From owner-svn-src-head@freebsd.org Tue Sep 10 07:26:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E6B3CF49E6; Tue, 10 Sep 2019 07:26:38 +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 46SGmt5pG2z43tF; Tue, 10 Sep 2019 07:26:38 +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 ABB1922B38; Tue, 10 Sep 2019 07:26:38 +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 x8A7QcO6085350; Tue, 10 Sep 2019 07:26:38 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7QcIZ085348; Tue, 10 Sep 2019 07:26:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100726.x8A7QcIZ085348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352123 - head/usr.sbin/kbdcontrol X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/kbdcontrol X-SVN-Commit-Revision: 352123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:26:39 -0000 Author: bapt Date: Tue Sep 10 07:26:38 2019 New Revision: 352123 URL: https://svnweb.freebsd.org/changeset/base/352123 Log: Stop linking to libl by specifying we do not need yywrap MFC after: 3 days Modified: head/usr.sbin/kbdcontrol/Makefile head/usr.sbin/kbdcontrol/lex.l Modified: head/usr.sbin/kbdcontrol/Makefile ============================================================================== --- head/usr.sbin/kbdcontrol/Makefile Tue Sep 10 07:25:37 2019 (r352122) +++ head/usr.sbin/kbdcontrol/Makefile Tue Sep 10 07:26:38 2019 (r352123) @@ -8,6 +8,4 @@ SRCS= kbdcontrol.c lex.l WARNS?= 4 CFLAGS+= -I${.CURDIR} -LIBADD= l - .include Modified: head/usr.sbin/kbdcontrol/lex.l ============================================================================== --- head/usr.sbin/kbdcontrol/lex.l Tue Sep 10 07:25:37 2019 (r352122) +++ head/usr.sbin/kbdcontrol/lex.l Tue Sep 10 07:26:38 2019 (r352123) @@ -36,6 +36,7 @@ %} +%option noyywrap %option nounput %option noinput From owner-svn-src-head@freebsd.org Tue Sep 10 07:28:28 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0A35F4B46; Tue, 10 Sep 2019 07:28:28 +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 46SGq04ZTcz446y; Tue, 10 Sep 2019 07:28:28 +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 7A5AB22B39; Tue, 10 Sep 2019 07:28:28 +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 x8A7SSpp085480; Tue, 10 Sep 2019 07:28:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7SRPP085477; Tue, 10 Sep 2019 07:28:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100728.x8A7SRPP085477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352124 - in head/usr.sbin: ctld ndiscvt X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/usr.sbin: ctld ndiscvt X-SVN-Commit-Revision: 352124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:28:28 -0000 Author: bapt Date: Tue Sep 10 07:28:27 2019 New Revision: 352124 URL: https://svnweb.freebsd.org/changeset/base/352124 Log: Stop linking to libl by specifying we do not need yywrap MFC after: 3 days Modified: head/usr.sbin/ctld/Makefile head/usr.sbin/ctld/token.l head/usr.sbin/ndiscvt/Makefile head/usr.sbin/ndiscvt/inf-token.l Modified: head/usr.sbin/ctld/Makefile ============================================================================== --- head/usr.sbin/ctld/Makefile Tue Sep 10 07:26:38 2019 (r352123) +++ head/usr.sbin/ctld/Makefile Tue Sep 10 07:28:27 2019 (r352124) @@ -15,7 +15,7 @@ CFLAGS+= -I${SRCTOP}/sys/dev/iscsi #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -LIBADD= bsdxml l md sbuf util ucl m nv +LIBADD= bsdxml md sbuf util ucl m nv YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Tue Sep 10 07:26:38 2019 (r352123) +++ head/usr.sbin/ctld/token.l Tue Sep 10 07:28:27 2019 (r352124) @@ -45,6 +45,7 @@ extern int yylex(void); %} +%option noyywrap %option noinput %option nounput Modified: head/usr.sbin/ndiscvt/Makefile ============================================================================== --- head/usr.sbin/ndiscvt/Makefile Tue Sep 10 07:26:38 2019 (r352123) +++ head/usr.sbin/ndiscvt/Makefile Tue Sep 10 07:28:27 2019 (r352124) @@ -13,8 +13,6 @@ MAN+= ndisgen.8 WARNS?= 4 NO_WCAST_ALIGN= -LIBADD= l - YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} -I${SRCTOP}/sys Modified: head/usr.sbin/ndiscvt/inf-token.l ============================================================================== --- head/usr.sbin/ndiscvt/inf-token.l Tue Sep 10 07:26:38 2019 (r352123) +++ head/usr.sbin/ndiscvt/inf-token.l Tue Sep 10 07:28:27 2019 (r352124) @@ -59,6 +59,7 @@ update_lineno(const char *cp) %} +%option noyywrap %option nounput %option noinput From owner-svn-src-head@freebsd.org Tue Sep 10 07:40:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 276C7F5042; Tue, 10 Sep 2019 07:40:46 +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 46SH596Zglz44r4; Tue, 10 Sep 2019 07:40:45 +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 C673522D28; Tue, 10 Sep 2019 07:40:45 +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 x8A7ejjw092138; Tue, 10 Sep 2019 07:40:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7ejlB092137; Tue, 10 Sep 2019 07:40:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100740.x8A7ejlB092137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:40:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352126 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 352126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:40:46 -0000 Author: bapt Date: Tue Sep 10 07:40:45 2019 New Revision: 352126 URL: https://svnweb.freebsd.org/changeset/base/352126 Log: Remove reference to mklocale regarding the nls directory mklocale never had anything to do with the content of this directory MFC after: 3 days Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Tue Sep 10 07:29:21 2019 (r352125) +++ head/share/man/man7/hier.7 Tue Sep 10 07:40:45 2019 (r352126) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 6, 2018 +.Dd September 10, 2019 .Dt HIER 7 .Os .Sh NAME @@ -533,9 +533,7 @@ templates for make; see .Xr make 1 .It Pa nls/ -national language support files; -see -.Xr mklocale 1 +national language support files .It Pa security/ data files for security policies such as .Xr mac_lomac 4 From owner-svn-src-head@freebsd.org Tue Sep 10 07:47:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D17A9F5380; Tue, 10 Sep 2019 07:47:53 +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 46SHFP4vZnz45Kp; Tue, 10 Sep 2019 07:47:53 +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 87D3122ED7; Tue, 10 Sep 2019 07:47:53 +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 x8A7lr4B097640; Tue, 10 Sep 2019 07:47:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7lqZC097637; Tue, 10 Sep 2019 07:47:52 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100747.x8A7lqZC097637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352127 - head/lib/libc/locale X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/lib/libc/locale X-SVN-Commit-Revision: 352127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:47:53 -0000 Author: bapt Date: Tue Sep 10 07:47:52 2019 New Revision: 352127 URL: https://svnweb.freebsd.org/changeset/base/352127 Log: In FreeBSD 11 localedef(1) has replaced the mklocale(1) and colldef(1) tools to generate the locales data. state it in the libc manpages. MFC after: 3 days Modified: head/lib/libc/locale/euc.5 head/lib/libc/locale/multibyte.3 head/lib/libc/locale/setlocale.3 Modified: head/lib/libc/locale/euc.5 ============================================================================== --- head/lib/libc/locale/euc.5 Tue Sep 10 07:40:45 2019 (r352126) +++ head/lib/libc/locale/euc.5 Tue Sep 10 07:47:52 2019 (r352127) @@ -31,7 +31,7 @@ .\" @(#)euc.4 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 8, 2003 +.Dd September 9, 2019 .Dt EUC 5 .Os .Sh NAME @@ -58,7 +58,7 @@ .\".Ux .\"based systems. .\"See -.\".Xr mklocale 1 +.\".Xr localedef 1 .\"for a complete description of the .\".Ev LC_CTYPE .\"source file format. @@ -130,5 +130,5 @@ Notice that the global is set to 0x8080, this implies that from those 2 bits the codeset can be determined. .Sh SEE ALSO -.Xr mklocale 1 , +.Xr localedef 1 , .Xr setlocale 3 Modified: head/lib/libc/locale/multibyte.3 ============================================================================== --- head/lib/libc/locale/multibyte.3 Tue Sep 10 07:40:45 2019 (r352126) +++ head/lib/libc/locale/multibyte.3 Tue Sep 10 07:47:52 2019 (r352127) @@ -32,7 +32,7 @@ .\" @(#)multibyte.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 8, 2004 +.Dd September 9, 2019 .Dt MULTIBYTE 3 .Os .Sh NAME @@ -127,7 +127,7 @@ multibyte characters: .It Xr wctomb 3 Ta "convert a wide-character code to a character" .El .Sh SEE ALSO -.Xr mklocale 1 , +.Xr localedef 1 , .Xr setlocale 3 , .Xr stdio 3 , .Xr big5 5 , Modified: head/lib/libc/locale/setlocale.3 ============================================================================== --- head/lib/libc/locale/setlocale.3 Tue Sep 10 07:40:45 2019 (r352126) +++ head/lib/libc/locale/setlocale.3 Tue Sep 10 07:47:52 2019 (r352127) @@ -31,7 +31,7 @@ .\" @(#)setlocale.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd November 21, 2003 +.Dd September 9, 2019 .Dt SETLOCALE 3 .Os .Sh NAME @@ -150,8 +150,7 @@ and the category .Sh ERRORS No errors are defined. .Sh SEE ALSO -.Xr colldef 1 , -.Xr mklocale 1 , +.Xr localedef 1 , .Xr catopen 3 , .Xr ctype 3 , .Xr localeconv 3 , From owner-svn-src-head@freebsd.org Tue Sep 10 07:54:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A10EF57D4; Tue, 10 Sep 2019 07:54:50 +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 46SHPP6xg4z45rw; Tue, 10 Sep 2019 07:54:49 +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 D1FE6230AA; Tue, 10 Sep 2019 07:54:49 +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 x8A7snop003253; Tue, 10 Sep 2019 07:54:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7sncQ003252; Tue, 10 Sep 2019 07:54:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100754.x8A7sncQ003252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352128 - in head: . usr.bin usr.bin/colldef usr.bin/mklocale X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: . usr.bin usr.bin/colldef usr.bin/mklocale X-SVN-Commit-Revision: 352128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:54:50 -0000 Author: bapt Date: Tue Sep 10 07:54:49 2019 New Revision: 352128 URL: https://svnweb.freebsd.org/changeset/base/352128 Log: Remove mklocale(1) and colldef(1) which are deprecated since FreeBSD 11 In FreeBSD 11 along with the rework on the collation, mklocale(1) and colldef(1) has been replaced by localedef(1) (a note has been added to the manpage to state it). mklocale(1) and colldef(1) has been kept around to be able to build older versions of FreeBSD. None of the version requiring those tools are supported anymore so it is time to remove them from base Deleted: head/usr.bin/colldef/ head/usr.bin/mklocale/ Modified: head/ObsoleteFiles.inc head/usr.bin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Sep 10 07:47:52 2019 (r352127) +++ head/ObsoleteFiles.inc Tue Sep 10 07:54:49 2019 (r352128) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20190910: mklocale(1) and colldef(1) removed +OLD_FILES+=usr.bin/mklocale +OLD_FILES+=usr/share/man/man1/mklocale.1.gz +OLD_FILES+=usr.bin/colldef +OLD_FILES+=usr/share/man/man1/colldef.1.gz # 20190904: Remove boot1.efifat OLD_FILES+=boot/boot1.efifat # 20190903: pc-sysinstall(8) removed Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Sep 10 07:47:52 2019 (r352127) +++ head/usr.bin/Makefile Tue Sep 10 07:54:49 2019 (r352128) @@ -20,7 +20,6 @@ SUBDIR= alias \ cksum \ cmp \ col \ - colldef \ colrm \ column \ comm \ @@ -94,7 +93,6 @@ SUBDIR= alias \ mkdep \ mkfifo \ mkimg \ - mklocale \ mktemp \ mkuzip \ mt \ From owner-svn-src-head@freebsd.org Tue Sep 10 07:56:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82185F589E; Tue, 10 Sep 2019 07:56:58 +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 46SHRt2sZvz461f; Tue, 10 Sep 2019 07:56:58 +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 45BF1230B0; Tue, 10 Sep 2019 07:56:58 +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 x8A7uwAp003419; Tue, 10 Sep 2019 07:56:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A7uwxm003418; Tue, 10 Sep 2019 07:56:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100756.x8A7uwxm003418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 07:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352129 - head X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 352129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 07:56:58 -0000 Author: bapt Date: Tue Sep 10 07:56:57 2019 New Revision: 352129 URL: https://svnweb.freebsd.org/changeset/base/352129 Log: Remove a blankline wrongly added in r351781 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Sep 10 07:54:49 2019 (r352128) +++ head/ObsoleteFiles.inc Tue Sep 10 07:56:57 2019 (r352129) @@ -125,7 +125,6 @@ OLD_DIRS+=usr/share/pc-sysinstall/conf/license OLD_DIRS+=usr/share/pc-sysinstall/conf OLD_DIRS+=usr/share/pc-sysinstall/doc OLD_DIRS+=usr/share/pc-sysinstall - # 20190825: zlib 1.0.4 removed from kernel OLD_FILES+=usr/include/sys/zlib.h OLD_FILES+=usr/include/sys/zutil.h From owner-svn-src-head@freebsd.org Tue Sep 10 08:12:56 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0722EF6ABB; Tue, 10 Sep 2019 08:12:56 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46SHpH1CD0z47NJ; Tue, 10 Sep 2019 08:12:54 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 0FF493C0199; Tue, 10 Sep 2019 08:12:54 +0000 (UTC) Date: Tue, 10 Sep 2019 08:12:54 +0000 From: Brooks Davis To: Warner Losh Cc: Philip Paeps , Ian Lepore , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r351918 - head/sys/kern Message-ID: <20190910081254.GC41333@spindle.one-eyed-alien.net> References: <201909060119.x861JWrG006910@repo.freebsd.org> <4917d7507b6ea6c360dccda261f53052aa085f2b.camel@freebsd.org> <5EE266EE-E650-48D8-9B0E-E674AD026470@freebsd.org> <3cb6429acc7e520932d2c906d1cac47540156355.camel@freebsd.org> <8F03EA29-0F3F-4321-9241-78F7C924FDE1@freebsd.org> <9BC03B61-F8B5-476C-AD34-9DEA5230BFCF@freebsd.org> <20190909115632.GB41333@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JgQwtEuHJzHdouWu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 46SHpH1CD0z47NJ X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net X-Spamd-Result: default: False [-6.48 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; IP_SCORE(-3.58)[ip: (-9.35), ipnet: 199.48.128.0/22(-4.66), asn: 36236(-3.86), country: US(-0.05)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 08:12:56 -0000 --JgQwtEuHJzHdouWu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 09, 2019 at 01:49:50PM -0600, Warner Losh wrote: > On Mon, Sep 9, 2019, 5:56 AM Brooks Davis wrote: >=20 > > On Sat, Sep 07, 2019 at 12:23:03PM +0800, Philip Paeps wrote: > > > On 2019-09-07 12:06:32 (+0800), Warner Losh wrote: > > > > On Fri, Sep 6, 2019 at 9:54 PM Philip Paeps > > > > wrote: > > > >> On 2019-09-06 22:18:36 (+0800), Ian Lepore wrote: > > > >>> On Fri, 2019-09-06 at 12:15 +0800, Philip Paeps wrote: > > > >>>> On 2019-09-06 11:15:12 (+0800), Ian Lepore wrote: > > > >>>>> On Fri, 2019-09-06 at 01:19 +0000, Philip Paeps wrote: > > > >>>>>> Log: > > > >>>>>> riscv: default to HZ=3D100 > > > >>>>> > > > >>>>> This seems like a bad idea. I've run a 90mhz armv4 chip with > > > >>>>> HZ=3D1000 and didn't notice any performance hit from doing so. > > > >>>>> Almost all arm kernel config files set HZ as an option, so that > > > >>>>> define doesn't do much for arm these days. It probably does st= ill > > > >>>>> set HZ for various mips platforms. > > > >>>>> > > > >>>>> I would think 1000 is appropriate for anything modern running at > > > >>>>> 200mhz or more. > > > >>>>> > > > >>>>> Setting it to 100 has the bad side effect of making things like > > > >>>>> msleep(), tsleep(), and pause() (which show up in plenty of > > > >>>>> drivers) all have a minimum timeout of 10ms, which is a long lo= ng > > > >>>>> time on modern hardware. > > > >>>>> > > > >>>>> What benefit do you think you'll get from the lower number? > > > >>>> > > > >>>> On systems running at 10s of MHz (or slower, ick), with HZ=3D100= 0 you > > > >>>> spend an awful lot of time servicing the timer interrupt and not > > > >>>> very much time doing anything else. > > > >>>> > > > >>>> My rationale was that most RISC-V systems (including emulation a= nd > > > >>>> FPGA prototypes) I've encountered are running slower than the > > > >>>> tipping point where HZ=3D1000 makes sense. With the default of > > > >>>> HZ=3D100, faster exceptions can still set HZ=3D1000 in their ind= ividual > > > >>>> configs. > > > >>>> > > > >>>> When the RISC-V world evolves to having more actual silicon and > > > >>>> fewer slow prototypes, I definitely agree this default should be > > > >>>> flipped again for HZ=3D1000 by default and HZ=3D100 in the confi= g files > > > >>>> for the exceptions. > > > >>> > > > >>> Wait a second... are you saying that the riscv implementation > > > >>> doesn't support event timers and uses an old-style periodic tick > > > >>> based on HZ? > > > >> > > > >> Depending on the hardware, there may not be an event timer (yet)... > > > >> > > > >> As I wrote: I would be more than happy to revert this change when > > > >> more silicon becomes available. Presently, there is exactly one > > > >> silicon RISC-V implementation commercially available (HiFive FU540) > > > >> and even that one is kind of difficult to source. Most people > > > >> running RISC-V are doing so in emulation or on FPGAs. > > > >> > > > >> Given how long these things take to boot to userland (where you > > > >> really notice how slow things are), HZ=3D100 feels like a more sen= sible > > > >> default than HZ=3D1000. > > > > > > > > I think it show more that the defaults are bad for MIPS and ARM. All > > > > the MIPS files, except BERI/CHERI are 1000Hz. Well, Octeon is also > > > > 100Hz, due to the defaults, but it will be fine at 1000Hz, so maybe= we > > > > need to attend to this as well. Arm !=3Dv5 is also 1000Hz, so it sh= ould > > > > be changed... > > > > > > > >> I don't feel terribly strongly about this though. I've just been > > > >> bitten several times in the last week on a <15MHz FPGA forgetting = to > > > >> set HZ=3D100 in config and figured I'd save others the trouble. ;-) > > > > > > > > 15MHz FPGA? FreeBSD 1.0 barely ran on 25MHz i386 machines of the > > > > time.... How common are these beasts and how well does FreeBSD do = on > > > > them. I assume these are early prototypes? > > > > > > These are early prototypes indeed. > > > > > > FreeBSD runs remarkably well on them. Slowly of course. Booting tak= es > > > several minutes and running anything non-trivial can be frustrating. > > > > [More context for Warner and others following along.] > > > > I don't know what platform Philip is using here, but with architectures > > supporting CHERI (including MIPS and RISC-V), we typically run on > > sub-100Mhz FPGA implementations. > > > > We also run on simulations or models that range from 100s of MIPS to a > > few KIPS. Being able to do this is important to help validate that the > > models we're proving security properties on actually relate to the > > "more real" implementations we develop on. > > > > In all these cases, "run" is a relative thing. We certainly don't > > expect to self-host until we've got performant hardware (and to the > > extent that we care about 32-bit, we consider self-hosting an active > > non-goal.) We often expect to be able to run real software including > > things like nginx and webkit, but we mostly care about relative > > performance not interactivity. >=20 > Would your needs be adequately covered by the current mechanisms to set H= Z? > This just covers the defaults for the whole platform. As always, these can > be overridden in the boot loader or kernel config file... Yeah, the current mechanisms are fine. I just wanted to clarify that we're asking different things from the platform then we did of a 25MHz i386. -- Brooks --JgQwtEuHJzHdouWu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJdd1sFAAoJEKzQXbSebgfA5rsH/3FnBhgLccO5ab/LWKIqVNra s0E8LeG0NVshi46Ooyh9g2g5qhsV7Z+2cyG8OBBkFvWfYiM4JNI29k6GmkfReNAq njJASuniOwR49q6tiR0qy79gnXq8GpfNJ2X6NM9jTrdRsTL1Q4XLX92eWNZnZTZz uTREBt2koi0tQe0hZ40tZJOxt+wy/mnxtuh183ouO64zK8DSIhvlTNwssS9zqPzJ UmTZQuuXJO1vJhdJjWHVX2krn1IfgL4P2FbdeQPFLXi8qDKpojNMO/oqMd4XMIbp HIN1XybfoInX/+92uvtaAoFJPMx1yoVOqFsFLTWjzNA+Nn4hEGgqX32WW6FfULs= =t4lh -----END PGP SIGNATURE----- --JgQwtEuHJzHdouWu-- From owner-svn-src-head@freebsd.org Tue Sep 10 08:19:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E21E4F6CCC; Tue, 10 Sep 2019 08:19:47 +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 46SHyC5DlLz47dM; Tue, 10 Sep 2019 08:19:47 +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 9700023469; Tue, 10 Sep 2019 08:19:47 +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 x8A8Jli4015710; Tue, 10 Sep 2019 08:19:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A8JlH4015708; Tue, 10 Sep 2019 08:19:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100819.x8A8JlH4015708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 08:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352130 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 352130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 08:19:47 -0000 Author: bapt Date: Tue Sep 10 08:19:46 2019 New Revision: 352130 URL: https://svnweb.freebsd.org/changeset/base/352130 Log: Stop linking to libl by specifying we do not need yywrap MFC after: 3 days Modified: head/sbin/devd/Makefile head/sbin/devd/token.l Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Tue Sep 10 07:56:57 2019 (r352129) +++ head/sbin/devd/Makefile Tue Sep 10 08:19:46 2019 (r352130) @@ -34,7 +34,7 @@ MAN= devd.8 devd.conf.5 NO_SHARED?=YES -LIBADD= l util +LIBADD= util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} Modified: head/sbin/devd/token.l ============================================================================== --- head/sbin/devd/token.l Tue Sep 10 07:56:57 2019 (r352129) +++ head/sbin/devd/token.l Tue Sep 10 08:19:46 2019 (r352130) @@ -50,6 +50,7 @@ update_lineno(const char *cp) %} +%option noyywrap %option nounput %option noinput From owner-svn-src-head@freebsd.org Tue Sep 10 08:22:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 876CDF6F8D; Tue, 10 Sep 2019 08:22:45 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46SJ1d2zVwz4859; Tue, 10 Sep 2019 08:22:45 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 46SJ1T0jQXz3c7b; Tue, 10 Sep 2019 08:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=daemonic.se; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=20151023; t=1568103755; bh=l3d8pdl3nagaWEgmfiVRb3HM kutxyIaup9+ku2kJmog=; b=NN4U0VUmIUxDQUsPaF8Xvzj+667nyirpStDOHGaC hnXNpwA/j2V8iUtVc64sm44O3Sy0Q9/6D0/y86cKje4Yyz1hRa2OAnDQXgiHVYqx +FDAphQxXY6y5bW4usqZCC8Jit53IggtRv7GIU9ya9bNdkpZ8ahJ8PG/3VVHXdmt yoc= X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([127.0.0.1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [127.0.0.1]) (amavisd-new, port 10587) with ESMTPS id Ua967t-GjHUM; Tue, 10 Sep 2019 08:22:35 +0000 (UTC) Received: from garnet.daemonic.se (host-90-233-173-70.mobileonline.telia.com [90.233.173.70]) by mail.daemonic.se (Postfix) with ESMTPSA id 46SJ1R4hL3z3c7Z; Tue, 10 Sep 2019 08:22:35 +0000 (UTC) Subject: Re: svn commit: r352128 - in head: . usr.bin usr.bin/colldef usr.bin/mklocale To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201909100754.x8A7sncQ003252@repo.freebsd.org> From: Niclas Zeising Message-ID: <157d6234-19c4-3e0f-34f8-bc73c28da925@daemonic.se> Date: Tue, 10 Sep 2019 10:22:27 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <201909100754.x8A7sncQ003252@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46SJ1d2zVwz4859 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[freebsd] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 08:22:45 -0000 On 2019-09-10 09:54, Baptiste Daroussin wrote: > Author: bapt > Date: Tue Sep 10 07:54:49 2019 > New Revision: 352128 > URL: https://svnweb.freebsd.org/changeset/base/352128 > > Log: > Remove mklocale(1) and colldef(1) which are deprecated since FreeBSD 11 > > In FreeBSD 11 along with the rework on the collation, mklocale(1) and colldef(1) > has been replaced by localedef(1) (a note has been added to the manpage to state > it). > mklocale(1) and colldef(1) has been kept around to be able to build older > versions of FreeBSD. None of the version requiring those tools are supported > anymore so it is time to remove them from base > > Deleted: > head/usr.bin/colldef/ > head/usr.bin/mklocale/ > Modified: > head/ObsoleteFiles.inc > head/usr.bin/Makefile > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Tue Sep 10 07:47:52 2019 (r352127) > +++ head/ObsoleteFiles.inc Tue Sep 10 07:54:49 2019 (r352128) > @@ -38,6 +38,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20190910: mklocale(1) and colldef(1) removed > +OLD_FILES+=usr.bin/mklocale ^^^^^^^^^^ should be usr/bin/mklocale > +OLD_FILES+=usr/share/man/man1/mklocale.1.gz > +OLD_FILES+=usr.bin/colldef ^^^^^^^^^^ should be usr/bin/colldef > +OLD_FILES+=usr/share/man/man1/colldef.1.gz > # 20190904: Remove boot1.efifat > OLD_FILES+=boot/boot1.efifat > # 20190903: pc-sysinstall(8) removed Regards -- Niclas From owner-svn-src-head@freebsd.org Tue Sep 10 08:28:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CDDCF70D8; Tue, 10 Sep 2019 08:28:45 +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 46SJ8X71zVz48JF; Tue, 10 Sep 2019 08:28:44 +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 D4D5C2362B; Tue, 10 Sep 2019 08:28:44 +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 x8A8SiLU021341; Tue, 10 Sep 2019 08:28:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A8SiZO021340; Tue, 10 Sep 2019 08:28:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909100828.x8A8SiZO021340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 08:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352131 - head X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 352131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 08:28:45 -0000 Author: bapt Date: Tue Sep 10 08:28:44 2019 New Revision: 352131 URL: https://svnweb.freebsd.org/changeset/base/352131 Log: Fix bad path Reported by: zeising Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Sep 10 08:19:46 2019 (r352130) +++ head/ObsoleteFiles.inc Tue Sep 10 08:28:44 2019 (r352131) @@ -39,9 +39,9 @@ # done # 20190910: mklocale(1) and colldef(1) removed -OLD_FILES+=usr.bin/mklocale +OLD_FILES+=usr/bin/mklocale OLD_FILES+=usr/share/man/man1/mklocale.1.gz -OLD_FILES+=usr.bin/colldef +OLD_FILES+=usr/bin/colldef OLD_FILES+=usr/share/man/man1/colldef.1.gz # 20190904: Remove boot1.efifat OLD_FILES+=boot/boot1.efifat From owner-svn-src-head@freebsd.org Tue Sep 10 08:51:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC331F7D0A; Tue, 10 Sep 2019 08:51:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SJfR5fW3z4BBJ; Tue, 10 Sep 2019 08:51:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A544B23A12; Tue, 10 Sep 2019 08:51:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8A8pB80036536; Tue, 10 Sep 2019 08:51:11 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8A8pB6X036505; Tue, 10 Sep 2019 08:51:11 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201909100851.x8A8pB6X036505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 10 Sep 2019 08:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352132 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 352132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 08:51:12 -0000 Author: lwhsu Date: Tue Sep 10 08:51:11 2019 New Revision: 352132 URL: https://svnweb.freebsd.org/changeset/base/352132 Log: Fix build for the platforms where db_expr_t is not long Sponsored by: The FreeBSD Foundation Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Tue Sep 10 08:28:44 2019 (r352131) +++ head/sys/net/rtsock.c Tue Sep 10 08:51:11 2019 (r352132) @@ -2226,7 +2226,7 @@ _DB_FUNC(_show, route, db_show_route_cmd, db_show_tabl if (af == AF_INET && db_tok_number > UINT8_MAX) { db_printf("Not a valid v4 octet: %ld\n", - db_tok_number); + (long)db_tok_number); goto exit; } hextets[i] = db_tok_number; From owner-svn-src-head@freebsd.org Tue Sep 10 14:03:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A9D9D7545 for ; Tue, 10 Sep 2019 14:03:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46SRZv540Xz4TSr for ; Tue, 10 Sep 2019 14:03:35 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568124214; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Y6QYn/XVBRWGMh315ITuQQBO46sei/QBVtUgIhQQ7HWhbiDo63fQpr9PzXxt6HTtmwAdtZalW+nBt BJT0euN4LGhVkaDQNhzMR7XSWmnE0IqaXfPZDxiNxKq/abDmJk8DCMtS6ycSbhW7uJhjQ+/kx/j2au Fw7PUl7F4H4Nu3UttM/v5lr3viYTgbgSUtmx3akNbCf0ukWBW0x5Y6dHwWhpQgUo3TQr8ISbPYqZ6C EWUogl5k5tAfCzaOXSd2ZnK9FrdPOWzpdIBtSKPJCWfeK5d59jN6HCg7oSxAQleWv+YN9RT8B6obZT rcp/Q4j7PgmZQ99LB3uqoGgKZv49fUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=barJODCK+NNID+q5G8FigBGpZvZ1I7zNyMchL9WKpyg=; b=rwixgx3sAhvDMlsPT4cUQaRgev/0ZE+vLKt/V1qp11irDc/4e/uQP9LpNjFEOxiJJo1tbYDeyCWuN /oYX8Da125uUrNvcPiXDiz0BjSRM9raYg35b4GdDtv8l13F8VQGaTuf3QVSWDhG6nNajsaQ79Up71f /xIr3EKaPFCCs0eQXzOz5FYgBBc956CVJSNU5btVIavjpyQkU3PjwdSiPOcbQBtxiDX0lqAIahYnQf C54QwiRB/nWIMhhDnnuhquU3CxgsnbU/q3OonL9iRr+m7Le8h9zxX95XS2fix5h+KAK3Q1Vh7usY0i xIaoctUfxD/4w8+/S1U58imhgdMVORA== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=barJODCK+NNID+q5G8FigBGpZvZ1I7zNyMchL9WKpyg=; b=H/FbNQ7JTcSKz5Lhkb6o+jxpXFjqb2CXrCIh1pJnl6pRmpuvd1ENyQ2GHHvKRTGHAbnwdA4Hylt2h 6S2NggE3EFJ6ecYBA3LuBvh6ZuliIL23xAx2CwA2klbtIqAtPMTl0jgewEQ6nskkuLC7bubUbVg5Jc TNzECDBmpVJRh3YDG8ANEwlT+mVlYfNEnyr8whF6UNjJFS2SmgHhG7/+7AGLy/GFXENMZzO/5AYXcx tOekQ6Yih8lFO8690PefPptAv4adiJQG/uuxk8swWpAp9cnBP2mltvljMC81y+uzDYtKtL1SO0Xiyg bZ0U71InbfUl5FDodKqaiYygrqLuF1g== X-MHO-RoutePath: aGlwcGll X-MHO-User: c4202099-d3d3-11e9-b67d-cdd75d6ce7a8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id c4202099-d3d3-11e9-b67d-cdd75d6ce7a8; Tue, 10 Sep 2019 14:03:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8AE3Tr0066775; Tue, 10 Sep 2019 08:03:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <06266e49ff64bba81b435c58985db7d88c74be03.camel@freebsd.org> Subject: Re: svn commit: r352113 - head/sys/net From: Ian Lepore To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 10 Sep 2019 08:03:29 -0600 In-Reply-To: <201909100156.x8A1ulJx087903@repo.freebsd.org> References: <201909100156.x8A1ulJx087903@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46SRZv540Xz4TSr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 14:03:36 -0000 On Tue, 2019-09-10 at 01:56 +0000, Conrad Meyer wrote: > Author: cem > Date: Tue Sep 10 01:56:47 2019 > New Revision: 352113 > URL: https://svnweb.freebsd.org/changeset/base/352113 > > Log: > Appease Clang false-positive Werrors in r352112 > > Reported by: bcran > > Modified: > head/sys/net/rtsock.c > > Modified: head/sys/net/rtsock.c > ===================================================================== > ========= > --- head/sys/net/rtsock.c Mon Sep 9 22:54:27 2019 (r352112) > +++ head/sys/net/rtsock.c Tue Sep 10 01:56:47 2019 (r352113) > @@ -2105,7 +2105,7 @@ rt_dumpentry_ddb(struct radix_node *rn, void > *arg __un > > if (flags != rt->rt_flags) > db_printf(","); > - db_printf(rt_flag_name(idx)); > + db_printf("%s", rt_flag_name(idx)); > > flags &= ~(1ul << idx); > } > @@ -2374,8 +2374,12 @@ _DB_FUNC(_show, route, db_show_route_cmd, > db_show_tabl > u.dest_sin6.sin6_addr.s6_addr16[i] = > htons(hextets[i]); > dstp = (void *)&u.dest_sin6; > dst_addrp = &u.dest_sin6.sin6_addr; > - } else > + } else { > MPASS(false); > + /* UNREACHABLE */ > + /* Appease Clang false positive: */ > + dstp = NULL; > + } > > bp = inet_ntop(af, dst_addrp, buf, sizeof(buf)); > if (bp != NULL) > I don't think this was a false positive. MPASS resolves to KASSERT which resolves to nothing when built without INVARIANTS defined. So that comment is misleading, the code isn't unreachable, and after falling through, dstp is going to be dereferenced a few lines later. Instead of just squelching the coverity error, I think it should lead to the question: Does it make any sense to assert in a ddb command handler? Would it make more sense to make that else block do something like db_printf("Unexpected address family %d\n", af); goto exit; ? -- Ian From owner-svn-src-head@freebsd.org Tue Sep 10 14:30:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AF58D7FE9; Tue, 10 Sep 2019 14:30:11 +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 46SS9b0q2Hz4VjK; Tue, 10 Sep 2019 14:30:11 +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 004E7276AC; Tue, 10 Sep 2019 14:30:11 +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 x8AEUAPT035324; Tue, 10 Sep 2019 14:30:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AEUAdT035323; Tue, 10 Sep 2019 14:30:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909101430.x8AEUAdT035323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 10 Sep 2019 14:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352136 - head/contrib/libedit X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/contrib/libedit X-SVN-Commit-Revision: 352136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 14:30:11 -0000 Author: bapt Date: Tue Sep 10 14:30:10 2019 New Revision: 352136 URL: https://svnweb.freebsd.org/changeset/base/352136 Log: Import libedit 2019-09-10 Compared to current version in base: - great improvements on the Unicode support - full support for filename completion including quoting which means we do not need anymore our custom addition) - Improved readline compatiblity Upgrading libedit has been a pain in the past, because somehow we never managed to properly cleanup the tree in lib/libedit and each merge has always been very painful. After years of fighting give up and refresh a merge from scrarch properly in contrib. Note that the switch to this version will be done in another commit. Added: head/contrib/libedit/ - copied from r352135, vendor/NetBSD/libedit/dist/ From owner-svn-src-head@freebsd.org Tue Sep 10 14:33:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4B79D8298; Tue, 10 Sep 2019 14:33:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46SSDz5M4qz4WCD; Tue, 10 Sep 2019 14:33:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B8C52785F; Tue, 10 Sep 2019 14:33:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AEX7to040848; Tue, 10 Sep 2019 14:33:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AEX7aq040847; Tue, 10 Sep 2019 14:33:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909101433.x8AEX7aq040847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Sep 2019 14:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352137 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 352137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 14:33:07 -0000 Author: hselasky Date: Tue Sep 10 14:33:07 2019 New Revision: 352137 URL: https://svnweb.freebsd.org/changeset/base/352137 Log: Callout drain does not have to be followed by a callout stop call. Fix bogus code. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/net/if_spppsubr.c Modified: head/sys/net/if_spppsubr.c ============================================================================== --- head/sys/net/if_spppsubr.c Tue Sep 10 14:30:10 2019 (r352136) +++ head/sys/net/if_spppsubr.c Tue Sep 10 14:33:07 2019 (r352137) @@ -1060,15 +1060,13 @@ sppp_detach(struct ifnet *ifp) KASSERT(mtx_initialized(&sp->mtx), ("sppp mutex is not initialized")); /* Stop keepalive handler. */ - if (!callout_drain(&sp->keepalive_callout)) - callout_stop(&sp->keepalive_callout); + callout_drain(&sp->keepalive_callout); for (i = 0; i < IDX_COUNT; i++) { - if (!callout_drain(&sp->ch[i])) - callout_stop(&sp->ch[i]); + callout_drain(&sp->ch[i]); } - if (!callout_drain(&sp->pap_my_to_ch)) - callout_stop(&sp->pap_my_to_ch); + callout_drain(&sp->pap_my_to_ch); + mtx_destroy(&sp->pp_cpq.ifq_mtx); mtx_destroy(&sp->pp_fastq.ifq_mtx); mtx_destroy(&sp->mtx); From owner-svn-src-head@freebsd.org Tue Sep 10 15:09:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D8CED94AE; Tue, 10 Sep 2019 15:09:48 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46ST3J3T4kz4XyJ; Tue, 10 Sep 2019 15:09:48 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55D3E27E29; Tue, 10 Sep 2019 15:09:48 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AF9mBg058942; Tue, 10 Sep 2019 15:09:48 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AF9kXj058932; Tue, 10 Sep 2019 15:09:46 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201909101509.x8AF9kXj058932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Tue, 10 Sep 2019 15:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352138 - in head: etc/mtree usr.bin/locale usr.bin/locale/tests X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in head: etc/mtree usr.bin/locale usr.bin/locale/tests X-SVN-Commit-Revision: 352138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 15:09:48 -0000 Author: yuripv Date: Tue Sep 10 15:09:46 2019 New Revision: 352138 URL: https://svnweb.freebsd.org/changeset/base/352138 Log: locale: handle day, abday, mon, abmon, am_pm keywords All of these are defined as mandatory by POSIX. While here, mark all non-standard ones as FreeBSD-only as other systems (at least, GNU/Linux and illumos) do not handle them, so we should not encourage their use. PR: 237752 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21490 Added: head/usr.bin/locale/tests/ head/usr.bin/locale/tests/Makefile (contents, props changed) head/usr.bin/locale/tests/k_flag_posix_messages.out (contents, props changed) head/usr.bin/locale/tests/k_flag_posix_monetary.out (contents, props changed) head/usr.bin/locale/tests/k_flag_posix_numeric.out (contents, props changed) head/usr.bin/locale/tests/k_flag_posix_time.out (contents, props changed) head/usr.bin/locale/tests/locale_test.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/locale/Makefile head/usr.bin/locale/locale.c Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Tue Sep 10 14:33:07 2019 (r352137) +++ head/etc/mtree/BSD.tests.dist Tue Sep 10 15:09:46 2019 (r352138) @@ -1010,6 +1010,8 @@ .. limits .. + locale + .. m4 .. mkimg Modified: head/usr.bin/locale/Makefile ============================================================================== --- head/usr.bin/locale/Makefile Tue Sep 10 14:33:07 2019 (r352137) +++ head/usr.bin/locale/Makefile Tue Sep 10 15:09:46 2019 (r352138) @@ -1,6 +1,12 @@ # $FreeBSD$ +.include + PROG= locale CFLAGS+= -I${SRCTOP}/lib/libc/locale +LIBADD+= sbuf + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/locale/locale.c ============================================================================== --- head/usr.bin/locale/locale.c Tue Sep 10 14:33:07 2019 (r352137) +++ head/usr.bin/locale/locale.c Tue Sep 10 15:09:46 2019 (r352138) @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -59,7 +60,7 @@ void list_charmaps(void); void list_locales(void); const char *lookup_localecat(int); char *kwval_lconv(int); -int kwval_lookup(const char *, char **, int *, int *); +int kwval_lookup(const char *, char **, int *, int *, int *); void showdetails(const char *); void showkeywordslist(char *substring); void showlocale(void); @@ -87,141 +88,258 @@ static const struct _lcinfo { #define NLCINFO nitems(lcinfo) /* ids for values not referenced by nl_langinfo() */ -#define KW_ZERO 10000 -#define KW_GROUPING (KW_ZERO+1) -#define KW_INT_CURR_SYMBOL (KW_ZERO+2) -#define KW_CURRENCY_SYMBOL (KW_ZERO+3) -#define KW_MON_DECIMAL_POINT (KW_ZERO+4) -#define KW_MON_THOUSANDS_SEP (KW_ZERO+5) -#define KW_MON_GROUPING (KW_ZERO+6) -#define KW_POSITIVE_SIGN (KW_ZERO+7) -#define KW_NEGATIVE_SIGN (KW_ZERO+8) -#define KW_INT_FRAC_DIGITS (KW_ZERO+9) -#define KW_FRAC_DIGITS (KW_ZERO+10) -#define KW_P_CS_PRECEDES (KW_ZERO+11) -#define KW_P_SEP_BY_SPACE (KW_ZERO+12) -#define KW_N_CS_PRECEDES (KW_ZERO+13) -#define KW_N_SEP_BY_SPACE (KW_ZERO+14) -#define KW_P_SIGN_POSN (KW_ZERO+15) -#define KW_N_SIGN_POSN (KW_ZERO+16) -#define KW_INT_P_CS_PRECEDES (KW_ZERO+17) -#define KW_INT_P_SEP_BY_SPACE (KW_ZERO+18) -#define KW_INT_N_CS_PRECEDES (KW_ZERO+19) -#define KW_INT_N_SEP_BY_SPACE (KW_ZERO+20) -#define KW_INT_P_SIGN_POSN (KW_ZERO+21) -#define KW_INT_N_SIGN_POSN (KW_ZERO+22) +enum { + KW_GROUPING, + KW_INT_CURR_SYMBOL, + KW_CURRENCY_SYMBOL, + KW_MON_DECIMAL_POINT, + KW_MON_THOUSANDS_SEP, + KW_MON_GROUPING, + KW_POSITIVE_SIGN, + KW_NEGATIVE_SIGN, + KW_INT_FRAC_DIGITS, + KW_FRAC_DIGITS, + KW_P_CS_PRECEDES, + KW_P_SEP_BY_SPACE, + KW_N_CS_PRECEDES, + KW_N_SEP_BY_SPACE, + KW_P_SIGN_POSN, + KW_N_SIGN_POSN, + KW_INT_P_CS_PRECEDES, + KW_INT_P_SEP_BY_SPACE, + KW_INT_N_CS_PRECEDES, + KW_INT_N_SEP_BY_SPACE, + KW_INT_P_SIGN_POSN, + KW_INT_N_SIGN_POSN, + KW_TIME_DAY, + KW_TIME_ABDAY, + KW_TIME_MON, + KW_TIME_ABMON, + KW_TIME_AM_PM +}; +enum { + SRC_LINFO, + SRC_LCONV, + SRC_LTIME +}; + static const struct _kwinfo { const char *name; int isstr; /* true - string, false - number */ int catid; /* LC_* */ + int source; int value_ref; const char *comment; } kwinfo [] = { - { "charmap", 1, LC_CTYPE, CODESET, "" }, /* hack */ + { "charmap", 1, LC_CTYPE, SRC_LINFO, + CODESET, "" }, /* hack */ - { "decimal_point", 1, LC_NUMERIC, RADIXCHAR, "" }, - { "thousands_sep", 1, LC_NUMERIC, THOUSEP, "" }, - { "grouping", 1, LC_NUMERIC, KW_GROUPING, "" }, - { "radixchar", 1, LC_NUMERIC, RADIXCHAR, - "Same as decimal_point (FreeBSD only)" }, /* compat */ - { "thousep", 1, LC_NUMERIC, THOUSEP, - "Same as thousands_sep (FreeBSD only)" }, /* compat */ + /* LC_MONETARY - POSIX */ + { "int_curr_symbol", 1, LC_MONETARY, SRC_LCONV, + KW_INT_CURR_SYMBOL, "" }, + { "currency_symbol", 1, LC_MONETARY, SRC_LCONV, + KW_CURRENCY_SYMBOL, "" }, + { "mon_decimal_point", 1, LC_MONETARY, SRC_LCONV, + KW_MON_DECIMAL_POINT, "" }, + { "mon_thousands_sep", 1, LC_MONETARY, SRC_LCONV, + KW_MON_THOUSANDS_SEP, "" }, + { "mon_grouping", 1, LC_MONETARY, SRC_LCONV, + KW_MON_GROUPING, "" }, + { "positive_sign", 1, LC_MONETARY, SRC_LCONV, + KW_POSITIVE_SIGN, "" }, + { "negative_sign", 1, LC_MONETARY, SRC_LCONV, + KW_NEGATIVE_SIGN, "" }, + { "int_frac_digits", 0, LC_MONETARY, SRC_LCONV, + KW_INT_FRAC_DIGITS, "" }, + { "frac_digits", 0, LC_MONETARY, SRC_LCONV, + KW_FRAC_DIGITS, "" }, + { "p_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + KW_P_CS_PRECEDES, "" }, + { "p_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + KW_P_SEP_BY_SPACE, "" }, + { "n_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + KW_N_CS_PRECEDES, "" }, + { "n_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + KW_N_SEP_BY_SPACE, "" }, + { "p_sign_posn", 0, LC_MONETARY, SRC_LCONV, + KW_P_SIGN_POSN, "" }, + { "n_sign_posn", 0, LC_MONETARY, SRC_LCONV, + KW_N_SIGN_POSN, "" }, + { "int_p_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + KW_INT_P_CS_PRECEDES, "" }, + { "int_p_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + KW_INT_P_SEP_BY_SPACE, "" }, + { "int_n_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + KW_INT_N_CS_PRECEDES, "" }, + { "int_n_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + KW_INT_N_SEP_BY_SPACE, "" }, + { "int_p_sign_posn", 0, LC_MONETARY, SRC_LCONV, + KW_INT_P_SIGN_POSN, "" }, + { "int_n_sign_posn", 0, LC_MONETARY, SRC_LCONV, + KW_INT_N_SIGN_POSN, "" }, - { "int_curr_symbol", 1, LC_MONETARY, KW_INT_CURR_SYMBOL, "" }, - { "currency_symbol", 1, LC_MONETARY, KW_CURRENCY_SYMBOL, "" }, - { "mon_decimal_point", 1, LC_MONETARY, KW_MON_DECIMAL_POINT, "" }, - { "mon_thousands_sep", 1, LC_MONETARY, KW_MON_THOUSANDS_SEP, "" }, - { "mon_grouping", 1, LC_MONETARY, KW_MON_GROUPING, "" }, - { "positive_sign", 1, LC_MONETARY, KW_POSITIVE_SIGN, "" }, - { "negative_sign", 1, LC_MONETARY, KW_NEGATIVE_SIGN, "" }, + /* LC_NUMERIC - POSIX */ + { "decimal_point", 1, LC_NUMERIC, SRC_LINFO, + RADIXCHAR, "" }, + { "thousands_sep", 1, LC_NUMERIC, SRC_LINFO, + THOUSEP, "" }, + { "grouping", 1, LC_NUMERIC, SRC_LCONV, + KW_GROUPING, "" }, + /* LC_NUMERIC - local additions */ + { "radixchar", 1, LC_NUMERIC, SRC_LINFO, + RADIXCHAR, "Same as decimal_point (FreeBSD only)" }, /* compat */ + { "thousep", 1, LC_NUMERIC, SRC_LINFO, + THOUSEP, "Same as thousands_sep (FreeBSD only)" }, /* compat */ - { "int_frac_digits", 0, LC_MONETARY, KW_INT_FRAC_DIGITS, "" }, - { "frac_digits", 0, LC_MONETARY, KW_FRAC_DIGITS, "" }, - { "p_cs_precedes", 0, LC_MONETARY, KW_P_CS_PRECEDES, "" }, - { "p_sep_by_space", 0, LC_MONETARY, KW_P_SEP_BY_SPACE, "" }, - { "n_cs_precedes", 0, LC_MONETARY, KW_N_CS_PRECEDES, "" }, - { "n_sep_by_space", 0, LC_MONETARY, KW_N_SEP_BY_SPACE, "" }, - { "p_sign_posn", 0, LC_MONETARY, KW_P_SIGN_POSN, "" }, - { "n_sign_posn", 0, LC_MONETARY, KW_N_SIGN_POSN, "" }, - { "int_p_cs_precedes", 0, LC_MONETARY, KW_INT_P_CS_PRECEDES, "" }, - { "int_p_sep_by_space", 0, LC_MONETARY, KW_INT_P_SEP_BY_SPACE, "" }, - { "int_n_cs_precedes", 0, LC_MONETARY, KW_INT_N_CS_PRECEDES, "" }, - { "int_n_sep_by_space", 0, LC_MONETARY, KW_INT_N_SEP_BY_SPACE, "" }, - { "int_p_sign_posn", 0, LC_MONETARY, KW_INT_P_SIGN_POSN, "" }, - { "int_n_sign_posn", 0, LC_MONETARY, KW_INT_N_SIGN_POSN, "" }, + /* LC_TIME - POSIX */ + { "abday", 1, LC_TIME, SRC_LTIME, + KW_TIME_ABDAY, "" }, + { "day", 1, LC_TIME, SRC_LTIME, + KW_TIME_DAY, "" }, + { "abmon", 1, LC_TIME, SRC_LTIME, + KW_TIME_ABMON, "" }, + { "mon", 1, LC_TIME, SRC_LTIME, + KW_TIME_MON, "" }, + { "d_t_fmt", 1, LC_TIME, SRC_LINFO, + D_T_FMT, "" }, + { "d_fmt", 1, LC_TIME, SRC_LINFO, + D_FMT, "" }, + { "t_fmt", 1, LC_TIME, SRC_LINFO, + T_FMT, "" }, + { "am_pm", 1, LC_TIME, SRC_LTIME, + KW_TIME_AM_PM, "" }, + { "t_fmt_ampm", 1, LC_TIME, SRC_LINFO, + T_FMT_AMPM, "" }, + { "era", 1, LC_TIME, SRC_LINFO, + ERA, "(unavailable)" }, + { "era_d_fmt", 1, LC_TIME, SRC_LINFO, + ERA_D_FMT, "(unavailable)" }, + { "era_d_t_fmt", 1, LC_TIME, SRC_LINFO, + ERA_D_T_FMT, "(unavailable)" }, + { "era_t_fmt", 1, LC_TIME, SRC_LINFO, + ERA_T_FMT, "(unavailable)" }, + { "alt_digits", 1, LC_TIME, SRC_LINFO, + ALT_DIGITS, "" }, + /* LC_TIME - local additions */ + { "abday_1", 1, LC_TIME, SRC_LINFO, + ABDAY_1, "(FreeBSD only)" }, + { "abday_2", 1, LC_TIME, SRC_LINFO, + ABDAY_2, "(FreeBSD only)" }, + { "abday_3", 1, LC_TIME, SRC_LINFO, + ABDAY_3, "(FreeBSD only)" }, + { "abday_4", 1, LC_TIME, SRC_LINFO, + ABDAY_4, "(FreeBSD only)" }, + { "abday_5", 1, LC_TIME, SRC_LINFO, + ABDAY_5, "(FreeBSD only)" }, + { "abday_6", 1, LC_TIME, SRC_LINFO, + ABDAY_6, "(FreeBSD only)" }, + { "abday_7", 1, LC_TIME, SRC_LINFO, + ABDAY_7, "(FreeBSD only)" }, + { "day_1", 1, LC_TIME, SRC_LINFO, + DAY_1, "(FreeBSD only)" }, + { "day_2", 1, LC_TIME, SRC_LINFO, + DAY_2, "(FreeBSD only)" }, + { "day_3", 1, LC_TIME, SRC_LINFO, + DAY_3, "(FreeBSD only)" }, + { "day_4", 1, LC_TIME, SRC_LINFO, + DAY_4, "(FreeBSD only)" }, + { "day_5", 1, LC_TIME, SRC_LINFO, + DAY_5, "(FreeBSD only)" }, + { "day_6", 1, LC_TIME, SRC_LINFO, + DAY_6, "(FreeBSD only)" }, + { "day_7", 1, LC_TIME, SRC_LINFO, + DAY_7, "(FreeBSD only)" }, + { "abmon_1", 1, LC_TIME, SRC_LINFO, + ABMON_1, "(FreeBSD only)" }, + { "abmon_2", 1, LC_TIME, SRC_LINFO, + ABMON_2, "(FreeBSD only)" }, + { "abmon_3", 1, LC_TIME, SRC_LINFO, + ABMON_3, "(FreeBSD only)" }, + { "abmon_4", 1, LC_TIME, SRC_LINFO, + ABMON_4, "(FreeBSD only)" }, + { "abmon_5", 1, LC_TIME, SRC_LINFO, + ABMON_5, "(FreeBSD only)" }, + { "abmon_6", 1, LC_TIME, SRC_LINFO, + ABMON_6, "(FreeBSD only)" }, + { "abmon_7", 1, LC_TIME, SRC_LINFO, + ABMON_7, "(FreeBSD only)" }, + { "abmon_8", 1, LC_TIME, SRC_LINFO, + ABMON_8, "(FreeBSD only)" }, + { "abmon_9", 1, LC_TIME, SRC_LINFO, + ABMON_9, "(FreeBSD only)" }, + { "abmon_10", 1, LC_TIME, SRC_LINFO, + ABMON_10, "(FreeBSD only)" }, + { "abmon_11", 1, LC_TIME, SRC_LINFO, + ABMON_11, "(FreeBSD only)" }, + { "abmon_12", 1, LC_TIME, SRC_LINFO, + ABMON_12, "(FreeBSD only)" }, + { "mon_1", 1, LC_TIME, SRC_LINFO, + MON_1, "(FreeBSD only)" }, + { "mon_2", 1, LC_TIME, SRC_LINFO, + MON_2, "(FreeBSD only)" }, + { "mon_3", 1, LC_TIME, SRC_LINFO, + MON_3, "(FreeBSD only)" }, + { "mon_4", 1, LC_TIME, SRC_LINFO, + MON_4, "(FreeBSD only)" }, + { "mon_5", 1, LC_TIME, SRC_LINFO, + MON_5, "(FreeBSD only)" }, + { "mon_6", 1, LC_TIME, SRC_LINFO, + MON_6, "(FreeBSD only)" }, + { "mon_7", 1, LC_TIME, SRC_LINFO, + MON_7, "(FreeBSD only)" }, + { "mon_8", 1, LC_TIME, SRC_LINFO, + MON_8, "(FreeBSD only)" }, + { "mon_9", 1, LC_TIME, SRC_LINFO, + MON_9, "(FreeBSD only)" }, + { "mon_10", 1, LC_TIME, SRC_LINFO, + MON_10, "(FreeBSD only)" }, + { "mon_11", 1, LC_TIME, SRC_LINFO, + MON_11, "(FreeBSD only)" }, + { "mon_12", 1, LC_TIME, SRC_LINFO, + MON_12, "(FreeBSD only)" }, + { "altmon_1", 1, LC_TIME, SRC_LINFO, + ALTMON_1, "(FreeBSD only)" }, + { "altmon_2", 1, LC_TIME, SRC_LINFO, + ALTMON_2, "(FreeBSD only)" }, + { "altmon_3", 1, LC_TIME, SRC_LINFO, + ALTMON_3, "(FreeBSD only)" }, + { "altmon_4", 1, LC_TIME, SRC_LINFO, + ALTMON_4, "(FreeBSD only)" }, + { "altmon_5", 1, LC_TIME, SRC_LINFO, + ALTMON_5, "(FreeBSD only)" }, + { "altmon_6", 1, LC_TIME, SRC_LINFO, + ALTMON_6, "(FreeBSD only)" }, + { "altmon_7", 1, LC_TIME, SRC_LINFO, + ALTMON_7, "(FreeBSD only)" }, + { "altmon_8", 1, LC_TIME, SRC_LINFO, + ALTMON_8, "(FreeBSD only)" }, + { "altmon_9", 1, LC_TIME, SRC_LINFO, + ALTMON_9, "(FreeBSD only)" }, + { "altmon_10", 1, LC_TIME, SRC_LINFO, + ALTMON_10, "(FreeBSD only)" }, + { "altmon_11", 1, LC_TIME, SRC_LINFO, + ALTMON_11, "(FreeBSD only)" }, + { "altmon_12", 1, LC_TIME, SRC_LINFO, + ALTMON_12, "(FreeBSD only)" }, + { "am_str", 1, LC_TIME, SRC_LINFO, + AM_STR, "(FreeBSD only)" }, + { "pm_str", 1, LC_TIME, SRC_LINFO, + PM_STR, "(FreeBSD only)" }, + { "d_md_order", 1, LC_TIME, SRC_LINFO, + D_MD_ORDER, "(FreeBSD only)" }, /* local */ - { "d_t_fmt", 1, LC_TIME, D_T_FMT, "" }, - { "d_fmt", 1, LC_TIME, D_FMT, "" }, - { "t_fmt", 1, LC_TIME, T_FMT, "" }, - { "am_str", 1, LC_TIME, AM_STR, "" }, - { "pm_str", 1, LC_TIME, PM_STR, "" }, - { "t_fmt_ampm", 1, LC_TIME, T_FMT_AMPM, "" }, - { "day_1", 1, LC_TIME, DAY_1, "" }, - { "day_2", 1, LC_TIME, DAY_2, "" }, - { "day_3", 1, LC_TIME, DAY_3, "" }, - { "day_4", 1, LC_TIME, DAY_4, "" }, - { "day_5", 1, LC_TIME, DAY_5, "" }, - { "day_6", 1, LC_TIME, DAY_6, "" }, - { "day_7", 1, LC_TIME, DAY_7, "" }, - { "abday_1", 1, LC_TIME, ABDAY_1, "" }, - { "abday_2", 1, LC_TIME, ABDAY_2, "" }, - { "abday_3", 1, LC_TIME, ABDAY_3, "" }, - { "abday_4", 1, LC_TIME, ABDAY_4, "" }, - { "abday_5", 1, LC_TIME, ABDAY_5, "" }, - { "abday_6", 1, LC_TIME, ABDAY_6, "" }, - { "abday_7", 1, LC_TIME, ABDAY_7, "" }, - { "mon_1", 1, LC_TIME, MON_1, "" }, - { "mon_2", 1, LC_TIME, MON_2, "" }, - { "mon_3", 1, LC_TIME, MON_3, "" }, - { "mon_4", 1, LC_TIME, MON_4, "" }, - { "mon_5", 1, LC_TIME, MON_5, "" }, - { "mon_6", 1, LC_TIME, MON_6, "" }, - { "mon_7", 1, LC_TIME, MON_7, "" }, - { "mon_8", 1, LC_TIME, MON_8, "" }, - { "mon_9", 1, LC_TIME, MON_9, "" }, - { "mon_10", 1, LC_TIME, MON_10, "" }, - { "mon_11", 1, LC_TIME, MON_11, "" }, - { "mon_12", 1, LC_TIME, MON_12, "" }, - { "abmon_1", 1, LC_TIME, ABMON_1, "" }, - { "abmon_2", 1, LC_TIME, ABMON_2, "" }, - { "abmon_3", 1, LC_TIME, ABMON_3, "" }, - { "abmon_4", 1, LC_TIME, ABMON_4, "" }, - { "abmon_5", 1, LC_TIME, ABMON_5, "" }, - { "abmon_6", 1, LC_TIME, ABMON_6, "" }, - { "abmon_7", 1, LC_TIME, ABMON_7, "" }, - { "abmon_8", 1, LC_TIME, ABMON_8, "" }, - { "abmon_9", 1, LC_TIME, ABMON_9, "" }, - { "abmon_10", 1, LC_TIME, ABMON_10, "" }, - { "abmon_11", 1, LC_TIME, ABMON_11, "" }, - { "abmon_12", 1, LC_TIME, ABMON_12, "" }, - { "altmon_1", 1, LC_TIME, ALTMON_1, "(FreeBSD only)" }, - { "altmon_2", 1, LC_TIME, ALTMON_2, "(FreeBSD only)" }, - { "altmon_3", 1, LC_TIME, ALTMON_3, "(FreeBSD only)" }, - { "altmon_4", 1, LC_TIME, ALTMON_4, "(FreeBSD only)" }, - { "altmon_5", 1, LC_TIME, ALTMON_5, "(FreeBSD only)" }, - { "altmon_6", 1, LC_TIME, ALTMON_6, "(FreeBSD only)" }, - { "altmon_7", 1, LC_TIME, ALTMON_7, "(FreeBSD only)" }, - { "altmon_8", 1, LC_TIME, ALTMON_8, "(FreeBSD only)" }, - { "altmon_9", 1, LC_TIME, ALTMON_9, "(FreeBSD only)" }, - { "altmon_10", 1, LC_TIME, ALTMON_10, "(FreeBSD only)" }, - { "altmon_11", 1, LC_TIME, ALTMON_11, "(FreeBSD only)" }, - { "altmon_12", 1, LC_TIME, ALTMON_12, "(FreeBSD only)" }, - { "era", 1, LC_TIME, ERA, "(unavailable)" }, - { "era_d_fmt", 1, LC_TIME, ERA_D_FMT, "(unavailable)" }, - { "era_d_t_fmt", 1, LC_TIME, ERA_D_T_FMT, "(unavailable)" }, - { "era_t_fmt", 1, LC_TIME, ERA_T_FMT, "(unavailable)" }, - { "alt_digits", 1, LC_TIME, ALT_DIGITS, "" }, - { "d_md_order", 1, LC_TIME, D_MD_ORDER, - "(FreeBSD only)" }, /* local */ + /* LC_MESSAGES - POSIX */ + { "yesexpr", 1, LC_MESSAGES, SRC_LINFO, + YESEXPR, "" }, + { "noexpr", 1, LC_MESSAGES, SRC_LINFO, + NOEXPR, "" }, + /* LC_MESSAGES - local additions */ + { "yesstr", 1, LC_MESSAGES, SRC_LINFO, + YESSTR, "(POSIX legacy)" }, /* compat */ + { "nostr", 1, LC_MESSAGES, SRC_LINFO, + NOSTR, "(POSIX legacy)" } /* compat */ - { "yesexpr", 1, LC_MESSAGES, YESEXPR, "" }, - { "noexpr", 1, LC_MESSAGES, NOEXPR, "" }, - { "yesstr", 1, LC_MESSAGES, YESSTR, - "(POSIX legacy)" }, /* compat */ - { "nostr", 1, LC_MESSAGES, NOSTR, - "(POSIX legacy)" } /* compat */ - }; #define NKWINFO (nitems(kwinfo)) @@ -522,7 +640,7 @@ format_grouping(const char *binary) } /* - * keyword value lookup helper (via localeconv()) + * keyword value lookup helper for values accessible via localeconv() */ char * kwval_lconv(int id) @@ -606,24 +724,86 @@ kwval_lconv(int id) } /* + * keyword value lookup helper for LC_TIME keywords not accessible + * via nl_langinfo() or localeconv() + */ +static char * +kwval_ltime(int id) +{ + char *rval; + struct sbuf *kwsbuf; + nl_item i, s_item, e_item; + + switch (id) { + case KW_TIME_DAY: + s_item = DAY_1; + e_item = DAY_7; + break; + case KW_TIME_ABDAY: + s_item = ABDAY_1; + e_item = ABDAY_7; + break; + case KW_TIME_MON: + s_item = MON_1; + e_item = MON_12; + break; + case KW_TIME_ABMON: + s_item = ABMON_1; + e_item = ABMON_12; + break; + case KW_TIME_AM_PM: + if (asprintf(&rval, "%s\";\"%s", + nl_langinfo(AM_STR), + nl_langinfo(PM_STR)) == -1) + err(1, "asprintf"); + return (rval); + } + + kwsbuf = sbuf_new_auto(); + if (kwsbuf == NULL) + err(1, "sbuf"); + for (i = s_item; i <= e_item; i++) { + if (i != s_item) + (void) sbuf_cat(kwsbuf, "\""); + (void) sbuf_cat(kwsbuf, nl_langinfo(i)); + if (i != e_item) + (void) sbuf_cat(kwsbuf, "\";"); + } + (void) sbuf_finish(kwsbuf); + rval = strdup(sbuf_data(kwsbuf)); + if (rval == NULL) + err(1, "strdup"); + sbuf_delete(kwsbuf); + return (rval); +} + +/* * keyword value and properties lookup */ int -kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr) +kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr, int *alloc) { int rval; size_t i; rval = 0; + *alloc = 0; for (i = 0; i < NKWINFO; i++) { if (strcasecmp(kwname, kwinfo[i].name) == 0) { rval = 1; *cat = kwinfo[i].catid; *isstr = kwinfo[i].isstr; - if (kwinfo[i].value_ref < KW_ZERO) { + switch (kwinfo[i].source) { + case SRC_LINFO: *kwval = nl_langinfo(kwinfo[i].value_ref); - } else { + break; + case SRC_LCONV: *kwval = kwval_lconv(kwinfo[i].value_ref); + break; + case SRC_LTIME: + *kwval = kwval_ltime(kwinfo[i].value_ref); + *alloc = 1; + break; } break; } @@ -639,10 +819,10 @@ kwval_lookup(const char *kwname, char **kwval, int *ca void showdetails(const char *kw) { - int isstr, cat, tmpval; + int isstr, cat, tmpval, alloc; char *kwval; - if (kwval_lookup(kw, &kwval, &cat, &isstr) == 0) { + if (kwval_lookup(kw, &kwval, &cat, &isstr, &alloc) == 0) { /* * invalid keyword specified. * XXX: any actions? @@ -675,6 +855,9 @@ showdetails(const char *kw) printf("%d\n", tmpval); } } + + if (alloc) + free(kwval); } /* Added: head/usr.bin/locale/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/Makefile Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= locale_test + +${PACKAGE}FILES+= k_flag_posix_monetary.out +${PACKAGE}FILES+= k_flag_posix_numeric.out +${PACKAGE}FILES+= k_flag_posix_time.out +${PACKAGE}FILES+= k_flag_posix_messages.out + +.include Added: head/usr.bin/locale/tests/k_flag_posix_messages.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/k_flag_posix_messages.out Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,2 @@ +yesexpr="^[yY]" +noexpr="^[nN]" Added: head/usr.bin/locale/tests/k_flag_posix_monetary.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/k_flag_posix_monetary.out Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,21 @@ +int_curr_symbol="" +currency_symbol="" +mon_decimal_point="" +mon_thousands_sep="" +mon_grouping="127" +positive_sign="" +negative_sign="" +int_frac_digits=127 +frac_digits=127 +p_cs_precedes=127 +p_sep_by_space=127 +n_cs_precedes=127 +n_sep_by_space=127 +p_sign_posn=127 +n_sign_posn=127 +int_p_cs_precedes=127 +int_n_cs_precedes=127 +int_p_sep_by_space=127 +int_n_sep_by_space=127 +int_p_sign_posn=127 +int_n_sign_posn=127 Added: head/usr.bin/locale/tests/k_flag_posix_numeric.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/k_flag_posix_numeric.out Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,3 @@ +decimal_point="." +thousands_sep="" +grouping="127" Added: head/usr.bin/locale/tests/k_flag_posix_time.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/k_flag_posix_time.out Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,14 @@ +abday="Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat" +day="Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday" +abmon="Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec" +mon="January";"February";"March";"April";"May";"June";"July";"August";"September";"October";"November";"December" +d_t_fmt="%a %b %e %H:%M:%S %Y" +d_fmt="%m/%d/%y" +t_fmt="%H:%M:%S" +am_pm="AM";"PM" +t_fmt_ampm="%I:%M:%S %p" +era="" +era_d_fmt="" +era_t_fmt="" +era_d_t_fmt="" +alt_digits="" Added: head/usr.bin/locale/tests/locale_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/locale_test.sh Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,98 @@ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2019 Yuri Pankov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case k_flag_posix +k_flag_posix_head() +{ + atf_set "descr" "Verify -k handles all POSIX specified keywords" +} +k_flag_posix_body() +{ + export LC_ALL="C" + + # LC_MONETARY + atf_check -o file:"$(atf_get_srcdir)/k_flag_posix_monetary.out" \ + locale -k \ + int_curr_symbol \ + currency_symbol \ + mon_decimal_point \ + mon_thousands_sep \ + mon_grouping \ + positive_sign \ + negative_sign \ + int_frac_digits \ + frac_digits \ + p_cs_precedes \ + p_sep_by_space \ + n_cs_precedes \ + n_sep_by_space \ + p_sign_posn \ + n_sign_posn \ + int_p_cs_precedes \ + int_n_cs_precedes \ + int_p_sep_by_space \ + int_n_sep_by_space \ + int_p_sign_posn \ + int_n_sign_posn + + # LC_NUMERIC + atf_check -o file:"$(atf_get_srcdir)/k_flag_posix_numeric.out" \ + locale -k \ + decimal_point \ + thousands_sep \ + grouping + + # LC_TIME + atf_check -o file:"$(atf_get_srcdir)/k_flag_posix_time.out" \ + locale -k \ + abday \ + day \ + abmon \ + mon \ + d_t_fmt \ + d_fmt \ + t_fmt \ + am_pm \ + t_fmt_ampm \ + era \ + era_d_fmt \ + era_t_fmt \ + era_d_t_fmt \ + alt_digits + + # LC_MESSAGES + atf_check -o file:"$(atf_get_srcdir)/k_flag_posix_messages.out" \ + locale -k \ + yesexpr \ + noexpr +} + +atf_init_test_cases() +{ + atf_add_test_case k_flag_posix +} From owner-svn-src-head@freebsd.org Tue Sep 10 15:38:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41726D9E8B; Tue, 10 Sep 2019 15:38:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46SThW2WDxz4ZJw; Tue, 10 Sep 2019 15:38:34 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A8B142602ED; Tue, 10 Sep 2019 17:38:25 +0200 (CEST) Subject: Re: svn commit: r349352 - in head: etc/mtree include lib lib/libnandfs sbin sbin/camcontrol sbin/nandfs sbin/newfs_nandfs share/man/man4 share/man/man5 share/mk stand stand/arm/uboot stand/common stand... To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201906250450.x5P4o9oR015946@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Tue, 10 Sep 2019 17:37:39 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <201906250450.x5P4o9oR015946@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46SThW2WDxz4ZJw X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-4.87 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-2.57)[ip: (-9.09), ipnet: 2a01:4f8::/29(-1.97), asn: 24940(-1.78), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 15:38:36 -0000 On 2019-06-25 06:50, Warner Losh wrote: > Author: imp > Date: Tue Jun 25 04:50:09 2019 > New Revision: 349352 > URL: https://svnweb.freebsd.org/changeset/base/349352 > > Log: > Remove NAND and NANDFS support > > NANDFS has been broken for years. Remove it. The NAND drivers that > remain are for ancient parts that are no longer relevant. They are > polled, have terrible performance and just for ancient arm > hardware. NAND parts have evolved significantly from this early work > and little to none of it would be relevant should someone need to > update to support raw nand. This code has been off by default for > years and has violated the vnode protocol leading to panics since it > was committed. > > Numerous posts to arch@ and other locations have found no actual users > for this software. > > Relnotes: Yes > No Objection From: arch@ > Differential Revision: https://reviews.freebsd.org/D20745 > This change leaves behind a bunch of empty directories in SVN? Cleanup? --HPS From owner-svn-src-head@freebsd.org Tue Sep 10 16:16:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10C76DB034; Tue, 10 Sep 2019 16:16:06 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SVWn6lX8z4cQr; Tue, 10 Sep 2019 16:16:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB19228A9E; Tue, 10 Sep 2019 16:16:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGG5Iw000693; Tue, 10 Sep 2019 16:16:05 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGG542000692; Tue, 10 Sep 2019 16:16:05 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201909101616.x8AGG542000692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Tue, 10 Sep 2019 16:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352140 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 352140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:16:06 -0000 Author: luporl Date: Tue Sep 10 16:16:05 2019 New Revision: 352140 URL: https://svnweb.freebsd.org/changeset/base/352140 Log: Add R_PPC_IRELATIVE relocation Pre-requisite for most ifunc related changes. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21587 Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Tue Sep 10 15:42:34 2019 (r352139) +++ head/sys/sys/elf_common.h Tue Sep 10 16:16:05 2019 (r352140) @@ -1199,6 +1199,7 @@ typedef struct { #define R_PPC_SECTOFF_LO 34 #define R_PPC_SECTOFF_HI 35 #define R_PPC_SECTOFF_HA 36 +#define R_PPC_IRELATIVE 248 /* * 64-bit relocations From owner-svn-src-head@freebsd.org Tue Sep 10 16:30:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 631BBDB753; Tue, 10 Sep 2019 16:30:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SVqz2148z4dGT; Tue, 10 Sep 2019 16:30:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BADB28CA1; Tue, 10 Sep 2019 16:30:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGU6UW006863; Tue, 10 Sep 2019 16:30:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGU618006862; Tue, 10 Sep 2019 16:30:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101630.x8AGU618006862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352141 - in head/sys/modules: nand nandfs nandsim X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/modules: nand nandfs nandsim X-SVN-Commit-Revision: 352141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:30:07 -0000 Author: imp Date: Tue Sep 10 16:30:06 2019 New Revision: 352141 URL: https://svnweb.freebsd.org/changeset/base/352141 Log: Remove empty directories left over from nand removal Deleted: head/sys/modules/nand/ head/sys/modules/nandfs/ head/sys/modules/nandsim/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:35:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45B63DBBC7; Tue, 10 Sep 2019 16:35:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SVyD5Vfwz4dwY; Tue, 10 Sep 2019 16:35:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F5A628E72; Tue, 10 Sep 2019 16:35:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGZWwb012657; Tue, 10 Sep 2019 16:35:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGZWU1012656; Tue, 10 Sep 2019 16:35:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101635.x8AGZWU1012656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352143 - in head/sys/modules: drm drm2 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/modules: drm drm2 X-SVN-Commit-Revision: 352143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:35:33 -0000 Author: imp Date: Tue Sep 10 16:35:31 2019 New Revision: 352143 URL: https://svnweb.freebsd.org/changeset/base/352143 Log: Remove empty directories after drm removal Deleted: head/sys/modules/drm/ head/sys/modules/drm2/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:36:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84174DBC42; Tue, 10 Sep 2019 16:36:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SVyy2wvcz4f5P; Tue, 10 Sep 2019 16:36:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4759928E73; Tue, 10 Sep 2019 16:36:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGaAD9012732; Tue, 10 Sep 2019 16:36:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGaAGL012731; Tue, 10 Sep 2019 16:36:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101636.x8AGaAGL012731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352144 - in head: lib/libnandfs sbin/nandfs sbin/newfs_nandfs sys/dev/nand sys/fs/nandfs usr.sbin/nandsim usr.sbin/nandtool X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libnandfs sbin/nandfs sbin/newfs_nandfs sys/dev/nand sys/fs/nandfs usr.sbin/nandsim usr.sbin/nandtool X-SVN-Commit-Revision: 352144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:36:10 -0000 Author: imp Date: Tue Sep 10 16:36:09 2019 New Revision: 352144 URL: https://svnweb.freebsd.org/changeset/base/352144 Log: Remove more directories left over from nand removal Deleted: head/lib/libnandfs/ head/sbin/nandfs/ head/sbin/newfs_nandfs/ head/sys/dev/nand/ head/sys/fs/nandfs/ head/usr.sbin/nandsim/ head/usr.sbin/nandtool/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:37:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCE7CDBD0B; Tue, 10 Sep 2019 16:37:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SW0X5Vhqz4fDx; Tue, 10 Sep 2019 16:37:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8780D28E77; Tue, 10 Sep 2019 16:37:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGbWp6012841; Tue, 10 Sep 2019 16:37:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGbWr9012840; Tue, 10 Sep 2019 16:37:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101637.x8AGbWr9012840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352145 - head/stand/sparc64/zfsloader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/sparc64/zfsloader X-SVN-Commit-Revision: 352145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:37:32 -0000 Author: imp Date: Tue Sep 10 16:37:32 2019 New Revision: 352145 URL: https://svnweb.freebsd.org/changeset/base/352145 Log: Remove empty directory aftre r336532 Deleted: head/stand/sparc64/zfsloader/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:38:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAF1CDBDE9; Tue, 10 Sep 2019 16:38:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SW254290z4fQm; Tue, 10 Sep 2019 16:38:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5614E28E78; Tue, 10 Sep 2019 16:38:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGcrwu012953; Tue, 10 Sep 2019 16:38:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGcrIx012952; Tue, 10 Sep 2019 16:38:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101638.x8AGcrIx012952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352146 - head/sys/mips/gxemul X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/gxemul X-SVN-Commit-Revision: 352146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:38:53 -0000 Author: imp Date: Tue Sep 10 16:38:52 2019 New Revision: 352146 URL: https://svnweb.freebsd.org/changeset/base/352146 Log: Remove empty directory after r342256 Deleted: head/sys/mips/gxemul/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:40:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 766C0DBF73; Tue, 10 Sep 2019 16:40:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SW3P2VhBz4fcG; Tue, 10 Sep 2019 16:40:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F15928E7D; Tue, 10 Sep 2019 16:40:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGe11U013093; Tue, 10 Sep 2019 16:40:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGe1kl013092; Tue, 10 Sep 2019 16:40:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101640.x8AGe1kl013092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352147 - head/usr.bin/send-pr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.bin/send-pr X-SVN-Commit-Revision: 352147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:40:01 -0000 Author: imp Date: Tue Sep 10 16:40:00 2019 New Revision: 352147 URL: https://svnweb.freebsd.org/changeset/base/352147 Log: Remove leftover usr.bin/send-pr after r338042 Deleted: head/usr.bin/send-pr/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:41:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26538DC19B; Tue, 10 Sep 2019 16:41:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SW4X7478z4fmd; Tue, 10 Sep 2019 16:41:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD4ED28EA3; Tue, 10 Sep 2019 16:41:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGf0UX013192; Tue, 10 Sep 2019 16:41:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGf0K9013191; Tue, 10 Sep 2019 16:41:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101641.x8AGf0K9013191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352148 - in head/sys/modules: if_tap if_tun X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/modules: if_tap if_tun X-SVN-Commit-Revision: 352148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:41:01 -0000 Author: imp Date: Tue Sep 10 16:41:00 2019 New Revision: 352148 URL: https://svnweb.freebsd.org/changeset/base/352148 Log: Remove empty tap/tun modules directories after r347241 Deleted: head/sys/modules/if_tap/ head/sys/modules/if_tun/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:43:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD156DC25D; Tue, 10 Sep 2019 16:43:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SW6y49DJz4g6S; Tue, 10 Sep 2019 16:43:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5956529031; Tue, 10 Sep 2019 16:43:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGh6Cq018564; Tue, 10 Sep 2019 16:43:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGh6We018563; Tue, 10 Sep 2019 16:43:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101643.x8AGh6We018563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352149 - in head/tools/tools/nanobsd: gateworks rescue/Pkg X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/tools/tools/nanobsd: gateworks rescue/Pkg X-SVN-Commit-Revision: 352149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:43:06 -0000 Author: imp Date: Tue Sep 10 16:43:05 2019 New Revision: 352149 URL: https://svnweb.freebsd.org/changeset/base/352149 Log: Remove gateworks directories left over from r336136 Deleted: head/tools/tools/nanobsd/gateworks/ head/tools/tools/nanobsd/rescue/Pkg/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:48:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A703DDC374; Tue, 10 Sep 2019 16:48:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWFZ3fCdz4gHJ; Tue, 10 Sep 2019 16:48:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C5EB29033; Tue, 10 Sep 2019 16:48:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGmoUb018908; Tue, 10 Sep 2019 16:48:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGmoTP018907; Tue, 10 Sep 2019 16:48:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101648.x8AGmoTP018907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352150 - in head/contrib/netbsd-tests: crypto/libcrypto/bf crypto/libcrypto/bn crypto/libcrypto/cast crypto/libcrypto/des crypto/libcrypto/dh crypto/libcrypto/dsa crypto/libcrypto/ec c... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/contrib/netbsd-tests: crypto/libcrypto/bf crypto/libcrypto/bn crypto/libcrypto/cast crypto/libcrypto/des crypto/libcrypto/dh crypto/libcrypto/dsa crypto/libcrypto/ec crypto/libcrypto/ecdh cryp... X-SVN-Commit-Revision: 352150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:48:50 -0000 Author: imp Date: Tue Sep 10 16:48:49 2019 New Revision: 352150 URL: https://svnweb.freebsd.org/changeset/base/352150 Log: Remove now-empty directories after r272458 Deleted: head/contrib/netbsd-tests/crypto/libcrypto/bf/ head/contrib/netbsd-tests/crypto/libcrypto/bn/ head/contrib/netbsd-tests/crypto/libcrypto/cast/ head/contrib/netbsd-tests/crypto/libcrypto/des/ head/contrib/netbsd-tests/crypto/libcrypto/dh/ head/contrib/netbsd-tests/crypto/libcrypto/dsa/ head/contrib/netbsd-tests/crypto/libcrypto/ec/ head/contrib/netbsd-tests/crypto/libcrypto/ecdh/ head/contrib/netbsd-tests/crypto/libcrypto/ecdsa/ head/contrib/netbsd-tests/crypto/libcrypto/engine/ head/contrib/netbsd-tests/crypto/libcrypto/evp/ head/contrib/netbsd-tests/crypto/libcrypto/hmac/ head/contrib/netbsd-tests/crypto/libcrypto/idea/ head/contrib/netbsd-tests/crypto/libcrypto/lhash/ head/contrib/netbsd-tests/crypto/libcrypto/md2/ head/contrib/netbsd-tests/crypto/libcrypto/md4/ head/contrib/netbsd-tests/crypto/libcrypto/md5/ head/contrib/netbsd-tests/crypto/libcrypto/mdc2/ head/contrib/netbsd-tests/crypto/libcrypto/rand/ head/contrib/netbsd-tests/crypto/libcrypto/rc2/ head/contrib/netbsd-tests/crypto/libcrypto/rc4/ head/contrib/netbsd-tests/crypto/libcrypto/rc5/ head/contrib/netbsd-tests/crypto/libcrypto/ripemd/ head/contrib/netbsd-tests/crypto/libcrypto/rsa/ head/contrib/netbsd-tests/crypto/libcrypto/sha/ head/contrib/netbsd-tests/crypto/libcrypto/sha1/ head/contrib/netbsd-tests/crypto/libcrypto/srp/ head/contrib/netbsd-tests/crypto/libcrypto/threads/ head/contrib/netbsd-tests/crypto/libcrypto/x509v3/ head/contrib/netbsd-tests/dev/usb/libhid/ head/contrib/netbsd-tests/dev/usb/t_hid/ head/contrib/netbsd-tests/lib/libposix/bsd/ head/contrib/netbsd-tests/lib/libposix/posix1/ head/contrib/netbsd-tests/lib/libposix/posix2/ head/contrib/netbsd-tests/lib/libtre/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:50:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A83ADC45B; Tue, 10 Sep 2019 16:50:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWHf6XV6z3Bs2; Tue, 10 Sep 2019 16:50:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAE612903C; Tue, 10 Sep 2019 16:50:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGocJA019075; Tue, 10 Sep 2019 16:50:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGoc84019074; Tue, 10 Sep 2019 16:50:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101650.x8AGoc84019074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352151 - head/cddl/contrib/opensolaris/common/avl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/common/avl X-SVN-Commit-Revision: 352151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:50:39 -0000 Author: imp Date: Tue Sep 10 16:50:38 2019 New Revision: 352151 URL: https://svnweb.freebsd.org/changeset/base/352151 Log: Remove now-empty directory after r288337 Deleted: head/cddl/contrib/opensolaris/common/avl/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:51:53 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B57DDC73A; Tue, 10 Sep 2019 16:51:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWK471z5z3CKg; Tue, 10 Sep 2019 16:51:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD4C8291AC; Tue, 10 Sep 2019 16:51:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGpqO1024497; Tue, 10 Sep 2019 16:51:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGpqsG024496; Tue, 10 Sep 2019 16:51:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101651.x8AGpqsG024496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352152 - head/usr.sbin/bsdconfig/fdisk X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/bsdconfig/fdisk X-SVN-Commit-Revision: 352152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:51:53 -0000 Author: imp Date: Tue Sep 10 16:51:52 2019 New Revision: 352152 URL: https://svnweb.freebsd.org/changeset/base/352152 Log: Remove empty directory imported with r238438 Deleted: head/usr.sbin/bsdconfig/fdisk/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:53:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83663DC860; Tue, 10 Sep 2019 16:53:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWLj2vvsz3CWD; Tue, 10 Sep 2019 16:53:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DAF2291EA; Tue, 10 Sep 2019 16:53:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGrHtF024616; Tue, 10 Sep 2019 16:53:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGrHF3024615; Tue, 10 Sep 2019 16:53:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101653.x8AGrHF3024615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352153 - head/sys/gnu/dts/include/dt-bindings/genpd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/gnu/dts/include/dt-bindings/genpd X-SVN-Commit-Revision: 352153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:53:17 -0000 Author: imp Date: Tue Sep 10 16:53:16 2019 New Revision: 352153 URL: https://svnweb.freebsd.org/changeset/base/352153 Log: Remove empty directory imported with r342935 Deleted: head/sys/gnu/dts/include/dt-bindings/genpd/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:56:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03863DC9D6; Tue, 10 Sep 2019 16:56:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWQg6JXlz3Cg1; Tue, 10 Sep 2019 16:56:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D6CB291EB; Tue, 10 Sep 2019 16:56:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGuh77024863; Tue, 10 Sep 2019 16:56:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGuhYZ024862; Tue, 10 Sep 2019 16:56:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101656.x8AGuhYZ024862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352154 - head/crypto/heimdal/lib/sqlite X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/crypto/heimdal/lib/sqlite X-SVN-Commit-Revision: 352154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:56:44 -0000 Author: imp Date: Tue Sep 10 16:56:43 2019 New Revision: 352154 URL: https://svnweb.freebsd.org/changeset/base/352154 Log: Remove empty directory after r342871 Deleted: head/crypto/heimdal/lib/sqlite/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:57:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A8C8DCA59; Tue, 10 Sep 2019 16:57:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWRh1Gj1z3Cq4; Tue, 10 Sep 2019 16:57:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9485291EC; Tue, 10 Sep 2019 16:57:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGvZ7R024946; Tue, 10 Sep 2019 16:57:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGvZhC024945; Tue, 10 Sep 2019 16:57:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101657.x8AGvZhC024945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352155 - head/contrib/traceroute/lbl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/traceroute/lbl X-SVN-Commit-Revision: 352155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:57:36 -0000 Author: imp Date: Tue Sep 10 16:57:35 2019 New Revision: 352155 URL: https://svnweb.freebsd.org/changeset/base/352155 Log: Remove empty directory after r215937 Deleted: head/contrib/traceroute/lbl/ From owner-svn-src-head@freebsd.org Tue Sep 10 16:58:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14A78DCAE4; Tue, 10 Sep 2019 16:58:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWSW5cHvz3D13; Tue, 10 Sep 2019 16:58:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89B58291ED; Tue, 10 Sep 2019 16:58:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AGwJXp025024; Tue, 10 Sep 2019 16:58:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AGwJ0i025023; Tue, 10 Sep 2019 16:58:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101658.x8AGwJ0i025023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 16:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352156 - head/contrib/apr/include/private X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/apr/include/private X-SVN-Commit-Revision: 352156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 16:58:20 -0000 Author: imp Date: Tue Sep 10 16:58:19 2019 New Revision: 352156 URL: https://svnweb.freebsd.org/changeset/base/352156 Log: Remove directory empty after r266735 Deleted: head/contrib/apr/include/private/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:19:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F03FBDD7A3; Tue, 10 Sep 2019 17:19:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWxC669yz3FK6; Tue, 10 Sep 2019 17:19:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98FB929579; Tue, 10 Sep 2019 17:19:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHJhxD039080; Tue, 10 Sep 2019 17:19:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHJh7Z039079; Tue, 10 Sep 2019 17:19:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101719.x8AHJh7Z039079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352157 - in head/contrib/wpa: patches wpa_supplicant/tests X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/contrib/wpa: patches wpa_supplicant/tests X-SVN-Commit-Revision: 352157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:19:44 -0000 Author: imp Date: Tue Sep 10 17:19:43 2019 New Revision: 352157 URL: https://svnweb.freebsd.org/changeset/base/352157 Log: Remove dirs empty since r336203 Deleted: head/contrib/wpa/patches/ head/contrib/wpa/wpa_supplicant/tests/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:20:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17893DD843; Tue, 10 Sep 2019 17:20:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SWy06vGLz3FSH; Tue, 10 Sep 2019 17:20:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B72FE2957D; Tue, 10 Sep 2019 17:20:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHKO85039346; Tue, 10 Sep 2019 17:20:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHKOAs039345; Tue, 10 Sep 2019 17:20:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101720.x8AHKOAs039345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352158 - head/contrib/wpa/src/hlr_auc_gw X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/wpa/src/hlr_auc_gw X-SVN-Commit-Revision: 352158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:20:25 -0000 Author: imp Date: Tue Sep 10 17:20:24 2019 New Revision: 352158 URL: https://svnweb.freebsd.org/changeset/base/352158 Log: Remove dir empty since r214734 Deleted: head/contrib/wpa/src/hlr_auc_gw/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:26:21 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8737EDDAFA; Tue, 10 Sep 2019 17:26:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SX4s30z1z3FtP; Tue, 10 Sep 2019 17:26:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DEA329735; Tue, 10 Sep 2019 17:26:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHQLTU046235; Tue, 10 Sep 2019 17:26:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHQLmF046234; Tue, 10 Sep 2019 17:26:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101726.x8AHQLmF046234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:26:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352159 - head/contrib/ipfilter/ipsd/Celler X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/ipfilter/ipsd/Celler X-SVN-Commit-Revision: 352159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:26:21 -0000 Author: imp Date: Tue Sep 10 17:26:20 2019 New Revision: 352159 URL: https://svnweb.freebsd.org/changeset/base/352159 Log: Remove empty dir after r342815 Deleted: head/contrib/ipfilter/ipsd/Celler/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:26:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9D10DDBBF; Tue, 10 Sep 2019 17:26:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SX5M4Tthz3G5j; Tue, 10 Sep 2019 17:26:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 640A629736; Tue, 10 Sep 2019 17:26:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHQlq2046410; Tue, 10 Sep 2019 17:26:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHQl6r046409; Tue, 10 Sep 2019 17:26:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101726.x8AHQl6r046409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352160 - head/contrib/ipfilter/net X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/ipfilter/net X-SVN-Commit-Revision: 352160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:26:47 -0000 Author: imp Date: Tue Sep 10 17:26:46 2019 New Revision: 352160 URL: https://svnweb.freebsd.org/changeset/base/352160 Log: Remove empty dir after r288683 Deleted: head/contrib/ipfilter/net/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:30:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92B89DDE39; Tue, 10 Sep 2019 17:30:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SX9B3NV8z3GNK; Tue, 10 Sep 2019 17:30:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EE8929741; Tue, 10 Sep 2019 17:30:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHU6f8047380; Tue, 10 Sep 2019 17:30:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHU6m1047379; Tue, 10 Sep 2019 17:30:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101730.x8AHU6m1047379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352161 - head/contrib/ipfilter/ipsd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/ipfilter/ipsd X-SVN-Commit-Revision: 352161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:30:06 -0000 Author: imp Date: Tue Sep 10 17:30:05 2019 New Revision: 352161 URL: https://svnweb.freebsd.org/changeset/base/352161 Log: Remove empty dir after r342815 (pt 2, oops) Deleted: head/contrib/ipfilter/ipsd/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:31:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7E97DE079; Tue, 10 Sep 2019 17:31:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SXBM420Gz3GXY; Tue, 10 Sep 2019 17:31:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55F162976D; Tue, 10 Sep 2019 17:31:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHV7uq051669; Tue, 10 Sep 2019 17:31:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHV7bO051668; Tue, 10 Sep 2019 17:31:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101731.x8AHV7bO051668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352162 - head/contrib/libxo/m4 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/libxo/m4 X-SVN-Commit-Revision: 352162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:31:07 -0000 Author: imp Date: Tue Sep 10 17:31:06 2019 New Revision: 352162 URL: https://svnweb.freebsd.org/changeset/base/352162 Log: Remove empty directory after r297894 Deleted: head/contrib/libxo/m4/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:46:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BB9DDE960; Tue, 10 Sep 2019 17:46:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SXX71Ky9z3J6h; Tue, 10 Sep 2019 17:46:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB01529ADF; Tue, 10 Sep 2019 17:46:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHkUgH061128; Tue, 10 Sep 2019 17:46:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHkUQO061127; Tue, 10 Sep 2019 17:46:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101746.x8AHkUQO061127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352167 - head/contrib/compiler-rt/lib/builtins/armv6m X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/compiler-rt/lib/builtins/armv6m X-SVN-Commit-Revision: 352167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:46:31 -0000 Author: imp Date: Tue Sep 10 17:46:30 2019 New Revision: 352167 URL: https://svnweb.freebsd.org/changeset/base/352167 Log: Remove dir empty since r276851 Deleted: head/contrib/compiler-rt/lib/builtins/armv6m/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:47:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73CDFDEA63; Tue, 10 Sep 2019 17:47:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SXYR2T1Cz3JKk; Tue, 10 Sep 2019 17:47:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3898C29AE0; Tue, 10 Sep 2019 17:47:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHldOV061226; Tue, 10 Sep 2019 17:47:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHldP2061225; Tue, 10 Sep 2019 17:47:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101747.x8AHldP2061225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352168 - in head/contrib/llvm: include/llvm/MC/MCAnalysis lib/ExecutionEngine/JIT lib/MC/MCAnalysis X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/contrib/llvm: include/llvm/MC/MCAnalysis lib/ExecutionEngine/JIT lib/MC/MCAnalysis X-SVN-Commit-Revision: 352168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:47:39 -0000 Author: imp Date: Tue Sep 10 17:47:38 2019 New Revision: 352168 URL: https://svnweb.freebsd.org/changeset/base/352168 Log: Remove dirs empty since r280031 Deleted: head/contrib/llvm/include/llvm/MC/MCAnalysis/ head/contrib/llvm/lib/ExecutionEngine/JIT/ head/contrib/llvm/lib/MC/MCAnalysis/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:49:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 969DBDEBB7; Tue, 10 Sep 2019 17:49:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SXbM3XJXz3JYn; Tue, 10 Sep 2019 17:49:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EC5629AE1; Tue, 10 Sep 2019 17:49:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHnIc4061423; Tue, 10 Sep 2019 17:49:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHnIVF061422; Tue, 10 Sep 2019 17:49:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101749.x8AHnIVF061422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352169 - head/contrib/compiler-rt/lib/sancov X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/compiler-rt/lib/sancov X-SVN-Commit-Revision: 352169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:49:19 -0000 Author: imp Date: Tue Sep 10 17:49:18 2019 New Revision: 352169 URL: https://svnweb.freebsd.org/changeset/base/352169 Log: Remove dir empty since r314564 Deleted: head/contrib/compiler-rt/lib/sancov/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:50:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4427BDED75; Tue, 10 Sep 2019 17:50:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SXc90yhgz3JkM; Tue, 10 Sep 2019 17:50:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E107B29AE6; Tue, 10 Sep 2019 17:50:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHo0NY061536; Tue, 10 Sep 2019 17:50:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHo0Mq061535; Tue, 10 Sep 2019 17:50:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101750.x8AHo0Mq061535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352170 - head/contrib/llvm/include/llvm/BinaryFormat/WasmRelocs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/contrib/llvm/include/llvm/BinaryFormat/WasmRelocs X-SVN-Commit-Revision: 352170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:50:01 -0000 Author: imp Date: Tue Sep 10 17:50:00 2019 New Revision: 352170 URL: https://svnweb.freebsd.org/changeset/base/352170 Log: Remove dir empty since r327952 Deleted: head/contrib/llvm/include/llvm/BinaryFormat/WasmRelocs/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:51:23 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7152CDEE57; Tue, 10 Sep 2019 17:51:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SXdl1Lm4z3Jvm; Tue, 10 Sep 2019 17:51:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1236F29C32; Tue, 10 Sep 2019 17:51:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AHpMYO065425; Tue, 10 Sep 2019 17:51:22 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHpM2D065424; Tue, 10 Sep 2019 17:51:22 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909101751.x8AHpM2D065424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 10 Sep 2019 17:51:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352171 - in head/contrib/llvm: include/llvm/TextAPI/MachO lib/Target/Nios2 lib/TextAPI/MachO tools/lldb/source/Plugins/ExpressionParser/Go tools/lldb/source/Plugins/Language/Go tools/l... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/contrib/llvm: include/llvm/TextAPI/MachO lib/Target/Nios2 lib/TextAPI/MachO tools/lldb/source/Plugins/ExpressionParser/Go tools/lldb/source/Plugins/Language/Go tools/lldb/source/Plugins/Langua... X-SVN-Commit-Revision: 352171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:51:23 -0000 Author: imp Date: Tue Sep 10 17:51:22 2019 New Revision: 352171 URL: https://svnweb.freebsd.org/changeset/base/352171 Log: Remove dirs (and their now-empty parents) empty since r344779 Deleted: head/contrib/llvm/include/llvm/TextAPI/MachO/ head/contrib/llvm/lib/Target/Nios2/ head/contrib/llvm/lib/TextAPI/MachO/ head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/ head/contrib/llvm/tools/lldb/source/Plugins/Language/Go/ head/contrib/llvm/tools/lldb/source/Plugins/Language/Java/ head/contrib/llvm/tools/lldb/source/Plugins/Language/OCaml/ head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/ head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/ head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Go/ head/contrib/llvm/tools/llvm-mca/include/ head/contrib/llvm/tools/llvm-mca/lib/ From owner-svn-src-head@freebsd.org Tue Sep 10 17:53:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A086DF308; Tue, 10 Sep 2019 17:53:55 +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 46SXhf72tyz3KNL; Tue, 10 Sep 2019 17:53:54 +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 BD17D29CA5; Tue, 10 Sep 2019 17:53:54 +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 x8AHrsUg066973; Tue, 10 Sep 2019 17:53:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHrscr066972; Tue, 10 Sep 2019 17:53:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909101753.x8AHrscr066972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 10 Sep 2019 17:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352172 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 352172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:53:55 -0000 Author: kevans Date: Tue Sep 10 17:53:54 2019 New Revision: 352172 URL: https://svnweb.freebsd.org/changeset/base/352172 Log: Ignore LINT kernconf on arm64 Modified: Directory Properties: head/sys/arm64/arm64/ (props changed) From owner-svn-src-head@freebsd.org Tue Sep 10 17:55:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61530DF3CF; Tue, 10 Sep 2019 17:55:08 +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 46SXk41xgDz3KWr; Tue, 10 Sep 2019 17:55:08 +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 0E0EC29CB0; Tue, 10 Sep 2019 17:55:08 +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 x8AHt7fp067121; Tue, 10 Sep 2019 17:55:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AHt7LR067120; Tue, 10 Sep 2019 17:55:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909101755.x8AHt7LR067120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 10 Sep 2019 17:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352173 - in head/sys/arm64: arm64 conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys/arm64: arm64 conf X-SVN-Commit-Revision: 352173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 17:55:08 -0000 Author: kevans Date: Tue Sep 10 17:55:07 2019 New Revision: 352173 URL: https://svnweb.freebsd.org/changeset/base/352173 Log: ... it was so easy, and I goofed it up. Correct dir Modified: Directory Properties: head/sys/arm64/arm64/ (props changed) head/sys/arm64/conf/ (props changed) From owner-svn-src-head@freebsd.org Tue Sep 10 18:27:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36EF8E05BC; Tue, 10 Sep 2019 18:27:48 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SYRm1Q2xz3MGT; Tue, 10 Sep 2019 18:27:48 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAAC72A211; Tue, 10 Sep 2019 18:27:47 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AIRl6w085381; Tue, 10 Sep 2019 18:27:47 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AIRkmr085373; Tue, 10 Sep 2019 18:27:46 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201909101827.x8AIRkmr085373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Tue, 10 Sep 2019 18:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352174 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs dev/drm2/ttm kern vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs dev/drm2/ttm kern vm X-SVN-Commit-Revision: 352174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 18:27:48 -0000 Author: jeff Date: Tue Sep 10 18:27:45 2019 New Revision: 352174 URL: https://svnweb.freebsd.org/changeset/base/352174 Log: Use the sleepq lock rather than the page lock to protect against wakeup races with page busy state. The object lock is still used as an interlock to ensure that the identity stays valid. Most callers should use vm_page_sleep_if_busy() to handle the locking particulars. Reviewed by: alc, kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21255 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/dev/drm2/ttm/ttm_bo_vm.c head/sys/kern/vfs_bio.c head/sys/vm/phys_pager.c head/sys/vm/vm_fault.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 10 18:27:45 2019 (r352174) @@ -422,10 +422,7 @@ page_busy(vnode_t *vp, int64_t start, int64_t off, int * likely to reclaim it. */ vm_page_reference(pp); - vm_page_lock(pp); - zfs_vmobject_wunlock(obj); - vm_page_busy_sleep(pp, "zfsmwb", true); - zfs_vmobject_wlock(obj); + vm_page_sleep_if_xbusy(pp, "zfsmwb"); continue; } vm_page_sbusy(pp); @@ -473,10 +470,7 @@ page_wire(vnode_t *vp, int64_t start) * likely to reclaim it. */ vm_page_reference(pp); - vm_page_lock(pp); - zfs_vmobject_wunlock(obj); - vm_page_busy_sleep(pp, "zfsmwb", true); - zfs_vmobject_wlock(obj); + vm_page_sleep_if_xbusy(pp, "zfsmwb"); continue; } Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Tue Sep 10 18:27:45 2019 (r352174) @@ -232,10 +232,7 @@ reserve: VM_OBJECT_WLOCK(vm_obj); if (vm_page_busied(m)) { - vm_page_lock(m); - VM_OBJECT_WUNLOCK(vm_obj); - vm_page_busy_sleep(m, "ttmpbs", false); - VM_OBJECT_WLOCK(vm_obj); + vm_page_sleep_if_busy(m, "ttmpbs"); ttm_mem_io_unlock(man); ttm_bo_unreserve(bo); goto retry; Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/kern/vfs_bio.c Tue Sep 10 18:27:45 2019 (r352174) @@ -2931,12 +2931,8 @@ vfs_vmio_invalidate(struct buf *bp) presid = resid > (PAGE_SIZE - poffset) ? (PAGE_SIZE - poffset) : resid; KASSERT(presid >= 0, ("brelse: extra page")); - while (vm_page_xbusied(m)) { - vm_page_lock(m); - VM_OBJECT_WUNLOCK(obj); - vm_page_busy_sleep(m, "mbncsh", true); - VM_OBJECT_WLOCK(obj); - } + while (vm_page_xbusied(m)) + vm_page_sleep_if_xbusy(m, "mbncsh"); if (pmap_page_wired_mappings(m) == 0) vm_page_set_invalid(m, poffset, presid); vm_page_release_locked(m, flags); @@ -4565,10 +4561,7 @@ vfs_drain_busy_pages(struct buf *bp) for (; last_busied < i; last_busied++) vm_page_sbusy(bp->b_pages[last_busied]); while (vm_page_xbusied(m)) { - vm_page_lock(m); - VM_OBJECT_WUNLOCK(bp->b_bufobj->bo_object); - vm_page_busy_sleep(m, "vbpage", true); - VM_OBJECT_WLOCK(bp->b_bufobj->bo_object); + vm_page_sleep_if_xbusy(m, "vbpage"); } } } Modified: head/sys/vm/phys_pager.c ============================================================================== --- head/sys/vm/phys_pager.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/vm/phys_pager.c Tue Sep 10 18:27:45 2019 (r352174) @@ -219,10 +219,7 @@ retry: pmap_zero_page(m); m->valid = VM_PAGE_BITS_ALL; } else if (vm_page_xbusied(m)) { - vm_page_lock(m); - VM_OBJECT_WUNLOCK(object); - vm_page_busy_sleep(m, "physb", true); - VM_OBJECT_WLOCK(object); + vm_page_sleep_if_xbusy(m, "physb"); goto retry; } else { vm_page_xbusy(m); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/vm/vm_fault.c Tue Sep 10 18:27:45 2019 (r352174) @@ -510,7 +510,7 @@ vm_fault_populate(struct faultstate *fs, vm_prot_t pro *m_hold = &m[i]; vm_page_wire(&m[i]); } - vm_page_xunbusy_maybelocked(&m[i]); + vm_page_xunbusy(&m[i]); } if (m_mtx != NULL) mtx_unlock(m_mtx); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/vm/vm_object.c Tue Sep 10 18:27:45 2019 (r352174) @@ -1160,9 +1160,7 @@ next_page: ("vm_object_madvise: page %p is not managed", tm)); if (vm_page_busied(tm)) { if (object != tobject) - VM_OBJECT_WUNLOCK(tobject); - vm_page_lock(tm); - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_WUNLOCK(object); if (advice == MADV_WILLNEED) { /* * Reference the page before unlocking and @@ -1345,10 +1343,7 @@ retry: */ if (vm_page_busied(m)) { VM_OBJECT_WUNLOCK(new_object); - vm_page_lock(m); - VM_OBJECT_WUNLOCK(orig_object); - vm_page_busy_sleep(m, "spltwt", false); - VM_OBJECT_WLOCK(orig_object); + vm_page_sleep_if_busy(m, "spltwt"); VM_OBJECT_WLOCK(new_object); goto retry; } @@ -1415,15 +1410,16 @@ vm_object_collapse_scan_wait(vm_object_t object, vm_pa ("invalid ownership %p %p %p", p, object, backing_object)); if ((op & OBSC_COLLAPSE_NOWAIT) != 0) return (next); - if (p != NULL) - vm_page_lock(p); - VM_OBJECT_WUNLOCK(object); - VM_OBJECT_WUNLOCK(backing_object); /* The page is only NULL when rename fails. */ - if (p == NULL) + if (p == NULL) { vm_radix_wait(); - else + } else { + if (p->object == object) + VM_OBJECT_WUNLOCK(backing_object); + else + VM_OBJECT_WUNLOCK(object); vm_page_busy_sleep(p, "vmocol", false); + } VM_OBJECT_WLOCK(object); VM_OBJECT_WLOCK(backing_object); return (TAILQ_FIRST(&backing_object->memq)); @@ -1837,7 +1833,6 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t int options) { vm_page_t p, next; - struct mtx *mtx; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_UNMANAGED) == 0 || @@ -1848,7 +1843,6 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t vm_object_pip_add(object, 1); again: p = vm_page_find_least(object, start); - mtx = NULL; /* * Here, the variable "p" is either (1) the page with the least pindex @@ -1865,17 +1859,8 @@ again: * however, be invalidated if the option OBJPR_CLEANONLY is * not specified. */ - vm_page_change_lock(p, &mtx); - if (vm_page_xbusied(p)) { - VM_OBJECT_WUNLOCK(object); - vm_page_busy_sleep(p, "vmopax", true); - VM_OBJECT_WLOCK(object); - goto again; - } if (vm_page_busied(p)) { - VM_OBJECT_WUNLOCK(object); - vm_page_busy_sleep(p, "vmopar", false); - VM_OBJECT_WLOCK(object); + vm_page_sleep_if_busy(p, "vmopar"); goto again; } if (vm_page_wired(p)) { @@ -1904,8 +1889,6 @@ wired: goto wired; vm_page_free(p); } - if (mtx != NULL) - mtx_unlock(mtx); vm_object_pip_wakeup(object); } @@ -2190,8 +2173,7 @@ again: m = TAILQ_NEXT(m, listq); } if (vm_page_xbusied(tm)) { - vm_page_lock(tm); - for (tobject = object; locked_depth >= 1; + for (tobject = object; locked_depth > 1; locked_depth--) { t1object = tobject->backing_object; VM_OBJECT_RUNLOCK(tobject); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/vm/vm_page.c Tue Sep 10 18:27:45 2019 (r352174) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -873,27 +874,17 @@ void vm_page_busy_downgrade(vm_page_t m) { u_int x; - bool locked; vm_page_assert_xbusied(m); - locked = mtx_owned(vm_page_lockptr(m)); + x = m->busy_lock; for (;;) { - x = m->busy_lock; - x &= VPB_BIT_WAITERS; - if (x != 0 && !locked) - vm_page_lock(m); - if (atomic_cmpset_rel_int(&m->busy_lock, - VPB_SINGLE_EXCLUSIVER | x, VPB_SHARERS_WORD(1))) + if (atomic_fcmpset_rel_int(&m->busy_lock, + &x, VPB_SHARERS_WORD(1))) break; - if (x != 0 && !locked) - vm_page_unlock(m); } - if (x != 0) { + if ((x & VPB_BIT_WAITERS) != 0) wakeup(m); - if (!locked) - vm_page_unlock(m); - } } /* @@ -920,35 +911,23 @@ vm_page_sunbusy(vm_page_t m) { u_int x; - vm_page_lock_assert(m, MA_NOTOWNED); vm_page_assert_sbusied(m); + x = m->busy_lock; for (;;) { - x = m->busy_lock; if (VPB_SHARERS(x) > 1) { - if (atomic_cmpset_int(&m->busy_lock, x, + if (atomic_fcmpset_int(&m->busy_lock, &x, x - VPB_ONE_SHARER)) break; continue; } - if ((x & VPB_BIT_WAITERS) == 0) { - KASSERT(x == VPB_SHARERS_WORD(1), - ("vm_page_sunbusy: invalid lock state")); - if (atomic_cmpset_int(&m->busy_lock, - VPB_SHARERS_WORD(1), VPB_UNBUSIED)) - break; + KASSERT((x & ~VPB_BIT_WAITERS) == VPB_SHARERS_WORD(1), + ("vm_page_sunbusy: invalid lock state")); + if (!atomic_fcmpset_rel_int(&m->busy_lock, &x, VPB_UNBUSIED)) continue; - } - KASSERT(x == (VPB_SHARERS_WORD(1) | VPB_BIT_WAITERS), - ("vm_page_sunbusy: invalid lock state for waiters")); - - vm_page_lock(m); - if (!atomic_cmpset_int(&m->busy_lock, x, VPB_UNBUSIED)) { - vm_page_unlock(m); - continue; - } + if ((x & VPB_BIT_WAITERS) == 0) + break; wakeup(m); - vm_page_unlock(m); break; } } @@ -956,28 +935,35 @@ vm_page_sunbusy(vm_page_t m) /* * vm_page_busy_sleep: * - * Sleep and release the page lock, using the page pointer as wchan. + * Sleep if the page is busy, using the page pointer as wchan. * This is used to implement the hard-path of busying mechanism. * - * The given page must be locked. - * * If nonshared is true, sleep only if the page is xbusy. + * + * The object lock must be held on entry and will be released on exit. */ void vm_page_busy_sleep(vm_page_t m, const char *wmesg, bool nonshared) { + vm_object_t obj; u_int x; - vm_page_assert_locked(m); + obj = m->object; + vm_page_lock_assert(m, MA_NOTOWNED); + VM_OBJECT_ASSERT_LOCKED(obj); + sleepq_lock(m); x = m->busy_lock; if (x == VPB_UNBUSIED || (nonshared && (x & VPB_BIT_SHARED) != 0) || ((x & VPB_BIT_WAITERS) == 0 && !atomic_cmpset_int(&m->busy_lock, x, x | VPB_BIT_WAITERS))) { - vm_page_unlock(m); + VM_OBJECT_DROP(obj); + sleepq_release(m); return; } - msleep(m, vm_page_lockptr(m), PVM | PDROP, wmesg, 0); + VM_OBJECT_DROP(obj); + sleepq_add(m, NULL, wmesg, 0, 0); + sleepq_wait(m, PVM); } /* @@ -992,55 +978,20 @@ vm_page_trysbusy(vm_page_t m) { u_int x; + x = m->busy_lock; for (;;) { - x = m->busy_lock; if ((x & VPB_BIT_SHARED) == 0) return (0); - if (atomic_cmpset_acq_int(&m->busy_lock, x, x + VPB_ONE_SHARER)) + if (atomic_fcmpset_acq_int(&m->busy_lock, &x, + x + VPB_ONE_SHARER)) return (1); } } -static void -vm_page_xunbusy_locked(vm_page_t m) -{ - - vm_page_assert_xbusied(m); - vm_page_assert_locked(m); - - atomic_store_rel_int(&m->busy_lock, VPB_UNBUSIED); - /* There is a waiter, do wakeup() instead of vm_page_flash(). */ - wakeup(m); -} - -void -vm_page_xunbusy_maybelocked(vm_page_t m) -{ - bool lockacq; - - vm_page_assert_xbusied(m); - - /* - * Fast path for unbusy. If it succeeds, we know that there - * are no waiters, so we do not need a wakeup. - */ - if (atomic_cmpset_rel_int(&m->busy_lock, VPB_SINGLE_EXCLUSIVER, - VPB_UNBUSIED)) - return; - - lockacq = !mtx_owned(vm_page_lockptr(m)); - if (lockacq) - vm_page_lock(m); - vm_page_xunbusy_locked(m); - if (lockacq) - vm_page_unlock(m); -} - /* * vm_page_xunbusy_hard: * - * Called after the first try the exclusive unbusy of a page failed. - * It is assumed that the waiters bit is on. + * Called when unbusy has failed because there is a waiter. */ void vm_page_xunbusy_hard(vm_page_t m) @@ -1048,34 +999,10 @@ vm_page_xunbusy_hard(vm_page_t m) vm_page_assert_xbusied(m); - vm_page_lock(m); - vm_page_xunbusy_locked(m); - vm_page_unlock(m); -} - -/* - * vm_page_flash: - * - * Wakeup anyone waiting for the page. - * The ownership bits do not change. - * - * The given page must be locked. - */ -void -vm_page_flash(vm_page_t m) -{ - u_int x; - - vm_page_lock_assert(m, MA_OWNED); - - for (;;) { - x = m->busy_lock; - if ((x & VPB_BIT_WAITERS) == 0) - return; - if (atomic_cmpset_int(&m->busy_lock, x, - x & (~VPB_BIT_WAITERS))) - break; - } + /* + * Wake the waiter. + */ + atomic_store_rel_int(&m->busy_lock, VPB_UNBUSIED); wakeup(m); } @@ -1264,7 +1191,7 @@ vm_page_readahead_finish(vm_page_t m) /* * vm_page_sleep_if_busy: * - * Sleep and release the page queues lock if the page is busied. + * Sleep and release the object lock if the page is busied. * Returns TRUE if the thread slept. * * The given page must be unlocked and object containing it must @@ -1287,8 +1214,6 @@ vm_page_sleep_if_busy(vm_page_t m, const char *msg) * held by the callers. */ obj = m->object; - vm_page_lock(m); - VM_OBJECT_WUNLOCK(obj); vm_page_busy_sleep(m, msg, false); VM_OBJECT_WLOCK(obj); return (TRUE); @@ -1297,6 +1222,39 @@ vm_page_sleep_if_busy(vm_page_t m, const char *msg) } /* + * vm_page_sleep_if_xbusy: + * + * Sleep and release the object lock if the page is xbusied. + * Returns TRUE if the thread slept. + * + * The given page must be unlocked and object containing it must + * be locked. + */ +int +vm_page_sleep_if_xbusy(vm_page_t m, const char *msg) +{ + vm_object_t obj; + + vm_page_lock_assert(m, MA_NOTOWNED); + VM_OBJECT_ASSERT_WLOCKED(m->object); + + if (vm_page_xbusied(m)) { + /* + * The page-specific object must be cached because page + * identity can change during the sleep, causing the + * re-lock of a different object. + * It is assumed that a reference to the object is already + * held by the callers. + */ + obj = m->object; + vm_page_busy_sleep(m, msg, true); + VM_OBJECT_WLOCK(obj); + return (TRUE); + } + return (FALSE); +} + +/* * vm_page_dirty_KBI: [ internal use only ] * * Set all bits in the page's dirty field. @@ -1452,7 +1410,7 @@ vm_page_object_remove(vm_page_t m) KASSERT((m->ref_count & VPRC_OBJREF) != 0, ("page %p is missing its object ref", m)); if (vm_page_xbusied(m)) - vm_page_xunbusy_maybelocked(m); + vm_page_xunbusy(m); mrem = vm_radix_remove(&object->rtree, m->pindex); KASSERT(mrem == m, ("removed page %p, expected page %p", mrem, m)); @@ -1598,7 +1556,7 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm mold->object = NULL; atomic_clear_int(&mold->ref_count, VPRC_OBJREF); - vm_page_xunbusy_maybelocked(mold); + vm_page_xunbusy(mold); /* * The object's resident_page_count does not change because we have @@ -4089,8 +4047,6 @@ retrylookup: * likely to reclaim it. */ vm_page_aflag_set(m, PGA_REFERENCED); - vm_page_lock(m); - VM_OBJECT_WUNLOCK(object); vm_page_busy_sleep(m, "pgrbwt", (allocflags & VM_ALLOC_IGN_SBUSY) != 0); VM_OBJECT_WLOCK(object); @@ -4188,8 +4144,6 @@ retrylookup: * likely to reclaim it. */ vm_page_aflag_set(m, PGA_REFERENCED); - vm_page_lock(m); - VM_OBJECT_WUNLOCK(object); vm_page_busy_sleep(m, "grbmaw", (allocflags & VM_ALLOC_IGN_SBUSY) != 0); VM_OBJECT_WLOCK(object); Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Sep 10 17:55:07 2019 (r352173) +++ head/sys/vm/vm_page.h Tue Sep 10 18:27:45 2019 (r352174) @@ -541,7 +541,6 @@ malloc2vm_flags(int malloc_flags) void vm_page_busy_downgrade(vm_page_t m); void vm_page_busy_sleep(vm_page_t m, const char *msg, bool nonshared); -void vm_page_flash(vm_page_t m); void vm_page_free(vm_page_t m); void vm_page_free_zero(vm_page_t m); @@ -604,6 +603,7 @@ vm_page_t vm_page_scan_contig(u_long npages, vm_page_t vm_page_t m_end, u_long alignment, vm_paddr_t boundary, int options); void vm_page_set_valid_range(vm_page_t m, int base, int size); int vm_page_sleep_if_busy(vm_page_t m, const char *msg); +int vm_page_sleep_if_xbusy(vm_page_t m, const char *msg); vm_offset_t vm_page_startup(vm_offset_t vaddr); void vm_page_sunbusy(vm_page_t m); void vm_page_swapqueue(vm_page_t m, uint8_t oldq, uint8_t newq); @@ -618,7 +618,6 @@ void vm_page_updatefake(vm_page_t m, vm_paddr_t paddr, void vm_page_wire(vm_page_t); bool vm_page_wire_mapped(vm_page_t m); void vm_page_xunbusy_hard(vm_page_t m); -void vm_page_xunbusy_maybelocked(vm_page_t m); void vm_page_set_validclean (vm_page_t, int, int); void vm_page_clear_dirty (vm_page_t, int, int); void vm_page_set_invalid (vm_page_t, int, int); From owner-svn-src-head@freebsd.org Tue Sep 10 18:46:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EC56E0B41; Tue, 10 Sep 2019 18:46:33 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SYsP31trz3N3H; Tue, 10 Sep 2019 18:46:33 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 469CF2A59A; Tue, 10 Sep 2019 18:46:33 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AIkXiq097157; Tue, 10 Sep 2019 18:46:33 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AIkXwR097156; Tue, 10 Sep 2019 18:46:33 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201909101846.x8AIkXwR097156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Tue, 10 Sep 2019 18:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352175 - head/lib/libkvm X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/lib/libkvm X-SVN-Commit-Revision: 352175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 18:46:33 -0000 Author: luporl Date: Tue Sep 10 18:46:32 2019 New Revision: 352175 URL: https://svnweb.freebsd.org/changeset/base/352175 Log: Add powerpc support to libkvm probe function PowerPC kernels are of DYN type, instead of EXEC. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21583 Modified: head/lib/libkvm/kvm_private.c Modified: head/lib/libkvm/kvm_private.c ============================================================================== --- head/lib/libkvm/kvm_private.c Tue Sep 10 18:27:45 2019 (r352174) +++ head/lib/libkvm/kvm_private.c Tue Sep 10 18:46:32 2019 (r352175) @@ -131,7 +131,8 @@ _kvm_probe_elf_kernel(kvm_t *kd, int class, int machin { return (kd->nlehdr.e_ident[EI_CLASS] == class && - kd->nlehdr.e_type == ET_EXEC && + ((machine == EM_PPC || machine == EM_PPC64) ? + kd->nlehdr.e_type == ET_DYN : kd->nlehdr.e_type == ET_EXEC) && kd->nlehdr.e_machine == machine); } From owner-svn-src-head@freebsd.org Tue Sep 10 19:08:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30DABE126B; Tue, 10 Sep 2019 19:08:04 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46SZLD18YSz3NvJ; Tue, 10 Sep 2019 19:08:04 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AA472A97C; Tue, 10 Sep 2019 19:08:04 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AJ84Hu009016; Tue, 10 Sep 2019 19:08:04 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AJ81KH009005; Tue, 10 Sep 2019 19:08:01 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201909101908.x8AJ81KH009005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Tue, 10 Sep 2019 19:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352176 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs compat/linuxkpi/common/src dev/drm2/ttm dev/xen/gntdev dev/xen/privcmd kern vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs compat/linuxkpi/common/src dev/drm2/ttm dev/xen/gntdev dev/xen/privcmd kern vm X-SVN-Commit-Revision: 352176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 19:08:04 -0000 Author: jeff Date: Tue Sep 10 19:08:01 2019 New Revision: 352176 URL: https://svnweb.freebsd.org/changeset/base/352176 Log: Replace redundant code with a few new vm_page_grab facilities: - VM_ALLOC_NOCREAT will grab without creating a page. - vm_page_grab_valid() will grab and page in if necessary. - vm_page_busy_acquire() automates some busy acquire loops. Discussed with: alc, kib, markj Tested by: pho (part of larger branch) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21546 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/dev/drm2/ttm/ttm_bo_vm.c head/sys/dev/drm2/ttm/ttm_tt.c head/sys/dev/xen/gntdev/gntdev.c head/sys/dev/xen/privcmd/privcmd.c head/sys/kern/uipc_shm.c head/sys/vm/vm_glue.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Sep 10 19:08:01 2019 (r352176) @@ -412,33 +412,14 @@ page_busy(vnode_t *vp, int64_t start, int64_t off, int obj = vp->v_object; zfs_vmobject_assert_wlocked(obj); - for (;;) { - if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && - pp->valid) { - if (vm_page_xbusied(pp)) { - /* - * Reference the page before unlocking and - * sleeping so that the page daemon is less - * likely to reclaim it. - */ - vm_page_reference(pp); - vm_page_sleep_if_xbusy(pp, "zfsmwb"); - continue; - } - vm_page_sbusy(pp); - } else if (pp != NULL) { - ASSERT(!pp->valid); - pp = NULL; - } - - if (pp != NULL) { - ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_object_pip_add(obj, 1); - pmap_remove_write(pp); - if (nbytes != 0) - vm_page_clear_dirty(pp, off, nbytes); - } - break; + vm_page_grab_valid(&pp, obj, OFF_TO_IDX(start), VM_ALLOC_NOCREAT | + VM_ALLOC_SBUSY | VM_ALLOC_NORMAL | VM_ALLOC_IGN_SBUSY); + if (pp != NULL) { + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); + vm_object_pip_add(obj, 1); + pmap_remove_write(pp); + if (nbytes != 0) + vm_page_clear_dirty(pp, off, nbytes); } return (pp); } @@ -455,32 +436,14 @@ static vm_page_t page_wire(vnode_t *vp, int64_t start) { vm_object_t obj; - vm_page_t pp; + vm_page_t m; obj = vp->v_object; zfs_vmobject_assert_wlocked(obj); - for (;;) { - if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && - pp->valid) { - if (vm_page_xbusied(pp)) { - /* - * Reference the page before unlocking and - * sleeping so that the page daemon is less - * likely to reclaim it. - */ - vm_page_reference(pp); - vm_page_sleep_if_xbusy(pp, "zfsmwb"); - continue; - } - - ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_page_wire(pp); - } else - pp = NULL; - break; - } - return (pp); + vm_page_grab_valid(&m, obj, OFF_TO_IDX(start), VM_ALLOC_NOCREAT | + VM_ALLOC_WIRED | VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY); + return (m); } static void Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Tue Sep 10 19:08:01 2019 (r352176) @@ -286,27 +286,11 @@ linux_shmem_read_mapping_page_gfp(vm_object_t obj, int panic("GFP_NOWAIT is unimplemented"); VM_OBJECT_WLOCK(obj); - page = vm_page_grab(obj, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | - VM_ALLOC_WIRED); - if (page->valid != VM_PAGE_BITS_ALL) { - vm_page_xbusy(page); - if (vm_pager_has_page(obj, pindex, NULL, NULL)) { - rv = vm_pager_get_pages(obj, &page, 1, NULL, NULL); - if (rv != VM_PAGER_OK) { - vm_page_unwire_noq(page); - vm_page_free(page); - VM_OBJECT_WUNLOCK(obj); - return (ERR_PTR(-EINVAL)); - } - MPASS(page->valid == VM_PAGE_BITS_ALL); - } else { - pmap_zero_page(page); - page->valid = VM_PAGE_BITS_ALL; - page->dirty = 0; - } - vm_page_xunbusy(page); - } + rv = vm_page_grab_valid(&page, obj, pindex, VM_ALLOC_NORMAL | + VM_ALLOC_NOBUSY | VM_ALLOC_WIRED); VM_OBJECT_WUNLOCK(obj); + if (rv != VM_PAGER_OK) + return (ERR_PTR(-EINVAL)); return (page); } Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Tue Sep 10 19:08:01 2019 (r352176) @@ -231,8 +231,7 @@ reserve: } VM_OBJECT_WLOCK(vm_obj); - if (vm_page_busied(m)) { - vm_page_sleep_if_busy(m, "ttmpbs"); + if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) { ttm_mem_io_unlock(man); ttm_bo_unreserve(bo); goto retry; @@ -240,6 +239,7 @@ reserve: m1 = vm_page_lookup(vm_obj, OFF_TO_IDX(offset)); if (m1 == NULL) { if (vm_page_insert(m, vm_obj, OFF_TO_IDX(offset))) { + vm_page_xunbusy(m); VM_OBJECT_WUNLOCK(vm_obj); vm_wait(vm_obj); VM_OBJECT_WLOCK(vm_obj); @@ -253,7 +253,6 @@ reserve: bo, m, m1, (uintmax_t)offset)); } m->valid = VM_PAGE_BITS_ALL; - vm_page_xbusy(m); if (*mres != NULL) { KASSERT(*mres != m, ("losing %p %p", *mres, m)); vm_page_free(*mres); @@ -375,7 +374,7 @@ retry: m = vm_page_lookup(vm_obj, i); if (m == NULL) continue; - if (vm_page_sleep_if_busy(m, "ttm_unm")) + if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) goto retry; cdev_pager_free_page(vm_obj, m); } Modified: head/sys/dev/drm2/ttm/ttm_tt.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_tt.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/dev/drm2/ttm/ttm_tt.c Tue Sep 10 19:08:01 2019 (r352176) @@ -288,20 +288,12 @@ int ttm_tt_swapin(struct ttm_tt *ttm) VM_OBJECT_WLOCK(obj); vm_object_pip_add(obj, 1); for (i = 0; i < ttm->num_pages; ++i) { - from_page = vm_page_grab(obj, i, VM_ALLOC_NORMAL); - if (from_page->valid != VM_PAGE_BITS_ALL) { - if (vm_pager_has_page(obj, i, NULL, NULL)) { - rv = vm_pager_get_pages(obj, &from_page, 1, - NULL, NULL); - if (rv != VM_PAGER_OK) { - vm_page_free(from_page); - ret = -EIO; - goto err_ret; - } - } else - vm_page_zero_invalid(from_page, TRUE); + rv = vm_page_grab_valid(&from_page, obj, i, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); + if (rv != VM_PAGER_OK) { + ret = -EIO; + goto err_ret; } - vm_page_xunbusy(from_page); to_page = ttm->pages[i]; if (unlikely(to_page == NULL)) { ret = -ENOMEM; Modified: head/sys/dev/xen/gntdev/gntdev.c ============================================================================== --- head/sys/dev/xen/gntdev/gntdev.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/dev/xen/gntdev/gntdev.c Tue Sep 10 19:08:01 2019 (r352176) @@ -606,7 +606,7 @@ retry: m = vm_page_lookup(gmap->map->mem, i); if (m == NULL) continue; - if (vm_page_sleep_if_busy(m, "pcmdum")) + if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) goto retry; cdev_pager_free_page(gmap->map->mem, m); } Modified: head/sys/dev/xen/privcmd/privcmd.c ============================================================================== --- head/sys/dev/xen/privcmd/privcmd.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/dev/xen/privcmd/privcmd.c Tue Sep 10 19:08:01 2019 (r352176) @@ -128,7 +128,7 @@ retry: m = vm_page_lookup(map->mem, i); if (m == NULL) continue; - if (vm_page_sleep_if_busy(m, "pcmdum")) + if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) goto retry; cdev_pager_free_page(map->mem, m); } Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/kern/uipc_shm.c Tue Sep 10 19:08:01 2019 (r352176) @@ -188,24 +188,13 @@ uiomove_object_page(vm_object_t obj, size_t len, struc * lock to page out tobj's pages because tobj is a OBJT_SWAP * type object. */ - m = vm_page_grab(obj, idx, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | - VM_ALLOC_WIRED); - if (m->valid != VM_PAGE_BITS_ALL) { - vm_page_xbusy(m); - if (vm_pager_has_page(obj, idx, NULL, NULL)) { - rv = vm_pager_get_pages(obj, &m, 1, NULL, NULL); - if (rv != VM_PAGER_OK) { - printf( - "uiomove_object: vm_obj %p idx %jd valid %x pager error %d\n", - obj, idx, m->valid, rv); - vm_page_unwire_noq(m); - vm_page_free(m); - VM_OBJECT_WUNLOCK(obj); - return (EIO); - } - } else - vm_page_zero_invalid(m, TRUE); - vm_page_xunbusy(m); + rv = vm_page_grab_valid(&m, obj, idx, + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_NOBUSY); + if (rv != VM_PAGER_OK) { + VM_OBJECT_WUNLOCK(obj); + printf("uiomove_object: vm_obj %p idx %jd pager error %d\n", + obj, idx, rv); + return (EIO); } VM_OBJECT_WUNLOCK(obj); error = uiomove_fromphys(&m, offset, tlen, uio); Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/vm/vm_glue.c Tue Sep 10 19:08:01 2019 (r352176) @@ -219,24 +219,11 @@ vm_imgact_hold_page(vm_object_t object, vm_ooffset_t o { vm_page_t m; vm_pindex_t pindex; - int rv; - VM_OBJECT_WLOCK(object); pindex = OFF_TO_IDX(offset); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | - VM_ALLOC_WIRED); - if (m->valid != VM_PAGE_BITS_ALL) { - vm_page_xbusy(m); - rv = vm_pager_get_pages(object, &m, 1, NULL, NULL); - if (rv != VM_PAGER_OK) { - vm_page_unwire_noq(m); - vm_page_free(m); - m = NULL; - goto out; - } - vm_page_xunbusy(m); - } -out: + VM_OBJECT_WLOCK(object); + (void)vm_page_grab_valid(&m, object, pindex, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_WIRED); VM_OBJECT_WUNLOCK(object); return (m); } Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/vm/vm_object.c Tue Sep 10 19:08:01 2019 (r352176) @@ -1954,14 +1954,10 @@ vm_object_populate(vm_object_t object, vm_pindex_t sta VM_OBJECT_ASSERT_WLOCKED(object); for (pindex = start; pindex < end; pindex++) { - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL); - if (m->valid != VM_PAGE_BITS_ALL) { - rv = vm_pager_get_pages(object, &m, 1, NULL, NULL); - if (rv != VM_PAGER_OK) { - vm_page_free(m); - break; - } - } + rv = vm_page_grab_valid(&m, object, pindex, VM_ALLOC_NORMAL); + if (rv != VM_PAGER_OK) + break; + /* * Keep "m" busy because a subsequent iteration may unlock * the object. Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/vm/vm_page.c Tue Sep 10 19:08:01 2019 (r352176) @@ -866,6 +866,66 @@ vm_page_reference(vm_page_t m) } /* + * vm_page_busy_acquire: + * + * Acquire the busy lock as described by VM_ALLOC_* flags. Will loop + * and drop the object lock if necessary. + */ +int +vm_page_busy_acquire(vm_page_t m, int allocflags) +{ + vm_object_t obj; + u_int x; + bool locked; + + /* + * The page-specific object must be cached because page + * identity can change during the sleep, causing the + * re-lock of a different object. + * It is assumed that a reference to the object is already + * held by the callers. + */ + obj = m->object; + for (;;) { + if ((allocflags & VM_ALLOC_SBUSY) == 0) { + if (vm_page_tryxbusy(m)) + return (TRUE); + } else { + if (vm_page_trysbusy(m)) + return (TRUE); + } + if ((allocflags & VM_ALLOC_NOWAIT) != 0) + return (FALSE); + if (obj != NULL) { + locked = VM_OBJECT_WOWNED(obj); + } else { + MPASS(vm_page_wired(m)); + locked = FALSE; + } + sleepq_lock(m); + x = m->busy_lock; + if (x == VPB_UNBUSIED || + ((allocflags & VM_ALLOC_SBUSY) != 0 && + (x & VPB_BIT_SHARED) != 0) || + ((x & VPB_BIT_WAITERS) == 0 && + !atomic_cmpset_int(&m->busy_lock, x, + x | VPB_BIT_WAITERS))) { + sleepq_release(m); + continue; + } + if (locked) + VM_OBJECT_WUNLOCK(obj); + sleepq_add(m, NULL, "vmpba", 0, 0); + sleepq_wait(m, PVM); + if (locked) + VM_OBJECT_WLOCK(obj); + MPASS(m->object == obj || m->object == NULL); + if ((allocflags & VM_ALLOC_WAITFAIL) != 0) + return (FALSE); + } +} + +/* * vm_page_busy_downgrade: * * Downgrade an exclusive busy page into a single shared busy page. @@ -4046,10 +4106,13 @@ retrylookup: * sleeping so that the page daemon is less * likely to reclaim it. */ - vm_page_aflag_set(m, PGA_REFERENCED); + if ((allocflags & VM_ALLOC_NOCREAT) == 0) + vm_page_aflag_set(m, PGA_REFERENCED); vm_page_busy_sleep(m, "pgrbwt", (allocflags & VM_ALLOC_IGN_SBUSY) != 0); VM_OBJECT_WLOCK(object); + if ((allocflags & VM_ALLOC_WAITFAIL) != 0) + return (NULL); goto retrylookup; } else { if ((allocflags & VM_ALLOC_WIRED) != 0) @@ -4057,11 +4120,13 @@ retrylookup: if ((allocflags & (VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)) == 0) vm_page_xbusy(m); - if ((allocflags & VM_ALLOC_SBUSY) != 0) + else if ((allocflags & VM_ALLOC_SBUSY) != 0) vm_page_sbusy(m); return (m); } } + if ((allocflags & VM_ALLOC_NOCREAT) != 0) + return (NULL); m = vm_page_alloc(object, pindex, pflags); if (m == NULL) { if ((allocflags & VM_ALLOC_NOWAIT) != 0) @@ -4074,6 +4139,109 @@ retrylookup: } /* + * Grab a page and make it valid, paging in if necessary. Pages missing from + * their pager are zero filled and validated. + */ +int +vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int allocflags) +{ + vm_page_t m; + bool sleep, xbusy; + int pflags; + int rv; + + KASSERT((allocflags & VM_ALLOC_SBUSY) == 0 || + (allocflags & VM_ALLOC_IGN_SBUSY) != 0, + ("vm_page_grab_valid: VM_ALLOC_SBUSY/VM_ALLOC_IGN_SBUSY mismatch")); + KASSERT((allocflags & + (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, + ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); + VM_OBJECT_ASSERT_WLOCKED(object); + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); + pflags |= VM_ALLOC_WAITFAIL; + +retrylookup: + xbusy = false; + if ((m = vm_page_lookup(object, pindex)) != NULL) { + /* + * If the page is fully valid it can only become invalid + * with the object lock held. If it is not valid it can + * become valid with the busy lock held. Therefore, we + * may unnecessarily lock the exclusive busy here if we + * race with I/O completion not using the object lock. + * However, we will not end up with an invalid page and a + * shared lock. + */ + if (m->valid != VM_PAGE_BITS_ALL || + (allocflags & (VM_ALLOC_IGN_SBUSY | VM_ALLOC_SBUSY)) == 0) { + sleep = !vm_page_tryxbusy(m); + xbusy = true; + } else + sleep = !vm_page_trysbusy(m); + if (sleep) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + if ((allocflags & VM_ALLOC_NOCREAT) == 0) + vm_page_aflag_set(m, PGA_REFERENCED); + vm_page_busy_sleep(m, "pgrbwt", (allocflags & + VM_ALLOC_IGN_SBUSY) != 0); + VM_OBJECT_WLOCK(object); + goto retrylookup; + } + if ((allocflags & VM_ALLOC_NOCREAT) != 0 && + m->valid != VM_PAGE_BITS_ALL) { + if (xbusy) + vm_page_xunbusy(m); + else + vm_page_sunbusy(m); + *mp = NULL; + return (VM_PAGER_FAIL); + } + if ((allocflags & VM_ALLOC_WIRED) != 0) + vm_page_wire(m); + if (m->valid == VM_PAGE_BITS_ALL) + goto out; + } else if ((allocflags & VM_ALLOC_NOCREAT) != 0) { + *mp = NULL; + return (VM_PAGER_FAIL); + } else if ((m = vm_page_alloc(object, pindex, pflags)) != NULL) { + xbusy = true; + } else { + goto retrylookup; + } + + vm_page_assert_xbusied(m); + MPASS(xbusy); + if (vm_pager_has_page(object, pindex, NULL, NULL)) { + rv = vm_pager_get_pages(object, &m, 1, NULL, NULL); + if (rv != VM_PAGER_OK) { + if (allocflags & VM_ALLOC_WIRED) + vm_page_unwire_noq(m); + vm_page_free(m); + *mp = NULL; + return (rv); + } + MPASS(m->valid == VM_PAGE_BITS_ALL); + } else { + vm_page_zero_invalid(m, TRUE); + } +out: + if ((allocflags & VM_ALLOC_NOBUSY) != 0) { + if (xbusy) + vm_page_xunbusy(m); + else + vm_page_sunbusy(m); + } + if ((allocflags & VM_ALLOC_SBUSY) != 0 && xbusy) + vm_page_busy_downgrade(m); + *mp = m; + return (VM_PAGER_OK); +} + +/* * Return the specified range of pages from the given object. For each * page offset within the range, if a page already exists within the object * at that offset and it is busy, then wait for it to change state. If, @@ -4143,7 +4311,8 @@ retrylookup: * sleeping so that the page daemon is less * likely to reclaim it. */ - vm_page_aflag_set(m, PGA_REFERENCED); + if ((allocflags & VM_ALLOC_NOCREAT) == 0) + vm_page_aflag_set(m, PGA_REFERENCED); vm_page_busy_sleep(m, "grbmaw", (allocflags & VM_ALLOC_IGN_SBUSY) != 0); VM_OBJECT_WLOCK(object); @@ -4157,6 +4326,8 @@ retrylookup: if ((allocflags & VM_ALLOC_SBUSY) != 0) vm_page_sbusy(m); } else { + if ((allocflags & VM_ALLOC_NOCREAT) != 0) + break; m = vm_page_alloc_after(object, pindex + i, pflags | VM_ALLOC_COUNT(count - i), mpred); if (m == NULL) { Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Sep 10 18:46:32 2019 (r352175) +++ head/sys/vm/vm_page.h Tue Sep 10 19:08:01 2019 (r352176) @@ -497,6 +497,7 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_ZERO 0x0040 /* (acfgp) Allocate a prezeroed page */ #define VM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ #define VM_ALLOC_NOBUSY 0x0200 /* (acgp) Do not excl busy the page */ +#define VM_ALLOC_NOCREAT 0x0400 /* (gp) Don't create a page */ #define VM_ALLOC_IGN_SBUSY 0x1000 /* (gp) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ #define VM_ALLOC_SBUSY 0x4000 /* (acgp) Shared busy the page */ @@ -539,6 +540,7 @@ malloc2vm_flags(int malloc_flags) #define PS_ALL_VALID 0x2 #define PS_NONE_BUSY 0x4 +int vm_page_busy_acquire(vm_page_t m, int allocflags); void vm_page_busy_downgrade(vm_page_t m); void vm_page_busy_sleep(vm_page_t m, const char *msg, bool nonshared); void vm_page_free(vm_page_t m); @@ -565,6 +567,8 @@ void vm_page_change_lock(vm_page_t m, struct mtx **mtx vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count); +int vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, + int allocflags); void vm_page_deactivate(vm_page_t); void vm_page_deactivate_noreuse(vm_page_t); void vm_page_dequeue(vm_page_t m); From owner-svn-src-head@freebsd.org Tue Sep 10 20:08:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 062C2E2D96; Tue, 10 Sep 2019 20:08:25 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Sbgr67L3z3xGp; Tue, 10 Sep 2019 20:08:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C70D2B4A2; Tue, 10 Sep 2019 20:08:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AK8OEJ045712; Tue, 10 Sep 2019 20:08:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AK8Ot6045711; Tue, 10 Sep 2019 20:08:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201909102008.x8AK8Ot6045711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 10 Sep 2019 20:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352177 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 20:08:25 -0000 Author: mjg Date: Tue Sep 10 20:08:24 2019 New Revision: 352177 URL: https://svnweb.freebsd.org/changeset/base/352177 Log: cache: assorted cleanups Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Sep 10 19:08:01 2019 (r352176) +++ head/sys/kern/vfs_cache.c Tue Sep 10 20:08:24 2019 (r352177) @@ -380,6 +380,8 @@ STATNODE_COUNTER(numfullpathfail4, "Number of fullpath STATNODE_COUNTER(numfullpathfound, "Number of successful fullpath calls"); static long zap_and_exit_bucket_fail; STATNODE_ULONG(zap_and_exit_bucket_fail, "Number of times zap_and_exit failed to lock"); +static long zap_and_exit_bucket_fail2; STATNODE_ULONG(zap_and_exit_bucket_fail2, + "Number of times zap_and_exit failed to lock"); static long cache_lock_vnodes_cel_3_failures; STATNODE_ULONG(cache_lock_vnodes_cel_3_failures, "Number of times 3-way vnode locking failed"); @@ -394,7 +396,7 @@ static int cache_yield; SYSCTL_INT(_vfs_cache, OID_AUTO, yield, CTLFLAG_RD, &cache_yield, 0, "Number of times cache called yield"); -static void +static void __noinline cache_maybe_yield(void) { @@ -453,12 +455,14 @@ cache_assert_bucket_locked(struct namecache *ncp, int #define cache_assert_bucket_locked(x, y) do { } while (0) #endif -#define cache_sort(x, y) _cache_sort((void **)(x), (void **)(y)) +#define cache_sort_vnodes(x, y) _cache_sort_vnodes((void **)(x), (void **)(y)) static void -_cache_sort(void **p1, void **p2) +_cache_sort_vnodes(void **p1, void **p2) { void *tmp; + MPASS(*p1 != NULL || *p2 != NULL); + if (*p1 > *p2) { tmp = *p2; *p2 = *p1; @@ -506,8 +510,7 @@ static int cache_trylock_vnodes(struct mtx *vlp1, struct mtx *vlp2) { - cache_sort(&vlp1, &vlp2); - MPASS(vlp2 != NULL); + cache_sort_vnodes(&vlp1, &vlp2); if (vlp1 != NULL) { if (!mtx_trylock(vlp1)) @@ -924,7 +927,7 @@ cache_zap_locked_vnode_kl2(struct namecache *ncp, stru mtx_unlock(*vlpp); *vlpp = NULL; } - cache_sort(&vlp1, &vlp2); + cache_sort_vnodes(&vlp1, &vlp2); if (vlp1 == pvlp) { mtx_lock(vlp2); to_unlock = vlp2; @@ -950,7 +953,7 @@ out_relock: return (false); } -static int +static int __noinline cache_zap_locked_vnode(struct namecache *ncp, struct vnode *vp) { struct mtx *pvlp, *vlp1, *vlp2, *to_unlock; @@ -969,7 +972,7 @@ cache_zap_locked_vnode(struct namecache *ncp, struct v blp = NCP2BUCKETLOCK(ncp); vlp1 = VP2VNODELOCK(ncp->nc_dvp); vlp2 = VP2VNODELOCK(ncp->nc_vp); - cache_sort(&vlp1, &vlp2); + cache_sort_vnodes(&vlp1, &vlp2); if (vlp1 == pvlp) { mtx_lock(vlp2); to_unlock = vlp2; @@ -1047,7 +1050,7 @@ cache_zap_wlocked_bucket_kl(struct namecache *ncp, str vlp = NULL; if (!(ncp->nc_flag & NCF_NEGATIVE)) vlp = VP2VNODELOCK(ncp->nc_vp); - cache_sort(&dvlp, &vlp); + cache_sort_vnodes(&dvlp, &vlp); if (*vlpp1 == dvlp && *vlpp2 == vlp) { cache_zap_locked(ncp, false); @@ -1194,14 +1197,13 @@ retry: goto out_no_entry; } - counter_u64_add(numposzaps, 1); - error = cache_zap_wlocked_bucket(ncp, blp); - if (error != 0) { + if (__predict_false(error != 0)) { zap_and_exit_bucket_fail++; cache_maybe_yield(); goto retry; } + counter_u64_add(numposzaps, 1); cache_free(ncp); return (0); out_no_entry: @@ -1397,8 +1399,8 @@ zap_and_exit: error = cache_zap_rlocked_bucket(ncp, blp); else error = cache_zap_locked_vnode(ncp, dvp); - if (error != 0) { - zap_and_exit_bucket_fail++; + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail2++; cache_maybe_yield(); goto retry; } @@ -1434,7 +1436,7 @@ cache_lock_vnodes_cel(struct celockstate *cel, struct vlp1 = VP2VNODELOCK(vp); vlp2 = VP2VNODELOCK(dvp); - cache_sort(&vlp1, &vlp2); + cache_sort_vnodes(&vlp1, &vlp2); if (vlp1 != NULL) { mtx_lock(vlp1); @@ -1504,7 +1506,7 @@ cache_lock_buckets_cel(struct celockstate *cel, struct MPASS(cel->blp[0] == NULL); MPASS(cel->blp[1] == NULL); - cache_sort(&blp1, &blp2); + cache_sort_vnodes(&blp1, &blp2); if (blp1 != NULL) { rw_wlock(blp1); From owner-svn-src-head@freebsd.org Tue Sep 10 20:11:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AA90E2E78; Tue, 10 Sep 2019 20:11:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Sbks0vHHz3xX1; Tue, 10 Sep 2019 20:11:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0314B2B4DF; Tue, 10 Sep 2019 20:11:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AKB0VR048288; Tue, 10 Sep 2019 20:11:00 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AKB0e2048287; Tue, 10 Sep 2019 20:11:00 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201909102011.x8AKB0e2048287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 10 Sep 2019 20:11:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352178 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 20:11:01 -0000 Author: mjg Date: Tue Sep 10 20:11:00 2019 New Revision: 352178 URL: https://svnweb.freebsd.org/changeset/base/352178 Log: cache: change the formula for calculating lock array sizes It used to be mp_ncpus * 64, but this gives unnecessarily big values for small machines and at the same time constraints bigger ones. In particular this helps on a 104-way box for which the count is now doubled. While here make cache_purgevfs less likely. Currently it is not efficient in face of contention due to lock ordering issues. These are fixable but not worth it at the moment. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Sep 10 20:08:24 2019 (r352177) +++ head/sys/kern/vfs_cache.c Tue Sep 10 20:11:00 2019 (r352178) @@ -1879,19 +1879,21 @@ nchinit(void *dummy __unused) UMA_ZONE_ZINIT); nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash); - ncbuckethash = cache_roundup_2(mp_ncpus * 64) - 1; + ncbuckethash = cache_roundup_2(mp_ncpus * mp_ncpus) - 1; + if (ncbuckethash < 7) /* arbitrarily chosen to avoid having one lock */ + ncbuckethash = 7; if (ncbuckethash > nchash) ncbuckethash = nchash; bucketlocks = malloc(sizeof(*bucketlocks) * numbucketlocks, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numbucketlocks; i++) rw_init_flags(&bucketlocks[i], "ncbuc", RW_DUPOK | RW_RECURSE); - ncvnodehash = cache_roundup_2(mp_ncpus * 64) - 1; + ncvnodehash = ncbuckethash; vnodelocks = malloc(sizeof(*vnodelocks) * numvnodelocks, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numvnodelocks; i++) mtx_init(&vnodelocks[i], "ncvn", NULL, MTX_DUPOK | MTX_RECURSE); - ncpurgeminvnodes = numbucketlocks; + ncpurgeminvnodes = numbucketlocks * 2; ncneghash = 3; neglists = malloc(sizeof(*neglists) * numneglists, M_VFSCACHE, From owner-svn-src-head@freebsd.org Tue Sep 10 20:19:29 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA6E9E3483; Tue, 10 Sep 2019 20:19:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Sbwd5R6xz3ybt; Tue, 10 Sep 2019 20:19:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DC892B69C; Tue, 10 Sep 2019 20:19:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AKJT89052194; Tue, 10 Sep 2019 20:19:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AKJTuO052193; Tue, 10 Sep 2019 20:19:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201909102019.x8AKJTuO052193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 10 Sep 2019 20:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352183 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 20:19:29 -0000 Author: mjg Date: Tue Sep 10 20:19:29 2019 New Revision: 352183 URL: https://svnweb.freebsd.org/changeset/base/352183 Log: cache: avoid excessive relocking on entry removal during lookup Due to lock ordering issues (bucket lock held, vnode locks wanted) the code starts with trylocking which in face of contention often fails. Prior to the change it would loop back with a possible yield. Instead note we know what locks are needed and can take them in the right order, avoiding retries. Then we can safely re-lookup and see if the entry we are looking for is still there. On a 104-way box poudriere would result in constant retries during an 11h run as seen in the vfs.cache.zap_and_exit_bucket_fail counter. before: 408866592 after : 0 However, a new stat reports: vfs.cache.zap_and_exit_bucket_relock_success: 32638 Note this is only a bandaid over current design issues. Tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Sep 10 20:19:02 2019 (r352182) +++ head/sys/kern/vfs_cache.c Tue Sep 10 20:19:29 2019 (r352183) @@ -378,6 +378,8 @@ STATNODE_COUNTER(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE_COUNTER(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); STATNODE_COUNTER(numfullpathfound, "Number of successful fullpath calls"); +STATNODE_COUNTER(zap_and_exit_bucket_relock_success, + "Number of successful removals after relocking"); static long zap_and_exit_bucket_fail; STATNODE_ULONG(zap_and_exit_bucket_fail, "Number of times zap_and_exit failed to lock"); static long zap_and_exit_bucket_fail2; STATNODE_ULONG(zap_and_exit_bucket_fail2, @@ -526,6 +528,19 @@ cache_trylock_vnodes(struct mtx *vlp1, struct mtx *vlp } static void +cache_lock_vnodes(struct mtx *vlp1, struct mtx *vlp2) +{ + + MPASS(vlp1 != NULL || vlp2 != NULL); + MPASS(vlp1 <= vlp2); + + if (vlp1 != NULL) + mtx_lock(vlp1); + if (vlp2 != NULL) + mtx_lock(vlp2); +} + +static void cache_unlock_vnodes(struct mtx *vlp1, struct mtx *vlp2) { @@ -992,10 +1007,47 @@ out: return (error); } +/* + * If trylocking failed we can get here. We know enough to take all needed locks + * in the right order and re-lookup the entry. + */ static int -cache_zap_wlocked_bucket(struct namecache *ncp, struct rwlock *blp) +cache_zap_unlocked_bucket(struct namecache *ncp, struct componentname *cnp, + struct vnode *dvp, struct mtx *dvlp, struct mtx *vlp, uint32_t hash, + struct rwlock *blp) { + struct namecache *rncp; + + cache_assert_bucket_locked(ncp, RA_UNLOCKED); + + cache_sort_vnodes(&dvlp, &vlp); + cache_lock_vnodes(dvlp, vlp); + rw_wlock(blp); + LIST_FOREACH(rncp, (NCHHASH(hash)), nc_hash) { + if (rncp == ncp && rncp->nc_dvp == dvp && + rncp->nc_nlen == cnp->cn_namelen && + !bcmp(rncp->nc_name, cnp->cn_nameptr, rncp->nc_nlen)) + break; + } + if (rncp != NULL) { + cache_zap_locked(rncp, false); + rw_wunlock(blp); + cache_unlock_vnodes(dvlp, vlp); + counter_u64_add(zap_and_exit_bucket_relock_success, 1); + return (0); + } + + rw_wunlock(blp); + cache_unlock_vnodes(dvlp, vlp); + return (EAGAIN); +} + +static int __noinline +cache_zap_wlocked_bucket(struct namecache *ncp, struct componentname *cnp, + uint32_t hash, struct rwlock *blp) +{ struct mtx *dvlp, *vlp; + struct vnode *dvp; cache_assert_bucket_locked(ncp, RA_WLOCKED); @@ -1010,14 +1062,17 @@ cache_zap_wlocked_bucket(struct namecache *ncp, struct return (0); } + dvp = ncp->nc_dvp; rw_wunlock(blp); - return (EAGAIN); + return (cache_zap_unlocked_bucket(ncp, cnp, dvp, dvlp, vlp, hash, blp)); } -static int -cache_zap_rlocked_bucket(struct namecache *ncp, struct rwlock *blp) +static int __noinline +cache_zap_rlocked_bucket(struct namecache *ncp, struct componentname *cnp, + uint32_t hash, struct rwlock *blp) { struct mtx *dvlp, *vlp; + struct vnode *dvp; cache_assert_bucket_locked(ncp, RA_RLOCKED); @@ -1034,8 +1089,9 @@ cache_zap_rlocked_bucket(struct namecache *ncp, struct return (0); } + dvp = ncp->nc_dvp; rw_runlock(blp); - return (EAGAIN); + return (cache_zap_unlocked_bucket(ncp, cnp, dvp, dvlp, vlp, hash, blp)); } static int @@ -1197,7 +1253,7 @@ retry: goto out_no_entry; } - error = cache_zap_wlocked_bucket(ncp, blp); + error = cache_zap_wlocked_bucket(ncp, cnp, hash, blp); if (__predict_false(error != 0)) { zap_and_exit_bucket_fail++; cache_maybe_yield(); @@ -1396,7 +1452,7 @@ success: zap_and_exit: if (blp != NULL) - error = cache_zap_rlocked_bucket(ncp, blp); + error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); else error = cache_zap_locked_vnode(ncp, dvp); if (__predict_false(error != 0)) { @@ -1922,6 +1978,7 @@ nchinit(void *dummy __unused) numfullpathfail2 = counter_u64_alloc(M_WAITOK); numfullpathfail4 = counter_u64_alloc(M_WAITOK); numfullpathfound = counter_u64_alloc(M_WAITOK); + zap_and_exit_bucket_relock_success = counter_u64_alloc(M_WAITOK); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); From owner-svn-src-head@freebsd.org Tue Sep 10 20:27:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17665E386B; Tue, 10 Sep 2019 20:27:45 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46Sc686j23z40Ll; Tue, 10 Sep 2019 20:27:44 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C94722B874; Tue, 10 Sep 2019 20:27:44 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AKRi9H057919; Tue, 10 Sep 2019 20:27:44 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AKRiUS057918; Tue, 10 Sep 2019 20:27:44 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201909102027.x8AKRiUS057918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Tue, 10 Sep 2019 20:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352186 - head/lib/geom/nop X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/geom/nop X-SVN-Commit-Revision: 352186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 20:27:45 -0000 Author: oshogbo Date: Tue Sep 10 20:27:44 2019 New Revision: 352186 URL: https://svnweb.freebsd.org/changeset/base/352186 Log: gnop: Fix initial value for the wdelayprob Reported by: Chuck Silvers Modified: head/lib/geom/nop/geom_nop.c Modified: head/lib/geom/nop/geom_nop.c ============================================================================== --- head/lib/geom/nop/geom_nop.c Tue Sep 10 20:21:47 2019 (r352185) +++ head/lib/geom/nop/geom_nop.c Tue Sep 10 20:27:44 2019 (r352186) @@ -53,7 +53,7 @@ struct g_command class_commands[] = { { 's', "size", "0", G_TYPE_NUMBER }, { 'S', "secsize", "0", G_TYPE_NUMBER }, { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, - { 'x', "wdelayprob", "1", G_TYPE_NUMBER }, + { 'x', "wdelayprob", "-1", G_TYPE_NUMBER }, { 'z', "physpath", G_NOP_PHYSPATH_PASSTHROUGH, G_TYPE_STRING }, G_OPT_SENTINEL }, @@ -68,7 +68,7 @@ struct g_command class_commands[] = { { 'q', "rdelayprob", "-1", G_TYPE_NUMBER }, { 'r', "rfailprob", "-1", G_TYPE_NUMBER }, { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, - { 'x', "wdelayprob", "1", G_TYPE_NUMBER }, + { 'x', "wdelayprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, "[-v] [-d delaymsec] [-e error] [-q rdelayprob] [-r rfailprob] " From owner-svn-src-head@freebsd.org Tue Sep 10 21:08:24 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54835E4784; Tue, 10 Sep 2019 21:08:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Sd1429F6z42NG; Tue, 10 Sep 2019 21:08:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 294812BFB0; Tue, 10 Sep 2019 21:08:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AL8OTS082105; Tue, 10 Sep 2019 21:08:24 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AL8I2l082065; Tue, 10 Sep 2019 21:08:18 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201909102108.x8AL8I2l082065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 10 Sep 2019 21:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352191 - in head: . crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: . crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn... X-SVN-Commit-Revision: 352191 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 21:08:24 -0000 Author: jkim Date: Tue Sep 10 21:08:17 2019 New Revision: 352191 URL: https://svnweb.freebsd.org/changeset/base/352191 Log: Merge OpenSSL 1.1.1d. Added: head/crypto/openssl/doc/man3/CRYPTO_memcmp.pod - copied unchanged from r352163, vendor-crypto/openssl/dist/doc/man3/CRYPTO_memcmp.pod head/crypto/openssl/doc/man3/X509_cmp.pod - copied unchanged from r352163, vendor-crypto/openssl/dist/doc/man3/X509_cmp.pod head/secure/lib/libcrypto/man/CRYPTO_memcmp.3 (contents, props changed) head/secure/lib/libcrypto/man/X509_cmp.3 (contents, props changed) Deleted: head/crypto/openssl/crypto/aes/asm/aes-586.pl head/crypto/openssl/crypto/aes/asm/aes-x86_64.pl head/crypto/openssl/crypto/aes/asm/bsaes-x86_64.pl head/secure/lib/libcrypto/amd64/aes-x86_64.S head/secure/lib/libcrypto/amd64/bsaes-x86_64.S head/secure/lib/libcrypto/i386/aes-586.S Modified: head/ObsoleteFiles.inc head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/INSTALL head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/apps.h head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/dgst.c head/crypto/openssl/apps/enc.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/openssl.c head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/req.c head/crypto/openssl/apps/s_apps.h head/crypto/openssl/apps/s_cb.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/storeutl.c head/crypto/openssl/config head/crypto/openssl/crypto/aes/asm/aes-s390x.pl head/crypto/openssl/crypto/asn1/a_time.c head/crypto/openssl/crypto/asn1/a_type.c head/crypto/openssl/crypto/asn1/x_bignum.c head/crypto/openssl/crypto/bio/b_addr.c head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bio/bss_mem.c head/crypto/openssl/crypto/bn/asm/mips.pl head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/bn/bn_lcl.h head/crypto/openssl/crypto/bn/bn_lib.c head/crypto/openssl/crypto/bn/bn_prime.c head/crypto/openssl/crypto/bn/bn_rand.c head/crypto/openssl/crypto/bn/bn_sqrt.c head/crypto/openssl/crypto/cms/cms_att.c head/crypto/openssl/crypto/cms/cms_env.c head/crypto/openssl/crypto/cms/cms_err.c head/crypto/openssl/crypto/cms/cms_lcl.h head/crypto/openssl/crypto/cms/cms_sd.c head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/conf/conf_sap.c head/crypto/openssl/crypto/ctype.c head/crypto/openssl/crypto/dh/dh_check.c head/crypto/openssl/crypto/dh/dh_gen.c head/crypto/openssl/crypto/dh/dh_key.c head/crypto/openssl/crypto/dh/dh_lib.c head/crypto/openssl/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/dsa/dsa_err.c head/crypto/openssl/crypto/dsa/dsa_ossl.c head/crypto/openssl/crypto/dso/dso_dlfcn.c head/crypto/openssl/crypto/ec/asm/ecp_nistz256-sparcv9.pl head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl head/crypto/openssl/crypto/ec/asm/x25519-ppc64.pl head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_curve.c head/crypto/openssl/crypto/ec/ec_lcl.h head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/ecdh_ossl.c head/crypto/openssl/crypto/ec/ecdsa_ossl.c head/crypto/openssl/crypto/ec/ecp_nistp224.c head/crypto/openssl/crypto/ec/ecp_nistp256.c head/crypto/openssl/crypto/ec/ecp_nistp521.c head/crypto/openssl/crypto/ec/ecp_nistputil.c head/crypto/openssl/crypto/ec/ecx_meth.c head/crypto/openssl/crypto/engine/eng_devcrypto.c head/crypto/openssl/crypto/engine/eng_openssl.c head/crypto/openssl/crypto/err/err.c head/crypto/openssl/crypto/err/openssl.txt head/crypto/openssl/crypto/evp/bio_ok.c head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/e_aria.c head/crypto/openssl/crypto/evp/e_chacha20_poly1305.c head/crypto/openssl/crypto/evp/e_rc5.c head/crypto/openssl/crypto/evp/evp_err.c head/crypto/openssl/crypto/evp/evp_lib.c head/crypto/openssl/crypto/evp/m_sha3.c head/crypto/openssl/crypto/include/internal/ctype.h head/crypto/openssl/crypto/include/internal/rand_int.h head/crypto/openssl/crypto/include/internal/sm2err.h head/crypto/openssl/crypto/init.c head/crypto/openssl/crypto/lhash/lhash.c head/crypto/openssl/crypto/o_str.c head/crypto/openssl/crypto/pem/pvkfmt.c head/crypto/openssl/crypto/pkcs7/pk7_doit.c head/crypto/openssl/crypto/rand/drbg_lib.c head/crypto/openssl/crypto/rand/rand_err.c head/crypto/openssl/crypto/rand/rand_lcl.h head/crypto/openssl/crypto/rand/rand_lib.c head/crypto/openssl/crypto/rand/rand_unix.c head/crypto/openssl/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/rsa/rsa_err.c head/crypto/openssl/crypto/rsa/rsa_gen.c head/crypto/openssl/crypto/rsa/rsa_lib.c head/crypto/openssl/crypto/rsa/rsa_ossl.c head/crypto/openssl/crypto/s390xcap.c head/crypto/openssl/crypto/sha/asm/keccak1600-armv4.pl head/crypto/openssl/crypto/sha/asm/keccak1600-armv8.pl head/crypto/openssl/crypto/sha/asm/sha512-sparcv9.pl head/crypto/openssl/crypto/sm2/sm2_sign.c head/crypto/openssl/crypto/store/loader_file.c head/crypto/openssl/crypto/store/store_lib.c head/crypto/openssl/crypto/threads_none.c head/crypto/openssl/crypto/threads_pthread.c head/crypto/openssl/crypto/ui/ui_lib.c head/crypto/openssl/crypto/ui/ui_openssl.c head/crypto/openssl/crypto/uid.c head/crypto/openssl/crypto/whrlpool/wp_block.c head/crypto/openssl/crypto/x509/by_dir.c head/crypto/openssl/crypto/x509/t_req.c head/crypto/openssl/crypto/x509/x509_att.c head/crypto/openssl/crypto/x509/x509_cmp.c head/crypto/openssl/crypto/x509/x509_err.c head/crypto/openssl/crypto/x509/x509_lu.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/doc/HOWTO/proxy_certificates.txt head/crypto/openssl/doc/man1/engine.pod head/crypto/openssl/doc/man1/errstr.pod head/crypto/openssl/doc/man1/pkcs12.pod head/crypto/openssl/doc/man1/pkeyparam.pod head/crypto/openssl/doc/man1/s_client.pod head/crypto/openssl/doc/man1/s_server.pod head/crypto/openssl/doc/man3/ADMISSIONS.pod head/crypto/openssl/doc/man3/ASYNC_start_job.pod head/crypto/openssl/doc/man3/BIO_connect.pod head/crypto/openssl/doc/man3/BIO_f_ssl.pod head/crypto/openssl/doc/man3/BIO_find_type.pod head/crypto/openssl/doc/man3/BIO_new.pod head/crypto/openssl/doc/man3/BIO_s_accept.pod head/crypto/openssl/doc/man3/BIO_s_bio.pod head/crypto/openssl/doc/man3/BIO_s_connect.pod head/crypto/openssl/doc/man3/BIO_s_fd.pod head/crypto/openssl/doc/man3/BIO_s_mem.pod head/crypto/openssl/doc/man3/BIO_set_callback.pod head/crypto/openssl/doc/man3/BN_generate_prime.pod head/crypto/openssl/doc/man3/BN_mod_mul_montgomery.pod head/crypto/openssl/doc/man3/BN_new.pod head/crypto/openssl/doc/man3/CMS_final.pod head/crypto/openssl/doc/man3/CRYPTO_THREAD_run_once.pod head/crypto/openssl/doc/man3/DES_random_key.pod head/crypto/openssl/doc/man3/DSA_generate_key.pod head/crypto/openssl/doc/man3/DSA_sign.pod head/crypto/openssl/doc/man3/ECDSA_SIG_new.pod head/crypto/openssl/doc/man3/EVP_DigestInit.pod head/crypto/openssl/doc/man3/EVP_DigestSignInit.pod head/crypto/openssl/doc/man3/EVP_DigestVerifyInit.pod head/crypto/openssl/doc/man3/EVP_PKEY_CTX_set_hkdf_md.pod head/crypto/openssl/doc/man3/EVP_PKEY_CTX_set_tls1_prf_md.pod head/crypto/openssl/doc/man3/EVP_PKEY_decrypt.pod head/crypto/openssl/doc/man3/EVP_PKEY_derive.pod head/crypto/openssl/doc/man3/EVP_PKEY_encrypt.pod head/crypto/openssl/doc/man3/EVP_PKEY_sign.pod head/crypto/openssl/doc/man3/EVP_PKEY_verify.pod head/crypto/openssl/doc/man3/EVP_PKEY_verify_recover.pod head/crypto/openssl/doc/man3/EVP_SealInit.pod head/crypto/openssl/doc/man3/EVP_SignInit.pod head/crypto/openssl/doc/man3/EVP_VerifyInit.pod head/crypto/openssl/doc/man3/EVP_aria.pod head/crypto/openssl/doc/man3/EVP_md5.pod head/crypto/openssl/doc/man3/EVP_rc5_32_12_16_cbc.pod head/crypto/openssl/doc/man3/OCSP_REQUEST_new.pod head/crypto/openssl/doc/man3/OPENSSL_fork_prepare.pod head/crypto/openssl/doc/man3/OSSL_STORE_LOADER.pod head/crypto/openssl/doc/man3/OSSL_STORE_expect.pod head/crypto/openssl/doc/man3/PKCS12_newpass.pod head/crypto/openssl/doc/man3/RAND_DRBG_set_callbacks.pod head/crypto/openssl/doc/man3/RAND_set_rand_method.pod head/crypto/openssl/doc/man3/RSA_blinding_on.pod head/crypto/openssl/doc/man3/RSA_generate_key.pod head/crypto/openssl/doc/man3/RSA_padding_add_PKCS1_type_1.pod head/crypto/openssl/doc/man3/RSA_public_encrypt.pod head/crypto/openssl/doc/man3/RSA_sign_ASN1_OCTET_STRING.pod head/crypto/openssl/doc/man3/SSL_CTX_config.pod head/crypto/openssl/doc/man3/SSL_CTX_dane_enable.pod head/crypto/openssl/doc/man3/SSL_CTX_get0_param.pod head/crypto/openssl/doc/man3/SSL_CTX_new.pod head/crypto/openssl/doc/man3/SSL_CTX_set_cipher_list.pod head/crypto/openssl/doc/man3/SSL_CTX_set_generate_session_id.pod head/crypto/openssl/doc/man3/SSL_CTX_set_session_id_context.pod head/crypto/openssl/doc/man3/SSL_CTX_set_verify.pod head/crypto/openssl/doc/man3/SSL_SESSION_get0_hostname.pod head/crypto/openssl/doc/man3/SSL_get_error.pod head/crypto/openssl/doc/man3/SSL_library_init.pod head/crypto/openssl/doc/man3/SSL_set1_host.pod head/crypto/openssl/doc/man3/SSL_write.pod head/crypto/openssl/doc/man3/X509_STORE_CTX_get_error.pod head/crypto/openssl/doc/man3/X509_STORE_CTX_set_verify_cb.pod head/crypto/openssl/doc/man3/X509_STORE_add_cert.pod head/crypto/openssl/doc/man3/X509_STORE_new.pod head/crypto/openssl/doc/man3/X509_VERIFY_PARAM_set_flags.pod head/crypto/openssl/doc/man3/X509_get_extension_flags.pod head/crypto/openssl/doc/man3/d2i_X509.pod head/crypto/openssl/doc/man5/x509v3_config.pod head/crypto/openssl/doc/man7/Ed25519.pod head/crypto/openssl/doc/man7/RAND.pod head/crypto/openssl/doc/man7/SM2.pod head/crypto/openssl/doc/man7/X25519.pod head/crypto/openssl/doc/man7/bio.pod head/crypto/openssl/doc/man7/scrypt.pod head/crypto/openssl/e_os.h head/crypto/openssl/engines/build.info head/crypto/openssl/engines/e_afalg.c head/crypto/openssl/include/internal/constant_time_locl.h head/crypto/openssl/include/internal/cryptlib.h head/crypto/openssl/include/internal/dsoerr.h head/crypto/openssl/include/internal/refcount.h head/crypto/openssl/include/internal/thread_once.h head/crypto/openssl/include/internal/tsan_assist.h head/crypto/openssl/include/openssl/asn1err.h head/crypto/openssl/include/openssl/asyncerr.h head/crypto/openssl/include/openssl/bio.h head/crypto/openssl/include/openssl/bioerr.h head/crypto/openssl/include/openssl/bnerr.h head/crypto/openssl/include/openssl/buffererr.h head/crypto/openssl/include/openssl/cms.h head/crypto/openssl/include/openssl/cmserr.h head/crypto/openssl/include/openssl/comperr.h head/crypto/openssl/include/openssl/conferr.h head/crypto/openssl/include/openssl/cryptoerr.h head/crypto/openssl/include/openssl/cterr.h head/crypto/openssl/include/openssl/dherr.h head/crypto/openssl/include/openssl/dsaerr.h head/crypto/openssl/include/openssl/ec.h head/crypto/openssl/include/openssl/ecerr.h head/crypto/openssl/include/openssl/engineerr.h head/crypto/openssl/include/openssl/evp.h head/crypto/openssl/include/openssl/evperr.h head/crypto/openssl/include/openssl/kdferr.h head/crypto/openssl/include/openssl/objectserr.h head/crypto/openssl/include/openssl/ocsperr.h head/crypto/openssl/include/openssl/opensslv.h head/crypto/openssl/include/openssl/pemerr.h head/crypto/openssl/include/openssl/pkcs12err.h head/crypto/openssl/include/openssl/pkcs7err.h head/crypto/openssl/include/openssl/randerr.h head/crypto/openssl/include/openssl/rsaerr.h head/crypto/openssl/include/openssl/ssl.h head/crypto/openssl/include/openssl/sslerr.h head/crypto/openssl/include/openssl/store.h head/crypto/openssl/include/openssl/storeerr.h head/crypto/openssl/include/openssl/tls1.h head/crypto/openssl/include/openssl/tserr.h head/crypto/openssl/include/openssl/uierr.h head/crypto/openssl/include/openssl/x509err.h head/crypto/openssl/include/openssl/x509v3.h head/crypto/openssl/include/openssl/x509v3err.h head/crypto/openssl/ssl/d1_msg.c head/crypto/openssl/ssl/record/rec_layer_s3.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/ssl_cert.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/statem/extensions.c head/crypto/openssl/ssl/statem/extensions_clnt.c head/crypto/openssl/ssl/statem/extensions_srvr.c head/crypto/openssl/ssl/statem/statem_clnt.c head/crypto/openssl/ssl/statem/statem_lib.c head/crypto/openssl/ssl/statem/statem_srvr.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/tls13_enc.c head/secure/lib/libcrypto/Makefile head/secure/lib/libcrypto/Makefile.asm head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/Version.map head/secure/lib/libcrypto/aarch64/keccak1600-armv8.S head/secure/lib/libcrypto/arm/keccak1600-armv4.S head/secure/lib/libcrypto/man/ADMISSIONS.3 head/secure/lib/libcrypto/man/ASN1_INTEGER_get_int64.3 head/secure/lib/libcrypto/man/ASN1_ITEM_lookup.3 head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_TYPE_get.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/ASYNC_WAIT_CTX_new.3 head/secure/lib/libcrypto/man/ASYNC_start_job.3 head/secure/lib/libcrypto/man/BF_encrypt.3 head/secure/lib/libcrypto/man/BIO_ADDR.3 head/secure/lib/libcrypto/man/BIO_ADDRINFO.3 head/secure/lib/libcrypto/man/BIO_connect.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_get_data.3 head/secure/lib/libcrypto/man/BIO_get_ex_new_index.3 head/secure/lib/libcrypto/man/BIO_meth_new.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_parse_hostserv.3 head/secure/lib/libcrypto/man/BIO_printf.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_security_bits.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/BUF_MEM_new.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_THREAD_run_once.3 head/secure/lib/libcrypto/man/CRYPTO_get_ex_new_index.3 head/secure/lib/libcrypto/man/CTLOG_STORE_get0_log_by_id.3 head/secure/lib/libcrypto/man/CTLOG_STORE_new.3 head/secure/lib/libcrypto/man/CTLOG_new.3 head/secure/lib/libcrypto/man/CT_POLICY_EVAL_CTX_new.3 head/secure/lib/libcrypto/man/DEFINE_STACK_OF.3 head/secure/lib/libcrypto/man/DES_random_key.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get0_pqg.3 head/secure/lib/libcrypto/man/DH_get_1024_160.3 head/secure/lib/libcrypto/man/DH_meth_new.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_new_by_nid.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get0_pqg.3 head/secure/lib/libcrypto/man/DSA_meth_new.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/DTLS_get_data_mtu.3 head/secure/lib/libcrypto/man/DTLS_set_timer_cb.3 head/secure/lib/libcrypto/man/DTLSv1_listen.3 head/secure/lib/libcrypto/man/ECDSA_SIG_new.3 head/secure/lib/libcrypto/man/ECPKParameters_print.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_get_enc_flags.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ENGINE_add.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_CIPHER_CTX_get_cipher_data.3 head/secure/lib/libcrypto/man/EVP_CIPHER_meth_new.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_MD_meth_new.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_ASN1_METHOD.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_set1_pbe_pass.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_set_hkdf_md.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_set_scrypt_N.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_set_tls1_prf_md.3 head/secure/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest_nid.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_meth_get_count.3 head/secure/lib/libcrypto/man/EVP_PKEY_meth_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/EVP_aes.3 head/secure/lib/libcrypto/man/EVP_aria.3 head/secure/lib/libcrypto/man/EVP_bf_cbc.3 head/secure/lib/libcrypto/man/EVP_blake2b512.3 head/secure/lib/libcrypto/man/EVP_camellia.3 head/secure/lib/libcrypto/man/EVP_cast5_cbc.3 head/secure/lib/libcrypto/man/EVP_chacha20.3 head/secure/lib/libcrypto/man/EVP_des.3 head/secure/lib/libcrypto/man/EVP_desx_cbc.3 head/secure/lib/libcrypto/man/EVP_idea_cbc.3 head/secure/lib/libcrypto/man/EVP_md2.3 head/secure/lib/libcrypto/man/EVP_md4.3 head/secure/lib/libcrypto/man/EVP_md5.3 head/secure/lib/libcrypto/man/EVP_mdc2.3 head/secure/lib/libcrypto/man/EVP_rc2_cbc.3 head/secure/lib/libcrypto/man/EVP_rc4.3 head/secure/lib/libcrypto/man/EVP_rc5_32_12_16_cbc.3 head/secure/lib/libcrypto/man/EVP_ripemd160.3 head/secure/lib/libcrypto/man/EVP_seed_cbc.3 head/secure/lib/libcrypto/man/EVP_sha1.3 head/secure/lib/libcrypto/man/EVP_sha224.3 head/secure/lib/libcrypto/man/EVP_sha3_224.3 head/secure/lib/libcrypto/man/EVP_sm3.3 head/secure/lib/libcrypto/man/EVP_sm4_cbc.3 head/secure/lib/libcrypto/man/EVP_whirlpool.3 head/secure/lib/libcrypto/man/HMAC.3 head/secure/lib/libcrypto/man/MD5.3 head/secure/lib/libcrypto/man/MDC2_Init.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OCSP_REQUEST_new.3 head/secure/lib/libcrypto/man/OCSP_cert_to_id.3 head/secure/lib/libcrypto/man/OCSP_request_add1_nonce.3 head/secure/lib/libcrypto/man/OCSP_resp_find_status.3 head/secure/lib/libcrypto/man/OCSP_response_status.3 head/secure/lib/libcrypto/man/OCSP_sendreq_new.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_LH_COMPFUNC.3 head/secure/lib/libcrypto/man/OPENSSL_LH_stats.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_fork_prepare.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_init_crypto.3 head/secure/lib/libcrypto/man/OPENSSL_init_ssl.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OPENSSL_malloc.3 head/secure/lib/libcrypto/man/OPENSSL_secure_malloc.3 head/secure/lib/libcrypto/man/OSSL_STORE_INFO.3 head/secure/lib/libcrypto/man/OSSL_STORE_LOADER.3 head/secure/lib/libcrypto/man/OSSL_STORE_SEARCH.3 head/secure/lib/libcrypto/man/OSSL_STORE_expect.3 head/secure/lib/libcrypto/man/OSSL_STORE_open.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_bytes_read_bio.3 head/secure/lib/libcrypto/man/PEM_read.3 head/secure/lib/libcrypto/man/PEM_read_CMS.3 head/secure/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 head/secure/lib/libcrypto/man/PEM_read_bio_ex.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_newpass.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS5_PBKDF2_HMAC.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_DRBG_generate.3 head/secure/lib/libcrypto/man/RAND_DRBG_get0_master.3 head/secure/lib/libcrypto/man/RAND_DRBG_new.3 head/secure/lib/libcrypto/man/RAND_DRBG_reseed.3 head/secure/lib/libcrypto/man/RAND_DRBG_set_callbacks.3 head/secure/lib/libcrypto/man/RAND_DRBG_set_ex_data.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RC4_set_key.3 head/secure/lib/libcrypto/man/RIPEMD160_Init.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get0_key.3 head/secure/lib/libcrypto/man/RSA_meth_new.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SCT_new.3 head/secure/lib/libcrypto/man/SCT_print.3 head/secure/lib/libcrypto/man/SCT_validate.3 head/secure/lib/libcrypto/man/SHA256_Init.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/SSL_CIPHER_get_name.3 head/secure/lib/libcrypto/man/SSL_COMP_add_compression_method.3 head/secure/lib/libcrypto/man/SSL_CONF_CTX_new.3 head/secure/lib/libcrypto/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libcrypto/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libcrypto/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libcrypto/man/SSL_CONF_cmd.3 head/secure/lib/libcrypto/man/SSL_CONF_cmd_argv.3 head/secure/lib/libcrypto/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libcrypto/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libcrypto/man/SSL_CTX_add_session.3 head/secure/lib/libcrypto/man/SSL_CTX_config.3 head/secure/lib/libcrypto/man/SSL_CTX_ctrl.3 head/secure/lib/libcrypto/man/SSL_CTX_dane_enable.3 head/secure/lib/libcrypto/man/SSL_CTX_flush_sessions.3 head/secure/lib/libcrypto/man/SSL_CTX_free.3 head/secure/lib/libcrypto/man/SSL_CTX_get0_param.3 head/secure/lib/libcrypto/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libcrypto/man/SSL_CTX_has_client_custom_ext.3 head/secure/lib/libcrypto/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libcrypto/man/SSL_CTX_new.3 head/secure/lib/libcrypto/man/SSL_CTX_sess_number.3 head/secure/lib/libcrypto/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libcrypto/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_sessions.3 head/secure/lib/libcrypto/man/SSL_CTX_set0_CA_list.3 head/secure/lib/libcrypto/man/SSL_CTX_set1_curves.3 head/secure/lib/libcrypto/man/SSL_CTX_set1_sigalgs.3 head/secure/lib/libcrypto/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libcrypto/man/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_cert_store.3 head/secure/lib/libcrypto/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libcrypto/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_client_hello_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_ct_validation_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_ctlog_list_file.3 head/secure/lib/libcrypto/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_ex_data.3 head/secure/lib/libcrypto/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libcrypto/man/SSL_CTX_set_info_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_keylog_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libcrypto/man/SSL_CTX_set_min_proto_version.3 head/secure/lib/libcrypto/man/SSL_CTX_set_mode.3 head/secure/lib/libcrypto/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_num_tickets.3 head/secure/lib/libcrypto/man/SSL_CTX_set_options.3 head/secure/lib/libcrypto/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libcrypto/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libcrypto/man/SSL_CTX_set_record_padding_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_security_level.3 head/secure/lib/libcrypto/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libcrypto/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libcrypto/man/SSL_CTX_set_session_ticket_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_split_send_fragment.3 head/secure/lib/libcrypto/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libcrypto/man/SSL_CTX_set_stateless_cookie_generate_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_timeout.3 head/secure/lib/libcrypto/man/SSL_CTX_set_tlsext_servername_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libcrypto/man/SSL_CTX_set_tlsext_use_srtp.3 head/secure/lib/libcrypto/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libcrypto/man/SSL_CTX_set_verify.3 head/secure/lib/libcrypto/man/SSL_CTX_use_certificate.3 head/secure/lib/libcrypto/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libcrypto/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libcrypto/man/SSL_SESSION_free.3 head/secure/lib/libcrypto/man/SSL_SESSION_get0_cipher.3 head/secure/lib/libcrypto/man/SSL_SESSION_get0_hostname.3 head/secure/lib/libcrypto/man/SSL_SESSION_get0_id_context.3 head/secure/lib/libcrypto/man/SSL_SESSION_get0_peer.3 head/secure/lib/libcrypto/man/SSL_SESSION_get_compress_id.3 head/secure/lib/libcrypto/man/SSL_SESSION_get_ex_data.3 head/secure/lib/libcrypto/man/SSL_SESSION_get_protocol_version.3 head/secure/lib/libcrypto/man/SSL_SESSION_get_time.3 head/secure/lib/libcrypto/man/SSL_SESSION_has_ticket.3 head/secure/lib/libcrypto/man/SSL_SESSION_is_resumable.3 head/secure/lib/libcrypto/man/SSL_SESSION_print.3 head/secure/lib/libcrypto/man/SSL_SESSION_set1_id.3 head/secure/lib/libcrypto/man/SSL_accept.3 head/secure/lib/libcrypto/man/SSL_alert_type_string.3 head/secure/lib/libcrypto/man/SSL_alloc_buffers.3 head/secure/lib/libcrypto/man/SSL_check_chain.3 head/secure/lib/libcrypto/man/SSL_clear.3 head/secure/lib/libcrypto/man/SSL_connect.3 head/secure/lib/libcrypto/man/SSL_do_handshake.3 head/secure/lib/libcrypto/man/SSL_export_keying_material.3 head/secure/lib/libcrypto/man/SSL_extension_supported.3 head/secure/lib/libcrypto/man/SSL_free.3 head/secure/lib/libcrypto/man/SSL_get0_peer_scts.3 head/secure/lib/libcrypto/man/SSL_get_SSL_CTX.3 head/secure/lib/libcrypto/man/SSL_get_all_async_fds.3 head/secure/lib/libcrypto/man/SSL_get_ciphers.3 head/secure/lib/libcrypto/man/SSL_get_client_random.3 head/secure/lib/libcrypto/man/SSL_get_current_cipher.3 head/secure/lib/libcrypto/man/SSL_get_default_timeout.3 head/secure/lib/libcrypto/man/SSL_get_error.3 head/secure/lib/libcrypto/man/SSL_get_extms_support.3 head/secure/lib/libcrypto/man/SSL_get_fd.3 head/secure/lib/libcrypto/man/SSL_get_peer_cert_chain.3 head/secure/lib/libcrypto/man/SSL_get_peer_certificate.3 head/secure/lib/libcrypto/man/SSL_get_peer_signature_nid.3 head/secure/lib/libcrypto/man/SSL_get_peer_tmp_key.3 head/secure/lib/libcrypto/man/SSL_get_psk_identity.3 head/secure/lib/libcrypto/man/SSL_get_rbio.3 head/secure/lib/libcrypto/man/SSL_get_session.3 head/secure/lib/libcrypto/man/SSL_get_shared_sigalgs.3 head/secure/lib/libcrypto/man/SSL_get_verify_result.3 head/secure/lib/libcrypto/man/SSL_get_version.3 head/secure/lib/libcrypto/man/SSL_in_init.3 head/secure/lib/libcrypto/man/SSL_key_update.3 head/secure/lib/libcrypto/man/SSL_library_init.3 head/secure/lib/libcrypto/man/SSL_load_client_CA_file.3 head/secure/lib/libcrypto/man/SSL_new.3 head/secure/lib/libcrypto/man/SSL_pending.3 head/secure/lib/libcrypto/man/SSL_read.3 head/secure/lib/libcrypto/man/SSL_read_early_data.3 head/secure/lib/libcrypto/man/SSL_rstate_string.3 head/secure/lib/libcrypto/man/SSL_session_reused.3 head/secure/lib/libcrypto/man/SSL_set1_host.3 head/secure/lib/libcrypto/man/SSL_set_bio.3 head/secure/lib/libcrypto/man/SSL_set_connect_state.3 head/secure/lib/libcrypto/man/SSL_set_fd.3 head/secure/lib/libcrypto/man/SSL_set_session.3 head/secure/lib/libcrypto/man/SSL_set_shutdown.3 head/secure/lib/libcrypto/man/SSL_set_verify_result.3 head/secure/lib/libcrypto/man/SSL_shutdown.3 head/secure/lib/libcrypto/man/SSL_state_string.3 head/secure/lib/libcrypto/man/SSL_want.3 head/secure/lib/libcrypto/man/SSL_write.3 head/secure/lib/libcrypto/man/UI_STRING.3 head/secure/lib/libcrypto/man/UI_UTIL_read_pw.3 head/secure/lib/libcrypto/man/UI_create_method.3 head/secure/lib/libcrypto/man/UI_new.3 head/secure/lib/libcrypto/man/X509V3_get_d2i.3 head/secure/lib/libcrypto/man/X509_ALGOR_dup.3 head/secure/lib/libcrypto/man/X509_CRL_get0_by_serial.3 head/secure/lib/libcrypto/man/X509_EXTENSION_set_object.3 head/secure/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 head/secure/lib/libcrypto/man/X509_LOOKUP_meth_new.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get0_der.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_PUBKEY_new.3 head/secure/lib/libcrypto/man/X509_SIG_get0.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_add_cert.3 head/secure/lib/libcrypto/man/X509_STORE_get0_param.3 head/secure/lib/libcrypto/man/X509_STORE_new.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_ca.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_check_issued.3 head/secure/lib/libcrypto/man/X509_check_private_key.3 head/secure/lib/libcrypto/man/X509_cmp_time.3 head/secure/lib/libcrypto/man/X509_digest.3 head/secure/lib/libcrypto/man/X509_dup.3 head/secure/lib/libcrypto/man/X509_get0_notBefore.3 head/secure/lib/libcrypto/man/X509_get0_signature.3 head/secure/lib/libcrypto/man/X509_get0_uids.3 head/secure/lib/libcrypto/man/X509_get_extension_flags.3 head/secure/lib/libcrypto/man/X509_get_pubkey.3 head/secure/lib/libcrypto/man/X509_get_serialNumber.3 head/secure/lib/libcrypto/man/X509_get_subject_name.3 head/secure/lib/libcrypto/man/X509_get_version.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_sign.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/X509v3_get_ext_by_NID.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey_bio.3 head/secure/lib/libcrypto/man/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/d2i_SSL_SESSION.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/i2d_re_X509_tbs.3 head/secure/lib/libcrypto/man/o2i_SCT_LIST.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/engine.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/list.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/prime.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/srp.1 head/secure/usr.bin/openssl/man/storeutl.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Sep 10 20:55:47 2019 (r352190) +++ head/ObsoleteFiles.inc Tue Sep 10 21:08:17 2019 (r352191) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20190910: OpenSSL 1.1.1d +OLD_FILES+=usr/share/openssl/man/man3/d2i_ECDSA_SIG.3.gz +OLD_FILES+=usr/share/openssl/man/man3/i2d_ECDSA_SIG.3.gz # 20190910: mklocale(1) and colldef(1) removed OLD_FILES+=usr/bin/mklocale OLD_FILES+=usr/share/man/man1/mklocale.1.gz Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/CHANGES Tue Sep 10 21:08:17 2019 (r352191) @@ -7,6 +7,101 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1c and 1.1.1d [10 Sep 2019] + + *) Fixed a fork protection issue. OpenSSL 1.1.1 introduced a rewritten random + number generator (RNG). This was intended to include protection in the + event of a fork() system call in order to ensure that the parent and child + processes did not share the same RNG state. However this protection was not + being used in the default case. + + A partial mitigation for this issue is that the output from a high + precision timer is mixed into the RNG state so the likelihood of a parent + and child process sharing state is significantly reduced. + + If an application already calls OPENSSL_init_crypto() explicitly using + OPENSSL_INIT_ATFORK then this problem does not occur at all. + (CVE-2019-1549) + [Matthias St. Pierre] + + *) For built-in EC curves, ensure an EC_GROUP built from the curve name is + used even when parsing explicit parameters, when loading a serialized key + or calling `EC_GROUP_new_from_ecpkparameters()`/ + `EC_GROUP_new_from_ecparameters()`. + This prevents bypass of security hardening and performance gains, + especially for curves with specialized EC_METHODs. + By default, if a key encoded with explicit parameters is loaded and later + serialized, the output is still encoded with explicit parameters, even if + internally a "named" EC_GROUP is used for computation. + [Nicola Tuveri] + + *) Compute ECC cofactors if not provided during EC_GROUP construction. Before + this change, EC_GROUP_set_generator would accept order and/or cofactor as + NULL. After this change, only the cofactor parameter can be NULL. It also + does some minimal sanity checks on the passed order. + (CVE-2019-1547) + [Billy Bob Brumley] + + *) Fixed a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey. + An attack is simple, if the first CMS_recipientInfo is valid but the + second CMS_recipientInfo is chosen ciphertext. If the second + recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct + encryption key will be replaced by garbage, and the message cannot be + decoded, but if the RSA decryption fails, the correct encryption key is + used and the recipient will not notice the attack. + As a work around for this potential attack the length of the decrypted + key must be equal to the cipher default key length, in case the + certifiate is not given and all recipientInfo are tried out. + The old behaviour can be re-enabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag. + (CVE-2019-1563) + [Bernd Edlinger] + + *) Early start up entropy quality from the DEVRANDOM seed source has been + improved for older Linux systems. The RAND subsystem will wait for + /dev/random to be producing output before seeding from /dev/urandom. + The seeded state is stored for future library initialisations using + a system global shared memory segment. The shared memory identifier + can be configured by defining OPENSSL_RAND_SEED_DEVRANDOM_SHM_ID to + the desired value. The default identifier is 114. + [Paul Dale] + + *) Correct the extended master secret constant on EBCDIC systems. Without this + fix TLS connections between an EBCDIC system and a non-EBCDIC system that + negotiate EMS will fail. Unfortunately this also means that TLS connections + between EBCDIC systems with this fix, and EBCDIC systems without this + fix will fail if they negotiate EMS. + [Matt Caswell] + + *) Use Windows installation paths in the mingw builds + + Mingw isn't a POSIX environment per se, which means that Windows + paths should be used for installation. + (CVE-2019-1552) + [Richard Levitte] + + *) Changed DH_check to accept parameters with order q and 2q subgroups. + With order 2q subgroups the bit 0 of the private key is not secret + but DH_generate_key works around that by clearing bit 0 of the + private key for those. This avoids leaking bit 0 of the private key. + [Bernd Edlinger] + + *) Significantly reduce secure memory usage by the randomness pools. + [Paul Dale] + + *) Revert the DEVRANDOM_WAIT feature for Linux systems + + The DEVRANDOM_WAIT feature added a select() call to wait for the + /dev/random device to become readable before reading from the + /dev/urandom device. + + It turned out that this change had negative side effects on + performance which were not acceptable. After some discussion it + was decided to revert this feature and leave it up to the OS + resp. the platform maintainer to ensure a proper initialization + during early boot time. + [Matthias St. Pierre] + Changes between 1.1.1b and 1.1.1c [28 May 2019] *) Add build tests for C++. These are generated files that only do one @@ -75,6 +170,16 @@ (CVE-2019-1543) [Matt Caswell] + *) Add DEVRANDOM_WAIT feature for Linux systems + + On older Linux systems where the getrandom() system call is not available, + OpenSSL normally uses the /dev/urandom device for seeding its CSPRNG. + Contrary to getrandom(), the /dev/urandom device will not block during + early boot when the kernel CSPRNG has not been seeded yet. + + To mitigate this known weakness, use select() to wait for /dev/random to + become readable before reading from /dev/urandom. + *) Ensure that SM2 only uses SM3 as digest algorithm [Paul Yang] @@ -322,7 +427,7 @@ SSL_set_ciphersuites() [Matt Caswell] - *) Memory allocation failures consistenly add an error to the error + *) Memory allocation failures consistently add an error to the error stack. [Rich Salz] @@ -6860,7 +6965,7 @@ reason texts, thereby removing some of the footprint that may not be interesting if those errors aren't displayed anyway. - NOTE: it's still possible for any application or module to have it's + NOTE: it's still possible for any application or module to have its own set of error texts inserted. The routines are there, just not used by default when no-err is given. [Richard Levitte] @@ -8826,7 +8931,7 @@ des-cbc 3624.96k 5258.21k 5530.91k Changes between 0.9.6g and 0.9.6h [5 Dec 2002] *) New function OPENSSL_cleanse(), which is used to cleanse a section of - memory from it's contents. This is done with a counter that will + memory from its contents. This is done with a counter that will place alternating values in each byte. This can be used to solve two issues: 1) the removal of calls to memset() by highly optimizing compilers, and 2) cleansing with other values than 0, since those can Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/Configure Tue Sep 10 21:08:17 2019 (r352191) @@ -87,9 +87,6 @@ my $usage="Usage: Configure [no- ...] [enable- # linked openssl executable has rather debugging value than # production quality. # -# DEBUG_SAFESTACK use type-safe stacks to enforce type-safety on stack items -# provided to stack calls. Generates unique stack functions for -# each possible stack type. # BN_LLONG use the type 'long long' in crypto/bn/bn.h # RC4_CHAR use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h # Following are set automatically by this script @@ -145,13 +142,13 @@ my @gcc_devteam_warn = qw( # -Wunused-macros -- no, too tricky for BN and _XOPEN_SOURCE etc # -Wextended-offsetof -- no, needed in CMS ASN1 code my @clang_devteam_warn = qw( + -Wno-unknown-warning-option -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Wincompatible-pointer-types-discards-qualifiers - -Wno-unknown-warning-option -Wmissing-variable-declarations ); Modified: head/crypto/openssl/INSTALL ============================================================================== --- head/crypto/openssl/INSTALL Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/INSTALL Tue Sep 10 21:08:17 2019 (r352191) @@ -98,6 +98,9 @@ $ nmake test $ nmake install + Note that in order to perform the install step above you need to have + appropriate permissions to write to the installation directory. + If any of these steps fails, see section Installation in Detail below. This will build and install OpenSSL in the default location, which is: @@ -107,6 +110,12 @@ OpenSSL version number with underscores instead of periods. Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL + The installation directory should be appropriately protected to ensure + unprivileged users cannot make changes to OpenSSL binaries or files, or install + engines. If you already have a pre-installed version of OpenSSL as part of + your Operating System it is recommended that you do not overwrite the system + version and instead install to somewhere else. + If you want to install it anywhere else, run config like this: On Unix: @@ -135,7 +144,10 @@ Don't build with support for deprecated APIs below the specified version number. For example "--api=1.1.0" will remove support for all APIS that were deprecated in OpenSSL - version 1.1.0 or below. + version 1.1.0 or below. This is a rather specialized option + for developers. If you just intend to remove all deprecated + APIs entirely (up to the current version), it is easier + to add the 'no-deprecated' option instead (see below). --cross-compile-prefix=PREFIX The PREFIX to include in front of commands for your @@ -229,7 +241,7 @@ source exists. getrandom: Use the L or equivalent system call. - devrandom: Use the the first device from the DEVRANDOM list + devrandom: Use the first device from the DEVRANDOM list which can be opened to read random bytes. The DEVRANDOM preprocessor constant expands to "/dev/urandom","/dev/random","/dev/srandom" on @@ -908,8 +920,11 @@ $ mms install ! OpenVMS $ nmake install # Windows - This will install all the software components in this directory - tree under PREFIX (the directory given with --prefix or its + Note that in order to perform the install step above you need to have + appropriate permissions to write to the installation directory. + + The above commands will install all the software components in this + directory tree under PREFIX (the directory given with --prefix or its default): Unix: @@ -964,6 +979,12 @@ private Initially empty, this is the default location for private key files. misc Various scripts. + + The installation directory should be appropriately protected to ensure + unprivileged users cannot make changes to OpenSSL binaries or files, or + install engines. If you already have a pre-installed version of OpenSSL as + part of your Operating System it is recommended that you do not overwrite + the system version and instead install to somewhere else. Package builders who want to configure the library for standard locations, but have the package installed somewhere else so that Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/NEWS Tue Sep 10 21:08:17 2019 (r352191) @@ -5,6 +5,23 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1c and OpenSSL 1.1.1d [10 Sep 2019] + + o Fixed a fork protection issue (CVE-2019-1549) + o Fixed a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey + (CVE-2019-1563) + o For built-in EC curves, ensure an EC_GROUP built from the curve name is + used even when parsing explicit parameters + o Compute ECC cofactors if not provided during EC_GROUP construction + (CVE-2019-1547) + o Early start up entropy quality from the DEVRANDOM seed source has been + improved for older Linux systems + o Correct the extended master secret constant on EBCDIC systems + o Use Windows installation paths in the mingw builds (CVE-2019-1552) + o Changed DH_check to accept parameters with order q and 2q subgroups + o Significantly reduce secure memory usage by the randomness pools + o Revert the DEVRANDOM_WAIT feature for Linux systems + Major changes between OpenSSL 1.1.1b and OpenSSL 1.1.1c [28 May 2019] o Prevent over long nonces in ChaCha20-Poly1305 (CVE-2019-1543) @@ -601,7 +618,7 @@ Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]: - o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build. + o Give EVP_MAX_MD_SIZE its old value, except for a FIPS build. Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]: Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/README Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1c 28 May 2019 + OpenSSL 1.1.1d 10 Sep 2019 Copyright (c) 1998-2019 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/apps.c ============================================================================== --- head/crypto/openssl/apps/apps.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/apps.c Tue Sep 10 21:08:17 2019 (r352191) @@ -40,12 +40,19 @@ #endif #include #include -#include "s_apps.h" #include "apps.h" #ifdef _WIN32 static int WIN32_rename(const char *from, const char *to); # define rename(from,to) WIN32_rename((from),(to)) +#endif + +#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) +# include +#endif + +#if defined(OPENSSL_SYS_MSDOS) && !defined(_WIN32) +# define _kbhit kbhit #endif typedef struct { Modified: head/crypto/openssl/apps/apps.h ============================================================================== --- head/crypto/openssl/apps/apps.h Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/apps.h Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -444,11 +444,9 @@ void destroy_ui_method(void); const UI_METHOD *get_ui_method(void); int chopup_args(ARGS *arg, char *buf); -# ifdef HEADER_X509_H int dump_cert_text(BIO *out, X509 *x); void print_name(BIO *out, const char *title, X509_NAME *nm, unsigned long lflags); -# endif void print_bignum_var(BIO *, const BIGNUM *, const char*, int, unsigned char *); void print_array(BIO *, const char *, int, const unsigned char *); Modified: head/crypto/openssl/apps/ca.c ============================================================================== --- head/crypto/openssl/apps/ca.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/ca.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -722,7 +722,7 @@ end_of_options: /*****************************************************************/ if (req || gencrl) { - if (spkac_file != NULL) { + if (spkac_file != NULL && outfile != NULL) { output_der = 1; batch = 1; } Modified: head/crypto/openssl/apps/dgst.c ============================================================================== --- head/crypto/openssl/apps/dgst.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/dgst.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -421,7 +421,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int s size_t len; int i; - for (;;) { + while (BIO_pending(bp) || !BIO_eof(bp)) { i = BIO_read(bp, (char *)buf, BUFSIZE); if (i < 0) { BIO_printf(bio_err, "Read Error in %s\n", file); Modified: head/crypto/openssl/apps/enc.c ============================================================================== --- head/crypto/openssl/apps/enc.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/enc.c Tue Sep 10 21:08:17 2019 (r352191) @@ -586,7 +586,7 @@ int enc_main(int argc, char **argv) if (benc != NULL) wbio = BIO_push(benc, wbio); - for (;;) { + while (BIO_pending(rbio) || !BIO_eof(rbio)) { inl = BIO_read(rbio, (char *)buff, bsize); if (inl <= 0) break; Modified: head/crypto/openssl/apps/ocsp.c ============================================================================== --- head/crypto/openssl/apps/ocsp.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/ocsp.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1416,9 +1416,11 @@ static int do_responder(OCSP_REQUEST **preq, BIO **pcb *q = '\0'; /* - * Skip "GET / HTTP..." requests often used by load-balancers + * Skip "GET / HTTP..." requests often used by load-balancers. Note: + * 'p' was incremented above to point to the first byte *after* the + * leading slash, so with 'GET / ' it is now an empty string. */ - if (p[1] == '\0') + if (p[0] == '\0') goto out; len = urldecode(p); Modified: head/crypto/openssl/apps/openssl.c ============================================================================== --- head/crypto/openssl/apps/openssl.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/openssl.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -22,7 +22,6 @@ # include #endif #include -#include "s_apps.h" /* Needed to get the other O_xxx flags. */ #ifdef OPENSSL_SYS_VMS # include Modified: head/crypto/openssl/apps/pkcs12.c ============================================================================== --- head/crypto/openssl/apps/pkcs12.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/pkcs12.c Tue Sep 10 21:08:17 2019 (r352191) @@ -838,7 +838,7 @@ static int alg_print(const X509_ALGOR *alg) goto done; } BIO_printf(bio_err, ", Salt length: %d, Cost(N): %ld, " - "Block size(r): %ld, Paralelizm(p): %ld", + "Block size(r): %ld, Parallelism(p): %ld", ASN1_STRING_length(kdf->salt), ASN1_INTEGER_get(kdf->costParameter), ASN1_INTEGER_get(kdf->blockSize), Modified: head/crypto/openssl/apps/req.c ============================================================================== --- head/crypto/openssl/apps/req.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/req.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -881,9 +881,19 @@ int req_main(int argc, char **argv) if (text) { if (x509) - X509_print_ex(out, x509ss, get_nameopt(), reqflag); + ret = X509_print_ex(out, x509ss, get_nameopt(), reqflag); else - X509_REQ_print_ex(out, req, get_nameopt(), reqflag); + ret = X509_REQ_print_ex(out, req, get_nameopt(), reqflag); + + if (ret == 0) { + if (x509) + BIO_printf(bio_err, "Error printing certificate\n"); + else + BIO_printf(bio_err, "Error printing certificate request\n"); + + ERR_print_errors(bio_err); + goto end; + } } if (subject) { Modified: head/crypto/openssl/apps/s_apps.h ============================================================================== --- head/crypto/openssl/apps/s_apps.h Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/s_apps.h Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,14 +9,8 @@ #include -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) -# include -#endif +#include -#if defined(OPENSSL_SYS_MSDOS) && !defined(_WIN32) -# define _kbhit kbhit -#endif - #define PORT "4433" #define PROTOCOL "tcp" @@ -24,17 +18,15 @@ typedef int (*do_server_cb)(int s, int stype, int prot int do_server(int *accept_sock, const char *host, const char *port, int family, int type, int protocol, do_server_cb cb, unsigned char *context, int naccept, BIO *bio_s_out); -#ifdef HEADER_X509_H + int verify_callback(int ok, X509_STORE_CTX *ctx); -#endif -#ifdef HEADER_SSL_H + int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file); int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key, STACK_OF(X509) *chain, int build_chain); int ssl_print_sigalgs(BIO *out, SSL *s); int ssl_print_point_formats(BIO *out, SSL *s); int ssl_print_groups(BIO *out, SSL *s, int noshared); -#endif int ssl_print_tmp_key(BIO *out, SSL *s); int init_client(int *sock, const char *host, const char *port, const char *bindhost, const char *bindport, @@ -44,13 +36,11 @@ int should_retry(int i); long bio_dump_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); -#ifdef HEADER_SSL_H void apps_ssl_info_callback(const SSL *s, int where, int ret); void msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); void tlsext_cb(SSL *s, int client_server, int type, const unsigned char *data, int len, void *arg); -#endif int generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len); @@ -75,7 +65,6 @@ int args_excert(int option, SSL_EXCERT **pexc); int load_excert(SSL_EXCERT **pexc); void print_verify_detail(SSL *s, BIO *bio); void print_ssl_summary(SSL *s); -#ifdef HEADER_SSL_H int config_ctx(SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, SSL_CTX *ctx); int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls, int crl_download); @@ -86,4 +75,3 @@ int ssl_load_stores(SSL_CTX *ctx, const char *vfyCApat void ssl_ctx_security_debug(SSL_CTX *ctx, int verbose); int set_keylog_file(SSL_CTX *ctx, const char *keylog_file); void print_ca_names(BIO *bio, SSL *s); -#endif Modified: head/crypto/openssl/apps/s_cb.c ============================================================================== --- head/crypto/openssl/apps/s_cb.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/s_cb.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1525,7 +1525,8 @@ void print_ca_names(BIO *bio, SSL *s) int i; if (sk == NULL || sk_X509_NAME_num(sk) == 0) { - BIO_printf(bio, "---\nNo %s certificate CA names sent\n", cs); + if (!SSL_is_server(s)) + BIO_printf(bio, "---\nNo %s certificate CA names sent\n", cs); return; } Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/s_client.c Tue Sep 10 21:08:17 2019 (r352191) @@ -2345,7 +2345,7 @@ int s_client_main(int argc, char **argv) (void)BIO_flush(fbio); /* * The first line is the HTTP response. According to RFC 7230, - * it's formated exactly like this: + * it's formatted exactly like this: * * HTTP/d.d ddd Reason text\r\n */ Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/speed.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1790,7 +1790,7 @@ int speed_main(int argc, char **argv) } buflen = lengths[size_num - 1]; - if (buflen < 36) /* size of random vector in RSA bencmark */ + if (buflen < 36) /* size of random vector in RSA benchmark */ buflen = 36; buflen += MAX_MISALIGNMENT + 1; loopargs[i].buf_malloc = app_malloc(buflen, "input buffer"); Modified: head/crypto/openssl/apps/storeutl.c ============================================================================== --- head/crypto/openssl/apps/storeutl.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/apps/storeutl.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -125,7 +125,7 @@ int storeutl_main(int argc, char *argv[]) } /* * If expected wasn't set at this point, it means the map - * isn't syncronised with the possible options leading here. + * isn't synchronised with the possible options leading here. */ OPENSSL_assert(expected != 0); } Modified: head/crypto/openssl/config ============================================================================== --- head/crypto/openssl/config Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/config Tue Sep 10 21:08:17 2019 (r352191) @@ -498,12 +498,12 @@ case "$GUESSOS" in OUT="darwin64-x86_64-cc" fi ;; armv6+7-*-iphoneos) - __CNF_CFLAGS="$__CNF_CFLAGS -arch%20armv6 -arch%20armv7" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch%20armv6 -arch%20armv7" + __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" + __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" OUT="iphoneos-cross" ;; *-*-iphoneos) - __CNF_CFLAGS="$__CNF_CFLAGS -arch%20${MACHINE}" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch%20${MACHINE}" + __CNF_CFLAGS="$__CNF_CFLAGS -arch ${MACHINE}" + __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch ${MACHINE}" OUT="iphoneos-cross" ;; arm64-*-iphoneos|*-*-ios64) OUT="ios64-cross" ;; Modified: head/crypto/openssl/crypto/aes/asm/aes-s390x.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aes-s390x.pl Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/aes/asm/aes-s390x.pl Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -38,14 +38,14 @@ # Implement AES_set_[en|de]crypt_key. Key schedule setup is avoided # for 128-bit keys, if hardware support is detected. -# Januray 2009. +# January 2009. # # Add support for hardware AES192/256 and reschedule instructions to # minimize/avoid Address Generation Interlock hazard and to favour # dual-issue z10 pipeline. This gave ~25% improvement on z10 and # almost 50% on z9. The gain is smaller on z10, because being dual- # issue z10 makes it impossible to eliminate the interlock condition: -# critial path is not long enough. Yet it spends ~24 cycles per byte +# critical path is not long enough. Yet it spends ~24 cycles per byte # processed with 128-bit key. # # Unlike previous version hardware support detection takes place only Modified: head/crypto/openssl/crypto/asn1/a_time.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_time.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/asn1/a_time.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -67,7 +67,7 @@ static void determine_days(struct tm *tm) } c = y / 100; y %= 100; - /* Zeller's congruance */ + /* Zeller's congruence */ tm->tm_wday = (d + (13 * m) / 5 + y + y / 4 + c / 4 + 5 * c + 6) % 7; } @@ -79,7 +79,11 @@ int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) char *a; int n, i, i2, l, o, min_l = 11, strict = 0, end = 6, btz = 5, md; struct tm tmp; - +#if defined(CHARSET_EBCDIC) + const char upper_z = 0x5A, num_zero = 0x30, period = 0x2E, minus = 0x2D, plus = 0x2B; +#else + const char upper_z = 'Z', num_zero = '0', period = '.', minus = '-', plus = '+'; +#endif /* * ASN1_STRING_FLAG_X509_TIME is used to enforce RFC 5280 * time string format, in which: @@ -120,20 +124,20 @@ int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) if (l < min_l) goto err; for (i = 0; i < end; i++) { - if (!strict && (i == btz) && ((a[o] == 'Z') || (a[o] == '+') || (a[o] == '-'))) { + if (!strict && (i == btz) && ((a[o] == upper_z) || (a[o] == plus) || (a[o] == minus))) { i++; break; } - if (!ossl_isdigit(a[o])) + if (!ascii_isdigit(a[o])) goto err; - n = a[o] - '0'; + n = a[o] - num_zero; /* incomplete 2-digital number */ if (++o == l) goto err; - if (!ossl_isdigit(a[o])) + if (!ascii_isdigit(a[o])) goto err; - n = (n * 10) + a[o] - '0'; + n = (n * 10) + a[o] - num_zero; /* no more bytes to read, but we haven't seen time-zone yet */ if (++o == l) goto err; @@ -185,14 +189,14 @@ int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) * Optional fractional seconds: decimal point followed by one or more * digits. */ - if (d->type == V_ASN1_GENERALIZEDTIME && a[o] == '.') { + if (d->type == V_ASN1_GENERALIZEDTIME && a[o] == period) { if (strict) /* RFC 5280 forbids fractional seconds */ goto err; if (++o == l) goto err; i = o; - while ((o < l) && ossl_isdigit(a[o])) + while ((o < l) && ascii_isdigit(a[o])) o++; /* Must have at least one digit after decimal point */ if (i == o) @@ -207,10 +211,10 @@ int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) * 'o' can point to '\0' is either the subsequent if or the first * else if is true. */ - if (a[o] == 'Z') { + if (a[o] == upper_z) { o++; - } else if (!strict && ((a[o] == '+') || (a[o] == '-'))) { - int offsign = a[o] == '-' ? 1 : -1; + } else if (!strict && ((a[o] == plus) || (a[o] == minus))) { + int offsign = a[o] == minus ? 1 : -1; int offset = 0; o++; @@ -223,13 +227,13 @@ int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) if (o + 4 != l) goto err; for (i = end; i < end + 2; i++) { - if (!ossl_isdigit(a[o])) + if (!ascii_isdigit(a[o])) goto err; - n = a[o] - '0'; + n = a[o] - num_zero; o++; - if (!ossl_isdigit(a[o])) + if (!ascii_isdigit(a[o])) goto err; - n = (n * 10) + a[o] - '0'; + n = (n * 10) + a[o] - num_zero; i2 = (d->type == V_ASN1_UTCTIME) ? i + 1 : i; if ((n < min[i2]) || (n > max[i2])) goto err; @@ -300,7 +304,7 @@ ASN1_TIME *asn1_time_from_tm(ASN1_TIME *s, struct tm * ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec); -#ifdef CHARSET_EBCDIC_not +#ifdef CHARSET_EBCDIC ebcdic2ascii(tmps->data, tmps->data, tmps->length); #endif return tmps; @@ -467,6 +471,7 @@ int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) char *v; int gmt = 0, l; struct tm stm; + const char upper_z = 0x5A, period = 0x2E; if (!asn1_time_to_tm(&stm, tm)) { /* asn1_time_to_tm will check the time type */ @@ -475,7 +480,7 @@ int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) l = tm->length; v = (char *)tm->data; - if (v[l - 1] == 'Z') + if (v[l - 1] == upper_z) gmt = 1; if (tm->type == V_ASN1_GENERALIZEDTIME) { @@ -486,10 +491,10 @@ int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) * Try to parse fractional seconds. '14' is the place of * 'fraction point' in a GeneralizedTime string. */ - if (tm->length > 15 && v[14] == '.') { + if (tm->length > 15 && v[14] == period) { f = &v[14]; f_len = 1; - while (14 + f_len < l && ossl_isdigit(f[f_len])) + while (14 + f_len < l && ascii_isdigit(f[f_len])) ++f_len; } Modified: head/crypto/openssl/crypto/asn1/a_type.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_type.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/asn1/a_type.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -15,7 +15,9 @@ int ASN1_TYPE_get(const ASN1_TYPE *a) { - if ((a->value.ptr != NULL) || (a->type == V_ASN1_NULL)) + if (a->type == V_ASN1_BOOLEAN + || a->type == V_ASN1_NULL + || a->value.ptr != NULL) return a->type; else return 0; @@ -23,7 +25,9 @@ int ASN1_TYPE_get(const ASN1_TYPE *a) void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value) { - if (a->value.ptr != NULL) { + if (a->type != V_ASN1_BOOLEAN + && a->type != V_ASN1_NULL + && a->value.ptr != NULL) { ASN1_TYPE **tmp_a = &a; asn1_primitive_free((ASN1_VALUE **)tmp_a, NULL, 0); } Modified: head/crypto/openssl/crypto/asn1/x_bignum.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_bignum.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/asn1/x_bignum.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -130,9 +130,20 @@ static int bn_c2i(ASN1_VALUE **pval, const unsigned ch static int bn_secure_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) { - if (!*pval) - bn_secure_new(pval, it); - return bn_c2i(pval, cont, len, utype, free_cont, it); + int ret; + BIGNUM *bn; + + if (!*pval && !bn_secure_new(pval, it)) + return 0; + + ret = bn_c2i(pval, cont, len, utype, free_cont, it); + if (!ret) + return 0; + + /* Set constant-time flag for all secure BIGNUMS */ + bn = (BIGNUM *)*pval; + BN_set_flags(bn, BN_FLG_CONSTTIME); + return ret; } static int bn_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, Modified: head/crypto/openssl/crypto/bio/b_addr.c ============================================================================== --- head/crypto/openssl/crypto/bio/b_addr.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/bio/b_addr.c Tue Sep 10 21:08:17 2019 (r352191) @@ -675,7 +675,7 @@ int BIO_lookup_ex(const char *host, const char *servic if (1) { #ifdef AI_PASSIVE - int gai_ret = 0; + int gai_ret = 0, old_ret = 0; struct addrinfo hints; memset(&hints, 0, sizeof(hints)); @@ -683,12 +683,12 @@ int BIO_lookup_ex(const char *host, const char *servic hints.ai_family = family; hints.ai_socktype = socktype; hints.ai_protocol = protocol; -#ifdef AI_ADDRCONFIG -#ifdef AF_UNSPEC +# ifdef AI_ADDRCONFIG +# ifdef AF_UNSPEC if (family == AF_UNSPEC) -#endif +# endif hints.ai_flags |= AI_ADDRCONFIG; -#endif +# endif if (lookup_type == BIO_LOOKUP_SERVER) hints.ai_flags |= AI_PASSIVE; @@ -696,6 +696,7 @@ int BIO_lookup_ex(const char *host, const char *servic /* Note that |res| SHOULD be a 'struct addrinfo **' thanks to * macro magic in bio_lcl.h */ + retry: switch ((gai_ret = getaddrinfo(host, service, &hints, res))) { # ifdef EAI_SYSTEM case EAI_SYSTEM: @@ -703,12 +704,25 @@ int BIO_lookup_ex(const char *host, const char *servic BIOerr(BIO_F_BIO_LOOKUP_EX, ERR_R_SYS_LIB); break; # endif +# ifdef EAI_MEMORY + case EAI_MEMORY: + BIOerr(BIO_F_BIO_LOOKUP_EX, ERR_R_MALLOC_FAILURE); + break; +# endif case 0: ret = 1; /* Success */ break; default: +# if defined(AI_ADDRCONFIG) && defined(AI_NUMERICHOST) + if (hints.ai_flags & AI_ADDRCONFIG) { + hints.ai_flags &= ~AI_ADDRCONFIG; + hints.ai_flags |= AI_NUMERICHOST; + old_ret = gai_ret; + goto retry; + } +# endif BIOerr(BIO_F_BIO_LOOKUP_EX, ERR_R_SYS_LIB); - ERR_add_error_data(1, gai_strerror(gai_ret)); + ERR_add_error_data(1, gai_strerror(old_ret ? old_ret : gai_ret)); break; } } else { Modified: head/crypto/openssl/crypto/bio/bss_dgram.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_dgram.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/bio/bss_dgram.c Tue Sep 10 21:08:17 2019 (r352191) @@ -1,5 +1,5 @@ /* - * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2005-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -784,7 +784,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void * reasons. When BIO_CTRL_DGRAM_SET_PEEK_MODE was first defined its value * was incorrectly clashing with BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE. The * value has been updated to a non-clashing value. However to preserve - * binary compatiblity we now respond to both the old value and the new one + * binary compatibility we now respond to both the old value and the new one */ case BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE: case BIO_CTRL_DGRAM_SET_PEEK_MODE: Modified: head/crypto/openssl/crypto/bio/bss_file.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_file.c Tue Sep 10 20:55:47 2019 (r352190) +++ head/crypto/openssl/crypto/bio/bss_file.c Tue Sep 10 21:08:17 2019 (r352191) @@ -7,10 +7,7 @@ * https://www.openssl.org/source/license.html */ -#ifndef HEADER_BSS_FILE_C -# define HEADER_BSS_FILE_C - -# if defined(__linux) || defined(__sun) || defined(__hpux) +#if defined(__linux) || defined(__sun) || defined(__hpux) /* * Following definition aliases fopen to fopen64 on above mentioned * platforms. This makes it possible to open and sequentially access files @@ -23,17 +20,17 @@ * of 32-bit platforms which allow for sequential access of large files * without extra "magic" comprise *BSD, Darwin, IRIX... */ -# ifndef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 64 -# endif +# ifndef _FILE_OFFSET_BITS +# define _FILE_OFFSET_BITS 64 # endif +#endif -# include -# include -# include "bio_lcl.h" -# include +#include +#include +#include "bio_lcl.h" +#include -# if !defined(OPENSSL_NO_STDIO) +#if !defined(OPENSSL_NO_STDIO) static int file_write(BIO *h, const char *buf, int num); static int file_read(BIO *h, char *buf, int size); @@ -72,9 +69,9 @@ BIO *BIO_new_file(const char *filename, const char *mo SYSerr(SYS_F_FOPEN, get_last_sys_error()); ERR_add_error_data(5, "fopen('", filename, "','", mode, "')"); if (errno == ENOENT -# ifdef ENXIO +#ifdef ENXIO || errno == ENXIO -# endif +#endif ) BIOerr(BIO_F_BIO_NEW_FILE, BIO_R_NO_SUCH_FILE); else @@ -212,33 +209,33 @@ static long file_ctrl(BIO *b, int cmd, long num, void b->shutdown = (int)num & BIO_CLOSE; b->ptr = ptr; b->init = 1; -# if BIO_FLAGS_UPLINK!=0 -# if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES) -# define _IOB_ENTRIES 20 -# endif +# if BIO_FLAGS_UPLINK!=0 +# if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES) +# define _IOB_ENTRIES 20 +# endif /* Safety net to catch purely internal BIO_set_fp calls */ -# if defined(_MSC_VER) && _MSC_VER>=1900 +# if defined(_MSC_VER) && _MSC_VER>=1900 if (ptr == stdin || ptr == stdout || ptr == stderr) BIO_clear_flags(b, BIO_FLAGS_UPLINK); -# elif defined(_IOB_ENTRIES) +# elif defined(_IOB_ENTRIES) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Sep 10 21:30:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E00B6E5297; Tue, 10 Sep 2019 21:30:38 +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 46SdVk5gDDz43fH; Tue, 10 Sep 2019 21:30:38 +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 A6D342C364; Tue, 10 Sep 2019 21:30:38 +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 x8ALUcdM094706; Tue, 10 Sep 2019 21:30:38 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8ALUc93094699; Tue, 10 Sep 2019 21:30:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909102130.x8ALUc93094699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 10 Sep 2019 21:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352194 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 352194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 21:30:38 -0000 Author: kevans Date: Tue Sep 10 21:30:38 2019 New Revision: 352194 URL: https://svnweb.freebsd.org/changeset/base/352194 Log: lualoader: Revert to ASCII menu frame for serial console The box drawing characters we use aren't necessarily safe with a serial console; for instance, in the report by npn@, these were causing his xterm to send back a sequence that lua picked up as input and halted the boot. This is less than ideal. Fallback to ASCII frames for console with 'comconsole' in it. This is a partial revert r338108 by imp@ -- instead of removing the menu entirely and disabling color/cursor sequences, just reverting the default frame to ASCII is enough to not break in this setup. Reported by: npn Triaged and recommended by: tsoome Modified: head/stand/lua/core.lua head/stand/lua/drawer.lua Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Tue Sep 10 21:14:56 2019 (r352193) +++ head/stand/lua/core.lua Tue Sep 10 21:30:38 2019 (r352194) @@ -325,6 +325,16 @@ function core.isZFSBoot() return false end +function core.isSerialConsole() + local c = loader.getenv("console") + if c ~= nil then + if c:find("comconsole") ~= nil then + return true + end + end + return false +end + function core.isSerialBoot() local s = loader.getenv("boot_serial") if s ~= nil then Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Tue Sep 10 21:14:56 2019 (r352193) +++ head/stand/lua/drawer.lua Tue Sep 10 21:30:38 2019 (r352194) @@ -144,13 +144,20 @@ local function drawmenu(menudef) return alias_table end +local function defaultframe() + if core.isSerialConsole() then + return "ascii" + end + return "double" +end + local function drawbox() local x = menu_position.x - 3 local y = menu_position.y - 1 local w = frame_size.w local h = frame_size.h - local framestyle = loader.getenv("loader_menu_frame") or "double" + local framestyle = loader.getenv("loader_menu_frame") or defaultframe() local framespec = drawer.frame_styles[framestyle] -- If we don't have a framespec for the current frame style, just don't -- draw a box. From owner-svn-src-head@freebsd.org Tue Sep 10 21:53:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA0BCE5D18; Tue, 10 Sep 2019 21:53:43 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Sf1M43DJz455R; Tue, 10 Sep 2019 21:53:43 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E2B02C8B9; Tue, 10 Sep 2019 21:53:43 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8ALrhCs012275; Tue, 10 Sep 2019 21:53:43 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8ALrhPU012273; Tue, 10 Sep 2019 21:53:43 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201909102153.x8ALrhPU012273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 10 Sep 2019 21:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352195 - in head/stand/i386: libi386 loader X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand/i386: libi386 loader X-SVN-Commit-Revision: 352195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 21:53:43 -0000 Author: tsoome Date: Tue Sep 10 21:53:42 2019 New Revision: 352195 URL: https://svnweb.freebsd.org/changeset/base/352195 Log: loader: vidconsole should set LINES and COLUMNS Set LINES and COLUMNS based on terminal dimensions. Modified: head/stand/i386/libi386/vidconsole.c head/stand/i386/loader/main.c Modified: head/stand/i386/libi386/vidconsole.c ============================================================================== --- head/stand/i386/libi386/vidconsole.c Tue Sep 10 21:30:38 2019 (r352194) +++ head/stand/i386/libi386/vidconsole.c Tue Sep 10 21:53:42 2019 (r352195) @@ -574,6 +574,7 @@ vidc_init(int arg) { const teken_attr_t *a; int val; + char env[8]; if (vidc_started && arg == 0) return (0); @@ -605,6 +606,11 @@ vidc_init(int arg) teken_init(&teken, &tf, NULL); teken_set_winsize(&teken, &tp); a = teken_get_defattr(&teken); + + snprintf(env, sizeof (env), "%u", tp.tp_row); + setenv("LINES", env, 1); + snprintf(env, sizeof (env), "%u", tp.tp_col); + setenv("COLUMNS", env, 1); for (int row = 0; row < tp.tp_row; row++) for (int col = 0; col < tp.tp_col; col++) { Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Tue Sep 10 21:30:38 2019 (r352194) +++ head/stand/i386/loader/main.c Tue Sep 10 21:53:42 2019 (r352195) @@ -238,7 +238,6 @@ main(void) printf("\n%s", bootprog_info); extract_currdev(); /* set $currdev and $loaddev */ - setenv("LINES", "24", 1); /* optional */ bios_getsmap(); From owner-svn-src-head@freebsd.org Tue Sep 10 22:08:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 584FEE6018; Tue, 10 Sep 2019 22:08:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46SfLW1f8Sz45bn; Tue, 10 Sep 2019 22:08:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BF3D2CA77; Tue, 10 Sep 2019 22:08:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AM8YfP018428; Tue, 10 Sep 2019 22:08:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AM8YUP018427; Tue, 10 Sep 2019 22:08:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201909102208.x8AM8YUP018427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 10 Sep 2019 22:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352196 - head/sys/arm/ti/am335x X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/ti/am335x X-SVN-Commit-Revision: 352196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 22:08:35 -0000 Author: ian Date: Tue Sep 10 22:08:34 2019 New Revision: 352196 URL: https://svnweb.freebsd.org/changeset/base/352196 Log: In am335x_dmtpps, use a spin mutex to interlock between PPS capture and PPS ioctl(2) handling. This allows doing the pps_event() work in the polling routine, instead of using a taskqueue task to do that work. Also, add PNPINFO, and switch to using make_dev_s() to create the cdev. Using a spin mutex and calling pps_event() from the polling function works around the situation which requires more than 2 sets of timecounter timehands in a single-core system to get reliable PPS capture. That problem would happen when a single-core system is idle in cpu_idle() then gets woken up with an event timer event which was scheduled to handle a hardclock tick. That processing path would end up calling tc_windup 3 or 4 times between when the tc polling function was called and when the taskqueue task would eventually run, and with only two sets of timehands, the th_generation count would always be too old to allow the captured PPS data to be used. Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtpps.c Tue Sep 10 21:53:42 2019 (r352195) +++ head/sys/arm/ti/am335x/am335x_dmtpps.c Tue Sep 10 22:08:34 2019 (r352196) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -79,7 +78,6 @@ struct dmtpps_softc { uint32_t tclr; /* Cached TCLR register. */ struct timecounter tc; int pps_curmode; /* Edge mode now set in hw. */ - struct task pps_task; /* For pps_event handling. */ struct cdev * pps_cdev; struct pps_state pps_state; struct mtx pps_mtx; @@ -93,6 +91,7 @@ static struct ofw_compat_data compat_data[] = { {"ti,am335x-timer-1ms", 1}, {NULL, 0}, }; +SIMPLEBUS_PNP_INFO(compat_data); /* * A table relating pad names to the hardware timer number they can be mux'd to. @@ -285,48 +284,29 @@ dmtpps_poll(struct timecounter *tc) * populates it from the current DMT_TCRR register) with the latched * value from the TCAR1 register. * - * There is no locking here, by design. pps_capture() writes into an - * area of struct pps_state which is read only by pps_event(). The - * synchronization of access to that area is temporal rather than - * interlock based... we write in this routine and trigger the task that - * will read the data, so no simultaneous access can occur. - * * Note that we don't have the TCAR interrupt enabled, but the hardware * still provides the status bits in the "RAW" status register even when * they're masked from generating an irq. However, when clearing the * TCAR status to re-arm the capture for the next second, we have to * write to the IRQ status register, not the RAW register. Quirky. + * + * We do not need to hold a lock while capturing the pps data, because + * it is captured into an area of the pps_state struct which is read + * only by pps_event(). We do need to hold a lock while calling + * pps_event(), because it manipulates data which is also accessed from + * the ioctl(2) context by userland processes. */ if (DMTIMER_READ4(sc, DMT_IRQSTATUS_RAW) & DMT_IRQ_TCAR) { pps_capture(&sc->pps_state); sc->pps_state.capcount = DMTIMER_READ4(sc, DMT_TCAR1); DMTIMER_WRITE4(sc, DMT_IRQSTATUS, DMT_IRQ_TCAR); - taskqueue_enqueue(taskqueue_fast, &sc->pps_task); + + mtx_lock_spin(&sc->pps_mtx); + pps_event(&sc->pps_state, PPS_CAPTUREASSERT); + mtx_unlock_spin(&sc->pps_mtx); } } -static void -dmtpps_event(void *arg, int pending) -{ - struct dmtpps_softc *sc; - - sc = arg; - - /* This is the task function that gets enqueued by poll_pps. Once the - * time has been captured by the timecounter polling code which runs in - * primary interrupt context, the remaining (more expensive) work to - * process the event is done later in a threaded context. - * - * Here there is an interlock that protects the event data in struct - * pps_state. That data can be accessed at any time from userland via - * ioctl() calls so we must ensure that there is no read access to - * partially updated data while pps_event() does its work. - */ - mtx_lock(&sc->pps_mtx); - pps_event(&sc->pps_state, PPS_CAPTUREASSERT); - mtx_unlock(&sc->pps_mtx); -} - static int dmtpps_open(struct cdev *dev, int flags, int fmt, struct thread *td) @@ -374,9 +354,9 @@ dmtpps_ioctl(struct cdev *dev, u_long cmd, caddr_t dat sc = dev->si_drv1; /* Let the kernel do the heavy lifting for ioctl. */ - mtx_lock(&sc->pps_mtx); + mtx_lock_spin(&sc->pps_mtx); err = pps_ioctl(cmd, data, &sc->pps_state); - mtx_unlock(&sc->pps_mtx); + mtx_unlock_spin(&sc->pps_mtx); if (err != 0) return (err); @@ -436,6 +416,7 @@ static int dmtpps_attach(device_t dev) { struct dmtpps_softc *sc; + struct make_dev_args mda; clk_ident_t timer_id; int err, sysclk_freq; @@ -502,22 +483,27 @@ dmtpps_attach(device_t dev) * now, just say we can only capture assert events (the positive-going * edge of the pulse). */ - mtx_init(&sc->pps_mtx, "dmtpps", NULL, MTX_DEF); + mtx_init(&sc->pps_mtx, "dmtpps", NULL, MTX_SPIN); + sc->pps_state.flags = PPSFLAG_MTX_SPIN; sc->pps_state.ppscap = PPS_CAPTUREASSERT; sc->pps_state.driver_abi = PPS_ABI_VERSION; sc->pps_state.driver_mtx = &sc->pps_mtx; pps_init_abi(&sc->pps_state); - /* - * Init the task that does deferred pps_event() processing after - * the polling routine has captured a pps pulse time. - */ - TASK_INIT(&sc->pps_task, 0, dmtpps_event, sc); - /* Create the PPS cdev. */ - sc->pps_cdev = make_dev(&dmtpps_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - PPS_CDEV_NAME); - sc->pps_cdev->si_drv1 = sc; + make_dev_args_init(&mda); + mda.mda_flags = MAKEDEV_WAITOK; + mda.mda_devsw = &dmtpps_cdevsw; + mda.mda_cr = NULL; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_WHEEL; + mda.mda_mode = 0600; + mda.mda_unit = device_get_unit(dev); + mda.mda_si_drv1 = sc; + if ((err = make_dev_s(&mda, &sc->pps_cdev, PPS_CDEV_NAME)) != 0) { + device_printf(dev, "Failed to create cdev %s\n", PPS_CDEV_NAME); + return (err); + } if (bootverbose) device_printf(sc->dev, "Using %s for PPS device /dev/%s\n", From owner-svn-src-head@freebsd.org Tue Sep 10 22:24:42 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0A2CE6835; Tue, 10 Sep 2019 22:24:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Sfj65ctwz46jB; Tue, 10 Sep 2019 22:24:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A42DD2CDFD; Tue, 10 Sep 2019 22:24:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AMOgZR030155; Tue, 10 Sep 2019 22:24:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AMOgd9030154; Tue, 10 Sep 2019 22:24:42 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201909102224.x8AMOgd9030154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 10 Sep 2019 22:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352197 - head X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 352197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 22:24:42 -0000 Author: jkim Date: Tue Sep 10 22:24:42 2019 New Revision: 352197 URL: https://svnweb.freebsd.org/changeset/base/352197 Log: Remove unnecessary entries from the previous commit. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Sep 10 22:08:34 2019 (r352196) +++ head/ObsoleteFiles.inc Tue Sep 10 22:24:42 2019 (r352197) @@ -38,9 +38,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20190910: OpenSSL 1.1.1d -OLD_FILES+=usr/share/openssl/man/man3/d2i_ECDSA_SIG.3.gz -OLD_FILES+=usr/share/openssl/man/man3/i2d_ECDSA_SIG.3.gz # 20190910: mklocale(1) and colldef(1) removed OLD_FILES+=usr/bin/mklocale OLD_FILES+=usr/share/man/man1/mklocale.1.gz From owner-svn-src-head@freebsd.org Tue Sep 10 22:44:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5579E6E41; Tue, 10 Sep 2019 22:44:10 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46Sg7Z3sw2z47Yn; Tue, 10 Sep 2019 22:44:10 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 682352D172; Tue, 10 Sep 2019 22:44:10 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8AMiAh8041720; Tue, 10 Sep 2019 22:44:10 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8AMiAol041719; Tue, 10 Sep 2019 22:44:10 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201909102244.x8AMiAol041719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Tue, 10 Sep 2019 22:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352199 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: jgh X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 352199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 22:44:10 -0000 Author: jgh (doc,ports committer) Date: Tue Sep 10 22:44:09 2019 New Revision: 352199 URL: https://svnweb.freebsd.org/changeset/base/352199 Log: - fix a minor typo PR: 240447 Submitted by: brigadir15@gmail.com MFC after: 1 week Modified: head/share/man/man7/security.7 Modified: head/share/man/man7/security.7 ============================================================================== --- head/share/man/man7/security.7 Tue Sep 10 22:26:31 2019 (r352198) +++ head/share/man/man7/security.7 Tue Sep 10 22:44:09 2019 (r352199) @@ -1016,7 +1016,7 @@ hardware information leak. amd64. Controls the mitigation of L1 Terminal Fault in bhyve hypervisor. .It Dv kern.elf32.aslr.enable -Controls system-global Address Space Layour Randomization (ASLR) for +Controls system-global Address Space Layout Randomization (ASLR) for normal non-PIE (Position Independent Executable) 32bit binaries. See also .Xr proccontrol 1 From owner-svn-src-head@freebsd.org Tue Sep 10 23:51:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65D32E83B1; Tue, 10 Sep 2019 23:51:47 +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 46Shdb25cbz4B4M; Tue, 10 Sep 2019 23:51:47 +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 2C70D2DC91; Tue, 10 Sep 2019 23:51:47 +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 x8ANplJa079702; Tue, 10 Sep 2019 23:51:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8ANplJv079701; Tue, 10 Sep 2019 23:51:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909102351.x8ANplJv079701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 10 Sep 2019 23:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352200 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 352200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2019 23:51:47 -0000 Author: mav Date: Tue Sep 10 23:51:46 2019 New Revision: 352200 URL: https://svnweb.freebsd.org/changeset/base/352200 Log: Remove struct ata_res_pass16, unneeded after r352082. MFC after: 4 days Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Sep 10 22:44:09 2019 (r352199) +++ head/sbin/camcontrol/camcontrol.c Tue Sep 10 23:51:46 2019 (r352200) @@ -153,22 +153,6 @@ struct camcontrol_opts { const char *subopt; }; -struct ata_res_pass16 { - u_int16_t reserved[5]; - u_int8_t flags; - u_int8_t error; - u_int8_t sector_count_exp; - u_int8_t sector_count; - u_int8_t lba_low_exp; - u_int8_t lba_low; - u_int8_t lba_mid_exp; - u_int8_t lba_mid; - u_int8_t lba_high_exp; - u_int8_t lba_high; - u_int8_t device; - u_int8_t status; -}; - struct ata_set_max_pwd { u_int16_t reserved1; From owner-svn-src-head@freebsd.org Wed Sep 11 03:25:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6705CEC7FD; Wed, 11 Sep 2019 03:25:31 +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 46SnNC23Kvz4MMM; Wed, 11 Sep 2019 03:25:31 +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 2B1863B3; Wed, 11 Sep 2019 03:25:31 +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 x8B3PVj1010086; Wed, 11 Sep 2019 03:25:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8B3PUtB010085; Wed, 11 Sep 2019 03:25:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909110325.x8B3PUtB010085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 11 Sep 2019 03:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352201 - in head/sys/cam: . scsi X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys/cam: . scsi X-SVN-Commit-Revision: 352201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 03:25:31 -0000 Author: mav Date: Wed Sep 11 03:25:30 2019 New Revision: 352201 URL: https://svnweb.freebsd.org/changeset/base/352201 Log: Fix assumptions of only one device per SES slot. It is typical to have one, but no longer true for multi-actuator HDDs with separate LUN for each actuator. MFC after: 4 days Sponsored by: iXsystems, Inc. Modified: head/sys/cam/cam_periph.c head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue Sep 10 23:51:46 2019 (r352200) +++ head/sys/cam/cam_periph.c Wed Sep 11 03:25:30 2019 (r352201) @@ -402,7 +402,9 @@ retry: } xpt_unlock_buses(); sbuf_finish(&local_sb); - sbuf_cpy(sb, sbuf_data(&local_sb)); + if (sbuf_len(sb) != 0) + sbuf_cat(sb, ","); + sbuf_cat(sb, sbuf_data(&local_sb)); sbuf_delete(&local_sb); return (count); } Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Tue Sep 10 23:51:46 2019 (r352200) +++ head/sys/cam/scsi/scsi_enc_ses.c Wed Sep 11 03:25:30 2019 (r352201) @@ -883,6 +883,7 @@ ses_path_iter_devid_callback(enc_softc_t *enc, enc_ele struct device_match_result *device_match; struct device_match_pattern *device_pattern; ses_path_iter_args_t *args; + struct cam_path *path; args = (ses_path_iter_args_t *)arg; match_pattern.type = DEV_MATCH_DEVICE; @@ -908,23 +909,26 @@ ses_path_iter_devid_callback(enc_softc_t *enc, enc_ele cdm.match_buf_len = sizeof(match_result); cdm.matches = &match_result; - xpt_action((union ccb *)&cdm); - xpt_free_path(cdm.ccb_h.path); + do { + xpt_action((union ccb *)&cdm); - if ((cdm.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP - || (cdm.status != CAM_DEV_MATCH_LAST - && cdm.status != CAM_DEV_MATCH_MORE) - || cdm.num_matches == 0) - return; + if ((cdm.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP || + (cdm.status != CAM_DEV_MATCH_LAST && + cdm.status != CAM_DEV_MATCH_MORE) || + cdm.num_matches == 0) + break; - device_match = &match_result.result.device_result; - if (xpt_create_path(&cdm.ccb_h.path, /*periph*/NULL, - device_match->path_id, - device_match->target_id, - device_match->target_lun) != CAM_REQ_CMP) - return; + device_match = &match_result.result.device_result; + if (xpt_create_path(&path, /*periph*/NULL, + device_match->path_id, + device_match->target_id, + device_match->target_lun) == CAM_REQ_CMP) { - args->callback(enc, elem, cdm.ccb_h.path, args->callback_arg); + args->callback(enc, elem, path, args->callback_arg); + + xpt_free_path(path); + } + } while (cdm.status == CAM_DEV_MATCH_MORE); xpt_free_path(cdm.ccb_h.path); } From owner-svn-src-head@freebsd.org Wed Sep 11 07:03:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26CADF1147; Wed, 11 Sep 2019 07:03:18 +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 46StCV0FJdz4Whc; Wed, 11 Sep 2019 07:03:18 +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 DFCF42AF1; Wed, 11 Sep 2019 07:03:17 +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 x8B73HBZ039169; Wed, 11 Sep 2019 07:03:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8B73HwC039167; Wed, 11 Sep 2019 07:03:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909110703.x8B73HwC039167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 Sep 2019 07:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352204 - head/contrib/libedit X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/contrib/libedit X-SVN-Commit-Revision: 352204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 07:03:18 -0000 Author: bapt Date: Wed Sep 11 07:03:17 2019 New Revision: 352204 URL: https://svnweb.freebsd.org/changeset/base/352204 Log: Readd _el_fn_sh_complete for backward compatibility This function is not needed anymore, it allows old sh binary to continue to run and avoid breaking backward compatibility. Note that is now just calls the regular _el_fn_complete which does a proper job at quoting. Discussed with: jilles Modified: head/contrib/libedit/filecomplete.c head/contrib/libedit/histedit.h Modified: head/contrib/libedit/filecomplete.c ============================================================================== --- head/contrib/libedit/filecomplete.c Wed Sep 11 04:59:27 2019 (r352203) +++ head/contrib/libedit/filecomplete.c Wed Sep 11 07:03:17 2019 (r352204) @@ -823,3 +823,13 @@ _el_fn_complete(EditLine *el, int ch __attribute__((__ break_chars, NULL, NULL, (size_t)100, NULL, NULL, NULL, NULL); } + +/* + * el-compatible wrapper around rl_complete; needed for key binding + */ +/* ARGSUSED */ +unsigned char +_el_fn_sh_complete(EditLine *el, int ch) +{ + return _el_fn_complete(el, ch); +} Modified: head/contrib/libedit/histedit.h ============================================================================== --- head/contrib/libedit/histedit.h Wed Sep 11 04:59:27 2019 (r352203) +++ head/contrib/libedit/histedit.h Wed Sep 11 07:03:17 2019 (r352204) @@ -113,6 +113,7 @@ int el_parse(EditLine *, int, const char **); int el_set(EditLine *, int, ...); int el_get(EditLine *, int, ...); unsigned char _el_fn_complete(EditLine *, int); +unsigned char _el_fn_sh_complete(EditLine *, int); /* * el_set/el_get parameters From owner-svn-src-head@freebsd.org Wed Sep 11 07:53:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9FD8F1E56; Wed, 11 Sep 2019 07:53:49 +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 46SvKn4zYJz4Ygt; Wed, 11 Sep 2019 07:53:49 +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 8DAE933F2; Wed, 11 Sep 2019 07:53:49 +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 x8B7rnEf068417; Wed, 11 Sep 2019 07:53:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8B7rn8R068416; Wed, 11 Sep 2019 07:53:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909110753.x8B7rn8R068416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 11 Sep 2019 07:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352205 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 352205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 07:53:49 -0000 Author: hselasky Date: Wed Sep 11 07:53:49 2019 New Revision: 352205 URL: https://svnweb.freebsd.org/changeset/base/352205 Log: Fix broken DECLARE_TASKLET() macro after r347852. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h Modified: head/sys/compat/linuxkpi/common/include/linux/interrupt.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Sep 11 07:03:17 2019 (r352204) +++ head/sys/compat/linuxkpi/common/include/linux/interrupt.h Wed Sep 11 07:53:49 2019 (r352205) @@ -197,8 +197,8 @@ struct tasklet_struct { unsigned long data; }; -#define DECLARE_TASKLET(name, func, data) \ -struct tasklet_struct name = { { NULL, NULL }, func, ATOMIC_INIT(0), data } +#define DECLARE_TASKLET(_name, _func, _data) \ +struct tasklet_struct _name = { .func = (_func), .data = (_data) } #define tasklet_hi_schedule(t) tasklet_schedule(t) From owner-svn-src-head@freebsd.org Wed Sep 11 08:20:14 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2636DF2EF6; Wed, 11 Sep 2019 08:20:14 +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 46SvwF5lvfz4Znl; Wed, 11 Sep 2019 08:20:13 +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 A947D3960; Wed, 11 Sep 2019 08:20:13 +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 x8B8KDLi080570; Wed, 11 Sep 2019 08:20:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8B8KD57080569; Wed, 11 Sep 2019 08:20:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909110820.x8B8KD57080569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 11 Sep 2019 08:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352206 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 352206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 08:20:14 -0000 Author: hselasky Date: Wed Sep 11 08:20:13 2019 New Revision: 352206 URL: https://svnweb.freebsd.org/changeset/base/352206 Log: Fix synchronous work drain issue in the LinuxKPI. A work callback may restart itself. Loop in the drain function to see if the work has been rescheduled and stop the subsequent reschedules, if any. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_work.c Modified: head/sys/compat/linuxkpi/common/src/linux_work.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_work.c Wed Sep 11 07:53:49 2019 (r352205) +++ head/sys/compat/linuxkpi/common/src/linux_work.c Wed Sep 11 08:20:13 2019 (r352206) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017 Hans Petter Selasky + * Copyright (c) 2017-2019 Hans Petter Selasky * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -323,24 +323,26 @@ linux_cancel_work_sync(struct work_struct *work) [WORK_ST_CANCEL] = WORK_ST_IDLE, /* cancel and drain */ }; struct taskqueue *tq; + bool retval = false; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_cancel_work_sync() might sleep"); - +retry: switch (linux_update_state(&work->state, states)) { case WORK_ST_IDLE: case WORK_ST_TIMER: - return (0); + return (retval); case WORK_ST_EXEC: tq = work->work_queue->taskqueue; if (taskqueue_cancel(tq, &work->work_task, NULL) != 0) taskqueue_drain(tq, &work->work_task); - return (0); + goto retry; /* work may have restarted itself */ default: tq = work->work_queue->taskqueue; if (taskqueue_cancel(tq, &work->work_task, NULL) != 0) taskqueue_drain(tq, &work->work_task); - return (1); + retval = true; + goto retry; } } @@ -421,18 +423,19 @@ linux_cancel_delayed_work_sync(struct delayed_work *dw [WORK_ST_CANCEL] = WORK_ST_IDLE, /* cancel and drain */ }; struct taskqueue *tq; + bool retval = false; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_cancel_delayed_work_sync() might sleep"); - +retry: switch (linux_update_state(&dwork->work.state, states)) { case WORK_ST_IDLE: - return (0); + return (retval); case WORK_ST_EXEC: tq = dwork->work.work_queue->taskqueue; if (taskqueue_cancel(tq, &dwork->work.work_task, NULL) != 0) taskqueue_drain(tq, &dwork->work.work_task); - return (0); + goto retry; /* work may have restarted itself */ case WORK_ST_TIMER: case WORK_ST_CANCEL: if (linux_cancel_timer(dwork, 1)) { @@ -442,14 +445,16 @@ linux_cancel_delayed_work_sync(struct delayed_work *dw */ tq = dwork->work.work_queue->taskqueue; taskqueue_drain(tq, &dwork->work.work_task); - return (1); + retval = true; + goto retry; } /* FALLTHROUGH */ default: tq = dwork->work.work_queue->taskqueue; if (taskqueue_cancel(tq, &dwork->work.work_task, NULL) != 0) taskqueue_drain(tq, &dwork->work.work_task); - return (1); + retval = true; + goto retry; } } From owner-svn-src-head@freebsd.org Wed Sep 11 08:24:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4E3DF31A4; Wed, 11 Sep 2019 08:24:47 +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 46Sw1W4rsSz4bFJ; Wed, 11 Sep 2019 08:24:47 +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 854723BA0; Wed, 11 Sep 2019 08:24:47 +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 x8B8Ol5x086209; Wed, 11 Sep 2019 08:24:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8B8Olsj086208; Wed, 11 Sep 2019 08:24:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909110824.x8B8Olsj086208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 11 Sep 2019 08:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352207 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 352207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 08:24:47 -0000 Author: hselasky Date: Wed Sep 11 08:24:47 2019 New Revision: 352207 URL: https://svnweb.freebsd.org/changeset/base/352207 Log: Use true and false when dealing with bool type in the LinuxKPI. No functional change. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_work.c Modified: head/sys/compat/linuxkpi/common/src/linux_work.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_work.c Wed Sep 11 08:20:13 2019 (r352206) +++ head/sys/compat/linuxkpi/common/src/linux_work.c Wed Sep 11 08:24:47 2019 (r352207) @@ -92,7 +92,7 @@ linux_work_exec_unblock(struct work_struct *work) { struct workqueue_struct *wq; struct work_exec *exec; - bool retval = 0; + bool retval = false; wq = work->work_queue; if (unlikely(wq == NULL)) @@ -102,7 +102,7 @@ linux_work_exec_unblock(struct work_struct *work) TAILQ_FOREACH(exec, &wq->exec_head, entry) { if (exec->target == work) { exec->target = NULL; - retval = 1; + retval = true; break; } } @@ -144,14 +144,14 @@ linux_queue_work_on(int cpu __unused, struct workqueue case WORK_ST_EXEC: case WORK_ST_CANCEL: if (linux_work_exec_unblock(work) != 0) - return (1); + return (true); /* FALLTHROUGH */ case WORK_ST_IDLE: work->work_queue = wq; taskqueue_enqueue(wq->taskqueue, &work->work_task); - return (1); + return (true); default: - return (0); /* already on a queue */ + return (false); /* already on a queue */ } } @@ -181,7 +181,7 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_ case WORK_ST_CANCEL: if (delay == 0 && linux_work_exec_unblock(&dwork->work) != 0) { dwork->timer.expires = jiffies; - return (1); + return (true); } /* FALLTHROUGH */ case WORK_ST_IDLE: @@ -201,9 +201,9 @@ linux_queue_delayed_work_on(int cpu, struct workqueue_ &linux_delayed_work_timer_fn, dwork); mtx_unlock(&dwork->timer.mtx); } - return (1); + return (true); default: - return (0); /* already on a queue */ + return (false); /* already on a queue */ } } @@ -391,7 +391,7 @@ linux_cancel_delayed_work(struct delayed_work *dwork) if (linux_cancel_timer(dwork, 0)) { atomic_cmpxchg(&dwork->work.state, WORK_ST_CANCEL, WORK_ST_IDLE); - return (1); + return (true); } /* FALLTHROUGH */ case WORK_ST_TASK: @@ -399,11 +399,11 @@ linux_cancel_delayed_work(struct delayed_work *dwork) if (taskqueue_cancel(tq, &dwork->work.work_task, NULL) == 0) { atomic_cmpxchg(&dwork->work.state, WORK_ST_CANCEL, WORK_ST_IDLE); - return (1); + return (true); } /* FALLTHROUGH */ default: - return (0); + return (false); } } @@ -467,14 +467,14 @@ bool linux_flush_work(struct work_struct *work) { struct taskqueue *tq; - int retval; + bool retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_work() might sleep"); switch (atomic_read(&work->state)) { case WORK_ST_IDLE: - return (0); + return (false); default: tq = work->work_queue->taskqueue; retval = taskqueue_poll_is_busy(tq, &work->work_task); @@ -492,14 +492,14 @@ bool linux_flush_delayed_work(struct delayed_work *dwork) { struct taskqueue *tq; - int retval; + bool retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_delayed_work() might sleep"); switch (atomic_read(&dwork->work.state)) { case WORK_ST_IDLE: - return (0); + return (false); case WORK_ST_TIMER: if (linux_cancel_timer(dwork, 1)) linux_delayed_work_enqueue(dwork); @@ -523,9 +523,9 @@ linux_work_pending(struct work_struct *work) case WORK_ST_TIMER: case WORK_ST_TASK: case WORK_ST_CANCEL: - return (1); + return (true); default: - return (0); + return (false); } } @@ -539,12 +539,12 @@ linux_work_busy(struct work_struct *work) switch (atomic_read(&work->state)) { case WORK_ST_IDLE: - return (0); + return (false); case WORK_ST_EXEC: tq = work->work_queue->taskqueue; return (taskqueue_poll_is_busy(tq, &work->work_task)); default: - return (1); + return (true); } } From owner-svn-src-head@freebsd.org Wed Sep 11 12:58:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01052D3022; Wed, 11 Sep 2019 12:58:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T24v6LSVz3Plc; Wed, 11 Sep 2019 12:58:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B90846C85; Wed, 11 Sep 2019 12:58:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BCw7YV047551; Wed, 11 Sep 2019 12:58:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BCw6Gb047546; Wed, 11 Sep 2019 12:58:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111258.x8BCw6Gb047546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 12:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352208 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 352208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 12:58:08 -0000 Author: emaste Date: Wed Sep 11 12:58:06 2019 New Revision: 352208 URL: https://svnweb.freebsd.org/changeset/base/352208 Log: make linux_renameat2 args consistent with linux_renameat Use 'dfd' consistently for a directory fd. Modified: head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/syscalls.master head/sys/arm64/linux/syscalls.master head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Wed Sep 11 08:24:47 2019 (r352207) +++ head/sys/amd64/linux/syscalls.master Wed Sep 11 12:58:06 2019 (r352208) @@ -550,8 +550,8 @@ 315 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -316 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +316 AUE_NULL STD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 317 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Wed Sep 11 08:24:47 2019 (r352207) +++ head/sys/amd64/linux32/syscalls.master Wed Sep 11 12:58:06 2019 (r352208) @@ -610,8 +610,8 @@ 352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +353 AUE_NULL STD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ Modified: head/sys/arm64/linux/syscalls.master ============================================================================== --- head/sys/arm64/linux/syscalls.master Wed Sep 11 08:24:47 2019 (r352207) +++ head/sys/arm64/linux/syscalls.master Wed Sep 11 12:58:06 2019 (r352208) @@ -1459,9 +1459,9 @@ } 276 AUE_NULL STD { int linux_renameat2( - l_int oldfd, + l_int olddfd, const char *oldname, - l_int newfd, + l_int newdfd, const char *newname, unsigned int flags ); Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Wed Sep 11 08:24:47 2019 (r352207) +++ head/sys/i386/linux/syscalls.master Wed Sep 11 12:58:06 2019 (r352208) @@ -619,8 +619,8 @@ 352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +353 AUE_NULL STD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ From owner-svn-src-head@freebsd.org Wed Sep 11 12:58:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 395CED30A2; Wed, 11 Sep 2019 12:58:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T25q0mvrz3Pww; Wed, 11 Sep 2019 12:58:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F21846C86; Wed, 11 Sep 2019 12:58:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BCws5l047639; Wed, 11 Sep 2019 12:58:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BCwrlP047631; Wed, 11 Sep 2019 12:58:53 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111258.x8BCwrlP047631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 12:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352209 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 352209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 12:58:55 -0000 Author: emaste Date: Wed Sep 11 12:58:53 2019 New Revision: 352209 URL: https://svnweb.freebsd.org/changeset/base/352209 Log: regen linuxulator sysent after r352208 Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_systrace_args.c head/sys/arm64/linux/linux_proto.h head/sys/arm64/linux/linux_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux/linux_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -1125,9 +1125,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux/linux_systrace_args.c Wed Sep 11 12:58:53 2019 (r352209) @@ -2297,9 +2297,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 316: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux32/linux32_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -1199,9 +1199,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/amd64/linux32/linux32_systrace_args.c Wed Sep 11 12:58:53 2019 (r352209) @@ -2424,9 +2424,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 353: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: head/sys/arm64/linux/linux_proto.h ============================================================================== --- head/sys/arm64/linux/linux_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/arm64/linux/linux_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -971,9 +971,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: head/sys/arm64/linux/linux_systrace_args.c ============================================================================== --- head/sys/arm64/linux/linux_systrace_args.c Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/arm64/linux/linux_systrace_args.c Wed Sep 11 12:58:53 2019 (r352209) @@ -1972,9 +1972,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 276: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/i386/linux/linux_proto.h Wed Sep 11 12:58:53 2019 (r352209) @@ -1217,9 +1217,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Wed Sep 11 12:58:06 2019 (r352208) +++ head/sys/i386/linux/linux_systrace_args.c Wed Sep 11 12:58:53 2019 (r352209) @@ -2500,9 +2500,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 353: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; From owner-svn-src-head@freebsd.org Wed Sep 11 13:02:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32651D333C; Wed, 11 Sep 2019 13:02:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T29P0cNMz3QJd; Wed, 11 Sep 2019 13:02:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED3C56D05; Wed, 11 Sep 2019 13:02:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BD208a051092; Wed, 11 Sep 2019 13:02:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BD1xjR051082; Wed, 11 Sep 2019 13:01:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111301.x8BD1xjR051082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 13:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352210 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 352210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 13:02:01 -0000 Author: emaste Date: Wed Sep 11 13:01:59 2019 New Revision: 352210 URL: https://svnweb.freebsd.org/changeset/base/352210 Log: linux: add trivial renameat2 implementation Just return EINVAL if flags != 0. The Linux man page documents one case of EINVAL as "The filesystem does not support one of the flags in flags." After r351723 userland binaries will try using new system calls. Reported by: mjg Reviewed by: mjg, trasz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21590 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -130,8 +130,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -137,8 +137,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -130,8 +130,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/compat/linux/linux_file.c Wed Sep 11 13:01:59 2019 (r352210) @@ -686,8 +686,28 @@ linux_rename(struct thread *td, struct linux_rename_ar int linux_renameat(struct thread *td, struct linux_renameat_args *args) { + struct linux_renameat2_args renameat2_args = { + .olddfd = args->olddfd, + .oldname = args->oldname, + .newdfd = args->newdfd, + .newname = args->newname, + .flags = 0 + }; + + return (linux_renameat2(td, &renameat2_args)); +} + +int +linux_renameat2(struct thread *td, struct linux_renameat2_args *args) +{ char *from, *to; int error, olddfd, newdfd; + + if (args->flags != 0) { + linux_msg(td, "renameat2 unsupported flags 0x%x\n", + args->flags); + return (EINVAL); + } olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 12:58:53 2019 (r352209) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 13:01:59 2019 (r352210) @@ -134,8 +134,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.14: */ -DUMMY(renameat2); -/* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); /* Linux 3.18: */ From owner-svn-src-head@freebsd.org Wed Sep 11 13:27:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41078D4069; Wed, 11 Sep 2019 13:27: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 46T2kR10kCz3x4K; Wed, 11 Sep 2019 13:27: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 DFB2F71FC; Wed, 11 Sep 2019 13:27: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 x8BDRA3C065737; Wed, 11 Sep 2019 13:27:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BDRArf065735; Wed, 11 Sep 2019 13:27:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909111327.x8BDRArf065735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 11 Sep 2019 13:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352211 - head/sbin/bectl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/bectl X-SVN-Commit-Revision: 352211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 13:27:11 -0000 Author: kevans Date: Wed Sep 11 13:27:10 2019 New Revision: 352211 URL: https://svnweb.freebsd.org/changeset/base/352211 Log: bectl(8): Add a "check" command This command simply returns 0 at the moment and explicitly takes no arguments. This should be used by utilities wanting to see if bectl can operate on the system they're running, or with a specific root (`bectl -r`). It may grow more checks than "will libbe successfully init" in the future, but for now this is enough as that checks for the dataset mounted at "/" and that it looks capable of being a BE root (e.g. it's not a top-level dataset) bectl commands can now specify if they want to be silent, and this will turn off libbe_print_on_error so they can control the output as needed. This is already used in `bectl check`, and may be turned on in the future for some other commands where libbe errors are better suppressed as the failure mode may be obvious. Requested by: David Fullard MFC after: 3 days Modified: head/sbin/bectl/bectl.8 head/sbin/bectl/bectl.c Modified: head/sbin/bectl/bectl.8 ============================================================================== --- head/sbin/bectl/bectl.8 Wed Sep 11 13:01:59 2019 (r352210) +++ head/sbin/bectl/bectl.8 Wed Sep 11 13:27:10 2019 (r352211) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2019 +.Dd September 11, 2019 .Dt BECTL 8 .Os .Sh NAME @@ -30,6 +30,8 @@ .Op Fl t .Ar beName .Nm +.Cm check +.Nm .Cm create .Op Fl r .Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot @@ -103,6 +105,15 @@ as the default boot filesystem. If the .Op Fl t flag is given, this takes effect only for the next boot. +.It Xo +.Cm check +.Xc +Performs a silent sanity check on the current system. +If boot environments are supported and used, +.Nm +will exit with a status code of 0. +Any other status code is not currently defined and may, in the future, grow +special meaning for different degrees of sanity check failures. .It Xo .Cm create .Op Fl r Modified: head/sbin/bectl/bectl.c ============================================================================== --- head/sbin/bectl/bectl.c Wed Sep 11 13:01:59 2019 (r352210) +++ head/sbin/bectl/bectl.c Wed Sep 11 13:27:10 2019 (r352211) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include "bectl.h" static int bectl_cmd_activate(int argc, char *argv[]); +static int bectl_cmd_check(int argc, char *argv[]); static int bectl_cmd_create(int argc, char *argv[]); static int bectl_cmd_destroy(int argc, char *argv[]); static int bectl_cmd_export(int argc, char *argv[]); @@ -72,6 +73,7 @@ usage(bool explicit) "\tbectl add (path)*\n" #endif "\tbectl activate [-t] beName\n" + "\tbectl check\n" "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" "\tbectl create [-r] beName@snapshot\n" "\tbectl destroy [-F] {beName | beName@snapshot}\n" @@ -97,40 +99,40 @@ usage(bool explicit) struct command_map_entry { const char *command; int (*fn)(int argc, char *argv[]); + /* True if libbe_print_on_error should be disabled */ + bool silent; }; static struct command_map_entry command_map[] = { - { "activate", bectl_cmd_activate }, - { "create", bectl_cmd_create }, - { "destroy", bectl_cmd_destroy }, - { "export", bectl_cmd_export }, - { "import", bectl_cmd_import }, + { "activate", bectl_cmd_activate,false }, + { "create", bectl_cmd_create, false }, + { "destroy", bectl_cmd_destroy, false }, + { "export", bectl_cmd_export, false }, + { "import", bectl_cmd_import, false }, #if SOON - { "add", bectl_cmd_add }, + { "add", bectl_cmd_add, false }, #endif - { "jail", bectl_cmd_jail }, - { "list", bectl_cmd_list }, - { "mount", bectl_cmd_mount }, - { "rename", bectl_cmd_rename }, - { "unjail", bectl_cmd_unjail }, - { "unmount", bectl_cmd_unmount }, + { "jail", bectl_cmd_jail, false }, + { "list", bectl_cmd_list, false }, + { "mount", bectl_cmd_mount, false }, + { "rename", bectl_cmd_rename, false }, + { "unjail", bectl_cmd_unjail, false }, + { "unmount", bectl_cmd_unmount, false }, + { "check", bectl_cmd_check, true }, }; -static int -get_cmd_index(const char *cmd, int *idx) +static struct command_map_entry * +get_cmd_info(const char *cmd) { - int map_size; + size_t i; - map_size = nitems(command_map); - for (int i = 0; i < map_size; ++i) { - if (strcmp(cmd, command_map[i].command) == 0) { - *idx = i; - return (0); - } + for (i = 0; i < nitems(command_map); ++i) { + if (strcmp(cmd, command_map[i].command) == 0) + return (&command_map[i]); } - return (1); + return (NULL); } @@ -509,14 +511,28 @@ bectl_cmd_unmount(int argc, char *argv[]) return (err); } +static int +bectl_cmd_check(int argc, char *argv[] __unused) +{ + /* The command is left as argv[0] */ + if (argc != 1) { + fprintf(stderr, "bectl check: wrong number of arguments\n"); + return (usage(false)); + } + + return (0); +} + int main(int argc, char *argv[]) { + struct command_map_entry *cmd; const char *command; char *root; - int command_index, rc; + int rc; + cmd = NULL; root = NULL; if (argc < 2) return (usage(false)); @@ -544,18 +560,17 @@ main(int argc, char *argv[]) if ((strcmp(command, "-?") == 0) || (strcmp(command, "-h") == 0)) return (usage(true)); - if (get_cmd_index(command, &command_index)) { + if ((cmd = get_cmd_info(command)) == NULL) { fprintf(stderr, "unknown command: %s\n", command); return (usage(false)); } - if ((be = libbe_init(root)) == NULL) return (-1); - libbe_print_on_error(be, true); + libbe_print_on_error(be, !cmd->silent); - rc = command_map[command_index].fn(argc, argv); + rc = cmd->fn(argc, argv); libbe_close(be); return (rc); From owner-svn-src-head@freebsd.org Wed Sep 11 13:34:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FB44D4400; Wed, 11 Sep 2019 13:34:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46T2th3C5fz3xZD; Wed, 11 Sep 2019 13:34:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51FCA73B2; Wed, 11 Sep 2019 13:34:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BDYKgG071535; Wed, 11 Sep 2019 13:34:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BDYKNu071534; Wed, 11 Sep 2019 13:34:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909111334.x8BDYKNu071534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 11 Sep 2019 13:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352212 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 352212 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 13:34:20 -0000 Author: imp Date: Wed Sep 11 13:34:19 2019 New Revision: 352212 URL: https://svnweb.freebsd.org/changeset/base/352212 Log: Assume all the short args have optional args so allocate space for the ':'. It's slightly wasteful, but much easier (and the savings in bytes at runtime would be tiny, but the code to do it larger). Submitted by: Sebastian Huber Modified: head/sbin/nvmecontrol/comnd.c Modified: head/sbin/nvmecontrol/comnd.c ============================================================================== --- head/sbin/nvmecontrol/comnd.c Wed Sep 11 13:27:10 2019 (r352211) +++ head/sbin/nvmecontrol/comnd.c Wed Sep 11 13:34:19 2019 (r352212) @@ -189,7 +189,7 @@ arg_parse(int argc, char * const * argv, const struct lopts = malloc((n + 2) * sizeof(struct option)); if (lopts == NULL) err(1, "option memory"); - p = shortopts = malloc((n + 3) * sizeof(char)); + p = shortopts = malloc((2 * n + 3) * sizeof(char)); if (shortopts == NULL) err(1, "shortopts memory"); idx = 0; From owner-svn-src-head@freebsd.org Wed Sep 11 13:35:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC99BD4498; Wed, 11 Sep 2019 13:35:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T2vt5WyZz3xj5; Wed, 11 Sep 2019 13:35:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0D7F73B3; Wed, 11 Sep 2019 13:35:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BDZM3a071643; Wed, 11 Sep 2019 13:35:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BDZM3R071642; Wed, 11 Sep 2019 13:35:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111335.x8BDZM3R071642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 13:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352213 - head/sys/tools X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/tools X-SVN-Commit-Revision: 352213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 13:35:22 -0000 Author: emaste Date: Wed Sep 11 13:35:22 2019 New Revision: 352213 URL: https://svnweb.freebsd.org/changeset/base/352213 Log: fw_stub.awk: use @generated tag in generated files Multiple tools use @generated to identify generated files (for example, in a review Phabricator will by default hide diffs in enerated files). Use the @generated tag in makesyscalls.sh as we've done for other generated files. Modified: head/sys/tools/fw_stub.awk Modified: head/sys/tools/fw_stub.awk ============================================================================== --- head/sys/tools/fw_stub.awk Wed Sep 11 13:34:19 2019 (r352212) +++ head/sys/tools/fw_stub.awk Wed Sep 11 13:35:22 2019 (r352213) @@ -123,8 +123,10 @@ ctmpfilename = cfilename ".tmp"; modname = opt_m; gsub(/[-\.]/, "_", modname); +# Avoid a literal generated file tag here. +generated = "@" "generated"; printc("/*\ - * Automatically generated by:\ + * Automatically " generated " by:\ * $FreeBSD$\ */"); printc("#include "); From owner-svn-src-head@freebsd.org Wed Sep 11 15:39:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C464CD76B5; Wed, 11 Sep 2019 15:39:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T5g65V9rz44QC; Wed, 11 Sep 2019 15:39:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EE3E892A; Wed, 11 Sep 2019 15:39:30 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BFdUPV042567; Wed, 11 Sep 2019 15:39:30 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BFdSHo042554; Wed, 11 Sep 2019 15:39:28 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201909111539.x8BFdSHo042554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Wed, 11 Sep 2019 15:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352214 - in head/usr.bin/locale: . tests X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in head/usr.bin/locale: . tests X-SVN-Commit-Revision: 352214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 15:39:30 -0000 Author: yuripv Date: Wed Sep 11 15:39:28 2019 New Revision: 352214 URL: https://svnweb.freebsd.org/changeset/base/352214 Log: locale: more output fixes - make abday, day, abmon, mon, am_pm output quoting match linux - workaround localeconv() issue for mon_grouping and grouping (PR172215) - for other values not available in default locale, output -1 instead of 127 (CHAR_MAX) as returned by localeconv() With these changes, output of `locale` and `locale -k` for all keywords specified by POSIX exactly matches the linux one. PR: 237752 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21599 Added: head/usr.bin/locale/tests/no_flags_posix_messages.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_monetary.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_numeric.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_time.out (contents, props changed) Modified: head/usr.bin/locale/locale.c head/usr.bin/locale/tests/Makefile head/usr.bin/locale/tests/k_flag_posix_monetary.out head/usr.bin/locale/tests/k_flag_posix_numeric.out head/usr.bin/locale/tests/k_flag_posix_time.out head/usr.bin/locale/tests/locale_test.sh Modified: head/usr.bin/locale/locale.c ============================================================================== --- head/usr.bin/locale/locale.c Wed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/locale.c Wed Sep 11 15:39:28 2019 (r352214) @@ -54,7 +54,7 @@ #include "setlocale.h" /* Local prototypes */ -char *format_grouping(const char *); +char *format_grouping(char *); void init_locales_list(void); void list_charmaps(void); void list_locales(void); @@ -119,6 +119,12 @@ enum { }; enum { + TYPE_NUM, + TYPE_STR, + TYPE_UNQ +}; + +enum { SRC_LINFO, SRC_LCONV, SRC_LTIME @@ -126,218 +132,218 @@ enum { static const struct _kwinfo { const char *name; - int isstr; /* true - string, false - number */ + int type; int catid; /* LC_* */ int source; int value_ref; const char *comment; } kwinfo [] = { - { "charmap", 1, LC_CTYPE, SRC_LINFO, + { "charmap", TYPE_STR, LC_CTYPE, SRC_LINFO, CODESET, "" }, /* hack */ /* LC_MONETARY - POSIX */ - { "int_curr_symbol", 1, LC_MONETARY, SRC_LCONV, + { "int_curr_symbol", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_INT_CURR_SYMBOL, "" }, - { "currency_symbol", 1, LC_MONETARY, SRC_LCONV, + { "currency_symbol", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_CURRENCY_SYMBOL, "" }, - { "mon_decimal_point", 1, LC_MONETARY, SRC_LCONV, + { "mon_decimal_point", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_MON_DECIMAL_POINT, "" }, - { "mon_thousands_sep", 1, LC_MONETARY, SRC_LCONV, + { "mon_thousands_sep", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_MON_THOUSANDS_SEP, "" }, - { "mon_grouping", 1, LC_MONETARY, SRC_LCONV, + { "mon_grouping", TYPE_UNQ, LC_MONETARY, SRC_LCONV, KW_MON_GROUPING, "" }, - { "positive_sign", 1, LC_MONETARY, SRC_LCONV, + { "positive_sign", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_POSITIVE_SIGN, "" }, - { "negative_sign", 1, LC_MONETARY, SRC_LCONV, + { "negative_sign", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_NEGATIVE_SIGN, "" }, - { "int_frac_digits", 0, LC_MONETARY, SRC_LCONV, + { "int_frac_digits", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_FRAC_DIGITS, "" }, - { "frac_digits", 0, LC_MONETARY, SRC_LCONV, + { "frac_digits", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_FRAC_DIGITS, "" }, - { "p_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "p_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_CS_PRECEDES, "" }, - { "p_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "p_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_SEP_BY_SPACE, "" }, - { "n_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "n_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_CS_PRECEDES, "" }, - { "n_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "n_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_SEP_BY_SPACE, "" }, - { "p_sign_posn", 0, LC_MONETARY, SRC_LCONV, + { "p_sign_posn", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_SIGN_POSN, "" }, - { "n_sign_posn", 0, LC_MONETARY, SRC_LCONV, + { "n_sign_posn", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_SIGN_POSN, "" }, - { "int_p_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "int_p_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_P_CS_PRECEDES, "" }, - { "int_p_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "int_p_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_P_SEP_BY_SPACE, "" }, - { "int_n_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "int_n_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_N_CS_PRECEDES, "" }, - { "int_n_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "int_n_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_N_SEP_BY_SPACE, "" }, - { "int_p_sign_posn", 0, LC_MONETARY, SRC_LCONV, + { "int_p_sign_posn", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_P_SIGN_POSN, "" }, - { "int_n_sign_posn", 0, LC_MONETARY, SRC_LCONV, + { "int_n_sign_posn", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_N_SIGN_POSN, "" }, /* LC_NUMERIC - POSIX */ - { "decimal_point", 1, LC_NUMERIC, SRC_LINFO, + { "decimal_point", TYPE_STR, LC_NUMERIC, SRC_LINFO, RADIXCHAR, "" }, - { "thousands_sep", 1, LC_NUMERIC, SRC_LINFO, + { "thousands_sep", TYPE_STR, LC_NUMERIC, SRC_LINFO, THOUSEP, "" }, - { "grouping", 1, LC_NUMERIC, SRC_LCONV, + { "grouping", TYPE_UNQ, LC_NUMERIC, SRC_LCONV, KW_GROUPING, "" }, /* LC_NUMERIC - local additions */ - { "radixchar", 1, LC_NUMERIC, SRC_LINFO, + { "radixchar", TYPE_STR, LC_NUMERIC, SRC_LINFO, RADIXCHAR, "Same as decimal_point (FreeBSD only)" }, /* compat */ - { "thousep", 1, LC_NUMERIC, SRC_LINFO, + { "thousep", TYPE_STR, LC_NUMERIC, SRC_LINFO, THOUSEP, "Same as thousands_sep (FreeBSD only)" }, /* compat */ /* LC_TIME - POSIX */ - { "abday", 1, LC_TIME, SRC_LTIME, + { "abday", TYPE_STR, LC_TIME, SRC_LTIME, KW_TIME_ABDAY, "" }, - { "day", 1, LC_TIME, SRC_LTIME, + { "day", TYPE_STR, LC_TIME, SRC_LTIME, KW_TIME_DAY, "" }, - { "abmon", 1, LC_TIME, SRC_LTIME, + { "abmon", TYPE_STR, LC_TIME, SRC_LTIME, KW_TIME_ABMON, "" }, - { "mon", 1, LC_TIME, SRC_LTIME, + { "mon", TYPE_STR, LC_TIME, SRC_LTIME, KW_TIME_MON, "" }, - { "d_t_fmt", 1, LC_TIME, SRC_LINFO, + { "d_t_fmt", TYPE_STR, LC_TIME, SRC_LINFO, D_T_FMT, "" }, - { "d_fmt", 1, LC_TIME, SRC_LINFO, + { "d_fmt", TYPE_STR, LC_TIME, SRC_LINFO, D_FMT, "" }, - { "t_fmt", 1, LC_TIME, SRC_LINFO, + { "t_fmt", TYPE_STR, LC_TIME, SRC_LINFO, T_FMT, "" }, - { "am_pm", 1, LC_TIME, SRC_LTIME, + { "am_pm", TYPE_STR, LC_TIME, SRC_LTIME, KW_TIME_AM_PM, "" }, - { "t_fmt_ampm", 1, LC_TIME, SRC_LINFO, + { "t_fmt_ampm", TYPE_STR, LC_TIME, SRC_LINFO, T_FMT_AMPM, "" }, - { "era", 1, LC_TIME, SRC_LINFO, + { "era", TYPE_UNQ, LC_TIME, SRC_LINFO, ERA, "(unavailable)" }, - { "era_d_fmt", 1, LC_TIME, SRC_LINFO, + { "era_d_fmt", TYPE_STR, LC_TIME, SRC_LINFO, ERA_D_FMT, "(unavailable)" }, - { "era_d_t_fmt", 1, LC_TIME, SRC_LINFO, + { "era_d_t_fmt", TYPE_STR, LC_TIME, SRC_LINFO, ERA_D_T_FMT, "(unavailable)" }, - { "era_t_fmt", 1, LC_TIME, SRC_LINFO, + { "era_t_fmt", TYPE_STR, LC_TIME, SRC_LINFO, ERA_T_FMT, "(unavailable)" }, - { "alt_digits", 1, LC_TIME, SRC_LINFO, + { "alt_digits", TYPE_UNQ, LC_TIME, SRC_LINFO, ALT_DIGITS, "" }, /* LC_TIME - local additions */ - { "abday_1", 1, LC_TIME, SRC_LINFO, + { "abday_1", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_1, "(FreeBSD only)" }, - { "abday_2", 1, LC_TIME, SRC_LINFO, + { "abday_2", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_2, "(FreeBSD only)" }, - { "abday_3", 1, LC_TIME, SRC_LINFO, + { "abday_3", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_3, "(FreeBSD only)" }, - { "abday_4", 1, LC_TIME, SRC_LINFO, + { "abday_4", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_4, "(FreeBSD only)" }, - { "abday_5", 1, LC_TIME, SRC_LINFO, + { "abday_5", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_5, "(FreeBSD only)" }, - { "abday_6", 1, LC_TIME, SRC_LINFO, + { "abday_6", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_6, "(FreeBSD only)" }, - { "abday_7", 1, LC_TIME, SRC_LINFO, + { "abday_7", TYPE_STR, LC_TIME, SRC_LINFO, ABDAY_7, "(FreeBSD only)" }, - { "day_1", 1, LC_TIME, SRC_LINFO, + { "day_1", TYPE_STR, LC_TIME, SRC_LINFO, DAY_1, "(FreeBSD only)" }, - { "day_2", 1, LC_TIME, SRC_LINFO, + { "day_2", TYPE_STR, LC_TIME, SRC_LINFO, DAY_2, "(FreeBSD only)" }, - { "day_3", 1, LC_TIME, SRC_LINFO, + { "day_3", TYPE_STR, LC_TIME, SRC_LINFO, DAY_3, "(FreeBSD only)" }, - { "day_4", 1, LC_TIME, SRC_LINFO, + { "day_4", TYPE_STR, LC_TIME, SRC_LINFO, DAY_4, "(FreeBSD only)" }, - { "day_5", 1, LC_TIME, SRC_LINFO, + { "day_5", TYPE_STR, LC_TIME, SRC_LINFO, DAY_5, "(FreeBSD only)" }, - { "day_6", 1, LC_TIME, SRC_LINFO, + { "day_6", TYPE_STR, LC_TIME, SRC_LINFO, DAY_6, "(FreeBSD only)" }, - { "day_7", 1, LC_TIME, SRC_LINFO, + { "day_7", TYPE_STR, LC_TIME, SRC_LINFO, DAY_7, "(FreeBSD only)" }, - { "abmon_1", 1, LC_TIME, SRC_LINFO, + { "abmon_1", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_1, "(FreeBSD only)" }, - { "abmon_2", 1, LC_TIME, SRC_LINFO, + { "abmon_2", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_2, "(FreeBSD only)" }, - { "abmon_3", 1, LC_TIME, SRC_LINFO, + { "abmon_3", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_3, "(FreeBSD only)" }, - { "abmon_4", 1, LC_TIME, SRC_LINFO, + { "abmon_4", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_4, "(FreeBSD only)" }, - { "abmon_5", 1, LC_TIME, SRC_LINFO, + { "abmon_5", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_5, "(FreeBSD only)" }, - { "abmon_6", 1, LC_TIME, SRC_LINFO, + { "abmon_6", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_6, "(FreeBSD only)" }, - { "abmon_7", 1, LC_TIME, SRC_LINFO, + { "abmon_7", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_7, "(FreeBSD only)" }, - { "abmon_8", 1, LC_TIME, SRC_LINFO, + { "abmon_8", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_8, "(FreeBSD only)" }, - { "abmon_9", 1, LC_TIME, SRC_LINFO, + { "abmon_9", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_9, "(FreeBSD only)" }, - { "abmon_10", 1, LC_TIME, SRC_LINFO, + { "abmon_10", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_10, "(FreeBSD only)" }, - { "abmon_11", 1, LC_TIME, SRC_LINFO, + { "abmon_11", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_11, "(FreeBSD only)" }, - { "abmon_12", 1, LC_TIME, SRC_LINFO, + { "abmon_12", TYPE_STR, LC_TIME, SRC_LINFO, ABMON_12, "(FreeBSD only)" }, - { "mon_1", 1, LC_TIME, SRC_LINFO, + { "mon_1", TYPE_STR, LC_TIME, SRC_LINFO, MON_1, "(FreeBSD only)" }, - { "mon_2", 1, LC_TIME, SRC_LINFO, + { "mon_2", TYPE_STR, LC_TIME, SRC_LINFO, MON_2, "(FreeBSD only)" }, - { "mon_3", 1, LC_TIME, SRC_LINFO, + { "mon_3", TYPE_STR, LC_TIME, SRC_LINFO, MON_3, "(FreeBSD only)" }, - { "mon_4", 1, LC_TIME, SRC_LINFO, + { "mon_4", TYPE_STR, LC_TIME, SRC_LINFO, MON_4, "(FreeBSD only)" }, - { "mon_5", 1, LC_TIME, SRC_LINFO, + { "mon_5", TYPE_STR, LC_TIME, SRC_LINFO, MON_5, "(FreeBSD only)" }, - { "mon_6", 1, LC_TIME, SRC_LINFO, + { "mon_6", TYPE_STR, LC_TIME, SRC_LINFO, MON_6, "(FreeBSD only)" }, - { "mon_7", 1, LC_TIME, SRC_LINFO, + { "mon_7", TYPE_STR, LC_TIME, SRC_LINFO, MON_7, "(FreeBSD only)" }, - { "mon_8", 1, LC_TIME, SRC_LINFO, + { "mon_8", TYPE_STR, LC_TIME, SRC_LINFO, MON_8, "(FreeBSD only)" }, - { "mon_9", 1, LC_TIME, SRC_LINFO, + { "mon_9", TYPE_STR, LC_TIME, SRC_LINFO, MON_9, "(FreeBSD only)" }, - { "mon_10", 1, LC_TIME, SRC_LINFO, + { "mon_10", TYPE_STR, LC_TIME, SRC_LINFO, MON_10, "(FreeBSD only)" }, - { "mon_11", 1, LC_TIME, SRC_LINFO, + { "mon_11", TYPE_STR, LC_TIME, SRC_LINFO, MON_11, "(FreeBSD only)" }, - { "mon_12", 1, LC_TIME, SRC_LINFO, + { "mon_12", TYPE_STR, LC_TIME, SRC_LINFO, MON_12, "(FreeBSD only)" }, - { "altmon_1", 1, LC_TIME, SRC_LINFO, + { "altmon_1", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_1, "(FreeBSD only)" }, - { "altmon_2", 1, LC_TIME, SRC_LINFO, + { "altmon_2", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_2, "(FreeBSD only)" }, - { "altmon_3", 1, LC_TIME, SRC_LINFO, + { "altmon_3", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_3, "(FreeBSD only)" }, - { "altmon_4", 1, LC_TIME, SRC_LINFO, + { "altmon_4", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_4, "(FreeBSD only)" }, - { "altmon_5", 1, LC_TIME, SRC_LINFO, + { "altmon_5", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_5, "(FreeBSD only)" }, - { "altmon_6", 1, LC_TIME, SRC_LINFO, + { "altmon_6", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_6, "(FreeBSD only)" }, - { "altmon_7", 1, LC_TIME, SRC_LINFO, + { "altmon_7", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_7, "(FreeBSD only)" }, - { "altmon_8", 1, LC_TIME, SRC_LINFO, + { "altmon_8", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_8, "(FreeBSD only)" }, - { "altmon_9", 1, LC_TIME, SRC_LINFO, + { "altmon_9", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_9, "(FreeBSD only)" }, - { "altmon_10", 1, LC_TIME, SRC_LINFO, + { "altmon_10", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_10, "(FreeBSD only)" }, - { "altmon_11", 1, LC_TIME, SRC_LINFO, + { "altmon_11", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_11, "(FreeBSD only)" }, - { "altmon_12", 1, LC_TIME, SRC_LINFO, + { "altmon_12", TYPE_STR, LC_TIME, SRC_LINFO, ALTMON_12, "(FreeBSD only)" }, - { "am_str", 1, LC_TIME, SRC_LINFO, + { "am_str", TYPE_STR, LC_TIME, SRC_LINFO, AM_STR, "(FreeBSD only)" }, - { "pm_str", 1, LC_TIME, SRC_LINFO, + { "pm_str", TYPE_STR, LC_TIME, SRC_LINFO, PM_STR, "(FreeBSD only)" }, - { "d_md_order", 1, LC_TIME, SRC_LINFO, + { "d_md_order", TYPE_STR, LC_TIME, SRC_LINFO, D_MD_ORDER, "(FreeBSD only)" }, /* local */ /* LC_MESSAGES - POSIX */ - { "yesexpr", 1, LC_MESSAGES, SRC_LINFO, + { "yesexpr", TYPE_STR, LC_MESSAGES, SRC_LINFO, YESEXPR, "" }, - { "noexpr", 1, LC_MESSAGES, SRC_LINFO, + { "noexpr", TYPE_STR, LC_MESSAGES, SRC_LINFO, NOEXPR, "" }, /* LC_MESSAGES - local additions */ - { "yesstr", 1, LC_MESSAGES, SRC_LINFO, + { "yesstr", TYPE_STR, LC_MESSAGES, SRC_LINFO, YESSTR, "(POSIX legacy)" }, /* compat */ - { "nostr", 1, LC_MESSAGES, SRC_LINFO, + { "nostr", TYPE_STR, LC_MESSAGES, SRC_LINFO, NOSTR, "(POSIX legacy)" } /* compat */ }; @@ -610,13 +616,20 @@ showlocale(void) } char * -format_grouping(const char *binary) +format_grouping(char *binary) { static char rval[64]; const char *cp; size_t roff; int len; + /* + * XXX This check will need to be modified if/when localeconv() is + * fixed (PR172215). + */ + if (*binary == CHAR_MAX) + return (binary); + rval[0] = '\0'; roff = 0; for (cp = binary; *cp != '\0'; ++cp) { @@ -752,7 +765,7 @@ kwval_ltime(int id) e_item = ABMON_12; break; case KW_TIME_AM_PM: - if (asprintf(&rval, "%s\";\"%s", + if (asprintf(&rval, "%s;%s", nl_langinfo(AM_STR), nl_langinfo(PM_STR)) == -1) err(1, "asprintf"); @@ -763,11 +776,9 @@ kwval_ltime(int id) if (kwsbuf == NULL) err(1, "sbuf"); for (i = s_item; i <= e_item; i++) { - if (i != s_item) - (void) sbuf_cat(kwsbuf, "\""); (void) sbuf_cat(kwsbuf, nl_langinfo(i)); if (i != e_item) - (void) sbuf_cat(kwsbuf, "\";"); + (void) sbuf_cat(kwsbuf, ";"); } (void) sbuf_finish(kwsbuf); rval = strdup(sbuf_data(kwsbuf)); @@ -781,10 +792,11 @@ kwval_ltime(int id) * keyword value and properties lookup */ int -kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr, int *alloc) +kwval_lookup(const char *kwname, char **kwval, int *cat, int *type, int *alloc) { int rval; size_t i; + static char nastr[3] = "-1"; rval = 0; *alloc = 0; @@ -792,13 +804,22 @@ kwval_lookup(const char *kwname, char **kwval, int *ca if (strcasecmp(kwname, kwinfo[i].name) == 0) { rval = 1; *cat = kwinfo[i].catid; - *isstr = kwinfo[i].isstr; + *type = kwinfo[i].type; switch (kwinfo[i].source) { case SRC_LINFO: *kwval = nl_langinfo(kwinfo[i].value_ref); break; case SRC_LCONV: *kwval = kwval_lconv(kwinfo[i].value_ref); + /* + * XXX This check will need to be modified + * if/when localeconv() is fixed (PR172215). + */ + if (**kwval == CHAR_MAX) { + if (*type == TYPE_NUM) + *type = TYPE_UNQ; + *kwval = nastr; + } break; case SRC_LTIME: *kwval = kwval_ltime(kwinfo[i].value_ref); @@ -819,10 +840,10 @@ kwval_lookup(const char *kwname, char **kwval, int *ca void showdetails(const char *kw) { - int isstr, cat, tmpval, alloc; + int type, cat, tmpval, alloc; char *kwval; - if (kwval_lookup(kw, &kwval, &cat, &isstr, &alloc) == 0) { + if (kwval_lookup(kw, &kwval, &cat, &type, &alloc) == 0) { /* * invalid keyword specified. * XXX: any actions? @@ -839,20 +860,30 @@ showdetails(const char *kw) } if (prt_keywords) { - if (isstr) { - printf("%s=\"%s\"\n", kw, kwval); - } else { - tmpval = (char) *kwval; + switch (type) { + case TYPE_NUM: + tmpval = (char)*kwval; printf("%s=%d\n", kw, tmpval); + break; + case TYPE_STR: + printf("%s=\"%s\"\n", kw, kwval); + break; + case TYPE_UNQ: + printf("%s=%s\n", kw, kwval); + break; } } if (!prt_categories && !prt_keywords) { - if (isstr) { - printf("%s\n", kwval); - } else { - tmpval = (char) *kwval; + switch (type) { + case TYPE_NUM: + tmpval = (char)*kwval; printf("%d\n", tmpval); + break; + case TYPE_STR: + case TYPE_UNQ: + printf("%s\n", kwval); + break; } } @@ -901,7 +932,7 @@ showkeywordslist(char *substring) printf(FMT, kwinfo[i].name, lookup_localecat(kwinfo[i].catid), - (kwinfo[i].isstr == 0) ? "number" : "string", + (kwinfo[i].type == TYPE_NUM) ? "number" : "string", kwinfo[i].comment); } } Modified: head/usr.bin/locale/tests/Makefile ============================================================================== --- head/usr.bin/locale/tests/Makefile Wed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/tests/Makefile Wed Sep 11 15:39:28 2019 (r352214) @@ -8,5 +8,9 @@ ${PACKAGE}FILES+= k_flag_posix_monetary.out ${PACKAGE}FILES+= k_flag_posix_numeric.out ${PACKAGE}FILES+= k_flag_posix_time.out ${PACKAGE}FILES+= k_flag_posix_messages.out +${PACKAGE}FILES+= no_flags_posix_monetary.out +${PACKAGE}FILES+= no_flags_posix_numeric.out +${PACKAGE}FILES+= no_flags_posix_time.out +${PACKAGE}FILES+= no_flags_posix_messages.out .include Modified: head/usr.bin/locale/tests/k_flag_posix_monetary.out ============================================================================== --- head/usr.bin/locale/tests/k_flag_posix_monetary.out Wed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/tests/k_flag_posix_monetary.out Wed Sep 11 15:39:28 2019 (r352214) @@ -2,20 +2,20 @@ int_curr_symbol="" currency_symbol="" mon_decimal_point="" mon_thousands_sep="" -mon_grouping="127" +mon_grouping=-1 positive_sign="" negative_sign="" -int_frac_digits=127 -frac_digits=127 -p_cs_precedes=127 -p_sep_by_space=127 -n_cs_precedes=127 -n_sep_by_space=127 -p_sign_posn=127 -n_sign_posn=127 -int_p_cs_precedes=127 -int_n_cs_precedes=127 -int_p_sep_by_space=127 -int_n_sep_by_space=127 -int_p_sign_posn=127 -int_n_sign_posn=127 +int_frac_digits=-1 +frac_digits=-1 +p_cs_precedes=-1 +p_sep_by_space=-1 +n_cs_precedes=-1 +n_sep_by_space=-1 +p_sign_posn=-1 +n_sign_posn=-1 +int_p_cs_precedes=-1 +int_n_cs_precedes=-1 +int_p_sep_by_space=-1 +int_n_sep_by_space=-1 +int_p_sign_posn=-1 +int_n_sign_posn=-1 Modified: head/usr.bin/locale/tests/k_flag_posix_numeric.out ============================================================================== --- head/usr.bin/locale/tests/k_flag_posix_numeric.out Wed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/tests/k_flag_posix_numeric.out Wed Sep 11 15:39:28 2019 (r352214) @@ -1,3 +1,3 @@ decimal_point="." thousands_sep="" -grouping="127" +grouping=-1 Modified: head/usr.bin/locale/tests/k_flag_posix_time.out ============================================================================== --- head/usr.bin/locale/tests/k_flag_posix_time.out Wed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/tests/k_flag_posix_time.out Wed Sep 11 15:39:28 2019 (r352214) @@ -1,14 +1,14 @@ -abday="Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat" -day="Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday" -abmon="Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec" -mon="January";"February";"March";"April";"May";"June";"July";"August";"September";"October";"November";"December" +abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat" +day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday" +abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec" +mon="January;February;March;April;May;June;July;August;September;October;November;December" d_t_fmt="%a %b %e %H:%M:%S %Y" d_fmt="%m/%d/%y" t_fmt="%H:%M:%S" -am_pm="AM";"PM" +am_pm="AM;PM" t_fmt_ampm="%I:%M:%S %p" -era="" +era= era_d_fmt="" era_t_fmt="" era_d_t_fmt="" -alt_digits="" +alt_digits= Modified: head/usr.bin/locale/tests/locale_test.sh ============================================================================== --- head/usr.bin/locale/tests/locale_test.sh Wed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/tests/locale_test.sh Wed Sep 11 15:39:28 2019 (r352214) @@ -29,7 +29,8 @@ atf_test_case k_flag_posix k_flag_posix_head() { - atf_set "descr" "Verify -k handles all POSIX specified keywords" + atf_set "descr" \ + "Verify output of 'locale -k' for all POSIX specified keywords" } k_flag_posix_body() { @@ -92,7 +93,75 @@ k_flag_posix_body() noexpr } +atf_test_case no_flags_posix +no_flags_posix_head() +{ + atf_set "descr" \ + "Verify output of 'locale' for all POSIX specified keywords" +} +no_flags_posix_body() +{ + export LC_ALL="C" + + # LC_MONETARY + atf_check -o file:"$(atf_get_srcdir)/no_flags_posix_monetary.out" \ + locale \ + int_curr_symbol \ + currency_symbol \ + mon_decimal_point \ + mon_thousands_sep \ + mon_grouping \ + positive_sign \ + negative_sign \ + int_frac_digits \ + frac_digits \ + p_cs_precedes \ + p_sep_by_space \ + n_cs_precedes \ + n_sep_by_space \ + p_sign_posn \ + n_sign_posn \ + int_p_cs_precedes \ + int_n_cs_precedes \ + int_p_sep_by_space \ + int_n_sep_by_space \ + int_p_sign_posn \ + int_n_sign_posn + + # LC_NUMERIC + atf_check -o file:"$(atf_get_srcdir)/no_flags_posix_numeric.out" \ + locale \ + decimal_point \ + thousands_sep \ + grouping + + # LC_TIME + atf_check -o file:"$(atf_get_srcdir)/no_flags_posix_time.out" \ + locale \ + abday \ + day \ + abmon \ + mon \ + d_t_fmt \ + d_fmt \ + t_fmt \ + am_pm \ + t_fmt_ampm \ + era \ + era_d_fmt \ + era_t_fmt \ + era_d_t_fmt \ + alt_digits + + # LC_MESSAGES + atf_check -o file:"$(atf_get_srcdir)/no_flags_posix_messages.out" \ + locale \ + yesexpr \ + noexpr +} + atf_init_test_cases() { atf_add_test_case k_flag_posix + atf_add_test_case no_flags_posix } Added: head/usr.bin/locale/tests/no_flags_posix_messages.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/no_flags_posix_messages.out Wed Sep 11 15:39:28 2019 (r352214) @@ -0,0 +1,2 @@ +^[yY] +^[nN] Added: head/usr.bin/locale/tests/no_flags_posix_monetary.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/no_flags_posix_monetary.out Wed Sep 11 15:39:28 2019 (r352214) @@ -0,0 +1,21 @@ + + + + +-1 + + +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 Added: head/usr.bin/locale/tests/no_flags_posix_numeric.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/no_flags_posix_numeric.out Wed Sep 11 15:39:28 2019 (r352214) @@ -0,0 +1,3 @@ +. + +-1 Added: head/usr.bin/locale/tests/no_flags_posix_time.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/no_flags_posix_time.out Wed Sep 11 15:39:28 2019 (r352214) @@ -0,0 +1,14 @@ +Sun;Mon;Tue;Wed;Thu;Fri;Sat +Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday +Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec +January;February;March;April;May;June;July;August;September;October;November;December +%a %b %e %H:%M:%S %Y +%m/%d/%y +%H:%M:%S +AM;PM +%I:%M:%S %p + + + + + From owner-svn-src-head@freebsd.org Wed Sep 11 15:41:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02102D7937; Wed, 11 Sep 2019 15:41:37 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46T5jX6HHFz44lK; Wed, 11 Sep 2019 15:41:36 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC4598A9D; Wed, 11 Sep 2019 15:41:36 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BFfa88047553; Wed, 11 Sep 2019 15:41:36 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BFfaRr047552; Wed, 11 Sep 2019 15:41:36 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201909111541.x8BFfaRr047552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 11 Sep 2019 15:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352215 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 352215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 15:41:37 -0000 Author: rrs Date: Wed Sep 11 15:41:36 2019 New Revision: 352215 URL: https://svnweb.freebsd.org/changeset/base/352215 Log: With the recent commit of ktls, we no longer have a sb_tls_flags, its just the sb_flags. Also the ratelimit code, now that the defintion is in sockbuf.h, does not need the ktls.h file (or its predecessor). Sponsored by: Netflix Inc Modified: head/sys/netinet/tcp_ratelimit.c Modified: head/sys/netinet/tcp_ratelimit.c ============================================================================== --- head/sys/netinet/tcp_ratelimit.c Wed Sep 11 15:39:28 2019 (r352214) +++ head/sys/netinet/tcp_ratelimit.c Wed Sep 11 15:41:36 2019 (r352215) @@ -45,9 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef KERN_TLS -#include -#endif #include #include #include @@ -1069,7 +1066,7 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if return (NULL); } #ifdef KERN_TLS - if (tp->t_inpcb->inp_socket->so_snd.sb_tls_flags & SB_TLS_IFNET) { + if (tp->t_inpcb->inp_socket->so_snd.sb_flags & SB_TLS_IFNET) { /* * We currently can't do both TLS and hardware * pacing From owner-svn-src-head@freebsd.org Wed Sep 11 16:00:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9EE7D7EAE; Wed, 11 Sep 2019 16:00:03 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T66q4qxLz45Zv; Wed, 11 Sep 2019 16:00:03 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AA3A8CB5; Wed, 11 Sep 2019 16:00:03 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BG03tF055112; Wed, 11 Sep 2019 16:00:03 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BG03or055111; Wed, 11 Sep 2019 16:00:03 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201909111600.x8BG03or055111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Wed, 11 Sep 2019 16:00:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352216 - head/usr.bin/locale X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/usr.bin/locale X-SVN-Commit-Revision: 352216 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 16:00:03 -0000 Author: yuripv Date: Wed Sep 11 16:00:03 2019 New Revision: 352216 URL: https://svnweb.freebsd.org/changeset/base/352216 Log: locale: initialize variables to make gcc happy Reported by: jenkins Modified: head/usr.bin/locale/locale.c Modified: head/usr.bin/locale/locale.c ============================================================================== --- head/usr.bin/locale/locale.c Wed Sep 11 15:41:36 2019 (r352215) +++ head/usr.bin/locale/locale.c Wed Sep 11 16:00:03 2019 (r352216) @@ -745,7 +745,7 @@ kwval_ltime(int id) { char *rval; struct sbuf *kwsbuf; - nl_item i, s_item, e_item; + nl_item i, s_item = 0, e_item = 0; switch (id) { case KW_TIME_DAY: From owner-svn-src-head@freebsd.org Wed Sep 11 16:16:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9003AD89AE; Wed, 11 Sep 2019 16:16:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T6VG3GZ9z478g; Wed, 11 Sep 2019 16:16:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53E519041; Wed, 11 Sep 2019 16:16:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BGGstf066822; Wed, 11 Sep 2019 16:16:54 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BGGsrd066821; Wed, 11 Sep 2019 16:16:54 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201909111616.x8BGGsrd066821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 11 Sep 2019 16:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352218 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 352218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 16:16:54 -0000 Author: kp Date: Wed Sep 11 16:16:53 2019 New Revision: 352218 URL: https://svnweb.freebsd.org/changeset/base/352218 Log: riscv: Small fix to CPU compatibility identification fdt_is_compatible_strict() inspects the first compatible property. We need to inspect the following properties for 'riscv'. ofw_bus_node_is_compatible() does a recursive search. This patch fixes "Can't find CPU" error message when bootverbose = true. Submitted by: Nicholas O'Brien (nickisobrien_gmail.com) Reviewed by: philip, kp Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D21576 Modified: head/sys/riscv/riscv/identcpu.c Modified: head/sys/riscv/riscv/identcpu.c ============================================================================== --- head/sys/riscv/riscv/identcpu.c Wed Sep 11 16:06:05 2019 (r352217) +++ head/sys/riscv/riscv/identcpu.c Wed Sep 11 16:16:53 2019 (r352218) @@ -141,7 +141,7 @@ fill_elf_hwcap(void *dummy __unused) * ISAs, keep only the extension bits that are common to all harts. */ for (node = OF_child(node); node > 0; node = OF_peer(node)) { - if (!fdt_is_compatible_strict(node, "riscv")) { + if (!ofw_bus_node_is_compatible(node, "riscv")) { if (bootverbose) printf("fill_elf_hwcap: Can't find cpu\n"); return; From owner-svn-src-head@freebsd.org Wed Sep 11 16:24:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFAC2D8D00; Wed, 11 Sep 2019 16:24:04 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46T6fX33zpz47h2; Wed, 11 Sep 2019 16:24:04 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C9AA9202; Wed, 11 Sep 2019 16:24:04 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BGO4Nn072509; Wed, 11 Sep 2019 16:24:04 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BGO41M072508; Wed, 11 Sep 2019 16:24:04 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201909111624.x8BGO41M072508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 11 Sep 2019 16:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352219 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 352219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 16:24:04 -0000 Author: lwhsu Date: Wed Sep 11 16:24:03 2019 New Revision: 352219 URL: https://svnweb.freebsd.org/changeset/base/352219 Log: Temporarily skip flakey test case sys.kern.ptrace_test.ptrace__getppid PR: 240510 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Wed Sep 11 16:16:53 2019 (r352218) +++ head/tests/sys/kern/ptrace_test.c Wed Sep 11 16:24:03 2019 (r352219) @@ -1006,6 +1006,10 @@ ATF_TC_BODY(ptrace__getppid, tc) int cpipe[2], dpipe[2], status; char c; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/240510"); + + ATF_REQUIRE(pipe(cpipe) == 0); ATF_REQUIRE((child = fork()) != -1); From owner-svn-src-head@freebsd.org Wed Sep 11 17:01:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0D1AD9CCC; Wed, 11 Sep 2019 17:01:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T7Tm4Hv6z49Pg; Wed, 11 Sep 2019 17:01:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 767BB97F4; Wed, 11 Sep 2019 17:01:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BH1WY1093768; Wed, 11 Sep 2019 17:01:32 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BH1WaI093767; Wed, 11 Sep 2019 17:01:32 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201909111701.x8BH1WaI093767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 11 Sep 2019 17:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352220 - head/lib/libbsnmp/libbsnmp X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libbsnmp/libbsnmp X-SVN-Commit-Revision: 352220 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 17:01:32 -0000 Author: brooks Date: Wed Sep 11 17:01:31 2019 New Revision: 352220 URL: https://svnweb.freebsd.org/changeset/base/352220 Log: Avoid the use of the non-portable -D argument to ls. This was used to store the mtime of the source file in a commment in a generated header file. This is of little-to-no diagnostic value and the result doesn't even end up in the source tree. Reported by: arichardson Reviewed by: arichardson MFC after: 1 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21605 Modified: head/lib/libbsnmp/libbsnmp/Makefile Modified: head/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile Wed Sep 11 16:24:03 2019 (r352219) +++ head/lib/libbsnmp/libbsnmp/Makefile Wed Sep 11 17:01:31 2019 (r352220) @@ -26,9 +26,7 @@ MAN= asn1.3 bsnmpagent.3 bsnmpclient.3 bsnmplib.3 snmptc.h : tc.def (\ - echo -n "/* autogenerated from tc.def; ";\ - ls -l -D "%F %T" ${.ALLSRC} | awk '{printf("%s %s", $$6, $$7)}';\ - echo "*/";\ + echo "/* autogenerated from tc.def */";\ echo "#ifndef snmptc_h_1529923773";\ echo "#define snmptc_h_1529923773";\ gensnmptree -E -f <${.ALLSRC};\ From owner-svn-src-head@freebsd.org Wed Sep 11 17:04:14 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 778CED9DCC; Wed, 11 Sep 2019 17:04:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T7Xt2bTNz49my; Wed, 11 Sep 2019 17:04:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D75B9955; Wed, 11 Sep 2019 17:04:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BH4EiC096184; Wed, 11 Sep 2019 17:04:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BH4DW5096180; Wed, 11 Sep 2019 17:04:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111704.x8BH4DW5096180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 17:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352221 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 352221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 17:04:14 -0000 Author: emaste Date: Wed Sep 11 17:04:13 2019 New Revision: 352221 URL: https://svnweb.freebsd.org/changeset/base/352221 Log: linuxulator: seccomp syscall first appeared in Linux 3.17 Reference: http://man7.org/linux/man-pages/man2/seccomp.2.html Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -131,9 +131,10 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); DUMMY(kexec_file_load); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -138,8 +138,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -131,8 +131,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:01:31 2019 (r352220) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) @@ -134,8 +134,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.14: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ From owner-svn-src-head@freebsd.org Wed Sep 11 17:05:51 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CB87D9E62; Wed, 11 Sep 2019 17:05:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T7Zl1Kcrz49yC; Wed, 11 Sep 2019 17:05:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11D249956; Wed, 11 Sep 2019 17:05:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BH5o02096303; Wed, 11 Sep 2019 17:05:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BH5oF8096299; Wed, 11 Sep 2019 17:05:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111705.x8BH5oF8096299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 17:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352222 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 352222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 17:05:51 -0000 Author: emaste Date: Wed Sep 11 17:05:49 2019 New Revision: 352222 URL: https://svnweb.freebsd.org/changeset/base/352222 Log: linuxulator: memfd_create first appeared in Linux 3.17 Reference: http://man7.org/linux/man-pages/man2/memfd_create.2.html Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:05:49 2019 (r352222) @@ -131,9 +131,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(memfd_create); DUMMY(kexec_file_load); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:05:49 2019 (r352222) @@ -137,9 +137,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.15: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:05:49 2019 (r352222) @@ -130,9 +130,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.15: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:04:13 2019 (r352221) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:05:49 2019 (r352222) @@ -133,9 +133,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); From owner-svn-src-head@freebsd.org Wed Sep 11 17:29:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04CE0DA8B1; Wed, 11 Sep 2019 17:29:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T86J6Jqlz4C7S; Wed, 11 Sep 2019 17:29:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7BC09CEE; Wed, 11 Sep 2019 17:29:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BHTiok008755; Wed, 11 Sep 2019 17:29:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BHTiLD008754; Wed, 11 Sep 2019 17:29:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111729.x8BHTiLD008754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 17:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352223 - head/sys/arm64/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/arm64/linux X-SVN-Commit-Revision: 352223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 17:29:45 -0000 Author: emaste Date: Wed Sep 11 17:29:44 2019 New Revision: 352223 URL: https://svnweb.freebsd.org/changeset/base/352223 Log: linuxulator: add stub arm64 linux_genassym.c This will be fleshed out in the future but allows us to build the arm64 linuxulator using the same infrastructure as x86. Added: head/sys/arm64/linux/linux_genassym.c (contents, props changed) Added: head/sys/arm64/linux/linux_genassym.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/linux_genassym.c Wed Sep 11 17:29:44 2019 (r352223) @@ -0,0 +1,2 @@ +#include +__FBSDID("$FreeBSD$"); From owner-svn-src-head@freebsd.org Wed Sep 11 17:56:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A442CDB062; Wed, 11 Sep 2019 17:56:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T8jY3tpvz4DKd; Wed, 11 Sep 2019 17:56:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64544A22C; Wed, 11 Sep 2019 17:56:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BHunGO026379; Wed, 11 Sep 2019 17:56:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BHum6I026373; Wed, 11 Sep 2019 17:56:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909111756.x8BHum6I026373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Sep 2019 17:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352224 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 352224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 17:56:49 -0000 Author: emaste Date: Wed Sep 11 17:56:48 2019 New Revision: 352224 URL: https://svnweb.freebsd.org/changeset/base/352224 Log: Update comments and ordering in linux*_dummy.c - sort alphabetically - getcpu arrived in Linux 2.6.19 - fanotify_* arrived in 2.6.36 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/amd64/linux/linux_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -99,11 +99,13 @@ DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ DUMMY(splice); -DUMMY(tee); DUMMY(sync_file_range); +DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); +/* Linux 2.6.19: */ +DUMMY(getcpu); /* Linux 2.6.22: */ DUMMY(signalfd); /* Linux 2.6.27: */ @@ -111,7 +113,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.38: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ @@ -120,7 +122,6 @@ DUMMY(open_by_handle_at); DUMMY(clock_adjtime); /* Linux 3.0: */ DUMMY(setns); -DUMMY(getcpu); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/amd64/linux32/linux32_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -119,7 +119,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.33: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/arm64/linux/linux_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -101,17 +101,19 @@ DUMMY(migrate_pages); DUMMY(unshare); /* Linux 2.6.17: */ DUMMY(splice); -DUMMY(tee); DUMMY(sync_file_range); +DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); +/* Linux 2.6.19: */ +DUMMY(getcpu); /* Linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.38: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ @@ -120,7 +122,6 @@ DUMMY(open_by_handle_at); DUMMY(clock_adjtime); /* Linux 3.0: */ DUMMY(setns); -DUMMY(getcpu); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:29:44 2019 (r352223) +++ head/sys/i386/linux/linux_dummy.c Wed Sep 11 17:56:48 2019 (r352224) @@ -115,7 +115,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.33: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ From owner-svn-src-head@freebsd.org Wed Sep 11 18:07:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0D24DB2F9; Wed, 11 Sep 2019 18:07:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T8xb67Smz4DlP; Wed, 11 Sep 2019 18:07:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1628A3E7; Wed, 11 Sep 2019 18:07:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BI7FiE032424; Wed, 11 Sep 2019 18:07:15 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BI7FTR032423; Wed, 11 Sep 2019 18:07:15 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201909111807.x8BI7FTR032423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 11 Sep 2019 18:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352225 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 352225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 18:07:16 -0000 Author: kp Date: Wed Sep 11 18:07:15 2019 New Revision: 352225 URL: https://svnweb.freebsd.org/changeset/base/352225 Log: riscv: Add missing header r352218 missing an include statement, causing the build to fail. Submitted by: Nicholas O'Brien (nickisobrien_gmail.com) Sponsored by: Axiado Modified: head/sys/riscv/riscv/identcpu.c Modified: head/sys/riscv/riscv/identcpu.c ============================================================================== --- head/sys/riscv/riscv/identcpu.c Wed Sep 11 17:56:48 2019 (r352224) +++ head/sys/riscv/riscv/identcpu.c Wed Sep 11 18:07:15 2019 (r352225) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include #include +#include #endif char machine[] = "riscv"; From owner-svn-src-head@freebsd.org Wed Sep 11 18:08:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A63ADB3B2; Wed, 11 Sep 2019 18:08:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46T8zF00GCz4Dwt; Wed, 11 Sep 2019 18:08:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8B8FA3E9; Wed, 11 Sep 2019 18:08:40 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BI8eMi032542; Wed, 11 Sep 2019 18:08:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BI8eVi032541; Wed, 11 Sep 2019 18:08:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201909111808.x8BI8eVi032541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 11 Sep 2019 18:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352226 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 352226 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 18:08:41 -0000 Author: asomers Date: Wed Sep 11 18:08:40 2019 New Revision: 352226 URL: https://svnweb.freebsd.org/changeset/base/352226 Log: ping: fix a string in an error message MFC after: 3 days Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Wed Sep 11 18:07:15 2019 (r352225) +++ head/sbin/ping/ping.c Wed Sep 11 18:08:40 2019 (r352226) @@ -719,7 +719,7 @@ main(int argc, char *const *argv) */ caph_cache_catpages(); if (caph_enter_casper() < 0) - err(1, "cap_enter"); + err(1, "caph_enter_casper"); cap_rights_init(&rights, CAP_RECV, CAP_EVENT, CAP_SETSOCKOPT); if (caph_rights_limit(srecv, &rights) < 0) From owner-svn-src-head@freebsd.org Wed Sep 11 18:40:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C972DC722; Wed, 11 Sep 2019 18:40:06 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46T9gV1Kk0z4HBB; Wed, 11 Sep 2019 18:40:06 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DA8EA94E; Wed, 11 Sep 2019 18:40:06 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BIe5VG050564; Wed, 11 Sep 2019 18:40:05 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BIe5k2050563; Wed, 11 Sep 2019 18:40:05 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201909111840.x8BIe5k2050563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 11 Sep 2019 18:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352227 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/regex X-SVN-Commit-Revision: 352227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 18:40:06 -0000 Author: lwhsu Date: Wed Sep 11 18:40:05 2019 New Revision: 352227 URL: https://svnweb.freebsd.org/changeset/base/352227 Log: Only skip problematic test in CI env. PR: 237450 Sponsored by: The FreeBSD Foundation Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Modified: head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Wed Sep 11 18:08:40 2019 (r352226) +++ head/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Wed Sep 11 18:40:05 2019 (r352227) @@ -187,7 +187,8 @@ ATF_TC_BODY(regcomp_too_big, tc) struct rlimit limit; #if defined(__i386__) - atf_tc_skip("https://bugs.freebsd.org/237450"); + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/237450"); #endif limit.rlim_cur = limit.rlim_max = 256 * 1024 * 1024; From owner-svn-src-head@freebsd.org Wed Sep 11 18:48:26 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF842DC9D8; Wed, 11 Sep 2019 18:48:26 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46T9s657gFz4HZc; Wed, 11 Sep 2019 18:48:26 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F082AB05; Wed, 11 Sep 2019 18:48:26 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BImQUc056189; Wed, 11 Sep 2019 18:48:26 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BImQnn056188; Wed, 11 Sep 2019 18:48:26 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201909111848.x8BImQnn056188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Wed, 11 Sep 2019 18:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352228 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 352228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 18:48:26 -0000 Author: gallatin Date: Wed Sep 11 18:48:26 2019 New Revision: 352228 URL: https://svnweb.freebsd.org/changeset/base/352228 Log: Avoid unneeded call to arc4random() in syncache_add() Don't call arc4random() unconditionally to initialize sc_iss, and then when syncookies are enabled, just overwrite it with the return value from from syncookie_generate(). Instead, only call arc4random() to initialize sc_iss when syncookies are not enabled. Note that on a system under a syn flood attack, arc4random() becomes quite expensive, and the chacha_poly crypto that it calls is one of the more expensive things happening on the system. Removing this unneeded arc4random() call reduces CPU from about 40% to about 35% in my test scenario (Broadwell Xeon, 6Mpps syn flood attack). Reviewed by: rrs, tuxen, bz Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21591 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Sep 11 18:40:05 2019 (r352227) +++ head/sys/netinet/tcp_syncache.c Wed Sep 11 18:48:26 2019 (r352228) @@ -1543,7 +1543,6 @@ skip_alloc: sc->sc_todctx = todctx; #endif sc->sc_irs = th->th_seq; - sc->sc_iss = arc4random(); sc->sc_flags = 0; sc->sc_flowlabel = 0; @@ -1617,6 +1616,8 @@ skip_alloc: if (V_tcp_syncookies) sc->sc_iss = syncookie_generate(sch, sc); + else + sc->sc_iss = arc4random(); #ifdef INET6 if (autoflowlabel) { if (V_tcp_syncookies) From owner-svn-src-head@freebsd.org Wed Sep 11 18:54:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5355BDCD73; Wed, 11 Sep 2019 18:54:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46TB0Q1YjCz4J7T; Wed, 11 Sep 2019 18:54:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19550ACDF; Wed, 11 Sep 2019 18:54:46 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BIsjJm062006; Wed, 11 Sep 2019 18:54:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BIsjKc062005; Wed, 11 Sep 2019 18:54:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201909111854.x8BIsjKc062005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 11 Sep 2019 18:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352229 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 352229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 18:54:46 -0000 Author: asomers Date: Wed Sep 11 18:54:45 2019 New Revision: 352229 URL: https://svnweb.freebsd.org/changeset/base/352229 Log: ping: Verify whether a datagram timestamp was actually received. ping(8) uses SO_TIMESTAMP, which attaches a timestamp to each IP datagram at the time it's received by the kernel. Except that occasionally it doesn't. Add a check to see whether such a timestamp was actually set before trying to read it. This fixes segfaults that can happen when the kernel doesn't attach a timestamp. The bug has always existed, but prior to r351461 it manifested as an implausible round-trip-time, not a segfault. Reported by: pho MFC after: 3 days MFC-With: 351461 Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Wed Sep 11 18:48:26 2019 (r352228) +++ head/sbin/ping/ping.c Wed Sep 11 18:54:45 2019 (r352229) @@ -931,7 +931,8 @@ main(int argc, char *const *argv) continue; } #ifdef SO_TIMESTAMP - if (cmsg->cmsg_level == SOL_SOCKET && + if (cmsg != NULL && + cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_TIMESTAMP && cmsg->cmsg_len == CMSG_LEN(sizeof *tv)) { /* Copy to avoid alignment problems: */ From owner-svn-src-head@freebsd.org Wed Sep 11 19:29:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1E74DDC36; Wed, 11 Sep 2019 19:29:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46TBmj3LBfz4L7q; Wed, 11 Sep 2019 19:29:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E020B285; Wed, 11 Sep 2019 19:29:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BJTfdf080647; Wed, 11 Sep 2019 19:29:41 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BJTeV2080574; Wed, 11 Sep 2019 19:29:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201909111929.x8BJTeV2080574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 11 Sep 2019 19:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352230 - in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/fs/fuse tests/sys/fs/fusefs X-SVN-Commit-Revision: 352230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 19:29:41 -0000 Author: asomers Date: Wed Sep 11 19:29:40 2019 New Revision: 352230 URL: https://svnweb.freebsd.org/changeset/base/352230 Log: fusefs: Fix iosize for FUSE_WRITE in 7.8 compat mode When communicating with a FUSE server that implements version 7.8 (or older) of the FUSE protocol, the FUSE_WRITE request structure is 16 bytes shorter than normal. The protocol version check wasn't applied universally, leading to an extra 16 bytes being sent to such servers. The extra bytes were allocated and bzero()d, so there was no information disclosure. Reviewed by: emaste MFC after: 3 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21557 Modified: head/sys/fs/fuse/fuse_io.c head/tests/sys/fs/fusefs/mockfs.cc head/tests/sys/fs/fusefs/mockfs.hh Modified: head/sys/fs/fuse/fuse_io.c ============================================================================== --- head/sys/fs/fuse/fuse_io.c Wed Sep 11 18:54:45 2019 (r352229) +++ head/sys/fs/fuse/fuse_io.c Wed Sep 11 19:29:40 2019 (r352230) @@ -555,9 +555,17 @@ fuse_write_directbackend(struct vnode *vp, struct uio fdisp_init(&fdi, 0); while (uio->uio_resid > 0) { + size_t sizeof_fwi; + + if (fuse_libabi_geq(data, 7, 9)) { + sizeof_fwi = sizeof(*fwi); + } else { + sizeof_fwi = FUSE_COMPAT_WRITE_IN_SIZE; + } + chunksize = MIN(uio->uio_resid, data->max_write); - fdi.iosize = sizeof(*fwi) + chunksize; + fdi.iosize = sizeof_fwi + chunksize; fdisp_make_vp(&fdi, FUSE_WRITE, vp, uio->uio_td, cred); fwi = fdi.indata; @@ -567,11 +575,8 @@ fuse_write_directbackend(struct vnode *vp, struct uio fwi->write_flags = write_flags; if (fuse_libabi_geq(data, 7, 9)) { fwi->flags = fufh_type_2_fflags(fufh->fufh_type); - fwi_data = (char *)fdi.indata + sizeof(*fwi); - } else { - fwi_data = (char *)fdi.indata + - FUSE_COMPAT_WRITE_IN_SIZE; } + fwi_data = (char *)fdi.indata + sizeof_fwi; if ((err = uiomove(fwi_data, chunksize, uio))) break; @@ -629,7 +634,7 @@ retry: break; } else { /* Resend the unwritten portion of data */ - fdi.iosize = sizeof(*fwi) + diff; + fdi.iosize = sizeof_fwi + diff; /* Refresh fdi without clearing data buffer */ fdisp_refresh_vp(&fdi, FUSE_WRITE, vp, uio->uio_td, cred); Modified: head/tests/sys/fs/fusefs/mockfs.cc ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.cc Wed Sep 11 18:54:45 2019 (r352229) +++ head/tests/sys/fs/fusefs/mockfs.cc Wed Sep 11 19:29:40 2019 (r352230) @@ -155,14 +155,15 @@ void sigint_handler(int __unused sig) { // Don't do anything except interrupt the daemon's read(2) call } -void MockFS::debug_request(const mockfs_buf_in &in) +void MockFS::debug_request(const mockfs_buf_in &in, ssize_t buflen) { printf("%-11s ino=%2" PRIu64, opcode2opname(in.header.opcode), in.header.nodeid); if (verbosity > 1) { - printf(" uid=%5u gid=%5u pid=%5u unique=%" PRIu64 " len=%u", + printf(" uid=%5u gid=%5u pid=%5u unique=%" PRIu64 " len=%u" + " buflen=%zd", in.header.uid, in.header.gid, in.header.pid, - in.header.unique, in.header.len); + in.header.unique, in.header.len, buflen); } switch (in.header.opcode) { const char *name, *value; @@ -470,7 +471,7 @@ MockFS::~MockFS() { close(m_kq); } -void MockFS::audit_request(const mockfs_buf_in &in) { +void MockFS::audit_request(const mockfs_buf_in &in, ssize_t buflen) { uint32_t inlen = in.header.len; size_t fih = sizeof(in.header); switch (in.header.opcode) { @@ -478,19 +479,24 @@ void MockFS::audit_request(const mockfs_buf_in &in) { case FUSE_RMDIR: case FUSE_SYMLINK: case FUSE_UNLINK: - ASSERT_GT(inlen, fih) << "Missing request filename"; + EXPECT_GT(inlen, fih) << "Missing request filename"; + // No redundant information for checking buflen break; case FUSE_FORGET: - ASSERT_EQ(inlen, fih + sizeof(in.body.forget)); + EXPECT_EQ(inlen, fih + sizeof(in.body.forget)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_GETATTR: - ASSERT_EQ(inlen, fih + sizeof(in.body.getattr)); + EXPECT_EQ(inlen, fih + sizeof(in.body.getattr)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_SETATTR: - ASSERT_EQ(inlen, fih + sizeof(in.body.setattr)); + EXPECT_EQ(inlen, fih + sizeof(in.body.setattr)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_READLINK: - ASSERT_EQ(inlen, fih) << "Unexpected request body"; + EXPECT_EQ(inlen, fih) << "Unexpected request body"; + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_MKNOD: { @@ -499,33 +505,39 @@ void MockFS::audit_request(const mockfs_buf_in &in) { s = sizeof(in.body.mknod); else s = FUSE_COMPAT_MKNOD_IN_SIZE; - ASSERT_GE(inlen, fih + s) << "Missing request body"; - ASSERT_GT(inlen, fih + s) << "Missing request filename"; + EXPECT_GE(inlen, fih + s) << "Missing request body"; + EXPECT_GT(inlen, fih + s) << "Missing request filename"; + // No redundant information for checking buflen break; } case FUSE_MKDIR: - ASSERT_GE(inlen, fih + sizeof(in.body.mkdir)) << + EXPECT_GE(inlen, fih + sizeof(in.body.mkdir)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.mkdir)) << + EXPECT_GT(inlen, fih + sizeof(in.body.mkdir)) << "Missing request filename"; + // No redundant information for checking buflen break; case FUSE_RENAME: - ASSERT_GE(inlen, fih + sizeof(in.body.rename)) << + EXPECT_GE(inlen, fih + sizeof(in.body.rename)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.rename)) << + EXPECT_GT(inlen, fih + sizeof(in.body.rename)) << "Missing request filename"; + // No redundant information for checking buflen break; case FUSE_LINK: - ASSERT_GE(inlen, fih + sizeof(in.body.link)) << + EXPECT_GE(inlen, fih + sizeof(in.body.link)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.link)) << + EXPECT_GT(inlen, fih + sizeof(in.body.link)) << "Missing request filename"; + // No redundant information for checking buflen break; case FUSE_OPEN: - ASSERT_EQ(inlen, fih + sizeof(in.body.open)); + EXPECT_EQ(inlen, fih + sizeof(in.body.open)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_READ: - ASSERT_EQ(inlen, fih + sizeof(in.body.read)); + EXPECT_EQ(inlen, fih + sizeof(in.body.read)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_WRITE: { @@ -535,75 +547,94 @@ void MockFS::audit_request(const mockfs_buf_in &in) { s = sizeof(in.body.write); else s = FUSE_COMPAT_WRITE_IN_SIZE; - ASSERT_GE(inlen, fih + s) << "Missing request body"; // I suppose a 0-byte write should be allowed + EXPECT_GE(inlen, fih + s) << "Missing request body"; + EXPECT_EQ((size_t)buflen, fih + s + in.body.write.size); break; } case FUSE_DESTROY: case FUSE_STATFS: - ASSERT_EQ(inlen, fih); + EXPECT_EQ(inlen, fih); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_RELEASE: - ASSERT_EQ(inlen, fih + sizeof(in.body.release)); + EXPECT_EQ(inlen, fih + sizeof(in.body.release)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_FSYNC: case FUSE_FSYNCDIR: - ASSERT_EQ(inlen, fih + sizeof(in.body.fsync)); + EXPECT_EQ(inlen, fih + sizeof(in.body.fsync)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_SETXATTR: - ASSERT_GE(inlen, fih + sizeof(in.body.setxattr)) << + EXPECT_GE(inlen, fih + sizeof(in.body.setxattr)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.setxattr)) << + EXPECT_GT(inlen, fih + sizeof(in.body.setxattr)) << "Missing request attribute name"; + // No redundant information for checking buflen break; case FUSE_GETXATTR: - ASSERT_GE(inlen, fih + sizeof(in.body.getxattr)) << + EXPECT_GE(inlen, fih + sizeof(in.body.getxattr)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.getxattr)) << + EXPECT_GT(inlen, fih + sizeof(in.body.getxattr)) << "Missing request attribute name"; + // No redundant information for checking buflen break; case FUSE_LISTXATTR: - ASSERT_EQ(inlen, fih + sizeof(in.body.listxattr)); + EXPECT_EQ(inlen, fih + sizeof(in.body.listxattr)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_REMOVEXATTR: - ASSERT_GT(inlen, fih) << "Missing request attribute name"; + EXPECT_GT(inlen, fih) << "Missing request attribute name"; + // No redundant information for checking buflen break; case FUSE_FLUSH: - ASSERT_EQ(inlen, fih + sizeof(in.body.flush)); + EXPECT_EQ(inlen, fih + sizeof(in.body.flush)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_INIT: - ASSERT_EQ(inlen, fih + sizeof(in.body.init)); + EXPECT_EQ(inlen, fih + sizeof(in.body.init)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_OPENDIR: - ASSERT_EQ(inlen, fih + sizeof(in.body.opendir)); + EXPECT_EQ(inlen, fih + sizeof(in.body.opendir)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_READDIR: - ASSERT_EQ(inlen, fih + sizeof(in.body.readdir)); + EXPECT_EQ(inlen, fih + sizeof(in.body.readdir)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_RELEASEDIR: - ASSERT_EQ(inlen, fih + sizeof(in.body.releasedir)); + EXPECT_EQ(inlen, fih + sizeof(in.body.releasedir)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_GETLK: - ASSERT_EQ(inlen, fih + sizeof(in.body.getlk)); + EXPECT_EQ(inlen, fih + sizeof(in.body.getlk)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_SETLK: case FUSE_SETLKW: - ASSERT_EQ(inlen, fih + sizeof(in.body.setlk)); + EXPECT_EQ(inlen, fih + sizeof(in.body.setlk)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_ACCESS: - ASSERT_EQ(inlen, fih + sizeof(in.body.access)); + EXPECT_EQ(inlen, fih + sizeof(in.body.access)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_CREATE: - ASSERT_GE(inlen, fih + sizeof(in.body.create)) << + EXPECT_GE(inlen, fih + sizeof(in.body.create)) << "Missing request body"; - ASSERT_GT(inlen, fih + sizeof(in.body.create)) << + EXPECT_GT(inlen, fih + sizeof(in.body.create)) << "Missing request filename"; + // No redundant information for checking buflen break; case FUSE_INTERRUPT: - ASSERT_EQ(inlen, fih + sizeof(in.body.interrupt)); + EXPECT_EQ(inlen, fih + sizeof(in.body.interrupt)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_BMAP: - ASSERT_EQ(inlen, fih + sizeof(in.body.bmap)); + EXPECT_EQ(inlen, fih + sizeof(in.body.bmap)); + EXPECT_EQ((size_t)buflen, inlen); break; case FUSE_NOTIFY_REPLY: case FUSE_BATCH_FORGET: @@ -618,10 +649,13 @@ void MockFS::audit_request(const mockfs_buf_in &in) { } void MockFS::init(uint32_t flags) { + ssize_t buflen; + std::unique_ptr in(new mockfs_buf_in); std::unique_ptr out(new mockfs_buf_out); - read_request(*in); + read_request(*in, buflen); + audit_request(*in, buflen); ASSERT_EQ(FUSE_INIT, in->header.opcode); out->header.unique = in->header.unique; @@ -659,13 +693,15 @@ void MockFS::loop() { std::unique_ptr in(new mockfs_buf_in); ASSERT_TRUE(in != NULL); while (!m_quit) { + ssize_t buflen; + bzero(in.get(), sizeof(*in)); - read_request(*in); + read_request(*in, buflen); if (m_quit) break; if (verbosity > 0) - debug_request(*in); - audit_request(*in); + debug_request(*in, buflen); + audit_request(*in, buflen); if (pid_ok((pid_t)in->header.pid)) { process(*in, out); } else { @@ -766,8 +802,7 @@ void MockFS::process_default(const mockfs_buf_in& in, out.push_back(std::move(out0)); } -void MockFS::read_request(mockfs_buf_in &in) { - ssize_t res; +void MockFS::read_request(mockfs_buf_in &in, ssize_t &res) { int nready = 0; fd_set readfds; pollfd fds[1]; Modified: head/tests/sys/fs/fusefs/mockfs.hh ============================================================================== --- head/tests/sys/fs/fusefs/mockfs.hh Wed Sep 11 18:54:45 2019 (r352229) +++ head/tests/sys/fs/fusefs/mockfs.hh Wed Sep 11 19:29:40 2019 (r352230) @@ -283,8 +283,8 @@ class MockFS { /* Timestamp granularity in nanoseconds */ unsigned m_time_gran; - void audit_request(const mockfs_buf_in &in); - void debug_request(const mockfs_buf_in&); + void audit_request(const mockfs_buf_in &in, ssize_t buflen); + void debug_request(const mockfs_buf_in&, ssize_t buflen); void debug_response(const mockfs_buf_out&); /* Initialize a session after mounting */ @@ -300,8 +300,14 @@ class MockFS { /* Entry point for the daemon thread */ static void* service(void*); - /* Read, but do not process, a single request from the kernel */ - void read_request(mockfs_buf_in& in); + /* + * Read, but do not process, a single request from the kernel + * + * @param in Return storage for the FUSE request + * @param res Return value of read(2). If positive, the amount of + * data read from the fuse device. + */ + void read_request(mockfs_buf_in& in, ssize_t& res); /* Write a single response back to the kernel */ void write_response(const mockfs_buf_out &out); From owner-svn-src-head@freebsd.org Wed Sep 11 19:48:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37D95DE5F2; Wed, 11 Sep 2019 19:48:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46TCBT0hkKz4M74; Wed, 11 Sep 2019 19:48:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFCD3B65D; Wed, 11 Sep 2019 19:48:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BJmWEW092484; Wed, 11 Sep 2019 19:48:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BJmWZn092483; Wed, 11 Sep 2019 19:48:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201909111948.x8BJmWZn092483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 11 Sep 2019 19:48:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352231 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 352231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 19:48:33 -0000 Author: asomers Date: Wed Sep 11 19:48:32 2019 New Revision: 352231 URL: https://svnweb.freebsd.org/changeset/base/352231 Log: getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable When SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp as ancillary data to each IP datagram that is received on the socket. However, it may fail, for example due to insufficient memory. In that case the packet will still be received but not timestamp will be attached. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21607 Modified: head/lib/libc/sys/getsockopt.2 Modified: head/lib/libc/sys/getsockopt.2 ============================================================================== --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 (r352230) +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 (r352231) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd February 10, 2019 +.Dd September 11, 2019 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -431,7 +431,8 @@ option is enabled on a .Dv SOCK_DGRAM socket, the .Xr recvmsg 2 -call will return a timestamp corresponding to when the datagram was received. +call may return a timestamp corresponding to when the datagram was received. +However, it may not, for example due to a resource shortage. The .Va msg_control field in the From owner-svn-src-head@freebsd.org Wed Sep 11 21:16:25 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 940BCE03A1; Wed, 11 Sep 2019 21:16:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46TF7s3NK3z4Qtb; Wed, 11 Sep 2019 21:16:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f44.google.com with SMTP id j4so49347685iog.11; Wed, 11 Sep 2019 14:16:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=80gqsFFEdrW1j703C+twV70Opz7niJM44d541YSEXT4=; b=rTKmDUweOjrlrjjvJKzEYHbKpGE0se5O+1LajRS18i3Avvqd5Wpsu5IqU4bXHDfI+R D9nxlvJRa4fGHB3Embeqg+tiiVTU+rURNe5dC4xBHmEHO2zmc8sDLriF8Q05W1StEL9Q 0selNARo3YgGE9TA0dN3lggnrNY6Ofels7vz/lHN6xU76Mt0Qg21eRZ0Fsd7VRGQ+lqi eWP3Gn9VQzeuwah+7wo11vSVzf35nMo4EpzZP+zR9ojMAfsvHh3ByvQNS2KI7UB5jMRI bUS1QpUGdOMv1LI2QsubXi9Af7ephHSa0yGIYUqpl6b+3ZV55Q+Iht1qYiu9E63zEomL eM0w== X-Gm-Message-State: APjAAAUAbmPV3ESvDA7PS4mRRr0xp+KhSwaC+LX29R5kZf1n0ho7E3iY fqVfrV8Sq+2IRCLxUoUwelnucTOF X-Google-Smtp-Source: APXvYqx3J1Nanm2WcAqhf4USGDICd5kJgsASKf8wX+PFEzkFKj5ZT2L0Cl82fjCbHuJtnkkLsWddhQ== X-Received: by 2002:a6b:8b50:: with SMTP id n77mr44318156iod.195.1568236583862; Wed, 11 Sep 2019 14:16:23 -0700 (PDT) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com. [209.85.166.48]) by smtp.gmail.com with ESMTPSA id d1sm18008387iok.17.2019.09.11.14.16.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Sep 2019 14:16:23 -0700 (PDT) Received: by mail-io1-f48.google.com with SMTP id k13so34155208ioj.1; Wed, 11 Sep 2019 14:16:23 -0700 (PDT) X-Received: by 2002:a5d:8599:: with SMTP id f25mr39297518ioj.265.1568236583509; Wed, 11 Sep 2019 14:16:23 -0700 (PDT) MIME-Version: 1.0 References: <201909111848.x8BImQnn056188@repo.freebsd.org> In-Reply-To: <201909111848.x8BImQnn056188@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 11 Sep 2019 14:16:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r352228 - head/sys/netinet To: Andrew Gallatin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 46TF7s3NK3z4Qtb X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 21:16:25 -0000 Small nitpick: On Wed, Sep 11, 2019 at 11:48 AM Andrew Gallatin wro= te: > Note that on a system under a syn flood attack, arc4random() > becomes quite expensive, and the chacha_poly crypto that it calls arc4random uses chacha20 =E2=80=94 there is no "poly" involved. Best, Conrad From owner-svn-src-head@freebsd.org Wed Sep 11 21:24:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 870D6E07A7; Wed, 11 Sep 2019 21:24:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46TFJx31HMz4RPG; Wed, 11 Sep 2019 21:24:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B06DCA23; Wed, 11 Sep 2019 21:24:17 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8BLOHdk051613; Wed, 11 Sep 2019 21:24:17 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8BLOFtt051601; Wed, 11 Sep 2019 21:24:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201909112124.x8BLOFtt051601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 11 Sep 2019 21:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352233 - in head: sys/fs/msdosfs sys/kern sys/sys usr.sbin/makefs/msdos X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: sys/fs/msdosfs sys/kern sys/sys usr.sbin/makefs/msdos X-SVN-Commit-Revision: 352233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 21:24:17 -0000 Author: cem Date: Wed Sep 11 21:24:14 2019 New Revision: 352233 URL: https://svnweb.freebsd.org/changeset/base/352233 Log: buf: Add B_INVALONERR flag to discard data Setting the B_INVALONERR flag before a synchronous write causes the buf cache to forcibly invalidate contents if the write fails (BIO_ERROR). This is intended to be used to allow layers above the buffer cache to make more informed decisions about when discarding dirty buffers without successful write is acceptable. As a proof of concept, use in msdosfs to handle failures to mark the on-disk 'dirty' bit during rw mount or ro->rw update. Extending this to other filesystems is left as future work. PR: 210316 Reviewed by: kib (with objections) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21539 Modified: head/sys/fs/msdosfs/fat.h head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/kern/vfs_bio.c head/sys/sys/buf.h head/usr.sbin/makefs/msdos/msdosfs_denode.c head/usr.sbin/makefs/msdos/msdosfs_fat.c head/usr.sbin/makefs/msdos/msdosfs_lookup.c head/usr.sbin/makefs/msdos/msdosfs_vfsops.c head/usr.sbin/makefs/msdos/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/fat.h ============================================================================== --- head/sys/fs/msdosfs/fat.h Wed Sep 11 20:13:38 2019 (r352232) +++ head/sys/fs/msdosfs/fat.h Wed Sep 11 21:24:14 2019 (r352233) @@ -103,7 +103,13 @@ int fatentry(int function, struct msdosfsmount *pmp, u int freeclusterchain(struct msdosfsmount *pmp, u_long startchain); int extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags); void fc_purge(struct denode *dep, u_int frcn); -int markvoldirty(struct msdosfsmount *pmp, int dirty); +int markvoldirty_upgrade(struct msdosfsmount *pmp, bool dirty, bool rw_upgrade); + +static inline int +markvoldirty(struct msdosfsmount *pmp, bool dirty) +{ + return (markvoldirty_upgrade(pmp, dirty, false)); +} #endif /* _KERNEL || MAKEFS */ #endif /* !_FS_MSDOSFS_FAT_H_ */ Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/sys/fs/msdosfs/msdosfs_fat.c Wed Sep 11 21:24:14 2019 (r352233) @@ -1117,7 +1117,7 @@ extendfile(struct denode *dep, u_long count, struct bu * ? (other errors from called routines) */ int -markvoldirty(struct msdosfsmount *pmp, int dirty) +markvoldirty_upgrade(struct msdosfsmount *pmp, bool dirty, bool rw_upgrade) { struct buf *bp; u_long bn, bo, bsize, byteoffset, fatval; @@ -1130,8 +1130,11 @@ markvoldirty(struct msdosfsmount *pmp, int dirty) if (FAT12(pmp)) return (0); - /* Can't change the bit on a read-only filesystem. */ - if (pmp->pm_flags & MSDOSFSMNT_RONLY) + /* + * Can't change the bit on a read-only filesystem, except as part of + * ro->rw upgrade. + */ + if ((pmp->pm_flags & MSDOSFSMNT_RONLY) != 0 && !rw_upgrade) return (EROFS); /* @@ -1166,6 +1169,29 @@ markvoldirty(struct msdosfsmount *pmp, int dirty) fatval |= 0x8000; putushort(&bp->b_data[bo], fatval); } + + /* + * The concern here is that a devvp may be readonly, without reporting + * itself as such through the usual channels. In that case, we'd like + * it if attempting to mount msdosfs rw didn't panic the system. + * + * markvoldirty is invoked as the first write on backing devvps when + * either msdosfs is mounted for the first time, or a ro mount is + * upgraded to rw. + * + * In either event, if a write error occurs dirtying the volume: + * - No user data has been permitted to be written to cache yet. + * - We can abort the high-level operation (mount, or ro->rw) safely. + * - We don't derive any benefit from leaving a zombie dirty buf in + * the cache that can not be cleaned or evicted. + * + * So, mark B_INVALONERR to have bwrite() -> brelse() detect that + * condition and force-invalidate our write to the block if it occurs. + * + * PR 210316 provides more context on the discovery and diagnosis of + * the problem, as well as earlier attempts to solve it. + */ + bp->b_flags |= B_INVALONERR; /* Write out the modified FAT block synchronously. */ return (bwrite(bp)); Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Wed Sep 11 21:24:14 2019 (r352233) @@ -311,16 +311,25 @@ msdosfs_mount(struct mount *mp) if (error) return (error); + /* Now that the volume is modifiable, mark it dirty. */ + error = markvoldirty_upgrade(pmp, true, true); + if (error) { + /* + * If dirtying the superblock failed, drop GEOM + * 'w' refs (we're still RO). + */ + g_topology_lock(); + (void)g_access(pmp->pm_cp, 0, -1, 0); + g_topology_unlock(); + + return (error); + } + pmp->pm_fmod = 1; pmp->pm_flags &= ~MSDOSFSMNT_RONLY; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); - - /* Now that the volume is modifiable, mark it dirty. */ - error = markvoldirty(pmp, 1); - if (error) - return (error); } } /* @@ -701,10 +710,8 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp) if (ronly) pmp->pm_flags |= MSDOSFSMNT_RONLY; else { - if ((error = markvoldirty(pmp, 1)) != 0) { - (void)markvoldirty(pmp, 0); + if ((error = markvoldirty(pmp, 1)) != 0) goto error_exit; - } pmp->pm_fmod = 1; } mp->mnt_data = pmp; Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/sys/kern/vfs_bio.c Wed Sep 11 21:24:14 2019 (r352233) @@ -2614,6 +2614,19 @@ brelse(struct buf *bp) BO_UNLOCK(bp->b_bufobj); bdirty(bp); } + + if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && + (bp->b_flags & B_INVALONERR)) { + /* + * Forced invalidation of dirty buffer contents, to be used + * after a failed write in the rare case that the loss of the + * contents is acceptable. The buffer is invalidated and + * freed. + */ + bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE; + bp->b_flags &= ~(B_ASYNC | B_CACHE); + } + if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && (bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) && !(bp->b_flags & B_INVAL)) { Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Wed Sep 11 20:13:38 2019 (r352232) +++ head/sys/sys/buf.h Wed Sep 11 21:24:14 2019 (r352233) @@ -196,6 +196,11 @@ struct buf { * may not be used with the stage 1 data write under NFS * but may be used for the commit rpc portion. * + * B_INVALONERR This flag is set on dirty buffers. It specifies that a + * write error should forcibly invalidate the buffer + * contents. This flag should be used with caution, as it + * discards data. It is incompatible with B_ASYNC. + * * B_VMIO Indicates that the buffer is tied into an VM object. * The buffer's data is always PAGE_SIZE aligned even * if b_bufsize and b_bcount are not. ( b_bufsize is @@ -226,7 +231,7 @@ struct buf { #define B_NOCACHE 0x00008000 /* Do not cache block after use. */ #define B_MALLOC 0x00010000 /* malloced b_data */ #define B_CLUSTEROK 0x00020000 /* Pagein op, so swap() can count it. */ -#define B_00040000 0x00040000 /* Available flag. */ +#define B_INVALONERR 0x00040000 /* Invalidate on write error. */ #define B_00080000 0x00080000 /* Available flag. */ #define B_00100000 0x00100000 /* Available flag. */ #define B_00200000 0x00200000 /* Available flag. */ @@ -243,7 +248,7 @@ struct buf { #define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34managed" \ "\33paging\32infreecnt\31nocopy\30b23\27relbuf\26b21\25b20" \ - "\24b19\23b18\22clusterok\21malloc\20nocache\17b14\16inval" \ + "\24b19\23invalonerr\22clusterok\21malloc\20nocache\17b14\16inval" \ "\15reuse\14noreuse\13eintr\12done\11b8\10delwri" \ "\7validsuspwrt\6cache\5deferred\4direct\3async\2needcommit\1age" Modified: head/usr.sbin/makefs/msdos/msdosfs_denode.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_denode.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/usr.sbin/makefs/msdos/msdosfs_denode.c Wed Sep 11 21:24:14 2019 (r352233) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/usr.sbin/makefs/msdos/msdosfs_fat.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_fat.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/usr.sbin/makefs/msdos/msdosfs_fat.c Wed Sep 11 21:24:14 2019 (r352233) @@ -54,6 +54,7 @@ #include #include +#include #include #include #include Modified: head/usr.sbin/makefs/msdos/msdosfs_lookup.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_lookup.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/usr.sbin/makefs/msdos/msdosfs_lookup.c Wed Sep 11 21:24:14 2019 (r352233) @@ -53,6 +53,7 @@ #include #include +#include #include #include Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Sep 11 21:24:14 2019 (r352233) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vnops.c Wed Sep 11 20:13:38 2019 (r352232) +++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c Wed Sep 11 21:24:14 2019 (r352233) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Wed Sep 11 21:50:14 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9013E0E45 for ; Wed, 11 Sep 2019 21:50:14 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46TFtt31PCz4SFX for ; Wed, 11 Sep 2019 21:50:14 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568238612; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=lnhemp8RmnbVowuzl6zsBj3dUt6KHe6AbKeDyFuKQ8gn0OcPf/valE5iQSIh/P/bcZcE44/ZWtM5z qGtrk9H+BFm9ethWWU36bAnwPOT/wqyisHAXgSGC0xy2pvOiOxlWNT1218GwpU4h+wvzQz9O6aR+yQ tT4gBJeF3EI42HmIpAr/g8AMe3C+pDwtqTv0dFE3V6S0myK1vxq/FJBN8AOHl8u9d9h/lETWB8rc0m S4lc+Hoj+Bi/iycTrx5vRRZ1bgeEiatDixvaM9WbeZDgz00jxLE7dsiETr+KD5VoXiVd3HYyYupr37 UkAYQtaLDyVPEYW74TBIJng9euJRoog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=l/dTDqAsV1kHlqTpnMmxfL3cNNYg/MSs2AtV1h0Fs6I=; b=ikuut5c73l7U4qe7yfXYTDoRoft89sGwATd9tVlGupYSWzzgDnMFm//ARftPofdKoDPuJfTDa5Kqd YKqThpLMQVxOgV8bgC0uq9N1nstMSE8fanIOr9bqQzmRFYiZ3SjXyLLG5tmm0Hq6V8s67ZwpQod6Yg AwD2lMPC4u+SywYnXNlE57/rwaaG0oz2RMb6IzJEFcIIC9oGHvO1YUao8mfV82oz4kpBUDz/bvyHOR XwnPVhV4eWpPSAekZDJW6hCO1gdCjdIdmO6UWALqTcFGYCDMre3ftivI7rTZ3/fqEnQ23VKNYNUG0K AFmanT4PJiZLPJSDEgnSpRVre37PggA== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=l/dTDqAsV1kHlqTpnMmxfL3cNNYg/MSs2AtV1h0Fs6I=; b=nhlapw1nLz47LREXB9h0J7rqg9IQwLZEui7CnRzR9Ve36n1AMVZZzZMHiGvxG2XlcJ4i/2ytToMYu 5RcSYyQIFgVDPExkQ/Cg9ztymAYSpvUGox3JwJzdyCEWkr2LfCSF65f87h6uNMYKHGO5UbXnLZGSAS nzLIUvwBkzI4uAJAfdZg3LdLgtn9py3GOaSnZGDB1eHmaUIBBr0uzPdI4E8o0EM/0Alq4k4zQ7V+ly sJU69dkEYfuGtxdv03syQnxsT6x+JpKeOQ1VBCzLPK/Wd/MpiK+bbXbuHNy+HqTCOGTo/uuQF2qyYA g+YByCqXAurB6Wr2jXVxHjTsKOGXYTw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 1ff9ce29-d4de-11e9-b67d-cdd75d6ce7a8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 1ff9ce29-d4de-11e9-b67d-cdd75d6ce7a8; Wed, 11 Sep 2019 21:50:11 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8BLo9dx074593; Wed, 11 Sep 2019 15:50:09 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> Subject: Re: svn commit: r352231 - head/lib/libc/sys From: Ian Lepore To: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 11 Sep 2019 15:50:09 -0600 In-Reply-To: <201909111948.x8BJmWZn092483@repo.freebsd.org> References: <201909111948.x8BJmWZn092483@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46TFtt31PCz4SFX X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 21:50:14 -0000 On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > Author: asomers > Date: Wed Sep 11 19:48:32 2019 > New Revision: 352231 > URL: https://svnweb.freebsd.org/changeset/base/352231 > > Log: > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > When SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp as > ancillary data to each IP datagram that is received on the socket. However, > it may fail, for example due to insufficient memory. In that case the > packet will still be received but not timestamp will be attached. > > Reviewed by: kib > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D21607 > > Modified: > head/lib/libc/sys/getsockopt.2 > > Modified: head/lib/libc/sys/getsockopt.2 > ============================================================================== > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 (r352230) > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 (r352231) > @@ -28,7 +28,7 @@ > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > .\" $FreeBSD$ > .\" > -.Dd February 10, 2019 > +.Dd September 11, 2019 > .Dt GETSOCKOPT 2 > .Os > .Sh NAME > @@ -431,7 +431,8 @@ option is enabled on a > .Dv SOCK_DGRAM > socket, the > .Xr recvmsg 2 > -call will return a timestamp corresponding to when the datagram was received. > +call may return a timestamp corresponding to when the datagram was received. > +However, it may not, for example due to a resource shortage. > The > .Va msg_control > field in the > So I guess this actually happened to someone... is it a common thing for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP and if this situation really happens and can persist for a long time, ntpd would effectively stop working. -- Ian From owner-svn-src-head@freebsd.org Wed Sep 11 21:55:34 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAA17E12A7; Wed, 11 Sep 2019 21:55:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46TG124WpWz4Sgh; Wed, 11 Sep 2019 21:55:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f46.google.com with SMTP id c195so2699318lfg.9; Wed, 11 Sep 2019 14:55:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qKsqgvGf/QFB5zoWyXHIhBPLrQIOGZoIVX4TrfSBceE=; b=rwxDvXj7smvasXr5SUv7S8raMTktV03IJy9141exAkFoUouuMQ8/VlZqUrdWePqDqo NOfXdANBbNa3bLZE4SInWjDS2RK6DfQ0QS/y0fUxl9p0ZSRx5ZSgoA2/gTQZsm3tAF/a PHJ4ta2/pWDfDcvG6pfBmFQgSPvr84FSsFyzKdemTJrassNuwSLLXHfGZp0S/iCJ3PMx WU7qf7rMvCvhJFI/tNUtXx4TP3QAfowgFvwQ1CbQZ6+46q8hHSZFbOoQA6n8L3cxwgAL AW++OPHu936s1TxbmcrfQCrm4miIVklXySFfG0S78P51DYibDfZAaNuQmLJIb4+R1B5f b4tw== X-Gm-Message-State: APjAAAW6OIb9KAdKJJtVMm4Wle5PcimA88fcaK9VXoBLSpPqOR5WkLjL edrqdQj4aJ5EQybUggMbsvAPbLequuG5O6PKa3eePA== X-Google-Smtp-Source: APXvYqwOpv9zux2IEEf4wAaNLLM1t++dsm2J+qKdrIKABbkgdnBQbfRCUDDNUb5tY+TNCnCJ5ikV0ahMCdmJizx+G/A= X-Received: by 2002:a19:cc4f:: with SMTP id c76mr25217749lfg.117.1568238932559; Wed, 11 Sep 2019 14:55:32 -0700 (PDT) MIME-Version: 1.0 References: <201909111948.x8BJmWZn092483@repo.freebsd.org> <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> In-Reply-To: <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> From: Alan Somers Date: Wed, 11 Sep 2019 15:55:20 -0600 Message-ID: Subject: Re: svn commit: r352231 - head/lib/libc/sys To: Ian Lepore , Peter Holm Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46TG124WpWz4Sgh X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 21:55:34 -0000 On Wed, Sep 11, 2019 at 3:50 PM Ian Lepore wrote: > On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > > Author: asomers > > Date: Wed Sep 11 19:48:32 2019 > > New Revision: 352231 > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > Log: > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > timestamp as > > ancillary data to each IP datagram that is received on the socket. > However, > > it may fail, for example due to insufficient memory. In that case the > > packet will still be received but not timestamp will be attached. > > > > Reviewed by: kib > > MFC after: 3 days > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > Modified: > > head/lib/libc/sys/getsockopt.2 > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > ============================================================================== > > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 > (r352230) > > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 > (r352231) > > @@ -28,7 +28,7 @@ > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > .\" $FreeBSD$ > > .\" > > -.Dd February 10, 2019 > > +.Dd September 11, 2019 > > .Dt GETSOCKOPT 2 > > .Os > > .Sh NAME > > @@ -431,7 +431,8 @@ option is enabled on a > > .Dv SOCK_DGRAM > > socket, the > > .Xr recvmsg 2 > > -call will return a timestamp corresponding to when the datagram was > received. > > +call may return a timestamp corresponding to when the datagram was > received. > > +However, it may not, for example due to a resource shortage. > > The > > .Va msg_control > > field in the > > > > So I guess this actually happened to someone... is it a common thing > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > and if this situation really happens and can persist for a long time, > ntpd would effectively stop working. > > -- Ian > pho discovered how to trigger it. If you start 50 ping processes simultaneously, sometimes a few will fail. Will ntpd be ok with a single failure, as long as the timestamp is received correctly in a subsequent packet? -Alan From owner-svn-src-head@freebsd.org Wed Sep 11 22:05:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A13C4E160F for ; Wed, 11 Sep 2019 22:05:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46TGDc1w64z4T76 for ; Wed, 11 Sep 2019 22:05:35 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568239534; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=R7N7H7Urg1ZvaaKZdL8vK1wGanENtuzCM59HHeZTP4pbbM6+3u0OpldgvrSVHypEpx2b0iq0GehXb jbGcAqk0ZFGI593AiiBK45WrqRrcgFuGYnfP+DqninsbigzWVf3fFct7Zrbcy8bMtyxDJPXhU8LBFw 03h4/hPGRquGHwY0kczp9Nw11aw7xKbW4cw+cj6SuiXFhZht+JCGnjI4xjuzZjZLe/vl7Hj3VTRFNP oy9JgFGHA2DVPGGRzg1Z4v8sluUP0S4U9W6oUhS0z9ja0N3hvq41tpRcf6Jv/h7gEr7/GfhaFV4dKy g5bxVBu3JGGNvKZep/bqbeUdGuM6Jmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=UjprSAEeNU1TmzhyEQxWiTz/5siIsZ5+QIju1i0PhAw=; b=nBTg4uAh/dFFqeEDIYAJ4aILzsTD7S1RIcweLlw8DW8KfVExR14y2Sak66bzMReQVBEcHw1HlPUkm aBIZHnghoD+2lD+VpO2F6rDmB3Xh44EU9gn+tPu7AMECv6hfkaOcGUsY8mR9Vz2Z8bnrbw2oeHX0Ng IIZdXBwq6DD2IAbFGSCgdiU0B4SRT/8+8AQ/klxzAnNtuAjHgvayl8vYpLHp04XOwt4Gc+NaF0ZhVF Mi4C9jtR+M9fyjhIuUpwM7Km3KTXCWmtltmYNrT2pEFRP2rcJIXtHBWqP6eQrNJZHHC2SYxAWofNB1 AYa7gPiGycXOsKHIbAsfzBsZStug2wQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=UjprSAEeNU1TmzhyEQxWiTz/5siIsZ5+QIju1i0PhAw=; b=P6lC5kGbWFI6i+qsQa8HoFuq9rQVnQnasjjTB8Hna3+bwUM7WBwK1fq3nZVMk/ktuJVRFfLh/y+/n 2G8ip/ZGTI7/LO8dSZ1B8R07k3OSe6ic3INRbEbPnTctzeizT9jMYkfw0+EZo1HsR41Ll59DzXAGo9 4/eNZrLy64jkaI0fNqjtE8goCCfrWBBDnwAj6KhwssR+c5QrAJ7a63Rg3Rq9Alp4PfhNnx2gs7sK9E 5d8YrYgjkjQzDIoFJpbS7L7cUTADmto+6pB8IHE/7pQEDcE+idzWmKnw7yvNM62iOiFwWVddGAqRH3 LIBJGKfRO8OseQ7T0amdtz7R2oOnEkw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 45ba74c0-d4e0-11e9-85ed-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 45ba74c0-d4e0-11e9-85ed-13b9aae3a1d2; Wed, 11 Sep 2019 22:05:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8BM5VZE074664; Wed, 11 Sep 2019 16:05:31 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r352231 - head/lib/libc/sys From: Ian Lepore To: Alan Somers , Peter Holm Cc: src-committers , svn-src-all , svn-src-head Date: Wed, 11 Sep 2019 16:05:31 -0600 In-Reply-To: References: <201909111948.x8BJmWZn092483@repo.freebsd.org> <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46TGDc1w64z4T76 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2019 22:05:36 -0000 On Wed, 2019-09-11 at 15:55 -0600, Alan Somers wrote: > On Wed, Sep 11, 2019 at 3:50 PM Ian Lepore wrote: > > > On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > > > Author: asomers > > > Date: Wed Sep 11 19:48:32 2019 > > > New Revision: 352231 > > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > > > Log: > > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > > > > timestamp as > > > ancillary data to each IP datagram that is received on the socket. > > > > However, > > > it may fail, for example due to insufficient memory. In that case the > > > packet will still be received but not timestamp will be attached. > > > > > > Reviewed by: kib > > > MFC after: 3 days > > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > > > Modified: > > > head/lib/libc/sys/getsockopt.2 > > > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > > > > > ============================================================================== > > > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 > > > > (r352230) > > > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 > > > > (r352231) > > > @@ -28,7 +28,7 @@ > > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > > .\" $FreeBSD$ > > > .\" > > > -.Dd February 10, 2019 > > > +.Dd September 11, 2019 > > > .Dt GETSOCKOPT 2 > > > .Os > > > .Sh NAME > > > @@ -431,7 +431,8 @@ option is enabled on a > > > .Dv SOCK_DGRAM > > > socket, the > > > .Xr recvmsg 2 > > > -call will return a timestamp corresponding to when the datagram was > > > > received. > > > +call may return a timestamp corresponding to when the datagram was > > > > received. > > > +However, it may not, for example due to a resource shortage. > > > The > > > .Va msg_control > > > field in the > > > > > > > So I guess this actually happened to someone... is it a common thing > > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > > and if this situation really happens and can persist for a long time, > > ntpd would effectively stop working. > > > > -- Ian > > > > pho discovered how to trigger it. If you start 50 ping processes > simultaneously, sometimes a few will fail. Will ntpd be ok with a single > failure, as long as the timestamp is received correctly in a subsequent > packet? > -Alan Yeah, nptd is resilient to missing data and intermittent comms, within reason. If it goes hours without getting a timestamp, system time would start to drift. Running 50 concurrent pings sounds like something that won't come up in the real world. :) -- Ian From owner-svn-src-head@freebsd.org Thu Sep 12 00:19:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2973DE46F6; Thu, 12 Sep 2019 00:19:19 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46TKBv12PJz4Z8p; Thu, 12 Sep 2019 00:19:19 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 012BFE865; Thu, 12 Sep 2019 00:19:19 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8C0JID7052127; Thu, 12 Sep 2019 00:19:18 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8C0JGX2052117; Thu, 12 Sep 2019 00:19:16 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201909120019.x8C0JGX2052117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Thu, 12 Sep 2019 00:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352238 - head/contrib/tzdata X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/contrib/tzdata X-SVN-Commit-Revision: 352238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 00:19:19 -0000 Author: philip Date: Thu Sep 12 00:19:16 2019 New Revision: 352238 URL: https://svnweb.freebsd.org/changeset/base/352238 Log: Import tzdata 2019c Changes: https://github.com/eggert/tz/blob/2019c/NEWS MFC after: 3 days Modified: head/contrib/tzdata/NEWS head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backzone head/contrib/tzdata/europe head/contrib/tzdata/leap-seconds.list head/contrib/tzdata/leapseconds head/contrib/tzdata/leapseconds.awk head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica head/contrib/tzdata/theory.html head/contrib/tzdata/version Modified: head/contrib/tzdata/NEWS ============================================================================== --- head/contrib/tzdata/NEWS Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/NEWS Thu Sep 12 00:19:16 2019 (r352238) @@ -1,5 +1,80 @@ News for the tz database +Release 2019c - 2019-09-11 08:59:48 -0700 + + Briefly: + Fiji observes DST from 2019-11-10 to 2020-01-12. + Norfolk Island starts observing Australian-style DST. + + Changes to future timestamps + + Fiji's next DST transitions will be 2019-11-10 and 2020-01-12 + instead of 2019-11-03 and 2020-01-19. (Thanks to Raymond Kumar.) + Adjust future guesses accordingly. + + Norfolk Island will observe Australian-style DST starting in + spring 2019. The first transition is on 2019-10-06. (Thanks to + Kyle Czech and Michael Deckers.) + + Changes to past timestamps + + Many corrections to time in Turkey from 1940 through 1985. + (Thanks to Oya Vulaş via Alois Treindl, and to Kıvanç Yazan.) + + The Norfolk Island 1975-03-02 transition was at 02:00 standard + time, not 02:00 DST. (Thanks to Michael Deckers.) + + South Korea observed DST from 1948 through 1951. Although this + info was supposed to appear in release 2014j, a typo inadvertently + suppressed the change. (Thanks to Alois Treindl.) + + Detroit observed DST in 1967 and 1968 following the US DST rules, + except that its 1967 DST began on June 14 at 00:01. (Thanks to + Alois Treindl for pointing out that the old data entries were + probably wrong.) + + Fix several errors in pre-1970 transitions in Perry County, IN. + (Thanks to Alois Triendl for pointing out the 1967/9 errors.) + + Edmonton did not observe DST in 1967 or 1969. In 1946 Vancouver + ended DST on 09-29 not 10-13, and Vienna ended DST on 10-07 not + 10-06. In 1945 Königsberg (now Kaliningrad) switched from +01/+02 + to +02/+03 on 04-10 not 01-01, and its +02/+03 is abbreviated + EET/EEST, not CET/CEST. (Thanks to Alois Triendl.) In 1946 + Königsberg switched to +03 on 04-07 not 01-01. + + In 1946 Louisville switched from CST to CDT on 04-28 at 00:01, not + 01-01 at 00:00. (Thanks to Alois Treindl and Michael Deckers.) + Also, it switched from CST to CDT on 1950-04-30, not 1947-04-27. + + The 1892-05-01 transition in Brussels was at 00:17:30, not at noon. + (Thanks to Michael Deckers.) + + Changes to past time zone abbreviations and DST flags + + Hong Kong Winter Time, observed from 1941-10-01 to 1941-12-25, + is now flagged as DST and is abbreviated HKWT not HKT. + + Changes to code + + leapseconds.awk now relies only on its input data, rather than + also relying on its comments. (Inspired by code from Dennis + Ferguson and Chris Woodbury.) + + The code now defends against CRLFs in leap-seconds.list. + (Thanks to Brian Inglis and Chris Woodbury.) + + Changes to documentation and commentary + + theory.html discusses leap seconds. (Thanks to Steve Summit.) + + Nashville's newspapers dueled about the time of day in the 1950s. + (Thanks to John Seigenthaler.) + + Liechtenstein observed Swiss DST in 1941/2. + (Thanks to Alois Treindl.) + + Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/asia Thu Sep 12 00:19:16 2019 (r352238) @@ -8,7 +8,7 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2018-06-19): +# From Paul Eggert (2019-07-11): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), @@ -47,13 +47,13 @@ # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 PST PDT* Philippine Standard Time +# 8:00 HKT HKST Hong Kong (HKWT* for Winter Time in late 1941) +# 8:00 PST PDT* Philippines # 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea when at +09 -# 9:30 ACST Australian Central Standard Time -# *I invented the abbreviation PDT; see "Philippines" below. +# *I invented the abbreviations HKWT and PDT; see below. # Otherwise, these tables typically use numeric abbreviations like +03 # and +0330 for integer hour and minute UT offsets. Although earlier # editions invented alphabetic time zone abbreviations for every @@ -653,6 +653,15 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning. # https://i.imgur.com/dge4kFJ.png +# From Paul Eggert (2019-07-11): +# "Hong Kong winter time" is considered to be daylight saving. +# "Hong Kong had adopted daylight saving on June 15 as a wartime measure, +# clocks moving forward one hour until October 1, when they would be put back +# by just half an hour for 'Hong Kong Winter time', so that daylight saving +# operated year round." -- Low Z. The longest day: when wartime Hong Kong +# introduced daylight saving. South China Morning Post. 2019-06-28. +# https://www.scmp.com/magazines/post-magazine/short-reads/article/3016281/longest-day-when-wartime-hong-kong-introduced + # From P Chan (2018-12-31): # * According to the Hong Kong Daylight-Saving Regulations, 1941, the # 1941 spring-forward transition was at 03:00. @@ -754,7 +763,7 @@ Rule HK 1979 only - Oct 21 3:30 0 - Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42 8:00 - HKT 1941 Jun 15 3:00 8:00 1:00 HKST 1941 Oct 1 4:00 - 8:30 - HKT 1941 Dec 25 + 8:00 0:30 HKWT 1941 Dec 25 9:00 - JST 1945 Nov 18 2:00 8:00 HK HK%sT @@ -2419,7 +2428,7 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 9:00 - JST 1945 Sep 8 - 9:00 - KST 1954 Mar 21 + 9:00 ROK K%sT 1954 Mar 21 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 @@ -3604,7 +3613,7 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2 # and in South Vietnam in particular (after 1954): # To 07:00 on 1911-05-01. # To 08:00 on 1942-12-31 at 23:00. -# To 09:00 in 1945-03-14 at 23:00. +# To 09:00 on 1945-03-14 at 23:00. # To 07:00 on 1945-09-02 in Vietnam. # To 08:00 on 1947-04-01 in French-controlled Indochina. # To 07:00 on 1955-07-01 in South Vietnam. Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/australasia Thu Sep 12 00:19:16 2019 (r352238) @@ -367,13 +367,18 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 # From Raymond Kumar (2018-07-13): # http://www.fijitimes.com/government-approves-2018-daylight-saving/ # ... The daylight saving period will end at 3am on Sunday January 13, 2019. -# -# From Paul Eggert (2018-07-15): -# For now, guess DST from 02:00 the first Sunday in November to 03:00 -# the first Sunday on or after January 13. January transitions reportedly + +# From Paul Eggert (2019-08-06): +# Today Raymond Kumar reported the Government of Fiji Gazette Supplement No. 27 +# (2019-08-02) said that Fiji observes DST "commencing at 2.00 am on +# Sunday, 10 November 2019 and ending at 3.00 am on Sunday, 12 January 2020." +# For now, guess DST from 02:00 the second Sunday in November to 03:00 +# the first Sunday on or after January 12. January transitions reportedly # depend on when school terms start. Although the guess is ad hoc, it matches -# transitions since late 2014 and seems more likely to match future -# practice than guessing no DST. +# transitions planned this year and seems more likely to match future practice +# than guessing no DST. +# From Michael Deckers (2019-08-06): +# https://www.laws.gov.fj/LawsAsMade/downloadfile/848 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 - @@ -384,8 +389,9 @@ Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 - Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 - Rule Fiji 2014 only - Jan Sun>=18 2:00 0 - -Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 - -Rule Fiji 2015 max - Jan Sun>=13 3:00 0 - +Rule Fiji 2014 2018 - Nov Sun>=1 2:00 1:00 - +Rule Fiji 2015 max - Jan Sun>=12 3:00 0 - +Rule Fiji 2019 max - Nov Sun>=8 2:00 1:00 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva 12:00 Fiji +12/+13 @@ -604,10 +610,11 @@ Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston 11:12 - +1112 1951 - 11:30 - +1130 1974 Oct 27 02:00 - 11:30 1:00 +1230 1975 Mar 2 02:00 - 11:30 - +1130 2015 Oct 4 02:00 - 11:00 - +11 + 11:30 - +1130 1974 Oct 27 02:00s + 11:30 1:00 +1230 1975 Mar 2 02:00s + 11:30 - +1130 2015 Oct 4 02:00s + 11:00 - +11 2019 Jul + 11:00 AN +11/+12 # Palau (Belau) # Zone NAME STDOFF RULES FORMAT [UNTIL] @@ -1875,12 +1882,21 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # ... at 12.30 am (by legal time in New South Wales) on 4 October 2015. # http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf -# From Paul Eggert (2015-09-23): +# From Paul Eggert (2019-08-28): # Transitions before 2015 are from timeanddate.com, which consulted # the Norfolk Island Museum and the Australian Bureau of Meteorology's # Norfolk Island station, and found no record of Norfolk observing DST # other than in 1974/5. See: # https://www.timeanddate.com/time/australia/norfolk-island.html +# However, disagree with timeanddate about the 1975-03-02 transition; +# timeanddate has 02:00 but 02:00s corresponds to what the NSW law said +# (thanks to Michael Deckers). + +# Norfolk started observing Australian DST in spring 2019. +# From Kyle Czech (2019-08-13): +# https://www.legislation.gov.au/Details/F2018L01702 +# From Michael Deckers (2019-08-14): +# https://www.legislation.gov.au/Details/F2019C00010 # Palau # See commentary for Micronesia. Modified: head/contrib/tzdata/backzone ============================================================================== --- head/contrib/tzdata/backzone Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/backzone Thu Sep 12 00:19:16 2019 (r352238) @@ -507,19 +507,35 @@ Zone Asia/Muscat 3:54:24 - LMT 1920 #Zone Asia/Panaji [not enough info to complete] # Cambodia -# From Paul Eggert (2014-10-11): -# See Asia/Ho_Chi_Minh for the source for most of this data. Also, guess -# (1) Cambodia reverted to UT +07 on 1945-09-02, when Vietnam did, and -# (2) they also reverted to +07 on 1953-11-09, the date of independence. -# These guesses are probably wrong but they're better than guessing no -# transitions there. + +# From an adoptive daughter of the late Cambodian ruler Prince Sihanouk, +# via Alois Treindl (2019-08-08): +# +# King Sihanouk said that, during the Japanese occupation, starting with +# what historians refer to as "le coup de force du 9 mars 1945", Cambodia, +# like the entire French Indochina, used Tokyo time zone. After Japan +# surrendered, 2 September 1945, Cambodia fell under French rule again and +# adopted Hanoi time zone again. +# +# However, on 7 January 1946, Sihanouk and Tioulong managed to obtain a +# status of "internal autonomy" from the government of Charles de Gaulle. +# Although many fields remained under the administration of the French +# (customs, taxes, justice, defence, foreign affairs, etc.), the Cambodian +# administration was responsible for religious matters and traditional +# celebrations, which included our calendar and time. The time zone was GMT +# + 7 and _no_ DST was applied. +# +# After Sihanouk and Tioulong achieved full independence, on 9 November 1953, +# GMT + 7 was maintained. + +# From Paul Eggert (2019-08-26): +# See Asia/Ho_Chi_Minh for the source for most of rest of this data. + Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jul 1 7:06:30 - PLMT 1911 May 1 7:00 - +07 1942 Dec 31 23:00 8:00 - +08 1945 Mar 14 23:00 9:00 - +09 1945 Sep 2 - 7:00 - +07 1947 Apr 1 - 8:00 - +08 1953 Nov 9 7:00 - +07 # Israel @@ -646,7 +662,7 @@ Zone Europe/Tiraspol 1:58:32 - LMT 1880 # Liechtenstein Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun - 1:00 - CET 1981 + 1:00 Swiss CE%sT 1981 1:00 EU CE%sT # Croatia Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/europe Thu Sep 12 00:19:16 2019 (r352238) @@ -821,11 +821,16 @@ Zone Europe/Andorra 0:06:04 - LMT 1901 # Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV, # and guess 02:00 for 1945-04-12. +# From Alois Triendl (2019-07-22): +# In 1946 the end of DST was on Monday, 7 October 1946, at 3:00 am. +# Shanks had this right. Source: Die Weltpresse, 5. Oktober 1946, page 5. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Austria 1920 only - Apr 5 2:00s 1:00 S Rule Austria 1920 only - Sep 13 2:00s 0 - Rule Austria 1946 only - Apr 14 2:00s 1:00 S -Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 - +Rule Austria 1946 only - Oct 7 2:00s 0 - +Rule Austria 1947 1948 - Oct Sun>=1 2:00s 0 - Rule Austria 1947 only - Apr 6 2:00s 1:00 S Rule Austria 1948 only - Apr 18 2:00s 1:00 S Rule Austria 1980 only - Apr 6 0:00 1:00 S @@ -875,15 +880,35 @@ Zone Europe/Minsk 1:50:16 - LMT 1880 # Belgium # -# From Paul Eggert (1997-07-02): +# From Michael Deckers (2019-08-25): +# The exposition in the web page +# https://www.bestor.be/wiki/index.php/Voyager_dans_le_temps._L%E2%80%99introduction_de_la_norme_de_Greenwich_en_Belgique +# gives several contemporary sources from which one can conclude that +# the switch in Europe/Brussels on 1892-05-01 was from 00:17:30 to 00:00:00. +# +# From Paul Eggert (2019-08-28): +# This quote helps explain the late-1914 situation: +# In early November 1914, the Germans imposed the time zone used in central +# Europe and forced the inhabitants to set their watches and public clocks +# sixty minutes ahead. Many were reluctant to accept "German time" and +# continued to use "Belgian time" among themselves. Reflecting the spirit of +# resistance that arose in the population, a song made fun of this change.... +# The song ended: +# Putting your clock forward +# Will but hasten the happy hour +# When we kick out the Boches! +# See: Pluvinage G. Brussels on German time. Cahiers Bruxellois - +# Brusselse Cahiers. 2014;XLVI(1E):15-38. +# https://www.cairn.info/revue-cahiers-bruxellois-2014-1E-page-15.htm +# +# Entries from 1914 through 1917 are taken from "De tijd in België" +# . # Entries from 1918 through 1991 are taken from: # Annuaire de L'Observatoire Royal de Belgique, # Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe année, 1991 # (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC), # pp 8-9. -# LMT before 1892 was 0:17:30, according to the official journal of Belgium: -# Moniteur Belge, Samedi 30 Avril 1892, N.121. -# Thanks to Pascal Delmoitie for these references. +# Thanks to Pascal Delmoitie for the 1918/1991 references. # The 1918 rules are listed for completeness; they apply to unoccupied Belgium. # Assume Brussels switched to WET in 1918 when the armistice took effect. # @@ -928,7 +953,7 @@ Rule Belgium 1946 only - May 19 2:00s 1:00 S Rule Belgium 1946 only - Oct 7 2:00s 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Brussels 0:17:30 - LMT 1880 - 0:17:30 - BMT 1892 May 1 12:00 # Brussels MT + 0:17:30 - BMT 1892 May 1 00:17:30 0:00 - WET 1914 Nov 8 1:00 - CET 1916 May 1 0:00 1:00 C-Eur CE%sT 1918 Nov 11 11:00u @@ -1627,6 +1652,13 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908 # advanced to sixty minutes later starting at hour two on 1944-04-02; ... # Starting at hour three on the date 1944-09-17 standard time will be resumed. # +# From Alois Triendl (2019-07-02): +# I spent 6 Euros to buy two archive copies of Il Messaggero, a Roman paper, +# for 1 and 2 April 1944. The edition of 2 April has this note: "Tonight at 2 +# am, put forward the clock by one hour. Remember that in the night between +# today and Monday the 'ora legale' will come in force again." That makes it +# clear that in Rome the change was on Monday, 3 April 1944 at 2 am. +# # From Paul Eggert (2016-10-27): # Go with INRiM for DST rules, except as corrected by Inglis for 1944 # for the Kingdom of Italy. This is consistent with Renzo Baldini. @@ -1774,15 +1806,10 @@ Zone Europe/Riga 1:36:34 - LMT 1880 # From Paul Eggert (2013-09-09): # Shanks & Pottenger say Vaduz is like Zurich. -# From Alois Treindl (2013-09-18): -# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf -# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942. -# I ... translate only the last two paragraphs: -# ... during second world war, in the years 1941 and 1942, Liechtenstein -# introduced daylight saving time, adapting to Switzerland. From 1943 on -# central European time was in force throughout the year. -# From a report of the duke's government to the high council, -# regarding the introduction of a time law, of 31 May 1977. +# From Alois Treindl (2019-07-04): +# I was able to access the online archive of the Vaduz paper Vaterland ... +# I could confirm from the paper that Liechtenstein did in fact follow +# the same DST in 1941 and 1942 as Switzerland did. Link Europe/Zurich Europe/Vaduz @@ -2490,6 +2517,12 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct # Europe/Kaliningrad covers... # 39 RU-KGD Kaliningrad Oblast +# From Paul Eggert (2019-07-25): +# Although Shanks lists 1945-01-01 as the date for transition from +# +01/+02 to +02/+03, more likely this is a placeholder. Guess that +# the transition occurred at 1945-04-10 00:00, which is about when +# Königsberg surrendered to Soviet troops. (Thanks to Alois Triendl.) + # From Paul Eggert (2016-03-18): # The 1989 transition is from USSR act No. 227 (1989-03-14). @@ -2506,8 +2539,8 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct # Moscow on 1991-11-03, switched to Moscow-1 on 1992-01-19. Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr - 1:00 C-Eur CE%sT 1945 - 2:00 Poland CE%sT 1946 + 1:00 C-Eur CE%sT 1945 Apr 10 + 2:00 Poland EE%sT 1946 Apr 7 3:00 Russia MSK/MSD 1989 Mar 26 2:00s 2:00 Russia EE%sT 2011 Mar 27 2:00s 3:00 - +03 2014 Oct 26 2:00s @@ -3650,20 +3683,75 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See abo # Turkey +# From Alois Treindl (2019-08-12): +# http://www.astrolojidergisi.com/yazsaati.htm has researched the time zone +# history of Turkey, based on newspaper archives and official documents. +# From Paul Eggert (2019-08-28): +# That source (Oya Vulaş, "Türkiye'de Yaz Saati Uygulamaları") +# is used for 1940/1972, where it seems more reliable than our other +# sources. + +# From Kıvanç Yazan (2019-08-12): +# http://www.resmigazete.gov.tr/arsiv/14539.pdf#page=24 +# 1973-06-03 01:00 -> 02:00, 1973-11-04 02:00 -> 01:00 +# +# http://www.resmigazete.gov.tr/arsiv/14829.pdf#page=1 +# 1974-03-31 02:00 -> 03:00, 1974-11-03 02:00 -> 01:00 +# +# http://www.resmigazete.gov.tr/arsiv/15161.pdf#page=1 +# 1975-03-22 02:00 -> 03:00, 1975-11-02 02:00 -> 01:00 +# +# http://www.resmigazete.gov.tr/arsiv/15535_1.pdf#page=1 +# 1976-03-21 02:00 -> 03:00, 1976-10-31 02:00 -> 01:00 +# +# http://www.resmigazete.gov.tr/arsiv/15778.pdf#page=5 +# 1977-04-03 02:00 -> 03:00, 1977-10-16 02:00 -> 01:00, +# 1978-04-02 02:00 -> 03:00 (not applied, see below) +# 1978-10-15 02:00 -> 01:00 (not applied, see below) +# 1979-04-01 02:00 -> 03:00 (not applied, see below) +# 1979-10-14 02:00 -> 01:00 (not applied, see below) +# +# http://www.resmigazete.gov.tr/arsiv/16245.pdf#page=17 +# This cancels the previous decision, and repeats it only for 1978. +# 1978-04-02 02:00 -> 03:00, 1978-10-15 02:00 -> 01:00 +# (not applied due to standard TZ change below) +# +# http://www.resmigazete.gov.tr/arsiv/16331.pdf#page=3 +# This decision changes the default longitude for Turkish time zone from 30 +# degrees East to 45 degrees East. This means a standard TZ change, from +2 +# to +3. This is published & applied on 1978-06-29. At that time, Turkey was +# already on summer time (already on 45E). Hence, this new law just meant an +# "continuous summer time". Note that this was reversed in a few years. +# +# http://www.resmigazete.gov.tr/arsiv/18119_1.pdf#page=1 +# 1983-07-31 02:00 -> 03:00 (note that this jumps TZ to +4) +# 1983-10-02 02:00 -> 01:00 (back to +3) +# +# http://www.resmigazete.gov.tr/arsiv/18561.pdf (page 1 and 34) +# At this time, Turkey is still on +3 with no spring-forward on early +# 1984. This decision is published on 10/31/1984. Page 1 declares +# the decision of reverting the "default longitude change". So the +# standard time should go back to +3 (30E). And page 34 explains when +# that will happen: 1984-11-01 02:00 -> 01:00. You can think of this +# as "end of continuous summer time, change of standard time zone". +# +# http://www.resmigazete.gov.tr/arsiv/18713.pdf#page=1 +# 1985-04-20 01:00 -> 02:00, 1985-09-28 02:00 -> 01:00 + # From Kıvanç Yazan (2016-09-25): # 1) For 1986-2006, DST started at 01:00 local and ended at 02:00 local, with # no exceptions. # 2) 1994's lastSun was overridden with Mar 20 ... # Here are official papers: -# http://www.resmigazete.gov.tr/arsiv/19032.pdf - page 2 for 1986 -# http://www.resmigazete.gov.tr/arsiv/19400.pdf - page 4 for 1987 -# http://www.resmigazete.gov.tr/arsiv/19752.pdf - page 15 for 1988 -# http://www.resmigazete.gov.tr/arsiv/20102.pdf - page 6 for 1989 -# http://www.resmigazete.gov.tr/arsiv/20464.pdf - page 1 for 1990 - 1992 -# http://www.resmigazete.gov.tr/arsiv/21531.pdf - page 15 for 1993 - 1995 -# http://www.resmigazete.gov.tr/arsiv/21879.pdf - page 1 for overriding 1994 -# http://www.resmigazete.gov.tr/arsiv/22588.pdf - page 1 for 1996, 1997 -# http://www.resmigazete.gov.tr/arsiv/23286.pdf - page 10 for 1998 - 2000 +# http://www.resmigazete.gov.tr/arsiv/19032.pdf#page=2 for 1986 +# http://www.resmigazete.gov.tr/arsiv/19400.pdf#page=4 for 1987 +# http://www.resmigazete.gov.tr/arsiv/19752.pdf#page=15 for 1988 +# http://www.resmigazete.gov.tr/arsiv/20102.pdf#page=6 for 1989 +# http://www.resmigazete.gov.tr/arsiv/20464.pdf#page=1 for 1990 - 1992 +# http://www.resmigazete.gov.tr/arsiv/21531.pdf#page=15 for 1993 - 1995 +# http://www.resmigazete.gov.tr/arsiv/21879.pdf#page=1 for overriding 1994 +# http://www.resmigazete.gov.tr/arsiv/22588.pdf#page=1 for 1996, 1997 +# http://www.resmigazete.gov.tr/arsiv/23286.pdf#page=10 for 1998 - 2000 # http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2 - for 2001 # http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2 - for 2002-2006 # From Paul Eggert (2016-09-25): @@ -3747,46 +3835,36 @@ Rule Turkey 1922 only - Oct 8 0:00 0 - Rule Turkey 1924 only - May 13 0:00 1:00 S Rule Turkey 1924 1925 - Oct 1 0:00 0 - Rule Turkey 1925 only - May 1 0:00 1:00 S -Rule Turkey 1940 only - Jun 30 0:00 1:00 S -Rule Turkey 1940 only - Oct 5 0:00 0 - +Rule Turkey 1940 only - Jul 1 0:00 1:00 S +Rule Turkey 1940 only - Oct 6 0:00 0 - Rule Turkey 1940 only - Dec 1 0:00 1:00 S Rule Turkey 1941 only - Sep 21 0:00 0 - Rule Turkey 1942 only - Apr 1 0:00 1:00 S -# Whitman omits the next two transition and gives 1945 Oct 1; -# go with Shanks & Pottenger. -Rule Turkey 1942 only - Nov 1 0:00 0 - -Rule Turkey 1945 only - Apr 2 0:00 1:00 S Rule Turkey 1945 only - Oct 8 0:00 0 - Rule Turkey 1946 only - Jun 1 0:00 1:00 S Rule Turkey 1946 only - Oct 1 0:00 0 - Rule Turkey 1947 1948 - Apr Sun>=16 0:00 1:00 S -Rule Turkey 1947 1950 - Oct Sun>=2 0:00 0 - +Rule Turkey 1947 1951 - Oct Sun>=2 0:00 0 - Rule Turkey 1949 only - Apr 10 0:00 1:00 S -Rule Turkey 1950 only - Apr 19 0:00 1:00 S +Rule Turkey 1950 only - Apr 16 0:00 1:00 S Rule Turkey 1951 only - Apr 22 0:00 1:00 S -Rule Turkey 1951 only - Oct 8 0:00 0 - +# DST for 15 months; unusual but we'll let it pass. Rule Turkey 1962 only - Jul 15 0:00 1:00 S -Rule Turkey 1962 only - Oct 8 0:00 0 - +Rule Turkey 1963 only - Oct 30 0:00 0 - Rule Turkey 1964 only - May 15 0:00 1:00 S Rule Turkey 1964 only - Oct 1 0:00 0 - -Rule Turkey 1970 1972 - May Sun>=2 0:00 1:00 S -Rule Turkey 1970 1972 - Oct Sun>=2 0:00 0 - Rule Turkey 1973 only - Jun 3 1:00 1:00 S -Rule Turkey 1973 only - Nov 4 3:00 0 - +Rule Turkey 1973 1976 - Oct Sun>=31 2:00 0 - Rule Turkey 1974 only - Mar 31 2:00 1:00 S -Rule Turkey 1974 only - Nov 3 5:00 0 - -Rule Turkey 1975 only - Mar 30 0:00 1:00 S -Rule Turkey 1975 1976 - Oct lastSun 0:00 0 - -Rule Turkey 1976 only - Jun 1 0:00 1:00 S -Rule Turkey 1977 1978 - Apr Sun>=1 0:00 1:00 S -Rule Turkey 1977 only - Oct 16 0:00 0 - -Rule Turkey 1979 1980 - Apr Sun>=1 3:00 1:00 S -Rule Turkey 1979 1982 - Oct Mon>=11 0:00 0 - -Rule Turkey 1981 1982 - Mar lastSun 3:00 1:00 S -Rule Turkey 1983 only - Jul 31 0:00 1:00 S -Rule Turkey 1983 only - Oct 2 0:00 0 - -Rule Turkey 1985 only - Apr 20 0:00 1:00 S -Rule Turkey 1985 only - Sep 28 0:00 0 - +Rule Turkey 1975 only - Mar 22 2:00 1:00 S +Rule Turkey 1976 only - Mar 21 2:00 1:00 S +Rule Turkey 1977 1978 - Apr Sun>=1 2:00 1:00 S +Rule Turkey 1977 1978 - Oct Sun>=15 2:00 0 - +Rule Turkey 1978 only - Jun 29 0:00 0 - +Rule Turkey 1983 only - Jul 31 2:00 1:00 S +Rule Turkey 1983 only - Oct 2 2:00 0 - +Rule Turkey 1985 only - Apr 20 1:00s 1:00 S +Rule Turkey 1985 only - Sep 28 1:00s 0 - Rule Turkey 1986 1993 - Mar lastSun 1:00s 1:00 S Rule Turkey 1986 1995 - Sep lastSun 1:00s 0 - Rule Turkey 1994 only - Mar 20 1:00s 1:00 S @@ -3795,8 +3873,8 @@ Rule Turkey 1996 2006 - Oct lastSun 1:00s 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Istanbul 1:55:52 - LMT 1880 1:56:56 - IMT 1910 Oct # Istanbul Mean Time? - 2:00 Turkey EE%sT 1978 Oct 15 - 3:00 Turkey +03/+04 1985 Apr 20 + 2:00 Turkey EE%sT 1978 Jun 29 + 3:00 Turkey +03/+04 1984 Nov 1 2:00 2:00 Turkey EE%sT 2007 2:00 EU EE%sT 2011 Mar 27 1:00u 2:00 - EET 2011 Mar 28 1:00u Modified: head/contrib/tzdata/leap-seconds.list ============================================================================== --- head/contrib/tzdata/leap-seconds.list Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/leap-seconds.list Thu Sep 12 00:19:16 2019 (r352238) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C57 -# File expires on: 28 December 2019 +# Updated through IERS Bulletin C58 +# File expires on: 28 June 2020 # -#@ 3786480000 +#@ 3802291200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a +#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30 Modified: head/contrib/tzdata/leapseconds ============================================================================== --- head/contrib/tzdata/leapseconds Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/leapseconds Thu Sep 12 00:19:16 2019 (r352238) @@ -3,36 +3,39 @@ # This file is in the public domain. # This file is generated automatically from the data in the public-domain -# leap-seconds.list file, which can be copied from +# NIST format leap-seconds.list file, which can be copied from # -# or -# or . +# or . # For more about leap-seconds.list, please see # The NTP Timescale and Leap Seconds # . -# The International Earth Rotation and Reference Systems Service +# The rules for leap seconds are specified in Annex 1 (Time scales) of: +# Standard-frequency and time-signal emissions. +# International Telecommunication Union - Radiocommunication Sector +# (ITU-R) Recommendation TF.460-6 (02/2002) +# . +# The International Earth Rotation and Reference Systems Service (IERS) # periodically uses leap seconds to keep UTC to within 0.9 s of UT1 -# (which measures the true angular orientation of the earth in space) +# (a proxy for Earth's angle in space as measured by astronomers) # and publishes leap second data in a copyrighted file # . # See: Levine J. Coordinated Universal Time and the leap second. # URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995 # . -# There were no leap seconds before 1972, because the official mechanism -# accounting for the discrepancy between atomic time and the earth's rotation -# did not exist. The first ("1 Jan 1972") data line in leap-seconds.list +# There were no leap seconds before 1972, as no official mechanism +# accounted for the discrepancy between atomic time (TAI) and the earth's +# rotation. The first ("1 Jan 1972") data line in leap-seconds.list # does not denote a leap second; it denotes the start of the current definition # of UTC. -# The correction (+ or -) is made at the given time, so lines -# will typically look like: -# Leap YEAR MON DAY 23:59:60 + R/S -# or -# Leap YEAR MON DAY 23:59:59 - R/S - -# If the leap second is Rolling (R) the given time is local time (unused here). +# All leap-seconds are Stationary (S) at the given UTC time. +# The correction (+ or -) is made at the given time, so in the unlikely +# event of a negative leap second, a line would look like this: +# Leap YEAR MON DAY 23:59:59 - S +# Typical lines look like this: +# Leap YEAR MON DAY 23:59:60 + S Leap 1972 Jun 30 23:59:60 + S Leap 1972 Dec 31 23:59:60 + S Leap 1973 Dec 31 23:59:60 + S @@ -62,8 +65,8 @@ Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S # POSIX timestamps for the data in this file: -#updated 1467936000 -#expires 1577491200 +#updated 1467936000 (2016-07-08 00:00:00 UTC) +#expires 1593302400 (2020-06-28 00:00:00 UTC) -# Updated through IERS Bulletin C57 -# File expires on: 28 December 2019 +# Updated through IERS Bulletin C58 +# File expires on: 28 June 2020 Modified: head/contrib/tzdata/leapseconds.awk ============================================================================== --- head/contrib/tzdata/leapseconds.awk Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/leapseconds.awk Thu Sep 12 00:19:16 2019 (r352238) @@ -1,43 +1,59 @@ -# Generate the 'leapseconds' file from 'leap-seconds.list'. +# Generate zic format 'leapseconds' from NIST format 'leap-seconds.list'. # This file is in the public domain. +# This program uses awk arithmetic. POSIX requires awk to support +# exact integer arithmetic only through 10**10, which means for NTP +# timestamps this program works only to the year 2216, which is the +# year 1900 plus 10**10 seconds. However, in practice +# POSIX-conforming awk implementations invariably use IEEE-754 double +# and so support exact integers through 2**53. By the year 2216, +# POSIX will almost surely require at least 2**53 for awk, so for NTP +# timestamps this program should be good until the year 285,428,681 +# (the year 1900 plus 2**53 seconds). By then leap seconds will be +# long obsolete, as the Earth will likely slow down so much that +# there will be more than 25 hours per day and so some other scheme +# will be needed. + BEGIN { print "# Allowance for leap seconds added to each time zone file." print "" print "# This file is in the public domain." print "" print "# This file is generated automatically from the data in the public-domain" - print "# leap-seconds.list file, which can be copied from" + print "# NIST format leap-seconds.list file, which can be copied from" print "# " - print "# or " - print "# or ." + print "# or ." print "# For more about leap-seconds.list, please see" print "# The NTP Timescale and Leap Seconds" print "# ." print "" - print "# The International Earth Rotation and Reference Systems Service" + print "# The rules for leap seconds are specified in Annex 1 (Time scales) of:" + print "# Standard-frequency and time-signal emissions." + print "# International Telecommunication Union - Radiocommunication Sector" + print "# (ITU-R) Recommendation TF.460-6 (02/2002)" + print "# ." + print "# The International Earth Rotation and Reference Systems Service (IERS)" print "# periodically uses leap seconds to keep UTC to within 0.9 s of UT1" - print "# (which measures the true angular orientation of the earth in space)" + print "# (a proxy for Earth's angle in space as measured by astronomers)" print "# and publishes leap second data in a copyrighted file" print "# ." print "# See: Levine J. Coordinated Universal Time and the leap second." print "# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995" print "# ." print "" - print "# There were no leap seconds before 1972, because the official mechanism" - print "# accounting for the discrepancy between atomic time and the earth's rotation" - print "# did not exist. The first (\"1 Jan 1972\") data line in leap-seconds.list" + print "# There were no leap seconds before 1972, as no official mechanism" + print "# accounted for the discrepancy between atomic time (TAI) and the earth's" + print "# rotation. The first (\"1 Jan 1972\") data line in leap-seconds.list" print "# does not denote a leap second; it denotes the start of the current definition" - print"# of UTC." + print "# of UTC." print "" - print "# The correction (+ or -) is made at the given time, so lines" - print "# will typically look like:" - print "# Leap YEAR MON DAY 23:59:60 + R/S" - print "# or" - print "# Leap YEAR MON DAY 23:59:59 - R/S" - print "" - print "# If the leap second is Rolling (R) the given time is local time (unused here)." + print "# All leap-seconds are Stationary (S) at the given UTC time." + print "# The correction (+ or -) is made at the given time, so in the unlikely" + print "# event of a negative leap second, a line would look like this:" + print "# Leap YEAR MON DAY 23:59:59 - S" + print "# Typical lines look like this:" + print "# Leap YEAR MON DAY 23:59:60 + S" monthabbr[ 1] = "Jan" monthabbr[ 2] = "Feb" @@ -51,45 +67,34 @@ BEGIN { monthabbr[10] = "Oct" monthabbr[11] = "Nov" monthabbr[12] = "Dec" - for (i in monthabbr) { - monthnum[monthabbr[i]] = i - monthlen[i] = 31 - } - monthlen[2] = 28 - monthlen[4] = monthlen[6] = monthlen[9] = monthlen[11] = 30 + + # Strip trailing CR, in case the input has CRLF form a la NIST. + RS = "\r?\n" + + sstamp_init() } -/^#\tUpdated through/ || /^#\tFile expires on:/ { +/^#[ \t]*[Uu]pdated through/ || /^#[ \t]*[Ff]ile expires on/ { last_lines = last_lines $0 "\n" } /^#[$][ \t]/ { updated = $2 } /^#[@][ \t]/ { expires = $2 } -/^#/ { next } +/^[ \t]*#/ { next } { NTP_timestamp = $1 TAI_minus_UTC = $2 - hash_mark = $3 - one = $4 - month = $5 - year = $6 if (old_TAI_minus_UTC) { if (old_TAI_minus_UTC < TAI_minus_UTC) { sign = "23:59:60\t+" } else { sign = "23:59:59\t-" } - m = monthnum[month] - 1 - if (m == 0) { - year--; - m = 12 - } - month = monthabbr[m] - day = monthlen[m] - day += m == 2 && year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) - printf "Leap\t%s\t%s\t%s\t%s\tS\n", year, month, day, sign + sstamp_to_ymdhMs(NTP_timestamp - 1, ss_NTP) + printf "Leap\t%d\t%s\t%d\t%s\tS\n", \ + ss_year, monthabbr[ss_month], ss_mday, sign } old_TAI_minus_UTC = TAI_minus_UTC } @@ -102,7 +107,117 @@ END { print "" print "# POSIX timestamps for the data in this file:" - printf "#updated %s\n", updated - epoch_minus_NTP - printf "#expires %s\n", expires - epoch_minus_NTP + sstamp_to_ymdhMs(updated, ss_NTP) + printf "#updated %d (%.4d-%.2d-%.2d %.2d:%.2d:%.2d UTC)\n", \ + updated - epoch_minus_NTP, \ + ss_year, ss_month, ss_mday, ss_hour, ss_min, ss_sec + sstamp_to_ymdhMs(expires, ss_NTP) + printf "#expires %d (%.4d-%.2d-%.2d %.2d:%.2d:%.2d UTC)\n", \ + expires - epoch_minus_NTP, \ + ss_year, ss_month, ss_mday, ss_hour, ss_min, ss_sec + printf "\n%s", last_lines +} + +# sstamp_to_ymdhMs - convert seconds timestamp to date and time +# +# Call as: +# +# sstamp_to_ymdhMs(sstamp, epoch_days) +# +# where: +# +# sstamp - is the seconds timestamp. +# epoch_days - is the timestamp epoch in Gregorian days since 1600-03-01. +# ss_NTP is appropriate for an NTP sstamp. +# +# Both arguments should be nonnegative integers. +# On return, the following variables are set based on sstamp: +# +# ss_year - Gregorian calendar year +# ss_month - month of the year (1-January to 12-December) +# ss_mday - day of the month (1-31) +# ss_hour - hour (0-23) +# ss_min - minute (0-59) +# ss_sec - second (0-59) +# ss_wday - day of week (0-Sunday to 6-Saturday) +# +# The function sstamp_init should be called prior to using sstamp_to_ymdhMs. + +function sstamp_init() +{ + # Days in month N, where March is month 0 and January month 10. + ss_mon_days[ 0] = 31 + ss_mon_days[ 1] = 30 + ss_mon_days[ 2] = 31 + ss_mon_days[ 3] = 30 + ss_mon_days[ 4] = 31 + ss_mon_days[ 5] = 31 + ss_mon_days[ 6] = 30 + ss_mon_days[ 7] = 31 + ss_mon_days[ 8] = 30 + ss_mon_days[ 9] = 31 + ss_mon_days[10] = 31 + + # Counts of days in a Gregorian year, quad-year, century, and quad-century. + ss_year_days = 365 + ss_quadyear_days = ss_year_days * 4 + 1 + ss_century_days = ss_quadyear_days * 25 - 1 + ss_quadcentury_days = ss_century_days * 4 + 1 + + # Standard day epochs, suitable for epoch_days. + # ss_MJD = 94493 + # ss_POSIX = 135080 + ss_NTP = 109513 +} + +function sstamp_to_ymdhMs(sstamp, epoch_days, \ + quadcentury, century, quadyear, year, month, day) +{ + ss_hour = int(sstamp / 3600) % 24 + ss_min = int(sstamp / 60) % 60 + ss_sec = sstamp % 60 + + # Start with a count of days since 1600-03-01 Gregorian. + day = epoch_days + int(sstamp / (24 * 60 * 60)) + + # Compute a year-month-day date with days of the month numbered + # 0-30, months (March-February) numbered 0-11, and years that start + # start March 1 and end after the last day of February. A quad-year + # starts on March 1 of a year evenly divisible by 4 and ends after + # the last day of February 4 years later. A century starts on and + # ends before March 1 in years evenly divisible by 100. + # A quad-century starts on and ends before March 1 in years divisible + # by 400. While the number of days in a quad-century is a constant, + # the number of days in each other time period can vary by 1. + # Any variation is in the last day of the time period (there might + # or might not be a February 29) where it is easy to deal with. + + quadcentury = int(day / ss_quadcentury_days) + day -= quadcentury * ss_quadcentury_days + ss_wday = (day + 3) % 7 + century = int(day / ss_century_days) + century -= century == 4 + day -= century * ss_century_days + quadyear = int(day / ss_quadyear_days) + day -= quadyear * ss_quadyear_days + year = int(day / ss_year_days) + year -= year == 4 + day -= year * ss_year_days + for (month = 0; month < 11; month++) { + if (day < ss_mon_days[month]) + break + day -= ss_mon_days[month] + } + + # Convert the date to a conventional day of month (1-31), + # month (1-12, January-December) and Gregorian year. + ss_mday = day + 1 + if (month <= 9) { + ss_month = month + 3 + } else { + ss_month = month - 9 + year++ + } + ss_year = 1600 + quadcentury * 400 + century * 100 + quadyear * 4 + year } Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Thu Sep 12 00:15:40 2019 (r352237) +++ head/contrib/tzdata/northamerica Thu Sep 12 00:19:16 2019 (r352238) @@ -406,6 +406,31 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03 # From Paul Eggert (2015-12-25): # Assume this practice predates 1970, so Fort Pierre can use America/Chicago. +# From Paul Eggert (2015-04-06): +# In 1950s Nashville a public clock had dueling faces, one for conservatives +# and the other for liberals; the two sides didn't agree about the time of day. +# I haven't found a photo of this clock, nor have I tracked down the TIME +# magazine report cited below, but here's the story as told by the late +# American journalist John Seigenthaler, who was there: +# +# "The two [newspaper] owners held strongly contrasting political and +# ideological views. Evans was a New South liberal, Stahlman an Old South +# conservative, and their two papers frequently clashed editorially, often on +# the same day.... In the 1950s as the state legislature was grappling with +# the question of whether to approve daylight saving time for the entire state, +# TIME magazine reported: +# +# "'The Nashville Banner and The Nashville Tennessean rarely agree on anything +# but the time of day - and last week they couldn't agree on that.' +# +# "It was all too true. The clock on the front of the building had two faces - +# The Tennessean side of the building facing west, the other, east. When it +# was high noon Banner time, it was 11 a.m. Tennessean time." +# +# Seigenthaler J. For 100 years, Tennessean had it covered. +# The Tennessean 2007-05-11, republished 2015-04-06. +# https://www.tennessean.com/story/insider/extras/2015/04/06/archives-seigenthaler-for-100-years-the-tennessean-had-it-covered/25348545/ + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER Rule Chicago 1920 only - Jun 13 2:00 1:00 D Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S @@ -945,21 +970,21 @@ Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov -5:00 US E%sT # # Perry County, Indiana, switched from eastern to central time in April 2006. +# From Alois Triendl (2019-07-09): +# The Indianapolis News, Friday 27 October 1967 states that Perry County +# returned to CST. It went again to EST on 27 April 1969, as documented by the +# Indianapolis star of Saturday 26 April. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER -Rule Perry 1946 only - Apr lastSun 2:00 1:00 D -Rule Perry 1946 only - Sep lastSun 2:00 0 S -Rule Perry 1953 1954 - Apr lastSun 2:00 1:00 D -Rule Perry 1953 1959 - Sep lastSun 2:00 0 S Rule Perry 1955 only - May 1 0:00 1:00 D +Rule Perry 1955 1960 - Sep lastSun 2:00 0 S Rule Perry 1956 1963 - Apr lastSun 2:00 1:00 D -Rule Perry 1960 only - Oct lastSun 2:00 0 S -Rule Perry 1961 only - Sep lastSun 2:00 0 S -Rule Perry 1962 1963 - Oct lastSun 2:00 0 S +Rule Perry 1961 1963 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Indiana/Tell_City -5:47:03 - LMT 1883 Nov 18 12:12:57 -6:00 US C%sT 1946 -6:00 Perry C%sT 1964 Apr 26 2:00 - -5:00 - EST 1969 + -5:00 - EST 1967 Oct 29 2:00 + -6:00 US C%sT 1969 Apr 27 2:00 -5:00 US E%sT 1971 -5:00 - EST 2006 Apr 2 2:00 -6:00 US C%sT @@ -1035,16 +1060,27 @@ Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 # clear how this matched civil time in Louisville, so for now continue # to assume Louisville switched at noon new local time, like New York. # +# From Michael Deckers (2019-08-06): +# From the contemporary source given by Alois Treindl, +# the switch in Louisville on 1946-04-28 was on 00:01 +# From Paul Eggert (2019-08-26): +# That source was the Louisville Courier-Journal, 1946-04-27, p 4. +# Shanks gives 02:00 for all 20th-century transition times in Louisville. +# Evidently this is wrong for spring 1946. Although also likely wrong +# for other dates, we have no data. +# # Part of Kentucky left its clocks alone in 1974. # This also includes Clark, Floyd, and Harrison counties in Indiana. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Sep 12 00:33:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AA79E4C99; Thu, 12 Sep 2019 00:33:02 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46TKVk1l3lz4Zvd; Thu, 12 Sep 2019 00:33:02 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 055C7EC51; Thu, 12 Sep 2019 00:33:02 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8C0X1WU063589; Thu, 12 Sep 2019 00:33:01 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8C0X1Gn063588; Thu, 12 Sep 2019 00:33:01 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201909120033.x8C0X1Gn063588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Thu, 12 Sep 2019 00:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352239 - head/contrib/tzdata X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/contrib/tzdata X-SVN-Commit-Revision: 352239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 00:33:02 -0000 Author: philip Date: Thu Sep 12 00:33:01 2019 New Revision: 352239 URL: https://svnweb.freebsd.org/changeset/base/352239 Log: Restore svn:mergeinfo accidentally deleted in r352238 Pointy hat to: philip Modified: Directory Properties: head/contrib/tzdata/ (props changed) From owner-svn-src-head@freebsd.org Thu Sep 12 08:54:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BD0CEFF7A; Thu, 12 Sep 2019 08:54:50 +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 46TXdk0rHyz40ng; Thu, 12 Sep 2019 08:54:50 +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 EFD441C558; Thu, 12 Sep 2019 08:54:49 +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 x8C8snF1061208; Thu, 12 Sep 2019 08:54:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8C8smxe061200; Thu, 12 Sep 2019 08:54:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909120854.x8C8smxe061200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 12 Sep 2019 08:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352242 - in head: contrib/gdb/gdb contrib/gdb/gdb/cli gnu/usr.bin/gdb/kgdb X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: contrib/gdb/gdb contrib/gdb/gdb/cli gnu/usr.bin/gdb/kgdb X-SVN-Commit-Revision: 352242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 08:54:50 -0000 Author: bapt Date: Thu Sep 12 08:54:48 2019 New Revision: 352242 URL: https://svnweb.freebsd.org/changeset/base/352242 Log: Remove usesless readline compat includes which will reinclude readline.h itself. This simplifies the upcoming update to newer libedit. Modified: head/contrib/gdb/gdb/cli/cli-cmds.c head/contrib/gdb/gdb/cli/cli-setshow.c head/contrib/gdb/gdb/event-top.c head/contrib/gdb/gdb/top.c head/contrib/gdb/gdb/tracepoint.c head/gnu/usr.bin/gdb/kgdb/trgt.c Modified: head/contrib/gdb/gdb/cli/cli-cmds.c ============================================================================== --- head/contrib/gdb/gdb/cli/cli-cmds.c Thu Sep 12 06:26:22 2019 (r352241) +++ head/contrib/gdb/gdb/cli/cli-cmds.c Thu Sep 12 08:54:48 2019 (r352242) @@ -21,7 +21,6 @@ #include "defs.h" #include "readline/readline.h" -#include "readline/tilde.h" #include "completer.h" #include "target.h" /* For baud_rate, remote_debug and remote_timeout */ #include "gdb_wait.h" /* For shell escape implementation */ Modified: head/contrib/gdb/gdb/cli/cli-setshow.c ============================================================================== --- head/contrib/gdb/gdb/cli/cli-setshow.c Thu Sep 12 06:26:22 2019 (r352241) +++ head/contrib/gdb/gdb/cli/cli-setshow.c Thu Sep 12 08:54:48 2019 (r352242) @@ -18,7 +18,6 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" -#include "readline/tilde.h" #include "value.h" #include #include "gdb_string.h" Modified: head/contrib/gdb/gdb/event-top.c ============================================================================== --- head/contrib/gdb/gdb/event-top.c Thu Sep 12 06:26:22 2019 (r352241) +++ head/contrib/gdb/gdb/event-top.c Thu Sep 12 08:54:48 2019 (r352242) @@ -34,7 +34,6 @@ /* readline include files */ #include "readline/readline.h" -#include "readline/history.h" /* readline defines this. */ #undef savestring Modified: head/contrib/gdb/gdb/top.c ============================================================================== --- head/contrib/gdb/gdb/top.c Thu Sep 12 06:26:22 2019 (r352241) +++ head/contrib/gdb/gdb/top.c Thu Sep 12 08:54:48 2019 (r352242) @@ -48,7 +48,6 @@ /* readline include files */ #include "readline/readline.h" -#include "readline/history.h" /* readline defines this. */ #undef savestring Modified: head/contrib/gdb/gdb/tracepoint.c ============================================================================== --- head/contrib/gdb/gdb/tracepoint.c Thu Sep 12 06:26:22 2019 (r352241) +++ head/contrib/gdb/gdb/tracepoint.c Thu Sep 12 08:54:48 2019 (r352242) @@ -45,7 +45,6 @@ /* readline include files */ #include "readline/readline.h" -#include "readline/history.h" /* readline defines this. */ #undef savestring Modified: head/gnu/usr.bin/gdb/kgdb/trgt.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt.c Thu Sep 12 06:26:22 2019 (r352241) +++ head/gnu/usr.bin/gdb/kgdb/trgt.c Thu Sep 12 08:54:48 2019 (r352242) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include From owner-svn-src-head@freebsd.org Thu Sep 12 11:59:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CC2AF3B49; Thu, 12 Sep 2019 11:59:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Tcl51lL4z49pk; Thu, 12 Sep 2019 11:59:44 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9A51C26047E; Thu, 12 Sep 2019 13:59:37 +0200 (CEST) Subject: Re: svn commit: r351188 - in head/sys: kern sys To: Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201908181143.x7IBhxZO011254@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <7fc855eb-ef02-72a7-071f-4b0e13c8db30@selasky.org> Date: Thu, 12 Sep 2019 13:58:51 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <201908181143.x7IBhxZO011254@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46Tcl51lL4z49pk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-4.87 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-2.57)[ip: (-9.08), ipnet: 2a01:4f8::/29(-1.98), asn: 24940(-1.79), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 11:59:46 -0000 On 2019-08-18 13:43, Jeff Roberson wrote: > Author: jeff > Date: Sun Aug 18 11:43:58 2019 > New Revision: 351188 > URL: https://svnweb.freebsd.org/changeset/base/351188 > > Log: > Add a blocking wait bit to refcount. This allows refs to be used as a simple > barrier. > > Reviewed by: markj, kib > Discussed with: jhb > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D21254 > > Modified: > head/sys/kern/kern_synch.c > head/sys/sys/refcount.h > Hi, I would like to decouple the wait/wakeup logic from the release function, if possible. The main objection here is that we are woken up before any destructor is executed. Also this function is not Giant safe and does neither assert that it can sleep. --HPS From owner-svn-src-head@freebsd.org Thu Sep 12 12:33:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 054B1F561E; Thu, 12 Sep 2019 12:33:10 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46TdTd6L2jz4CrS; Thu, 12 Sep 2019 12:33:09 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCA131ECCD; Thu, 12 Sep 2019 12:33:09 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CCX9Z0092180; Thu, 12 Sep 2019 12:33:09 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CCX9O3092179; Thu, 12 Sep 2019 12:33:09 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201909121233.x8CCX9O3092179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 12 Sep 2019 12:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352243 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 352243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 12:33:10 -0000 Author: wulf Date: Thu Sep 12 12:33:09 2019 New Revision: 352243 URL: https://svnweb.freebsd.org/changeset/base/352243 Log: ig4(4): Fix SDA HOLD time set too low on Skylake controllers Execution of "Soft reset" command (IG4_REG_RESETS_SKL) at controller init stage sets SDA_HOLD register value to 0x0001 which is often too low for normal operation. Set SDA_HOLD back to 28 after reset to restore controller functionality. PR: 240339 Reported by: imp, GregV, et al. MFC after: 3 days Modified: head/sys/dev/ichiic/ig4_iic.c Modified: head/sys/dev/ichiic/ig4_iic.c ============================================================================== --- head/sys/dev/ichiic/ig4_iic.c Thu Sep 12 08:54:48 2019 (r352242) +++ head/sys/dev/ichiic/ig4_iic.c Thu Sep 12 12:33:09 2019 (r352243) @@ -590,6 +590,8 @@ ig4iic_attach(ig4iic_softc_t *sc) reg_write(sc, IG4_REG_SS_SCL_LCNT, 125); reg_write(sc, IG4_REG_FS_SCL_HCNT, 100); reg_write(sc, IG4_REG_FS_SCL_LCNT, 125); + if (sc->version == IG4_SKYLAKE) + reg_write(sc, IG4_REG_SDA_HOLD, 28); /* * Use a threshold of 1 so we get interrupted on each character, From owner-svn-src-head@freebsd.org Thu Sep 12 13:51:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75500F6DDD; Thu, 12 Sep 2019 13:51:44 +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 46TgDJ2ZKNz4Hjl; Thu, 12 Sep 2019 13:51:44 +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 3B76C1F99E; Thu, 12 Sep 2019 13:51:44 +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 x8CDpi07038289; Thu, 12 Sep 2019 13:51:44 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CDpi9r038288; Thu, 12 Sep 2019 13:51:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909121351.x8CDpi9r038288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 12 Sep 2019 13:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352244 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 13:51:44 -0000 Author: kevans Date: Thu Sep 12 13:51:43 2019 New Revision: 352244 URL: https://svnweb.freebsd.org/changeset/base/352244 Log: kenv: assert that an empty static buffer passed in is "empty" Garbage in the passed-in buffer can cause problems if any attempts to read the kenv are inadvertently made between init_static_kenv and the first kern_setenv -- assuming there is one. This is cheap and easy, so do it. This also helps rule out some class of bugs as one tries to debug; tunables fetch from the static environment up until SI_SUB_KMEM + 1, and many of these buffers are global ~4k buffers that rely on BSS clearing while others just grab a page of free memory and use it (e.g. xen). Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Thu Sep 12 12:33:09 2019 (r352243) +++ head/sys/kern/kern_environment.c Thu Sep 12 13:51:43 2019 (r352244) @@ -250,6 +250,8 @@ init_static_kenv(char *buf, size_t len) char *eval; KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized")); + KASSERT(len == 0 || *buf == '\0', + ("kenv: sized buffer must be initially empty")); /* * We may be called twice, with the second call needed to relocate From owner-svn-src-head@freebsd.org Thu Sep 12 14:34:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92BDDF7A6A; Thu, 12 Sep 2019 14:34:47 +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 46Th9z2lsRz4Kq3; Thu, 12 Sep 2019 14:34:47 +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 4207B20252; Thu, 12 Sep 2019 14:34:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CEYloT063538; Thu, 12 Sep 2019 14:34:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CEYlip063537; Thu, 12 Sep 2019 14:34:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909121434.x8CEYlip063537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 12 Sep 2019 14:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352245 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352245 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 14:34:47 -0000 Author: kevans Date: Thu Sep 12 14:34:46 2019 New Revision: 352245 URL: https://svnweb.freebsd.org/changeset/base/352245 Log: Follow up r352244: kenv: tighten up assertions As I like to forget: static kenv var formatting is actually such that an empty environment would be double null bytes. We should make sure that a non-zero buffer has at least enough for this, though most of the current usage is with a 4k buffer. Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Thu Sep 12 13:51:43 2019 (r352244) +++ head/sys/kern/kern_environment.c Thu Sep 12 14:34:46 2019 (r352245) @@ -250,7 +250,15 @@ init_static_kenv(char *buf, size_t len) char *eval; KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized")); - KASSERT(len == 0 || *buf == '\0', + /* + * Suitably sized means it must be able to hold at least one empty + * variable, otherwise things go belly up if a kern_getenv call is + * made without a prior call to kern_setenv as we have a malformed + * environment. + */ + KASSERT(len == 0 || len >= 2, + ("kenv: static env must be initialized or suitably sized")); + KASSERT(len == 0 || (*buf == '\0' && *(buf + 1) == '\0'), ("kenv: sized buffer must be initially empty")); /* From owner-svn-src-head@freebsd.org Thu Sep 12 15:36:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49B88D1887; Thu, 12 Sep 2019 15:36:49 +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 46TjYY1Cr2z4P3T; Thu, 12 Sep 2019 15:36:49 +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 0E39820D42; Thu, 12 Sep 2019 15:36:49 +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 x8CFamW6099424; Thu, 12 Sep 2019 15:36:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CFamqK099423; Thu, 12 Sep 2019 15:36:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909121536.x8CFamqK099423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 12 Sep 2019 15:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352246 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 352246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 15:36:49 -0000 Author: kevans Date: Thu Sep 12 15:36:48 2019 New Revision: 352246 URL: https://svnweb.freebsd.org/changeset/base/352246 Log: SIOCSIFNAME: Do nothing if we're not actually changing Instead of throwing EEXIST, just succeed if the name isn't actually changing. We don't need to trigger departure or any of that because there's no change from consumers' perspective. PR: 240539 Reviewed by: brooks MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D21618 Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Sep 12 14:34:46 2019 (r352245) +++ head/sys/net/if.c Thu Sep 12 15:36:48 2019 (r352246) @@ -2716,6 +2716,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, if (strlen(new_name) == IFNAMSIZ-1) return (EINVAL); } + if (strcmp(new_name, ifp->if_xname) == 0) + break; if (ifunit(new_name) != NULL) return (EEXIST); From owner-svn-src-head@freebsd.org Thu Sep 12 15:44:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 228C6D1CF7; Thu, 12 Sep 2019 15:44:54 +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 46Tjkt03DDz4Pcq; Thu, 12 Sep 2019 15:44:54 +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 D5D7120F0C; Thu, 12 Sep 2019 15:44:53 +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 x8CFir7H005558; Thu, 12 Sep 2019 15:44:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CFirIb005556; Thu, 12 Sep 2019 15:44:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909121544.x8CFirIb005556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 12 Sep 2019 15:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352247 - in head/usr.sbin/ntp: ntpdc ntpq X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/usr.sbin/ntp: ntpdc ntpq X-SVN-Commit-Revision: 352247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 15:44:54 -0000 Author: bapt Date: Thu Sep 12 15:44:53 2019 New Revision: 352247 URL: https://svnweb.freebsd.org/changeset/base/352247 Log: Remove useless extra definition of libedit flags Note that all the line editor part is done in the libntp Modified: head/usr.sbin/ntp/ntpdc/Makefile head/usr.sbin/ntp/ntpq/Makefile Modified: head/usr.sbin/ntp/ntpdc/Makefile ============================================================================== --- head/usr.sbin/ntp/ntpdc/Makefile Thu Sep 12 15:36:48 2019 (r352246) +++ head/usr.sbin/ntp/ntpdc/Makefile Thu Sep 12 15:44:53 2019 (r352247) @@ -18,8 +18,6 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ -I${.CURDIR:H} -I${.CURDIR} LIBADD= edit ntp m opts pthread -CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ - -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit .if ${MK_OPENSSL} != "no" LIBADD+= crypto Modified: head/usr.sbin/ntp/ntpq/Makefile ============================================================================== --- head/usr.sbin/ntp/ntpq/Makefile Thu Sep 12 15:36:48 2019 (r352246) +++ head/usr.sbin/ntp/ntpq/Makefile Thu Sep 12 15:44:53 2019 (r352247) @@ -28,9 +28,6 @@ LIBADD+= crypto LIBADD+= md .endif -CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \ - -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit - CLEANFILES+= .version version.c version.c: From owner-svn-src-head@freebsd.org Thu Sep 12 15:46:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D889ED1DF0; Thu, 12 Sep 2019 15:46:58 +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 46TjnG5NBKz4PmB; Thu, 12 Sep 2019 15:46:58 +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 9BC8F20F16; Thu, 12 Sep 2019 15:46:58 +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 x8CFkwq2005703; Thu, 12 Sep 2019 15:46:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CFkwB7005702; Thu, 12 Sep 2019 15:46:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909121546.x8CFkwB7005702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 12 Sep 2019 15:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352248 - head/usr.sbin/ntp/libntp X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/ntp/libntp X-SVN-Commit-Revision: 352248 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 15:46:58 -0000 Author: bapt Date: Thu Sep 12 15:46:58 2019 New Revision: 352248 URL: https://svnweb.freebsd.org/changeset/base/352248 Log: Get the readline header from the installed header instead of the from the source location. With newer import of libedit, the path to be able to access readline/readline.h will also include header which name will conflict with some expected by ntp in another path and end up breaking the build. Modified: head/usr.sbin/ntp/libntp/Makefile Modified: head/usr.sbin/ntp/libntp/Makefile ============================================================================== --- head/usr.sbin/ntp/libntp/Makefile Thu Sep 12 15:44:53 2019 (r352247) +++ head/usr.sbin/ntp/libntp/Makefile Thu Sep 12 15:46:58 2019 (r352248) @@ -79,7 +79,7 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ -I${SRCTOP}/contrib/ntp/sntp/libopts \ -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \ - -I${SRCTOP}/lib/libedit/edit \ + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit \ -I${.CURDIR:H} \ -I${.CURDIR}/ From owner-svn-src-head@freebsd.org Thu Sep 12 15:50:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50B4CD2031; Thu, 12 Sep 2019 15:50:15 +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 46Tjs30fqHz4PyX; Thu, 12 Sep 2019 15:50:15 +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 E570620F27; Thu, 12 Sep 2019 15:50:14 +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 x8CFoEJv005924; Thu, 12 Sep 2019 15:50:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CFoE7M005923; Thu, 12 Sep 2019 15:50:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909121550.x8CFoE7M005923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 12 Sep 2019 15:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352249 - head/gnu/usr.bin/gdb X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/gnu/usr.bin/gdb X-SVN-Commit-Revision: 352249 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 15:50:15 -0000 Author: bapt Date: Thu Sep 12 15:50:14 2019 New Revision: 352249 URL: https://svnweb.freebsd.org/changeset/base/352249 Log: Get the readline header from the installed header instead of the from the source location. Modified: head/gnu/usr.bin/gdb/Makefile.inc Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Thu Sep 12 15:46:58 2019 (r352248) +++ head/gnu/usr.bin/gdb/Makefile.inc Thu Sep 12 15:50:14 2019 (r352249) @@ -45,7 +45,7 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd -CFLAGS+= -I${SRCTOP}/lib/libedit/edit +CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit GENSRCS+= nm.h tm.h From owner-svn-src-head@freebsd.org Thu Sep 12 15:57:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82160D273A; Thu, 12 Sep 2019 15:57:50 +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 46Tk1p2tQfz4Qk6; Thu, 12 Sep 2019 15:57:50 +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 45E6E2110D; Thu, 12 Sep 2019 15:57:50 +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 x8CFvo7r011658; Thu, 12 Sep 2019 15:57:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CFvokG011657; Thu, 12 Sep 2019 15:57:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909121557.x8CFvokG011657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 12 Sep 2019 15:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352250 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 352250 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 15:57:50 -0000 Author: hselasky Date: Thu Sep 12 15:57:49 2019 New Revision: 352250 URL: https://svnweb.freebsd.org/changeset/base/352250 Log: Fix for undefined behaviour. Left shift of 1 by 31 places cannot be represented in type 'int'. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Thu Sep 12 15:50:14 2019 (r352249) +++ head/sys/sys/refcount.h Thu Sep 12 15:57:49 2019 (r352250) @@ -39,7 +39,7 @@ #define KASSERT(exp, msg) /* */ #endif -#define REFCOUNT_WAITER (1 << 31) /* Refcount has waiter. */ +#define REFCOUNT_WAITER (1U << 31) /* Refcount has waiter. */ #define REFCOUNT_SATURATION_VALUE (3U << 29) #define REFCOUNT_SATURATED(val) (((val) & (1U << 30)) != 0) From owner-svn-src-head@freebsd.org Thu Sep 12 16:20:04 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E525D3266; Thu, 12 Sep 2019 16:20:04 +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 46TkWS2r6Lz4S1p; Thu, 12 Sep 2019 16:20:04 +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 4528B214F6; Thu, 12 Sep 2019 16:20:04 +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 x8CGK488023460; Thu, 12 Sep 2019 16:20:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CGK4qS023459; Thu, 12 Sep 2019 16:20:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909121620.x8CGK4qS023459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 12 Sep 2019 16:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352251 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 352251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 16:20:04 -0000 Author: hselasky Date: Thu Sep 12 16:20:03 2019 New Revision: 352251 URL: https://svnweb.freebsd.org/changeset/base/352251 Log: Use %u instead of %d to print unsigned integer. While at it remove an empty line. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Thu Sep 12 15:57:49 2019 (r352250) +++ head/sys/sys/refcount.h Thu Sep 12 16:20:03 2019 (r352251) @@ -85,11 +85,10 @@ refcount_acquire(volatile u_int *count) static __inline void refcount_acquiren(volatile u_int *count, u_int n) { - u_int old; KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, - ("refcount_acquiren: n %d too large", n)); + ("refcount_acquiren: n=%u too large", n)); old = atomic_fetchadd_int(count, n); if (__predict_false(REFCOUNT_SATURATED(old))) _refcount_update_saturated(count); @@ -115,7 +114,8 @@ refcount_releasen(volatile u_int *count, u_int n) u_int old; KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, - ("refcount_releasen: n %d too large", n)); + ("refcount_releasen: n=%u too large", n)); + atomic_thread_fence_rel(); old = atomic_fetchadd_int(count, -n); if (__predict_false(n >= REFCOUNT_COUNT(old) || From owner-svn-src-head@freebsd.org Thu Sep 12 16:27:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C74C2D362E; Thu, 12 Sep 2019 16:27:00 +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 46TkgS4wfzz4SY1; Thu, 12 Sep 2019 16:27:00 +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 8C4D9216B0; Thu, 12 Sep 2019 16:27:00 +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 x8CGR08F029356; Thu, 12 Sep 2019 16:27:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CGQxCe029348; Thu, 12 Sep 2019 16:26:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201909121626.x8CGQxCe029348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 12 Sep 2019 16:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352253 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 352253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 16:27:00 -0000 Author: hselasky Date: Thu Sep 12 16:26:59 2019 New Revision: 352253 URL: https://svnweb.freebsd.org/changeset/base/352253 Log: Use REFCOUNT_COUNT() to obtain refcount where appropriate. Refcount waiting will set some flag bits in the refcount value. Make sure these bits get cleared by using the REFCOUNT_COUNT() macro to obtain the actual refcount. Differential Revision: https://reviews.freebsd.org/D21620 Reviewed by: kib@, markj@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/kern/vfs_bio.c head/sys/vm/vm_fault.c head/sys/vm/vm_object.c head/sys/vm/vm_swapout.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Sep 12 16:23:22 2019 (r352252) +++ head/sys/kern/vfs_bio.c Thu Sep 12 16:26:59 2019 (r352253) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2842,9 +2843,9 @@ vfs_vmio_iodone(struct buf *bp) bool bogus; obj = bp->b_bufobj->bo_object; - KASSERT(obj->paging_in_progress >= bp->b_npages, + KASSERT(REFCOUNT_COUNT(obj->paging_in_progress) >= bp->b_npages, ("vfs_vmio_iodone: paging in progress(%d) < b_npages(%d)", - obj->paging_in_progress, bp->b_npages)); + REFCOUNT_COUNT(obj->paging_in_progress), bp->b_npages)); vp = bp->b_vp; KASSERT(vp->v_holdcnt > 0, Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu Sep 12 16:23:22 2019 (r352252) +++ head/sys/vm/vm_fault.c Thu Sep 12 16:26:59 2019 (r352253) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -339,7 +340,7 @@ vm_fault_restore_map_lock(struct faultstate *fs) { VM_OBJECT_ASSERT_WLOCKED(fs->first_object); - MPASS(fs->first_object->paging_in_progress > 0); + MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); if (!vm_map_trylock_read(fs->map)) { VM_OBJECT_WUNLOCK(fs->first_object); @@ -394,7 +395,7 @@ vm_fault_populate(struct faultstate *fs, vm_prot_t pro MPASS(fs->object == fs->first_object); VM_OBJECT_ASSERT_WLOCKED(fs->first_object); - MPASS(fs->first_object->paging_in_progress > 0); + MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); MPASS(fs->first_object->backing_object == NULL); MPASS(fs->lookup_still_valid); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Sep 12 16:23:22 2019 (r352252) +++ head/sys/vm/vm_object.c Thu Sep 12 16:26:59 2019 (r352253) @@ -195,9 +195,9 @@ vm_object_zdtor(void *mem, int size, void *arg) ("object %p has reservations", object)); #endif - KASSERT(object->paging_in_progress == 0, + KASSERT(REFCOUNT_COUNT(object->paging_in_progress) == 0, ("object %p paging_in_progress = %d", - object, object->paging_in_progress)); + object, REFCOUNT_COUNT(object->paging_in_progress))); KASSERT(object->resident_page_count == 0, ("object %p resident_page_count = %d", object, object->resident_page_count)); @@ -395,7 +395,7 @@ vm_object_pip_wait(vm_object_t object, char *waitid) VM_OBJECT_ASSERT_WLOCKED(object); - while (object->paging_in_progress) { + while (REFCOUNT_COUNT(object->paging_in_progress) > 0) { VM_OBJECT_WUNLOCK(object); refcount_wait(&object->paging_in_progress, waitid, PVM); VM_OBJECT_WLOCK(object); @@ -408,7 +408,7 @@ vm_object_pip_wait_unlocked(vm_object_t object, char * VM_OBJECT_ASSERT_UNLOCKED(object); - while (object->paging_in_progress) + while (REFCOUNT_COUNT(object->paging_in_progress) > 0) refcount_wait(&object->paging_in_progress, waitid, PVM); } @@ -577,7 +577,7 @@ vm_object_deallocate(vm_object_t object) robject->ref_count++; retry: - if (robject->paging_in_progress) { + if (REFCOUNT_COUNT(robject->paging_in_progress) > 0) { VM_OBJECT_WUNLOCK(object); vm_object_pip_wait(robject, "objde1"); @@ -586,7 +586,7 @@ retry: VM_OBJECT_WLOCK(object); goto retry; } - } else if (object->paging_in_progress) { + } else if (REFCOUNT_COUNT(object->paging_in_progress) > 0) { VM_OBJECT_WUNLOCK(robject); VM_OBJECT_WUNLOCK(object); refcount_wait( @@ -729,7 +729,7 @@ vm_object_terminate(vm_object_t object) */ vm_object_pip_wait(object, "objtrm"); - KASSERT(!object->paging_in_progress, + KASSERT(!REFCOUNT_COUNT(object->paging_in_progress), ("vm_object_terminate: pageout in progress")); KASSERT(object->ref_count == 0, @@ -1660,8 +1660,8 @@ vm_object_collapse(vm_object_t object) break; } - if (object->paging_in_progress != 0 || - backing_object->paging_in_progress != 0) { + if (REFCOUNT_COUNT(object->paging_in_progress) > 0 || + REFCOUNT_COUNT(backing_object->paging_in_progress) > 0) { vm_object_qcollapse(object); VM_OBJECT_WUNLOCK(backing_object); break; Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Thu Sep 12 16:23:22 2019 (r352252) +++ head/sys/vm/vm_swapout.c Thu Sep 12 16:26:59 2019 (r352253) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -193,7 +194,7 @@ vm_swapout_object_deactivate_pages(pmap_t pmap, vm_obj goto unlock_return; VM_OBJECT_ASSERT_LOCKED(object); if ((object->flags & OBJ_UNMANAGED) != 0 || - object->paging_in_progress != 0) + REFCOUNT_COUNT(object->paging_in_progress) > 0) goto unlock_return; remove_mode = 0; From owner-svn-src-head@freebsd.org Thu Sep 12 16:45:09 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C662D3E1D; Thu, 12 Sep 2019 16:45:09 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46Tl4N745tz4Th1; Thu, 12 Sep 2019 16:45:08 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B898C21A53; Thu, 12 Sep 2019 16:45:08 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CGj804041107; Thu, 12 Sep 2019 16:45:08 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CGj8OA041103; Thu, 12 Sep 2019 16:45:08 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201909121645.x8CGj8OA041103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 12 Sep 2019 16:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352255 - head/lib/csu/powerpc64 X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/lib/csu/powerpc64 X-SVN-Commit-Revision: 352255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 16:45:09 -0000 Author: luporl Date: Thu Sep 12 16:45:07 2019 New Revision: 352255 URL: https://svnweb.freebsd.org/changeset/base/352255 Log: [PPC64] Add ifunc support in libcsu When ifuncs are used in statically linked binaries, the C runtime must perform the needed dynamic relocations, to make calls to ifuncs work correctly. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21070 Added: head/lib/csu/powerpc64/reloc.c (contents, props changed) Modified: head/lib/csu/powerpc64/Makefile head/lib/csu/powerpc64/crt1.c Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Thu Sep 12 16:28:30 2019 (r352254) +++ head/lib/csu/powerpc64/Makefile Thu Sep 12 16:45:07 2019 (r352255) @@ -5,9 +5,9 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= crtsavres.o Scrt1.o gcrt1.o -CFLAGS+= -I${.CURDIR:H}/common \ +CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ -I${SRCTOP}/lib/libc/include \ - -mlongcall -DCRT_IRELOC_SUPPRESS + -mlongcall -DCRT_IRELOC_RELA FILES= ${OBJS} FILESMODE= ${LIBMODE} Modified: head/lib/csu/powerpc64/crt1.c ============================================================================== --- head/lib/csu/powerpc64/crt1.c Thu Sep 12 16:28:30 2019 (r352254) +++ head/lib/csu/powerpc64/crt1.c Thu Sep 12 16:45:07 2019 (r352255) @@ -45,7 +45,12 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +static uint32_t cpu_features; +static uint32_t cpu_features2; + #include "libc_private.h" #include "crtbrand.c" #include "ignore_init.c" @@ -65,6 +70,30 @@ extern int etext; struct ps_strings *__ps_strings; +static void +init_cpu_features(char **env) +{ + const Elf_Auxinfo *aux; + + /* Find the auxiliary vector on the stack. */ + while (*env++ != 0) /* Skip over environment, and NULL terminator */ + ; + aux = (const Elf_Auxinfo *)env; + + /* Digest the auxiliary vector. */ + for (; aux->a_type != AT_NULL; aux++) { + switch (aux->a_type) { + case AT_HWCAP: + cpu_features = (uint32_t)aux->a_un.a_val; + break; + case AT_HWCAP2: + cpu_features2 = (uint32_t)aux->a_un.a_val; + break; + } + } +} + + /* The entry function. */ /* * First 5 arguments are specified by the PowerPC SVR4 ABI. @@ -84,8 +113,11 @@ _start(int argc, char **argv, char **env, if (&_DYNAMIC != NULL) atexit(cleanup); - else + else { + init_cpu_features(env); + process_irelocs(); _init_tls(); + } #ifdef GCRT atexit(_mcleanup); Added: head/lib/csu/powerpc64/reloc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/csu/powerpc64/reloc.c Thu Sep 12 16:45:07 2019 (r352255) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2019 Leandro Lupori + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +static void +crt1_handle_rela(const Elf_Rela *r) +{ + typedef Elf_Addr (*ifunc_resolver_t)( + uint32_t, uint32_t, uint64_t, uint64_t, + uint64_t, uint64_t, uint64_t, uint64_t); + Elf_Addr *ptr, *where, target; + + switch (ELF_R_TYPE(r->r_info)) { + case R_PPC_IRELATIVE: + ptr = (Elf_Addr *)r->r_addend; + where = (Elf_Addr *)r->r_offset; + target = ((ifunc_resolver_t)ptr)(cpu_features, cpu_features2, + 0, 0, 0, 0, 0, 0); + *where = target; + break; + } +} From owner-svn-src-head@freebsd.org Thu Sep 12 16:47:39 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FCE1D3EF1; Thu, 12 Sep 2019 16:47:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Tl7H0Yl1z4TrF; Thu, 12 Sep 2019 16:47:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E75A721A59; Thu, 12 Sep 2019 16:47:38 +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 x8CGlcjF041261; Thu, 12 Sep 2019 16:47:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CGlcPT041260; Thu, 12 Sep 2019 16:47:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201909121647.x8CGlcPT041260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 12 Sep 2019 16:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352256 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352256 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 16:47:39 -0000 Author: markj Date: Thu Sep 12 16:47:38 2019 New Revision: 352256 URL: https://svnweb.freebsd.org/changeset/base/352256 Log: Remove a redundant NULL pointer check in cpuset_modify_domain(). cpuset_getroot() is guaranteed to return a non-NULL pointer. Reported by: Mark Millard MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Thu Sep 12 16:45:07 2019 (r352255) +++ head/sys/kern/kern_cpuset.c Thu Sep 12 16:47:38 2019 (r352256) @@ -796,7 +796,7 @@ cpuset_modify_domain(struct cpuset *set, struct domain /* * Verify that we have access to this set of domains. */ - if (root && !domainset_valid(dset, domain)) { + if (!domainset_valid(dset, domain)) { error = EINVAL; goto out; } From owner-svn-src-head@freebsd.org Thu Sep 12 17:20:52 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10F5ED4BE5; Thu, 12 Sep 2019 17:20:52 +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 46Tlsb6bW9z4WHH; Thu, 12 Sep 2019 17:20:51 +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 C60BE21FDE; Thu, 12 Sep 2019 17:20:51 +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 x8CHKprq058911; Thu, 12 Sep 2019 17:20:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CHKpsk058910; Thu, 12 Sep 2019 17:20:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909121720.x8CHKpsk058910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 12 Sep 2019 17:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352257 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 352257 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 17:20:52 -0000 Author: mav Date: Thu Sep 12 17:20:51 2019 New Revision: 352257 URL: https://svnweb.freebsd.org/changeset/base/352257 Log: Report Trusted Computing feature set support. It practically means the device is SED. MFC after: 3 days Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Thu Sep 12 16:47:38 2019 (r352256) +++ head/sbin/camcontrol/camcontrol.c Thu Sep 12 17:20:51 2019 (r352257) @@ -1717,6 +1717,9 @@ atacapprint(struct ata_params *parm) } else { printf("no\n"); } + printf("Trusted Computing %s\n", + ((parm->tcg & 0xc000) == 0x4000) && (parm->tcg & ATA_SUPPORT_TCG) ? + "yes" : "no"); printf("encrypts all user data %s\n", parm->support3 & ATA_ENCRYPTS_ALL_USER_DATA ? "yes" : "no"); printf("Sanitize "); From owner-svn-src-head@freebsd.org Thu Sep 12 17:42:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCC38D5384; Thu, 12 Sep 2019 17:42:37 +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 46TmLj4cx8z4XCb; Thu, 12 Sep 2019 17:42:37 +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 81F0E22515; Thu, 12 Sep 2019 17:42:37 +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 x8CHgbwS076169; Thu, 12 Sep 2019 17:42:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CHgbuW076168; Thu, 12 Sep 2019 17:42:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201909121742.x8CHgbuW076168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 12 Sep 2019 17:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352258 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 352258 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 17:42:37 -0000 Author: mav Date: Thu Sep 12 17:42:37 2019 New Revision: 352258 URL: https://svnweb.freebsd.org/changeset/base/352258 Log: Remove Tagged Command Queuing feature reporting. I never saw those devices myself, FreeBSD never supported them, and it is officially obsolete since ACS-2 specification. MFC after: 3 days Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Thu Sep 12 17:20:51 2019 (r352257) +++ head/sbin/camcontrol/camcontrol.c Thu Sep 12 17:42:37 2019 (r352258) @@ -1600,16 +1600,6 @@ atacapprint(struct ata_params *parm) printf("flush cache %s %s\n", parm->support.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no", parm->enabled.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no"); - printf("overlap %s\n", - parm->capabilities1 & ATA_SUPPORT_OVERLAP ? "yes" : "no"); - printf("Tagged Command Queuing (TCQ) %s %s", - parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no"); - if (parm->support.command2 & ATA_SUPPORT_QUEUED) { - printf(" %d tags\n", - ATA_QUEUE_LEN(parm->queue) + 1); - } else - printf("\n"); printf("Native Command Queuing (NCQ) "); if (atasata(parm) && (parm->satacapabilities & ATA_SUPPORT_NCQ)) { printf("yes %d tags\n", From owner-svn-src-head@freebsd.org Thu Sep 12 17:53:44 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 530A9D5892 for ; Thu, 12 Sep 2019 17:53:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46TmbW6bR0z4Xsc for ; Thu, 12 Sep 2019 17:53:43 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568310822; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=SCg/vOp39sDjunf0oq3rKRR71f5u3kGMfxy5sBSQcThpPM/0nm0fLGOb77Z390htABXvHhyXV3Bs2 5qfgSXNkuZ7A2RYk7xbnZwt3WFt64l+yCsXl96TyBY9r5AXzv0TfetV6eAq7wigjvaAYwHCyUpGAvR CY9MJ3aLkPZiqs1b+A+qLl5Zk1SPiSB1s9ZUS4U97mhjnL0cmH7R8BhmYq92yqqVqJPl4t4lDMN1XF 4WIMXworgXHSfmnQdsYgzxlMlzG1tGq7AFnYYe+aFaOtD7xR+Q7xBaFWUmWCFCmMbQrEoXbp/alyZB XZfifr7spi2uXPl2U3iFSYLDJ2qfbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=oDKXb0vrHRISBSuCyJ5cYU3OxKMC0OKzn92hIkKuQ9k=; b=Fbq9gEPNx3FtUNNhwaJaL5y/6FXhX3UjQZChoCSZ7NJgVs/1nUnW6UwGkha9cHLYn7Ff5l1QxN5a0 BEW+md8BofKi2TiPWX9DRZeZq0xjMtMqJnjxAU3Zr435p8iDzMG1y3tbi7QJ8+OoZ1ew9TDQGrP9MY +Y1oz/thLyxXLzxxPFQmUHYRM9LGNFX2TeG6qVnDVzLXOQg6qneEfpPQOi/meQ5EoBrSn4MB5Bm1rt yj/OrfKBeevvKUu4Gq5OT5RUFKdrVNZ/DlwCZJY+QuMWi4eKliElyFW5tCZAIpw+LIPsTeuIqdLmBD MlWQNRiDu45EficmmgqQIZWtpoMKcpQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=oDKXb0vrHRISBSuCyJ5cYU3OxKMC0OKzn92hIkKuQ9k=; b=K4AofM7KellLBri/qCn1kVhS0IElK87N2L08yEulLgZUpmDwr2muX/HorRRKrxoHyJYTkhDMDDUHI /6Q9SENxdHhoIkafQCGlYC6dbyPFS3JEuU9GYE7UVrGOTOXrxeCP4YSuAG5a9zq7OLE2R9WHOJHe2y fQsv8sw8RzcNINFPCuhIgtaZzGwMrc/0cmYTHiEy5DFgaGwqnSeeUBdqYE7ncGUnZR2I6Fc3VpfYUB 2h6Ygn0QRqy+8FeiwAOflSvj4wafAw+W46BbCyZjnyKdV+GrVlGfwD9C799YYqEO4352Oet2EfZI2f IKvTUOEqtE29cjJTPSUvAbiBgigaP/Q== X-MHO-RoutePath: aGlwcGll X-MHO-User: 403bf193-d586-11e9-b67d-cdd75d6ce7a8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 403bf193-d586-11e9-b67d-cdd75d6ce7a8; Thu, 12 Sep 2019 17:53:40 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8CHrdCV078403; Thu, 12 Sep 2019 11:53:39 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> Subject: Re: svn commit: r352248 - head/usr.sbin/ntp/libntp From: Ian Lepore To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 12 Sep 2019 11:53:38 -0600 In-Reply-To: <201909121546.x8CFkwB7005702@repo.freebsd.org> References: <201909121546.x8CFkwB7005702@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46TmbW6bR0z4Xsc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 17:53:44 -0000 On Thu, 2019-09-12 at 15:46 +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Thu Sep 12 15:46:58 2019 > New Revision: 352248 > URL: https://svnweb.freebsd.org/changeset/base/352248 > > Log: > Get the readline header from the installed header instead of the from the source > location. > How can this possibly be right? One of the hallmarks of our build system is that it is self-contained in the sense that it uses the sources to build the sources, not sources or files from the host machine being used to do the build. -- Ian > With newer import of libedit, the path to be able to access > readline/readline.h > will also include header which name will conflict with some > expected by ntp in > another path and end up breaking the build. > > Modified: > head/usr.sbin/ntp/libntp/Makefile > > Modified: head/usr.sbin/ntp/libntp/Makefile > ===================================================================== > ========= > --- head/usr.sbin/ntp/libntp/Makefile Thu Sep 12 15:44:53 2019 (r352 > 247) > +++ head/usr.sbin/ntp/libntp/Makefile Thu Sep 12 15:46:58 2019 (r352 > 248) > @@ -79,7 +79,7 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ > -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ > -I${SRCTOP}/contrib/ntp/sntp/libopts \ > -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \ > - -I${SRCTOP}/lib/libedit/edit \ > + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit \ > -I${.CURDIR:H} \ > -I${.CURDIR}/ > > From owner-svn-src-head@freebsd.org Thu Sep 12 18:14:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 001DED6005; Thu, 12 Sep 2019 18:14:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Tn3m6DXRz4Ymq; Thu, 12 Sep 2019 18:14:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4B6622A7C; Thu, 12 Sep 2019 18:14:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CIEi99093863; Thu, 12 Sep 2019 18:14:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CIEifh093862; Thu, 12 Sep 2019 18:14:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909121814.x8CIEifh093862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 12 Sep 2019 18:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352259 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 352259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 18:14:45 -0000 Author: emaste Date: Thu Sep 12 18:14:44 2019 New Revision: 352259 URL: https://svnweb.freebsd.org/changeset/base/352259 Log: arm64: connect Linuxulator to the build More work needs to be done, but it is capable of running basic statically or dynamically linked Linux/arm64 binaries. Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Sep 12 17:42:37 2019 (r352258) +++ head/sys/modules/Makefile Thu Sep 12 18:14:44 2019 (r352259) @@ -207,9 +207,6 @@ SUBDIR= \ libiconv \ libmchain \ lindebugfs \ - ${_linux} \ - ${_linux_common} \ - ${_linux64} \ linuxkpi \ ${_lio} \ lpt \ @@ -466,10 +463,22 @@ SUBDIR+= iscsi_initiator SUBDIR+= fdt .endif +# Linuxulator .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" SUBDIR+= linprocfs SUBDIR+= linsysfs +.endif +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +SUBDIR+= linux +.endif +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= linux64 +SUBDIR+= linux_common +.endif + +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" _ena= ena .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ibcore= ibcore @@ -590,7 +599,6 @@ _if_ndis= if_ndis _io= io _ix= ix _ixv= ixv -_linux= linux .if ${MK_SOURCELESS_UCODE} != "no" _lio= lio .endif @@ -692,8 +700,6 @@ _efirt= efirt _iavf= iavf _ioat= ioat _ixl= ixl -_linux64= linux64 -_linux_common= linux_common _nvdimm= nvdimm _pms= pms _qlxge= qlxge From owner-svn-src-head@freebsd.org Thu Sep 12 18:37:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B6CD6790; Thu, 12 Sep 2019 18:37:27 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46TnYz45tFz4Zlq; Thu, 12 Sep 2019 18:37:27 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BB7722E22; Thu, 12 Sep 2019 18:37:27 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CIbRtM005863; Thu, 12 Sep 2019 18:37:27 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CIbRCJ005862; Thu, 12 Sep 2019 18:37:27 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201909121837.x8CIbRCJ005862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Thu, 12 Sep 2019 18:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352260 - head/sys/dev/ral X-SVN-Group: head X-SVN-Commit-Author: mizhka X-SVN-Commit-Paths: head/sys/dev/ral X-SVN-Commit-Revision: 352260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 18:37:27 -0000 Author: mizhka Date: Thu Sep 12 18:37:26 2019 New Revision: 352260 URL: https://svnweb.freebsd.org/changeset/base/352260 Log: [Bug 240473] add support of Ralink RT5390R Wireless Card This commit adds PCI ID of Ralink RT5390R into ids table of driver ral. Tests show stability of card during day. Network speed is reasonable ( around several megabytes per second). PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240473 Reported by: zetrotrack000@gmail.com Reviewed by: ray Approved by: ray MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D21604 Modified: head/sys/dev/ral/if_ral_pci.c Modified: head/sys/dev/ral/if_ral_pci.c ============================================================================== --- head/sys/dev/ral/if_ral_pci.c Thu Sep 12 18:14:44 2019 (r352259) +++ head/sys/dev/ral/if_ral_pci.c Thu Sep 12 18:37:26 2019 (r352260) @@ -100,6 +100,7 @@ static const struct ral_pci_ident ral_pci_ids[] = { { 0x1814, 0x5390, "Ralink Technology RT5390" }, { 0x1814, 0x5392, "Ralink Technology RT5392" }, { 0x1814, 0x539a, "Ralink Technology RT5390" }, + { 0x1814, 0x539b, "Ralink Technology RT5390" }, { 0x1814, 0x539f, "Ralink Technology RT5390" }, { 0x1a3b, 0x1059, "AWT RT2890" }, { 0, 0, NULL } From owner-svn-src-head@freebsd.org Thu Sep 12 18:44:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 936E7D6B7F; Thu, 12 Sep 2019 18:44:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46TnkT3Kdqz4bHG; Thu, 12 Sep 2019 18:44:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5520923019; Thu, 12 Sep 2019 18:44:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CIinY6011606; Thu, 12 Sep 2019 18:44:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CIimVm011604; Thu, 12 Sep 2019 18:44:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201909121844.x8CIimVm011604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 12 Sep 2019 18:44:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352261 - in head: contrib/mtree contrib/netbsd-tests/usr.sbin/mtree usr.sbin/fmtree X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: contrib/mtree contrib/netbsd-tests/usr.sbin/mtree usr.sbin/fmtree X-SVN-Commit-Revision: 352261 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 18:44:49 -0000 Author: bdrewery Date: Thu Sep 12 18:44:48 2019 New Revision: 352261 URL: https://svnweb.freebsd.org/changeset/base/352261 Log: mtree: Fix -f -f not considering type changes. This only lists the changed type and not other attributes so that it matches the behavior of -C as done in r66747 for fmtree. The NetBSD -ff implementation was copied from fmtree. Reviewed by: imp MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21623 Modified: head/contrib/mtree/specspec.c head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh head/usr.sbin/fmtree/specspec.c Modified: head/contrib/mtree/specspec.c ============================================================================== --- head/contrib/mtree/specspec.c Thu Sep 12 18:37:26 2019 (r352260) +++ head/contrib/mtree/specspec.c Thu Sep 12 18:44:48 2019 (r352261) @@ -145,7 +145,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path) return (1); } if (n1->type != n2->type) { - differs = 0; + differs = F_TYPE; mismatch(n1, n2, differs, path); return (1); } Modified: head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh ============================================================================== --- head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh Thu Sep 12 18:37:26 2019 (r352260) +++ head/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh Thu Sep 12 18:44:48 2019 (r352261) @@ -411,7 +411,42 @@ netbsd6_nonemptydir_body() FLAVOR=netbsd6 nonemptydir_body } +atf_test_case mtree_specspec_type +mtree_specspec_type_head() +{ + atf_set "descr" "Test that spec comparisons detect type changes" +} +mtree_specspec_type_body() +{ + mkdir testdir + + touch testdir/bar + mtree -c -p testdir > mtree1.spec + + if [ ! -f mtree1.spec ]; then + atf_fail "mtree failed" + fi + + rm -f testdir/bar + ln -s foo testdir/bar + # uid change is expected to be ignored as done in -C + chown -h operator testdir/bar + mtree -c -p testdir > mtree2.spec + + if [ ! -f mtree2.spec ]; then + atf_fail "mtree failed" + fi + + atf_check -s ignore -o save:output \ + -x "mtree -f mtree1.spec -f mtree2.spec" + + if ! cut -f 3 output | egrep -q "bar file" || \ + ! cut -f 3 output | egrep -q "bar link"; then + atf_fail "mtree did not detect type change" + fi +} + atf_init_test_cases() { atf_add_test_case mtree_create @@ -423,6 +458,7 @@ atf_init_test_cases() atf_add_test_case mtree_ignore atf_add_test_case mtree_merge atf_add_test_case mtree_nonemptydir + atf_add_test_case mtree_specspec_type atf_add_test_case netbsd6_create atf_add_test_case netbsd6_check Modified: head/usr.sbin/fmtree/specspec.c ============================================================================== --- head/usr.sbin/fmtree/specspec.c Thu Sep 12 18:37:26 2019 (r352260) +++ head/usr.sbin/fmtree/specspec.c Thu Sep 12 18:44:48 2019 (r352261) @@ -132,7 +132,7 @@ compare_nodes(NODE *n1, NODE *n2, char const *path) return (1); } if (n1->type != n2->type) { - differs = 0; + differs = F_TYPE; mismatch(n1, n2, differs, path); return (1); } From owner-svn-src-head@freebsd.org Thu Sep 12 18:52:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3079BD6CB0; Thu, 12 Sep 2019 18:52:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46Tntm0Y9pz4bXr; Thu, 12 Sep 2019 18:52:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAB14231C4; Thu, 12 Sep 2019 18:51:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CIpxAk015607; Thu, 12 Sep 2019 18:51:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CIpxrp015606; Thu, 12 Sep 2019 18:51:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201909121851.x8CIpxrp015606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 12 Sep 2019 18:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352262 - head/contrib/mtree X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/contrib/mtree X-SVN-Commit-Revision: 352262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 18:52:00 -0000 Author: bdrewery Date: Thu Sep 12 18:51:59 2019 New Revision: 352262 URL: https://svnweb.freebsd.org/changeset/base/352262 Log: mtree -c: Fix username logic when getlogin(3) fails. Obtained from: NetBSD (Credit to Sascha Wildner with DragonFlyBSD) MFC after: 2 weeks Modified: head/contrib/mtree/create.c Modified: head/contrib/mtree/create.c ============================================================================== --- head/contrib/mtree/create.c Thu Sep 12 18:44:48 2019 (r352261) +++ head/contrib/mtree/create.c Thu Sep 12 18:51:59 2019 (r352262) @@ -117,7 +117,7 @@ cwalk(FILE *fp) host[sizeof(host) - 1] = '\0'; if ((user = getlogin()) == NULL) { struct passwd *pw; - user = (pw = getpwuid(getuid())) == NULL ? pw->pw_name : + user = (pw = getpwuid(getuid())) != NULL ? pw->pw_name : ""; } From owner-svn-src-head@freebsd.org Thu Sep 12 18:53:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4625CD6ED7; Thu, 12 Sep 2019 18:53:31 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46TnwW1CwTz4bq8; Thu, 12 Sep 2019 18:53:31 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D605231EE; Thu, 12 Sep 2019 18:53:31 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CIrUSM017349; Thu, 12 Sep 2019 18:53:30 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CIrTn6017343; Thu, 12 Sep 2019 18:53:29 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201909121853.x8CIrTn6017343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Thu, 12 Sep 2019 18:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352263 - in head: etc/mtree usr.sbin/jail usr.sbin/jail/tests X-SVN-Group: head X-SVN-Commit-Author: mizhka X-SVN-Commit-Paths: in head: etc/mtree usr.sbin/jail usr.sbin/jail/tests X-SVN-Commit-Revision: 352263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 18:53:31 -0000 Author: mizhka Date: Thu Sep 12 18:53:29 2019 New Revision: 352263 URL: https://svnweb.freebsd.org/changeset/base/352263 Log: [jail] removal by jid doesn't trigger pre/post stop scripts This commit fixes bug: command "jail -r" didn't trigger pre/post stop commands (and others) defined in config file if jid is specified insted of name. Also it adds basic tests for usr.sbin/jail to avoid regression. Reviewed by: jamie, kevans, ray MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D21328 Added: head/usr.sbin/jail/tests/ head/usr.sbin/jail/tests/Makefile (contents, props changed) head/usr.sbin/jail/tests/commands.jail.conf (contents, props changed) head/usr.sbin/jail/tests/jail_basic_test.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.sbin/jail/Makefile head/usr.sbin/jail/state.c Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Sep 12 18:51:59 2019 (r352262) +++ head/etc/mtree/BSD.tests.dist Thu Sep 12 18:53:29 2019 (r352263) @@ -1082,6 +1082,8 @@ .. fstyp .. + jail + .. makefs .. mixer Modified: head/usr.sbin/jail/Makefile ============================================================================== --- head/usr.sbin/jail/Makefile Thu Sep 12 18:51:59 2019 (r352262) +++ head/usr.sbin/jail/Makefile Thu Sep 12 18:53:29 2019 (r352263) @@ -24,4 +24,7 @@ CFLAGS+= -DINET CLEANFILES= y.output +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include Modified: head/usr.sbin/jail/state.c ============================================================================== --- head/usr.sbin/jail/state.c Thu Sep 12 18:51:59 2019 (r352262) +++ head/usr.sbin/jail/state.c Thu Sep 12 18:53:29 2019 (r352263) @@ -44,7 +44,7 @@ static void dep_add(struct cfjail *from, struct cfjail static int cmp_jailptr(const void *a, const void *b); static int cmp_jailptr_name(const void *a, const void *b); static struct cfjail *find_jail(const char *name); -static int running_jid(const char *name, int flags); +static struct cfjail *running_jail(const char *name, int flags); static struct cfjail **jails_byname; static size_t njails; @@ -72,7 +72,7 @@ dep_setup(int docf) if ((j = TAILQ_FIRST(&cfjails)) && (p = j->intparams[IP_DEPEND])) { TAILQ_FOREACH(s, &p->val, tq) { - if (running_jid(s->s, 0) < 0) { + if (running_jail(s->s, 0) == NULL) { warnx("depends on nonexistent jail " "\"%s\"", s->s); j->flags |= JF_FAILED; @@ -369,11 +369,7 @@ start_state(const char *target, int docf, unsigned sta j = find_jail(target); if (j == NULL && state == JF_STOP) { /* Allow -[rR] to specify a currently running jail. */ - if ((jid = running_jid(target, JAIL_DYING)) > 0) { - j = add_jail(); - j->name = estrdup(target); - j->jid = jid; - } + j = running_jail(target, JAIL_DYING); } if (j == NULL) { warnx("\"%s\" not found", target); @@ -446,6 +442,9 @@ static struct cfjail * find_jail(const char *name) { struct cfjail **jp; + + if (jails_byname == NULL) + return NULL; jp = bsearch(name, jails_byname, njails, sizeof(struct cfjail *), cmp_jailptr_name); @@ -453,26 +452,43 @@ find_jail(const char *name) } /* - * Return the named jail's jid if it is running, and -1 if it isn't. + * Return jail if it is running, and NULL if it isn't. */ -static int -running_jid(const char *name, int flags) +static struct cfjail * +running_jail(const char *name, int flags) { - struct iovec jiov[2]; + struct iovec jiov[4]; + struct cfjail *jail; char *ep; - int jid; - + char jailname[MAXHOSTNAMELEN]; + int jid, ret, len; + if ((jid = strtol(name, &ep, 10)) && !*ep) { - jiov[0].iov_base = __DECONST(char *, "jid"); - jiov[0].iov_len = sizeof("jid"); - jiov[1].iov_base = &jid; - jiov[1].iov_len = sizeof(jid); + memset(jailname,0,sizeof(jailname)); + len = sizeof(jailname); } else { - jiov[0].iov_base = __DECONST(char *, "name"); - jiov[0].iov_len = sizeof("name"); - jiov[1].iov_len = strlen(name) + 1; - jiov[1].iov_base = alloca(jiov[1].iov_len); - strcpy(jiov[1].iov_base, name); + strncpy(jailname, name,sizeof(jailname)); + len = strlen(name) + 1; + jid = 0; } - return jail_get(jiov, 2, flags); + + jiov[0].iov_base = __DECONST(char *, "jid"); + jiov[0].iov_len = sizeof("jid"); + jiov[1].iov_base = &jid; + jiov[1].iov_len = sizeof(jid); + jiov[2].iov_base = __DECONST(char *, "name"); + jiov[2].iov_len = sizeof("name"); + jiov[3].iov_base = &jailname; + jiov[3].iov_len = len; + + if ((ret = jail_get(jiov, 4, flags)) < 0) + return (NULL); + + if ((jail = find_jail(jailname)) == NULL) { + jail = add_jail(); + jail->name = estrdup(jailname); + jail->jid = ret; + } + + return (jail); } Added: head/usr.sbin/jail/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/tests/Makefile Thu Sep 12 18:53:29 2019 (r352263) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH+= jail_basic_test + +${PACKAGE}FILES+= commands.jail.conf + +.include Added: head/usr.sbin/jail/tests/commands.jail.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/tests/commands.jail.conf Thu Sep 12 18:53:29 2019 (r352263) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +exec.prestop = "echo STOP"; +exec.prestart = "echo START"; +persist; + +basejail {} Added: head/usr.sbin/jail/tests/jail_basic_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/tests/jail_basic_test.sh Thu Sep 12 18:53:29 2019 (r352263) @@ -0,0 +1,136 @@ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Michael Zhilin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# $FreeBSD$ + +atf_test_case "basic" "cleanup" +atf_test_case "nested" "cleanup" +atf_test_case "commands" "cleanup" + +basic_head() +{ + atf_set descr 'Basic jail test' + atf_set require.user root +} + +basic_body() +{ + # Create the jail + atf_check -s exit:0 -o ignore jail -c name=basejail persist ip4.addr=192.0.1.1 + # Check output of jls + atf_check -s exit:0 -o ignore jls + atf_check -s exit:0 -o ignore jls -v + atf_check -s exit:0 -o ignore jls -n + # Stop jail + atf_check -s exit:0 -o ignore jail -r basejail + jail -c name=basejail persist ip4.addr=192.0.1.1 + # Stop jail by jid + atf_check -s exit:0 -o ignore jail -r `jls -j basejail jid` + # Recreate + atf_check -s exit:0 -o ignore jail -cm name=basejail persist ip4.addr=192.0.1.1 + # Restart + atf_check -s exit:0 -o ignore jail -rc name=basejail persist ip4.addr=192.0.1.1 +} + +basic_cleanup() +{ + jail -r basejail +} + +nested_head() +{ + atf_set descr 'Hierarchical jails test' + atf_set require.user root +} + +nested_body() +{ + # Create the first jail + jail -c name=basejail persist ip4.addr=192.0.1.1 children.max=1 + atf_check -s exit:0 -o empty \ + jexec basejail \ + jail -c name=nestedjail persist ip4.addr=192.0.1.1 + + atf_check -s exit:1 -o empty -e inline:"jail: prison limit exceeded\n"\ + jexec basejail \ + jail -c name=secondnestedjail persist ip4.addr=192.0.1.1 + # Check output of jls + atf_check -s exit:0 -o ignore \ + jexec basejail jls + atf_check -s exit:0 -o ignore \ + jexec basejail jls -v + atf_check -s exit:0 -o ignore \ + jexec basejail jls -n + # Create jail with no child - children.max should be 0 by default + jail -c name=basejail_nochild persist ip4.addr=192.0.1.1 + atf_check -s exit:1 -o empty \ + -e inline:"jail: jail_set: Operation not permitted\n" \ + jexec basejail_nochild \ + jail -c name=nestedjail persist ip4.addr=192.0.1.1 +} + +nested_cleanup() +{ + jail -r nestedjail + jail -r basejail + jail -r basejail_nochild +} + +commands_header() +{ + atf_set descr 'Commands jail test' + atf_set require.user root +} + +commands_body() +{ + # exec.prestart + atf_check -s exit:0 -o inline:"START\n" \ + jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail + # exec.prestop by jailname + atf_check -s exit:0 -o inline:"STOP\n" \ + jail -f $(atf_get_srcdir)/commands.jail.conf -qr basejail + # exec.prestop by jid + jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail + atf_check -s exit:0 -o inline:"STOP\n" \ + jail -f $(atf_get_srcdir)/commands.jail.conf -qr `jls -j basejail jid` +} + +commands_cleanup() +{ + jls -j basejail > /dev/null 2>&1 + if [ $? -e 0 ] + then + jail -r basejail + fi +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" + atf_add_test_case "nested" + atf_add_test_case "commands" +} From owner-svn-src-head@freebsd.org Thu Sep 12 19:16:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96C69D7936; Thu, 12 Sep 2019 19:16:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46TpR26lY7z4ddq; Thu, 12 Sep 2019 19:16:30 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 8UZtiVKB2sAGk8UZvidteA; Thu, 12 Sep 2019 13:16:28 -0600 X-Authority-Analysis: v=2.3 cv=WeVylHpX c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=J70Eh1EUuV4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=OrF1C_9Q5Aj8HesGG_8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 1430B7B8; Thu, 12 Sep 2019 12:16:25 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x8CJGO1l004193; Thu, 12 Sep 2019 12:16:24 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x8CJGOXB004190; Thu, 12 Sep 2019 12:16:24 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201909121916.x8CJGOXB004190@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352248 - head/usr.sbin/ntp/libntp In-reply-to: <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> References: <201909121546.x8CFkwB7005702@repo.freebsd.org> <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> Comments: In-reply-to Ian Lepore message dated "Thu, 12 Sep 2019 11:53:38 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 12 Sep 2019 12:16:24 -0700 X-CMAE-Envelope: MS4wfAc4s2qx31Y4AefuWuc5YSJ8ctj1EPEQtGO8sD8ulKptcOlEcbrl1qwPb8XQ5Zv/6jcAt4gl+qyGlMEPDSjPxl9n2iFsMTKnFN0dPfRtOroyrKZ5amW2 lLR85cEvP8mhJe8TADStMK3QQbC7ULZLfzGcSG/Fsc450KXd90puXxZ+vl4/7ekgQvkdBSP+TMc9qJEZkvboqutCU608ldxzV9rJQFK9UtIqj+vWGfdEA3IZ xr8zWkbmruY+X9LWyB4uK5HIfLtvqS56qwIRkELgrR2hlnDMQKOGXlvyeTSE9aW2AAvW41RhLFJ7GkOaHGfOXg== X-Rspamd-Queue-Id: 46TpR26lY7z4ddq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.12) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RWL_MAILSPIKE_GOOD(0.00)[12.134.59.64.rep.mailspike.net : 127.0.0.18]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-2.40)[ip: (-6.45), ipnet: 64.59.128.0/20(-3.09), asn: 6327(-2.40), country: CA(-0.09)]; RCVD_IN_DNSWL_NONE(0.00)[12.134.59.64.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 19:16:32 -0000 In message <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org>, Ian Le pore writes: > On Thu, 2019-09-12 at 15:46 +0000, Baptiste Daroussin wrote: > > Author: bapt > > Date: Thu Sep 12 15:46:58 2019 > > New Revision: 352248 > > URL: https://svnweb.freebsd.org/changeset/base/352248 > > > > Log: > > Get the readline header from the installed header instead of the from the > source > > location. > > > > How can this possibly be right? One of the hallmarks of our build > system is that it is self-contained in the sense that it uses the > sources to build the sources, not sources or files from the host > machine being used to do the build. > > -- Ian > This is correct: use $DESTDIR if $SYSROOT is undefined. liebedit should already be installed in $SYSROOT by the time we get here. I'd prefer that we simply bail if $SYSROOT is undefined. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > With newer import of libedit, the path to be able to access > > readline/readline.h > > will also include header which name will conflict with some > > expected by ntp in > > another path and end up breaking the build. > > > > Modified: > > head/usr.sbin/ntp/libntp/Makefile > > > > Modified: head/usr.sbin/ntp/libntp/Makefile > > ===================================================================== > > ========= > > --- head/usr.sbin/ntp/libntp/Makefile Thu Sep 12 15:44:53 2019 > (r352 > > 247) > > +++ head/usr.sbin/ntp/libntp/Makefile Thu Sep 12 15:46:58 2019 > (r352 > > 248) > > @@ -79,7 +79,7 @@ CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ > > -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \ > > -I${SRCTOP}/contrib/ntp/sntp/libopts \ > > -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \ > > - -I${SRCTOP}/lib/libedit/edit \ > > + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit \ > > -I${.CURDIR:H} \ > > -I${.CURDIR}/ > > > > > > From owner-svn-src-head@freebsd.org Thu Sep 12 19:51:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC717D8B45; Thu, 12 Sep 2019 19:51:16 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46TqC82YGjz3C70; Thu, 12 Sep 2019 19:51:15 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x8CJp6uw059240; Thu, 12 Sep 2019 12:51:06 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x8CJp6A3059239; Thu, 12 Sep 2019 12:51:06 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201909121951.x8CJp6A3059239@gndrsh.dnsmgr.net> Subject: Re: svn commit: r352231 - head/lib/libc/sys In-Reply-To: To: Ian Lepore Date: Thu, 12 Sep 2019 12:51:06 -0700 (PDT) CC: Alan Somers , Peter Holm , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 46TqC82YGjz3C70 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 19:51:16 -0000 [ Charset UTF-8 unsupported, converting... ] > On Wed, 2019-09-11 at 15:55 -0600, Alan Somers wrote: > > On Wed, Sep 11, 2019 at 3:50 PM Ian Lepore wrote: > > > > > On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > > > > Author: asomers > > > > Date: Wed Sep 11 19:48:32 2019 > > > > New Revision: 352231 > > > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > > > > > Log: > > > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > > > > > > timestamp as > > > > ancillary data to each IP datagram that is received on the socket. > > > > > > However, > > > > it may fail, for example due to insufficient memory. In that case the > > > > packet will still be received but not timestamp will be attached. > > > > > > > > Reviewed by: kib > > > > MFC after: 3 days > > > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > > > > > Modified: > > > > head/lib/libc/sys/getsockopt.2 > > > > > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > > > > > > > > ============================================================================== > > > > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 > > > > > > (r352230) > > > > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 > > > > > > (r352231) > > > > @@ -28,7 +28,7 @@ > > > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > > > .\" $FreeBSD$ > > > > .\" > > > > -.Dd February 10, 2019 > > > > +.Dd September 11, 2019 > > > > .Dt GETSOCKOPT 2 > > > > .Os > > > > .Sh NAME > > > > @@ -431,7 +431,8 @@ option is enabled on a > > > > .Dv SOCK_DGRAM > > > > socket, the > > > > .Xr recvmsg 2 > > > > -call will return a timestamp corresponding to when the datagram was > > > > > > received. > > > > +call may return a timestamp corresponding to when the datagram was > > > > > > received. > > > > +However, it may not, for example due to a resource shortage. > > > > The > > > > .Va msg_control > > > > field in the > > > > > > > > > > So I guess this actually happened to someone... is it a common thing > > > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > > > and if this situation really happens and can persist for a long time, > > > ntpd would effectively stop working. > > > > > > -- Ian > > > > > > > pho discovered how to trigger it. If you start 50 ping processes > > simultaneously, sometimes a few will fail. Will ntpd be ok with a single > > failure, as long as the timestamp is received correctly in a subsequent > > packet? > > -Alan > > Yeah, nptd is resilient to missing data and intermittent comms, within > reason. If it goes hours without getting a timestamp, system time > would start to drift. Running 50 concurrent pings sounds like > something that won't come up in the real world. :) I would think this is worth investigation, as the 50 pings are most likely not the only trigger event for this problem. > -- Ian -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Sep 12 20:02:34 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC124D8F91; Thu, 12 Sep 2019 20:02:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46TqS93QxXz3D4G; Thu, 12 Sep 2019 20:02:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 8VITiVj6ysAGk8VIVie4gV; Thu, 12 Sep 2019 14:02:31 -0600 X-Authority-Analysis: v=2.3 cv=WeVylHpX c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=J70Eh1EUuV4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=l6cWJHGsNtjFN6-XPN8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 3A29982F; Thu, 12 Sep 2019 13:02:29 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x8CK2SNn005045; Thu, 12 Sep 2019 13:02:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x8CK2Sxh005042; Thu, 12 Sep 2019 13:02:28 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201909122002.x8CK2Sxh005042@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352231 - head/lib/libc/sys In-reply-to: <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> References: <201909111948.x8BJmWZn092483@repo.freebsd.org> <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> Comments: In-reply-to Ian Lepore message dated "Wed, 11 Sep 2019 15:50:09 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 12 Sep 2019 13:02:28 -0700 X-CMAE-Envelope: MS4wfINYxAlxTGTeriFi7LBjI8+jN9KG+UtqyfvpktikZQ2r3dtqUjfCoWuOCgHfPN2vgSc0piP72FzfG8Zd+fr1fysHhjRFO2QKxXTqrYBfQU0yb6rtDvb3 vq/fCeOZNI5T+YI+Dnrn791FkiHa6uBSHgjQVPlzNatxaNPuZBrQppOMLCYwm0tspn4zCDVphi69HhrMlyisqyeAMNAFfGUWRc7gt4uddtjSuK6jx5UIE2At snY/AehKRNaS7J8ALNRv0JgbBDCeo4ZzXuLm6ZOOLhLSvcYZhod5H0qnfZZlRL3yIUTToUpE6umN+E8GO0RTEg== X-Rspamd-Queue-Id: 46TqS93QxXz3D4G X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.13) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.04 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-2.44)[ip: (-6.64), ipnet: 64.59.128.0/20(-3.08), asn: 6327(-2.39), country: CA(-0.09)]; RCVD_IN_DNSWL_NONE(0.00)[13.134.59.64.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 20:02:34 -0000 In message <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org>, Ian Le pore writes: > On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > > Author: asomers > > Date: Wed Sep 11 19:48:32 2019 > > New Revision: 352231 > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > Log: > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp a > s > > ancillary data to each IP datagram that is received on the socket. Howeve > r, > > it may fail, for example due to insufficient memory. In that case the > > packet will still be received but not timestamp will be attached. > > > > Reviewed by: kib > > MFC after: 3 days > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > Modified: > > head/lib/libc/sys/getsockopt.2 > > > > Modified: head/lib/libc/sys/getsockopt.2 > > =========================================================================== > === > > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 2019 (r35223 > 0) > > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 2019 (r35223 > 1) > > @@ -28,7 +28,7 @@ > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > .\" $FreeBSD$ > > .\" > > -.Dd February 10, 2019 > > +.Dd September 11, 2019 > > .Dt GETSOCKOPT 2 > > .Os > > .Sh NAME > > @@ -431,7 +431,8 @@ option is enabled on a > > .Dv SOCK_DGRAM > > socket, the > > .Xr recvmsg 2 > > -call will return a timestamp corresponding to when the datagram was receiv > ed. > > +call may return a timestamp corresponding to when the datagram was receive > d. > > +However, it may not, for example due to a resource shortage. > > The > > .Va msg_control > > field in the > > > > So I guess this actually happened to someone... is it a common thing > for the timestamp to fail? I ask because ntpd relies on SO_TIMESTAMP > and if this situation really happens and can persist for a long time, > ntpd would effectively stop working. This reminds me, something that's been on my plate for a couple of weeks. Our NTP upline pinged me a few weeks ago regarding IEEE 1588 driver support for NICs with hardware support. Linux already has it. I was told that someone hrtr has attempted this but that the results weren't optimal. That's all I know. Should I open discussion on arch@? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu Sep 12 20:08:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CFA8D90BD for ; Thu, 12 Sep 2019 20:08:45 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46TqbK1c9kz3DGk for ; Thu, 12 Sep 2019 20:08:45 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568318923; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=UzmWK7BDsm7pjnm/VqevmMvc5DGponF1/YLlkqTMdM1Z90f30XBsdP7lrksOhAZHKyi1MERpZEAN+ S4teCFfW59ITAiiCS7WJ3/clqmDG5tIqEBWrXFf+3FkXOJLDQdZHnDv6xxWE/Vi6AMLdN1n9E7ok/c gtYWzSsdXQhz/HnjulqzZoTOazKgui9xlxKU4DdtLOEAxIcER/3Tcm55KjCdP3K1Gysdtqb8bdrH31 fG1RcxY3+tb6zgHHFvp7OY2/pg2iTzR7U3xuIMWZP0U/5ruEltkn/E6VR3YHQ3rSM14R/tf+R7MrCw vaMJDHrmMUBU4Vn9dprk/Biptb9N6+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=+SFcU6BMrUjrAXMTS6OGGwBtArUnAoudLl9sEDveU9k=; b=thvX/3I/0DAl1UFByhmnCWG5wLXxksFGaXnVPuJevMyLCJYn2mNSQVkmQWVlbUCEnnausnmR6zBy3 r7StxLmAcaHJBkpuLZyd8NpCYQsS23GfaqoyiAy+jon+5XDXwhC9XO3QQ1qNYV6vl8pS4G4v5571C5 ZpgpeFWUeB0OhvfMAgjNs08+VPS/wKobIXAJFtcF8DFq3zPNVl7SCZPyFXAdWJobTdrZP6i5d8EFqL mis/ZJKyPWEjMINq82MaxhxKTszaFY+jPm1hBS71XtnR3N/E/PEN2yP0Ikj+vMCaI2BDO4QXWpDJ3x IHvznJlazTMyeSswzExhXRr09TLmqsQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=+SFcU6BMrUjrAXMTS6OGGwBtArUnAoudLl9sEDveU9k=; b=dOa3jal0KpkFXN86TFsbKWMPOjEu+3PIRGNIOn0DUhRE31qOCPxhiv5tLFXPJtMZh1qXCkVIWvYrI tHUcaiXU/YX8MOSUGny02whI3mo/lmw/H+Ns80IvIt8BDhpArE0Qihp6QXwDDCQ0B/GPtl9Gth86Cz sdHE8bJkhDcUiA0vjNJfznS5hZN0DwM1/jZQx17cQEJokQn53MWwCwMf8aMW05OR9j0ctGpDs/nFUu fMM0w2yD32VudMCB8xG3y3Dd5x/Eid5BrFg/9ldyyEzp8ETUy83eOjuMrNuWEhMShpRvTs4eZWpopj d/oeVMpQUli9LtAcONj6A4iop5lxjdg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 1cdd7cf8-d599-11e9-b67d-cdd75d6ce7a8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 1cdd7cf8-d599-11e9-b67d-cdd75d6ce7a8; Thu, 12 Sep 2019 20:08:41 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8CK8dXN079051; Thu, 12 Sep 2019 14:08:40 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <20f4e7af5b82e47fddf604975ff3e853c231720d.camel@freebsd.org> Subject: Re: svn commit: r352231 - head/lib/libc/sys From: Ian Lepore To: Cy Schubert Cc: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 12 Sep 2019 14:08:39 -0600 In-Reply-To: <201909122002.x8CK2Sxh005042@slippy.cwsent.com> References: <201909111948.x8BJmWZn092483@repo.freebsd.org> <63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org> <201909122002.x8CK2Sxh005042@slippy.cwsent.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46TqbK1c9kz3DGk X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 20:08:45 -0000 On Thu, 2019-09-12 at 13:02 -0700, Cy Schubert wrote: > In message < > 63cf915c92b92b07e19337849269ec6bd0dc0d1b.camel@freebsd.org>, > Ian Le > pore writes: > > On Wed, 2019-09-11 at 19:48 +0000, Alan Somers wrote: > > > Author: asomers > > > Date: Wed Sep 11 19:48:32 2019 > > > New Revision: 352231 > > > URL: https://svnweb.freebsd.org/changeset/base/352231 > > > > > > Log: > > > getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable > > > > > > When SO_TIMESTAMP is set, the kernel will attempt to attach a > > > timestamp a > > > > s > > > ancillary data to each IP datagram that is received on the > > > socket. Howeve > > > > r, > > > it may fail, for example due to insufficient memory. In that > > > case the > > > packet will still be received but not timestamp will be > > > attached. > > > > > > Reviewed by: kib > > > MFC after: 3 days > > > Differential Revision: https://reviews.freebsd.org/D21607 > > > > > > Modified: > > > head/lib/libc/sys/getsockopt.2 > > > > > > Modified: head/lib/libc/sys/getsockopt.2 > > > ================================================================= > > > ========== > > > > === > > > --- head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:29:40 > > > 2019 (r35223 > > > > 0) > > > +++ head/lib/libc/sys/getsockopt.2 Wed Sep 11 19:48:32 > > > 2019 (r35223 > > > > 1) > > > @@ -28,7 +28,7 @@ > > > .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 > > > .\" $FreeBSD$ > > > .\" > > > -.Dd February 10, 2019 > > > +.Dd September 11, 2019 > > > .Dt GETSOCKOPT 2 > > > .Os > > > .Sh NAME > > > @@ -431,7 +431,8 @@ option is enabled on a > > > .Dv SOCK_DGRAM > > > socket, the > > > .Xr recvmsg 2 > > > -call will return a timestamp corresponding to when the datagram > > > was receiv > > > > ed. > > > +call may return a timestamp corresponding to when the datagram > > > was receive > > > > d. > > > +However, it may not, for example due to a resource shortage. > > > The > > > .Va msg_control > > > field in the > > > > > > > So I guess this actually happened to someone... is it a common > > thing > > for the timestamp to fail? I ask because ntpd relies on > > SO_TIMESTAMP > > and if this situation really happens and can persist for a long > > time, > > ntpd would effectively stop working. > > This reminds me, something that's been on my plate for a couple of > weeks. > Our NTP upline pinged me a few weeks ago regarding IEEE 1588 driver > support > for NICs with hardware support. Linux already has it. I was told > that > someone hrtr has attempted this but that the results weren't > optimal. > That's all I know. Should I open discussion on arch@? It's something I've been wanting to do for a while, and something that would be helpful at $work, so a discussion on it sounds like a good idea. -- Ian From owner-svn-src-head@freebsd.org Thu Sep 12 20:46:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57CA2D9F14; Thu, 12 Sep 2019 20:46:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46TrRC1dd9z3G2R; Thu, 12 Sep 2019 20:46:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C45D24616; Thu, 12 Sep 2019 20:46:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8CKkkY4083480; Thu, 12 Sep 2019 20:46:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8CKkkrQ083479; Thu, 12 Sep 2019 20:46:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201909122046.x8CKkkrQ083479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 12 Sep 2019 20:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352265 - head/contrib/mtree X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/contrib/mtree X-SVN-Commit-Revision: 352265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 20:46:47 -0000 Author: bdrewery Date: Thu Sep 12 20:46:46 2019 New Revision: 352265 URL: https://svnweb.freebsd.org/changeset/base/352265 Log: mtree -O: Fix not descending on hash collisions MFC after: 2 weeks Obtained from: NetBSD (nakayama) Modified: head/contrib/mtree/only.c Modified: head/contrib/mtree/only.c ============================================================================== --- head/contrib/mtree/only.c Thu Sep 12 20:15:04 2019 (r352264) +++ head/contrib/mtree/only.c Thu Sep 12 20:46:46 2019 (r352265) @@ -1,4 +1,4 @@ -/* $NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $ */ +/* $NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: only.c,v 1.2 2013/02/05 00:59:03 christos Exp $"); +__RCSID("$NetBSD: only.c,v 1.3 2017/09/07 04:04:13 nakayama Exp $"); #endif #include @@ -89,11 +89,14 @@ static void hash_insert(char *str, uint32_t h) { struct hentry *e; + char *x; if ((e = malloc(sizeof(*e))) == NULL) mtree_err("memory allocation error"); + if ((x = strdup(str)) == NULL) + mtree_err("memory allocation error"); - e->str = str; + e->str = x; e->hash = h; e->next = table[h]; table[h] = e; @@ -110,10 +113,7 @@ fill(char *str) *ptr = '\0'; if (!hash_find(str, &h)) { - char *x = strdup(str); - if (x == NULL) - mtree_err("memory allocation error"); - hash_insert(x, h); + hash_insert(str, h); fill(str); } *ptr = '/'; @@ -135,6 +135,7 @@ load_only(const char *fname) err(1, "Duplicate entry %s", line); hash_insert(line, h); fill(line); + free(line); } fclose(fp); From owner-svn-src-head@freebsd.org Thu Sep 12 21:27:40 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3540EDAA12 for ; Thu, 12 Sep 2019 21:27:40 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46TsLM37K5z3HqV for ; Thu, 12 Sep 2019 21:27:39 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f175.google.com with SMTP id a22so25071787ljd.0 for ; Thu, 12 Sep 2019 14:27:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=f1JEK9O7sgtZRJXv8+WIKT6Qspev87U9cickqJe7UKM=; b=Yk6e6p6hqD/257PGxJHJx8a1X8uXH+K+pmLjuBmUK/Bd1GIOlrjEnJgwq/o9C8aaBx lGkLAFO5i8qzcc9uLX2E82uyQpKsEFGhMWk6irjri03r5KDyUbZEBJOjI02SNqzcvZR2 R4NPL/7CbQfZQUbmAWQFRbZdcwNFXNt+5cmf+Y7b4LqITkC0LD9ACEJfu+uGDMKwUPW6 uEMDDXJ8kRValEfHMiyBHDW8YJNkVAqkbsw5VrzKHxED3HjQe2XAskcbhHY8VyGfwouq maDYTumuw84DOLvzovSp3HVK+YBg+PqE9Gr1am/3rNhJmAnKiCrDytzORFm6J+8RaEWZ bnCA== X-Gm-Message-State: APjAAAVYHllmsTzThiF6MErWJUB6bLKAO0n2kHYtgGf4BURhz73c4QD3 vFDL++exncZ6QlXbroREIiM5OIJxjFPLLU+7iSCrIQ== X-Received: by 2002:a2e:9098:: with SMTP id l24mt5430935ljg.0.1568323657462; Thu, 12 Sep 2019 14:27:37 -0700 (PDT) MIME-Version: 1.0 References: <201908191754.x7JHsf3D000662@repo.freebsd.org> In-Reply-To: <201908191754.x7JHsf3D000662@repo.freebsd.org> From: Alan Somers Date: Thu, 12 Sep 2019 15:27:25 -0600 Message-ID: Subject: Re: svn commit: r351226 - head/sbin/ping Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46TsLM37K5z3HqV X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.175 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.19 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.959,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[175.208.85.209.list.dnswl.org : 127.0.5.0]; MISSING_TO(2.00)[]; IP_SCORE(-1.23)[ip: (-0.54), ipnet: 209.85.128.0/17(-3.32), asn: 15169(-2.25), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[175.208.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 21:27:40 -0000 On Mon, Aug 19, 2019 at 11:54 AM Alan Somers wrote: > Author: asomers > Date: Mon Aug 19 17:54:40 2019 > New Revision: 351226 > URL: https://svnweb.freebsd.org/changeset/base/351226 > > Log: > Fix uninitialized variable warnings when MK_CASPER=3Dno > > Submitted by: J=C3=A1n Su=C4=8Dan > MFC after: 2 weeks > Sponsored by: Google, inc. (Google Summer of Code 2019) > Differential Revision: https://reviews.freebsd.org/D21322 > > Modified: > head/sbin/ping/ping.c > Correction: the commit message should've said "unused variable warnings", not "uninitialized variable warnings". -Alan From owner-svn-src-head@freebsd.org Fri Sep 13 04:11:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7608EE416A; Fri, 13 Sep 2019 04:11:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46V2J82XhKz46VS; Fri, 13 Sep 2019 04:11:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (unknown [51.52.172.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id B55048881; Fri, 13 Sep 2019 04:11:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r352248 - head/usr.sbin/ntp/libntp To: Ian Lepore , Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201909121546.x8CFkwB7005702@repo.freebsd.org> <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Fri, 13 Sep 2019 05:11:18 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 04:11:20 -0000 On 9/12/19 6:53 PM, Ian Lepore wrote: > On Thu, 2019-09-12 at 15:46 +0000, Baptiste Daroussin wrote: >> Author: bapt >> Date: Thu Sep 12 15:46:58 2019 >> New Revision: 352248 >> URL: https://svnweb.freebsd.org/changeset/base/352248 >> >> Log: >> Get the readline header from the installed header instead of the from the source >> location. >> > > How can this possibly be right? One of the hallmarks of our build > system is that it is self-contained in the sense that it uses the > sources to build the sources, not sources or files from the host > machine being used to do the build. I think the issue is that the readline compat headers are installed at /usr/include/edit/readline/foo.h, so you need the equivalent of -I/usr/include/edit. If there was a way to make -I honor --sysroot (e.g. -I=/usr/include/edit) then that might be the cleaner way to handle this. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Sep 13 06:36:26 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7624AE7A2F; Fri, 13 Sep 2019 06:36:26 +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 46V5WZ2YWpz4DTx; Fri, 13 Sep 2019 06:36:26 +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 3B1E6305E; Fri, 13 Sep 2019 06:36:26 +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 x8D6aQCK031053; Fri, 13 Sep 2019 06:36:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8D6aPCY031048; Fri, 13 Sep 2019 06:36:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909130636.x8D6aPCY031048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 13 Sep 2019 06:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352274 - head/tools/tools/locale/tools X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/tools/tools/locale/tools X-SVN-Commit-Revision: 352274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 06:36:26 -0000 Author: bapt Date: Fri Sep 13 06:36:24 2019 New Revision: 352274 URL: https://svnweb.freebsd.org/changeset/base/352274 Log: Insert proper copyright/license headers Those scripts are without copyright and license assignement since their creation After grabbing information from The various authors and contributors assign proper license header and copyrights. This has been reported by yuripv in his work on integrating those in Illumos! Reported by: yuripv Discussed with: marino, edwin MFC after: 3 days Modified: head/tools/tools/locale/tools/charmaps.pm head/tools/tools/locale/tools/cldr2def.pl head/tools/tools/locale/tools/extract-colldef.awk head/tools/tools/locale/tools/finalize head/tools/tools/locale/tools/utf8-rollup.pl Modified: head/tools/tools/locale/tools/charmaps.pm ============================================================================== --- head/tools/tools/locale/tools/charmaps.pm Fri Sep 13 05:54:09 2019 (r352273) +++ head/tools/tools/locale/tools/charmaps.pm Fri Sep 13 06:36:24 2019 (r352274) @@ -1,5 +1,29 @@ #!/usr/local/bin/perl -w +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2009 Edwin Groothuis +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. # # $FreeBSD$ # Modified: head/tools/tools/locale/tools/cldr2def.pl ============================================================================== --- head/tools/tools/locale/tools/cldr2def.pl Fri Sep 13 05:54:09 2019 (r352273) +++ head/tools/tools/locale/tools/cldr2def.pl Fri Sep 13 06:36:24 2019 (r352274) @@ -1,4 +1,31 @@ #!/usr/local/bin/perl -wC + +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2009 Edwin Groothuis +# Copyright 2015 John Marino +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # $FreeBSD$ use strict; Modified: head/tools/tools/locale/tools/extract-colldef.awk ============================================================================== --- head/tools/tools/locale/tools/extract-colldef.awk Fri Sep 13 05:54:09 2019 (r352273) +++ head/tools/tools/locale/tools/extract-colldef.awk Fri Sep 13 06:36:24 2019 (r352274) @@ -1,3 +1,29 @@ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2016 Baptiste Daroussin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # $FreeBSD$ BEGIN { Modified: head/tools/tools/locale/tools/finalize ============================================================================== --- head/tools/tools/locale/tools/finalize Fri Sep 13 05:54:09 2019 (r352273) +++ head/tools/tools/locale/tools/finalize Fri Sep 13 06:36:24 2019 (r352274) @@ -1,5 +1,30 @@ #!/bin/sh # +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2015 John Marino +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # $FreeBSD$ # # This is a helper script for the Makefile in the parent directory. Modified: head/tools/tools/locale/tools/utf8-rollup.pl ============================================================================== --- head/tools/tools/locale/tools/utf8-rollup.pl Fri Sep 13 05:54:09 2019 (r352273) +++ head/tools/tools/locale/tools/utf8-rollup.pl Fri Sep 13 06:36:24 2019 (r352274) @@ -1,4 +1,31 @@ #!/usr/local/bin/perl -wC + +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2009 Edwin Groothuis +# Copyright 2015 John Marino +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # $FreeBSD$ use strict; From owner-svn-src-head@freebsd.org Fri Sep 13 06:50:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1EE5E7F69; Fri, 13 Sep 2019 06:50:03 +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 46V5qH684rz4FCJ; Fri, 13 Sep 2019 06:50:03 +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 B2FA23249; Fri, 13 Sep 2019 06:50:03 +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 x8D6o345037280; Fri, 13 Sep 2019 06:50:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8D6o2fb037276; Fri, 13 Sep 2019 06:50:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909130650.x8D6o2fb037276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 13 Sep 2019 06:50:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352275 - in head/lib/libedit: . TEST edit readline X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/lib/libedit: . TEST edit readline X-SVN-Commit-Revision: 352275 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 06:50:04 -0000 Author: bapt Date: Fri Sep 13 06:50:02 2019 New Revision: 352275 URL: https://svnweb.freebsd.org/changeset/base/352275 Log: Update libedit to a snapshot from 2019-09-10 This version bring many fixes regarding unicode support It also adds proper support for filename completion (we do not need our custom patches anymore) Improves the libreadline compatibility Note that the same work was done by Yuichiro Naito in https://reviews.freebsd.org/D21196 the main difference is in this case we have reimported libedit in contrib to fix a long standing mess in the previous merges which prevented a proper update workflow. (discussed long ago with pfg@) The only difference with upstream libedit is we have added a compatibility shim for the _elf_fn_sh_complete function which we previously added to support quoting in filename completion and is not needed anymore. This was added to continue supported old /bin/sh binaries and not break backward compatibility (as discussed with jilles@) Reviewed by: Yuichiro Naito MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D21584 Added: head/lib/libedit/readline/ head/lib/libedit/readline/Makefile (contents, props changed) - copied unchanged from r352274, head/lib/libedit/edit/readline/history.h - copied unchanged from r352274, head/lib/libedit/edit/readline/tilde.h Directory Properties: head/lib/libedit/readline/history.h (props changed) head/lib/libedit/readline/tilde.h (props changed) Deleted: head/lib/libedit/Makefile.depend head/lib/libedit/TEST/ head/lib/libedit/chared.c head/lib/libedit/chared.h head/lib/libedit/chartype.c head/lib/libedit/chartype.h head/lib/libedit/common.c head/lib/libedit/config.h head/lib/libedit/edit/ head/lib/libedit/editline.3 head/lib/libedit/editrc.5 head/lib/libedit/el.c head/lib/libedit/el.h head/lib/libedit/eln.c head/lib/libedit/emacs.c head/lib/libedit/filecomplete.c head/lib/libedit/filecomplete.h head/lib/libedit/hist.c head/lib/libedit/hist.h head/lib/libedit/histedit.h head/lib/libedit/history.c head/lib/libedit/keymacro.c head/lib/libedit/keymacro.h head/lib/libedit/makelist head/lib/libedit/map.c head/lib/libedit/map.h head/lib/libedit/parse.c head/lib/libedit/parse.h head/lib/libedit/prompt.c head/lib/libedit/prompt.h head/lib/libedit/read.c head/lib/libedit/read.h head/lib/libedit/readline.c head/lib/libedit/refresh.c head/lib/libedit/refresh.h head/lib/libedit/search.c head/lib/libedit/search.h head/lib/libedit/sig.c head/lib/libedit/sig.h head/lib/libedit/sys.h head/lib/libedit/terminal.c head/lib/libedit/terminal.h head/lib/libedit/tokenizer.c head/lib/libedit/tty.c head/lib/libedit/tty.h head/lib/libedit/vi.c Modified: head/lib/libedit/Makefile Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Fri Sep 13 06:36:24 2019 (r352274) +++ head/lib/libedit/Makefile Fri Sep 13 06:50:02 2019 (r352275) @@ -4,6 +4,9 @@ PACKAGE=clibs +EDITDIR= ${SRCTOP}/contrib/libedit +.PATH: ${EDITDIR} + SHLIB_MAJOR= 7 SHLIBDIR?= /lib @@ -12,75 +15,83 @@ LIB= edit LIBADD= ncursesw -OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ - hist.c keymacro.c map.c chartype.c \ - parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c +SRCS= chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \ + hist.c history.c historyn.c keymacro.c literal.c map.c \ + parse.c prompt.c read.c readline.c refresh.c search.c sig.c \ + terminal.c tokenizer.c tokenizern.c tty.c vi.c -MAN= editline.3 editrc.5 -MLINKS= editline.3 el_deletestr.3 editline.3 el_end.3 editline.3 el_init.3 \ - editline.3 el_get.3 editline.3 el_getc.3 editline.3 el_gets.3 \ - editline.3 history.3 editline.3 history_end.3 \ - editline.3 history_init.3 editline.3 el_insertstr.3 \ - editline.3 el_line.3 editline.3 el_parse.3 editline.3 el_push.3 \ - editline.3 el_reset.3 editline.3 el_resize.3 editline.3 el_set.3 \ +MAN= editline.3 editrc.5 editline.7 + +MLINKS= \ + editline.3 el_deletestr.3 \ + editline.3 el_end.3 \ + editline.3 el_get.3 \ + editline.3 el_getc.3 \ + editline.3 el_gets.3 \ + editline.3 el_init.3 \ + editline.3 el_init_fd.3 \ + editline.3 el_insertstr.3 \ + editline.3 el_line.3 \ + editline.3 el_parse.3 \ + editline.3 el_push.3 \ + editline.3 el_reset.3 \ + editline.3 el_resize.3 \ + editline.3 el_set.3 \ editline.3 el_source.3 \ - editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \ - editline.3 tok_line.3 editline.3 tok_str.3 + editline.3 history.3 \ + editline.3 history_end.3 \ + editline.3 history_init.3 \ + editline.3 tok_end.3 \ + editline.3 tok_init.3 \ + editline.3 tok_line.3 \ + editline.3 tok_reset.3 \ + editline.3 tok_str.3 \ + editline.3 el_wdeletestr.3 \ + editline.3 el_wget.3 \ + editline.3 el_wgetc.3 \ + editline.3 el_wgets.3 \ + editline.3 el_winsertstr.3 \ + editline.3 el_wline.3 \ + editline.3 el_wparse.3 \ + editline.3 el_wpush.3 \ + editline.3 el_wset.3 \ + editline.3 history_w.3 \ + editline.3 history_wend.3 \ + editline.3 history_winit.3 \ + editline.3 tok_wend.3 \ + editline.3 tok_winit.3 \ + editline.3 tok_wline.3 \ + editline.3 tok_wreset.3 \ + editline.3 tok_wstr.3 -# For speed and debugging -#SRCS= ${OSRCS} readline.c tokenizer.c history.c -# For protection -SRCS= editline.c readline.c tokenizer.c history.c -SRCS+= common.h emacs.h fcns.h help.h vi.h - -# Widechar -SRCS+= tokenizern.c historyn.c -CLEANFILES+= tokenizern.c historyn.c - INCS= histedit.h -CLEANFILES+= common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h -CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR -#CFLAGS+= -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH -#CFLAGS+= -DDEBUG_PASTE -DDEBUG_EDIT +SRCS+= common.h emacs.h fcns.h func.h help.h vi.h +CLEANFILES+= common.h emacs.h fcns.h func.h help.h vi.h +CFLAGS+= -I. -I${EDITDIR} -I${EDITDIR}/readline + AHDR= vi.h emacs.h common.h -ASRC= ${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c +ASRC= ${EDITDIR}/vi.c ${EDITDIR}/emacs.c ${EDITDIR}/common.c -SUBDIR= edit/readline +SUBDIR= readline .for hdr in vi emacs common ${hdr}.h: ${hdr}.c makelist - sh ${.CURDIR}/makelist -h ${.CURDIR}/${hdr}.c > ${.TARGET} + sh ${EDITDIR}/makelist -h ${EDITDIR}/${hdr}.c > ${.TARGET} .endfor fcns.h: ${AHDR} makelist - sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET} + sh ${EDITDIR}/makelist -fh ${AHDR} > ${.TARGET} -fcns.c: ${AHDR} fcns.h makelist - sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET} +func.h: ${AHDR} makelist + sh ${EDITDIR}/makelist -fc ${AHDR} > ${.TARGET} -help.c: ${ASRC} makelist - sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET} - help.h: ${ASRC} makelist - sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET} + sh ${EDITDIR}/makelist -bh ${ASRC} > ${.TARGET} -editline.c: ${OSRCS} - sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET} - -tokenizern.c: makelist Makefile - sh ${.CURDIR}/makelist -n tokenizer.c > ${.TARGET} - -historyn.c: makelist Makefile - sh ${.CURDIR}/makelist -n history.c > ${.TARGET} - -# minimal dependency to make "make depend" optional -editline.o editline.po editline.pico editline.ln: \ - common.h emacs.h fcns.c fcns.h help.c help.h vi.h - -tc1.o: ${.CURDIR}/TEST/tc1.c +tc1.o: ${EDITDIR}/TEST/tc1.c test: tc1.o libedit.a ${DPADD} ${LIBTERMCAP} ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} Added: head/lib/libedit/readline/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/readline/Makefile Fri Sep 13 06:50:02 2019 (r352275) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/contrib/libedit/readline +INCS= readline.h history.h tilde.h + +INCSDIR= ${INCLUDEDIR}/edit/readline + +.include Copied: head/lib/libedit/readline/history.h (from r352274, head/lib/libedit/edit/readline/history.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/readline/history.h Fri Sep 13 06:50:02 2019 (r352275, copy of r352274, head/lib/libedit/edit/readline/history.h) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2011 David E. O'Brien + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include Copied: head/lib/libedit/readline/tilde.h (from r352274, head/lib/libedit/edit/readline/tilde.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/readline/tilde.h Fri Sep 13 06:50:02 2019 (r352275, copy of r352274, head/lib/libedit/edit/readline/tilde.h) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2011 David E. O'Brien + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-head@freebsd.org Fri Sep 13 06:58:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8FA7E8236; Fri, 13 Sep 2019 06:58:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46V6125w2Vz4FhX; Fri, 13 Sep 2019 06:58:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 95E4F9B74; Fri, 13 Sep 2019 06:58:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 5B1EBB5BA4; Fri, 13 Sep 2019 08:58:29 +0200 (CEST) Date: Fri, 13 Sep 2019 08:58:29 +0200 From: Baptiste Daroussin To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352248 - head/usr.sbin/ntp/libntp Message-ID: <20190913065828.a37ffzm3aevu4c7a@ivaldir.net> References: <201909121546.x8CFkwB7005702@repo.freebsd.org> <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="efkwnawvwfnjvqia" Content-Disposition: inline In-Reply-To: <54c8efce3064f685c1948546bebaccc5f56a09c1.camel@freebsd.org> User-Agent: NeoMutt/20180716 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 06:58:31 -0000 --efkwnawvwfnjvqia Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 12, 2019 at 11:53:38AM -0600, Ian Lepore wrote: > On Thu, 2019-09-12 at 15:46 +0000, Baptiste Daroussin wrote: > > Author: bapt > > Date: Thu Sep 12 15:46:58 2019 > > New Revision: 352248 > > URL: https://svnweb.freebsd.org/changeset/base/352248 > >=20 > > Log: > > Get the readline header from the installed header instead of the from= the source > > location. > > =20 >=20 > How can this possibly be right? One of the hallmarks of our build > system is that it is self-contained in the sense that it uses the > sources to build the sources, not sources or files from the host > machine being used to do the build. >=20 This is the regular mechanism to find things that are generated or installed during make build world. This is for example used in gnu grep for the same purpose, but also the rpc= =2E* ofed and way more. This does not break at all the self contained nature of the buildworld! What it does is always find the headers in the right place after the install-include early phase of buildworld. Best regards, Bapt --efkwnawvwfnjvqia Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl17PhEACgkQY4mL3PG3 PlqEsxAAmTrIyPWdGD1Qsv8XV9rjAP5XFWdXqVCFn2qawjuPn956eQUp+pp4gg9v 2ofeFl0GmkhfVxrKQnbPBKTkYLsNgYA9sFh95WRU1OhzKyveXVxgwDkGlNMMvB+6 bbDLu/4Ok7VlEQFYEoF7EH15aWTc//nwAhhEeQuLGGfEZIUM5kx1MlXk4bnDAE3M 3mOpAQbSwEsgttuEcO0ceZE/Ekf/36Krdu2DcRxcOhD47/egCVoMS/rahLgPoy3W /hPdazHR1cyr8ulyrJs00iTEZxNDwDuxDyzK6kTGKd3cpd0CSWdjmJjXWlJ906Xb n493+uGFQ7Khq+O5/ZxCF3tvJjqV2U+tkcODk+YlCEFy0RtiH4yDYC1Cc3NuOyEE F05sAw+Bc4MWadmqI9XOebAymAbRnL4UT7lpWH1aDDvQbhnek7NhXbd9nQoKGOGo 2Yz+ApzO70UcwS6VQEtr0shCPuS+QGxRtmlk65CxNhElpyLKoa61fZzoxH1m4ZU3 ZP//Ka2nb7n6tsXkMdGz9i+ND5l8MedDRY2IJKNNV4uPw81tWkFeVa3Ywqk9j34v NBSfTjruTZalO1lz+pT0G8zx+6pj7RKXqPAsSzT0Pj23tXjTBeeZfiUlpRlBqFm5 6nY5OHqQWlSyjvRrT2+5XgKWCZ4LlOfAw65cfoS28JgslFXp8/E= =KbrJ -----END PGP SIGNATURE----- --efkwnawvwfnjvqia-- From owner-svn-src-head@freebsd.org Fri Sep 13 11:59:58 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85111EF41B; Fri, 13 Sep 2019 11:59:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 46VDhs3K58z4XlF; Fri, 13 Sep 2019 11:59:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.103] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id E0E81361306; Fri, 13 Sep 2019 21:59:53 +1000 (AEST) Date: Fri, 13 Sep 2019 21:59:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Cy Schubert cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351659 - in head: contrib/libc++/include contrib/netbsd-tests/lib/libc/ssp gnu/lib/libssp include lib/libc/stdio In-Reply-To: <201909011932.x81JWYts004074@slippy.cwsent.com> Message-ID: <20190913214846.P1215@besplex.bde.org> References: <201909011612.x81GC5DW097846@repo.freebsd.org> <201909011932.x81JWYts004074@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=D+Q3ErZj c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=ZsRUh5Ms3fib6wNPaIgA:9 a=CjuIK1q_8ugA:10 a=EVd9C9LBHkwA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 46VDhs3K58z4XlF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of brde@optusnet.com.au designates 211.29.132.249 as permitted sender) smtp.mailfrom=brde@optusnet.com.au X-Spamd-Result: default: False [0.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; RCVD_IN_DNSWL_LOW(-0.10)[249.132.29.211.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:211.29.132.0/23:c]; FREEMAIL_FROM(0.00)[optusnet.com.au]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[optusnet.com.au]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RBL_MAILSPIKE_WORST(2.00)[249.132.29.211.rep.mailspike.net : 127.0.0.10]; RCPT_COUNT_FIVE(0.00)[5]; BAD_REP_POLICIES(0.10)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ip: (-5.16), ipnet: 211.28.0.0/14(-3.26), asn: 4804(-2.40), country: AU(0.01)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[optusnet.com.au]; ASN(0.00)[asn:4804, ipnet:211.28.0.0/14, country:AU]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 11:59:58 -0000 On Sun, 1 Sep 2019, Cy Schubert wrote: I'm replying to this reply since I lost the original mail. > In message <201909011612.x81GC5DW097846@repo.freebsd.org>, Ed Maste writes: >> Author: emaste >> Date: Sun Sep 1 16:12:05 2019 >> New Revision: 351659 >> URL: https://svnweb.freebsd.org/changeset/base/351659 >> >> Log: >> libc: remove gets >> >> gets is unsafe and shouldn't be used (for many years now). Leave it in >> the existing symbol version so anything that previously linked aginst it >> still runs, but do not allow new software to link against it. >> >> (The compatability/legacy implementation must not be static so that >> the symbol and in particular the compat sym gets@FBSD_1.0 make it >> into libc.) >> >> PR: 222796 (exp-run) >> Reported by: Paul Vixie >> Reviewed by: allanjude, cy, eadler, gnn, jhb, kib, ngie (some earlie >> r) >> Relnotes: Yes >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D12298 This breaks for most old standards, and bogotitifies the ifdefs that attempt to support old standards. used to be more careful with these ifdefs than most system headers. C11 removed gets(), but POSIX.1-2017 (Issue 7) still has it (marked as obsolescent). Thus this change breaks support for all versions of POSIX. Bruce From owner-svn-src-head@freebsd.org Fri Sep 13 12:24:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 235A4F05A7; Fri, 13 Sep 2019 12:24:22 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46VFF10Ls6z4ZHR; Fri, 13 Sep 2019 12:24:20 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 545C5270018B; Fri, 13 Sep 2019 08:24:19 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 545C5270018B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1568377459; bh=a1b+f4yVNP9u/FaoHmc4GpvizRqRGlogYWiAUgk8uSM=; h=Subject:To:From:Date:From; b=dSACIiSF1ht0DK/yT2RZVn7ah0O6BJ36mw29oNtE189gqMqJ1X0Pw/M7Oks09rdUI a4jWGp764D0lnMoOvf1KkSLXmqaqEIl2pqr3RPtBPvx4Z/j2rbPVHfDLEQ3j5ed5G1 BY0L8sDzjXbnUZ57CjKB4TPsTyHaq5sTdhTnFm6O9dzE+USaIDzPOs+i93XXJdElBL uqS4umGDsvTb3rAWgaschourCXANIkg+/1CCVZXWbztxnnFNrMl2DYA3YMpuFeCgRV G+K/ZZff93inuaPhK4sI+x0iE9fd6PACiCNRBNFRQwOtNtuNxBOKvtlWhxPwvf6sB1 rZ0SXSfrztL4w== Subject: Re: svn commit: r352228 - head/sys/netinet To: cem@freebsd.org, Andrew Gallatin Cc: src-committers , svn-src-all , svn-src-head References: <201909111848.x8BImQnn056188@repo.freebsd.org> From: Andrew Gallatin Message-ID: <50ec28c4-7e36-c69b-4003-bff07decf22a@cs.duke.edu> Date: Fri, 13 Sep 2019 08:24:18 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46VFF10Ls6z4ZHR X-Spamd-Bar: --------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.duke.edu header.s=mail0816 header.b=dSACIiSF; dmarc=pass (policy=none) header.from=cs.duke.edu; spf=pass (mx1.freebsd.org: domain of gallatin@cs.duke.edu designates 152.3.140.1 as permitted sender) smtp.mailfrom=gallatin@cs.duke.edu X-Spamd-Result: default: False [-9.36 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[cs.duke.edu:s=mail0816]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:152.3.140.0/23]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DWL_DNSWL_MED(-2.00)[duke.edu.dwl.dnswl.org : 127.0.11.2]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_IN_DNSWL_MED(-0.20)[1.140.3.152.list.dnswl.org : 127.0.11.2]; DKIM_TRACE(0.00)[cs.duke.edu:+]; DMARC_POLICY_ALLOW(-0.50)[cs.duke.edu,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-3.66)[ip: (-9.91), ipnet: 152.3.128.0/17(-4.62), asn: 13371(-3.71), country: US(-0.05)]; ASN(0.00)[asn:13371, ipnet:152.3.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 12:24:22 -0000 On 2019-09-11 17:16, Conrad Meyer wrote: > Small nitpick: > > On Wed, Sep 11, 2019 at 11:48 AM Andrew Gallatin wrote: >> Note that on a system under a syn flood attack, arc4random() >> becomes quite expensive, and the chacha_poly crypto that it calls > > arc4random uses chacha20 — there is no "poly" involved. > > Best, > Conrad > Sorry for the mis-statement. poly is associated with chacha in my mind. In any case, calling arc4random() and the chacha it uses millions of times per second is expensive, and avoiding it provides some headroom. Drew From owner-svn-src-head@freebsd.org Fri Sep 13 14:51:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D244EF3782; Fri, 13 Sep 2019 14:51:00 +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 46VJVD5FDFz3GGB; Fri, 13 Sep 2019 14:51:00 +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 98BCB8B66; Fri, 13 Sep 2019 14:51:00 +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 x8DEp0vH027622; Fri, 13 Sep 2019 14:51:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DEp0Wj027621; Fri, 13 Sep 2019 14:51:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201909131451.x8DEp0Wj027621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 13 Sep 2019 14:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352288 - head/usr.bin/grdc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.bin/grdc X-SVN-Commit-Revision: 352288 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 14:51:00 -0000 Author: bapt Date: Fri Sep 13 14:51:00 2019 New Revision: 352288 URL: https://svnweb.freebsd.org/changeset/base/352288 Log: Remove remnant from the pre LIBADD era Modified: head/usr.bin/grdc/Makefile Modified: head/usr.bin/grdc/Makefile ============================================================================== --- head/usr.bin/grdc/Makefile Fri Sep 13 14:43:44 2019 (r352287) +++ head/usr.bin/grdc/Makefile Fri Sep 13 14:51:00 2019 (r352288) @@ -2,7 +2,6 @@ PROG= grdc MAN= grdc.6 -DPADD= ${LIBNCURSESW} LIBADD= ncursesw .include From owner-svn-src-head@freebsd.org Fri Sep 13 15:49:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C6BAF4EC9; Fri, 13 Sep 2019 15:49:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46VKnF37XHz3LQ1; Fri, 13 Sep 2019 15:49:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 505F7961E; Fri, 13 Sep 2019 15:49:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8DFn5w5064110; Fri, 13 Sep 2019 15:49:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DFn5di064109; Fri, 13 Sep 2019 15:49:05 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201909131549.x8DFn5di064109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 13 Sep 2019 15:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352300 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 352300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 15:49:05 -0000 Author: mjg Date: Fri Sep 13 15:49:04 2019 New Revision: 352300 URL: https://svnweb.freebsd.org/changeset/base/352300 Log: vfs: release usecount using fetchadd 1. If we release the last usecount we take ownership of the hold count, which means the vnode will remain allocated until we vdrop it. 2. If someone else vrefs they will find no usecount and will proceed to add their own hold count. 3. No code has a problem with v_usecount transitioning to 0 without the interlock These facts combined mean we can fetchadd instead of having a cmpset loop. Reviewed by: kib (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21528 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Sep 13 15:49:02 2019 (r352299) +++ head/sys/kern/vfs_subr.c Fri Sep 13 15:49:04 2019 (r352300) @@ -2667,12 +2667,13 @@ v_decr_devcount(struct vnode *vp) * see doomed vnodes. If inactive processing was delayed in * vput try to do it here. * - * Notes on lockless counter manipulation: - * _vhold, vputx and other routines make various decisions based - * on either holdcnt or usecount being 0. As long as either counter - * is not transitioning 0->1 nor 1->0, the manipulation can be done - * with atomic operations. Otherwise the interlock is taken covering - * both the atomic and additional actions. + * Both holdcnt and usecount can be manipulated using atomics without holding + * any locks except in these cases which require the vnode interlock: + * holdcnt: 1->0 and 0->1 + * usecount: 0->1 + * + * usecount is permitted to transition 1->0 without the interlock because + * vnode is kept live by holdcnt. */ static enum vgetstate _vget_prep(struct vnode *vp, bool interlock) @@ -2784,6 +2785,29 @@ vget_finish(struct vnode *vp, int flags, enum vgetstat * Upgrade our holdcnt to a usecount. */ VI_LOCK(vp); + /* + * See the previous section. By the time we get here we may find + * ourselves in the same spot. + */ + if (vp->v_type != VCHR) { + if (refcount_acquire_if_not_zero(&vp->v_usecount)) { +#ifdef INVARIANTS + int old = atomic_fetchadd_int(&vp->v_holdcnt, -1) - 1; + VNASSERT(old > 0, vp, ("%s: wrong hold count", __func__)); +#else + refcount_release(&vp->v_holdcnt); +#endif + VNODE_REFCOUNT_FENCE_ACQ(); + VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, + ("%s: vnode with usecount and VI_OWEINACT set", + __func__)); + VI_UNLOCK(vp); + return (0); + } + } else { + if (vp->v_usecount > 0) + refcount_release(&vp->v_holdcnt); + } if ((vp->v_iflag & VI_OWEINACT) == 0) { oweinact = 0; } else { @@ -2791,8 +2815,6 @@ vget_finish(struct vnode *vp, int flags, enum vgetstat vp->v_iflag &= ~VI_OWEINACT; VNODE_REFCOUNT_FENCE_REL(); } - if (vp->v_usecount > 0) - refcount_release(&vp->v_holdcnt); v_incr_devcount(vp); refcount_acquire(&vp->v_usecount); if (oweinact && VOP_ISLOCKED(vp) == LK_EXCLUSIVE && @@ -2832,6 +2854,15 @@ vrefl(struct vnode *vp) ASSERT_VI_LOCKED(vp, __func__); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); + if (vp->v_type != VCHR && + refcount_acquire_if_not_zero(&vp->v_usecount)) { + VNODE_REFCOUNT_FENCE_ACQ(); + VNASSERT(vp->v_holdcnt > 0, vp, + ("%s: active vnode not held", __func__)); + VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, + ("%s: vnode with usecount and VI_OWEINACT set", __func__)); + return; + } if (vp->v_usecount == 0) vholdl(vp); if ((vp->v_iflag & VI_OWEINACT) != 0) { @@ -2917,21 +2948,35 @@ vputx(struct vnode *vp, int func) if (func == VPUTX_VPUT) VOP_UNLOCK(vp, 0); - if (vp->v_type != VCHR && - refcount_release_if_not_last(&vp->v_usecount)) - return; - - VI_LOCK(vp); - /* * We want to hold the vnode until the inactive finishes to * prevent vgone() races. We drop the use count here and the * hold count below when we're done. */ - v_decr_devcount(vp); - if (!refcount_release(&vp->v_usecount)) { - VI_UNLOCK(vp); - return; + if (vp->v_type != VCHR) { + /* + * If we release the last usecount we take ownership of the hold + * count which provides liveness of the vnode, in which case we + * have to vdrop. + */ + if (!refcount_release(&vp->v_usecount)) + return; + VI_LOCK(vp); + /* + * By the time we got here someone else might have transitioned + * the count back to > 0. + */ + if (vp->v_usecount > 0) { + vdropl(vp); + return; + } + } else { + VI_LOCK(vp); + v_decr_devcount(vp); + if (!refcount_release(&vp->v_usecount)) { + VI_UNLOCK(vp); + return; + } } if (vp->v_iflag & VI_DOINGINACT) { vdropl(vp); From owner-svn-src-head@freebsd.org Fri Sep 13 15:56:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1ADF2F51A3; Fri, 13 Sep 2019 15:56:35 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46VKxt6xHsz3Ltm; Fri, 13 Sep 2019 15:56:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D14CC97DC; Fri, 13 Sep 2019 15:56:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8DFuY82069963; Fri, 13 Sep 2019 15:56:34 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DFuXsu069956; Fri, 13 Sep 2019 15:56:33 GMT (envelope-from br@FreeBSD.org) Message-Id: <201909131556.x8DFuXsu069956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 13 Sep 2019 15:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352301 - in head/sys: conf dev/psci X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys: conf dev/psci X-SVN-Commit-Revision: 352301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 15:56:35 -0000 Author: br Date: Fri Sep 13 15:56:33 2019 New Revision: 352301 URL: https://svnweb.freebsd.org/changeset/base/352301 Log: Add generic arm/arm64 secure-monitor SMCCC interface and switch PSCI code to use it. This interface will also be used by Intel Stratix 10 platform. This was not tested on arm due to lack of PSCI-enabled arm hardware lying around. Reviewed by: andrew Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21439 Added: head/sys/dev/psci/smccc_arm.S (contents, props changed) head/sys/dev/psci/smccc_arm64.S (contents, props changed) Deleted: head/sys/dev/psci/psci_arm.S head/sys/dev/psci/psci_arm64.S Modified: head/sys/conf/files.arm head/sys/conf/files.arm64 head/sys/dev/psci/psci.c head/sys/dev/psci/psci.h head/sys/dev/psci/smccc.h Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Fri Sep 13 15:49:04 2019 (r352300) +++ head/sys/conf/files.arm Fri Sep 13 15:56:33 2019 (r352301) @@ -114,7 +114,7 @@ dev/ofw/ofwpci.c optional fdt pci dev/pci/pci_host_generic.c optional pci_host_generic pci dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt dev/psci/psci.c optional psci -dev/psci/psci_arm.S optional psci +dev/psci/smccc_arm.S optional psci dev/syscons/scgfbrndr.c optional sc dev/uart/uart_cpu_fdt.c optional uart fdt Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Fri Sep 13 15:49:04 2019 (r352300) +++ head/sys/conf/files.arm64 Fri Sep 13 15:56:33 2019 (r352301) @@ -233,7 +233,7 @@ dev/pci/pci_host_generic.c optional pci dev/pci/pci_host_generic_acpi.c optional pci acpi dev/pci/pci_host_generic_fdt.c optional pci fdt dev/psci/psci.c standard -dev/psci/psci_arm64.S standard +dev/psci/smccc_arm64.S standard dev/psci/smccc.c standard dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci fdt dev/uart/uart_cpu_arm64.c optional uart Modified: head/sys/dev/psci/psci.c ============================================================================== --- head/sys/dev/psci/psci.c Fri Sep 13 15:49:04 2019 (r352300) +++ head/sys/dev/psci/psci.c Fri Sep 13 15:56:33 2019 (r352301) @@ -128,7 +128,9 @@ static int psci_attach(device_t, psci_initfn_t, int); static void psci_shutdown(void *, int); static int psci_find_callfn(psci_callfn_t *); -static int psci_def_callfn(register_t, register_t, register_t, register_t); +static int psci_def_callfn(register_t, register_t, register_t, register_t, + register_t, register_t, register_t, register_t, + struct arm_smccc_res *res); psci_callfn_t psci_callfn = psci_def_callfn; @@ -149,7 +151,10 @@ SYSINIT(psci_start, SI_SUB_CPU, SI_ORDER_FIRST, psci_i static int psci_def_callfn(register_t a __unused, register_t b __unused, - register_t c __unused, register_t d __unused) + register_t c __unused, register_t d __unused, + register_t e __unused, register_t f __unused, + register_t g __unused, register_t h __unused, + struct arm_smccc_res *res __unused) { panic("No PSCI/SMCCC call function set"); @@ -186,9 +191,9 @@ psci_fdt_get_callfn(phandle_t node) if ((OF_getprop(node, "method", method, sizeof(method))) > 0) { if (strcmp(method, "hvc") == 0) - return (psci_hvc_despatch); + return (arm_smccc_hvc); else if (strcmp(method, "smc") == 0) - return (psci_smc_despatch); + return (arm_smccc_smc); else printf("psci: PSCI conduit \"%s\" invalid\n", method); } else @@ -282,9 +287,9 @@ psci_acpi_get_callfn(int flags) if ((flags & ACPI_FADT_PSCI_COMPLIANT) != 0) { if ((flags & ACPI_FADT_PSCI_USE_HVC) != 0) - return (psci_hvc_despatch); + return (arm_smccc_hvc); else - return (psci_smc_despatch); + return (arm_smccc_smc); } else { printf("psci: PSCI conduit not supplied in the device tree\n"); } Modified: head/sys/dev/psci/psci.h ============================================================================== --- head/sys/dev/psci/psci.h Fri Sep 13 15:49:04 2019 (r352300) +++ head/sys/dev/psci/psci.h Fri Sep 13 15:56:33 2019 (r352301) @@ -30,9 +30,12 @@ #define _MACHINE_PSCI_H_ #include +#include typedef int (*psci_initfn_t)(device_t dev, int default_version); -typedef int (*psci_callfn_t)(register_t, register_t, register_t, register_t); +typedef int (*psci_callfn_t)(register_t, register_t, register_t, register_t, + register_t, register_t, register_t, register_t, + struct arm_smccc_res *res); extern int psci_present; @@ -47,12 +50,8 @@ static inline int psci_call(register_t a, register_t b, register_t c, register_t d) { - return (psci_callfn(a, b, c, d)); + return (psci_callfn(a, b, c, d, 0, 0, 0, 0, NULL)); } -/* One of these handlers will be selected during the boot */ -int psci_hvc_despatch(register_t, register_t, register_t, register_t); -int psci_smc_despatch(register_t, register_t, register_t, register_t); - /* * PSCI return codes. Modified: head/sys/dev/psci/smccc.h ============================================================================== --- head/sys/dev/psci/smccc.h Fri Sep 13 15:49:04 2019 (r352300) +++ head/sys/dev/psci/smccc.h Fri Sep 13 15:56:33 2019 (r352301) @@ -49,6 +49,21 @@ #define SMCCC_32BIT_CALL 0 #define SMCCC_64BIT_CALL 1 +#define SMCCC_ARM_ARCH_CALLS 0 +#define SMCCC_CPU_SERVICE_CALLS 1 +#define SMCCC_SIP_SERVICE_CALLS 2 +#define SMCCC_OEM_SERVICE_CALLS 3 +#define SMCCC_STD_SECURE_SERVICE_CALLS 4 +#define SMCCC_STD_HYP_SERVICE_CALLS 5 +#define SMCCC_VENDOR_HYP_SERVICE_CALLS 6 + +struct arm_smccc_res { + register_t a0; + register_t a1; + register_t a2; + register_t a3; +}; + /* * Arm Architecture Calls. * These are documented in the document ARM DEN 0070A. @@ -71,5 +86,9 @@ int32_t smccc_arch_features(uint32_t); int smccc_arch_workaround_1(void); int smccc_arch_workaround_2(int); +int arm_smccc_smc(register_t, register_t, register_t, register_t, register_t, + register_t, register_t, register_t, struct arm_smccc_res *res); +int arm_smccc_hvc(register_t, register_t, register_t, register_t, register_t, + register_t, register_t, register_t, struct arm_smccc_res *res); #endif /* _PSCI_SMCCC_H_ */ Added: head/sys/dev/psci/smccc_arm.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/psci/smccc_arm.S Fri Sep 13 15:56:33 2019 (r352301) @@ -0,0 +1,74 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * Copyright (c) 2015 Andrew Turner + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +.arch_extension sec /* For smc */ +.arch_extension virt /* For hvc */ + +/* + * int arm_smccc_hvc(register_t, register_t, register_t, register_t, + * register_t, register_t, register_t, register_t, + * struct arm_smccc_res *res) + */ +ENTRY(arm_smccc_hvc) + mov r12, sp + push {r4-r7} + ldm r12, {r4-r7} + hvc #0 + pop {r4-r7} + ldr r12, [sp, #(4 * 4)] + cmp r12, #0 + beq 1f + stm r12, {r0-r3} +1: bx lr +END(arm_smccc_hvc) + +/* + * int arm_smccc_smc(register_t, register_t, register_t, register_t, + * register_t, register_t, register_t, register_t, + * struct arm_smccc_res *res) + */ +ENTRY(arm_smccc_smc) + mov r12, sp + push {r4-r7} + ldm r12, {r4-r7} + smc #0 + pop {r4-r7} + ldr r12, [sp, #(4 * 4)] + cmp r12, #0 + beq 1f + stm r12, {r0-r3} +1: bx lr +END(arm_smccc_smc) Added: head/sys/dev/psci/smccc_arm64.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/psci/smccc_arm64.S Fri Sep 13 15:56:33 2019 (r352301) @@ -0,0 +1,62 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * int arm_smccc_hvc(register_t, register_t, register_t, register_t, + * register_t, register_t, register_t, register_t, + * struct arm_smccc_res *res) + */ +ENTRY(arm_smccc_hvc) + hvc #0 + ldr x4, [sp] + cbz x4, 1f + stp x0, x1, [x4, #16 * 0] + stp x2, x3, [x4, #16 * 1] +1: ret +END(arm_smccc_hvc) + +/* + * int arm_smccc_smc(register_t, register_t, register_t, register_t, + * register_t, register_t, register_t, register_t, + * struct arm_smccc_res *res) + */ +ENTRY(arm_smccc_smc) + smc #0 + ldr x4, [sp] + cbz x4, 1f + stp x0, x1, [x4, #16 * 0] + stp x2, x3, [x4, #16 * 1] +1: ret +END(arm_smccc_smc) From owner-svn-src-head@freebsd.org Fri Sep 13 16:50:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38741F5FA9; Fri, 13 Sep 2019 16:50:59 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46VM8g16zkz3P3s; Fri, 13 Sep 2019 16:50:59 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E625BA12D; Fri, 13 Sep 2019 16:50:58 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8DGowI9002454; Fri, 13 Sep 2019 16:50:58 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DGovo1002446; Fri, 13 Sep 2019 16:50:57 GMT (envelope-from br@FreeBSD.org) Message-Id: <201909131650.x8DGovo1002446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 13 Sep 2019 16:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352302 - in head/sys: arm64/conf arm64/intel conf X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys: arm64/conf arm64/intel conf X-SVN-Commit-Revision: 352302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 16:50:59 -0000 Author: br Date: Fri Sep 13 16:50:57 2019 New Revision: 352302 URL: https://svnweb.freebsd.org/changeset/base/352302 Log: Add support for Intel Stratix 10 platform. Intel Stratix 10 SoC includes a quad-core arm64 cluster and FPGA fabric. This adds support for reconfiguring FPGA. Accessing FPGA core of this SoC require the level of privilege EL3, while kernel runs in EL1 (lower) level of privilege. This provides an Intel service layer interface that uses SMCCC to pass queries to the secure-monitor (EL3). Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21454 Added: head/sys/arm64/intel/ head/sys/arm64/intel/firmware.c (contents, props changed) head/sys/arm64/intel/intel-smc.h (contents, props changed) head/sys/arm64/intel/stratix10-soc-fpga-mgr.c (contents, props changed) head/sys/arm64/intel/stratix10-svc.c (contents, props changed) head/sys/arm64/intel/stratix10-svc.h (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/conf/options.arm64 Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Fri Sep 13 15:56:33 2019 (r352301) +++ head/sys/arm64/conf/GENERIC Fri Sep 13 16:50:57 2019 (r352302) @@ -110,6 +110,7 @@ options SOC_ALLWINNER_A64 options SOC_ALLWINNER_H5 options SOC_CAVM_THUNDERX options SOC_HISI_HI6220 +options SOC_INTEL_STRATIX10 options SOC_BRCM_BCM2837 options SOC_MARVELL_8K options SOC_ROCKCHIP_RK3328 Added: head/sys/arm64/intel/firmware.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/intel/firmware.c Fri Sep 13 16:50:57 2019 (r352302) @@ -0,0 +1,122 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +struct firmware_softc { + struct simplebus_softc simplebus_sc; + device_t dev; +}; + +static int +firmware_probe(device_t dev) +{ + phandle_t node; + + node = ofw_bus_get_node(dev); + + /* + * The firmware node has no property compatible. + * Look for a known child. + */ + if (!fdt_depth_search_compatible(node, "intel,stratix10-svc", 0)) + return (ENXIO); + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + device_set_desc(dev, "Firmware node"); + + return (BUS_PROBE_DEFAULT); +} + +static int +firmware_attach(device_t dev) +{ + struct firmware_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + + node = ofw_bus_get_node(dev); + if (node == -1) + return (ENXIO); + + simplebus_init(dev, node); + + /* + * Allow devices to identify. + */ + bus_generic_probe(dev); + + /* + * Now walk the OFW tree and attach top-level devices. + */ + for (node = OF_child(node); node > 0; node = OF_peer(node)) + simplebus_add_device(dev, node, 0, NULL, -1, NULL); + + return (bus_generic_attach(dev)); +} + +static int +firmware_detach(device_t dev) +{ + + return (0); +} + +static device_method_t firmware_methods[] = { + DEVMETHOD(device_probe, firmware_probe), + DEVMETHOD(device_attach, firmware_attach), + DEVMETHOD(device_detach, firmware_detach), + DEVMETHOD_END +}; + +DEFINE_CLASS_1(firmware, firmware_driver, firmware_methods, + sizeof(struct firmware_softc), simplebus_driver); + +static devclass_t firmware_devclass; + +EARLY_DRIVER_MODULE(firmware, simplebus, firmware_driver, firmware_devclass, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); +MODULE_VERSION(firmware, 1); Added: head/sys/arm64/intel/intel-smc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/intel/intel-smc.h Fri Sep 13 16:50:57 2019 (r352302) @@ -0,0 +1,99 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _ARM64_INTEL_INTEL_SMC_H_ +#define _ARM64_INTEL_INTEL_SMC_H_ + +#include + +/* + * Intel SiP return values. + */ +#define INTEL_SIP_SMC_STATUS_OK 0 +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY 1 +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_REJECTED 2 +#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR 4 +#define INTEL_SIP_SMC_REG_ERROR 5 +#define INTEL_SIP_SMC_RSU_ERROR 7 + +/* + * Intel SiP calls. + */ +#define INTEL_SIP_SMC_STD_CALL(func) \ + SMCCC_FUNC_ID(SMCCC_YIELDING_CALL, SMCCC_64BIT_CALL, \ + SMCCC_SIP_SERVICE_CALLS, (func)) +#define INTEL_SIP_SMC_FAST_CALL(func) \ + SMCCC_FUNC_ID(SMCCC_FAST_CALL, SMCCC_64BIT_CALL, \ + SMCCC_SIP_SERVICE_CALLS, (func)) + +#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START 1 +#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_WRITE 2 +#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE 3 +#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE 4 +#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_GET_MEM 5 +#define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK 6 +#define INTEL_SIP_SMC_FUNCID_REG_READ 7 +#define INTEL_SIP_SMC_FUNCID_REG_WRITE 8 +#define INTEL_SIP_SMC_FUNCID_REG_UPDATE 9 +#define INTEL_SIP_SMC_FUNCID_RSU_STATUS 11 +#define INTEL_SIP_SMC_FUNCID_RSU_UPDATE 12 + +#define INTEL_SIP_SMC_FPGA_CONFIG_START \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START) +#define INTEL_SIP_SMC_FPGA_CONFIG_WRITE \ + INTEL_SIP_SMC_STD_CALL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_WRITE) +#define INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) +#define INTEL_SIP_SMC_FPGA_CONFIG_ISDONE \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE) +#define INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_GET_MEM) +#define INTEL_SIP_SMC_FPGA_CONFIG_LOOPBACK \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK) +#define INTEL_SIP_SMC_REG_READ \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_REG_READ) +#define INTEL_SIP_SMC_REG_WRITE \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_REG_WRITE) +#define INTEL_SIP_SMC_REG_UPDATE \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_REG_UPDATE) +#define INTEL_SIP_SMC_RSU_STATUS \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_RSU_STATUS) +#define INTEL_SIP_SMC_RSU_UPDATE \ + INTEL_SIP_SMC_FAST_CALL(INTEL_SIP_SMC_FUNCID_RSU_UPDATE) + +typedef int (*intel_smc_callfn_t)(register_t, register_t, register_t, + register_t, register_t, register_t, register_t, register_t, + struct arm_smccc_res *res); + +#endif /* _ARM64_INTEL_INTEL_SMC_H_ */ Added: head/sys/arm64/intel/stratix10-soc-fpga-mgr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/intel/stratix10-soc-fpga-mgr.c Fri Sep 13 16:50:57 2019 (r352302) @@ -0,0 +1,290 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Intel Stratix 10 FPGA Manager. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include + +#define SVC_BUF_SIZE (2 * 1024 * 1024) + +struct fpgamgr_s10_softc { + struct cdev *mgr_cdev; + struct cdev *mgr_cdev_partial; + device_t dev; + device_t s10_svc_dev; + struct s10_svc_mem mem; + struct sx sx; + int opened; +}; + +static int +fpga_open(struct cdev *dev, int flags __unused, + int fmt __unused, struct thread *td __unused) +{ + struct fpgamgr_s10_softc *sc; + struct s10_svc_msg msg; + int ret; + int err; + + sc = dev->si_drv1; + + sx_xlock(&sc->sx); + if (sc->opened) { + sx_xunlock(&sc->sx); + return (EBUSY); + } + + err = s10_svc_allocate_memory(sc->s10_svc_dev, + &sc->mem, SVC_BUF_SIZE); + if (err != 0) { + sx_xunlock(&sc->sx); + return (ENXIO); + } + + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG; + if (dev == sc->mgr_cdev_partial) + msg.flags |= COMMAND_RECONFIG_FLAG_PARTIAL; + ret = s10_svc_send(sc->s10_svc_dev, &msg); + if (ret != 0) { + sx_xunlock(&sc->sx); + return (ENXIO); + } + + sc->opened = 1; + sx_xunlock(&sc->sx); + + return (0); +} + +static int +fpga_write(struct cdev *dev, struct uio *uio, int ioflag) +{ + struct fpgamgr_s10_softc *sc; + vm_offset_t addr; + int amnt; + + sc = dev->si_drv1; + + sx_xlock(&sc->sx); + if (sc->opened == 0) { + /* Device closed. */ + sx_xunlock(&sc->sx); + return (ENXIO); + } + + while (uio->uio_resid > 0) { + addr = sc->mem.vaddr + sc->mem.fill; + if (sc->mem.fill >= SVC_BUF_SIZE) + return (ENOMEM); + amnt = MIN(uio->uio_resid, (SVC_BUF_SIZE - sc->mem.fill)); + uiomove((void *)addr, amnt, uio); + sc->mem.fill += amnt; + } + + sx_xunlock(&sc->sx); + + return (0); +} + +static int +fpga_close(struct cdev *dev, int flags __unused, + int fmt __unused, struct thread *td __unused) +{ + struct fpgamgr_s10_softc *sc; + struct s10_svc_msg msg; + int ret; + + sc = dev->si_drv1; + + sx_xlock(&sc->sx); + if (sc->opened == 0) { + /* Device closed. */ + sx_xunlock(&sc->sx); + return (ENXIO); + } + + /* Submit bitstream */ + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG_DATA_SUBMIT; + msg.payload = (void *)sc->mem.paddr; + msg.payload_length = sc->mem.fill; + ret = s10_svc_send(sc->s10_svc_dev, &msg); + if (ret != 0) { + device_printf(sc->dev, "Failed to submit data\n"); + s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); + sc->opened = 0; + sx_xunlock(&sc->sx); + return (0); + } + + /* Claim memory buffer back */ + bzero(&msg, sizeof(struct s10_svc_msg)); + msg.command = COMMAND_RECONFIG_DATA_CLAIM; + s10_svc_send(sc->s10_svc_dev, &msg); + + s10_svc_free_memory(sc->s10_svc_dev, &sc->mem); + sc->opened = 0; + sx_xunlock(&sc->sx); + + return (0); +} + +static int +fpga_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, + struct thread *td) +{ + + return (0); +} + +static struct cdevsw fpga_cdevsw = { + .d_version = D_VERSION, + .d_open = fpga_open, + .d_close = fpga_close, + .d_write = fpga_write, + .d_ioctl = fpga_ioctl, + .d_name = "FPGA Manager", +}; + +static int +fpgamgr_s10_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "intel,stratix10-soc-fpga-mgr")) + return (ENXIO); + + device_set_desc(dev, "Stratix 10 SOC FPGA Manager"); + + return (BUS_PROBE_DEFAULT); +} + +static int +fpgamgr_s10_attach(device_t dev) +{ + struct fpgamgr_s10_softc *sc; + devclass_t dc; + + sc = device_get_softc(dev); + sc->dev = dev; + + dc = devclass_find("s10_svc"); + if (dc == NULL) + return (ENXIO); + + sc->s10_svc_dev = devclass_get_device(dc, 0); + if (sc->s10_svc_dev == NULL) + return (ENXIO); + + sc->mgr_cdev = make_dev(&fpga_cdevsw, 0, UID_ROOT, GID_WHEEL, + 0600, "fpga%d", device_get_unit(sc->dev)); + if (sc->mgr_cdev == NULL) { + device_printf(dev, "Failed to create character device.\n"); + return (ENXIO); + } + + sc->mgr_cdev_partial = make_dev(&fpga_cdevsw, 0, UID_ROOT, GID_WHEEL, + 0600, "fpga_partial%d", device_get_unit(sc->dev)); + if (sc->mgr_cdev_partial == NULL) { + device_printf(dev, "Failed to create character device.\n"); + return (ENXIO); + } + + sx_init(&sc->sx, "s10 fpga"); + + sc->mgr_cdev->si_drv1 = sc; + sc->mgr_cdev_partial->si_drv1 = sc; + + return (0); +} + +static int +fpgamgr_s10_detach(device_t dev) +{ + struct fpgamgr_s10_softc *sc; + + sc = device_get_softc(dev); + + destroy_dev(sc->mgr_cdev); + destroy_dev(sc->mgr_cdev_partial); + + sx_destroy(&sc->sx); + + return (0); +} + +static device_method_t fpgamgr_s10_methods[] = { + DEVMETHOD(device_probe, fpgamgr_s10_probe), + DEVMETHOD(device_attach, fpgamgr_s10_attach), + DEVMETHOD(device_detach, fpgamgr_s10_detach), + { 0, 0 } +}; + +static driver_t fpgamgr_s10_driver = { + "fpgamgr_s10", + fpgamgr_s10_methods, + sizeof(struct fpgamgr_s10_softc), +}; + +static devclass_t fpgamgr_s10_devclass; + +DRIVER_MODULE(fpgamgr_s10, simplebus, fpgamgr_s10_driver, + fpgamgr_s10_devclass, 0, 0); Added: head/sys/arm64/intel/stratix10-svc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/intel/stratix10-svc.c Fri Sep 13 16:50:57 2019 (r352302) @@ -0,0 +1,271 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Intel Stratix 10 Service Layer + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct s10_svc_softc { + device_t dev; + vmem_t *vmem; + intel_smc_callfn_t callfn; +}; + +static int +s10_data_claim(struct s10_svc_softc *sc) +{ + struct arm_smccc_res res; + register_t a0, a1, a2; + int ret; + + ret = 0; + + while (1) { + a0 = INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE; + a1 = 0; + a2 = 0; + + ret = sc->callfn(a0, a1, a2, 0, 0, 0, 0, 0, &res); + if (ret == INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY) + continue; + + break; + } + + return (ret); +} + +int +s10_svc_send(device_t dev, struct s10_svc_msg *msg) +{ + struct s10_svc_softc *sc; + struct arm_smccc_res res; + register_t a0, a1, a2; + int ret; + + sc = device_get_softc(dev); + + a0 = 0; + a1 = 0; + a2 = 0; + + switch (msg->command) { + case COMMAND_RECONFIG: + a0 = INTEL_SIP_SMC_FPGA_CONFIG_START; + a1 = msg->flags; + break; + case COMMAND_RECONFIG_DATA_SUBMIT: + a0 = INTEL_SIP_SMC_FPGA_CONFIG_WRITE; + a1 = (uint64_t)msg->payload; + a2 = (uint64_t)msg->payload_length; + break; + case COMMAND_RECONFIG_DATA_CLAIM: + ret = s10_data_claim(sc); + return (ret); + default: + return (-1); + } + + ret = sc->callfn(a0, a1, a2, 0, 0, 0, 0, 0, &res); + + return (ret); +} + +int +s10_svc_allocate_memory(device_t dev, struct s10_svc_mem *mem, int size) +{ + struct s10_svc_softc *sc; + + sc = device_get_softc(dev); + + if (size <= 0) + return (EINVAL); + + if (vmem_alloc(sc->vmem, size, + M_FIRSTFIT | M_NOWAIT, &mem->paddr)) { + device_printf(dev, "Can't allocate memory\n"); + return (ENOMEM); + } + + mem->size = size; + mem->fill = 0; + mem->vaddr = (vm_offset_t)pmap_mapdev(mem->paddr, mem->size); + + return (0); +} + +void +s10_svc_free_memory(device_t dev, struct s10_svc_mem *mem) +{ + struct s10_svc_softc *sc; + + sc = device_get_softc(dev); + + vmem_free(sc->vmem, mem->paddr, mem->size); +} + +static int +s10_get_memory(struct s10_svc_softc *sc) +{ + struct arm_smccc_res res; + vmem_addr_t addr; + vmem_size_t size; + vmem_t *vmem; + + sc->callfn(INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM, + 0, 0, 0, 0, 0, 0, 0, &res); + if (res.a0 != INTEL_SIP_SMC_STATUS_OK) + return (ENXIO); + + vmem = vmem_create("stratix10 vmem", 0, 0, PAGE_SIZE, + PAGE_SIZE, M_BESTFIT | M_WAITOK); + if (vmem == NULL) + return (ENXIO); + + addr = res.a1; + size = res.a2; + + device_printf(sc->dev, "Shared memory address 0x%lx size 0x%lx\n", + addr, size); + + vmem_add(vmem, addr, size, 0); + + sc->vmem = vmem; + + return (0); +} + +static intel_smc_callfn_t +s10_svc_get_callfn(struct s10_svc_softc *sc, phandle_t node) +{ + char method[16]; + + if ((OF_getprop(node, "method", method, sizeof(method))) > 0) { + if (strcmp(method, "hvc") == 0) + return (arm_smccc_hvc); + else if (strcmp(method, "smc") == 0) + return (arm_smccc_smc); + else + device_printf(sc->dev, + "Invalid method \"%s\"\n", method); + } else + device_printf(sc->dev, "SMC method not provided\n"); + + return (NULL); +} + +static int +s10_svc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "intel,stratix10-svc")) + return (ENXIO); + + device_set_desc(dev, "Stratix 10 SVC"); + + return (BUS_PROBE_DEFAULT); +} + +static int +s10_svc_attach(device_t dev) +{ + struct s10_svc_softc *sc; + phandle_t node; + + node = ofw_bus_get_node(dev); + + sc = device_get_softc(dev); + sc->dev = dev; + + if (device_get_unit(dev) != 0) + return (ENXIO); + + sc->callfn = s10_svc_get_callfn(sc, node); + if (sc->callfn == NULL) + return (ENXIO); + + if (s10_get_memory(sc) != 0) + return (ENXIO); + + return (0); +} + +static device_method_t s10_svc_methods[] = { + DEVMETHOD(device_probe, s10_svc_probe), + DEVMETHOD(device_attach, s10_svc_attach), + { 0, 0 } +}; + +static driver_t s10_svc_driver = { + "s10_svc", + s10_svc_methods, + sizeof(struct s10_svc_softc), +}; + +static devclass_t s10_svc_devclass; + +EARLY_DRIVER_MODULE(s10_svc, firmware, s10_svc_driver, + s10_svc_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); Added: head/sys/arm64/intel/stratix10-svc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/intel/stratix10-svc.h Fri Sep 13 16:50:57 2019 (r352302) @@ -0,0 +1,60 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _ARM64_INTEL_STRATIX10_SVC_H_ +#define _ARM64_INTEL_STRATIX10_SVC_H_ + +struct s10_svc_msg { + int command; +#define COMMAND_RECONFIG (1 << 0) +#define COMMAND_RECONFIG_DATA_SUBMIT (1 << 1) +#define COMMAND_RECONFIG_DATA_CLAIM (1 << 2) + int flags; +#define COMMAND_RECONFIG_FLAG_PARTIAL (1 << 0) + void *payload; + int payload_length; +}; + +struct s10_svc_mem { + vm_offset_t paddr; + vm_offset_t vaddr; + int size; + int fill; +}; + +int s10_svc_send(device_t dev, struct s10_svc_msg *msg); +int s10_svc_allocate_memory(device_t dev, struct s10_svc_mem *mem, int size); +void s10_svc_free_memory(device_t dev, struct s10_svc_mem *mem); + +#endif /* !_ARM64_INTEL_STRATIX10_SVC_H_ */ Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Fri Sep 13 15:56:33 2019 (r352301) +++ head/sys/conf/files.arm64 Fri Sep 13 16:50:57 2019 (r352302) @@ -174,6 +174,9 @@ arm64/coresight/coresight-dynamic-replicator.c standar arm64/coresight/coresight-etm4x.c standard arm64/coresight/coresight-funnel.c standard arm64/coresight/coresight-tmc.c standard +arm64/intel/firmware.c optional soc_intel_stratix10 +arm64/intel/stratix10-soc-fpga-mgr.c optional soc_intel_stratix10 +arm64/intel/stratix10-svc.c optional soc_intel_stratix10 arm64/qualcomm/qcom_gcc.c optional qcom_gcc fdt contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq soc_brcm_bcm2837 \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" Modified: head/sys/conf/options.arm64 ============================================================================== --- head/sys/conf/options.arm64 Fri Sep 13 15:56:33 2019 (r352301) +++ head/sys/conf/options.arm64 Fri Sep 13 16:50:57 2019 (r352302) @@ -19,6 +19,7 @@ SOC_ALLWINNER_H5 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h SOC_CAVM_THUNDERX opt_soc.h SOC_HISI_HI6220 opt_soc.h +SOC_INTEL_STRATIX10 opt_soc.h SOC_MARVELL_8K opt_soc.h SOC_ROCKCHIP_RK3328 opt_soc.h SOC_ROCKCHIP_RK3399 opt_soc.h From owner-svn-src-head@freebsd.org Fri Sep 13 20:17:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E125D2294; Fri, 13 Sep 2019 20:17:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46VRkf74H3z44cj; Fri, 13 Sep 2019 20:17:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3062CAD3; Fri, 13 Sep 2019 20:17:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8DKHEW5024849; Fri, 13 Sep 2019 20:17:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DKHEJi024848; Fri, 13 Sep 2019 20:17:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201909132017.x8DKHEJi024848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 13 Sep 2019 20:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352303 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 352303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 20:17:15 -0000 Author: kib Date: Fri Sep 13 20:17:14 2019 New Revision: 352303 URL: https://svnweb.freebsd.org/changeset/base/352303 Log: riscv trap_pfault: remove unneeded hold of the process around vm_fault() call. This is re-appearance of the nop code removed from other arches in r287625. Reviewed by: alc (as part of the larger patch), markj Sponsored by: The FreeBSD Foundation MFC after: 1 week DIfferential revision: https://reviews.freebsd.org/D21645 Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Fri Sep 13 16:50:57 2019 (r352302) +++ head/sys/riscv/riscv/trap.c Fri Sep 13 20:17:14 2019 (r352303) @@ -217,29 +217,7 @@ data_abort(struct trapframe *frame, int usermode) if (pmap_fault_fixup(map->pmap, va, ftype)) goto done; - if (map != kernel_map) { - /* - * Keep swapout from messing with us during this - * critical time. - */ - PROC_LOCK(p); - ++p->p_lock; - PROC_UNLOCK(p); - - /* Fault in the user page: */ - error = vm_fault(map, va, ftype, VM_FAULT_NORMAL); - - PROC_LOCK(p); - --p->p_lock; - PROC_UNLOCK(p); - } else { - /* - * Don't have to worry about process locking or stacks in the - * kernel. - */ - error = vm_fault(map, va, ftype, VM_FAULT_NORMAL); - } - + error = vm_fault(map, va, ftype, VM_FAULT_NORMAL); if (error != KERN_SUCCESS) { if (usermode) { sig = SIGSEGV; From owner-svn-src-head@freebsd.org Fri Sep 13 20:20:06 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD9D0D23A1; Fri, 13 Sep 2019 20:20:06 +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 46VRny5ZFkz44n7; Fri, 13 Sep 2019 20:20:06 +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 A2ADECAEF; Fri, 13 Sep 2019 20:20:06 +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 x8DKK6oA025068; Fri, 13 Sep 2019 20:20:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DKK62j025066; Fri, 13 Sep 2019 20:20:06 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201909132020.x8DKK62j025066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 13 Sep 2019 20:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352304 - in head: . usr.sbin/ntp usr.sbin/ntp/ntpd X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: . usr.sbin/ntp usr.sbin/ntp/ntpd X-SVN-Commit-Revision: 352304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 20:20:06 -0000 Author: cy Date: Fri Sep 13 20:20:05 2019 New Revision: 352304 URL: https://svnweb.freebsd.org/changeset/base/352304 Log: No longer mlock() ntpd pages by default in memory thus allowing its pages to page as necessary. To restore historic BSD behaviour add the following to ntp.conf: rlimit memlock 32 Discussed on: freebsd-current@ between Sept 6-9, 2019 Reported by: Users using ASLR with stack gap != 0 Reviewed by: ian, kib, rgrimes (all previous versions) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21581 Modified: head/UPDATING head/usr.sbin/ntp/config.h head/usr.sbin/ntp/ntpd/ntp.conf Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Sep 13 20:17:14 2019 (r352303) +++ head/UPDATING Fri Sep 13 20:20:05 2019 (r352304) @@ -26,6 +26,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20190913: + ntpd no longer by default locks its pages in memory, allowing them + to be paged out by the kernel. Use rlimit memlock to restore + historic BSD behaviour. For example, add "rlimit memlock 32" + to ntp.conf to lock up to 32 MB of ntpd address space in memory. + 20190823: Several of ping6's options have been renamed for better consistency with ping. If you use any of -ARWXaghmrtwx, you must update your Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Fri Sep 13 20:17:14 2019 (r352303) +++ head/usr.sbin/ntp/config.h Fri Sep 13 20:20:05 2019 (r352304) @@ -287,7 +287,7 @@ #define DEFAULT_HZ 100 /* Default number of megabytes for RLIMIT_MEMLOCK */ -#define DFLT_RLIMIT_MEMLOCK 32 +#define DFLT_RLIMIT_MEMLOCK -1 /* Default number of 4k pages for RLIMIT_STACK */ #define DFLT_RLIMIT_STACK 50 Modified: head/usr.sbin/ntp/ntpd/ntp.conf ============================================================================== --- head/usr.sbin/ntp/ntpd/ntp.conf Fri Sep 13 20:17:14 2019 (r352303) +++ head/usr.sbin/ntp/ntpd/ntp.conf Fri Sep 13 20:20:05 2019 (r352304) @@ -102,3 +102,11 @@ restrict ::1 # Use either leapfile in /etc/ntp or periodically updated leapfile in /var/db. #leapfile "/etc/ntp/leap-seconds" leapfile "/var/db/ntpd.leap-seconds.list" + +# Specify the number of megabytes of memory that should be allocated and +# locked. -1 (default) means "do not lock the process into memory". +# 0 means "lock whatever memory the process wants into memory". Any other +# number means to lock up to that number of megabytes into memory. +# 0 may result in a segfault when ASLR with stack gap randomization +# is enabled. +#rlimit memlock 32 From owner-svn-src-head@freebsd.org Fri Sep 13 20:22:00 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48A02D2495; Fri, 13 Sep 2019 20:22:00 +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 46VRr815Zbz457Z; Fri, 13 Sep 2019 20:22:00 +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 08AF3CC89; Fri, 13 Sep 2019 20:22:00 +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 x8DKLxPH030296; Fri, 13 Sep 2019 20:21:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DKLxrt030295; Fri, 13 Sep 2019 20:21:59 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201909132021.x8DKLxrt030295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 13 Sep 2019 20:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352305 - head X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 352305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 20:22:00 -0000 Author: cy Date: Fri Sep 13 20:21:59 2019 New Revision: 352305 URL: https://svnweb.freebsd.org/changeset/base/352305 Log: Add RELNOTES comment for r352304 discussing removing default mlock() for ntpd. Differential Revision: https://reviews.freebsd.org/D21581 Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Fri Sep 13 20:20:05 2019 (r352304) +++ head/RELNOTES Fri Sep 13 20:21:59 2019 (r352305) @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r352304: + ntpd is no longer by default locked in memory. rlimit memlock 32 + or rlimit memlock 0 can be used to restore this behaviour. + r351522: Add kernel-side support for in-kernel Transport Layer Security (KTLS). KTLS permits using sendfile(2) over sockets using From owner-svn-src-head@freebsd.org Fri Sep 13 20:36:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D059D2A57; Fri, 13 Sep 2019 20:36:10 +0000 (UTC) (envelope-from ml+freebsd@vishwin.info) Received: from varun.vishwin.info (varun.vishwin.info [46.101.93.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "varun.vishwin.info", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46VS8S1pL7z45sZ; Fri, 13 Sep 2019 20:36:07 +0000 (UTC) (envelope-from ml+freebsd@vishwin.info) Received: from varun.vishwin.info (fd35:9eae:7575::2 [IPv6:fd35:9eae:7575::2]) by varun.vishwin.info (OpenSMTPD) with ESMTP id 220c47df; Fri, 13 Sep 2019 16:33:54 -0400 (EDT) Received: from [IPv6:2001:470:8:6ca:cad7:19ff:fec0:a06d] (2001:470:8:6ca:cad7:19ff:fec0:a06d [IPv6:2001:470:8:6ca:cad7:19ff:fec0:a06d]) by varun.vishwin.info (OpenSMTPD) with ESMTPSA id a3d46620 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Fri, 13 Sep 2019 16:33:42 -0400 (EDT) Subject: Re: svn commit: r352275 - in head/lib/libedit: . TEST edit readline To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201909130650.x8D6o2fb037276@repo.freebsd.org> From: Charlie Li Autocrypt: addr=ml+freebsd@vishwin.info; keydata= mQINBFt7iHUBEADCorTixbMGuHd9WYSKCELlv/TFcRtvpHUw/n9LtXzKixUUwl7iuMFMYTz3 QXePX0Twq4jCQYySfcxWbPkLsSYlPOkaGQ+XytfmIHoqG5ba4i1fp+F41is0oCtLt1+oL84j NKUd13em/JWd+PJeQbSTVnHbT2yaAi7vqWw5WKVaMExjfPGU5TArV46wSRU6Zuy1ZX66q0q5 dPzeBdeKYWJE8aGtyi3pYUpKUOX4gxiNetf6leDFZ4OsexWaRdU0n8fId5d1qwjAE3lOwV5z 0Ilt8t4iXtX3JL3DAQyLZIeXHIg9O3rrpPMXQWSp2/5g39PohNk7farbhcpIKxuDN+L5N6U9 OxNHBSCv9FGDO4R/mw3YwJCovDzsF7RSyXQDIY36yjdh2uTLZ0uD5Ci/DPmJUySFLRvpqWnQ M7V5cYhdqDfcElGpRbi8JZQVYRJjvI5Jj0byG98KeaD0YFxKqmmm+Oh+xWXE7xt/DsBoZeZJ BFP84LvFbwQqprvI+sg+1z2+JIgNbYwl8VaYzfyGnqTEXTOsQYEKTdKA9MODSAsN31MlQICe CIHZV+OwOqH1KQ/mZp59AnpXAmj4T94bnahE9yJtVW/qglX/nTeFNUdu5MyEgkeB0x7mx+t0 3hE20yp/NbyvG1T/o53NHwHiURC/8Fxd1NWPZ6n4X8npQn6iyQARAQABtC5DaGFybGllIExp IChGcmVlQlNEKSA8bWwrZnJlZWJzZEB2aXNod2luLmluZm8+iQJOBBMBCAA4FiEE/3/Cqr5a +41PbEb+jnB43vIDq2wFAlt7iwoCGyMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQjnB4 3vIDq2zlBQ/7Boe3K9i4pxvIlBWlFDmDuclLiju/LTsc81mO607TIwUMx5p3BfnhqTwqpcuT Gilj2JKSlIw0NioJ3HnPiPyIpMmOmdeLBwvBn8iBmjs14DdDMgKusE8gKc0KRFbTM397rB7K oXj2/R8VF3Uuo8i3vlWyah6p+Osz1dAad/7COqPeM9OBMKaYAOrdKvxMC96l5k+Wc1JKOLeA BP7BtgmQB7HydHUm+dzqUB1rgMP2djIXd5Ngc749kzNQIFvC9ZXbaABw5M4JqKRbVFm08Wgw IUyhkNEtMpkBxMPwqXsk3t1KVptYQSAfW/+8mWDP2sgUOyz9O2IBfb1acCPk04/jf8SsXRaT HzJr64NseWlZUHAMYl9EC09gdE6UDCIHR68+IzutMtgT17Djuu1HRYly+RWAGkyTOeR7Sv/V 2B89Nsq5OfHYs3F2vD57/aRj5TmZJDQWxH/rDYbj8Pk6UjXcaY6QWUtNFidvCMFlBpXuncXU ZWgTsJEyZLHP5SJ7S9sRSHU5+CVUkjsbEFNuHkkGHAkSnpP+HosnH8/q9Rykn9FTamLbiQRQ UxJ6+IlqvOUtRRrMGMBF7ZIFGHcl8tcKynsPTeaHjpqPhCrZx8PmCKKoJHwW4Ua7+cdZkBJq R20qvXuLIrInjkIpA1CbacMckS5a7el6pi/nU0NG1S1K4Zu5Ag0EW3uIdQEQANdl7YHG8JOy HbEYv+7ExSrO96qBRavg1FsDG0riDmlsOSfZ2fqL6/YJF5WsfsX99+YSdIiLQfC4QOw/cA+M I65pgY4cCu42L7YIW/AR+jB1hFg+Q/cbeOwjuKPFYtZvxeDpSsaA6iIR+p+t4DXkjWl86g6W aFLC+til/rCilFHY/1/6M918F1gm/6xCIADDFu0BXLkASc5B4LuvaFEiJIuI9ZoQDIgWxnsX 0tXXE36SwK/XrowzRzsOa+2iOHAPKu7rPGHwy28vO4T5Uq7UynMZG2sK3RTbOijaxL4IJF4W MRqpuGdBSJ4sWmr5aIpgX9au5L1TNAAILJpHXnkv+k825+9VgbhFtFYBHEkgUtXb+w34JnkH okpr9A78dpWb+T+jOEP6ZUgM+4VVy+hCCpbcCVI2PEXu8w2z3+4yZWxIFmy8UYZRoeTMKzV2 zLeisoA0XA8jj548YNPiAl20Mjyoqu42WNv0P8fD9PMTcfLFCj2PlxOhuUFaIUH3ty0/bNeS jPtVK+L9x4W37R7U1tYk+tB5MlPakQiSQtdToB+8K34rnBt/3kCoAYL7Hygw9+qyZrEKZDtP 5JKekfgsy28t1z66xWCUwq9PHuUFiij3cjbwIbskI9uy2+xITcXt4ZqVfpZcdGmjfbdTPkGf PH2pjDoCJaezYdbha/3OVhmVABEBAAGJAjYEGAEIACAWIQT/f8Kqvlr7jU9sRv6OcHje8gOr bAUCW3uIdQIbDAAKCRCOcHje8gOrbExnD/9qwSL4HiorJmUEJ+5CTh8IJql4PzeQK8Dx93gi Zs5jWVlCJTmcpQNirWIZM2eRt67C/wTJjLmEVGzySVLpGiUqhXqdROgFmDwvEnmpIbtWWyvG sgSOCmZj/tz0GEtLSsjJcV/kLffkv7XEKkt9ZjIJnFYVYSovDK1o2PoO6Rfi5AWHHB7jYhjS HJvJjDx0yClO9gEYhtw7R60YOLH+cKoDou9tu+4wR3QwRsNGO6wrzLGhptxuBrDMI+HuOx+j wBTliuzuvZrry6OdKDDdq5D4vvQCj4vFnK4p7LZXhBshCMoLkWoA0I2T+YF/V5Ob5EuvsTIC re/pO/g941ipVkehvVNAsiplSaHjasB1HS6BQ95csI8E/b6PnKm+IECp2bANbLP1jrxKeBGj UkeyRxTmOV/ADUIIj8S4a2yOxTxlysN2O5wqXCJcxaYelC/Y4TUcL6ENxn2dLBdCYKQEna0u DdxZp7fS+pXN6qyK8Qz6Q42MHAxFAZdLKf6a44d4HQt6rPcWdETVlnVKnJr0b9kg5K1Q8N4k PVoTGVrkGAZhmjFYsqWulq445VU46mX7WcqsrZx8LqNTwP6i3Bf71FJ9EBxTyA8fP8k0qosP 8U8D7jhcc5x4yVW8RBBtB+a5q3odWdFnjMLEm4wtxBH/mSN/UKRcFSBvKQ8FxTgpX4Yxcw== Organization: FreeBSD mailing lists Message-ID: <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> Date: Fri, 13 Sep 2019 16:33:15 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <201909130650.x8D6o2fb037276@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="T3iMzCjUadTz6AS8VbqlUWsykLa71w3Q2" X-Rspamd-Queue-Id: 46VS8S1pL7z45sZ X-Spamd-Bar: ------- X-Spamd-Result: default: False [-7.76 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[vishwin.info:s=fuccboi12]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.66)[ip: (-9.91), ipnet: 46.101.80.0/20(-4.96), asn: 14061(1.62), country: US(-0.05)]; DKIM_TRACE(0.00)[vishwin.info:+]; DMARC_POLICY_ALLOW(-0.50)[vishwin.info,quarantine]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:14061, ipnet:46.101.80.0/20, country:US]; TAGGED_FROM(0.00)[freebsd]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 20:36:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --T3iMzCjUadTz6AS8VbqlUWsykLa71w3Q2 Content-Type: multipart/mixed; boundary="YDnxR0dO5qBLDGmHiI2S3ZODSkucUIqLj" --YDnxR0dO5qBLDGmHiI2S3ZODSkucUIqLj Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Baptiste Daroussin wrote: > Author: bapt > Date: Fri Sep 13 06:50:02 2019 > New Revision: 352275 > URL: https://svnweb.freebsd.org/changeset/base/352275 >=20 > Log: > Update libedit to a snapshot from 2019-09-10 > Reviewed by: Yuichiro Naito > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D21584 >=20 I posted in phab but repeating here, this breaks the build on (at least) aarch64: --- terminal.o --- /usr/src/contrib/libedit/terminal.c:569:41: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] el->el_cursor.v][where & 0370] !=3D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~ ^ /usr/src/contrib/libedit/terminal.c:659:28: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] [el->el_cursor.h] =3D=3D MB_FILL_CHAR) ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ 2 errors generated. *** [terminal.o] Error code 1 --=20 Charlie Li =E2=80=A6nope, still don't have an exit line. (This email address is for mailing list use; replace local-part with vishwin for off-list communication if possible) --YDnxR0dO5qBLDGmHiI2S3ZODSkucUIqLj-- --T3iMzCjUadTz6AS8VbqlUWsykLa71w3Q2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE/3/Cqr5a+41PbEb+jnB43vIDq2wFAl17/RMACgkQjnB43vID q2xLvg/+MeYyPTUDxqwK8BID1M5NCFx38at/jWMbIjbvBT0ywcoJxvZa/XQr3zof ZBxtLUAmsd1M35SrYxpNjjjz9D2TUwbE6Ba/Jr3NuplGf3uV/1DHA2v2ZSw1j1w1 Lk+Hx94GMXs1SYhqhxyXQvv3Syq9rkkRIBAJSi+9LmCMHyz2LchPGI4zGw+7dON/ A9uz/lfA0K+nt3E02kifc7wOxQwfzAk5dJUJt3S9d9nrJzDiiZjtCbq92Nb7nqiG UURv3XufECmeyy2GObdJDZz6A3SpznZVNISNsql2FecAaFabA7dhCipvzgVPN8rM Fh4fHzCjSzVLm6A88QHnxrqjqnfV0kiZ00Jao0xVJDE250OaS/qSW1K5+WMHS2+C 6yko2bZU4wF8ETWTop3+EFr3u71ZMuvPFUGBSMYtW6sfyYxWMTC7kdF3J2UCh4fI 21yD/mGjuA6I9X9xMTayGkzq/0IYCHa646xcQYjQZd70WYJL696LGR1qCxjDTHGA T8c7GtciCoMRmBcwxaEC5DQqQG/q866CWWkWuxKM+e37e2jJBIvFhf4c5TWpVKDe 4jHAzEzhsiO6lDnzzOAL2doHObqd/9Sjj/fYTACgjMhamJXQvFAlxrRoB6ymKhNo 3Yni5PdM1ocusVx9XcqQADeFnNmz+bnqMLma0+daGY4TWKqlpTI= =WNTh -----END PGP SIGNATURE----- --T3iMzCjUadTz6AS8VbqlUWsykLa71w3Q2-- From owner-svn-src-head@freebsd.org Fri Sep 13 21:00:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80532D31E0; Fri, 13 Sep 2019 21:00:20 +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 46VShN2nGtz47Fb; Fri, 13 Sep 2019 21:00:20 +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 3E2C5D24F; Fri, 13 Sep 2019 21:00:20 +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 x8DL0KEi049605; Fri, 13 Sep 2019 21:00:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DL0Kid049604; Fri, 13 Sep 2019 21:00:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201909132100.x8DL0Kid049604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Sep 2019 21:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352306 - head/contrib/libcxxrt X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/libcxxrt X-SVN-Commit-Revision: 352306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 21:00:20 -0000 Author: dim Date: Fri Sep 13 21:00:19 2019 New Revision: 352306 URL: https://svnweb.freebsd.org/changeset/base/352306 Log: Include in unwind-arm.h, since it uses uint32_t and uint64_t in various declarations. Otherwise, depending on how unwind-arm.h is included from other source files, the compiler may complain that uint32_t and uint64_t are unknown types. MFC after: 3 days Modified: head/contrib/libcxxrt/unwind-arm.h Modified: head/contrib/libcxxrt/unwind-arm.h ============================================================================== --- head/contrib/libcxxrt/unwind-arm.h Fri Sep 13 20:21:59 2019 (r352305) +++ head/contrib/libcxxrt/unwind-arm.h Fri Sep 13 21:00:19 2019 (r352306) @@ -20,6 +20,9 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* For uint32_t and uint64_t */ +#include + /** * ARM-specific unwind definitions. These are taken from the ARM EHABI * specification. From owner-svn-src-head@freebsd.org Fri Sep 13 22:36:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F71DD5720; Fri, 13 Sep 2019 22:36:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46VVps0zt8z4Clm; Fri, 13 Sep 2019 22:36:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04CD5E472; Fri, 13 Sep 2019 22:36:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8DMa4Xh008664; Fri, 13 Sep 2019 22:36:04 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DMa41h008663; Fri, 13 Sep 2019 22:36:04 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201909132236.x8DMa41h008663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 13 Sep 2019 22:36:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352311 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 352311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 22:36:05 -0000 Author: glebius Date: Fri Sep 13 22:36:04 2019 New Revision: 352311 URL: https://svnweb.freebsd.org/changeset/base/352311 Log: Drivers may pass runt packets to filter. This is okay. Reviewed by: gallatin Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Fri Sep 13 21:28:08 2019 (r352310) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Sep 13 22:36:04 2019 (r352311) @@ -1448,7 +1448,10 @@ ipfw_chk(struct ip_fw_args *args) do { \ int x = (_len) + T + EHLEN; \ if (mem) { \ - MPASS(pktlen >= x); \ + if (__predict_false(pktlen < x)) { \ + unlock; \ + goto pullup_failed; \ + } \ p = (char *)args->mem + (_len) + EHLEN; \ } else { \ if (__predict_false((m)->m_len < x)) { \ From owner-svn-src-head@freebsd.org Fri Sep 13 23:03:57 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7207D5EB4; Fri, 13 Sep 2019 23:03:57 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46VWR15hb4z4DmF; Fri, 13 Sep 2019 23:03:57 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6A20E9CE; Fri, 13 Sep 2019 23:03:57 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8DN3v7Q026377; Fri, 13 Sep 2019 23:03:57 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8DN3uw3026373; Fri, 13 Sep 2019 23:03:56 GMT (envelope-from chs@FreeBSD.org) Message-Id: <201909132303.x8DN3uw3026373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Fri, 13 Sep 2019 23:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352312 - in head: lib/geom/nop sys/geom/nop X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: in head: lib/geom/nop sys/geom/nop X-SVN-Commit-Revision: 352312 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 23:03:58 -0000 Author: chs Date: Fri Sep 13 23:03:56 2019 New Revision: 352312 URL: https://svnweb.freebsd.org/changeset/base/352312 Log: Add a "count_until_fail" option to gnop, which says to start failing I/O requests after the given number have been allowed though. Approved by: imp (mentor) Reviewed by: rpokala kib 0mp mckusick Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21593 Modified: head/lib/geom/nop/geom_nop.c head/lib/geom/nop/gnop.8 head/sys/geom/nop/g_nop.c head/sys/geom/nop/g_nop.h Modified: head/lib/geom/nop/geom_nop.c ============================================================================== --- head/lib/geom/nop/geom_nop.c Fri Sep 13 22:36:04 2019 (r352311) +++ head/lib/geom/nop/geom_nop.c Fri Sep 13 23:03:56 2019 (r352312) @@ -43,6 +43,7 @@ uint32_t version = G_NOP_VERSION; struct g_command class_commands[] = { { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { + { 'c', "count_until_fail", "-1", G_TYPE_NUMBER }, { 'd', "delaymsec", "-1", G_TYPE_NUMBER }, { 'e', "error", "-1", G_TYPE_NUMBER }, { 'o', "offset", "0", G_TYPE_NUMBER }, @@ -57,12 +58,14 @@ struct g_command class_commands[] = { { 'z', "physpath", G_NOP_PHYSPATH_PASSTHROUGH, G_TYPE_STRING }, G_OPT_SENTINEL }, - "[-v] [-d delaymsec] [-e error] [-o offset] [-p stripesize] " - "[-P stripeoffset] [-q rdelayprob] [-r rfailprob] [-s size] " - "[-S secsize] [-w wfailprob] [-x wdelayprob] [-z physpath] dev ..." + "[-v] [-c count_until_fail] [-d delaymsec] [-e error] [-o offset] " + "[-p stripesize] [-P stripeoffset] [-q rdelayprob] [-r rfailprob] " + "[-s size] [-S secsize] [-w wfailprob] [-x wdelayprob] " + "[-z physpath] dev ..." }, { "configure", G_FLAG_VERBOSE, NULL, { + { 'c', "count_until_fail", "-1", G_TYPE_NUMBER }, { 'd', "delaymsec", "-1", G_TYPE_NUMBER }, { 'e', "error", "-1", G_TYPE_NUMBER }, { 'q', "rdelayprob", "-1", G_TYPE_NUMBER }, @@ -71,8 +74,9 @@ struct g_command class_commands[] = { { 'x', "wdelayprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - "[-v] [-d delaymsec] [-e error] [-q rdelayprob] [-r rfailprob] " - "[-w wfailprob] [-x wdelayprob] prov ..." + "[-v] [-c count_until_fail] [-d delaymsec] [-e error] " + "[-q rdelayprob] [-r rfailprob] [-w wfailprob] [-x wdelayprob] " + "prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { Modified: head/lib/geom/nop/gnop.8 ============================================================================== --- head/lib/geom/nop/gnop.8 Fri Sep 13 22:36:04 2019 (r352311) +++ head/lib/geom/nop/gnop.8 Fri Sep 13 23:03:56 2019 (r352312) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2019 +.Dd September 13, 2019 .Dt GNOP 8 .Os .Sh NAME @@ -34,6 +34,7 @@ .Nm .Cm create .Op Fl v +.Op Fl c Ar count_until_fail .Op Fl d Ar delaymsec .Op Fl e Ar error .Op Fl o Ar offset @@ -50,6 +51,7 @@ .Nm .Cm configure .Op Fl v +.Op Fl c Ar count_until_fail .Op Fl d Ar delaymsec .Op Fl e Ar error .Op Fl q Ar rdelayprob @@ -118,7 +120,10 @@ See .El .Pp Additional options: -.Bl -tag -width ".Fl r Ar rfailprob" +.Bl -tag -width "-c count_until_fail" +.It Fl c Ar count_until_fail +Specifies the number of I/O requests to allow before setting the read and write +failure probabilities to 100%. .It Fl d Ar delaymsec Specifies the delay of the requests in milliseconds. Note that requests will be delayed before they are sent to the backing device. Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Fri Sep 13 22:36:04 2019 (r352311) +++ head/sys/geom/nop/g_nop.c Fri Sep 13 23:03:56 2019 (r352312) @@ -195,6 +195,10 @@ g_nop_start(struct bio *bp) G_NOP_LOGREQ(bp, "Request received."); mtx_lock(&sc->sc_lock); + if (sc->sc_count_until_fail != 0 && --sc->sc_count_until_fail == 0) { + sc->sc_rfailprob = 100; + sc->sc_wfailprob = 100; + } switch (bp->bio_cmd) { case BIO_READ: sc->sc_reads++; @@ -308,9 +312,10 @@ g_nop_access(struct g_provider *pp, int dr, int dw, in static int g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, - int ioerror, u_int rfailprob, u_int wfailprob, u_int delaymsec, u_int rdelayprob, - u_int wdelayprob, off_t offset, off_t size, u_int secsize, off_t stripesize, - off_t stripeoffset, const char *physpath) + int ioerror, u_int count_until_fail, u_int rfailprob, u_int wfailprob, + u_int delaymsec, u_int rdelayprob, u_int wdelayprob, off_t offset, + off_t size, u_int secsize, off_t stripesize, off_t stripeoffset, + const char *physpath) { struct g_nop_softc *sc; struct g_geom *gp; @@ -386,6 +391,7 @@ g_nop_create(struct gctl_req *req, struct g_class *mp, } else sc->sc_physpath = NULL; sc->sc_error = ioerror; + sc->sc_count_until_fail = count_until_fail; sc->sc_rfailprob = rfailprob; sc->sc_wfailprob = wfailprob; sc->sc_delaymsec = delaymsec; @@ -491,8 +497,9 @@ static void g_nop_ctl_create(struct gctl_req *req, struct g_class *mp) { struct g_provider *pp; - intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size, - *stripesize, *stripeoffset, *delaymsec, *rdelayprob, *wdelayprob; + intmax_t *error, *rfailprob, *wfailprob, *count_until_fail, *offset, + *secsize, *size, *stripesize, *stripeoffset, *delaymsec, + *rdelayprob, *wdelayprob; const char *name, *physpath; char param[16]; int i, *nargs; @@ -558,6 +565,16 @@ g_nop_ctl_create(struct gctl_req *req, struct g_class gctl_error(req, "Invalid '%s' argument", "wdelayprob"); return; } + count_until_fail = gctl_get_paraml(req, "count_until_fail", + sizeof(*count_until_fail)); + if (count_until_fail == NULL) { + gctl_error(req, "No '%s' argument", "count_until_fail"); + return; + } + if (*count_until_fail < -1) { + gctl_error(req, "Invalid '%s' argument", "count_until_fail"); + return; + } offset = gctl_get_paraml(req, "offset", sizeof(*offset)); if (offset == NULL) { gctl_error(req, "No '%s' argument", "offset"); @@ -622,6 +639,7 @@ g_nop_ctl_create(struct gctl_req *req, struct g_class } if (g_nop_create(req, mp, pp, *error == -1 ? EIO : (int)*error, + *count_until_fail == -1 ? 0 : (u_int)*count_until_fail, *rfailprob == -1 ? 0 : (u_int)*rfailprob, *wfailprob == -1 ? 0 : (u_int)*wfailprob, *delaymsec == -1 ? 1 : (u_int)*delaymsec, @@ -640,7 +658,8 @@ g_nop_ctl_configure(struct gctl_req *req, struct g_cla { struct g_nop_softc *sc; struct g_provider *pp; - intmax_t *delaymsec, *error, *rdelayprob, *rfailprob, *wdelayprob, *wfailprob; + intmax_t *delaymsec, *error, *rdelayprob, *rfailprob, *wdelayprob, + *wfailprob, *count_until_fail; const char *name; char param[16]; int i, *nargs; @@ -661,6 +680,12 @@ g_nop_ctl_configure(struct gctl_req *req, struct g_cla gctl_error(req, "No '%s' argument", "error"); return; } + count_until_fail = gctl_get_paraml(req, "count_until_fail", + sizeof(*count_until_fail)); + if (count_until_fail == NULL) { + gctl_error(req, "No '%s' argument", "count_until_fail"); + return; + } rfailprob = gctl_get_paraml(req, "rfailprob", sizeof(*rfailprob)); if (rfailprob == NULL) { gctl_error(req, "No '%s' argument", "rfailprob"); @@ -736,6 +761,8 @@ g_nop_ctl_configure(struct gctl_req *req, struct g_cla sc->sc_wdelayprob = (u_int)*wdelayprob; if (*delaymsec != -1) sc->sc_delaymsec = (u_int)*delaymsec; + if (*count_until_fail != -1) + sc->sc_count_until_fail = (u_int)*count_until_fail; } } @@ -904,6 +931,8 @@ g_nop_dumpconf(struct sbuf *sb, const char *indent, st sbuf_printf(sb, "%s%u\n", indent, sc->sc_wdelayprob); sbuf_printf(sb, "%s%d\n", indent, sc->sc_delaymsec); + sbuf_printf(sb, "%s%u\n", indent, + sc->sc_count_until_fail); sbuf_printf(sb, "%s%d\n", indent, sc->sc_error); sbuf_printf(sb, "%s%ju\n", indent, sc->sc_reads); sbuf_printf(sb, "%s%ju\n", indent, sc->sc_writes); Modified: head/sys/geom/nop/g_nop.h ============================================================================== --- head/sys/geom/nop/g_nop.h Fri Sep 13 22:36:04 2019 (r352311) +++ head/sys/geom/nop/g_nop.h Fri Sep 13 23:03:56 2019 (r352312) @@ -62,6 +62,7 @@ struct g_nop_softc { u_int sc_delaymsec; u_int sc_rdelayprob; u_int sc_wdelayprob; + u_int sc_count_until_fail; uintmax_t sc_reads; uintmax_t sc_writes; uintmax_t sc_deletes; From owner-svn-src-head@freebsd.org Sat Sep 14 03:30:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 258E9DCE22; Sat, 14 Sep 2019 03:30:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46VdLh0Bgsz4QwS; Sat, 14 Sep 2019 03:30:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF23019A67; Sat, 14 Sep 2019 03:30:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8E3UZcd081444; Sat, 14 Sep 2019 03:30:35 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8E3UY7q081438; Sat, 14 Sep 2019 03:30:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201909140330.x8E3UY7q081438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 14 Sep 2019 03:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352313 - in head/sys: conf modules modules/opal_nvram powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys: conf modules modules/opal_nvram powerpc/powernv X-SVN-Commit-Revision: 352313 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 03:30:36 -0000 Author: jhibbits Date: Sat Sep 14 03:30:34 2019 New Revision: 352313 URL: https://svnweb.freebsd.org/changeset/base/352313 Log: powerpc64/powernv: Add opal NVRAM driver for PowerNV systems Add a very basic NVRAM driver for OPAL which can be used by the IBM powerpc-utils nvram utility, not to be confused with the base nvram utility, which only operates on powermac_nvram. The IBM utility handles all partitions itself, treating the nvram device as a plain store. An alternative would be to manage partitions in the kernel, and augment the base nvram utility to deal with different backing stores, but that complicates the driver significantly. Instead, present the same interface IBM's utlity expects, and we get the usage for free. Tested by: bdragon Added: head/sys/modules/opal_nvram/ head/sys/modules/opal_nvram/Makefile (contents, props changed) head/sys/powerpc/powernv/opal_nvram.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/modules/Makefile head/sys/powerpc/powernv/opal.h head/sys/powerpc/powernv/opal_hmi.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Fri Sep 13 23:03:56 2019 (r352312) +++ head/sys/conf/files.powerpc Sat Sep 14 03:30:34 2019 (r352313) @@ -192,6 +192,7 @@ powerpc/powernv/opal_flash.c optional powernv opalflas powerpc/powernv/opal_hmi.c optional powernv powerpc/powernv/opal_i2c.c optional iicbus fdt powernv powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv +powerpc/powernv/opal_nvram.c optional powernv nvram powerpc/powernv/opal_pci.c optional powernv pci powerpc/powernv/opal_sensor.c optional powernv powerpc/powernv/opalcall.S optional powernv Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Sep 13 23:03:56 2019 (r352312) +++ head/sys/modules/Makefile Sat Sep 14 03:30:34 2019 (r352313) @@ -762,10 +762,11 @@ _wi= wi .if ${MACHINE_ARCH} == "powerpc64" _ipmi= ipmi +_nvram= opal_nvram .endif .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" # Don't build powermac_nvram for powerpcspe, it's never supported. -_nvram= powermac_nvram +_nvram+= powermac_nvram .endif .if ${MACHINE_CPUARCH} == "sparc64" Added: head/sys/modules/opal_nvram/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/opal_nvram/Makefile Sat Sep 14 03:30:34 2019 (r352313) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/powerpc/powernv + +KMOD= opal_nvram +SRCS= opal_nvram.c +SRCS+= bus_if.h device_if.h +SRCS+= ofw_bus_if.h + +.include Modified: head/sys/powerpc/powernv/opal.h ============================================================================== --- head/sys/powerpc/powernv/opal.h Fri Sep 13 23:03:56 2019 (r352312) +++ head/sys/powerpc/powernv/opal.h Sat Sep 14 03:30:34 2019 (r352313) @@ -45,6 +45,8 @@ int opal_call(uint64_t token, ...); #define OPAL_RTC_WRITE 4 #define OPAL_CEC_POWER_DOWN 5 #define OPAL_CEC_REBOOT 6 +#define OPAL_READ_NVRAM 7 +#define OPAL_WRITE_NVRAM 8 #define OPAL_HANDLE_INTERRUPT 9 #define OPAL_POLL_EVENTS 10 #define OPAL_PCI_CONFIG_READ_BYTE 13 Modified: head/sys/powerpc/powernv/opal_hmi.c ============================================================================== --- head/sys/powerpc/powernv/opal_hmi.c Fri Sep 13 23:03:56 2019 (r352312) +++ head/sys/powerpc/powernv/opal_hmi.c Sat Sep 14 03:30:34 2019 (r352313) @@ -82,16 +82,34 @@ opal_hmi_event_handler(void *unused, struct opal_msg * } static int +opal_hmi_handler2(struct trapframe *frame) +{ + uint64_t flags; + int err; + + flags = 0; + err = opal_call(OPAL_HANDLE_HMI2, vtophys(&flags)); + + if (flags & OPAL_HMI_FLAGS_TOD_TB_FAIL) + panic("TOD/TB recovery failure"); + + if (err == OPAL_SUCCESS) + return (0); + + printf("HMI handler failed! OPAL error code: %d\n", err); + + return (-1); +} + +static int opal_hmi_handler(struct trapframe *frame) { int err; err = opal_call(OPAL_HANDLE_HMI); - if (err == OPAL_SUCCESS) { - mtspr(SPR_HMER, 0); + if (err == OPAL_SUCCESS) return (0); - } printf("HMI handler failed! OPAL error code: %d\n", err); @@ -105,7 +123,9 @@ opal_setup_hmi(void *data) if (opal_check() != 0) return; - if (opal_call(OPAL_CHECK_TOKEN, OPAL_HANDLE_HMI) == OPAL_TOKEN_PRESENT) + if (opal_call(OPAL_CHECK_TOKEN, OPAL_HANDLE_HMI2) == OPAL_TOKEN_PRESENT) + hmi_handler = opal_hmi_handler2; + else if (opal_call(OPAL_CHECK_TOKEN, OPAL_HANDLE_HMI) == OPAL_TOKEN_PRESENT) hmi_handler = opal_hmi_handler; else { printf("Warning: No OPAL HMI handler found.\n"); Added: head/sys/powerpc/powernv/opal_nvram.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powernv/opal_nvram.c Sat Sep 14 03:30:34 2019 (r352313) @@ -0,0 +1,276 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Justin Hibbits + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include "opal.h" + +#include + +#include +#include + +#define NVRAM_BUFSIZE (65536) /* 64k blocks */ + +struct opal_nvram_softc { + device_t sc_dev; + uint32_t sc_size; + uint8_t *sc_buf; + vm_paddr_t sc_buf_phys; + + struct cdev *sc_cdev; + int sc_isopen; +}; + +/* + * Device interface. + */ +static int opal_nvram_probe(device_t); +static int opal_nvram_attach(device_t); +static int opal_nvram_detach(device_t); + +/* + * Driver methods. + */ +static device_method_t opal_nvram_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, opal_nvram_probe), + DEVMETHOD(device_attach, opal_nvram_attach), + DEVMETHOD(device_detach, opal_nvram_detach), + + { 0, 0 } +}; + +static driver_t opal_nvram_driver = { + "opal_nvram", + opal_nvram_methods, + sizeof(struct opal_nvram_softc) +}; + +static devclass_t opal_nvram_devclass; + +DRIVER_MODULE(opal_nvram, opal, opal_nvram_driver, opal_nvram_devclass, 0, 0); + +/* + * Cdev methods. + */ + +static d_open_t opal_nvram_open; +static d_close_t opal_nvram_close; +static d_read_t opal_nvram_read; +static d_write_t opal_nvram_write; +static d_ioctl_t opal_nvram_ioctl; + +static struct cdevsw opal_nvram_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, + .d_open = opal_nvram_open, + .d_close = opal_nvram_close, + .d_read = opal_nvram_read, + .d_write = opal_nvram_write, + .d_ioctl = opal_nvram_ioctl, + .d_name = "nvram", +}; + +static int +opal_nvram_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "ibm,opal-nvram")) + return (ENXIO); + + device_set_desc(dev, "OPAL NVRAM"); + return (BUS_PROBE_DEFAULT); +} + +static int +opal_nvram_attach(device_t dev) +{ + struct opal_nvram_softc *sc; + phandle_t node; + int err; + + node = ofw_bus_get_node(dev); + sc = device_get_softc(dev); + + sc->sc_dev = dev; + + err = OF_getencprop(node, "#bytes", &sc->sc_size, + sizeof(sc->sc_size)); + + if (err < 0) + return (ENXIO); + + sc->sc_buf = contigmalloc(NVRAM_BUFSIZE, M_DEVBUF, M_WAITOK, + 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); + if (sc->sc_buf == NULL) { + device_printf(dev, "No memory for buffer.\n"); + return (ENXIO); + } + sc->sc_buf_phys = pmap_kextract((vm_offset_t)sc->sc_buf); + sc->sc_cdev = make_dev(&opal_nvram_cdevsw, 0, 0, 0, 0600, + "nvram"); + sc->sc_cdev->si_drv1 = sc; + + return (0); +} + +static int +opal_nvram_detach(device_t dev) +{ + struct opal_nvram_softc *sc; + + sc = device_get_softc(dev); + + if (sc->sc_cdev != NULL) + destroy_dev(sc->sc_cdev); + if (sc->sc_buf != NULL) + contigfree(sc->sc_buf, NVRAM_BUFSIZE, M_DEVBUF); + + return (0); +} + +static int +opal_nvram_open(struct cdev *dev, int flags, int fmt, struct thread *td) +{ + struct opal_nvram_softc *sc = dev->si_drv1; + + if (sc->sc_isopen) + return EBUSY; + sc->sc_isopen = 1; + return (0); +} + +static int +opal_nvram_close(struct cdev *dev, int fflag, int devtype, struct thread *td) +{ + struct opal_nvram_softc *sc = dev->si_drv1; + + sc->sc_isopen = 0; + return (0); +} + +static int +opal_nvram_read(struct cdev *dev, struct uio *uio, int ioflag) +{ + struct opal_nvram_softc *sc = dev->si_drv1; + int rv, amnt; + + rv = 0; + while (uio->uio_resid > 0) { + amnt = MIN(uio->uio_resid, sc->sc_size - uio->uio_offset); + amnt = MIN(amnt, NVRAM_BUFSIZE); + if (amnt == 0) + break; + + rv = opal_call(OPAL_READ_NVRAM, sc->sc_buf_phys, + amnt, uio->uio_offset); + if (rv != OPAL_SUCCESS) { + switch (rv) { + case OPAL_HARDWARE: + rv = EIO; + break; + case OPAL_PARAMETER: + rv = EINVAL; + break; + } + break; + } + rv = uiomove(sc->sc_buf, amnt, uio); + if (rv != 0) + break; + } + return (rv); +} + +static int +opal_nvram_write(struct cdev *dev, struct uio *uio, int ioflag) +{ + off_t offset; + int rv, amnt; + struct opal_nvram_softc *sc = dev->si_drv1; + + rv = 0; + while (uio->uio_resid > 0) { + amnt = MIN(uio->uio_resid, sc->sc_size - uio->uio_offset); + amnt = MIN(amnt, NVRAM_BUFSIZE); + if (amnt == 0) { + rv = ENOSPC; + break; + } + offset = uio->uio_offset; + rv = uiomove(sc->sc_buf, amnt, uio); + if (rv != 0) + break; + rv = opal_call(OPAL_WRITE_NVRAM, sc->sc_buf_phys, amnt, + offset); + if (rv != OPAL_SUCCESS) { + switch (rv) { + case OPAL_HARDWARE: + rv = EIO; + break; + case OPAL_PARAMETER: + rv = EINVAL; + break; + } + break; + } + } + return (rv); +} + +static int +opal_nvram_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + struct opal_nvram_softc *sc = dev->si_drv1; + + switch (cmd) { + case DIOCGMEDIASIZE: + *(off_t *)data = sc->sc_size; + return (0); + } + return (EINVAL); +} From owner-svn-src-head@freebsd.org Sat Sep 14 03:38:19 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C2EF5DD0C3; Sat, 14 Sep 2019 03:38:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46VdWb4XP5z4RJy; Sat, 14 Sep 2019 03:38:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 800EA19C36; Sat, 14 Sep 2019 03:38:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8E3cJUs087260; Sat, 14 Sep 2019 03:38:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8E3cJpc087258; Sat, 14 Sep 2019 03:38:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201909140338.x8E3cJpc087258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 14 Sep 2019 03:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352314 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 352314 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 03:38:19 -0000 Author: kevans Date: Sat Sep 14 03:38:18 2019 New Revision: 352314 URL: https://svnweb.freebsd.org/changeset/base/352314 Log: lualoader: Add reload-conf loader command This command will trigger a reload of the configuration from disk. This is useful if you've changed currdev from recovery media to local disk as much as I have over the past ~2 hours and are tired of the extra keystrokes. This is really just a glorified shortcut, but reload-conf is likely easier to remember for other people and does save some keystrokes when reloading the configuration. It is also resilient to the underlying config method changing interface, but this is unlikely to happen. MFC after: 1 week Modified: head/stand/lua/cli.lua head/stand/lua/cli.lua.8 Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Sat Sep 14 03:30:34 2019 (r352313) +++ head/stand/lua/cli.lua Sat Sep 14 03:38:18 2019 (r352314) @@ -125,6 +125,10 @@ cli['boot-conf'] = function(...) core.autoboot(argstr) end +cli['reload-conf'] = function(...) + config.reload() +end + -- Used for splitting cli varargs into cmd_name and the rest of argv function cli.arguments(...) local argv = {...} Modified: head/stand/lua/cli.lua.8 ============================================================================== --- head/stand/lua/cli.lua.8 Sat Sep 14 03:30:34 2019 (r352313) +++ head/stand/lua/cli.lua.8 Sat Sep 14 03:38:18 2019 (r352314) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2018 +.Dd September 13, 2019 .Dt CLI.LUA 8 .Os .Sh NAME @@ -82,14 +82,27 @@ As of present, the module by default provides commands for .Ic autoboot , .Ic boot , +.Ic boot-conf , and -.Ic boot-conf. -In all three cases, the +.Ic reload-conf . +.Pp +For +.Ic autoboot , +.Ic boot , +and +.Ic boot-conf , +the .Xr core.lua 8 module will load all ELF modules as-needed before executing the equivalent built-in loader commands. All non-kernel arguments to these commands are passed in the same order to the loader command. +.Pp +The +.Ic reload-conf +command will reload the configuration from disk. +This is useful if you have manually changed currdev and would like to easily +reload the configuration from the new device. .Ss Exported Functions The following functions are exported from .Nm : From owner-svn-src-head@freebsd.org Sat Sep 14 04:05:50 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99ABFDD96D; Sat, 14 Sep 2019 04:05:50 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Vf7K518Qz4SLJ; Sat, 14 Sep 2019 04:05:49 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lj1-f177.google.com with SMTP id h2so22415812ljk.1; Fri, 13 Sep 2019 21:05:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=gHC9NWXihSFgQOzD0HVM7pSND1ObYCGr3nuq9rSyWr8=; b=KIlPKOpxw2zzo0LI9AkOJZhQmkT6skfxFIJXBg0I263gp0ZHjuwcw/yZGVrTEOUZEu n0sllpkUFjbpKDDeegmquzPuZ5xWn0jrnSK2bljEqNGoJscjTGzGHJldTvggg24OO+1n mcU2mZ4oQnyhG008JhJWc8F++fqCzZbDe/v26DVCcrKYBojA7PGAyg0P7SNd5QZrubIS 1AFeh1lNdu64dnTsNfZVCKZRBfbzpH3CShkEsL+l6bWWMG45DIRvN94RcT+Ph6EP3tCn +0K0n3nU3eQmEwtrzxpiXsTixMthrMpY+bKTQwCYZGYTUGuhVT3icJvX5qSV5fyxX+2P 4hoA== X-Gm-Message-State: APjAAAVDiCX2f+aWNc8kugtOKSb3A9fZnevh96P81zoaUQ25NzanuJV9 Pd8Hmm2McH3mC/flZzpQ9HKRnR1fkBJD1GXWK8q+tg== X-Google-Smtp-Source: APXvYqxAh1fE1Yd5a/EOSKf2FmYB6y8N/Z781hrAkBDX4nZYcs3pP4JhpdTwDvJPDGplMypumgo4WSGXpj43verB5Xw= X-Received: by 2002:a2e:860c:: with SMTP id a12mr31333076lji.116.1568433947056; Fri, 13 Sep 2019 21:05:47 -0700 (PDT) MIME-Version: 1.0 References: <201909140330.x8E3UY7q081438@repo.freebsd.org> In-Reply-To: <201909140330.x8E3UY7q081438@repo.freebsd.org> From: Justin Hibbits Date: Fri, 13 Sep 2019 23:05:37 -0500 Message-ID: Subject: Re: svn commit: r352313 - in head/sys: conf modules modules/opal_nvram powerpc/powernv To: src-committers , svn-src-all , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 46Vf7K518Qz4SLJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 209.85.208.177 as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-3.22 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.22)[ip: (-0.49), ipnet: 209.85.128.0/17(-3.32), asn: 15169(-2.24), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[177.208.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[jhibbits@freebsd.org,chmeeedalf@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[177.208.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[jhibbits@freebsd.org,chmeeedalf@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 04:05:50 -0000 On Fri, Sep 13, 2019, 22:30 Justin Hibbits wrote: > Author: jhibbits > Date: Sat Sep 14 03:30:34 2019 > New Revision: 352313 > URL: https://svnweb.freebsd.org/changeset/base/352313 > > Log: > powerpc64/powernv: Add opal NVRAM driver for PowerNV systems > > Add a very basic NVRAM driver for OPAL which can be used by the IBM > powerpc-utils nvram utility, not to be confused with the base nvram > utility, > which only operates on powermac_nvram. > > The IBM utility handles all partitions itself, treating the nvram device > as > a plain store. > > An alternative would be to manage partitions in the kernel, and augment > the > base nvram utility to deal with different backing stores, but that > complicates the driver significantly. Instead, present the same > interface > IBM's utlity expects, and we get the usage for free. > > Tested by: bdragon > Differential revision: https://reviews.freebsd.org/D21631 > From owner-svn-src-head@freebsd.org Sat Sep 14 04:11:05 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9DCAEDDB94; Sat, 14 Sep 2019 04:11:05 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46VfFN1YCwz4SZ9; Sat, 14 Sep 2019 04:11:03 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id x8E4Alv8073700 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 14 Sep 2019 14:10:53 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id x8E4Afha009643 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 14 Sep 2019 14:10:41 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id x8E4AfIo009642; Sat, 14 Sep 2019 14:10:41 +1000 (AEST) (envelope-from peter) Date: Sat, 14 Sep 2019 14:10:41 +1000 From: Peter Jeremy To: Baptiste Daroussin Cc: Charlie Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r352275 - in head/lib/libedit: . TEST edit readline Message-ID: <20190914041041.GA97181@server.rulingia.com> References: <201909130650.x8D6o2fb037276@repo.freebsd.org> <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 46VfFN1YCwz4SZ9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-4.07 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; IP_SCORE(-1.17)[ipnet: 2001:19f0:5800::/38(-4.94), asn: 20473(-0.88), country: US(-0.05)]; TAGGED_RCPT(0.00)[freebsd]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[rulingia.com]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 04:11:05 -0000 --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-Sep-13 16:33:15 -0400, Charlie Li wrote: >Baptiste Daroussin wrote: >> Author: bapt >> Date: Fri Sep 13 06:50:02 2019 >> New Revision: 352275 >> URL: https://svnweb.freebsd.org/changeset/base/352275 >>=20 >> Log: >> Update libedit to a snapshot from 2019-09-10 >> Reviewed by: Yuichiro Naito >> MFC after: 3 weeks >> Differential Revision: https://reviews.freebsd.org/D21584 >>=20 >I posted in phab but repeating here, this breaks the build on (at least) >aarch64: It breaks the build on arm and arm64 only. wint_t is int on all platforms: sys/sys/_types.h: typedef int __ct_rune_t; /* arg type for ctype funcs */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ but wchar_t varies between unsigned and signed: $ grep '__wchar_t' sys/*/include/_types.h=20 sys/arm/include/_types.h:typedef unsigned int ___wchar_t; sys/arm64/include/_types.h:typedef unsigned int ___wchar_t; sys/mips/include/_types.h:typedef int ___wchar_t; sys/powerpc/include/_types.h:typedef int ___wchar_t; sys/riscv/include/_types.h:typedef int ___wchar_t; sys/sparc64/include/_types.h:typedef int ___wchar_t; sys/x86/include/_types.h:typedef int ___wchar_t; Looking back into history, it looks like the "unsigned" is part of the ARM EABI. --=20 Peter Jeremy --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl18aDxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzR7QQ//bWl+20ZdrNeDeUay1ykf8r84EmNckAIy4TEsZ8gmv6I3QuUDMwCOr8fC 132d4sFAxysXGpIln713DzZa5VCA42J2ahVjsj8LvCp/76CCsLXtcABCC5RRVoUC +akjl+ya35HvtWJyhXD3f5Vn94ULh4vqWjceb6Uqq22/ZiEJ1FA9tLAE7J/luqyK qW1o5Eomw4HJ3GkUIkpCXJq2ECTByEq3AeLo79xox75L5pwEGbFHuy00WS1KfzlC iwEB7Zo72k6ts6VQeUmnHdsTCTpqx3zwHL8oxQ11kLWZf3qn/eZdvW6ZU/BXoYCu VFOfPzmoV0/51VCukNwETNiqI9o9f7i13UZmH8CEN109UTfLPlo/OYKWO3qmnzE4 CdwEB3HOeqnmUjws/JyVKcUNORh3Dn3mvKxRcKyJkiv7LvQuksPxBD+gXjj6F26u HTsg3tgXdAjB9AlIhSgTslMDc+W7AMPi5DyGQyB+WwTDe3h3MDmuZ6ubkT2d0a4S HGHNq4YwI40OX3DvcYdx/O8fvWRrAJUvpLLqdieUK2Ajb5PTHA1aWarzfkMGkqpM i18o0DfsUgYxTCSb2Y6lG8bEV0LTf78Is8G74AH8G6bsuQVCcseE6otXqyTXVKS2 qyE6FFeSClXsamDODLdJgRHi3jxIMWD/wTdDqqrTg2d/6lCykjA= =k6ZD -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ-- From owner-svn-src-head@freebsd.org Sat Sep 14 04:25:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34396DE28D for ; Sat, 14 Sep 2019 04:25:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46VfZ90xfzz4Tbc for ; Sat, 14 Sep 2019 04:25:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x834.google.com with SMTP id n7so36511049qtb.6 for ; Fri, 13 Sep 2019 21:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dzlgQ2TTJqzIl4I/hvGx7yZhX/pLQbPRHkztsVs4NPI=; b=zwnlNGF86UXyY8j5pXlRnt+o75KwaovcNiYRBbiJvmgA2Zh18M7ZS0v5M6VhG77Ooz eFTQRh4Q9/rFEFKJPGrC/UEzI19ibREA3hexgHUXe1r14DT0TTi+mknsd9MeH4fhdkH4 fscBnshMriOyDN015s4Uz/T5XmqIr0JT1dhfNGTDQoLy0JCx3t58LVAl5zotvWacW0b5 TnqHmR7sFD95jWDU4Ld6HU1jfJ4RvGmrhWXwjTfeHMgqjvmiXlD9BEtbw6QQrTdRO+Tf J+58GOGtCtuljIGWyeHfGMt2i53U+BsOMh8AM2hzNIwjT/MEpINcbN9tric6BJeQFzuM b8eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dzlgQ2TTJqzIl4I/hvGx7yZhX/pLQbPRHkztsVs4NPI=; b=fb9qrHe9JR8hMyNnB83O7v09MZwmAo/tzXE0xKvjXFN9MIG5cqKZdrkQIQnwnzsnPv HbXV7Vre29AMtacaxiGTL9pT66E93nCDLoFIz8VgdQxlTzEadsGC7emCaBasc78pRKpt r4kv10OWRovloFwj3UMdEas/Qe/hURX7lEvD6eSlD3U/Qa1hRHKOhR+B8usgs628JvMX BUBRbWJkEhsCwOWP7JT1ClhVdmYTDZ7j1hNyFt0/Eqt5qycq4vHn2AvqyjWi7OJb+e8W jzUHSUobsIbKsoX+c765m4OEzZnTngxQhHbGuUj6R/4E+HdcNvj3siByLTn9FoJYh4gd BmuA== X-Gm-Message-State: APjAAAUa+FEld120YYn2IyZBDO3UqwwZ4Nj1MprSqj/LErimRiPNDuu6 bv/KERUfopLj8Fekmv2P4t2vTO3xzG2VyzIQJ19Emg== X-Google-Smtp-Source: APXvYqxw3cJupsv8yQaG1nndLr6ta2gkv7RiJAmxpndjF1ygUc5iD2Z9cZLpnSjCNklvbd1fYcyJrf4Yll+BypbXHSw= X-Received: by 2002:ac8:1208:: with SMTP id x8mr6112428qti.32.1568435135586; Fri, 13 Sep 2019 21:25:35 -0700 (PDT) MIME-Version: 1.0 References: <201909130650.x8D6o2fb037276@repo.freebsd.org> <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> <20190914041041.GA97181@server.rulingia.com> In-Reply-To: <20190914041041.GA97181@server.rulingia.com> From: Warner Losh Date: Fri, 13 Sep 2019 22:25:23 -0600 Message-ID: Subject: Re: svn commit: r352275 - in head/lib/libedit: . TEST edit readline To: Peter Jeremy Cc: Baptiste Daroussin , Charlie Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 46VfZ90xfzz4Tbc X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=zwnlNGF8; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::834) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.38 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[freebsd]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.88)[ip: (-9.43), ipnet: 2607:f8b0::/32(-2.70), asn: 15169(-2.24), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; SUSPICIOUS_RECIPS(1.50)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 04:25:38 -0000 On Fri, Sep 13, 2019, 10:11 PM Peter Jeremy wrote: > On 2019-Sep-13 16:33:15 -0400, Charlie Li wrote: > >Baptiste Daroussin wrote: > >> Author: bapt > >> Date: Fri Sep 13 06:50:02 2019 > >> New Revision: 352275 > >> URL: https://svnweb.freebsd.org/changeset/base/352275 > >> > >> Log: > >> Update libedit to a snapshot from 2019-09-10 > >> Reviewed by: Yuichiro Naito > >> MFC after: 3 weeks > >> Differential Revision: https://reviews.freebsd.org/D21584 > >> > >I posted in phab but repeating here, this breaks the build on (at least) > >aarch64: > > It breaks the build on arm and arm64 only. > > wint_t is int on all platforms: > sys/sys/_types.h: > typedef int __ct_rune_t; /* arg type for ctype funcs */ > typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > > but wchar_t varies between unsigned and signed: > $ grep '__wchar_t' sys/*/include/_types.h > sys/arm/include/_types.h:typedef unsigned int ___wchar_t; > sys/arm64/include/_types.h:typedef unsigned int ___wchar_t; > sys/mips/include/_types.h:typedef int ___wchar_t; > sys/powerpc/include/_types.h:typedef int ___wchar_t; > sys/riscv/include/_types.h:typedef int ___wchar_t; > sys/sparc64/include/_types.h:typedef int ___wchar_t; > sys/x86/include/_types.h:typedef int ___wchar_t; > > Looking back into history, it looks like the "unsigned" is part > of the ARM EABI. > We should confirm that. It is definitely part of the OABI stuff, but EABI was supposed to fix differences like this... Warner > -- > Peter Jeremy > From owner-svn-src-head@freebsd.org Sat Sep 14 08:15:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A878ECC2B; Sat, 14 Sep 2019 08:15:17 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46Vlg93WjWz4gCJ; Sat, 14 Sep 2019 08:15:17 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C2801CF1E; Sat, 14 Sep 2019 08:15:17 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8E8FH3U051761; Sat, 14 Sep 2019 08:15:17 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8E8FHOc051760; Sat, 14 Sep 2019 08:15:17 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201909140815.x8E8FHOc051760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 14 Sep 2019 08:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352315 - head/lib/libc/locale X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/lib/libc/locale X-SVN-Commit-Revision: 352315 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 08:15:17 -0000 Author: lwhsu Date: Sat Sep 14 08:15:16 2019 New Revision: 352315 URL: https://svnweb.freebsd.org/changeset/base/352315 Log: Improve the description of big5(5) - Fix the statement that big5 is a de facto standard of Traditional Chinese text [1] - Add a BUGS section describes the problem of big5 and suggests use utf8 PR: 189095 Submitted by: Brennan Vincent [1] Reviewed by: Ting-Wei Lan MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21622 Modified: head/lib/libc/locale/big5.5 Modified: head/lib/libc/locale/big5.5 ============================================================================== --- head/lib/libc/locale/big5.5 Sat Sep 14 03:38:18 2019 (r352314) +++ head/lib/libc/locale/big5.5 Sat Sep 14 08:15:16 2019 (r352315) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2003 +.Dd September 12, 2019 .Dt BIG5 5 .Os .Sh NAME @@ -37,7 +37,7 @@ encoding for Traditional Chinese text .Qq BIG5 .Sh DESCRIPTION .Dq Big Five -is the de facto standard for encoding Traditional Chinese text. +is a standard for encoding Traditional Chinese text. Each character is represented by either one or two bytes. Characters from the .Tn ASCII @@ -49,3 +49,10 @@ the first in the range 0xA1 - 0xFE, the second in the .Xr euc 5 , .Xr gb18030 5 , .Xr utf8 5 +.Sh BUGS +The range of the second byte overlaps some ASCII characters, including +0x5C (`\\') and 0x7C (`|') which may cause problems in program execution or +display. +Big5 is considered a legacy standard and only preserved for backward +compatibility reason. +New documents and systems are suggested using UTF-8 directly. From owner-svn-src-head@freebsd.org Sat Sep 14 10:36:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5569F017A; Sat, 14 Sep 2019 10:36:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Vpp74qlGz3Jcv; Sat, 14 Sep 2019 10:36:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 3EE5C15E0D; Sat, 14 Sep 2019 10:36:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::19b1:7fa4:cdc6:3be2] (unknown [IPv6:2001:470:7a58:0:19b1:7fa4:cdc6:3be2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 468EC670C8; Sat, 14 Sep 2019 12:36:30 +0200 (CEST) From: Dimitry Andric Message-Id: <2D5BFAF9-7A03-4A2C-B406-19AA8BC8BF5D@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_4B83A316-21D1-46A8-ACB1-444D07C617CC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r352275 - in head/lib/libedit: . TEST edit readline Date: Sat, 14 Sep 2019 12:36:24 +0200 In-Reply-To: Cc: Peter Jeremy , Baptiste Daroussin , Charlie Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201909130650.x8D6o2fb037276@repo.freebsd.org> <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> <20190914041041.GA97181@server.rulingia.com> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 10:36:31 -0000 --Apple-Mail=_4B83A316-21D1-46A8-ACB1-444D07C617CC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 14 Sep 2019, at 06:25, Warner Losh wrote: >=20 > On Fri, Sep 13, 2019, 10:11 PM Peter Jeremy = wrote: > On 2019-Sep-13 16:33:15 -0400, Charlie Li = wrote: > >Baptiste Daroussin wrote: > >> Author: bapt > >> Date: Fri Sep 13 06:50:02 2019 > >> New Revision: 352275 > >> URL: https://svnweb.freebsd.org/changeset/base/352275 > >> > >> Log: > >> Update libedit to a snapshot from 2019-09-10 > >> Reviewed by: Yuichiro Naito > >> MFC after: 3 weeks > >> Differential Revision: https://reviews.freebsd.org/D21584 > >> > >I posted in phab but repeating here, this breaks the build on (at = least) > >aarch64: >=20 > It breaks the build on arm and arm64 only. >=20 > wint_t is int on all platforms: > sys/sys/_types.h: > typedef int __ct_rune_t; /* arg type for ctype funcs */ > typedef __ct_rune_t __wint_t; /* wint_t (see above) */ >=20 > but wchar_t varies between unsigned and signed: > $ grep '__wchar_t' sys/*/include/_types.h > sys/arm/include/_types.h:typedef unsigned int ___wchar_t; > sys/arm64/include/_types.h:typedef unsigned int ___wchar_t; > sys/mips/include/_types.h:typedef int ___wchar_t; > sys/powerpc/include/_types.h:typedef int ___wchar_t; > sys/riscv/include/_types.h:typedef int ___wchar_t; > sys/sparc64/include/_types.h:typedef int ___wchar_t; > sys/x86/include/_types.h:typedef int ___wchar_t; >=20 > Looking back into history, it looks like the "unsigned" is part > of the ARM EABI. >=20 > We should confirm that. It is definitely part of the OABI stuff, but = EABI was supposed to fix differences like this... As far as I know, arm has always been the odd one out, but even then, you should assume anything about the signedness of char. :) In any case, I have put up a fix for review here, which sidesteps that issue: https://reviews.freebsd.org/D21657 -Dimitry --Apple-Mail=_4B83A316-21D1-46A8-ACB1-444D07C617CC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXXzCqAAKCRCwXqMKLiCW ozx9AJ444XH15u1oO1QhjtwQJ3iBDNTdVgCg8Lp0HLCGxH7ZUaGKrFaMfRFJusU= =ix0J -----END PGP SIGNATURE----- --Apple-Mail=_4B83A316-21D1-46A8-ACB1-444D07C617CC-- From owner-svn-src-head@freebsd.org Sat Sep 14 10:39:22 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DFB7F0239; Sat, 14 Sep 2019 10:39:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46VpsP6XfHz3Jlv; Sat, 14 Sep 2019 10:39:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id AAFDE15E0E; Sat, 14 Sep 2019 10:39:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::19b1:7fa4:cdc6:3be2] (unknown [IPv6:2001:470:7a58:0:19b1:7fa4:cdc6:3be2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 851C3670C9; Sat, 14 Sep 2019 12:39:20 +0200 (CEST) From: Dimitry Andric Message-Id: <5683AA01-BF0D-4A67-9B57-925D47FE459D@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_72B25B43-1F43-465A-817D-53E157B7FAAB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r352275 - in head/lib/libedit: . TEST edit readline Date: Sat, 14 Sep 2019 12:39:20 +0200 In-Reply-To: <2D5BFAF9-7A03-4A2C-B406-19AA8BC8BF5D@FreeBSD.org> Cc: Peter Jeremy , Baptiste Daroussin , Charlie Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201909130650.x8D6o2fb037276@repo.freebsd.org> <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> <20190914041041.GA97181@server.rulingia.com> <2D5BFAF9-7A03-4A2C-B406-19AA8BC8BF5D@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 10:39:22 -0000 --Apple-Mail=_72B25B43-1F43-465A-817D-53E157B7FAAB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 14 Sep 2019, at 12:36, Dimitry Andric wrote: >=20 > On 14 Sep 2019, at 06:25, Warner Losh wrote: >>=20 >> On Fri, Sep 13, 2019, 10:11 PM Peter Jeremy = wrote: >> On 2019-Sep-13 16:33:15 -0400, Charlie Li = wrote: ... >> Looking back into history, it looks like the "unsigned" is part >> of the ARM EABI. >>=20 >> We should confirm that. It is definitely part of the OABI stuff, but = EABI was supposed to fix differences like this... >=20 > As far as I know, arm has always been the odd one out, but even then, > you should assume anything about the signedness of char. :) Oops, I meant "should NOT assume", there. -Dimitry --Apple-Mail=_72B25B43-1F43-465A-817D-53E157B7FAAB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXXzDWAAKCRCwXqMKLiCW o1PoAJ4zbsiE1gP2y24W5u1cVXjyiwmccwCg/xxpLenKkPmLDD3O8vEAe39omWc= =vqr5 -----END PGP SIGNATURE----- --Apple-Mail=_72B25B43-1F43-465A-817D-53E157B7FAAB-- From owner-svn-src-head@freebsd.org Sat Sep 14 12:40:47 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47810F38BC; Sat, 14 Sep 2019 12:40:47 +0000 (UTC) (envelope-from sg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46VsYW1C2dz3QjS; Sat, 14 Sep 2019 12:40:47 +0000 (UTC) (envelope-from sg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D6A71FD2A; Sat, 14 Sep 2019 12:40:47 +0000 (UTC) (envelope-from sg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8ECekPc004933; Sat, 14 Sep 2019 12:40:46 GMT (envelope-from sg@FreeBSD.org) Received: (from sg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8ECekpo004932; Sat, 14 Sep 2019 12:40:46 GMT (envelope-from sg@FreeBSD.org) Message-Id: <201909141240.x8ECekpo004932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sg set sender to sg@FreeBSD.org using -f From: Stephen Gregoratto Date: Sat, 14 Sep 2019 12:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352320 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: sg X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 352320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 12:40:47 -0000 Author: sg (doc committer) Date: Sat Sep 14 12:40:46 2019 New Revision: 352320 URL: https://svnweb.freebsd.org/changeset/base/352320 Log: Set bcr@ mentor for sg@ Approved by: bcr (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Sat Sep 14 10:56:17 2019 (r352319) +++ head/share/misc/committers-doc.dot Sat Sep 14 12:40:46 2019 (r352320) @@ -88,6 +88,7 @@ remko [label="Remko Lodder\nremko@FreeBSD.org\n2004/10 rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] sevan [label="Sevan Janiyan\nsevan@FreeBSD.org\n2016/09/16"] +sg [label="Stephen Gregoratto\nsg@FreeBSD.org\n2016/02/24"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2014/01/15"] taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] @@ -110,6 +111,7 @@ bcr -> allanjude bcr -> bhd bcr -> sevan bcr -> dexter +bcr -> sg blackend -> ale From owner-svn-src-head@freebsd.org Sat Sep 14 14:26:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A7E0F647A; Sat, 14 Sep 2019 14:26:31 +0000 (UTC) (envelope-from sg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46VvvW38Kpz431s; Sat, 14 Sep 2019 14:26:31 +0000 (UTC) (envelope-from sg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F4BC21107; Sat, 14 Sep 2019 14:26:31 +0000 (UTC) (envelope-from sg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8EEQV3R070179; Sat, 14 Sep 2019 14:26:31 GMT (envelope-from sg@FreeBSD.org) Received: (from sg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8EEQVSL070178; Sat, 14 Sep 2019 14:26:31 GMT (envelope-from sg@FreeBSD.org) Message-Id: <201909141426.x8EEQVSL070178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sg set sender to sg@FreeBSD.org using -f From: Stephen Gregoratto Date: Sat, 14 Sep 2019 14:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352332 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: sg X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 352332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 14:26:31 -0000 Author: sg (doc committer) Date: Sat Sep 14 14:26:30 2019 New Revision: 352332 URL: https://svnweb.freebsd.org/changeset/base/352332 Log: amend r:352320 Fix date for sg@ Approved by: bcr (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Sat Sep 14 13:35:48 2019 (r352331) +++ head/share/misc/committers-doc.dot Sat Sep 14 14:26:30 2019 (r352332) @@ -88,7 +88,7 @@ remko [label="Remko Lodder\nremko@FreeBSD.org\n2004/10 rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] sevan [label="Sevan Janiyan\nsevan@FreeBSD.org\n2016/09/16"] -sg [label="Stephen Gregoratto\nsg@FreeBSD.org\n2016/02/24"] +sg [label="Stephen Gregoratto\nsg@FreeBSD.org\n2019/09/10"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2014/01/15"] taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] From owner-svn-src-head@freebsd.org Sat Sep 14 15:15:02 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 932A6F7734 for ; Sat, 14 Sep 2019 15:15:02 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46VwzV1FvVz45GQ for ; Sat, 14 Sep 2019 15:15:01 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568474100; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=hp4H6aDX0pq3qawk0PYDOtfkwl1rI28jhi5hCKKyR1Wx90gshT0/16WLbhyaBnnmd+br/IW4tF/MK rbtH4KENEqlAZNaqlBnbZV4f5D1ALz9e8HK4D8djF0CKY6k9uXg1I5d3wWwJm+fzsZ0DaAH8HpM0WM KiSgJzMbNpLreJ9hstp7d77mnJA90quhJ+arAM7dY1cCyb1HFkVxHCI+louZkL1xLNpgKYcjwBAviX LosrUrox4VprY2xNDvkmQevDHKIGGz4RFkEHGoUDf3iz3wyA2XL6nVOZJTfikxyyHarRhNaw1azcSU 4EG4Tu8Lq+XUg2Vr/hpWs0tEA6YKR5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=Zb6fyPxGBOwrj+9ODsjNByFB/BK1I138Qe8baNMh95E=; b=T7v6iQjg8j1HLbiTAc1Suxlja4ovcD1DX9F4I8UJM1k+5OPS5Nx69rkYuuxfBGLtLONNXAM/tWR9K 8vVXTaScpavhC9ehEr92aa1FPRsrin0bFMx9lSvhq568zuG+vb9/Rl+v6HS9kWrg7Qn5op/B2L5WpE XqqN7EM3kHANtPHkQNWtjERTlFGe4ZaCS4/HbZBqykGNBbTQMGPrRoR1Y3U2jw4VxJJegfZ0tOmPfR 4+Tv/LYjbwmd6KZNpMqlLO/GvPSmvKCEWbtrrSletieMKNFADiscs6Ukh+zgIjcKdZuzZC/JinvOqO dHtF6l6i69DYcmuwj7DNTojivMMa0pQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=Zb6fyPxGBOwrj+9ODsjNByFB/BK1I138Qe8baNMh95E=; b=s7l0d8h8HqcqPt++bjXLqNufUV7j8W0mdErLisd8wgGabqnp0JfuueIUxZv8O2+inO5x4kHVWalQ1 ZuaFwL1U5G2CRNj4A4d0kbH7luYQBtHRvC+YaYlZy5eBbnRvHU/xXXY8N1mZFZZDsVsWecF8MEotI+ EC8hZpAvoqjfmaIYFhYNXlcVxd/PyOvQLUn8iO2jiyGgZj/24ipy2K/5LCtCRQjx8tvVqzzRYYn66e ZSBdhbFsN6DQFqhkMULnjU9uJoQjPveI1yjh3if84L3AXhEhdLlFanGgxhP1puFFtTipbBC47x4pUc 93tKHKzUuppkkt2J4+/3HoAQJKSSkNA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 692ad101-d702-11e9-b67d-cdd75d6ce7a8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 692ad101-d702-11e9-b67d-cdd75d6ce7a8; Sat, 14 Sep 2019 15:14:59 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8EFEub9086559; Sat, 14 Sep 2019 09:14:56 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1f18e7e147790aa280a4d35f93bf619313745200.camel@freebsd.org> Subject: Re: svn commit: r352275 - in head/lib/libedit: . TEST edit readline From: Ian Lepore To: Warner Losh , Peter Jeremy Cc: Baptiste Daroussin , Charlie Li , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 14 Sep 2019 09:14:56 -0600 In-Reply-To: References: <201909130650.x8D6o2fb037276@repo.freebsd.org> <6fadeb6b-fe09-f3c7-9bca-b5637bbb4e43@vishwin.info> <20190914041041.GA97181@server.rulingia.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46VwzV1FvVz45GQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; TAGGED_RCPT(0.00)[freebsd]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 15:15:02 -0000 On Fri, 2019-09-13 at 22:25 -0600, Warner Losh wrote: > On Fri, Sep 13, 2019, 10:11 PM Peter Jeremy > wrote: > > > On 2019-Sep-13 16:33:15 -0400, Charlie Li > > wrote: > > > Baptiste Daroussin wrote: > > > > Author: bapt > > > > Date: Fri Sep 13 06:50:02 2019 > > > > New Revision: 352275 > > > > URL: https://svnweb.freebsd.org/changeset/base/352275 > > > > > > > > Log: > > > > Update libedit to a snapshot from 2019-09-10 > > > > Reviewed by: Yuichiro Naito > > > > MFC after: 3 weeks > > > > Differential Revision: https://reviews.freebsd.org/D21584 > > > > > > > > > > I posted in phab but repeating here, this breaks the build on (at > > > least) > > > aarch64: > > > > It breaks the build on arm and arm64 only. > > > > wint_t is int on all platforms: > > sys/sys/_types.h: > > typedef int __ct_rune_t; /* arg type for ctype funcs > > */ > > typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > > > > but wchar_t varies between unsigned and signed: > > $ grep '__wchar_t' sys/*/include/_types.h > > sys/arm/include/_types.h:typedef unsigned int ___wchar_t; > > sys/arm64/include/_types.h:typedef unsigned int ___wchar_t; > > sys/mips/include/_types.h:typedef int ___wchar_t; > > sys/powerpc/include/_types.h:typedef int ___wchar_t; > > sys/riscv/include/_types.h:typedef int ___wchar_t; > > sys/sparc64/include/_types.h:typedef int ___wchar_t; > > sys/x86/include/_types.h:typedef int ___wchar_t; > > > > Looking back into history, it looks like the "unsigned" is part > > of the ARM EABI. > > > > We should confirm that. It is definitely part of the OABI stuff, but EABI > was supposed to fix differences like this... > The char type is unsigned by default on arm (it's part of eabi), and also on powerpc and riscv. -- Ian From owner-svn-src-head@freebsd.org Sat Sep 14 18:20:15 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B7BDFB681; Sat, 14 Sep 2019 18:20:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46W15C0kVcz4GnN; Sat, 14 Sep 2019 18:20:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC2442399B; Sat, 14 Sep 2019 18:20:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8EIKEbG007482; Sat, 14 Sep 2019 18:20:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8EIKEve007481; Sat, 14 Sep 2019 18:20:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201909141820.x8EIKEve007481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 14 Sep 2019 18:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352333 - head/sys/arm/ti/am335x X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/ti/am335x X-SVN-Commit-Revision: 352333 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 18:20:15 -0000 Author: ian Date: Sat Sep 14 18:20:14 2019 New Revision: 352333 URL: https://svnweb.freebsd.org/changeset/base/352333 Log: Include , required to use spinlocks in this code. Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtpps.c Sat Sep 14 14:26:30 2019 (r352332) +++ head/sys/arm/ti/am335x/am335x_dmtpps.c Sat Sep 14 18:20:14 2019 (r352333) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-head@freebsd.org Sat Sep 14 19:16:08 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1CD7FCA5B; Sat, 14 Sep 2019 19:16:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46W2Kh4GHgz4L58; Sat, 14 Sep 2019 19:16:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75C3D24434; Sat, 14 Sep 2019 19:16:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8EJG8hw043569; Sat, 14 Sep 2019 19:16:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8EJG8or043567; Sat, 14 Sep 2019 19:16:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201909141916.x8EJG8or043567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 14 Sep 2019 19:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352334 - head/sys/fs/pseudofs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/fs/pseudofs X-SVN-Commit-Revision: 352334 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 19:16:08 -0000 Author: trasz Date: Sat Sep 14 19:16:07 2019 New Revision: 352334 URL: https://svnweb.freebsd.org/changeset/base/352334 Log: Make pseudofs(9) create directory entries in order, instead of the reverse. This fixes Linux sysctl(8) binary - it assumes the first two directory entries are always "." and "..". There might be other Linux apps affected by this. NB it might be a good idea to rewrite it using queue(3). Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21550 Modified: head/sys/fs/pseudofs/pseudofs.c head/sys/fs/pseudofs/pseudofs.h Modified: head/sys/fs/pseudofs/pseudofs.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs.c Sat Sep 14 18:20:14 2019 (r352333) +++ head/sys/fs/pseudofs/pseudofs.c Sat Sep 14 19:16:07 2019 (r352334) @@ -135,10 +135,21 @@ pfs_add_node(struct pfs_node *parent, struct pfs_node pfs_fileno_alloc(pn); pfs_lock(parent); - pn->pn_next = parent->pn_nodes; if ((parent->pn_flags & PFS_PROCDEP) != 0) pn->pn_flags |= PFS_PROCDEP; - parent->pn_nodes = pn; + if (parent->pn_nodes == NULL) { + KASSERT(parent->pn_last_node == NULL, + ("%s(): pn_last_node not NULL", __func__)); + parent->pn_nodes = pn; + parent->pn_last_node = pn; + } else { + KASSERT(parent->pn_last_node != NULL, + ("%s(): pn_last_node is NULL", __func__)); + KASSERT(parent->pn_last_node->pn_next == NULL, + ("%s(): pn_last_node->pn_next not NULL", __func__)); + parent->pn_last_node->pn_next = pn; + parent->pn_last_node = pn; + } pfs_unlock(parent); } @@ -148,7 +159,7 @@ pfs_add_node(struct pfs_node *parent, struct pfs_node static void pfs_detach_node(struct pfs_node *pn) { - struct pfs_node *parent = pn->pn_parent; + struct pfs_node *node, *parent = pn->pn_parent; struct pfs_node **iter; KASSERT(parent != NULL, ("%s(): node has no parent", __func__)); @@ -156,6 +167,16 @@ pfs_detach_node(struct pfs_node *pn) ("%s(): parent has different pn_info", __func__)); pfs_lock(parent); + if (pn == parent->pn_last_node) { + if (pn == pn->pn_nodes) { + parent->pn_last_node = NULL; + } else { + for (node = parent->pn_nodes; + node->pn_next != pn; node = node->pn_next) + continue; + parent->pn_last_node = node; + } + } iter = &parent->pn_nodes; while (*iter != NULL) { if (*iter == pn) { Modified: head/sys/fs/pseudofs/pseudofs.h ============================================================================== --- head/sys/fs/pseudofs/pseudofs.h Sat Sep 14 18:20:14 2019 (r352333) +++ head/sys/fs/pseudofs/pseudofs.h Sat Sep 14 19:16:07 2019 (r352334) @@ -237,6 +237,7 @@ struct pfs_node { struct pfs_node *pn_parent; /* (o) */ struct pfs_node *pn_nodes; /* (o) */ + struct pfs_node *pn_last_node; /* (o) */ struct pfs_node *pn_next; /* (p) */ }; From owner-svn-src-head@freebsd.org Sat Sep 14 19:23:48 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1ED7DFD065; Sat, 14 Sep 2019 19:23:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46W2VX0jjpz4M0w; Sat, 14 Sep 2019 19:23:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D708424608; Sat, 14 Sep 2019 19:23:47 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8EJNlLG049512; Sat, 14 Sep 2019 19:23:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8EJNkVx049506; Sat, 14 Sep 2019 19:23:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201909141923.x8EJNkVx049506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 14 Sep 2019 19:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352337 - in head: share/man/man3 sys/sys tests/sys/sys X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: share/man/man3 sys/sys tests/sys/sys X-SVN-Commit-Revision: 352337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 19:23:48 -0000 Author: trasz Date: Sat Sep 14 19:23:46 2019 New Revision: 352337 URL: https://svnweb.freebsd.org/changeset/base/352337 Log: Introduce arb(3), the Array-based Red-Black Tree macros: similar to the traditional tree(3) RB trees, but using an array (preallocated, linear chunk of memory) to store the tree. This avoids allocation overhead, improves memory locality, and makes it trivially easy to share/transfer/copy the entire tree without the need for marshalling. The downside is that the size is fixed at initialization time; there is no mechanism to resize it. This is one of the dependencies for the new stats(3) framework (https://reviews.freebsd.org/D20477). Reviewed by: bcr (man pages), markj Discussed with: cem MFC after: 2 weeks Sponsored by: Klara Inc, Netflix Obtained from: Netflix Differential Revision: https://reviews.freebsd.org/D20324 Added: head/share/man/man3/arb.3 (contents, props changed) head/sys/sys/arb.h (contents, props changed) head/tests/sys/sys/arb_test.c (contents, props changed) Modified: head/share/man/man3/Makefile head/share/man/man3/queue.3 head/share/man/man3/tree.3 head/tests/sys/sys/Makefile Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Sat Sep 14 19:19:38 2019 (r352336) +++ head/share/man/man3/Makefile Sat Sep 14 19:23:46 2019 (r352337) @@ -3,7 +3,8 @@ .include -MAN= assert.3 \ +MAN= arb.3 \ + assert.3 \ ATOMIC_VAR_INIT.3 \ bitstring.3 \ CMSG_DATA.3 \ @@ -32,6 +33,42 @@ MAN= assert.3 \ timeradd.3 \ tree.3 +MLINKS+= arb.3 ARB8_ENTRY.3 \ + arb.3 ARB16_ENTRY.3 \ + arb.3 ARB32_ENTRY.3 \ + arb.3 ARB8_HEAD.3 \ + arb.3 ARB16_HEAD.3 \ + arb.3 ARB32_HEAD.3 \ + arb.3 ARB_ALLOCSIZE.3 \ + arb.3 ARB_INITIALIZER.3 \ + arb.3 ARB_ROOT.3 \ + arb.3 ARB_EMPTY.3 \ + arb.3 ARB_FULL.3 \ + arb.3 ARB_CURNODES.3 \ + arb.3 ARB_MAXNODES.3 \ + arb.3 ARB_NEXT.3 \ + arb.3 ARB_PREV.3 \ + arb.3 ARB_MIN.3 \ + arb.3 ARB_MAX.3 \ + arb.3 ARB_FIND.3 \ + arb.3 ARB_NFIND.3 \ + arb.3 ARB_LEFT.3 \ + arb.3 ARB_LEFTIDX.3 \ + arb.3 ARB_RIGHT.3 \ + arb.3 ARB_RIGHTIDX.3 \ + arb.3 ARB_PARENT.3 \ + arb.3 ARB_PARENTIDX.3 \ + arb.3 ARB_GETFREE.3 \ + arb.3 ARB_FREEIDX.3 \ + arb.3 ARB_FOREACH.3 \ + arb.3 ARB_FOREACH_FROM.3 \ + arb.3 ARB_FOREACH_SAFE.3 \ + arb.3 ARB_FOREACH_REVERSE.3 \ + arb.3 ARB_FOREACH_REVERSE_FROM.3 \ + arb.3 ARB_FOREACH_REVERSE_SAFE.3 \ + arb.3 ARB_INIT.3 \ + arb.3 ARB_INSERT.3 \ + arb.3 ARB_REMOVE.3 MLINKS= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \ ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak.3 \ Added: head/share/man/man3/arb.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man3/arb.3 Sat Sep 14 19:23:46 2019 (r352337) @@ -0,0 +1,483 @@ +.\" $OpenBSD: tree.3,v 1.7 2002/06/12 01:09:20 provos Exp $ +.\" +.\" Copyright 2002 Niels Provos +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by Niels Provos. +.\" 4. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 8, 2019 +.Dt ARB 3 +.Os +.Sh NAME +.Nm ARB_PROTOTYPE , +.Nm ARB_PROTOTYPE_STATIC , +.Nm ARB_PROTOTYPE_INSERT , +.Nm ARB_PROTOTYPE_INSERT_COLOR , +.Nm ARB_PROTOTYPE_REMOVE , +.Nm ARB_PROTOTYPE_REMOVE_COLOR , +.Nm ARB_PROTOTYPE_FIND , +.Nm ARB_PROTOTYPE_NFIND , +.Nm ARB_PROTOTYPE_NEXT , +.Nm ARB_PROTOTYPE_PREV , +.Nm ARB_PROTOTYPE_MINMAX , +.Nm ARB_GENERATE , +.Nm ARB_GENERATE_STATIC , +.Nm ARB_GENERATE_INSERT , +.Nm ARB_GENERATE_INSERT_COLOR , +.Nm ARB_GENERATE_REMOVE , +.Nm ARB_GENERATE_REMOVE_COLOR , +.Nm ARB_GENERATE_FIND , +.Nm ARB_GENERATE_NFIND , +.Nm ARB_GENERATE_NEXT , +.Nm ARB_GENERATE_PREV , +.Nm ARB_GENERATE_MINMAX , +.Nm ARB8_ENTRY , +.Nm ARB16_ENTRY , +.Nm ARB32_ENTRY , +.Nm ARB8_HEAD , +.Nm ARB16_HEAD , +.Nm ARB32_HEAD , +.Nm ARB_ALLOCSIZE , +.Nm ARB_INITIALIZER , +.Nm ARB_ROOT , +.Nm ARB_EMPTY , +.Nm ARB_FULL , +.Nm ARB_CURNODES , +.Nm ARB_MAXNODES , +.Nm ARB_NEXT , +.Nm ARB_PREV , +.Nm ARB_MIN , +.Nm ARB_MAX , +.Nm ARB_FIND , +.Nm ARB_NFIND , +.Nm ARB_LEFT , +.Nm ARB_LEFTIDX , +.Nm ARB_RIGHT , +.Nm ARB_RIGHTIDX , +.Nm ARB_PARENT , +.Nm ARB_PARENTIDX , +.Nm ARB_GETFREE , +.Nm ARB_FREEIDX , +.Nm ARB_FOREACH , +.Nm ARB_FOREACH_FROM , +.Nm ARB_FOREACH_SAFE , +.Nm ARB_FOREACH_REVERSE , +.Nm ARB_FOREACH_REVERSE_FROM , +.Nm ARB_FOREACH_REVERSE_SAFE , +.Nm ARB_INIT , +.Nm ARB_INSERT , +.Nm ARB_REMOVE +.Nd "array-based red-black trees" +.Sh SYNOPSIS +.In sys/arb.h +.Fn ARB_PROTOTYPE NAME TYPE FIELD CMP +.Fn ARB_PROTOTYPE_STATIC NAME TYPE FIELD CMP +.Fn ARB_PROTOTYPE_INSERT NAME TYPE ATTR +.Fn ARB_PROTOTYPE_INSERT_COLOR NAME TYPE ATTR +.Fn ARB_PROTOTYPE_REMOVE NAME TYPE ATTR +.Fn ARB_PROTOTYPE_REMOVE_COLOR NAME TYPE ATTR +.Fn ARB_PROTOTYPE_FIND NAME TYPE ATTR +.Fn ARB_PROTOTYPE_NFIND NAME TYPE ATTR +.Fn ARB_PROTOTYPE_NEXT NAME TYPE ATTR +.Fn ARB_PROTOTYPE_PREV NAME TYPE ATTR +.Fn ARB_PROTOTYPE_MINMAX NAME TYPE ATTR +.Fn ARB_GENERATE NAME TYPE FIELD CMP +.Fn ARB_GENERATE_STATIC NAME TYPE FIELD CMP +.Fn ARB_GENERATE_INSERT NAME TYPE FIELD CMP ATTR +.Fn ARB_GENERATE_INSERT_COLOR NAME TYPE FIELD ATTR +.Fn ARB_GENERATE_REMOVE NAME TYPE FIELD ATTR +.Fn ARB_GENERATE_REMOVE_COLOR NAME TYPE FIELD ATTR +.Fn ARB_GENERATE_FIND NAME TYPE FIELD CMP ATTR +.Fn ARB_GENERATE_NFIND NAME TYPE FIELD CMP ATTR +.Fn ARB_GENERATE_NEXT NAME TYPE FIELD ATTR +.Fn ARB_GENERATE_PREV NAME TYPE FIELD ATTR +.Fn ARB_GENERATE_MINMAX NAME TYPE FIELD ATTR +.Fn ARB<8|16|32>_ENTRY +.Fn ARB<8|16|32>_HEAD HEADNAME TYPE +.Ft "size_t" +.Fn ARB_ALLOCSIZE "ARB_HEAD *head" "int<8|16|32>_t maxnodes" "struct TYPE *elm" +.Fn ARB_INITIALIZER "ARB_HEAD *head" "int<8|16|32>_t maxnodes" +.Ft "struct TYPE *" +.Fn ARB_ROOT "ARB_HEAD *head" +.Ft "bool" +.Fn ARB_EMPTY "ARB_HEAD *head" +.Ft "bool" +.Fn ARB_FULL "ARB_HEAD *head" +.Ft "int<8|16|32>_t" +.Fn ARB_CURNODES "ARB_HEAD *head" +.Ft "int<8|16|32>_t" +.Fn ARB_MAXNODES "ARB_HEAD *head" +.Ft "struct TYPE *" +.Fn ARB_NEXT NAME "ARB_HEAD *head" "struct TYPE *elm" +.Ft "struct TYPE *" +.Fn ARB_PREV NAME "ARB_HEAD *head" "struct TYPE *elm" +.Ft "struct TYPE *" +.Fn ARB_MIN NAME "ARB_HEAD *head" +.Ft "struct TYPE *" +.Fn ARB_MAX NAME "ARB_HEAD *head" +.Ft "struct TYPE *" +.Fn ARB_FIND NAME "ARB_HEAD *head" "struct TYPE *elm" +.Ft "struct TYPE *" +.Fn ARB_NFIND NAME "ARB_HEAD *head" "struct TYPE *elm" +.Ft "struct TYPE *" +.Fn ARB_LEFT "struct TYPE *elm" "ARB_ENTRY NAME" +.Ft "int<8|16|32>_t" +.Fn ARB_LEFTIDX "struct TYPE *elm" "ARB_ENTRY NAME" +.Ft "struct TYPE *" +.Fn ARB_RIGHT "struct TYPE *elm" "ARB_ENTRY NAME" +.Ft "int<8|16|32>_t" +.Fn ARB_RIGHTIDX "struct TYPE *elm" "ARB_ENTRY NAME" +.Ft "struct TYPE *" +.Fn ARB_PARENT "struct TYPE *elm" "ARB_ENTRY NAME" +.Ft "int<8|16|32>_t" +.Fn ARB_PARENTIDX "struct TYPE *elm" "ARB_ENTRY NAME" +.Ft "struct TYPE *" +.Fn ARB_GETFREE "ARB_HEAD *head" "FIELD" +.Ft "int<8|16|32>_t" +.Fn ARB_FREEIDX "ARB_HEAD *head" +.Fn ARB_FOREACH VARNAME NAME "ARB_HEAD *head" +.Fn ARB_FOREACH_FROM "VARNAME" "NAME" "POS_VARNAME" +.Fn ARB_FOREACH_SAFE "VARNAME" "NAME" "ARB_HEAD *head" "TEMP_VARNAME" +.Fn ARB_FOREACH_REVERSE VARNAME NAME "ARB_HEAD *head" +.Fn ARB_FOREACH_REVERSE_FROM "VARNAME" "NAME" "POS_VARNAME" +.Fn ARB_FOREACH_REVERSE_SAFE "VARNAME" "NAME" "ARB_HEAD *head" "TEMP_VARNAME" +.Ft void +.Fn ARB_INIT "struct TYPE *elm" "FIELD" "ARB_HEAD *head" "int<8|16|32>_t maxnodes" +.Ft "struct TYPE *" +.Fn ARB_INSERT NAME "ARB_HEAD *head" "struct TYPE *elm" +.Ft "struct TYPE *" +.Fn ARB_REMOVE NAME "ARB_HEAD *head" "struct TYPE *elm" +.Sh DESCRIPTION +These macros define data structures for and array-based red-black trees. +They use a single, continuous chunk of memory, and are useful +e.g., when the tree needs to be transferred between userspace and kernel. +.Pp +In the macro definitions, +.Fa TYPE +is the name tag of a user defined structure that must contain a field of type +.Vt ARB_ENTRY , +named +.Fa ENTRYNAME . +The argument +.Fa HEADNAME +is the name tag of a user defined structure that must be declared +using the +.Fn ARB_HEAD +macro. +The argument +.Fa NAME +has to be a unique name prefix for every tree that is defined. +.Pp +The function prototypes are declared with +.Fn ARB_PROTOTYPE , +or +.Fn ARB_PROTOTYPE_STATIC . +The function bodies are generated with +.Fn ARB_GENERATE , +or +.Fn ARB_GENERATE_STATIC . +See the examples below for further explanation of how these macros are used. +.Pp +A red-black tree is a binary search tree with the node color as an +extra attribute. +It fulfills a set of conditions: +.Bl -enum -offset indent +.It +Every search path from the root to a leaf consists of the same number of +black nodes. +.It +Each red node (except for the root) has a black parent. +.It +Each leaf node is black. +.El +.Pp +Every operation on a red-black tree is bounded as +.Fn O "lg n" . +The maximum height of a red-black tree is +.Fn 2lg "n + 1" . +.Pp +.Fn ARB_* +trees require entries to be allocated as an array, and uses array +indices to link entries together. +The maximum number of +.Fn ARB_* +tree entries is therefore constrained by the minimum of array size and choice of +signed integer data type used to store array indices. +Use +.Fn ARB_ALLOCSIZE +to compute the size of memory chunk to allocate. +.Pp +A red-black tree is headed by a structure defined by the +.Fn ARB_HEAD +macro. +A +structure is declared with either of the following: +.Bd -ragged -offset indent +.Fn ARB<8|16|32>_HEAD HEADNAME TYPE +.Va head ; +.Ed +.Pp +where +.Fa HEADNAME +is the name of the structure to be defined, and struct +.Fa TYPE +is the type of the elements to be inserted into the tree. +.Pp +The +.Fn ARB_HEAD +variant includes a suffix denoting the signed integer data type size +.Pq in bits +used to store array indices. +For example, +.Fn ARB_HEAD8 +creates a red-black tree head strucutre with 8-bit signed array indices capable +of indexing up to 128 entries. +.Pp +The +.Fn ARB_ENTRY +macro declares a structure that allows elements to be connected in the tree. +Similarly to the +.Fn ARB<8|16|32>_HEAD +macro, the +.Fn ARB_ENTRY +variant includes a suffix denoting the signed integer data type size +.Pq in bits +used to store array indices. +Entries should use the same number of bits as the tree head structure they will +be linked into. +.Pp +In order to use the functions that manipulate the tree structure, +their prototypes need to be declared with the +.Fn ARB_PROTOTYPE +or +.Fn ARB_PROTOTYPE_STATIC +macro, +where +.Fa NAME +is a unique identifier for this particular tree. +The +.Fa TYPE +argument is the type of the structure that is being managed +by the tree. +The +.Fa FIELD +argument is the name of the element defined by +.Fn ARB_ENTRY . +Individual prototypes can be declared with +.Fn ARB_PROTOTYPE_INSERT , +.Fn ARB_PROTOTYPE_INSERT_COLOR , +.Fn ARB_PROTOTYPE_REMOVE , +.Fn ARB_PROTOTYPE_REMOVE_COLOR , +.Fn ARB_PROTOTYPE_FIND , +.Fn ARB_PROTOTYPE_NFIND , +.Fn ARB_PROTOTYPE_NEXT , +.Fn ARB_PROTOTYPE_PREV , +and +.Fn ARB_PROTOTYPE_MINMAX +in case not all functions are required. +The individual prototype macros expect +.Fa NAME , +.Fa TYPE , +and +.Fa ATTR +arguments. +The +.Fa ATTR +argument must be empty for global functions or +.Fa static +for static functions. +.Pp +The function bodies are generated with the +.Fn ARB_GENERATE +or +.Fn ARB_GENERATE_STATIC +macro. +These macros take the same arguments as the +.Fn ARB_PROTOTYPE +and +.Fn ARB_PROTOTYPE_STATIC +macros, but should be used only once. +As an alternative individual function bodies are generated with the +.Fn ARB_GENERATE_INSERT , +.Fn ARB_GENERATE_INSERT_COLOR , +.Fn ARB_GENERATE_REMOVE , +.Fn ARB_GENERATE_REMOVE_COLOR , +.Fn ARB_GENERATE_FIND , +.Fn ARB_GENERATE_NFIND , +.Fn ARB_GENERATE_NEXT , +.Fn ARB_GENERATE_PREV , +and +.Fn ARB_GENERATE_MINMAX +macros. +.Pp +Finally, +the +.Fa CMP +argument is the name of a function used to compare tree nodes +with each other. +The function takes two arguments of type +.Vt "struct TYPE *" . +If the first argument is smaller than the second, the function returns a +value smaller than zero. +If they are equal, the function returns zero. +Otherwise, it should return a value greater than zero. +The compare +function defines the order of the tree elements. +.Pp +The +.Fn ARB_INIT +macro initializes the tree referenced by +.Fa head , +with the array length of +.Fa maxnodes . +.Pp +The red-black tree can also be initialized statically by using the +.Fn ARB_INITIALIZER +macro: +.Bd -ragged -offset indent +.Fn ARB<8|16|32>_HEAD HEADNAME TYPE +.Va head += +.Fn ARB_INITIALIZER &head maxnodes ; +.Ed +.Pp +The +.Fn ARB_INSERT +macro inserts the new element +.Fa elm +into the tree. +.Pp +The +.Fn ARB_REMOVE +macro removes the element +.Fa elm +from the tree pointed by +.Fa head . +.Pp +The +.Fn ARB_FIND +and +.Fn ARB_NFIND +macros can be used to find a particular element in the tree. +.Bd -literal -offset indent +struct TYPE find, *res; +find.key = 30; +res = RB_FIND(NAME, head, &find); +.Ed +.Pp +The +.Fn ARB_ROOT , +.Fn ARB_MIN , +.Fn ARB_MAX , +.Fn ARB_NEXT , +and +.Fn ARB_PREV +macros can be used to traverse the tree: +.Pp +.Dl "for (np = RB_MIN(NAME, &head); np != NULL; np = RB_NEXT(NAME, &head, np))" +.Pp +Or, for simplicity, one can use the +.Fn ARB_FOREACH +or +.Fn ARB_FOREACH_REVERSE +macro: +.Bd -ragged -offset indent +.Fn RB_FOREACH np NAME head +.Ed +.Pp +The macros +.Fn ARB_FOREACH_SAFE +and +.Fn ARB_FOREACH_REVERSE_SAFE +traverse the tree referenced by head +in a forward or reverse direction respectively, +assigning each element in turn to np. +However, unlike their unsafe counterparts, +they permit both the removal of np +as well as freeing it from within the loop safely +without interfering with the traversal. +.Pp +Both +.Fn ARB_FOREACH_FROM +and +.Fn ARB_FOREACH_REVERSE_FROM +may be used to continue an interrupted traversal +in a forward or reverse direction respectively. +The head pointer is not required. +The pointer to the node from where to resume the traversal +should be passed as their last argument, +and will be overwritten to provide safe traversal. +.Pp +The +.Fn ARB_EMPTY +macro should be used to check whether a red-black tree is empty. +.Pp +Given that ARB trees have an intrinsic upper bound on the number of entries, +some ARB-specific additional macros are defined. +The +.Fn ARB_FULL +macro returns a boolean indicating whether the current number of tree entries +equals the tree's maximum. +The +.Fn ARB_CURNODES +and +.Fn ARB_MAXNODES +macros return the current and maximum number of entries respectively. +The +.Fn ARB_GETFREE +macro returns a pointer to the next free entry in the array of entries, ready to +be linked into the tree. +The +.Fn ARB_INSERT +returns +.Dv NULL +if the element was inserted in the tree successfully, otherwise they +return a pointer to the element with the colliding key. +.Pp +Accordingly, +.Fn ARB_REMOVE +returns the pointer to the removed element otherwise they return +.Dv NULL +to indicate an error. +.Sh SEE ALSO +.Xr queue 3 , +.Xr tree 3 +.Sh HISTORY +The +.Nm ARB +macros first appeared in +.Fx 13.0 . +.Sh AUTHORS +The +.Nm ARB +macros were implemented by +.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org , +based on +.Xr tree 3 +macros written by +.An Niels Provos . Modified: head/share/man/man3/queue.3 ============================================================================== --- head/share/man/man3/queue.3 Sat Sep 14 19:19:38 2019 (r352336) +++ head/share/man/man3/queue.3 Sat Sep 14 19:23:46 2019 (r352337) @@ -1329,6 +1329,7 @@ in mode. .El .Sh SEE ALSO +.Xr arb 3 , .Xr tree 3 .Sh HISTORY The Modified: head/share/man/man3/tree.3 ============================================================================== --- head/share/man/man3/tree.3 Sat Sep 14 19:19:38 2019 (r352336) +++ head/share/man/man3/tree.3 Sat Sep 14 19:23:46 2019 (r352337) @@ -674,6 +674,7 @@ return the pointer to the removed element otherwise th .Dv NULL to indicate an error. .Sh SEE ALSO +.Xr arb 3 , .Xr queue 3 .Sh AUTHORS The author of the tree macros is Added: head/sys/sys/arb.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/arb.h Sat Sep 14 19:23:46 2019 (r352337) @@ -0,0 +1,779 @@ +/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */ +/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ +/* $FreeBSD$ */ + +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SYS_ARB_H_ +#define _SYS_ARB_H_ + +#include + +/* Array-based red-black trees. */ + +#define ARB_NULLIDX -1 +#define ARB_NULLCOL -1 + +#define ARB_BLACK 0 +#define ARB_RED 1 + +#define ARB_NEGINF -1 +#define ARB_INF 1 + +#define ARB_HEAD(name, type, idxbits) \ +struct name { \ + int##idxbits##_t arb_curnodes; \ + int##idxbits##_t arb_maxnodes; \ + int##idxbits##_t arb_root_idx; \ + int##idxbits##_t arb_free_idx; \ + int##idxbits##_t arb_min_idx; \ + int##idxbits##_t arb_max_idx; \ + struct type arb_nodes[]; \ +} +#define ARB8_HEAD(name, type) ARB_HEAD(name, type, 8) +#define ARB16_HEAD(name, type) ARB_HEAD(name, type, 16) +#define ARB32_HEAD(name, type) ARB_HEAD(name, type, 32) + +#define ARB_ALLOCSIZE(head, maxn, x) \ + (sizeof(*head) + (maxn) * sizeof(*x)) + +#define ARB_INITIALIZER(name, maxn) \ + ((struct name){ 0, maxn, ARB_NULLIDX, ARB_NULLIDX, \ + ARB_NULLIDX, ARB_NULLIDX }) + +#define ARB_INIT(x, field, head, maxn) \ + (head)->arb_curnodes = 0; \ + (head)->arb_maxnodes = (maxn); \ + (head)->arb_root_idx = (head)->arb_free_idx = \ + (head)->arb_min_idx = (head)->arb_max_idx = ARB_NULLIDX; \ + /* The ARB_RETURNFREE() puts all entries on the free list. */ \ + ARB_ARRFOREACH_REVWCOND(x, field, head, \ + ARB_RETURNFREE(head, x, field)) + +#define ARB_ENTRY(idxbits) \ +struct { \ + int##idxbits##_t arbe_parent_idx; \ + int##idxbits##_t arbe_left_idx; \ + int##idxbits##_t arbe_right_idx; \ + int8_t arbe_color; \ +} +#define ARB8_ENTRY() ARB_ENTRY(8) +#define ARB16_ENTRY() ARB_ENTRY(16) +#define ARB32_ENTRY() ARB_ENTRY(32) + +#define ARB_ENTRYINIT(elm, field) do { \ + (elm)->field.arbe_parent_idx = \ + (elm)->field.arbe_left_idx = \ + (elm)->field.arbe_right_idx = ARB_NULLIDX; \ + (elm)->field.arbe_color = ARB_NULLCOL; \ +} while (/*CONSTCOND*/ 0) + +#define ARB_ELMTYPE(head) __typeof(&(head)->arb_nodes[0]) +#define ARB_NODES(head) (head)->arb_nodes +#define ARB_MAXNODES(head) (head)->arb_maxnodes +#define ARB_CURNODES(head) (head)->arb_curnodes +#define ARB_EMPTY(head) ((head)->arb_curnodes == 0) +#define ARB_FULL(head) ((head)->arb_curnodes >= (head)->arb_maxnodes) +#define ARB_CNODE(head, idx) \ + ((((intptr_t)(idx) <= ARB_NULLIDX) || ((idx) >= ARB_MAXNODES(head))) ? \ + NULL : ((const ARB_ELMTYPE(head))(ARB_NODES(head) + (idx)))) +#define ARB_NODE(head, idx) \ + (__DECONST(ARB_ELMTYPE(head), ARB_CNODE(head, idx))) +#define ARB_ROOT(head) ARB_NODE(head, ARB_ROOTIDX(head)) +#define ARB_LEFT(head, elm, field) ARB_NODE(head, ARB_LEFTIDX(elm, field)) +#define ARB_RIGHT(head, elm, field) ARB_NODE(head, ARB_RIGHTIDX(elm, field)) +#define ARB_PARENT(head, elm, field) ARB_NODE(head, ARB_PARENTIDX(elm, field)) +#define ARB_FREEIDX(head) (head)->arb_free_idx +#define ARB_ROOTIDX(head) (head)->arb_root_idx +#define ARB_MINIDX(head) (head)->arb_min_idx +#define ARB_MAXIDX(head) (head)->arb_max_idx +#define ARB_SELFIDX(head, elm) \ + ((elm) ? ((intptr_t)((((const uint8_t *)(elm)) - \ + ((const uint8_t *)ARB_NODES(head))) / sizeof(*(elm)))) : \ + (intptr_t)ARB_NULLIDX) +#define ARB_LEFTIDX(elm, field) (elm)->field.arbe_left_idx +#define ARB_RIGHTIDX(elm, field) (elm)->field.arbe_right_idx +#define ARB_PARENTIDX(elm, field) (elm)->field.arbe_parent_idx +#define ARB_COLOR(elm, field) (elm)->field.arbe_color +#define ARB_PREVFREE(head, elm, field) \ + ARB_NODE(head, ARB_PREVFREEIDX(elm, field)) +#define ARB_PREVFREEIDX(elm, field) ARB_LEFTIDX(elm, field) +#define ARB_NEXTFREE(head, elm, field) \ + ARB_NODE(head, ARB_NEXTFREEIDX(elm, field)) +#define ARB_NEXTFREEIDX(elm, field) ARB_RIGHTIDX(elm, field) +#define ARB_ISFREE(elm, field) (ARB_COLOR(elm, field) == ARB_NULLCOL) + +#define ARB_SET(head, elm, parent, field) do { \ + ARB_PARENTIDX(elm, field) = \ + parent ? ARB_SELFIDX(head, parent) : ARB_NULLIDX; \ + ARB_LEFTIDX(elm, field) = ARB_RIGHTIDX(elm, field) = ARB_NULLIDX; \ + ARB_COLOR(elm, field) = ARB_RED; \ +} while (/*CONSTCOND*/ 0) + +#define ARB_SET_BLACKRED(black, red, field) do { \ + ARB_COLOR(black, field) = ARB_BLACK; \ + ARB_COLOR(red, field) = ARB_RED; \ +} while (/*CONSTCOND*/ 0) + +#ifndef ARB_AUGMENT +#define ARB_AUGMENT(x) do {} while (0) +#endif + +#define ARB_ROTATE_LEFT(head, elm, tmp, field) do { \ + __typeof(ARB_RIGHTIDX(elm, field)) _tmpidx; \ + (tmp) = ARB_RIGHT(head, elm, field); \ + _tmpidx = ARB_RIGHTIDX(elm, field); \ + ARB_RIGHTIDX(elm, field) = ARB_LEFTIDX(tmp, field); \ + if (ARB_RIGHTIDX(elm, field) != ARB_NULLIDX) { \ + ARB_PARENTIDX(ARB_LEFT(head, tmp, field), field) = \ + ARB_SELFIDX(head, elm); \ + } \ + ARB_AUGMENT(elm); \ + ARB_PARENTIDX(tmp, field) = ARB_PARENTIDX(elm, field); \ + if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) { \ + if (ARB_SELFIDX(head, elm) == \ + ARB_LEFTIDX(ARB_PARENT(head, elm, field), field)) \ + ARB_LEFTIDX(ARB_PARENT(head, elm, field), \ + field) = _tmpidx; \ + else \ + ARB_RIGHTIDX(ARB_PARENT(head, elm, field), \ + field) = _tmpidx; \ + } else \ + ARB_ROOTIDX(head) = _tmpidx; \ + ARB_LEFTIDX(tmp, field) = ARB_SELFIDX(head, elm); \ + ARB_PARENTIDX(elm, field) = _tmpidx; \ + ARB_AUGMENT(tmp); \ + if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) \ + ARB_AUGMENT(ARB_PARENT(head, tmp, field)); \ +} while (/*CONSTCOND*/ 0) + +#define ARB_ROTATE_RIGHT(head, elm, tmp, field) do { \ + __typeof(ARB_LEFTIDX(elm, field)) _tmpidx; \ + (tmp) = ARB_LEFT(head, elm, field); \ + _tmpidx = ARB_LEFTIDX(elm, field); \ + ARB_LEFTIDX(elm, field) = ARB_RIGHTIDX(tmp, field); \ + if (ARB_LEFTIDX(elm, field) != ARB_NULLIDX) { \ + ARB_PARENTIDX(ARB_RIGHT(head, tmp, field), field) = \ + ARB_SELFIDX(head, elm); \ + } \ + ARB_AUGMENT(elm); \ + ARB_PARENTIDX(tmp, field) = ARB_PARENTIDX(elm, field); \ + if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) { \ + if (ARB_SELFIDX(head, elm) == \ + ARB_LEFTIDX(ARB_PARENT(head, elm, field), field)) \ + ARB_LEFTIDX(ARB_PARENT(head, elm, field), \ + field) = _tmpidx; \ + else \ + ARB_RIGHTIDX(ARB_PARENT(head, elm, field), \ + field) = _tmpidx; \ + } else \ + ARB_ROOTIDX(head) = _tmpidx; \ + ARB_RIGHTIDX(tmp, field) = ARB_SELFIDX(head, elm); \ + ARB_PARENTIDX(elm, field) = _tmpidx; \ + ARB_AUGMENT(tmp); \ + if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) \ + ARB_AUGMENT(ARB_PARENT(head, tmp, field)); \ +} while (/*CONSTCOND*/ 0) + +#define ARB_RETURNFREE(head, elm, field) \ +({ \ + ARB_COLOR(elm, field) = ARB_NULLCOL; \ + ARB_NEXTFREEIDX(elm, field) = ARB_FREEIDX(head); \ + ARB_FREEIDX(head) = ARB_SELFIDX(head, elm); \ + elm; \ +}) + +#define ARB_GETFREEAT(head, field, fidx) \ +({ \ + __typeof(ARB_NODE(head, 0)) _elm, _prevelm; \ + int _idx = fidx; \ + if (ARB_FREEIDX(head) == ARB_NULLIDX && !ARB_FULL(head)) { \ + /* Populate the free list. */ \ + ARB_ARRFOREACH_REVERSE(_elm, field, head) { \ + if (ARB_ISFREE(_elm, field)) \ + ARB_RETURNFREE(head, _elm, field); \ + } \ + } \ + _elm = _prevelm = ARB_NODE(head, ARB_FREEIDX(head)); \ + for (; _idx > 0 && _elm != NULL; _idx--, _prevelm = _elm) \ + _elm = ARB_NODE(head, ARB_NEXTFREEIDX(_elm, field)); \ + if (_elm) { \ + if (fidx == 0) \ + ARB_FREEIDX(head) = \ + ARB_NEXTFREEIDX(_elm, field); \ + else \ + ARB_NEXTFREEIDX(_prevelm, field) = \ + ARB_NEXTFREEIDX(_elm, field); \ + } \ + _elm; \ +}) +#define ARB_GETFREE(head, field) ARB_GETFREEAT(head, field, 0) + +/* Generates prototypes and inline functions */ +#define ARB_PROTOTYPE(name, type, field, cmp) \ + ARB_PROTOTYPE_INTERNAL(name, type, field, cmp,) +#define ARB_PROTOTYPE_STATIC(name, type, field, cmp) \ + ARB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) +#define ARB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ + ARB_PROTOTYPE_INSERT_COLOR(name, type, attr); \ + ARB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \ + ARB_PROTOTYPE_INSERT(name, type, attr); \ + ARB_PROTOTYPE_REMOVE(name, type, attr); \ + ARB_PROTOTYPE_CFIND(name, type, attr); \ + ARB_PROTOTYPE_FIND(name, type, attr); \ + ARB_PROTOTYPE_NFIND(name, type, attr); \ + ARB_PROTOTYPE_CNEXT(name, type, attr); \ + ARB_PROTOTYPE_NEXT(name, type, attr); \ + ARB_PROTOTYPE_CPREV(name, type, attr); \ + ARB_PROTOTYPE_PREV(name, type, attr); \ + ARB_PROTOTYPE_CMINMAX(name, type, attr); \ + ARB_PROTOTYPE_MINMAX(name, type, attr); \ + ARB_PROTOTYPE_REBALANCE(name, type, attr); +#define ARB_PROTOTYPE_INSERT_COLOR(name, type, attr) \ + attr void name##_ARB_INSERT_COLOR(struct name *, struct type *) +#define ARB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \ + attr void name##_ARB_REMOVE_COLOR(struct name *, struct type *, struct type *) +#define ARB_PROTOTYPE_REMOVE(name, type, attr) \ + attr struct type *name##_ARB_REMOVE(struct name *, struct type *) +#define ARB_PROTOTYPE_INSERT(name, type, attr) \ + attr struct type *name##_ARB_INSERT(struct name *, struct type *) +#define ARB_PROTOTYPE_CFIND(name, type, attr) \ + attr const struct type *name##_ARB_CFIND(const struct name *, \ + const struct type *) +#define ARB_PROTOTYPE_FIND(name, type, attr) \ + attr struct type *name##_ARB_FIND(const struct name *, \ + const struct type *) +#define ARB_PROTOTYPE_NFIND(name, type, attr) \ + attr struct type *name##_ARB_NFIND(struct name *, struct type *) +#define ARB_PROTOTYPE_CNFIND(name, type, attr) \ + attr const struct type *name##_ARB_CNFIND(const struct name *, \ + const struct type *) +#define ARB_PROTOTYPE_CNEXT(name, type, attr) \ + attr const struct type *name##_ARB_CNEXT(const struct name *head,\ + const struct type *) +#define ARB_PROTOTYPE_NEXT(name, type, attr) \ + attr struct type *name##_ARB_NEXT(const struct name *, \ + const struct type *) +#define ARB_PROTOTYPE_CPREV(name, type, attr) \ + attr const struct type *name##_ARB_CPREV(const struct name *, \ + const struct type *) +#define ARB_PROTOTYPE_PREV(name, type, attr) \ + attr struct type *name##_ARB_PREV(const struct name *, \ + const struct type *) +#define ARB_PROTOTYPE_CMINMAX(name, type, attr) \ + attr const struct type *name##_ARB_CMINMAX(const struct name *, int) +#define ARB_PROTOTYPE_MINMAX(name, type, attr) \ + attr struct type *name##_ARB_MINMAX(const struct name *, int) +#define ARB_PROTOTYPE_REBALANCE(name, type, attr) \ + attr struct type *name##_ARB_REBALANCE(struct name *, struct type *) + +#define ARB_GENERATE(name, type, field, cmp) \ + ARB_GENERATE_INTERNAL(name, type, field, cmp,) +#define ARB_GENERATE_STATIC(name, type, field, cmp) \ + ARB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) +#define ARB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + ARB_GENERATE_INSERT_COLOR(name, type, field, attr) \ + ARB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ + ARB_GENERATE_INSERT(name, type, field, cmp, attr) \ + ARB_GENERATE_REMOVE(name, type, field, attr) \ + ARB_GENERATE_CFIND(name, type, field, cmp, attr) \ + ARB_GENERATE_FIND(name, type, field, cmp, attr) \ + ARB_GENERATE_CNEXT(name, type, field, attr) \ + ARB_GENERATE_NEXT(name, type, field, attr) \ + ARB_GENERATE_CPREV(name, type, field, attr) \ + ARB_GENERATE_PREV(name, type, field, attr) \ + ARB_GENERATE_CMINMAX(name, type, field, attr) \ + ARB_GENERATE_MINMAX(name, type, field, attr) \ + ARB_GENERATE_REBALANCE(name, type, field, cmp, attr) + +#define ARB_GENERATE_INSERT_COLOR(name, type, field, attr) \ +attr void \ +name##_ARB_INSERT_COLOR(struct name *head, struct type *elm) \ +{ \ + struct type *parent, *gparent, *tmp; \ + while ((parent = ARB_PARENT(head, elm, field)) != NULL && \ + ARB_COLOR(parent, field) == ARB_RED) { \ + gparent = ARB_PARENT(head, parent, field); \ + if (parent == ARB_LEFT(head, gparent, field)) { \ + tmp = ARB_RIGHT(head, gparent, field); \ + if (tmp && ARB_COLOR(tmp, field) == ARB_RED) { \ + ARB_COLOR(tmp, field) = ARB_BLACK; \ + ARB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (ARB_RIGHT(head, parent, field) == elm) { \ + ARB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + ARB_SET_BLACKRED(parent, gparent, field); \ + ARB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = ARB_LEFT(head, gparent, field); \ + if (tmp && ARB_COLOR(tmp, field) == ARB_RED) { \ + ARB_COLOR(tmp, field) = ARB_BLACK; \ + ARB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (ARB_LEFT(head, parent, field) == elm) { \ + ARB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + ARB_SET_BLACKRED(parent, gparent, field); \ + ARB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + ARB_COLOR(ARB_ROOT(head), field) = ARB_BLACK; \ +} + +#define ARB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ +attr void \ +name##_ARB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ +{ \ + struct type *tmp; \ + while ((elm == NULL || ARB_COLOR(elm, field) == ARB_BLACK) && \ + elm != ARB_ROOT(head)) { \ + if (ARB_LEFT(head, parent, field) == elm) { \ + tmp = ARB_RIGHT(head, parent, field); \ + if (ARB_COLOR(tmp, field) == ARB_RED) { \ + ARB_SET_BLACKRED(tmp, parent, field); \ + ARB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = ARB_RIGHT(head, parent, field); \ + } \ + if ((ARB_LEFT(head, tmp, field) == NULL || \ + ARB_COLOR(ARB_LEFT(head, tmp, field), field) == ARB_BLACK) && \ + (ARB_RIGHT(head, tmp, field) == NULL || \ + ARB_COLOR(ARB_RIGHT(head, tmp, field), field) == ARB_BLACK)) { \ + ARB_COLOR(tmp, field) = ARB_RED; \ + elm = parent; \ + parent = ARB_PARENT(head, elm, field); \ + } else { \ + if (ARB_RIGHT(head, tmp, field) == NULL || \ + ARB_COLOR(ARB_RIGHT(head, tmp, field), field) == ARB_BLACK) { \ + struct type *oleft; \ + if ((oleft = ARB_LEFT(head, tmp, field)) \ + != NULL) \ + ARB_COLOR(oleft, field) = ARB_BLACK; \ + ARB_COLOR(tmp, field) = ARB_RED; \ + ARB_ROTATE_RIGHT(head, tmp, oleft, field); \ + tmp = ARB_RIGHT(head, parent, field); \ + } \ + ARB_COLOR(tmp, field) = ARB_COLOR(parent, field); \ + ARB_COLOR(parent, field) = ARB_BLACK; \ + if (ARB_RIGHT(head, tmp, field)) \ + ARB_COLOR(ARB_RIGHT(head, tmp, field), field) = ARB_BLACK; \ + ARB_ROTATE_LEFT(head, parent, tmp, field); \ + elm = ARB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = ARB_LEFT(head, parent, field); \ + if (ARB_COLOR(tmp, field) == ARB_RED) { \ + ARB_SET_BLACKRED(tmp, parent, field); \ + ARB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = ARB_LEFT(head, parent, field); \ + } \ + if ((ARB_LEFT(head, tmp, field) == NULL || \ + ARB_COLOR(ARB_LEFT(head, tmp, field), field) == ARB_BLACK) && \ + (ARB_RIGHT(head, tmp, field) == NULL || \ + ARB_COLOR(ARB_RIGHT(head, tmp, field), field) == ARB_BLACK)) { \ + ARB_COLOR(tmp, field) = ARB_RED; \ + elm = parent; \ + parent = ARB_PARENT(head, elm, field); \ + } else { \ + if (ARB_LEFT(head, tmp, field) == NULL || \ + ARB_COLOR(ARB_LEFT(head, tmp, field), field) == ARB_BLACK) { \ + struct type *oright; \ + if ((oright = ARB_RIGHT(head, tmp, field)) \ + != NULL) \ + ARB_COLOR(oright, field) = ARB_BLACK; \ + ARB_COLOR(tmp, field) = ARB_RED; \ + ARB_ROTATE_LEFT(head, tmp, oright, field); \ + tmp = ARB_LEFT(head, parent, field); \ + } \ + ARB_COLOR(tmp, field) = ARB_COLOR(parent, field); \ + ARB_COLOR(parent, field) = ARB_BLACK; \ + if (ARB_LEFT(head, tmp, field)) \ + ARB_COLOR(ARB_LEFT(head, tmp, field), field) = ARB_BLACK; \ + ARB_ROTATE_RIGHT(head, parent, tmp, field); \ + elm = ARB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + ARB_COLOR(elm, field) = ARB_BLACK; \ +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Sep 14 19:33:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02B14FD3A8; Sat, 14 Sep 2019 19:33:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 46W2jr6Fmwz4MSg; Sat, 14 Sep 2019 19:33:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9DB22480B; Sat, 14 Sep 2019 19:33:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8EJXa9V055117; Sat, 14 Sep 2019 19:33:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8EJXaP6055116; Sat, 14 Sep 2019 19:33:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201909141933.x8EJXaP6055116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 14 Sep 2019 19:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352338 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 352338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 19:33:37 -0000 Author: ian Date: Sat Sep 14 19:33:36 2019 New Revision: 352338 URL: https://svnweb.freebsd.org/changeset/base/352338 Log: Create a mechanism for encoding a system errno into the IIC_Exxxxx space. Errors are communicated between the i2c controller layer and upper layers (iicbus and slave device drivers) using a set of IIC_Exxxxxx constants which effectively define a private number space separate from (and having values that conflict with) the system errno number space. Sometimes it is necessary to report a plain old system error (especially EINTR) from the controller or bus layer and have that value make it back across the syscall interface intact. I initially considered replicating a few "crucial" errno values with similar names and new numbers, e.g., IIC_EINTR, IIC_ERESTART, etc. It seemed like that had the potential to grow over time until many of the errno names were duplicated into the IIC_Exxxxx space. So instead, this defines a mechanism to "encode" an errno into the IIC_Exxxx space by setting the high bit and putting the errno into the lower-order bits; a new errno2iic() function does this. The existing iic2errno() recognizes the encoded values and extracts the original errno out of the encoded value. An interesting wrinkle occurs with the pseudo-error values such as ERESTART -- they aleady have the high bit set, and turning it off would be the wrong thing to do. Instead, iic2errno() recognizes that lots of high bits are on (i.e., it's a negative number near to zero) and just returns that value as-is. Thus, existing drivers continue to work without needing any changes, and there is now a way to return errno values from the lower layers. The first use of that is in iicbus_poll() which does mtx_sleep() with the PCATCH flag, and needs to return the errno from that up the call chain. Differential Revision: https://reviews.freebsd.org/D20975 Modified: head/sys/dev/iicbus/iiconf.c head/sys/dev/iicbus/iiconf.h Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Sat Sep 14 19:23:46 2019 (r352337) +++ head/sys/dev/iicbus/iiconf.c Sat Sep 14 19:33:36 2019 (r352338) @@ -42,6 +42,18 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" /* + * Encode a system errno value into the IIC_Exxxxx space by setting the + * IIC_ERRNO marker bit, so that iic2errno() can turn it back into a plain + * system errno value later. This lets controller- and bus-layer code get + * important system errno values (such as EINTR/ERESTART) back to the caller. + */ +int +errno2iic(int errno) +{ + return ((errno == 0) ? 0 : errno | IIC_ERRNO); +} + +/* * Translate IIC_Exxxxx status values to vaguely-equivelent errno values. */ int @@ -59,7 +71,22 @@ iic2errno(int iic_status) case IIC_ENOTSUPP: return (EOPNOTSUPP); case IIC_ENOADDR: return (EADDRNOTAVAIL); case IIC_ERESOURCE: return (ENOMEM); - default: return (EIO); + default: + /* + * If the high bit is set, that means it's a system errno value + * that was encoded into the IIC_Exxxxxx space by setting the + * IIC_ERRNO marker bit. If lots of high-order bits are set, + * then it's one of the negative pseudo-errors such as ERESTART + * and we return it as-is. Otherwise it's a plain "small + * positive integer" errno, so just remove the IIC_ERRNO marker + * bit. If it's some unknown number without the high bit set, + * there isn't much we can do except call it an I/O error. + */ + if ((iic_status & IIC_ERRNO) == 0) + return (EIO); + if ((iic_status & 0xFFFF0000) != 0) + return (iic_status); + return (iic_status & ~IIC_ERRNO); } } @@ -97,7 +124,7 @@ iicbus_poll(struct iicbus_softc *sc, int how) return (IIC_EBUSBSY); } - return (error); + return (errno2iic(error)); } /* Modified: head/sys/dev/iicbus/iiconf.h ============================================================================== --- head/sys/dev/iicbus/iiconf.h Sat Sep 14 19:23:46 2019 (r352337) +++ head/sys/dev/iicbus/iiconf.h Sat Sep 14 19:33:36 2019 (r352338) @@ -96,12 +96,14 @@ #define IIC_ENOTSUPP 0x8 /* request not supported */ #define IIC_ENOADDR 0x9 /* no address assigned to the interface */ #define IIC_ERESOURCE 0xa /* resources (memory, whatever) unavailable */ +#define IIC_ERRNO __INT_MIN /* marker bit: errno is in low-order bits */ /* * Note that all iicbus functions return IIC_Exxxxx status values, * except iic2errno() (obviously) and iicbus_started() (returns bool). */ extern int iic2errno(int); +extern int errno2iic(int); extern int iicbus_request_bus(device_t, device_t, int); extern int iicbus_release_bus(device_t, device_t); extern device_t iicbus_alloc_bus(device_t); From owner-svn-src-head@freebsd.org Sat Sep 14 21:18:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 354CEFF8E7; Sat, 14 Sep 2019 21:18:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 46W52W0LGjz4Vty; Sat, 14 Sep 2019 21:18:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E319625BFB; Sat, 14 Sep 2019 21:18:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8ELIAxL017410; Sat, 14 Sep 2019 21:18:10 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8ELIA4L017409; Sat, 14 Sep 2019 21:18:10 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <201909142118.x8ELIA4L017409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Sat, 14 Sep 2019 21:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352340 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 352340 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 21:18:11 -0000 Author: bdragon Date: Sat Sep 14 21:18:10 2019 New Revision: 352340 URL: https://svnweb.freebsd.org/changeset/base/352340 Log: Fix aux_info corruption in rtld direct execution mode. After the aux vector is moved, it is necessary to re-digest aux_info so the pointers are updated to the new locations. This was causing thread creation to fail on powerpc64 when using direct execution due to a nonsense value being read for aux_info[AT_STACKPROT]. Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D21656 Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat Sep 14 20:26:50 2019 (r352339) +++ head/libexec/rtld-elf/rtld.c Sat Sep 14 21:18:10 2019 (r352340) @@ -499,6 +499,13 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr if (auxp->a_type == AT_NULL) break; } + /* Since the auxiliary vector has moved, redigest it. */ + for (i = 0; i < AT_COUNT; i++) + aux_info[i] = NULL; + for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { + if (auxp->a_type < AT_COUNT) + aux_info[auxp->a_type] = auxp; + } } else { _rtld_error("No binary"); rtld_die(); From owner-svn-src-head@freebsd.org Sat Sep 14 21:49:43 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFCDED041F; Sat, 14 Sep 2019 21:49:43 +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 46W5kv4j3tz4X9N; Sat, 14 Sep 2019 21:49:43 +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 8195026139; Sat, 14 Sep 2019 21:49:43 +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 x8ELnh0U035301; Sat, 14 Sep 2019 21:49:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8ELnhqE035300; Sat, 14 Sep 2019 21:49:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201909142149.x8ELnhqE035300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Sep 2019 21:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352341 - head/contrib/libedit X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/libedit X-SVN-Commit-Revision: 352341 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 21:49:43 -0000 Author: dim Date: Sat Sep 14 21:49:42 2019 New Revision: 352341 URL: https://svnweb.freebsd.org/changeset/base/352341 Log: Fix arm and aarch64 builds of libedit after r352275 On arm and arm64, where chars are unsigned by default, buildworld dies with: --- terminal.o --- /usr/src/contrib/libedit/terminal.c:569:41: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] el->el_cursor.v][where & 0370] != ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /usr/src/contrib/libedit/terminal.c:659:28: error: comparison of integers of different signs: 'wint_t' (aka 'int') and 'wchar_t' (aka 'unsigned int') [-Werror,-Wsign-compare] [el->el_cursor.h] == MB_FILL_CHAR) ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ Fix this by making MB_FILL_CHAR a wint_t, so no casting is needed. Note that in https://reviews.freebsd.org/D21584 this was also proposed by Yuichiro Naito . Reviewed by: bapt Subscribers: naito.yuichiro_gmail.com, ml_vishwin.info MFC after: 3 weeks X-MFC-With: r352275 Differential Revision: https://reviews.freebsd.org/D21657 Modified: head/contrib/libedit/chartype.h head/contrib/libedit/terminal.c Modified: head/contrib/libedit/chartype.h ============================================================================== --- head/contrib/libedit/chartype.h Sat Sep 14 21:18:10 2019 (r352340) +++ head/contrib/libedit/chartype.h Sat Sep 14 21:49:42 2019 (r352341) @@ -87,7 +87,7 @@ libedit_private size_t ct_enc_width(wchar_t); /* The terminal is thought of in terms of X columns by Y lines. In the cases * where a wide character takes up more than one column, the adjacent * occupied column entries will contain this faux character. */ -#define MB_FILL_CHAR ((wchar_t)-1) +#define MB_FILL_CHAR ((wint_t)-1) /* Visual width of character c, taking into account ^? , \0177 and \U+nnnnn * style visual expansions. */ Modified: head/contrib/libedit/terminal.c ============================================================================== --- head/contrib/libedit/terminal.c Sat Sep 14 21:18:10 2019 (r352340) +++ head/contrib/libedit/terminal.c Sat Sep 14 21:49:42 2019 (r352341) @@ -1224,7 +1224,7 @@ terminal__putc(EditLine *el, wint_t c) { char buf[MB_LEN_MAX +1]; ssize_t i; - if (c == (wint_t)MB_FILL_CHAR) + if (c == MB_FILL_CHAR) return 0; if (c & EL_LITERAL) return fputs(literal_get(el, c), el->el_outfile); From owner-svn-src-head@freebsd.org Sat Sep 14 22:32:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D16C4D11F2; Sat, 14 Sep 2019 22:32:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46W6h256D2z4Z2H; Sat, 14 Sep 2019 22:32:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f54.google.com with SMTP id r26so70343904ioh.8; Sat, 14 Sep 2019 15:32:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=4Kb+DBm3UHgEBQwT/Js8LftCZM5ObwtPaJVQH6O1IIM=; b=pSlmvqnw9GQ5w/AXju6+tdX1YmAdZN9ZJJFj/bxwpP6aH7yR6AXD6zfVMUUKh3+5Qm sttCSLlyMRxtk8MjiHS7JyRNO5jKA4tIgyInUDz0zuQJc6KlnNTV4I7NjayFiNeI5smD yDOCjqxJECFUTvaQ2fP7VHKS/0rawb/06YAXrUI9cJnGi5RpAUaNPTfBazlYazelsQ34 7ONdBxQ4v9Y1YFItne+swOw6wATGczNtf/MvijQ+ynQoA8Y52bhi0V0u85jM/4gCTjkC wdhscOp5mZhYsRYsWywW8ttl43dRI59S7LSM0FEsBTLFmQTOpta0ZJt+vAAqPOI6+2CY SkYw== X-Gm-Message-State: APjAAAXTh/GAtuzkX/eNPZTrcDYznUul00eFVjsBNFmiV+ettNFnOkJE tP2FKdIvQvM12tTareiWyUnYLTXq X-Google-Smtp-Source: APXvYqzN1JHUfzl4RPOEVK0I7+5qNBydgx3b/mMDChq5/VCSdghmGAgLfLeqmi63toH2rgOEaoUaBw== X-Received: by 2002:a02:4807:: with SMTP id p7mr20990661jaa.95.1568500337271; Sat, 14 Sep 2019 15:32:17 -0700 (PDT) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com. [209.85.166.52]) by smtp.gmail.com with ESMTPSA id i24sm24011573ioe.6.2019.09.14.15.32.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Sep 2019 15:32:16 -0700 (PDT) Received: by mail-io1-f52.google.com with SMTP id k5so45228070iol.5; Sat, 14 Sep 2019 15:32:16 -0700 (PDT) X-Received: by 2002:a5d:9856:: with SMTP id p22mr8262462ios.231.1568500336219; Sat, 14 Sep 2019 15:32:16 -0700 (PDT) MIME-Version: 1.0 References: <201909141923.x8EJNkVx049506@repo.freebsd.org> In-Reply-To: <201909141923.x8EJNkVx049506@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sat, 14 Sep 2019 15:32:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r352337 - in head: share/man/man3 sys/sys tests/sys/sys To: Edward Tomasz Napierala Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46W6h256D2z4Z2H X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2019 22:32:18 -0000 One correction: On Sat, Sep 14, 2019 at 12:23 PM Edward Tomasz Napierala wrote: > > Author: trasz > Date: Sat Sep 14 19:23:46 2019 > New Revision: 352337 > URL: https://svnweb.freebsd.org/changeset/base/352337 > > Log: > Introduce arb(3), the Array-based Red-Black Tree macros: similar > to the traditional tree(3) RB trees, but using an array (preallocated, > linear chunk of memory) to store the tree. > > This avoids allocation overhead, improves memory locality, > and makes it trivially easy to share/transfer/copy the entire tree > without the need for marshalling. The downside is that the size > is fixed at initialization time; there is no mechanism to resize > it. > > This is one of the dependencies for the new stats(3) framework > (https://reviews.freebsd.org/D20477). > > Reviewed by: bcr (man pages), markj > Discussed with: cem This should read: "Objected to by: cem" Thanks, Conrad